dexie-cloud-addon 4.2.0-alpha.3 → 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.3, 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 { firstValueFrom, from, filter, Observable, BehaviorSubject, Subject, of,
23
23
  import { filter as filter$1, switchMap, delay, distinctUntilChanged, map, tap, take, catchError, debounceTime, startWith, skip } from 'rxjs/operators';
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) => {
@@ -6145,7 +6137,7 @@ function dexieCloud(dexie) {
6145
6137
  const syncComplete = new Subject();
6146
6138
  dexie.cloud = {
6147
6139
  // @ts-ignore
6148
- version: "4.2.0-alpha.3",
6140
+ version: "4.2.0-alpha.6",
6149
6141
  options: Object.assign({}, DEFAULT_OPTIONS),
6150
6142
  schema: null,
6151
6143
  get currentUserId() {
@@ -6462,7 +6454,7 @@ function dexieCloud(dexie) {
6462
6454
  }
6463
6455
  }
6464
6456
  // @ts-ignore
6465
- dexieCloud.version = "4.2.0-alpha.3";
6457
+ dexieCloud.version = "4.2.0-alpha.6";
6466
6458
  Dexie.Cloud = dexieCloud;
6467
6459
 
6468
6460
  export { dexieCloud as default, defineYDocTrigger, dexieCloud, getTiedObjectId, getTiedRealmId, resolveText };