@sciagent/cli 1.3.54 → 1.3.55
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 +7 -5
- package/package.json +1 -1
- package/scripts/postinstall.js +1 -1
package/bin/sciagent.js
CHANGED
|
@@ -25,7 +25,7 @@ const https = require('https');
|
|
|
25
25
|
const http = require('http');
|
|
26
26
|
|
|
27
27
|
// 当前版本号 - 与 postinstall.js 和 package.json 保持同步
|
|
28
|
-
const CURRENT_VERSION = '1.3.
|
|
28
|
+
const CURRENT_VERSION = '1.3.55';
|
|
29
29
|
|
|
30
30
|
// Releases 下载源配置(优先级从高到低)
|
|
31
31
|
// JihuLab 通用包仓库(国内 CDN,速度快)作为主源
|
|
@@ -122,8 +122,9 @@ function applyPendingUpdate(installDir) {
|
|
|
122
122
|
// Windows: 使用 PowerShell
|
|
123
123
|
const tmpScript = path.join(os.tmpdir(), 'sciagent-apply-update.ps1');
|
|
124
124
|
const scriptContent = [
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
`$target = "${targetPath}"`,
|
|
126
|
+
`Copy-Item -Path "${tempPath}" -Destination "$target" -Force`,
|
|
127
|
+
'if (Test-Path $target) { Write-Host "OK" } else { Write-Error "Copy failed"; exit 1 }'
|
|
127
128
|
].join('\r\n');
|
|
128
129
|
fs.writeFileSync(tmpScript, scriptContent, 'utf8');
|
|
129
130
|
try {
|
|
@@ -779,8 +780,9 @@ function downloadBinary(platform, arch, version) {
|
|
|
779
780
|
if (platform === 'win32') {
|
|
780
781
|
const tmpScript = path.join(os.tmpdir(), 'sciagent-replace.ps1');
|
|
781
782
|
const scriptContent = [
|
|
782
|
-
|
|
783
|
-
|
|
783
|
+
`$target = "${targetPath}"`,
|
|
784
|
+
`Copy-Item -Path "${tempPath}" -Destination "$target" -Force`,
|
|
785
|
+
'if (Test-Path $target) { Write-Host "OK" } else { Write-Error "Copy failed"; exit 1 }'
|
|
784
786
|
].join('\r\n');
|
|
785
787
|
fs.writeFileSync(tmpScript, scriptContent, 'utf8');
|
|
786
788
|
try {
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -27,7 +27,7 @@ const ARCH_MAP = {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// 当前版本号 - 每次发布时同步更新
|
|
30
|
-
const CURRENT_VERSION = '1.3.
|
|
30
|
+
const CURRENT_VERSION = '1.3.55';
|
|
31
31
|
|
|
32
32
|
// GitHub Releases 回退版本列表(当当前版本的 release 不存在时尝试)
|
|
33
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'];
|