@ai-sdk/provider-utils 2.1.12 → 2.1.13
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/package.json +2 -2
- package/test/dist/index.js +10 -7
- package/test/dist/index.js.map +1 -1
- package/test/dist/index.mjs +10 -7
- package/test/dist/index.mjs.map +1 -1
package/test/dist/index.mjs
CHANGED
@@ -18589,13 +18589,16 @@ function createServer({
|
|
18589
18589
|
pushController
|
18590
18590
|
}) {
|
18591
18591
|
const responsesArray = Array.isArray(responses) ? responses : [responses];
|
18592
|
-
const responsesByUrl = responsesArray.reduce(
|
18593
|
-
|
18594
|
-
responsesByUrl2[response.url]
|
18595
|
-
|
18596
|
-
|
18597
|
-
|
18598
|
-
|
18592
|
+
const responsesByUrl = responsesArray.reduce(
|
18593
|
+
(responsesByUrl2, response) => {
|
18594
|
+
if (!responsesByUrl2[response.url]) {
|
18595
|
+
responsesByUrl2[response.url] = [];
|
18596
|
+
}
|
18597
|
+
responsesByUrl2[response.url].push(response);
|
18598
|
+
return responsesByUrl2;
|
18599
|
+
},
|
18600
|
+
{}
|
18601
|
+
);
|
18599
18602
|
const streams = {};
|
18600
18603
|
responsesArray.filter(
|
18601
18604
|
(response) => response.type === "controlled-stream"
|