@ai-sdk/provider-utils 3.0.41 → 3.0.42

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
@@ -209,7 +209,7 @@ function validateDownloadUrl(url) {
209
209
  message: `URL must have a hostname`
210
210
  });
211
211
  }
212
- if (hostname === "localhost" || hostname.endsWith(".local") || hostname.endsWith(".localhost")) {
212
+ if (hostname === "localhost" || hostname.endsWith(".local") || hostname.endsWith(".localhost") || hostname.endsWith(".internal")) {
213
213
  throw new DownloadError({
214
214
  url,
215
215
  message: `URL with hostname ${hostname} is not allowed`
@@ -580,6 +580,12 @@ var createIdGenerator = ({
580
580
  };
581
581
  var generateId = createIdGenerator();
582
582
 
583
+ // src/encode-path-segment.ts
584
+ function encodePathSegment(value) {
585
+ const encodedValue = encodeURIComponent(value);
586
+ return encodedValue === "." ? "%252E" : encodedValue === ".." ? "%252E%252E" : encodedValue;
587
+ }
588
+
583
589
  // src/get-error-message.ts
584
590
  function getErrorMessage(error) {
585
591
  if (error == null) {
@@ -734,7 +740,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
734
740
  }
735
741
 
736
742
  // src/version.ts
737
- var VERSION = true ? "3.0.41" : "0.0.0-test";
743
+ var VERSION = true ? "3.0.42" : "0.0.0-test";
738
744
 
739
745
  // src/get-from-api.ts
740
746
  var getOriginalFetch = () => globalThis.fetch;
@@ -3357,6 +3363,7 @@ export {
3357
3363
  createStatusCodeErrorResponseHandler,
3358
3364
  delay,
3359
3365
  dynamicTool,
3366
+ encodePathSegment,
3360
3367
  executeTool,
3361
3368
  extractResponseHeaders,
3362
3369
  fetchWithValidatedEndpoint,