@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 4.0.22
4
+
5
+ ### Patch Changes
6
+
7
+ - 0469aed: fix: allow inline data URLs in download validation
8
+
3
9
  ## 4.0.21
4
10
 
5
11
  ### Patch Changes
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 https, got ${parsed.protocol}`
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.21" : "0.0.0-test";
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;