@inditextech/weave-store-websockets 3.9.0-SNAPSHOT.186.1 → 3.9.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.
- package/dist/client.stats.html +4950 -0
- package/dist/server.js +10 -5
- package/dist/server.stats.html +4950 -0
- package/package.json +5 -9
package/dist/server.js
CHANGED
|
@@ -257,12 +257,10 @@ var Emittery = class Emittery {
|
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
once(eventNames
|
|
261
|
-
if (predicate !== void 0 && typeof predicate !== "function") throw new TypeError("predicate must be a function");
|
|
260
|
+
once(eventNames) {
|
|
262
261
|
let off_;
|
|
263
262
|
const promise = new Promise((resolve) => {
|
|
264
263
|
off_ = this.on(eventNames, (data) => {
|
|
265
|
-
if (predicate && !predicate(data)) return;
|
|
266
264
|
off_();
|
|
267
265
|
resolve(data);
|
|
268
266
|
});
|
|
@@ -295,11 +293,10 @@ var Emittery = class Emittery {
|
|
|
295
293
|
assertEventName(eventName);
|
|
296
294
|
if (isMetaEvent(eventName) && !canEmitMetaEvents) throw new TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");
|
|
297
295
|
this.logIfDebugEnabled("emitSerial", eventName, eventData);
|
|
298
|
-
enqueueProducers(this, eventName, eventData);
|
|
299
296
|
const listeners = getListeners(this, eventName) ?? new Set();
|
|
300
297
|
const anyListeners = anyMap.get(this);
|
|
301
298
|
const staticListeners = [...listeners];
|
|
302
|
-
const staticAnyListeners =
|
|
299
|
+
const staticAnyListeners = [...anyListeners];
|
|
303
300
|
await resolvedPromise;
|
|
304
301
|
for (const listener of staticListeners) if (listeners.has(listener)) await listener(eventData);
|
|
305
302
|
for (const listener of staticAnyListeners) if (anyListeners.has(listener)) await listener(eventName, eventData);
|
|
@@ -1917,6 +1914,14 @@ var WSSharedDoc = class extends yjs_default.Doc {
|
|
|
1917
1914
|
});
|
|
1918
1915
|
}
|
|
1919
1916
|
}
|
|
1917
|
+
destroy() {
|
|
1918
|
+
this.conns.forEach((_, conn) => {
|
|
1919
|
+
conn.close();
|
|
1920
|
+
});
|
|
1921
|
+
this.conns.clear();
|
|
1922
|
+
this.awareness.destroy();
|
|
1923
|
+
this.destroy();
|
|
1924
|
+
}
|
|
1920
1925
|
};
|
|
1921
1926
|
const getYDoc = (docName, initialState, horizontalSyncHandler, gc = true) => setIfUndefined(docs, docName, async () => {
|
|
1922
1927
|
let documentData = void 0;
|