@hocuspocus/extension-redis 3.3.0 → 3.3.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.
|
@@ -2,7 +2,7 @@ import type { IncomingMessage as HTTPIncomingMessage } from "node:http";
|
|
|
2
2
|
import { type CloseEvent } from "@hocuspocus/common";
|
|
3
3
|
import type WebSocket from "ws";
|
|
4
4
|
import type Document from "./Document.ts";
|
|
5
|
-
import type { beforeSyncPayload,
|
|
5
|
+
import type { beforeSyncPayload, onStatelessPayload, onTokenSyncPayload } from "./types.ts";
|
|
6
6
|
export declare class Connection {
|
|
7
7
|
webSocket: WebSocket;
|
|
8
8
|
context: any;
|
|
@@ -38,8 +38,8 @@ export declare class Connection {
|
|
|
38
38
|
*/
|
|
39
39
|
beforeSync(callback: (connection: Connection, payload: Pick<beforeSyncPayload, "type" | "payload">) => Promise<any>): Connection;
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
* Set a callback that will be triggered when on token sync message is received
|
|
42
|
+
*/
|
|
43
43
|
onTokenSyncCallback(callback: (payload: onTokenSyncPayload) => Promise<void>): Connection;
|
|
44
44
|
/**
|
|
45
45
|
* Send the given message
|
|
@@ -5,7 +5,7 @@ export declare class MessageReceiver {
|
|
|
5
5
|
message: IncomingMessage;
|
|
6
6
|
defaultTransactionOrigin?: string;
|
|
7
7
|
constructor(message: IncomingMessage, defaultTransactionOrigin?: string);
|
|
8
|
-
apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void):
|
|
9
|
-
readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean):
|
|
8
|
+
apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void;
|
|
9
|
+
readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean): 0 | 1 | 2;
|
|
10
10
|
applyQueryAwarenessMessage(document: Document, reply?: (message: Uint8Array) => void): void;
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-redis",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Scale Hocuspocus horizontally with Redis",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@types/lodash.debounce": "^4.0.6"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@hocuspocus/server": "^3.3.
|
|
34
|
+
"@hocuspocus/server": "^3.3.1",
|
|
35
35
|
"@sesamecare-oss/redlock": "^1.4.0",
|
|
36
36
|
"ioredis": "^5.6.1",
|
|
37
37
|
"kleur": "^4.1.4",
|