UNPKG

code-transmute

Version:

Convert any codebase into any language — without changing its brain.

53 lines 2.19 kB
export interface ProgressOptions { text: string; color?: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'; spinner?: string; hideCursor?: boolean; } export declare class ProgressManager { private spinner; private currentStep; private totalSteps; private steps; constructor(totalSteps?: number, steps?: string[]); start(options: ProgressOptions): void; updateText(text: string): void; updateColor(color: string): void; succeed(text?: string): void; fail(text?: string): void; warn(text?: string): void; info(text?: string): void; stop(): void; nextStep(stepText?: string): void; setStep(step: number, stepText?: string): void; getCurrentStep(): number; getTotalSteps(): number; getProgress(): number; logProgress(message: string, current?: number, total?: number): void; private createProgressBar; logStep(step: string, status?: 'pending' | 'in-progress' | 'completed' | 'failed'): void; logSuccess(message: string): void; logError(message: string): void; logWarning(message: string): void; logInfo(message: string): void; logHeader(title: string): void; logSubHeader(title: string): void; logTable(headers: string[], rows: string[][]): void; logSummary(items: { label: string; value: string | number; status?: 'success' | 'warning' | 'error'; }[]): void; clear(): void; reset(): void; } export declare const createProgress: (totalSteps?: number, steps?: string[]) => ProgressManager; export declare const logProgress: (message: string, current: number, total: number) => void; export declare const logStep: (step: string, status?: "pending" | "in-progress" | "completed" | "failed") => void; export declare const logSuccess: (message: string) => void; export declare const logError: (message: string) => void; export declare const logWarning: (message: string) => void; export declare const logInfo: (message: string) => void; export declare const logHeader: (title: string) => void; export declare const logSubHeader: (title: string) => void; //# sourceMappingURL=progress.d.ts.map