/** * Colored terminal output helpers. */ const cyan = (s: string) => `\x1b[36m${s}\x1b[0m` const green = (s: string) => `\x1b[32m${s}\x1b[0m` const yellow = (s: string) => `\x1b[33m${s}\x1b[0m` const red = (s: string) => `\x1b[31m${s}\x1b[0m` const dim = (s: string) => `\x1b[2m${s}\x1b[0m` const bold = (s: string) => `\x1b[1m${s}\x1b[0m` export const log = { info: (msg: string) => console.log(` ${cyan('●')} ${msg}`), success: (msg: string) => console.log(` ${green('✓')} ${msg}`), warn: (msg: string) => console.log(` ${yellow('!')} ${msg}`), error: (msg: string) => console.error(` ${red('✗')} ${msg}`), dim: (msg: string) => console.log(` ${dim(msg)}`), banner: () => { console.log() console.log(` ${bold('@numbered/docs-to-context')}`) console.log(` ${dim('─────────────────────────')}`) }, done: () => { console.log() console.log(` ${green('Done.')}`) console.log() }, section: (title: string) => { console.log() console.log(` ${bold(title)}`) }, }