@quenty/cli-output-helpers
Version:
Helpers to generate Nevermore package and game templates
35 lines • 1.32 kB
TypeScript
/**
* Formatting helpers for ProgressSummary values.
*/
import { type ProgressSummary, type JobPhase } from './reporter.js';
/**
* Format progress for inline display in spinners and running status.
* Returns empty string when progress is undefined.
*
* - test-counts: "(5/23)"
* - bytes: "12.3 MB" or "45%"
* - steps: "(3/10)"
*/
export declare function formatProgressInline(progress?: ProgressSummary): string;
/**
* Format progress for final result display (passed/failed lines).
* Returns empty string when progress is undefined.
*
* - test-counts: "(23/100)" or "(0/0)"
* - bytes: "(12.3 MB)"
* - steps: "(3/10)"
*/
export declare function formatProgressResult(progress?: ProgressSummary): string;
/** True when progress is test-counts with total === 0. */
export declare function isEmptyTestRun(progress?: ProgressSummary): boolean;
/**
* Condense a raw error string and optional failedPhase into a short one-liner.
*
* Examples:
* summarizeFailure("Upload failed: 409 Conflict: {...}", "uploading")
* → "at uploading: Upload failed (409)"
* summarizeFailure("timeout after 120s", "executing")
* → "at executing: timeout after 120s"
*/
export declare function summarizeFailure(error?: string, failedPhase?: JobPhase): string;
//# sourceMappingURL=progress-format.d.ts.map