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
  *
@@ -6204,8 +6204,20 @@ function createBlobResolveMiddleware(db) {
6204
6204
  * each onNext callback, ensuring cursor.value is always available.
6205
6205
  */
6206
6206
  function createBlobResolvingCursor(cursor, table, blobSavingQueue, db) {
6207
- // Create wrapped cursor using Object.create() - inherits everything
6207
+ // Create wrapped cursor using Object.create() - inherits everything.
6208
+ // Important: .key and .primaryKey must be explicitly overridden with
6209
+ // closure-based getters to prevent native IDBCursorWithValue getters from
6210
+ // being reached through the prototype chain with a wrong `this`, which
6211
+ // throws "Illegal invocation" in Chrome 146+.
6208
6212
  const wrappedCursor = Object.create(cursor, {
6213
+ key: {
6214
+ get() { return cursor.key; },
6215
+ configurable: true,
6216
+ },
6217
+ primaryKey: {
6218
+ get() { return cursor.primaryKey; },
6219
+ configurable: true,
6220
+ },
6209
6221
  value: {
6210
6222
  value: cursor.value,
6211
6223
  enumerable: true,
@@ -6871,8 +6883,7 @@ function connectWebSocket(db) {
6871
6883
  throw new Error(`No database URL to connect WebSocket to`);
6872
6884
  }
6873
6885
  const readyForChangesMessage = db.messageConsumer.readyToServe.pipe(filter$1((isReady) => isReady), // When consumer is ready for new messages, produce such a message to inform server about it
6874
- switchMap(() => db.cloud.persistedSyncState.pipe(filter$1((syncState) => !!(syncState && syncState.serverRevision)), take(1))), // Wait reactively for syncState with serverRevision (avoids race with logout/re-sync)
6875
- switchMap((syncState) => __awaiter(this, void 0, void 0, function* () {
6886
+ switchMap(() => db.getPersistedSyncState()), filter$1((syncState) => !!(syncState && syncState.serverRevision)), switchMap((syncState) => __awaiter(this, void 0, void 0, function* () {
6876
6887
  return ({
6877
6888
  // Produce the message to trigger server to send us new messages to consume:
6878
6889
  type: 'ready',
@@ -8500,7 +8511,7 @@ function dexieCloud(dexie) {
8500
8511
  const downloading$ = createDownloadingState();
8501
8512
  dexie.cloud = {
8502
8513
  // @ts-ignore
8503
- version: "4.4.9",
8514
+ version: "4.4.11",
8504
8515
  options: Object.assign({}, DEFAULT_OPTIONS),
8505
8516
  schema: null,
8506
8517
  get currentUserId() {
@@ -8945,7 +8956,7 @@ function dexieCloud(dexie) {
8945
8956
  }
8946
8957
  }
8947
8958
  // @ts-ignore
8948
- dexieCloud.version = "4.4.9";
8959
+ dexieCloud.version = "4.4.11";
8949
8960
  Dexie.Cloud = dexieCloud;
8950
8961
 
8951
8962
  export { dexieCloud as default, defineYDocTrigger, dexieCloud, getTiedObjectId, getTiedRealmId, resolveText };