mindcache 3.4.4 → 3.5.1

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.
@@ -366,10 +366,12 @@ var init_CloudAdapter = __esm({
366
366
  try {
367
367
  if (typeof event.data === "string") {
368
368
  const msg = JSON.parse(event.data);
369
+ console.log("\u2601\uFE0F CloudAdapter: Received JSON message:", msg.type, msg);
369
370
  if (msg.type === "auth_success") {
370
371
  this._state = "connected";
371
372
  this.reconnectAttempts = 0;
372
373
  this.emit("connected");
374
+ console.log("\u2601\uFE0F Connected to MindCache cloud");
373
375
  } else if (msg.type === "auth_error" || msg.type === "error") {
374
376
  this._state = "error";
375
377
  this.emit("error", new Error(msg.error));
@@ -377,6 +379,7 @@ var init_CloudAdapter = __esm({
377
379
  console.debug("MindCache Cloud: Received message type:", msg.type, msg);
378
380
  }
379
381
  } else {
382
+ console.log("\u2601\uFE0F CloudAdapter: Received binary message, length:", event.data.byteLength);
380
383
  const encoder = encoding.createEncoder();
381
384
  const decoder = decoding.createDecoder(new Uint8Array(event.data));
382
385
  if (this.mindcache) {
@@ -387,6 +390,7 @@ var init_CloudAdapter = __esm({
387
390
  if (!this._synced && (messageType === 1 || messageType === 2)) {
388
391
  this._synced = true;
389
392
  this.emit("synced");
393
+ console.log("\u2601\uFE0F Synced with cloud");
390
394
  }
391
395
  }
392
396
  }