sproutboat 0.46.0 → 0.47.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 +17 -0
- package/SURFACE.md +1 -1
- package/package.json +7 -7
- package/src/build.ts +14 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,23 @@ maintained going forward by the `release` skill.
|
|
|
10
10
|
|
|
11
11
|
## Unreleased
|
|
12
12
|
|
|
13
|
+
## [0.47.0] - 2026-10-30
|
|
14
|
+
|
|
15
|
+
Built on `@sproutboat/runtime` 0.38.0, `@sproutboat/toolchain` 0.21.1 and `@sproutboat/wire` 0.21.1.
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **`crypto.subtle` like workerd from `2026-11-06`**: RSASSA-PKCS1-v1_5, RSA-PSS, RSA-OAEP, ECDSA (P-256, P-384, P-521), ECDH,
|
|
20
|
+
Ed25519 (and `NODE-ED25519`), X25519, AES-GCM, AES-CBC, AES-CTR and AES-KW, PBKDF2 and HKDF for every hash, `generateKey`,
|
|
21
|
+
`importKey` and `exportKey` in raw, spki, pkcs8 and jwk, `deriveBits`, `deriveKey`, `wrapKey`, `unwrapKey` and
|
|
22
|
+
`crypto.DigestStream`, with workerd's DOMException error names. Earlier dates answer as before. The primitives are
|
|
23
|
+
BearSSL's and Monocypher's, and standalone and broker builds both carry them.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **A build whose handler never names `subtle`, `DigestStream` or `CryptoKey` carries none of the crypto code** (its generated
|
|
28
|
+
program is unchanged); a broker build whose handler does use `crypto.subtle` links the cached BearSSL library for it.
|
|
29
|
+
|
|
13
30
|
## [0.46.0] - 2026-10-30
|
|
14
31
|
|
|
15
32
|
Built on `@sproutboat/runtime` 0.37.1, `@sproutboat/toolchain` 0.21.1 and
|
package/SURFACE.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sproutboat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.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.
|
|
67
|
+
"@sproutboat/runtime": "^0.38.0",
|
|
68
68
|
"@sproutboat/toolchain": "^0.21.1",
|
|
69
|
-
"@sproutboat/wire": "^0.21.
|
|
69
|
+
"@sproutboat/wire": "^0.21.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.47.0",
|
|
82
|
+
"@sproutboat/cli-darwin-x64": "0.47.0",
|
|
83
|
+
"@sproutboat/cli-linux-arm64": "0.47.0",
|
|
84
|
+
"@sproutboat/cli-linux-x64": "0.47.0"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=18"
|
package/src/build.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { ensureZig, esbuildVersion, porfforVersion, toolchainStamp } from "./too
|
|
|
21
21
|
import { PORFFOR_ARCHIVE_SHA256, PORFFOR_COMMIT_FULL } from "./porffor-toolchain";
|
|
22
22
|
import { version as toolchainPackageVersion } from "@sproutboat/toolchain/package.json" with { type: "json" };
|
|
23
23
|
import { version as cliVersion } from "../package.json" with { type: "json" };
|
|
24
|
-
import { wrapNativeFetchHandler } from "./wrap";
|
|
24
|
+
import { reachesSubtle, wrapNativeFetchHandler } from "./wrap";
|
|
25
25
|
|
|
26
26
|
export type BuildInput = {
|
|
27
27
|
projectDir: string;
|
|
@@ -230,8 +230,13 @@ async function prepareBuild(input: BuildInput) {
|
|
|
230
230
|
bakedAssets,
|
|
231
231
|
input.transport,
|
|
232
232
|
versionMetadata,
|
|
233
|
+
// Drop crypto.subtle (about 330 KB, and BearSSL on the link line) from a handler that never names it.
|
|
234
|
+
"auto",
|
|
233
235
|
);
|
|
236
|
+
// The broker transport links no BearSSL of its own; a handler that uses crypto.subtle needs it.
|
|
237
|
+
const subtle = !embedded && reachesSubtle(source.toString());
|
|
234
238
|
return {
|
|
239
|
+
subtle,
|
|
235
240
|
sourceHash,
|
|
236
241
|
target,
|
|
237
242
|
embedded,
|
|
@@ -309,6 +314,7 @@ export async function buildArtifact(input: BuildInput): Promise<BuildOutput> {
|
|
|
309
314
|
sourceHash,
|
|
310
315
|
target,
|
|
311
316
|
embedded,
|
|
317
|
+
subtle,
|
|
312
318
|
host,
|
|
313
319
|
bindings,
|
|
314
320
|
assetDir,
|
|
@@ -327,7 +333,7 @@ export async function buildArtifact(input: BuildInput): Promise<BuildOutput> {
|
|
|
327
333
|
toolchain: toolchainStamp(),
|
|
328
334
|
toolchainPackageVersion,
|
|
329
335
|
porffor: [PORFFOR_COMMIT_FULL, PORFFOR_ARCHIVE_SHA256],
|
|
330
|
-
native: embedded ? [sqliteStamp(), bearsslStamp()] : [],
|
|
336
|
+
native: embedded ? [sqliteStamp(), bearsslStamp()] : subtle ? [bearsslStamp()] : [],
|
|
331
337
|
integration: await integrationIdentity(),
|
|
332
338
|
nativeRestore: input.withRestore ? NATIVE_RESTORE_IDENTITY : null,
|
|
333
339
|
}),
|
|
@@ -347,7 +353,7 @@ export async function buildArtifact(input: BuildInput): Promise<BuildOutput> {
|
|
|
347
353
|
const zigBin = host ? undefined : await ensureZig();
|
|
348
354
|
const [sqliteObject, tls] = embedded
|
|
349
355
|
? await Promise.all([ensureSqliteObject({ target, zigBin }), ensureBearssl({ target, zigBin })])
|
|
350
|
-
: [null, null];
|
|
356
|
+
: [null, subtle ? await ensureBearssl({ target, zigBin }) : null];
|
|
351
357
|
const unitDir = unitDirFor(input);
|
|
352
358
|
const unitLock = input.generatedPath ? null : await acquireArtifactLock(unitDir);
|
|
353
359
|
try {
|
|
@@ -364,7 +370,11 @@ export async function buildArtifact(input: BuildInput): Promise<BuildOutput> {
|
|
|
364
370
|
transport: input.transport,
|
|
365
371
|
appName: input.config.name,
|
|
366
372
|
assets: bakedAssets,
|
|
367
|
-
|
|
373
|
+
// Without TLS (broker), the trust anchors are not wanted: only crypto.subtle uses the library.
|
|
374
|
+
extraLink: [
|
|
375
|
+
...(sqliteObject ? [sqliteObject] : []),
|
|
376
|
+
...(tls ? (embedded ? tls.objects : tls.objects.slice(0, -1)) : []),
|
|
377
|
+
],
|
|
368
378
|
extraCflags: tls ? ["-I", tls.includeDir] : [],
|
|
369
379
|
optimize: input.optimize,
|
|
370
380
|
versionMetadata,
|