msw 2.6.6 → 2.6.7
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 +9 -9
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/index.mjs +9 -9
- package/lib/browser/index.mjs.map +1 -1
- package/lib/iife/index.js +306 -501
- package/lib/iife/index.js.map +1 -1
- package/lib/mockServiceWorker.js +15 -3
- package/package.json +3 -4
- package/src/mockServiceWorker.js +13 -1
package/lib/browser/index.mjs
CHANGED
|
@@ -363,7 +363,7 @@ import { devUtils as devUtils5 } from '../core/utils/internal/devUtils.mjs';
|
|
|
363
363
|
async function checkWorkerIntegrity(context) {
|
|
364
364
|
context.workerChannel.send("INTEGRITY_CHECK_REQUEST");
|
|
365
365
|
const { payload } = await context.events.once("INTEGRITY_CHECK_RESPONSE");
|
|
366
|
-
if (payload.checksum !== "
|
|
366
|
+
if (payload.checksum !== "00729d72e3b82faf54ca8b9621dbb96f") {
|
|
367
367
|
devUtils5.warn(
|
|
368
368
|
`The currently registered Service Worker has been generated by a different version of MSW (${payload.packageVersion}) and may not be fully compatible with the installed version.
|
|
369
369
|
|
|
@@ -376,7 +376,7 @@ You can also automate this process and make the worker script update automatical
|
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.37.
|
|
379
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.37.1/node_modules/@mswjs/interceptors/lib/browser/chunk-6HYIRFX2.mjs
|
|
380
380
|
var encoder = new TextEncoder();
|
|
381
381
|
function encodeBuffer(text) {
|
|
382
382
|
return encoder.encode(text);
|
|
@@ -392,7 +392,7 @@ function toArrayBuffer(array) {
|
|
|
392
392
|
);
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.37.
|
|
395
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.37.1/node_modules/@mswjs/interceptors/lib/browser/chunk-F4BN745U.mjs
|
|
396
396
|
var IS_PATCHED_MODULE = Symbol("isPatchedModule");
|
|
397
397
|
var _FetchResponse = class extends Response {
|
|
398
398
|
static isConfigurableStatusCode(status) {
|
|
@@ -891,7 +891,7 @@ var _Emitter = class {
|
|
|
891
891
|
var Emitter = _Emitter;
|
|
892
892
|
Emitter.defaultMaxListeners = 10;
|
|
893
893
|
|
|
894
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.37.
|
|
894
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.37.1/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
|
|
895
895
|
var INTERNAL_REQUEST_ID_HEADER_NAME = "x-interceptors-internal-request-id";
|
|
896
896
|
function getGlobalSymbol(symbol) {
|
|
897
897
|
return (
|
|
@@ -1039,7 +1039,7 @@ function createRequestId() {
|
|
|
1039
1039
|
return Math.random().toString(16).slice(2);
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.37.
|
|
1042
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.37.1/node_modules/@mswjs/interceptors/lib/browser/index.mjs
|
|
1043
1043
|
var BatchInterceptor = class extends Interceptor {
|
|
1044
1044
|
constructor(options) {
|
|
1045
1045
|
BatchInterceptor.symbol = Symbol(options.name);
|
|
@@ -1326,7 +1326,7 @@ var DeferredPromise = class extends Promise {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
};
|
|
1328
1328
|
|
|
1329
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.37.
|
|
1329
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.37.1/node_modules/@mswjs/interceptors/lib/browser/chunk-H5O73WD2.mjs
|
|
1330
1330
|
var InterceptorError = class extends Error {
|
|
1331
1331
|
constructor(message) {
|
|
1332
1332
|
super(message);
|
|
@@ -1527,7 +1527,7 @@ async function handleRequest2(options) {
|
|
|
1527
1527
|
return false;
|
|
1528
1528
|
}
|
|
1529
1529
|
|
|
1530
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.37.
|
|
1530
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.37.1/node_modules/@mswjs/interceptors/lib/browser/chunk-TX5GBTFY.mjs
|
|
1531
1531
|
function hasConfigurableGlobal(propertyName) {
|
|
1532
1532
|
const descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);
|
|
1533
1533
|
if (typeof descriptor === "undefined") {
|
|
@@ -1548,7 +1548,7 @@ function hasConfigurableGlobal(propertyName) {
|
|
|
1548
1548
|
return true;
|
|
1549
1549
|
}
|
|
1550
1550
|
|
|
1551
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.37.
|
|
1551
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.37.1/node_modules/@mswjs/interceptors/lib/browser/chunk-HER3NHBG.mjs
|
|
1552
1552
|
function canParseUrl(url) {
|
|
1553
1553
|
try {
|
|
1554
1554
|
new URL(url);
|
|
@@ -1808,7 +1808,7 @@ var _FetchInterceptor = class extends Interceptor {
|
|
|
1808
1808
|
var FetchInterceptor = _FetchInterceptor;
|
|
1809
1809
|
FetchInterceptor.symbol = Symbol("fetch");
|
|
1810
1810
|
|
|
1811
|
-
// node_modules/.pnpm/@mswjs+interceptors@0.37.
|
|
1811
|
+
// node_modules/.pnpm/@mswjs+interceptors@0.37.1/node_modules/@mswjs/interceptors/lib/browser/chunk-4SRQFK76.mjs
|
|
1812
1812
|
function concatArrayBuffer(left, right) {
|
|
1813
1813
|
const result = new Uint8Array(left.byteLength + right.byteLength);
|
|
1814
1814
|
result.set(left, 0);
|