From 90a55efcaf0e3c5da9568f6f3128d52afd7ac6e9 Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 14:40:42 +0200 Subject: [PATCH 01/12] feat(fetch): enhance Node.js Readable stream handling for backpressure (ESFA-0) Improves the fetch function to manage backpressure when processing Node.js Readable streams. This change pauses the stream during data transmission to prevent overwhelming the system, ensuring smoother data flow and better resource management. Signed-off-by: Tobias Pressler --- packages/nodejs/src/bridge/network.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/nodejs/src/bridge/network.ts b/packages/nodejs/src/bridge/network.ts index 764a8bc31..a7276baac 100644 --- a/packages/nodejs/src/bridge/network.ts +++ b/packages/nodejs/src/bridge/network.ts @@ -504,16 +504,22 @@ export async function fetch(input: string | URL | Request, options: FetchOptions await sendBytes(bytes); } } else { - // Node.js Readable stream + // Node.js Readable stream — pause/resume for backpressure await new Promise((resolve, reject) => { const stream = rawBody as any; + let pending: Promise = Promise.resolve(); stream.on("data", (data: any) => { const bytes = typeof data === "string" ? new TextEncoder().encode(data) : data instanceof Uint8Array ? data : new Uint8Array(data); - sendBytes(bytes); + stream.pause(); + pending = pending.then(() => sendBytes(bytes)).then(() => { + stream.resume(); + }); + }); + stream.on("end", () => { + pending.then(() => resolve(), reject); }); - stream.on("end", () => resolve()); stream.on("error", (err: any) => reject(err)); }); } From 28c807d4f4be2caa328c692665f05bbfb7f78f7e Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 14:40:51 +0200 Subject: [PATCH 02/12] release: 0.2.3-rc.1 Signed-off-by: Tobias Pressler --- native/v8-runtime/npm/darwin-arm64/package.json | 2 +- native/v8-runtime/npm/darwin-x64/package.json | 2 +- native/v8-runtime/npm/linux-arm64-gnu/package.json | 2 +- native/v8-runtime/npm/linux-x64-gnu/package.json | 2 +- native/v8-runtime/npm/win32-x64/package.json | 2 +- package.json | 2 +- packages/core/package.json | 2 +- packages/nodejs/package.json | 2 +- packages/secure-exec/package.json | 2 +- packages/typescript/package.json | 2 +- packages/v8/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/native/v8-runtime/npm/darwin-arm64/package.json b/native/v8-runtime/npm/darwin-arm64/package.json index 09eff2f6a..c5a9466fe 100644 --- a/native/v8-runtime/npm/darwin-arm64/package.json +++ b/native/v8-runtime/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-arm64", - "version": "0.2.2", + "version": "0.2.3-rc.1", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/darwin-x64/package.json b/native/v8-runtime/npm/darwin-x64/package.json index 005e0b93f..510af7480 100644 --- a/native/v8-runtime/npm/darwin-x64/package.json +++ b/native/v8-runtime/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-x64", - "version": "0.2.2", + "version": "0.2.3-rc.1", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-arm64-gnu/package.json b/native/v8-runtime/npm/linux-arm64-gnu/package.json index b13733462..d6bd6c41a 100644 --- a/native/v8-runtime/npm/linux-arm64-gnu/package.json +++ b/native/v8-runtime/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-arm64-gnu", - "version": "0.2.2", + "version": "0.2.3-rc.1", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-x64-gnu/package.json b/native/v8-runtime/npm/linux-x64-gnu/package.json index 9d777a2b6..895dc33a2 100644 --- a/native/v8-runtime/npm/linux-x64-gnu/package.json +++ b/native/v8-runtime/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-x64-gnu", - "version": "0.2.2", + "version": "0.2.3-rc.1", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/win32-x64/package.json b/native/v8-runtime/npm/win32-x64/package.json index 21c03749d..bb0fa4724 100644 --- a/native/v8-runtime/npm/win32-x64/package.json +++ b/native/v8-runtime/npm/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-win32-x64", - "version": "0.2.2", + "version": "0.2.3-rc.1", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/package.json b/package.json index 0f21625b8..496fb9a59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firestart-secure-exec-monorepo", - "version": "0.2.2", + "version": "0.2.3-rc.1", "private": true, "license": "Apache-2.0", "type": "module", diff --git a/packages/core/package.json b/packages/core/package.json index 883403e68..b784da39e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-core", - "version": "0.2.2", + "version": "0.2.3-rc.1", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 341985c9c..45253001a 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-nodejs", - "version": "0.2.2", + "version": "0.2.3-rc.1", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/secure-exec/package.json b/packages/secure-exec/package.json index 6668f8869..398c97515 100644 --- a/packages/secure-exec/package.json +++ b/packages/secure-exec/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec", - "version": "0.2.2", + "version": "0.2.3-rc.1", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 71b332392..241cbede6 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@secure-exec/typescript", - "version": "0.2.2", + "version": "0.2.3-rc.1", "private": true, "type": "module", "license": "Apache-2.0", diff --git a/packages/v8/package.json b/packages/v8/package.json index 9685c9911..06ff0f68f 100644 --- a/packages/v8/package.json +++ b/packages/v8/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8", - "version": "0.2.2", + "version": "0.2.3-rc.1", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", From 91a58fc0ff39523d230906508b826222bcc7ecd9 Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 15:10:54 +0200 Subject: [PATCH 03/12] fix(http): improve binary content type detection in body encoding logic Updated the shouldEncodeHttpBodyAsBinary function to enhance the detection of binary content types. The new logic explicitly checks for text-based content types and assumes text for empty content-type headers, ensuring backward compatibility. This change aims to prevent incorrect encoding of binary data, improving overall data handling in HTTP requests. Signed-off-by: Tobias Pressler --- packages/nodejs/src/bridge-handlers.ts | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/nodejs/src/bridge-handlers.ts b/packages/nodejs/src/bridge-handlers.ts index 0a63b5c46..f86a987c1 100644 --- a/packages/nodejs/src/bridge-handlers.ts +++ b/packages/nodejs/src/bridge-handlers.ts @@ -4150,11 +4150,24 @@ function shouldEncodeHttpBodyAsBinary( ): boolean { const contentType = headers["content-type"] || ""; const headerValue = Array.isArray(contentType) ? contentType.join(", ") : contentType; - return ( - headerValue.includes("octet-stream") || - headerValue.includes("gzip") || - urlString.endsWith(".tgz") - ); + // No content-type — assume text for backward compatibility + if (!headerValue) { + return false; + } + // Explicitly text-based content types — keep as UTF-8 string + if ( + headerValue.startsWith("text/") || + headerValue.includes("application/json") || + headerValue.includes("application/xml") || + headerValue.includes("application/javascript") || + headerValue.includes("application/x-www-form-urlencoded") || + headerValue.includes("+xml") || + headerValue.includes("+json") + ) { + return false; + } + // Everything else (binary content types like application/pdf, image/*, etc.) + return true; } /** From 4e6eb9942932f4afa5c211af6b82ae12e6389790 Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 15:11:26 +0200 Subject: [PATCH 04/12] release: 0.2.3-rc.2 Signed-off-by: Tobias Pressler --- native/v8-runtime/npm/darwin-arm64/package.json | 2 +- native/v8-runtime/npm/darwin-x64/package.json | 2 +- native/v8-runtime/npm/linux-arm64-gnu/package.json | 2 +- native/v8-runtime/npm/linux-x64-gnu/package.json | 2 +- native/v8-runtime/npm/win32-x64/package.json | 2 +- package.json | 2 +- packages/core/package.json | 2 +- packages/nodejs/package.json | 2 +- packages/secure-exec/package.json | 2 +- packages/typescript/package.json | 2 +- packages/v8/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/native/v8-runtime/npm/darwin-arm64/package.json b/native/v8-runtime/npm/darwin-arm64/package.json index c5a9466fe..9ed468485 100644 --- a/native/v8-runtime/npm/darwin-arm64/package.json +++ b/native/v8-runtime/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-arm64", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/darwin-x64/package.json b/native/v8-runtime/npm/darwin-x64/package.json index 510af7480..933783a80 100644 --- a/native/v8-runtime/npm/darwin-x64/package.json +++ b/native/v8-runtime/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-x64", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-arm64-gnu/package.json b/native/v8-runtime/npm/linux-arm64-gnu/package.json index d6bd6c41a..becf08d02 100644 --- a/native/v8-runtime/npm/linux-arm64-gnu/package.json +++ b/native/v8-runtime/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-arm64-gnu", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-x64-gnu/package.json b/native/v8-runtime/npm/linux-x64-gnu/package.json index 895dc33a2..9fc6a9bf1 100644 --- a/native/v8-runtime/npm/linux-x64-gnu/package.json +++ b/native/v8-runtime/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-x64-gnu", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/win32-x64/package.json b/native/v8-runtime/npm/win32-x64/package.json index bb0fa4724..522cddb45 100644 --- a/native/v8-runtime/npm/win32-x64/package.json +++ b/native/v8-runtime/npm/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-win32-x64", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/package.json b/package.json index 496fb9a59..1ce48635c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firestart-secure-exec-monorepo", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "private": true, "license": "Apache-2.0", "type": "module", diff --git a/packages/core/package.json b/packages/core/package.json index b784da39e..9585d1470 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-core", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 45253001a..82b9211dd 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-nodejs", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/secure-exec/package.json b/packages/secure-exec/package.json index 398c97515..90d144590 100644 --- a/packages/secure-exec/package.json +++ b/packages/secure-exec/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 241cbede6..2f0775f93 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@secure-exec/typescript", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "private": true, "type": "module", "license": "Apache-2.0", diff --git a/packages/v8/package.json b/packages/v8/package.json index 06ff0f68f..51ae74c52 100644 --- a/packages/v8/package.json +++ b/packages/v8/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8", - "version": "0.2.3-rc.1", + "version": "0.2.3-rc.2", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", From 5359049803825281cfae7310f4934757ac8c18dc Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 15:17:45 +0200 Subject: [PATCH 05/12] fix(http): improve binary content handling in fetch body encoding (ESFA-0) Updated the `shouldEncodeHttpBodyAsBinary` function to always encode response bodies as base64 across the bridge to prevent binary corruption. This change simplifies the logic by removing unnecessary content type checks, ensuring consistent handling of binary data. Additionally, enhanced the `encodeFetchBody` function to provide a fallback for base64 decoding using `atob` when Buffer is not available, improving compatibility across environments. Signed-off-by: Tobias Pressler --- packages/nodejs/src/bridge-handlers.ts | 25 ++++--------------------- packages/nodejs/src/bridge/network.ts | 13 +++++++++++-- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/packages/nodejs/src/bridge-handlers.ts b/packages/nodejs/src/bridge-handlers.ts index f86a987c1..47d7baa50 100644 --- a/packages/nodejs/src/bridge-handlers.ts +++ b/packages/nodejs/src/bridge-handlers.ts @@ -4145,28 +4145,11 @@ async function maybeDecompressHttpBody( } function shouldEncodeHttpBodyAsBinary( - urlString: string, - headers: http.IncomingHttpHeaders, + _urlString: string, + _headers: http.IncomingHttpHeaders, ): boolean { - const contentType = headers["content-type"] || ""; - const headerValue = Array.isArray(contentType) ? contentType.join(", ") : contentType; - // No content-type — assume text for backward compatibility - if (!headerValue) { - return false; - } - // Explicitly text-based content types — keep as UTF-8 string - if ( - headerValue.startsWith("text/") || - headerValue.includes("application/json") || - headerValue.includes("application/xml") || - headerValue.includes("application/javascript") || - headerValue.includes("application/x-www-form-urlencoded") || - headerValue.includes("+xml") || - headerValue.includes("+json") - ) { - return false; - } - // Everything else (binary content types like application/pdf, image/*, etc.) + // Always encode response bodies as base64 across the bridge to prevent + // binary corruption. The isolate decodes via Buffer.from(body, "base64"). return true; } diff --git a/packages/nodejs/src/bridge/network.ts b/packages/nodejs/src/bridge/network.ts index a7276baac..bfdec3aa7 100644 --- a/packages/nodejs/src/bridge/network.ts +++ b/packages/nodejs/src/bridge/network.ts @@ -328,8 +328,17 @@ function encodeFetchBody( body: string, bodyEncoding: string | null, ): Uint8Array { - if (bodyEncoding === "base64" && typeof Buffer !== "undefined") { - return new Uint8Array(Buffer.from(body, "base64")); + if (bodyEncoding === "base64") { + if (typeof Buffer !== "undefined") { + return new Uint8Array(Buffer.from(body, "base64")); + } + // Fallback base64 decode via atob + const binary = atob(body); + const bytes = new Uint8Array(binary.length); + for (let i = 0; i < binary.length; i++) { + bytes[i] = binary.charCodeAt(i); + } + return bytes; } if (typeof TextEncoder !== "undefined") { return new TextEncoder().encode(body); From 3736d96696a2f7a782ce0d7b800848d7b493fe40 Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 15:18:03 +0200 Subject: [PATCH 06/12] release: 0.2.3-rc.3 Signed-off-by: Tobias Pressler --- native/v8-runtime/npm/darwin-arm64/package.json | 2 +- native/v8-runtime/npm/darwin-x64/package.json | 2 +- native/v8-runtime/npm/linux-arm64-gnu/package.json | 2 +- native/v8-runtime/npm/linux-x64-gnu/package.json | 2 +- native/v8-runtime/npm/win32-x64/package.json | 2 +- package.json | 2 +- packages/core/package.json | 2 +- packages/nodejs/package.json | 2 +- packages/secure-exec/package.json | 2 +- packages/typescript/package.json | 2 +- packages/v8/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/native/v8-runtime/npm/darwin-arm64/package.json b/native/v8-runtime/npm/darwin-arm64/package.json index 9ed468485..e8da1a8ea 100644 --- a/native/v8-runtime/npm/darwin-arm64/package.json +++ b/native/v8-runtime/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-arm64", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/darwin-x64/package.json b/native/v8-runtime/npm/darwin-x64/package.json index 933783a80..726abfbea 100644 --- a/native/v8-runtime/npm/darwin-x64/package.json +++ b/native/v8-runtime/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-x64", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-arm64-gnu/package.json b/native/v8-runtime/npm/linux-arm64-gnu/package.json index becf08d02..9b027adcd 100644 --- a/native/v8-runtime/npm/linux-arm64-gnu/package.json +++ b/native/v8-runtime/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-arm64-gnu", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-x64-gnu/package.json b/native/v8-runtime/npm/linux-x64-gnu/package.json index 9fc6a9bf1..065f3b158 100644 --- a/native/v8-runtime/npm/linux-x64-gnu/package.json +++ b/native/v8-runtime/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-x64-gnu", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/win32-x64/package.json b/native/v8-runtime/npm/win32-x64/package.json index 522cddb45..0706b244f 100644 --- a/native/v8-runtime/npm/win32-x64/package.json +++ b/native/v8-runtime/npm/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-win32-x64", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/package.json b/package.json index 1ce48635c..8c282707d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firestart-secure-exec-monorepo", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "private": true, "license": "Apache-2.0", "type": "module", diff --git a/packages/core/package.json b/packages/core/package.json index 9585d1470..29fb7ec39 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-core", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 82b9211dd..72718b09e 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-nodejs", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/secure-exec/package.json b/packages/secure-exec/package.json index 90d144590..c714bde78 100644 --- a/packages/secure-exec/package.json +++ b/packages/secure-exec/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 2f0775f93..36487dc32 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@secure-exec/typescript", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "private": true, "type": "module", "license": "Apache-2.0", diff --git a/packages/v8/package.json b/packages/v8/package.json index 51ae74c52..d43195158 100644 --- a/packages/v8/package.json +++ b/packages/v8/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8", - "version": "0.2.3-rc.2", + "version": "0.2.3-rc.3", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", From 7b088378a500b8818e0248835ce30bb7f8828074 Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 15:19:40 +0200 Subject: [PATCH 07/12] fix(http): enhance base64 response handling in fetch methods Updated the fetch response methods to improve handling of base64 encoded data. When the bodyEncoding is set to "base64", the code now checks for the availability of Buffer and falls back to using atob and TextDecoder if Buffer is not defined. This ensures compatibility across different environments and improves the robustness of the response processing. Signed-off-by: Tobias Pressler --- packages/nodejs/src/bridge/network.ts | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/nodejs/src/bridge/network.ts b/packages/nodejs/src/bridge/network.ts index bfdec3aa7..31eb40e36 100644 --- a/packages/nodejs/src/bridge/network.ts +++ b/packages/nodejs/src/bridge/network.ts @@ -650,16 +650,27 @@ export async function fetch(input: string | URL | Request, options: FetchOptions }, async text(): Promise { - if (bodyEncoding === "base64" && typeof Buffer !== "undefined") { - return Buffer.from(responseBody, "base64").toString("utf8"); + if (bodyEncoding === "base64") { + if (typeof Buffer !== "undefined") { + return Buffer.from(responseBody, "base64").toString("utf8"); + } + const binary = atob(responseBody); + return new TextDecoder().decode(Uint8Array.from(binary, c => c.charCodeAt(0))); } return responseBody; }, async json(): Promise { - const textBody = - bodyEncoding === "base64" && typeof Buffer !== "undefined" - ? Buffer.from(responseBody, "base64").toString("utf8") - : responseBody; + let textBody: string; + if (bodyEncoding === "base64") { + if (typeof Buffer !== "undefined") { + textBody = Buffer.from(responseBody, "base64").toString("utf8"); + } else { + const binary = atob(responseBody); + textBody = new TextDecoder().decode(Uint8Array.from(binary, c => c.charCodeAt(0))); + } + } else { + textBody = responseBody; + } return JSON.parse(textBody || "{}"); }, async arrayBuffer(): Promise { From a77e364801ea2311459e71eb6be3338c8084cbe9 Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 16:24:21 +0200 Subject: [PATCH 08/12] fix(response): enhance body handling to support Uint8Array and ArrayBuffer Updated the Response class to allow the body to be of type Uint8Array or ArrayBuffer, improving compatibility with binary data. The constructor now handles these types, and new methods for arrayBuffer and blob have been added to facilitate proper data handling. This change ensures that the response can correctly process and return various data formats, enhancing the overall functionality of the fetch API. Signed-off-by: Tobias Pressler --- packages/nodejs/src/bridge/network.ts | 66 ++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 11 deletions(-) diff --git a/packages/nodejs/src/bridge/network.ts b/packages/nodejs/src/bridge/network.ts index 31eb40e36..ff250b185 100644 --- a/packages/nodejs/src/bridge/network.ts +++ b/packages/nodejs/src/bridge/network.ts @@ -793,7 +793,7 @@ export class Request { // Response class export class Response { - private _body: string | null; + private _body: string | Uint8Array | null; status: number; statusText: string; headers: Headers; @@ -802,8 +802,19 @@ export class Response { url: string; redirected: boolean; - constructor(body?: string | null, init: { status?: number; statusText?: string; headers?: Record } = {}) { - this._body = body || null; + constructor(body?: string | ReadableStream | ArrayBuffer | Uint8Array | null, init: { status?: number; statusText?: string; headers?: Record } = {}) { + if (body === null || body === undefined) { + this._body = null; + } else if (typeof body === "string") { + this._body = body; + } else if (body instanceof Uint8Array) { + this._body = body; + } else if (body instanceof ArrayBuffer) { + this._body = new Uint8Array(body); + } else { + // ReadableStream — store reference, will be consumed lazily + this._body = body as any; + } this.status = init.status || 200; this.statusText = init.statusText || "OK"; this.headers = new Headers(init.headers); @@ -813,26 +824,59 @@ export class Response { this.redirected = false; } + private async _bytes(): Promise { + const body = this._body; + if (body === null) return new Uint8Array(0); + if (body instanceof Uint8Array) return body; + if (typeof body === "string") return new TextEncoder().encode(body); + // ReadableStream + const reader = (body as any).getReader(); + const chunks: Uint8Array[] = []; + while (true) { + const { done, value } = await reader.read(); + if (done) break; + chunks.push(value instanceof Uint8Array ? value : new Uint8Array(value)); + } + const total = chunks.reduce((s: number, c: Uint8Array) => s + c.length, 0); + const result = new Uint8Array(total); + let off = 0; + for (const c of chunks) { result.set(c, off); off += c.length; } + // Cache for subsequent calls + (this as any)._body = result; + return result; + } + async text(): Promise { - return String(this._body || ""); + const bytes = await this._bytes(); + return new TextDecoder().decode(bytes); } async json(): Promise { - return JSON.parse(this._body || "{}"); + return JSON.parse(await this.text()); + } + + async arrayBuffer(): Promise { + const bytes = await this._bytes(); + return bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength) as ArrayBuffer; + } + + async blob(): Promise { + const bytes = await this._bytes(); + return new Blob([bytes as any], { type: this.headers.get("content-type") || "" }); } get body(): { getReader(): { read(): Promise<{ done: boolean; value?: Uint8Array }> } } | null { - const bodyStr = this._body; - if (bodyStr === null) return null; + const self = this; + if (this._body === null) return null; return { getReader() { let consumed = false; return { async read() { - if (consumed) return { done: true }; + if (consumed) return { done: true as const }; consumed = true; - const encoder = new TextEncoder(); - return { done: false, value: encoder.encode(bodyStr) }; + const bytes = await self._bytes(); + return { done: false as const, value: bytes }; }, }; }, @@ -840,7 +884,7 @@ export class Response { } clone(): Response { - return new Response(this._body, { status: this.status, statusText: this.statusText }); + return new Response(this._body as any, { status: this.status, statusText: this.statusText }); } static error(): Response { From 505e7459836bc980633552f9ee8b85f2a644c94b Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Tue, 28 Apr 2026 16:24:40 +0200 Subject: [PATCH 09/12] release: 0.2.3-rc.4 Signed-off-by: Tobias Pressler --- native/v8-runtime/npm/darwin-arm64/package.json | 2 +- native/v8-runtime/npm/darwin-x64/package.json | 2 +- native/v8-runtime/npm/linux-arm64-gnu/package.json | 2 +- native/v8-runtime/npm/linux-x64-gnu/package.json | 2 +- native/v8-runtime/npm/win32-x64/package.json | 2 +- package.json | 2 +- packages/core/package.json | 2 +- packages/nodejs/package.json | 2 +- packages/secure-exec/package.json | 2 +- packages/typescript/package.json | 2 +- packages/v8/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/native/v8-runtime/npm/darwin-arm64/package.json b/native/v8-runtime/npm/darwin-arm64/package.json index e8da1a8ea..0e75c7e70 100644 --- a/native/v8-runtime/npm/darwin-arm64/package.json +++ b/native/v8-runtime/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-arm64", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/darwin-x64/package.json b/native/v8-runtime/npm/darwin-x64/package.json index 726abfbea..6507d3536 100644 --- a/native/v8-runtime/npm/darwin-x64/package.json +++ b/native/v8-runtime/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-x64", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-arm64-gnu/package.json b/native/v8-runtime/npm/linux-arm64-gnu/package.json index 9b027adcd..640fe7ae7 100644 --- a/native/v8-runtime/npm/linux-arm64-gnu/package.json +++ b/native/v8-runtime/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-arm64-gnu", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-x64-gnu/package.json b/native/v8-runtime/npm/linux-x64-gnu/package.json index 065f3b158..4bdf7049f 100644 --- a/native/v8-runtime/npm/linux-x64-gnu/package.json +++ b/native/v8-runtime/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-x64-gnu", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/win32-x64/package.json b/native/v8-runtime/npm/win32-x64/package.json index 0706b244f..9b5b2ad67 100644 --- a/native/v8-runtime/npm/win32-x64/package.json +++ b/native/v8-runtime/npm/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-win32-x64", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/package.json b/package.json index 8c282707d..2d4c7d645 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firestart-secure-exec-monorepo", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "private": true, "license": "Apache-2.0", "type": "module", diff --git a/packages/core/package.json b/packages/core/package.json index 29fb7ec39..df746095d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-core", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index 72718b09e..c9b7fc4e8 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-nodejs", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/secure-exec/package.json b/packages/secure-exec/package.json index c714bde78..2b562f8f4 100644 --- a/packages/secure-exec/package.json +++ b/packages/secure-exec/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 36487dc32..9b22878f7 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@secure-exec/typescript", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "private": true, "type": "module", "license": "Apache-2.0", diff --git a/packages/v8/package.json b/packages/v8/package.json index d43195158..b52d73aac 100644 --- a/packages/v8/package.json +++ b/packages/v8/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8", - "version": "0.2.3-rc.3", + "version": "0.2.3-rc.4", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", From 596ffe365d1f8403f6632c6eb98a15ba00be21a5 Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Mon, 11 May 2026 11:58:23 +0200 Subject: [PATCH 10/12] fix(v8-runtime): reorder ICU data candidates to prioritize full data for non-English locales (ESFA-0) Signed-off-by: Tobias Pressler --- native/v8-runtime/build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/native/v8-runtime/build.rs b/native/v8-runtime/build.rs index bad03ff22..c4c4b362e 100644 --- a/native/v8-runtime/build.rs +++ b/native/v8-runtime/build.rs @@ -36,9 +36,12 @@ fn read_v8_version(lock_path: &Path) -> String { fn find_v8_icu_data(v8_version: &str) -> PathBuf { let registry_src = cargo_home().join("registry").join("src"); + // Order matters: prefer full ICU data (flutter_desktop) over the + // stripped-down common variant which only supports English and causes + // "Internal error. Icu error." for non-English locales. let candidates = [ - Path::new("third_party/icu/common/icudtl.dat"), Path::new("third_party/icu/flutter_desktop/icudtl.dat"), + Path::new("third_party/icu/common/icudtl.dat"), Path::new("third_party/icu/chromecast_video/icudtl.dat"), ]; From 122c119f0c1b0c1a476d8efc9cf1a20aa814760f Mon Sep 17 00:00:00 2001 From: Tobias Pressler Date: Mon, 11 May 2026 11:58:27 +0200 Subject: [PATCH 11/12] release: 0.2.3-rc.5 Signed-off-by: Tobias Pressler --- native/v8-runtime/npm/darwin-arm64/package.json | 2 +- native/v8-runtime/npm/darwin-x64/package.json | 2 +- native/v8-runtime/npm/linux-arm64-gnu/package.json | 2 +- native/v8-runtime/npm/linux-x64-gnu/package.json | 2 +- native/v8-runtime/npm/win32-x64/package.json | 2 +- package.json | 2 +- packages/core/package.json | 2 +- packages/nodejs/package.json | 2 +- packages/secure-exec/package.json | 2 +- packages/typescript/package.json | 2 +- packages/v8/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/native/v8-runtime/npm/darwin-arm64/package.json b/native/v8-runtime/npm/darwin-arm64/package.json index 0e75c7e70..0c0ce8f82 100644 --- a/native/v8-runtime/npm/darwin-arm64/package.json +++ b/native/v8-runtime/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-arm64", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/darwin-x64/package.json b/native/v8-runtime/npm/darwin-x64/package.json index 6507d3536..5d84c9e43 100644 --- a/native/v8-runtime/npm/darwin-x64/package.json +++ b/native/v8-runtime/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-darwin-x64", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-arm64-gnu/package.json b/native/v8-runtime/npm/linux-arm64-gnu/package.json index 640fe7ae7..79e334ee2 100644 --- a/native/v8-runtime/npm/linux-arm64-gnu/package.json +++ b/native/v8-runtime/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-arm64-gnu", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/linux-x64-gnu/package.json b/native/v8-runtime/npm/linux-x64-gnu/package.json index 4bdf7049f..d6fc2e35b 100644 --- a/native/v8-runtime/npm/linux-x64-gnu/package.json +++ b/native/v8-runtime/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-linux-x64-gnu", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/native/v8-runtime/npm/win32-x64/package.json b/native/v8-runtime/npm/win32-x64/package.json index 9b5b2ad67..578352ff6 100644 --- a/native/v8-runtime/npm/win32-x64/package.json +++ b/native/v8-runtime/npm/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8-win32-x64", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "license": "Apache-2.0", "publishConfig": { "registry": "https://npm.pkg.github.com" diff --git a/package.json b/package.json index 2d4c7d645..5d93eb093 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "firestart-secure-exec-monorepo", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "private": true, "license": "Apache-2.0", "type": "module", diff --git a/packages/core/package.json b/packages/core/package.json index df746095d..d31052d9c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-core", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/nodejs/package.json b/packages/nodejs/package.json index c9b7fc4e8..4bcf22ca4 100644 --- a/packages/nodejs/package.json +++ b/packages/nodejs/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-nodejs", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/secure-exec/package.json b/packages/secure-exec/package.json index 2b562f8f4..db9b20d5f 100644 --- a/packages/secure-exec/package.json +++ b/packages/secure-exec/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 9b22878f7..bf69c8484 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@secure-exec/typescript", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "private": true, "type": "module", "license": "Apache-2.0", diff --git a/packages/v8/package.json b/packages/v8/package.json index b52d73aac..a7ba34cbb 100644 --- a/packages/v8/package.json +++ b/packages/v8/package.json @@ -1,6 +1,6 @@ { "name": "@firestartorg/secure-exec-v8", - "version": "0.2.3-rc.4", + "version": "0.2.3-rc.5", "type": "module", "license": "Apache-2.0", "main": "./dist/index.js", From a97ecb63b505ff5622bae6a7286d90e787c6f631 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 09:59:55 +0000 Subject: [PATCH 12/12] chore(deps): bump uuid in /packages/secure-exec/tests/projects/uuid-pass Bumps [uuid](https://github.com/uuidjs/uuid) from 11.1.0 to 14.0.0. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v11.1.0...v14.0.0) --- updated-dependencies: - dependency-name: uuid dependency-version: 14.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- packages/secure-exec/tests/projects/uuid-pass/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/secure-exec/tests/projects/uuid-pass/package.json b/packages/secure-exec/tests/projects/uuid-pass/package.json index fea1064f9..f044a1083 100644 --- a/packages/secure-exec/tests/projects/uuid-pass/package.json +++ b/packages/secure-exec/tests/projects/uuid-pass/package.json @@ -3,6 +3,6 @@ "private": true, "type": "module", "dependencies": { - "uuid": "11.1.0" + "uuid": "14.0.0" } }