jbs-client 0.0.5 → 0.0.7
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 +7 -7
- package/postinstall.mjs +14 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jbs-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "JBS Client terminal UI powered by OpenTUI",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
"postinstall": "node ./postinstall.mjs"
|
|
13
13
|
},
|
|
14
14
|
"optionalDependencies": {
|
|
15
|
-
"jbs-client-windows-x64": "0.0.
|
|
16
|
-
"jbs-client-windows-arm64": "0.0.
|
|
17
|
-
"jbs-client-linux-x64": "0.0.
|
|
18
|
-
"jbs-client-linux-arm64": "0.0.
|
|
19
|
-
"jbs-client-darwin-x64": "0.0.
|
|
20
|
-
"jbs-client-darwin-arm64": "0.0.
|
|
15
|
+
"jbs-client-windows-x64": "0.0.7",
|
|
16
|
+
"jbs-client-windows-arm64": "0.0.7",
|
|
17
|
+
"jbs-client-linux-x64": "0.0.7",
|
|
18
|
+
"jbs-client-linux-arm64": "0.0.7",
|
|
19
|
+
"jbs-client-darwin-x64": "0.0.7",
|
|
20
|
+
"jbs-client-darwin-arm64": "0.0.7"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -28,11 +28,21 @@ function detectPackageName() {
|
|
|
28
28
|
|
|
29
29
|
function findBinary() {
|
|
30
30
|
const { packageName, binaryName } = detectPackageName()
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
let current = __dirname
|
|
32
|
+
|
|
33
|
+
for (;;) {
|
|
34
|
+
const modulesDir = path.join(current, "node_modules")
|
|
35
|
+
const candidate = path.join(modulesDir, packageName, "bin", binaryName)
|
|
36
|
+
if (fs.existsSync(candidate)) {
|
|
37
|
+
return candidate
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const parent = path.dirname(current)
|
|
41
|
+
if (parent === current) {
|
|
42
|
+
throw new Error(`Missing binary package ${packageName}`)
|
|
43
|
+
}
|
|
44
|
+
current = parent
|
|
34
45
|
}
|
|
35
|
-
return candidate
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
function main() {
|