UNPKG

@testplane/storybook

Version:

Testplane plugin that enables runtime screenshot storybook tests autogeneration

20 lines 1.01 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.pipeWithPrefix = void 0; const stream_1 = require("stream"); const with_prefix_transformer_1 = require("./with-prefix-transformer"); const logger_1 = __importDefault(require("../../../logger")); const pipeWithPrefix = (childProcess, prefix) => { const logOnErrorCb = (error) => { if (error) { logger_1.default.error("Got an error, trying to pipeline dev server output:", error.message); } }; (0, stream_1.pipeline)(childProcess.stdout, new with_prefix_transformer_1.WithPrefixTransformer(prefix), process.stdout, logOnErrorCb); (0, stream_1.pipeline)(childProcess.stderr, new with_prefix_transformer_1.WithPrefixTransformer(prefix), process.stderr, logOnErrorCb); }; exports.pipeWithPrefix = pipeWithPrefix; //# sourceMappingURL=index.js.map