Skip to content

Commit 9c5f8a6

Browse files
authored
feat: add workflowRendererVersion workflow schema (#7086)
## Summary add workflowRendererVersion to workflow schema extra ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7086-feat-add-workflowRendererVersion-workflow-schema-2bd6d73d3650818dbcecf2b85b0553a2) by [Unito](https://www.unito.io)
1 parent c7eac49 commit 9c5f8a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/platform/workflow/validation/schemas/workflowSchema.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { z } from 'zod'
22
import type { SafeParseReturnType } from 'zod'
33
import { fromZodError } from 'zod-validation-error'
4+
import type { RendererType } from '@/lib/litegraph/src/LGraph'
5+
6+
const zRendererType = z.enum(['LG', 'Vue']) satisfies z.ZodType<RendererType>
47

58
// GroupNode is hacking node id to be a string, so we need to allow that.
69
// innerNode.id = `${this.node.id}:${i}`
@@ -271,7 +274,8 @@ const zExtra = z
271274
ds: zDS.optional(),
272275
frontendVersion: z.string().optional(),
273276
linkExtensions: z.array(zComfyLinkExtension).optional(),
274-
reroutes: z.array(zReroute).optional()
277+
reroutes: z.array(zReroute).optional(),
278+
workflowRendererVersion: zRendererType.optional()
275279
})
276280
.passthrough()
277281

0 commit comments

Comments
 (0)