Add workflow schema with zod (#22)

* Safe parse with zod

* Fix zod issue

* Fix all validation errors

* nit

* Add tests

* Add color fields

* Passthrough
This commit is contained in:
Chenlei Hu
2024-06-17 17:28:52 -04:00
committed by GitHub
parent cc7ee23b91
commit b11a12d925
9 changed files with 1383 additions and 14 deletions

23
package-lock.json generated
View File

@@ -7,6 +7,10 @@
"": {
"name": "comfyui-frontend",
"version": "0.0.0",
"dependencies": {
"zod": "^3.23.8",
"zod-validation-error": "^3.3.0"
},
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.22.20",
@@ -8694,6 +8698,25 @@
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/zod": {
"version": "3.23.8",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
"integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
},
"node_modules/zod-validation-error": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.3.0.tgz",
"integrity": "sha512-Syib9oumw1NTqEv4LT0e6U83Td9aVRk9iTXPUQr1otyV1PuXQKOvOwhMNqZIq5hluzHP2pMgnOmHEo7kPdI2mw==",
"engines": {
"node": ">=18.0.0"
},
"peerDependencies": {
"zod": "^3.18.0"
}
}
}
}