Use ComfyNodeDefImpl on nodeSearchService (#233)

* Make nodeSearchService use ComfyNodeDefImpl

* Fix test
This commit is contained in:
Chenlei Hu
2024-07-26 13:41:24 -04:00
committed by GitHub
parent 9bcc08d7ab
commit b4d7735855
4 changed files with 30 additions and 77 deletions

View File

@@ -1,7 +1,8 @@
import { NodeSearchService } from '@/services/nodeSearchService'
import { ComfyNodeDef } from '@/types/apiTypes'
import { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
import { plainToClass } from 'class-transformer'
const EXAMPLE_NODE_DEFS: ComfyNodeDef[] = [
const EXAMPLE_NODE_DEFS: ComfyNodeDefImpl[] = [
{
input: {
required: {
@@ -50,7 +51,7 @@ const EXAMPLE_NODE_DEFS: ComfyNodeDef[] = [
category: 'latent/batch',
output_node: false
}
]
].map((nodeDef) => plainToClass(ComfyNodeDefImpl, nodeDef))
describe('nodeSearchService', () => {
it('searches with input filter', () => {