Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

764 B
Raw Blame
/**
 * Plugin-system kill switch (#plugins). On by default — the runtime and the
 * Admin → Plugins panel are available out of the box, but installed plugins
 * still have to be activated one by one, so no third-party code runs until an
 * admin turns a specific plugin on. Set TREK_PLUGINS_ENABLED=false to switch the
 * whole system off (installed plugins stay on disk, deactivated). Lives in its
 * own module (not config.ts), whose values are frozen at import and replaced
 * wholesale under test: the plugin runtime reads the env directly here. Read at call time so tests and runtime env changes take effect
 * immediately.
 */
import { readEnv } from '../../app-config';

export function pluginsEnabled(): boolean {
  return readEnv().plugins.enabled;
}