@hocuspocus/transformer
Advanced tools
Comparing version 1.0.0-alpha.19 to 1.0.0-alpha.20
export * from './auth'; | ||
export * from './CloseEvents'; | ||
export * from './awarenessStatesToArray'; |
import { Extension, onConnectPayload } from '@hocuspocus/server'; | ||
export interface Configuration { | ||
export interface ThrottleConfiguration { | ||
throttle: number | null | false; | ||
@@ -7,6 +7,10 @@ banTime: number; | ||
export declare class Throttle implements Extension { | ||
configuration: Configuration; | ||
configuration: ThrottleConfiguration; | ||
connectionsByIp: Map<string, Array<number>>; | ||
bannedIps: Map<string, number>; | ||
/** | ||
* Constructor | ||
*/ | ||
constructor(configuration?: Partial<ThrottleConfiguration>); | ||
/** | ||
* Throttle requests | ||
@@ -13,0 +17,0 @@ * @private |
export * from './HocuspocusProvider'; | ||
export * from './HocuspocusCloudProvider'; | ||
export * from './types'; | ||
export * from './utils'; |
@@ -11,4 +11,4 @@ import { Awareness } from 'y-protocols/awareness'; | ||
apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void; | ||
readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): 0 | 1 | 2; | ||
readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): 0 | 2 | 1; | ||
applyQueryAwarenessMessage(awareness: Awareness, reply?: (message: Uint8Array) => void): void; | ||
} |
@@ -41,2 +41,3 @@ /// <reference types="node" /> | ||
onConnect?(data: onConnectPayload): Promise<any>; | ||
connected?(data: connectedPayload): Promise<any>; | ||
onAuthenticate?(data: onAuthenticatePayload): Promise<any>; | ||
@@ -57,3 +58,3 @@ /** | ||
} | ||
export declare type Hook = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'onAuthenticate' | | ||
export declare type Hook = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | | ||
/** | ||
@@ -121,2 +122,11 @@ * @deprecated onCreateDocument is deprecated, use onLoadDocument instead | ||
} | ||
export interface connectedPayload { | ||
documentName: string; | ||
instance: Hocuspocus; | ||
request: IncomingMessage; | ||
requestHeaders: IncomingHttpHeaders; | ||
requestParameters: URLSearchParams; | ||
socketId: string; | ||
connection: ConnectionConfiguration; | ||
} | ||
export interface onLoadDocumentPayload { | ||
@@ -123,0 +133,0 @@ context: any; |
{ | ||
"name": "@hocuspocus/transformer", | ||
"version": "1.0.0-alpha.19", | ||
"version": "1.0.0-alpha.20", | ||
"description": "hocuspocus transformation utilities", | ||
@@ -36,3 +36,3 @@ "homepage": "https://hocuspocus.dev", | ||
}, | ||
"gitHead": "125d94dc3520bb5185293c9b316f66ddd9215992" | ||
"gitHead": "41c2ca3452f17e7dab914c633cde04ae68f45929" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
68410
120
1660
0