2023-01-09 19:02:19 -05:00
|
|
|
import {JSONObjectReader} from "../templates/json-object-reader";
|
|
|
|
|
import {TemplateSchema} from "../templates/schema";
|
2025-12-05 10:27:19 -06:00
|
|
|
import WorkflowSchema from "../workflow-v1.0.min.json";
|
2023-01-06 15:54:31 -08:00
|
|
|
|
2023-01-09 19:02:19 -05:00
|
|
|
let schema: TemplateSchema;
|
2023-01-06 15:54:31 -08:00
|
|
|
|
|
|
|
|
export function getWorkflowSchema(): TemplateSchema {
|
|
|
|
|
if (schema === undefined) {
|
2023-01-09 19:02:19 -05:00
|
|
|
const json = JSON.stringify(WorkflowSchema);
|
|
|
|
|
schema = TemplateSchema.load(new JSONObjectReader(undefined, json));
|
2023-01-06 15:54:31 -08:00
|
|
|
}
|
2023-01-09 19:02:19 -05:00
|
|
|
return schema;
|
2023-01-06 15:54:31 -08:00
|
|
|
}
|