Home > @rushstack/terminal > StdioSummarizer

StdioSummarizer class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Summarizes the results of a failed build task by returning a subset of stderr output not to exceed a specified maximum number of lines.

Signature:

export declare class StdioSummarizer extends TerminalWritable 

Extends: TerminalWritable

Remarks

IMPORTANT: This transform assumes that its input was prepared by StderrLineTransform, so that each ITerminalChunk.text item is a single line terminated by a "\n" character.

The IStdioSummarizerOptions.leadingLines and IStdioSummarizerOptions.trailingLines counts specify the maximum number of lines to be returned. Any additional lines will be omitted. For example, if leadingLines and trailingLines were set to 3, then the summary of 16 stderr lines might look like this:

Line 1
Line 2
Line 3
  ...10 lines omitted...
Line 14
Line 15
Line 16

If the stderr output is completely empty, then the stdout output will be summarized instead.

Constructors

Constructor Modifiers Description
(constructor)(options)   (BETA) Constructs a new instance of the StdioSummarizer class

Methods

Method Modifiers Description
getReport()   (BETA) Returns the summary report.
onWriteChunk(chunk)   (BETA)