@ai-sdk/provider-utils 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +2 -2
- 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.mjs
CHANGED
@@ -166,7 +166,7 @@ invariant.as = (ErrorConstructor, predicate, message3, ...positionals) => {
|
|
166
166
|
}
|
167
167
|
};
|
168
168
|
|
169
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
169
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/devUtils.mjs
|
170
170
|
var LIBRARY_PREFIX = "[MSW]";
|
171
171
|
function formatMessage(message3, ...positionals) {
|
172
172
|
const interpolatedMessage = format(message3, ...positionals);
|
@@ -190,7 +190,7 @@ var InternalError = class extends Error {
|
|
190
190
|
}
|
191
191
|
};
|
192
192
|
|
193
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
193
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/checkGlobals.mjs
|
194
194
|
function checkGlobals() {
|
195
195
|
invariant(
|
196
196
|
typeof URL !== "undefined",
|
@@ -365,7 +365,7 @@ var _Emitter = class {
|
|
365
365
|
var Emitter = _Emitter;
|
366
366
|
Emitter.defaultMaxListeners = 10;
|
367
367
|
|
368
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
368
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/pipeEvents.mjs
|
369
369
|
function pipeEvents(source, destination) {
|
370
370
|
const rawEmit = source.emit;
|
371
371
|
if (rawEmit._isPiped) {
|
@@ -379,14 +379,14 @@ function pipeEvents(source, destination) {
|
|
379
379
|
source.emit = sourceEmit;
|
380
380
|
}
|
381
381
|
|
382
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
382
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/toReadonlyArray.mjs
|
383
383
|
function toReadonlyArray(source) {
|
384
384
|
const clone = [...source];
|
385
385
|
Object.freeze(clone);
|
386
386
|
return clone;
|
387
387
|
}
|
388
388
|
|
389
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
389
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/Disposable.mjs
|
390
390
|
var Disposable = class {
|
391
391
|
constructor() {
|
392
392
|
__publicField(this, "subscriptions", []);
|
@@ -399,7 +399,7 @@ var Disposable = class {
|
|
399
399
|
}
|
400
400
|
};
|
401
401
|
|
402
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
402
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/SetupApi.mjs
|
403
403
|
var InMemoryHandlersController = class {
|
404
404
|
constructor(initialHandlers) {
|
405
405
|
__publicField(this, "handlers");
|
@@ -477,7 +477,7 @@ var SetupApi = class extends Disposable {
|
|
477
477
|
}
|
478
478
|
};
|
479
479
|
|
480
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
480
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/getCallFrame.mjs
|
481
481
|
var SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/;
|
482
482
|
var BUILD_FRAME = /(node_modules)?[\/\\]lib[\/\\](core|browser|node|native|iife)[\/\\]|^[^\/\\]*$/;
|
483
483
|
function getCallFrame(error3) {
|
@@ -496,7 +496,7 @@ function getCallFrame(error3) {
|
|
496
496
|
return declarationPath;
|
497
497
|
}
|
498
498
|
|
499
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
499
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/isIterable.mjs
|
500
500
|
function isIterable(fn) {
|
501
501
|
if (!fn) {
|
502
502
|
return false;
|
@@ -504,7 +504,7 @@ function isIterable(fn) {
|
|
504
504
|
return typeof fn[Symbol.iterator] == "function";
|
505
505
|
}
|
506
506
|
|
507
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
507
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/handlers/RequestHandler.mjs
|
508
508
|
var _RequestHandler = class _RequestHandler {
|
509
509
|
constructor(args) {
|
510
510
|
__publicField(this, "info");
|
@@ -659,12 +659,12 @@ var _RequestHandler = class _RequestHandler {
|
|
659
659
|
__publicField(_RequestHandler, "cache", /* @__PURE__ */ new WeakMap());
|
660
660
|
var RequestHandler = _RequestHandler;
|
661
661
|
|
662
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
662
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/isStringEqual.mjs
|
663
663
|
function isStringEqual(actual, expected) {
|
664
664
|
return actual.toLowerCase() === expected.toLowerCase();
|
665
665
|
}
|
666
666
|
|
667
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
667
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/logging/getStatusCodeColor.mjs
|
668
668
|
function getStatusCodeColor(status) {
|
669
669
|
if (status < 300) {
|
670
670
|
return "#69AB32";
|
@@ -675,13 +675,13 @@ function getStatusCodeColor(status) {
|
|
675
675
|
return "#E95F5D";
|
676
676
|
}
|
677
677
|
|
678
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
678
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/logging/getTimestamp.mjs
|
679
679
|
function getTimestamp() {
|
680
680
|
const now = /* @__PURE__ */ new Date();
|
681
681
|
return [now.getHours(), now.getMinutes(), now.getSeconds()].map(String).map((chunk) => chunk.slice(0, 2)).map((chunk) => chunk.padStart(2, "0")).join(":");
|
682
682
|
}
|
683
683
|
|
684
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
684
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/logging/serializeRequest.mjs
|
685
685
|
async function serializeRequest(request2) {
|
686
686
|
const requestClone = request2.clone();
|
687
687
|
const requestText = await requestClone.text();
|
@@ -860,7 +860,7 @@ var require_statuses = __commonJS({
|
|
860
860
|
var import_statuses = __toESM(require_statuses(), 1);
|
861
861
|
var source_default = import_statuses.default;
|
862
862
|
|
863
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
863
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/logging/serializeResponse.mjs
|
864
864
|
var { message } = source_default;
|
865
865
|
async function serializeResponse(response) {
|
866
866
|
const responseClone = response.clone();
|
@@ -1806,7 +1806,7 @@ function getCleanUrl(url, isAbsolute = true) {
|
|
1806
1806
|
return [isAbsolute && url.origin, url.pathname].filter(Boolean).join("");
|
1807
1807
|
}
|
1808
1808
|
|
1809
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1809
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/url/cleanUrl.mjs
|
1810
1810
|
var REDUNDANT_CHARACTERS_EXP = /[\?|#].*$/g;
|
1811
1811
|
function getSearchParams(path) {
|
1812
1812
|
return new URL(`/${path}`, "http://localhost").searchParams;
|
@@ -1818,12 +1818,12 @@ function cleanUrl(path) {
|
|
1818
1818
|
return path.replace(REDUNDANT_CHARACTERS_EXP, "");
|
1819
1819
|
}
|
1820
1820
|
|
1821
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1821
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/url/isAbsoluteUrl.mjs
|
1822
1822
|
function isAbsoluteUrl(url) {
|
1823
1823
|
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
1824
1824
|
}
|
1825
1825
|
|
1826
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1826
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/url/getAbsoluteUrl.mjs
|
1827
1827
|
function getAbsoluteUrl(path, baseUrl) {
|
1828
1828
|
if (isAbsoluteUrl(path)) {
|
1829
1829
|
return path;
|
@@ -1838,7 +1838,7 @@ function getAbsoluteUrl(path, baseUrl) {
|
|
1838
1838
|
) : path;
|
1839
1839
|
}
|
1840
1840
|
|
1841
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1841
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/matching/normalizePath.mjs
|
1842
1842
|
function normalizePath(path, baseUrl) {
|
1843
1843
|
if (path instanceof RegExp) {
|
1844
1844
|
return path;
|
@@ -1847,7 +1847,7 @@ function normalizePath(path, baseUrl) {
|
|
1847
1847
|
return cleanUrl(maybeAbsoluteUrl);
|
1848
1848
|
}
|
1849
1849
|
|
1850
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1850
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/matching/matchRequestUrl.mjs
|
1851
1851
|
function coercePath(path) {
|
1852
1852
|
return path.replace(
|
1853
1853
|
/([:a-zA-Z_-]*)(\*{1,2})+/g,
|
@@ -1872,7 +1872,7 @@ function matchRequestUrl(url, path, baseUrl) {
|
|
1872
1872
|
};
|
1873
1873
|
}
|
1874
1874
|
|
1875
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
1875
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/request/toPublicUrl.mjs
|
1876
1876
|
function toPublicUrl(url) {
|
1877
1877
|
if (typeof location === "undefined") {
|
1878
1878
|
return url.toString();
|
@@ -2387,7 +2387,7 @@ Invalid value has been removed from localStorage to prevent subsequent failed pa
|
|
2387
2387
|
};
|
2388
2388
|
var store = new CookieStore();
|
2389
2389
|
|
2390
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
2390
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/request/getRequestCookies.mjs
|
2391
2391
|
function getAllDocumentCookies() {
|
2392
2392
|
return source_default2.parse(document.cookie);
|
2393
2393
|
}
|
@@ -2430,7 +2430,7 @@ function getAllRequestCookies(request2) {
|
|
2430
2430
|
};
|
2431
2431
|
}
|
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/handlers/HttpHandler.mjs
|
2434
2434
|
var HttpMethods = /* @__PURE__ */ ((HttpMethods2) => {
|
2435
2435
|
HttpMethods2["HEAD"] = "HEAD";
|
2436
2436
|
HttpMethods2["GET"] = "GET";
|
@@ -2520,7 +2520,7 @@ var HttpHandler = class extends RequestHandler {
|
|
2520
2520
|
}
|
2521
2521
|
};
|
2522
2522
|
|
2523
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
2523
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/http.mjs
|
2524
2524
|
function createHttpHandler(method) {
|
2525
2525
|
return (path, resolver, options = {}) => {
|
2526
2526
|
return new HttpHandler(method, path, resolver, options);
|
@@ -2963,7 +2963,7 @@ var until = async (promise) => {
|
|
2963
2963
|
}
|
2964
2964
|
};
|
2965
2965
|
|
2966
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
2966
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/executeHandlers.mjs
|
2967
2967
|
var executeHandlers = async ({
|
2968
2968
|
request: request2,
|
2969
2969
|
requestId,
|
@@ -2991,7 +2991,7 @@ var executeHandlers = async ({
|
|
2991
2991
|
return null;
|
2992
2992
|
};
|
2993
2993
|
|
2994
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
2994
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/request/onUnhandledRequest.mjs
|
2995
2995
|
async function onUnhandledRequest(request2, strategy = "warn") {
|
2996
2996
|
const url = new URL(request2.url);
|
2997
2997
|
const publicUrl = toPublicUrl(url) + url.search;
|
@@ -3039,13 +3039,13 @@ Read more: https://mswjs.io/docs/getting-started/mocks`;
|
|
3039
3039
|
applyStrategy(strategy);
|
3040
3040
|
}
|
3041
3041
|
|
3042
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3042
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/request/readResponseCookies.mjs
|
3043
3043
|
function readResponseCookies(request2, response) {
|
3044
3044
|
store.add({ ...request2, url: request2.url.toString() }, response);
|
3045
3045
|
store.persist();
|
3046
3046
|
}
|
3047
3047
|
|
3048
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3048
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/handleRequest.mjs
|
3049
3049
|
async function handleRequest(request2, requestId, handlers, options, emitter, handleRequestOptions) {
|
3050
3050
|
var _a3, _b2, _c2, _d, _e, _f;
|
3051
3051
|
emitter.emit("request:start", { request: request2, requestId });
|
@@ -3101,7 +3101,7 @@ async function handleRequest(request2, requestId, handlers, options, emitter, ha
|
|
3101
3101
|
return transformedResponse;
|
3102
3102
|
}
|
3103
3103
|
|
3104
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3104
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/HttpResponse/decorators.mjs
|
3105
3105
|
var { message: message2 } = source_default;
|
3106
3106
|
function normalizeResponseInit(init = {}) {
|
3107
3107
|
const status = (init == null ? void 0 : init.status) || 200;
|
@@ -3133,7 +3133,7 @@ function decorateResponse(response, init) {
|
|
3133
3133
|
return response;
|
3134
3134
|
}
|
3135
3135
|
|
3136
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3136
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/HttpResponse.mjs
|
3137
3137
|
var HttpResponse = class _HttpResponse extends Response {
|
3138
3138
|
constructor(body, init) {
|
3139
3139
|
const responseInit = normalizeResponseInit(init);
|
@@ -3224,10 +3224,10 @@ var HttpResponse = class _HttpResponse extends Response {
|
|
3224
3224
|
}
|
3225
3225
|
};
|
3226
3226
|
|
3227
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3227
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/index.mjs
|
3228
3228
|
checkGlobals();
|
3229
3229
|
|
3230
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
3230
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/node/index.mjs
|
3231
3231
|
import { AsyncLocalStorage } from "async_hooks";
|
3232
3232
|
|
3233
3233
|
// ../../node_modules/.pnpm/@open-draft+deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.mjs
|
@@ -5108,12 +5108,12 @@ function createNetworkError(cause) {
|
|
5108
5108
|
});
|
5109
5109
|
}
|
5110
5110
|
|
5111
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
5111
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/isObject.mjs
|
5112
5112
|
function isObject2(value) {
|
5113
5113
|
return value != null && typeof value === "object" && !Array.isArray(value);
|
5114
5114
|
}
|
5115
5115
|
|
5116
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
5116
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/core/utils/internal/mergeRight.mjs
|
5117
5117
|
function mergeRight(left, right) {
|
5118
5118
|
return Object.entries(right).reduce(
|
5119
5119
|
(result, [key, rightValue]) => {
|
@@ -5133,7 +5133,7 @@ function mergeRight(left, right) {
|
|
5133
5133
|
);
|
5134
5134
|
}
|
5135
5135
|
|
5136
|
-
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.
|
5136
|
+
// ../../node_modules/.pnpm/msw@2.3.1_typescript@5.5.4/node_modules/msw/lib/node/index.mjs
|
5137
5137
|
var DEFAULT_LISTEN_OPTIONS = {
|
5138
5138
|
onUnhandledRequest: "warn"
|
5139
5139
|
};
|