Add directive checking
This commit is contained in:
parent
8b276cc226
commit
d4eb0c8a4f
4 changed files with 11 additions and 6 deletions
4
bun.lock
4
bun.lock
|
@ -4,7 +4,7 @@
|
|||
"": {
|
||||
"name": "@proscenium/muse",
|
||||
"dependencies": {
|
||||
"@proscenium/playbill": "0.0.5",
|
||||
"@proscenium/playbill": "0.0.2",
|
||||
"chalk": "^5.4.1",
|
||||
"yaml": "^2.7.0",
|
||||
"zod": "^3.24.1",
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@1.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="],
|
||||
|
||||
"@proscenium/playbill": ["@proscenium/playbill@0.0.5", "https://git.astral.camp/api/packages/proscenium/npm/%40proscenium%2Fplaybill/-/0.0.5/playbill-0.0.5.tgz", { "peerDependencies": { "typescript": "^5" } }, "sha512-4TzEe3LpZ2WAep/OWtuNoGiRb2NilfBBN9KQ65/sYSkmBq4Wtdploqo/7+R1Twja/AvOBGgw+Art12beywhqtQ=="],
|
||||
"@proscenium/playbill": ["@proscenium/playbill@0.0.2", "https://git.astral.camp/api/packages/proscenium/npm/%40proscenium%2Fplaybill/-/0.0.2/playbill-0.0.2.tgz", { "peerDependencies": { "typescript": "^5" } }, "sha512-eXrfAK9xQzr0AnY3QJcY+DujWafJh6ntO5KYDdhWE4HE5VfWrLVk42LVFlM7HDkulnjwa6uvwaET2QrR3RWKlw=="],
|
||||
|
||||
"@types/bun": ["@types/bun@1.2.3", "", { "dependencies": { "bun-types": "1.2.3" } }, "sha512-054h79ipETRfjtsCW9qJK8Ipof67Pw9bodFWmkfkaUaRiIQ1dIV2VTlheshlBx3mpKr0KeK8VqnMMCtgN9rQtw=="],
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"chalk": "^5.4.1",
|
||||
"yaml": "^2.7.0",
|
||||
"zod": "^3.24.1",
|
||||
"@proscenium/playbill": "0.0.5"
|
||||
"@proscenium/playbill": "0.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"fmt": "bunx --bun biome check --fix",
|
||||
|
|
|
@ -3,6 +3,3 @@ id: the-great-spires
|
|||
name: The Great Spires
|
||||
author: "Endeavorance <hello@endeavorance.camp>"
|
||||
version: 0.0.1
|
||||
files:
|
||||
- ./spires/**/*.yaml
|
||||
- ./spires/**/*.md
|
||||
|
|
|
@ -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