feat(housekeeping): cut over administration to ase
This commit is contained in:
1 parent
c9e35cf602
commit
2b8f73a91d
457 files changed
+589
-55936
No files matched your search
@@ -11,10 +11,12 @@ import { OPERATIONS_ROUTES } from "../domains/operations/routes";
|
||||
import { PEOPLE_ROUTE_IDS } from "../domains/people/routes";
|
||||
import { SYSTEM_ROUTE_IDS } from "../domains/system/routes";
|
||||
import { HOUSEKEEPING_MANIFESTS } from "../manifests";
|
||||
import { discoverLegacyPages } from "../migration/discover-legacy-pages";
|
||||
import {
|
||||
discoverLegacyPages,
|
||||
recordedLegacyPages,
|
||||
} from "../migration/discover-legacy-pages";
|
||||
import { HOUSEKEEPING_MIGRATION_MATRIX } from "../migration/matrix";
|
||||
import { validateMigrationEntries } from "../migration/validate-matrix";
|
||||
import { isHousekeepingPreviewEnabled } from "./preview-gate";
|
||||
import { createHousekeepingRegistry } from "./registry";
|
||||
import { CommandTrigger } from "./shell/command-trigger";
|
||||
|
||||
@@ -484,8 +486,8 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
|
||||
[
|
||||
"src/features/housekeeping/domains/economy/pages/specialized-catalog-editor.tsx",
|
||||
new Set([
|
||||
"src/app/admin/catalog/[id]/catalog-detail-tabs",
|
||||
"src/app/admin/catalog/builder-club/bc-manager",
|
||||
"src/components/admin/catalog/detail/catalog-detail-tabs",
|
||||
"src/components/admin/catalog/builder-club/bc-manager",
|
||||
"src/features/housekeeping/domains/economy/routes",
|
||||
"src/lib/db",
|
||||
"drizzle-orm",
|
||||
@@ -744,7 +746,7 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
|
||||
[
|
||||
"src/features/housekeeping/domains/system/services/mutations.ts",
|
||||
new Set([
|
||||
"src/app/admin/settings/cms-settings-config",
|
||||
"src/lib/admin/cms-settings-config",
|
||||
"src/lib/db",
|
||||
"drizzle-orm",
|
||||
"mysql2",
|
||||
@@ -1542,14 +1544,11 @@ describe("housekeeping runtime import boundary", () => {
|
||||
});
|
||||
|
||||
describe("housekeeping foundation completion contracts", () => {
|
||||
it("leaves the current and preview route entrypoints present", () => {
|
||||
for (const path of [
|
||||
"src/app/admin/layout.tsx",
|
||||
"src/app/mod/layout.tsx",
|
||||
"src/app/ase-next/layout.tsx",
|
||||
]) {
|
||||
expect(existsSync(path), path).toBe(true);
|
||||
}
|
||||
it("keeps only the canonical administration route entrypoint", () => {
|
||||
expect(existsSync("src/app/ase/layout.tsx")).toBe(true);
|
||||
expect(existsSync("src/app/admin")).toBe(false);
|
||||
expect(existsSync("src/app/mod")).toBe(false);
|
||||
expect(existsSync("src/app/ase-next")).toBe(false);
|
||||
});
|
||||
|
||||
it("creates the real six-domain registry with every domain route enabled", () => {
|
||||
@@ -1595,12 +1594,6 @@ describe("housekeeping foundation completion contracts", () => {
|
||||
).toEqual(SYSTEM_ROUTE_IDS);
|
||||
});
|
||||
|
||||
it("keeps production preview disabled even when the flag is true", () => {
|
||||
expect(
|
||||
isHousekeepingPreviewEnabled({ nodeEnv: "production", flag: true }),
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("detects executable React props before markup serialization", () => {
|
||||
const mutatedTrigger = createElement(
|
||||
"button",
|
||||
@@ -1626,7 +1619,6 @@ describe("housekeeping foundation completion contracts", () => {
|
||||
close: "HK::close",
|
||||
},
|
||||
search: vi.fn(),
|
||||
surface: "preview",
|
||||
});
|
||||
const html = renderToStaticMarkup(trigger);
|
||||
const buttons = html.match(/<button\b[^>]*>/g) ?? [];
|
||||
@@ -1638,15 +1630,17 @@ describe("housekeeping foundation completion contracts", () => {
|
||||
expect(html).toContain(`>${sentinel}</span>`);
|
||||
});
|
||||
|
||||
it("validates the complete 137-row migration matrix without issues", () => {
|
||||
it("validates the recorded 137-row migration matrix after cutover", () => {
|
||||
const discovered = discoverLegacyPages();
|
||||
const recorded = recordedLegacyPages(HOUSEKEEPING_MIGRATION_MATRIX);
|
||||
const issues = validateMigrationEntries(
|
||||
discovered,
|
||||
recorded,
|
||||
HOUSEKEEPING_MIGRATION_MATRIX,
|
||||
);
|
||||
|
||||
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(137);
|
||||
expect(discovered).toHaveLength(137);
|
||||
expect(recorded).toHaveLength(137);
|
||||
expect(discovered).toEqual([]);
|
||||
expect(issues).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user