@sun-asterisk/sungen 3.2.1-beta.1 → 3.2.2-beta.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/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +31 -0
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +25 -0
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +59 -0
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/types.d.ts +38 -0
- package/dist/exporters/types.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.d.ts +31 -2
- package/dist/exporters/xlsx-exporter.d.ts.map +1 -1
- package/dist/exporters/xlsx-exporter.js +144 -1
- package/dist/exporters/xlsx-exporter.js.map +1 -1
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +4 -1
- package/dist/harness/parse.js.map +1 -1
- package/dist/orchestrator/ai-rules-updater.d.ts.map +1 -1
- package/dist/orchestrator/ai-rules-updater.js +1 -0
- package/dist/orchestrator/ai-rules-updater.js.map +1 -1
- package/dist/orchestrator/templates/ai-instructions/claude-agent-generator.md +44 -0
- package/dist/orchestrator/templates/ai-instructions/claude-cmd-create-test.md +18 -1
- package/dist/orchestrator/templates/ai-instructions/claude-skill-delivery.md +27 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +2 -0
- package/dist/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +2 -0
- package/dist/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +2 -1
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +27 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +2 -0
- package/dist/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +2 -0
- package/dist/orchestrator/templates/specs-api.d.ts +7 -0
- package/dist/orchestrator/templates/specs-api.d.ts.map +1 -1
- package/dist/orchestrator/templates/specs-api.js +13 -2
- package/dist/orchestrator/templates/specs-api.js.map +1 -1
- package/dist/orchestrator/templates/specs-api.ts +13 -2
- package/package.json +3 -3
- package/src/cli/commands/delivery.ts +32 -2
- package/src/exporters/feature-parser.ts +57 -0
- package/src/exporters/types.ts +38 -0
- package/src/exporters/xlsx-exporter.ts +176 -2
- package/src/harness/parse.ts +4 -1
- package/src/orchestrator/ai-rules-updater.ts +1 -0
- package/src/orchestrator/templates/ai-instructions/claude-agent-generator.md +44 -0
- package/src/orchestrator/templates/ai-instructions/claude-cmd-create-test.md +18 -1
- package/src/orchestrator/templates/ai-instructions/claude-skill-delivery.md +27 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-gherkin-syntax.md +2 -0
- package/src/orchestrator/templates/ai-instructions/claude-skill-tc-generation.md +2 -0
- package/src/orchestrator/templates/ai-instructions/copilot-cmd-create-test.md +2 -1
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-delivery.md +27 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-gherkin-syntax.md +2 -0
- package/src/orchestrator/templates/ai-instructions/github-skill-sungen-tc-generation.md +2 -0
- package/src/orchestrator/templates/specs-api.ts +13 -2
|
@@ -49,6 +49,17 @@ function substitute(text: string, params: Record<string, any>): string {
|
|
|
49
49
|
return text.replace(/:([A-Za-z_][A-Za-z0-9_]*)/g, (_m, p) => encodeURIComponent(String(params[p] ?? '')));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Join a datasource base URL with a catalog path. Concatenate rather than rely on Playwright's
|
|
54
|
+
* baseURL resolution: an absolute path (`/user/1`) resolves against the base ORIGIN and would drop
|
|
55
|
+
* a base path component (`/api/v3`). Most APIs are mounted under such a prefix, so the full URL must
|
|
56
|
+
* be built explicitly.
|
|
57
|
+
*/
|
|
58
|
+
export function joinApiUrl(base: string, urlPath: string): string {
|
|
59
|
+
const b = base.replace(/\/$/, '');
|
|
60
|
+
return urlPath.startsWith('/') ? b + urlPath : `${b}/${urlPath}`;
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
class ApiClient {
|
|
53
64
|
private configs: Record<string, ApiDataSource> | null = null;
|
|
54
65
|
|
|
@@ -103,13 +114,13 @@ class ApiClient {
|
|
|
103
114
|
// `storageState` (the @auth role's saved session) so the request shares the browser's
|
|
104
115
|
// authenticated cookies. Disposed per call so no request context lingers and hangs the process.
|
|
105
116
|
const ctx: APIRequestContext = await request.newContext({
|
|
106
|
-
baseURL: base,
|
|
107
117
|
extraHTTPHeaders: headers,
|
|
108
118
|
timeout: conf.timeout_ms ?? 15000,
|
|
109
119
|
...(opts.storageState ? { storageState: opts.storageState } : {}),
|
|
110
120
|
});
|
|
111
121
|
try {
|
|
112
|
-
|
|
122
|
+
// Full URL (not a baseURL-relative path) so a base path component like /api/v3 is preserved.
|
|
123
|
+
const res = await ctx.fetch(joinApiUrl(base, urlPath), { method: req.method, ...bodyOpt });
|
|
113
124
|
const text = await res.text();
|
|
114
125
|
let parsed: any = text;
|
|
115
126
|
try { parsed = text ? JSON.parse(text) : null; } catch { /* non-JSON → keep text */ }
|