@powersync/web 0.0.0-dev-20251126195153 → 0.0.0-dev-20251129133952

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.
@@ -14659,7 +14659,7 @@ The next upload iteration will be delayed.`);
14659
14659
  uploadError: ex
14660
14660
  }
14661
14661
  });
14662
- await this.delayRetry(controller.signal);
14662
+ await this.delayRetry(controller.signal, this.options.crudUploadThrottleMs);
14663
14663
  if (!this.isConnected) {
14664
14664
  // Exit the upload loop if the sync stream is no longer connected
14665
14665
  break;
@@ -15370,14 +15370,14 @@ The next upload iteration will be delayed.`);
15370
15370
  // trigger this for all updates
15371
15371
  this.iterateListeners((cb) => cb.statusUpdated?.(options));
15372
15372
  }
15373
- async delayRetry(signal) {
15373
+ async delayRetry(signal, delayMs) {
15374
15374
  return new Promise((resolve) => {
15375
15375
  if (signal?.aborted) {
15376
15376
  // If the signal is already aborted, resolve immediately
15377
15377
  resolve();
15378
15378
  return;
15379
15379
  }
15380
- const { retryDelayMs } = this.options;
15380
+ const delay = delayMs ?? this.options.retryDelayMs;
15381
15381
  let timeoutId;
15382
15382
  const endDelay = () => {
15383
15383
  resolve();
@@ -15388,7 +15388,7 @@ The next upload iteration will be delayed.`);
15388
15388
  signal?.removeEventListener('abort', endDelay);
15389
15389
  };
15390
15390
  signal?.addEventListener('abort', endDelay, { once: true });
15391
- timeoutId = setTimeout(endDelay, retryDelayMs);
15391
+ timeoutId = setTimeout(endDelay, delay);
15392
15392
  });
15393
15393
  }
15394
15394
  updateSubscriptions(subscriptions) {