@pretorian-worx/runclaudia-cli 0.13.0 → 0.13.1
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/config.js +17 -5
- package/dist/config.js.map +1 -1
- package/package.json +2 -2
package/dist/config.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
// Candidate filenames the loader tries, in order. `.mjs` and `.js` work on
|
|
5
|
+
// any modern Node out of the box. `.ts` is kept in the list because some
|
|
6
|
+
// users run claudia under a TS-aware loader (tsx, ts-node), but if Node
|
|
7
|
+
// can't parse it we warn clearly rather than failing silently — see the
|
|
8
|
+
// catch branch below.
|
|
9
|
+
const CANDIDATES = ["claudia.config.mjs", "claudia.config.js", "claudia.config.ts"];
|
|
5
10
|
export async function loadConfig(cwd) {
|
|
6
11
|
for (const name of CANDIDATES) {
|
|
7
12
|
const abs = resolve(cwd, name);
|
|
@@ -12,11 +17,18 @@ export async function loadConfig(cwd) {
|
|
|
12
17
|
const cfg = (mod.default ?? mod);
|
|
13
18
|
return cfg ?? {};
|
|
14
19
|
}
|
|
15
|
-
catch {
|
|
16
|
-
|
|
20
|
+
catch (err) {
|
|
21
|
+
// Don't silently swallow — surface the error so users can diagnose.
|
|
22
|
+
// Continue trying remaining candidates: it's valid to have both a
|
|
23
|
+
// .ts (which may fail) and a fallback .mjs that loads.
|
|
24
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
25
|
+
process.stderr.write(`claudia: found ${name} but failed to load it: ${msg}\n`);
|
|
26
|
+
if (name.endsWith(".ts")) {
|
|
27
|
+
process.stderr.write(`claudia: TypeScript configs require a TS-aware loader (tsx, ts-node). ` +
|
|
28
|
+
`For a vanilla Node install, use claudia.config.mjs with .mjs syntax instead.\n`);
|
|
29
|
+
}
|
|
17
30
|
}
|
|
18
31
|
}
|
|
19
|
-
void join;
|
|
20
32
|
return {};
|
|
21
33
|
}
|
|
22
34
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC,2EAA2E;AAC3E,yEAAyE;AACzE,wEAAwE;AACxE,wEAAwE;AACxE,sBAAsB;AACtB,MAAM,UAAU,GAAG,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;AAEpF,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,GAAW;IAC1C,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAC/B,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;YAClD,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,GAAG,CAAkB,CAAC;YAClD,OAAO,GAAG,IAAI,EAAE,CAAC;QACnB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,oEAAoE;YACpE,kEAAkE;YAClE,uDAAuD;YACvD,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,kBAAkB,IAAI,2BAA2B,GAAG,IAAI,CACzD,CAAC;YACF,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,wEAAwE;oBACtE,gFAAgF,CACnF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pretorian-worx/runclaudia-cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Diff-aware post-deploy test agent CLI — picks a relevant Playwright subset for a diff and runs it against the deployed prod artifact, with reporting to GitHub Actions, the merged PR, and Slack.",
|
|
6
6
|
"keywords": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"citty": "^0.1.6",
|
|
41
|
-
"@pretorian-worx/runclaudia-core": "^0.13.
|
|
41
|
+
"@pretorian-worx/runclaudia-core": "^0.13.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^22.0.0",
|