Socket
Book a DemoInstallSign in
Socket

@mswjs/interceptors

Package Overview
Dependencies
Maintainers
1
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mswjs/interceptors - npm Package Compare versions

Comparing version

to
0.39.2

31

lib/browser/interceptors/WebSocket/index.d.ts

@@ -5,2 +5,21 @@ import { I as Interceptor } from '../../Interceptor-af98b768.js';

declare const kCancelable: unique symbol;
declare const kDefaultPrevented: unique symbol;
/**
* A `MessageEvent` superset that supports event cancellation
* in Node.js. It's rather non-intrusive so it can be safely
* used in the browser as well.
*
* @see https://github.com/nodejs/node/issues/51767
*/
declare class CancelableMessageEvent<T = any> extends MessageEvent<T> {
[kCancelable]: boolean;
[kDefaultPrevented]: boolean;
constructor(type: string, init: MessageEventInit<T>);
get cancelable(): boolean;
set cancelable(nextCancelable: boolean);
get defaultPrevented(): boolean;
set defaultPrevented(nextDefaultPrevented: boolean);
preventDefault(): void;
}
interface CloseEventInit extends EventInit {

@@ -17,2 +36,12 @@ code?: number;

}
declare class CancelableCloseEvent extends CloseEvent {
[kCancelable]: boolean;
[kDefaultPrevented]: boolean;
constructor(type: string, init?: CloseEventInit);
get cancelable(): boolean;
set cancelable(nextCancelable: boolean);
get defaultPrevented(): boolean;
set defaultPrevented(nextDefaultPrevented: boolean);
preventDefault(): void;
}

@@ -244,2 +273,2 @@ type WebSocketData = string | ArrayBufferLike | Blob | ArrayBufferView;

export { WebSocketClientConnection, WebSocketClientConnectionProtocol, WebSocketClientEventMap, WebSocketConnectionData, WebSocketData, WebSocketEventMap$1 as WebSocketEventMap, WebSocketInterceptor, WebSocketServerConnection, WebSocketServerConnectionProtocol, WebSocketServerEventMap, WebSocketTransport };
export { CancelableCloseEvent, CancelableMessageEvent, CloseEvent, WebSocketClientConnection, WebSocketClientConnectionProtocol, WebSocketClientEventMap, WebSocketConnectionData, WebSocketData, WebSocketEventMap$1 as WebSocketEventMap, WebSocketInterceptor, WebSocketServerConnection, WebSocketServerConnectionProtocol, WebSocketServerEventMap, WebSocketTransport };

5

lib/browser/interceptors/WebSocket/index.js

@@ -715,3 +715,6 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true});

exports.WebSocketClientConnection = WebSocketClientConnection; exports.WebSocketClientConnectionProtocol = WebSocketClientConnectionProtocol; exports.WebSocketInterceptor = WebSocketInterceptor; exports.WebSocketServerConnection = WebSocketServerConnection; exports.WebSocketServerConnectionProtocol = WebSocketServerConnectionProtocol;
exports.CancelableCloseEvent = CancelableCloseEvent; exports.CancelableMessageEvent = CancelableMessageEvent; exports.CloseEvent = CloseEvent; exports.WebSocketClientConnection = WebSocketClientConnection; exports.WebSocketClientConnectionProtocol = WebSocketClientConnectionProtocol; exports.WebSocketInterceptor = WebSocketInterceptor; exports.WebSocketServerConnection = WebSocketServerConnection; exports.WebSocketServerConnectionProtocol = WebSocketServerConnectionProtocol;
//# sourceMappingURL=index.js.map
{
"name": "@mswjs/interceptors",
"description": "Low-level HTTP/HTTPS/XHR/fetch request interception library.",
"version": "0.39.1",
"version": "0.39.2",
"main": "./lib/node/index.js",

@@ -6,0 +6,0 @@ "module": "./lib/node/index.mjs",

@@ -31,2 +31,8 @@ import { Interceptor } from '../../Interceptor'

export {
CloseEvent,
CancelableCloseEvent,
CancelableMessageEvent,
} from './utils/events'
export type WebSocketEventMap = {

@@ -33,0 +39,0 @@ connection: [args: WebSocketConnectionData]

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 not supported yet

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.