14 lines
451 B
TypeScript
14 lines
451 B
TypeScript
import {JSONObjectReader} from "../templates/json-object-reader";
|
|
import {TemplateSchema} from "../templates/schema";
|
|
import WorkflowSchema from "../workflow-v1.0.json" assert {type: "json"};
|
|
|
|
let schema: TemplateSchema;
|
|
|
|
export function getWorkflowSchema(): TemplateSchema {
|
|
if (schema === undefined) {
|
|
const json = JSON.stringify(WorkflowSchema);
|
|
schema = TemplateSchema.load(new JSONObjectReader(undefined, json));
|
|
}
|
|
return schema;
|
|
}
|