@hocuspocus/extension-database
Advanced tools
Comparing version 2.5.0-rc.0 to 2.5.0
@@ -0,1 +1,2 @@ | ||
/// <reference types="node" /> | ||
import RedisClient, { ClusterNode, ClusterOptions, RedisOptions } from 'ioredis'; | ||
@@ -59,2 +60,3 @@ import Redlock from 'redlock'; | ||
configuration: Configuration; | ||
redisTransactionOrigin: string; | ||
pub: RedisInstance; | ||
@@ -66,2 +68,3 @@ sub: RedisInstance; | ||
logger: Debugger; | ||
messagePrefix: Buffer; | ||
constructor(configuration: Partial<Configuration>); | ||
@@ -73,2 +76,4 @@ onConfigure({ instance }: onConfigurePayload): Promise<void>; | ||
private lockKey; | ||
private encodeMessage; | ||
private decodeMessage; | ||
/** | ||
@@ -100,3 +105,3 @@ * Once a document is loaded, subscribe to the channel in Redis. | ||
/** | ||
* Handle incoming messages published on all subscribed document channels. | ||
* Handle incoming messages published on subscribed document channels. | ||
* Note that this will also include messages from ourselves as it is not possible | ||
@@ -103,0 +108,0 @@ * in Redis to filter these. |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { IncomingMessage } from 'http'; | ||
@@ -32,2 +31,3 @@ import WebSocket, { AddressInfo } from 'ws'; | ||
debugger: Debugger; | ||
debounce: (id: string, func: Function, debounce: number, maxDebounce: number) => void; | ||
constructor(configuration?: Partial<Configuration>); | ||
@@ -82,11 +82,3 @@ /** | ||
private handleDocumentUpdate; | ||
timers: Map<string, { | ||
timeout: NodeJS.Timeout; | ||
start: number; | ||
}>; | ||
/** | ||
* debounce the given function, using the given identifier | ||
*/ | ||
debounce(id: string, func: Function, immediately?: boolean): void; | ||
/** | ||
* Create a new document by the given request | ||
@@ -93,0 +85,0 @@ */ |
@@ -9,1 +9,2 @@ export * from './Connection.js'; | ||
export * from './types.js'; | ||
export * from './util/debounce.js'; |
@@ -8,3 +8,4 @@ import Connection from './Connection.js'; | ||
logger: Debugger; | ||
constructor(message: IncomingMessage, logger: Debugger); | ||
defaultTransactionOrigin?: string; | ||
constructor(message: IncomingMessage, logger: Debugger, defaultTransactionOrigin?: string); | ||
apply(document: Document, connection?: Connection, reply?: (message: Uint8Array) => void): void; | ||
@@ -11,0 +12,0 @@ readSyncMessage(message: IncomingMessage, document: Document, connection?: Connection, reply?: (message: Uint8Array) => void, requestFirstSync?: boolean): 0 | 1 | 2; |
@@ -126,12 +126,3 @@ /// <reference types="node" /> | ||
}; | ||
/** | ||
* Function which returns the (customized) document name based on the request | ||
*/ | ||
getDocumentName?(data: getDocumentNamePayload): string | Promise<string>; | ||
} | ||
export interface getDocumentNamePayload { | ||
documentName: string; | ||
request: IncomingMessage; | ||
requestParameters: URLSearchParams; | ||
} | ||
export interface onStatelessPayload { | ||
@@ -138,0 +129,0 @@ connection: Connection; |
{ | ||
"name": "@hocuspocus/extension-database", | ||
"description": "a generic Hocuspocus persistence driver for the database", | ||
"version": "2.5.0-rc.0", | ||
"version": "2.5.0", | ||
"homepage": "https://hocuspocus.dev", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@hocuspocus/server": "^2.5.0-rc.0" | ||
"@hocuspocus/server": "^2.5.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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
73314
132
1908
Updated@hocuspocus/server@^2.5.0