Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Module = fx.Module( "vef:js", fx.Provide( fx.Annotate( func(bus event.Bus, db orm.DB, kind config.DBKind, appLibs []js.Lib) (*js.Engine, error) { return NewEngine(logger, bus, db, kind, appLibs) }, fx.ParamTags(``, ``, ``, `group:"vef:js:libs"`), ), ), )
Module wires the JavaScript scripting engine: the framework capability libraries are seeded at safe defaults across two tiers — the safe utilities (console, crypto, cache) are always installed, while the side-effecting capabilities (events, http, sql) stay opt-in per runtime — and any application library (group "vef:js:libs", registered via vef.ProvideJSLib) overrides a same-named default (keeping its tier) or adds a new opt-in library.
Functions ¶
func NewEngine ¶
func NewEngine(logger logx.Logger, bus event.Bus, db orm.DB, kind config.DBKind, appLibs []js.Lib) (*js.Engine, error)
NewEngine builds the application-wide engine, seeding the always-on utility libraries and the opt-in capability libraries at safe defaults, then overlaying the application-provided libraries. logger receives the script console output.
Types ¶
This section is empty.