@ai-sdk/provider-utils 4.0.61 → 4.0.62

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.mjs CHANGED
@@ -284,7 +284,7 @@ function validateDownloadUrl(url) {
284
284
  message: `URL must have a hostname`
285
285
  });
286
286
  }
287
- if (hostname === "localhost" || hostname.endsWith(".local") || hostname.endsWith(".localhost")) {
287
+ if (hostname === "localhost" || hostname.endsWith(".local") || hostname.endsWith(".localhost") || hostname.endsWith(".internal")) {
288
288
  throw new DownloadError({
289
289
  url,
290
290
  message: `URL with hostname ${hostname} is not allowed`
@@ -739,6 +739,12 @@ var createIdGenerator = ({
739
739
  };
740
740
  var generateId = createIdGenerator();
741
741
 
742
+ // src/encode-path-segment.ts
743
+ function encodePathSegment(value) {
744
+ const encodedValue = encodeURIComponent(value);
745
+ return encodedValue === "." ? "%252E" : encodedValue === ".." ? "%252E%252E" : encodedValue;
746
+ }
747
+
742
748
  // src/get-error-message.ts
743
749
  function getErrorMessage(error) {
744
750
  if (error == null) {
@@ -893,7 +899,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
893
899
  }
894
900
 
895
901
  // src/version.ts
896
- var VERSION = true ? "4.0.61" : "0.0.0-test";
902
+ var VERSION = true ? "4.0.62" : "0.0.0-test";
897
903
 
898
904
  // src/get-from-api.ts
899
905
  var getOriginalFetch = () => globalThis.fetch;
@@ -3581,6 +3587,7 @@ export {
3581
3587
  delay,
3582
3588
  downloadBlob,
3583
3589
  dynamicTool,
3590
+ encodePathSegment,
3584
3591
  executeTool,
3585
3592
  extractResponseHeaders,
3586
3593
  fetchWithValidatedEndpoint,