@sciagent/cli 1.1.2 → 1.1.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.
- package/bin/sciagent.js +3 -3
- package/package.json +1 -1
- package/scripts/postinstall.js +4 -4
package/bin/sciagent.js
CHANGED
|
@@ -23,7 +23,7 @@ const fs = require('fs');
|
|
|
23
23
|
const os = require('os');
|
|
24
24
|
|
|
25
25
|
// 当前版本号 - 与 postinstall.js 和 package.json 保持同步
|
|
26
|
-
const CURRENT_VERSION = '1.1.
|
|
26
|
+
const CURRENT_VERSION = '1.1.4';
|
|
27
27
|
|
|
28
28
|
// 极狐GitLab下载配置
|
|
29
29
|
const JIHULAB_URL = 'https://jihulab.com';
|
|
@@ -189,7 +189,7 @@ function downloadBinary(platform, arch, version) {
|
|
|
189
189
|
'$ProgressPreference = "SilentlyContinue"',
|
|
190
190
|
`$uri = "${downloadUrl}"`,
|
|
191
191
|
`$out = "${targetPath}"`,
|
|
192
|
-
'Write-Host " Downloading from
|
|
192
|
+
'Write-Host " Downloading from JiHuLab..."',
|
|
193
193
|
'Invoke-WebRequest -Uri $uri -OutFile $out -UseBasicParsing',
|
|
194
194
|
'if (Test-Path $out) { $s = (Get-Item $out).Length; Write-Host " Downloaded: $s bytes" } else { Write-Error "File not created"; exit 1 }'
|
|
195
195
|
].join('\r\n');
|
|
@@ -206,7 +206,7 @@ function downloadBinary(platform, arch, version) {
|
|
|
206
206
|
} else {
|
|
207
207
|
// Linux/macOS: 使用 curl
|
|
208
208
|
execSync(`curl -fsSL -o '${targetPath}' '${downloadUrl}'`, {
|
|
209
|
-
stdio: '
|
|
209
|
+
stdio: 'pipe',
|
|
210
210
|
timeout: 600000
|
|
211
211
|
});
|
|
212
212
|
fs.chmodSync(targetPath, 0o755);
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -27,10 +27,10 @@ const ARCH_MAP = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// 当前版本号 - 每次发布时同步更新
|
|
30
|
-
const CURRENT_VERSION = '1.1.
|
|
30
|
+
const CURRENT_VERSION = '1.1.4';
|
|
31
31
|
|
|
32
32
|
// GitHub Releases 回退版本列表(当当前版本的 release 不存在时尝试)
|
|
33
|
-
const GITHUB_FALLBACK_VERSIONS = ['1.0.50', '1.0.48', '1.0.46', '1.0.40', '1.0.38', '1.0.36'];
|
|
33
|
+
const GITHUB_FALLBACK_VERSIONS = ['1.1.3', '1.0.50', '1.0.48', '1.0.46', '1.0.40', '1.0.38', '1.0.36'];
|
|
34
34
|
|
|
35
35
|
// Releases 服务器配置
|
|
36
36
|
// 优先使用环境变量,否则使用默认服务器
|
|
@@ -554,7 +554,7 @@ async function downloadFromJiHuLab(platform, arch, version) {
|
|
|
554
554
|
'$ProgressPreference = "SilentlyContinue"',
|
|
555
555
|
`$uri = "${downloadUrl}"`,
|
|
556
556
|
`$out = "${targetPath}"`,
|
|
557
|
-
'Write-Host " [JiHuLab] Downloading
|
|
557
|
+
'Write-Host " [JiHuLab] Downloading..."',
|
|
558
558
|
'Invoke-WebRequest -Uri $uri -OutFile $out -UseBasicParsing',
|
|
559
559
|
'if (Test-Path $out) { $s = (Get-Item $out).Length; Write-Host " [JiHuLab] Downloaded: $s bytes" } else { Write-Error "File not created"; exit 1 }'
|
|
560
560
|
].join('\r\n');
|
|
@@ -615,7 +615,7 @@ async function downloadFromServer(platform, arch, version) {
|
|
|
615
615
|
const binName = platform === 'win32' ? 'sciagent.exe' : 'sciagent';
|
|
616
616
|
const downloadUrl = `${RELEASE_SERVER_URL}/api/releases/download/${platform}/${arch}/${version}`;
|
|
617
617
|
|
|
618
|
-
console.log(`\n 📥 从 Releases
|
|
618
|
+
console.log(`\n 📥 从 Releases 服务器下载 ${binName} v${version}...`);
|
|
619
619
|
|
|
620
620
|
// 确定安装目录
|
|
621
621
|
const installDir = getHomeBinDir();
|