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.

1.6 KB
Raw Blame
import { Module } from '@nestjs/common';

/**
 * The attachment point for server surfaces that only exist on a centrally
 * administered install.
 *
 * Empty here, and empty in every build of this repository: no controllers, no
 * providers, no routes. An installation whose operator ships additional
 * endpoints replaces this file at build time.
 *
 * app.module.ts imports it unconditionally, which is the point. A conditional
 * import would make the module graph depend on an environment variable, and the
 * graph is built once per app while TREK_MANAGED is read live — the two do not
 * belong in the same expression (see app-config/README.md on the boot-stable vs
 * runtime-toggled split). An empty module costs nothing to import, so the flag
 * never has to reach this far.
 *
 * Anything added here follows the same rules as the rest of src/nest: a real
 * module with a controller and a provider, bodies through the Zod pipe, routes
 * covered by the global guards, and its own tests. Being outside this repository
 * is not a reason to be outside its standards.
 */
@Module({})
export class ManagedExtModule {}

/**
 * Routes of this module that answer without a session, as `Controller.handler`.
 *
 * Empty here, like the module. bootstrap.ts adds them to the allow-list of the
 * boot gate (validate-route-guards.ts), so an install that replaces this file declares its
 * anonymous surface in the same place it adds it, and the gate still fails on a
 * route that is missing here or an entry that is stale.
 */
export const MANAGED_PUBLIC_ROUTES: readonly string[] = [];