@usearazzo/runner 1.0.1-alpha.31 → 1.0.1-alpha.32

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 CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.1-alpha.32](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.31...v1.0.1-alpha.32) (2026-11-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **runner:** keep a multipart content type that names a boundary ([#353](https://github.com/usearazzo/arazzo-toolkit/issues/353)) ([22b0a56](https://github.com/usearazzo/arazzo-toolkit/commit/22b0a5615d9670acbe19f3614523fe2feec3a29b))
11
+
6
12
  ## [1.0.1-alpha.31](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.30...v1.0.1-alpha.31) (2026-11-13)
7
13
 
8
14
  ### Features
@@ -12301,12 +12301,19 @@ class OpenAPIOperationExecutor {
12301
12301
  finalized = (await this.#requestInterceptor?.(finalized, context)) ?? finalized;
12302
12302
  finalized = (await perCallInterceptor?.(finalized, context)) ?? finalized;
12303
12303
 
12304
- // for multipart/form-data, remove the built content-type so the transport
12305
- // sets one carrying the correct boundary
12306
- const contentType = finalized.headers['content-type'] ?? finalized.headers['Content-Type'];
12307
- if (typeof contentType === 'string' && /multipart\/form-data/i.test(contentType)) {
12308
- delete finalized.headers['content-type'];
12309
- delete finalized.headers['Content-Type'];
12304
+ // for multipart/form-data, remove the content-type so the transport sets
12305
+ // one carrying the boundary of the FormData it encodes. one that names a
12306
+ // boundary is kept when the body is not a FormData: whoever built that
12307
+ // body chose the boundary
12308
+ const encodedByTransport = finalized.body instanceof FormData;
12309
+ for (const name of Object.keys(finalized.headers)) {
12310
+ const contentType = finalized.headers[name];
12311
+ if (name.toLowerCase() !== 'content-type' || typeof contentType !== 'string') continue;
12312
+ if (!/multipart\/form-data/i.test(contentType)) continue;
12313
+ const boundary = (0,_swaggerexpert_media_types__WEBPACK_IMPORTED_MODULE_6__.parse)(contentType, {
12314
+ type: 'media-type'
12315
+ }).tree?.parameters.boundary;
12316
+ if (encodedByTransport || !boundary?.trim()) delete finalized.headers[name];
12310
12317
  }
12311
12318
  return finalized;
12312
12319
  }