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

@hocuspocus/server

Package Overview
Dependencies
Maintainers
6
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hocuspocus/server - npm Package Compare versions

Comparing version 2.13.5 to 2.13.6

2

dist/packages/server/src/Hocuspocus.d.ts

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

*/
listen(portOrCallback?: number | ((data: onListenPayload) => Promise<any>) | null, callback?: any): Promise<Hocuspocus>;
listen(portOrCallback?: number | ((data: onListenPayload) => Promise<any>) | null, callback?: any, websocketOptions?: WebSocket.ServerOptions): Promise<Hocuspocus>;
get address(): AddressInfo;

@@ -50,0 +50,0 @@ get URL(): string;

/// <reference types="node" />
import { IncomingMessage, Server as HTTPServer, ServerResponse } from 'http';
import { WebSocketServer } from 'ws';
import { ServerOptions, WebSocketServer } from 'ws';
import { Hocuspocus } from './Hocuspocus.js';

@@ -9,3 +9,3 @@ export declare class Server {

hocuspocus: Hocuspocus;
constructor(hocuspocus: Hocuspocus);
constructor(hocuspocus: Hocuspocus, websocketOptions?: ServerOptions);
setupWebsocketConnection: () => void;

@@ -12,0 +12,0 @@ setupHttpUpgrade: () => void;

{
"name": "@hocuspocus/server",
"description": "plug & play collaboration backend",
"version": "2.13.5",
"version": "2.13.6",
"homepage": "https://hocuspocus.dev",

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

"dependencies": {
"@hocuspocus/common": "^2.13.5",
"@hocuspocus/common": "^2.13.6",
"async-lock": "^1.3.1",

@@ -35,0 +35,0 @@ "kleur": "^4.1.4",

@@ -158,2 +158,3 @@ import { IncomingMessage } from 'http'

callback: any = null,
websocketOptions: WebSocket.ServerOptions = {},
): Promise<Hocuspocus> {

@@ -176,3 +177,3 @@ if (typeof portOrCallback === 'number') {

this.server = new HocuspocusServer(this)
this.server = new HocuspocusServer(this, websocketOptions)

@@ -179,0 +180,0 @@ if (this.configuration.stopOnSignals) {

import {
createServer, IncomingMessage, Server as HTTPServer, ServerResponse,
} from 'http'
import WebSocket, { WebSocketServer } from 'ws'
import WebSocket, { ServerOptions, WebSocketServer } from 'ws'
import { Hocuspocus } from './Hocuspocus.js'

@@ -14,6 +14,6 @@

constructor(hocuspocus: Hocuspocus) {
constructor(hocuspocus: Hocuspocus, websocketOptions: ServerOptions = {}) {
this.hocuspocus = hocuspocus
this.httpServer = createServer(this.requestHandler)
this.webSocketServer = new WebSocketServer({ noServer: true })
this.webSocketServer = new WebSocketServer({ noServer: true, ...websocketOptions })

@@ -20,0 +20,0 @@ this.setupWebsocketConnection()

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