@ai-sdk/provider-utils 3.0.0-canary.2 → 3.0.0-canary.3

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.
@@ -18448,9 +18448,25 @@ var TestServerCall = class {
18448
18448
  constructor(request) {
18449
18449
  this.request = request;
18450
18450
  }
18451
+ // TODO: rename to requestBodyJson
18451
18452
  get requestBody() {
18452
18453
  return this.request.text().then(JSON.parse);
18453
18454
  }
18455
+ get requestBodyMultipart() {
18456
+ var _a4;
18457
+ return ((_a4 = this.request.headers.get("content-type")) == null ? void 0 : _a4.startsWith(
18458
+ "multipart/form-data"
18459
+ )) ? (
18460
+ // For multipart/form-data, return the form data entries as an object
18461
+ this.request.formData().then((formData) => {
18462
+ const entries = {};
18463
+ formData.forEach((value, key) => {
18464
+ entries[key] = value;
18465
+ });
18466
+ return entries;
18467
+ })
18468
+ ) : null;
18469
+ }
18454
18470
  get requestCredentials() {
18455
18471
  return this.request.credentials;
18456
18472
  }