export type Rendered = /** A list: `{ models: [...] }` — the common shape for a read command. */ { kind: "rows"; label: string; columns: string[]; rows: Row[]; /** Scalars that sat beside the list, like a total `count`. */ meta: Entry[]; } /** A single thing: `{ user: {...} }`, or a bare object. */ | { kind: "record"; entries: Entry[]; } /** Not JSON, or JSON we have no better idea about. Print it as it came. */ | { kind: "text"; text: string; }; export type Row = { cells: string[]; record: Record; }; export type Entry = { key: string; value: string; }; /** * Decides what a command's stdout should look like on screen. Anything * unrecognised falls through to `text`, so a command whose output we have * never seen still prints exactly what it printed before. */ export declare function renderOutput(stdout: string): Rendered; /** Aligned, padded lines. Callers add their own colour and indentation. */ export declare function formatTable(columns: readonly string[], rows: readonly Row[]): string[]; /** * Shortens values that cannot fit the space left after the key column. Left * whole, a long one (an S3 path, a stringified config) wraps mid-token and * drags the key column out of line with it. Below a usable remainder nothing * is clipped: a dozen characters of a path help less than a wrapped one. */ export declare function clipEntries(entries: readonly Entry[], available: number): Entry[]; /** `key value` pairs, keys padded to a common width. */ export declare function formatRecord(entries: readonly Entry[]): string[]; export declare function toEntries(record: Record): Entry[]; //# sourceMappingURL=render.d.ts.map