javascript

module
v0.0.0-...-8dc2fe4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: MIT

README

Gateway JavaScript extension

This optional Go package adds the javascript automation language using the pinned QuickJS-NG adapter. It implements the public github.com/webong/gateway/driver/automation interface and does not import Spinner. A default Gateway build does not link QuickJS.

Enable it when building a Gateway composition root:

go build -tags gateway_javascript ./src/spinner/cmd/proxy

Install the companion Composer package in Planner so it can register the language as Spinner-executed with route and schedule capabilities:

composer require webong/gateway-javascript

The provider uses the shared PHP interfaces in lib/contract; it does not import Planner implementation classes. Spinner still advertises the compiled engine at runtime, so installing only the companion package fails closed.

Use gateway_javascript,gateway_lua to install both Go language extensions. The engine exposes only gateway.event, gateway.get, gateway.set, gateway.respond, gateway.forward, and declarative gateway.schedule; it does not expose host modules, filesystem, processes, imports, or raw network access.

Directories

Path Synopsis
Package runtime implements the optional JavaScript automation extension.
Package runtime implements the optional JavaScript automation extension.
qjs
Package qjs keeps Gateway's JSON-in/JSON-out interface to QuickJS-NG.
Package qjs keeps Gateway's JSON-in/JSON-out interface to QuickJS-NG.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL