msw 2.4.11 → 2.4.12

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/iife/index.js CHANGED
@@ -14446,7 +14446,7 @@ ${operationTypes.join("\n")}
14446
14446
  return stringToRegexp(path, keys, options);
14447
14447
  }
14448
14448
 
14449
- // node_modules/.pnpm/@mswjs+interceptors@0.35.8/node_modules/@mswjs/interceptors/lib/browser/chunk-6HYIRFX2.mjs
14449
+ // node_modules/.pnpm/@mswjs+interceptors@0.36.5/node_modules/@mswjs/interceptors/lib/browser/chunk-6HYIRFX2.mjs
14450
14450
  var encoder = new TextEncoder();
14451
14451
  function encodeBuffer(text) {
14452
14452
  return encoder.encode(text);
@@ -14462,7 +14462,7 @@ ${operationTypes.join("\n")}
14462
14462
  );
14463
14463
  }
14464
14464
 
14465
- // node_modules/.pnpm/@mswjs+interceptors@0.35.8/node_modules/@mswjs/interceptors/lib/browser/chunk-XVPRNJO7.mjs
14465
+ // node_modules/.pnpm/@mswjs+interceptors@0.36.5/node_modules/@mswjs/interceptors/lib/browser/chunk-XVPRNJO7.mjs
14466
14466
  var IS_PATCHED_MODULE = Symbol("isPatchedModule");
14467
14467
  function isPropertyAccessible(obj, key) {
14468
14468
  try {
@@ -14798,7 +14798,7 @@ ${operationTypes.join("\n")}
14798
14798
  return message3.toString();
14799
14799
  }
14800
14800
 
14801
- // node_modules/.pnpm/@mswjs+interceptors@0.35.8/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
14801
+ // node_modules/.pnpm/@mswjs+interceptors@0.36.5/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
14802
14802
  var INTERNAL_REQUEST_ID_HEADER_NAME = "x-interceptors-internal-request-id";
14803
14803
  function getGlobalSymbol(symbol) {
14804
14804
  return (
@@ -14946,7 +14946,7 @@ ${operationTypes.join("\n")}
14946
14946
  return Math.random().toString(16).slice(2);
14947
14947
  }
14948
14948
 
14949
- // node_modules/.pnpm/@mswjs+interceptors@0.35.8/node_modules/@mswjs/interceptors/lib/browser/index.mjs
14949
+ // node_modules/.pnpm/@mswjs+interceptors@0.36.5/node_modules/@mswjs/interceptors/lib/browser/index.mjs
14950
14950
  var BatchInterceptor = class extends Interceptor {
14951
14951
  constructor(options) {
14952
14952
  BatchInterceptor.symbol = Symbol(options.name);
@@ -29056,7 +29056,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
29056
29056
  }
29057
29057
  };
29058
29058
 
29059
- // node_modules/.pnpm/@mswjs+interceptors@0.35.8/node_modules/@mswjs/interceptors/lib/browser/chunk-THPGBWJQ.mjs
29059
+ // node_modules/.pnpm/@mswjs+interceptors@0.36.5/node_modules/@mswjs/interceptors/lib/browser/chunk-THPGBWJQ.mjs
29060
29060
  var InterceptorError = class extends Error {
29061
29061
  constructor(message3) {
29062
29062
  super(message3);
@@ -29224,7 +29224,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
29224
29224
  return false;
29225
29225
  }
29226
29226
 
29227
- // node_modules/.pnpm/@mswjs+interceptors@0.35.8/node_modules/@mswjs/interceptors/lib/browser/chunk-G5SOR3ND.mjs
29227
+ // node_modules/.pnpm/@mswjs+interceptors@0.36.5/node_modules/@mswjs/interceptors/lib/browser/chunk-GHRPKS6J.mjs
29228
29228
  function canParseUrl(url) {
29229
29229
  try {
29230
29230
  new URL(url);
@@ -29386,12 +29386,12 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
29386
29386
  this.logger.info(
29387
29387
  "no mocked response received, performing request as-is..."
29388
29388
  );
29389
- return pureFetch(request).then((response) => {
29389
+ return pureFetch(request).then(async (response) => {
29390
29390
  this.logger.info("original fetch performed", response);
29391
29391
  if (this.emitter.listenerCount("response") > 0) {
29392
29392
  this.logger.info('emitting the "response" event...');
29393
29393
  const responseClone = response.clone();
29394
- this.emitter.emit("response", {
29394
+ await emitAsync(this.emitter, "response", {
29395
29395
  response: responseClone,
29396
29396
  isMockedResponse: false,
29397
29397
  request,
@@ -29421,7 +29421,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
29421
29421
  var FetchInterceptor = _FetchInterceptor;
29422
29422
  FetchInterceptor.symbol = Symbol("fetch");
29423
29423
 
29424
- // node_modules/.pnpm/@mswjs+interceptors@0.35.8/node_modules/@mswjs/interceptors/lib/browser/chunk-SUQ32ZQK.mjs
29424
+ // node_modules/.pnpm/@mswjs+interceptors@0.36.5/node_modules/@mswjs/interceptors/lib/browser/chunk-SUQ32ZQK.mjs
29425
29425
  function concatArrayBuffer(left, right) {
29426
29426
  const result = new Uint8Array(left.byteLength + right.byteLength);
29427
29427
  result.set(left, 0);