dexie-cloud-addon 4.2.0-alpha.4 → 4.2.0-alpha.6

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.2.0-alpha.4, Fri Aug 01 2025
11
+ * Version 4.2.0-alpha.6, Fri Aug 01 2025
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -23,6 +23,7 @@ import { Encoder, writeVarString, writeAny, writeVarUint8Array, writeBigUint64,
23
23
  import { Decoder, readVarString, readAny, readVarUint8Array, readBigUint64, hasContent, readUint8 } from 'lib0/decoding';
24
24
  import * as Y from 'yjs';
25
25
  import { DexieYProvider } from 'y-dexie';
26
+ import * as awap from 'y-protocols/awareness';
26
27
 
27
28
  /******************************************************************************
28
29
  Copyright (c) Microsoft Corporation.
@@ -4590,13 +4591,6 @@ function createYClientUpdateObservable(db) {
4590
4591
  mergeMap((messages) => messages));
4591
4592
  }
4592
4593
 
4593
- function getAwarenessLibrary(db) {
4594
- var _a, _b;
4595
- if (!((_a = db.cloud.options) === null || _a === void 0 ? void 0 : _a.awarenessProtocol)) {
4596
- throw new Dexie.MissingAPIError('awarenessProtocol was not provided to db.cloud.configure(). Please import * as awarenessProtocol from "y-protocols/awareness".');
4597
- }
4598
- return (_b = db.cloud.options) === null || _b === void 0 ? void 0 : _b.awarenessProtocol;
4599
- }
4600
4594
  const awarenessWeakMap = new WeakMap();
4601
4595
  const getDocAwareness = (doc) => awarenessWeakMap.get(doc);
4602
4596
 
@@ -4795,7 +4789,6 @@ class WSConnection extends Subscription {
4795
4789
  if (doc) {
4796
4790
  const awareness = getDocAwareness(doc);
4797
4791
  if (awareness) {
4798
- const awap = getAwarenessLibrary(this.db);
4799
4792
  awap.applyAwarenessUpdate(awareness, msg.u, 'server');
4800
4793
  }
4801
4794
  }
@@ -5807,7 +5800,6 @@ function createYHandler(db) {
5807
5800
  }
5808
5801
  function createAwareness(db, doc, provider) {
5809
5802
  const { parentTable, parentId, parentProp, updatesTable } = doc.meta;
5810
- const awap = getAwarenessLibrary(db);
5811
5803
  const awareness = new awap.Awareness(doc);
5812
5804
  const reopenDocSignal = getOpenDocSignal(doc);
5813
5805
  awareness.on('update', ({ added, updated, removed }, origin) => {
@@ -5974,7 +5966,7 @@ function dexieCloud(dexie) {
5974
5966
  const syncComplete = new Subject();
5975
5967
  dexie.cloud = {
5976
5968
  // @ts-ignore
5977
- version: "4.2.0-alpha.4",
5969
+ version: "4.2.0-alpha.6",
5978
5970
  options: Object.assign({}, DEFAULT_OPTIONS),
5979
5971
  schema: null,
5980
5972
  get currentUserId() {
@@ -6291,7 +6283,7 @@ function dexieCloud(dexie) {
6291
6283
  }
6292
6284
  }
6293
6285
  // @ts-ignore
6294
- dexieCloud.version = "4.2.0-alpha.4";
6286
+ dexieCloud.version = "4.2.0-alpha.6";
6295
6287
  Dexie.Cloud = dexieCloud;
6296
6288
 
6297
6289
  // In case the SW lives for a while, let it reuse already opened connections: