refactor(media)!: delete media demo feature
Veect retrofit (ADR-027): third slice of the demo-content removal. Deletes packages/media whole and prunes every composition edge in one commit: core-api router mount + dep, core-cms collection composition + dep + regenerated Payload types, web-next bindAll (prod + dev-seed) + tests + Tailwind source + transpilePackages + dep, cms/core-cms/web-next payload config test assertions, tsconfig paths, anchor-guard + generator e2e feature lists, compliance data-map + retention-policy regeneration, lockfile prune, and feature-list doc entries (CLAUDE.md, AGENTS.md, glossary, app/feature AGENTS.md). Media was the uploads feature: the marketing-pages pages.hero.image and navigation header.logo upload fields (relationTo: "media") are removed from those collections in this slice — Payload config sanitization rejects a relationship to a missing collection. Both features' domain entities keep their optional imageId/logoId fields; their repositories already tolerate the fields being absent. Both features are deleted in later slices. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
14
AGENTS.md
14
AGENTS.md
@@ -37,7 +37,6 @@ See `docs/guides/runbook.md` for the full workflow.
|
||||
| `@repo/core-cms` | core-composition | Payload config aggregator — imports `@repo/<feature>/cms` only |
|
||||
| `@repo/core-trpc` | core-composition | Frontend tRPC client + framework-specific providers (Next.js, TanStack) |
|
||||
| `@repo/auth` | feature | Users collection + sign-in/up/out |
|
||||
| `@repo/media` | feature | Media collection + upload helpers |
|
||||
| `@repo/marketing-pages` | feature | Pages collection + SiteSettings global |
|
||||
| `@repo/navigation` | feature | Header global |
|
||||
| `@repo/core-eslint` | tooling | Shared ESLint 9 flat configs (base, next, react-internal, boundaries) |
|
||||
@@ -53,7 +52,7 @@ See `docs/guides/runbook.md` for the full workflow.
|
||||
- **app** (3 packages) — `apps/web-next`, `apps/cms`, `apps/storybook`
|
||||
- **core-composition** (3 packages) — `packages/core-api`, `core-cms`, `core-trpc`
|
||||
- **core** (1–2 packages) — `packages/core-shared`; `core-ui` is optional (scaffold with `pnpm turbo gen core-package ui`)
|
||||
- **feature** (4 packages) — `packages/auth`, `media`, `marketing-pages`, `navigation`
|
||||
- **feature** (3 packages) — `packages/auth`, `marketing-pages`, `navigation`
|
||||
- **tooling** (3 packages) — `packages/core-eslint`, `core-typescript`, `core-testing`
|
||||
|
||||
### Allowed dependency directions
|
||||
@@ -228,7 +227,7 @@ export const getArticlesUseCase =
|
||||
};
|
||||
```
|
||||
|
||||
Void-input use cases use `z.object({}).strict()` and accept `_input: XInput`. Void-output use cases (e.g. `signOutUseCase`, `deleteMediaUseCase`) export only `xInputSchema` — no `xOutputSchema`.
|
||||
Void-input use cases use `z.object({}).strict()` and accept `_input: XInput`. Void-output use cases (e.g. `signOutUseCase`) export only `xInputSchema` — no `xOutputSchema`.
|
||||
|
||||
Tests inject mocks directly — no container rebinding:
|
||||
|
||||
@@ -268,7 +267,7 @@ export const getArticlesController =
|
||||
};
|
||||
```
|
||||
|
||||
Void controllers (e.g. `signOutController`, `deleteMediaController`) return `Promise<void>` and skip the presenter entirely. One controller file per use case — no multi-method controller files.
|
||||
Void controllers (e.g. `signOutController`) return `Promise<void>` and skip the presenter entirely. One controller file per use case — no multi-method controller files.
|
||||
|
||||
DI binds each factory with `.toDynamicValue()`:
|
||||
|
||||
@@ -386,7 +385,6 @@ export async function bindAllProduction(): Promise<void> {
|
||||
bindProductionAuth(ctx);
|
||||
bindProductionMarketingPages(ctx);
|
||||
bindProductionNavigation(ctx);
|
||||
bindProductionMedia(ctx);
|
||||
}
|
||||
|
||||
export async function bindAllDevSeed(): Promise<void> {
|
||||
@@ -406,11 +404,11 @@ export async function bindAllDevSeed(): Promise<void> {
|
||||
};
|
||||
|
||||
await bindDevSeedAuth(ctx);
|
||||
// ... (same for marketing-pages, navigation, media)
|
||||
// ... (same for marketing-pages, navigation)
|
||||
}
|
||||
```
|
||||
|
||||
Actual function names: `bindProductionAuth`, `bindProductionMarketingPages`, `bindProductionNavigation`, `bindProductionMedia`.
|
||||
Actual function names: `bindProductionAuth`, `bindProductionMarketingPages`, `bindProductionNavigation`.
|
||||
|
||||
Each feature binder signature is `(ctx: BindProductionContext): void` for production and `(ctx: BindContext): Promise<void>` for dev-seed. Required ctx fields: `tracer`, `logger`. Production-only: `config`. Optional: `bus`, `queue`, `realtime`, `realtimeRegistry`.
|
||||
|
||||
@@ -576,6 +574,6 @@ Per-package documentation lives in each `AGENTS.md`:
|
||||
- `packages/core-shared/AGENTS.md`
|
||||
- `packages/core-api/AGENTS.md`, `core-cms/AGENTS.md`, `core-trpc/AGENTS.md`
|
||||
- `packages/core-ui/AGENTS.md` (optional — generated by `pnpm turbo gen core-package ui`; see `turbo/generators/templates/core-package/ui/AGENTS.md.hbs`)
|
||||
- `packages/auth/AGENTS.md`, `media/AGENTS.md`, `marketing-pages/AGENTS.md`, `navigation/AGENTS.md`
|
||||
- `packages/auth/AGENTS.md`, `marketing-pages/AGENTS.md`, `navigation/AGENTS.md`
|
||||
- `packages/core-eslint/AGENTS.md`, `core-typescript/AGENTS.md`, `core-testing/AGENTS.md`
|
||||
- `apps/cms/AGENTS.md`, `web-next/AGENTS.md`, `storybook/AGENTS.md`
|
||||
|
||||
Reference in New Issue
Block a user