Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

fix(utils): copy attachment bytes so Blob accepts them

3 months ago

5861847
Authored
grim7/29/2026, 6:47:10 AM
`bun run typecheck` was red: under the web workspace's lib settings a bare
`Uint8Array` widens to `Uint8Array<ArrayBufferLike>`, which is not a valid
`BlobPart` — a SharedArrayBuffer-backed view can't back a Blob. utils
typechecks clean on its own, so only the web build tripped it.

`.slice()` returns a fresh ArrayBuffer-backed copy. one small copy per
attachment (discord chart pngs), and it keeps `MultipartFile.bytes` a plain
Uint8Array — widening the interface instead would have rippled into the
worker's economics digest and the png encoder for no gain.

Parentcde55d2

1 file changed
  • packages/utils/src/guarded-fetch.ts+1−1