@ai-sdk/provider-utils 4.0.19 → 4.0.20
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 +8 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- 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.20" : "0.0.0-test";
|
|
580
583
|
|
|
581
584
|
// src/get-from-api.ts
|
|
582
585
|
var getOriginalFetch = () => globalThis.fetch;
|