@abraca/dabra 1.0.19 → 1.0.20

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.
@@ -1745,7 +1745,7 @@ var AbracadabraWS = class extends EventEmitter {
1745
1745
  }
1746
1746
  attach(provider) {
1747
1747
  const existing = this.configuration.providerMap.get(provider.configuration.name);
1748
- if (existing && existing !== provider) console.warn(`[AbracadabraWS] attach: overwriting provider for "${provider.configuration.name}". This may indicate a duplicate loadChild for the same document.`);
1748
+ if (existing && existing !== provider) console.debug(`[AbracadabraWS] attach: replacing provider for "${provider.configuration.name}".`);
1749
1749
  this.configuration.providerMap.set(provider.configuration.name, provider);
1750
1750
  if (this.status === WebSocketStatus.Disconnected && this.shouldConnect) this.connect();
1751
1751
  if (this.receivedOnOpenPayload && this.status === WebSocketStatus.Connected) provider.onOpen(this.receivedOnOpenPayload);
@@ -8629,6 +8629,14 @@ var BackgroundSyncManager = class extends EventEmitter {
8629
8629
  }
8630
8630
  async _syncNonE2EDoc(docId) {
8631
8631
  const alreadyCached = this.rootProvider.children.has(docId);
8632
+ if (!alreadyCached) {
8633
+ if ((this.rootProvider.configuration?.websocketProvider?.configuration?.providerMap)?.has(docId)) return {
8634
+ docId,
8635
+ status: "synced",
8636
+ lastSynced: Date.now(),
8637
+ isE2E: false
8638
+ };
8639
+ }
8632
8640
  const childProvider = await this.rootProvider.loadChild(docId);
8633
8641
  await childProvider.ready;
8634
8642
  await this._waitForSynced(childProvider);