repomap-bin 2.6.0 → 2.7.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.
- package/package.json +2 -2
- package/repomap.js +16 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repomap-bin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Standalone repomap binary — tree-sitter AST code intelligence CLI",
|
|
5
5
|
"bin": {
|
|
6
6
|
"repomap": "repomap.js"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"repomap.js"
|
|
10
10
|
],
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"@gjczone/repomap-linux-x64": "2.
|
|
12
|
+
"@gjczone/repomap-linux-x64": "2.7.0"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
15
15
|
"repomap",
|
package/repomap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const {
|
|
2
|
+
const { spawn } = require('child_process');
|
|
3
3
|
const path = require('path');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
|
|
@@ -29,5 +29,18 @@ if (!binPath) {
|
|
|
29
29
|
process.exit(1);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
const
|
|
33
|
-
|
|
32
|
+
const child = spawn(binPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
33
|
+
|
|
34
|
+
// Handle spawn failure (binary not found, no execute permission, etc.)
|
|
35
|
+
child.on('error', (err) => {
|
|
36
|
+
console.error('repomap: failed to start binary:', err.message);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Forward signals to child process so Ctrl+C works
|
|
41
|
+
process.on('SIGINT', () => { child.kill('SIGINT'); });
|
|
42
|
+
process.on('SIGTERM', () => { child.kill('SIGTERM'); });
|
|
43
|
+
|
|
44
|
+
child.on('close', (code) => {
|
|
45
|
+
process.exit(code !== null ? code : 1);
|
|
46
|
+
});
|