sproutboat 0.33.0 → 0.35.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 +35 -0
- package/README.md +2 -1
- package/SURFACE.md +1 -1
- package/package.json +8 -8
- package/types/sproutboat.d.ts +43 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,41 @@ maintained going forward by the `release` skill.
|
|
|
10
10
|
|
|
11
11
|
## Unreleased
|
|
12
12
|
|
|
13
|
+
## [0.35.0] - 2026-10-26
|
|
14
|
+
|
|
15
|
+
Built on `@sproutboat/runtime` 0.33.0, `@sproutboat/toolchain` 0.18.0 and
|
|
16
|
+
`@sproutboat/wire` 0.20.1.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **Faster string building in compiled apps.** The toolchain moves to 0.18.0: `s += e;` in a
|
|
21
|
+
loop on a local string appends in place instead of copying the whole string, `replace(regex, fn)`
|
|
22
|
+
joins its pieces once, and `charCodeAt` and `JSON.parse` read characters directly. On sproutd's
|
|
23
|
+
heavy set that is about 40% more requests per second, with regex-scan 7 ms instead of 35 ms.
|
|
24
|
+
Compiled apps get a new fingerprint and rebuild once.
|
|
25
|
+
|
|
26
|
+
## [0.34.0] - 2026-10-26
|
|
27
|
+
|
|
28
|
+
Built on `@sproutboat/runtime` 0.33.0, `@sproutboat/toolchain` 0.17.0 and
|
|
29
|
+
`@sproutboat/wire` 0.20.1.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- **WebSockets from compatibility date 2026-10-30.** `WebSocketPair`, `WebSocket`
|
|
34
|
+
(`accept`, `send`, `close`, listeners), `new Response(null, { status: 101, webSocket })`,
|
|
35
|
+
`response.webSocket`, `WebSocketRequestResponsePair`, and the Durable Object hibernation API
|
|
36
|
+
(`acceptWebSocket`, `getWebSockets`, `getTags`, auto-responses, attachments,
|
|
37
|
+
`webSocketMessage` and `webSocketClose`). Behaviour follows workerd. Sockets reaching a client
|
|
38
|
+
are carried by sproutd (B19); a standalone executable or the platform answers a 101 with 501
|
|
39
|
+
for now, while a pair whose ends both stay in the worker (a Worker and its Durable Object)
|
|
40
|
+
works everywhere. Outbound `new WebSocket(url)` is not supported yet.
|
|
41
|
+
- Streamed request bodies on sproutd (B19), from compatibility date 2026-10-27.
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- `types/sproutboat.d.ts` declares the WebSocket types and the hibernation handlers.
|
|
46
|
+
- The toolchain moves to 0.17.0, so compiled apps get a new fingerprint and rebuild once.
|
|
47
|
+
|
|
13
48
|
## [0.33.0] - 2026-10-25
|
|
14
49
|
|
|
15
50
|
Built on `@sproutboat/runtime` 0.32.0, `@sproutboat/wire` 0.20.0 and
|
package/README.md
CHANGED
|
@@ -168,7 +168,8 @@ Windows, build from WSL.
|
|
|
168
168
|
## Limits
|
|
169
169
|
|
|
170
170
|
Capability profile `http-sync-v0`: one synchronous `fetch` handler, optional
|
|
171
|
-
`scheduled` / `queue` handlers
|
|
171
|
+
`scheduled` / `queue` handlers. WebSockets (from compatibility date 2026-10-30) need
|
|
172
|
+
a host that carries them (sproutd). Binding values are
|
|
172
173
|
text/JSON, one at a time over a 32 MiB loopback frame. Sprout uploads cap at
|
|
173
174
|
16 MiB, assets at 64 MiB / 4096 files.
|
|
174
175
|
|
package/SURFACE.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sproutboat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.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.6.0",
|
|
67
|
-
"@sproutboat/runtime": "^0.
|
|
68
|
-
"@sproutboat/toolchain": "^0.
|
|
69
|
-
"@sproutboat/wire": "^0.20.
|
|
67
|
+
"@sproutboat/runtime": "^0.33.0",
|
|
68
|
+
"@sproutboat/toolchain": "^0.18.0",
|
|
69
|
+
"@sproutboat/wire": "^0.20.1"
|
|
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.
|
|
82
|
-
"@sproutboat/cli-darwin-x64": "0.
|
|
83
|
-
"@sproutboat/cli-linux-arm64": "0.
|
|
84
|
-
"@sproutboat/cli-linux-x64": "0.
|
|
81
|
+
"@sproutboat/cli-darwin-arm64": "0.35.0",
|
|
82
|
+
"@sproutboat/cli-darwin-x64": "0.35.0",
|
|
83
|
+
"@sproutboat/cli-linux-arm64": "0.35.0",
|
|
84
|
+
"@sproutboat/cli-linux-x64": "0.35.0"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=18"
|
package/types/sproutboat.d.ts
CHANGED
|
@@ -272,6 +272,46 @@ declare global {
|
|
|
272
272
|
id: DurableObjectId;
|
|
273
273
|
/** Synchronous, like every other binding. */
|
|
274
274
|
storage: DurableObjectStorage;
|
|
275
|
+
/**
|
|
276
|
+
* The WebSocket hibernation API, from compatibility date 2026-10-30. Messages and
|
|
277
|
+
* closes on an accepted socket go to the class's `webSocketMessage` and
|
|
278
|
+
* `webSocketClose`. On sproutd an open socket keeps the app's worker running.
|
|
279
|
+
*/
|
|
280
|
+
acceptWebSocket(ws: WebSocket, tags?: string[]): void;
|
|
281
|
+
getWebSockets(tag?: string): WebSocket[];
|
|
282
|
+
getTags(ws: WebSocket): string[];
|
|
283
|
+
setWebSocketAutoResponse(pair?: WebSocketRequestResponsePair): void;
|
|
284
|
+
getWebSocketAutoResponse(): WebSocketRequestResponsePair | null;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// ---------------------------------------------------------- WebSockets
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* From compatibility date 2026-10-30, as in workerd. Return the client end in a
|
|
291
|
+
* `new Response(null, { status: 101, webSocket: client })` and talk on the server end.
|
|
292
|
+
* Client sockets are carried by sproutd; a standalone or platform sprout answers a 101
|
|
293
|
+
* with 501 for now. Inbound messages are capped at 32 MiB (1009 above it). Outbound
|
|
294
|
+
* WebSockets (`new WebSocket(url)`) are not supported.
|
|
295
|
+
*/
|
|
296
|
+
class WebSocketPair {
|
|
297
|
+
0: WebSocket;
|
|
298
|
+
1: WebSocket;
|
|
299
|
+
}
|
|
300
|
+
class WebSocketRequestResponsePair {
|
|
301
|
+
constructor(request: string, response: string);
|
|
302
|
+
readonly request: string;
|
|
303
|
+
readonly response: string;
|
|
304
|
+
}
|
|
305
|
+
interface ResponseInit {
|
|
306
|
+
webSocket?: WebSocket | null;
|
|
307
|
+
}
|
|
308
|
+
interface Response {
|
|
309
|
+
readonly webSocket: WebSocket | null;
|
|
310
|
+
}
|
|
311
|
+
interface WebSocket {
|
|
312
|
+
accept(): void;
|
|
313
|
+
serializeAttachment(value: unknown): void;
|
|
314
|
+
deserializeAttachment(): unknown;
|
|
275
315
|
}
|
|
276
316
|
|
|
277
317
|
// -------------------------------------------------- Analytics Engine
|
|
@@ -366,6 +406,9 @@ declare global {
|
|
|
366
406
|
fetch(request: Request): Response | Promise<Response>;
|
|
367
407
|
/** Runs after `storage.setAlarm`, with no request in flight. */
|
|
368
408
|
alarm?(): void | Promise<void>;
|
|
409
|
+
/** A message on a socket taken with `state.acceptWebSocket` (from 2026-10-30). */
|
|
410
|
+
webSocketMessage?(ws: WebSocket, message: string | ArrayBuffer): void | Promise<void>;
|
|
411
|
+
webSocketClose?(ws: WebSocket, code: number, reason: string, wasClean: boolean): void | Promise<void>;
|
|
369
412
|
}
|
|
370
413
|
|
|
371
414
|
// ------------------------------------------------------- Version metadata
|