Initial public release of Apophis — invariant-driven automated API testing
This commit is contained in:
@@ -183,29 +183,6 @@ function generateNextSteps(failure: FailureRecord): string {
|
||||
// Progress and summary rendering
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Render progress for a running command.
|
||||
* Safe for CI (no spinners, just text updates).
|
||||
*/
|
||||
export function renderProgress(
|
||||
current: number,
|
||||
total: number,
|
||||
label: string,
|
||||
ctx: OutputContext,
|
||||
): string {
|
||||
const c = getColorizer(ctx);
|
||||
const pct = total > 0 ? Math.round((current / total) * 100) : 0;
|
||||
|
||||
if (ctx.isCI || !ctx.isTTY) {
|
||||
// CI mode: simple text, no spinner
|
||||
return `${label} [${current}/${total}] ${pct}%`;
|
||||
}
|
||||
|
||||
// TTY mode: with color
|
||||
const bar = renderProgressBar(current, total, 20, ctx);
|
||||
return `${c.dim(label)} ${bar} ${c.bold(`${pct}%`)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a simple ASCII progress bar.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user