dexie-cloud-addon 4.0.8 → 4.0.12

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.
Files changed (47) hide show
  1. package/dist/modern/define-ydoc-trigger.d.ts +2 -0
  2. package/dist/modern/dexie-cloud-addon.js +21 -14
  3. package/dist/modern/dexie-cloud-addon.js.map +1 -1
  4. package/dist/modern/dexie-cloud-addon.min.js +1 -1
  5. package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
  6. package/dist/modern/service-worker.js +21 -14
  7. package/dist/modern/service-worker.js.map +1 -1
  8. package/dist/modern/service-worker.min.js +1 -1
  9. package/dist/modern/service-worker.min.js.map +1 -1
  10. package/dist/modern/sync/DEXIE_CLOUD_SYNCER_ID.d.ts +1 -0
  11. package/dist/modern/yjs/Y.d.ts +3 -0
  12. package/dist/modern/yjs/YDexieCloudSyncState.d.ts +3 -0
  13. package/dist/modern/yjs/YTable.d.ts +2 -0
  14. package/dist/modern/yjs/applyYMessages.d.ts +9 -0
  15. package/dist/modern/yjs/awareness.d.ts +4 -0
  16. package/dist/modern/yjs/createYClientUpdateObservable.d.ts +4 -0
  17. package/dist/modern/yjs/createYHandler.d.ts +5 -0
  18. package/dist/modern/yjs/downloadYDocsFromServer.d.ts +3 -0
  19. package/dist/modern/yjs/getUpdatesTable.d.ts +3 -0
  20. package/dist/modern/yjs/listUpdatesSince.d.ts +2 -0
  21. package/dist/modern/yjs/listYClientMessagesAndStateVector.d.ts +26 -0
  22. package/dist/modern/yjs/reopenDocSignal.d.ts +10 -0
  23. package/dist/modern/yjs/updateYSyncStates.d.ts +6 -0
  24. package/dist/umd/define-ydoc-trigger.d.ts +2 -0
  25. package/dist/umd/dexie-cloud-addon.js +21 -14
  26. package/dist/umd/dexie-cloud-addon.js.map +1 -1
  27. package/dist/umd/dexie-cloud-addon.min.js +1 -1
  28. package/dist/umd/dexie-cloud-addon.min.js.map +1 -1
  29. package/dist/umd/service-worker.js +21 -14
  30. package/dist/umd/service-worker.js.map +1 -1
  31. package/dist/umd/service-worker.min.js +1 -1
  32. package/dist/umd/service-worker.min.js.map +1 -1
  33. package/dist/umd/sync/DEXIE_CLOUD_SYNCER_ID.d.ts +1 -0
  34. package/dist/umd/yjs/Y.d.ts +3 -0
  35. package/dist/umd/yjs/YDexieCloudSyncState.d.ts +3 -0
  36. package/dist/umd/yjs/YTable.d.ts +2 -0
  37. package/dist/umd/yjs/applyYMessages.d.ts +9 -0
  38. package/dist/umd/yjs/awareness.d.ts +4 -0
  39. package/dist/umd/yjs/createYClientUpdateObservable.d.ts +4 -0
  40. package/dist/umd/yjs/createYHandler.d.ts +5 -0
  41. package/dist/umd/yjs/downloadYDocsFromServer.d.ts +3 -0
  42. package/dist/umd/yjs/getUpdatesTable.d.ts +3 -0
  43. package/dist/umd/yjs/listUpdatesSince.d.ts +2 -0
  44. package/dist/umd/yjs/listYClientMessagesAndStateVector.d.ts +26 -0
  45. package/dist/umd/yjs/reopenDocSignal.d.ts +10 -0
  46. package/dist/umd/yjs/updateYSyncStates.d.ts +6 -0
  47. package/package.json +2 -2
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.0.8, Tue Jun 04 2024
11
+ * Version 4.0.12, Mon Jun 09 2025
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -2827,7 +2827,7 @@
2827
2827
  },
2828
2828
  };
2829
2829
 
2830
- const bigIntDef = {
2830
+ const bigIntDef$1 = {
2831
2831
  bigint: {
2832
2832
  replace: (realVal) => {
2833
2833
  return { $t: "bigint", v: "" + realVal };
@@ -3070,7 +3070,7 @@
3070
3070
 
3071
3071
  const builtin = {
3072
3072
  ...numberDef,
3073
- ...bigIntDef,
3073
+ ...bigIntDef$1,
3074
3074
  ...DateDef,
3075
3075
  ...SetDef,
3076
3076
  ...MapDef,
@@ -3180,7 +3180,7 @@
3180
3180
  this.v = value;
3181
3181
  }
3182
3182
  }
3183
- const defs = Object.assign(Object.assign(Object.assign({}, undefinedDef), (hasBigIntSupport
3183
+ const bigIntDef = hasBigIntSupport
3184
3184
  ? {}
3185
3185
  : {
3186
3186
  bigint: {
@@ -3188,17 +3188,19 @@
3188
3188
  replace: (fakeBigInt) => {
3189
3189
  return Object.assign({ $t: 'bigint' }, fakeBigInt);
3190
3190
  },
3191
- revive: ({ v, }) => new FakeBigInt(v)
3192
- }
3193
- })), { PropModification: {
3191
+ revive: ({ v }) => new FakeBigInt(v),
3192
+ },
3193
+ };
3194
+ const defs = Object.assign(Object.assign(Object.assign({}, undefinedDef), bigIntDef), { PropModification: {
3194
3195
  test: (val) => val instanceof Dexie.PropModification,
3195
3196
  replace: (propModification) => {
3196
- return Object.assign({ $t: 'PropModification' }, propModification);
3197
+ return Object.assign({ $t: 'PropModification' }, propModification['@@propmod']);
3197
3198
  },
3198
3199
  revive: (_a) => {
3199
- var propModification = __rest(_a, ["$t"]);
3200
- return new Dexie.PropModification(propModification);
3201
- }
3200
+ var propModSpec = __rest(_a, ["$t"]) // keep the rest
3201
+ ;
3202
+ return new Dexie.PropModification(propModSpec);
3203
+ },
3202
3204
  } });
3203
3205
  const TSON = TypesonSimplified(builtin, defs);
3204
3206
  const BISON = Bison(defs);
@@ -3447,6 +3449,9 @@
3447
3449
  serverRev,
3448
3450
  };
3449
3451
  }));
3452
+ // Clean up baseRevs for tables that do not exist anymore or are no longer marked for sync
3453
+ // Resolve #2168 by also cleaning up baseRevs for tables that are not marked for sync
3454
+ yield db.$baseRevs.where('tableName').noneOf(Object.keys(schema).filter((table) => schema[table].markedForSync)).delete();
3450
3455
  });
3451
3456
  }
3452
3457
 
@@ -3652,7 +3657,9 @@
3652
3657
  //
3653
3658
  const [clientChangeSet, syncState, baseRevs] = yield db.transaction('r', db.tables, () => __awaiter(this, void 0, void 0, function* () {
3654
3659
  const syncState = yield db.getPersistedSyncState();
3655
- const baseRevs = yield db.$baseRevs.toArray();
3660
+ let baseRevs = yield db.$baseRevs.toArray();
3661
+ // Resolve #2168
3662
+ baseRevs = baseRevs.filter(br => tablesToSync.some(tbl => tbl.name === br.tableName));
3656
3663
  let clientChanges = yield listClientChanges(mutationTables);
3657
3664
  throwIfCancelled(cancelToken);
3658
3665
  if (doSyncify) {
@@ -6306,7 +6313,7 @@
6306
6313
  const syncComplete = new rxjs.Subject();
6307
6314
  dexie.cloud = {
6308
6315
  // @ts-ignore
6309
- version: "4.0.8",
6316
+ version: "4.0.12",
6310
6317
  options: Object.assign({}, DEFAULT_OPTIONS),
6311
6318
  schema: null,
6312
6319
  get currentUserId() {
@@ -6601,7 +6608,7 @@
6601
6608
  }
6602
6609
  }
6603
6610
  // @ts-ignore
6604
- dexieCloud.version = "4.0.8";
6611
+ dexieCloud.version = "4.0.12";
6605
6612
  Dexie.Cloud = dexieCloud;
6606
6613
 
6607
6614
  // In case the SW lives for a while, let it reuse already opened connections: