index.ts 926 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 { iterationNode } from './iteration'
  15. import { loopNode } from './loop'
  16. import { listNode } from './list'
  17. import type { INodeType } from '../Interface'
  18. const nodes = [
  19. startNode,
  20. endNode,
  21. httpNode,
  22. conditionNode,
  23. databaseNode,
  24. codeNode,
  25. iterationNode,
  26. loopNode,
  27. listNode
  28. ]
  29. const nodeMap = nodes.reduce(
  30. (acc, cur) => {
  31. acc[cur.name] = cur
  32. return acc
  33. },
  34. {} as Record<string, INodeType>
  35. )
  36. export {
  37. startNode,
  38. endNode,
  39. httpNode,
  40. conditionNode,
  41. databaseNode,
  42. codeNode,
  43. nodes,
  44. nodeMap,
  45. iterationNode,
  46. loopNode,
  47. listNode
  48. }