feat(app): wire bindAll() + bindAllDevSeed() dispatcher; add DI explainer page
apps/web-next/src/server/bind-production.ts now exports three functions: - bindAllProduction() — production-only binders - bindAllDevSeed() — dev-seed-only binders (NEW, calls all 5 features) - bindAll() — dispatcher that branches on USE_DEV_SEED env var All page/route callers (page.tsx, about/page.tsx, blog/[slug]/page.tsx, api/trpc/[trpc]/route.ts) updated from bindAllProduction → bindAll so the env flag actually has effect. docs/architecture/di-explainer.html (NEW): standalone interactive page explaining the di/ folder file-by-file, the loading sequence (8 stages), the three binding kinds (.to / .toDynamicValue / .toConstantValue), an interactive three-mode picker showing how the same blogContainer state differs across default/dev-seed/production, a conditions table, and a final card on how tests bypass DI entirely. Sister page to data-flow-explainer.html. Refactor log entry + canonical doc updates follow in subsequent commits.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { appRouter } from "@repo/core-api";
|
||||
import { bindAllProduction } from "../../server/bind-production";
|
||||
import { bindAll } from "../../server/bind-production";
|
||||
|
||||
export default async function AboutPage() {
|
||||
await bindAllProduction();
|
||||
await bindAll();
|
||||
const caller = appRouter.createCaller({});
|
||||
const page = await caller.marketingPages.pageBySlug({ slug: "about" });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user