@hocuspocus/extension-redis 1.0.0-alpha.48 → 1.0.0-alpha.49
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onLoadDocumentPayload, onDestroyPayload, onDisconnectPayload,
|
|
1
|
+
import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onLoadDocumentPayload, onDestroyPayload, onDisconnectPayload, onRequestPayload, onUpgradePayload } from '@hocuspocus/server';
|
|
2
2
|
export interface LoggerConfiguration {
|
|
3
3
|
/**
|
|
4
4
|
* Prepend all logging message with a string.
|
|
@@ -30,10 +30,6 @@ export interface LoggerConfiguration {
|
|
|
30
30
|
* Whether to log something for the `onRequest` hook.
|
|
31
31
|
*/
|
|
32
32
|
onRequest: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Whether to log something for the `onListen` hook.
|
|
35
|
-
*/
|
|
36
|
-
onListen: boolean;
|
|
37
33
|
/**
|
|
38
34
|
* Whether to log something for the `onDestroy` hook.
|
|
39
35
|
*/
|
|
@@ -54,15 +50,13 @@ export declare class Logger implements Extension {
|
|
|
54
50
|
* Constructor
|
|
55
51
|
*/
|
|
56
52
|
constructor(configuration?: Partial<LoggerConfiguration>);
|
|
53
|
+
onConfigure(data: onConfigurePayload): Promise<void>;
|
|
57
54
|
onLoadDocument(data: onLoadDocumentPayload): Promise<void>;
|
|
58
55
|
onChange(data: onChangePayload): Promise<void>;
|
|
59
56
|
onConnect(data: onConnectPayload): Promise<void>;
|
|
60
57
|
onDisconnect(data: onDisconnectPayload): Promise<void>;
|
|
61
58
|
onUpgrade(data: onUpgradePayload): Promise<void>;
|
|
62
59
|
onRequest(data: onRequestPayload): Promise<void>;
|
|
63
|
-
onListen(data: onListenPayload): Promise<void>;
|
|
64
60
|
onDestroy(data: onDestroyPayload): Promise<void>;
|
|
65
|
-
onConfigure(data: onConfigurePayload): Promise<void>;
|
|
66
|
-
private logRawText;
|
|
67
61
|
private log;
|
|
68
62
|
}
|
|
@@ -3,13 +3,15 @@ import WebSocket, { WebSocketServer } from 'ws';
|
|
|
3
3
|
import { IncomingMessage, Server as HTTPServer } from 'http';
|
|
4
4
|
import { Configuration, Hook } from './types';
|
|
5
5
|
import { MessageLogger } from './Debugger';
|
|
6
|
+
import { onListenPayload } from '.';
|
|
6
7
|
export declare const defaultConfiguration: {
|
|
7
8
|
name: null;
|
|
8
9
|
port: number;
|
|
9
10
|
timeout: number;
|
|
11
|
+
quiet: boolean;
|
|
10
12
|
};
|
|
11
13
|
/**
|
|
12
|
-
* Hocuspocus
|
|
14
|
+
* Hocuspocus Server
|
|
13
15
|
*/
|
|
14
16
|
export declare class Hocuspocus {
|
|
15
17
|
configuration: Configuration;
|
|
@@ -25,7 +27,8 @@ export declare class Hocuspocus {
|
|
|
25
27
|
/**
|
|
26
28
|
* Start the server
|
|
27
29
|
*/
|
|
28
|
-
listen(): Promise<void>;
|
|
30
|
+
listen(portOrCallback?: number | ((data: onListenPayload) => Promise<any>) | null, callback?: any): Promise<void>;
|
|
31
|
+
private showStartScreen;
|
|
29
32
|
/**
|
|
30
33
|
* Get the total number of active documents
|
|
31
34
|
*/
|
|
@@ -67,6 +67,10 @@ export interface Configuration extends Extension {
|
|
|
67
67
|
* Defines in which interval the server sends a ping, and closes the connection when no pong is sent back.
|
|
68
68
|
*/
|
|
69
69
|
timeout: number;
|
|
70
|
+
/**
|
|
71
|
+
* By default, the servers show a start screen. If passed false, the server will start quietly.
|
|
72
|
+
*/
|
|
73
|
+
quiet: boolean;
|
|
70
74
|
/**
|
|
71
75
|
* Function which returns the (customized) document name based on the request
|
|
72
76
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-redis",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.49",
|
|
4
4
|
"description": "hocuspocus persistence driver for Redis",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@hocuspocus/server": "^1.0.0-alpha.
|
|
30
|
+
"@hocuspocus/server": "^1.0.0-alpha.86",
|
|
31
31
|
"y-redis": "^1.0.2",
|
|
32
32
|
"yjs": "^13.5.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "505fc82451201ef77847dc5bc9e92edb498dcb8e"
|
|
35
35
|
}
|