@ai-sdk/provider-utils 3.0.0-canary.8 → 3.0.0
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 +406 -0
- package/dist/index.d.mts +538 -54
- package/dist/index.d.ts +538 -54
- package/dist/index.js +349 -230
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +315 -213
- package/dist/index.mjs.map +1 -1
- package/dist/test/index.d.mts +1 -1
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.js +8 -2
- package/dist/test/index.js.map +1 -1
- package/dist/test/index.mjs +8 -2
- package/dist/test/index.mjs.map +1 -1
- package/package.json +12 -6
- package/test.d.ts +1 -0
package/dist/test/index.mjs
CHANGED
@@ -18454,8 +18454,7 @@ var TestServerCall = class {
|
|
18454
18454
|
constructor(request) {
|
18455
18455
|
this.request = request;
|
18456
18456
|
}
|
18457
|
-
|
18458
|
-
get requestBody() {
|
18457
|
+
get requestBodyJson() {
|
18459
18458
|
return this.request.text().then(JSON.parse);
|
18460
18459
|
}
|
18461
18460
|
get requestBodyMultipart() {
|
@@ -18532,6 +18531,13 @@ function createTestServer(routes) {
|
|
18532
18531
|
}
|
18533
18532
|
);
|
18534
18533
|
case "controlled-stream": {
|
18534
|
+
if (request.signal) {
|
18535
|
+
request.signal.addEventListener("abort", () => {
|
18536
|
+
response.controller.error(
|
18537
|
+
new DOMException("Aborted", "AbortError")
|
18538
|
+
);
|
18539
|
+
});
|
18540
|
+
}
|
18535
18541
|
return new HttpResponse(
|
18536
18542
|
response.controller.stream.pipeThrough(new TextEncoderStream()),
|
18537
18543
|
{
|