feat(housekeeping): cut over administration to ase

This commit is contained in:
Simo committed 2026-08-30 20:35:22 +02:00
1 parent c9e35cf602
commit 2b8f73a91d
457 files changed
+589 -55936

No files matched your search

+16 -28
View File
@@ -3,31 +3,16 @@ import { join, relative } from "node:path";
import { describe, expect, it } from "vitest";
const ROOTS = [
"src/app/admin",
"src/components/admin",
"src/app/ase-next",
"src/app/ase",
"src/features/housekeeping",
];
const GRAPHICAL_ALLOWLIST = [
"src/app/admin/favicon/favicon-generator.tsx",
"src/app/admin/import/clone/import-clone-client.tsx",
"src/components/admin/catalog/items-shop-preview.tsx",
"src/components/admin/media-grid.tsx",
];
const DATA_COLOR_ALLOWLIST = [
"src/app/admin/alerts/page.tsx",
"src/app/admin/banners/banners-manager.tsx",
"src/app/admin/events/events-table.tsx",
"src/app/admin/events/types/event-types-manager.tsx",
"src/app/admin/favicon/favicon-generator.tsx",
"src/app/admin/help-questions/new/page.tsx",
"src/app/admin/help-questions/[id]/page.tsx",
"src/app/admin/prefixes/prefixes-client.tsx",
"src/app/admin/tags/page.tsx",
"src/app/admin/teams/page.tsx",
"src/app/admin/theme/page.tsx",
];
const DATA_COLOR_ALLOWLIST: readonly string[] = [];
const PUBLIC_STRUCTURAL_TOKEN =
/var\(--(?:color-(?:background|surface|dropdown|navbar|navbar-text|text|text-muted|primary|primary-hover)|border-subtle|border-color)\)/g;
@@ -91,17 +76,20 @@ describe("admin theme source audit", () => {
expect(violations).toEqual([]);
});
it("keeps every import workflow on semantic admin status and overlay colors", () => {
const violations = sourceFiles("src/app/admin/import").flatMap((file) => {
const source = readFileSync(file, "utf8");
const risky =
source.match(/rgba?\([^)]*\)|(?:bg-black|text-white)(?:\/\d+)?/g) ?? [];
return risky.length
? [
`${relative(process.cwd(), file).replaceAll("\\", "/")}: ${[...new Set(risky)].join(", ")}`,
]
: [];
});
it("keeps retained Studio workflows on semantic status and overlay colors", () => {
const violations = sourceFiles("src/components/admin/studio").flatMap(
(file) => {
const source = readFileSync(file, "utf8");
const risky =
source.match(/rgba?\([^)]*\)|(?:bg-black|text-white)(?:\/\d+)?/g) ??
[];
return risky.length
? [
`${relative(process.cwd(), file).replaceAll("\\", "/")}: ${[...new Set(risky)].join(", ")}`,
]
: [];
},
);
expect(violations).toEqual([]);
});
});