From ac65e6ce39b7af31aec8fb6da440e6347e6d9d32 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 12:02:44 +0000 Subject: [PATCH 1/2] Initial plan From 041bf5774a0ebbaf3b6226078c776973e48a3ec0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 12:05:22 +0000 Subject: [PATCH 2/2] Add explanatory comment for duplex property type assertion Co-authored-by: madebydavid <5401249+madebydavid@users.noreply.github.com> --- src/utils/upload.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/utils/upload.ts b/src/utils/upload.ts index 9540463..ce7fcec 100644 --- a/src/utils/upload.ts +++ b/src/utils/upload.ts @@ -59,6 +59,12 @@ export function uploadZip({url, zipStream, zipSize, onProgress}: UploadProps): P const streamWithProgress = zipStream.pipe(progressStream) const webStream = Readable.toWeb(streamWithProgress) as ReadableStream + // The 'duplex' property is required when using a ReadableStream as the request body. + // 'duplex: half' indicates half-duplex communication (one direction at a time), + // which is the mode needed for streaming request bodies with fetch(). + // Type assertion is necessary because 'duplex' is not yet part of the standard + // TypeScript RequestInit type definition, though it's required by the fetch spec + // for streaming uploads. const response = fetch(url, { method: 'PUT', headers: {