@hocuspocus/extension-logger 1.0.0-alpha.77 → 1.0.0-alpha.80
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/extension-redis/src/Redis.d.ts +1 -1
- package/dist/packages/provider/src/HocuspocusProvider.d.ts +2 -0
- package/dist/packages/server/src/Connection.d.ts +7 -0
- package/dist/packages/server/src/Document.d.ts +1 -0
- package/dist/tests/{extension-rocksdb/onLoadDocument.d.ts → server/websocketError.d.ts} +0 -0
- package/dist/tests/utils/retryableAssertion.d.ts +2 -0
- package/package.json +3 -3
- package/dist/packages/extension-rocksdb/src/index.d.ts +0 -22
|
@@ -75,7 +75,7 @@ export declare class Redis implements Extension {
|
|
|
75
75
|
/**
|
|
76
76
|
* Handle awareness update messages received directly by this Hocuspocus instance.
|
|
77
77
|
*/
|
|
78
|
-
onAwarenessUpdate({ documentName, awareness }: onAwarenessUpdatePayload): Promise<number>;
|
|
78
|
+
onAwarenessUpdate({ documentName, awareness, added, updated, removed, }: onAwarenessUpdatePayload): Promise<number>;
|
|
79
79
|
/**
|
|
80
80
|
* Handle incoming messages published on all subscribed document channels.
|
|
81
81
|
* Note that this will also include messages from ourselves as it is not possible
|
|
@@ -110,6 +110,7 @@ export declare class HocuspocusProvider extends EventEmitter {
|
|
|
110
110
|
shouldConnect: boolean;
|
|
111
111
|
status: WebSocketStatus;
|
|
112
112
|
isSynced: boolean;
|
|
113
|
+
unsyncedChanges: number;
|
|
113
114
|
isAuthenticated: boolean;
|
|
114
115
|
lastMessageReceived: number;
|
|
115
116
|
mux: mutex.mutex;
|
|
@@ -128,6 +129,7 @@ export declare class HocuspocusProvider extends EventEmitter {
|
|
|
128
129
|
rejectConnectionAttempt(): void;
|
|
129
130
|
get document(): Y.Doc;
|
|
130
131
|
get awareness(): Awareness;
|
|
132
|
+
get hasUnsyncedChanges(): boolean;
|
|
131
133
|
checkConnection(): void;
|
|
132
134
|
forceSync(): void;
|
|
133
135
|
boundBeforeUnload: () => void;
|
|
@@ -49,6 +49,13 @@ export declare class Connection {
|
|
|
49
49
|
* @private
|
|
50
50
|
*/
|
|
51
51
|
private handleMessage;
|
|
52
|
+
/**
|
|
53
|
+
* Handle a ws instance error, which is required to prevent
|
|
54
|
+
* the server from crashing when one happens
|
|
55
|
+
* See https://github.com/websockets/ws/issues/1777#issuecomment-660803472
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
private handleError;
|
|
52
59
|
/**
|
|
53
60
|
* Get the underlying connection instance
|
|
54
61
|
* @deprecated
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-logger",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.80",
|
|
4
4
|
"description": "hocuspocus logging 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": "^1.0.0-alpha.
|
|
31
|
+
"@hocuspocus/server": "^1.0.0-alpha.106"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "6074a6cb832b40bc579f28db2823ba5723887312"
|
|
34
34
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Extension, onLoadDocumentPayload } from '@hocuspocus/server';
|
|
2
|
-
import { LeveldbPersistence } from 'y-leveldb';
|
|
3
|
-
export interface Configuration {
|
|
4
|
-
options: object | undefined;
|
|
5
|
-
path: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class RocksDB implements Extension {
|
|
8
|
-
configuration: Configuration;
|
|
9
|
-
provider: LeveldbPersistence;
|
|
10
|
-
/**
|
|
11
|
-
* Constructor
|
|
12
|
-
*/
|
|
13
|
-
constructor(configuration?: Partial<Configuration>);
|
|
14
|
-
/**
|
|
15
|
-
* onLoadDocument hook
|
|
16
|
-
*/
|
|
17
|
-
onLoadDocument(data: onLoadDocumentPayload): Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* store updates in y-leveldb persistence
|
|
20
|
-
*/
|
|
21
|
-
store(documentName: string, update: Uint8Array): Promise<any>;
|
|
22
|
-
}
|