sproutboat 0.26.0 → 0.28.0

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
@@ -10,6 +10,46 @@ maintained going forward by the `release` skill.
10
10
 
11
11
  ## Unreleased
12
12
 
13
+ ## [0.28.0] - 2026-10-23
14
+
15
+ Built on `@sproutboat/runtime` 0.28.0, `@sproutboat/toolchain` 0.14.0 and
16
+ `@sproutboat/wire` 0.17.0.
17
+
18
+ ### Added
19
+
20
+ - Request bodies stream from compatibility date `2026-10-27`, as in Workers.
21
+ The handler runs as soon as a request's headers arrive, and `request.body`
22
+ hands out the bytes as they come in. The server pauses the connection while
23
+ more than 1 MiB waits unread, so a 128 MiB upload read through the stream
24
+ peaks at 38 MiB. `text()`, `json()`, `arrayBuffer()` and `bytes()` still read
25
+ the whole body (as Promises). New example: `examples/upload`.
26
+ - From the same date `SB_REQUEST_BODY_MAX` defaults to 100 MiB (it stays 1 MiB
27
+ before it, where the body is held whole). A larger `Content-Length` gets
28
+ `413 Payload Too Large` before the handler runs.
29
+ - On the platform, `fetch()` and service bindings send a `ReadableStream`
30
+ request body as it is read, instead of reading it to the end first. A
31
+ streamed body can't follow a 307 or 308 redirect, as in Workers.
32
+
33
+ Earlier dates are unchanged: the handler gets the whole body, and
34
+ `request.text()` answers at once.
35
+
36
+ ## [0.27.0] - 2026-10-22
37
+
38
+ Built on `@sproutboat/runtime` 0.27.1.
39
+
40
+ ### Fixed
41
+
42
+ - Bodies of megabytes no longer take hundreds of megabytes of memory. Turning
43
+ bytes into text and text into bytes made one string per character, so reading
44
+ a 5 MiB R2 object with `text()` peaked at about 400 MiB, and R2 multipart
45
+ uploads with real (5 MiB) parts ran sproutd's workers out of memory. On a
46
+ standalone build, at 5 MiB: `put()` of a string 82 to 16 MiB, `get()` and
47
+ `text()` 400 to 26 MiB, `request.text()` 402 to 24 MiB.
48
+ - R2 `uploadPart()` stores an `ArrayBuffer` or a typed array as its bytes, at
49
+ every date. It stored the text `[object ArrayBuffer]`.
50
+ - From compatibility date `2026-10-26`, `uploadPart()` takes what `put()` takes
51
+ (a `ReadableStream` or a `Blob` too) and stores text as UTF-8, as in Workers.
52
+
13
53
  ## [0.26.0] - 2026-10-22
14
54
 
15
55
  Built on `@sproutboat/runtime` 0.27.0 and `@sproutboat/wire` 0.16.0.
package/SURFACE.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > Generated by `src/surface.test.ts` from `src/surface.ts` + the pinned
4
4
  > toolchain constants. Do not edit by hand — run `UPDATE_SURFACE=1 bun test`.
5
5
 
6
- **Package:** `sproutboat` 0.26.0
6
+ **Package:** `sproutboat` 0.28.0
7
7
 
8
8
  ## Commands
9
9
 
@@ -67,7 +67,7 @@ usage: sproutboat <init [name] | check [project-dir] | types [project-dir] | dev
67
67
  | `SPROUTBOAT_DATA` | Data directory for a standalone binary, after --data and SB_DATA_DIR, before the ./<name>.data default (#15). |
68
68
  | `SB_CA_BUNDLE` | PEM bundle of extra certificate authorities a standalone binary should trust, on top of the compiled-in Mozilla root set (#15). Adds trust; nothing disables verification. |
69
69
  | `SB_FETCH_MAX_BYTES` | Largest outbound `fetch()` response body a sprout will read, in bytes (default 33554432). The size is the remote host's choice and the body is held whole, so this is the ceiling that stops one upstream exhausting memory. |
70
- | `SB_REQUEST_BODY_MAX` | Largest inbound request body the runtime accepts, in bytes (default 1048576). Anything larger is refused with 413 before the handler runs. |
70
+ | `SB_REQUEST_BODY_MAX` | Largest inbound request body the runtime accepts, in bytes. From compatibility date 2026-10-27 bodies stream and the default is 104857600 (100 MiB); before it the body is held whole and the default is 1048576. A larger Content-Length is refused with 413 before the handler runs; a chunked body that grows past it closes the connection. |
71
71
  | `SB_EXTRA_CFLAGS` | Flags added to Porffor's native-fetch compile step, set by the build so inline C can include BearSSL's header (#15). |
72
72
  | `SB_EXTRA_LINK` | Objects to add to Porffor's native-fetch link line, set by the build so a standalone binary links SQLite and BearSSL (#15). |
73
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sproutboat",
3
- "version": "0.26.0",
3
+ "version": "0.28.0",
4
4
  "description": "Wrangler-shaped CLI for Sproutboat. Deploys workers to any control plane via --api-url / SPROUTBOAT_API_URL.",
5
5
  "keywords": [
6
6
  "cli",
@@ -64,9 +64,9 @@
64
64
  "@sproutboat/artifact": "^0.3.0",
65
65
  "@sproutboat/assets": "^0.3.0",
66
66
  "@sproutboat/config": "^0.5.0",
67
- "@sproutboat/runtime": "^0.27.0",
68
- "@sproutboat/toolchain": "^0.13.0",
69
- "@sproutboat/wire": "^0.16.0"
67
+ "@sproutboat/runtime": "^0.28.0",
68
+ "@sproutboat/toolchain": "^0.14.0",
69
+ "@sproutboat/wire": "^0.17.0"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@oxlint/plugins": "1.85.0",
@@ -78,10 +78,10 @@
78
78
  "typescript": "7.0.2"
79
79
  },
80
80
  "optionalDependencies": {
81
- "@sproutboat/cli-darwin-arm64": "0.26.0",
82
- "@sproutboat/cli-darwin-x64": "0.26.0",
83
- "@sproutboat/cli-linux-arm64": "0.26.0",
84
- "@sproutboat/cli-linux-x64": "0.26.0"
81
+ "@sproutboat/cli-darwin-arm64": "0.28.0",
82
+ "@sproutboat/cli-darwin-x64": "0.28.0",
83
+ "@sproutboat/cli-linux-arm64": "0.28.0",
84
+ "@sproutboat/cli-linux-x64": "0.28.0"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=18"
package/src/surface.ts CHANGED
@@ -311,7 +311,7 @@ export const ENV_VARS: readonly EnvVar[] = [
311
311
  {
312
312
  name: "SB_REQUEST_BODY_MAX",
313
313
  purpose:
314
- "Largest inbound request body the runtime accepts, in bytes (default 1048576). Anything larger is refused with 413 before the handler runs.",
314
+ "Largest inbound request body the runtime accepts, in bytes. From compatibility date 2026-10-27 bodies stream and the default is 104857600 (100 MiB); before it the body is held whole and the default is 1048576. A larger Content-Length is refused with 413 before the handler runs; a chunked body that grows past it closes the connection.",
315
315
  },
316
316
  {
317
317
  name: "SB_EXTRA_CFLAGS",