NCAAM and NCAAW simulators imported getParticipantSimulatorInputs from models/simulator, which imports manifest.ts, which imports registry.ts — creating a cycle back through registry.ts → simulator files. This caused a TDZ ReferenceError in the client bundle. Fix: inline a direct seasonParticipantSimulatorInputs query in both simulators (they already run direct DB queries) instead of going through the model layer, breaking the cycle. Also moves getSimulatorInputPolicy from the component body to the loader on the simulator setup page. The component calling it pulled input-policy.ts → manifest.ts → registry.ts → all simulator implementations into the client bundle, which contain Node.js-only code and caused "Error loading route module" in production. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| simulations | ||
| standings-sync | ||
| bracket-simulator.ts | ||
| brackt.server.ts | ||
| discord.ts | ||
| ev-calculator.ts | ||
| icm-calculator.ts | ||
| probability-engine.ts | ||
| probability-updater.ts | ||
| sync-tournament-results.ts | ||