@claudecodelaunch/ccl 1.2.3 → 1.2.4
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/ccl-darwin-amd64 +0 -0
- package/bin/ccl-darwin-arm64 +0 -0
- package/bin/ccl-linux-amd64 +0 -0
- package/bin/ccl-linux-arm64 +0 -0
- package/bin/ccl-win32-arm64.exe +0 -0
- package/bin/ccl-win32-x64.exe +0 -0
- package/bin/wrapper.js +27 -3
- package/package.json +1 -1
package/bin/ccl-darwin-amd64
CHANGED
|
Binary file
|
package/bin/ccl-darwin-arm64
CHANGED
|
Binary file
|
package/bin/ccl-linux-amd64
CHANGED
|
Binary file
|
package/bin/ccl-linux-arm64
CHANGED
|
Binary file
|
package/bin/ccl-win32-arm64.exe
CHANGED
|
Binary file
|
package/bin/ccl-win32-x64.exe
CHANGED
|
Binary file
|
package/bin/wrapper.js
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const { spawn } = require('child_process');
|
|
3
|
+
const fs = require('fs');
|
|
3
4
|
const path = require('path');
|
|
4
5
|
|
|
6
|
+
const archMap = {
|
|
7
|
+
darwin: { x64: 'amd64', arm64: 'arm64' },
|
|
8
|
+
linux: { x64: 'amd64', arm64: 'arm64' },
|
|
9
|
+
win32: { x64: 'x64', arm64: 'arm64' },
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const platformArch = archMap[process.platform]?.[process.arch];
|
|
13
|
+
if (!platformArch) {
|
|
14
|
+
console.error(`Unsupported platform: ${process.platform} ${process.arch}`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
5
18
|
const ext = process.platform === 'win32' ? '.exe' : '';
|
|
6
|
-
const binaryName = `ccl-${process.platform}-${
|
|
19
|
+
const binaryName = `ccl-${process.platform}-${platformArch}${ext}`;
|
|
7
20
|
const binaryPath = path.join(__dirname, binaryName);
|
|
8
21
|
|
|
22
|
+
if (!fs.existsSync(binaryPath)) {
|
|
23
|
+
console.error(`ccl binary not found: ${binaryPath}`);
|
|
24
|
+
console.error('Reinstall @claudecodelaunch/ccl or download a release binary from GitHub.');
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
9
28
|
const args = process.argv.slice(2);
|
|
10
29
|
const child = spawn(binaryPath, args, { stdio: 'inherit' });
|
|
11
30
|
|
|
31
|
+
child.on('error', (err) => {
|
|
32
|
+
console.error(`Failed to launch ccl: ${err.message}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
});
|
|
35
|
+
|
|
12
36
|
child.on('close', (code) => {
|
|
13
|
-
process.exit(code);
|
|
14
|
-
});
|
|
37
|
+
process.exit(code ?? 1);
|
|
38
|
+
});
|