Renders load progress on a terminal using the shared normalized load-log format (core/progress_log.ts) — the same text rendition Share mirrors to the browser console, so a pasted CLI run and a pasted browser log read identically. Format spec: Share design/new/load-log-format.md.

Writes to stderr so stdout stays clean for data output. On a TTY the current stage's line repaints in place and freezes (newline) when the stage completes; when redirected (CI logs) it prints the live line at most once per nonTtyIntervalMs plus every frozen stage line.

Constructors

  • Construct this against an output stream.

    Parameters

    • out: WriteStream = process.stderr

      The stream to render to (default stderr).

    • nonTtyIntervalMs: number = DEFAULT_NON_TTY_INTERVAL_MS

      Minimum ms between live lines when not a TTY.

    Returns CliProgressRenderer

Methods

  • Finish rendering: freeze any running stage's line and print the separate before/after Total line.

    Parameters

    • OptionalatElapsedMs: number

      Optional load-end elapsed ms, so the final stage's duration covers the time until the load finished (not just until its last progress event).

    • OptionalatMemoryMb: number

      Optional load-end heap MB.

    Returns void

  • Print the early model line (from header info).

    Parameters

    Returns void

  • Progress callback — bound as an arrow so it can be handed directly to a ProgressTracker / ModelLoadOptions.onProgress.

    Parameters

    Returns void