@ai-sdk/provider-utils 2.2.4 → 2.2.6
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 +15 -0
- package/dist/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/test/dist/index.d.mts +1 -0
- package/test/dist/index.d.ts +1 -0
- package/test/dist/index.js +15 -0
- package/test/dist/index.js.map +1 -1
- package/test/dist/index.mjs +15 -0
- package/test/dist/index.mjs.map +1 -1
package/test/dist/index.mjs
CHANGED
@@ -18750,6 +18750,21 @@ var TestServerCall2 = class {
|
|
18750
18750
|
get requestBody() {
|
18751
18751
|
return this.request.text().then(JSON.parse);
|
18752
18752
|
}
|
18753
|
+
get requestBodyMultipart() {
|
18754
|
+
var _a4;
|
18755
|
+
return ((_a4 = this.request.headers.get("content-type")) == null ? void 0 : _a4.startsWith(
|
18756
|
+
"multipart/form-data"
|
18757
|
+
)) ? (
|
18758
|
+
// For multipart/form-data, return the form data entries as an object
|
18759
|
+
this.request.formData().then((formData) => {
|
18760
|
+
const entries = {};
|
18761
|
+
formData.forEach((value, key) => {
|
18762
|
+
entries[key] = value;
|
18763
|
+
});
|
18764
|
+
return entries;
|
18765
|
+
})
|
18766
|
+
) : null;
|
18767
|
+
}
|
18753
18768
|
get requestCredentials() {
|
18754
18769
|
return this.request.credentials;
|
18755
18770
|
}
|