sakitamanler-ccl-launcher 0.9.8 → 1.0.1
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 +2 -5
- package/scripts/postinstall.js +32 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sakitamanler-ccl-launcher",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "sakitamanler Claude Code Launcher CLI 安装器",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -28,9 +28,6 @@
|
|
|
28
28
|
"author": "sakitamanler",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"sakitamanler-ccl-win32": "^0.
|
|
32
|
-
"sakitamanler-ccl-darwin-arm64": "^0.9.8",
|
|
33
|
-
"sakitamanler-ccl-darwin-x64": "^0.9.8",
|
|
34
|
-
"sakitamanler-ccl-linux-x64": "^0.9.8"
|
|
31
|
+
"sakitamanler-ccl-win32": "^1.0.1"
|
|
35
32
|
}
|
|
36
33
|
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -10,36 +10,62 @@ const platform = process.platform;
|
|
|
10
10
|
const arch = process.arch;
|
|
11
11
|
|
|
12
12
|
let packageName = '';
|
|
13
|
+
let platformName = '';
|
|
13
14
|
|
|
14
15
|
switch (`${platform}-${arch}`) {
|
|
15
16
|
case 'darwin-arm64':
|
|
16
17
|
packageName = 'sakitamanler-ccl-darwin-arm64';
|
|
18
|
+
platformName = 'macOS Apple Silicon';
|
|
17
19
|
break;
|
|
18
20
|
case 'darwin-x64':
|
|
19
21
|
packageName = 'sakitamanler-ccl-darwin-x64';
|
|
22
|
+
platformName = 'macOS Intel';
|
|
20
23
|
break;
|
|
21
24
|
case 'linux-x64':
|
|
22
25
|
packageName = 'sakitamanler-ccl-linux-x64';
|
|
26
|
+
platformName = 'Linux x64';
|
|
23
27
|
break;
|
|
24
28
|
case 'win32-x64':
|
|
25
29
|
packageName = 'sakitamanler-ccl-win32';
|
|
30
|
+
platformName = 'Windows x64';
|
|
26
31
|
break;
|
|
27
32
|
default:
|
|
28
|
-
console.error(
|
|
33
|
+
console.error(`❌ 暂不支持的平台: ${platform}-${arch}`);
|
|
34
|
+
console.log('');
|
|
35
|
+
console.log('当前支持的平台:');
|
|
36
|
+
console.log(' - Windows x64');
|
|
37
|
+
console.log(' - macOS Apple Silicon (开发中)');
|
|
38
|
+
console.log(' - macOS Intel (开发中)');
|
|
39
|
+
console.log(' - Linux x64 (开发中)');
|
|
29
40
|
process.exit(1);
|
|
30
41
|
}
|
|
31
42
|
|
|
32
43
|
try {
|
|
33
|
-
console.log(
|
|
34
|
-
|
|
44
|
+
console.log(`📦 检测到平台: ${platformName}`);
|
|
45
|
+
console.log(`🔧 正在安装 ${packageName}...`);
|
|
46
|
+
|
|
47
|
+
// 尝试安装平台包
|
|
48
|
+
execSync(`npm install -g ${packageName}@1.0.1`, {
|
|
35
49
|
stdio: 'inherit'
|
|
36
50
|
});
|
|
37
|
-
|
|
51
|
+
|
|
38
52
|
console.log('');
|
|
39
|
-
console.log('
|
|
53
|
+
console.log('✅ 安装完成!');
|
|
54
|
+
console.log('');
|
|
55
|
+
console.log('📖 使用方法:');
|
|
40
56
|
console.log(' ccl # 交互式选择 provider');
|
|
41
57
|
console.log(' ccl --provider=GLM-4.7 # 指定 provider 运行');
|
|
58
|
+
console.log(' ccl --help # 查看帮助信息');
|
|
59
|
+
console.log('');
|
|
42
60
|
} catch (error) {
|
|
43
|
-
console.error('
|
|
61
|
+
console.error('');
|
|
62
|
+
console.error('❌ 安装失败:', error.message);
|
|
63
|
+
console.error('');
|
|
64
|
+
console.error('可能的原因:');
|
|
65
|
+
console.error(' 1. 该平台的包还未发布到 npm');
|
|
66
|
+
console.error(' 2. 网络连接问题');
|
|
67
|
+
console.error(' 3. npm 权限问题');
|
|
68
|
+
console.error('');
|
|
69
|
+
console.error('如需帮助,请访问: https://github.com/SakitamAnler/claude-code-launcher');
|
|
44
70
|
process.exit(1);
|
|
45
71
|
}
|