@hocuspocus/extension-database 2.2.2 → 2.2.3
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,3 +1,4 @@
|
|
|
1
|
+
import type { AbstractType, YArrayEvent } from 'yjs';
|
|
1
2
|
import { HocuspocusProvider, HocuspocusProviderConfiguration } from './HocuspocusProvider.js';
|
|
2
3
|
import { TiptapCollabProviderWebsocket } from './TiptapCollabProviderWebsocket.js';
|
|
3
4
|
export type TiptapCollabProviderConfiguration = Required<Pick<HocuspocusProviderConfiguration, 'name'>> & Partial<HocuspocusProviderConfiguration> & (Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'websocketProvider'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'appId'>>);
|
|
@@ -8,6 +9,20 @@ export interface AdditionalTiptapCollabProviderConfiguration {
|
|
|
8
9
|
appId?: string;
|
|
9
10
|
websocketProvider?: TiptapCollabProviderWebsocket;
|
|
10
11
|
}
|
|
12
|
+
export type AuditHistoryVersion = {
|
|
13
|
+
name?: string;
|
|
14
|
+
version: number;
|
|
15
|
+
date: number;
|
|
16
|
+
};
|
|
11
17
|
export declare class TiptapCollabProvider extends HocuspocusProvider {
|
|
18
|
+
tiptapCollabConfigurationPrefix: string;
|
|
12
19
|
constructor(configuration: TiptapCollabProviderConfiguration);
|
|
20
|
+
createVersion(name?: string): void;
|
|
21
|
+
revertToVersion(targetVersion: number): void;
|
|
22
|
+
getVersions(): AuditHistoryVersion[];
|
|
23
|
+
watchVersions(callback: Parameters<AbstractType<YArrayEvent<AuditHistoryVersion>>['observe']>[0]): void;
|
|
24
|
+
unwatchVersions(callback: Parameters<AbstractType<YArrayEvent<AuditHistoryVersion>>['unobserve']>[0]): void;
|
|
25
|
+
isAutoVersioning(): boolean;
|
|
26
|
+
enableAutoVersioning(): number;
|
|
27
|
+
disableAutoVersioning(): number;
|
|
13
28
|
}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
+
import { Encoder } from 'lib0/encoding';
|
|
2
|
+
import type { CloseEvent, Event, MessageEvent } from 'ws';
|
|
1
3
|
import { Awareness } from 'y-protocols/awareness';
|
|
2
4
|
import * as Y from 'yjs';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
+
import { IncomingMessage } from './IncomingMessage.js';
|
|
6
|
+
import { OutgoingMessage } from './OutgoingMessage.js';
|
|
5
7
|
import { AuthenticationMessage } from './OutgoingMessages/AuthenticationMessage.js';
|
|
6
8
|
import { AwarenessMessage } from './OutgoingMessages/AwarenessMessage.js';
|
|
7
9
|
import { QueryAwarenessMessage } from './OutgoingMessages/QueryAwarenessMessage.js';
|
|
8
10
|
import { SyncStepOneMessage } from './OutgoingMessages/SyncStepOneMessage.js';
|
|
9
11
|
import { SyncStepTwoMessage } from './OutgoingMessages/SyncStepTwoMessage.js';
|
|
10
12
|
import { UpdateMessage } from './OutgoingMessages/UpdateMessage.js';
|
|
11
|
-
import { IncomingMessage } from './IncomingMessage.js';
|
|
12
|
-
import { OutgoingMessage } from './OutgoingMessage.js';
|
|
13
13
|
export declare enum MessageType {
|
|
14
14
|
Sync = 0,
|
|
15
15
|
Awareness = 1,
|
|
16
16
|
Auth = 2,
|
|
17
17
|
QueryAwareness = 3,
|
|
18
18
|
Stateless = 5,
|
|
19
|
-
CLOSE = 7
|
|
19
|
+
CLOSE = 7,
|
|
20
|
+
SyncStatus = 8
|
|
20
21
|
}
|
|
21
22
|
export declare enum WebSocketStatus {
|
|
22
23
|
Connecting = "connecting",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-database",
|
|
3
3
|
"description": "a generic Hocuspocus persistence driver for the database",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.3",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"hocuspocus",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@hocuspocus/server": "^2.2.
|
|
30
|
+
"@hocuspocus/server": "^2.2.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"yjs": "^13.5.29"
|