@cannbot-ai/install-helper 0.0.2-beta.60 → 0.0.2-beta.62
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/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/install.ps1 +14 -13
- package/dist/locales/en_US.json +1 -0
- package/dist/locales/zh_CN.json +1 -0
- package/package.json +6 -6
package/dist/install.ps1
CHANGED
|
@@ -15,6 +15,18 @@ try {
|
|
|
15
15
|
|
|
16
16
|
$ErrorActionPreference = "Stop"
|
|
17
17
|
|
|
18
|
+
function Compare-SemVer($a, $b) {
|
|
19
|
+
$aParts = $a -split '-',2
|
|
20
|
+
$bParts = $b -split '-',2
|
|
21
|
+
try { $aVer = [version]$aParts[0] } catch { return $false }
|
|
22
|
+
try { $bVer = [version]$bParts[0] } catch { return $false }
|
|
23
|
+
if ($aVer -ne $bVer) { return $aVer -gt $bVer }
|
|
24
|
+
if ($aParts.Length -eq 1 -and $bParts.Length -eq 1) { return $false }
|
|
25
|
+
if ($aParts.Length -eq 1) { return $true }
|
|
26
|
+
if ($bParts.Length -eq 1) { return $false }
|
|
27
|
+
return "$($aParts[1])" -gt "$($bParts[1])"
|
|
28
|
+
}
|
|
29
|
+
|
|
18
30
|
Write-Host ""
|
|
19
31
|
Write-Host " ____ _ _ _ _ _ ____ _ " -ForegroundColor Cyan
|
|
20
32
|
Write-Host " / ___| / \ | \ | | \ | | __ ) ___ | |_ " -ForegroundColor Cyan
|
|
@@ -51,7 +63,7 @@ foreach ($url in $Mirrors) {
|
|
|
51
63
|
if (-not $Version) {
|
|
52
64
|
$Version = $resp.version
|
|
53
65
|
$Registry = $url
|
|
54
|
-
} elseif ($resp.version
|
|
66
|
+
} elseif (Compare-SemVer $resp.version $Version) {
|
|
55
67
|
$Version = $resp.version
|
|
56
68
|
$Registry = $url
|
|
57
69
|
}
|
|
@@ -138,18 +150,7 @@ if ($UserPath -notlike "*$InstallDir*") {
|
|
|
138
150
|
Write-Host ""
|
|
139
151
|
}
|
|
140
152
|
|
|
141
|
-
# 6.
|
|
142
|
-
Write-Host " Usage:"
|
|
143
|
-
Write-Host " install-helper # Interactive wizard"
|
|
144
|
-
Write-Host " install-helper list # List available plugins"
|
|
145
|
-
Write-Host " install-helper doctor # Health check"
|
|
146
|
-
Write-Host ""
|
|
147
|
-
Write-Host " Docs: https://gitcode.com/cann/cannbot-skills"
|
|
148
|
-
Write-Host ""
|
|
149
|
-
|
|
150
|
-
# 7. Auto launch
|
|
153
|
+
# 6. Done
|
|
151
154
|
Write-Host " Installation complete!" -ForegroundColor Green
|
|
152
155
|
Write-Host ""
|
|
153
|
-
Write-Host " Starting install-helper..." -ForegroundColor Cyan
|
|
154
|
-
Write-Host ""
|
|
155
156
|
& $BinaryDest
|
package/dist/locales/en_US.json
CHANGED
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"loading_plugin_data_complete": "Plugin data loaded",
|
|
131
131
|
"loading_skills_list_failed": "Failed to load Skills list, using built-in data",
|
|
132
132
|
"repo_pull_failed": "Failed to pull latest updates, using cached data",
|
|
133
|
+
"repo_cloning": "First-time setup: cloning cannbot-skills repository...",
|
|
133
134
|
"config_corrupted": "Config file corrupted, using defaults",
|
|
134
135
|
"record_corrupted": "Install record corrupted: {file}",
|
|
135
136
|
"skill_record_corrupted": "Skill install record corrupted",
|
package/dist/locales/zh_CN.json
CHANGED
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"loading_plugin_data_complete": "插件数据加载完成",
|
|
131
131
|
"loading_skills_list_failed": "Skills 列表加载失败,将使用内置数据",
|
|
132
132
|
"repo_pull_failed": "无法拉取最新内容,使用缓存数据",
|
|
133
|
+
"repo_cloning": "首次使用,正在克隆 cannbot-skills 仓库...",
|
|
133
134
|
"config_corrupted": "配置文件已损坏,使用默认配置",
|
|
134
135
|
"record_corrupted": "安装记录已损坏:{file}",
|
|
135
136
|
"skill_record_corrupted": "Skill 安装记录已损坏",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cannbot-ai/install-helper",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.62",
|
|
4
4
|
"description": "Install Helper - Interactive installer for CANN operator development skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"yaml": "^2.6.0"
|
|
43
43
|
},
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"@cannbot-ai/install-helper-linux-x64": "0.0.2-beta.
|
|
46
|
-
"@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.
|
|
47
|
-
"@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.
|
|
48
|
-
"@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.
|
|
49
|
-
"@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.
|
|
45
|
+
"@cannbot-ai/install-helper-linux-x64": "0.0.2-beta.62",
|
|
46
|
+
"@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.62",
|
|
47
|
+
"@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.62",
|
|
48
|
+
"@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.62",
|
|
49
|
+
"@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.62"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^22.0.0",
|