@hocuspocus/extension-database
Advanced tools
Comparing version 2.1.0 to 2.2.0
import Document from './Document.js'; | ||
import type { Hocuspocus } from './Hocuspocus.js'; | ||
export declare class DirectConnection { | ||
import type { DirectConnection as DirectConnectionInterface } from './types'; | ||
export declare class DirectConnection implements DirectConnectionInterface { | ||
document: Document | null; | ||
@@ -5,0 +6,0 @@ instance: Hocuspocus; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { IncomingMessage, Server as HTTPServer } from 'http'; | ||
import { Server as HTTPServer, IncomingMessage } from 'http'; | ||
import WebSocket, { AddressInfo, WebSocketServer } from 'ws'; | ||
import { Configuration, HookName, HookPayload, onListenPayload, onStoreDocumentPayload } from './types.js'; | ||
import Document from './Document.js'; | ||
import { Debugger } from './Debugger.js'; | ||
import { DirectConnection } from './DirectConnection.js'; | ||
import Document from './Document.js'; | ||
import { Configuration, ConnectionConfiguration, HookName, HookPayload, onListenPayload, onStoreDocumentPayload } from './types.js'; | ||
export declare const defaultConfiguration: { | ||
@@ -72,3 +72,3 @@ name: null; | ||
*/ | ||
handleConnection(incoming: WebSocket, request: IncomingMessage, context?: any): void; | ||
handleConnection(incoming: WebSocket, request: IncomingMessage, defaultContext?: any): void; | ||
/** | ||
@@ -89,7 +89,3 @@ * Handle update of the given document | ||
*/ | ||
private createDocument; | ||
/** | ||
* Create a new connection by the given request and document | ||
*/ | ||
private createConnection; | ||
createDocument(documentName: string, request: Partial<Pick<IncomingMessage, 'headers' | 'url'>>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise<Document>; | ||
storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload): void; | ||
@@ -101,6 +97,2 @@ /** | ||
hooks(name: HookName, payload: HookPayload, callback?: Function | null): Promise<any>; | ||
/** | ||
* Get parameters by the given request | ||
*/ | ||
private static getParameters; | ||
enableDebugging(): void; | ||
@@ -107,0 +99,0 @@ enableMessageLogging(): void; |
@@ -267,1 +267,5 @@ /// <reference types="node" /> | ||
} | ||
export interface DirectConnection { | ||
transact(transaction: (document: Document) => void): Promise<void>; | ||
disconnect(): void; | ||
} |
{ | ||
"name": "@hocuspocus/extension-database", | ||
"description": "a generic Hocuspocus persistence driver for the database", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"homepage": "https://hocuspocus.dev", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@hocuspocus/server": "^2.1.0" | ||
"@hocuspocus/server": "^2.2.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "peerDependencies": { |
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
68917
131
1808
Updated@hocuspocus/server@^2.2.0