index.ts 824 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * @Author: liuJie
  3. * @Date: 2026-01-24 19:23:49
  4. * @LastEditors: liuJie
  5. * @LastEditTime: 2026-01-25 21:53:48
  6. * @Describe: 节点物料管理
  7. */
  8. import { startNode } from './start'
  9. import { endNode } from './end'
  10. import { httpNode } from './http'
  11. import { conditionNode } from './condition'
  12. import { databaseNode } from './database'
  13. import { codeNode } from './code'
  14. import { materialTools, type SourceType } from './toolbar'
  15. import type { INodeType } from '../Interface'
  16. const nodes = [startNode, endNode, httpNode, conditionNode, databaseNode, codeNode]
  17. const nodeMap = nodes.reduce(
  18. (acc, cur) => {
  19. acc[cur.name] = cur
  20. return acc
  21. },
  22. {} as Record<string, INodeType>
  23. )
  24. export {
  25. startNode,
  26. endNode,
  27. httpNode,
  28. conditionNode,
  29. databaseNode,
  30. codeNode,
  31. materialTools,
  32. nodes,
  33. nodeMap,
  34. type SourceType
  35. }