@delta-infra/cli 1.0.35 → 1.0.37
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.js +11 -0
package/checksums.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
94376f7836b3ee1618bcc7e61d7873d6265cb8938f7aab108c03768eaf88b344 delta-cli-darwin-amd64.tar.gz
|
|
2
|
+
2216a1cce22772c2084daee909da80d48b446bbe12dfe99c0a83c6bfe9444640 delta-cli-darwin-arm64.tar.gz
|
|
3
|
+
95af28f39980c47712a4951c8e8921ae044976e95af38565432afec3140e5e90 delta-cli-linux-amd64.tar.gz
|
|
4
|
+
4814c6e2c5334f6d048da07a48a22630b9e1779458ed4a8bddf71c58dc45cffc delta-cli-linux-arm64.tar.gz
|
|
5
|
+
71250c3124f07605d8e85fea3a8e446ebac4790ff7bb2e231b4002b9d56205db delta-cli-windows-amd64.zip
|
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -98,6 +98,7 @@ var _MIRROR_LIST = [
|
|
|
98
98
|
// Quick connectivity check: fetch a small file (checksums.txt) from each
|
|
99
99
|
// mirror and return only the ones that respond within the probe timeout.
|
|
100
100
|
function probeMirrors(version, cb) {
|
|
101
|
+
console.error("Probing " + _MIRROR_LIST.length + " download mirrors...");
|
|
101
102
|
var probeUrl = "/https://github.com/" + REPO + "/releases/download/v" + version + "/checksums.txt";
|
|
102
103
|
var results = [];
|
|
103
104
|
var pending = _MIRROR_LIST.length;
|
|
@@ -106,6 +107,11 @@ function probeMirrors(version, cb) {
|
|
|
106
107
|
function finish() {
|
|
107
108
|
if (done) return;
|
|
108
109
|
done = true;
|
|
110
|
+
if (results.length > 0) {
|
|
111
|
+
console.error("Found " + results.length + " available mirror(s)");
|
|
112
|
+
} else {
|
|
113
|
+
console.error("No mirror responded, falling back to GitHub source");
|
|
114
|
+
}
|
|
109
115
|
cb(results);
|
|
110
116
|
}
|
|
111
117
|
|
|
@@ -324,6 +330,7 @@ function install() {
|
|
|
324
330
|
console.error("Downloading from " + downloadUrls[i]);
|
|
325
331
|
download(downloadUrls[i], archivePath);
|
|
326
332
|
downloaded = true;
|
|
333
|
+
console.error("Download complete, verifying...");
|
|
327
334
|
break;
|
|
328
335
|
} catch (e) {
|
|
329
336
|
console.error("Failed: " + e.message);
|
|
@@ -334,10 +341,13 @@ function install() {
|
|
|
334
341
|
|
|
335
342
|
const expectedHash = getExpectedChecksum(archiveName);
|
|
336
343
|
verifyChecksum(archivePath, expectedHash);
|
|
344
|
+
console.error("Checksum verified");
|
|
337
345
|
|
|
338
346
|
if (isWindows) {
|
|
347
|
+
console.error("Extracting archive...");
|
|
339
348
|
extractZipWindows(archivePath, tmpDir);
|
|
340
349
|
} else {
|
|
350
|
+
console.error("Extracting archive...");
|
|
341
351
|
execFileSync("tar", ["-xzf", archivePath, "-C", tmpDir], { stdio: "ignore" });
|
|
342
352
|
}
|
|
343
353
|
|
|
@@ -361,6 +371,7 @@ function install() {
|
|
|
361
371
|
}
|
|
362
372
|
}
|
|
363
373
|
fs.chmodSync(dest, 0o755);
|
|
374
|
+
console.error("Installed to " + dest);
|
|
364
375
|
} finally {
|
|
365
376
|
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
366
377
|
}
|