Socket
Socket
Sign inDemoInstall

@hocuspocus/server

Package Overview
Dependencies
6
Maintainers
4
Versions
112
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.6 to 2.1.0-alpha.0

28

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

@@ -1,5 +0,4 @@

import RedisClient, { ClusterNode, ClusterOptions, RedisOptions } from 'ioredis';
import Redlock from 'redlock';
import { Extension, afterLoadDocumentPayload, afterStoreDocumentPayload, onDisconnectPayload, onStoreDocumentPayload, onAwarenessUpdatePayload, onChangePayload, Debugger, onConfigurePayload, onListenPayload, beforeBroadcastStatelessPayload, Hocuspocus } from '@hocuspocus/server';
export type RedisInstance = RedisClient.Cluster | RedisClient.Redis;
import RedisClient, { ClusterNode, ClusterOptions, RedisOptions, Cluster as RedisClusterClient } from 'ioredis';
import { Extension, afterLoadDocumentPayload, onDisconnectPayload, onAwarenessUpdatePayload, onChangePayload, Debugger, onConfigurePayload, beforeBroadcastStatelessPayload, Hocuspocus } from '@hocuspocus/server';
export type RedisInstance = RedisClient | RedisClusterClient;
export interface Configuration {

@@ -42,6 +41,2 @@ /**

/**
* The maximum time for the Redis lock in ms (in case it can’t be released).
*/
lockTimeout: number;
/**
* A delay before onDisconnect is executed. This allows last minute updates'

@@ -63,12 +58,8 @@ * sync messages to be received by the subscription before it's closed.

instance: Hocuspocus;
redlock: Redlock;
locks: Map<string, Redlock.Lock>;
logger: Debugger;
constructor(configuration: Partial<Configuration>);
onConfigure({ instance }: onConfigurePayload): Promise<void>;
onListen({ configuration }: onListenPayload): Promise<void>;
private getKey;
private pubKey;
private subKey;
private lockKey;
/**

@@ -87,11 +78,2 @@ * Once a document is laoded, subscribe to the channel in Redis.

/**
* Before the document is stored, make sure to set a lock in Redis.
* That’s meant to avoid conflicts with other instances trying to store the document.
*/
onStoreDocument({ documentName }: onStoreDocumentPayload): Promise<unknown>;
/**
* Release the Redis lock, so other instances can store documents.
*/
afterStoreDocument({ documentName }: afterStoreDocumentPayload): Promise<void>;
/**
* Handle awareness update messages received directly by this Hocuspocus instance.

@@ -116,6 +98,2 @@ */

beforeBroadcastStateless(data: beforeBroadcastStatelessPayload): Promise<number>;
/**
* Kill the Redlock connection immediately.
*/
onDestroy(): Promise<void>;
}

4

package.json
{
"name": "@hocuspocus/server",
"description": "plug & play collaboration backend",
"version": "2.0.6",
"version": "2.1.0-alpha.0",
"homepage": "https://hocuspocus.dev",

@@ -31,3 +31,3 @@ "keywords": [

"dependencies": {
"@hocuspocus/common": "^2.0.6",
"@hocuspocus/common": "^2.1.0-alpha.0",
"async-lock": "^1.3.1",

@@ -34,0 +34,0 @@ "kleur": "^4.1.4",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc