@theunwalked/cardigantime 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/dist/cardigantime.cjs +27 -25
- package/dist/cardigantime.cjs.map +1 -1
- package/dist/cardigantime.js +1 -1
- package/dist/cardigantime.js.map +1 -1
- package/dist/error/ArgumentError.js +14 -14
- package/dist/error/ArgumentError.js.map +1 -1
- package/dist/error/ConfigurationError.js +4 -4
- package/dist/error/ConfigurationError.js.map +1 -1
- package/dist/error/FileSystemError.js +4 -4
- package/dist/error/FileSystemError.js.map +1 -1
- package/dist/read.js +4 -2
- package/dist/read.js.map +1 -1
- package/package.json +28 -22
package/README.md
CHANGED
|
@@ -29,9 +29,9 @@ Cardigantime provides a complete, battle-tested solution for all of this complex
|
|
|
29
29
|
```bash
|
|
30
30
|
npm install @theunwalked/cardigantime
|
|
31
31
|
# or
|
|
32
|
-
pnpm add @theunwalked/cardigantime
|
|
33
|
-
# or
|
|
34
32
|
yarn add @theunwalked/cardigantime
|
|
33
|
+
# or
|
|
34
|
+
pnpm add @theunwalked/cardigantime
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
## Quick Start
|
|
@@ -149,16 +149,16 @@ Comprehensive error handling with detailed, actionable error messages to help us
|
|
|
149
149
|
|
|
150
150
|
## Documentation
|
|
151
151
|
|
|
152
|
-
📚 **[Complete Documentation](https://
|
|
152
|
+
📚 **[Complete Documentation](https://tobrien.github.io/cardigantime/)** - Full documentation site
|
|
153
153
|
|
|
154
154
|
**Quick Links:**
|
|
155
|
-
- [Getting Started Guide](https://
|
|
156
|
-
- [Core Concepts](https://
|
|
157
|
-
- [API Reference](https://
|
|
158
|
-
- [Configuration Options](https://
|
|
159
|
-
- [Debugging & Analysis](https://
|
|
160
|
-
- [Advanced Usage](https://
|
|
161
|
-
- [Error Handling](https://
|
|
155
|
+
- [Getting Started Guide](https://tobrien.github.io/cardigantime/#getting-started) - Detailed setup and basic concepts
|
|
156
|
+
- [Core Concepts](https://tobrien.github.io/cardigantime/#core-concepts) - Configuration sources, hierarchical discovery
|
|
157
|
+
- [API Reference](https://tobrien.github.io/cardigantime/#api-reference) - Complete API documentation
|
|
158
|
+
- [Configuration Options](https://tobrien.github.io/cardigantime/#configuration-options) - All available options
|
|
159
|
+
- [Debugging & Analysis](https://tobrien.github.io/cardigantime/#debugging-analysis) - Tools for analyzing config
|
|
160
|
+
- [Advanced Usage](https://tobrien.github.io/cardigantime/#advanced-usage) - Complex examples and scenarios
|
|
161
|
+
- [Error Handling](https://tobrien.github.io/cardigantime/#error-handling) - Comprehensive error handling guide
|
|
162
162
|
|
|
163
163
|
## Contributing
|
|
164
164
|
|
package/dist/cardigantime.cjs
CHANGED
|
@@ -30,6 +30,19 @@ const yaml__namespace = /*#__PURE__*/_interopNamespaceDefault(yaml);
|
|
|
30
30
|
const path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
|
31
31
|
const fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
32
32
|
|
|
33
|
+
function _define_property$2(obj, key, value) {
|
|
34
|
+
if (key in obj) {
|
|
35
|
+
Object.defineProperty(obj, key, {
|
|
36
|
+
value: value,
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true
|
|
40
|
+
});
|
|
41
|
+
} else {
|
|
42
|
+
obj[key] = value;
|
|
43
|
+
}
|
|
44
|
+
return obj;
|
|
45
|
+
}
|
|
33
46
|
/**
|
|
34
47
|
* Error thrown when CLI arguments or function parameters are invalid.
|
|
35
48
|
*
|
|
@@ -43,20 +56,7 @@ const fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
|
43
56
|
* // Error message: "Path cannot be empty"
|
|
44
57
|
* // error.argument: "config-directory"
|
|
45
58
|
* ```
|
|
46
|
-
*/
|
|
47
|
-
if (key in obj) {
|
|
48
|
-
Object.defineProperty(obj, key, {
|
|
49
|
-
value: value,
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true
|
|
53
|
-
});
|
|
54
|
-
} else {
|
|
55
|
-
obj[key] = value;
|
|
56
|
-
}
|
|
57
|
-
return obj;
|
|
58
|
-
}
|
|
59
|
-
class ArgumentError extends Error {
|
|
59
|
+
*/ class ArgumentError extends Error {
|
|
60
60
|
/**
|
|
61
61
|
* Gets the name of the argument that caused this error.
|
|
62
62
|
*
|
|
@@ -217,9 +217,7 @@ class ArgumentError extends Error {
|
|
|
217
217
|
silly: ()=>{}
|
|
218
218
|
};
|
|
219
219
|
|
|
220
|
-
|
|
221
|
-
* Error thrown when file system operations fail
|
|
222
|
-
*/ function _define_property$1(obj, key, value) {
|
|
220
|
+
function _define_property$1(obj, key, value) {
|
|
223
221
|
if (key in obj) {
|
|
224
222
|
Object.defineProperty(obj, key, {
|
|
225
223
|
value: value,
|
|
@@ -232,7 +230,9 @@ class ArgumentError extends Error {
|
|
|
232
230
|
}
|
|
233
231
|
return obj;
|
|
234
232
|
}
|
|
235
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Error thrown when file system operations fail
|
|
235
|
+
*/ class FileSystemError extends Error {
|
|
236
236
|
/**
|
|
237
237
|
* Creates an error for when a required directory doesn't exist
|
|
238
238
|
*/ static directoryNotFound(path, isRequired = false) {
|
|
@@ -973,7 +973,8 @@ const create$1 = (params)=>{
|
|
|
973
973
|
let discoveredConfigDirs = [];
|
|
974
974
|
let resolvedConfigDirs = [];
|
|
975
975
|
// Check if hierarchical configuration discovery is enabled
|
|
976
|
-
|
|
976
|
+
// Use optional chaining for safety although options.features is defaulted
|
|
977
|
+
if (options.features && options.features.includes('hierarchical')) {
|
|
977
978
|
logger.verbose('Hierarchical configuration discovery enabled');
|
|
978
979
|
try {
|
|
979
980
|
var _options_defaults_pathResolution1, _options_defaults_pathResolution2;
|
|
@@ -1252,7 +1253,8 @@ const create$1 = (params)=>{
|
|
|
1252
1253
|
let resolvedConfigDirs = [];
|
|
1253
1254
|
let tracker = {};
|
|
1254
1255
|
// Check if hierarchical configuration discovery is enabled
|
|
1255
|
-
|
|
1256
|
+
// Use optional chaining for safety although options.features is defaulted
|
|
1257
|
+
if (options.features && options.features.includes('hierarchical')) {
|
|
1256
1258
|
logger.verbose('Using hierarchical configuration discovery for source tracking');
|
|
1257
1259
|
try {
|
|
1258
1260
|
var _options_defaults_pathResolution1, _options_defaults_pathResolution2;
|
|
@@ -1389,9 +1391,7 @@ const create$1 = (params)=>{
|
|
|
1389
1391
|
displayConfigWithSources(finalConfig, tracker, discoveredDirs, logger);
|
|
1390
1392
|
};
|
|
1391
1393
|
|
|
1392
|
-
|
|
1393
|
-
* Error thrown when configuration validation fails
|
|
1394
|
-
*/ function _define_property(obj, key, value) {
|
|
1394
|
+
function _define_property(obj, key, value) {
|
|
1395
1395
|
if (key in obj) {
|
|
1396
1396
|
Object.defineProperty(obj, key, {
|
|
1397
1397
|
value: value,
|
|
@@ -1404,7 +1404,9 @@ const create$1 = (params)=>{
|
|
|
1404
1404
|
}
|
|
1405
1405
|
return obj;
|
|
1406
1406
|
}
|
|
1407
|
-
|
|
1407
|
+
/**
|
|
1408
|
+
* Error thrown when configuration validation fails
|
|
1409
|
+
*/ class ConfigurationError extends Error {
|
|
1408
1410
|
/**
|
|
1409
1411
|
* Creates a validation error for when config doesn't match the schema
|
|
1410
1412
|
*/ static validation(message, zodError, configPath) {
|
|
@@ -1934,7 +1936,7 @@ class ConfigurationError extends Error {
|
|
|
1934
1936
|
# Modify the values below to customize your application's behavior.
|
|
1935
1937
|
#
|
|
1936
1938
|
# For more information about Cardigantime configuration:
|
|
1937
|
-
# https://github.
|
|
1939
|
+
# https://tobrien.github.io/cardigantime/
|
|
1938
1940
|
|
|
1939
1941
|
`;
|
|
1940
1942
|
const finalContent = header + yamlContent;
|