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
  *
@@ -2498,7 +2498,7 @@ function otpFetchTokenCallback(db) {
2498
2498
  if (response.type !== 'otp-sent')
2499
2499
  throw new Error(`Unexpected response from ${url}/token`);
2500
2500
  const otp = yield promptForOTP(userInteraction, tokenRequest.email);
2501
- const tokenRequest2 = Object.assign(Object.assign({}, tokenRequest), { otp: otp || '', otp_id: response.otp_id });
2501
+ const tokenRequest2 = Object.assign(Object.assign({}, tokenRequest), { otp: otp || '', otp_id: response.otp_id, public_key });
2502
2502
  let res2 = yield fetch(`${url}/token`, {
2503
2503
  body: JSON.stringify(tokenRequest2),
2504
2504
  method: 'post',
@@ -3619,7 +3619,7 @@ function syncWithServer(changes, syncState, baseRevs, db, databaseUrl, schema, c
3619
3619
  const res = yield fetch(`${databaseUrl}/sync`, {
3620
3620
  method: 'post',
3621
3621
  headers,
3622
- credentials: 'include',
3622
+ credentials: 'include', // For Arr Affinity cookie only, for better Rate-Limit counting only.
3623
3623
  body: TSON.stringify(syncRequest),
3624
3624
  });
3625
3625
  //const contentLength = Number(res.headers.get('content-length'));
@@ -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);
@@ -6264,7 +6264,7 @@ function dexieCloud(dexie) {
6264
6264
  const syncComplete = new Subject();
6265
6265
  dexie.cloud = {
6266
6266
  // @ts-ignore
6267
- version: "4.0.1-beta.56",
6267
+ version: "4.0.1-beta.57",
6268
6268
  options: Object.assign({}, DEFAULT_OPTIONS),
6269
6269
  schema: null,
6270
6270
  get currentUserId() {
@@ -6541,7 +6541,7 @@ function dexieCloud(dexie) {
6541
6541
  }
6542
6542
  }
6543
6543
  // @ts-ignore
6544
- dexieCloud.version = "4.0.1-beta.56";
6544
+ dexieCloud.version = "4.0.1-beta.57";
6545
6545
  Dexie.Cloud = dexieCloud;
6546
6546
 
6547
6547
  export { dexieCloud as default, dexieCloud, getTiedObjectId, getTiedRealmId, resolveText };