querysub 0.478.0 → 0.480.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "querysub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.480.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"node-forge": "https://github.com/sliftist/forge#e618181b469b07bdc70b968b0391beb8ef5fecd6",
|
|
68
68
|
"pako": "^2.1.0",
|
|
69
69
|
"peggy": "^5.0.6",
|
|
70
|
-
"socket-function": "^1.1.
|
|
70
|
+
"socket-function": "^1.1.43",
|
|
71
71
|
"terser": "^5.31.0",
|
|
72
72
|
"typesafecss": "^0.29.0",
|
|
73
73
|
"yaml": "^2.5.0",
|
|
@@ -442,24 +442,34 @@ export class ArchivesBackblaze {
|
|
|
442
442
|
|
|
443
443
|
|
|
444
444
|
let exists = false;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
"
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
445
|
+
let retries = 0;
|
|
446
|
+
while (true) {
|
|
447
|
+
try {
|
|
448
|
+
await api.createBucket({
|
|
449
|
+
bucketName: this.bucketName,
|
|
450
|
+
bucketType: this.config.public ? "allPublic" : "allPrivate",
|
|
451
|
+
lifecycleRules: [{
|
|
452
|
+
"daysFromUploadingToHiding": null,
|
|
453
|
+
// Keep files for 7 days, which should be enough time to recover accidental hiding.
|
|
454
|
+
"daysFromHidingToDeleting": 7,
|
|
455
|
+
"fileNamePrefix": ""
|
|
456
|
+
}],
|
|
457
|
+
corsRules: desiredCorsRules,
|
|
458
|
+
bucketInfo
|
|
459
|
+
});
|
|
460
|
+
} catch (e: any) {
|
|
461
|
+
if (!e.stack.includes(`"duplicate_bucket_name"`)) {
|
|
462
|
+
if (retries < 3) {
|
|
463
|
+
console.error(`Backblaze create bucket failed, retrying in 5s: ${e.stack}`);
|
|
464
|
+
await delay(5000);
|
|
465
|
+
retries++;
|
|
466
|
+
continue;
|
|
467
|
+
}
|
|
468
|
+
throw e;
|
|
469
|
+
}
|
|
470
|
+
exists = true;
|
|
461
471
|
}
|
|
462
|
-
|
|
472
|
+
break;
|
|
463
473
|
}
|
|
464
474
|
|
|
465
475
|
let bucketList = await api.listBuckets({
|
|
@@ -293,9 +293,7 @@ export function getSyncedController<T extends {
|
|
|
293
293
|
});
|
|
294
294
|
// We have to wait until we actually commit before making the call. Otherwise, if this commit is rejected because we need to do synchronized values, we'll call the function twice.
|
|
295
295
|
let fnc = controller.nodes[nodeId][fncName] as any;
|
|
296
|
-
console.log(`Triggering call ${fncName} with args ${JSON.stringify(args)}`);
|
|
297
296
|
Querysub.onCommitFinished(() => {
|
|
298
|
-
console.log(`Commit finished for call ${fncName} with args ${JSON.stringify(args)}`);
|
|
299
297
|
// Doesn't on commit finished also implicitly mean we're all synced? Pretty sure that isAll synced is making things break.
|
|
300
298
|
//if (Querysub.isAllSynced()) {
|
|
301
299
|
void Promise.resolve().then(() => {
|