@just-every/code 0.1.4 → 0.1.5
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 +3 -2
- package/postinstall.js +24 -0
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@just-every/code",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
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"
|
|
7
|
+
"code": "bin/coder.js",
|
|
8
|
+
"coder": "bin/coder.js"
|
|
8
9
|
},
|
|
9
10
|
"type": "module",
|
|
10
11
|
"engines": {
|
package/postinstall.js
CHANGED
|
@@ -56,6 +56,30 @@ async function downloadBinary(url, dest) {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
async function main() {
|
|
59
|
+
// Detect potential PATH conflict with an existing `code` command (e.g., VS Code)
|
|
60
|
+
try {
|
|
61
|
+
const whichCmd = process.platform === 'win32' ? 'where code' : 'command -v code || which code || true';
|
|
62
|
+
const resolved = execSync(whichCmd, { stdio: ['ignore', 'pipe', 'ignore'], shell: process.platform !== 'win32' }).toString().split(/\r?\n/).filter(Boolean)[0];
|
|
63
|
+
if (resolved) {
|
|
64
|
+
let contents = '';
|
|
65
|
+
try {
|
|
66
|
+
contents = readFileSync(resolved, 'utf8');
|
|
67
|
+
} catch {
|
|
68
|
+
contents = '';
|
|
69
|
+
}
|
|
70
|
+
const looksLikeOurs = contents.includes('@just-every/code') || contents.includes('bin/coder.js');
|
|
71
|
+
if (!looksLikeOurs) {
|
|
72
|
+
console.warn('[notice] Found an existing `code` on PATH at:');
|
|
73
|
+
console.warn(` ${resolved}`);
|
|
74
|
+
console.warn('[notice] We will still install our CLI, also available as `coder`.');
|
|
75
|
+
console.warn(' If `code` runs another tool, prefer using: coder');
|
|
76
|
+
console.warn(' Or run our CLI explicitly via: npx -y @just-every/code');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
} catch {
|
|
80
|
+
// Ignore detection failures; proceed with install.
|
|
81
|
+
}
|
|
82
|
+
|
|
59
83
|
const targetTriple = getTargetTriple();
|
|
60
84
|
const isWindows = platform() === 'win32';
|
|
61
85
|
const binaryExt = isWindows ? '.exe' : '';
|