rrce-workflow 0.2.10 → 0.2.14

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.
@@ -1,9 +1,35 @@
1
1
  #!/usr/bin/env node
2
- import { register } from 'node:module';
3
- import { pathToFileURL } from 'node:url';
4
2
 
5
- // Register tsx for TypeScript support
6
- register('tsx/esm', pathToFileURL('./'));
3
+ import { spawn } from 'node:child_process';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { dirname, join } from 'node:path';
7
6
 
8
- // Import and run the main module
9
- import('../src/index.ts');
7
+ // Get the directory of this script
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
10
+
11
+ // Path to tsx in node_modules
12
+ const tsxPath = join(__dirname, '..', 'node_modules', '.bin', 'tsx');
13
+
14
+ // Path to the main TypeScript file
15
+ const mainPath = join(__dirname, '..', 'src', 'index.ts');
16
+
17
+ // Get command line arguments (skip node and script path)
18
+ const args = process.argv.slice(2);
19
+
20
+ // Spawn tsx with the main file and pass through all arguments
21
+ const child = spawn(tsxPath, [mainPath, ...args], {
22
+ stdio: 'inherit',
23
+ cwd: process.cwd(),
24
+ });
25
+
26
+ // Exit with the same code as the child process
27
+ child.on('exit', (code) => {
28
+ process.exit(code ?? 0);
29
+ });
30
+
31
+ // Forward signals
32
+ child.on('error', (err) => {
33
+ console.error('Failed to start:', err.message);
34
+ process.exit(1);
35
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrce-workflow",
3
- "version": "0.2.10",
3
+ "version": "0.2.14",
4
4
  "description": "RRCE-Workflow TUI - Agentic code workflow generator for AI-assisted development",
5
5
  "author": "RRCE Team",
6
6
  "license": "MIT",
@@ -55,4 +55,4 @@
55
55
  "@types/node": "^25.0.3",
56
56
  "typescript": "^5.9.3"
57
57
  }
58
- }
58
+ }