@hocuspocus/extension-webhook 3.1.3 → 3.1.5
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-webhook.cjs +14 -11
- package/dist/hocuspocus-webhook.cjs.map +1 -1
- package/dist/hocuspocus-webhook.esm.js +14 -11
- package/dist/hocuspocus-webhook.esm.js.map +1 -1
- package/dist/packages/common/src/auth.d.ts +2 -2
- package/dist/packages/common/src/index.d.ts +4 -4
- package/dist/packages/extension-database/src/Database.d.ts +1 -1
- package/dist/packages/extension-database/src/index.d.ts +1 -1
- package/dist/packages/extension-logger/src/Logger.d.ts +1 -1
- package/dist/packages/extension-logger/src/index.d.ts +1 -1
- package/dist/packages/extension-redis/src/index.d.ts +1 -1
- package/dist/packages/extension-sqlite/src/SQLite.d.ts +3 -3
- package/dist/packages/extension-sqlite/src/index.d.ts +1 -1
- package/dist/packages/extension-throttle/src/index.d.ts +1 -1
- package/dist/packages/extension-webhook/src/index.d.ts +3 -3
- package/dist/packages/provider/src/HocuspocusProvider.d.ts +10 -10
- package/dist/packages/provider/src/IncomingMessage.d.ts +3 -3
- package/dist/packages/provider/src/MessageReceiver.d.ts +2 -2
- package/dist/packages/provider/src/OutgoingMessage.d.ts +2 -2
- package/dist/packages/provider/src/OutgoingMessages/AuthenticationMessage.d.ts +3 -3
- package/dist/packages/provider/src/OutgoingMessages/AwarenessMessage.d.ts +4 -4
- package/dist/packages/provider/src/OutgoingMessages/CloseMessage.d.ts +4 -4
- package/dist/packages/provider/src/OutgoingMessages/QueryAwarenessMessage.d.ts +4 -4
- package/dist/packages/provider/src/OutgoingMessages/StatelessMessage.d.ts +3 -3
- package/dist/packages/provider/src/OutgoingMessages/SyncStepOneMessage.d.ts +4 -4
- package/dist/packages/provider/src/OutgoingMessages/SyncStepTwoMessage.d.ts +4 -4
- package/dist/packages/provider/src/OutgoingMessages/UpdateMessage.d.ts +3 -3
- package/dist/packages/provider/src/index.d.ts +3 -3
- package/dist/packages/provider/src/types.d.ts +14 -14
- package/dist/packages/server/src/ClientConnection.d.ts +17 -17
- package/dist/packages/server/src/Connection.d.ts +6 -6
- package/dist/packages/server/src/DirectConnection.d.ts +3 -3
- package/dist/packages/server/src/Document.d.ts +4 -4
- package/dist/packages/server/src/Hocuspocus.d.ts +8 -8
- package/dist/packages/server/src/IncomingMessage.d.ts +3 -3
- package/dist/packages/server/src/MessageReceiver.d.ts +3 -3
- package/dist/packages/server/src/OutgoingMessage.d.ts +3 -3
- package/dist/packages/server/src/Server.d.ts +5 -5
- package/dist/packages/server/src/index.d.ts +9 -9
- package/dist/packages/server/src/types.d.ts +7 -7
- package/dist/packages/server/src/util/getParameters.d.ts +5 -5
- package/dist/packages/transformer/src/Prosemirror.d.ts +3 -3
- package/dist/packages/transformer/src/Tiptap.d.ts +3 -3
- package/dist/packages/transformer/src/index.d.ts +3 -3
- package/dist/packages/transformer/src/types.d.ts +1 -1
- package/dist/playground/frontend/app/SocketContext1.d.ts +2 -0
- package/dist/playground/frontend/app/SocketContext2.d.ts +2 -0
- package/package.json +40 -40
- package/src/index.ts +207 -201
- package/dist/playground/frontend/app/SocketContext.d.ts +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Decoder } from
|
|
2
|
-
import type { Encoder } from
|
|
3
|
-
import type { MessageType } from
|
|
1
|
+
import type { Decoder } from "lib0/decoding";
|
|
2
|
+
import type { Encoder } from "lib0/encoding";
|
|
3
|
+
import type { MessageType } from "./types.ts";
|
|
4
4
|
export declare class IncomingMessage {
|
|
5
5
|
/**
|
|
6
6
|
* Access to the received message.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type Connection from
|
|
2
|
-
import type Document from
|
|
3
|
-
import type { IncomingMessage } from
|
|
1
|
+
import type Connection from "./Connection.ts";
|
|
2
|
+
import type Document from "./Document.ts";
|
|
3
|
+
import type { IncomingMessage } from "./IncomingMessage.ts";
|
|
4
4
|
export declare class MessageReceiver {
|
|
5
5
|
message: IncomingMessage;
|
|
6
6
|
defaultTransactionOrigin?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Encoder } from
|
|
2
|
-
import type { Awareness } from
|
|
3
|
-
import type Document from
|
|
1
|
+
import type { Encoder } from "lib0/encoding";
|
|
2
|
+
import type { Awareness } from "y-protocols/awareness";
|
|
3
|
+
import type Document from "./Document.ts";
|
|
4
4
|
export declare class OutgoingMessage {
|
|
5
5
|
encoder: Encoder;
|
|
6
6
|
type?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { WebSocketServer } from
|
|
3
|
-
import type { AddressInfo, ServerOptions } from
|
|
4
|
-
import { Hocuspocus } from
|
|
5
|
-
import type { Configuration } from
|
|
1
|
+
import type { Server as HTTPServer, IncomingMessage, ServerResponse } from "http";
|
|
2
|
+
import { WebSocketServer } from "ws";
|
|
3
|
+
import type { AddressInfo, ServerOptions } from "ws";
|
|
4
|
+
import { Hocuspocus } from "./Hocuspocus.ts";
|
|
5
|
+
import type { Configuration } from "./types.ts";
|
|
6
6
|
export interface ServerConfiguration extends Configuration {
|
|
7
7
|
port?: number;
|
|
8
8
|
address?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
1
|
+
export * from "./Connection.ts";
|
|
2
|
+
export * from "./Document.ts";
|
|
3
|
+
export * from "./Hocuspocus.ts";
|
|
4
|
+
export * from "./IncomingMessage.ts";
|
|
5
|
+
export * from "./MessageReceiver.ts";
|
|
6
|
+
export * from "./OutgoingMessage.ts";
|
|
7
|
+
export * from "./Server.ts";
|
|
8
|
+
export * from "./types.ts";
|
|
9
|
+
export * from "./util/debounce.ts";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from
|
|
2
|
-
import type { URLSearchParams } from
|
|
3
|
-
import type { Awareness } from
|
|
4
|
-
import type Connection from
|
|
5
|
-
import type Document from
|
|
6
|
-
import type { Hocuspocus } from
|
|
1
|
+
import type { IncomingHttpHeaders, IncomingMessage, ServerResponse } from "http";
|
|
2
|
+
import type { URLSearchParams } from "url";
|
|
3
|
+
import type { Awareness } from "y-protocols/awareness";
|
|
4
|
+
import type Connection from "./Connection.ts";
|
|
5
|
+
import type Document from "./Document.ts";
|
|
6
|
+
import type { Hocuspocus } from "./Hocuspocus.ts";
|
|
7
7
|
export declare enum MessageType {
|
|
8
8
|
Unknown = -1,
|
|
9
9
|
Sync = 0,
|
|
@@ -51,7 +51,7 @@ export interface Extension {
|
|
|
51
51
|
afterUnloadDocument?(data: afterUnloadDocumentPayload): Promise<any>;
|
|
52
52
|
onDestroy?(data: onDestroyPayload): Promise<any>;
|
|
53
53
|
}
|
|
54
|
-
export type HookName =
|
|
54
|
+
export type HookName = "onConfigure" | "onListen" | "onUpgrade" | "onConnect" | "connected" | "onAuthenticate" | "onCreateDocument" | "onLoadDocument" | "afterLoadDocument" | "beforeHandleMessage" | "beforeBroadcastStateless" | "beforeSync" | "onStateless" | "onChange" | "onStoreDocument" | "afterStoreDocument" | "onAwarenessUpdate" | "onRequest" | "onDisconnect" | "beforeUnloadDocument" | "afterUnloadDocument" | "onDestroy";
|
|
55
55
|
export type HookPayloadByName = {
|
|
56
56
|
onConfigure: onConfigurePayload;
|
|
57
57
|
onListen: onListenPayload;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IncomingMessage } from
|
|
2
|
-
import { URLSearchParams } from
|
|
1
|
+
import type { IncomingMessage } from "http";
|
|
2
|
+
import { URLSearchParams } from "url";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare function getParameters(request?: Pick<IncomingMessage,
|
|
4
|
+
* Get parameters by the given request
|
|
5
|
+
*/
|
|
6
|
+
export declare function getParameters(request?: Pick<IncomingMessage, "url">): URLSearchParams;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Doc } from
|
|
2
|
-
import { Schema } from
|
|
3
|
-
import type { Transformer } from
|
|
1
|
+
import { Doc } from "yjs";
|
|
2
|
+
import { Schema } from "@tiptap/pm/model";
|
|
3
|
+
import type { Transformer } from "./types.ts";
|
|
4
4
|
declare class Prosemirror implements Transformer {
|
|
5
5
|
defaultSchema: Schema;
|
|
6
6
|
schema(schema: Schema): Prosemirror;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Doc } from
|
|
2
|
-
import type { Extensions } from
|
|
3
|
-
import type { Transformer } from
|
|
1
|
+
import type { Doc } from "yjs";
|
|
2
|
+
import type { Extensions } from "@tiptap/core";
|
|
3
|
+
import type { Transformer } from "./types.ts";
|
|
4
4
|
export declare class Tiptap implements Transformer {
|
|
5
5
|
defaultExtensions: Extensions;
|
|
6
6
|
extensions(extensions: Extensions): Tiptap;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from "./Prosemirror.ts";
|
|
2
|
+
export * from "./Tiptap.ts";
|
|
3
|
+
export * from "./types.ts";
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
2
|
+
"name": "@hocuspocus/extension-webhook",
|
|
3
|
+
"version": "3.1.5",
|
|
4
|
+
"description": "hocuspocus webhook extension",
|
|
5
|
+
"homepage": "https://hocuspocus.dev",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"hocuspocus",
|
|
8
|
+
"webhook",
|
|
9
|
+
"api",
|
|
10
|
+
"rest",
|
|
11
|
+
"yjs"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "dist/hocuspocus-webhook.cjs",
|
|
16
|
+
"module": "dist/hocuspocus-webhook.esm.js",
|
|
17
|
+
"types": "dist/packages/extension-webhook/src/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"source": {
|
|
20
|
+
"import": "./src/index.ts"
|
|
21
|
+
},
|
|
22
|
+
"default": {
|
|
23
|
+
"import": "./dist/hocuspocus-webhook.esm.js",
|
|
24
|
+
"require": "./dist/hocuspocus-webhook.cjs",
|
|
25
|
+
"types": "./dist/packages/extension-webhook/src/index.d.ts"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"src",
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@hocuspocus/common": "^3.1.5",
|
|
34
|
+
"@hocuspocus/server": "^3.1.5",
|
|
35
|
+
"@hocuspocus/transformer": "^3.1.5",
|
|
36
|
+
"axios": "^1.6.2"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"yjs": "^13.6.8"
|
|
40
|
+
},
|
|
41
|
+
"gitHead": "b3454a4ca289a84ddfb7fa5607a2d4b8d5c37e9d"
|
|
42
42
|
}
|