@cannbot-ai/install-helper 0.0.2-beta.45 → 0.0.2-beta.46

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/dist/install.ps1 +15 -9
  2. package/package.json +6 -6
package/dist/install.ps1 CHANGED
@@ -37,25 +37,31 @@ Write-Host ""
37
37
  Write-Host " Querying latest version..." -ForegroundColor Cyan
38
38
 
39
39
  $Mirrors = @(
40
- "https://registry.npmmirror.com",
41
- "https://registry.npmjs.org"
40
+ "https://registry.npmjs.org",
41
+ "https://registry.npmmirror.com"
42
42
  )
43
43
 
44
44
  $Version = $null
45
45
  $Registry = $null
46
46
  foreach ($url in $Mirrors) {
47
- foreach ($tag in @("latest", "beta")) {
47
+ foreach ($tag in @("beta", "latest")) {
48
48
  try {
49
49
  $resp = Invoke-RestMethod "$url/$SubPkgName/$tag" -TimeoutSec 15
50
- if ($resp.version -and ((-not $Version) -or ([version]$resp.version -gt [version]$Version))) {
51
- $Version = $resp.version
52
- $Registry = $url
50
+ if ($resp.version) {
51
+ if (-not $Version) {
52
+ $Version = $resp.version
53
+ $Registry = $url
54
+ } elseif ($resp.version -gt $Version) {
55
+ $Version = $resp.version
56
+ $Registry = $url
57
+ }
53
58
  }
54
59
  } catch {}
55
60
  }
56
- }
57
- if ($Version) {
58
- Write-Host " [OK] Version: $Version (from $Registry)" -ForegroundColor Green
61
+ if ($Version) {
62
+ Write-Host " [OK] Version: $Version (from $Registry)" -ForegroundColor Green
63
+ break
64
+ }
59
65
  }
60
66
 
61
67
  if (-not $Version) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cannbot-ai/install-helper",
3
- "version": "0.0.2-beta.45",
3
+ "version": "0.0.2-beta.46",
4
4
  "description": "Install Helper - Interactive installer for CANN operator development skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,11 +41,11 @@
41
41
  "yaml": "^2.6.0"
42
42
  },
43
43
  "optionalDependencies": {
44
- "@cannbot-ai/install-helper-linux-x64": "0.0.2-beta.45",
45
- "@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.45",
46
- "@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.45",
47
- "@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.45",
48
- "@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.45"
44
+ "@cannbot-ai/install-helper-linux-x64": "0.0.2-beta.46",
45
+ "@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.46",
46
+ "@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.46",
47
+ "@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.46",
48
+ "@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.46"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^22.0.0",