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 CHANGED
@@ -688,9 +688,15 @@ export async function run(argv, io = {}) {
688
688
  kept.push(s.name);
689
689
  continue;
690
690
  }
691
- const bodies = [];
692
- for (const f of files)
693
- bodies.push([f, Buffer.from(await (await get(f.url)).arrayBuffer())]);
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.0";
1
+ export const VERSION = "0.4.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delivrie-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "The Delivrie command-line tool: send email, check deliveries, and manage domains, API keys, webhooks and templates from your terminal.",
5
5
  "keywords": [
6
6
  "delivrie",