mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
22b398ad8c
Module boundaries were held by review alone. storage.module.ts documents a cycle that only surfaced at runtime as "imports[1] is undefined", three modules exist just to break cycles, and nothing stopped the next feature from reaching into another domain's helpers. scripts/import-boundaries.mjs parses every import under src/ with the TypeScript parser and checks five rules against a baseline of today's violations: load-time file cycles (none today once type-only and lazy imports and the two-way MikroORM entity relations are left out), new dependencies between domains that already depend on each other (262 pairs, one tangle around plugins and auth), shared-kernel files importing a domain (8), imports of another domain's internals (69) and src/db importing src/nest (5). A domain's public surface is what the code already treats that way: modules, services, guards, decorators, types, constants, the audit logger, the plugin RPC kit and the addon gates. New violations fail, --update only drops entries, and an unreadable baseline, a missing src/ or an import it cannot resolve stops the run.