@just-every/code 0.2.124 → 0.2.125
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/coder.js +13 -7
- package/package.json +6 -6
package/bin/coder.js
CHANGED
|
@@ -225,9 +225,17 @@ const tryBootstrapBinary = async () => {
|
|
|
225
225
|
return httpsDownload(url, tmp)
|
|
226
226
|
.then(() => {
|
|
227
227
|
if (isWin) {
|
|
228
|
+
// Extract zip with robust fallbacks and use a safe temp dir, then move to cache
|
|
228
229
|
try {
|
|
229
|
-
const
|
|
230
|
-
|
|
230
|
+
const sysRoot = process.env.SystemRoot || process.env.windir || 'C:\\\Windows';
|
|
231
|
+
const psFull = path.join(sysRoot, 'System32', 'WindowsPowerShell', 'v1.0', 'powershell.exe');
|
|
232
|
+
const unzipDest = getCacheDir(version); // extract directly to cache location
|
|
233
|
+
const psCmd = `Expand-Archive -Path '${tmp}' -DestinationPath '${unzipDest}' -Force`;
|
|
234
|
+
let ok = false;
|
|
235
|
+
try { execSync(`"${psFull}" -NoProfile -NonInteractive -Command "${psCmd}"`, { stdio: 'ignore' }); ok = true; } catch {}
|
|
236
|
+
if (!ok) { try { execSync(`powershell -NoProfile -NonInteractive -Command "${psCmd}"`, { stdio: 'ignore' }); ok = true; } catch {} }
|
|
237
|
+
if (!ok) { try { execSync(`pwsh -NoProfile -NonInteractive -Command "${psCmd}"`, { stdio: 'ignore' }); ok = true; } catch {} }
|
|
238
|
+
if (!ok) { execSync(`tar -xf "${tmp}" -C "${unzipDest}"`, { stdio: 'ignore', shell: true }); }
|
|
231
239
|
} catch (e) {
|
|
232
240
|
throw new Error(`failed to unzip: ${e.message}`);
|
|
233
241
|
} finally { try { unlinkSync(tmp); } catch {} }
|
|
@@ -242,12 +250,10 @@ const tryBootstrapBinary = async () => {
|
|
|
242
250
|
try { unlinkSync(tmp); } catch {}
|
|
243
251
|
}
|
|
244
252
|
}
|
|
245
|
-
// On Windows,
|
|
253
|
+
// On Windows, the file was extracted directly into the cache dir
|
|
246
254
|
if (platform === "win32") {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
} catch {}
|
|
250
|
-
try { unlinkSync(binaryPath); } catch {}
|
|
255
|
+
// Ensure the expected filename exists in cache; Expand-Archive extracts exact name
|
|
256
|
+
// No action required here; validation occurs below against cachePath
|
|
251
257
|
} else {
|
|
252
258
|
try { copyFileSync(binaryPath, cachePath); } catch {}
|
|
253
259
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@just-every/code",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.125",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lightweight coding agent that runs in your terminal - fork of OpenAI Codex",
|
|
6
6
|
"bin": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"prettier": "^3.3.3"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@just-every/code-darwin-arm64": "0.2.
|
|
39
|
-
"@just-every/code-darwin-x64": "0.2.
|
|
40
|
-
"@just-every/code-linux-x64-musl": "0.2.
|
|
41
|
-
"@just-every/code-linux-arm64-musl": "0.2.
|
|
42
|
-
"@just-every/code-win32-x64": "0.2.
|
|
38
|
+
"@just-every/code-darwin-arm64": "0.2.125",
|
|
39
|
+
"@just-every/code-darwin-x64": "0.2.125",
|
|
40
|
+
"@just-every/code-linux-x64-musl": "0.2.125",
|
|
41
|
+
"@just-every/code-linux-arm64-musl": "0.2.125",
|
|
42
|
+
"@just-every/code-win32-x64": "0.2.125"
|
|
43
43
|
}
|
|
44
44
|
}
|