dexie-cloud-addon 4.0.1-beta.56 → 4.0.1-beta.57

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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.0.1-beta.56, Wed Jan 31 2024
11
+ * Version 4.0.1-beta.57, Wed Feb 14 2024
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -3329,7 +3329,7 @@ function syncWithServer(changes, syncState, baseRevs, db, databaseUrl, schema, c
3329
3329
  const res = yield fetch(`${databaseUrl}/sync`, {
3330
3330
  method: 'post',
3331
3331
  headers,
3332
- credentials: 'include',
3332
+ credentials: 'include', // For Arr Affinity cookie only, for better Rate-Limit counting only.
3333
3333
  body: TSON.stringify(syncRequest),
3334
3334
  });
3335
3335
  //const contentLength = Number(res.headers.get('content-length'));
@@ -4287,7 +4287,7 @@ function otpFetchTokenCallback(db) {
4287
4287
  if (response.type !== 'otp-sent')
4288
4288
  throw new Error(`Unexpected response from ${url}/token`);
4289
4289
  const otp = yield promptForOTP(userInteraction, tokenRequest.email);
4290
- const tokenRequest2 = Object.assign(Object.assign({}, tokenRequest), { otp: otp || '', otp_id: response.otp_id });
4290
+ const tokenRequest2 = Object.assign(Object.assign({}, tokenRequest), { otp: otp || '', otp_id: response.otp_id, public_key });
4291
4291
  let res2 = yield fetch(`${url}/token`, {
4292
4292
  body: JSON.stringify(tokenRequest2),
4293
4293
  method: 'post',
@@ -5583,7 +5583,7 @@ function LocalSyncWorker(db, cloudOptions, cloudSchema) {
5583
5583
  retryPurpose = null;
5584
5584
  syncIfPossible(db, cloudOptions, cloudSchema, {
5585
5585
  cancelToken,
5586
- retryImmediatelyOnFetchError: true,
5586
+ retryImmediatelyOnFetchError: true, // workaround for "net::ERR_NETWORK_CHANGED" in chrome.
5587
5587
  purpose: combPurpose,
5588
5588
  }).catch((e) => {
5589
5589
  console.error('error in syncIfPossible()', e);
@@ -6257,7 +6257,7 @@ function dexieCloud(dexie) {
6257
6257
  const syncComplete = new Subject();
6258
6258
  dexie.cloud = {
6259
6259
  // @ts-ignore
6260
- version: "4.0.1-beta.56",
6260
+ version: "4.0.1-beta.57",
6261
6261
  options: Object.assign({}, DEFAULT_OPTIONS),
6262
6262
  schema: null,
6263
6263
  get currentUserId() {
@@ -6534,7 +6534,7 @@ function dexieCloud(dexie) {
6534
6534
  }
6535
6535
  }
6536
6536
  // @ts-ignore
6537
- dexieCloud.version = "4.0.1-beta.56";
6537
+ dexieCloud.version = "4.0.1-beta.57";
6538
6538
  Dexie.Cloud = dexieCloud;
6539
6539
 
6540
6540
  // In case the SW lives for a while, let it reuse already opened connections: