UNPKG

@hugsylabs/hugsy

Version:

🐧 Hugsy - Configuration management for Claude Code. Transform complex settings into simple, shareable team standards.

56 lines 1.6 kB
/** * Logger utilities for CLI output */ import chalk from 'chalk'; import ora from 'ora'; export const logger = { success(message) { console.log(chalk.green('✅'), message); }, error(message) { console.error(chalk.red('❌'), message); }, warn(message) { console.log(chalk.yellow('⚠️'), message); }, info(message) { console.log(chalk.blue('ℹ'), message); }, debug(message) { if (process.env.HUGSY_DEBUG) { console.log(chalk.gray('[DEBUG]'), message); } }, section(title) { console.log('\n' + chalk.bold.underline(title)); }, item(label, value) { if (value !== undefined) { console.log(` ${chalk.gray('•')} ${label}: ${chalk.cyan(value)}`); } else { console.log(` ${chalk.gray('•')} ${label}`); } }, spinner(text) { return ora({ text, spinner: 'dots', }); }, divider() { console.log(chalk.gray('─'.repeat(50))); }, box(content) { const lines = content.split('\n'); const maxLength = Math.max(...lines.map((l) => l.length)); const border = '─'.repeat(maxLength + 2); console.log(chalk.gray(`┌${border}┐`)); lines.forEach((line) => { const padding = ' '.repeat(maxLength - line.length); console.log(chalk.gray('│ ') + line + padding + chalk.gray(' │')); }); console.log(chalk.gray(`└${border}┘`)); }, }; //# sourceMappingURL=logger.js.map