Documentation
¶
Overview ¶
Package functions builds server-side functions: `backd functions build` bundles each function of a database's Deno project into one file with `deno bundle`, and records the bundles in a manifest that startup checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DenoVersion ¶
DenoVersion returns the version of the deno binary.
func JSDocTypes ¶
JSDocTypes generates JSDoc typedefs from every function's input and output JSON Schemas (`backd functions types`), for editor autocomplete on ctx.input and the return value. A function without a schema, or whose schema can't be read or parsed, is skipped (with a comment explaining why for the latter): this never fails outright, so the command always produces something to paste into an editor.
func Watch ¶
Watch rebuilds each functions project's bundles whenever its sources change, until ctx is done. For `BACKD_DEV=true`: function code is picked up automatically; schemas, rules and realm.yaml still need a restart. A build failure (e.g. a syntax error) is logged and retried every tick until the source changes again or the problem is fixed.