@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.
- package/dist/index.umd.js +265 -127
- package/dist/index.umd.js.map +1 -1
- package/dist/worker/SharedSyncImplementation.umd.js +255 -105
- package/dist/worker/SharedSyncImplementation.umd.js.map +1 -1
- package/dist/worker/WASQLiteDB.umd.js +4 -4
- package/dist/worker/WASQLiteDB.umd.js.map +1 -1
- package/lib/src/db/adapters/AsyncDatabaseConnection.d.ts +3 -0
- package/lib/src/db/adapters/AsyncDatabaseConnection.js +6 -1
- package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.d.ts +9 -0
- package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.js +46 -8
- package/lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js +3 -2
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.d.ts +2 -1
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.js +48 -27
- package/lib/src/worker/sync/SharedSyncImplementation.d.ts +18 -3
- package/lib/src/worker/sync/SharedSyncImplementation.js +143 -76
- package/lib/src/worker/sync/WorkerClient.d.ts +3 -2
- package/lib/src/worker/sync/WorkerClient.js +26 -4
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/db/adapters/AsyncDatabaseConnection.ts +7 -0
- package/src/db/adapters/LockedAsyncDatabaseAdapter.ts +54 -9
- package/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.ts +3 -2
- package/src/db/sync/SharedWebStreamingSyncImplementation.ts +60 -36
- package/src/worker/sync/SharedSyncImplementation.ts +171 -87
- package/src/worker/sync/WorkerClient.ts +28 -6
|
@@ -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
|
|
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,
|
|
15391
|
+
timeoutId = setTimeout(endDelay, delay);
|
|
15392
15392
|
});
|
|
15393
15393
|
}
|
|
15394
15394
|
updateSubscriptions(subscriptions) {
|