UNPKG

credl-parser-evaluator

Version:

TypeScript-based CREDL Parser and Evaluator that processes CREDL files and outputs complete Intermediate Representations

73 lines 2.79 kB
"use strict"; // CLI type definitions for CREDL commands and utilities Object.defineProperty(exports, "__esModule", { value: true }); exports.COMMAND_CATEGORIES = exports.DEFAULT_OUTPUT_FORMAT = exports.DEFAULT_TABLE_CONFIG = exports.DEFAULT_CLI_CONFIG = exports.LogLevel = exports.ExitCode = void 0; exports.isValidationError = isValidationError; exports.isCLIError = isCLIError; exports.isCommandResult = isCommandResult; // Constants and enums var ExitCode; (function (ExitCode) { ExitCode[ExitCode["SUCCESS"] = 0] = "SUCCESS"; ExitCode[ExitCode["GENERAL_ERROR"] = 1] = "GENERAL_ERROR"; ExitCode[ExitCode["INVALID_ARGUMENT"] = 2] = "INVALID_ARGUMENT"; ExitCode[ExitCode["FILE_NOT_FOUND"] = 3] = "FILE_NOT_FOUND"; ExitCode[ExitCode["PERMISSION_DENIED"] = 4] = "PERMISSION_DENIED"; ExitCode[ExitCode["VALIDATION_ERROR"] = 5] = "VALIDATION_ERROR"; ExitCode[ExitCode["PROCESSING_ERROR"] = 6] = "PROCESSING_ERROR"; ExitCode[ExitCode["OUTPUT_ERROR"] = 7] = "OUTPUT_ERROR"; ExitCode[ExitCode["TIMEOUT_ERROR"] = 8] = "TIMEOUT_ERROR"; ExitCode[ExitCode["INTERRUPTED"] = 9] = "INTERRUPTED"; ExitCode[ExitCode["CONFIG_ERROR"] = 10] = "CONFIG_ERROR"; })(ExitCode || (exports.ExitCode = ExitCode = {})); var LogLevel; (function (LogLevel) { LogLevel[LogLevel["SILENT"] = 0] = "SILENT"; LogLevel[LogLevel["ERROR"] = 1] = "ERROR"; LogLevel[LogLevel["WARN"] = 2] = "WARN"; LogLevel[LogLevel["INFO"] = 3] = "INFO"; LogLevel[LogLevel["VERBOSE"] = 4] = "VERBOSE"; LogLevel[LogLevel["DEBUG"] = 5] = "DEBUG"; })(LogLevel || (exports.LogLevel = LogLevel = {})); // Type guards and utilities function isValidationError(error) { return error && typeof error.field === 'string' && typeof error.message === 'string'; } function isCLIError(error) { return error && typeof error.code === 'string' && typeof error.exitCode === 'number'; } function isCommandResult(result) { return result && typeof result.success === 'boolean'; } // Default configurations exports.DEFAULT_CLI_CONFIG = { defaultFormat: 'pretty', outputDirectory: './output', templateDirectory: './templates', benchmarkDirectory: './.credl/benchmarks', verbose: false, quiet: false, colorOutput: true }; exports.DEFAULT_TABLE_CONFIG = { columns: [], maxWidth: 120, showHeaders: true, sortOrder: 'asc' }; exports.DEFAULT_OUTPUT_FORMAT = { type: 'json', options: { indent: 2, sortKeys: false, colorize: true, compact: false } }; exports.COMMAND_CATEGORIES = { core: 'Core Commands', developer: 'Developer Commands', utility: 'Utility Commands' }; // Note: All types are already exported via their individual export declarations above //# sourceMappingURL=cli-types.js.map