tcmEnv
uses process
The environment a tcm the studio runs gets: its own, as you would run tcm, without the studio's variables (the
codebase it serves, its sign-in, stopping with it) or the NODE_ENV=production tcm start gave it (tcm dev
would bundle React's production build, without the development JSX its code is compiled to).
export function tcmEnv(): NodeJS.ProcessEnv { const env: NodeJS.ProcessEnv = { ...process.env }; for (const k of [ "NODE_ENV", "TCM_CODEBASE", "TCM_SHARE_CODEBASE", "TCM_SHARE_TOKEN", "TCM_SHARE_PUBLIC", "TCM_STOP_WITH_PARENT", ]) delete env[k]; return env; }