plts
stopgap · TypeScript and JavaScript procedural language and artifact runtime
Overview
PostgreSQL · 14, 15, 16, 17, 18
Usage
Sources:
plts provides the procedural language and compiler/artifact APIs used by Stopgap. It is an untrusted extension; installation requires a superuser. Cargo features cover PostgreSQL 14–18, with 17 selected by default.
Core Workflow
Operational Boundaries
plts.compile_ts() compiles TypeScript, plts.typecheck_ts() checks it, plts.compile_and_store() saves an artifact and plts.get_artifact() retrieves one. Standalone modules use a default export; Stopgap application modules use named exports. Database calls execute in the SQL transaction. Runtime availability depends on the source build features and compiler/runtime assets; the README also describes an ongoing compiler migration, so verify the pinned runtime contract before deployment. Compiler service and backend-local runtime settings are distinct; do not assume that creating the extension alone enables every build configuration.
Compilation and typechecking require shared_preload_libraries = 'plts' and a server restart to start the shared TSGo compiler worker.