Veect retrofit (ADR-027): the template's demo content is being removed to make room for the Veect package map. This slice deletes packages/blog whole and prunes every composition edge in one commit: core-api router mount, core-cms collections + regenerated Payload types, web-next bindAll entry / home page / blog route / Tailwind sources, blog e2e spec, tsconfig paths, fallow ignore entry, anchor-guard + generator e2e feature lists, compliance artifacts, and feature-list doc entries (CLAUDE.md, AGENTS.md, glossary). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
61 lines
1.9 KiB
JavaScript
61 lines
1.9 KiB
JavaScript
import { describe, it, expect } from "vitest";
|
|
import { readFileSync } from "node:fs";
|
|
import { join, dirname } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const REPO_ROOT = join(__dirname, "..", "..");
|
|
const FEATURES = ["auth", "media", "marketing-pages", "navigation"];
|
|
const ANCHORS = {
|
|
"src/index.ts": ["// <gen:events>", "// <gen:realtime-channels>"],
|
|
"src/di/symbols.ts": [
|
|
"// <gen:event-handler-symbols>",
|
|
"// <gen:job-symbols>",
|
|
"// <gen:realtime-handler-symbols>",
|
|
],
|
|
"src/di/bind-production.ts": [
|
|
"// <gen:event-handlers>",
|
|
"// <gen:jobs>",
|
|
"// <gen:realtime-handlers>",
|
|
],
|
|
"src/di/bind-dev-seed.ts": [
|
|
"// <gen:event-handlers>",
|
|
"// <gen:jobs>",
|
|
"// <gen:realtime-handlers>",
|
|
],
|
|
"src/integrations/cms/index.ts": ["// <gen:job-tasks>"],
|
|
};
|
|
|
|
describe("// <gen:*> anchor presence in core-eslint/base.js", () => {
|
|
it("base.js contains realtime-rules-imports anchor", () => {
|
|
const baseSource = readFileSync(
|
|
join(REPO_ROOT, "packages/core-eslint/base.js"),
|
|
"utf8",
|
|
);
|
|
expect(baseSource).toContain("// <gen:realtime-rules-imports>");
|
|
expect(baseSource).toContain("// <gen:realtime-rules>");
|
|
});
|
|
|
|
it("base.js contains events-rules anchor", () => {
|
|
const baseSource = readFileSync(
|
|
join(REPO_ROOT, "packages/core-eslint/base.js"),
|
|
"utf8",
|
|
);
|
|
expect(baseSource).toContain("// <gen:events-rules>");
|
|
});
|
|
});
|
|
|
|
describe("// <gen:*> anchor presence in feature packages", () => {
|
|
for (const feature of FEATURES) {
|
|
for (const [relPath, anchors] of Object.entries(ANCHORS)) {
|
|
it(`packages/${feature}/${relPath} contains all required anchors`, () => {
|
|
const path = join(REPO_ROOT, "packages", feature, relPath);
|
|
const content = readFileSync(path, "utf8");
|
|
for (const anchor of anchors) {
|
|
expect(content).toContain(anchor);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
});
|