msw 2.12.8 → 2.12.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/index.js +8 -8
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/index.mjs +8 -8
- package/lib/browser/index.mjs.map +1 -1
- package/lib/core/handlers/WebSocketHandler.d.mts +3 -2
- package/lib/core/handlers/WebSocketHandler.d.ts +3 -2
- package/lib/core/handlers/WebSocketHandler.js +15 -1
- package/lib/core/handlers/WebSocketHandler.js.map +1 -1
- package/lib/core/handlers/WebSocketHandler.mjs +16 -2
- package/lib/core/handlers/WebSocketHandler.mjs.map +1 -1
- package/lib/iife/index.js +36 -11
- package/lib/iife/index.js.map +1 -1
- package/lib/mockServiceWorker.js +1 -1
- package/package.json +3 -3
- package/src/core/handlers/WebSocketHandler.ts +32 -3
- package/src/core/utils/matching/matchRequestUrl.test.ts +57 -43
package/lib/browser/index.mjs
CHANGED
|
@@ -467,7 +467,7 @@ You can also automate this process and make the worker script update automatical
|
|
|
467
467
|
return integrityCheckPromise;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.41.
|
|
470
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.41.2/node_modules/@mswjs/interceptors/lib/browser/getRawRequest-BTaNLFr0.mjs
|
|
471
471
|
var IS_PATCHED_MODULE = Symbol("isPatchedModule");
|
|
472
472
|
var InterceptorError = class InterceptorError2 extends Error {
|
|
473
473
|
constructor(message) {
|
|
@@ -1065,7 +1065,7 @@ var _Emitter = class {
|
|
|
1065
1065
|
var Emitter = _Emitter;
|
|
1066
1066
|
Emitter.defaultMaxListeners = 10;
|
|
1067
1067
|
|
|
1068
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.41.
|
|
1068
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.41.2/node_modules/@mswjs/interceptors/lib/browser/createRequestId-DQcIlohW.mjs
|
|
1069
1069
|
var INTERNAL_REQUEST_ID_HEADER_NAME = "x-interceptors-internal-request-id";
|
|
1070
1070
|
function getGlobalSymbol(symbol) {
|
|
1071
1071
|
return globalThis[symbol] || void 0;
|
|
@@ -1214,7 +1214,7 @@ function createRequestId() {
|
|
|
1214
1214
|
return Math.random().toString(16).slice(2);
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.41.
|
|
1217
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.41.2/node_modules/@mswjs/interceptors/lib/browser/bufferUtils-BiiO6HZv.mjs
|
|
1218
1218
|
var encoder = new TextEncoder();
|
|
1219
1219
|
function encodeBuffer(text) {
|
|
1220
1220
|
return encoder.encode(text);
|
|
@@ -1226,7 +1226,7 @@ function toArrayBuffer(array) {
|
|
|
1226
1226
|
return array.buffer.slice(array.byteOffset, array.byteOffset + array.byteLength);
|
|
1227
1227
|
}
|
|
1228
1228
|
|
|
1229
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.41.
|
|
1229
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.41.2/node_modules/@mswjs/interceptors/lib/browser/index.mjs
|
|
1230
1230
|
var BatchInterceptor = class BatchInterceptor2 extends Interceptor {
|
|
1231
1231
|
constructor(options) {
|
|
1232
1232
|
BatchInterceptor2.symbol = Symbol(options.name);
|
|
@@ -1742,7 +1742,7 @@ var WorkerChannel = class extends Emitter2 {
|
|
|
1742
1742
|
}
|
|
1743
1743
|
};
|
|
1744
1744
|
|
|
1745
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.41.
|
|
1745
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.41.2/node_modules/@mswjs/interceptors/lib/browser/hasConfigurableGlobal-npXitu1-.mjs
|
|
1746
1746
|
async function emitAsync(emitter, eventName, ...data) {
|
|
1747
1747
|
const listeners = emitter.listeners(eventName);
|
|
1748
1748
|
if (listeners.length === 0) return;
|
|
@@ -1772,7 +1772,7 @@ var until2 = async (promise) => {
|
|
|
1772
1772
|
}
|
|
1773
1773
|
};
|
|
1774
1774
|
|
|
1775
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.41.
|
|
1775
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.41.2/node_modules/@mswjs/interceptors/lib/browser/handleRequest-D7kpTI5U.mjs
|
|
1776
1776
|
function isObject2(value, loose = false) {
|
|
1777
1777
|
return loose ? Object.prototype.toString.call(value).startsWith("[object ") : Object.prototype.toString.call(value) === "[object Object]";
|
|
1778
1778
|
}
|
|
@@ -1889,7 +1889,7 @@ async function handleRequest2(options) {
|
|
|
1889
1889
|
return options.controller.handled;
|
|
1890
1890
|
}
|
|
1891
1891
|
|
|
1892
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.41.
|
|
1892
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.41.2/node_modules/@mswjs/interceptors/lib/browser/fetch-DdKEdDOR.mjs
|
|
1893
1893
|
function createNetworkError(cause) {
|
|
1894
1894
|
return Object.assign(/* @__PURE__ */ new TypeError("Failed to fetch"), { cause });
|
|
1895
1895
|
}
|
|
@@ -2082,7 +2082,7 @@ var FetchInterceptor = class FetchInterceptor2 extends Interceptor {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
};
|
|
2084
2084
|
|
|
2085
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.41.
|
|
2085
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.41.2/node_modules/@mswjs/interceptors/lib/browser/XMLHttpRequest-BvxZV0WU.mjs
|
|
2086
2086
|
function concatArrayBuffer(left, right) {
|
|
2087
2087
|
const result = new Uint8Array(left.byteLength + right.byteLength);
|
|
2088
2088
|
result.set(left, 0);
|