Skip to content

Documentation / listr2 / ProcessOutputStream

Class: ProcessOutputStream

Constructors

new ProcessOutputStream(stream)

new ProcessOutputStream(stream): ProcessOutputStream

Parameters

stream: WriteStream

Returns

ProcessOutputStream

Source

packages/listr2/src/utils/process-output/process-output-stream.ts:10

Properties

method

private readonly method: (buffer, cb?) => boolean(str, encoding?, cb?) => boolean

Sends data on the socket. The second parameter specifies the encoding in the case of a string. It defaults to UTF8 encoding.

Returns true if the entire data was flushed successfully to the kernel buffer. Returns false if all or part of the data was queued in user memory.'drain' will be emitted when the buffer is again free.

The optional callback parameter will be executed when the data is finally written out, which may not be immediately.

See Writable stream write() method for more information.

Parameters

buffer: string | Uint8Array

cb?

Returns

boolean

Since

v0.1.90

Parameters

str: string | Uint8Array

encoding?: BufferEncoding

cb?

Returns

boolean

Source

packages/listr2/src/utils/process-output/process-output-stream.ts:7


buffer

private readonly buffer: ProcessOutputBuffer

Source

packages/listr2/src/utils/process-output/process-output-stream.ts:8


stream

private stream: WriteStream

Source

packages/listr2/src/utils/process-output/process-output-stream.ts:10

Accessors

out

get out(): WriteStream

Returns

WriteStream

Source

packages/listr2/src/utils/process-output/process-output-stream.ts:15

Methods

hijack()

hijack(): void

Returns

void

Source

packages/listr2/src/utils/process-output/process-output-stream.ts:21


release()

release(): ProcessOutputBufferEntry[]

Returns

ProcessOutputBufferEntry[]

Source

packages/listr2/src/utils/process-output/process-output-stream.ts:25


write()

write(...args): boolean

Parameters

• ...args: [string | Uint8Array, BufferEncoding, (err?) => void]

Returns

boolean

Source

packages/listr2/src/utils/process-output/process-output-stream.ts:35