node_modules for packages (see Packages).
Native capabilities are deny-by-default. The Permission column names the
flag a global needs; — means it is always available. Full model:
Permissions.
Globals
Notes:
process.argv,pid,cwd,exit,on,once,off,memoryUsage, andstatsare not gated. Onlyprocess.env(env),process.chdir(readon the target), andprocess.killto a PID other thanprocess.pid(runfor"kill") need a flag.Workerloading is a program-loading carve-out:new Worker(path)does not needread. The worker inherits the process policy for everything it calls.httpalways needsnetfor its0.0.0.0:<port>bind.readis only checked whentls.cert/tls.keyare file paths rather than inline PEM.sql/SQLchecksnetagainst the target host:port. If TLS is configured withsslrootcert,readon the CA bundle is also checked. The globalsqlpool checksenvto discoverDATABASE_URL/PG*settings.Database.open(":memory:")needs no path permission.
Timer handles
setTimeout / setInterval return a Timeout object (pass it to
clearTimeout / clearInterval, or call its methods):
Static helpers you’ll use constantly
Quick reference
Response statics
Database methods
Database.open(":memory:") is exempt from the path gates.
sql / SQL methods
new SQL(dsn | options) checks net against the target host and port (and read on sslrootcert if TLS is enabled). The global sql
also needs env if it should read PG_TEST_DSN / DATABASE_URL / PG* (including PGSSLMODE, PGSSLROOTCERT) at
startup; otherwise it falls back to 127.0.0.1:5432.
Not provided
These common Node/browser globals are absent — with the substitute to use instead:
Full list with rationale: Compatibility.
See also
- Permissions — flags, scopes, error contract
- Event loop — how these globals interact
- Limitations — every hard cap
- CLI — how to run your code