@hocuspocus/provider 2.12.2-rc.0 → 2.12.3
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/hocuspocus-provider.cjs +4 -3
- package/dist/hocuspocus-provider.cjs.map +1 -1
- package/dist/hocuspocus-provider.esm.js +4 -3
- package/dist/hocuspocus-provider.esm.js.map +1 -1
- package/dist/packages/extension-redis/src/Redis.d.ts +1 -1
- package/package.json +2 -2
- package/src/HocuspocusProvider.ts +6 -3
|
@@ -93,7 +93,7 @@ export declare class Redis implements Extension {
|
|
|
93
93
|
/**
|
|
94
94
|
* Release the Redis lock, so other instances can store documents.
|
|
95
95
|
*/
|
|
96
|
-
afterStoreDocument({ documentName }: afterStoreDocumentPayload): Promise<void>;
|
|
96
|
+
afterStoreDocument({ documentName, socketId }: afterStoreDocumentPayload): Promise<void>;
|
|
97
97
|
/**
|
|
98
98
|
* Handle awareness update messages received directly by this Hocuspocus instance.
|
|
99
99
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/provider",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.3",
|
|
4
4
|
"description": "hocuspocus provider",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@hocuspocus/common": "^2.12.
|
|
32
|
+
"@hocuspocus/common": "^2.12.3",
|
|
33
33
|
"@lifeomic/attempt": "^3.0.2",
|
|
34
34
|
"lib0": "^0.2.87",
|
|
35
35
|
"ws": "^8.14.2"
|
|
@@ -216,7 +216,10 @@ export class HocuspocusProvider extends EventEmitter {
|
|
|
216
216
|
this.awareness?.on('update', this.awarenessUpdateHandler.bind(this))
|
|
217
217
|
this.registerEventListeners()
|
|
218
218
|
|
|
219
|
-
if (
|
|
219
|
+
if (
|
|
220
|
+
this.configuration.forceSyncInterval
|
|
221
|
+
&& typeof this.configuration.forceSyncInterval === 'number'
|
|
222
|
+
) {
|
|
220
223
|
this.intervals.forceSync = setInterval(
|
|
221
224
|
this.forceSync.bind(this),
|
|
222
225
|
this.configuration.forceSyncInterval,
|
|
@@ -303,7 +306,7 @@ export class HocuspocusProvider extends EventEmitter {
|
|
|
303
306
|
}
|
|
304
307
|
|
|
305
308
|
registerEventListeners() {
|
|
306
|
-
if (typeof window === 'undefined') {
|
|
309
|
+
if (typeof window === 'undefined' || !('addEventListener' in window)) {
|
|
307
310
|
return
|
|
308
311
|
}
|
|
309
312
|
|
|
@@ -503,7 +506,7 @@ export class HocuspocusProvider extends EventEmitter {
|
|
|
503
506
|
this.send(CloseMessage, { documentName: this.configuration.name })
|
|
504
507
|
this.disconnect()
|
|
505
508
|
|
|
506
|
-
if (typeof window === 'undefined') {
|
|
509
|
+
if (typeof window === 'undefined' || !('removeEventListener' in window)) {
|
|
507
510
|
return
|
|
508
511
|
}
|
|
509
512
|
|