@just-every/code 0.2.50 → 0.2.52
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 +1 -28
- package/package.json +6 -6
package/bin/coder.js
CHANGED
|
@@ -293,34 +293,7 @@ if (existsSync(binaryPath)) {
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
// Lightweight header validation to provide clearer errors before spawn
|
|
296
|
-
|
|
297
|
-
try {
|
|
298
|
-
const st = statSync(p);
|
|
299
|
-
if (!st.isFile() || st.size === 0) {
|
|
300
|
-
return { ok: false, reason: "empty or not a regular file" };
|
|
301
|
-
}
|
|
302
|
-
const fd = openSync(p, "r");
|
|
303
|
-
try {
|
|
304
|
-
const buf = Buffer.alloc(4);
|
|
305
|
-
const n = readSync(fd, buf, 0, 4, 0);
|
|
306
|
-
if (n < 2) return { ok: false, reason: "too short" };
|
|
307
|
-
if (platform === "win32") {
|
|
308
|
-
if (!(buf[0] === 0x4d && buf[1] === 0x5a)) return { ok: false, reason: "invalid PE header (missing MZ)" };
|
|
309
|
-
} else if (platform === "linux" || platform === "android") {
|
|
310
|
-
if (!(buf[0] === 0x7f && buf[1] === 0x45 && buf[2] === 0x4c && buf[3] === 0x46)) return { ok: false, reason: "invalid ELF header" };
|
|
311
|
-
} else if (platform === "darwin") {
|
|
312
|
-
const isMachO = (buf[0] === 0xcf && buf[1] === 0xfa && buf[2] === 0xed && buf[3] === 0xfe) ||
|
|
313
|
-
(buf[0] === 0xca && buf[1] === 0xfe && buf[2] === 0xba && buf[3] === 0xbe);
|
|
314
|
-
if (!isMachO) return { ok: false, reason: "invalid Mach-O header" };
|
|
315
|
-
}
|
|
316
|
-
} finally {
|
|
317
|
-
closeSync(fd);
|
|
318
|
-
}
|
|
319
|
-
return { ok: true };
|
|
320
|
-
} catch (e) {
|
|
321
|
-
return { ok: false, reason: e.message };
|
|
322
|
-
}
|
|
323
|
-
};
|
|
296
|
+
// Reuse the validateBinary helper defined above in the bootstrap section.
|
|
324
297
|
|
|
325
298
|
const validation = validateBinary(binaryPath);
|
|
326
299
|
if (!validation.ok) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@just-every/code",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.52",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lightweight coding agent that runs in your terminal - fork of OpenAI Codex",
|
|
6
6
|
"bin": {
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"prettier": "^3.3.3"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@just-every/code-darwin-arm64": "0.2.
|
|
38
|
-
"@just-every/code-darwin-x64": "0.2.
|
|
39
|
-
"@just-every/code-linux-x64-musl": "0.2.
|
|
40
|
-
"@just-every/code-linux-arm64-musl": "0.2.
|
|
41
|
-
"@just-every/code-win32-x64": "0.2.
|
|
37
|
+
"@just-every/code-darwin-arm64": "0.2.52",
|
|
38
|
+
"@just-every/code-darwin-x64": "0.2.52",
|
|
39
|
+
"@just-every/code-linux-x64-musl": "0.2.52",
|
|
40
|
+
"@just-every/code-linux-arm64-musl": "0.2.52",
|
|
41
|
+
"@just-every/code-win32-x64": "0.2.52"
|
|
42
42
|
}
|
|
43
43
|
}
|