diff --git a/express/auth/index.ts b/express/auth/index.ts index 383fd8e..35f06a9 100644 --- a/express/auth/index.ts +++ b/express/auth/index.ts @@ -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"; diff --git a/express/routes.ts b/express/routes.ts index 3ef0093..26028b2 100644 --- a/express/routes.ts +++ b/express/routes.ts @@ -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";