Add directive checking
This commit is contained in:
parent
8b276cc226
commit
d4eb0c8a4f
4 changed files with 11 additions and 6 deletions
|
@ -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 --//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue