refactor(admin): split protect guards into dedicated export path

- remove `protectAdmin`/`isAdmin` re-exports from `features/admin/index.js` to avoid top-level `next/headers` import
- add `./features/admin/protect` export entry in `package.json`
- lazy-import `next/headers` in `router.js` `requireAuth` to defer resolution
- update `features/admin/README.md` to document new import paths
- translate `features/auth/index.js` comment to French for consistency
This commit is contained in:
2026-04-25 13:01:06 -04:00
parent 6bbf3f1507
commit 7afcb2cb5a
5 changed files with 22 additions and 10 deletions
+3
View File
@@ -72,6 +72,9 @@
"./features/admin": {
"import": "./dist/features/admin/index.js"
},
"./features/admin/protect": {
"import": "./dist/features/admin/protect.js"
},
"./features/admin/server": {
"import": "./dist/features/admin/AdminPage.server.js"
},