@hocuspocus/extension-database
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/extension-database", | ||
"description": "a generic Hocuspocus persistence driver for the database", | ||
"version": "2.0.0-beta.0", | ||
"version": "2.0.0", | ||
"homepage": "https://hocuspocus.dev", | ||
@@ -29,3 +29,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@hocuspocus/server": "^2.0.0-beta.0" | ||
"@hocuspocus/server": "^2.0.0" | ||
}, | ||
@@ -32,0 +32,0 @@ "peerDependencies": { |
@@ -8,3 +8,3 @@ # @hocuspocus/extension-database | ||
## Introduction | ||
hocuspocus is an opinionated collaborative editing backend for [Tiptap](https://github.com/ueberdosis/tiptap) – based on [Y.js](https://github.com/yjs/yjs), a CRDT framework with a powerful abstraction of shared data. | ||
Hocuspocus is an opinionated collaborative editing backend for [Tiptap](https://github.com/ueberdosis/tiptap) – based on [Y.js](https://github.com/yjs/yjs), a CRDT framework with a powerful abstraction of shared data. | ||
@@ -15,2 +15,2 @@ ## Offical Documentation | ||
## License | ||
hocuspocus is open-sourced software licensed under the [MIT license](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). | ||
Hocuspocus is open-sourced software licensed under the [MIT license](https://github.com/ueberdosis/hocuspocus/blob/main/LICENSE.md). |
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
71523
129
1875
0
Updated@hocuspocus/server@^2.0.0