@hocuspocus/server
Advanced tools
Comparing version 2.4.0-rc.0 to 2.4.0-rc.1
@@ -34,2 +34,3 @@ /// <reference types="node" /> | ||
priority?: number; | ||
extensionName?: string; | ||
onConfigure?(data: onConfigurePayload): Promise<any>; | ||
@@ -36,0 +37,0 @@ onListen?(data: onListenPayload): Promise<any>; |
{ | ||
"name": "@hocuspocus/server", | ||
"description": "plug & play collaboration backend", | ||
"version": "2.4.0-rc.0", | ||
"version": "2.4.0-rc.1", | ||
"homepage": "https://hocuspocus.dev", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@hocuspocus/common": "^2.4.0-rc.0", | ||
"@hocuspocus/common": "^2.4.0-rc.1", | ||
"async-lock": "^1.3.1", | ||
@@ -35,0 +35,0 @@ "kleur": "^4.1.4", |
@@ -276,15 +276,3 @@ import { IncomingHttpHeaders, IncomingMessage } from 'http' | ||
// Ensure that the permission denied message is sent before the | ||
// connection is closed | ||
this.websocket.send(message.toUint8Array(), () => { | ||
if (Object.keys(this.documentConnections).length === 0) { | ||
try { | ||
this.websocket.close(error.code ?? Forbidden.code, error.reason ?? Forbidden.reason) | ||
} catch (closeError) { | ||
// catch is needed in case invalid error code is returned by hook (that would fail sending the close message) | ||
console.error(closeError) | ||
this.websocket.close(Forbidden.code, Forbidden.reason) | ||
} | ||
} | ||
}) | ||
this.websocket.send(message.toUint8Array()) | ||
} | ||
@@ -291,0 +279,0 @@ |
@@ -287,3 +287,3 @@ import { Server as HTTPServer, IncomingMessage, createServer } from 'http' | ||
const extensions = this.configuration?.extensions.map(extension => { | ||
return extension.constructor?.name | ||
return extension.extensionName ?? extension.constructor?.name | ||
}) | ||
@@ -290,0 +290,0 @@ .filter(name => name) |
@@ -37,2 +37,3 @@ import { | ||
priority?: number; | ||
extensionName?: string; | ||
onConfigure?(data: onConfigurePayload): Promise<any>; | ||
@@ -39,0 +40,0 @@ onListen?(data: onListenPayload): Promise<any>; |
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
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
808597
9558