dexie-cloud-addon 4.1.0-beta.48 → 4.1.0-beta.49

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.1.0-beta.48, Tue Jun 03 2025
11
+ * Version 4.1.0-beta.49, Wed Jun 11 2025
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -4570,6 +4570,9 @@ function updateBaseRevs(db, schema, latestRevisions, serverRev) {
4570
4570
  serverRev,
4571
4571
  };
4572
4572
  }));
4573
+ // Clean up baseRevs for tables that do not exist anymore or are no longer marked for sync
4574
+ // Resolve #2168 by also cleaning up baseRevs for tables that are not marked for sync
4575
+ yield db.$baseRevs.where('tableName').noneOf(Object.keys(schema).filter((table) => schema[table].markedForSync)).delete();
4573
4576
  });
4574
4577
  }
4575
4578
 
@@ -5181,7 +5184,9 @@ function _sync(db_1, options_1, schema_1) {
5181
5184
  //
5182
5185
  const [clientChangeSet, syncState, baseRevs, { yMessages, lastUpdateIds }] = yield db.transaction('r', db.tables, () => __awaiter(this, void 0, void 0, function* () {
5183
5186
  const syncState = yield db.getPersistedSyncState();
5184
- const baseRevs = yield db.$baseRevs.toArray();
5187
+ let baseRevs = yield db.$baseRevs.toArray();
5188
+ // Resolve #2168
5189
+ baseRevs = baseRevs.filter(br => tablesToSync.some(tbl => tbl.name === br.tableName));
5185
5190
  let clientChanges = yield listClientChanges(mutationTables, db);
5186
5191
  const yResults = yield listYClientMessagesAndStateVector(db, tablesToSync);
5187
5192
  throwIfCancelled(cancelToken);
@@ -8279,7 +8284,7 @@ function dexieCloud(dexie) {
8279
8284
  const syncComplete = new Subject();
8280
8285
  dexie.cloud = {
8281
8286
  // @ts-ignore
8282
- version: "4.1.0-beta.48",
8287
+ version: "4.1.0-beta.49",
8283
8288
  options: Object.assign({}, DEFAULT_OPTIONS),
8284
8289
  schema: null,
8285
8290
  get currentUserId() {
@@ -8597,7 +8602,7 @@ function dexieCloud(dexie) {
8597
8602
  }
8598
8603
  }
8599
8604
  // @ts-ignore
8600
- dexieCloud.version = "4.1.0-beta.48";
8605
+ dexieCloud.version = "4.1.0-beta.49";
8601
8606
  Dexie.Cloud = dexieCloud;
8602
8607
 
8603
8608
  // In case the SW lives for a while, let it reuse already opened connections: