mise API - v0.0.0
    Preparing search index...

    Class PipeCaptureSink

    Sink that captures the data channel for a pipe or redirect.

    Text writes (a command's rendered envelope output) are ANSI-stripped, the documented plain-pipe deviation; binary writes (a raw cat of a DICOM file) are kept byte-for-byte. The err channel passes through to stderr live, since a pipe never carries the error stream. Status and progress are ephemeral.

    Implements

    Index
    • Returns everything captured on the data channel so far.

      Returns Buffer

      The captured bytes (stripped text and raw binary, in write order).

    • Writes command output (the data channel).

      Parameters

      • chunk: string | Buffer<ArrayBufferLike>

        Printable text (ANSI permitted) or raw bytes.

      Returns void

    • Writes error-stream output (the err channel).

      Parameters

      • chunk: string | Buffer<ArrayBufferLike>

        Printable text (ANSI permitted) or raw bytes.

      Returns void

    • Sends a typed event to the command's origin surface, while the command runs.

      The kind names what the data is (games.trek.state); a surface shows the kinds it knows and drops the rest. Optional: a sink that predates events, or has nowhere to send one, leaves it out, and a command sends with sink.event_write?.(kind, data).

      Parameters

      • _kind: string

        What the data is.

      • _data: unknown

        The event, shaped by its kind; it must survive JSON.

      Returns void