msw 2.4.4 → 2.4.6

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.
@@ -397,7 +397,7 @@ You can also automate this process and make the worker script update automatical
397
397
  }
398
398
  }
399
399
 
400
- // node_modules/.pnpm/@mswjs+interceptors@0.35.0/node_modules/@mswjs/interceptors/lib/browser/chunk-6HYIRFX2.mjs
400
+ // node_modules/.pnpm/@mswjs+interceptors@0.35.3/node_modules/@mswjs/interceptors/lib/browser/chunk-6HYIRFX2.mjs
401
401
  var encoder = new TextEncoder();
402
402
  function encodeBuffer(text) {
403
403
  return encoder.encode(text);
@@ -413,7 +413,7 @@ function toArrayBuffer(array) {
413
413
  );
414
414
  }
415
415
 
416
- // node_modules/.pnpm/@mswjs+interceptors@0.35.0/node_modules/@mswjs/interceptors/lib/browser/chunk-XVPRNJO7.mjs
416
+ // node_modules/.pnpm/@mswjs+interceptors@0.35.3/node_modules/@mswjs/interceptors/lib/browser/chunk-XVPRNJO7.mjs
417
417
  var IS_PATCHED_MODULE = Symbol("isPatchedModule");
418
418
  function isPropertyAccessible(obj, key) {
419
419
  try {
@@ -983,7 +983,7 @@ var _Emitter = class {
983
983
  var Emitter = _Emitter;
984
984
  Emitter.defaultMaxListeners = 10;
985
985
 
986
- // node_modules/.pnpm/@mswjs+interceptors@0.35.0/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
986
+ // node_modules/.pnpm/@mswjs+interceptors@0.35.3/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
987
987
  var INTERNAL_REQUEST_ID_HEADER_NAME = "x-interceptors-internal-request-id";
988
988
  function getGlobalSymbol(symbol) {
989
989
  return (
@@ -1131,7 +1131,7 @@ function createRequestId() {
1131
1131
  return Math.random().toString(16).slice(2);
1132
1132
  }
1133
1133
 
1134
- // node_modules/.pnpm/@mswjs+interceptors@0.35.0/node_modules/@mswjs/interceptors/lib/browser/index.mjs
1134
+ // node_modules/.pnpm/@mswjs+interceptors@0.35.3/node_modules/@mswjs/interceptors/lib/browser/index.mjs
1135
1135
  var BatchInterceptor = class extends Interceptor {
1136
1136
  constructor(options) {
1137
1137
  BatchInterceptor.symbol = Symbol(options.name);
@@ -1415,7 +1415,7 @@ var DeferredPromise = class extends Promise {
1415
1415
  }
1416
1416
  };
1417
1417
 
1418
- // node_modules/.pnpm/@mswjs+interceptors@0.35.0/node_modules/@mswjs/interceptors/lib/browser/chunk-THPGBWJQ.mjs
1418
+ // node_modules/.pnpm/@mswjs+interceptors@0.35.3/node_modules/@mswjs/interceptors/lib/browser/chunk-THPGBWJQ.mjs
1419
1419
  var InterceptorError = class extends Error {
1420
1420
  constructor(message) {
1421
1421
  super(message);
@@ -1583,7 +1583,7 @@ async function handleRequest2(options) {
1583
1583
  return false;
1584
1584
  }
1585
1585
 
1586
- // node_modules/.pnpm/@mswjs+interceptors@0.35.0/node_modules/@mswjs/interceptors/lib/browser/chunk-DZCGGRSJ.mjs
1586
+ // node_modules/.pnpm/@mswjs+interceptors@0.35.3/node_modules/@mswjs/interceptors/lib/browser/chunk-G5SOR3ND.mjs
1587
1587
  function canParseUrl(url) {
1588
1588
  try {
1589
1589
  new URL(url);
@@ -1612,7 +1612,7 @@ async function followFetchRedirect(request, response) {
1612
1612
  const requestUrl = new URL(request.url);
1613
1613
  let locationUrl;
1614
1614
  try {
1615
- locationUrl = new URL(response.headers.get("location"));
1615
+ locationUrl = new URL(response.headers.get("location"), request.url);
1616
1616
  } catch (error2) {
1617
1617
  return Promise.reject(createNetworkError(error2));
1618
1618
  }
@@ -1780,7 +1780,7 @@ var _FetchInterceptor = class extends Interceptor {
1780
1780
  var FetchInterceptor = _FetchInterceptor;
1781
1781
  FetchInterceptor.symbol = Symbol("fetch");
1782
1782
 
1783
- // node_modules/.pnpm/@mswjs+interceptors@0.35.0/node_modules/@mswjs/interceptors/lib/browser/chunk-PRBA3ES4.mjs
1783
+ // node_modules/.pnpm/@mswjs+interceptors@0.35.3/node_modules/@mswjs/interceptors/lib/browser/chunk-SUQ32ZQK.mjs
1784
1784
  function concatArrayBuffer(left, right) {
1785
1785
  const result = new Uint8Array(left.byteLength + right.byteLength);
1786
1786
  result.set(left, 0);
@@ -2054,7 +2054,7 @@ var XMLHttpRequestController = class {
2054
2054
  });
2055
2055
  const requestBody = typeof body === "string" ? encodeBuffer(body) : body;
2056
2056
  const fetchRequest = this.toFetchApiRequest(requestBody);
2057
- this[kFetchRequest] = fetchRequest;
2057
+ this[kFetchRequest] = fetchRequest.clone();
2058
2058
  const onceRequestSettled = ((_a = this.onRequest) == null ? void 0 : _a.call(this, {
2059
2059
  request: fetchRequest,
2060
2060
  requestId: this.requestId
@@ -2136,7 +2136,7 @@ var XMLHttpRequestController = class {
2136
2136
  this[kIsRequestHandled] = true;
2137
2137
  if (this[kFetchRequest]) {
2138
2138
  const totalRequestBodyLength = await getBodyByteLength(
2139
- this[kFetchRequest].clone()
2139
+ this[kFetchRequest]
2140
2140
  );
2141
2141
  this.trigger("loadstart", this.request.upload, {
2142
2142
  loaded: 0,