@claudecodelaunch/ccl 1.2.2 → 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.
Binary file
Binary file
Binary file
Binary file
Binary file
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}-${process.arch}${ext}`;
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
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudecodelaunch/ccl",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Launcher and proxy wrapper for Claude Code CLI",
5
5
  "repository": {
6
6
  "type": "git",