@cloudflare/sandbox
1.0.3 · 22 Oct 2026Apache-2.02.1M / weekRepositoryHomepagenpmAtom feed
0.12.14 is the newest release of 0.9.x.
In short
1 new1 faster1 fixed
Release note
Patch Changes
Speed up backup and restore for larger archives with faster default compression, multipart R2 uploads, and parallel range downloads that write directly into the restored archive.
Introduce new
rpctransport to consolidatehttpandwebsockettransports.The intention is to replace
httpandwebsockettransports with a single implementation.No sub-request limitations (currently affects the
httptransport).No limit on write file size (currently affects both
httpandwebsockettransports).
To enable the transport set
SANDBOX_TRANSPORTtorpcin your wrangler config.A
ReadableStreaminstance can now be passed tosandbox.writeFile()when using therpctransport to avoid the 32mb file limit.{ fetch(req, env) { const sandbox = getSandbox(env.Sandbox, "my-sandbox"); // A ReadableStream can be passed as the content to writeFile(). sandbox.writeFile("/workspace/archive.tar.gz", req.body); return new Response("OK"); } }Surface s3fs mount failures from
mountBucket(). Mount errors (bad credentials, wrong bucket name, network failures) now throwS3FSMountErrorwith the underlyings3fslog output, instead of silently returning success and leaving no filesystem attached.import { S3FSMountError } from '@cloudflare/sandbox'; try { await sandbox.mountBucket('my-bucket', '/mnt/data', { endpoint, credentials }); } catch (err) { if (err instanceof S3FSMountError) { // err.message includes the s3fs log tail, e.g. "403 AccessDenied" } }
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.