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.0-beta.0 to 2.0.0

dist/packages/provider/src/TiptapCollabProvider.d.ts

1

dist/packages/extension-monitor/src/Dashboard.d.ts
/// <reference types="node" />
/// <reference types="node" />
import { IncomingMessage, ServerResponse } from 'http';

@@ -3,0 +4,0 @@ import { Socket } from 'net';

2

dist/packages/extension-redis/src/Redis.d.ts
import RedisClient, { ClusterNode, ClusterOptions, RedisOptions } from 'ioredis';
import Redlock from 'redlock';
import { Document, Extension, afterLoadDocumentPayload, afterStoreDocumentPayload, onDisconnectPayload, onStoreDocumentPayload, onAwarenessUpdatePayload, onChangePayload, Debugger, onConfigurePayload, onListenPayload, beforeBroadcastStatelessPayload } from '@hocuspocus/server';
export declare type RedisInstance = RedisClient.Cluster | RedisClient.Redis;
export type RedisInstance = RedisClient.Cluster | RedisClient.Redis;
export interface Configuration {

@@ -6,0 +6,0 @@ /**

import { HocuspocusProvider, HocuspocusProviderConfiguration } from './HocuspocusProvider';
import { HocuspocusProviderWebsocketConfiguration } from './HocuspocusProviderWebsocket';
export declare type HocuspocusCloudProviderConfiguration = Required<Pick<HocuspocusProviderConfiguration, 'name'>> & Partial<HocuspocusProviderConfiguration> & Partial<Pick<HocuspocusProviderWebsocketConfiguration, 'url'>> & AdditionalHocuspocusCloudProviderConfiguration;
export type HocuspocusCloudProviderConfiguration = Required<Pick<HocuspocusProviderConfiguration, 'name'>> & Partial<HocuspocusProviderConfiguration> & Partial<Pick<HocuspocusProviderWebsocketConfiguration, 'url'>> & AdditionalHocuspocusCloudProviderConfiguration;
export interface AdditionalHocuspocusCloudProviderConfiguration {

@@ -5,0 +5,0 @@ /**

@@ -9,3 +9,3 @@ import * as Y from 'yjs';

import { onAwarenessChangeParameters, onAwarenessUpdateParameters } from '.';
export declare type HocuspocusProviderConfiguration = Required<Pick<CompleteHocuspocusProviderConfiguration, 'name'>> & Partial<CompleteHocuspocusProviderConfiguration> & (Required<Pick<CompleteHocuspocusProviderWebsocketConfiguration, 'url'>> | Required<Pick<CompleteHocuspocusProviderConfiguration, 'websocketProvider'>>);
export type HocuspocusProviderConfiguration = Required<Pick<CompleteHocuspocusProviderConfiguration, 'name'>> & Partial<CompleteHocuspocusProviderConfiguration> & (Required<Pick<CompleteHocuspocusProviderWebsocketConfiguration, 'url'>> | Required<Pick<CompleteHocuspocusProviderConfiguration, 'websocketProvider'>>);
export interface CompleteHocuspocusProviderConfiguration {

@@ -12,0 +12,0 @@ /**

@@ -7,3 +7,3 @@ import * as mutex from 'lib0/mutex';

import { HocuspocusProvider, onAwarenessChangeParameters, onAwarenessUpdateParameters } from '.';
export declare type HocuspocusProviderWebsocketConfiguration = Required<Pick<CompleteHocuspocusProviderWebsocketConfiguration, 'url'>> & Partial<CompleteHocuspocusProviderWebsocketConfiguration>;
export type HocuspocusProviderWebsocketConfiguration = Required<Pick<CompleteHocuspocusProviderWebsocketConfiguration, 'url'>> & Partial<CompleteHocuspocusProviderWebsocketConfiguration>;
export interface CompleteHocuspocusProviderWebsocketConfiguration {

@@ -10,0 +10,0 @@ /**

export * from './HocuspocusProvider';
export * from './HocuspocusCloudProvider';
export * from './TiptapCollabProvider';
export * from './HocuspocusProviderWebsocket';
export * from './types';

@@ -46,40 +46,40 @@ import { Awareness } from 'y-protocols/awareness';

}
export declare type ConstructableOutgoingMessage = Constructable<AuthenticationMessage> | Constructable<AwarenessMessage> | Constructable<QueryAwarenessMessage> | Constructable<SyncStepOneMessage> | Constructable<SyncStepTwoMessage> | Constructable<UpdateMessage>;
export declare type onAuthenticationFailedParameters = {
export type ConstructableOutgoingMessage = Constructable<AuthenticationMessage> | Constructable<AwarenessMessage> | Constructable<QueryAwarenessMessage> | Constructable<SyncStepOneMessage> | Constructable<SyncStepTwoMessage> | Constructable<UpdateMessage>;
export type onAuthenticationFailedParameters = {
reason: string;
};
export declare type onOpenParameters = {
export type onOpenParameters = {
event: Event;
};
export declare type onMessageParameters = {
export type onMessageParameters = {
event: MessageEvent;
message: IncomingMessage;
};
export declare type onOutgoingMessageParameters = {
export type onOutgoingMessageParameters = {
message: OutgoingMessage;
};
export declare type onStatusParameters = {
export type onStatusParameters = {
status: WebSocketStatus;
};
export declare type onSyncedParameters = {
export type onSyncedParameters = {
state: boolean;
};
export declare type onDisconnectParameters = {
export type onDisconnectParameters = {
event: CloseEvent;
};
export declare type onCloseParameters = {
export type onCloseParameters = {
event: CloseEvent;
};
export declare type onAwarenessUpdateParameters = {
export type onAwarenessUpdateParameters = {
states: StatesArray;
};
export declare type onAwarenessChangeParameters = {
export type onAwarenessChangeParameters = {
states: StatesArray;
};
export declare type onStatelessParameters = {
export type onStatelessParameters = {
payload: string;
};
export declare type StatesArray = {
export type StatesArray = {
clientId: number;
[key: string | number]: any;
}[];
/// <reference types="node" />
/// <reference types="node" />
import { IncomingMessage as HTTPIncomingMessage } from 'http';

@@ -26,3 +27,3 @@ import AsyncLock from 'async-lock';

constructor(connection: WebSocket, request: HTTPIncomingMessage, document: Document, timeout: number, socketId: string, context: any, readOnly: boolean | undefined, logger: Debugger);
boundClose: (event?: CloseEvent | undefined) => void;
boundClose: (event?: CloseEvent) => void;
boundHandleMessage: (data: Uint8Array) => void;

@@ -29,0 +30,0 @@ boundHandlePong: () => void;

/// <reference types="node" />
/// <reference types="node" />
import { IncomingMessage, Server as HTTPServer } from 'http';

@@ -3,0 +4,0 @@ import WebSocket, { AddressInfo, WebSocketServer } from 'ws';

/// <reference types="node" />
/// <reference types="node" />
/// <reference types="node" />
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'http';

@@ -50,4 +52,4 @@ import { URLSearchParams } from 'url';

}
export declare type HookName = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | 'onLoadDocument' | 'afterLoadDocument' | 'beforeHandleMessage' | 'beforeBroadcastStateless' | 'onStateless' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'onDestroy';
export declare type HookPayload = onConfigurePayload | onListenPayload | onUpgradePayload | onConnectPayload | connectedPayload | onAuthenticatePayload | onLoadDocumentPayload | onStatelessPayload | beforeHandleMessagePayload | beforeBroadcastStatelessPayload | onChangePayload | onStoreDocumentPayload | afterStoreDocumentPayload | onAwarenessUpdatePayload | onRequestPayload | onDisconnectPayload | onDestroyPayload;
export type HookName = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | 'onLoadDocument' | 'afterLoadDocument' | 'beforeHandleMessage' | 'beforeBroadcastStateless' | 'onStateless' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'onDestroy';
export type HookPayload = onConfigurePayload | onListenPayload | onUpgradePayload | onConnectPayload | connectedPayload | onAuthenticatePayload | onLoadDocumentPayload | onStatelessPayload | beforeHandleMessagePayload | beforeBroadcastStatelessPayload | onChangePayload | onStoreDocumentPayload | afterStoreDocumentPayload | onAwarenessUpdatePayload | onRequestPayload | onDisconnectPayload | onDestroyPayload;
export interface Configuration extends Extension {

@@ -212,3 +214,3 @@ /**

}
export declare type StatesArray = {
export type StatesArray = {
clientId: number;

@@ -215,0 +217,0 @@ [key: string | number]: any;

import { Hocuspocus, Configuration } from '@hocuspocus/server';
export declare const newHocuspocus: (options?: Partial<Configuration> | undefined) => Promise<Hocuspocus>;
export declare const newHocuspocus: (options?: Partial<Configuration>) => Promise<Hocuspocus>;
{
"name": "@hocuspocus/provider",
"version": "2.0.0-beta.0",
"version": "2.0.0",
"description": "hocuspocus provider",

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

"dependencies": {
"@hocuspocus/common": "^2.0.0-beta.0",
"@hocuspocus/common": "^2.0.0",
"@lifeomic/attempt": "^3.0.2",

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

export * from './HocuspocusProvider'
export * from './HocuspocusCloudProvider'
export * from './TiptapCollabProvider'
export * from './HocuspocusProviderWebsocket'
export * from './types'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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