repomap-bin 2.0.0 → 2.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.
- package/index.js +9 -2
- package/package.json +5 -5
- package/run.js +9 -2
package/index.js
CHANGED
|
@@ -7,7 +7,13 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
7
7
|
function findBinary() {
|
|
8
8
|
const platform = process.platform;
|
|
9
9
|
const arch = process.arch;
|
|
10
|
+
const binName = platform === "win32" ? "repomap.exe" : "repomap";
|
|
11
|
+
|
|
12
|
+
// 1. Check repo dist/ directory (local development)
|
|
13
|
+
const repoBin = join(__dirname, "..", "..", "dist", binName);
|
|
14
|
+
if (existsSync(repoBin)) return repoBin;
|
|
10
15
|
|
|
16
|
+
// 2. Check npm platform packages
|
|
11
17
|
const platformPackages = {
|
|
12
18
|
"linux-x64": { pkg: "repomap-bin-linux-x64", bin: "repomap" },
|
|
13
19
|
"darwin-arm64": { pkg: "repomap-bin-darwin-arm64", bin: "repomap" },
|
|
@@ -21,11 +27,12 @@ function findBinary() {
|
|
|
21
27
|
if (existsSync(candidate)) return candidate;
|
|
22
28
|
}
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
// 3. Vendor fallback
|
|
25
31
|
const fallback = join(__dirname, "vendor", binName);
|
|
26
32
|
if (existsSync(fallback)) return fallback;
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
// 4. PATH fallback
|
|
35
|
+
return binName;
|
|
29
36
|
}
|
|
30
37
|
|
|
31
38
|
export function getBinaryPath() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repomap-bin",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Standalone repomap binary
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Standalone repomap binary \u2014 tree-sitter AST code intelligence CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"repomap": "./run.js"
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"index.js"
|
|
12
12
|
],
|
|
13
13
|
"optionalDependencies": {
|
|
14
|
-
"repomap-bin-linux-x64": "1.0
|
|
15
|
-
"repomap-bin-darwin-arm64": "1.0
|
|
16
|
-
"repomap-bin-windows-x64": "1.0
|
|
14
|
+
"repomap-bin-linux-x64": "2.1.0",
|
|
15
|
+
"repomap-bin-darwin-arm64": "2.1.0",
|
|
16
|
+
"repomap-bin-windows-x64": "2.1.0"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=18"
|
package/run.js
CHANGED
|
@@ -8,7 +8,13 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
|
8
8
|
function findBinary() {
|
|
9
9
|
const platform = process.platform;
|
|
10
10
|
const arch = process.arch;
|
|
11
|
+
const binName = platform === "win32" ? "repomap.exe" : "repomap";
|
|
12
|
+
|
|
13
|
+
// 1. Check repo dist/ directory (local development)
|
|
14
|
+
const repoBin = join(__dirname, "..", "..", "dist", binName);
|
|
15
|
+
if (existsSync(repoBin)) return repoBin;
|
|
11
16
|
|
|
17
|
+
// 2. Check npm platform packages
|
|
12
18
|
const platformPackages = {
|
|
13
19
|
"linux-x64": { pkg: "repomap-bin-linux-x64", bin: "repomap" },
|
|
14
20
|
"darwin-arm64": { pkg: "repomap-bin-darwin-arm64", bin: "repomap" },
|
|
@@ -22,11 +28,12 @@ function findBinary() {
|
|
|
22
28
|
if (existsSync(candidate)) return candidate;
|
|
23
29
|
}
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
// 3. Vendor fallback
|
|
26
32
|
const fallback = join(__dirname, "vendor", binName);
|
|
27
33
|
if (existsSync(fallback)) return fallback;
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
// 4. PATH fallback
|
|
36
|
+
return binName;
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
const binaryPath = findBinary();
|