sakitamanler-ccl-launcher 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/bin/ccl +8 -9
  2. package/package.json +1 -1
package/bin/ccl CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  const { spawn } = require('child_process');
4
4
  const process = require('process');
5
+ const path = require('path');
5
6
 
6
7
  // 根据平台和架构确定要执行的命令
7
8
  function getTargetCommand() {
@@ -16,7 +17,10 @@ function getTargetCommand() {
16
17
  case 'linux-x64':
17
18
  return 'ccl-linux-x64';
18
19
  case 'win32-x64':
19
- return 'ccl-win32-x64';
20
+ // Windows 下直接使用 ccl.exe
21
+ const pkgPath = path.join(__dirname, '..', 'node_modules', 'sakitamanler-ccl-win32');
22
+ const exePath = path.join(pkgPath, 'ccl.exe');
23
+ return exePath;
20
24
  default:
21
25
  throw new Error(`Unsupported platform: ${platform}-${arch}`);
22
26
  }
@@ -53,15 +57,10 @@ function executeTargetCommand() {
53
57
  let child;
54
58
  // Windows 平台特殊处理
55
59
  if (process.platform === 'win32') {
56
- // 把命令和参数组装成一个字符串(否则会有 DEP0190 报警)
57
- const fullCommand = [
58
- command,
59
- ...args.map(a => `"${a.replace(/"/g, '\\"')}"`)
60
- ].join(' ');
61
-
62
- child = spawn(fullCommand, {
60
+ // Windows 下直接执行 ccl.exe
61
+ child = spawn(command, args, {
63
62
  stdio: 'inherit',
64
- shell: true
63
+ shell: false
65
64
  });
66
65
  } else {
67
66
  child = spawn(command, args, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sakitamanler-ccl-launcher",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "sakitamanler Claude Code Launcher CLI 安装器",
5
5
  "main": "index.js",
6
6
  "bin": {