@probelabs/visor 0.1.42 → 0.1.43
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/dist/cli-main.d.ts.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/index.js +41 -8
- package/package.json +1 -1
package/dist/cli-main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/cli-main.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmS1C"}
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/config.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAOX,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAIzC;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,eAAe,CASrB;IACF,OAAO,CAAC,kBAAkB,CASxB;IACF,OAAO,CAAC,kBAAkB,CAAgE;IAC1F,OAAO,CAAC,mBAAmB,CAAkD;IAE7E;;OAEG;IACU,UAAU,CACrB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/config.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAOX,oBAAoB,EACpB,YAAY,EACZ,iBAA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Manager.loadConfig(options.configPath);
|
|
96909
96909
|
}
|
|
96910
|
-
catch {
|
|
96911
|
-
|
|
96912
|
-
|
|
96913
|
-
|
|
96914
|
-
.
|
|
96915
|
-
|
|
96910
|
+
catch (error) {
|
|
96911
|
+
// Show the actual error message, not just assume "file not found"
|
|
96912
|
+
if (error instanceof Error) {
|
|
96913
|
+
console.error(`❌ Error loading configuration from ${options.configPath}:`);
|
|
96914
|
+
console.error(` ${error.message}`);
|
|
96915
|
+
// Provide helpful hints based on the error type
|
|
96916
|
+
if (error.message.includes('not found')) {
|
|
96917
|
+
console.error('\n💡 Hint: Check that the file path is correct and the file exists.');
|
|
96918
|
+
console.error(' You can use an absolute path: --config $(pwd)/.visor.yaml');
|
|
96919
|
+
}
|
|
96920
|
+
else if (error.message.includes('Invalid YAML')) {
|
|
96921
|
+
console.error('\n💡 Hint: Check your YAML syntax. You can validate it at https://www.yamllint.com/');
|
|
96922
|
+
}
|
|
96923
|
+
else if (error.message.includes('extends')) {
|
|
96924
|
+
console.error('\n💡 Hint: Check that extended configuration files exist and are accessible.');
|
|
96925
|
+
}
|
|
96926
|
+
else if (error.message.includes('permission')) {
|
|
96927
|
+
console.error('\n💡 Hint: Check file permissions. The file must be readable.');
|
|
96928
|
+
}
|
|
96929
|
+
}
|
|
96930
|
+
else {
|
|
96931
|
+
console.error(`❌ Error loading configuration: ${error}`);
|
|
96932
|
+
}
|
|
96933
|
+
// Exit with error when explicit config path fails
|
|
96934
|
+
console.error('\n🛑 Exiting: Cannot proceed when specified configuration file fails to load.');
|
|
96935
|
+
process.exit(1);
|
|
96916
96936
|
}
|
|
96917
96937
|
}
|
|
96918
96938
|
else {
|
|
96939
|
+
// Auto-discovery mode - fallback to defaults is OK
|
|
96919
96940
|
config = await configManager
|
|
96920
96941
|
.findAndLoadConfig()
|
|
96921
96942
|
.catch(() => configManager.getDefaultConfig());
|
|
@@ -97611,10 +97632,22 @@ class ConfigManager {
|
|
|
97611
97632
|
}
|
|
97612
97633
|
catch (error) {
|
|
97613
97634
|
if (error instanceof Error) {
|
|
97614
|
-
|
|
97635
|
+
// Pass through detailed error messages unchanged
|
|
97636
|
+
if (error.message.includes('not found') ||
|
|
97637
|
+
error.message.includes('Invalid YAML') ||
|
|
97638
|
+
error.message.includes('extends') ||
|
|
97639
|
+
error.message.includes('EACCES') ||
|
|
97640
|
+
error.message.includes('EISDIR')) {
|
|
97615
97641
|
throw error;
|
|
97616
97642
|
}
|
|
97617
|
-
|
|
97643
|
+
// Add more context for generic errors
|
|
97644
|
+
if (error.message.includes('ENOENT')) {
|
|
97645
|
+
throw new Error(`Configuration file not found: ${configPath}`);
|
|
97646
|
+
}
|
|
97647
|
+
if (error.message.includes('EPERM')) {
|
|
97648
|
+
throw new Error(`Permission denied reading configuration file: ${configPath}`);
|
|
97649
|
+
}
|
|
97650
|
+
throw new Error(`Failed to read configuration file ${configPath}: ${error.message}`);
|
|
97618
97651
|
}
|
|
97619
97652
|
throw error;
|
|
97620
97653
|
}
|