dexie-cloud-addon 4.4.9 → 4.4.11

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.4.9, Tue Mar 31 2026
11
+ * Version 4.4.11, Sun Apr 19 2026
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -14493,7 +14493,7 @@
14493
14493
  *
14494
14494
  * ==========================================================================
14495
14495
  *
14496
- * Version 4.4.0, Tue Mar 31 2026
14496
+ * Version 4.4.0, Sun Apr 19 2026
14497
14497
  *
14498
14498
  * https://dexie.org
14499
14499
  *
@@ -17172,8 +17172,20 @@
17172
17172
  * each onNext callback, ensuring cursor.value is always available.
17173
17173
  */
17174
17174
  function createBlobResolvingCursor(cursor, table, blobSavingQueue, db) {
17175
- // Create wrapped cursor using Object.create() - inherits everything
17175
+ // Create wrapped cursor using Object.create() - inherits everything.
17176
+ // Important: .key and .primaryKey must be explicitly overridden with
17177
+ // closure-based getters to prevent native IDBCursorWithValue getters from
17178
+ // being reached through the prototype chain with a wrong `this`, which
17179
+ // throws "Illegal invocation" in Chrome 146+.
17176
17180
  const wrappedCursor = Object.create(cursor, {
17181
+ key: {
17182
+ get() { return cursor.key; },
17183
+ configurable: true,
17184
+ },
17185
+ primaryKey: {
17186
+ get() { return cursor.primaryKey; },
17187
+ configurable: true,
17188
+ },
17177
17189
  value: {
17178
17190
  value: cursor.value,
17179
17191
  enumerable: true,
@@ -18101,8 +18113,7 @@
18101
18113
  throw new Error(`No database URL to connect WebSocket to`);
18102
18114
  }
18103
18115
  const readyForChangesMessage = db.messageConsumer.readyToServe.pipe(operators.filter((isReady) => isReady), // When consumer is ready for new messages, produce such a message to inform server about it
18104
- operators.switchMap(() => db.cloud.persistedSyncState.pipe(operators.filter((syncState) => !!(syncState && syncState.serverRevision)), operators.take(1))), // Wait reactively for syncState with serverRevision (avoids race with logout/re-sync)
18105
- operators.switchMap((syncState) => __awaiter(this, void 0, void 0, function* () {
18116
+ operators.switchMap(() => db.getPersistedSyncState()), operators.filter((syncState) => !!(syncState && syncState.serverRevision)), operators.switchMap((syncState) => __awaiter(this, void 0, void 0, function* () {
18106
18117
  return ({
18107
18118
  // Produce the message to trigger server to send us new messages to consume:
18108
18119
  type: 'ready',
@@ -19730,7 +19741,7 @@
19730
19741
  const downloading$ = createDownloadingState();
19731
19742
  dexie.cloud = {
19732
19743
  // @ts-ignore
19733
- version: "4.4.9",
19744
+ version: "4.4.11",
19734
19745
  options: Object.assign({}, DEFAULT_OPTIONS),
19735
19746
  schema: null,
19736
19747
  get currentUserId() {
@@ -20175,7 +20186,7 @@
20175
20186
  }
20176
20187
  }
20177
20188
  // @ts-ignore
20178
- dexieCloud.version = "4.4.9";
20189
+ dexieCloud.version = "4.4.11";
20179
20190
  Dexie.Cloud = dexieCloud;
20180
20191
 
20181
20192
  exports.default = dexieCloud;