Rename ComfyWorkflow to ComfyWorkflowJSON (#91)

This commit is contained in:
Chenlei Hu
2024-07-05 21:04:32 -04:00
committed by GitHub
parent d6b2d5fb4f
commit 84c939cf71
4 changed files with 14 additions and 9 deletions

View File

@@ -127,9 +127,11 @@ export type NodeInput = z.infer<typeof zNodeInput>;
export type NodeOutput = z.infer<typeof zNodeOutput>;
export type ComfyLink = z.infer<typeof zComfyLink>;
export type ComfyNode = z.infer<typeof zComfyNode>;
export type ComfyWorkflow = z.infer<typeof zComfyWorkflow>;
export type ComfyWorkflowJSON = z.infer<typeof zComfyWorkflow>;
export async function parseComfyWorkflow(data: string): Promise<ComfyWorkflow> {
export async function parseComfyWorkflow(
data: string
): Promise<ComfyWorkflowJSON> {
// Validate
const result = await zComfyWorkflow.safeParseAsync(JSON.parse(data));
if (!result.success) {