@ai-sdk/provider-utils 4.0.21 → 4.0.22
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 +6 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -3
- package/src/validate-download-url.ts +7 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -395,10 +395,13 @@ function validateDownloadUrl(url) {
|
|
|
395
395
|
message: `Invalid URL: ${url}`
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
|
+
if (parsed.protocol === "data:") {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
398
401
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
399
402
|
throw new DownloadError({
|
|
400
403
|
url,
|
|
401
|
-
message: `URL scheme must be http or
|
|
404
|
+
message: `URL scheme must be http, https, or data, got ${parsed.protocol}`
|
|
402
405
|
});
|
|
403
406
|
}
|
|
404
407
|
const hostname = parsed.hostname;
|
|
@@ -675,7 +678,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
675
678
|
}
|
|
676
679
|
|
|
677
680
|
// src/version.ts
|
|
678
|
-
var VERSION = true ? "4.0.
|
|
681
|
+
var VERSION = true ? "4.0.22" : "0.0.0-test";
|
|
679
682
|
|
|
680
683
|
// src/get-from-api.ts
|
|
681
684
|
var getOriginalFetch = () => globalThis.fetch;
|