feat(storage): refactor storage config and remove module registry
Introduce a dedicated `storage-config.js` for registering public prefixes and access policies via `configureStorageApi()`, replacing the previous `getAllStoragePublicPrefixes` / `getAllStorageAccessPolicies` imports from the module registry. Remove `getAllApiRoutes()` from the router so module-level routes are no longer auto-collected; feature routes must now be registered explicitly via `registerFeatureRoutes()` during `initializeZen()`. Update `.env.example` to document separate `ZEN_STORAGE_PROVIDER`, `ZEN_STORAGE_B2_*` variables for Backblaze B2 alongside the existing Cloudflare R2 variables, making provider selection explicit. Clean up admin navigation and page components to drop module-injected nav entries, keeping only core and system sections.
This commit is contained in:
+1
-10
@@ -23,20 +23,11 @@ export * as stripe from "./core/payments/stripe.js";
|
||||
// Export PDF utilities as namespace
|
||||
export * as pdf from "./core/pdf/index.js";
|
||||
|
||||
// Export module system as namespace
|
||||
export * as moduleSystem from "./core/modules/index.js";
|
||||
|
||||
// NOTE: Toast components are CLIENT ONLY - import from '@zen/core/toast'
|
||||
// Do not export here to avoid mixing client/server boundaries
|
||||
|
||||
// Export modules system as namespace (legacy, includes invoice module)
|
||||
export * as modules from "./modules/index.js";
|
||||
|
||||
// Export public pages (Zen routes)
|
||||
export { PublicPagesLayout, PublicPagesClient } from "./modules/pages.js";
|
||||
|
||||
// Export app configuration utilities
|
||||
export { getAppName, getAppConfig, getSessionCookieName, getModulesConfig, getPublicBaseUrl } from "./shared/lib/appConfig.js";
|
||||
export { getAppName, getAppConfig, getSessionCookieName, getPublicBaseUrl } from "./shared/lib/appConfig.js";
|
||||
|
||||
// Export initialization utilities
|
||||
export { initializeZen, resetZenInitialization } from "./shared/lib/init.js";
|
||||
|
||||
Reference in New Issue
Block a user