Interface TerminalOutputMatcher

A matcher that runs on a sub-section of a terminal command's output

interface TerminalOutputMatcher {
    anchor: TerminalOutputAnchor;
    length: number;
    lineMatcher: string | RegExp;
    offset: number;
}

Properties

Which side of the output to anchor the offset and length against.

length: number

The number of wrapped lines to match against, this should be as small as possible for performance reasons. This is capped at 40.

lineMatcher: string | RegExp

A string or regex to match against the unwrapped line. If this is a regex with the multiline flag, it will scan an amount of lines equal to \n instances in the regex + 1.

offset: number

The number of rows above or below the anchor to start matching against.