Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hocuspocus/extension-database

Package Overview
Dependencies
Maintainers
5
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hocuspocus/extension-database - npm Package Compare versions

Comparing version 2.5.0-rc.0 to 2.5.0

dist/packages/server/src/util/debounce.d.ts

7

dist/packages/extension-redis/src/Redis.d.ts

@@ -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.

10

dist/packages/server/src/Hocuspocus.d.ts
/// <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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc