jco
CLI. Your module is bundled with the StarlingMonkey JavaScript runtime into a
single WASI Preview 2 component.
Prerequisites
- Node.js 18 or newer, with npm.
- The Noorle CLI.
- The shared WebAssembly tools, installed once with
noorle plugin prepare.
Layout
The interface
The implementation
Export a function per WIT export. WIT’s kebab-case names map to camelCase in JavaScript, socheck-weather is implemented as checkWeather.
fetch()works. StarlingMonkey implements it over WASI HTTP, so ordinaryfetchcalls go out through the host — subject to the host allowlist innoorle.yaml.- Environment access is an import.
getEnvironment()fromwasi:cli/environmentreturns the key/value pairs you allowed, and nothing else.
async; the component model call is driven to
completion for you.
package.json
"type": "module" is required — ComponentizeJS consumes ES modules.
noorle.yaml
Build
build.sh, which installs dependencies, fetches the
WIT dependencies, and componentizes:
Test locally
Deploy
Next
- TypeScript — the same toolchain with types
- noorle.yaml reference
- Permissions