Skip to content

Commit

Permalink
fixup add workflows validation
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanKiral committed Sep 25, 2024
1 parent 5baa8ce commit 8858cc2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/sync/utils/getContentModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
spacesFileName,
taxonomiesFileName,
webSpotlightFileName,
workflowsFileName,
} from "../constants/filename.js";
import { fetchModel, transformSyncModel } from "../generateSyncModel.js";
import { FileContentModel } from "../types/fileContentModel.js";
Expand All @@ -29,6 +30,7 @@ import {
SyncTaxonomySchema,
SyncTypesSchema,
SyncWebSpotlightSchema,
SyncWorkflowSchema,
} from "../validation/syncSchemas.js";
import { getRequiredCodenames } from "./contentTypeHelpers.js";
import { fetchRequiredAssetsByCodename, fetchRequiredContentItemsByCodename } from "./fetchers.js";
Expand All @@ -47,6 +49,7 @@ export const readContentModelFromFolder = async (folderName: string): Promise<Fi
["assetFolders", await parseSchema(SyncAssetFolderSchema, folderName, assetFoldersFileName)],
["spaces", await parseSchema(SyncSpacesSchema, folderName, spacesFileName)],
["languages", await parseSchema(SyncLanguageSchema, folderName, languagesFileName)],
["workflows", await parseSchema(SyncWorkflowSchema, folderName, workflowsFileName)],
] as const;

const isError = (a: ParseWithError<unknown>): a is ParseError => !a.success;
Expand Down

0 comments on commit 8858cc2

Please sign in to comment.