@hocuspocus/extension-throttle
Advanced tools
Comparing version 1.0.0-alpha.20 to 1.0.0-alpha.21
@@ -6,2 +6,10 @@ # Change Log | ||
# [1.0.0-alpha.21](https://github.com/ueberdosis/hocuspocus/compare/@hocuspocus/extension-throttle@1.0.0-alpha.20...@hocuspocus/extension-throttle@1.0.0-alpha.21) (2021-08-27) | ||
**Note:** Version bump only for package @hocuspocus/extension-throttle | ||
# [1.0.0-alpha.20](https://github.com/ueberdosis/hocuspocus/compare/@hocuspocus/extension-throttle@1.0.0-alpha.19...@hocuspocus/extension-throttle@1.0.0-alpha.20) (2021-08-19) | ||
@@ -8,0 +16,0 @@ |
@@ -50,18 +50,2 @@ class Throttle { | ||
} | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onCreateDocument(data) { } | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onChange(data) { } | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onDisconnect(data) { } | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onUpgrade(data) { } | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onRequest(data) { } | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onListen(data) { } | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onDestroy(data) { } | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onConfigure(data) { } | ||
} | ||
@@ -68,0 +52,0 @@ |
/// <reference types="node" /> | ||
import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onCreateDocumentPayload, onDestroyPayload, onDisconnectPayload, onListenPayload, onRequestPayload, onUpgradePayload } from '@hocuspocus/server'; | ||
import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onCreateDocumentPayload, onDisconnectPayload, onRequestPayload, onUpgradePayload } from '@hocuspocus/server'; | ||
import { IncomingMessage, ServerResponse } from 'http'; | ||
@@ -37,5 +37,3 @@ import WebSocket from 'ws'; | ||
onChange(data: onChangePayload): Promise<void>; | ||
onListen(data: onListenPayload): Promise<void>; | ||
onDestroy(data: onDestroyPayload): Promise<void>; | ||
onConfigure(data: onConfigurePayload): Promise<void>; | ||
} |
@@ -41,2 +41,3 @@ import * as Y from 'yjs'; | ||
onDestroy: () => void; | ||
onAwarenessUpdate: (states: any) => void; | ||
onAwarenessChange: (states: any) => void; | ||
@@ -43,0 +44,0 @@ debug: boolean; |
@@ -1,11 +0,13 @@ | ||
import * as decoding from 'lib0/decoding'; | ||
import * as encoding from 'lib0/encoding'; | ||
import { Decoder } from 'lib0/decoding'; | ||
import { Encoder } from 'lib0/encoding'; | ||
import { MessageType } from './types'; | ||
export declare class IncomingMessage { | ||
data: any; | ||
encoder: encoding.Encoder; | ||
decoder: decoding.Decoder; | ||
type: MessageType; | ||
encoder: Encoder; | ||
decoder: Decoder; | ||
constructor(data: any); | ||
get name(): string; | ||
readVarUint(): MessageType; | ||
readVarUint8Array(): Uint8Array; | ||
writeVarUint(type: MessageType): void; | ||
writeVarUint8Array(data: Uint8Array): void; | ||
} |
@@ -1,2 +0,1 @@ | ||
import * as encoding from 'lib0/encoding'; | ||
import { HocuspocusProvider } from './HocuspocusProvider'; | ||
@@ -7,3 +6,3 @@ import { IncomingMessage } from './IncomingMessage'; | ||
constructor(message: IncomingMessage); | ||
apply(provider: HocuspocusProvider, emitSynced?: boolean): encoding.Encoder; | ||
apply(provider: HocuspocusProvider, emitSynced?: boolean): void; | ||
private applySyncMessage; | ||
@@ -10,0 +9,0 @@ private applyAwarenessMessage; |
@@ -1,2 +0,2 @@ | ||
import * as encoding from 'lib0/encoding'; | ||
import { Encoder } from 'lib0/encoding'; | ||
import { AuthenticationMessage } from './OutgoingMessages/AuthenticationMessage'; | ||
@@ -10,3 +10,3 @@ import { AwarenessMessage } from './OutgoingMessages/AwarenessMessage'; | ||
export declare class MessageSender { | ||
encoder: encoding.Encoder; | ||
encoder: Encoder; | ||
message: any; | ||
@@ -13,0 +13,0 @@ constructor(Message: Constructable<AuthenticationMessage> | Constructable<AwarenessMessage> | Constructable<QueryAwarenessMessage> | Constructable<SyncStepOneMessage> | Constructable<SyncStepTwoMessage> | Constructable<UpdateMessage>, args?: any); |
@@ -1,8 +0,8 @@ | ||
import * as encoding from 'lib0/encoding'; | ||
import { Encoder } from 'lib0/encoding'; | ||
import { MessageType, OutgoingMessageInterface } from './types'; | ||
export declare class OutgoingMessage implements OutgoingMessageInterface { | ||
encoder: encoding.Encoder; | ||
encoder: Encoder; | ||
type?: MessageType; | ||
constructor(); | ||
get name(): string; | ||
toUint8Array(): Uint8Array; | ||
} |
@@ -1,2 +0,1 @@ | ||
import * as encoding from 'lib0/encoding'; | ||
import { MessageType, OutgoingMessageArguments } from '../types'; | ||
@@ -7,3 +6,3 @@ import { OutgoingMessage } from '../OutgoingMessage'; | ||
description: string; | ||
get(args: Partial<OutgoingMessageArguments>): encoding.Encoder; | ||
get(args: Partial<OutgoingMessageArguments>): import("lib0/encoding").Encoder; | ||
} |
@@ -1,2 +0,1 @@ | ||
import * as encoding from 'lib0/encoding'; | ||
import { MessageType, OutgoingMessageArguments } from '../types'; | ||
@@ -7,3 +6,3 @@ import { OutgoingMessage } from '../OutgoingMessage'; | ||
description: string; | ||
get(args: Partial<OutgoingMessageArguments>): encoding.Encoder; | ||
get(args: Partial<OutgoingMessageArguments>): import("lib0/encoding").Encoder; | ||
} |
import { RedisPersistence } from 'y-redis'; | ||
import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onCreateDocumentPayload, onDestroyPayload, onDisconnectPayload, onListenPayload, onRequestPayload, onUpgradePayload } from '@hocuspocus/server'; | ||
import { Extension, onConnectPayload, onCreateDocumentPayload, onDisconnectPayload } from '@hocuspocus/server'; | ||
export interface Configuration { | ||
@@ -15,9 +15,3 @@ } | ||
onConnect(data: onConnectPayload): Promise<void>; | ||
onChange(data: onChangePayload): Promise<void>; | ||
onDisconnect(data: onDisconnectPayload): Promise<void>; | ||
onListen(data: onListenPayload): Promise<void>; | ||
onDestroy(data: onDestroyPayload): Promise<void>; | ||
onConfigure(data: onConfigurePayload): Promise<void>; | ||
onRequest(data: onRequestPayload): Promise<void>; | ||
onUpgrade(data: onUpgradePayload): Promise<void>; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onCreateDocumentPayload, onDestroyPayload, onDisconnectPayload, onListenPayload, onRequestPayload, onUpgradePayload } from '@hocuspocus/server'; | ||
import { Extension, onCreateDocumentPayload } from '@hocuspocus/server'; | ||
import { LeveldbPersistence } from 'y-leveldb'; | ||
@@ -22,10 +22,2 @@ export interface Configuration { | ||
store(documentName: string, update: Uint8Array): Promise<any>; | ||
onChange(data: onChangePayload): Promise<void>; | ||
onConnect(data: onConnectPayload): Promise<void>; | ||
onDisconnect(data: onDisconnectPayload): Promise<void>; | ||
onListen(data: onListenPayload): Promise<void>; | ||
onDestroy(data: onDestroyPayload): Promise<void>; | ||
onConfigure(data: onConfigurePayload): Promise<void>; | ||
onRequest(data: onRequestPayload): Promise<void>; | ||
onUpgrade(data: onUpgradePayload): Promise<void>; | ||
} |
import { Decoder } from 'lib0/decoding'; | ||
import { Encoder } from 'lib0/encoding'; | ||
import Document from './Document'; | ||
import Connection from './Connection'; | ||
import { MessageType } from './types'; | ||
export declare class IncomingMessage { | ||
/** | ||
* Access to the received message. | ||
*/ | ||
decoder: Decoder; | ||
syncMessageEncoder?: Encoder; | ||
/** | ||
* Access to the reply. | ||
*/ | ||
encoder: Encoder; | ||
constructor(input: any); | ||
readSyncMessageAndApplyItTo(document: Document, connection?: Connection): void; | ||
readUint8Array(): Uint8Array; | ||
readVarUint8Array(): Uint8Array; | ||
readVarUint(): number; | ||
toUint8Array(): Uint8Array; | ||
writeVarUint(type: MessageType): void; | ||
get length(): number; | ||
get type(): number; | ||
private get encoder(); | ||
} |
@@ -7,2 +7,3 @@ /// <reference types="node" /> | ||
export declare enum MessageType { | ||
Unknown = -1, | ||
Sync = 0, | ||
@@ -23,11 +24,11 @@ Awareness = 1, | ||
onAuthenticate?(data: onAuthenticatePayload): Promise<any>; | ||
onChange(data: onChangePayload): Promise<any>; | ||
onConnect(data: onConnectPayload): Promise<any>; | ||
onConfigure(data: onConfigurePayload): Promise<any>; | ||
onCreateDocument(data: onCreateDocumentPayload): Promise<any>; | ||
onDestroy(data: onDestroyPayload): Promise<any>; | ||
onDisconnect(data: onDisconnectPayload): Promise<any>; | ||
onListen(data: onListenPayload): Promise<any>; | ||
onRequest(data: onRequestPayload): Promise<any>; | ||
onUpgrade(data: onUpgradePayload): Promise<any>; | ||
onChange?(data: onChangePayload): Promise<any>; | ||
onConnect?(data: onConnectPayload): Promise<any>; | ||
onConfigure?(data: onConfigurePayload): Promise<any>; | ||
onCreateDocument?(data: onCreateDocumentPayload): Promise<any>; | ||
onDestroy?(data: onDestroyPayload): Promise<any>; | ||
onDisconnect?(data: onDisconnectPayload): Promise<any>; | ||
onListen?(data: onListenPayload): Promise<any>; | ||
onRequest?(data: onRequestPayload): Promise<any>; | ||
onUpgrade?(data: onUpgradePayload): Promise<any>; | ||
} | ||
@@ -34,0 +35,0 @@ export interface Configuration extends Extension { |
@@ -1,2 +0,2 @@ | ||
import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onCreateDocumentPayload, onDestroyPayload, onDisconnectPayload, onListenPayload, onRequestPayload, onUpgradePayload } from '@hocuspocus/server'; | ||
import { Extension, onConnectPayload } from '@hocuspocus/server'; | ||
export interface Configuration { | ||
@@ -20,10 +20,2 @@ throttle: number | null | false; | ||
onConnect(data: onConnectPayload): Promise<any>; | ||
onCreateDocument(data: onCreateDocumentPayload): Promise<void>; | ||
onChange(data: onChangePayload): Promise<void>; | ||
onDisconnect(data: onDisconnectPayload): Promise<void>; | ||
onUpgrade(data: onUpgradePayload): Promise<void>; | ||
onRequest(data: onRequestPayload): Promise<void>; | ||
onListen(data: onListenPayload): Promise<void>; | ||
onDestroy(data: onDestroyPayload): Promise<void>; | ||
onConfigure(data: onConfigurePayload): Promise<void>; | ||
} |
/// <reference types="node" /> | ||
import { Extension, onChangePayload, onConfigurePayload, onConnectPayload, onCreateDocumentPayload, onDestroyPayload, onDisconnectPayload, onListenPayload, onRequestPayload, onUpgradePayload } from '@hocuspocus/server'; | ||
import { Extension, onChangePayload, onConnectPayload, onCreateDocumentPayload, onDisconnectPayload } from '@hocuspocus/server'; | ||
import { Doc } from 'yjs'; | ||
@@ -59,7 +59,2 @@ import { Transformer } from '@hocuspocus/transformer'; | ||
onDisconnect(data: onDisconnectPayload): Promise<void>; | ||
onUpgrade(data: onUpgradePayload): Promise<void>; | ||
onRequest(data: onRequestPayload): Promise<void>; | ||
onListen(data: onListenPayload): Promise<void>; | ||
onDestroy(data: onDestroyPayload): Promise<void>; | ||
onConfigure(data: onConfigurePayload): Promise<void>; | ||
} |
{ | ||
"name": "@hocuspocus/extension-throttle", | ||
"version": "1.0.0-alpha.20", | ||
"version": "1.0.0-alpha.21", | ||
"description": "hocuspocus throttle extension", | ||
@@ -25,5 +25,5 @@ "homepage": "https://hocuspocus.dev", | ||
"dependencies": { | ||
"@hocuspocus/server": "^1.0.0-alpha.63" | ||
"@hocuspocus/server": "^1.0.0-alpha.64" | ||
}, | ||
"gitHead": "13bb2b38c5887bb09c2b6565754888092c8e345b" | ||
"gitHead": "d8938e5d42a85a8d447e7e63fd5e2bf4f18a7d2d" | ||
} |
import { | ||
Extension, | ||
onChangePayload, | ||
onConfigurePayload, | ||
onConnectPayload, | ||
onCreateDocumentPayload, | ||
onDestroyPayload, | ||
onDisconnectPayload, | ||
onListenPayload, | ||
onRequestPayload, | ||
onUpgradePayload, | ||
} from '@hocuspocus/server' | ||
@@ -82,25 +74,2 @@ | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onCreateDocument(data: onCreateDocumentPayload) {} | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onChange(data: onChangePayload) {} | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onDisconnect(data: onDisconnectPayload) {} | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onUpgrade(data: onUpgradePayload) {} | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onRequest(data: onRequestPayload) {} | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onListen(data: onListenPayload) {} | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onDestroy(data: onDestroyPayload) {} | ||
// eslint-disable-next-line no-empty-function,@typescript-eslint/no-empty-function | ||
async onConfigure(data: onConfigurePayload) {} | ||
} |
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 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
57
49606
1079