@profitlich/template-toolkit 2.9.4 → 2.10.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/deploy.js +15 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profitlich/template-toolkit",
3
- "version": "2.9.04",
3
+ "version": "2.10.0",
4
4
  "description": "Shared SCSS layout system, JS utilities, components and build scripts for profitlich template repos",
5
5
  "type": "module",
6
6
  "exports": {
package/scripts/deploy.js CHANGED
@@ -135,12 +135,25 @@ export async function runDeploy(mode, uploadTasks, options = {}) {
135
135
  );
136
136
 
137
137
  const queue = [...filesToUpload];
138
- await Promise.all(workers.map(async (workerClient) => {
138
+ await Promise.all(workers.map(async (initialWorkerClient) => {
139
+ let workerClient = initialWorkerClient;
139
140
  try {
140
141
  while (true) {
141
142
  const item = queue.shift();
142
143
  if (!item) break;
143
- await workerClient.uploadFrom(item.file, item.remotePath);
144
+ let retries = 0;
145
+ while (true) {
146
+ try {
147
+ await workerClient.uploadFrom(item.file, item.remotePath);
148
+ break;
149
+ } catch (err) {
150
+ retries++;
151
+ workerClient.close();
152
+ if (retries >= 3) throw err;
153
+ await delay(1000 * retries);
154
+ workerClient = await createClient(accessOptions);
155
+ }
156
+ }
144
157
  progressBar.increment();
145
158
  }
146
159
  } finally {