@ai-sdk/provider-utils 3.0.0-canary.1 → 3.0.0-canary.11
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/CHANGELOG.md +100 -0
- package/dist/index.d.mts +44 -21
- package/dist/index.d.ts +44 -21
- package/dist/index.js +105 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +102 -18
- package/dist/index.mjs.map +1 -1
- package/{test/dist → dist/test}/index.d.mts +4 -1
- package/{test/dist → dist/test}/index.d.ts +4 -1
- package/{test/dist → dist/test}/index.js +63 -39
- package/dist/test/index.js.map +1 -0
- package/{test/dist → dist/test}/index.mjs +62 -39
- package/dist/test/index.mjs.map +1 -0
- package/package.json +15 -14
- package/test.d.ts +1 -0
- package/test/dist/index.js.map +0 -1
- package/test/dist/index.mjs.map +0 -1
- /package/{test/dist → dist/test}/chunk-D6YTI3O5.mjs +0 -0
- /package/{test/dist → dist/test}/chunk-D6YTI3O5.mjs.map +0 -0
- /package/{test/dist → dist/test}/graphql-6JDEV3ML.mjs +0 -0
- /package/{test/dist → dist/test}/graphql-6JDEV3ML.mjs.map +0 -0
@@ -62,6 +62,12 @@ async function convertResponseStreamToArray(response) {
|
|
62
62
|
);
|
63
63
|
}
|
64
64
|
|
65
|
+
// src/test/is-node-version.ts
|
66
|
+
function isNodeVersion(version) {
|
67
|
+
const nodeMajorVersion = parseInt(process.version.slice(1).split(".")[0], 10);
|
68
|
+
return nodeMajorVersion === version;
|
69
|
+
}
|
70
|
+
|
65
71
|
// src/test/mock-id.ts
|
66
72
|
function mockId({
|
67
73
|
prefix = "id"
|
@@ -154,7 +160,7 @@ invariant.as = (ErrorConstructor, predicate, message3, ...positionals) => {
|
|
154
160
|
}
|
155
161
|
};
|
156
162
|
|
157
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
163
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/devUtils.mjs
|
158
164
|
var LIBRARY_PREFIX = "[MSW]";
|
159
165
|
function formatMessage(message3, ...positionals) {
|
160
166
|
const interpolatedMessage = format(message3, ...positionals);
|
@@ -178,7 +184,7 @@ var InternalError = class extends Error {
|
|
178
184
|
}
|
179
185
|
};
|
180
186
|
|
181
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
187
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/checkGlobals.mjs
|
182
188
|
function checkGlobals() {
|
183
189
|
invariant(
|
184
190
|
typeof URL !== "undefined",
|
@@ -353,7 +359,7 @@ var _Emitter = class {
|
|
353
359
|
var Emitter = _Emitter;
|
354
360
|
Emitter.defaultMaxListeners = 10;
|
355
361
|
|
356
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
362
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/pipeEvents.mjs
|
357
363
|
function pipeEvents(source, destination) {
|
358
364
|
const rawEmit = source.emit;
|
359
365
|
if (rawEmit._isPiped) {
|
@@ -367,14 +373,14 @@ function pipeEvents(source, destination) {
|
|
367
373
|
source.emit = sourceEmit;
|
368
374
|
}
|
369
375
|
|
370
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
376
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/toReadonlyArray.mjs
|
371
377
|
function toReadonlyArray(source) {
|
372
378
|
const clone = [...source];
|
373
379
|
Object.freeze(clone);
|
374
380
|
return clone;
|
375
381
|
}
|
376
382
|
|
377
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
383
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/Disposable.mjs
|
378
384
|
var Disposable = class {
|
379
385
|
constructor() {
|
380
386
|
__publicField(this, "subscriptions", []);
|
@@ -387,7 +393,7 @@ var Disposable = class {
|
|
387
393
|
}
|
388
394
|
};
|
389
395
|
|
390
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
396
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/SetupApi.mjs
|
391
397
|
var InMemoryHandlersController = class {
|
392
398
|
constructor(initialHandlers) {
|
393
399
|
__publicField(this, "handlers");
|
@@ -467,7 +473,7 @@ var SetupApi = class extends Disposable {
|
|
467
473
|
}
|
468
474
|
};
|
469
475
|
|
470
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
476
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/getCallFrame.mjs
|
471
477
|
var SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/;
|
472
478
|
var BUILD_FRAME = /(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/;
|
473
479
|
function getCallFrame(error3) {
|
@@ -486,7 +492,7 @@ function getCallFrame(error3) {
|
|
486
492
|
return declarationPath;
|
487
493
|
}
|
488
494
|
|
489
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
495
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isIterable.mjs
|
490
496
|
function isIterable(fn) {
|
491
497
|
if (!fn) {
|
492
498
|
return false;
|
@@ -494,7 +500,7 @@ function isIterable(fn) {
|
|
494
500
|
return Reflect.has(fn, Symbol.iterator) || Reflect.has(fn, Symbol.asyncIterator);
|
495
501
|
}
|
496
502
|
|
497
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
503
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/handlers/RequestHandler.mjs
|
498
504
|
var _RequestHandler = class _RequestHandler {
|
499
505
|
constructor(args) {
|
500
506
|
__publicField(this, "__kind");
|
@@ -646,12 +652,12 @@ var _RequestHandler = class _RequestHandler {
|
|
646
652
|
__publicField(_RequestHandler, "cache", /* @__PURE__ */ new WeakMap());
|
647
653
|
var RequestHandler = _RequestHandler;
|
648
654
|
|
649
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
655
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isStringEqual.mjs
|
650
656
|
function isStringEqual(actual, expected) {
|
651
657
|
return actual.toLowerCase() === expected.toLowerCase();
|
652
658
|
}
|
653
659
|
|
654
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
660
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.mjs
|
655
661
|
function getStatusCodeColor(status) {
|
656
662
|
if (status < 300) {
|
657
663
|
return "#69AB32";
|
@@ -662,7 +668,7 @@ function getStatusCodeColor(status) {
|
|
662
668
|
return "#E95F5D";
|
663
669
|
}
|
664
670
|
|
665
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
671
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/getTimestamp.mjs
|
666
672
|
function getTimestamp(options) {
|
667
673
|
const now = /* @__PURE__ */ new Date();
|
668
674
|
const timestamp = `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, "0")}:${now.getSeconds().toString().padStart(2, "0")}`;
|
@@ -672,7 +678,7 @@ function getTimestamp(options) {
|
|
672
678
|
return timestamp;
|
673
679
|
}
|
674
680
|
|
675
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
681
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/serializeRequest.mjs
|
676
682
|
async function serializeRequest(request) {
|
677
683
|
const requestClone = request.clone();
|
678
684
|
const requestText = await requestClone.text();
|
@@ -851,7 +857,7 @@ var require_statuses = __commonJS({
|
|
851
857
|
var import_statuses = __toESM(require_statuses(), 1);
|
852
858
|
var source_default = import_statuses.default;
|
853
859
|
|
854
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
860
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/logging/serializeResponse.mjs
|
855
861
|
var { message } = source_default;
|
856
862
|
async function serializeResponse(response) {
|
857
863
|
const responseClone = response.clone();
|
@@ -1761,7 +1767,7 @@ function getCleanUrl(url, isAbsolute = true) {
|
|
1761
1767
|
return [isAbsolute && url.origin, url.pathname].filter(Boolean).join("");
|
1762
1768
|
}
|
1763
1769
|
|
1764
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
1770
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/url/cleanUrl.mjs
|
1765
1771
|
var REDUNDANT_CHARACTERS_EXP = /[\?|#].*$/g;
|
1766
1772
|
function getSearchParams(path) {
|
1767
1773
|
return new URL(`/${path}`, "http://localhost").searchParams;
|
@@ -1773,12 +1779,12 @@ function cleanUrl(path) {
|
|
1773
1779
|
return path.replace(REDUNDANT_CHARACTERS_EXP, "");
|
1774
1780
|
}
|
1775
1781
|
|
1776
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
1782
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.mjs
|
1777
1783
|
function isAbsoluteUrl(url) {
|
1778
1784
|
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
1779
1785
|
}
|
1780
1786
|
|
1781
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
1787
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.mjs
|
1782
1788
|
function getAbsoluteUrl(path, baseUrl) {
|
1783
1789
|
if (isAbsoluteUrl(path)) {
|
1784
1790
|
return path;
|
@@ -1793,7 +1799,7 @@ function getAbsoluteUrl(path, baseUrl) {
|
|
1793
1799
|
) : path;
|
1794
1800
|
}
|
1795
1801
|
|
1796
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
1802
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/matching/normalizePath.mjs
|
1797
1803
|
function normalizePath(path, baseUrl) {
|
1798
1804
|
if (path instanceof RegExp) {
|
1799
1805
|
return path;
|
@@ -1802,7 +1808,7 @@ function normalizePath(path, baseUrl) {
|
|
1802
1808
|
return cleanUrl(maybeAbsoluteUrl);
|
1803
1809
|
}
|
1804
1810
|
|
1805
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
1811
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/matching/matchRequestUrl.mjs
|
1806
1812
|
function coercePath(path) {
|
1807
1813
|
return path.replace(
|
1808
1814
|
/([:a-zA-Z_-]*)(\*{1,2})+/g,
|
@@ -1827,7 +1833,7 @@ function matchRequestUrl(url, path, baseUrl) {
|
|
1827
1833
|
};
|
1828
1834
|
}
|
1829
1835
|
|
1830
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
1836
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/request/toPublicUrl.mjs
|
1831
1837
|
function toPublicUrl(url) {
|
1832
1838
|
if (typeof location === "undefined") {
|
1833
1839
|
return url.toString();
|
@@ -13877,7 +13883,7 @@ var require_cookie2 = __commonJS3({
|
|
13877
13883
|
var import_tough_cookie = __toESM3(require_cookie2(), 1);
|
13878
13884
|
var source_default3 = import_tough_cookie.default;
|
13879
13885
|
|
13880
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
13886
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/cookieStore.mjs
|
13881
13887
|
var { Cookie, CookieJar, Store, MemoryCookieStore, domainMatch, pathMatch } = source_default3;
|
13882
13888
|
var WebStorageCookieStore = class extends Store {
|
13883
13889
|
constructor() {
|
@@ -14029,7 +14035,7 @@ var WebStorageCookieStore = class extends Store {
|
|
14029
14035
|
var store = isNodeProcess() ? new MemoryCookieStore() : new WebStorageCookieStore();
|
14030
14036
|
var cookieStore = new CookieJar(store);
|
14031
14037
|
|
14032
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14038
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/request/getRequestCookies.mjs
|
14033
14039
|
function parseCookies(input) {
|
14034
14040
|
const parsedCookies = source_default2.parse(input);
|
14035
14041
|
const cookies = {};
|
@@ -14084,7 +14090,7 @@ function getAllRequestCookies(request) {
|
|
14084
14090
|
};
|
14085
14091
|
}
|
14086
14092
|
|
14087
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14093
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/handlers/HttpHandler.mjs
|
14088
14094
|
var HttpMethods = /* @__PURE__ */ ((HttpMethods2) => {
|
14089
14095
|
HttpMethods2["HEAD"] = "HEAD";
|
14090
14096
|
HttpMethods2["GET"] = "GET";
|
@@ -14174,7 +14180,7 @@ var HttpHandler = class extends RequestHandler {
|
|
14174
14180
|
}
|
14175
14181
|
};
|
14176
14182
|
|
14177
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14183
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/http.mjs
|
14178
14184
|
function createHttpHandler(method) {
|
14179
14185
|
return (path, resolver, options = {}) => {
|
14180
14186
|
return new HttpHandler(method, path, resolver, options);
|
@@ -14605,7 +14611,7 @@ var Headers2 = class _Headers {
|
|
14605
14611
|
}
|
14606
14612
|
};
|
14607
14613
|
|
14608
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14614
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/handlers/WebSocketHandler.mjs
|
14609
14615
|
var kEmitter = Symbol("kEmitter");
|
14610
14616
|
var kDispatchEvent = Symbol("kDispatchEvent");
|
14611
14617
|
var kSender = Symbol("kSender");
|
@@ -14779,7 +14785,7 @@ var until = async (promise) => {
|
|
14779
14785
|
}
|
14780
14786
|
};
|
14781
14787
|
|
14782
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14788
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/executeHandlers.mjs
|
14783
14789
|
var executeHandlers = async ({
|
14784
14790
|
request,
|
14785
14791
|
requestId,
|
@@ -14807,7 +14813,7 @@ var executeHandlers = async ({
|
|
14807
14813
|
return null;
|
14808
14814
|
};
|
14809
14815
|
|
14810
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14816
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/request/onUnhandledRequest.mjs
|
14811
14817
|
async function onUnhandledRequest(request, strategy = "warn") {
|
14812
14818
|
const url = new URL(request.url);
|
14813
14819
|
const publicUrl = toPublicUrl(url) + url.search;
|
@@ -14859,7 +14865,7 @@ Read more: https://mswjs.io/docs/getting-started/mocks`;
|
|
14859
14865
|
applyStrategy(strategy);
|
14860
14866
|
}
|
14861
14867
|
|
14862
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14868
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/HttpResponse/decorators.mjs
|
14863
14869
|
var { message: message2 } = source_default;
|
14864
14870
|
var kSetCookie = Symbol("kSetCookie");
|
14865
14871
|
function normalizeResponseInit(init = {}) {
|
@@ -14900,7 +14906,7 @@ function decorateResponse(response, init) {
|
|
14900
14906
|
return response;
|
14901
14907
|
}
|
14902
14908
|
|
14903
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14909
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/request/storeResponseCookies.mjs
|
14904
14910
|
function storeResponseCookies(request, response) {
|
14905
14911
|
const responseCookies = Reflect.get(response, kSetCookie);
|
14906
14912
|
if (responseCookies) {
|
@@ -14908,7 +14914,7 @@ function storeResponseCookies(request, response) {
|
|
14908
14914
|
}
|
14909
14915
|
}
|
14910
14916
|
|
14911
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14917
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/handleRequest.mjs
|
14912
14918
|
async function handleRequest(request, requestId, handlers, options, emitter, handleRequestOptions) {
|
14913
14919
|
var _a4, _b2, _c2, _d, _e, _f;
|
14914
14920
|
emitter.emit("request:start", { request, requestId });
|
@@ -14959,7 +14965,7 @@ async function handleRequest(request, requestId, handlers, options, emitter, han
|
|
14959
14965
|
return response;
|
14960
14966
|
}
|
14961
14967
|
|
14962
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
14968
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/HttpResponse.mjs
|
14963
14969
|
var HttpResponse = class _HttpResponse extends Response {
|
14964
14970
|
constructor(body, init) {
|
14965
14971
|
const responseInit = normalizeResponseInit(init);
|
@@ -15066,10 +15072,10 @@ var HttpResponse = class _HttpResponse extends Response {
|
|
15066
15072
|
}
|
15067
15073
|
};
|
15068
15074
|
|
15069
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
15075
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/index.mjs
|
15070
15076
|
checkGlobals();
|
15071
15077
|
|
15072
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
15078
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/node/index.mjs
|
15073
15079
|
import { AsyncLocalStorage } from "async_hooks";
|
15074
15080
|
|
15075
15081
|
// ../../node_modules/.pnpm/@mswjs+interceptors@0.37.5/node_modules/@mswjs/interceptors/lib/node/chunk-5KMS5CTP.mjs
|
@@ -17358,12 +17364,12 @@ var _FetchInterceptor = class extends Interceptor {
|
|
17358
17364
|
var FetchInterceptor = _FetchInterceptor;
|
17359
17365
|
FetchInterceptor.symbol = Symbol("fetch");
|
17360
17366
|
|
17361
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
17367
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isObject.mjs
|
17362
17368
|
function isObject2(value) {
|
17363
17369
|
return value != null && typeof value === "object" && !Array.isArray(value);
|
17364
17370
|
}
|
17365
17371
|
|
17366
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
17372
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/mergeRight.mjs
|
17367
17373
|
function mergeRight(left, right) {
|
17368
17374
|
return Object.entries(right).reduce(
|
17369
17375
|
(result, [key, rightValue]) => {
|
@@ -18228,17 +18234,17 @@ var _WebSocketInterceptor = class extends Interceptor2 {
|
|
18228
18234
|
var WebSocketInterceptor = _WebSocketInterceptor;
|
18229
18235
|
WebSocketInterceptor.symbol = Symbol("websocket");
|
18230
18236
|
|
18231
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
18237
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/ws/webSocketInterceptor.mjs
|
18232
18238
|
var webSocketInterceptor = new WebSocketInterceptor();
|
18233
18239
|
|
18234
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
18240
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/utils/internal/isHandlerKind.mjs
|
18235
18241
|
function isHandlerKind(kind) {
|
18236
18242
|
return (input) => {
|
18237
18243
|
return input != null && typeof input === "object" && "__kind" in input && input.__kind === kind;
|
18238
18244
|
};
|
18239
18245
|
}
|
18240
18246
|
|
18241
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
18247
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/core/ws/handleWebSocketEvent.mjs
|
18242
18248
|
function handleWebSocketEvent(options) {
|
18243
18249
|
webSocketInterceptor.on("connection", async (connection) => {
|
18244
18250
|
const handlers = options.getHandlers();
|
@@ -18286,7 +18292,7 @@ function handleWebSocketEvent(options) {
|
|
18286
18292
|
});
|
18287
18293
|
}
|
18288
18294
|
|
18289
|
-
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.
|
18295
|
+
// ../../node_modules/.pnpm/msw@2.7.0_@types+node@20.17.24_typescript@5.8.3/node_modules/msw/lib/node/index.mjs
|
18290
18296
|
var DEFAULT_LISTEN_OPTIONS = {
|
18291
18297
|
onUnhandledRequest: "warn"
|
18292
18298
|
};
|
@@ -18448,9 +18454,25 @@ var TestServerCall = class {
|
|
18448
18454
|
constructor(request) {
|
18449
18455
|
this.request = request;
|
18450
18456
|
}
|
18457
|
+
// TODO: rename to requestBodyJson
|
18451
18458
|
get requestBody() {
|
18452
18459
|
return this.request.text().then(JSON.parse);
|
18453
18460
|
}
|
18461
|
+
get requestBodyMultipart() {
|
18462
|
+
var _a4;
|
18463
|
+
return ((_a4 = this.request.headers.get("content-type")) == null ? void 0 : _a4.startsWith(
|
18464
|
+
"multipart/form-data"
|
18465
|
+
)) ? (
|
18466
|
+
// For multipart/form-data, return the form data entries as an object
|
18467
|
+
this.request.formData().then((formData) => {
|
18468
|
+
const entries = {};
|
18469
|
+
formData.forEach((value, key) => {
|
18470
|
+
entries[key] = value;
|
18471
|
+
});
|
18472
|
+
return entries;
|
18473
|
+
})
|
18474
|
+
) : null;
|
18475
|
+
}
|
18454
18476
|
get requestCredentials() {
|
18455
18477
|
return this.request.credentials;
|
18456
18478
|
}
|
@@ -18593,6 +18615,7 @@ export {
|
|
18593
18615
|
convertReadableStreamToArray,
|
18594
18616
|
convertResponseStreamToArray,
|
18595
18617
|
createTestServer,
|
18618
|
+
isNodeVersion,
|
18596
18619
|
mockId
|
18597
18620
|
};
|
18598
18621
|
/*! Bundled license information:
|