codeplane-ai 27.4.4 → 27.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/bin/codeplane +18 -9
- package/package.json +13 -13
package/bin/codeplane
CHANGED
|
@@ -5,9 +5,12 @@ const fs = require("fs")
|
|
|
5
5
|
const path = require("path")
|
|
6
6
|
const os = require("os")
|
|
7
7
|
|
|
8
|
-
function run(target) {
|
|
8
|
+
function run(target, binDir) {
|
|
9
|
+
const env = { ...process.env }
|
|
10
|
+
if (binDir) env.CODEPLANE_BIN_DIR = binDir
|
|
9
11
|
const result = childProcess.spawnSync(target, process.argv.slice(2), {
|
|
10
12
|
stdio: "inherit",
|
|
13
|
+
env,
|
|
11
14
|
})
|
|
12
15
|
if (result.error) {
|
|
13
16
|
console.error(result.error.message)
|
|
@@ -19,18 +22,12 @@ function run(target) {
|
|
|
19
22
|
|
|
20
23
|
const envPath = process.env.CODEPLANE_BIN_PATH
|
|
21
24
|
if (envPath) {
|
|
22
|
-
run(envPath)
|
|
25
|
+
run(envPath, path.dirname(envPath))
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
const scriptPath = fs.realpathSync(__filename)
|
|
26
29
|
const scriptDir = path.dirname(scriptPath)
|
|
27
30
|
|
|
28
|
-
//
|
|
29
|
-
const cached = path.join(scriptDir, ".codeplane")
|
|
30
|
-
if (fs.existsSync(cached)) {
|
|
31
|
-
run(cached)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
31
|
const platformMap = {
|
|
35
32
|
darwin: "darwin",
|
|
36
33
|
linux: "linux",
|
|
@@ -176,4 +173,16 @@ if (!resolved) {
|
|
|
176
173
|
process.exit(1)
|
|
177
174
|
}
|
|
178
175
|
|
|
179
|
-
|
|
176
|
+
// Always pass the real platform-package bin dir so the spawned binary can
|
|
177
|
+
// locate sibling assets like runtime/tui/node-main.js, even when an upstream
|
|
178
|
+
// hardlink/copy in scriptDir means process.execPath is somewhere else.
|
|
179
|
+
const realBinDir = path.dirname(resolved)
|
|
180
|
+
|
|
181
|
+
// Use cached hardlink/copy in scriptDir for fast startup, but tell the child
|
|
182
|
+
// where its real assets live via CODEPLANE_BIN_DIR.
|
|
183
|
+
const cached = path.join(scriptDir, ".codeplane")
|
|
184
|
+
if (fs.existsSync(cached)) {
|
|
185
|
+
run(cached, realBinDir)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
run(resolved, realBinDir)
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
|
|
8
8
|
},
|
|
9
|
-
"version": "27.4.
|
|
9
|
+
"version": "27.4.6",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/devinoldenburg/codeplane",
|
|
19
19
|
"optionalDependencies": {
|
|
20
|
-
"codeplane-linux-arm64-musl": "27.4.
|
|
21
|
-
"codeplane-linux-x64": "27.4.
|
|
22
|
-
"codeplane-linux-x64-baseline-musl": "27.4.
|
|
23
|
-
"codeplane-darwin-x64-baseline": "27.4.
|
|
24
|
-
"codeplane-darwin-arm64": "27.4.
|
|
25
|
-
"codeplane-linux-x64-baseline": "27.4.
|
|
26
|
-
"codeplane-windows-arm64": "27.4.
|
|
27
|
-
"codeplane-windows-x64-baseline": "27.4.
|
|
28
|
-
"codeplane-linux-x64-musl": "27.4.
|
|
29
|
-
"codeplane-linux-arm64": "27.4.
|
|
30
|
-
"codeplane-windows-x64": "27.4.
|
|
31
|
-
"codeplane-darwin-x64": "27.4.
|
|
20
|
+
"codeplane-linux-arm64-musl": "27.4.6",
|
|
21
|
+
"codeplane-linux-x64": "27.4.6",
|
|
22
|
+
"codeplane-linux-x64-baseline-musl": "27.4.6",
|
|
23
|
+
"codeplane-darwin-x64-baseline": "27.4.6",
|
|
24
|
+
"codeplane-darwin-arm64": "27.4.6",
|
|
25
|
+
"codeplane-linux-x64-baseline": "27.4.6",
|
|
26
|
+
"codeplane-windows-arm64": "27.4.6",
|
|
27
|
+
"codeplane-windows-x64-baseline": "27.4.6",
|
|
28
|
+
"codeplane-linux-x64-musl": "27.4.6",
|
|
29
|
+
"codeplane-linux-arm64": "27.4.6",
|
|
30
|
+
"codeplane-windows-x64": "27.4.6",
|
|
31
|
+
"codeplane-darwin-x64": "27.4.6"
|
|
32
32
|
}
|
|
33
33
|
}
|