@syntropysoft/praetorian
Version:
Praetorian CLI – A universal multi-environment configuration validator for DevSecOps teams. Validate, compare, and secure YAML/ENV files with ease.
99 lines • 3.72 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CLILogger = void 0;
const chalk_1 = __importDefault(require("chalk"));
class CLILogger {
constructor(verbose = false) {
this.verbose = false;
this.verbose = verbose;
}
/**
* Log info message
*/
info(message, data) {
if (data && this.verbose) {
console.log(chalk_1.default.blue(message), data);
}
else {
console.log(chalk_1.default.blue(message));
}
}
/**
* Log success message
*/
success(message) {
console.log(chalk_1.default.green('✅ ' + message));
}
/**
* Log warning message
*/
warn(message) {
console.log(chalk_1.default.yellow('⚠️ ' + message));
}
/**
* Log error message
*/
error(message, error) {
if (error) {
console.error(chalk_1.default.red('❌ ' + message), error);
}
else {
console.error(chalk_1.default.red('❌ ' + message));
}
}
/**
* Log debug message (only in verbose mode)
*/
debug(message, data) {
if (this.verbose) {
if (data) {
console.log(chalk_1.default.gray('🔍 ' + message), data);
}
else {
console.log(chalk_1.default.gray('🔍 ' + message));
}
}
}
/**
* Log banner
*/
banner() {
const banner = `
${chalk_1.default.blue('╔══════════════════════════════════════════════════════════════╗')}
${chalk_1.default.blue('║')} ${chalk_1.default.yellow('🏛️ SyntropySoft Praetorian')} ${chalk_1.default.gray('- Guardian of configuraciones')} ${chalk_1.default.blue('║')}
${chalk_1.default.blue('║')} ${chalk_1.default.gray('Universal validation framework for DevSecOps')} ${chalk_1.default.blue('║')}
${chalk_1.default.blue('╚══════════════════════════════════════════════════════════════╝')}
`;
console.log(banner);
}
/**
* Log help information
*/
help() {
console.log(chalk_1.default.blue('\n📖 Praetorian CLI - Guardian of configurations\n'));
console.log(chalk_1.default.yellow('Usage:'));
console.log(' praetorian <command> [subcommand] [options]\n');
console.log(chalk_1.default.yellow('Commands:'));
console.log(' syntropylog - SyntropyLog specific commands');
console.log(' template - Template generation system');
console.log(' audit - Run comprehensive audits');
console.log(' check - Health checks and diagnostics\n');
console.log(chalk_1.default.yellow('SyntropyLog Commands:'));
console.log(' praetorian syntropylog validate [config] [options]');
console.log(' praetorian syntropylog validate --all');
console.log(' praetorian syntropylog validate --env <environment>');
console.log(' praetorian syntropylog audit');
}
/**
* Log version information
*/
version() {
console.log(chalk_1.default.blue('🏛️ SyntropySoft Praetorian v0.1.0'));
console.log(chalk_1.default.gray('Guardian of configurations and security'));
}
}
exports.CLILogger = CLILogger;
//# sourceMappingURL=CLILogger.js.map