@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.
|
@@ -1715,7 +1715,7 @@ var AbracadabraWS = class extends EventEmitter {
|
|
|
1715
1715
|
}
|
|
1716
1716
|
attach(provider) {
|
|
1717
1717
|
const existing = this.configuration.providerMap.get(provider.configuration.name);
|
|
1718
|
-
if (existing && existing !== provider) console.
|
|
1718
|
+
if (existing && existing !== provider) console.debug(`[AbracadabraWS] attach: replacing provider for "${provider.configuration.name}".`);
|
|
1719
1719
|
this.configuration.providerMap.set(provider.configuration.name, provider);
|
|
1720
1720
|
if (this.status === WebSocketStatus.Disconnected && this.shouldConnect) this.connect();
|
|
1721
1721
|
if (this.receivedOnOpenPayload && this.status === WebSocketStatus.Connected) provider.onOpen(this.receivedOnOpenPayload);
|
|
@@ -8577,6 +8577,14 @@ var BackgroundSyncManager = class extends EventEmitter {
|
|
|
8577
8577
|
}
|
|
8578
8578
|
async _syncNonE2EDoc(docId) {
|
|
8579
8579
|
const alreadyCached = this.rootProvider.children.has(docId);
|
|
8580
|
+
if (!alreadyCached) {
|
|
8581
|
+
if ((this.rootProvider.configuration?.websocketProvider?.configuration?.providerMap)?.has(docId)) return {
|
|
8582
|
+
docId,
|
|
8583
|
+
status: "synced",
|
|
8584
|
+
lastSynced: Date.now(),
|
|
8585
|
+
isE2E: false
|
|
8586
|
+
};
|
|
8587
|
+
}
|
|
8580
8588
|
const childProvider = await this.rootProvider.loadChild(docId);
|
|
8581
8589
|
await childProvider.ready;
|
|
8582
8590
|
await this._waitForSynced(childProvider);
|