@ai-sdk/provider-utils
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -314,2 +314,3 @@ "use strict"; | ||
var import_provider6 = require("@ai-sdk/provider"); | ||
var getOriginalFetch = () => fetch; | ||
var postJsonToApi = async ({ | ||
@@ -321,3 +322,4 @@ url, | ||
successfulResponseHandler, | ||
abortSignal | ||
abortSignal, | ||
fetch: fetch2 | ||
}) => postToApi({ | ||
@@ -335,3 +337,4 @@ url, | ||
successfulResponseHandler, | ||
abortSignal | ||
abortSignal, | ||
fetch: fetch2 | ||
}); | ||
@@ -344,3 +347,4 @@ var postToApi = async ({ | ||
failedResponseHandler, | ||
abortSignal | ||
abortSignal, | ||
fetch: fetch2 = getOriginalFetch() | ||
}) => { | ||
@@ -351,3 +355,3 @@ try { | ||
); | ||
const response = await fetch(url, { | ||
const response = await fetch2(url, { | ||
method: "POST", | ||
@@ -354,0 +358,0 @@ headers: definedHeaders, |
@@ -124,3 +124,3 @@ import { JSONParseError, TypeValidationError, APICallError } from '@ai-sdk/provider'; | ||
declare const postJsonToApi: <T>({ url, headers, body, failedResponseHandler, successfulResponseHandler, abortSignal, }: { | ||
declare const postJsonToApi: <T>({ url, headers, body, failedResponseHandler, successfulResponseHandler, abortSignal, fetch, }: { | ||
url: string; | ||
@@ -132,2 +132,3 @@ headers?: Record<string, string | undefined> | undefined; | ||
abortSignal?: AbortSignal | undefined; | ||
fetch?: typeof fetch | undefined; | ||
}) => Promise<{ | ||
@@ -137,3 +138,3 @@ value: T; | ||
}>; | ||
declare const postToApi: <T>({ url, headers, body, successfulResponseHandler, failedResponseHandler, abortSignal, }: { | ||
declare const postToApi: <T>({ url, headers, body, successfulResponseHandler, failedResponseHandler, abortSignal, fetch, }: { | ||
url: string; | ||
@@ -148,2 +149,3 @@ headers?: Record<string, string | undefined> | undefined; | ||
abortSignal?: AbortSignal | undefined; | ||
fetch?: typeof fetch | undefined; | ||
}) => Promise<{ | ||
@@ -150,0 +152,0 @@ value: T; |
@@ -314,2 +314,3 @@ "use strict"; | ||
var import_provider6 = require("@ai-sdk/provider"); | ||
var getOriginalFetch = () => fetch; | ||
var postJsonToApi = async ({ | ||
@@ -321,3 +322,4 @@ url, | ||
successfulResponseHandler, | ||
abortSignal | ||
abortSignal, | ||
fetch: fetch2 | ||
}) => postToApi({ | ||
@@ -335,3 +337,4 @@ url, | ||
successfulResponseHandler, | ||
abortSignal | ||
abortSignal, | ||
fetch: fetch2 | ||
}); | ||
@@ -344,3 +347,4 @@ var postToApi = async ({ | ||
failedResponseHandler, | ||
abortSignal | ||
abortSignal, | ||
fetch: fetch2 = getOriginalFetch() | ||
}) => { | ||
@@ -351,3 +355,3 @@ try { | ||
); | ||
const response = await fetch(url, { | ||
const response = await fetch2(url, { | ||
method: "POST", | ||
@@ -354,0 +358,0 @@ headers: definedHeaders, |
{ | ||
"name": "@ai-sdk/provider-utils", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1661544
18232