msw 2.11.3 → 2.11.5

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.
Files changed (118) hide show
  1. package/lib/browser/index.js +96 -90
  2. package/lib/browser/index.js.map +1 -1
  3. package/lib/browser/index.mjs +96 -90
  4. package/lib/browser/index.mjs.map +1 -1
  5. package/lib/core/{HttpResponse-BbwAqLE_.d.ts → HttpResponse-BpT5A_2L.d.ts} +1 -0
  6. package/lib/core/{HttpResponse-B4YmE-GJ.d.mts → HttpResponse-DGUjNQHG.d.mts} +1 -0
  7. package/lib/core/HttpResponse.d.mts +1 -1
  8. package/lib/core/HttpResponse.d.ts +1 -1
  9. package/lib/core/HttpResponse.js.map +1 -1
  10. package/lib/core/HttpResponse.mjs.map +1 -1
  11. package/lib/core/SetupApi.d.mts +1 -1
  12. package/lib/core/SetupApi.d.ts +1 -1
  13. package/lib/core/getResponse.d.mts +1 -1
  14. package/lib/core/getResponse.d.ts +1 -1
  15. package/lib/core/graphql.d.mts +1 -1
  16. package/lib/core/graphql.d.ts +1 -1
  17. package/lib/core/handlers/GraphQLHandler.d.mts +1 -1
  18. package/lib/core/handlers/GraphQLHandler.d.ts +1 -1
  19. package/lib/core/handlers/HttpHandler.d.mts +1 -1
  20. package/lib/core/handlers/HttpHandler.d.ts +1 -1
  21. package/lib/core/handlers/HttpHandler.js +0 -5
  22. package/lib/core/handlers/HttpHandler.js.map +1 -1
  23. package/lib/core/handlers/HttpHandler.mjs +1 -6
  24. package/lib/core/handlers/HttpHandler.mjs.map +1 -1
  25. package/lib/core/handlers/RequestHandler.d.mts +1 -1
  26. package/lib/core/handlers/RequestHandler.d.ts +1 -1
  27. package/lib/core/http.d.mts +1 -1
  28. package/lib/core/http.d.ts +1 -1
  29. package/lib/core/index.d.mts +2 -2
  30. package/lib/core/index.d.ts +2 -2
  31. package/lib/core/index.js +2 -0
  32. package/lib/core/index.js.map +1 -1
  33. package/lib/core/index.mjs +4 -0
  34. package/lib/core/index.mjs.map +1 -1
  35. package/lib/core/passthrough.d.mts +1 -1
  36. package/lib/core/passthrough.d.ts +1 -1
  37. package/lib/core/utils/HttpResponse/decorators.d.mts +1 -1
  38. package/lib/core/utils/HttpResponse/decorators.d.ts +1 -1
  39. package/lib/core/utils/HttpResponse/decorators.js +1 -1
  40. package/lib/core/utils/HttpResponse/decorators.js.map +1 -1
  41. package/lib/core/utils/HttpResponse/decorators.mjs +1 -1
  42. package/lib/core/utils/HttpResponse/decorators.mjs.map +1 -1
  43. package/lib/core/utils/executeHandlers.d.mts +1 -1
  44. package/lib/core/utils/executeHandlers.d.ts +1 -1
  45. package/lib/core/utils/handleRequest.d.mts +1 -1
  46. package/lib/core/utils/handleRequest.d.ts +1 -1
  47. package/lib/core/utils/internal/isHandlerKind.d.mts +1 -1
  48. package/lib/core/utils/internal/isHandlerKind.d.ts +1 -1
  49. package/lib/core/utils/internal/parseGraphQLRequest.d.mts +1 -1
  50. package/lib/core/utils/internal/parseGraphQLRequest.d.ts +1 -1
  51. package/lib/core/utils/internal/parseMultipartData.d.mts +1 -1
  52. package/lib/core/utils/internal/parseMultipartData.d.ts +1 -1
  53. package/lib/core/utils/internal/requestHandlerUtils.d.mts +1 -1
  54. package/lib/core/utils/internal/requestHandlerUtils.d.ts +1 -1
  55. package/lib/core/utils/logging/serializeResponse.js +1 -1
  56. package/lib/core/utils/logging/serializeResponse.js.map +1 -1
  57. package/lib/core/utils/logging/serializeResponse.mjs +1 -1
  58. package/lib/core/utils/logging/serializeResponse.mjs.map +1 -1
  59. package/lib/core/utils/request/getRequestCookies.js +3 -13
  60. package/lib/core/utils/request/getRequestCookies.js.map +1 -1
  61. package/lib/core/utils/request/getRequestCookies.mjs +6 -3
  62. package/lib/core/utils/request/getRequestCookies.mjs.map +1 -1
  63. package/lib/core/utils/url/cleanUrl.d.mts +1 -2
  64. package/lib/core/utils/url/cleanUrl.d.ts +1 -2
  65. package/lib/core/utils/url/cleanUrl.js +1 -5
  66. package/lib/core/utils/url/cleanUrl.js.map +1 -1
  67. package/lib/core/utils/url/cleanUrl.mjs +1 -5
  68. package/lib/core/utils/url/cleanUrl.mjs.map +1 -1
  69. package/lib/core/ws/WebSocketIndexedDBClientStore.d.mts +1 -2
  70. package/lib/core/ws/WebSocketIndexedDBClientStore.d.ts +1 -2
  71. package/lib/core/ws/WebSocketIndexedDBClientStore.js.map +1 -1
  72. package/lib/core/ws/WebSocketIndexedDBClientStore.mjs.map +1 -1
  73. package/lib/core/ws/WebSocketMemoryClientStore.d.mts +1 -2
  74. package/lib/core/ws/WebSocketMemoryClientStore.d.ts +1 -2
  75. package/lib/core/ws/WebSocketMemoryClientStore.js.map +1 -1
  76. package/lib/core/ws/WebSocketMemoryClientStore.mjs.map +1 -1
  77. package/lib/core/ws/handleWebSocketEvent.d.mts +2 -3
  78. package/lib/core/ws/handleWebSocketEvent.d.ts +2 -3
  79. package/lib/core/ws/handleWebSocketEvent.js.map +1 -1
  80. package/lib/core/ws/handleWebSocketEvent.mjs.map +1 -1
  81. package/lib/core/ws/utils/getMessageLength.d.mts +1 -1
  82. package/lib/core/ws/utils/getMessageLength.d.ts +1 -1
  83. package/lib/core/ws/utils/getMessageLength.js.map +1 -1
  84. package/lib/core/ws/utils/getMessageLength.mjs.map +1 -1
  85. package/lib/iife/index.js +556 -605
  86. package/lib/iife/index.js.map +1 -1
  87. package/lib/mockServiceWorker.js +2 -1
  88. package/lib/shims/cookie.d.mts +7 -0
  89. package/lib/shims/cookie.d.ts +7 -0
  90. package/lib/shims/cookie.js +204 -0
  91. package/lib/shims/cookie.mjs +196 -0
  92. package/lib/shims/statuses.d.mts +6 -0
  93. package/lib/shims/statuses.d.ts +6 -0
  94. package/lib/shims/statuses.js +195 -0
  95. package/lib/shims/statuses.mjs +187 -0
  96. package/package.json +5 -6
  97. package/src/browser/setupWorker/glossary.ts +1 -5
  98. package/src/browser/setupWorker/setupWorker.ts +4 -9
  99. package/src/browser/setupWorker/start/createRequestListener.ts +4 -1
  100. package/src/browser/utils/{supportsReadableStreamTransfer.ts → supports.ts} +13 -0
  101. package/src/browser/utils/workerChannel.ts +13 -0
  102. package/src/core/HttpResponse.ts +1 -0
  103. package/src/core/handlers/HttpHandler.ts +1 -8
  104. package/src/core/index.ts +5 -0
  105. package/src/core/utils/HttpResponse/decorators.ts +1 -1
  106. package/src/core/utils/logging/serializeResponse.ts +1 -1
  107. package/src/core/utils/request/getRequestCookies.ts +6 -3
  108. package/src/core/utils/url/cleanUrl.ts +0 -4
  109. package/src/core/ws/WebSocketIndexedDBClientStore.ts +1 -1
  110. package/src/core/ws/WebSocketMemoryClientStore.ts +1 -1
  111. package/src/core/ws/handleWebSocketEvent.ts +1 -1
  112. package/src/core/ws/utils/getMessageLength.ts +1 -1
  113. package/src/mockServiceWorker.js +1 -0
  114. package/src/shims/cookie.ts +7 -0
  115. package/src/shims/statuses.ts +6 -0
  116. package/src/tsconfig.src.json +1 -6
  117. package/src/browser/utils/deferNetworkRequestsUntil.test.ts +0 -48
  118. package/src/browser/utils/deferNetworkRequestsUntil.ts +0 -29
package/lib/iife/index.js CHANGED
@@ -1,12 +1,17 @@
1
1
  "use strict";
2
2
  var MockServiceWorker = (() => {
3
+ var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __esm = (fn, res) => function __init() {
8
10
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
11
  };
12
+ var __commonJS = (cb, mod) => function __require() {
13
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14
+ };
10
15
  var __export = (target, all) => {
11
16
  for (var name in all)
12
17
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -19,8 +24,317 @@ var MockServiceWorker = (() => {
19
24
  }
20
25
  return to;
21
26
  };
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
+ // If the importer is in node compatibility mode or this is not an ESM
29
+ // file that has been converted to a CommonJS file using a Babel-
30
+ // compatible transform (i.e. "__esModule" has not been set), then set
31
+ // "default" to the CommonJS "module.exports" for node compatibility.
32
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
33
+ mod
34
+ ));
22
35
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
36
 
37
+ // node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/codes.json
38
+ var require_codes = __commonJS({
39
+ "node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/codes.json"(exports, module) {
40
+ module.exports = {
41
+ "100": "Continue",
42
+ "101": "Switching Protocols",
43
+ "102": "Processing",
44
+ "103": "Early Hints",
45
+ "200": "OK",
46
+ "201": "Created",
47
+ "202": "Accepted",
48
+ "203": "Non-Authoritative Information",
49
+ "204": "No Content",
50
+ "205": "Reset Content",
51
+ "206": "Partial Content",
52
+ "207": "Multi-Status",
53
+ "208": "Already Reported",
54
+ "226": "IM Used",
55
+ "300": "Multiple Choices",
56
+ "301": "Moved Permanently",
57
+ "302": "Found",
58
+ "303": "See Other",
59
+ "304": "Not Modified",
60
+ "305": "Use Proxy",
61
+ "307": "Temporary Redirect",
62
+ "308": "Permanent Redirect",
63
+ "400": "Bad Request",
64
+ "401": "Unauthorized",
65
+ "402": "Payment Required",
66
+ "403": "Forbidden",
67
+ "404": "Not Found",
68
+ "405": "Method Not Allowed",
69
+ "406": "Not Acceptable",
70
+ "407": "Proxy Authentication Required",
71
+ "408": "Request Timeout",
72
+ "409": "Conflict",
73
+ "410": "Gone",
74
+ "411": "Length Required",
75
+ "412": "Precondition Failed",
76
+ "413": "Payload Too Large",
77
+ "414": "URI Too Long",
78
+ "415": "Unsupported Media Type",
79
+ "416": "Range Not Satisfiable",
80
+ "417": "Expectation Failed",
81
+ "418": "I'm a Teapot",
82
+ "421": "Misdirected Request",
83
+ "422": "Unprocessable Entity",
84
+ "423": "Locked",
85
+ "424": "Failed Dependency",
86
+ "425": "Too Early",
87
+ "426": "Upgrade Required",
88
+ "428": "Precondition Required",
89
+ "429": "Too Many Requests",
90
+ "431": "Request Header Fields Too Large",
91
+ "451": "Unavailable For Legal Reasons",
92
+ "500": "Internal Server Error",
93
+ "501": "Not Implemented",
94
+ "502": "Bad Gateway",
95
+ "503": "Service Unavailable",
96
+ "504": "Gateway Timeout",
97
+ "505": "HTTP Version Not Supported",
98
+ "506": "Variant Also Negotiates",
99
+ "507": "Insufficient Storage",
100
+ "508": "Loop Detected",
101
+ "509": "Bandwidth Limit Exceeded",
102
+ "510": "Not Extended",
103
+ "511": "Network Authentication Required"
104
+ };
105
+ }
106
+ });
107
+
108
+ // node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/index.js
109
+ var require_statuses = __commonJS({
110
+ "node_modules/.pnpm/statuses@2.0.2/node_modules/statuses/index.js"(exports, module) {
111
+ "use strict";
112
+ var codes = require_codes();
113
+ module.exports = status;
114
+ status.message = codes;
115
+ status.code = createMessageToStatusCodeMap(codes);
116
+ status.codes = createStatusCodeList(codes);
117
+ status.redirect = {
118
+ 300: true,
119
+ 301: true,
120
+ 302: true,
121
+ 303: true,
122
+ 305: true,
123
+ 307: true,
124
+ 308: true
125
+ };
126
+ status.empty = {
127
+ 204: true,
128
+ 205: true,
129
+ 304: true
130
+ };
131
+ status.retry = {
132
+ 502: true,
133
+ 503: true,
134
+ 504: true
135
+ };
136
+ function createMessageToStatusCodeMap(codes2) {
137
+ var map = {};
138
+ Object.keys(codes2).forEach(function forEachCode(code) {
139
+ var message4 = codes2[code];
140
+ var status2 = Number(code);
141
+ map[message4.toLowerCase()] = status2;
142
+ });
143
+ return map;
144
+ }
145
+ function createStatusCodeList(codes2) {
146
+ return Object.keys(codes2).map(function mapCode(code) {
147
+ return Number(code);
148
+ });
149
+ }
150
+ function getStatusCode(message4) {
151
+ var msg = message4.toLowerCase();
152
+ if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {
153
+ throw new Error('invalid status message: "' + message4 + '"');
154
+ }
155
+ return status.code[msg];
156
+ }
157
+ function getStatusMessage(code) {
158
+ if (!Object.prototype.hasOwnProperty.call(status.message, code)) {
159
+ throw new Error("invalid status code: " + code);
160
+ }
161
+ return status.message[code];
162
+ }
163
+ function status(code) {
164
+ if (typeof code === "number") {
165
+ return getStatusMessage(code);
166
+ }
167
+ if (typeof code !== "string") {
168
+ throw new TypeError("code must be a number or string");
169
+ }
170
+ var n = parseInt(code, 10);
171
+ if (!isNaN(n)) {
172
+ return getStatusMessage(n);
173
+ }
174
+ return getStatusCode(code);
175
+ }
176
+ }
177
+ });
178
+
179
+ // node_modules/.pnpm/cookie@1.0.2/node_modules/cookie/dist/index.js
180
+ var require_dist = __commonJS({
181
+ "node_modules/.pnpm/cookie@1.0.2/node_modules/cookie/dist/index.js"(exports) {
182
+ "use strict";
183
+ Object.defineProperty(exports, "__esModule", { value: true });
184
+ exports.parse = parse5;
185
+ exports.serialize = serialize2;
186
+ var cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
187
+ var cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
188
+ var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
189
+ var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
190
+ var __toString = Object.prototype.toString;
191
+ var NullObject = /* @__PURE__ */ (() => {
192
+ const C = function() {
193
+ };
194
+ C.prototype = /* @__PURE__ */ Object.create(null);
195
+ return C;
196
+ })();
197
+ function parse5(str, options) {
198
+ const obj = new NullObject();
199
+ const len = str.length;
200
+ if (len < 2)
201
+ return obj;
202
+ const dec = options?.decode || decode;
203
+ let index = 0;
204
+ do {
205
+ const eqIdx = str.indexOf("=", index);
206
+ if (eqIdx === -1)
207
+ break;
208
+ const colonIdx = str.indexOf(";", index);
209
+ const endIdx = colonIdx === -1 ? len : colonIdx;
210
+ if (eqIdx > endIdx) {
211
+ index = str.lastIndexOf(";", eqIdx - 1) + 1;
212
+ continue;
213
+ }
214
+ const keyStartIdx = startIndex(str, index, eqIdx);
215
+ const keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
216
+ const key = str.slice(keyStartIdx, keyEndIdx);
217
+ if (obj[key] === void 0) {
218
+ let valStartIdx = startIndex(str, eqIdx + 1, endIdx);
219
+ let valEndIdx = endIndex(str, endIdx, valStartIdx);
220
+ const value = dec(str.slice(valStartIdx, valEndIdx));
221
+ obj[key] = value;
222
+ }
223
+ index = endIdx + 1;
224
+ } while (index < len);
225
+ return obj;
226
+ }
227
+ function startIndex(str, index, max) {
228
+ do {
229
+ const code = str.charCodeAt(index);
230
+ if (code !== 32 && code !== 9)
231
+ return index;
232
+ } while (++index < max);
233
+ return max;
234
+ }
235
+ function endIndex(str, index, min) {
236
+ while (index > min) {
237
+ const code = str.charCodeAt(--index);
238
+ if (code !== 32 && code !== 9)
239
+ return index + 1;
240
+ }
241
+ return min;
242
+ }
243
+ function serialize2(name, val, options) {
244
+ const enc = options?.encode || encodeURIComponent;
245
+ if (!cookieNameRegExp.test(name)) {
246
+ throw new TypeError(`argument name is invalid: ${name}`);
247
+ }
248
+ const value = enc(val);
249
+ if (!cookieValueRegExp.test(value)) {
250
+ throw new TypeError(`argument val is invalid: ${val}`);
251
+ }
252
+ let str = name + "=" + value;
253
+ if (!options)
254
+ return str;
255
+ if (options.maxAge !== void 0) {
256
+ if (!Number.isInteger(options.maxAge)) {
257
+ throw new TypeError(`option maxAge is invalid: ${options.maxAge}`);
258
+ }
259
+ str += "; Max-Age=" + options.maxAge;
260
+ }
261
+ if (options.domain) {
262
+ if (!domainValueRegExp.test(options.domain)) {
263
+ throw new TypeError(`option domain is invalid: ${options.domain}`);
264
+ }
265
+ str += "; Domain=" + options.domain;
266
+ }
267
+ if (options.path) {
268
+ if (!pathValueRegExp.test(options.path)) {
269
+ throw new TypeError(`option path is invalid: ${options.path}`);
270
+ }
271
+ str += "; Path=" + options.path;
272
+ }
273
+ if (options.expires) {
274
+ if (!isDate(options.expires) || !Number.isFinite(options.expires.valueOf())) {
275
+ throw new TypeError(`option expires is invalid: ${options.expires}`);
276
+ }
277
+ str += "; Expires=" + options.expires.toUTCString();
278
+ }
279
+ if (options.httpOnly) {
280
+ str += "; HttpOnly";
281
+ }
282
+ if (options.secure) {
283
+ str += "; Secure";
284
+ }
285
+ if (options.partitioned) {
286
+ str += "; Partitioned";
287
+ }
288
+ if (options.priority) {
289
+ const priority = typeof options.priority === "string" ? options.priority.toLowerCase() : void 0;
290
+ switch (priority) {
291
+ case "low":
292
+ str += "; Priority=Low";
293
+ break;
294
+ case "medium":
295
+ str += "; Priority=Medium";
296
+ break;
297
+ case "high":
298
+ str += "; Priority=High";
299
+ break;
300
+ default:
301
+ throw new TypeError(`option priority is invalid: ${options.priority}`);
302
+ }
303
+ }
304
+ if (options.sameSite) {
305
+ const sameSite = typeof options.sameSite === "string" ? options.sameSite.toLowerCase() : options.sameSite;
306
+ switch (sameSite) {
307
+ case true:
308
+ case "strict":
309
+ str += "; SameSite=Strict";
310
+ break;
311
+ case "lax":
312
+ str += "; SameSite=Lax";
313
+ break;
314
+ case "none":
315
+ str += "; SameSite=None";
316
+ break;
317
+ default:
318
+ throw new TypeError(`option sameSite is invalid: ${options.sameSite}`);
319
+ }
320
+ }
321
+ return str;
322
+ }
323
+ function decode(str) {
324
+ if (str.indexOf("%") === -1)
325
+ return str;
326
+ try {
327
+ return decodeURIComponent(str);
328
+ } catch (e) {
329
+ return str;
330
+ }
331
+ }
332
+ function isDate(val) {
333
+ return __toString.call(val) === "[object Date]";
334
+ }
335
+ }
336
+ });
337
+
24
338
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/version.mjs
25
339
  var version2, versionInfo;
26
340
  var init_version = __esm({
@@ -37,10 +351,10 @@ var MockServiceWorker = (() => {
37
351
  });
38
352
 
39
353
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/jsutils/devAssert.mjs
40
- function devAssert(condition, message3) {
354
+ function devAssert(condition, message4) {
41
355
  const booleanCondition = Boolean(condition);
42
356
  if (!booleanCondition) {
43
- throw new Error(message3);
357
+ throw new Error(message4);
44
358
  }
45
359
  }
46
360
  var init_devAssert = __esm({
@@ -70,11 +384,11 @@ var MockServiceWorker = (() => {
70
384
  });
71
385
 
72
386
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/jsutils/invariant.mjs
73
- function invariant2(condition, message3) {
387
+ function invariant2(condition, message4) {
74
388
  const booleanCondition = Boolean(condition);
75
389
  if (!booleanCondition) {
76
390
  throw new Error(
77
- message3 != null ? message3 : "Unexpected invariant triggered."
391
+ message4 != null ? message4 : "Unexpected invariant triggered."
78
392
  );
79
393
  }
80
394
  }
@@ -233,10 +547,10 @@ var MockServiceWorker = (() => {
233
547
  /**
234
548
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
235
549
  */
236
- constructor(message3, ...rawArgs) {
550
+ constructor(message4, ...rawArgs) {
237
551
  var _this$nodes, _nodeLocations$, _ref;
238
552
  const { nodes, source, positions, path, originalError, extensions } = toNormalizedOptions(rawArgs);
239
- super(message3);
553
+ super(message4);
240
554
  this.name = "GraphQLError";
241
555
  this.path = path !== null && path !== void 0 ? path : void 0;
242
556
  this.originalError = originalError !== null && originalError !== void 0 ? originalError : void 0;
@@ -1480,7 +1794,7 @@ spurious results.`);
1480
1794
  });
1481
1795
 
1482
1796
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/language/parser.mjs
1483
- function parse3(source, options) {
1797
+ function parse4(source, options) {
1484
1798
  const parser = new Parser(source, options);
1485
1799
  return parser.parseDocument();
1486
1800
  }
@@ -2765,22 +3079,22 @@ spurious results.`);
2765
3079
  // node_modules/.pnpm/graphql@16.8.2/node_modules/graphql/jsutils/didYouMean.mjs
2766
3080
  function didYouMean(firstArg, secondArg) {
2767
3081
  const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [void 0, firstArg];
2768
- let message3 = " Did you mean ";
3082
+ let message4 = " Did you mean ";
2769
3083
  if (subMessage) {
2770
- message3 += subMessage + " ";
3084
+ message4 += subMessage + " ";
2771
3085
  }
2772
3086
  const suggestions = suggestionsArg.map((x) => `"${x}"`);
2773
3087
  switch (suggestions.length) {
2774
3088
  case 0:
2775
3089
  return "";
2776
3090
  case 1:
2777
- return message3 + suggestions[0] + "?";
3091
+ return message4 + suggestions[0] + "?";
2778
3092
  case 2:
2779
- return message3 + suggestions[0] + " or " + suggestions[1] + "?";
3093
+ return message4 + suggestions[0] + " or " + suggestions[1] + "?";
2780
3094
  }
2781
3095
  const selected = suggestions.slice(0, MAX_SUGGESTIONS);
2782
3096
  const lastItem = selected.pop();
2783
- return message3 + selected.join(", ") + ", or " + lastItem + "?";
3097
+ return message4 + selected.join(", ") + ", or " + lastItem + "?";
2784
3098
  }
2785
3099
  var MAX_SUGGESTIONS;
2786
3100
  var init_didYouMean = __esm({
@@ -6132,10 +6446,10 @@ spurious results.`);
6132
6446
  this._errors = [];
6133
6447
  this.schema = schema;
6134
6448
  }
6135
- reportError(message3, nodes) {
6449
+ reportError(message4, nodes) {
6136
6450
  const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;
6137
6451
  this._errors.push(
6138
- new GraphQLError(message3, {
6452
+ new GraphQLError(message4, {
6139
6453
  nodes: _nodes
6140
6454
  })
6141
6455
  );
@@ -10514,7 +10828,7 @@ spurious results.`);
10514
10828
  }
10515
10829
  let document2;
10516
10830
  try {
10517
- document2 = parse3(source);
10831
+ document2 = parse4(source);
10518
10832
  } catch (syntaxError2) {
10519
10833
  return {
10520
10834
  errors: [syntaxError2]
@@ -11160,7 +11474,7 @@ spurious results.`);
11160
11474
  inputValueDeprecation: true,
11161
11475
  ...options
11162
11476
  };
11163
- const document2 = parse3(getIntrospectionQuery(optionsWithDefaults));
11477
+ const document2 = parse4(getIntrospectionQuery(optionsWithDefaults));
11164
11478
  const result = executeSync({
11165
11479
  schema,
11166
11480
  document: document2
@@ -11959,7 +12273,7 @@ spurious results.`);
11959
12273
  return new GraphQLSchema({ ...config, directives });
11960
12274
  }
11961
12275
  function buildSchema(source, options) {
11962
- const document2 = parse3(source, {
12276
+ const document2 = parse4(source, {
11963
12277
  noLocation: options === null || options === void 0 ? void 0 : options.noLocation,
11964
12278
  allowLegacyFragmentVariables: options === null || options === void 0 ? void 0 : options.allowLegacyFragmentVariables
11965
12279
  });
@@ -13059,7 +13373,7 @@ ${operationTypes.join("\n")}
13059
13373
  isWrappingType: () => isWrappingType,
13060
13374
  lexicographicSortSchema: () => lexicographicSortSchema,
13061
13375
  locatedError: () => locatedError,
13062
- parse: () => parse3,
13376
+ parse: () => parse4,
13063
13377
  parseConstValue: () => parseConstValue,
13064
13378
  parseType: () => parseType,
13065
13379
  parseValue: () => parseValue,
@@ -13130,6 +13444,7 @@ ${operationTypes.join("\n")}
13130
13444
  http: () => http,
13131
13445
  isCommonAssetRequest: () => isCommonAssetRequest,
13132
13446
  matchRequestUrl: () => matchRequestUrl,
13447
+ onUnhandledRequest: () => onUnhandledRequest,
13133
13448
  passthrough: () => passthrough,
13134
13449
  setupWorker: () => setupWorker,
13135
13450
  ws: () => ws
@@ -13158,12 +13473,12 @@ ${operationTypes.join("\n")}
13158
13473
  }
13159
13474
  }
13160
13475
  }
13161
- function format(message3, ...positionals) {
13476
+ function format(message4, ...positionals) {
13162
13477
  if (positionals.length === 0) {
13163
- return message3;
13478
+ return message4;
13164
13479
  }
13165
13480
  let positionalIndex = 0;
13166
- let formattedMessage = message3.replace(
13481
+ let formattedMessage = message4.replace(
13167
13482
  POSITIONALS_EXP,
13168
13483
  (match2, isEscaped, _, flag) => {
13169
13484
  const positional = positionals[positionalIndex];
@@ -13191,22 +13506,22 @@ ${operationTypes.join("\n")}
13191
13506
  error3.stack = nextStack.join("\n");
13192
13507
  }
13193
13508
  var InvariantError = class extends Error {
13194
- constructor(message3, ...positionals) {
13195
- super(message3);
13196
- this.message = message3;
13509
+ constructor(message4, ...positionals) {
13510
+ super(message4);
13511
+ this.message = message4;
13197
13512
  this.name = "Invariant Violation";
13198
- this.message = format(message3, ...positionals);
13513
+ this.message = format(message4, ...positionals);
13199
13514
  cleanErrorStack(this);
13200
13515
  }
13201
13516
  };
13202
- var invariant = (predicate, message3, ...positionals) => {
13517
+ var invariant = (predicate, message4, ...positionals) => {
13203
13518
  if (!predicate) {
13204
- throw new InvariantError(message3, ...positionals);
13519
+ throw new InvariantError(message4, ...positionals);
13205
13520
  }
13206
13521
  };
13207
- invariant.as = (ErrorConstructor, predicate, message3, ...positionals) => {
13522
+ invariant.as = (ErrorConstructor, predicate, message4, ...positionals) => {
13208
13523
  if (!predicate) {
13209
- const formatMessage2 = positionals.length === 0 ? message3 : format(message3, ...positionals);
13524
+ const formatMessage2 = positionals.length === 0 ? message4 : format(message4, ...positionals);
13210
13525
  let error3;
13211
13526
  try {
13212
13527
  error3 = Reflect.construct(ErrorConstructor, [
@@ -13221,15 +13536,15 @@ ${operationTypes.join("\n")}
13221
13536
 
13222
13537
  // src/core/utils/internal/devUtils.ts
13223
13538
  var LIBRARY_PREFIX = "[MSW]";
13224
- function formatMessage(message3, ...positionals) {
13225
- const interpolatedMessage = format(message3, ...positionals);
13539
+ function formatMessage(message4, ...positionals) {
13540
+ const interpolatedMessage = format(message4, ...positionals);
13226
13541
  return `${LIBRARY_PREFIX} ${interpolatedMessage}`;
13227
13542
  }
13228
- function warn(message3, ...positionals) {
13229
- console.warn(formatMessage(message3, ...positionals));
13543
+ function warn(message4, ...positionals) {
13544
+ console.warn(formatMessage(message4, ...positionals));
13230
13545
  }
13231
- function error(message3, ...positionals) {
13232
- console.error(formatMessage(message3, ...positionals));
13546
+ function error(message4, ...positionals) {
13547
+ console.error(formatMessage(message4, ...positionals));
13233
13548
  }
13234
13549
  var devUtils = {
13235
13550
  formatMessage,
@@ -13237,8 +13552,8 @@ ${operationTypes.join("\n")}
13237
13552
  error
13238
13553
  };
13239
13554
  var InternalError = class extends Error {
13240
- constructor(message3) {
13241
- super(message3);
13555
+ constructor(message4) {
13556
+ super(message4);
13242
13557
  this.name = "InternalError";
13243
13558
  }
13244
13559
  };
@@ -13744,180 +14059,19 @@ ${operationTypes.join("\n")}
13744
14059
  };
13745
14060
  }
13746
14061
 
13747
- // node_modules/.pnpm/@bundled-es-modules+statuses@1.0.1/node_modules/@bundled-es-modules/statuses/index-esm.js
13748
- var __create = Object.create;
13749
- var __defProp2 = Object.defineProperty;
13750
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
13751
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
13752
- var __getProtoOf = Object.getPrototypeOf;
13753
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
13754
- var __commonJS = (cb, mod) => function __require() {
13755
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13756
- };
13757
- var __copyProps2 = (to, from, except, desc) => {
13758
- if (from && typeof from === "object" || typeof from === "function") {
13759
- for (let key of __getOwnPropNames2(from))
13760
- if (!__hasOwnProp2.call(to, key) && key !== except)
13761
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
13762
- }
13763
- return to;
13764
- };
13765
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps2(
13766
- // If the importer is in node compatibility mode or this is not an ESM
13767
- // file that has been converted to a CommonJS file using a Babel-
13768
- // compatible transform (i.e. "__esModule" has not been set), then set
13769
- // "default" to the CommonJS "module.exports" for node compatibility.
13770
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
13771
- mod
13772
- ));
13773
- var require_codes = __commonJS({
13774
- "node_modules/statuses/codes.json"(exports, module) {
13775
- module.exports = {
13776
- "100": "Continue",
13777
- "101": "Switching Protocols",
13778
- "102": "Processing",
13779
- "103": "Early Hints",
13780
- "200": "OK",
13781
- "201": "Created",
13782
- "202": "Accepted",
13783
- "203": "Non-Authoritative Information",
13784
- "204": "No Content",
13785
- "205": "Reset Content",
13786
- "206": "Partial Content",
13787
- "207": "Multi-Status",
13788
- "208": "Already Reported",
13789
- "226": "IM Used",
13790
- "300": "Multiple Choices",
13791
- "301": "Moved Permanently",
13792
- "302": "Found",
13793
- "303": "See Other",
13794
- "304": "Not Modified",
13795
- "305": "Use Proxy",
13796
- "307": "Temporary Redirect",
13797
- "308": "Permanent Redirect",
13798
- "400": "Bad Request",
13799
- "401": "Unauthorized",
13800
- "402": "Payment Required",
13801
- "403": "Forbidden",
13802
- "404": "Not Found",
13803
- "405": "Method Not Allowed",
13804
- "406": "Not Acceptable",
13805
- "407": "Proxy Authentication Required",
13806
- "408": "Request Timeout",
13807
- "409": "Conflict",
13808
- "410": "Gone",
13809
- "411": "Length Required",
13810
- "412": "Precondition Failed",
13811
- "413": "Payload Too Large",
13812
- "414": "URI Too Long",
13813
- "415": "Unsupported Media Type",
13814
- "416": "Range Not Satisfiable",
13815
- "417": "Expectation Failed",
13816
- "418": "I'm a Teapot",
13817
- "421": "Misdirected Request",
13818
- "422": "Unprocessable Entity",
13819
- "423": "Locked",
13820
- "424": "Failed Dependency",
13821
- "425": "Too Early",
13822
- "426": "Upgrade Required",
13823
- "428": "Precondition Required",
13824
- "429": "Too Many Requests",
13825
- "431": "Request Header Fields Too Large",
13826
- "451": "Unavailable For Legal Reasons",
13827
- "500": "Internal Server Error",
13828
- "501": "Not Implemented",
13829
- "502": "Bad Gateway",
13830
- "503": "Service Unavailable",
13831
- "504": "Gateway Timeout",
13832
- "505": "HTTP Version Not Supported",
13833
- "506": "Variant Also Negotiates",
13834
- "507": "Insufficient Storage",
13835
- "508": "Loop Detected",
13836
- "509": "Bandwidth Limit Exceeded",
13837
- "510": "Not Extended",
13838
- "511": "Network Authentication Required"
13839
- };
13840
- }
13841
- });
13842
- var require_statuses = __commonJS({
13843
- "node_modules/statuses/index.js"(exports, module) {
13844
- "use strict";
13845
- var codes = require_codes();
13846
- module.exports = status2;
13847
- status2.message = codes;
13848
- status2.code = createMessageToStatusCodeMap(codes);
13849
- status2.codes = createStatusCodeList(codes);
13850
- status2.redirect = {
13851
- 300: true,
13852
- 301: true,
13853
- 302: true,
13854
- 303: true,
13855
- 305: true,
13856
- 307: true,
13857
- 308: true
13858
- };
13859
- status2.empty = {
13860
- 204: true,
13861
- 205: true,
13862
- 304: true
13863
- };
13864
- status2.retry = {
13865
- 502: true,
13866
- 503: true,
13867
- 504: true
13868
- };
13869
- function createMessageToStatusCodeMap(codes2) {
13870
- var map = {};
13871
- Object.keys(codes2).forEach(function forEachCode(code) {
13872
- var message3 = codes2[code];
13873
- var status3 = Number(code);
13874
- map[message3.toLowerCase()] = status3;
13875
- });
13876
- return map;
13877
- }
13878
- function createStatusCodeList(codes2) {
13879
- return Object.keys(codes2).map(function mapCode(code) {
13880
- return Number(code);
13881
- });
13882
- }
13883
- function getStatusCode(message3) {
13884
- var msg = message3.toLowerCase();
13885
- if (!Object.prototype.hasOwnProperty.call(status2.code, msg)) {
13886
- throw new Error('invalid status message: "' + message3 + '"');
13887
- }
13888
- return status2.code[msg];
13889
- }
13890
- function getStatusMessage(code) {
13891
- if (!Object.prototype.hasOwnProperty.call(status2.message, code)) {
13892
- throw new Error("invalid status code: " + code);
13893
- }
13894
- return status2.message[code];
13895
- }
13896
- function status2(code) {
13897
- if (typeof code === "number") {
13898
- return getStatusMessage(code);
13899
- }
13900
- if (typeof code !== "string") {
13901
- throw new TypeError("code must be a number or string");
13902
- }
13903
- var n = parseInt(code, 10);
13904
- if (!isNaN(n)) {
13905
- return getStatusMessage(n);
13906
- }
13907
- return getStatusCode(code);
13908
- }
13909
- }
13910
- });
13911
- var import_statuses = __toESM(require_statuses(), 1);
13912
- var source_default = import_statuses.default;
14062
+ // src/shims/statuses.ts
14063
+ var allStatuses = __toESM(require_statuses(), 1);
14064
+ var statuses = allStatuses.default || allStatuses;
14065
+ var message = statuses.message;
14066
+ var statuses_default = statuses;
13913
14067
 
13914
14068
  // src/core/utils/logging/serializeResponse.ts
13915
- var { message } = source_default;
14069
+ var { message: message2 } = statuses_default;
13916
14070
  async function serializeResponse(response) {
13917
14071
  const responseClone = response.clone();
13918
14072
  const responseText = await responseClone.text();
13919
14073
  const responseStatus = responseClone.status || 200;
13920
- const responseStatusText = responseClone.statusText || message[responseStatus] || "OK";
14074
+ const responseStatusText = responseClone.statusText || message2[responseStatus] || "OK";
13921
14075
  return {
13922
14076
  status: responseStatus,
13923
14077
  statusText: responseStatusText,
@@ -14367,10 +14521,10 @@ ${operationTypes.join("\n")}
14367
14521
  }
14368
14522
 
14369
14523
  // node_modules/.pnpm/@open-draft+logger@0.3.0/node_modules/@open-draft/logger/lib/index.mjs
14370
- var __defProp3 = Object.defineProperty;
14524
+ var __defProp2 = Object.defineProperty;
14371
14525
  var __export2 = (target, all) => {
14372
14526
  for (var name in all)
14373
- __defProp3(target, name, { get: all[name], enumerable: true });
14527
+ __defProp2(target, name, { get: all[name], enumerable: true });
14374
14528
  };
14375
14529
  var colors_exports = {};
14376
14530
  __export2(colors_exports, {
@@ -14426,10 +14580,10 @@ ${operationTypes.join("\n")}
14426
14580
  * @example
14427
14581
  * logger.debug('no duplicates found, creating a document...')
14428
14582
  */
14429
- debug(message3, ...positionals) {
14583
+ debug(message4, ...positionals) {
14430
14584
  this.logEntry({
14431
14585
  level: "debug",
14432
- message: gray(message3),
14586
+ message: gray(message4),
14433
14587
  positionals,
14434
14588
  prefix: this.prefix,
14435
14589
  colors: {
@@ -14442,10 +14596,10 @@ ${operationTypes.join("\n")}
14442
14596
  * @example
14443
14597
  * logger.info('start parsing...')
14444
14598
  */
14445
- info(message3, ...positionals) {
14599
+ info(message4, ...positionals) {
14446
14600
  this.logEntry({
14447
14601
  level: "info",
14448
- message: message3,
14602
+ message: message4,
14449
14603
  positionals,
14450
14604
  prefix: this.prefix,
14451
14605
  colors: {
@@ -14471,10 +14625,10 @@ ${operationTypes.join("\n")}
14471
14625
  * @example
14472
14626
  * logger.success('successfully created document')
14473
14627
  */
14474
- success(message3, ...positionals) {
14628
+ success(message4, ...positionals) {
14475
14629
  this.logEntry({
14476
14630
  level: "info",
14477
- message: message3,
14631
+ message: message4,
14478
14632
  positionals,
14479
14633
  prefix: `\u2714 ${this.prefix}`,
14480
14634
  colors: {
@@ -14488,10 +14642,10 @@ ${operationTypes.join("\n")}
14488
14642
  * @example
14489
14643
  * logger.warning('found legacy document format')
14490
14644
  */
14491
- warning(message3, ...positionals) {
14645
+ warning(message4, ...positionals) {
14492
14646
  this.logEntry({
14493
14647
  level: "warning",
14494
- message: message3,
14648
+ message: message4,
14495
14649
  positionals,
14496
14650
  prefix: `\u26A0 ${this.prefix}`,
14497
14651
  colors: {
@@ -14505,10 +14659,10 @@ ${operationTypes.join("\n")}
14505
14659
  * @example
14506
14660
  * logger.error('something went wrong')
14507
14661
  */
14508
- error(message3, ...positionals) {
14662
+ error(message4, ...positionals) {
14509
14663
  this.logEntry({
14510
14664
  level: "error",
14511
- message: message3,
14665
+ message: message4,
14512
14666
  positionals,
14513
14667
  prefix: `\u2716 ${this.prefix}`,
14514
14668
  colors: {
@@ -14529,22 +14683,22 @@ ${operationTypes.join("\n")}
14529
14683
  only(callback) {
14530
14684
  callback();
14531
14685
  }
14532
- createEntry(level, message3) {
14686
+ createEntry(level, message4) {
14533
14687
  return {
14534
14688
  timestamp: /* @__PURE__ */ new Date(),
14535
14689
  level,
14536
- message: message3
14690
+ message: message4
14537
14691
  };
14538
14692
  }
14539
14693
  logEntry(args) {
14540
14694
  const {
14541
14695
  level,
14542
- message: message3,
14696
+ message: message4,
14543
14697
  prefix,
14544
14698
  colors: customColors,
14545
14699
  positionals = []
14546
14700
  } = args;
14547
- const entry = this.createEntry(level, message3);
14701
+ const entry = this.createEntry(level, message4);
14548
14702
  const timestampColor = customColors?.timestamp || "gray";
14549
14703
  const prefixColor = customColors?.prefix || "gray";
14550
14704
  const colorize = {
@@ -14553,7 +14707,7 @@ ${operationTypes.join("\n")}
14553
14707
  };
14554
14708
  const write = this.getWriter(level);
14555
14709
  write(
14556
- [colorize.timestamp(this.formatTimestamp(entry.timestamp))].concat(prefix != null ? colorize.prefix(prefix) : []).concat(serializeInput(message3)).join(" "),
14710
+ [colorize.timestamp(this.formatTimestamp(entry.timestamp))].concat(prefix != null ? colorize.prefix(prefix) : []).concat(serializeInput(message4)).join(" "),
14557
14711
  ...positionals.map(serializeInput)
14558
14712
  );
14559
14713
  }
@@ -14592,26 +14746,26 @@ ${operationTypes.join("\n")}
14592
14746
  }
14593
14747
  };
14594
14748
  var noop = () => void 0;
14595
- function log(message3, ...positionals) {
14749
+ function log(message4, ...positionals) {
14596
14750
  if (IS_NODE) {
14597
- process.stdout.write(format(message3, ...positionals) + "\n");
14751
+ process.stdout.write(format(message4, ...positionals) + "\n");
14598
14752
  return;
14599
14753
  }
14600
- console.log(message3, ...positionals);
14754
+ console.log(message4, ...positionals);
14601
14755
  }
14602
- function warn2(message3, ...positionals) {
14756
+ function warn2(message4, ...positionals) {
14603
14757
  if (IS_NODE) {
14604
- process.stderr.write(format(message3, ...positionals) + "\n");
14758
+ process.stderr.write(format(message4, ...positionals) + "\n");
14605
14759
  return;
14606
14760
  }
14607
- console.warn(message3, ...positionals);
14761
+ console.warn(message4, ...positionals);
14608
14762
  }
14609
- function error2(message3, ...positionals) {
14763
+ function error2(message4, ...positionals) {
14610
14764
  if (IS_NODE) {
14611
- process.stderr.write(format(message3, ...positionals) + "\n");
14765
+ process.stderr.write(format(message4, ...positionals) + "\n");
14612
14766
  return;
14613
14767
  }
14614
- console.error(message3, ...positionals);
14768
+ console.error(message4, ...positionals);
14615
14769
  }
14616
14770
  function getVariable(variableName) {
14617
14771
  if (IS_NODE) {
@@ -14622,20 +14776,20 @@ ${operationTypes.join("\n")}
14622
14776
  function isDefinedAndNotEquals(value, expected) {
14623
14777
  return value !== void 0 && value !== expected;
14624
14778
  }
14625
- function serializeInput(message3) {
14626
- if (typeof message3 === "undefined") {
14779
+ function serializeInput(message4) {
14780
+ if (typeof message4 === "undefined") {
14627
14781
  return "undefined";
14628
14782
  }
14629
- if (message3 === null) {
14783
+ if (message4 === null) {
14630
14784
  return "null";
14631
14785
  }
14632
- if (typeof message3 === "string") {
14633
- return message3;
14786
+ if (typeof message4 === "string") {
14787
+ return message4;
14634
14788
  }
14635
- if (typeof message3 === "object") {
14636
- return JSON.stringify(message3);
14789
+ if (typeof message4 === "object") {
14790
+ return JSON.stringify(message4);
14637
14791
  }
14638
- return message3.toString();
14792
+ return message4.toString();
14639
14793
  }
14640
14794
 
14641
14795
  // node_modules/.pnpm/@mswjs+interceptors@0.39.1/node_modules/@mswjs/interceptors/lib/browser/chunk-QED3Q6Z2.mjs
@@ -14834,9 +14988,6 @@ ${operationTypes.join("\n")}
14834
14988
 
14835
14989
  // src/core/utils/url/cleanUrl.ts
14836
14990
  var REDUNDANT_CHARACTERS_EXP = /[?|#].*$/g;
14837
- function getSearchParams(path) {
14838
- return new URL(`/${path}`, "http://localhost").searchParams;
14839
- }
14840
14991
  function cleanUrl(path) {
14841
14992
  if (path.endsWith("?")) {
14842
14993
  return path;
@@ -14910,198 +15061,11 @@ ${operationTypes.join("\n")}
14910
15061
  return urlInstance.origin === location.origin ? urlInstance.pathname : urlInstance.origin + urlInstance.pathname;
14911
15062
  }
14912
15063
 
14913
- // node_modules/.pnpm/@bundled-es-modules+cookie@2.0.1/node_modules/@bundled-es-modules/cookie/index-esm.js
14914
- var __create2 = Object.create;
14915
- var __defProp4 = Object.defineProperty;
14916
- var __getOwnPropDesc3 = Object.getOwnPropertyDescriptor;
14917
- var __getOwnPropNames3 = Object.getOwnPropertyNames;
14918
- var __getProtoOf2 = Object.getPrototypeOf;
14919
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
14920
- var __commonJS2 = (cb, mod) => function __require() {
14921
- return mod || (0, cb[__getOwnPropNames3(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
14922
- };
14923
- var __copyProps3 = (to, from, except, desc) => {
14924
- if (from && typeof from === "object" || typeof from === "function") {
14925
- for (let key of __getOwnPropNames3(from))
14926
- if (!__hasOwnProp3.call(to, key) && key !== except)
14927
- __defProp4(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc3(from, key)) || desc.enumerable });
14928
- }
14929
- return to;
14930
- };
14931
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps3(
14932
- // If the importer is in node compatibility mode or this is not an ESM
14933
- // file that has been converted to a CommonJS file using a Babel-
14934
- // compatible transform (i.e. "__esModule" has not been set), then set
14935
- // "default" to the CommonJS "module.exports" for node compatibility.
14936
- isNodeMode || !mod || !mod.__esModule ? __defProp4(target, "default", { value: mod, enumerable: true }) : target,
14937
- mod
14938
- ));
14939
- var require_cookie = __commonJS2({
14940
- "node_modules/cookie/index.js"(exports) {
14941
- "use strict";
14942
- exports.parse = parse4;
14943
- exports.serialize = serialize;
14944
- var __toString = Object.prototype.toString;
14945
- var __hasOwnProperty = Object.prototype.hasOwnProperty;
14946
- var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
14947
- var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/;
14948
- var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
14949
- var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
14950
- function parse4(str, opt) {
14951
- if (typeof str !== "string") {
14952
- throw new TypeError("argument str must be a string");
14953
- }
14954
- var obj = {};
14955
- var len = str.length;
14956
- if (len < 2) return obj;
14957
- var dec = opt && opt.decode || decode;
14958
- var index = 0;
14959
- var eqIdx = 0;
14960
- var endIdx = 0;
14961
- do {
14962
- eqIdx = str.indexOf("=", index);
14963
- if (eqIdx === -1) break;
14964
- endIdx = str.indexOf(";", index);
14965
- if (endIdx === -1) {
14966
- endIdx = len;
14967
- } else if (eqIdx > endIdx) {
14968
- index = str.lastIndexOf(";", eqIdx - 1) + 1;
14969
- continue;
14970
- }
14971
- var keyStartIdx = startIndex(str, index, eqIdx);
14972
- var keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
14973
- var key = str.slice(keyStartIdx, keyEndIdx);
14974
- if (!__hasOwnProperty.call(obj, key)) {
14975
- var valStartIdx = startIndex(str, eqIdx + 1, endIdx);
14976
- var valEndIdx = endIndex(str, endIdx, valStartIdx);
14977
- if (str.charCodeAt(valStartIdx) === 34 && str.charCodeAt(valEndIdx - 1) === 34) {
14978
- valStartIdx++;
14979
- valEndIdx--;
14980
- }
14981
- var val = str.slice(valStartIdx, valEndIdx);
14982
- obj[key] = tryDecode(val, dec);
14983
- }
14984
- index = endIdx + 1;
14985
- } while (index < len);
14986
- return obj;
14987
- }
14988
- function startIndex(str, index, max) {
14989
- do {
14990
- var code = str.charCodeAt(index);
14991
- if (code !== 32 && code !== 9) return index;
14992
- } while (++index < max);
14993
- return max;
14994
- }
14995
- function endIndex(str, index, min) {
14996
- while (index > min) {
14997
- var code = str.charCodeAt(--index);
14998
- if (code !== 32 && code !== 9) return index + 1;
14999
- }
15000
- return min;
15001
- }
15002
- function serialize(name, val, opt) {
15003
- var enc = opt && opt.encode || encodeURIComponent;
15004
- if (typeof enc !== "function") {
15005
- throw new TypeError("option encode is invalid");
15006
- }
15007
- if (!cookieNameRegExp.test(name)) {
15008
- throw new TypeError("argument name is invalid");
15009
- }
15010
- var value = enc(val);
15011
- if (!cookieValueRegExp.test(value)) {
15012
- throw new TypeError("argument val is invalid");
15013
- }
15014
- var str = name + "=" + value;
15015
- if (!opt) return str;
15016
- if (null != opt.maxAge) {
15017
- var maxAge = Math.floor(opt.maxAge);
15018
- if (!isFinite(maxAge)) {
15019
- throw new TypeError("option maxAge is invalid");
15020
- }
15021
- str += "; Max-Age=" + maxAge;
15022
- }
15023
- if (opt.domain) {
15024
- if (!domainValueRegExp.test(opt.domain)) {
15025
- throw new TypeError("option domain is invalid");
15026
- }
15027
- str += "; Domain=" + opt.domain;
15028
- }
15029
- if (opt.path) {
15030
- if (!pathValueRegExp.test(opt.path)) {
15031
- throw new TypeError("option path is invalid");
15032
- }
15033
- str += "; Path=" + opt.path;
15034
- }
15035
- if (opt.expires) {
15036
- var expires = opt.expires;
15037
- if (!isDate(expires) || isNaN(expires.valueOf())) {
15038
- throw new TypeError("option expires is invalid");
15039
- }
15040
- str += "; Expires=" + expires.toUTCString();
15041
- }
15042
- if (opt.httpOnly) {
15043
- str += "; HttpOnly";
15044
- }
15045
- if (opt.secure) {
15046
- str += "; Secure";
15047
- }
15048
- if (opt.partitioned) {
15049
- str += "; Partitioned";
15050
- }
15051
- if (opt.priority) {
15052
- var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority;
15053
- switch (priority) {
15054
- case "low":
15055
- str += "; Priority=Low";
15056
- break;
15057
- case "medium":
15058
- str += "; Priority=Medium";
15059
- break;
15060
- case "high":
15061
- str += "; Priority=High";
15062
- break;
15063
- default:
15064
- throw new TypeError("option priority is invalid");
15065
- }
15066
- }
15067
- if (opt.sameSite) {
15068
- var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite;
15069
- switch (sameSite) {
15070
- case true:
15071
- str += "; SameSite=Strict";
15072
- break;
15073
- case "lax":
15074
- str += "; SameSite=Lax";
15075
- break;
15076
- case "strict":
15077
- str += "; SameSite=Strict";
15078
- break;
15079
- case "none":
15080
- str += "; SameSite=None";
15081
- break;
15082
- default:
15083
- throw new TypeError("option sameSite is invalid");
15084
- }
15085
- }
15086
- return str;
15087
- }
15088
- function decode(str) {
15089
- return str.indexOf("%") !== -1 ? decodeURIComponent(str) : str;
15090
- }
15091
- function isDate(val) {
15092
- return __toString.call(val) === "[object Date]";
15093
- }
15094
- function tryDecode(str, decode2) {
15095
- try {
15096
- return decode2(str);
15097
- } catch (e) {
15098
- return str;
15099
- }
15100
- }
15101
- }
15102
- });
15103
- var import_cookie = __toESM2(require_cookie(), 1);
15104
- var source_default2 = import_cookie.default;
15064
+ // src/shims/cookie.ts
15065
+ var allCookie = __toESM(require_dist(), 1);
15066
+ var cookie = allCookie.default || allCookie;
15067
+ var parse2 = cookie.parse;
15068
+ var serialize = cookie.serialize;
15105
15069
 
15106
15070
  // node_modules/.pnpm/tldts-core@7.0.12/node_modules/tldts-core/dist/es6/src/domain.js
15107
15071
  function shareSameDomainSuffix(hostname, vhost) {
@@ -15816,9 +15780,9 @@ ${operationTypes.join("\n")}
15816
15780
  /**
15817
15781
  * @internal No doc because this is an overload that supports the implementation
15818
15782
  */
15819
- putCookie(cookie, callback) {
15783
+ putCookie(cookie2, callback) {
15820
15784
  const promiseCallback = createPromiseCallback(callback);
15821
- const { domain, path, key } = cookie;
15785
+ const { domain, path, key } = cookie2;
15822
15786
  if (domain == null || path == null || key == null) {
15823
15787
  return promiseCallback.resolve(void 0);
15824
15788
  }
@@ -15826,7 +15790,7 @@ ${operationTypes.join("\n")}
15826
15790
  this.idx[domain] = domainEntry;
15827
15791
  const pathEntry = domainEntry[path] ?? /* @__PURE__ */ Object.create(null);
15828
15792
  domainEntry[path] = pathEntry;
15829
- pathEntry[key] = cookie;
15793
+ pathEntry[key] = cookie2;
15830
15794
  return promiseCallback.resolve(void 0);
15831
15795
  }
15832
15796
  /**
@@ -15907,10 +15871,10 @@ ${operationTypes.join("\n")}
15907
15871
  function isObject(data) {
15908
15872
  return objectToString(data) === "[object Object]";
15909
15873
  }
15910
- function validate(bool, cbOrMessage, message3) {
15874
+ function validate(bool, cbOrMessage, message4) {
15911
15875
  if (bool) return;
15912
15876
  const cb = typeof cbOrMessage === "function" ? cbOrMessage : void 0;
15913
- let options = typeof cbOrMessage === "function" ? message3 : cbOrMessage;
15877
+ let options = typeof cbOrMessage === "function" ? message4 : cbOrMessage;
15914
15878
  if (!isObject(options)) options = "[object Object]";
15915
15879
  const err = new ParameterError(safeToString(options));
15916
15880
  if (cb) cb(err);
@@ -16148,7 +16112,7 @@ ${operationTypes.join("\n")}
16148
16112
  c.value = cookieValue;
16149
16113
  return c;
16150
16114
  }
16151
- function parse2(str, options) {
16115
+ function parse3(str, options) {
16152
16116
  if (isEmptyString(str) || !isString(str)) {
16153
16117
  return void 0;
16154
16118
  }
@@ -16687,7 +16651,7 @@ ${operationTypes.join("\n")}
16687
16651
  * @param options - Configures `strict` or `loose` mode for cookie parsing
16688
16652
  */
16689
16653
  static parse(str, options) {
16690
- return parse2(str, options);
16654
+ return parse3(str, options);
16691
16655
  }
16692
16656
  /**
16693
16657
  * Does the reverse of {@link Cookie.toJSON}.
@@ -16894,14 +16858,14 @@ ${operationTypes.join("\n")}
16894
16858
  return void 0;
16895
16859
  }
16896
16860
  }
16897
- function isSecurePrefixConditionMet(cookie) {
16898
- const startsWithSecurePrefix = typeof cookie.key === "string" && cookie.key.startsWith("__Secure-");
16899
- return !startsWithSecurePrefix || cookie.secure;
16861
+ function isSecurePrefixConditionMet(cookie2) {
16862
+ const startsWithSecurePrefix = typeof cookie2.key === "string" && cookie2.key.startsWith("__Secure-");
16863
+ return !startsWithSecurePrefix || cookie2.secure;
16900
16864
  }
16901
- function isHostPrefixConditionMet(cookie) {
16902
- const startsWithHostPrefix = typeof cookie.key === "string" && cookie.key.startsWith("__Host-");
16865
+ function isHostPrefixConditionMet(cookie2) {
16866
+ const startsWithHostPrefix = typeof cookie2.key === "string" && cookie2.key.startsWith("__Host-");
16903
16867
  return !startsWithHostPrefix || Boolean(
16904
- cookie.secure && cookie.hostOnly && cookie.path != null && cookie.path === "/"
16868
+ cookie2.secure && cookie2.hostOnly && cookie2.path != null && cookie2.path === "/"
16905
16869
  );
16906
16870
  }
16907
16871
  function getNormalizedPrefixSecurity(prefixSecurity) {
@@ -16961,7 +16925,7 @@ ${operationTypes.join("\n")}
16961
16925
  /**
16962
16926
  * @internal No doc because this is the overload implementation
16963
16927
  */
16964
- setCookie(cookie, url, options, callback) {
16928
+ setCookie(cookie2, url, options, callback) {
16965
16929
  if (typeof options === "function") {
16966
16930
  callback = options;
16967
16931
  options = void 0;
@@ -16985,7 +16949,7 @@ ${operationTypes.join("\n")}
16985
16949
  options = defaultSetCookieOptions;
16986
16950
  }
16987
16951
  validate(typeof cb === "function", cb);
16988
- if (!isNonEmptyString(cookie) && !isObject(cookie) && cookie instanceof String && cookie.length == 0) {
16952
+ if (!isNonEmptyString(cookie2) && !isObject(cookie2) && cookie2 instanceof String && cookie2.length == 0) {
16989
16953
  return promiseCallback.resolve(void 0);
16990
16954
  }
16991
16955
  } catch (err) {
@@ -17000,28 +16964,28 @@ ${operationTypes.join("\n")}
17000
16964
  return promiseCallback.reject(new Error(SAME_SITE_CONTEXT_VAL_ERR));
17001
16965
  }
17002
16966
  }
17003
- if (typeof cookie === "string" || cookie instanceof String) {
17004
- const parsedCookie = Cookie.parse(cookie.toString(), { loose });
16967
+ if (typeof cookie2 === "string" || cookie2 instanceof String) {
16968
+ const parsedCookie = Cookie.parse(cookie2.toString(), { loose });
17005
16969
  if (!parsedCookie) {
17006
16970
  const err = new Error("Cookie failed to parse");
17007
16971
  return options?.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17008
16972
  }
17009
- cookie = parsedCookie;
17010
- } else if (!(cookie instanceof Cookie)) {
16973
+ cookie2 = parsedCookie;
16974
+ } else if (!(cookie2 instanceof Cookie)) {
17011
16975
  const err = new Error(
17012
16976
  "First argument to setCookie must be a Cookie object or string"
17013
16977
  );
17014
16978
  return options?.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17015
16979
  }
17016
16980
  const now = options?.now || /* @__PURE__ */ new Date();
17017
- if (this.rejectPublicSuffixes && cookie.domain) {
16981
+ if (this.rejectPublicSuffixes && cookie2.domain) {
17018
16982
  try {
17019
- const cdomain = cookie.cdomain();
16983
+ const cdomain = cookie2.cdomain();
17020
16984
  const suffix = typeof cdomain === "string" ? getPublicSuffix(cdomain, {
17021
16985
  allowSpecialUseDomain: this.allowSpecialUseDomain,
17022
16986
  ignoreError: options?.ignoreError
17023
16987
  }) : null;
17024
- if (suffix == null && !IP_V6_REGEX_OBJECT.test(cookie.domain)) {
16988
+ if (suffix == null && !IP_V6_REGEX_OBJECT.test(cookie2.domain)) {
17025
16989
  const err = new Error("Cookie has domain set to a public suffix");
17026
16990
  return options?.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17027
16991
  }
@@ -17032,29 +16996,29 @@ ${operationTypes.join("\n")}
17032
16996
  );
17033
16997
  }
17034
16998
  }
17035
- if (cookie.domain) {
17036
- if (!domainMatch(host ?? void 0, cookie.cdomain() ?? void 0, false)) {
16999
+ if (cookie2.domain) {
17000
+ if (!domainMatch(host ?? void 0, cookie2.cdomain() ?? void 0, false)) {
17037
17001
  const err = new Error(
17038
- `Cookie not in this host's domain. Cookie:${cookie.cdomain() ?? "null"} Request:${host ?? "null"}`
17002
+ `Cookie not in this host's domain. Cookie:${cookie2.cdomain() ?? "null"} Request:${host ?? "null"}`
17039
17003
  );
17040
17004
  return options?.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17041
17005
  }
17042
- if (cookie.hostOnly == null) {
17043
- cookie.hostOnly = false;
17006
+ if (cookie2.hostOnly == null) {
17007
+ cookie2.hostOnly = false;
17044
17008
  }
17045
17009
  } else {
17046
- cookie.hostOnly = true;
17047
- cookie.domain = host;
17010
+ cookie2.hostOnly = true;
17011
+ cookie2.domain = host;
17048
17012
  }
17049
- if (!cookie.path || cookie.path[0] !== "/") {
17050
- cookie.path = defaultPath(context.pathname);
17051
- cookie.pathIsDefault = true;
17013
+ if (!cookie2.path || cookie2.path[0] !== "/") {
17014
+ cookie2.path = defaultPath(context.pathname);
17015
+ cookie2.pathIsDefault = true;
17052
17016
  }
17053
- if (options?.http === false && cookie.httpOnly) {
17017
+ if (options?.http === false && cookie2.httpOnly) {
17054
17018
  const err = new Error("Cookie is HttpOnly and this isn't an HTTP API");
17055
17019
  return options.ignoreError ? promiseCallback.resolve(void 0) : promiseCallback.reject(err);
17056
17020
  }
17057
- if (cookie.sameSite !== "none" && cookie.sameSite !== void 0 && sameSiteContext) {
17021
+ if (cookie2.sameSite !== "none" && cookie2.sameSite !== void 0 && sameSiteContext) {
17058
17022
  if (sameSiteContext === "none") {
17059
17023
  const err = new Error(
17060
17024
  "Cookie is SameSite but this is a cross-origin request"
@@ -17067,10 +17031,10 @@ ${operationTypes.join("\n")}
17067
17031
  if (!prefixSecurityDisabled) {
17068
17032
  let errorFound = false;
17069
17033
  let errorMsg;
17070
- if (!isSecurePrefixConditionMet(cookie)) {
17034
+ if (!isSecurePrefixConditionMet(cookie2)) {
17071
17035
  errorFound = true;
17072
17036
  errorMsg = "Cookie has __Secure prefix but Secure attribute is not set";
17073
- } else if (!isHostPrefixConditionMet(cookie)) {
17037
+ } else if (!isHostPrefixConditionMet(cookie2)) {
17074
17038
  errorFound = true;
17075
17039
  errorMsg = "Cookie has __Host prefix but either Secure or HostOnly attribute is not set or Path is not '/'";
17076
17040
  }
@@ -17095,10 +17059,10 @@ ${operationTypes.join("\n")}
17095
17059
  const next = function(err2) {
17096
17060
  if (err2) {
17097
17061
  cb(err2);
17098
- } else if (typeof cookie === "string") {
17062
+ } else if (typeof cookie2 === "string") {
17099
17063
  cb(null, void 0);
17100
17064
  } else {
17101
- cb(null, cookie);
17065
+ cb(null, cookie2);
17102
17066
  }
17103
17067
  };
17104
17068
  if (oldCookie) {
@@ -17108,20 +17072,20 @@ ${operationTypes.join("\n")}
17108
17072
  else cb(err);
17109
17073
  return;
17110
17074
  }
17111
- if (cookie instanceof Cookie) {
17112
- cookie.creation = oldCookie.creation;
17113
- cookie.creationIndex = oldCookie.creationIndex;
17114
- cookie.lastAccessed = now;
17115
- store.updateCookie(oldCookie, cookie, next);
17075
+ if (cookie2 instanceof Cookie) {
17076
+ cookie2.creation = oldCookie.creation;
17077
+ cookie2.creationIndex = oldCookie.creationIndex;
17078
+ cookie2.lastAccessed = now;
17079
+ store.updateCookie(oldCookie, cookie2, next);
17116
17080
  }
17117
17081
  } else {
17118
- if (cookie instanceof Cookie) {
17119
- cookie.creation = cookie.lastAccessed = now;
17120
- store.putCookie(cookie, next);
17082
+ if (cookie2 instanceof Cookie) {
17083
+ cookie2.creation = cookie2.lastAccessed = now;
17084
+ store.putCookie(cookie2, next);
17121
17085
  }
17122
17086
  }
17123
17087
  };
17124
- store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie);
17088
+ store.findCookie(cookie2.domain, cookie2.path, cookie2.key, withCookie);
17125
17089
  return promiseCallback.promise;
17126
17090
  }
17127
17091
  /**
@@ -17144,8 +17108,8 @@ ${operationTypes.join("\n")}
17144
17108
  * @param options - Configuration settings to use when storing the cookie.
17145
17109
  * @public
17146
17110
  */
17147
- setCookieSync(cookie, url, options) {
17148
- const setCookieFn = options ? this.setCookie.bind(this, cookie, url, options) : this.setCookie.bind(this, cookie, url);
17111
+ setCookieSync(cookie2, url, options) {
17112
+ const setCookieFn = options ? this.setCookie.bind(this, cookie2, url, options) : this.setCookie.bind(this, cookie2, url);
17149
17113
  return this.callSync(setCookieFn);
17150
17114
  }
17151
17115
  /**
@@ -17255,8 +17219,8 @@ ${operationTypes.join("\n")}
17255
17219
  cookies = cookies.sort(cookieCompare);
17256
17220
  }
17257
17221
  const now2 = /* @__PURE__ */ new Date();
17258
- for (const cookie of cookies) {
17259
- cookie.lastAccessed = now2;
17222
+ for (const cookie2 of cookies) {
17223
+ cookie2.lastAccessed = now2;
17260
17224
  }
17261
17225
  cb(null, cookies);
17262
17226
  }
@@ -17394,8 +17358,8 @@ ${operationTypes.join("\n")}
17394
17358
  promiseCallback.callback(null, serialized);
17395
17359
  return;
17396
17360
  }
17397
- serialized.cookies = cookies.map((cookie) => {
17398
- const serializedCookie = cookie.toJSON();
17361
+ serialized.cookies = cookies.map((cookie2) => {
17362
+ const serializedCookie = cookie2.toJSON();
17399
17363
  delete serializedCookie.creationIndex;
17400
17364
  return serializedCookie;
17401
17365
  });
@@ -17444,18 +17408,18 @@ ${operationTypes.join("\n")}
17444
17408
  callback(err, this);
17445
17409
  return;
17446
17410
  }
17447
- let cookie;
17411
+ let cookie2;
17448
17412
  try {
17449
- cookie = Cookie.fromJSON(cookies.shift());
17413
+ cookie2 = Cookie.fromJSON(cookies.shift());
17450
17414
  } catch (e) {
17451
17415
  callback(e instanceof Error ? e : new Error(), void 0);
17452
17416
  return;
17453
17417
  }
17454
- if (cookie === void 0) {
17418
+ if (cookie2 === void 0) {
17455
17419
  putNext(null);
17456
17420
  return;
17457
17421
  }
17458
- this.store.putCookie(cookie, putNext);
17422
+ this.store.putCookie(cookie2, putNext);
17459
17423
  }
17460
17424
  };
17461
17425
  putNext(null);
@@ -17555,11 +17519,11 @@ ${operationTypes.join("\n")}
17555
17519
  return;
17556
17520
  }
17557
17521
  };
17558
- cookies.forEach((cookie) => {
17522
+ cookies.forEach((cookie2) => {
17559
17523
  store.removeCookie(
17560
- cookie.domain,
17561
- cookie.path,
17562
- cookie.key,
17524
+ cookie2.domain,
17525
+ cookie2.path,
17526
+ cookie2.key,
17563
17527
  removeCookieCb
17564
17528
  );
17565
17529
  });
@@ -17739,11 +17703,11 @@ ${operationTypes.join("\n")}
17739
17703
  }
17740
17704
  const cookies = {};
17741
17705
  for (const rawCookie of rawCookies) {
17742
- const cookie = Cookie.fromJSON(rawCookie);
17743
- if (cookie != null && cookie.domain != null && cookie.path != null) {
17744
- cookies[cookie.domain] ||= {};
17745
- cookies[cookie.domain][cookie.path] ||= {};
17746
- cookies[cookie.domain][cookie.path][cookie.key] = cookie;
17706
+ const cookie2 = Cookie.fromJSON(rawCookie);
17707
+ if (cookie2 != null && cookie2.domain != null && cookie2.path != null) {
17708
+ cookies[cookie2.domain] ||= {};
17709
+ cookies[cookie2.domain][cookie2.path] ||= {};
17710
+ cookies[cookie2.domain][cookie2.path][cookie2.key] = cookie2;
17747
17711
  }
17748
17712
  }
17749
17713
  return cookies;
@@ -17768,7 +17732,7 @@ ${operationTypes.join("\n")}
17768
17732
 
17769
17733
  // src/core/utils/request/getRequestCookies.ts
17770
17734
  function parseCookies(input) {
17771
- const parsedCookies = source_default2.parse(input);
17735
+ const parsedCookies = parse2(input);
17772
17736
  const cookies = {};
17773
17737
  for (const cookieName in parsedCookies) {
17774
17738
  if (typeof parsedCookies[cookieName] !== "undefined") {
@@ -17804,15 +17768,15 @@ ${operationTypes.join("\n")}
17804
17768
  for (const name in cookiesFromDocument) {
17805
17769
  request.headers.append(
17806
17770
  "cookie",
17807
- source_default2.serialize(name, cookiesFromDocument[name])
17771
+ serialize(name, cookiesFromDocument[name])
17808
17772
  );
17809
17773
  }
17810
17774
  const cookiesFromStore = cookieStore.getCookies(request.url);
17811
17775
  const storedCookiesObject = Object.fromEntries(
17812
- cookiesFromStore.map((cookie) => [cookie.key, cookie.value])
17776
+ cookiesFromStore.map((cookie2) => [cookie2.key, cookie2.value])
17813
17777
  );
17814
- for (const cookie of cookiesFromStore) {
17815
- request.headers.append("cookie", cookie.toString());
17778
+ for (const cookie2 of cookiesFromStore) {
17779
+ request.headers.append("cookie", cookie2.toString());
17816
17780
  }
17817
17781
  return {
17818
17782
  ...cookiesFromDocument,
@@ -17855,11 +17819,6 @@ ${operationTypes.join("\n")}
17855
17819
  if (url === path) {
17856
17820
  return;
17857
17821
  }
17858
- const searchParams = getSearchParams(path);
17859
- const queryParams = [];
17860
- searchParams.forEach((_, paramName) => {
17861
- queryParams.push(paramName);
17862
- });
17863
17822
  devUtils.warn(
17864
17823
  `Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters using "new URL(request.url).searchParams" instead. Learn more: https://mswjs.io/docs/http/intercepting-requests#querysearch-parameters`
17865
17824
  );
@@ -17938,32 +17897,32 @@ ${operationTypes.join("\n")}
17938
17897
  };
17939
17898
 
17940
17899
  // node_modules/.pnpm/headers-polyfill@4.0.3/node_modules/headers-polyfill/lib/index.mjs
17941
- var __create3 = Object.create;
17942
- var __defProp5 = Object.defineProperty;
17943
- var __getOwnPropDesc4 = Object.getOwnPropertyDescriptor;
17944
- var __getOwnPropNames4 = Object.getOwnPropertyNames;
17945
- var __getProtoOf3 = Object.getPrototypeOf;
17946
- var __hasOwnProp4 = Object.prototype.hasOwnProperty;
17947
- var __commonJS3 = (cb, mod) => function __require() {
17948
- return mod || (0, cb[__getOwnPropNames4(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17900
+ var __create2 = Object.create;
17901
+ var __defProp3 = Object.defineProperty;
17902
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
17903
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
17904
+ var __getProtoOf2 = Object.getPrototypeOf;
17905
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
17906
+ var __commonJS2 = (cb, mod) => function __require() {
17907
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17949
17908
  };
17950
- var __copyProps4 = (to, from, except, desc) => {
17909
+ var __copyProps2 = (to, from, except, desc) => {
17951
17910
  if (from && typeof from === "object" || typeof from === "function") {
17952
- for (let key of __getOwnPropNames4(from))
17953
- if (!__hasOwnProp4.call(to, key) && key !== except)
17954
- __defProp5(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc4(from, key)) || desc.enumerable });
17911
+ for (let key of __getOwnPropNames2(from))
17912
+ if (!__hasOwnProp2.call(to, key) && key !== except)
17913
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
17955
17914
  }
17956
17915
  return to;
17957
17916
  };
17958
- var __toESM3 = (mod, isNodeMode, target) => (target = mod != null ? __create3(__getProtoOf3(mod)) : {}, __copyProps4(
17917
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
17959
17918
  // If the importer is in node compatibility mode or this is not an ESM
17960
17919
  // file that has been converted to a CommonJS file using a Babel-
17961
17920
  // compatible transform (i.e. "__esModule" has not been set), then set
17962
17921
  // "default" to the CommonJS "module.exports" for node compatibility.
17963
- isNodeMode || !mod || !mod.__esModule ? __defProp5(target, "default", { value: mod, enumerable: true }) : target,
17922
+ isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target,
17964
17923
  mod
17965
17924
  ));
17966
- var require_set_cookie = __commonJS3({
17925
+ var require_set_cookie = __commonJS2({
17967
17926
  "node_modules/set-cookie-parser/lib/set-cookie.js"(exports, module) {
17968
17927
  "use strict";
17969
17928
  var defaultParseOptions = {
@@ -17989,7 +17948,7 @@ ${operationTypes.join("\n")}
17989
17948
  e
17990
17949
  );
17991
17950
  }
17992
- var cookie = {
17951
+ var cookie2 = {
17993
17952
  name,
17994
17953
  value
17995
17954
  };
@@ -17998,20 +17957,20 @@ ${operationTypes.join("\n")}
17998
17957
  var key = sides.shift().trimLeft().toLowerCase();
17999
17958
  var value2 = sides.join("=");
18000
17959
  if (key === "expires") {
18001
- cookie.expires = new Date(value2);
17960
+ cookie2.expires = new Date(value2);
18002
17961
  } else if (key === "max-age") {
18003
- cookie.maxAge = parseInt(value2, 10);
17962
+ cookie2.maxAge = parseInt(value2, 10);
18004
17963
  } else if (key === "secure") {
18005
- cookie.secure = true;
17964
+ cookie2.secure = true;
18006
17965
  } else if (key === "httponly") {
18007
- cookie.httpOnly = true;
17966
+ cookie2.httpOnly = true;
18008
17967
  } else if (key === "samesite") {
18009
- cookie.sameSite = value2;
17968
+ cookie2.sameSite = value2;
18010
17969
  } else {
18011
- cookie[key] = value2;
17970
+ cookie2[key] = value2;
18012
17971
  }
18013
17972
  });
18014
- return cookie;
17973
+ return cookie2;
18015
17974
  }
18016
17975
  function parseNameValuePair(nameValuePairStr) {
18017
17976
  var name = "";
@@ -18025,7 +17984,7 @@ ${operationTypes.join("\n")}
18025
17984
  }
18026
17985
  return { name, value };
18027
17986
  }
18028
- function parse4(input, options) {
17987
+ function parse5(input, options) {
18029
17988
  options = options ? Object.assign({}, defaultParseOptions, options) : defaultParseOptions;
18030
17989
  if (!input) {
18031
17990
  if (!options.map) {
@@ -18062,8 +18021,8 @@ ${operationTypes.join("\n")}
18062
18021
  } else {
18063
18022
  var cookies = {};
18064
18023
  return input.filter(isNonEmptyString2).reduce(function(cookies2, str) {
18065
- var cookie = parseString(str, options);
18066
- cookies2[cookie.name] = cookie;
18024
+ var cookie2 = parseString(str, options);
18025
+ cookies2[cookie2.name] = cookie2;
18067
18026
  return cookies2;
18068
18027
  }, cookies);
18069
18028
  }
@@ -18123,13 +18082,13 @@ ${operationTypes.join("\n")}
18123
18082
  }
18124
18083
  return cookiesStrings;
18125
18084
  }
18126
- module.exports = parse4;
18127
- module.exports.parse = parse4;
18085
+ module.exports = parse5;
18086
+ module.exports.parse = parse5;
18128
18087
  module.exports.parseString = parseString;
18129
18088
  module.exports.splitCookiesString = splitCookiesString2;
18130
18089
  }
18131
18090
  });
18132
- var import_set_cookie_parser = __toESM3(require_set_cookie());
18091
+ var import_set_cookie_parser = __toESM2(require_set_cookie());
18133
18092
  var HEADERS_INVALID_CHARACTERS = /[^a-z0-9\-#$%&'*+.^_`|~]/i;
18134
18093
  function normalizeHeaderName(name) {
18135
18094
  if (HEADERS_INVALID_CHARACTERS.test(name) || name.trim() === "") {
@@ -18432,9 +18391,9 @@ ${operationTypes.join("\n")}
18432
18391
  };
18433
18392
  }
18434
18393
  async function parseQuery(query) {
18435
- const { parse: parse4 } = (init_graphql2(), __toCommonJS(graphql_exports));
18394
+ const { parse: parse5 } = (init_graphql2(), __toCommonJS(graphql_exports));
18436
18395
  try {
18437
- const ast = parse4(query);
18396
+ const ast = parse5(query);
18438
18397
  return parseDocumentNode(ast);
18439
18398
  } catch (error3) {
18440
18399
  return error3;
@@ -19057,14 +19016,14 @@ Consider naming this operation or using "graphql.operation()" request handler to
19057
19016
  this.store = typeof indexedDB !== "undefined" ? new WebSocketIndexedDBClientStore() : new WebSocketMemoryClientStore();
19058
19017
  this.runtimeClients = /* @__PURE__ */ new Map();
19059
19018
  this.allClients = /* @__PURE__ */ new Set();
19060
- this.channel.addEventListener("message", (message3) => {
19061
- if (message3.data?.type === "db:update") {
19019
+ this.channel.addEventListener("message", (message4) => {
19020
+ if (message4.data?.type === "db:update") {
19062
19021
  this.flushDatabaseToMemory();
19063
19022
  }
19064
19023
  });
19065
19024
  if (typeof window !== "undefined") {
19066
- window.addEventListener("message", async (message3) => {
19067
- if (message3.data?.type === "msw/worker:stop") {
19025
+ window.addEventListener("message", async (message4) => {
19026
+ if (message4.data?.type === "msw/worker:stop") {
19068
19027
  await this.removeRuntimeClients();
19069
19028
  }
19070
19029
  });
@@ -19122,8 +19081,8 @@ Consider naming this operation or using "graphql.operation()" request handler to
19122
19081
  async addConnection(client) {
19123
19082
  this.runtimeClients.set(client.id, client);
19124
19083
  await this.addClient(client);
19125
- const handleExtraneousMessage = (message3) => {
19126
- const { type, payload } = message3.data;
19084
+ const handleExtraneousMessage = (message4) => {
19085
+ const { type, payload } = message4.data;
19127
19086
  if (typeof payload === "object" && "clientId" in payload && payload.clientId !== client.id) {
19128
19087
  return;
19129
19088
  }
@@ -19340,11 +19299,11 @@ Read more: https://mswjs.io/docs/http/intercepting-requests`;
19340
19299
  }
19341
19300
 
19342
19301
  // src/core/utils/HttpResponse/decorators.ts
19343
- var { message: message2 } = source_default;
19302
+ var { message: message3 } = statuses_default;
19344
19303
  var kSetCookie = Symbol("kSetCookie");
19345
19304
  function normalizeResponseInit(init = {}) {
19346
19305
  const status = init?.status || 200;
19347
- const statusText = init?.statusText || message2[status] || "";
19306
+ const statusText = init?.statusText || message3[status] || "";
19348
19307
  const headers = new Headers(init?.headers);
19349
19308
  return {
19350
19309
  ...init,
@@ -19754,9 +19713,9 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19754
19713
  if (args.quiet) {
19755
19714
  return;
19756
19715
  }
19757
- const message3 = args.message || "Mocking enabled.";
19716
+ const message4 = args.message || "Mocking enabled.";
19758
19717
  console.groupCollapsed(
19759
- `%c${devUtils.formatMessage(message3)}`,
19718
+ `%c${devUtils.formatMessage(message4)}`,
19760
19719
  "color:orangered;font-weight:bold;"
19761
19720
  );
19762
19721
  console.log(
@@ -19811,6 +19770,23 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19811
19770
  });
19812
19771
  }
19813
19772
 
19773
+ // src/browser/utils/supports.ts
19774
+ function supportsServiceWorker() {
19775
+ return typeof navigator !== "undefined" && "serviceWorker" in navigator && typeof location !== "undefined" && location.protocol !== "file:";
19776
+ }
19777
+ function supportsReadableStreamTransfer() {
19778
+ try {
19779
+ const stream = new ReadableStream({
19780
+ start: (controller) => controller.close()
19781
+ });
19782
+ const message4 = new MessageChannel();
19783
+ message4.port1.postMessage(stream, [stream]);
19784
+ return true;
19785
+ } catch {
19786
+ return false;
19787
+ }
19788
+ }
19789
+
19814
19790
  // src/core/utils/toResponseInit.ts
19815
19791
  function toResponseInit(response) {
19816
19792
  return {
@@ -19828,6 +19804,7 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19828
19804
  }
19829
19805
 
19830
19806
  // src/browser/setupWorker/start/createRequestListener.ts
19807
+ var SUPPORTS_READABLE_STREAM_TRANSFER = supportsReadableStreamTransfer();
19831
19808
  var createRequestListener = (context, options) => {
19832
19809
  return async (event) => {
19833
19810
  if (!context.isMockingEnabled && context.workerStoppedAt && event.data.interceptedAt > context.workerStoppedAt) {
@@ -19854,7 +19831,7 @@ Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/i
19854
19831
  const responseClone = response.clone();
19855
19832
  const responseCloneForLogs = response.clone();
19856
19833
  const responseInit = toResponseInit(response);
19857
- if (context.supports.readableStreamTransfer) {
19834
+ if (SUPPORTS_READABLE_STREAM_TRANSFER) {
19858
19835
  const responseStreamOrNull = response.body;
19859
19836
  event.postMessage(
19860
19837
  "MOCK_RESPONSE",
@@ -20065,20 +20042,6 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
20065
20042
  };
20066
20043
  };
20067
20044
 
20068
- // src/browser/utils/supportsReadableStreamTransfer.ts
20069
- function supportsReadableStreamTransfer() {
20070
- try {
20071
- const stream = new ReadableStream({
20072
- start: (controller) => controller.close()
20073
- });
20074
- const message3 = new MessageChannel();
20075
- message3.port1.postMessage(stream, [stream]);
20076
- return true;
20077
- } catch {
20078
- return false;
20079
- }
20080
- }
20081
-
20082
20045
  // node_modules/.pnpm/@mswjs+interceptors@0.39.1/node_modules/@mswjs/interceptors/lib/browser/chunk-TX5GBTFY.mjs
20083
20046
  function hasConfigurableGlobal(propertyName) {
20084
20047
  const descriptor = Object.getOwnPropertyDescriptor(globalThis, propertyName);
@@ -20184,7 +20147,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
20184
20147
  this.url = new URL(socket.url);
20185
20148
  this[kEmitter2] = new EventTarget();
20186
20149
  this.transport.addEventListener("outgoing", (event) => {
20187
- const message3 = bindEvent(
20150
+ const message4 = bindEvent(
20188
20151
  this.socket,
20189
20152
  new CancelableMessageEvent("message", {
20190
20153
  data: event.data,
@@ -20192,8 +20155,8 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
20192
20155
  cancelable: true
20193
20156
  })
20194
20157
  );
20195
- this[kEmitter2].dispatchEvent(message3);
20196
- if (message3.defaultPrevented) {
20158
+ this[kEmitter2].dispatchEvent(message4);
20159
+ if (message4.defaultPrevented) {
20197
20160
  event.preventDefault();
20198
20161
  }
20199
20162
  });
@@ -20829,11 +20792,11 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
20829
20792
 
20830
20793
  // src/core/ws/utils/truncateMessage.ts
20831
20794
  var MAX_LENGTH = 24;
20832
- function truncateMessage(message3) {
20833
- if (message3.length <= MAX_LENGTH) {
20834
- return message3;
20795
+ function truncateMessage(message4) {
20796
+ if (message4.length <= MAX_LENGTH) {
20797
+ return message4;
20835
20798
  }
20836
- return `${message3.slice(0, MAX_LENGTH)}\u2026`;
20799
+ return `${message4.slice(0, MAX_LENGTH)}\u2026`;
20837
20800
  }
20838
20801
 
20839
20802
  // src/core/ws/utils/getPublicData.ts
@@ -21253,6 +21216,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21253
21216
  };
21254
21217
 
21255
21218
  // src/browser/utils/workerChannel.ts
21219
+ var SUPPORTS_SERVICE_WORKER = supportsServiceWorker();
21256
21220
  var WorkerEvent = class extends TypedEvent {
21257
21221
  #workerEvent;
21258
21222
  constructor(workerEvent) {
@@ -21282,6 +21246,9 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21282
21246
  constructor(options) {
21283
21247
  super();
21284
21248
  this.options = options;
21249
+ if (!SUPPORTS_SERVICE_WORKER) {
21250
+ return;
21251
+ }
21285
21252
  navigator.serviceWorker.addEventListener("message", async (event) => {
21286
21253
  const worker = await this.options.worker;
21287
21254
  if (event.source != null && event.source !== worker) {
@@ -21297,6 +21264,10 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21297
21264
  * This triggers the `message` event listener on ServiceWorkerGlobalScope.
21298
21265
  */
21299
21266
  postMessage(type) {
21267
+ invariant(
21268
+ SUPPORTS_SERVICE_WORKER,
21269
+ "Failed to post message on a WorkerChannel: the Service Worker API is unavailable in this context. This is likely an issue with MSW. Please report it on GitHub: https://github.com/mswjs/msw/issues"
21270
+ );
21300
21271
  this.options.worker.then((worker) => {
21301
21272
  worker.postMessage(type);
21302
21273
  });
@@ -21317,8 +21288,8 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
21317
21288
 
21318
21289
  // node_modules/.pnpm/@mswjs+interceptors@0.39.1/node_modules/@mswjs/interceptors/lib/browser/chunk-L37TY7LC.mjs
21319
21290
  var InterceptorError = class extends Error {
21320
- constructor(message3) {
21321
- super(message3);
21291
+ constructor(message4) {
21292
+ super(message4);
21322
21293
  this.name = "InterceptorError";
21323
21294
  Object.setPrototypeOf(this, InterceptorError.prototype);
21324
21295
  }
@@ -22663,11 +22634,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
22663
22634
  emitter: this.emitter,
22664
22635
  workerChannel: new WorkerChannel({
22665
22636
  worker: workerPromise
22666
- }),
22667
- supports: {
22668
- serviceWorkerApi: "serviceWorker" in navigator && location.protocol !== "file:",
22669
- readableStreamTransfer: supportsReadableStreamTransfer()
22670
- }
22637
+ })
22671
22638
  };
22672
22639
  }
22673
22640
  async start(options = {}) {
@@ -22706,7 +22673,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
22706
22673
  this.subscriptions.push(() => {
22707
22674
  webSocketInterceptor.dispose();
22708
22675
  });
22709
- if (!this.context.supports.serviceWorkerApi) {
22676
+ if (!supportsServiceWorker()) {
22710
22677
  const fallbackInterceptor = createFallbackRequestListener(
22711
22678
  this.context,
22712
22679
  this.context.startOptions
@@ -22737,7 +22704,7 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
22737
22704
  this.context.isMockingEnabled = false;
22738
22705
  this.context.workerStoppedAt = Date.now();
22739
22706
  this.context.emitter.removeAllListeners();
22740
- if (this.context.supports.serviceWorkerApi) {
22707
+ if (supportsServiceWorker()) {
22741
22708
  this.context.workerChannel.removeAllListeners("RESPONSE");
22742
22709
  window.clearInterval(this.context.keepAliveInterval);
22743
22710
  }
@@ -22754,29 +22721,13 @@ Please consider using a custom "serviceWorker.url" option to point to the actual
22754
22721
  })();
22755
22722
  /*! Bundled license information:
22756
22723
 
22757
- @bundled-es-modules/statuses/index-esm.js:
22758
- (*! Bundled license information:
22759
-
22760
- statuses/index.js:
22761
- (*!
22762
- * statuses
22763
- * Copyright(c) 2014 Jonathan Ong
22764
- * Copyright(c) 2016 Douglas Christopher Wilson
22765
- * MIT Licensed
22766
- *)
22767
- *)
22768
-
22769
- @bundled-es-modules/cookie/index-esm.js:
22770
- (*! Bundled license information:
22771
-
22772
- cookie/index.js:
22773
- (*!
22774
- * cookie
22775
- * Copyright(c) 2012-2014 Roman Shtylman
22776
- * Copyright(c) 2015 Douglas Christopher Wilson
22777
- * MIT Licensed
22778
- *)
22779
- *)
22724
+ statuses/index.js:
22725
+ (*!
22726
+ * statuses
22727
+ * Copyright(c) 2014 Jonathan Ong
22728
+ * Copyright(c) 2016 Douglas Christopher Wilson
22729
+ * MIT Licensed
22730
+ *)
22780
22731
 
22781
22732
  tough-cookie/dist/index.js:
22782
22733
  (*!