@hocuspocus/extension-webhook
Advanced tools
Comparing version 1.0.0-alpha.63 to 1.0.0-alpha.64
@@ -53,3 +53,3 @@ /// <reference types="node" /> | ||
configuration: Partial<Configuration>; | ||
ipAddress: string; | ||
ipAddress: string | null; | ||
nodeVersion: string; | ||
@@ -60,3 +60,4 @@ platform: NodeJS.Platform; | ||
}>; | ||
private getIpAddress; | ||
private static readableYDoc; | ||
} |
import RedisClient from 'ioredis'; | ||
import Redlock from 'redlock'; | ||
import { Document, Extension, afterLoadDocumentPayload, afterStoreDocumentPayload, onDisconnectPayload, onStoreDocumentPayload, onAwarenessUpdatePayload, Debugger, onConfigurePayload } from '@hocuspocus/server'; | ||
import { Document, Extension, afterLoadDocumentPayload, afterStoreDocumentPayload, onDisconnectPayload, onStoreDocumentPayload, onAwarenessUpdatePayload, Debugger, onConfigurePayload, onListenPayload } from '@hocuspocus/server'; | ||
export interface Configuration { | ||
@@ -49,3 +49,3 @@ /** | ||
onConfigure({ instance }: onConfigurePayload): Promise<void>; | ||
onListen(): Promise<void>; | ||
onListen({ configuration }: onListenPayload): Promise<void>; | ||
private getKey; | ||
@@ -52,0 +52,0 @@ private pubKey; |
/// <reference types="node" /> | ||
import WebSocket, { AddressInfo, WebSocketServer } from 'ws'; | ||
import { IncomingMessage, Server as HTTPServer } from 'http'; | ||
import { Configuration, Hook } from './types'; | ||
import { Configuration, HookName, HookPayload } from './types'; | ||
import Document from './Document'; | ||
@@ -91,3 +91,3 @@ import { Debugger } from './Debugger'; | ||
*/ | ||
hooks(name: Hook, payload: any, callback?: Function | null): Promise<any>; | ||
hooks(name: HookName, payload: HookPayload, callback?: Function | null): Promise<any>; | ||
/** | ||
@@ -94,0 +94,0 @@ * Get parameters by the given request |
/// <reference types="node" /> | ||
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'http'; | ||
import { URLSearchParams } from 'url'; | ||
import { Socket } from 'net'; | ||
import { Awareness } from 'y-protocols/awareness'; | ||
@@ -47,3 +46,3 @@ import Document from './Document'; | ||
} | ||
export declare type Hook = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | | ||
export declare type HookName = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | | ||
/** | ||
@@ -53,2 +52,3 @@ * @deprecated onCreateDocument is deprecated, use onLoadDocument instead | ||
'onCreateDocument' | 'onLoadDocument' | 'afterLoadDocument' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'onDestroy'; | ||
export declare type HookPayload = onConfigurePayload | onListenPayload | onUpgradePayload | onConnectPayload | connectedPayload | onAuthenticatePayload | onLoadDocumentPayload | onLoadDocumentPayload | onLoadDocumentPayload | onChangePayload | onStoreDocumentPayload | afterStoreDocumentPayload | onAwarenessUpdatePayload | onRequestPayload | onDisconnectPayload | onDestroyPayload; | ||
export interface Configuration extends Extension { | ||
@@ -203,8 +203,10 @@ /** | ||
export interface onUpgradePayload { | ||
request: IncomingMessage; | ||
socket: any; | ||
head: any; | ||
request: IncomingMessage; | ||
socket: Socket; | ||
instance: Hocuspocus; | ||
} | ||
export interface onListenPayload { | ||
instance: Hocuspocus; | ||
configuration: Configuration; | ||
port: number; | ||
@@ -216,5 +218,5 @@ } | ||
export interface onConfigurePayload { | ||
instance: Hocuspocus; | ||
configuration: Configuration; | ||
version: string; | ||
instance: Hocuspocus; | ||
} |
@@ -5,4 +5,5 @@ export * from './createDirectory'; | ||
export * from './newHocuspocusProvider'; | ||
export * from './randomInteger'; | ||
export * from './redisConnectionSettings'; | ||
export * from './removeDirectory'; | ||
export * from './sleep'; |
{ | ||
"name": "@hocuspocus/extension-webhook", | ||
"version": "1.0.0-alpha.63", | ||
"version": "1.0.0-alpha.64", | ||
"description": "hocuspocus webhook extension", | ||
@@ -32,3 +32,3 @@ "homepage": "https://hocuspocus.dev", | ||
"dependencies": { | ||
"@hocuspocus/server": "^1.0.0-alpha.99", | ||
"@hocuspocus/server": "^1.0.0-alpha.100", | ||
"@hocuspocus/transformer": "^1.0.0-alpha.22", | ||
@@ -38,3 +38,3 @@ "axios": "^0.26.1", | ||
}, | ||
"gitHead": "e26a5eeaa9278b9587d4b475cec53bf14bc569b9" | ||
"gitHead": "29d403cdc2b972cf3129229abcaceb08e365fbb4" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89659
116
1991