@hocuspocus/extension-redis 2.3.1 → 2.4.0-rc.0
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.
|
@@ -21,8 +21,13 @@ export interface CompleteHocuspocusProviderConfiguration {
|
|
|
21
21
|
broadcast: boolean;
|
|
22
22
|
/**
|
|
23
23
|
* An Awareness instance to keep the presence state of all clients.
|
|
24
|
+
*
|
|
25
|
+
* You can disable sharing awareness information by passing `null`.
|
|
26
|
+
* Note that having no awareness information shared across all connections will break our ping checks
|
|
27
|
+
* and thus trigger reconnects. You should always have at least one Provider with enabled awareness per
|
|
28
|
+
* socket connection, or ensure that the Provider receives messages before running into `HocuspocusProviderWebsocket.messageReconnectTimeout`.
|
|
24
29
|
*/
|
|
25
|
-
awareness: Awareness;
|
|
30
|
+
awareness: Awareness | null;
|
|
26
31
|
/**
|
|
27
32
|
* A token that’s sent to the backend for authentication purposes.
|
|
28
33
|
*/
|
|
@@ -68,6 +73,9 @@ export interface CompleteHocuspocusProviderConfiguration {
|
|
|
68
73
|
*/
|
|
69
74
|
preserveConnection: boolean;
|
|
70
75
|
}
|
|
76
|
+
export declare class AwarenessError extends Error {
|
|
77
|
+
code: number;
|
|
78
|
+
}
|
|
71
79
|
export declare class HocuspocusProvider extends EventEmitter {
|
|
72
80
|
configuration: CompleteHocuspocusProviderConfiguration;
|
|
73
81
|
subscribedToBroadcastChannel: boolean;
|
|
@@ -94,7 +102,7 @@ export declare class HocuspocusProvider extends EventEmitter {
|
|
|
94
102
|
onStatus({ status }: onStatusParameters): void;
|
|
95
103
|
setConfiguration(configuration?: Partial<HocuspocusProviderConfiguration>): void;
|
|
96
104
|
get document(): Y.Doc;
|
|
97
|
-
get awareness(): Awareness;
|
|
105
|
+
get awareness(): Awareness | null;
|
|
98
106
|
get hasUnsyncedChanges(): boolean;
|
|
99
107
|
incrementUnsyncedChanges(): void;
|
|
100
108
|
decrementUnsyncedChanges(): void;
|
|
@@ -24,7 +24,7 @@ export declare class Document extends Doc {
|
|
|
24
24
|
*/
|
|
25
25
|
constructor(name: string, logger: Debugger, yDocOptions: {});
|
|
26
26
|
/**
|
|
27
|
-
* Check if the Document is empty
|
|
27
|
+
* Check if the Document (XMLFragment or Map) is empty
|
|
28
28
|
*/
|
|
29
29
|
isEmpty(fieldName: string): boolean;
|
|
30
30
|
/**
|
|
@@ -7,10 +7,13 @@ export declare class IncomingMessage {
|
|
|
7
7
|
*/
|
|
8
8
|
decoder: Decoder;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Private encoder; can be undefined.
|
|
11
|
+
*
|
|
12
|
+
* Lazy creation of the encoder speeds up IncomingMessages that need only a decoder.
|
|
11
13
|
*/
|
|
12
|
-
|
|
14
|
+
private encoderInternal?;
|
|
13
15
|
constructor(input: any);
|
|
16
|
+
get encoder(): Encoder;
|
|
14
17
|
readVarUint8Array(): Uint8Array;
|
|
15
18
|
readVarUint(): number;
|
|
16
19
|
readVarString(): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-redis",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0-rc.0",
|
|
4
4
|
"description": "Scale Hocuspocus horizontally with Redis",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/redlock": "^4.0.3"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@hocuspocus/server": "^2.
|
|
36
|
+
"@hocuspocus/server": "^2.4.0-rc.0",
|
|
37
37
|
"ioredis": "^4.28.2",
|
|
38
38
|
"kleur": "^4.1.4",
|
|
39
39
|
"lodash.debounce": "^4.0.8",
|