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

@hocuspocus/provider

Package Overview
Dependencies
Maintainers
5
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.12.0-rc.0 to 2.12.1-rc.0

3

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

@@ -1,2 +0,3 @@

import { type MessageEvent, Event } from 'ws';
import type { MessageEvent } from 'ws';
import { Event } from 'ws';
import EventEmitter from './EventEmitter.js';

@@ -3,0 +4,0 @@ import { HocuspocusProvider } from './HocuspocusProvider.js';

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

onAuthenticate?(data: onAuthenticatePayload): Promise<any>;
onCreateDocument?(data: onCreateDocumentPayload): Promise<any>;
onLoadDocument?(data: onLoadDocumentPayload): Promise<any>;

@@ -56,3 +57,3 @@ afterLoadDocument?(data: afterLoadDocumentPayload): Promise<any>;

}
export type HookName = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | 'onLoadDocument' | 'afterLoadDocument' | 'beforeHandleMessage' | 'beforeBroadcastStateless' | 'onStateless' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'afterUnloadDocument' | 'onDestroy';
export type HookName = 'onConfigure' | 'onListen' | 'onUpgrade' | 'onConnect' | 'connected' | 'onAuthenticate' | 'onCreateDocument' | 'onLoadDocument' | 'afterLoadDocument' | 'beforeHandleMessage' | 'beforeBroadcastStateless' | 'onStateless' | 'onChange' | 'onStoreDocument' | 'afterStoreDocument' | 'onAwarenessUpdate' | 'onRequest' | 'onDisconnect' | 'afterUnloadDocument' | 'onDestroy';
export type HookPayloadByName = {

@@ -65,2 +66,3 @@ onConfigure: onConfigurePayload;

onAuthenticate: onAuthenticatePayload;
onCreateDocument: onCreateDocumentPayload;
onLoadDocument: onLoadDocumentPayload;

@@ -148,2 +150,3 @@ afterLoadDocument: afterLoadDocumentPayload;

requestParameters: URLSearchParams;
request: IncomingMessage;
socketId: string;

@@ -153,2 +156,11 @@ token: string;

}
export interface onCreateDocumentPayload {
context: any;
documentName: string;
instance: Hocuspocus;
requestHeaders: IncomingHttpHeaders;
requestParameters: URLSearchParams;
socketId: string;
connection: ConnectionConfiguration;
}
export interface onConnectPayload {

@@ -155,0 +167,0 @@ context: any;

{
"name": "@hocuspocus/provider",
"version": "2.12.0-rc.0",
"version": "2.12.1-rc.0",
"description": "hocuspocus provider",

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

"dependencies": {
"@hocuspocus/common": "^2.12.0-rc.0",
"@hocuspocus/common": "^2.12.1-rc.0",
"@lifeomic/attempt": "^3.0.2",

@@ -35,0 +35,0 @@ "lib0": "^0.2.87",

@@ -7,3 +7,4 @@ import {

import * as url from 'lib0/url'
import { type MessageEvent, Event } from 'ws'
import type { MessageEvent } from 'ws'
import { Event } from 'ws'
import EventEmitter from './EventEmitter.js'

@@ -352,3 +353,3 @@ import { HocuspocusProvider } from './HocuspocusProvider.js'

// Init the WebSocket connection
const ws = new this.configuration.WebSocketPolyfill(this.url, { followRedirects: true })
const ws = new this.configuration.WebSocketPolyfill(this.url)
ws.binaryType = 'arraybuffer'

@@ -355,0 +356,0 @@ ws.identifier = this.identifier

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