feat(media): full Clean Architecture scaffold
Media is now a complete vertical-feature package mirroring auth/blog structure: entities (models + errors), application (repositories + use-cases), infrastructure (real Payload-backed + mock siblings), interface-adapters (per-use-case controllers), DI (symbols + module + container + bind-production), integrations/api (mediaRouter), factory, contract suite, and feature integration tests. Wired into: - packages/core-api/src/root.ts (added `media: mediaRouter`) - apps/web-next/src/server/bind-production.ts (calls bindProductionMedia) - tsconfig.base.json (added @repo/media/api and ./di/bind-production aliases) 56 new tests in @repo/media (13 test files); core-api router test updated to assert media. procedures. All 26 turbo tasks green. Refactor log: §2, §4.1, §4.2, §5.1, §6.1 Spec: §6.5 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,13 +2,14 @@ import { describe, it, expect } from "vitest";
|
||||
import { appRouter } from "./root";
|
||||
|
||||
describe("appRouter composition", () => {
|
||||
it("exposes auth, blog, marketingPages, navigation routers", () => {
|
||||
it("exposes auth, blog, marketingPages, navigation, media routers", () => {
|
||||
const procedures = appRouter._def.procedures;
|
||||
const keys = Object.keys(procedures);
|
||||
expect(keys.some((k) => k.startsWith("auth."))).toBe(true);
|
||||
expect(keys.some((k) => k.startsWith("blog."))).toBe(true);
|
||||
expect(keys.some((k) => k.startsWith("marketingPages."))).toBe(true);
|
||||
expect(keys.some((k) => k.startsWith("navigation."))).toBe(true);
|
||||
expect(keys.some((k) => k.startsWith("media."))).toBe(true);
|
||||
});
|
||||
|
||||
it("blog router has expected procedures", () => {
|
||||
|
||||
Reference in New Issue
Block a user