UNPKG

nx-config2

Version:

Next-generation configuration management for Node.js - Zero dependencies, TypeScript-first, production-ready

58 lines 2.05 kB
"use strict"; /** * Type definitions for nx-config2 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigMergeError = exports.ConfigSchemaError = exports.ConfigFileError = exports.ConfigValidationError = exports.ConfigParseError = void 0; // Error Classes class ConfigParseError extends Error { constructor(message, variableName, path, filePath) { super(message); this.variableName = variableName; this.path = path; this.filePath = filePath; this.name = 'ConfigParseError'; Object.setPrototypeOf(this, ConfigParseError.prototype); } } exports.ConfigParseError = ConfigParseError; class ConfigValidationError extends Error { constructor(message, missingVars, emptyVars) { super(message); this.missingVars = missingVars; this.emptyVars = emptyVars; this.name = 'ConfigValidationError'; Object.setPrototypeOf(this, ConfigValidationError.prototype); } } exports.ConfigValidationError = ConfigValidationError; class ConfigFileError extends Error { constructor(message, filePath, originalError) { super(message); this.filePath = filePath; this.originalError = originalError; this.name = 'ConfigFileError'; Object.setPrototypeOf(this, ConfigFileError.prototype); } } exports.ConfigFileError = ConfigFileError; class ConfigSchemaError extends Error { constructor(message, field, expectedType) { super(message); this.field = field; this.expectedType = expectedType; this.name = 'ConfigSchemaError'; Object.setPrototypeOf(this, ConfigSchemaError.prototype); } } exports.ConfigSchemaError = ConfigSchemaError; class ConfigMergeError extends Error { constructor(message, sources) { super(message); this.sources = sources; this.name = 'ConfigMergeError'; Object.setPrototypeOf(this, ConfigMergeError.prototype); } } exports.ConfigMergeError = ConfigMergeError; //# sourceMappingURL=index.js.map