@elench/testkit 0.1.76 → 0.1.78

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.
@@ -53,8 +53,8 @@ export function normalizeConfiguredStep(step, label) {
53
53
 
54
54
  const kind = normalizeOptionalString(step.kind);
55
55
  if (kind === "command") {
56
- const cmd = normalizeOptionalString(step.cmd);
57
- if (!cmd) throw new Error(`${label}.cmd must be a non-empty string`);
56
+ const cmd = normalizeOptionalString(step.run);
57
+ if (!cmd) throw new Error(`${label}.run must be a non-empty string`);
58
58
  return {
59
59
  kind,
60
60
  cmd,
@@ -73,8 +73,8 @@ export function normalizeConfiguredStep(step, label) {
73
73
  };
74
74
  }
75
75
  if (kind === "module") {
76
- const specifier = normalizeOptionalString(step.specifier);
77
- if (!specifier) throw new Error(`${label}.specifier must be a non-empty string`);
76
+ const specifier = normalizeOptionalString(step.target);
77
+ if (!specifier) throw new Error(`${label}.target must be a non-empty string`);
78
78
  return {
79
79
  kind,
80
80
  specifier,
@@ -118,7 +118,8 @@ export function collectConfiguredInputs(productDir, { inputs = [], steps = [] }
118
118
  collected.add(resolveConfiguredPath(productDir, step.cwd, step.path));
119
119
  }
120
120
  if (step.kind === "module") {
121
- const { modulePath } = parseModuleSpecifier(step.specifier);
121
+ const moduleRef = step.specifier || step.target;
122
+ const { modulePath } = parseModuleSpecifier(moduleRef);
122
123
  const candidatePath = resolveConfiguredPath(productDir, step.cwd, modulePath);
123
124
  if (modulePath.startsWith("@elench/testkit") || fs.existsSync(candidatePath)) {
124
125
  if (!modulePath.startsWith("@elench/testkit")) {
@@ -138,7 +139,7 @@ export function collectConfiguredInputs(productDir, { inputs = [], steps = [] }
138
139
  export function summarizeConfiguredStep(step) {
139
140
  if (step.kind === "command") return `command: ${String(step.cmd).trim()}`;
140
141
  if (step.kind === "sql-file") return `sql: ${step.path}`;
141
- if (step.kind === "module") return `module: ${step.specifier}`;
142
+ if (step.kind === "module") return `module: ${step.specifier || step.target}`;
142
143
  return step.kind;
143
144
  }
144
145
 
@@ -174,7 +175,8 @@ export function validateConfiguredCollection({ productDir, label, inputs = [], s
174
175
  ensureExistingPath(resolveConfiguredPath(productDir, step.cwd, step.path), `${label} sql file`);
175
176
  }
176
177
  if (step.kind === "module") {
177
- const { modulePath } = parseModuleSpecifier(step.specifier);
178
+ const moduleRef = step.specifier || step.target;
179
+ const { modulePath } = parseModuleSpecifier(moduleRef);
178
180
  const candidatePath = resolveConfiguredPath(productDir, step.cwd, modulePath);
179
181
  if (modulePath.startsWith("@elench/testkit")) {
180
182
  // Internal testkit module steps are resolved by the runtime alias map.
@@ -22,7 +22,7 @@ afterEach(() => {
22
22
  describe("shared configured steps", () => {
23
23
  it("normalizes and finalizes configured steps", () => {
24
24
  const normalized = normalizeConfiguredStep(
25
- { kind: "module", specifier: "./seed.mjs#run", cwd: "db", inputs: ["schema.sql"] },
25
+ { kind: "module", target: "./seed.mjs#run", cwd: "db", inputs: ["schema.sql"] },
26
26
  'Service "api" database.template.seed[0]'
27
27
  );
28
28
 
@@ -55,7 +55,7 @@ describe("shared configured steps", () => {
55
55
  inputs: ["db/schema.sql"],
56
56
  steps: [
57
57
  { kind: "sql-file", path: "schema.sql", cwd: "db", inputs: [] },
58
- { kind: "module", specifier: "./seed.mjs#run", cwd: "db", inputs: [] },
58
+ { kind: "module", target: "./seed.mjs#run", cwd: "db", inputs: [] },
59
59
  ],
60
60
  };
61
61
 
@@ -82,7 +82,7 @@ describe("shared configured steps", () => {
82
82
  steps: [
83
83
  {
84
84
  kind: "module",
85
- specifier: "@elench/testkit/config/next-runtime-tsconfig#writeNextRuntimeTsconfig",
85
+ target: "@elench/testkit/config/next-runtime-tsconfig#writeNextRuntimeTsconfig",
86
86
  cwd: "frontend",
87
87
  inputs: [],
88
88
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elench/next-analysis",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "SWC-backed Next.js source analysis primitives for Erench tools",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elench/testkit-bridge",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "Browser bridge helpers for testkit",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "typecheck": "tsc -p tsconfig.json --noEmit"
23
23
  },
24
24
  "dependencies": {
25
- "@elench/testkit-protocol": "0.1.76"
25
+ "@elench/testkit-protocol": "0.1.78"
26
26
  },
27
27
  "private": false
28
28
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elench/testkit-protocol",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "Shared browser protocol for testkit bridge and extension consumers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elench/ts-analysis",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "TypeScript compiler-backed source analysis primitives for Erench tools",
5
5
  "type": "module",
6
6
  "exports": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elench/testkit",
3
- "version": "0.1.76",
3
+ "version": "0.1.78",
4
4
  "description": "CLI for discovering and running local HTTP, DAL, and Playwright test suites",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -81,10 +81,10 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@babel/code-frame": "^7.29.0",
84
- "@elench/next-analysis": "0.1.76",
85
- "@elench/testkit-bridge": "0.1.76",
86
- "@elench/testkit-protocol": "0.1.76",
87
- "@elench/ts-analysis": "0.1.76",
84
+ "@elench/next-analysis": "0.1.78",
85
+ "@elench/testkit-bridge": "0.1.78",
86
+ "@elench/testkit-protocol": "0.1.78",
87
+ "@elench/ts-analysis": "0.1.78",
88
88
  "@oclif/core": "^4.10.6",
89
89
  "esbuild": "^0.25.11",
90
90
  "execa": "^9.5.0",