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:
@@ -1,9 +1,12 @@
|
|||||||
// index.ts
|
// index.ts
|
||||||
//
|
//
|
||||||
// Barrel export for auth module.
|
// 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 { hashPassword, verifyPassword } from "./password";
|
||||||
export { authRoutes } from "./routes";
|
|
||||||
export { AuthService } from "./service";
|
export { AuthService } from "./service";
|
||||||
export { type AuthStore, InMemoryAuthStore } from "./store";
|
export { type AuthStore, InMemoryAuthStore } from "./store";
|
||||||
export { generateToken, hashToken, SESSION_COOKIE_NAME } from "./token";
|
export { generateToken, hashToken, SESSION_COOKIE_NAME } from "./token";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import nunjucks from "nunjucks";
|
import nunjucks from "nunjucks";
|
||||||
import { DateTime } from "ts-luxon";
|
import { DateTime } from "ts-luxon";
|
||||||
import { authRoutes } from "./auth";
|
import { authRoutes } from "./auth/routes";
|
||||||
import { contentTypes } from "./content-types";
|
import { contentTypes } from "./content-types";
|
||||||
import { multiHandler } from "./handlers";
|
import { multiHandler } from "./handlers";
|
||||||
import { HttpCode, httpCodes } from "./http-codes";
|
import { HttpCode, httpCodes } from "./http-codes";
|
||||||
|
|||||||
Reference in New Issue
Block a user