@ai-sdk/provider-utils 1.0.11 → 1.0.13
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/dist/index.d.mts +20 -16
- package/dist/index.d.ts +20 -16
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/test/dist/index.js +34 -34
- package/test/dist/index.js.map +1 -1
- package/test/dist/index.mjs +34 -34
- package/test/dist/index.mjs.map +1 -1
package/test/dist/index.js
CHANGED
@@ -209,7 +209,7 @@ invariant.as = (ErrorConstructor, predicate, message3, ...positionals) => {
|
|
209
209
|
}
|
210
210
|
};
|
211
211
|
|
212
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
212
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/devUtils.mjs
|
213
213
|
var LIBRARY_PREFIX = "[MSW]";
|
214
214
|
function formatMessage(message3, ...positionals) {
|
215
215
|
const interpolatedMessage = format(message3, ...positionals);
|
@@ -233,7 +233,7 @@ var InternalError = class extends Error {
|
|
233
233
|
}
|
234
234
|
};
|
235
235
|
|
236
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
236
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/checkGlobals.mjs
|
237
237
|
function checkGlobals() {
|
238
238
|
invariant(
|
239
239
|
typeof URL !== "undefined",
|
@@ -408,7 +408,7 @@ var _Emitter = class {
|
|
408
408
|
var Emitter = _Emitter;
|
409
409
|
Emitter.defaultMaxListeners = 10;
|
410
410
|
|
411
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
411
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/pipeEvents.mjs
|
412
412
|
function pipeEvents(source, destination) {
|
413
413
|
const rawEmit = source.emit;
|
414
414
|
if (rawEmit._isPiped) {
|
@@ -422,14 +422,14 @@ function pipeEvents(source, destination) {
|
|
422
422
|
source.emit = sourceEmit;
|
423
423
|
}
|
424
424
|
|
425
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
425
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/toReadonlyArray.mjs
|
426
426
|
function toReadonlyArray(source) {
|
427
427
|
const clone = [...source];
|
428
428
|
Object.freeze(clone);
|
429
429
|
return clone;
|
430
430
|
}
|
431
431
|
|
432
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
432
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/Disposable.mjs
|
433
433
|
var Disposable = class {
|
434
434
|
constructor() {
|
435
435
|
__publicField(this, "subscriptions", []);
|
@@ -442,7 +442,7 @@ var Disposable = class {
|
|
442
442
|
}
|
443
443
|
};
|
444
444
|
|
445
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
445
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/SetupApi.mjs
|
446
446
|
var InMemoryHandlersController = class {
|
447
447
|
constructor(initialHandlers) {
|
448
448
|
__publicField(this, "handlers");
|
@@ -520,7 +520,7 @@ var SetupApi = class extends Disposable {
|
|
520
520
|
}
|
521
521
|
};
|
522
522
|
|
523
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
523
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/getCallFrame.mjs
|
524
524
|
var SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/;
|
525
525
|
var BUILD_FRAME = /(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/;
|
526
526
|
function getCallFrame(error3) {
|
@@ -539,7 +539,7 @@ function getCallFrame(error3) {
|
|
539
539
|
return declarationPath;
|
540
540
|
}
|
541
541
|
|
542
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
542
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/isIterable.mjs
|
543
543
|
function isIterable(fn) {
|
544
544
|
if (!fn) {
|
545
545
|
return false;
|
@@ -547,7 +547,7 @@ function isIterable(fn) {
|
|
547
547
|
return typeof fn[Symbol.iterator] == "function";
|
548
548
|
}
|
549
549
|
|
550
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
550
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/handlers/RequestHandler.mjs
|
551
551
|
var _RequestHandler = class _RequestHandler {
|
552
552
|
constructor(args) {
|
553
553
|
__publicField(this, "info");
|
@@ -702,12 +702,12 @@ var _RequestHandler = class _RequestHandler {
|
|
702
702
|
__publicField(_RequestHandler, "cache", /* @__PURE__ */ new WeakMap());
|
703
703
|
var RequestHandler = _RequestHandler;
|
704
704
|
|
705
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
705
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/isStringEqual.mjs
|
706
706
|
function isStringEqual(actual, expected) {
|
707
707
|
return actual.toLowerCase() === expected.toLowerCase();
|
708
708
|
}
|
709
709
|
|
710
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
710
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.mjs
|
711
711
|
function getStatusCodeColor(status) {
|
712
712
|
if (status < 300) {
|
713
713
|
return "#69AB32";
|
@@ -718,13 +718,13 @@ function getStatusCodeColor(status) {
|
|
718
718
|
return "#E95F5D";
|
719
719
|
}
|
720
720
|
|
721
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
721
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/logging/getTimestamp.mjs
|
722
722
|
function getTimestamp() {
|
723
723
|
const now = /* @__PURE__ */ new Date();
|
724
724
|
return [now.getHours(), now.getMinutes(), now.getSeconds()].map(String).map((chunk) => chunk.slice(0, 2)).map((chunk) => chunk.padStart(2, "0")).join(":");
|
725
725
|
}
|
726
726
|
|
727
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
727
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/logging/serializeRequest.mjs
|
728
728
|
async function serializeRequest(request2) {
|
729
729
|
const requestClone = request2.clone();
|
730
730
|
const requestText = await requestClone.text();
|
@@ -903,7 +903,7 @@ var require_statuses = __commonJS({
|
|
903
903
|
var import_statuses = __toESM2(require_statuses(), 1);
|
904
904
|
var source_default = import_statuses.default;
|
905
905
|
|
906
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
906
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/logging/serializeResponse.mjs
|
907
907
|
var { message } = source_default;
|
908
908
|
async function serializeResponse(response) {
|
909
909
|
const responseClone = response.clone();
|
@@ -1849,7 +1849,7 @@ function getCleanUrl(url, isAbsolute = true) {
|
|
1849
1849
|
return [isAbsolute && url.origin, url.pathname].filter(Boolean).join("");
|
1850
1850
|
}
|
1851
1851
|
|
1852
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1852
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/url/cleanUrl.mjs
|
1853
1853
|
var REDUNDANT_CHARACTERS_EXP = /[\?|#].*$/g;
|
1854
1854
|
function getSearchParams(path) {
|
1855
1855
|
return new URL(`/${path}`, "http://localhost").searchParams;
|
@@ -1861,12 +1861,12 @@ function cleanUrl(path) {
|
|
1861
1861
|
return path.replace(REDUNDANT_CHARACTERS_EXP, "");
|
1862
1862
|
}
|
1863
1863
|
|
1864
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1864
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.mjs
|
1865
1865
|
function isAbsoluteUrl(url) {
|
1866
1866
|
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
1867
1867
|
}
|
1868
1868
|
|
1869
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1869
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.mjs
|
1870
1870
|
function getAbsoluteUrl(path, baseUrl) {
|
1871
1871
|
if (isAbsoluteUrl(path)) {
|
1872
1872
|
return path;
|
@@ -1881,7 +1881,7 @@ function getAbsoluteUrl(path, baseUrl) {
|
|
1881
1881
|
) : path;
|
1882
1882
|
}
|
1883
1883
|
|
1884
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1884
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/matching/normalizePath.mjs
|
1885
1885
|
function normalizePath(path, baseUrl) {
|
1886
1886
|
if (path instanceof RegExp) {
|
1887
1887
|
return path;
|
@@ -1890,7 +1890,7 @@ function normalizePath(path, baseUrl) {
|
|
1890
1890
|
return cleanUrl(maybeAbsoluteUrl);
|
1891
1891
|
}
|
1892
1892
|
|
1893
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1893
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/matching/matchRequestUrl.mjs
|
1894
1894
|
function coercePath(path) {
|
1895
1895
|
return path.replace(
|
1896
1896
|
/([:a-zA-Z_-]*)(\*{1,2})+/g,
|
@@ -1915,7 +1915,7 @@ function matchRequestUrl(url, path, baseUrl) {
|
|
1915
1915
|
};
|
1916
1916
|
}
|
1917
1917
|
|
1918
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1918
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/request/toPublicUrl.mjs
|
1919
1919
|
function toPublicUrl(url) {
|
1920
1920
|
if (typeof location === "undefined") {
|
1921
1921
|
return url.toString();
|
@@ -2430,7 +2430,7 @@ Invalid value has been removed from localStorage to prevent subsequent failed pa
|
|
2430
2430
|
};
|
2431
2431
|
var store = new CookieStore();
|
2432
2432
|
|
2433
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
2433
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/request/getRequestCookies.mjs
|
2434
2434
|
function getAllDocumentCookies() {
|
2435
2435
|
return source_default2.parse(document.cookie);
|
2436
2436
|
}
|
@@ -2473,7 +2473,7 @@ function getAllRequestCookies(request2) {
|
|
2473
2473
|
};
|
2474
2474
|
}
|
2475
2475
|
|
2476
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
2476
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/handlers/HttpHandler.mjs
|
2477
2477
|
var HttpMethods = /* @__PURE__ */ ((HttpMethods2) => {
|
2478
2478
|
HttpMethods2["HEAD"] = "HEAD";
|
2479
2479
|
HttpMethods2["GET"] = "GET";
|
@@ -2563,7 +2563,7 @@ var HttpHandler = class extends RequestHandler {
|
|
2563
2563
|
}
|
2564
2564
|
};
|
2565
2565
|
|
2566
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
2566
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/http.mjs
|
2567
2567
|
function createHttpHandler(method) {
|
2568
2568
|
return (path, resolver, options = {}) => {
|
2569
2569
|
return new HttpHandler(method, path, resolver, options);
|
@@ -3006,7 +3006,7 @@ var until = async (promise) => {
|
|
3006
3006
|
}
|
3007
3007
|
};
|
3008
3008
|
|
3009
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3009
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/executeHandlers.mjs
|
3010
3010
|
var executeHandlers = async ({
|
3011
3011
|
request: request2,
|
3012
3012
|
requestId,
|
@@ -3034,7 +3034,7 @@ var executeHandlers = async ({
|
|
3034
3034
|
return null;
|
3035
3035
|
};
|
3036
3036
|
|
3037
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3037
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/request/onUnhandledRequest.mjs
|
3038
3038
|
async function onUnhandledRequest(request2, strategy = "warn") {
|
3039
3039
|
const url = new URL(request2.url);
|
3040
3040
|
const publicUrl = toPublicUrl(url) + url.search;
|
@@ -3082,13 +3082,13 @@ Read more: https://mswjs.io/docs/getting-started/mocks`;
|
|
3082
3082
|
applyStrategy(strategy);
|
3083
3083
|
}
|
3084
3084
|
|
3085
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3085
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/request/readResponseCookies.mjs
|
3086
3086
|
function readResponseCookies(request2, response) {
|
3087
3087
|
store.add({ ...request2, url: request2.url.toString() }, response);
|
3088
3088
|
store.persist();
|
3089
3089
|
}
|
3090
3090
|
|
3091
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3091
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/handleRequest.mjs
|
3092
3092
|
async function handleRequest(request2, requestId, handlers, options, emitter, handleRequestOptions) {
|
3093
3093
|
var _a3, _b2, _c2, _d, _e, _f;
|
3094
3094
|
emitter.emit("request:start", { request: request2, requestId });
|
@@ -3144,7 +3144,7 @@ async function handleRequest(request2, requestId, handlers, options, emitter, ha
|
|
3144
3144
|
return transformedResponse;
|
3145
3145
|
}
|
3146
3146
|
|
3147
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3147
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/HttpResponse/decorators.mjs
|
3148
3148
|
var { message: message2 } = source_default;
|
3149
3149
|
function normalizeResponseInit(init = {}) {
|
3150
3150
|
const status = (init == null ? void 0 : init.status) || 200;
|
@@ -3176,7 +3176,7 @@ function decorateResponse(response, init) {
|
|
3176
3176
|
return response;
|
3177
3177
|
}
|
3178
3178
|
|
3179
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3179
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/HttpResponse.mjs
|
3180
3180
|
var HttpResponse = class _HttpResponse extends Response {
|
3181
3181
|
constructor(body, init) {
|
3182
3182
|
const responseInit = normalizeResponseInit(init);
|
@@ -3267,10 +3267,10 @@ var HttpResponse = class _HttpResponse extends Response {
|
|
3267
3267
|
}
|
3268
3268
|
};
|
3269
3269
|
|
3270
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3270
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/index.mjs
|
3271
3271
|
checkGlobals();
|
3272
3272
|
|
3273
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3273
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/node/index.mjs
|
3274
3274
|
var import_node_async_hooks = require("async_hooks");
|
3275
3275
|
|
3276
3276
|
// ../../node_modules/.pnpm/@open-draft+deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.mjs
|
@@ -5145,12 +5145,12 @@ function createNetworkError(cause) {
|
|
5145
5145
|
});
|
5146
5146
|
}
|
5147
5147
|
|
5148
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
5148
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/isObject.mjs
|
5149
5149
|
function isObject2(value) {
|
5150
5150
|
return value != null && typeof value === "object" && !Array.isArray(value);
|
5151
5151
|
}
|
5152
5152
|
|
5153
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
5153
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/mergeRight.mjs
|
5154
5154
|
function mergeRight(left, right) {
|
5155
5155
|
return Object.entries(right).reduce(
|
5156
5156
|
(result, [key, rightValue]) => {
|
@@ -5170,7 +5170,7 @@ function mergeRight(left, right) {
|
|
5170
5170
|
);
|
5171
5171
|
}
|
5172
5172
|
|
5173
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
5173
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/node/index.mjs
|
5174
5174
|
var DEFAULT_LISTEN_OPTIONS = {
|
5175
5175
|
onUnhandledRequest: "warn"
|
5176
5176
|
};
|