feat(navigation): conformance manifest + self-asserting bind-production
This commit is contained in:
@@ -6,8 +6,10 @@ import {
|
||||
type ILogger,
|
||||
} from "@repo/core-shared/instrumentation";
|
||||
import type { BindProductionContext } from "@repo/core-shared/di";
|
||||
import { assertFeatureConformance } from "@repo/core-shared/conformance";
|
||||
import { navigationContainer } from "./container";
|
||||
import { NAVIGATION_SYMBOLS } from "./symbols";
|
||||
import { navigationManifest } from "../feature.manifest";
|
||||
import { HeaderRepository } from "../infrastructure/repositories/header.repository";
|
||||
import { getHeaderUseCase } from "../application/use-cases/get-header.use-case";
|
||||
import { getHeaderController } from "../interface-adapters/controllers/get-header.controller";
|
||||
@@ -78,4 +80,12 @@ export function bindProductionNavigation(ctx: BindProductionContext): void {
|
||||
// <gen:event-handlers>
|
||||
// <gen:jobs>
|
||||
// <gen:realtime-handlers>
|
||||
|
||||
// Boot-time conformance check.
|
||||
assertFeatureConformance(
|
||||
navigationContainer,
|
||||
navigationManifest,
|
||||
{ getHeader: NAVIGATION_SYMBOLS.IGetHeaderUseCase },
|
||||
ctx,
|
||||
);
|
||||
}
|
||||
|
||||
16
packages/navigation/src/feature.manifest.ts
Normal file
16
packages/navigation/src/feature.manifest.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defineFeature } from "@repo/core-shared/conformance";
|
||||
|
||||
/**
|
||||
* The navigation feature's conformance manifest.
|
||||
*/
|
||||
export const navigationManifest = defineFeature({
|
||||
name: "navigation",
|
||||
requiredCores: [],
|
||||
useCases: {
|
||||
getHeader: { mutates: false, audits: [], publishes: [], consumes: [] },
|
||||
},
|
||||
realtimeChannels: [],
|
||||
jobs: [],
|
||||
} as const);
|
||||
|
||||
export type NavigationManifest = typeof navigationManifest;
|
||||
@@ -17,3 +17,4 @@ export type { IGetHeaderController } from "./interface-adapters/controllers/get-
|
||||
|
||||
// <gen:events>
|
||||
// <gen:realtime-channels>
|
||||
export { navigationManifest, type NavigationManifest } from "./feature.manifest";
|
||||
|
||||
Reference in New Issue
Block a user