refactor(server): remaining nest domains read env via app-config

This commit is contained in:
jubnl
2026-07-25 15:29:13 +02:00
parent 9e87e09d03
commit d13758221e
15 changed files with 49 additions and 29 deletions
+5 -3
View File
@@ -11,11 +11,13 @@
* touches that gate — but the two properties above are why loading unsigned local
* code must be gated behind an explicit flag on top of the admin + kill-switch gates.
*
* Enable ONLY by setting `TREK_PLUGINS_DEV_LINK=1`. Off (absent/any other value)
* by default, so it can never be silently on in a shared or production deployment.
* Enable ONLY by setting `TREK_PLUGINS_DEV_LINK` to an explicit truthy value
* (1/true/on/yes). Off (absent/any other value) by default, so it can never be
* silently on in a shared or production deployment.
*/
import { readEnv } from '../../app-config';
export function devLinkEnabled(): boolean {
return process.env.TREK_PLUGINS_DEV_LINK === '1';
return readEnv().plugins.devLink;
}
/** Provenance marker stamped on a dev-linked plugin row (free-text `source_repo`). */