@antinomyhq/forge 0.51.2 → 0.51.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/forge.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const { join } = require('path');
4
- const { spawnSync } = require('child_process');
4
+ const { spawn } = require('child_process');
5
5
  const { existsSync } = require('fs');
6
6
 
7
7
  // Get the correct binary extension based on platform
@@ -21,10 +21,20 @@ if (!existsSync(forgeBinaryPath)) {
21
21
  }
22
22
 
23
23
  // Execute the binary with the same arguments
24
- const result = spawnSync(forgeBinaryPath, process.argv.slice(2), {
24
+ const forgeProcess = spawn(forgeBinaryPath, process.argv.slice(2), {
25
25
  stdio: 'inherit',
26
26
  shell: process.platform === 'win32' // Use shell on Windows
27
27
  });
28
28
 
29
- // Exit with the same code as the binary
30
- process.exit(result.status);
29
+ // Pass through SIGINT signals to the child process
30
+ process.on('SIGINT', () => {
31
+ // Instead of handling here, forward to the child
32
+ forgeProcess.kill('SIGINT');
33
+ // Don't exit - let the child process determine what happens
34
+ });
35
+
36
+ // Handle process exit
37
+ forgeProcess.on('exit', (code) => {
38
+ // Only exit with code when the child actually exits
39
+ process.exit(code || 0);
40
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antinomyhq/forge",
3
- "version": "0.51.2",
3
+ "version": "0.51.4",
4
4
  "description": "Code Forge CLI - an AI-powered coding assistant",
5
5
  "bin": {
6
6
  "forge": "forge.js"