@powersync/common 0.0.0-dev-20251201150812 → 0.0.0-dev-20251209082930

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/bundle.mjs CHANGED
@@ -12165,7 +12165,7 @@ The next upload iteration will be delayed.`);
12165
12165
  uploadError: ex
12166
12166
  }
12167
12167
  });
12168
- await this.delayRetry(controller.signal, this.options.crudUploadThrottleMs);
12168
+ await this.delayRetry(controller.signal);
12169
12169
  if (!this.isConnected) {
12170
12170
  // Exit the upload loop if the sync stream is no longer connected
12171
12171
  break;
@@ -12876,14 +12876,14 @@ The next upload iteration will be delayed.`);
12876
12876
  // trigger this for all updates
12877
12877
  this.iterateListeners((cb) => cb.statusUpdated?.(options));
12878
12878
  }
12879
- async delayRetry(signal, delayMs) {
12879
+ async delayRetry(signal) {
12880
12880
  return new Promise((resolve) => {
12881
12881
  if (signal?.aborted) {
12882
12882
  // If the signal is already aborted, resolve immediately
12883
12883
  resolve();
12884
12884
  return;
12885
12885
  }
12886
- const delay = delayMs ?? this.options.retryDelayMs;
12886
+ const { retryDelayMs } = this.options;
12887
12887
  let timeoutId;
12888
12888
  const endDelay = () => {
12889
12889
  resolve();
@@ -12894,7 +12894,7 @@ The next upload iteration will be delayed.`);
12894
12894
  signal?.removeEventListener('abort', endDelay);
12895
12895
  };
12896
12896
  signal?.addEventListener('abort', endDelay, { once: true });
12897
- timeoutId = setTimeout(endDelay, delay);
12897
+ timeoutId = setTimeout(endDelay, retryDelayMs);
12898
12898
  });
12899
12899
  }
12900
12900
  updateSubscriptions(subscriptions) {
@@ -13424,11 +13424,11 @@ class AbstractPowerSyncDatabase extends BaseObserver {
13424
13424
  .map((n) => parseInt(n));
13425
13425
  }
13426
13426
  catch (e) {
13427
- throw new Error(`Unsupported powersync extension version. Need >=0.4.5 <1.0.0, got: ${this.sdkVersion}. Details: ${e.message}`);
13427
+ throw new Error(`Unsupported powersync extension version. Need >=0.4.10 <1.0.0, got: ${this.sdkVersion}. Details: ${e.message}`);
13428
13428
  }
13429
- // Validate >=0.4.5 <1.0.0
13430
- if (versionInts[0] != 0 || versionInts[1] < 4 || (versionInts[1] == 4 && versionInts[2] < 5)) {
13431
- throw new Error(`Unsupported powersync extension version. Need >=0.4.5 <1.0.0, got: ${this.sdkVersion}`);
13429
+ // Validate >=0.4.10 <1.0.0
13430
+ if (versionInts[0] != 0 || versionInts[1] < 4 || (versionInts[1] == 4 && versionInts[2] < 10)) {
13431
+ throw new Error(`Unsupported powersync extension version. Need >=0.4.10 <1.0.0, got: ${this.sdkVersion}`);
13432
13432
  }
13433
13433
  }
13434
13434
  async resolveOfflineSyncStatus() {