logical.Verbositytypeno test imports ittype Verbosity = "calm" | "verbose" | "quiet" | "json";How much of a run is shown.
How much of a run reaches a person (commons headless 0003-headless-output FR-003): the four modes (calm, the default, quiet on success and loud and actionable on a problem; verbose, every item as it happens; quiet, the verdict alone; json, nothing for a person but one document), how the flags choose among them, and which kind of line each mode shows. The surface only draws what this says to show.
import { shows, verbosityOf } from "./verbosity.ts";
shows("calm", "step"); // false: a phase that went well is not a line in calm
shows("verbose", "item"); // true
verbosityOf({ json: false, quiet: false, verbose: true }); // ok("verbose")logical.Verbositytypeno test imports ittype Verbosity = "calm" | "verbose" | "quiet" | "json";How much of a run is shown.
logical.VERBOSITIESconstno test imports itconst VERBOSITIES: readonly Verbosity[]Every verbosity.
logical.VerbosityFlagstypeno test imports ittype VerbosityFlags = { readonly json: boolean; readonly quiet: boolean; readonly verbose: boolean };The flags that choose a verbosity.
logical.verbosityOffunctionno test imports itfunction verbosityOf(flags: VerbosityFlags): Result<Verbosity, string>The verbosity the flags choose: json over everything (a program that reads the output wants the document whatever else is set), quiet and verbose together contradict each other and are refused, else calm.
logical.LineKindtypeno test imports ittype LineKind = "header" | "step" | "phase" | "item" | "change" | "problem" | "outcome" | "hint" | "verdict" | "next" | "live" | "log";The kinds of line a run can show: a step is the line of a phase that went well, a phase the line of one that has something to see (a failure, a warning, a step for the person, something pending).
logical.LINE_KINDSconstno test imports itconst LINE_KINDS: readonly LineKind[]Every kind of line.
logical.showsfunctionno test imports itfunction shows(mode: Verbosity, kind: LineKind): booleanWhether a mode shows a kind of line on the screen (the run's log records every kind whatever the mode).
Verbositytypeno test imports ittype Verbosity = "calm" | "verbose" | "quiet" | "json";How much of a run is shown.
VERBOSITIESconstconst VERBOSITIES: readonly Verbosity[]Every verbosity.
VerbosityFlagstypeno test imports ittype VerbosityFlags = { readonly json: boolean; readonly quiet: boolean; readonly verbose: boolean };The flags that choose a verbosity.
verbosityOffunctionfunction verbosityOf(flags: VerbosityFlags): Result<Verbosity, string>The verbosity the flags choose: json over everything (a program that reads the output wants the document whatever else is set), quiet and verbose together contradict each other and are refused, else calm.
LineKindtypeno test imports ittype LineKind = "header" | "step" | "phase" | "item" | "change" | "problem" | "outcome" | "hint" | "verdict" | "next" | "live" | "log";The kinds of line a run can show: a step is the line of a phase that went well, a phase the line of one that has something to see (a failure, a warning, a step for the person, something pending).
LINE_KINDSconstconst LINE_KINDS: readonly LineKind[]Every kind of line.
showsfunctionfunction shows(mode: Verbosity, kind: LineKind): booleanWhether a mode shows a kind of line on the screen (the run's log records every kind whatever the mode).