delivrie-cli 0.4.0 → 0.4.1
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/dist/cli.js +9 -3
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -688,9 +688,15 @@ export async function run(argv, io = {}) {
|
|
|
688
688
|
kept.push(s.name);
|
|
689
689
|
continue;
|
|
690
690
|
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
691
|
+
// Download every file first (8 at a time), so a failed download leaves the installed copy untouched.
|
|
692
|
+
const bodies = new Array(files.length);
|
|
693
|
+
let next = 0;
|
|
694
|
+
await Promise.all(Array.from({ length: Math.min(8, files.length) }, async () => {
|
|
695
|
+
while (next < files.length) {
|
|
696
|
+
const i = next++;
|
|
697
|
+
bodies[i] = [files[i], Buffer.from(await (await get(files[i].url)).arrayBuffer())];
|
|
698
|
+
}
|
|
699
|
+
}));
|
|
694
700
|
// Remove files an older version had that this one doesn't.
|
|
695
701
|
for (const old of entry(s.name)?.files || [])
|
|
696
702
|
if (!files.some((f) => f.path === old))
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "0.4.
|
|
1
|
+
export const VERSION = "0.4.1";
|
package/package.json
CHANGED