@hocuspocus/extension-throttle 2.7.1 → 2.8.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/packages/provider/src/HocuspocusProviderWebsocket.d.ts +0 -4
- package/dist/packages/server/src/Hocuspocus.d.ts +2 -1
- package/dist/packages/server/src/types.d.ts +6 -0
- package/dist/packages/server/src/util/debounce.d.ts +1 -1
- package/dist/tests/server/afterLoadDocument.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as mutex from 'lib0/mutex';
|
|
2
1
|
import type { MessageEvent } from 'ws';
|
|
3
2
|
import { Event } from 'ws';
|
|
4
3
|
import EventEmitter from './EventEmitter.js';
|
|
@@ -85,7 +84,6 @@ export interface CompleteHocuspocusProviderWebsocketConfiguration {
|
|
|
85
84
|
export declare class HocuspocusProviderWebsocket extends EventEmitter {
|
|
86
85
|
private messageQueue;
|
|
87
86
|
configuration: CompleteHocuspocusProviderWebsocketConfiguration;
|
|
88
|
-
subscribedToBroadcastChannel: boolean;
|
|
89
87
|
webSocket: HocusPocusWebSocket | null;
|
|
90
88
|
webSocketHandlers: {
|
|
91
89
|
[key: string]: any;
|
|
@@ -94,7 +92,6 @@ export declare class HocuspocusProviderWebsocket extends EventEmitter {
|
|
|
94
92
|
status: WebSocketStatus;
|
|
95
93
|
lastMessageReceived: number;
|
|
96
94
|
identifier: number;
|
|
97
|
-
mux: mutex.mutex;
|
|
98
95
|
intervals: any;
|
|
99
96
|
connectionAttempt: {
|
|
100
97
|
resolve: (value?: any) => void;
|
|
@@ -108,7 +105,6 @@ export declare class HocuspocusProviderWebsocket extends EventEmitter {
|
|
|
108
105
|
attach(provider: HocuspocusProvider): void;
|
|
109
106
|
detach(provider: HocuspocusProvider): void;
|
|
110
107
|
setConfiguration(configuration?: Partial<HocuspocusProviderWebsocketConfiguration>): void;
|
|
111
|
-
boundConnect: () => Promise<unknown>;
|
|
112
108
|
cancelWebsocketRetry?: () => void;
|
|
113
109
|
connect(): Promise<unknown>;
|
|
114
110
|
attachWebSocketListeners(ws: HocusPocusWebSocket, reject: Function): void;
|
|
@@ -19,6 +19,7 @@ export declare const defaultConfiguration: {
|
|
|
19
19
|
gcFilter: () => boolean;
|
|
20
20
|
};
|
|
21
21
|
unloadImmediately: boolean;
|
|
22
|
+
stopOnSignals: boolean;
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
24
25
|
* Hocuspocus Server
|
|
@@ -28,7 +29,7 @@ export declare class Hocuspocus {
|
|
|
28
29
|
documents: Map<string, Document>;
|
|
29
30
|
server?: HocuspocusServer;
|
|
30
31
|
debugger: Debugger;
|
|
31
|
-
debounce: (id: string, func: Function, debounce: number, maxDebounce: number) =>
|
|
32
|
+
debounce: (id: string, func: Function, debounce: number, maxDebounce: number) => any;
|
|
32
33
|
constructor(configuration?: Partial<Configuration>);
|
|
33
34
|
/**
|
|
34
35
|
* Configure the server
|
|
@@ -116,6 +116,12 @@ export interface Configuration extends Extension {
|
|
|
116
116
|
* your onStoreDocument is rate-limited.
|
|
117
117
|
*/
|
|
118
118
|
unloadImmediately: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* the server will gracefully stop if SIGINT, SIGQUIT or SIGTERM is received.
|
|
121
|
+
*
|
|
122
|
+
* Set this to false if you don't want that.
|
|
123
|
+
*/
|
|
124
|
+
stopOnSignals: boolean;
|
|
119
125
|
/**
|
|
120
126
|
* options to pass to the ydoc document
|
|
121
127
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useDebounce: () => (id: string, func: Function, debounce: number, maxDebounce: number) =>
|
|
1
|
+
export declare const useDebounce: () => (id: string, func: Function, debounce: number, maxDebounce: number) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-throttle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "hocuspocus throttle extension",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@hocuspocus/server": "^2.
|
|
31
|
+
"@hocuspocus/server": "^2.8.1"
|
|
32
32
|
},
|
|
33
33
|
"gitHead": "b3454a4ca289a84ddfb7fa5607a2d4b8d5c37e9d"
|
|
34
34
|
}
|