feat(marketing-pages): conformance manifest + self-asserting bind-production
This commit is contained in:
@@ -6,8 +6,10 @@ import {
|
|||||||
type ILogger,
|
type ILogger,
|
||||||
} from "@repo/core-shared/instrumentation";
|
} from "@repo/core-shared/instrumentation";
|
||||||
import type { BindProductionContext } from "@repo/core-shared/di";
|
import type { BindProductionContext } from "@repo/core-shared/di";
|
||||||
|
import { assertFeatureConformance } from "@repo/core-shared/conformance";
|
||||||
import { marketingPagesContainer } from "./container";
|
import { marketingPagesContainer } from "./container";
|
||||||
import { MARKETING_PAGES_SYMBOLS } from "./symbols";
|
import { MARKETING_PAGES_SYMBOLS } from "./symbols";
|
||||||
|
import { marketingPagesManifest } from "../feature.manifest";
|
||||||
import { PagesRepository } from "../infrastructure/repositories/pages.repository";
|
import { PagesRepository } from "../infrastructure/repositories/pages.repository";
|
||||||
import { SiteSettingsRepository } from "../infrastructure/repositories/site-settings.repository";
|
import { SiteSettingsRepository } from "../infrastructure/repositories/site-settings.repository";
|
||||||
import { getSiteSettingsUseCase } from "../application/use-cases/get-site-settings.use-case";
|
import { getSiteSettingsUseCase } from "../application/use-cases/get-site-settings.use-case";
|
||||||
@@ -172,4 +174,15 @@ export function bindProductionMarketingPages(ctx: BindProductionContext): void {
|
|||||||
void realtime;
|
void realtime;
|
||||||
void realtimeRegistry;
|
void realtimeRegistry;
|
||||||
// <gen:realtime-handlers>
|
// <gen:realtime-handlers>
|
||||||
|
|
||||||
|
// Boot-time conformance check.
|
||||||
|
assertFeatureConformance(
|
||||||
|
marketingPagesContainer,
|
||||||
|
marketingPagesManifest,
|
||||||
|
{
|
||||||
|
getPageBySlug: MARKETING_PAGES_SYMBOLS.IGetPageBySlugUseCase,
|
||||||
|
getSiteSettings: MARKETING_PAGES_SYMBOLS.IGetSiteSettingsUseCase,
|
||||||
|
},
|
||||||
|
ctx,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
17
packages/marketing-pages/src/feature.manifest.ts
Normal file
17
packages/marketing-pages/src/feature.manifest.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { defineFeature } from "@repo/core-shared/conformance";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The marketing-pages feature's conformance manifest.
|
||||||
|
*/
|
||||||
|
export const marketingPagesManifest = defineFeature({
|
||||||
|
name: "marketing-pages",
|
||||||
|
requiredCores: [],
|
||||||
|
useCases: {
|
||||||
|
getPageBySlug: { mutates: false, audits: [], publishes: [], consumes: [] },
|
||||||
|
getSiteSettings: { mutates: false, audits: [], publishes: [], consumes: [] },
|
||||||
|
},
|
||||||
|
realtimeChannels: [],
|
||||||
|
jobs: [],
|
||||||
|
} as const);
|
||||||
|
|
||||||
|
export type MarketingPagesManifest = typeof marketingPagesManifest;
|
||||||
@@ -26,3 +26,4 @@ export type { IGetSiteSettingsController } from "./interface-adapters/controller
|
|||||||
|
|
||||||
// <gen:events>
|
// <gen:events>
|
||||||
// <gen:realtime-channels>
|
// <gen:realtime-channels>
|
||||||
|
export { marketingPagesManifest, type MarketingPagesManifest } from "./feature.manifest";
|
||||||
|
|||||||
Reference in New Issue
Block a user