Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-headless-output FR-002
The typed outcome of a command (commons headless 0003-headless-outputFR-002): what a verb returns instead of printing. A report's data and its text, the problems the run found, the lines it wants seen, the optional features it noticed are off (hints), the steps it spells out for the person, and the findings a SARIF reader would list. No surface is named here: the command line draws it, a tool server returns it as JSON.
typeHint= {
/** Its stable id: it is shown at most once in a while. */readonlyid:string;
/** What is off, and what it would give. */readonlymessage:string;
/** The command that turns it on, where there is one. */readonlycommand?:string;
};
An optional feature that is merely off: a hint, not a problem.
type Outcome<D = unknown> = {
/** The report's data: what `--json` carries under `data`. */
readonly data: D;
/** …(1207 characters)
typeOutcome<D=unknown> = {
/** The report's data: what `--json` carries under `data`. */readonlydata:D;
/** The report's text, for a person; what the command writes to its output. */readonlytext:string|undefined;
/** Every problem found, in the order found. */readonlyproblems:readonlyProblem[];
/** Lines the run wants the person to see ("Sent: every server applies it within 15 minutes"). */readonlyoutcomes:readonlystring[];
/** Optional features that are off. */readonlyhints:readonlyHint[];
/** Steps the command spells out: `next: <command>` is a candidate for the closing next line, any other line is shown as a step (`then: ...`). */readonlynext:readonlystring[];
/** Findings, for SARIF. */readonlyfindings:readonlyFinding[];
/** The verdict's title when all is well ("Up to date"). */readonlytitle:string|undefined;
/** Whether the run was stopped by the person before it ended. */readonlycancelled:boolean;
/** The exit the command names for its run (0008-exit-style-consent FR-001): `usage` or `environment` where its problem is of that kind; none where the problems say it. */readonlyexit:RunExit|undefined;
};
Two outcomes as one: the data and text of the first (the second is what was found beside it), and everything else of the first and then the second, in order. It is associative, and NOTHING is its identity for everything but the data.
The findings a SARIF reader sees for a run that has none of its own: each failure an error, each warning a warning, with the problem's code as the rule.
typeHint= {
/** Its stable id: it is shown at most once in a while. */readonlyid:string;
/** What is off, and what it would give. */readonlymessage:string;
/** The command that turns it on, where there is one. */readonlycommand?:string;
};
An optional feature that is merely off: a hint, not a problem.
type Outcome<D = unknown> = {
/** The report's data: what `--json` carries under `data`. */
readonly data: D;
/** …(1207 characters)
typeOutcome<D=unknown> = {
/** The report's data: what `--json` carries under `data`. */readonlydata:D;
/** The report's text, for a person; what the command writes to its output. */readonlytext:string|undefined;
/** Every problem found, in the order found. */readonlyproblems:readonlyProblem[];
/** Lines the run wants the person to see ("Sent: every server applies it within 15 minutes"). */readonlyoutcomes:readonlystring[];
/** Optional features that are off. */readonlyhints:readonlyHint[];
/** Steps the command spells out: `next: <command>` is a candidate for the closing next line, any other line is shown as a step (`then: ...`). */readonlynext:readonlystring[];
/** Findings, for SARIF. */readonlyfindings:readonlyFinding[];
/** The verdict's title when all is well ("Up to date"). */readonlytitle:string|undefined;
/** Whether the run was stopped by the person before it ended. */readonlycancelled:boolean;
/** The exit the command names for its run (0008-exit-style-consent FR-001): `usage` or `environment` where its problem is of that kind; none where the problems say it. */readonlyexit:RunExit|undefined;
};
Two outcomes as one: the data and text of the first (the second is what was found beside it), and everything else of the first and then the second, in order. It is associative, and NOTHING is its identity for everything but the data.
The findings a SARIF reader sees for a run that has none of its own: each failure an error, each warning a warning, with the problem's code as the rule.