@hocuspocus/extension-logger 2.2.1 → 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.
|
@@ -72,6 +72,17 @@ export declare class HocuspocusProvider extends EventEmitter {
|
|
|
72
72
|
intervals: any;
|
|
73
73
|
isConnected: boolean;
|
|
74
74
|
constructor(configuration: HocuspocusProviderConfiguration);
|
|
75
|
+
boundBroadcastChannelSubscriber: (data: ArrayBuffer) => void;
|
|
76
|
+
boundBeforeUnload: () => void;
|
|
77
|
+
boundOnOpen: (event: Event) => Promise<void>;
|
|
78
|
+
boundOnMessage: (event: MessageEvent) => void;
|
|
79
|
+
boundOnClose: (event: CloseEvent) => void;
|
|
80
|
+
boundOnStatus: ({ status }: onStatusParameters) => void;
|
|
81
|
+
forwardConnect: (e: any) => this;
|
|
82
|
+
forwardOpen: (e: any) => this;
|
|
83
|
+
forwardClose: (e: any) => this;
|
|
84
|
+
forwardDisconnect: (e: any) => this;
|
|
85
|
+
forwardDestroy: (e: any) => this;
|
|
75
86
|
onStatus({ status }: onStatusParameters): void;
|
|
76
87
|
setConfiguration(configuration?: Partial<HocuspocusProviderConfiguration>): void;
|
|
77
88
|
get document(): Y.Doc;
|
|
@@ -79,7 +90,6 @@ export declare class HocuspocusProvider extends EventEmitter {
|
|
|
79
90
|
get hasUnsyncedChanges(): boolean;
|
|
80
91
|
updateUnsyncedChanges(unsyncedChanges?: number): void;
|
|
81
92
|
forceSync(): void;
|
|
82
|
-
boundBeforeUnload: () => void;
|
|
83
93
|
beforeUnload(): void;
|
|
84
94
|
registerEventListeners(): void;
|
|
85
95
|
sendStateless(payload: string): void;
|
|
@@ -101,7 +111,6 @@ export declare class HocuspocusProvider extends EventEmitter {
|
|
|
101
111
|
permissionDeniedHandler(reason: string): void;
|
|
102
112
|
authenticatedHandler(scope: string): void;
|
|
103
113
|
get broadcastChannel(): string;
|
|
104
|
-
boundBroadcastChannelSubscriber: (data: ArrayBuffer) => void;
|
|
105
114
|
broadcastChannelSubscriber(data: ArrayBuffer): void;
|
|
106
115
|
subscribeToBroadcastChannel(): void;
|
|
107
116
|
disconnectBroadcastChannel(): void;
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
+
import type { AbstractType, YArrayEvent } from 'yjs';
|
|
1
2
|
import { HocuspocusProvider, HocuspocusProviderConfiguration } from './HocuspocusProvider.js';
|
|
2
|
-
|
|
3
|
+
import { TiptapCollabProviderWebsocket } from './TiptapCollabProviderWebsocket.js';
|
|
4
|
+
export type TiptapCollabProviderConfiguration = Required<Pick<HocuspocusProviderConfiguration, 'name'>> & Partial<HocuspocusProviderConfiguration> & (Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'websocketProvider'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'appId'>>);
|
|
3
5
|
export interface AdditionalTiptapCollabProviderConfiguration {
|
|
4
6
|
/**
|
|
5
7
|
* A Hocuspocus Cloud App ID, get one here: https://collab.tiptap.dev
|
|
6
8
|
*/
|
|
7
|
-
appId
|
|
9
|
+
appId?: string;
|
|
10
|
+
websocketProvider?: TiptapCollabProviderWebsocket;
|
|
8
11
|
}
|
|
12
|
+
export type AuditHistoryVersion = {
|
|
13
|
+
name?: string;
|
|
14
|
+
version: number;
|
|
15
|
+
date: number;
|
|
16
|
+
};
|
|
9
17
|
export declare class TiptapCollabProvider extends HocuspocusProvider {
|
|
18
|
+
tiptapCollabConfigurationPrefix: string;
|
|
10
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;
|
|
11
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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Document from './Document.js';
|
|
2
2
|
import type { Hocuspocus } from './Hocuspocus.js';
|
|
3
|
-
import type { DirectConnection as DirectConnectionInterface } from './types';
|
|
3
|
+
import type { DirectConnection as DirectConnectionInterface } from './types.js';
|
|
4
4
|
export declare class DirectConnection implements DirectConnectionInterface {
|
|
5
5
|
document: Document | null;
|
|
6
6
|
instance: Hocuspocus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hocuspocus/extension-logger",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "hocuspocus logging extension",
|
|
5
5
|
"homepage": "https://hocuspocus.dev",
|
|
6
6
|
"keywords": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@hocuspocus/server": "^2.2.
|
|
32
|
+
"@hocuspocus/server": "^2.2.3"
|
|
33
33
|
},
|
|
34
34
|
"gitHead": "b3454a4ca289a84ddfb7fa5607a2d4b8d5c37e9d"
|
|
35
35
|
}
|