@crvy/rprtr 0.1.4 → 0.2.2
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/CHANGELOG.md +61 -0
- package/README.md +8 -7
- package/dist/{chunk-WRMHUY5A.js → chunk-HAFWYUNO.js} +181 -130
- package/dist/{chunk-KLGJSEKV.js → chunk-RFZGJSL3.js} +439 -127
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -4
- package/dist/index.css +26 -0
- package/dist/index.js +297 -76
- package/dist/offline-reports.d.ts +4 -0
- package/dist/offline-reports.d.ts.map +1 -1
- package/dist/report-state.d.ts +3 -1
- package/dist/report-state.d.ts.map +1 -1
- package/dist/reporter-utils.d.ts +0 -1
- package/dist/reporter-utils.d.ts.map +1 -1
- package/dist/reporter.cjs +186 -134
- package/dist/reporter.d.ts +1 -1
- package/dist/reporter.d.ts.map +1 -1
- package/dist/reporter.js +8 -6
- package/dist/schemas/http.d.ts +44 -0
- package/dist/schemas/http.d.ts.map +1 -0
- package/dist/schemas.d.ts +25 -6
- package/dist/schemas.d.ts.map +1 -1
- package/dist/server/app.d.ts +6 -0
- package/dist/server/app.d.ts.map +1 -1
- package/dist/server/handlers.d.ts +3 -0
- package/dist/server/handlers.d.ts.map +1 -1
- package/dist/server/playwright-config.d.ts +2 -0
- package/dist/server/playwright-config.d.ts.map +1 -0
- package/dist/server/routes-context.d.ts +13 -0
- package/dist/server/routes-context.d.ts.map +1 -0
- package/dist/server/routes.d.ts +6 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/run-controller.d.ts +85 -0
- package/dist/server/run-controller.d.ts.map +1 -0
- package/dist/server/run-routes.d.ts +3 -0
- package/dist/server/run-routes.d.ts.map +1 -0
- package/dist/server.cjs +633 -273
- package/dist/server.js +2 -2
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -5
|
@@ -2,6 +2,10 @@ import { type OfflineReport as ParsedOfflineReport } from './schemas.ts';
|
|
|
2
2
|
import type { TestData } from './types.ts';
|
|
3
3
|
export declare function findOfflineReportPaths(searchDir: string): Promise<string[]>;
|
|
4
4
|
export declare function parseOfflineReport(value: unknown): ParsedOfflineReport | null;
|
|
5
|
+
export declare function loadOfflineReports(reportData: {
|
|
6
|
+
tests: Record<string, TestData>;
|
|
7
|
+
screenshotDir: string;
|
|
8
|
+
}, offlineReportDir: string): Promise<void>;
|
|
5
9
|
export declare function mergeOfflineReportsIntoTests(existingTests: Record<string, TestData>, offlineReports: ParsedOfflineReport[], options?: {
|
|
6
10
|
screenshotDir?: string;
|
|
7
11
|
screenshotsBaseUrl?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offline-reports.d.ts","sourceRoot":"","sources":["../src/offline-reports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"offline-reports.d.ts","sourceRoot":"","sources":["../src/offline-reports.ts"],"names":[],"mappings":"AAMA,OAAO,EAKL,KAAK,aAAa,IAAI,mBAAmB,EAC1C,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAK1C,wBAAsB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAcjF;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAO7E;AAqBD,wBAAsB,kBAAkB,CACtC,UAAU,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,EACtE,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,EACvC,cAAc,EAAE,mBAAmB,EAAE,EACrC,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO,GACpE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAoC1B"}
|
package/dist/report-state.d.ts
CHANGED
|
@@ -24,7 +24,9 @@ export declare function applyTestBeginEvent(state: MutableReportState, data: Tes
|
|
|
24
24
|
export declare function applyTestEndEvent(state: MutableReportState, data: ReportStateTestEndData, options?: {
|
|
25
25
|
screenshotsBaseUrl?: string;
|
|
26
26
|
}): ApplyTestEndResult | null;
|
|
27
|
-
export declare function finalizeRunEvent(state: MutableReportState
|
|
27
|
+
export declare function finalizeRunEvent(state: MutableReportState, options?: {
|
|
28
|
+
preserveNonCurrent?: boolean;
|
|
29
|
+
}): {
|
|
28
30
|
passed: number;
|
|
29
31
|
failed: number;
|
|
30
32
|
pending: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report-state.d.ts","sourceRoot":"","sources":["../src/report-state.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,KAAK,EAAU,QAAQ,EAAc,MAAM,YAAY,CAAA;AAE9D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,iBAAiB,CAAA;IAC7B,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,KAAK,sBAAsB,GAAG,WAAW,GAAG;IAC1C,kBAAkB,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAA;CACtD,CAAA;AAqDD,wBAAgB,wBAAwB,CAAC,aAAa,SAAkB,GAAG,kBAAkB,CAW5F;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,GAAG,QAAQ,
|
|
1
|
+
{"version":3,"file":"report-state.d.ts","sourceRoot":"","sources":["../src/report-state.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,KAAK,EAAU,QAAQ,EAAc,MAAM,YAAY,CAAA;AAE9D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,iBAAiB,CAAA;IAC7B,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,KAAK,sBAAsB,GAAG,WAAW,GAAG;IAC1C,kBAAkB,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAA;CACtD,CAAA;AAqDD,wBAAgB,wBAAwB,CAAC,aAAa,SAAkB,GAAG,kBAAkB,CAW5F;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,aAAa,GAAG,QAAQ,CA0B5F;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,kBAAkB,EACzB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAO,GAC5C,kBAAkB,GAAG,IAAI,CAyC3B;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,kBAAkB,EACzB,OAAO,GAAE;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7C;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAiBrD"}
|
package/dist/reporter-utils.d.ts
CHANGED
|
@@ -18,5 +18,4 @@ export interface AttachmentData {
|
|
|
18
18
|
contentType: string;
|
|
19
19
|
}
|
|
20
20
|
export declare function extractScreenshotDeclarations(steps: readonly TestStep[]): ScreenshotDeclaration[];
|
|
21
|
-
export declare function extractScreenshotNames(steps: readonly TestStep[]): string[];
|
|
22
21
|
//# sourceMappingURL=reporter-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporter-utils.d.ts","sourceRoot":"","sources":["../src/reporter-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAMzD,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,SAAS,CAAA;IACf,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,4BAA4B,CAAA;AAE7F,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AA8ED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,qBAAqB,EAAE,CAYjG
|
|
1
|
+
{"version":3,"file":"reporter-utils.d.ts","sourceRoot":"","sources":["../src/reporter-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAMzD,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,SAAS,CAAA;IACf,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,4BAA4B,CAAA;AAE7F,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB;AA8ED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,qBAAqB,EAAE,CAYjG"}
|
package/dist/reporter.cjs
CHANGED
|
@@ -202,7 +202,12 @@ function createMutableReportState(screenshotDir = "./screenshots") {
|
|
|
202
202
|
function applyTestBeginEvent(state, data) {
|
|
203
203
|
const { id, title, titlePath, browser, projectName, location } = data;
|
|
204
204
|
state.currentRunIds.add(id);
|
|
205
|
-
state.reportData.tests[id]
|
|
205
|
+
const existing = state.reportData.tests[id];
|
|
206
|
+
if (existing !== void 0) {
|
|
207
|
+
existing.status = "running";
|
|
208
|
+
return existing;
|
|
209
|
+
}
|
|
210
|
+
const created = {
|
|
206
211
|
id,
|
|
207
212
|
titlePath: titlePath ?? [],
|
|
208
213
|
browser: browser ?? "",
|
|
@@ -214,7 +219,8 @@ function applyTestBeginEvent(state, data) {
|
|
|
214
219
|
location,
|
|
215
220
|
status: "running"
|
|
216
221
|
};
|
|
217
|
-
|
|
222
|
+
state.reportData.tests[id] = created;
|
|
223
|
+
return created;
|
|
218
224
|
}
|
|
219
225
|
function applyTestEndEvent(state, data, options = {}) {
|
|
220
226
|
const test = state.reportData.tests[data.id];
|
|
@@ -252,11 +258,13 @@ function applyTestEndEvent(state, data, options = {}) {
|
|
|
252
258
|
diffCount
|
|
253
259
|
};
|
|
254
260
|
}
|
|
255
|
-
function finalizeRunEvent(state) {
|
|
261
|
+
function finalizeRunEvent(state, options = {}) {
|
|
256
262
|
state.reportData.isRunning = false;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
263
|
+
if (options.preserveNonCurrent !== true) {
|
|
264
|
+
state.reportData.tests = Object.fromEntries(
|
|
265
|
+
Object.entries(state.reportData.tests).filter(([id]) => state.currentRunIds.has(id))
|
|
266
|
+
);
|
|
267
|
+
}
|
|
260
268
|
state.currentRunIds.clear();
|
|
261
269
|
const runTests = Object.values(state.reportData.tests).filter((test) => test !== void 0);
|
|
262
270
|
return {
|
|
@@ -267,169 +275,211 @@ function finalizeRunEvent(state) {
|
|
|
267
275
|
}
|
|
268
276
|
|
|
269
277
|
// src/schemas.ts
|
|
278
|
+
var import_zod2 = require("zod");
|
|
279
|
+
|
|
280
|
+
// src/schemas/http.ts
|
|
270
281
|
var import_zod = require("zod");
|
|
271
|
-
var
|
|
282
|
+
var ApproveRequestBodySchema = import_zod.z.object({
|
|
283
|
+
id: import_zod.z.string(),
|
|
284
|
+
retry: import_zod.z.number(),
|
|
285
|
+
image: import_zod.z.string()
|
|
286
|
+
});
|
|
287
|
+
var RunTestDescriptorSchema = import_zod.z.object({
|
|
272
288
|
file: import_zod.z.string(),
|
|
273
|
-
line: import_zod.z.number()
|
|
289
|
+
line: import_zod.z.number(),
|
|
290
|
+
column: import_zod.z.number().optional(),
|
|
291
|
+
projectName: import_zod.z.string().optional(),
|
|
292
|
+
titlePath: import_zod.z.array(import_zod.z.string())
|
|
274
293
|
});
|
|
275
|
-
var
|
|
276
|
-
|
|
277
|
-
actual: import_zod.z.string().optional(),
|
|
278
|
-
expect: import_zod.z.string().optional(),
|
|
279
|
-
diff: import_zod.z.string().optional(),
|
|
280
|
-
error: import_zod.z.string().optional(),
|
|
281
|
-
source: VisualSourceSchema.optional()
|
|
294
|
+
var RunRequestBodySchema = import_zod.z.object({
|
|
295
|
+
tests: import_zod.z.array(RunTestDescriptorSchema).optional()
|
|
282
296
|
});
|
|
283
|
-
var
|
|
297
|
+
var RunResponseSchema = import_zod.z.discriminatedUnion("ok", [
|
|
298
|
+
import_zod.z.object({ ok: import_zod.z.literal(true) }),
|
|
284
299
|
import_zod.z.object({
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}),
|
|
300
|
+
ok: import_zod.z.literal(false),
|
|
301
|
+
reason: import_zod.z.enum(["no-config", "already-running", "no-tests"])
|
|
302
|
+
})
|
|
303
|
+
]);
|
|
304
|
+
var StopResponseSchema = import_zod.z.discriminatedUnion("ok", [
|
|
305
|
+
import_zod.z.object({ ok: import_zod.z.literal(true) }),
|
|
291
306
|
import_zod.z.object({
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
occurrenceIndex: import_zod.z.number()
|
|
307
|
+
ok: import_zod.z.literal(false),
|
|
308
|
+
reason: import_zod.z.literal("not-running")
|
|
295
309
|
})
|
|
296
310
|
]);
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
311
|
+
|
|
312
|
+
// src/schemas.ts
|
|
313
|
+
var LocationSchema = import_zod2.z.object({
|
|
314
|
+
file: import_zod2.z.string(),
|
|
315
|
+
line: import_zod2.z.number(),
|
|
316
|
+
column: import_zod2.z.number().optional()
|
|
317
|
+
});
|
|
318
|
+
var VisualSourceSchema = import_zod2.z.enum(["comparison", "baseline-only", "declared-only"]);
|
|
319
|
+
var ImagesSchema = import_zod2.z.object({
|
|
320
|
+
actual: import_zod2.z.string().optional(),
|
|
321
|
+
expect: import_zod2.z.string().optional(),
|
|
322
|
+
diff: import_zod2.z.string().optional(),
|
|
323
|
+
error: import_zod2.z.string().optional(),
|
|
324
|
+
source: VisualSourceSchema.optional()
|
|
301
325
|
});
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
|
|
326
|
+
var ScreenshotDeclarationSchema = import_zod2.z.discriminatedUnion("kind", [
|
|
327
|
+
import_zod2.z.object({
|
|
328
|
+
visualName: import_zod2.z.string(),
|
|
329
|
+
kind: import_zod2.z.literal("named"),
|
|
330
|
+
declaredName: import_zod2.z.string(),
|
|
331
|
+
snapshotBaseName: import_zod2.z.string(),
|
|
332
|
+
occurrenceIndex: import_zod2.z.number()
|
|
333
|
+
}),
|
|
334
|
+
import_zod2.z.object({
|
|
335
|
+
visualName: import_zod2.z.string(),
|
|
336
|
+
kind: import_zod2.z.literal("unnamed"),
|
|
337
|
+
occurrenceIndex: import_zod2.z.number()
|
|
338
|
+
})
|
|
339
|
+
]);
|
|
340
|
+
var AttachmentSchema = import_zod2.z.object({
|
|
341
|
+
name: import_zod2.z.string(),
|
|
342
|
+
path: import_zod2.z.string(),
|
|
343
|
+
contentType: import_zod2.z.string()
|
|
344
|
+
});
|
|
345
|
+
var TestStatusSchema = import_zod2.z.enum(["unknown", "pending", "running", "failed", "approved", "success", "retrying"]);
|
|
346
|
+
var TestResultStatusSchema = import_zod2.z.enum(["failed", "success", "pending"]);
|
|
347
|
+
var TestResultSchema = import_zod2.z.object({
|
|
305
348
|
status: TestResultStatusSchema,
|
|
306
|
-
retries:
|
|
307
|
-
images:
|
|
308
|
-
visualDeclarations:
|
|
309
|
-
error:
|
|
310
|
-
duration:
|
|
349
|
+
retries: import_zod2.z.number(),
|
|
350
|
+
images: import_zod2.z.record(import_zod2.z.string(), ImagesSchema).optional(),
|
|
351
|
+
visualDeclarations: import_zod2.z.array(ScreenshotDeclarationSchema).optional(),
|
|
352
|
+
error: import_zod2.z.string().optional(),
|
|
353
|
+
duration: import_zod2.z.number().optional()
|
|
311
354
|
});
|
|
312
|
-
var TestDataSchema =
|
|
313
|
-
id:
|
|
314
|
-
titlePath:
|
|
315
|
-
browser:
|
|
316
|
-
projectName:
|
|
317
|
-
title:
|
|
318
|
-
skip:
|
|
319
|
-
retries:
|
|
355
|
+
var TestDataSchema = import_zod2.z.object({
|
|
356
|
+
id: import_zod2.z.string(),
|
|
357
|
+
titlePath: import_zod2.z.array(import_zod2.z.string()),
|
|
358
|
+
browser: import_zod2.z.string(),
|
|
359
|
+
projectName: import_zod2.z.string().optional(),
|
|
360
|
+
title: import_zod2.z.string(),
|
|
361
|
+
skip: import_zod2.z.union([import_zod2.z.boolean(), import_zod2.z.string()]).optional(),
|
|
362
|
+
retries: import_zod2.z.number().optional(),
|
|
320
363
|
status: TestStatusSchema.optional(),
|
|
321
|
-
results:
|
|
322
|
-
approved:
|
|
323
|
-
attachments:
|
|
364
|
+
results: import_zod2.z.array(TestResultSchema).optional(),
|
|
365
|
+
approved: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.number()).nullable().optional(),
|
|
366
|
+
attachments: import_zod2.z.array(AttachmentSchema).optional(),
|
|
324
367
|
location: LocationSchema.optional()
|
|
325
368
|
});
|
|
326
369
|
var CrvyRprtrTestSchema = TestDataSchema.extend({
|
|
327
|
-
checked:
|
|
370
|
+
checked: import_zod2.z.boolean()
|
|
328
371
|
});
|
|
329
|
-
var CrvyRprtrSuiteSchema =
|
|
330
|
-
() =>
|
|
331
|
-
path:
|
|
332
|
-
skip:
|
|
372
|
+
var CrvyRprtrSuiteSchema = import_zod2.z.lazy(
|
|
373
|
+
() => import_zod2.z.object({
|
|
374
|
+
path: import_zod2.z.array(import_zod2.z.string()),
|
|
375
|
+
skip: import_zod2.z.boolean(),
|
|
333
376
|
status: TestStatusSchema.optional(),
|
|
334
|
-
opened:
|
|
335
|
-
checked:
|
|
336
|
-
indeterminate:
|
|
337
|
-
children:
|
|
377
|
+
opened: import_zod2.z.boolean(),
|
|
378
|
+
checked: import_zod2.z.boolean(),
|
|
379
|
+
indeterminate: import_zod2.z.boolean(),
|
|
380
|
+
children: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.union([CrvyRprtrSuiteSchema, CrvyRprtrTestSchema])).optional()
|
|
338
381
|
})
|
|
339
382
|
);
|
|
340
|
-
var IncomingWebSocketMessageSchema =
|
|
341
|
-
type:
|
|
342
|
-
data:
|
|
383
|
+
var IncomingWebSocketMessageSchema = import_zod2.z.object({
|
|
384
|
+
type: import_zod2.z.enum(["test-begin", "test-end", "run-end", "approve", "sync", "register"]),
|
|
385
|
+
data: import_zod2.z.unknown()
|
|
343
386
|
});
|
|
344
|
-
var WebSocketMessageSchema =
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
type:
|
|
349
|
-
data:
|
|
350
|
-
status:
|
|
351
|
-
removedTestIds:
|
|
387
|
+
var WebSocketMessageSchema = import_zod2.z.discriminatedUnion("type", [
|
|
388
|
+
import_zod2.z.object({ type: import_zod2.z.literal("test-begin"), data: TestDataSchema }),
|
|
389
|
+
import_zod2.z.object({ type: import_zod2.z.literal("test-update"), data: TestDataSchema }),
|
|
390
|
+
import_zod2.z.object({
|
|
391
|
+
type: import_zod2.z.literal("run-end"),
|
|
392
|
+
data: import_zod2.z.object({
|
|
393
|
+
status: import_zod2.z.enum(["passed", "failed", "skipped"]),
|
|
394
|
+
removedTestIds: import_zod2.z.array(import_zod2.z.string())
|
|
352
395
|
})
|
|
353
396
|
}),
|
|
354
|
-
|
|
355
|
-
type:
|
|
356
|
-
data:
|
|
357
|
-
tests:
|
|
358
|
-
isUpdateMode:
|
|
397
|
+
import_zod2.z.object({
|
|
398
|
+
type: import_zod2.z.literal("sync"),
|
|
399
|
+
data: import_zod2.z.object({
|
|
400
|
+
tests: import_zod2.z.record(import_zod2.z.string(), TestDataSchema),
|
|
401
|
+
isUpdateMode: import_zod2.z.boolean().optional()
|
|
359
402
|
})
|
|
360
403
|
}),
|
|
361
|
-
|
|
404
|
+
import_zod2.z.object({ type: import_zod2.z.literal("approve"), data: import_zod2.z.unknown() }),
|
|
405
|
+
import_zod2.z.object({
|
|
406
|
+
type: import_zod2.z.literal("run-status"),
|
|
407
|
+
data: import_zod2.z.object({
|
|
408
|
+
running: import_zod2.z.boolean()
|
|
409
|
+
})
|
|
410
|
+
})
|
|
362
411
|
]);
|
|
363
|
-
var TestBeginDataSchema =
|
|
364
|
-
id:
|
|
365
|
-
title:
|
|
366
|
-
titlePath:
|
|
367
|
-
browser:
|
|
368
|
-
projectName:
|
|
412
|
+
var TestBeginDataSchema = import_zod2.z.object({
|
|
413
|
+
id: import_zod2.z.string(),
|
|
414
|
+
title: import_zod2.z.string(),
|
|
415
|
+
titlePath: import_zod2.z.array(import_zod2.z.string()),
|
|
416
|
+
browser: import_zod2.z.string(),
|
|
417
|
+
projectName: import_zod2.z.string().optional(),
|
|
369
418
|
location: LocationSchema
|
|
370
419
|
});
|
|
371
|
-
var TestEndDataSchema =
|
|
372
|
-
id:
|
|
373
|
-
status:
|
|
374
|
-
attachments:
|
|
375
|
-
visualNames:
|
|
376
|
-
visualDeclarations:
|
|
420
|
+
var TestEndDataSchema = import_zod2.z.object({
|
|
421
|
+
id: import_zod2.z.string(),
|
|
422
|
+
status: import_zod2.z.enum(["passed", "failed", "skipped"]),
|
|
423
|
+
attachments: import_zod2.z.array(AttachmentSchema),
|
|
424
|
+
visualNames: import_zod2.z.array(import_zod2.z.string()).default([]),
|
|
425
|
+
visualDeclarations: import_zod2.z.preprocess(
|
|
377
426
|
(value) => value === null ? void 0 : value,
|
|
378
|
-
|
|
427
|
+
import_zod2.z.array(ScreenshotDeclarationSchema).optional()
|
|
379
428
|
),
|
|
380
|
-
error:
|
|
381
|
-
duration:
|
|
382
|
-
});
|
|
383
|
-
var RunEndDataSchema = import_zod.z.object({
|
|
384
|
-
status: import_zod.z.enum(["passed", "failed", "skipped"])
|
|
429
|
+
error: import_zod2.z.string().optional(),
|
|
430
|
+
duration: import_zod2.z.number().optional()
|
|
385
431
|
});
|
|
386
|
-
var
|
|
387
|
-
|
|
388
|
-
playwrightTestDir: import_zod.z.string().optional(),
|
|
389
|
-
playwrightSnapshotPathTemplate: import_zod.z.string().optional(),
|
|
390
|
-
playwrightToHaveScreenshotPathTemplate: import_zod.z.string().optional()
|
|
432
|
+
var RunEndDataSchema = import_zod2.z.object({
|
|
433
|
+
status: import_zod2.z.enum(["passed", "failed", "skipped"])
|
|
391
434
|
});
|
|
392
|
-
var
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
435
|
+
var RegisterDataSchema = import_zod2.z.object({
|
|
436
|
+
playwrightSnapshotDir: import_zod2.z.string().optional(),
|
|
437
|
+
playwrightTestDir: import_zod2.z.string().optional(),
|
|
438
|
+
playwrightSnapshotPathTemplate: import_zod2.z.string().optional(),
|
|
439
|
+
playwrightToHaveScreenshotPathTemplate: import_zod2.z.string().optional(),
|
|
440
|
+
configFile: import_zod2.z.string().optional(),
|
|
441
|
+
cwd: import_zod2.z.string().optional()
|
|
398
442
|
});
|
|
399
|
-
var
|
|
400
|
-
|
|
401
|
-
|
|
443
|
+
var ReportDataSchema = import_zod2.z.object({
|
|
444
|
+
isRunning: import_zod2.z.boolean(),
|
|
445
|
+
tests: import_zod2.z.record(import_zod2.z.string(), TestDataSchema),
|
|
446
|
+
browsers: import_zod2.z.array(import_zod2.z.string()),
|
|
447
|
+
isUpdateMode: import_zod2.z.boolean(),
|
|
448
|
+
screenshotDir: import_zod2.z.string()
|
|
402
449
|
});
|
|
403
|
-
var
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
timestamp: import_zod.z.number(),
|
|
407
|
-
workerIndex: import_zod.z.number()
|
|
450
|
+
var LoadedReportDataSchema = import_zod2.z.object({
|
|
451
|
+
tests: import_zod2.z.record(import_zod2.z.string(), TestDataSchema).optional(),
|
|
452
|
+
isUpdateMode: import_zod2.z.boolean().optional()
|
|
408
453
|
});
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
454
|
+
var OfflineEventSchema = import_zod2.z.object({
|
|
455
|
+
type: import_zod2.z.enum(["test-begin", "test-end", "run-end"]),
|
|
456
|
+
data: import_zod2.z.unknown(),
|
|
457
|
+
timestamp: import_zod2.z.number(),
|
|
458
|
+
workerIndex: import_zod2.z.number()
|
|
414
459
|
});
|
|
415
|
-
var
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
460
|
+
var OfflineReportSchema = import_zod2.z.object({
|
|
461
|
+
version: import_zod2.z.number(),
|
|
462
|
+
generatedAt: import_zod2.z.string(),
|
|
463
|
+
workers: import_zod2.z.number(),
|
|
464
|
+
events: import_zod2.z.array(OfflineEventSchema)
|
|
419
465
|
});
|
|
420
|
-
var ReportApiResponseSchema =
|
|
421
|
-
tests:
|
|
422
|
-
isUpdateMode:
|
|
466
|
+
var ReportApiResponseSchema = import_zod2.z.object({
|
|
467
|
+
tests: import_zod2.z.record(import_zod2.z.string(), TestDataSchema),
|
|
468
|
+
isUpdateMode: import_zod2.z.boolean().optional(),
|
|
469
|
+
isRunning: import_zod2.z.boolean().optional(),
|
|
470
|
+
runEnabled: import_zod2.z.boolean().optional()
|
|
423
471
|
});
|
|
424
|
-
var ClientBootstrapDataSchema =
|
|
472
|
+
var ClientBootstrapDataSchema = import_zod2.z.object({
|
|
425
473
|
report: ReportApiResponseSchema.extend({
|
|
426
|
-
isUpdateMode:
|
|
474
|
+
isUpdateMode: import_zod2.z.boolean()
|
|
427
475
|
}),
|
|
428
|
-
liveUpdates:
|
|
429
|
-
approvalEnabled:
|
|
430
|
-
approvalMessage:
|
|
476
|
+
liveUpdates: import_zod2.z.boolean(),
|
|
477
|
+
approvalEnabled: import_zod2.z.boolean(),
|
|
478
|
+
approvalMessage: import_zod2.z.string().optional(),
|
|
479
|
+
runEnabled: import_zod2.z.boolean().optional(),
|
|
480
|
+
isRunning: import_zod2.z.boolean().optional()
|
|
431
481
|
});
|
|
432
|
-
var ImagesViewModeSchema =
|
|
482
|
+
var ImagesViewModeSchema = import_zod2.z.enum(["side-by-side", "swap", "slide", "blend"]);
|
|
433
483
|
function safeParse(schema, data) {
|
|
434
484
|
const result = schema.safeParse(data);
|
|
435
485
|
if (result.success) {
|
|
@@ -919,7 +969,7 @@ var CrvyRprtr = class {
|
|
|
919
969
|
ci;
|
|
920
970
|
pendingArtifacts = [];
|
|
921
971
|
constructor(options = {}) {
|
|
922
|
-
this.serverUrl = options.serverUrl ?? "ws://localhost:3000";
|
|
972
|
+
this.serverUrl = options.serverUrl ?? process.env.CRVY_RPRTR_SERVER_URL ?? "ws://localhost:3000";
|
|
923
973
|
this.screenshotDir = options.screenshotDir ?? "./screenshots";
|
|
924
974
|
this.workerIndex = parseInt(process.env.TEST_WORKER_INDEX ?? "0", 10) || 0;
|
|
925
975
|
this.offlineReportPath = options.offlineReportPath ?? `./crvy-rprtr-${this.workerIndex}.json`;
|
|
@@ -930,10 +980,9 @@ var CrvyRprtr = class {
|
|
|
930
980
|
this.ci = options.ci ?? isCI();
|
|
931
981
|
if (this.ci) this.isOfflineMode = true;
|
|
932
982
|
}
|
|
933
|
-
|
|
983
|
+
onBegin(config, suite) {
|
|
934
984
|
this.configDir = config.configFile === void 0 ? config.rootDir : (0, import_path4.dirname)(config.configFile);
|
|
935
985
|
log(`[CrvyRprtr] Starting run with ${suite.allTests().length} tests`);
|
|
936
|
-
await (0, import_promises3.mkdir)(this.screenshotDir, { recursive: true });
|
|
937
986
|
if (!this.ci) {
|
|
938
987
|
this.connect();
|
|
939
988
|
this.sendRegister(config);
|
|
@@ -981,7 +1030,9 @@ var CrvyRprtr = class {
|
|
|
981
1030
|
playwrightSnapshotDir: typeof snapshotDir === "string" ? snapshotDir : void 0,
|
|
982
1031
|
playwrightTestDir: typeof testDir === "string" ? testDir : void 0,
|
|
983
1032
|
playwrightSnapshotPathTemplate: this.playwrightSnapshotPathTemplate,
|
|
984
|
-
playwrightToHaveScreenshotPathTemplate: this.playwrightToHaveScreenshotPathTemplate
|
|
1033
|
+
playwrightToHaveScreenshotPathTemplate: this.playwrightToHaveScreenshotPathTemplate,
|
|
1034
|
+
configFile: config.configFile,
|
|
1035
|
+
cwd: config.rootDir ?? process.cwd()
|
|
985
1036
|
}
|
|
986
1037
|
});
|
|
987
1038
|
}
|
|
@@ -1019,7 +1070,7 @@ var CrvyRprtr = class {
|
|
|
1019
1070
|
titlePath: this.describeTitlePath(test),
|
|
1020
1071
|
browser: this.resolveBrowserLabel(project),
|
|
1021
1072
|
projectName: project?.name ?? "",
|
|
1022
|
-
location: { file: test.location.file, line: test.location.line }
|
|
1073
|
+
location: { file: test.location.file, line: test.location.line, column: test.location.column }
|
|
1023
1074
|
}
|
|
1024
1075
|
});
|
|
1025
1076
|
}
|
|
@@ -1091,6 +1142,7 @@ var CrvyRprtr = class {
|
|
|
1091
1142
|
async onEnd(result) {
|
|
1092
1143
|
this.send({ type: "run-end", data: { status: result.status } });
|
|
1093
1144
|
if (this.ci) {
|
|
1145
|
+
await (0, import_promises3.mkdir)(this.screenshotDir, { recursive: true });
|
|
1094
1146
|
const limit = (0, import_p_limit2.default)(10);
|
|
1095
1147
|
await Promise.all(
|
|
1096
1148
|
this.pendingArtifacts.map(
|
package/dist/reporter.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare class CrvyRprtr implements Reporter {
|
|
|
19
19
|
private readonly ci;
|
|
20
20
|
private pendingArtifacts;
|
|
21
21
|
constructor(options?: CrvyRprtrOptions);
|
|
22
|
-
onBegin(config: FullConfig, suite: Suite):
|
|
22
|
+
onBegin(config: FullConfig, suite: Suite): void;
|
|
23
23
|
private connect;
|
|
24
24
|
private enableOfflineMode;
|
|
25
25
|
private sendRegister;
|
package/dist/reporter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EAEV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,UAAU,EACX,MAAM,2BAA2B,CAAA;AAalC,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAA;AAS9B,YAAY,EAAE,gBAAgB,EAAE,CAAA;AAEhC,qBAAa,SAAU,YAAW,QAAQ;IACxC,OAAO,CAAC,EAAE,CAAyB;IACnC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,YAAY,CAAqD;IACzE,OAAO,CAAC,qBAAqB,CAAC,CAAQ;IACtC,OAAO,CAAC,8BAA8B,CAAC,CAAQ;IAC/C,OAAO,CAAC,sCAAsC,CAAC,CAAQ;IACvD,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAS;IAC5B,OAAO,CAAC,gBAAgB,CAAgC;gBAE5C,OAAO,GAAE,gBAAqB;
|
|
1
|
+
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EAEV,UAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,UAAU,EACX,MAAM,2BAA2B,CAAA;AAalC,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAA;AAS9B,YAAY,EAAE,gBAAgB,EAAE,CAAA;AAEhC,qBAAa,SAAU,YAAW,QAAQ;IACxC,OAAO,CAAC,EAAE,CAAyB;IACnC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,iBAAiB,CAAQ;IACjC,OAAO,CAAC,cAAc,CAAQ;IAC9B,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,YAAY,CAAqD;IACzE,OAAO,CAAC,qBAAqB,CAAC,CAAQ;IACtC,OAAO,CAAC,8BAA8B,CAAC,CAAQ;IAC/C,OAAO,CAAC,sCAAsC,CAAC,CAAQ;IACvD,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAS;IAC5B,OAAO,CAAC,gBAAgB,CAAgC;gBAE5C,OAAO,GAAE,gBAAqB;IAa1C,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAS/C,OAAO,CAAC,OAAO;IA4Bf,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,iBAAiB;IAOzB;;6EAEyE;IACzE,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,iBAAiB;IAOzB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;IAkBjC,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI;IAmCnD,OAAO,CAAC,aAAa;YAqBP,uBAAuB;IAgB/B,KAAK,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAyC9C,OAAO,CAAC,IAAI;CAUb;AAED,eAAe,SAAS,CAAA"}
|
package/dist/reporter.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveBaselineTargets,
|
|
10
10
|
safeParse,
|
|
11
11
|
withResolvedVisualNames
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HAFWYUNO.js";
|
|
13
13
|
|
|
14
14
|
// src/reporter.ts
|
|
15
15
|
import { existsSync } from "fs";
|
|
@@ -349,7 +349,7 @@ var CrvyRprtr = class {
|
|
|
349
349
|
ci;
|
|
350
350
|
pendingArtifacts = [];
|
|
351
351
|
constructor(options = {}) {
|
|
352
|
-
this.serverUrl = options.serverUrl ?? "ws://localhost:3000";
|
|
352
|
+
this.serverUrl = options.serverUrl ?? process.env.CRVY_RPRTR_SERVER_URL ?? "ws://localhost:3000";
|
|
353
353
|
this.screenshotDir = options.screenshotDir ?? "./screenshots";
|
|
354
354
|
this.workerIndex = parseInt(process.env.TEST_WORKER_INDEX ?? "0", 10) || 0;
|
|
355
355
|
this.offlineReportPath = options.offlineReportPath ?? `./crvy-rprtr-${this.workerIndex}.json`;
|
|
@@ -360,10 +360,9 @@ var CrvyRprtr = class {
|
|
|
360
360
|
this.ci = options.ci ?? isCI();
|
|
361
361
|
if (this.ci) this.isOfflineMode = true;
|
|
362
362
|
}
|
|
363
|
-
|
|
363
|
+
onBegin(config, suite) {
|
|
364
364
|
this.configDir = config.configFile === void 0 ? config.rootDir : dirname3(config.configFile);
|
|
365
365
|
log(`[CrvyRprtr] Starting run with ${suite.allTests().length} tests`);
|
|
366
|
-
await mkdir3(this.screenshotDir, { recursive: true });
|
|
367
366
|
if (!this.ci) {
|
|
368
367
|
this.connect();
|
|
369
368
|
this.sendRegister(config);
|
|
@@ -411,7 +410,9 @@ var CrvyRprtr = class {
|
|
|
411
410
|
playwrightSnapshotDir: typeof snapshotDir === "string" ? snapshotDir : void 0,
|
|
412
411
|
playwrightTestDir: typeof testDir === "string" ? testDir : void 0,
|
|
413
412
|
playwrightSnapshotPathTemplate: this.playwrightSnapshotPathTemplate,
|
|
414
|
-
playwrightToHaveScreenshotPathTemplate: this.playwrightToHaveScreenshotPathTemplate
|
|
413
|
+
playwrightToHaveScreenshotPathTemplate: this.playwrightToHaveScreenshotPathTemplate,
|
|
414
|
+
configFile: config.configFile,
|
|
415
|
+
cwd: config.rootDir ?? process.cwd()
|
|
415
416
|
}
|
|
416
417
|
});
|
|
417
418
|
}
|
|
@@ -449,7 +450,7 @@ var CrvyRprtr = class {
|
|
|
449
450
|
titlePath: this.describeTitlePath(test),
|
|
450
451
|
browser: this.resolveBrowserLabel(project),
|
|
451
452
|
projectName: project?.name ?? "",
|
|
452
|
-
location: { file: test.location.file, line: test.location.line }
|
|
453
|
+
location: { file: test.location.file, line: test.location.line, column: test.location.column }
|
|
453
454
|
}
|
|
454
455
|
});
|
|
455
456
|
}
|
|
@@ -521,6 +522,7 @@ var CrvyRprtr = class {
|
|
|
521
522
|
async onEnd(result) {
|
|
522
523
|
this.send({ type: "run-end", data: { status: result.status } });
|
|
523
524
|
if (this.ci) {
|
|
525
|
+
await mkdir3(this.screenshotDir, { recursive: true });
|
|
524
526
|
const limit = pLimit2(10);
|
|
525
527
|
await Promise.all(
|
|
526
528
|
this.pendingArtifacts.map(
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ApproveRequestBodySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
retry: z.ZodNumber;
|
|
5
|
+
image: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type ApproveRequestBody = z.infer<typeof ApproveRequestBodySchema>;
|
|
8
|
+
export declare const RunTestDescriptorSchema: z.ZodObject<{
|
|
9
|
+
file: z.ZodString;
|
|
10
|
+
line: z.ZodNumber;
|
|
11
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
13
|
+
titlePath: z.ZodArray<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type RunTestDescriptor = z.infer<typeof RunTestDescriptorSchema>;
|
|
16
|
+
export declare const RunRequestBodySchema: z.ZodObject<{
|
|
17
|
+
tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
18
|
+
file: z.ZodString;
|
|
19
|
+
line: z.ZodNumber;
|
|
20
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
22
|
+
titlePath: z.ZodArray<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type RunRequestBody = z.infer<typeof RunRequestBodySchema>;
|
|
26
|
+
export declare const RunResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
ok: z.ZodLiteral<true>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
ok: z.ZodLiteral<false>;
|
|
30
|
+
reason: z.ZodEnum<{
|
|
31
|
+
"no-config": "no-config";
|
|
32
|
+
"already-running": "already-running";
|
|
33
|
+
"no-tests": "no-tests";
|
|
34
|
+
}>;
|
|
35
|
+
}, z.core.$strip>], "ok">;
|
|
36
|
+
export type RunResponse = z.infer<typeof RunResponseSchema>;
|
|
37
|
+
export declare const StopResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
ok: z.ZodLiteral<true>;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
ok: z.ZodLiteral<false>;
|
|
41
|
+
reason: z.ZodLiteral<"not-running">;
|
|
42
|
+
}, z.core.$strip>], "ok">;
|
|
43
|
+
export type StopResponse = z.infer<typeof StopResponseSchema>;
|
|
44
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/schemas/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,eAAO,MAAM,uBAAuB;;;;;;iBAMlC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,oBAAoB;;;;;;;;iBAE/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,iBAAiB;;;;;;;;;yBAM5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,kBAAkB;;;;;yBAM7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
|