refactor: 리펙토링
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
validateBreakingEvidence,
|
||||
verifyRegistryBaselineApproval,
|
||||
} from "./lib/registry-compatibility.ts";
|
||||
import { assertMatchesJsonSchema } from "./lib/json-schema.ts";
|
||||
|
||||
type RegistryRow = Record<string, unknown>;
|
||||
type RegistryRows = Record<string, RegistryRow>;
|
||||
@@ -436,6 +437,22 @@ const report = {
|
||||
failures,
|
||||
registries: snapshots,
|
||||
};
|
||||
if (usesRepositoryBaseline && failures.length === 0) {
|
||||
try {
|
||||
assertMatchesJsonSchema(
|
||||
JSON.parse(
|
||||
await readFile(
|
||||
"schemas/artifacts/registry-snapshot.schema.json",
|
||||
"utf8",
|
||||
),
|
||||
),
|
||||
report,
|
||||
"registry snapshot",
|
||||
);
|
||||
} catch {
|
||||
failures.push("registry snapshot JSON Schema mismatch");
|
||||
}
|
||||
}
|
||||
await mkdir(path.dirname(artifactPath), { recursive: true });
|
||||
await writeFile(artifactPath, `${JSON.stringify(report, null, 2)}\n`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user