@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/CHANGELOG.md +7 -0
- package/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.
|
|
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,
|