ccqa 1.60.3 → 1.60.4

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/bin/ccqa.mjs CHANGED
@@ -338,6 +338,14 @@ function validateTestPathTemplate(template) {
338
338
  if (!template.includes("{spec}") && !template.includes("{case}")) return "testPath must contain {spec} or {case}, or every case would generate onto the same file";
339
339
  return null;
340
340
  }
341
+ /**
342
+ * The directory every test the template names sits under: its path up to the
343
+ * first placeholder's directory. Empty when the template opens with one.
344
+ */
345
+ function testPathRoot(template) {
346
+ const head = template.split("{")[0];
347
+ return head.slice(0, head.lastIndexOf("/") + 1).replace(/\/$/, "");
348
+ }
341
349
  /** What a recording beside its test is called: whose file it is, and what it is. */
342
350
  const RECORDING_EXTENSION = ".ccqa.ir.json";
343
351
  /**
@@ -15491,10 +15499,12 @@ async function identifiersInProject(ctx, writeRoots, emitted) {
15491
15499
  const names = [...source.matchAll(/\bexport\s+(?:default\s+)?(?:abstract\s+)?class\s+([A-Za-z0-9_]+)/g)].map((m) => m[1]);
15492
15500
  owners.set(rel, names);
15493
15501
  }
15502
+ const testsRoot = ctx.targetConfig.testPath ? testPathRoot(ctx.targetConfig.testPath) : "";
15494
15503
  const roots = new Set([
15495
15504
  ...writeRoots,
15496
15505
  ...ctx.resources.map((r) => "path" in r ? r.path : ""),
15497
- dirname(ctx.testPath)
15506
+ dirname(ctx.testPath),
15507
+ testsRoot
15498
15508
  ].filter((r) => r.length > 0).map((r) => resolve(ctx.cwd, r)));
15499
15509
  const found = new Map([...emitted.keys()].map((rel) => [rel, /* @__PURE__ */ new Set()]));
15500
15510
  const seen = /* @__PURE__ */ new Set();
@@ -35,9 +35,9 @@ declare const RunSchema: z.ZodObject<{
35
35
  running: "running";
36
36
  }>;
37
37
  kind: z.ZodDefault<z.ZodEnum<{
38
- record: "record";
39
38
  run: "run";
40
39
  drift: "drift";
40
+ record: "record";
41
41
  }>>;
42
42
  drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
43
43
  specs: z.ZodNumber;
@@ -831,9 +831,9 @@ type ReportSpecResult = z.infer<typeof ReportSpecResultSchema>;
831
831
  declare const RunReportDataSchema: z.ZodObject<{
832
832
  schemaVersion: z.ZodLiteral<1>;
833
833
  kind: z.ZodDefault<z.ZodEnum<{
834
- record: "record";
835
834
  run: "run";
836
835
  drift: "drift";
836
+ record: "record";
837
837
  }>>;
838
838
  createdAt: z.ZodString;
839
839
  runId: z.ZodNullable<z.ZodString>;
@@ -35,9 +35,9 @@ declare const RunSchema: z.ZodObject<{
35
35
  running: "running";
36
36
  }>;
37
37
  kind: z.ZodDefault<z.ZodEnum<{
38
- record: "record";
39
38
  run: "run";
40
39
  drift: "drift";
40
+ record: "record";
41
41
  }>>;
42
42
  drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
43
43
  specs: z.ZodNumber;
@@ -831,9 +831,9 @@ type ReportSpecResult = z.infer<typeof ReportSpecResultSchema>;
831
831
  declare const RunReportDataSchema: z.ZodObject<{
832
832
  schemaVersion: z.ZodLiteral<1>;
833
833
  kind: z.ZodDefault<z.ZodEnum<{
834
- record: "record";
835
834
  run: "run";
836
835
  drift: "drift";
836
+ record: "record";
837
837
  }>>;
838
838
  createdAt: z.ZodString;
839
839
  runId: z.ZodNullable<z.ZodString>;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.60.3",
3
+ "version": "1.60.4",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.60.3",
3
+ "version": "1.60.4",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {