@qulib/core 0.1.0
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 +146 -0
- package/bin/qulib.js +17 -0
- package/dist/adapters/adapter-factory.d.ts +5 -0
- package/dist/adapters/adapter-factory.d.ts.map +1 -0
- package/dist/adapters/adapter-factory.js +21 -0
- package/dist/adapters/adapter.interface.d.ts +7 -0
- package/dist/adapters/adapter.interface.d.ts.map +1 -0
- package/dist/adapters/adapter.interface.js +1 -0
- package/dist/adapters/api-adapter.d.ts +8 -0
- package/dist/adapters/api-adapter.d.ts.map +1 -0
- package/dist/adapters/api-adapter.js +9 -0
- package/dist/adapters/cypress-component-adapter.d.ts +8 -0
- package/dist/adapters/cypress-component-adapter.d.ts.map +1 -0
- package/dist/adapters/cypress-component-adapter.js +9 -0
- package/dist/adapters/cypress-e2e-adapter.d.ts +8 -0
- package/dist/adapters/cypress-e2e-adapter.d.ts.map +1 -0
- package/dist/adapters/cypress-e2e-adapter.js +9 -0
- package/dist/adapters/playwright-adapter.d.ts +8 -0
- package/dist/adapters/playwright-adapter.d.ts.map +1 -0
- package/dist/adapters/playwright-adapter.js +9 -0
- package/dist/analyze.d.ts +20 -0
- package/dist/analyze.d.ts.map +1 -0
- package/dist/analyze.js +21 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +102 -0
- package/dist/harness/decision-logger.d.ts +7 -0
- package/dist/harness/decision-logger.d.ts.map +1 -0
- package/dist/harness/decision-logger.js +68 -0
- package/dist/harness/run-options.d.ts +6 -0
- package/dist/harness/run-options.d.ts.map +1 -0
- package/dist/harness/run-options.js +1 -0
- package/dist/harness/state-manager.d.ts +6 -0
- package/dist/harness/state-manager.d.ts.map +1 -0
- package/dist/harness/state-manager.js +64 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/llm/context-builder.d.ts +3 -0
- package/dist/llm/context-builder.d.ts.map +1 -0
- package/dist/llm/context-builder.js +33 -0
- package/dist/llm/provider.d.ts +4 -0
- package/dist/llm/provider.d.ts.map +1 -0
- package/dist/llm/provider.js +56 -0
- package/dist/phases/act.d.ts +5 -0
- package/dist/phases/act.d.ts.map +1 -0
- package/dist/phases/act.js +41 -0
- package/dist/phases/observe.d.ts +10 -0
- package/dist/phases/observe.d.ts.map +1 -0
- package/dist/phases/observe.js +48 -0
- package/dist/phases/think.d.ts +6 -0
- package/dist/phases/think.d.ts.map +1 -0
- package/dist/phases/think.js +85 -0
- package/dist/reporters/json-reporter.d.ts +3 -0
- package/dist/reporters/json-reporter.d.ts.map +1 -0
- package/dist/reporters/json-reporter.js +8 -0
- package/dist/reporters/markdown-reporter.d.ts +3 -0
- package/dist/reporters/markdown-reporter.d.ts.map +1 -0
- package/dist/reporters/markdown-reporter.js +42 -0
- package/dist/schemas/config.schema.d.ts +327 -0
- package/dist/schemas/config.schema.d.ts.map +1 -0
- package/dist/schemas/config.schema.js +39 -0
- package/dist/schemas/decision-log.schema.d.ts +22 -0
- package/dist/schemas/decision-log.schema.d.ts.map +1 -0
- package/dist/schemas/decision-log.schema.js +8 -0
- package/dist/schemas/gap-analysis.schema.d.ts +363 -0
- package/dist/schemas/gap-analysis.schema.d.ts.map +1 -0
- package/dist/schemas/gap-analysis.schema.js +60 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +5 -0
- package/dist/schemas/repo-analysis.schema.d.ts +165 -0
- package/dist/schemas/repo-analysis.schema.d.ts.map +1 -0
- package/dist/schemas/repo-analysis.schema.js +29 -0
- package/dist/schemas/route-inventory.schema.d.ts +241 -0
- package/dist/schemas/route-inventory.schema.d.ts.map +1 -0
- package/dist/schemas/route-inventory.schema.js +30 -0
- package/dist/tools/auth.d.ts +4 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +35 -0
- package/dist/tools/cypress-explorer.d.ts +7 -0
- package/dist/tools/cypress-explorer.d.ts.map +1 -0
- package/dist/tools/cypress-explorer.js +5 -0
- package/dist/tools/explorer-factory.d.ts +4 -0
- package/dist/tools/explorer-factory.d.ts.map +1 -0
- package/dist/tools/explorer-factory.js +12 -0
- package/dist/tools/explorer.interface.d.ts +6 -0
- package/dist/tools/explorer.interface.d.ts.map +1 -0
- package/dist/tools/explorer.interface.js +1 -0
- package/dist/tools/gap-engine.d.ts +6 -0
- package/dist/tools/gap-engine.d.ts.map +1 -0
- package/dist/tools/gap-engine.js +101 -0
- package/dist/tools/playwright-explorer.d.ts +7 -0
- package/dist/tools/playwright-explorer.d.ts.map +1 -0
- package/dist/tools/playwright-explorer.js +150 -0
- package/dist/tools/repo-scanner.d.ts +3 -0
- package/dist/tools/repo-scanner.d.ts.map +1 -0
- package/dist/tools/repo-scanner.js +147 -0
- package/package.json +54 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GapSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
path: z.ZodString;
|
|
5
|
+
severity: z.ZodEnum<["high", "medium", "low"]>;
|
|
6
|
+
reason: z.ZodString;
|
|
7
|
+
category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link"]>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
path: string;
|
|
10
|
+
id: string;
|
|
11
|
+
severity: "high" | "medium" | "low";
|
|
12
|
+
reason: string;
|
|
13
|
+
category: "untested-route" | "a11y" | "console-error" | "broken-link";
|
|
14
|
+
}, {
|
|
15
|
+
path: string;
|
|
16
|
+
id: string;
|
|
17
|
+
severity: "high" | "medium" | "low";
|
|
18
|
+
reason: string;
|
|
19
|
+
category: "untested-route" | "a11y" | "console-error" | "broken-link";
|
|
20
|
+
}>;
|
|
21
|
+
export declare const FrameworkRecommendationSchema: z.ZodObject<{
|
|
22
|
+
adapter: z.ZodEnum<["playwright", "cypress-e2e", "cypress-component", "api", "accessibility"]>;
|
|
23
|
+
reason: z.ZodString;
|
|
24
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
reason: string;
|
|
27
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
28
|
+
confidence: "high" | "medium" | "low";
|
|
29
|
+
}, {
|
|
30
|
+
reason: string;
|
|
31
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
32
|
+
confidence: "high" | "medium" | "low";
|
|
33
|
+
}>;
|
|
34
|
+
export declare const TestStepSchema: z.ZodObject<{
|
|
35
|
+
action: z.ZodEnum<["navigate", "click", "type", "assert-visible", "assert-hidden", "assert-text", "assert-disabled", "assert-count", "wait", "api-call"]>;
|
|
36
|
+
target: z.ZodOptional<z.ZodString>;
|
|
37
|
+
value: z.ZodOptional<z.ZodString>;
|
|
38
|
+
description: z.ZodString;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
41
|
+
description: string;
|
|
42
|
+
value?: string | undefined;
|
|
43
|
+
target?: string | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
46
|
+
description: string;
|
|
47
|
+
value?: string | undefined;
|
|
48
|
+
target?: string | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const NeutralScenarioSchema: z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
title: z.ZodString;
|
|
53
|
+
description: z.ZodString;
|
|
54
|
+
targetPath: z.ZodString;
|
|
55
|
+
targetComponent: z.ZodOptional<z.ZodString>;
|
|
56
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
57
|
+
action: z.ZodEnum<["navigate", "click", "type", "assert-visible", "assert-hidden", "assert-text", "assert-disabled", "assert-count", "wait", "api-call"]>;
|
|
58
|
+
target: z.ZodOptional<z.ZodString>;
|
|
59
|
+
value: z.ZodOptional<z.ZodString>;
|
|
60
|
+
description: z.ZodString;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
63
|
+
description: string;
|
|
64
|
+
value?: string | undefined;
|
|
65
|
+
target?: string | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
68
|
+
description: string;
|
|
69
|
+
value?: string | undefined;
|
|
70
|
+
target?: string | undefined;
|
|
71
|
+
}>, "many">;
|
|
72
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
73
|
+
recommendations: z.ZodArray<z.ZodObject<{
|
|
74
|
+
adapter: z.ZodEnum<["playwright", "cypress-e2e", "cypress-component", "api", "accessibility"]>;
|
|
75
|
+
reason: z.ZodString;
|
|
76
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
reason: string;
|
|
79
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
80
|
+
confidence: "high" | "medium" | "low";
|
|
81
|
+
}, {
|
|
82
|
+
reason: string;
|
|
83
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
84
|
+
confidence: "high" | "medium" | "low";
|
|
85
|
+
}>, "many">;
|
|
86
|
+
sourceGapIds: z.ZodArray<z.ZodString, "many">;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
id: string;
|
|
89
|
+
description: string;
|
|
90
|
+
title: string;
|
|
91
|
+
targetPath: string;
|
|
92
|
+
steps: {
|
|
93
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
94
|
+
description: string;
|
|
95
|
+
value?: string | undefined;
|
|
96
|
+
target?: string | undefined;
|
|
97
|
+
}[];
|
|
98
|
+
tags: string[];
|
|
99
|
+
recommendations: {
|
|
100
|
+
reason: string;
|
|
101
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
102
|
+
confidence: "high" | "medium" | "low";
|
|
103
|
+
}[];
|
|
104
|
+
sourceGapIds: string[];
|
|
105
|
+
targetComponent?: string | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
id: string;
|
|
108
|
+
description: string;
|
|
109
|
+
title: string;
|
|
110
|
+
targetPath: string;
|
|
111
|
+
steps: {
|
|
112
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
113
|
+
description: string;
|
|
114
|
+
value?: string | undefined;
|
|
115
|
+
target?: string | undefined;
|
|
116
|
+
}[];
|
|
117
|
+
tags: string[];
|
|
118
|
+
recommendations: {
|
|
119
|
+
reason: string;
|
|
120
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
121
|
+
confidence: "high" | "medium" | "low";
|
|
122
|
+
}[];
|
|
123
|
+
sourceGapIds: string[];
|
|
124
|
+
targetComponent?: string | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
export declare const GeneratedTestSchema: z.ZodObject<{
|
|
127
|
+
scenarioId: z.ZodString;
|
|
128
|
+
adapter: z.ZodEnum<["playwright", "cypress-e2e", "cypress-component", "api", "accessibility"]>;
|
|
129
|
+
filename: z.ZodString;
|
|
130
|
+
code: z.ZodString;
|
|
131
|
+
source: z.ZodEnum<["llm", "template"]>;
|
|
132
|
+
outputPath: z.ZodString;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
code: string;
|
|
135
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
136
|
+
scenarioId: string;
|
|
137
|
+
filename: string;
|
|
138
|
+
source: "llm" | "template";
|
|
139
|
+
outputPath: string;
|
|
140
|
+
}, {
|
|
141
|
+
code: string;
|
|
142
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
143
|
+
scenarioId: string;
|
|
144
|
+
filename: string;
|
|
145
|
+
source: "llm" | "template";
|
|
146
|
+
outputPath: string;
|
|
147
|
+
}>;
|
|
148
|
+
export declare const GapAnalysisSchema: z.ZodObject<{
|
|
149
|
+
analyzedAt: z.ZodString;
|
|
150
|
+
mode: z.ZodEnum<["url-only", "url-repo"]>;
|
|
151
|
+
releaseConfidence: z.ZodNumber;
|
|
152
|
+
coveragePagesScanned: z.ZodNumber;
|
|
153
|
+
coverageBudgetExceeded: z.ZodBoolean;
|
|
154
|
+
coverageWarning: z.ZodOptional<z.ZodEnum<["budget-exceeded", "low-coverage", "navigation-failures"]>>;
|
|
155
|
+
gaps: z.ZodArray<z.ZodObject<{
|
|
156
|
+
id: z.ZodString;
|
|
157
|
+
path: z.ZodString;
|
|
158
|
+
severity: z.ZodEnum<["high", "medium", "low"]>;
|
|
159
|
+
reason: z.ZodString;
|
|
160
|
+
category: z.ZodEnum<["untested-route", "a11y", "console-error", "broken-link"]>;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
path: string;
|
|
163
|
+
id: string;
|
|
164
|
+
severity: "high" | "medium" | "low";
|
|
165
|
+
reason: string;
|
|
166
|
+
category: "untested-route" | "a11y" | "console-error" | "broken-link";
|
|
167
|
+
}, {
|
|
168
|
+
path: string;
|
|
169
|
+
id: string;
|
|
170
|
+
severity: "high" | "medium" | "low";
|
|
171
|
+
reason: string;
|
|
172
|
+
category: "untested-route" | "a11y" | "console-error" | "broken-link";
|
|
173
|
+
}>, "many">;
|
|
174
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
175
|
+
id: z.ZodString;
|
|
176
|
+
title: z.ZodString;
|
|
177
|
+
description: z.ZodString;
|
|
178
|
+
targetPath: z.ZodString;
|
|
179
|
+
targetComponent: z.ZodOptional<z.ZodString>;
|
|
180
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
181
|
+
action: z.ZodEnum<["navigate", "click", "type", "assert-visible", "assert-hidden", "assert-text", "assert-disabled", "assert-count", "wait", "api-call"]>;
|
|
182
|
+
target: z.ZodOptional<z.ZodString>;
|
|
183
|
+
value: z.ZodOptional<z.ZodString>;
|
|
184
|
+
description: z.ZodString;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
187
|
+
description: string;
|
|
188
|
+
value?: string | undefined;
|
|
189
|
+
target?: string | undefined;
|
|
190
|
+
}, {
|
|
191
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
192
|
+
description: string;
|
|
193
|
+
value?: string | undefined;
|
|
194
|
+
target?: string | undefined;
|
|
195
|
+
}>, "many">;
|
|
196
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
197
|
+
recommendations: z.ZodArray<z.ZodObject<{
|
|
198
|
+
adapter: z.ZodEnum<["playwright", "cypress-e2e", "cypress-component", "api", "accessibility"]>;
|
|
199
|
+
reason: z.ZodString;
|
|
200
|
+
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
reason: string;
|
|
203
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
204
|
+
confidence: "high" | "medium" | "low";
|
|
205
|
+
}, {
|
|
206
|
+
reason: string;
|
|
207
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
208
|
+
confidence: "high" | "medium" | "low";
|
|
209
|
+
}>, "many">;
|
|
210
|
+
sourceGapIds: z.ZodArray<z.ZodString, "many">;
|
|
211
|
+
}, "strip", z.ZodTypeAny, {
|
|
212
|
+
id: string;
|
|
213
|
+
description: string;
|
|
214
|
+
title: string;
|
|
215
|
+
targetPath: string;
|
|
216
|
+
steps: {
|
|
217
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
218
|
+
description: string;
|
|
219
|
+
value?: string | undefined;
|
|
220
|
+
target?: string | undefined;
|
|
221
|
+
}[];
|
|
222
|
+
tags: string[];
|
|
223
|
+
recommendations: {
|
|
224
|
+
reason: string;
|
|
225
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
226
|
+
confidence: "high" | "medium" | "low";
|
|
227
|
+
}[];
|
|
228
|
+
sourceGapIds: string[];
|
|
229
|
+
targetComponent?: string | undefined;
|
|
230
|
+
}, {
|
|
231
|
+
id: string;
|
|
232
|
+
description: string;
|
|
233
|
+
title: string;
|
|
234
|
+
targetPath: string;
|
|
235
|
+
steps: {
|
|
236
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
237
|
+
description: string;
|
|
238
|
+
value?: string | undefined;
|
|
239
|
+
target?: string | undefined;
|
|
240
|
+
}[];
|
|
241
|
+
tags: string[];
|
|
242
|
+
recommendations: {
|
|
243
|
+
reason: string;
|
|
244
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
245
|
+
confidence: "high" | "medium" | "low";
|
|
246
|
+
}[];
|
|
247
|
+
sourceGapIds: string[];
|
|
248
|
+
targetComponent?: string | undefined;
|
|
249
|
+
}>, "many">;
|
|
250
|
+
generatedTests: z.ZodArray<z.ZodObject<{
|
|
251
|
+
scenarioId: z.ZodString;
|
|
252
|
+
adapter: z.ZodEnum<["playwright", "cypress-e2e", "cypress-component", "api", "accessibility"]>;
|
|
253
|
+
filename: z.ZodString;
|
|
254
|
+
code: z.ZodString;
|
|
255
|
+
source: z.ZodEnum<["llm", "template"]>;
|
|
256
|
+
outputPath: z.ZodString;
|
|
257
|
+
}, "strip", z.ZodTypeAny, {
|
|
258
|
+
code: string;
|
|
259
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
260
|
+
scenarioId: string;
|
|
261
|
+
filename: string;
|
|
262
|
+
source: "llm" | "template";
|
|
263
|
+
outputPath: string;
|
|
264
|
+
}, {
|
|
265
|
+
code: string;
|
|
266
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
267
|
+
scenarioId: string;
|
|
268
|
+
filename: string;
|
|
269
|
+
source: "llm" | "template";
|
|
270
|
+
outputPath: string;
|
|
271
|
+
}>, "many">;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
analyzedAt: string;
|
|
274
|
+
mode: "url-only" | "url-repo";
|
|
275
|
+
releaseConfidence: number;
|
|
276
|
+
coveragePagesScanned: number;
|
|
277
|
+
coverageBudgetExceeded: boolean;
|
|
278
|
+
gaps: {
|
|
279
|
+
path: string;
|
|
280
|
+
id: string;
|
|
281
|
+
severity: "high" | "medium" | "low";
|
|
282
|
+
reason: string;
|
|
283
|
+
category: "untested-route" | "a11y" | "console-error" | "broken-link";
|
|
284
|
+
}[];
|
|
285
|
+
scenarios: {
|
|
286
|
+
id: string;
|
|
287
|
+
description: string;
|
|
288
|
+
title: string;
|
|
289
|
+
targetPath: string;
|
|
290
|
+
steps: {
|
|
291
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
292
|
+
description: string;
|
|
293
|
+
value?: string | undefined;
|
|
294
|
+
target?: string | undefined;
|
|
295
|
+
}[];
|
|
296
|
+
tags: string[];
|
|
297
|
+
recommendations: {
|
|
298
|
+
reason: string;
|
|
299
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
300
|
+
confidence: "high" | "medium" | "low";
|
|
301
|
+
}[];
|
|
302
|
+
sourceGapIds: string[];
|
|
303
|
+
targetComponent?: string | undefined;
|
|
304
|
+
}[];
|
|
305
|
+
generatedTests: {
|
|
306
|
+
code: string;
|
|
307
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
308
|
+
scenarioId: string;
|
|
309
|
+
filename: string;
|
|
310
|
+
source: "llm" | "template";
|
|
311
|
+
outputPath: string;
|
|
312
|
+
}[];
|
|
313
|
+
coverageWarning?: "budget-exceeded" | "low-coverage" | "navigation-failures" | undefined;
|
|
314
|
+
}, {
|
|
315
|
+
analyzedAt: string;
|
|
316
|
+
mode: "url-only" | "url-repo";
|
|
317
|
+
releaseConfidence: number;
|
|
318
|
+
coveragePagesScanned: number;
|
|
319
|
+
coverageBudgetExceeded: boolean;
|
|
320
|
+
gaps: {
|
|
321
|
+
path: string;
|
|
322
|
+
id: string;
|
|
323
|
+
severity: "high" | "medium" | "low";
|
|
324
|
+
reason: string;
|
|
325
|
+
category: "untested-route" | "a11y" | "console-error" | "broken-link";
|
|
326
|
+
}[];
|
|
327
|
+
scenarios: {
|
|
328
|
+
id: string;
|
|
329
|
+
description: string;
|
|
330
|
+
title: string;
|
|
331
|
+
targetPath: string;
|
|
332
|
+
steps: {
|
|
333
|
+
action: "type" | "navigate" | "click" | "assert-visible" | "assert-hidden" | "assert-text" | "assert-disabled" | "assert-count" | "wait" | "api-call";
|
|
334
|
+
description: string;
|
|
335
|
+
value?: string | undefined;
|
|
336
|
+
target?: string | undefined;
|
|
337
|
+
}[];
|
|
338
|
+
tags: string[];
|
|
339
|
+
recommendations: {
|
|
340
|
+
reason: string;
|
|
341
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
342
|
+
confidence: "high" | "medium" | "low";
|
|
343
|
+
}[];
|
|
344
|
+
sourceGapIds: string[];
|
|
345
|
+
targetComponent?: string | undefined;
|
|
346
|
+
}[];
|
|
347
|
+
generatedTests: {
|
|
348
|
+
code: string;
|
|
349
|
+
adapter: "playwright" | "cypress-e2e" | "cypress-component" | "api" | "accessibility";
|
|
350
|
+
scenarioId: string;
|
|
351
|
+
filename: string;
|
|
352
|
+
source: "llm" | "template";
|
|
353
|
+
outputPath: string;
|
|
354
|
+
}[];
|
|
355
|
+
coverageWarning?: "budget-exceeded" | "low-coverage" | "navigation-failures" | undefined;
|
|
356
|
+
}>;
|
|
357
|
+
export type GapAnalysis = z.infer<typeof GapAnalysisSchema>;
|
|
358
|
+
export type Gap = z.infer<typeof GapSchema>;
|
|
359
|
+
export type NeutralScenario = z.infer<typeof NeutralScenarioSchema>;
|
|
360
|
+
export type GeneratedTest = z.infer<typeof GeneratedTestSchema>;
|
|
361
|
+
export type TestStep = z.infer<typeof TestStepSchema>;
|
|
362
|
+
export type FrameworkRecommendation = z.infer<typeof FrameworkRecommendationSchema>;
|
|
363
|
+
//# sourceMappingURL=gap-analysis.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gap-analysis.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/gap-analysis.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;EAMpB,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAgBzB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAC5C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const GapSchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
path: z.string(),
|
|
5
|
+
severity: z.enum(['high', 'medium', 'low']),
|
|
6
|
+
reason: z.string(),
|
|
7
|
+
category: z.enum(['untested-route', 'a11y', 'console-error', 'broken-link']),
|
|
8
|
+
});
|
|
9
|
+
export const FrameworkRecommendationSchema = z.object({
|
|
10
|
+
adapter: z.enum(['playwright', 'cypress-e2e', 'cypress-component', 'api', 'accessibility']),
|
|
11
|
+
reason: z.string(),
|
|
12
|
+
confidence: z.enum(['high', 'medium', 'low']),
|
|
13
|
+
});
|
|
14
|
+
export const TestStepSchema = z.object({
|
|
15
|
+
action: z.enum([
|
|
16
|
+
'navigate',
|
|
17
|
+
'click',
|
|
18
|
+
'type',
|
|
19
|
+
'assert-visible',
|
|
20
|
+
'assert-hidden',
|
|
21
|
+
'assert-text',
|
|
22
|
+
'assert-disabled',
|
|
23
|
+
'assert-count',
|
|
24
|
+
'wait',
|
|
25
|
+
'api-call',
|
|
26
|
+
]),
|
|
27
|
+
target: z.string().optional(),
|
|
28
|
+
value: z.string().optional(),
|
|
29
|
+
description: z.string(),
|
|
30
|
+
});
|
|
31
|
+
export const NeutralScenarioSchema = z.object({
|
|
32
|
+
id: z.string(),
|
|
33
|
+
title: z.string(),
|
|
34
|
+
description: z.string(),
|
|
35
|
+
targetPath: z.string(),
|
|
36
|
+
targetComponent: z.string().optional(),
|
|
37
|
+
steps: z.array(TestStepSchema),
|
|
38
|
+
tags: z.array(z.string()),
|
|
39
|
+
recommendations: z.array(FrameworkRecommendationSchema),
|
|
40
|
+
sourceGapIds: z.array(z.string()),
|
|
41
|
+
});
|
|
42
|
+
export const GeneratedTestSchema = z.object({
|
|
43
|
+
scenarioId: z.string(),
|
|
44
|
+
adapter: z.enum(['playwright', 'cypress-e2e', 'cypress-component', 'api', 'accessibility']),
|
|
45
|
+
filename: z.string(),
|
|
46
|
+
code: z.string(),
|
|
47
|
+
source: z.enum(['llm', 'template']),
|
|
48
|
+
outputPath: z.string(),
|
|
49
|
+
});
|
|
50
|
+
export const GapAnalysisSchema = z.object({
|
|
51
|
+
analyzedAt: z.string().datetime(),
|
|
52
|
+
mode: z.enum(['url-only', 'url-repo']),
|
|
53
|
+
releaseConfidence: z.number().min(0).max(100),
|
|
54
|
+
coveragePagesScanned: z.number().int().min(0),
|
|
55
|
+
coverageBudgetExceeded: z.boolean(),
|
|
56
|
+
coverageWarning: z.enum(['budget-exceeded', 'low-coverage', 'navigation-failures']).optional(),
|
|
57
|
+
gaps: z.array(GapSchema),
|
|
58
|
+
scenarios: z.array(NeutralScenarioSchema),
|
|
59
|
+
generatedTests: z.array(GeneratedTestSchema),
|
|
60
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { HarnessConfigSchema, AuthConfigSchema, type ExplorerType, type AdapterType, type FormLoginAuthConfig, type StorageStateAuthConfig, type AuthConfig, type HarnessConfig, } from './config.schema.js';
|
|
2
|
+
export { DecisionLogEntrySchema, type DecisionLogEntry, } from './decision-log.schema.js';
|
|
3
|
+
export { RouteInventorySchema, RouteSchema, A11yViolationSchema, BrokenLinkSchema, type RouteInventory, type Route, } from './route-inventory.schema.js';
|
|
4
|
+
export { GapAnalysisSchema, GapSchema, NeutralScenarioSchema, GeneratedTestSchema, TestStepSchema, FrameworkRecommendationSchema, type GapAnalysis, type Gap, type NeutralScenario, type GeneratedTest, type TestStep, type FrameworkRecommendation, } from './gap-analysis.schema.js';
|
|
5
|
+
export { RepoAnalysisSchema, type RepoAnalysis, } from './repo-analysis.schema.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,aAAa,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,sBAAsB,EACtB,KAAK,gBAAgB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,KAAK,GACX,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,6BAA6B,EAC7B,KAAK,WAAW,EAChB,KAAK,GAAG,EACR,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,uBAAuB,GAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { HarnessConfigSchema, AuthConfigSchema, } from './config.schema.js';
|
|
2
|
+
export { DecisionLogEntrySchema, } from './decision-log.schema.js';
|
|
3
|
+
export { RouteInventorySchema, RouteSchema, A11yViolationSchema, BrokenLinkSchema, } from './route-inventory.schema.js';
|
|
4
|
+
export { GapAnalysisSchema, GapSchema, NeutralScenarioSchema, GeneratedTestSchema, TestStepSchema, FrameworkRecommendationSchema, } from './gap-analysis.schema.js';
|
|
5
|
+
export { RepoAnalysisSchema, } from './repo-analysis.schema.js';
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RepoRouteSchema: z.ZodObject<{
|
|
3
|
+
path: z.ZodString;
|
|
4
|
+
file: z.ZodString;
|
|
5
|
+
method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "unknown"]>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
path: string;
|
|
8
|
+
file: string;
|
|
9
|
+
method: "unknown" | "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
10
|
+
}, {
|
|
11
|
+
path: string;
|
|
12
|
+
file: string;
|
|
13
|
+
method: "unknown" | "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
14
|
+
}>;
|
|
15
|
+
export declare const TestFileSchema: z.ZodObject<{
|
|
16
|
+
file: z.ZodString;
|
|
17
|
+
type: z.ZodEnum<["playwright", "cypress-e2e", "cypress-component", "jest", "vitest", "other"]>;
|
|
18
|
+
coveredPaths: z.ZodArray<z.ZodString, "many">;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
type: "playwright" | "cypress-e2e" | "cypress-component" | "jest" | "vitest" | "other";
|
|
21
|
+
file: string;
|
|
22
|
+
coveredPaths: string[];
|
|
23
|
+
}, {
|
|
24
|
+
type: "playwright" | "cypress-e2e" | "cypress-component" | "jest" | "vitest" | "other";
|
|
25
|
+
file: string;
|
|
26
|
+
coveredPaths: string[];
|
|
27
|
+
}>;
|
|
28
|
+
export declare const CypressStructureSchema: z.ZodObject<{
|
|
29
|
+
detected: z.ZodBoolean;
|
|
30
|
+
e2eFolder: z.ZodOptional<z.ZodString>;
|
|
31
|
+
componentFolder: z.ZodOptional<z.ZodString>;
|
|
32
|
+
fixturesFolder: z.ZodOptional<z.ZodString>;
|
|
33
|
+
supportFolder: z.ZodOptional<z.ZodString>;
|
|
34
|
+
hasCommandsFile: z.ZodBoolean;
|
|
35
|
+
existingE2eFiles: z.ZodArray<z.ZodString, "many">;
|
|
36
|
+
existingComponentFiles: z.ZodArray<z.ZodString, "many">;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
detected: boolean;
|
|
39
|
+
hasCommandsFile: boolean;
|
|
40
|
+
existingE2eFiles: string[];
|
|
41
|
+
existingComponentFiles: string[];
|
|
42
|
+
e2eFolder?: string | undefined;
|
|
43
|
+
componentFolder?: string | undefined;
|
|
44
|
+
fixturesFolder?: string | undefined;
|
|
45
|
+
supportFolder?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
detected: boolean;
|
|
48
|
+
hasCommandsFile: boolean;
|
|
49
|
+
existingE2eFiles: string[];
|
|
50
|
+
existingComponentFiles: string[];
|
|
51
|
+
e2eFolder?: string | undefined;
|
|
52
|
+
componentFolder?: string | undefined;
|
|
53
|
+
fixturesFolder?: string | undefined;
|
|
54
|
+
supportFolder?: string | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
export declare const RepoAnalysisSchema: z.ZodObject<{
|
|
57
|
+
scannedAt: z.ZodString;
|
|
58
|
+
repoPath: z.ZodString;
|
|
59
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
60
|
+
path: z.ZodString;
|
|
61
|
+
file: z.ZodString;
|
|
62
|
+
method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH", "unknown"]>;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
path: string;
|
|
65
|
+
file: string;
|
|
66
|
+
method: "unknown" | "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
67
|
+
}, {
|
|
68
|
+
path: string;
|
|
69
|
+
file: string;
|
|
70
|
+
method: "unknown" | "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
71
|
+
}>, "many">;
|
|
72
|
+
testFiles: z.ZodArray<z.ZodObject<{
|
|
73
|
+
file: z.ZodString;
|
|
74
|
+
type: z.ZodEnum<["playwright", "cypress-e2e", "cypress-component", "jest", "vitest", "other"]>;
|
|
75
|
+
coveredPaths: z.ZodArray<z.ZodString, "many">;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
type: "playwright" | "cypress-e2e" | "cypress-component" | "jest" | "vitest" | "other";
|
|
78
|
+
file: string;
|
|
79
|
+
coveredPaths: string[];
|
|
80
|
+
}, {
|
|
81
|
+
type: "playwright" | "cypress-e2e" | "cypress-component" | "jest" | "vitest" | "other";
|
|
82
|
+
file: string;
|
|
83
|
+
coveredPaths: string[];
|
|
84
|
+
}>, "many">;
|
|
85
|
+
missingTestIds: z.ZodArray<z.ZodString, "many">;
|
|
86
|
+
cypressStructure: z.ZodObject<{
|
|
87
|
+
detected: z.ZodBoolean;
|
|
88
|
+
e2eFolder: z.ZodOptional<z.ZodString>;
|
|
89
|
+
componentFolder: z.ZodOptional<z.ZodString>;
|
|
90
|
+
fixturesFolder: z.ZodOptional<z.ZodString>;
|
|
91
|
+
supportFolder: z.ZodOptional<z.ZodString>;
|
|
92
|
+
hasCommandsFile: z.ZodBoolean;
|
|
93
|
+
existingE2eFiles: z.ZodArray<z.ZodString, "many">;
|
|
94
|
+
existingComponentFiles: z.ZodArray<z.ZodString, "many">;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
detected: boolean;
|
|
97
|
+
hasCommandsFile: boolean;
|
|
98
|
+
existingE2eFiles: string[];
|
|
99
|
+
existingComponentFiles: string[];
|
|
100
|
+
e2eFolder?: string | undefined;
|
|
101
|
+
componentFolder?: string | undefined;
|
|
102
|
+
fixturesFolder?: string | undefined;
|
|
103
|
+
supportFolder?: string | undefined;
|
|
104
|
+
}, {
|
|
105
|
+
detected: boolean;
|
|
106
|
+
hasCommandsFile: boolean;
|
|
107
|
+
existingE2eFiles: string[];
|
|
108
|
+
existingComponentFiles: string[];
|
|
109
|
+
e2eFolder?: string | undefined;
|
|
110
|
+
componentFolder?: string | undefined;
|
|
111
|
+
fixturesFolder?: string | undefined;
|
|
112
|
+
supportFolder?: string | undefined;
|
|
113
|
+
}>;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
scannedAt: string;
|
|
116
|
+
routes: {
|
|
117
|
+
path: string;
|
|
118
|
+
file: string;
|
|
119
|
+
method: "unknown" | "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
120
|
+
}[];
|
|
121
|
+
repoPath: string;
|
|
122
|
+
testFiles: {
|
|
123
|
+
type: "playwright" | "cypress-e2e" | "cypress-component" | "jest" | "vitest" | "other";
|
|
124
|
+
file: string;
|
|
125
|
+
coveredPaths: string[];
|
|
126
|
+
}[];
|
|
127
|
+
missingTestIds: string[];
|
|
128
|
+
cypressStructure: {
|
|
129
|
+
detected: boolean;
|
|
130
|
+
hasCommandsFile: boolean;
|
|
131
|
+
existingE2eFiles: string[];
|
|
132
|
+
existingComponentFiles: string[];
|
|
133
|
+
e2eFolder?: string | undefined;
|
|
134
|
+
componentFolder?: string | undefined;
|
|
135
|
+
fixturesFolder?: string | undefined;
|
|
136
|
+
supportFolder?: string | undefined;
|
|
137
|
+
};
|
|
138
|
+
}, {
|
|
139
|
+
scannedAt: string;
|
|
140
|
+
routes: {
|
|
141
|
+
path: string;
|
|
142
|
+
file: string;
|
|
143
|
+
method: "unknown" | "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
144
|
+
}[];
|
|
145
|
+
repoPath: string;
|
|
146
|
+
testFiles: {
|
|
147
|
+
type: "playwright" | "cypress-e2e" | "cypress-component" | "jest" | "vitest" | "other";
|
|
148
|
+
file: string;
|
|
149
|
+
coveredPaths: string[];
|
|
150
|
+
}[];
|
|
151
|
+
missingTestIds: string[];
|
|
152
|
+
cypressStructure: {
|
|
153
|
+
detected: boolean;
|
|
154
|
+
hasCommandsFile: boolean;
|
|
155
|
+
existingE2eFiles: string[];
|
|
156
|
+
existingComponentFiles: string[];
|
|
157
|
+
e2eFolder?: string | undefined;
|
|
158
|
+
componentFolder?: string | undefined;
|
|
159
|
+
fixturesFolder?: string | undefined;
|
|
160
|
+
supportFolder?: string | undefined;
|
|
161
|
+
};
|
|
162
|
+
}>;
|
|
163
|
+
export type RepoAnalysis = z.infer<typeof RepoAnalysisSchema>;
|
|
164
|
+
export type CypressStructure = z.infer<typeof CypressStructureSchema>;
|
|
165
|
+
//# sourceMappingURL=repo-analysis.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repo-analysis.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/repo-analysis.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;EAIzB,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASjC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const RepoRouteSchema = z.object({
|
|
3
|
+
path: z.string(),
|
|
4
|
+
file: z.string(),
|
|
5
|
+
method: z.enum(['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'unknown']),
|
|
6
|
+
});
|
|
7
|
+
export const TestFileSchema = z.object({
|
|
8
|
+
file: z.string(),
|
|
9
|
+
type: z.enum(['playwright', 'cypress-e2e', 'cypress-component', 'jest', 'vitest', 'other']),
|
|
10
|
+
coveredPaths: z.array(z.string()),
|
|
11
|
+
});
|
|
12
|
+
export const CypressStructureSchema = z.object({
|
|
13
|
+
detected: z.boolean(),
|
|
14
|
+
e2eFolder: z.string().optional(),
|
|
15
|
+
componentFolder: z.string().optional(),
|
|
16
|
+
fixturesFolder: z.string().optional(),
|
|
17
|
+
supportFolder: z.string().optional(),
|
|
18
|
+
hasCommandsFile: z.boolean(),
|
|
19
|
+
existingE2eFiles: z.array(z.string()),
|
|
20
|
+
existingComponentFiles: z.array(z.string()),
|
|
21
|
+
});
|
|
22
|
+
export const RepoAnalysisSchema = z.object({
|
|
23
|
+
scannedAt: z.string().datetime(),
|
|
24
|
+
repoPath: z.string(),
|
|
25
|
+
routes: z.array(RepoRouteSchema),
|
|
26
|
+
testFiles: z.array(TestFileSchema),
|
|
27
|
+
missingTestIds: z.array(z.string()),
|
|
28
|
+
cypressStructure: CypressStructureSchema,
|
|
29
|
+
});
|