refactor(marketing-pages)!: delete marketing-pages demo feature

Veect retrofit (ADR-027): fourth slice of the demo-content removal.
Deletes packages/marketing-pages whole and prunes every composition
edge in one commit: core-api router mount + dep, core-cms
collection/global composition + dep + regenerated Payload types,
web-next bindAll (prod + dev-seed) + tests + about page + Tailwind
source + transpilePackages + dep, cms/core-cms payload config test
assertions, marketing-page e2e spec, tsconfig paths, fallow ignore
entry, 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).

Event teardown: marketing-pages was the sole consumer of
auth.user.signed-up (welcome-email handler + job). The handler, its
Payload tasks, and the bus subscription all lived inside the package's
own binders, so they die with it — no other package wires the
subscription. Auth's manifest `publishes` stays untouched: a publisher
with zero consumers is legal (pnpm conformance only fails on orphan
consumers, verified green). The app-level sign-up-welcome-email test
asserted the marketing-pages mailer stays empty without a bus; it is
deleted with the feature, and the now-unused test-only bind-state
helpers in web-next bind-production.ts go with it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
2026-07-12 16:53:44 +02:00
parent 7dd3e7ceac
commit 9ee941863d
108 changed files with 35 additions and 3205 deletions

View File

@@ -16,7 +16,7 @@
- **`@repo/<feature>/cms`** subpath exports only (to get collections/globals)
- e.g., `import { articles } from "@repo/blog/cms"`
- e.g., `import { users } from "@repo/auth/cms"`
- e.g., `import { pages, siteSettings } from "@repo/marketing-pages/cms"`
- e.g., `import { header } from "@repo/navigation/cms"`
## Must NOT import
@@ -29,10 +29,12 @@
## Public exports
From `package.json`:
- `.` — the Payload config (default export) + buildConfig re-export
- `./generated-types` — Payload-generated TypeScript types
Example usage:
```typescript
import { buildConfig } from "@repo/core-cms";
// or

View File

@@ -17,7 +17,6 @@
"@payloadcms/db-postgres": "^3.14.0",
"@payloadcms/richtext-lexical": "^3.14.0",
"@repo/auth": "workspace:*",
"@repo/marketing-pages": "workspace:*",
"@repo/navigation": "workspace:*",
"payload": "^3.14.0"
},

View File

@@ -68,7 +68,6 @@ export interface Config {
blocks: {};
collections: {
users: User;
pages: Page;
"payload-kv": PayloadKv;
"payload-locked-documents": PayloadLockedDocument;
"payload-preferences": PayloadPreference;
@@ -77,7 +76,6 @@ export interface Config {
collectionsJoins: {};
collectionsSelect: {
users: UsersSelect<false> | UsersSelect<true>;
pages: PagesSelect<false> | PagesSelect<true>;
"payload-kv": PayloadKvSelect<false> | PayloadKvSelect<true>;
"payload-locked-documents":
| PayloadLockedDocumentsSelect<false>
@@ -94,11 +92,9 @@ export interface Config {
};
fallbackLocale: null;
globals: {
"site-settings": SiteSetting;
header: Header;
};
globalsSelect: {
"site-settings": SiteSettingsSelect<false> | SiteSettingsSelect<true>;
header: HeaderSelect<false> | HeaderSelect<true>;
};
locale: null;
@@ -165,41 +161,6 @@ export interface User {
password?: string | null;
collection: "users";
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "pages".
*/
export interface Page {
id: number;
title: string;
/**
* Auto-generated from title if left empty
*/
slug?: string | null;
hero: {
heading: string;
subheading?: string | null;
};
layout?:
| {
title: string;
buttonLabel: string;
href: string;
id?: string | null;
blockName?: string | null;
blockType: "cta";
}[]
| null;
status: "draft" | "published";
publishedAt?: string | null;
seo: {
title: string;
description?: string | null;
};
updatedAt: string;
createdAt: string;
_status?: ("draft" | "published") | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-kv".
@@ -223,15 +184,10 @@ export interface PayloadKv {
*/
export interface PayloadLockedDocument {
id: number;
document?:
| ({
relationTo: "users";
value: number | User;
} | null)
| ({
relationTo: "pages";
value: number | Page;
} | null);
document?: {
relationTo: "users";
value: number | User;
} | null;
globalSlug?: string | null;
user: {
relationTo: "users";
@@ -299,44 +255,6 @@ export interface UsersSelect<T extends boolean = true> {
expiresAt?: T;
};
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "pages_select".
*/
export interface PagesSelect<T extends boolean = true> {
title?: T;
slug?: T;
hero?:
| T
| {
heading?: T;
subheading?: T;
};
layout?:
| T
| {
cta?:
| T
| {
title?: T;
buttonLabel?: T;
href?: T;
id?: T;
blockName?: T;
};
};
status?: T;
publishedAt?: T;
seo?:
| T
| {
title?: T;
description?: T;
};
updatedAt?: T;
createdAt?: T;
_status?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "payload-kv_select".
@@ -377,17 +295,6 @@ export interface PayloadMigrationsSelect<T extends boolean = true> {
updatedAt?: T;
createdAt?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "site-settings".
*/
export interface SiteSetting {
id: number;
siteName: string;
siteDescription?: string | null;
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "header".
@@ -405,17 +312,6 @@ export interface Header {
updatedAt?: string | null;
createdAt?: string | null;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "site-settings_select".
*/
export interface SiteSettingsSelect<T extends boolean = true> {
siteName?: T;
siteDescription?: T;
updatedAt?: T;
createdAt?: T;
globalType?: T;
}
/**
* This interface was referenced by `Config`'s JSON-Schema
* via the `definition` "header_select".

View File

@@ -5,12 +5,12 @@ 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"]));
expect(slugs).toEqual(expect.arrayContaining(["users"]));
});
it("registers all feature globals", async () => {
const resolved = await config;
const slugs = resolved.globals?.map((g) => g.slug) ?? [];
expect(slugs).toEqual(expect.arrayContaining(["site-settings", "header"]));
expect(slugs).toEqual(expect.arrayContaining(["header"]));
});
});

View File

@@ -5,7 +5,6 @@ import path from "node:path";
import { fileURLToPath } from "node:url";
import { users } from "@repo/auth/cms";
import { pages, siteSettings } from "@repo/marketing-pages/cms";
import { header } from "@repo/navigation/cms";
const filename = fileURLToPath(import.meta.url);
@@ -13,8 +12,8 @@ const dirname = path.dirname(filename);
export default buildConfig({
editor: lexicalEditor(),
collections: [users, pages],
globals: [siteSettings, header],
collections: [users],
globals: [header],
secret: process.env.PAYLOAD_SECRET || "default-secret-change-me",
db: postgresAdapter({
pool: {