Fix circular dependency breaking ncc bundle

Don't export authRoutes from barrel file to break the cycle:
services.ts → auth/index.ts → auth/routes.ts → services.ts

Import authRoutes directly from ./auth/routes instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-03 14:24:53 -06:00
parent 39cd93c81e
commit c926f15aab
2 changed files with 5 additions and 2 deletions

View File

@@ -1,9 +1,12 @@
// index.ts
//
// Barrel export for auth module.
//
// NOTE: authRoutes is NOT exported here to avoid circular dependency:
// services.ts → auth/index.ts → auth/routes.ts → services.ts
// Import authRoutes directly from "./auth/routes" instead.
export { hashPassword, verifyPassword } from "./password";
export { authRoutes } from "./routes";
export { AuthService } from "./service";
export { type AuthStore, InMemoryAuthStore } from "./store";
export { generateToken, hashToken, SESSION_COOKIE_NAME } from "./token";

View File

@@ -2,7 +2,7 @@
import nunjucks from "nunjucks";
import { DateTime } from "ts-luxon";
import { authRoutes } from "./auth";
import { authRoutes } from "./auth/routes";
import { contentTypes } from "./content-types";
import { multiHandler } from "./handlers";
import { HttpCode, httpCodes } from "./http-codes";