This commit is contained in:
@@ -23,28 +23,36 @@ const schemaFiles = (await readdir(schemaDirectory))
|
||||
|
||||
const required = [
|
||||
"app-info.schema.json",
|
||||
"branch-list.schema.json",
|
||||
"character-card.schema.json",
|
||||
"demo-pack-summary.schema.json",
|
||||
"fork-branch-request.schema.json",
|
||||
"fork-branch-result.schema.json",
|
||||
"item-spec.schema.json",
|
||||
"lapp-connection-test-result.schema.json",
|
||||
"lapp-settings.schema.json",
|
||||
"persona.schema.json",
|
||||
"player-view.schema.json",
|
||||
"plot-module.schema.json",
|
||||
"presentation-snapshot.schema.json",
|
||||
"rename-branch-request.schema.json",
|
||||
"resource-bundle.schema.json",
|
||||
"resource-header.schema.json",
|
||||
"runtime-state.schema.json",
|
||||
"story-node.schema.json",
|
||||
"switch-branch-request.schema.json",
|
||||
"switch-branch-result.schema.json",
|
||||
"turn-failure.schema.json",
|
||||
"turn-request.schema.json",
|
||||
"turn-result.schema.json",
|
||||
"update-lapp-settings-request.schema.json",
|
||||
"world-book.schema.json"
|
||||
];
|
||||
|
||||
for (const name of required) {
|
||||
if (!schemaFiles.includes(name)) {
|
||||
throw new Error(`Missing generated schema: contracts/schema/${name}`);
|
||||
}
|
||||
if (JSON.stringify(schemaFiles) !== JSON.stringify(required)) {
|
||||
throw new Error(
|
||||
`Generated schema manifest mismatch.\nExpected: ${required.join(", ")}\nActual: ${schemaFiles.join(", ")}`
|
||||
);
|
||||
}
|
||||
|
||||
for (const name of schemaFiles) {
|
||||
|
||||
Reference in New Issue
Block a user