Remove class-transformer dependency (#1187)

* nit

* Fix test

* Remove class-transformer and its deps

* nit

* Fix invalid type for dummy node
This commit is contained in:
Chenlei Hu
2024-10-09 15:10:19 -04:00
committed by GitHub
parent fabcbaec82
commit e99329cff5
8 changed files with 84 additions and 140 deletions

View File

@@ -1,6 +1,5 @@
import { NodeSearchService } from '@/services/nodeSearchService'
import { ComfyNodeDefImpl } from '@/stores/nodeDefStore'
import { plainToClass } from 'class-transformer'
const EXAMPLE_NODE_DEFS: ComfyNodeDefImpl[] = [
{
@@ -52,7 +51,7 @@ const EXAMPLE_NODE_DEFS: ComfyNodeDefImpl[] = [
output_node: false
}
].map((nodeDef) => {
const def = plainToClass(ComfyNodeDefImpl, nodeDef)
const def = new ComfyNodeDefImpl(nodeDef)
def['postProcessSearchScores'] = (s) => s
return def
})