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

@hocuspocus/provider

Package Overview
Dependencies
Maintainers
4
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hocuspocus/provider - npm Package Compare versions

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/provider",
"version": "2.0.6",
"version": "2.1.0-alpha.0",
"description": "hocuspocus provider",

@@ -31,3 +31,3 @@ "homepage": "https://hocuspocus.dev",

"dependencies": {
"@hocuspocus/common": "^2.0.6",
"@hocuspocus/common": "^2.1.0-alpha.0",
"@lifeomic/attempt": "^3.0.2",

@@ -34,0 +34,0 @@ "lib0": "^0.2.47",

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