@vigilbase/cli
Version:
Vigilbase CLI — security scanners, agent tools, and Vigilbase One from the terminal.
20 lines (19 loc) • 826 B
TypeScript
import { type Writer } from './format.js';
export type ProgressHandle = {
stop: (finalMessage?: string) => void;
};
/**
* Live indeterminate progress on stderr while a scan/request is in flight.
* Disabled for --json, non-TTY, CI, and NO_COLOR-style quiet environments.
*/
export declare function startProgress(label: string, options: {
isEnabled: boolean;
stderr?: NodeJS.WritableStream;
/** Soft expected duration used to fill the bar (ms). */
expectedMs?: number;
}): ProgressHandle;
export declare function shouldShowProgress(mode: 'text' | 'json', env?: NodeJS.ProcessEnv, stderr?: {
isTTY?: boolean;
}): boolean;
/** Tiny helper so call sites stay readable. */
export declare function withProgress<T>(label: string, mode: 'text' | 'json', work: () => Promise<T>, writer?: Writer): Promise<T>;