repomap-bin 2.4.5 → 2.4.6

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 CHANGED
@@ -1,23 +1,18 @@
1
1
  {
2
2
  "name": "repomap-bin",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "Standalone repomap binary — tree-sitter AST code intelligence CLI",
5
5
  "bin": {
6
- "repomap": "repomap"
7
- },
8
- "scripts": {
9
- "postinstall": "node install.js"
6
+ "repomap": "repomap.js"
10
7
  },
11
8
  "files": [
12
- "repomap",
13
- "install.js"
14
- ],
15
- "os": [
16
- "linux"
17
- ],
18
- "cpu": [
19
- "x64"
9
+ "repomap.js"
20
10
  ],
11
+ "optionalDependencies": {
12
+ "@gjczone/repomap-linux-x64": "2.4.6",
13
+ "@gjczone/repomap-darwin-arm64": "2.4.6",
14
+ "@gjczone/repomap-windows-x64": "2.4.6"
15
+ },
21
16
  "keywords": [
22
17
  "repomap",
23
18
  "tree-sitter",
package/repomap.js ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ const { spawnSync } = require('child_process');
3
+ const path = require('path');
4
+ const fs = require('fs');
5
+
6
+ const platforms = [
7
+ '@gjczone/repomap-linux-x64',
8
+ '@gjczone/repomap-darwin-arm64',
9
+ '@gjczone/repomap-windows-x64',
10
+ ];
11
+
12
+ let binPath = null;
13
+ for (const pkg of platforms) {
14
+ try {
15
+ const pkgPath = require.resolve(pkg + '/package.json');
16
+ const pkgDir = path.dirname(pkgPath);
17
+ const pkgData = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
18
+ const binName = pkgData.bin.repomap;
19
+ const candidate = path.join(pkgDir, binName);
20
+ if (fs.existsSync(candidate)) {
21
+ binPath = candidate;
22
+ break;
23
+ }
24
+ } catch (e) {
25
+ continue;
26
+ }
27
+ }
28
+
29
+ if (!binPath) {
30
+ console.error('repomap: no platform binary found. Please reinstall repomap-bin.');
31
+ process.exit(1);
32
+ }
33
+
34
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
35
+ process.exit(result.status !== null ? result.status : 1);
package/install.js DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- // Postinstall: ensure the binary is executable
3
- const fs = require('fs');
4
- const path = require('path');
5
- const bin = path.join(__dirname, 'repomap');
6
- try {
7
- fs.chmodSync(bin, 0o755);
8
- } catch (e) {
9
- // binary might not exist during dev; ignore
10
- }
package/repomap DELETED
Binary file