Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ yarn.lock
.eslintcache
.prettiercache
.stylelintcache
*.tsbuildinfo

node_modules
.pnpm-store
Expand Down
3 changes: 2 additions & 1 deletion eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export default defineConfig([
projectService: {
allowDefaultProject: [
'vite.electron.config.mts',
'vite.types.config.mts'
'vite.types.config.mts',
'packages/workflow-validation/vite.config.mts'
Comment thread
christian-byrne marked this conversation as resolved.
Outdated
]
}
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"@comfyorg/registry-types": "workspace:*",
"@comfyorg/shared-frontend-utils": "workspace:*",
"@comfyorg/tailwind-utils": "workspace:*",
"@comfyorg/workflow-validation": "workspace:*",
"@formkit/auto-animate": "catalog:",
"@iconify/json": "catalog:",
"@primeuix/forms": "catalog:",
Expand Down
41 changes: 41 additions & 0 deletions packages/workflow-validation/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "@comfyorg/workflow-validation",
"version": "0.1.0",
"description": "Workflow JSON schemas, link topology validator, and link repair for ComfyUI workflows",
"homepage": "https://comfy.org",
"license": "GPL-3.0-only",
"repository": "https://github.com/Comfy-Org/ComfyUI_frontend",
"type": "module",
"main": "./src/index.ts",
"types": "./src/index.ts",
"exports": {
".": "./src/index.ts",
"./linkRepair": "./src/linkRepair.ts",
"./linkTopology": "./src/linkTopology.ts",
"./workflowSchema": "./src/workflowSchema.ts",
"./serialised": "./src/serialised.ts"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "vite build --config vite.config.mts && tsx ../../scripts/prepare-workflow-validation.ts",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"zod": "catalog:",
"zod-validation-error": "catalog:"
},
"devDependencies": {
"typescript": "catalog:",
"vite": "catalog:",
"vite-plugin-dts": "catalog:"
},
"packageManager": "pnpm@10.17.1",
"nx": {
"tags": [
"scope:shared",
"type:validation"
]
}
}
38 changes: 38 additions & 0 deletions packages/workflow-validation/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
export type {
SerialisedGraph,
SerialisedLinkArray,
SerialisedLinkObject,
SerialisedNode,
SerialisedNodeInput,
SerialisedNodeOutput
} from './serialised'

export {
describeTopologyError,
toLinkContext,
validateLinkTopology
} from './linkTopology'
export type { LinkContext, TopologyError } from './linkTopology'

export { LinkRepairAbortedError, repairLinks } from './linkRepair'
export type { RepairResult } from './linkRepair'

export { repairLinks as fixBadLinks } from './linkRepair'

export {
validateComfyWorkflow,
zComfyWorkflow,
zComfyWorkflow1,
zNodeId
} from './workflowSchema'
export type {
ComfyApiWorkflow,
ComfyLinkObject,
ComfyNode,
ComfyWorkflowJSON,
ModelFile,
NodeId,
Reroute,
WorkflowId,
WorkflowJSON04
} from './workflowSchema'
Loading
Loading