@hocuspocus/common 1.0.0-alpha.2 → 1.0.0-alpha.6
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/hocuspocus-common.cjs +46 -0
- package/dist/hocuspocus-common.cjs.map +1 -1
- package/dist/hocuspocus-common.esm.js +42 -1
- package/dist/hocuspocus-common.esm.js.map +1 -1
- package/dist/packages/common/src/CloseEvents.d.ts +23 -0
- package/dist/packages/common/src/awarenessStatesToArray.d.ts +3 -0
- package/dist/packages/common/src/index.d.ts +2 -0
- package/dist/packages/extension-database/src/Database.d.ts +32 -0
- package/dist/packages/extension-database/src/index.d.ts +1 -0
- package/dist/packages/extension-logger/src/Logger.d.ts +7 -8
- package/dist/packages/extension-sqlite/src/SQLite.d.ts +26 -0
- package/dist/packages/extension-sqlite/src/index.d.ts +1 -0
- package/dist/packages/extension-throttle/src/index.d.ts +6 -2
- package/dist/packages/extension-webhook/src/index.d.ts +2 -3
- package/dist/packages/provider/src/EventEmitter.d.ts +1 -1
- package/dist/packages/provider/src/HocuspocusCloudProvider.d.ts +11 -0
- package/dist/packages/provider/src/HocuspocusProvider.d.ts +17 -9
- package/dist/packages/provider/src/index.d.ts +1 -1
- package/dist/packages/provider/src/types.d.ts +10 -0
- package/dist/packages/server/src/Connection.d.ts +5 -5
- package/dist/packages/server/src/Debugger.d.ts +1 -2
- package/dist/packages/server/src/Document.d.ts +8 -5
- package/dist/packages/server/src/Hocuspocus.d.ts +37 -16
- package/dist/packages/server/src/MessageReceiver.d.ts +8 -5
- package/dist/packages/server/src/OutgoingMessage.d.ts +1 -0
- package/dist/packages/server/src/index.d.ts +7 -0
- package/dist/packages/server/src/types.d.ts +99 -18
- package/dist/{demos/backend/src/express.d.ts → playground/backend/src/default.d.ts} +0 -0
- package/dist/{demos/backend/src/koa.d.ts → playground/backend/src/express.d.ts} +0 -0
- package/dist/{demos/backend/src/load-document.d.ts → playground/backend/src/koa.d.ts} +0 -0
- package/dist/{demos/backend/src/minimal.d.ts → playground/backend/src/load-document.d.ts} +0 -0
- package/dist/{demos → playground}/backend/src/monitor.d.ts +0 -0
- package/dist/{demos → playground}/backend/src/redis.d.ts +0 -0
- package/dist/{demos → playground}/backend/src/slow.d.ts +0 -0
- package/dist/{demos → playground}/backend/src/webhook.d.ts +0 -0
- package/dist/tests/extension-logger/onListen.d.ts +1 -0
- package/dist/tests/extension-redis/onLoadDocument.d.ts +1 -0
- package/dist/tests/extension-redis/onSynced.d.ts +1 -0
- package/dist/tests/extension-redis-rewrite/closeConnections.d.ts +1 -0
- package/dist/tests/extension-redis-rewrite/getConnectionCount.d.ts +1 -0
- package/dist/tests/extension-redis-rewrite/getDocumentsCount.d.ts +1 -0
- package/dist/tests/extension-redis-rewrite/onAwarenessChange.d.ts +1 -0
- package/dist/tests/extension-redis-rewrite/onChange.d.ts +1 -0
- package/dist/tests/extension-redis-rewrite/onStoreDocument.d.ts +1 -0
- package/dist/tests/extension-rocksdb/onLoadDocument.d.ts +1 -0
- package/dist/tests/extension-throttle/configuration.d.ts +1 -0
- package/dist/tests/provider/configuration.d.ts +1 -0
- package/dist/tests/provider/observeDeep.d.ts +1 -0
- package/dist/tests/provider/onAuthenticated.d.ts +1 -0
- package/dist/tests/provider/onAuthenticationFailed.d.ts +1 -0
- package/dist/tests/provider/onAwarenessChange.d.ts +1 -0
- package/dist/tests/provider/onAwarenessUpdate.d.ts +1 -0
- package/dist/tests/provider/onClose.d.ts +1 -0
- package/dist/tests/provider/onConnect.d.ts +1 -0
- package/dist/tests/provider/onDisconnect.d.ts +1 -0
- package/dist/tests/provider/onMessage.d.ts +1 -0
- package/dist/tests/provider/onOpen.d.ts +1 -0
- package/dist/tests/provider/onSynced.d.ts +1 -0
- package/dist/tests/server/address.d.ts +1 -0
- package/dist/tests/server/afterStoreDocument.d.ts +1 -0
- package/dist/tests/server/closeConnections.d.ts +1 -0
- package/dist/tests/server/getConnectionsCount.d.ts +1 -0
- package/dist/tests/server/getDocumentName.d.ts +1 -0
- package/dist/tests/server/getDocumentsCount.d.ts +1 -0
- package/dist/tests/server/getMessageLogs.d.ts +1 -0
- package/dist/tests/server/listen.d.ts +1 -0
- package/dist/tests/server/onAuthenticate.d.ts +1 -0
- package/dist/tests/server/onAwarenessUpdate.d.ts +1 -0
- package/dist/tests/server/onChange.d.ts +1 -0
- package/dist/tests/server/onConfigure.d.ts +1 -0
- package/dist/tests/server/onConnect.d.ts +1 -0
- package/dist/tests/server/onDestroy.d.ts +1 -0
- package/dist/tests/server/onDisconnect.d.ts +1 -0
- package/dist/tests/server/onListen.d.ts +1 -0
- package/dist/tests/server/onLoadDocument.d.ts +1 -0
- package/dist/tests/server/onRequest.d.ts +1 -0
- package/dist/tests/server/onStoreDocument.d.ts +1 -0
- package/dist/tests/server/onUpgrade.d.ts +1 -0
- package/dist/tests/server/requiresAuthentication.d.ts +1 -0
- package/dist/tests/transformer/TiptapTransformer.d.ts +1 -0
- package/dist/tests/utils/createDirectory.d.ts +1 -0
- package/dist/tests/utils/flushRedis.d.ts +1 -0
- package/dist/tests/utils/index.d.ts +7 -0
- package/dist/tests/utils/newHocuspocus.d.ts +2 -0
- package/dist/tests/utils/newHocuspocusProvider.d.ts +3 -0
- package/dist/tests/utils/redisConnectionSettings.d.ts +4 -0
- package/dist/tests/utils/removeDirectory.d.ts +1 -0
- package/dist/tests/utils/sleep.d.ts +1 -0
- package/package.json +4 -4
- package/src/CloseEvents.ts +39 -0
- package/src/awarenessStatesToArray.ts +8 -0
- package/src/index.ts +2 -0
- package/dist/packages/provider/src/utils/awarenessStatesToArray.d.ts +0 -4
- package/dist/packages/provider/src/utils/index.d.ts +0 -1
- package/dist/packages/server/src/CloseEvents.d.ts +0 -4
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'http';
|
|
3
3
|
import { URLSearchParams } from 'url';
|
|
4
4
|
import { Socket } from 'net';
|
|
5
|
+
import { Awareness } from 'y-protocols/awareness';
|
|
5
6
|
import Document from './Document';
|
|
6
7
|
import { Hocuspocus } from './Hocuspocus';
|
|
7
8
|
export declare enum MessageType {
|
|
8
9
|
Unknown = -1,
|
|
9
10
|
Sync = 0,
|
|
10
11
|
Awareness = 1,
|
|
11
|
-
Auth = 2
|
|
12
|
+
Auth = 2,
|
|
13
|
+
QueryAwareness = 3
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* State of the WebSocket connection.
|
|
@@ -25,31 +27,38 @@ export interface AwarenessUpdate {
|
|
|
25
27
|
updated: Array<any>;
|
|
26
28
|
removed: Array<any>;
|
|
27
29
|
}
|
|
28
|
-
export interface
|
|
30
|
+
export interface ConnectionConfiguration {
|
|
29
31
|
readOnly: boolean;
|
|
32
|
+
requiresAuthentication: boolean;
|
|
30
33
|
isAuthenticated: boolean;
|
|
31
34
|
}
|
|
32
35
|
export interface Extension {
|
|
33
|
-
|
|
34
|
-
onChange?(data: onChangePayload): Promise<any>;
|
|
35
|
-
onConnect?(data: onConnectPayload): Promise<any>;
|
|
36
|
+
priority?: number;
|
|
36
37
|
onConfigure?(data: onConfigurePayload): Promise<any>;
|
|
38
|
+
onListen?(data: onListenPayload): Promise<any>;
|
|
39
|
+
onUpgrade?(data: onUpgradePayload): Promise<any>;
|
|
40
|
+
onConnect?(data: onConnectPayload): Promise<any>;
|
|
41
|
+
connected?(data: connectedPayload): Promise<any>;
|
|
42
|
+
onAuthenticate?(data: onAuthenticatePayload): Promise<any>;
|
|
37
43
|
/**
|
|
38
44
|
* @deprecated onCreateDocument is deprecated, use onLoadDocument instead
|
|
39
45
|
*/
|
|
40
46
|
onCreateDocument?(data: onLoadDocumentPayload): Promise<any>;
|
|
41
47
|
onLoadDocument?(data: onLoadDocumentPayload): Promise<any>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
afterLoadDocument?(data: onLoadDocumentPayload): Promise<any>;
|
|
49
|
+
onChange?(data: onChangePayload): Promise<any>;
|
|
50
|
+
onStoreDocument?(data: onStoreDocumentPayload): Promise<any>;
|
|
51
|
+
afterStoreDocument?(data: afterStoreDocumentPayload): Promise<any>;
|
|
52
|
+
onAwarenessUpdate?(data: onAwarenessUpdatePayload): Promise<any>;
|
|
45
53
|
onRequest?(data: onRequestPayload): Promise<any>;
|
|
46
|
-
|
|
54
|
+
onDisconnect?(data: onDisconnectPayload): Promise<any>;
|
|
55
|
+
onDestroy?(data: onDestroyPayload): Promise<any>;
|
|
47
56
|
}
|
|
48
|
-
export declare type Hook = '
|
|
57
|
+
export declare type Hook = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' |
|
|
49
58
|
/**
|
|
50
59
|
* @deprecated onCreateDocument is deprecated, use onLoadDocument instead
|
|
51
60
|
*/
|
|
52
|
-
'onCreateDocument' | 'onLoadDocument' | '
|
|
61
|
+
'onCreateDocument' | 'onLoadDocument' | 'afterLoadDocument' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'onDestroy';
|
|
53
62
|
export interface Configuration extends Extension {
|
|
54
63
|
/**
|
|
55
64
|
* A name for the instance, used for logging.
|
|
@@ -67,6 +76,28 @@ export interface Configuration extends Extension {
|
|
|
67
76
|
* Defines in which interval the server sends a ping, and closes the connection when no pong is sent back.
|
|
68
77
|
*/
|
|
69
78
|
timeout: number;
|
|
79
|
+
/**
|
|
80
|
+
* Debounces the call of the `onStoreDocument` hook for the given amount of time in ms.
|
|
81
|
+
* Otherwise every single update would be persisted.
|
|
82
|
+
*/
|
|
83
|
+
debounce: number;
|
|
84
|
+
/**
|
|
85
|
+
* Makes sure to call `onStoreDocument` at least in the given amount of time (ms).
|
|
86
|
+
*/
|
|
87
|
+
maxDebounce: number;
|
|
88
|
+
/**
|
|
89
|
+
* By default, the servers show a start screen. If passed false, the server will start quietly.
|
|
90
|
+
*/
|
|
91
|
+
quiet: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Function which returns the (customized) document name based on the request
|
|
94
|
+
*/
|
|
95
|
+
getDocumentName?(data: getDocumentNamePayload): string | Promise<string>;
|
|
96
|
+
}
|
|
97
|
+
export interface getDocumentNamePayload {
|
|
98
|
+
documentName: string;
|
|
99
|
+
request: IncomingMessage;
|
|
100
|
+
requestParameters: URLSearchParams;
|
|
70
101
|
}
|
|
71
102
|
export interface onAuthenticatePayload {
|
|
72
103
|
documentName: string;
|
|
@@ -75,7 +106,7 @@ export interface onAuthenticatePayload {
|
|
|
75
106
|
requestParameters: URLSearchParams;
|
|
76
107
|
socketId: string;
|
|
77
108
|
token: string;
|
|
78
|
-
connection:
|
|
109
|
+
connection: ConnectionConfiguration;
|
|
79
110
|
}
|
|
80
111
|
export interface onConnectPayload {
|
|
81
112
|
documentName: string;
|
|
@@ -84,7 +115,16 @@ export interface onConnectPayload {
|
|
|
84
115
|
requestHeaders: IncomingHttpHeaders;
|
|
85
116
|
requestParameters: URLSearchParams;
|
|
86
117
|
socketId: string;
|
|
87
|
-
connection:
|
|
118
|
+
connection: ConnectionConfiguration;
|
|
119
|
+
}
|
|
120
|
+
export interface connectedPayload {
|
|
121
|
+
documentName: string;
|
|
122
|
+
instance: Hocuspocus;
|
|
123
|
+
request: IncomingMessage;
|
|
124
|
+
requestHeaders: IncomingHttpHeaders;
|
|
125
|
+
requestParameters: URLSearchParams;
|
|
126
|
+
socketId: string;
|
|
127
|
+
connection: ConnectionConfiguration;
|
|
88
128
|
}
|
|
89
129
|
export interface onLoadDocumentPayload {
|
|
90
130
|
context: any;
|
|
@@ -94,7 +134,17 @@ export interface onLoadDocumentPayload {
|
|
|
94
134
|
requestHeaders: IncomingHttpHeaders;
|
|
95
135
|
requestParameters: URLSearchParams;
|
|
96
136
|
socketId: string;
|
|
97
|
-
connection:
|
|
137
|
+
connection: ConnectionConfiguration;
|
|
138
|
+
}
|
|
139
|
+
export interface afterLoadDocumentPayload {
|
|
140
|
+
context: any;
|
|
141
|
+
document: Document;
|
|
142
|
+
documentName: string;
|
|
143
|
+
instance: Hocuspocus;
|
|
144
|
+
requestHeaders: IncomingHttpHeaders;
|
|
145
|
+
requestParameters: URLSearchParams;
|
|
146
|
+
socketId: string;
|
|
147
|
+
connection: ConnectionConfiguration;
|
|
98
148
|
}
|
|
99
149
|
export interface onChangePayload {
|
|
100
150
|
clientsCount: number;
|
|
@@ -107,6 +157,41 @@ export interface onChangePayload {
|
|
|
107
157
|
update: Uint8Array;
|
|
108
158
|
socketId: string;
|
|
109
159
|
}
|
|
160
|
+
export interface onStoreDocumentPayload {
|
|
161
|
+
clientsCount: number;
|
|
162
|
+
context: any;
|
|
163
|
+
document: Document;
|
|
164
|
+
documentName: string;
|
|
165
|
+
instance: Hocuspocus;
|
|
166
|
+
requestHeaders: IncomingHttpHeaders;
|
|
167
|
+
requestParameters: URLSearchParams;
|
|
168
|
+
socketId: string;
|
|
169
|
+
}
|
|
170
|
+
export interface afterStoreDocumentPayload extends onStoreDocumentPayload {
|
|
171
|
+
}
|
|
172
|
+
export interface onAwarenessUpdatePayload {
|
|
173
|
+
clientsCount: number;
|
|
174
|
+
context: any;
|
|
175
|
+
document: Document;
|
|
176
|
+
documentName: string;
|
|
177
|
+
instance: Hocuspocus;
|
|
178
|
+
requestHeaders: IncomingHttpHeaders;
|
|
179
|
+
requestParameters: URLSearchParams;
|
|
180
|
+
update: Uint8Array;
|
|
181
|
+
socketId: string;
|
|
182
|
+
added: number[];
|
|
183
|
+
updated: number[];
|
|
184
|
+
removed: number[];
|
|
185
|
+
awareness: Awareness;
|
|
186
|
+
states: StatesArray;
|
|
187
|
+
}
|
|
188
|
+
export declare type StatesArray = {
|
|
189
|
+
clientId: number;
|
|
190
|
+
[key: string | number]: any;
|
|
191
|
+
}[];
|
|
192
|
+
export interface storePayload extends onStoreDocumentPayload {
|
|
193
|
+
state: Buffer;
|
|
194
|
+
}
|
|
110
195
|
export interface onDisconnectPayload {
|
|
111
196
|
clientsCount: number;
|
|
112
197
|
context: any;
|
|
@@ -140,7 +225,3 @@ export interface onConfigurePayload {
|
|
|
140
225
|
yjsVersion: string;
|
|
141
226
|
instance: Hocuspocus;
|
|
142
227
|
}
|
|
143
|
-
export interface CloseEvent {
|
|
144
|
-
code: number;
|
|
145
|
-
reason: string;
|
|
146
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createDirectory: (dir: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const flushRedis: () => Promise<string>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HocuspocusProvider, HocuspocusProviderConfiguration } from '@hocuspocus/provider';
|
|
2
|
+
import { Hocuspocus } from '@hocuspocus/server';
|
|
3
|
+
export declare const newHocuspocusProvider: (server: Hocuspocus, options?: Partial<Omit<HocuspocusProviderConfiguration, 'url'>>) => HocuspocusProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const removeDirectory: (dir: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sleep: (time: number) => Promise<unknown>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/common",
|
|
3
3
|
"description": "shared code for multiple Hocuspocus packages",
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.6",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"hocuspocus"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"src",
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
|
-
"gitHead": "
|
|
28
|
-
"
|
|
29
|
-
"
|
|
27
|
+
"gitHead": "05a7eb3d660175613d2fe7b6d9ec030e8e509683",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"lib0": "^0.2.43"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface CloseEvent {
|
|
2
|
+
code: number,
|
|
3
|
+
reason: string,
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The server successfully processed the request, asks that the requester reset
|
|
8
|
+
* its document view, and is not returning any content.
|
|
9
|
+
*/
|
|
10
|
+
export const ResetConnection: CloseEvent = {
|
|
11
|
+
code: 4205,
|
|
12
|
+
reason: 'Reset Connection',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Similar to Forbidden, but specifically for use when authentication is required and has
|
|
17
|
+
* failed or has not yet been provided.
|
|
18
|
+
*/
|
|
19
|
+
export const Unauthorized: CloseEvent = {
|
|
20
|
+
code: 4401,
|
|
21
|
+
reason: 'Unauthorized',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The request contained valid data and was understood by the server, but the server
|
|
26
|
+
* is refusing action.
|
|
27
|
+
*/
|
|
28
|
+
export const Forbidden: CloseEvent = {
|
|
29
|
+
code: 4403,
|
|
30
|
+
reason: 'Forbidden',
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The server timed out waiting for the request.
|
|
35
|
+
*/
|
|
36
|
+
export const ConnectionTimeout: CloseEvent = {
|
|
37
|
+
code: 4408,
|
|
38
|
+
reason: 'Connection Timeout',
|
|
39
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as awarenessStatesToArray } from './awarenessStatesToArray';
|