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

@relaycorp/ws-mock

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@relaycorp/ws-mock - npm Package Compare versions

Comparing version 1.4.11 to 1.5.0

3

build/main/lib/MockClient.d.ts

@@ -8,7 +8,8 @@ /// <reference types="node" />

private headers;
private url;
protected readonly socket: Socket;
constructor(wsServer: WSServer, headers?: {
readonly [key: string]: string;
});
}, url?: string);
connect(): Promise<void>;
}

@@ -8,6 +8,7 @@ "use strict";

class MockClient extends MockPeer_1.MockPeer {
constructor(wsServer, headers = {}) {
constructor(wsServer, headers = {}, url = '/') {
super();
this.wsServer = wsServer;
this.headers = headers;
this.url = url;
this.socket = new net_1.Socket();

@@ -26,2 +27,4 @@ this.socket.on('error', (hadError) => {

};
// tslint:disable-next-line:no-object-mutation
incomingMessage.url = this.url;
return new Promise((resolve) => {

@@ -28,0 +31,0 @@ this.wsServer.once('connection', resolve);

@@ -8,7 +8,8 @@ /// <reference types="node" />

private headers;
private url;
protected readonly socket: Socket;
constructor(wsServer: WSServer, headers?: {
readonly [key: string]: string;
});
}, url?: string);
connect(): Promise<void>;
}

@@ -5,6 +5,7 @@ import { IncomingMessage } from 'http';

export class MockClient extends MockPeer {
constructor(wsServer, headers = {}) {
constructor(wsServer, headers = {}, url = '/') {
super();
this.wsServer = wsServer;
this.headers = headers;
this.url = url;
this.socket = new Socket();

@@ -23,2 +24,4 @@ this.socket.on('error', (hadError) => {

};
// tslint:disable-next-line:no-object-mutation
incomingMessage.url = this.url;
return new Promise((resolve) => {

@@ -25,0 +28,0 @@ this.wsServer.once('connection', resolve);

{
"name": "@relaycorp/ws-mock",
"version": "1.4.11",
"version": "1.5.0",
"author": {

@@ -40,3 +40,3 @@ "email": "no-reply@relaycorp.tech",

"@relaycorp/shared-config": "^1.4.13",
"@types/ws": "^7.4.0",
"@types/ws": "^7.4.1",
"del-cli": "^3.0.0",

@@ -47,3 +47,3 @@ "npm-run-all": "^4.1.5",

"tslint": "^5.20.1",
"typedoc": "^0.20.23",
"typedoc": "^0.20.35",
"typescript": "^4.1.5"

@@ -50,0 +50,0 @@ },

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