@delta-infra/cli 1.0.48 → 1.0.50
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/checksums.txt +5 -5
- package/package.json +1 -1
- package/scripts/install-wizard.js +28 -12
- package/scripts/install.js +3 -13
package/checksums.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
ea80e6543f3a3479c31523718ac0e0794f3d7822ebfcb801c9dd729ccc3b9503 delta-cli-darwin-amd64.tar.gz
|
|
2
|
+
44b3509c6aa67dc082aeabd5a4093bcd1238cc74bfb8ca8564e7ebb269aefc39 delta-cli-darwin-arm64.tar.gz
|
|
3
|
+
bf6d4a8d4d9a0e2f5b4f0a6ad596542efaff77a2f2d5e2e1d6c7842e1db94290 delta-cli-linux-amd64.tar.gz
|
|
4
|
+
6363ebe9336ca00079186e27c595b0246357973584f5aaf5cdddfc560413a283 delta-cli-linux-arm64.tar.gz
|
|
5
|
+
887cfeb69df7812e2427bc0d854f88f982a3d9eb2140792b8f43b22eaeabc939 delta-cli-windows-amd64.zip
|
package/package.json
CHANGED
|
@@ -9,6 +9,8 @@ const p = require("@clack/prompts");
|
|
|
9
9
|
|
|
10
10
|
const PKG = "@delta-infra/cli";
|
|
11
11
|
const SKILLS_REPO = "yzailab/delta-infra-cli";
|
|
12
|
+
const NPM_REGISTRIES = ["https://registry.npmmirror.com", "https://registry.npmjs.org"];
|
|
13
|
+
const GH_MIRRORS = ["https://gh.ddlc.top", "https://ghproxy.net", "https://gh-proxy.com"];
|
|
12
14
|
const CONFIG_DIR = path.join(osHomedir(), ".delta-infra");
|
|
13
15
|
const isWindows = process.platform === "win32";
|
|
14
16
|
|
|
@@ -211,17 +213,31 @@ async function stepInstallGlobally(msg) {
|
|
|
211
213
|
s.start(fmt(msg.step1, PKG));
|
|
212
214
|
}
|
|
213
215
|
try {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
let installed = false;
|
|
217
|
+
for (const registry of NPM_REGISTRIES) {
|
|
218
|
+
try {
|
|
219
|
+
await runSilentAsync("npm", ["install", "-g", PKG, "--registry", registry], {
|
|
220
|
+
timeout: 300000,
|
|
221
|
+
env: { ...process.env, DELTA_CLI_MIRROR: GH_MIRRORS[0] },
|
|
222
|
+
});
|
|
223
|
+
installed = true;
|
|
224
|
+
break;
|
|
225
|
+
} catch { }
|
|
226
|
+
}
|
|
227
|
+
if (!installed) throw new Error("all npm registries failed");
|
|
228
|
+
|
|
218
229
|
if (targetVer) {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
230
|
+
for (const mirror of GH_MIRRORS) {
|
|
231
|
+
try {
|
|
232
|
+
await runSilentAsync(process.execPath, [
|
|
233
|
+
path.join(__dirname, "install.js"),
|
|
234
|
+
], {
|
|
235
|
+
timeout: 300000,
|
|
236
|
+
env: { ...process.env, DELTA_CLI_RUN: "true", DELTA_CLI_VERSION: targetVer, DELTA_CLI_MIRROR: mirror },
|
|
237
|
+
});
|
|
238
|
+
break;
|
|
239
|
+
} catch { }
|
|
240
|
+
}
|
|
225
241
|
}
|
|
226
242
|
s.stop(needsUpgrade ? fmt(msg.step1Upgraded, latestVer) : msg.step1Done);
|
|
227
243
|
return needsUpgrade;
|
|
@@ -289,9 +305,9 @@ async function stepInstallSkills(msg) {
|
|
|
289
305
|
}
|
|
290
306
|
} catch { }
|
|
291
307
|
|
|
292
|
-
const GH_PROXY = "https://gh-proxy.com/https://github.com";
|
|
293
308
|
const urls = [
|
|
294
|
-
|
|
309
|
+
`https://gh-proxy.com/https://github.com/${SKILLS_REPO}`,
|
|
310
|
+
`https://gh.llkk.cc/https://github.com/${SKILLS_REPO}`,
|
|
295
311
|
`https://github.com/${SKILLS_REPO}`,
|
|
296
312
|
];
|
|
297
313
|
let lastErr;
|
package/scripts/install.js
CHANGED
|
@@ -33,11 +33,6 @@ const DEFAULT_ALLOWED_HOSTS = new Set([
|
|
|
33
33
|
"gh-proxy.com",
|
|
34
34
|
"ghproxy.net",
|
|
35
35
|
"gh.ddlc.top",
|
|
36
|
-
"gh.llkk.cc",
|
|
37
|
-
"gh.dpik.top",
|
|
38
|
-
"gh.con.sh",
|
|
39
|
-
"slink.ltd",
|
|
40
|
-
"xget.xi-xu.me",
|
|
41
36
|
"objects.githubusercontent.com",
|
|
42
37
|
"release-assets.githubusercontent.com",
|
|
43
38
|
"github-releases.githubusercontent.com",
|
|
@@ -82,17 +77,12 @@ function _getCurlTimeout() {
|
|
|
82
77
|
return _curlTimeoutMs;
|
|
83
78
|
}
|
|
84
79
|
|
|
85
|
-
//
|
|
80
|
+
// GitHub release download mirrors.
|
|
86
81
|
// Format: [hostname, urlPrefix] — urlPrefix is prepended to the GitHub URL.
|
|
87
82
|
var _MIRROR_LIST = [
|
|
88
|
-
["gh-proxy.com", "https://gh-proxy.com"],
|
|
89
|
-
["ghproxy.net", "https://ghproxy.net"],
|
|
90
83
|
["gh.ddlc.top", "https://gh.ddlc.top"],
|
|
91
|
-
["
|
|
92
|
-
["gh.
|
|
93
|
-
["gh.con.sh", "https://gh.con.sh"],
|
|
94
|
-
["slink.ltd", "https://slink.ltd"],
|
|
95
|
-
["xget.xi-xu.me", "https://xget.xi-xu.me"],
|
|
84
|
+
["ghproxy.net", "https://ghproxy.net"],
|
|
85
|
+
["gh-proxy.com", "https://gh-proxy.com"],
|
|
96
86
|
];
|
|
97
87
|
|
|
98
88
|
// Quick connectivity check: fetch a small file (checksums.txt) from each
|