@just-every/code 0.2.47 → 0.2.48
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 +6 -7
- package/postinstall.js +38 -7
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@just-every/code",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.48",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lightweight coding agent that runs in your terminal - fork of OpenAI Codex",
|
|
6
6
|
"bin": {
|
|
7
|
-
"code": "bin/coder.js",
|
|
8
7
|
"coder": "bin/coder.js"
|
|
9
8
|
},
|
|
10
9
|
"type": "module",
|
|
@@ -35,10 +34,10 @@
|
|
|
35
34
|
"prettier": "^3.3.3"
|
|
36
35
|
},
|
|
37
36
|
"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.
|
|
37
|
+
"@just-every/code-darwin-arm64": "0.2.48",
|
|
38
|
+
"@just-every/code-darwin-x64": "0.2.48",
|
|
39
|
+
"@just-every/code-linux-x64-musl": "0.2.48",
|
|
40
|
+
"@just-every/code-linux-arm64-musl": "0.2.48",
|
|
41
|
+
"@just-every/code-win32-x64": "0.2.48"
|
|
43
42
|
}
|
|
44
43
|
}
|
package/postinstall.js
CHANGED
|
@@ -408,8 +408,12 @@ async function main() {
|
|
|
408
408
|
console.warn('⚠ Main code binary not found. You may need to build from source.');
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
//
|
|
412
|
-
//
|
|
411
|
+
// Handle collisions (e.g., VS Code) and add wrappers. We no longer publish a
|
|
412
|
+
// `code` bin in package.json. Instead, for global installs we create a `code`
|
|
413
|
+
// wrapper only when there is no conflicting `code` earlier on PATH. This avoids
|
|
414
|
+
// hijacking the VS Code CLI while still giving users a friendly name when safe.
|
|
415
|
+
// For upgrades from older versions that published a `code` bin, we also remove
|
|
416
|
+
// our old shim if a conflict is detected.
|
|
413
417
|
if (isGlobal && !isNpx) try {
|
|
414
418
|
const isTTY = process.stdout && process.stdout.isTTY;
|
|
415
419
|
const isWindows = platform() === 'win32';
|
|
@@ -460,8 +464,23 @@ async function main() {
|
|
|
460
464
|
} catch (e) {
|
|
461
465
|
console.log(`⚠ Could not remove Bun shim '${bunShim}': ${e.message}`);
|
|
462
466
|
}
|
|
463
|
-
} else if (
|
|
464
|
-
|
|
467
|
+
} else if (!other) {
|
|
468
|
+
// No conflict: create a wrapper that forwards to `coder`
|
|
469
|
+
try {
|
|
470
|
+
const wrapperPath = bunShim;
|
|
471
|
+
if (isWindows) {
|
|
472
|
+
const content = `@echo off\r\n"%~dp0coder" %*\r\n`;
|
|
473
|
+
writeFileSync(wrapperPath, content);
|
|
474
|
+
} else {
|
|
475
|
+
const content = `#!/bin/sh\nexec "$(dirname \"$0\")/coder" "$@"\n`;
|
|
476
|
+
writeFileSync(wrapperPath, content);
|
|
477
|
+
chmodSync(wrapperPath, 0o755);
|
|
478
|
+
}
|
|
479
|
+
console.log("✓ Created 'code' wrapper -> coder (bun)");
|
|
480
|
+
installedCmds.add('code');
|
|
481
|
+
} catch (e) {
|
|
482
|
+
console.log(`⚠ Failed to create 'code' wrapper (bun): ${e.message}`);
|
|
483
|
+
}
|
|
465
484
|
}
|
|
466
485
|
|
|
467
486
|
// Print summary for Bun
|
|
@@ -486,7 +505,7 @@ async function main() {
|
|
|
486
505
|
|
|
487
506
|
const ourShim = join(globalBin || '', isWindows ? 'code.cmd' : 'code');
|
|
488
507
|
const candidates = resolveAllOnPath();
|
|
489
|
-
const others = candidates.filter(p => p && ourShim
|
|
508
|
+
const others = candidates.filter(p => p && (!ourShim || p !== ourShim));
|
|
490
509
|
const collision = others.length > 0;
|
|
491
510
|
|
|
492
511
|
const ensureWrapper = (name, args) => {
|
|
@@ -530,8 +549,20 @@ async function main() {
|
|
|
530
549
|
console.log('Note: could not determine npm global bin; skipping alias creation.');
|
|
531
550
|
}
|
|
532
551
|
} else {
|
|
533
|
-
// No collision;
|
|
534
|
-
if (globalBin
|
|
552
|
+
// No collision; ensure a 'code' wrapper exists forwarding to 'coder'
|
|
553
|
+
if (globalBin) {
|
|
554
|
+
try {
|
|
555
|
+
const content = isWindows
|
|
556
|
+
? `@echo off\r\n"%~dp0coder" %*\r\n`
|
|
557
|
+
: `#!/bin/sh\nexec "$(dirname \"$0\")/coder" "$@"\n`;
|
|
558
|
+
writeFileSync(ourShim, content);
|
|
559
|
+
if (!isWindows) chmodSync(ourShim, 0o755);
|
|
560
|
+
console.log("✓ Created 'code' wrapper -> coder");
|
|
561
|
+
installedCmds.add('code');
|
|
562
|
+
} catch (e) {
|
|
563
|
+
console.log(`⚠ Failed to create 'code' wrapper: ${e.message}`);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
535
566
|
}
|
|
536
567
|
|
|
537
568
|
// Print summary for npm/pnpm/yarn
|