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

@hocuspocus/extension-database

Package Overview
Dependencies
Maintainers
5
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hocuspocus/extension-database - npm Package Compare versions

Comparing version 2.6.1 to 2.7.0

4

dist/hocuspocus-database.esm.js

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

fetch: async () => null,
store: async () => null,
store: async () => { },
};

@@ -35,3 +35,3 @@ this.configuration = {

async onStoreDocument(data) {
return this.configuration.store({
await this.configuration.store({
...data,

@@ -38,0 +38,0 @@ state: Buffer.from(Y.encodeStateAsUpdate(data.document)),

@@ -11,3 +11,3 @@ import { Extension, onChangePayload, onLoadDocumentPayload, storePayload, fetchPayload } from '@hocuspocus/server';

*/
store: (data: storePayload) => void;
store: (data: storePayload) => Promise<void>;
}

@@ -14,0 +14,0 @@ export declare class Database implements Extension {

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

boundOnOpen: (event: Event) => Promise<void>;
boundOnMessage: (event: MessageEvent) => void;
boundOnClose: (event: CloseEvent) => void;

@@ -97,0 +96,0 @@ boundOnStatus: ({ status }: onStatusParameters) => void;

@@ -80,2 +80,6 @@ import * as mutex from 'lib0/mutex';

quiet: boolean;
/**
* Map of attached providers keyed by documentName.
*/
providerMap: Map<string, HocuspocusProvider>;
}

@@ -82,0 +86,0 @@ export declare class HocuspocusProviderWebsocket extends EventEmitter {

@@ -9,2 +9,3 @@ import { Decoder } from 'lib0/decoding';

constructor(data: any);
peekVarString(): string;
readVarUint(): MessageType;

@@ -11,0 +12,0 @@ readVarString(): string;

@@ -13,3 +13,3 @@ import Document from './Document.js';

transact(transaction: (document: Document) => void, transactionOrigin?: any): Promise<void>;
disconnect(): void;
disconnect(): Promise<void>;
}

@@ -22,2 +22,3 @@ import WebSocket from 'ws';

isLoading: boolean;
isDestroyed: boolean;
/**

@@ -91,3 +92,4 @@ * Constructor.

broadcastStateless(payload: string): void;
destroy(): void;
}
export default Document;

@@ -85,3 +85,3 @@ /// <reference types="node" />

createDocument(documentName: string, request: Partial<Pick<IncomingMessage, 'headers' | 'url'>>, socketId: string, connection: ConnectionConfiguration, context?: any): Promise<Document>;
storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload): void;
storeDocumentHooks(document: Document, hookPayload: onStoreDocumentPayload): Promise<void>;
/**

@@ -88,0 +88,0 @@ * Run the given hook on all configured extensions.

@@ -134,2 +134,3 @@ /// <reference types="node" />

export interface onAuthenticatePayload {
context: any;
documentName: string;

@@ -136,0 +137,0 @@ instance: Hocuspocus;

{
"name": "@hocuspocus/extension-database",
"description": "a generic Hocuspocus persistence driver for the database",
"version": "2.6.1",
"version": "2.7.0",
"homepage": "https://hocuspocus.dev",

@@ -30,3 +30,3 @@ "keywords": [

"dependencies": {
"@hocuspocus/server": "^2.6.1"
"@hocuspocus/server": "^2.7.0"
},

@@ -33,0 +33,0 @@ "peerDependencies": {

@@ -19,3 +19,3 @@ import {

*/
store: (data: storePayload) => void,
store: (data: storePayload) => Promise<void>,
}

@@ -29,3 +29,3 @@

fetch: async () => null,
store: async () => null,
store: async () => {},
}

@@ -60,3 +60,3 @@

async onStoreDocument(data: onChangePayload) {
return this.configuration.store({
await this.configuration.store({
...data,

@@ -63,0 +63,0 @@ state: Buffer.from(

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

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