makecoder 4.0.51 → 4.0.54
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/dist/cc.mjs +2 -2
- package/dist/coder.js +107 -94
- package/dist/darwin-arm64/cc.js +2 -2
- package/dist/darwin-x64/cc.js +2 -2
- package/dist/linux-x64/cc.js +2 -2
- package/dist/win32-x64/cc.js +2 -2
- package/package.json +4 -4
- package/scripts/postinstall.js +40 -0
package/dist/darwin-arm64/cc.js
CHANGED
|
@@ -23,13 +23,13 @@ var PP4=Object.create;var{getPrototypeOf:WP4,defineProperty:_2H,getOwnPropertyNa
|
|
|
23
23
|
Object.assign(A, {
|
|
24
24
|
post(...args) {
|
|
25
25
|
const [url, payload, ...remainArgs] = args;
|
|
26
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.54' + '&session_id=' + S_() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
27
27
|
if (process.env.CODER_APIKEY) {
|
|
28
28
|
const headerValues = payload.headers.values;
|
|
29
29
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.0.54');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
package/dist/darwin-x64/cc.js
CHANGED
|
@@ -23,13 +23,13 @@ var WPK=Object.create;var{getPrototypeOf:GPK,defineProperty:_2H,getOwnPropertyNa
|
|
|
23
23
|
Object.assign(A, {
|
|
24
24
|
post(...args) {
|
|
25
25
|
const [url, payload, ...remainArgs] = args;
|
|
26
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.54' + '&session_id=' + S6() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
27
27
|
if (process.env.CODER_APIKEY) {
|
|
28
28
|
const headerValues = payload.headers.values;
|
|
29
29
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.0.54');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
package/dist/linux-x64/cc.js
CHANGED
|
@@ -23,13 +23,13 @@ var MP9=Object.create;var{getPrototypeOf:jP9,defineProperty:qWH,getOwnPropertyNa
|
|
|
23
23
|
Object.assign(A, {
|
|
24
24
|
post(...args) {
|
|
25
25
|
const [url, payload, ...remainArgs] = args;
|
|
26
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.54' + '&session_id=' + R$() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
27
27
|
if (process.env.CODER_APIKEY) {
|
|
28
28
|
const headerValues = payload.headers.values;
|
|
29
29
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.0.54');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
package/dist/win32-x64/cc.js
CHANGED
|
@@ -23,13 +23,13 @@ var PJ_=Object.create;var{getPrototypeOf:WJ_,defineProperty:K2H,getOwnPropertyNa
|
|
|
23
23
|
Object.assign(A, {
|
|
24
24
|
post(...args) {
|
|
25
25
|
const [url, payload, ...remainArgs] = args;
|
|
26
|
-
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.
|
|
26
|
+
const patchedUrl = url + (url.includes('?') ? '&' : '?') + 'app=codev-cli' + '&version=4.0.54' + '&session_id=' + R8() + (process.env.SPACE_ID ? '&space_id=' + process.env.SPACE_ID : '');
|
|
27
27
|
if (process.env.CODER_APIKEY) {
|
|
28
28
|
const headerValues = payload.headers.values;
|
|
29
29
|
headerValues.set('AUTHORIZATION', `Bearer ${process.env.CODER_APIKEY}`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
payload.headers.values.set('X-Coder-Version', '4.0.
|
|
32
|
+
payload.headers.values.set('X-Coder-Version', '4.0.54');
|
|
33
33
|
payload.headers.values.set('X-Coder-Platform', process.platform);
|
|
34
34
|
payload.headers.values.set('X-Coder-Arch', process.arch);
|
|
35
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "makecoder",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.54",
|
|
4
4
|
"description": "MakeCoder: Unified AI agent CLI tool integrating Claude Code, Codex and Gemini CLI",
|
|
5
5
|
"main": "./dist/coder.js",
|
|
6
6
|
"bin": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
38
|
"bun": ">=1.3.12",
|
|
39
|
-
"makecoder-codex-darwin-arm64": "4.0.
|
|
40
|
-
"makecoder-codex-linux-x64": "4.0.
|
|
41
|
-
"makecoder-codex-win32-x64": "4.0.
|
|
39
|
+
"makecoder-codex-darwin-arm64": "4.0.54",
|
|
40
|
+
"makecoder-codex-linux-x64": "4.0.54",
|
|
41
|
+
"makecoder-codex-win32-x64": "4.0.54"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=20.0.0"
|
package/scripts/postinstall.js
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const os = require('os');
|
|
6
|
+
const { execSync, execFileSync } = require('child_process');
|
|
7
|
+
|
|
8
|
+
function isBunAvailable() {
|
|
9
|
+
const binName = process.platform === 'win32' ? 'bun.exe' : 'bun';
|
|
10
|
+
try {
|
|
11
|
+
execFileSync(binName, ['--version'], { stdio: 'ignore' });
|
|
12
|
+
return true;
|
|
13
|
+
} catch {}
|
|
14
|
+
|
|
15
|
+
// Check node_modules/.bin/ (optionalDependency installed by npm)
|
|
16
|
+
const localBin = path.join(__dirname, '..', 'node_modules', '.bin', binName);
|
|
17
|
+
if (fs.existsSync(localBin)) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function installBun() {
|
|
25
|
+
console.log('bun not found, installing...');
|
|
26
|
+
const isWindows = process.platform === 'win32';
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
if (isWindows) {
|
|
30
|
+
execSync('powershell -Command "irm bun.sh/install.ps1 | iex"', { stdio: 'inherit' });
|
|
31
|
+
} else {
|
|
32
|
+
execSync('curl -fsSL https://bun.sh/install | bash', { stdio: 'inherit', shell: true });
|
|
33
|
+
}
|
|
34
|
+
console.log('bun installed successfully.');
|
|
35
|
+
} catch (error) {
|
|
36
|
+
console.warn('⚠️ Failed to auto-install bun:', error.message);
|
|
37
|
+
console.warn(' Please install it manually: npm install -g bun or curl -fsSL https://bun.sh/install | bash');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
6
41
|
|
|
7
42
|
function copyRecursive(src, dest) {
|
|
8
43
|
if (!fs.existsSync(src)) {
|
|
@@ -45,6 +80,11 @@ function copyRecursive(src, dest) {
|
|
|
45
80
|
|
|
46
81
|
function main() {
|
|
47
82
|
try {
|
|
83
|
+
// Ensure bun is available
|
|
84
|
+
if (!isBunAvailable()) {
|
|
85
|
+
installBun();
|
|
86
|
+
}
|
|
87
|
+
|
|
48
88
|
const homeDir = os.homedir();
|
|
49
89
|
const claudeDestDir = path.join(homeDir, '.claude');
|
|
50
90
|
const claudeSrcDir = path.join(__dirname, '..', 'claude');
|