@hocuspocus/provider
Advanced tools
Comparing version 2.0.0-beta.0 to 2.0.0
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { IncomingMessage, ServerResponse } from 'http'; | ||
@@ -3,0 +4,0 @@ import { Socket } from 'net'; |
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
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
648177
145
7524
0
Updated@hocuspocus/common@^2.0.0