feat(core)!: introduce runtime extension registry and flat module conventions
BREAKING CHANGE: sup config now derives entries from package.json#exports and a server/client glob instead of manual lists; module structure follows flat + barrel convention with .server.js/.client.js runtime suffixes
This commit is contained in:
+24
-13
@@ -1,16 +1,27 @@
|
||||
/**
|
||||
* Zen Admin Module
|
||||
* Admin panel functionality with role-based access control
|
||||
* Zen Admin — barrel serveur.
|
||||
*
|
||||
* - Gardes d'accès : protectAdmin, isAdmin.
|
||||
* - Navigation : buildNavigationSections.
|
||||
* - Registre d'extensions : registerWidget, registerWidgetFetcher, registerNavItem,
|
||||
* registerNavSection, registerPage (import une seule fois depuis le layout
|
||||
* racine de l'app consommatrice pour que les side effects s'exécutent).
|
||||
*
|
||||
* Client components sous @zen/core/features/admin/components.
|
||||
*/
|
||||
|
||||
// Middleware exports
|
||||
export { protectAdmin, isAdmin } from './middleware/protect.js';
|
||||
|
||||
// Component exports (for catch-all routes)
|
||||
export { AdminPagesClient, AdminPagesLayout } from './pages.js';
|
||||
|
||||
// NOTE: Server-only navigation builder is in '@zen/core/admin/navigation'
|
||||
// Do NOT import from this file to avoid bundling database code into client
|
||||
|
||||
// NOTE: Admin server actions are exported separately to avoid bundling issues
|
||||
// Import them from '@zen/core/admin/actions' instead
|
||||
export { protectAdmin, isAdmin } from './protect.js';
|
||||
export { buildNavigationSections } from './navigation.js';
|
||||
export {
|
||||
registerWidget,
|
||||
registerWidgetFetcher,
|
||||
registerNavItem,
|
||||
registerNavSection,
|
||||
registerPage,
|
||||
collectWidgetData,
|
||||
getWidgets,
|
||||
getNavItems,
|
||||
getNavSections,
|
||||
getPage,
|
||||
getPages,
|
||||
} from './registry.js';
|
||||
|
||||
Reference in New Issue
Block a user