refactor: 리펙토링

This commit is contained in:
DongHyeonka
2026-08-01 19:39:59 +09:00
parent 9c959ea2a5
commit c6da03369c
171 changed files with 20329 additions and 782 deletions
+20 -1
View File
@@ -9,6 +9,7 @@ import {
scanProductionBundle,
validateRecipeCatalog,
} from "./lib/optional-recipes.ts";
import { assertMatchesJsonSchema } from "./lib/json-schema.ts";
type GateViolation = Readonly<{
ruleId: string;
@@ -46,7 +47,25 @@ const recipes = Array.isArray(catalog.recipes) ? catalog.recipes : [];
const packageDocument = JSON.parse(
await readFile("package.json", "utf8"),
) as Record<string, unknown>;
const catalogViolations = validateRecipeCatalog(catalog, packageDocument);
const catalogSchemaViolations: string[] = [];
try {
assertMatchesJsonSchema(
JSON.parse(
await readFile(
"schemas/config/frontend-capability-recipes.schema.json",
"utf8",
),
),
catalog,
"optional recipe catalog",
);
} catch {
catalogSchemaViolations.push("CATALOG_JSON_SCHEMA_INVALID");
}
const catalogViolations = [
...catalogSchemaViolations,
...validateRecipeCatalog(catalog, packageDocument),
];
const runtimeSourceViolations = (
await Promise.all(
recipes.flatMap((recipe: unknown) => {