@ai-sdk/provider-utils 4.0.19 → 4.0.21
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 +14 -0
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/dist/test/index.js +3 -3
- package/package.json +1 -1
- package/src/download-blob.ts +5 -0
package/dist/index.mjs
CHANGED
|
@@ -392,6 +392,9 @@ async function downloadBlob(url, options) {
|
|
|
392
392
|
const response = await fetch(url, {
|
|
393
393
|
signal: options == null ? void 0 : options.abortSignal
|
|
394
394
|
});
|
|
395
|
+
if (response.redirected) {
|
|
396
|
+
validateDownloadUrl(response.url);
|
|
397
|
+
}
|
|
395
398
|
if (!response.ok) {
|
|
396
399
|
throw new DownloadError({
|
|
397
400
|
url,
|
|
@@ -576,7 +579,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
576
579
|
}
|
|
577
580
|
|
|
578
581
|
// src/version.ts
|
|
579
|
-
var VERSION = true ? "4.0.
|
|
582
|
+
var VERSION = true ? "4.0.21" : "0.0.0-test";
|
|
580
583
|
|
|
581
584
|
// src/get-from-api.ts
|
|
582
585
|
var getOriginalFetch = () => globalThis.fetch;
|
|
@@ -906,7 +909,7 @@ function visit(def) {
|
|
|
906
909
|
}
|
|
907
910
|
|
|
908
911
|
// src/to-json-schema/zod3-to-json-schema/options.ts
|
|
909
|
-
var ignoreOverride = Symbol(
|
|
912
|
+
var ignoreOverride = /* @__PURE__ */ Symbol(
|
|
910
913
|
"Let zodToJsonSchema decide on which parser to use"
|
|
911
914
|
);
|
|
912
915
|
var defaultOptions = {
|
|
@@ -2086,7 +2089,7 @@ var zod3ToJsonSchema = (schema, options) => {
|
|
|
2086
2089
|
};
|
|
2087
2090
|
|
|
2088
2091
|
// src/schema.ts
|
|
2089
|
-
var schemaSymbol = Symbol.for("vercel.ai.schema");
|
|
2092
|
+
var schemaSymbol = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
|
|
2090
2093
|
function lazySchema(createSchema) {
|
|
2091
2094
|
let schema;
|
|
2092
2095
|
return () => {
|