dexie-cloud-addon 4.0.5 → 4.0.7

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.5, Sat May 04 2024
11
+ * Version 4.0.7, Sun May 26 2024
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -4711,6 +4711,10 @@
4711
4711
  }
4712
4712
  const trans = req.trans;
4713
4713
  if ((_b = (_a = db.cloud.schema) === null || _a === void 0 ? void 0 : _a[tableName]) === null || _b === void 0 ? void 0 : _b.markedForSync) {
4714
+ if (trans.mode === 'versionchange') {
4715
+ // Don't mutate tables marked for sync in versionchange transactions.
4716
+ return Promise.reject(new Dexie.UpgradeError(`Dexie Cloud Addon: Cannot upgrade or populate synced table "${tableName}". See https://dexie.org/cloud/docs/best-practices`));
4717
+ }
4714
4718
  if (req.type === 'add' || req.type === 'put') {
4715
4719
  if (tableName === 'members') {
4716
4720
  for (const member of req.values) {
@@ -5024,6 +5028,9 @@
5024
5028
  txid,
5025
5029
  userId,
5026
5030
  };
5031
+ if ('isAdditionalChunk' in req && req.isAdditionalChunk) {
5032
+ mut.isAdditionalChunk = true;
5033
+ }
5027
5034
  return keys.length > 0 || ('criteria' in req && req.criteria)
5028
5035
  ? mutsTable
5029
5036
  .mutate({ type: 'add', trans, values: [mut] }) // Log entry
@@ -6313,7 +6320,7 @@
6313
6320
  const syncComplete = new rxjs.Subject();
6314
6321
  dexie.cloud = {
6315
6322
  // @ts-ignore
6316
- version: "4.0.5",
6323
+ version: "4.0.7",
6317
6324
  options: Object.assign({}, DEFAULT_OPTIONS),
6318
6325
  schema: null,
6319
6326
  get currentUserId() {
@@ -6597,7 +6604,7 @@
6597
6604
  }
6598
6605
  }
6599
6606
  // @ts-ignore
6600
- dexieCloud.version = "4.0.5";
6607
+ dexieCloud.version = "4.0.7";
6601
6608
  Dexie.Cloud = dexieCloud;
6602
6609
 
6603
6610
  exports.default = dexieCloud;