From c29c4eb5d1121aa064cd1bd5410ef9f66a9c9879 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Tue, 21 Apr 2026 17:11:13 +0200 Subject: [PATCH 1/2] docs: blob and url ts polyfill Signed-off-by: David Dal Busco --- docs/reference/functions/typescript/node.md | 35 ++++++++++++++++----- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/docs/reference/functions/typescript/node.md b/docs/reference/functions/typescript/node.md index cceae941..28a5eb06 100644 --- a/docs/reference/functions/typescript/node.md +++ b/docs/reference/functions/typescript/node.md @@ -4,15 +4,13 @@ The TypeScript runtime used in Juno does not provide full Node.js support. Polyf If you require a specific Node.js feature or are blocked by a missing polyfill, please reach out or open an issue. Features are prioritized based on usage and compatibility. ---- - -## Globals +The following globals are available out of the box, without any imports. -Some global functions are supported but come with important limitations or added details. +--- -### Math.random +## Math.random -Generates a pseudo-random number between 0 (inclusive) and 1 (exclusive) is supported. +Generates a pseudo-random number between 0 (inclusive) and 1 (exclusive). However, the generator is seeded once after upgrade of the Satellite. Use it with caution. @@ -28,7 +26,7 @@ const value = Math.random(); --- -### Console +## Console Logging is fully supported. Objects are stringified and logs are routed to the IC-CDK `print()` function, making them visible in your Satellite logs including inside the Juno Console UI in development or production. @@ -36,3 +34,26 @@ Logging is fully supported. Objects are stringified and logs are routed to the I console.log("Hello from the Satellite"); console.info("Hello", { type: "info", msg: "Something happened" }); ``` + +--- + +## Blob + +`Blob` represents immutable raw binary data. + +```typescript +const blob = new Blob(["Hello from the Satellite"], { type: "text/plain" }); +const text = await blob.text(); +``` + +--- + +## URL + +Parses and manipulates URLs with `URL` and `URLSearchParams`. + +```typescript +const url = new URL("https://example.com?foo=bar"); +console.log(url.hostname); // example.com +console.log(url.searchParams.get("foo")); // bar +``` From d0adc718f67ea395fad0add25be89f0a655700c2 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 15:13:51 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=84=20Update=20LLMs.txt=20snapshot?= =?UTF-8?q?=20for=20PR=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .llms-snapshots/llms-full.txt | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.llms-snapshots/llms-full.txt b/.llms-snapshots/llms-full.txt index f8a2046e..a1600a83 100644 --- a/.llms-snapshots/llms-full.txt +++ b/.llms-snapshots/llms-full.txt @@ -13000,15 +13000,13 @@ The TypeScript runtime used in Juno does not provide full Node.js support. Polyf If you require a specific Node.js feature or are blocked by a missing polyfill, please reach out or open an issue. Features are prioritized based on usage and compatibility. ---- - -## Globals +The following globals are available out of the box, without any imports. -Some global functions are supported but come with important limitations or added details. +--- -### Math.random +## Math.random -Generates a pseudo-random number between 0 (inclusive) and 1 (exclusive) is supported. +Generates a pseudo-random number between 0 (inclusive) and 1 (exclusive). However, the generator is seeded once after upgrade of the Satellite. Use it with caution. @@ -13022,7 +13020,7 @@ const value = Math.random(); --- -### Console +## Console Logging is fully supported. Objects are stringified and logs are routed to the IC-CDK `print()` function, making them visible in your Satellite logs including inside the Juno Console UI in development or production. @@ -13030,6 +13028,26 @@ Logging is fully supported. Objects are stringified and logs are routed to the I console.log("Hello from the Satellite");console.info("Hello", { type: "info", msg: "Something happened" }); ``` +--- + +## Blob + +`Blob` represents immutable raw binary data. + +``` +const blob = new Blob(["Hello from the Satellite"], { type: "text/plain" });const text = await blob.text(); +``` + +--- + +## URL + +Parses and manipulates URLs with `URL` and `URLSearchParams`. + +``` +const url = new URL("https://example.com?foo=bar");console.log(url.hostname); // example.comconsole.log(url.searchParams.get("foo")); // bar +``` + # Schema Types Juno provides a type system built on top of [Zod](https://zod.dev/), extended with a few additional types you'll need when working with serverless functions.