@hocuspocus/provider 1.0.0-alpha.38 → 1.0.0-alpha.40

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.
@@ -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
@@ -16,6 +16,7 @@ export declare class Document extends Doc {
16
16
  name: string;
17
17
  mux: mutex;
18
18
  logger: Debugger;
19
+ isLoading: boolean;
19
20
  /**
20
21
  * Constructor.
21
22
  */
@@ -0,0 +1,2 @@
1
+ import { ExecutionContext } from 'ava';
2
+ export declare const retryableAssertion: (t: ExecutionContext, recoverableTry: (tt: ExecutionContext) => void) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hocuspocus/provider",
3
- "version": "1.0.0-alpha.38",
3
+ "version": "1.0.0-alpha.40",
4
4
  "description": "hocuspocus provider",
5
5
  "homepage": "https://hocuspocus.dev",
6
6
  "keywords": [
@@ -28,11 +28,11 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@hocuspocus/common": "^1.0.0-alpha.11",
31
+ "@hocuspocus/common": "^1.0.0-alpha.12",
32
32
  "@lifeomic/attempt": "^3.0.2",
33
33
  "lib0": "^0.2.46",
34
34
  "y-protocols": "^1.0.5",
35
35
  "yjs": "^13.5.29"
36
36
  },
37
- "gitHead": "fe784d26fb1b281ab6d0bc7b5fca500be3b62684"
37
+ "gitHead": "6865794352a68372a54c579040513e45aac422d1"
38
38
  }
@@ -305,8 +305,8 @@ export class HocuspocusProvider extends EventEmitter {
305
305
  ws.onmessage = this.onMessage.bind(this)
306
306
  ws.onclose = this.onClose.bind(this)
307
307
  ws.onopen = this.onOpen.bind(this)
308
- ws.onerror = () => {
309
- reject()
308
+ ws.onerror = (err: any) => {
309
+ reject(err)
310
310
  }
311
311
  this.webSocket = ws
312
312
 
@@ -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
- }
@@ -1 +0,0 @@
1
- export {};