Add directive checking

This commit is contained in:
Endeavorance 2025-02-25 13:27:26 -05:00
parent 8b276cc226
commit d4eb0c8a4f
4 changed files with 11 additions and 6 deletions

View file

@ -2,6 +2,7 @@ import { parseArgs } from "node:util";
import {
type AnyResource,
ValidatedPlaybillSchema,
checkDirectives,
getEmptyPlaybill,
} from "@proscenium/playbill";
import chalk from "chalk";
@ -164,6 +165,13 @@ async function main(): Promise<number> {
return ExitCode.Error;
}
const directiveValidationResult = checkDirectives(validatedPlaybill.data);
if (!directiveValidationResult) {
console.error("Error validating playbill directives");
return ExitCode.Error;
}
verboseLog("Playbill validated");
// -- EXIT EARLY IF JUST CHECKING VALIDATION --//