dexie-cloud-addon 4.1.0-alpha.6 → 4.1.0-alpha.9

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.6, Tue Oct 15 2024
11
+ * Version 4.1.0-alpha.9, Tue Oct 15 2024
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -17,7 +17,7 @@
17
17
  */
18
18
 
19
19
  import Dexie, { PropModification, cmp, DexieYProvider, liveQuery } from 'dexie';
20
- import { firstValueFrom, from as from$1, filter as filter$1, Observable as Observable$1, BehaviorSubject, Subject, fromEvent, of, merge, mergeMap as mergeMap$1, Subscription as Subscription$1, throwError, combineLatest, map as map$1, share, timer as timer$1 } from 'rxjs';
20
+ import { firstValueFrom, from as from$1, filter as filter$1, Observable as Observable$1, BehaviorSubject, Subject, fromEvent, of, merge, mergeMap as mergeMap$1, tap as tap$1, Subscription as Subscription$1, throwError, combineLatest, map as map$1, share, timer as timer$1 } from 'rxjs';
21
21
 
22
22
  /******************************************************************************
23
23
  Copyright (c) Microsoft Corporation.
@@ -6667,7 +6667,9 @@ function createYClientUpdateObservable(db) {
6667
6667
  // If messageProducer emits empty array, nothing is emitted
6668
6668
  // but if messageProducer emits array of messages, they are
6669
6669
  // emitted one by one.
6670
- mergeMap$1((messages) => messages));
6670
+ mergeMap$1((messages) => messages), tap$1(message => {
6671
+ console.debug('dexie-cloud emitting y-c', message);
6672
+ }));
6671
6673
  }
6672
6674
 
6673
6675
  function getAwarenessLibrary(db) {
@@ -6833,12 +6835,12 @@ class WSConnection extends Subscription$1 {
6833
6835
  ws.onmessage = (event) => {
6834
6836
  if (!this.pinger)
6835
6837
  return;
6836
- console.debug('dexie-cloud WebSocket onmessage', event.data);
6837
6838
  this.lastServerActivity = new Date();
6838
6839
  try {
6839
6840
  const msg = typeof event.data === 'string'
6840
6841
  ? TSON.parse(event.data)
6841
6842
  : decodeYMessage(new Uint8Array(event.data));
6843
+ console.debug('dexie-cloud WebSocket onmessage', msg.type, msg);
6842
6844
  if (msg.type === 'error') {
6843
6845
  throw new Error(`Error message from dexie-cloud: ${msg.error}`);
6844
6846
  }
@@ -6894,6 +6896,7 @@ class WSConnection extends Subscription$1 {
6894
6896
  this.webSocketStatus.value !== 'connected') {
6895
6897
  this.webSocketStatus.next('connected');
6896
6898
  }
6899
+ console.debug('dexie-cloud WebSocket send', msg.type, msg);
6897
6900
  if (msg.type === 'ready') {
6898
6901
  (_a = this.ws) === null || _a === void 0 ? void 0 : _a.send(TSON.stringify(msg));
6899
6902
  }
@@ -7963,7 +7966,7 @@ function dexieCloud(dexie) {
7963
7966
  const syncComplete = new Subject();
7964
7967
  dexie.cloud = {
7965
7968
  // @ts-ignore
7966
- version: "4.1.0-alpha.6",
7969
+ version: "4.1.0-alpha.9",
7967
7970
  options: Object.assign({}, DEFAULT_OPTIONS),
7968
7971
  schema: null,
7969
7972
  get currentUserId() {
@@ -8265,7 +8268,7 @@ function dexieCloud(dexie) {
8265
8268
  }
8266
8269
  }
8267
8270
  // @ts-ignore
8268
- dexieCloud.version = "4.1.0-alpha.6";
8271
+ dexieCloud.version = "4.1.0-alpha.9";
8269
8272
  Dexie.Cloud = dexieCloud;
8270
8273
 
8271
8274
  export { dexieCloud as default, dexieCloud, getTiedObjectId, getTiedRealmId, resolveText };