dexie-cloud-addon 4.1.0-alpha.13 → 4.1.0-alpha.15

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-alpha.13, Thu Oct 17 2024
11
+ * Version 4.1.0-alpha.15, Fri Oct 18 2024
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -8093,7 +8093,7 @@ function dexieCloud(dexie) {
8093
8093
  const syncComplete = new Subject();
8094
8094
  dexie.cloud = {
8095
8095
  // @ts-ignore
8096
- version: "4.1.0-alpha.13",
8096
+ version: "4.1.0-alpha.15",
8097
8097
  options: Object.assign({}, DEFAULT_OPTIONS),
8098
8098
  schema: null,
8099
8099
  get currentUserId() {
@@ -8395,7 +8395,7 @@ function dexieCloud(dexie) {
8395
8395
  }
8396
8396
  }
8397
8397
  // @ts-ignore
8398
- dexieCloud.version = "4.1.0-alpha.13";
8398
+ dexieCloud.version = "4.1.0-alpha.15";
8399
8399
  Dexie.Cloud = dexieCloud;
8400
8400
 
8401
8401
  const ydocTriggers = {};
@@ -8429,7 +8429,7 @@ const createMiddleware = (db) => ({
8429
8429
  }
8430
8430
  }
8431
8431
  else {
8432
- enqueueTrigger(tblName, primaryKey, trigger);
8432
+ enqueueTrigger(db, tblName, primaryKey, trigger);
8433
8433
  }
8434
8434
  }
8435
8435
  break;
@@ -8452,7 +8452,7 @@ const createMiddleware = (db) => ({
8452
8452
  keySet.addKey(k);
8453
8453
  }
8454
8454
  for (const key of keySet) {
8455
- enqueueTrigger(tblName, key, trigger);
8455
+ enqueueTrigger(db, tblName, key, trigger);
8456
8456
  }
8457
8457
  });
8458
8458
  }
@@ -8483,7 +8483,7 @@ function executeTriggers(triggersToRun) {
8483
8483
  const Y = $Y(db);
8484
8484
  const yDoc = new Y.Doc();
8485
8485
  for (const update of updates) {
8486
- Y.applyUpdateV2(yDoc, update);
8486
+ Y.applyUpdateV2(yDoc, update.u);
8487
8487
  }
8488
8488
  try {
8489
8489
  yield trigger(yDoc, parentId);
@@ -8494,11 +8494,12 @@ function executeTriggers(triggersToRun) {
8494
8494
  }
8495
8495
  });
8496
8496
  }
8497
- function enqueueTrigger(updatesTable, parentId, trigger) {
8498
- var _a;
8499
- ((_a = scheduledTriggers[updatesTable]) !== null && _a !== void 0 ? _a : (scheduledTriggers[updatesTable] = [])).push({
8497
+ function enqueueTrigger(db, updatesTable, parentId, trigger) {
8498
+ scheduledTriggers.push({
8499
+ db,
8500
8500
  parentId,
8501
8501
  trigger,
8502
+ updatesTable
8502
8503
  });
8503
8504
  }
8504
8505
  function onTransactionCommitted() {