@sun-asterisk/sungen 3.1.2-beta.107 → 3.1.2-beta.108
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/capabilities/discover.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/capabilities/discover.ts"],"names":[],"mappings":"AAwDA,wBAAgB,+BAA+B,IAAI,IAAI,CAKtD"}
|
|
@@ -79,11 +79,21 @@ function loadExternalDriver(name) {
|
|
|
79
79
|
catch {
|
|
80
80
|
continue;
|
|
81
81
|
} // not installed at this anchor → try next
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
register
|
|
86
|
-
|
|
82
|
+
try {
|
|
83
|
+
const mod = req(resolved);
|
|
84
|
+
const register = mod?.sungenDriver?.register ?? mod?.register;
|
|
85
|
+
if (typeof register === 'function')
|
|
86
|
+
register(registry_1.capabilityRegistry);
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
// A present-but-BROKEN driver (e.g. a stale/incompatible leftover whose own core dep doesn't
|
|
90
|
+
// resolve) must never crash the whole CLI — `sungen --version`, `capability remove`, etc. must
|
|
91
|
+
// still work. Warn + skip so the user can recover.
|
|
92
|
+
console.warn(`⚠ sungen: capability driver "${name}" is installed but failed to load — skipping.\n` +
|
|
93
|
+
` ${e?.message || e}\n` +
|
|
94
|
+
` Fix: reinstall it (\`sungen capability add ${name.replace(/^@sungen\/driver-/, '')}\`) or remove it.`);
|
|
95
|
+
}
|
|
96
|
+
return; // found at this anchor (loaded or warned) — don't fall through to other anchors
|
|
87
97
|
}
|
|
88
98
|
// not installed at any anchor — capabilities are opt-in, so skip silently
|
|
89
99
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/capabilities/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C7F,+FAA+F;YAC/F,mDAAmD;YACnD,OAAO,CAAC,IAAI,CACV,gCAAgC,IAAI,iDAAiD;gBACrF,KAAM,CAAW,EAAE,OAAO,IAAI,CAAC,IAAI;gBACnC,gDAAgD,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,mBAAmB,CACzG,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,gFAAgF;IAC1F,CAAC;IACD,0EAA0E;AAC5E,CAAC;AAED,SAAgB,+BAA+B;IAC7C,IAAI,6BAAkB,CAAC,WAAW,EAAE;QAAE,OAAO;IAC7C,KAAK,MAAM,IAAI,IAAI,gBAAgB;QAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,4CAA4C;IAC3G,KAAK,MAAM,MAAM,IAAI,wBAAa;QAAE,MAAM,CAAC,QAAQ,CAAC,6BAAkB,CAAC,CAAC,CAAC,4BAA4B;IACrG,IAAA,iCAAsB,EAAC,6BAAkB,CAAC,CAAC,CAAC,iDAAiD;AAC/F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sun-asterisk/sungen",
|
|
3
|
-
"version": "3.1.2-beta.
|
|
3
|
+
"version": "3.1.2-beta.108",
|
|
4
4
|
"description": "Deterministic E2E Test Compiler - Gherkin + Selectors → Playwright tests",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"node": ">=18.0.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@sungen/driver-ui": "3.1.2-beta.
|
|
36
|
+
"@sungen/driver-ui": "3.1.2-beta.108",
|
|
37
37
|
"@anthropic-ai/sdk": "^0.71.0",
|
|
38
38
|
"@babel/parser": "^7.28.5",
|
|
39
39
|
"@babel/traverse": "^7.28.5",
|
|
@@ -35,10 +35,21 @@ function loadExternalDriver(name: string): void {
|
|
|
35
35
|
try { req = createRequire(anchor); } catch { continue; }
|
|
36
36
|
let resolved: string;
|
|
37
37
|
try { resolved = req.resolve(name); } catch { continue; } // not installed at this anchor → try next
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
try {
|
|
39
|
+
const mod = req(resolved);
|
|
40
|
+
const register: ((r: typeof capabilityRegistry) => void) | undefined = mod?.sungenDriver?.register ?? mod?.register;
|
|
41
|
+
if (typeof register === 'function') register(capabilityRegistry);
|
|
42
|
+
} catch (e) {
|
|
43
|
+
// A present-but-BROKEN driver (e.g. a stale/incompatible leftover whose own core dep doesn't
|
|
44
|
+
// resolve) must never crash the whole CLI — `sungen --version`, `capability remove`, etc. must
|
|
45
|
+
// still work. Warn + skip so the user can recover.
|
|
46
|
+
console.warn(
|
|
47
|
+
`⚠ sungen: capability driver "${name}" is installed but failed to load — skipping.\n` +
|
|
48
|
+
` ${(e as Error)?.message || e}\n` +
|
|
49
|
+
` Fix: reinstall it (\`sungen capability add ${name.replace(/^@sungen\/driver-/, '')}\`) or remove it.`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
return; // found at this anchor (loaded or warned) — don't fall through to other anchors
|
|
42
53
|
}
|
|
43
54
|
// not installed at any anchor — capabilities are opt-in, so skip silently
|
|
44
55
|
}
|