@gherkle/runner 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.
Files changed (59) hide show
  1. package/README.md +482 -0
  2. package/bin/gherkle-runner.js +111 -0
  3. package/dist/__tests__/agent-executor-selection.test.d.ts +15 -0
  4. package/dist/__tests__/agent-executor-selection.test.d.ts.map +1 -0
  5. package/dist/__tests__/agent-executor-selection.test.js +192 -0
  6. package/dist/__tests__/agent-executor-selection.test.js.map +1 -0
  7. package/dist/__tests__/envelope-mapper.test.d.ts +17 -0
  8. package/dist/__tests__/envelope-mapper.test.d.ts.map +1 -0
  9. package/dist/__tests__/envelope-mapper.test.js +217 -0
  10. package/dist/__tests__/envelope-mapper.test.js.map +1 -0
  11. package/dist/__tests__/gherkin-parser.test.d.ts +2 -0
  12. package/dist/__tests__/gherkin-parser.test.d.ts.map +1 -0
  13. package/dist/__tests__/gherkin-parser.test.js +375 -0
  14. package/dist/__tests__/gherkin-parser.test.js.map +1 -0
  15. package/dist/__tests__/integration-fork.test.d.ts +16 -0
  16. package/dist/__tests__/integration-fork.test.d.ts.map +1 -0
  17. package/dist/__tests__/integration-fork.test.js +141 -0
  18. package/dist/__tests__/integration-fork.test.js.map +1 -0
  19. package/dist/__tests__/tmpdir-materialization.test.d.ts +18 -0
  20. package/dist/__tests__/tmpdir-materialization.test.d.ts.map +1 -0
  21. package/dist/__tests__/tmpdir-materialization.test.js +177 -0
  22. package/dist/__tests__/tmpdir-materialization.test.js.map +1 -0
  23. package/dist/agent.d.ts +71 -0
  24. package/dist/agent.d.ts.map +1 -0
  25. package/dist/agent.js +312 -0
  26. package/dist/agent.js.map +1 -0
  27. package/dist/config.d.ts +31 -0
  28. package/dist/config.d.ts.map +1 -0
  29. package/dist/config.js +165 -0
  30. package/dist/config.js.map +1 -0
  31. package/dist/frameworks/cucumber-subprocess.d.ts +129 -0
  32. package/dist/frameworks/cucumber-subprocess.d.ts.map +1 -0
  33. package/dist/frameworks/cucumber-subprocess.js +469 -0
  34. package/dist/frameworks/cucumber-subprocess.js.map +1 -0
  35. package/dist/frameworks/playwright.d.ts +22 -0
  36. package/dist/frameworks/playwright.d.ts.map +1 -0
  37. package/dist/frameworks/playwright.js +234 -0
  38. package/dist/frameworks/playwright.js.map +1 -0
  39. package/dist/gherkin-parser.d.ts +22 -0
  40. package/dist/gherkin-parser.d.ts.map +1 -0
  41. package/dist/gherkin-parser.js +148 -0
  42. package/dist/gherkin-parser.js.map +1 -0
  43. package/dist/index.d.ts +10 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +31 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/step-registry.d.ts +30 -0
  48. package/dist/step-registry.d.ts.map +1 -0
  49. package/dist/step-registry.js +160 -0
  50. package/dist/step-registry.js.map +1 -0
  51. package/dist/types.d.ts +117 -0
  52. package/dist/types.d.ts.map +1 -0
  53. package/dist/types.js +6 -0
  54. package/dist/types.js.map +1 -0
  55. package/dist/workers/cucumber-worker.d.ts +29 -0
  56. package/dist/workers/cucumber-worker.d.ts.map +1 -0
  57. package/dist/workers/cucumber-worker.js +191 -0
  58. package/dist/workers/cucumber-worker.js.map +1 -0
  59. package/package.json +74 -0
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.StepRegistry = void 0;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ class StepRegistry {
40
+ steps = [];
41
+ register(keyword, pattern, fn, source = "inline") {
42
+ this.steps.push({ keyword, pattern, fn, source });
43
+ }
44
+ findMatch(keyword, text) {
45
+ const effectiveKeyword = this.resolveKeyword(keyword);
46
+ for (const step of this.steps) {
47
+ if (step.keyword !== effectiveKeyword && effectiveKeyword !== "Any")
48
+ continue;
49
+ const match = step.pattern.exec(text);
50
+ if (match) {
51
+ return {
52
+ definition: step,
53
+ args: match.slice(1),
54
+ };
55
+ }
56
+ }
57
+ // Also try matching without keyword constraint (And/But inherit from previous)
58
+ for (const step of this.steps) {
59
+ const match = step.pattern.exec(text);
60
+ if (match) {
61
+ return {
62
+ definition: step,
63
+ args: match.slice(1),
64
+ };
65
+ }
66
+ }
67
+ return null;
68
+ }
69
+ resolveKeyword(keyword) {
70
+ switch (keyword) {
71
+ case "Given":
72
+ return "Given";
73
+ case "When":
74
+ return "When";
75
+ case "Then":
76
+ return "Then";
77
+ case "And":
78
+ case "But":
79
+ return "Any";
80
+ default:
81
+ return "Any";
82
+ }
83
+ }
84
+ get count() {
85
+ return this.steps.length;
86
+ }
87
+ async loadFromDirectory(dirPath) {
88
+ const absolutePath = path.resolve(process.cwd(), dirPath);
89
+ if (!fs.existsSync(absolutePath)) {
90
+ console.warn(`Step definitions directory not found: ${absolutePath}`);
91
+ return;
92
+ }
93
+ const files = this.findStepFiles(absolutePath);
94
+ for (const file of files) {
95
+ try {
96
+ await this.loadStepFile(file);
97
+ }
98
+ catch (err) {
99
+ const error = err instanceof Error ? err : new Error(String(err));
100
+ console.error(`Failed to load step file ${file}: ${error.message}`);
101
+ }
102
+ }
103
+ console.log(`Loaded ${this.steps.length} step definitions from ${files.length} files`);
104
+ }
105
+ findStepFiles(dirPath) {
106
+ const files = [];
107
+ const entries = fs.readdirSync(dirPath, { withFileTypes: true });
108
+ for (const entry of entries) {
109
+ const fullPath = path.join(dirPath, entry.name);
110
+ if (entry.isDirectory()) {
111
+ files.push(...this.findStepFiles(fullPath));
112
+ }
113
+ else if (entry.name.endsWith(".steps.ts") ||
114
+ entry.name.endsWith(".steps.js") ||
115
+ entry.name.endsWith(".step.ts") ||
116
+ entry.name.endsWith(".step.js") ||
117
+ entry.name.endsWith("_steps.ts") ||
118
+ entry.name.endsWith("_steps.js")) {
119
+ files.push(fullPath);
120
+ }
121
+ }
122
+ return files;
123
+ }
124
+ async loadStepFile(filePath) {
125
+ // Step files export functions that register steps when called with the registry
126
+ // Pattern: module.exports = function(registry) { registry.Given(/pattern/, fn) }
127
+ // Or: export default function(registry) { registry.Given(/pattern/, fn) }
128
+ try {
129
+ const loaded = require(filePath);
130
+ const registrar = loaded.default || loaded;
131
+ if (typeof registrar === "function") {
132
+ const helpers = {
133
+ Given: (pattern, fn) => this.register("Given", pattern, fn, filePath),
134
+ When: (pattern, fn) => this.register("When", pattern, fn, filePath),
135
+ Then: (pattern, fn) => this.register("Then", pattern, fn, filePath),
136
+ };
137
+ registrar(helpers);
138
+ }
139
+ else if (typeof registrar === "object" && registrar !== null) {
140
+ // Object with step definitions as properties
141
+ for (const [, value] of Object.entries(registrar)) {
142
+ if (typeof value === "function") {
143
+ const helpers = {
144
+ Given: (pattern, fn) => this.register("Given", pattern, fn, filePath),
145
+ When: (pattern, fn) => this.register("When", pattern, fn, filePath),
146
+ Then: (pattern, fn) => this.register("Then", pattern, fn, filePath),
147
+ };
148
+ value(helpers);
149
+ }
150
+ }
151
+ }
152
+ }
153
+ catch {
154
+ // If require fails (e.g., TypeScript file), try to load as a simple module
155
+ console.warn(`Could not load step file: ${filePath} (may need compilation)`);
156
+ }
157
+ }
158
+ }
159
+ exports.StepRegistry = StepRegistry;
160
+ //# sourceMappingURL=step-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-registry.js","sourceRoot":"","sources":["../src/step-registry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAwB7B,MAAa,YAAY;IACf,KAAK,GAAqB,EAAE,CAAC;IAErC,QAAQ,CACN,OAAkC,EAClC,OAAe,EACf,EAAgB,EAChB,MAAM,GAAG,QAAQ;QAEjB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,SAAS,CACP,OAAe,EACf,IAAY;QAEZ,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAEtD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,IAAI,CAAC,OAAO,KAAK,gBAAgB,IAAI,gBAAgB,KAAK,KAAK;gBACjE,SAAS;YAEX,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtC,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO;oBACL,UAAU,EAAE,IAAI;oBAChB,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;iBACrB,CAAC;YACJ,CAAC;QACH,CAAC;QAED,+EAA+E;QAC/E,KAAK,MAAM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,EAAE,EAAgB,EAAE,EAAE,CAC1C,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,CAAC;4BAC9C,IAAI,EAAE,CAAC,OAAe,EAAE,EAAgB,EAAE,EAAE,CAC1C,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,CAAC;yBAC/C,CAAC;wBACD,KAAqC,CAAC,OAAO,CAAC,CAAC;oBAClD,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,2EAA2E;YAC3E,OAAO,CAAC,IAAI,CACV,6BAA6B,QAAQ,yBAAyB,CAC/D,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA1JD,oCA0JC"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Type definitions for @gherkle/runner
3
+ */
4
+ export type RunnerStatus = 'online' | 'offline' | 'busy' | 'error';
5
+ export type TestStatus = 'pending' | 'running' | 'passed' | 'failed' | 'skipped';
6
+ export type Framework = 'playwright' | 'cypress' | 'cucumber';
7
+ export interface StepResult {
8
+ keyword: 'Given' | 'When' | 'Then' | 'And' | 'But';
9
+ text: string;
10
+ status: TestStatus;
11
+ durationMs?: number;
12
+ error?: string;
13
+ }
14
+ export interface ScenarioResult {
15
+ scenarioId: string;
16
+ scenarioName: string;
17
+ featureId: string;
18
+ status: TestStatus;
19
+ durationMs?: number;
20
+ steps: StepResult[];
21
+ error?: {
22
+ message: string;
23
+ stack?: string;
24
+ };
25
+ artifacts?: ArtifactInfo[];
26
+ }
27
+ export interface ArtifactInfo {
28
+ type: 'screenshot' | 'video' | 'trace' | 'log';
29
+ name: string;
30
+ path: string;
31
+ stepName?: string;
32
+ }
33
+ export interface RunSummary {
34
+ total: number;
35
+ passed: number;
36
+ failed: number;
37
+ skipped: number;
38
+ durationMs: number;
39
+ }
40
+ export interface FeatureContent {
41
+ id: string;
42
+ name: string;
43
+ path: string;
44
+ content: string;
45
+ }
46
+ export interface GeneratedStepDef {
47
+ featureId: string;
48
+ filename: string;
49
+ content: string;
50
+ language: 'typescript' | 'javascript';
51
+ }
52
+ export interface TestConfig {
53
+ framework: Framework;
54
+ language: string;
55
+ stepDefinitionsPath: string;
56
+ supportFilesPath: string;
57
+ config: Record<string, unknown>;
58
+ }
59
+ export type RunnerMessage = {
60
+ type: 'heartbeat';
61
+ status: RunnerStatus;
62
+ currentRun?: string;
63
+ } | {
64
+ type: 'run:started';
65
+ runId: string;
66
+ } | {
67
+ type: 'scenario:started';
68
+ runId: string;
69
+ scenarioId: string;
70
+ scenarioName: string;
71
+ featureName: string;
72
+ } | {
73
+ type: 'step:completed';
74
+ runId: string;
75
+ scenarioId: string;
76
+ step: StepResult;
77
+ } | {
78
+ type: 'scenario:completed';
79
+ runId: string;
80
+ scenarioId: string;
81
+ status: TestStatus;
82
+ durationMs: number;
83
+ error?: string;
84
+ } | {
85
+ type: 'run:completed';
86
+ runId: string;
87
+ summary: RunSummary;
88
+ } | {
89
+ type: 'artifact:upload';
90
+ runId: string;
91
+ scenarioId?: string;
92
+ artifact: ArtifactInfo;
93
+ } | {
94
+ type: 'error';
95
+ runId?: string;
96
+ message: string;
97
+ };
98
+ export type ServerMessage = {
99
+ type: 'connected';
100
+ runnerId: string;
101
+ } | {
102
+ type: 'ack';
103
+ } | {
104
+ type: 'execute';
105
+ runId: string;
106
+ features: FeatureContent[];
107
+ stepDefinitions: GeneratedStepDef[];
108
+ env: Record<string, string>;
109
+ config: TestConfig;
110
+ } | {
111
+ type: 'cancel';
112
+ runId: string;
113
+ } | {
114
+ type: 'error';
115
+ message: string;
116
+ };
117
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEn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;CAAE,GAC7D;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,CAAA;CAAE,GACvF;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GACf;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,cAAc,EAAE,CAAC;IAG3B,eAAe,EAAE,gBAAgB,EAAE,CAAC;IAEpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,UAAU,CAAC;CACpB,GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Type definitions for @gherkle/runner
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * cucumber-worker.ts — forked child process that runs Cucumber.js against a
3
+ * prepared temp project and streams envelope events back to the parent over
4
+ * IPC.
5
+ *
6
+ * Layout the parent (cucumber-subprocess.ts) prepares before fork:
7
+ *
8
+ * <tmpdir>/
9
+ * features/<feature_id>.feature
10
+ * steps/<filename> (AI-generated, .js or .ts)
11
+ * support/world.js (default World shim — exposes this.page etc.)
12
+ * cucumber.cjs (config: feature glob, requireModule, format)
13
+ *
14
+ * IPC contract with parent:
15
+ * parent → child: nothing after fork (config lives in tmpdir)
16
+ * child → parent:
17
+ * { kind: 'envelope', envelope: <Cucumber Envelope> } per envelope
18
+ * { kind: 'done', success: boolean } on clean exit
19
+ * { kind: 'fatal', message: string } on infra failure
20
+ *
21
+ * Lifecycle:
22
+ * - argv[2] is the tmpdir path.
23
+ * - We do NOT process.exit() after `done` — we let the event loop drain so
24
+ * in-flight async messages reach the parent first. The parent's
25
+ * 'message' listener for 'done' resolves and proceeds.
26
+ * - Cancel is handled in the parent via SIGTERM (and SIGKILL fallback).
27
+ */
28
+ export {};
29
+ //# sourceMappingURL=cucumber-worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cucumber-worker.d.ts","sourceRoot":"","sources":["../../src/workers/cucumber-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG"}
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ /**
3
+ * cucumber-worker.ts — forked child process that runs Cucumber.js against a
4
+ * prepared temp project and streams envelope events back to the parent over
5
+ * IPC.
6
+ *
7
+ * Layout the parent (cucumber-subprocess.ts) prepares before fork:
8
+ *
9
+ * <tmpdir>/
10
+ * features/<feature_id>.feature
11
+ * steps/<filename> (AI-generated, .js or .ts)
12
+ * support/world.js (default World shim — exposes this.page etc.)
13
+ * cucumber.cjs (config: feature glob, requireModule, format)
14
+ *
15
+ * IPC contract with parent:
16
+ * parent → child: nothing after fork (config lives in tmpdir)
17
+ * child → parent:
18
+ * { kind: 'envelope', envelope: <Cucumber Envelope> } per envelope
19
+ * { kind: 'done', success: boolean } on clean exit
20
+ * { kind: 'fatal', message: string } on infra failure
21
+ *
22
+ * Lifecycle:
23
+ * - argv[2] is the tmpdir path.
24
+ * - We do NOT process.exit() after `done` — we let the event loop drain so
25
+ * in-flight async messages reach the parent first. The parent's
26
+ * 'message' listener for 'done' resolves and proceeds.
27
+ * - Cancel is handled in the parent via SIGTERM (and SIGKILL fallback).
28
+ */
29
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
30
+ if (k2 === undefined) k2 = k;
31
+ var desc = Object.getOwnPropertyDescriptor(m, k);
32
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
33
+ desc = { enumerable: true, get: function() { return m[k]; } };
34
+ }
35
+ Object.defineProperty(o, k2, desc);
36
+ }) : (function(o, m, k, k2) {
37
+ if (k2 === undefined) k2 = k;
38
+ o[k2] = m[k];
39
+ }));
40
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
41
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
42
+ }) : function(o, v) {
43
+ o["default"] = v;
44
+ });
45
+ var __importStar = (this && this.__importStar) || (function () {
46
+ var ownKeys = function(o) {
47
+ ownKeys = Object.getOwnPropertyNames || function (o) {
48
+ var ar = [];
49
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
50
+ return ar;
51
+ };
52
+ return ownKeys(o);
53
+ };
54
+ return function (mod) {
55
+ if (mod && mod.__esModule) return mod;
56
+ var result = {};
57
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
58
+ __setModuleDefault(result, mod);
59
+ return result;
60
+ };
61
+ })();
62
+ Object.defineProperty(exports, "__esModule", { value: true });
63
+ const path = __importStar(require("node:path"));
64
+ async function main() {
65
+ const tmpdir = process.argv[2];
66
+ if (!tmpdir) {
67
+ safeSendThenExit({ kind: 'fatal', message: 'cucumber-worker: missing tmpdir argv' }, 1);
68
+ return;
69
+ }
70
+ // ts-node is required only when AI-generated step defs are TypeScript.
71
+ // The subprocess parent writes a `.use-ts` marker file in that case.
72
+ // Loading ts-node lazily keeps the JS path's cold-start fast.
73
+ const useTs = await fileExists(path.join(tmpdir, '.use-ts'));
74
+ if (useTs) {
75
+ try {
76
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
77
+ require('ts-node/register/transpile-only');
78
+ }
79
+ catch (err) {
80
+ safeSendThenExit({
81
+ kind: 'fatal',
82
+ message: `cucumber-worker: failed to load ts-node — install it as a runner dep. ${err.message}`,
83
+ }, 1);
84
+ return;
85
+ }
86
+ }
87
+ let runCucumber;
88
+ let loadConfiguration;
89
+ try {
90
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
91
+ const api = require('@cucumber/cucumber/api');
92
+ runCucumber = api.runCucumber;
93
+ loadConfiguration = api.loadConfiguration;
94
+ }
95
+ catch (err) {
96
+ safeSendThenExit({
97
+ kind: 'fatal',
98
+ message: `cucumber-worker: @cucumber/cucumber not installed. ${err.message}`,
99
+ }, 1);
100
+ return;
101
+ }
102
+ try {
103
+ // BOTH calls need cwd: tmpdir. loadConfiguration resolves relative
104
+ // path patterns from the config file (`paths: ['features/**/*.feature']`)
105
+ // against environment.cwd; without it, the glob expands against the
106
+ // runner process's cwd and finds zero features.
107
+ const environment = {
108
+ cwd: tmpdir,
109
+ // Cucumber writes its CLI summary to stdout. Forwarding to the parent
110
+ // keeps the runner's console output coherent; envelopes carry the
111
+ // structured data we actually act on.
112
+ stdout: process.stdout,
113
+ stderr: process.stderr,
114
+ env: process.env,
115
+ };
116
+ // loadConfiguration returns { useConfiguration, runConfiguration }. The
117
+ // runConfiguration field is the one shaped for runCucumber (sources +
118
+ // support + runtime + formats); useConfiguration is the flat IConfiguration
119
+ // form, which runCucumber does NOT accept.
120
+ const { runConfiguration } = await loadConfiguration({ file: path.join(tmpdir, 'cucumber.cjs'), provided: {} }, environment);
121
+ const { success } = await runCucumber(runConfiguration, environment, (envelope) => {
122
+ // Envelopes are small JSON objects (testCase, testCaseStarted,
123
+ // testStepFinished, etc). The parent maps them to runner events.
124
+ safeSend({ kind: 'envelope', envelope });
125
+ });
126
+ safeSend({ kind: 'done', success });
127
+ // Allow IPC drain; the parent's 'done' handler triggers cleanup. Exit
128
+ // naturally once the IPC channel closes.
129
+ }
130
+ catch (err) {
131
+ safeSendThenExit({
132
+ kind: 'fatal',
133
+ message: `cucumber-worker: runCucumber threw — ${err.message}`,
134
+ }, 1);
135
+ }
136
+ }
137
+ function safeSend(msg) {
138
+ if (typeof process.send === 'function') {
139
+ process.send(msg);
140
+ }
141
+ }
142
+ // Flush a final message and exit only after the IPC channel confirms the
143
+ // send. process.send() is async — calling process.exit(N) immediately after
144
+ // can race the OS pipe flush and the parent will see 'exit' with no message.
145
+ // Used for the fatal/done terminal events.
146
+ function safeSendThenExit(msg, code) {
147
+ if (typeof process.send !== 'function') {
148
+ process.exit(code);
149
+ }
150
+ // The send callback fires after Node has handed the data to the OS write
151
+ // buffer; that's sufficient for the parent's 'message' handler to fire
152
+ // before 'exit'. If sending itself errors, exit anyway — better than hang.
153
+ let exited = false;
154
+ const done = () => {
155
+ if (exited)
156
+ return;
157
+ exited = true;
158
+ process.exit(code);
159
+ };
160
+ try {
161
+ process.send(msg, undefined, undefined, (err) => {
162
+ // Ignore err — by the time we're here we're exiting either way.
163
+ void err;
164
+ done();
165
+ });
166
+ }
167
+ catch {
168
+ done();
169
+ }
170
+ // Safety net: if the callback never fires (shouldn't happen but
171
+ // process.send semantics differ across Node versions), exit after 1s.
172
+ setTimeout(done, 1000).unref();
173
+ }
174
+ async function fileExists(p) {
175
+ try {
176
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
177
+ const fs = require('node:fs/promises');
178
+ await fs.access(p);
179
+ return true;
180
+ }
181
+ catch {
182
+ return false;
183
+ }
184
+ }
185
+ main().catch((err) => {
186
+ safeSendThenExit({
187
+ kind: 'fatal',
188
+ message: `cucumber-worker: main() crashed — ${err.message}`,
189
+ }, 1);
190
+ });
191
+ //# sourceMappingURL=cucumber-worker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cucumber-worker.js","sourceRoot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C,OAAO,EAAE;KACvE,EACD,CAAC,CACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@gherkle/runner",
3
+ "version": "0.1.0",
4
+ "description": "Test runner agent for Gherkle - execute Gherkin feature files",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "bin": {
11
+ "gherkle-runner": "./bin/gherkle-runner.js"
12
+ },
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "dev": "tsc --watch",
16
+ "start": "node dist/index.js",
17
+ "lint": "eslint src --ext .ts",
18
+ "test": "vitest run",
19
+ "test:watch": "vitest"
20
+ },
21
+ "keywords": [
22
+ "gherkle",
23
+ "test-runner",
24
+ "gherkin",
25
+ "bdd",
26
+ "cucumber",
27
+ "playwright",
28
+ "cypress"
29
+ ],
30
+ "author": "Gherkle",
31
+ "license": "MIT",
32
+ "dependencies": {
33
+ "@cucumber/cucumber": "^11.3.0",
34
+ "@cucumber/gherkin": "^38.0.0",
35
+ "@cucumber/messages": "^32.0.1",
36
+ "chalk": "^5.3.0",
37
+ "commander": "^11.1.0",
38
+ "ora": "^8.0.1",
39
+ "ts-node": "^10.9.2",
40
+ "ws": "^8.16.0"
41
+ },
42
+ "peerDependencies": {
43
+ "@playwright/test": "^1.58.2",
44
+ "playwright-core": "^1.58.2"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "@playwright/test": { "optional": false },
48
+ "playwright-core": { "optional": false }
49
+ },
50
+ "devDependencies": {
51
+ "@playwright/test": "^1.58.2",
52
+ "@types/node": "^20.10.0",
53
+ "@types/ws": "^8.5.10",
54
+ "playwright-core": "^1.58.2",
55
+ "typescript": "^5.3.0",
56
+ "vitest": "^4.0.18"
57
+ },
58
+ "engines": {
59
+ "node": ">=18.0.0"
60
+ },
61
+ "files": [
62
+ "dist",
63
+ "bin"
64
+ ],
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "git+https://github.com/rvasqz86/gherkle-monorepo.git",
68
+ "directory": "packages/runner"
69
+ },
70
+ "bugs": {
71
+ "url": "https://github.com/rvasqz86/gherkle-monorepo/issues"
72
+ },
73
+ "homepage": "https://github.com/rvasqz86/gherkle-monorepo/tree/main/packages/runner#readme"
74
+ }