@vigilbase/cli
Version:
Vigilbase CLI — security scanners, agent tools, and Vigilbase One from the terminal.
24 lines (23 loc) • 1.22 kB
TypeScript
import type { EntryCounts } from './snapshot-file.js';
/**
* Untrusted single-line text (account names from cf): controls and line
* breaks collapsed, length bounded. The terminal UI passes its `ellipsis`
* (`...` on an ASCII-only console).
*/
export declare function displayText(value: string, max: number, ellipsis?: string): string;
/** `0123…cdef` (`0123...cdef` with the ASCII `ellipsis` of the terminal UI). */
export declare function maskId(id: string, ellipsis?: string): string;
/** `9f2c…a71e` */
export declare function shortSha(sha256: string): string;
export declare function formatBytes(bytes: number): string;
/** Local `HH:MM` for an ISO timestamp. */
export declare function formatClock(iso: string): string;
export declare function formatDuration(seconds: number): string;
/** `3 reads denied (HTTP 403) · 60 reads not collectable with cf` */
export declare function readsSummary(counts: EntryCounts, denied: number): string;
export type CountsProgress = {
update(text: string): void;
stop(): void;
};
/** A single updating stderr line, or nothing when progress is disabled. */
export declare function startCountsProgress(enabled: boolean, stream?: NodeJS.WritableStream): CountsProgress;