/** * @typedef {{ severity: string, message: string }} Finding * A single reportable outcome and how loudly to report it. */ /** * A WARNING-severity finding: injection-shaped, worth the banner. * @param {string} message * @returns {Finding} */ export function warning(message: string): Finding; /** * A NOTE-severity finding: reported, not alarming. * @param {string} message * @returns {Finding} */ export function note(message: string): Finding; /** * A finding at `severity` — the constructor for a caller that has already * computed the tier as a boolean and would otherwise write the ternary itself. * @param {boolean} isWarning * @param {string} message * @returns {Finding} */ export function finding(isWarning: boolean, message: string): Finding; /** * The messages of every WARNING-severity finding, in order. * @param {readonly Finding[]} findings * @returns {string[]} */ export function warningMessages(findings: readonly Finding[]): string[]; /** * The messages of every NOTE-severity finding, in order. * @param {readonly Finding[]} findings * @returns {string[]} */ export function noteMessages(findings: readonly Finding[]): string[]; /** * The one place a finding's LOUDNESS is decided, and the vocabulary every layer * reports in. * * Every layer of this pipeline used to have exactly one volume. A cursor-spoofing * ANSI payload and a single stray escape byte in a README produced the same * `WARNING: Tool output sanitized` banner; so did one soft hyphen, and so did * the `