Documentation / @zerotal/core / index / devSurfacesEnabled
Function: devSurfacesEnabled()
devSurfacesEnabled():
boolean
Defined in: support/env.ts:68
Whether this process may expose dev-only surfaces — the stack-trace error page, the trace inspector, an open monitor panel.
Two things qualify a process, and both are needed because they answer different questions:
-
serve --devsupervises this process. The orchestrator only ever runs from a developer's terminal (it watches the filesystem and rebundles assets — nothing a deployment does), so its worker is a dev machine by construction. This is the case that carries dev mode, becauseAPP_ENVcannot:setAppEnv()overwrites it with a runtime mode (web,worker,console) before the app boots, so by the time any gate reads it, whatever deployment name the developer configured is gone. -
APP_ENVstill names an explicitly non-production environment. This covers processes started outside the CLI — the test harness, and any embedder that setsAPP_ENVitself rather than throughsetAppEnv().
Anything else fails closed, so a production deploy that sets no APP_ENV
exposes nothing.
Returns
boolean