()
| 41 | const magenta = (s: string): string => wrap('\x1b[35m', s) |
| 42 | |
| 43 | function termWidth(): number { |
| 44 | const cols = process.stdout.columns ?? TERMINAL_COLUMNS_FALLBACK |
| 45 | return Math.min(Math.max(cols, 60), TERMINAL_COLUMNS_CAP) |
| 46 | } |
| 47 | |
| 48 | function pad(value: string, width: number): string { |
| 49 | // visible length excludes ANSI codes; our command labels are |