@hocuspocus/extension-redis 1.0.0-alpha.41 → 1.0.0-alpha.42
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,10 +2,53 @@ import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onLoa
|
|
|
2
2
|
export interface LoggerConfiguration {
|
|
3
3
|
/**
|
|
4
4
|
* Prepend all logging message with a string.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated
|
|
5
7
|
*/
|
|
6
8
|
prefix: null | string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to log something for the `onLoadDocument` hook.
|
|
11
|
+
*/
|
|
12
|
+
onLoadDocument: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to log something for the `onChange` hook.
|
|
15
|
+
*/
|
|
16
|
+
onChange: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to log something for the `onConnect` hook.
|
|
19
|
+
*/
|
|
20
|
+
onConnect: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether to log something for the `onDisconnect` hook.
|
|
23
|
+
*/
|
|
24
|
+
onDisconnect: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to log something for the `onUpgrade` hook.
|
|
27
|
+
*/
|
|
28
|
+
onUpgrade: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to log something for the `onRequest` hook.
|
|
31
|
+
*/
|
|
32
|
+
onRequest: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to log something for the `onListen` hook.
|
|
35
|
+
*/
|
|
36
|
+
onListen: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to log something for the `onDestroy` hook.
|
|
39
|
+
*/
|
|
40
|
+
onDestroy: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether to log something for the `onConfigure` hook.
|
|
43
|
+
*/
|
|
44
|
+
onConfigure: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* A log function, if none is provided output will go to console
|
|
47
|
+
*/
|
|
48
|
+
log: (...args: any[]) => void;
|
|
7
49
|
}
|
|
8
50
|
export declare class Logger implements Extension {
|
|
51
|
+
name: string | null;
|
|
9
52
|
configuration: LoggerConfiguration;
|
|
10
53
|
/**
|
|
11
54
|
* Constructor
|
|
@@ -20,5 +63,6 @@ export declare class Logger implements Extension {
|
|
|
20
63
|
onListen(data: onListenPayload): Promise<void>;
|
|
21
64
|
onDestroy(data: onDestroyPayload): Promise<void>;
|
|
22
65
|
onConfigure(data: onConfigurePayload): Promise<void>;
|
|
66
|
+
private logRawText;
|
|
23
67
|
private log;
|
|
24
68
|
}
|
|
@@ -46,6 +46,10 @@ export interface Extension {
|
|
|
46
46
|
onUpgrade?(data: onUpgradePayload): Promise<any>;
|
|
47
47
|
}
|
|
48
48
|
export interface Configuration extends Extension {
|
|
49
|
+
/**
|
|
50
|
+
* A name for the instance, used for logging.
|
|
51
|
+
*/
|
|
52
|
+
name: string | null;
|
|
49
53
|
/**
|
|
50
54
|
* A list of hocuspocus extenions.
|
|
51
55
|
*/
|
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.42",
|
|
4
4
|
"description": "hocuspocus persistence driver for Redis",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -14,17 +14,22 @@
|
|
|
14
14
|
"module": "dist/hocuspocus-redis.esm.js",
|
|
15
15
|
"types": "dist/packages/extension-redis/src/index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
|
-
"
|
|
18
|
-
|
|
17
|
+
"development": {
|
|
18
|
+
"import": "./src"
|
|
19
|
+
},
|
|
20
|
+
"default": {
|
|
21
|
+
"import": "./dist/hocuspocus-redis.esm.js",
|
|
22
|
+
"require": "./dist/hocuspocus-redis.cjs"
|
|
23
|
+
}
|
|
19
24
|
},
|
|
20
25
|
"files": [
|
|
21
26
|
"src",
|
|
22
27
|
"dist"
|
|
23
28
|
],
|
|
24
29
|
"dependencies": {
|
|
25
|
-
"@hocuspocus/server": "^1.0.0-alpha.
|
|
30
|
+
"@hocuspocus/server": "^1.0.0-alpha.79",
|
|
26
31
|
"y-redis": "^1.0.2",
|
|
27
32
|
"yjs": "^13.5.0"
|
|
28
33
|
},
|
|
29
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "f9f5acf828d4a1f5ae4df8188000b5c3873e18cf"
|
|
30
35
|
}
|