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

@trufflesuite/uws-js-unofficial

Package Overview
Dependencies
Maintainers
9
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trufflesuite/uws-js-unofficial - npm Package Compare versions

Comparing version 18.14.0-unofficial.9 to 18.14.0-unofficial.10

15

dist/http-context.js

@@ -11,2 +11,3 @@ "use strict";

const websocket_1 = require("./websocket");
const UWS_DEFAULT_MAX_PAYLOAD_LENGTH = 16 * 1024;
class HttpContext {

@@ -58,5 +59,11 @@ constructor() {

if (!this.wsServer) {
// `noServer: true` is necessary for us to be able to call `handleUpgrade`
// called in `TemplatedApp.upgradeHandler`
this.wsServer = new ws_1.default.Server({ noServer: true });
const maxPayloadLength = behavior && "maxPayloadLength" in behavior
? behavior.maxPayloadLength
: UWS_DEFAULT_MAX_PAYLOAD_LENGTH;
this.wsServer = new ws_1.default.Server({
// `noServer: true` is necessary for us to be able to call `handleUpgrade`
// called in `TemplatedApp.upgradeHandler`
noServer: true,
maxPayload: maxPayloadLength,
});
}

@@ -151,2 +158,2 @@ this.wsBehaviors.set(pattern, behavior);

exports.HttpContext = HttpContext;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHR0cC1jb250ZXh0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2ZhbGxiYWNrL2h0dHAtY29udGV4dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxnREFBNkQ7QUFHN0QsNENBQW1DO0FBRW5DLCtDQUEyQztBQUUzQywyQ0FBd0M7QUFFeEMsTUFBYSxXQUFXO0lBT3RCO1FBMEdRLFlBQU8sR0FBRyxJQUFJLEdBQUcsRUFBVSxDQUFDO1FBekdsQyxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksd0JBQVUsRUFBRSxDQUF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LLENBQUMsRUFBYTtRQUNqQixJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQztRQUNuQixLQUFLLE1BQU0sTUFBTSxJQUFJLElBQUksQ0FBQyxPQUFPLEVBQUU7WUFDakMsTUFBTSxDQUFDLE9BQU8sRUFBRSxDQUFDO1lBQ2pCLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDO1NBQzdCO1FBRUQsSUFBSSxJQUFJLENBQUMsUUFBUSxFQUFFO1lBQ2pCLElBQUksQ0FBQyxRQUFRLENBQUMsS0FBSyxFQUFFLENBQUM7U0FDdkI7UUFFRCxJQUFJLElBQUksQ0FBQyxJQUFJLEVBQUU7WUFDYixJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLEVBQUU7Z0JBQ25CLElBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO2dCQUNqQixJQUFJLEVBQUUsRUFBRTtvQkFDTixFQUFFLEVBQUUsQ0FBQztpQkFDTjtZQUNILENBQUMsQ0FBQyxDQUFDO1NBQ0o7YUFBTTtZQUNMLElBQUksRUFBRSxFQUFFO2dCQUNOLEVBQUUsRUFBRSxDQUFDO2FBQ047U0FDRjtJQUNILENBQUM7Q0FDRjtBQS9LRCxrQ0ErS0MifQ==

@@ -13,3 +13,15 @@ "use strict";

}
this.internalWs.on("message", message => {
this.internalWs.on("error", (error) => {
// if max payload size is exceed we want to match uWS error handling.
// It propagates the error with code `1006` and message "Received too big
// message".
if (error.message === "Max payload size exceeded") {
this.internalWs._closeCode = 1006;
this.internalWs._closeMessage = "Received too big message";
}
else {
throw error;
}
});
this.internalWs.on("message", (message) => {
if (typeof behavior.message === "function") {

@@ -122,2 +134,2 @@ if (typeof message === "string") {

exports.WebSocket = WebSocket;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2Vic29ja2V0LmpzIiwic291cmNlUm9vdCI6IiI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VBQVUsQ0FBQyxHQUFHLENBQUM7UUFDaEMsTUFBTSxHQUFHLEdBQUcsSUFBSSxXQUFXLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBQ3hDLE1BQU0sT0FBTyxHQUFHLElBQUksVUFBVSxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ3BDLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxHQUFHLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFO1lBQ25DLE9BQU8sQ0FBQyxDQUFDLENBQUMsR0FBRyxHQUFHLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQ2hDO1FBQ0QsT0FBTyxHQUFHLENBQUM7SUFDYixDQUFDO0NBQ0Y7QUFsSkQsOEJBa0pDIn0=
{
"name": "@trufflesuite/uws-js-unofficial",
"version": "18.14.0-unofficial.9",
"version": "18.14.0-unofficial.10",
"description": "Simple, secure, & standards compliant web server for the most demanding of applications.",

@@ -14,3 +14,3 @@ "main": "src/uws.js",

"test": "echo \"Error: no test specified\" && exit 1",
"build": "node-gyp rebuild && yarn tsc",
"build": "yarn tsc",
"tsc": "tsc",

@@ -17,0 +17,0 @@ "prepare": "yarn build"

@@ -10,2 +10,4 @@ import http, { IncomingMessage, ServerResponse } from "http";

const UWS_DEFAULT_MAX_PAYLOAD_LENGTH = 16 * 1024;
export class HttpContext {

@@ -79,5 +81,12 @@ router: HttpRouter;

if (!this.wsServer) {
// `noServer: true` is necessary for us to be able to call `handleUpgrade`
// called in `TemplatedApp.upgradeHandler`
this.wsServer = new InternalWebSocket.Server({ noServer: true });
const maxPayloadLength =
behavior && "maxPayloadLength" in behavior
? behavior.maxPayloadLength
: UWS_DEFAULT_MAX_PAYLOAD_LENGTH;
this.wsServer = new InternalWebSocket.Server({
// `noServer: true` is necessary for us to be able to call `handleUpgrade`
// called in `TemplatedApp.upgradeHandler`
noServer: true,
maxPayload: maxPayloadLength,
});
}

@@ -84,0 +93,0 @@

@@ -22,3 +22,15 @@ import {

this.internalWs.on("message", message => {
this.internalWs.on("error", (error) => {
// if max payload size is exceed we want to match uWS error handling.
// It propagates the error with code `1006` and message "Received too big
// message".
if (error.message === "Max payload size exceeded") {
(this.internalWs as any)._closeCode = 1006;
(this.internalWs as any)._closeMessage = "Received too big message";
} else {
throw error;
}
});
this.internalWs.on("message", (message) => {
if (typeof behavior.message === "function") {

@@ -25,0 +37,0 @@ if (typeof message === "string") {

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