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:
@@ -18,7 +18,6 @@
|
||||
"@payloadcms/richtext-lexical": "^3.14.0",
|
||||
"@repo/auth": "workspace:*",
|
||||
"@repo/marketing-pages": "workspace:*",
|
||||
"@repo/media": "workspace:*",
|
||||
"@repo/navigation": "workspace:*",
|
||||
"payload": "^3.14.0"
|
||||
},
|
||||
|
||||
@@ -69,7 +69,6 @@ export interface Config {
|
||||
collections: {
|
||||
users: User;
|
||||
pages: Page;
|
||||
media: Media;
|
||||
"payload-kv": PayloadKv;
|
||||
"payload-locked-documents": PayloadLockedDocument;
|
||||
"payload-preferences": PayloadPreference;
|
||||
@@ -79,7 +78,6 @@ export interface Config {
|
||||
collectionsSelect: {
|
||||
users: UsersSelect<false> | UsersSelect<true>;
|
||||
pages: PagesSelect<false> | PagesSelect<true>;
|
||||
media: MediaSelect<false> | MediaSelect<true>;
|
||||
"payload-kv": PayloadKvSelect<false> | PayloadKvSelect<true>;
|
||||
"payload-locked-documents":
|
||||
| PayloadLockedDocumentsSelect<false>
|
||||
@@ -181,7 +179,6 @@ export interface Page {
|
||||
hero: {
|
||||
heading: string;
|
||||
subheading?: string | null;
|
||||
image?: (number | null) | Media;
|
||||
};
|
||||
layout?:
|
||||
| {
|
||||
@@ -203,25 +200,6 @@ export interface Page {
|
||||
createdAt: string;
|
||||
_status?: ("draft" | "published") | null;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "media".
|
||||
*/
|
||||
export interface Media {
|
||||
id: number;
|
||||
alt: string;
|
||||
updatedAt: string;
|
||||
createdAt: string;
|
||||
url?: string | null;
|
||||
thumbnailURL?: string | null;
|
||||
filename?: string | null;
|
||||
mimeType?: string | null;
|
||||
filesize?: number | null;
|
||||
width?: number | null;
|
||||
height?: number | null;
|
||||
focalX?: number | null;
|
||||
focalY?: number | null;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "payload-kv".
|
||||
@@ -253,10 +231,6 @@ export interface PayloadLockedDocument {
|
||||
| ({
|
||||
relationTo: "pages";
|
||||
value: number | Page;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: "media";
|
||||
value: number | Media;
|
||||
} | null);
|
||||
globalSlug?: string | null;
|
||||
user: {
|
||||
@@ -337,7 +311,6 @@ export interface PagesSelect<T extends boolean = true> {
|
||||
| {
|
||||
heading?: T;
|
||||
subheading?: T;
|
||||
image?: T;
|
||||
};
|
||||
layout?:
|
||||
| T
|
||||
@@ -364,24 +337,6 @@ export interface PagesSelect<T extends boolean = true> {
|
||||
createdAt?: T;
|
||||
_status?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "media_select".
|
||||
*/
|
||||
export interface MediaSelect<T extends boolean = true> {
|
||||
alt?: T;
|
||||
updatedAt?: T;
|
||||
createdAt?: T;
|
||||
url?: T;
|
||||
thumbnailURL?: T;
|
||||
filename?: T;
|
||||
mimeType?: T;
|
||||
filesize?: T;
|
||||
width?: T;
|
||||
height?: T;
|
||||
focalX?: T;
|
||||
focalY?: T;
|
||||
}
|
||||
/**
|
||||
* This interface was referenced by `Config`'s JSON-Schema
|
||||
* via the `definition` "payload-kv_select".
|
||||
@@ -439,7 +394,6 @@ export interface SiteSetting {
|
||||
*/
|
||||
export interface Header {
|
||||
id: number;
|
||||
logo?: (number | null) | Media;
|
||||
items?:
|
||||
| {
|
||||
label: string;
|
||||
@@ -467,7 +421,6 @@ export interface SiteSettingsSelect<T extends boolean = true> {
|
||||
* via the `definition` "header_select".
|
||||
*/
|
||||
export interface HeaderSelect<T extends boolean = true> {
|
||||
logo?: T;
|
||||
items?:
|
||||
| T
|
||||
| {
|
||||
|
||||
@@ -5,7 +5,7 @@ describe("payloadConfig composition", () => {
|
||||
it("registers all feature collections", async () => {
|
||||
const resolved = await config;
|
||||
const slugs = resolved.collections?.map((c) => c.slug) ?? [];
|
||||
expect(slugs).toEqual(expect.arrayContaining(["users", "pages", "media"]));
|
||||
expect(slugs).toEqual(expect.arrayContaining(["users", "pages"]));
|
||||
});
|
||||
|
||||
it("registers all feature globals", async () => {
|
||||
|
||||
@@ -5,7 +5,6 @@ import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { users } from "@repo/auth/cms";
|
||||
import { media } from "@repo/media/cms";
|
||||
import { pages, siteSettings } from "@repo/marketing-pages/cms";
|
||||
import { header } from "@repo/navigation/cms";
|
||||
|
||||
@@ -14,7 +13,7 @@ const dirname = path.dirname(filename);
|
||||
|
||||
export default buildConfig({
|
||||
editor: lexicalEditor(),
|
||||
collections: [users, pages, media],
|
||||
collections: [users, pages],
|
||||
globals: [siteSettings, header],
|
||||
secret: process.env.PAYLOAD_SECRET || "default-secret-change-me",
|
||||
db: postgresAdapter({
|
||||
|
||||
Reference in New Issue
Block a user