UNPKG

@rushstack/stream-collator

Version:

Display intelligible realtime output from concurrent processes

27 lines 1.05 kB
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. Object.defineProperty(exports, "__esModule", { value: true }); exports.CollatedTerminal = void 0; const terminal_1 = require("@rushstack/terminal"); /** * This API was introduced as a temporary measure. * @deprecated Very soon we plan to replace this with the `Terminal` API from `@rushstack/node-core-library`. * @beta */ class CollatedTerminal { constructor(destination) { this._destination = destination; } writeChunk(chunk) { this._destination.writeChunk(chunk); } writeStdoutLine(message) { this._destination.writeChunk({ text: message + '\n', kind: terminal_1.TerminalChunkKind.Stdout }); } writeStderrLine(message) { this._destination.writeChunk({ text: message + '\n', kind: terminal_1.TerminalChunkKind.Stderr }); } } exports.CollatedTerminal = CollatedTerminal; //# sourceMappingURL=CollatedTerminal.js.map