From 34f0b9da22300eb986e6f709146c40589a366c8f Mon Sep 17 00:00:00 2001 From: Hyko Date: Sat, 25 Apr 2026 12:52:32 -0400 Subject: [PATCH] refactor(auth): remove actions re-export from server barrel to avoid next/headers import issue - update barrel comment to document why actions.js is excluded - remove re-exports of server actions that depend on `next/headers` at module load time - instruct consumers to import actions explicitly via @zen/core/features/auth/actions --- src/features/auth/index.js | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/features/auth/index.js b/src/features/auth/index.js index 287990c..c1ab34c 100644 --- a/src/features/auth/index.js +++ b/src/features/auth/index.js @@ -1,6 +1,10 @@ /** - * Zen Authentication — server barrel. - * Server actions live in @zen/core/features/auth/actions. + * Zen Authentication — server barrel (Next.js-free). + * + * Does NOT re-export actions.js — that file imports `next/headers` at the + * top level and cannot be pulled in via this barrel (which is imported by + * external modules during instrumentation, before Next.js aliases are active). + * Import server actions explicitly via @zen/core/features/auth/actions. */ export { @@ -39,16 +43,3 @@ export { generateToken, generateId } from './password.js'; - -export { - registerAction, - loginAction, - logoutAction, - getSession, - forgotPasswordAction, - resetPasswordAction, - verifyEmailAction, - setupAccountAction, - setSessionCookie, - refreshSessionCookie -} from './actions.js';