nvent 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/module.d.mts +3 -184
  2. package/dist/module.json +3 -3
  3. package/dist/module.mjs +133 -197
  4. package/dist/runtime/adapters/builtin/file-queue.d.ts +53 -0
  5. package/dist/runtime/adapters/builtin/file-queue.js +435 -0
  6. package/dist/runtime/adapters/builtin/file-store.d.ts +46 -0
  7. package/dist/runtime/adapters/builtin/file-store.js +225 -0
  8. package/dist/runtime/adapters/builtin/file-stream.d.ts +39 -0
  9. package/dist/runtime/adapters/builtin/file-stream.js +56 -0
  10. package/dist/runtime/adapters/builtin/index.d.ts +10 -0
  11. package/dist/runtime/adapters/builtin/index.js +5 -0
  12. package/dist/runtime/adapters/builtin/memory-queue.d.ts +52 -0
  13. package/dist/runtime/adapters/builtin/memory-queue.js +239 -0
  14. package/dist/runtime/adapters/builtin/memory-store.d.ts +57 -0
  15. package/dist/runtime/adapters/builtin/memory-store.js +263 -0
  16. package/dist/runtime/adapters/builtin/memory-stream.d.ts +21 -0
  17. package/dist/runtime/adapters/builtin/memory-stream.js +56 -0
  18. package/dist/runtime/adapters/factory.d.ts +31 -0
  19. package/dist/runtime/adapters/factory.js +100 -0
  20. package/dist/runtime/adapters/index.d.ts +8 -0
  21. package/dist/runtime/adapters/index.js +3 -0
  22. package/dist/runtime/adapters/interfaces/index.d.ts +11 -0
  23. package/dist/runtime/adapters/interfaces/index.js +3 -0
  24. package/dist/runtime/adapters/interfaces/queue.d.ts +150 -0
  25. package/dist/runtime/adapters/interfaces/store.d.ts +233 -0
  26. package/dist/runtime/adapters/interfaces/stream.d.ts +62 -0
  27. package/dist/runtime/adapters/registry.d.ts +85 -0
  28. package/dist/runtime/adapters/registry.js +161 -0
  29. package/dist/runtime/config/index.d.ts +29 -0
  30. package/dist/runtime/config/index.js +167 -0
  31. package/dist/runtime/config/types.d.ts +367 -0
  32. package/dist/runtime/config/types.js +0 -0
  33. package/dist/runtime/events/types.d.ts +116 -0
  34. package/dist/runtime/events/types.js +0 -0
  35. package/dist/runtime/events/utils/stallDetector.d.ts +99 -0
  36. package/dist/runtime/events/utils/stallDetector.js +237 -0
  37. package/dist/runtime/{server-utils/events → events}/wiring/flowWiring.d.ts +3 -8
  38. package/dist/runtime/{server-utils/events → events}/wiring/flowWiring.js +119 -36
  39. package/dist/runtime/events/wiring/registry.d.ts +19 -0
  40. package/dist/runtime/events/wiring/registry.js +33 -0
  41. package/dist/runtime/events/wiring/stateWiring.d.ts +37 -0
  42. package/dist/runtime/events/wiring/stateWiring.js +92 -0
  43. package/dist/runtime/events/wiring/streamWiring.d.ts +32 -0
  44. package/dist/runtime/events/wiring/streamWiring.js +79 -0
  45. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.js +16 -5
  46. package/dist/runtime/server/api/_flows/[name]/runs/[runId]/cancel.post.js +21 -0
  47. package/dist/runtime/server/api/_flows/[name]/runs.get.d.ts +12 -2
  48. package/dist/runtime/server/api/_flows/[name]/runs.get.js +15 -4
  49. package/dist/runtime/server/api/_flows/[name]/schedule.post.js +11 -2
  50. package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.js +21 -16
  51. package/dist/runtime/server/api/_flows/[name]/schedules.get.js +21 -19
  52. package/dist/runtime/server/api/_flows/ws.js +43 -22
  53. package/dist/runtime/server/api/_queues/[name]/job/[id].get.js +8 -3
  54. package/dist/runtime/server/api/_queues/[name]/job/index.get.js +12 -3
  55. package/dist/runtime/server/api/_queues/index.get.js +66 -23
  56. package/dist/runtime/server/api/_queues/ws.js +14 -4
  57. package/dist/runtime/server/plugins/00.adapters.d.ts +14 -0
  58. package/dist/runtime/server/plugins/00.adapters.js +69 -0
  59. package/dist/runtime/server/plugins/02.workers.js +45 -0
  60. package/dist/runtime/tsconfig.json +8 -0
  61. package/dist/runtime/utils/adapters.d.ts +66 -0
  62. package/dist/runtime/utils/adapters.js +51 -0
  63. package/dist/runtime/utils/defineFunction.d.ts +10 -0
  64. package/dist/runtime/{server-utils/utils/defineQueueWorker.js → utils/defineFunction.js} +4 -4
  65. package/dist/runtime/{server-utils/utils/defineQueueConfig.d.ts → utils/defineFunctionConfig.d.ts} +3 -3
  66. package/dist/runtime/utils/defineFunctionConfig.js +2 -0
  67. package/dist/runtime/utils/registerAdapter.d.ts +59 -0
  68. package/dist/runtime/utils/registerAdapter.js +13 -0
  69. package/dist/runtime/utils/useFlowEngine.d.ts +19 -0
  70. package/dist/runtime/utils/useFlowEngine.js +108 -0
  71. package/dist/runtime/{server-utils/utils → utils}/useNventLogger.js +2 -2
  72. package/dist/runtime/utils/useStreamTopics.d.ts +72 -0
  73. package/dist/runtime/utils/useStreamTopics.js +47 -0
  74. package/dist/runtime/{server-utils/worker/runner/node.d.ts → worker/node/runner.d.ts} +18 -2
  75. package/dist/runtime/{server-utils/worker/runner/node.js → worker/node/runner.js} +44 -17
  76. package/dist/types.d.mts +2 -2
  77. package/package.json +14 -44
  78. package/LICENSE +0 -21
  79. package/README.md +0 -389
  80. package/dist/runtime/app/assets/vueflow.css +0 -1
  81. package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +0 -33
  82. package/dist/runtime/app/components/ConfirmDialog.vue +0 -121
  83. package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +0 -33
  84. package/dist/runtime/app/components/FlowDiagram.d.vue.ts +0 -64
  85. package/dist/runtime/app/components/FlowDiagram.vue +0 -338
  86. package/dist/runtime/app/components/FlowDiagram.vue.d.ts +0 -64
  87. package/dist/runtime/app/components/FlowNodeCard.d.vue.ts +0 -29
  88. package/dist/runtime/app/components/FlowNodeCard.vue +0 -156
  89. package/dist/runtime/app/components/FlowNodeCard.vue.d.ts +0 -29
  90. package/dist/runtime/app/components/FlowRunOverview.d.vue.ts +0 -9
  91. package/dist/runtime/app/components/FlowRunOverview.vue +0 -291
  92. package/dist/runtime/app/components/FlowRunOverview.vue.d.ts +0 -9
  93. package/dist/runtime/app/components/FlowRunStatusBadge.d.vue.ts +0 -14
  94. package/dist/runtime/app/components/FlowRunStatusBadge.vue +0 -60
  95. package/dist/runtime/app/components/FlowRunStatusBadge.vue.d.ts +0 -14
  96. package/dist/runtime/app/components/FlowRunTimeline.d.vue.ts +0 -12
  97. package/dist/runtime/app/components/FlowRunTimeline.vue +0 -127
  98. package/dist/runtime/app/components/FlowRunTimeline.vue.d.ts +0 -12
  99. package/dist/runtime/app/components/FlowScheduleDialog.d.vue.ts +0 -16
  100. package/dist/runtime/app/components/FlowScheduleDialog.vue +0 -226
  101. package/dist/runtime/app/components/FlowScheduleDialog.vue.d.ts +0 -16
  102. package/dist/runtime/app/components/FlowSchedulesList.d.vue.ts +0 -12
  103. package/dist/runtime/app/components/FlowSchedulesList.vue +0 -99
  104. package/dist/runtime/app/components/FlowSchedulesList.vue.d.ts +0 -12
  105. package/dist/runtime/app/components/JobScheduling.d.vue.ts +0 -6
  106. package/dist/runtime/app/components/JobScheduling.vue +0 -203
  107. package/dist/runtime/app/components/JobScheduling.vue.d.ts +0 -6
  108. package/dist/runtime/app/components/ListItem.d.vue.ts +0 -23
  109. package/dist/runtime/app/components/ListItem.vue +0 -70
  110. package/dist/runtime/app/components/ListItem.vue.d.ts +0 -23
  111. package/dist/runtime/app/components/QueueConfigDetails.d.vue.ts +0 -45
  112. package/dist/runtime/app/components/QueueConfigDetails.vue +0 -412
  113. package/dist/runtime/app/components/QueueConfigDetails.vue.d.ts +0 -45
  114. package/dist/runtime/app/components/StatCounter.d.vue.ts +0 -9
  115. package/dist/runtime/app/components/StatCounter.vue +0 -25
  116. package/dist/runtime/app/components/StatCounter.vue.d.ts +0 -9
  117. package/dist/runtime/app/components/TimelineList.d.vue.ts +0 -7
  118. package/dist/runtime/app/components/TimelineList.vue +0 -210
  119. package/dist/runtime/app/components/TimelineList.vue.d.ts +0 -7
  120. package/dist/runtime/app/components/nhealth/component-router.d.vue.ts +0 -46
  121. package/dist/runtime/app/components/nhealth/component-router.vue +0 -26
  122. package/dist/runtime/app/components/nhealth/component-router.vue.d.ts +0 -46
  123. package/dist/runtime/app/components/nhealth/component-shell.d.vue.ts +0 -24
  124. package/dist/runtime/app/components/nhealth/component-shell.vue +0 -89
  125. package/dist/runtime/app/components/nhealth/component-shell.vue.d.ts +0 -24
  126. package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +0 -14
  127. package/dist/runtime/app/composables/useAnalyzedFlows.js +0 -8
  128. package/dist/runtime/app/composables/useComponentRouter.d.ts +0 -38
  129. package/dist/runtime/app/composables/useComponentRouter.js +0 -240
  130. package/dist/runtime/app/composables/useFlowRunTimeline.d.ts +0 -80
  131. package/dist/runtime/app/composables/useFlowRunTimeline.js +0 -68
  132. package/dist/runtime/app/composables/useFlowRuns.d.ts +0 -18
  133. package/dist/runtime/app/composables/useFlowRuns.js +0 -32
  134. package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +0 -24
  135. package/dist/runtime/app/composables/useFlowRunsInfinite.js +0 -123
  136. package/dist/runtime/app/composables/useFlowRunsPolling.d.ts +0 -9
  137. package/dist/runtime/app/composables/useFlowRunsPolling.js +0 -33
  138. package/dist/runtime/app/composables/useFlowState.d.ts +0 -125
  139. package/dist/runtime/app/composables/useFlowState.js +0 -211
  140. package/dist/runtime/app/composables/useFlowWebSocket.d.ts +0 -27
  141. package/dist/runtime/app/composables/useFlowWebSocket.js +0 -205
  142. package/dist/runtime/app/composables/useFlowsNavigation.d.ts +0 -10
  143. package/dist/runtime/app/composables/useFlowsNavigation.js +0 -58
  144. package/dist/runtime/app/composables/useQueueJobs.d.ts +0 -26
  145. package/dist/runtime/app/composables/useQueueJobs.js +0 -20
  146. package/dist/runtime/app/composables/useQueueUpdates.d.ts +0 -26
  147. package/dist/runtime/app/composables/useQueueUpdates.js +0 -122
  148. package/dist/runtime/app/composables/useQueues.d.ts +0 -45
  149. package/dist/runtime/app/composables/useQueues.js +0 -26
  150. package/dist/runtime/app/composables/useQueuesLive.d.ts +0 -19
  151. package/dist/runtime/app/composables/useQueuesLive.js +0 -143
  152. package/dist/runtime/app/pages/flows/index.d.vue.ts +0 -3
  153. package/dist/runtime/app/pages/flows/index.vue +0 -645
  154. package/dist/runtime/app/pages/flows/index.vue.d.ts +0 -3
  155. package/dist/runtime/app/pages/index.d.vue.ts +0 -3
  156. package/dist/runtime/app/pages/index.vue +0 -34
  157. package/dist/runtime/app/pages/index.vue.d.ts +0 -3
  158. package/dist/runtime/app/pages/queues/index.d.vue.ts +0 -3
  159. package/dist/runtime/app/pages/queues/index.vue +0 -229
  160. package/dist/runtime/app/pages/queues/index.vue.d.ts +0 -3
  161. package/dist/runtime/app/pages/queues/job.d.vue.ts +0 -3
  162. package/dist/runtime/app/pages/queues/job.vue +0 -262
  163. package/dist/runtime/app/pages/queues/job.vue.d.ts +0 -3
  164. package/dist/runtime/app/pages/queues/jobs.d.vue.ts +0 -3
  165. package/dist/runtime/app/pages/queues/jobs.vue +0 -291
  166. package/dist/runtime/app/pages/queues/jobs.vue.d.ts +0 -3
  167. package/dist/runtime/app/plugins/vueflow.client.d.ts +0 -2
  168. package/dist/runtime/app/plugins/vueflow.client.js +0 -11
  169. package/dist/runtime/constants.d.ts +0 -11
  170. package/dist/runtime/constants.js +0 -11
  171. package/dist/runtime/schema.d.ts +0 -37
  172. package/dist/runtime/schema.js +0 -20
  173. package/dist/runtime/server/plugins/00.event-store.d.ts +0 -13
  174. package/dist/runtime/server/plugins/00.event-store.js +0 -16
  175. package/dist/runtime/server/plugins/flow-management.d.ts +0 -13
  176. package/dist/runtime/server/plugins/flow-management.js +0 -65
  177. package/dist/runtime/server/plugins/queue-management.js +0 -27
  178. package/dist/runtime/server/plugins/state-cleanup.d.ts +0 -11
  179. package/dist/runtime/server/plugins/state-cleanup.js +0 -93
  180. package/dist/runtime/server/plugins/worker-management.js +0 -33
  181. package/dist/runtime/server/tsconfig.json +0 -3
  182. package/dist/runtime/server-utils/events/adapters/fileAdapter.d.ts +0 -2
  183. package/dist/runtime/server-utils/events/adapters/fileAdapter.js +0 -382
  184. package/dist/runtime/server-utils/events/adapters/memoryAdapter.d.ts +0 -2
  185. package/dist/runtime/server-utils/events/adapters/memoryAdapter.js +0 -171
  186. package/dist/runtime/server-utils/events/adapters/redis/redisAdapter.d.ts +0 -2
  187. package/dist/runtime/server-utils/events/adapters/redis/redisAdapter.js +0 -348
  188. package/dist/runtime/server-utils/events/adapters/redis/redisPubSubGateway.d.ts +0 -30
  189. package/dist/runtime/server-utils/events/adapters/redis/redisPubSubGateway.js +0 -82
  190. package/dist/runtime/server-utils/events/eventStoreFactory.d.ts +0 -19
  191. package/dist/runtime/server-utils/events/eventStoreFactory.js +0 -44
  192. package/dist/runtime/server-utils/events/streamNames.d.ts +0 -17
  193. package/dist/runtime/server-utils/events/streamNames.js +0 -17
  194. package/dist/runtime/server-utils/events/types.d.ts +0 -63
  195. package/dist/runtime/server-utils/events/wiring/registry.d.ts +0 -10
  196. package/dist/runtime/server-utils/events/wiring/registry.js +0 -24
  197. package/dist/runtime/server-utils/queue/adapters/bullmq.d.ts +0 -18
  198. package/dist/runtime/server-utils/queue/adapters/bullmq.js +0 -164
  199. package/dist/runtime/server-utils/queue/queueFactory.d.ts +0 -3
  200. package/dist/runtime/server-utils/queue/queueFactory.js +0 -10
  201. package/dist/runtime/server-utils/queue/types.d.ts +0 -47
  202. package/dist/runtime/server-utils/state/adapters/redis.d.ts +0 -2
  203. package/dist/runtime/server-utils/state/adapters/redis.js +0 -42
  204. package/dist/runtime/server-utils/state/stateFactory.d.ts +0 -3
  205. package/dist/runtime/server-utils/state/stateFactory.js +0 -17
  206. package/dist/runtime/server-utils/state/types.d.ts +0 -23
  207. package/dist/runtime/server-utils/utils/defineQueueConfig.js +0 -2
  208. package/dist/runtime/server-utils/utils/defineQueueWorker.d.ts +0 -10
  209. package/dist/runtime/server-utils/utils/useEventStore.d.ts +0 -20
  210. package/dist/runtime/server-utils/utils/useEventStore.js +0 -119
  211. package/dist/runtime/server-utils/utils/useFlowEngine.d.ts +0 -9
  212. package/dist/runtime/server-utils/utils/useFlowEngine.js +0 -44
  213. package/dist/runtime/server-utils/utils/useLogs.d.ts +0 -41
  214. package/dist/runtime/server-utils/utils/useLogs.js +0 -74
  215. package/dist/runtime/server-utils/utils/useQueue.d.ts +0 -31
  216. package/dist/runtime/server-utils/utils/useQueue.js +0 -24
  217. package/dist/runtime/server-utils/worker/adapter.d.ts +0 -4
  218. package/dist/runtime/server-utils/worker/adapter.js +0 -66
  219. package/dist/runtime/types.d.ts +0 -132
  220. /package/dist/runtime/{server-utils/events/types.js → adapters/interfaces/queue.js} +0 -0
  221. /package/dist/runtime/{server-utils/queue/types.js → adapters/interfaces/store.js} +0 -0
  222. /package/dist/runtime/{server-utils/state/types.js → adapters/interfaces/stream.js} +0 -0
  223. /package/dist/runtime/{server-utils/events → events}/eventBus.d.ts +0 -0
  224. /package/dist/runtime/{server-utils/events → events}/eventBus.js +0 -0
  225. /package/dist/runtime/server/{plugins/queue-management.d.ts → api/_flows/[name]/runs/[runId]/cancel.post.d.ts} +0 -0
  226. /package/dist/runtime/server/plugins/{00.ws-lifecycle.d.ts → 01.ws-lifecycle.d.ts} +0 -0
  227. /package/dist/runtime/server/plugins/{00.ws-lifecycle.js → 01.ws-lifecycle.js} +0 -0
  228. /package/dist/runtime/server/plugins/{worker-management.d.ts → 02.workers.d.ts} +0 -0
  229. /package/dist/runtime/{server-utils/utils → utils}/useEventManager.d.ts +0 -0
  230. /package/dist/runtime/{server-utils/utils → utils}/useEventManager.js +0 -0
  231. /package/dist/runtime/{server-utils/utils → utils}/useNventLogger.d.ts +0 -0
  232. /package/dist/runtime/{server-utils/utils → utils}/wsPeerManager.d.ts +0 -0
  233. /package/dist/runtime/{server-utils/utils → utils}/wsPeerManager.js +0 -0
  234. /package/dist/runtime/{python → worker/python}/get_config.py +0 -0
@@ -1,291 +0,0 @@
1
- <template>
2
- <div class="flex flex-col h-full">
3
- <!-- Fixed Header with Run Stats -->
4
- <div class="px-6 py-[17px] border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50 shrink-0">
5
- <div class="flex items-center gap-4 text-xs">
6
- <!-- Status -->
7
- <div class="flex items-center gap-1.5">
8
- <div
9
- class="w-1.5 h-1.5 rounded-full"
10
- :class="getStatusColor(runStatus)"
11
- />
12
- <span class="text-gray-700 dark:text-gray-300 font-medium capitalize">
13
- {{ runStatus || "unknown" }}
14
- </span>
15
- </div>
16
-
17
- <!-- Divider -->
18
- <div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
19
-
20
- <!-- Total Steps -->
21
- <div class="flex items-center gap-1.5">
22
- <UIcon
23
- name="i-lucide-layers"
24
- class="w-3 h-3 text-gray-500"
25
- />
26
- <span class="text-gray-700 dark:text-gray-300">
27
- {{ steps.length }} {{ steps.length === 1 ? "step" : "steps" }}
28
- </span>
29
- </div>
30
-
31
- <!-- Divider -->
32
- <div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
33
-
34
- <!-- Started -->
35
- <div class="flex items-center gap-1.5">
36
- <UIcon
37
- name="i-lucide-clock"
38
- class="w-3 h-3 text-gray-500"
39
- />
40
- <span class="text-gray-600 dark:text-gray-400">
41
- {{ startedAt ? formatTime(startedAt) : "Not started" }}
42
- </span>
43
- </div>
44
-
45
- <!-- Divider -->
46
- <div class="w-px h-3 bg-gray-300 dark:bg-gray-700" />
47
-
48
- <!-- Duration -->
49
- <div class="flex items-center gap-1.5">
50
- <UIcon
51
- name="i-lucide-timer"
52
- class="w-3 h-3 text-gray-500"
53
- />
54
- <span class="text-gray-600 dark:text-gray-400">
55
- {{ getDuration(startedAt, completedAt) }}
56
- </span>
57
- </div>
58
- </div>
59
- </div>
60
-
61
- <!-- Scrollable Steps List -->
62
- <div class="flex-1 overflow-y-auto overflow-x-hidden px-6 py-6">
63
- <div
64
- v-if="steps.length === 0"
65
- class="h-full flex flex-col items-center justify-center text-gray-400 dark:text-gray-500"
66
- >
67
- <UIcon
68
- name="i-lucide-layers"
69
- class="w-12 h-12 mb-3 opacity-50"
70
- />
71
- <span class="text-sm">No steps executed yet</span>
72
- </div>
73
-
74
- <div
75
- v-else
76
- class="space-y-3"
77
- >
78
- <div
79
- v-for="(step, idx) in steps"
80
- :key="step.key"
81
- class="relative"
82
- >
83
- <!-- Connecting Line -->
84
- <div
85
- v-if="idx < steps.length - 1"
86
- class="absolute left-4 top-10 w-0.5 h-8 bg-gray-200 dark:bg-gray-800"
87
- />
88
-
89
- <!-- Step Card -->
90
- <div class="bg-white dark:bg-gray-950 border border-gray-200 dark:border-gray-800 rounded-lg p-4 hover:border-gray-300 dark:hover:border-gray-700 transition-colors">
91
- <div class="flex items-start gap-3">
92
- <!-- Status Icon -->
93
- <div class="flex-shrink-0 mt-0.5">
94
- <div
95
- class="w-8 h-8 rounded-full flex items-center justify-center"
96
- :class="getStepStatusBg(step.status)"
97
- >
98
- <UIcon
99
- :name="getStepStatusIcon(step.status)"
100
- class="w-4 h-4"
101
- :class="getStepStatusIconColor(step.status)"
102
- />
103
- </div>
104
- </div>
105
-
106
- <!-- Step Details -->
107
- <div class="flex-1 min-w-0">
108
- <div class="flex items-start justify-between gap-2">
109
- <div class="flex-1">
110
- <h4 class="text-sm font-medium text-gray-900 dark:text-gray-100">
111
- {{ step.key }}
112
- </h4>
113
- <div class="flex items-center gap-3 mt-1 text-xs text-gray-500">
114
- <span
115
- class="capitalize"
116
- :class="getStepStatusTextColor(step.status)"
117
- >
118
- {{ step.status || "pending" }}
119
- </span>
120
- <span v-if="step.attempt && step.attempt > 1">
121
- Attempt {{ step.attempt }}
122
- </span>
123
- </div>
124
- </div>
125
- </div>
126
-
127
- <!-- Timing Info -->
128
- <div
129
- v-if="step.startedAt || step.completedAt"
130
- class="mt-2 flex items-center gap-4 text-xs text-gray-500"
131
- >
132
- <div
133
- v-if="step.startedAt"
134
- class="flex items-center gap-1"
135
- >
136
- <UIcon
137
- name="i-lucide-clock"
138
- class="w-3 h-3"
139
- />
140
- <span>{{ formatTime(step.startedAt) }}</span>
141
- </div>
142
- <div
143
- v-if="step.completedAt"
144
- class="flex items-center gap-1"
145
- >
146
- <UIcon
147
- name="i-lucide-check-circle"
148
- class="w-3 h-3"
149
- />
150
- <span>{{ formatTime(step.completedAt) }}</span>
151
- </div>
152
- </div>
153
-
154
- <!-- Error Message -->
155
- <div
156
- v-if="step.error"
157
- class="mt-2 p-2 bg-red-50 dark:bg-red-900/10 border border-red-200 dark:border-red-900/30 rounded text-xs text-red-600 dark:text-red-400"
158
- >
159
- <div class="flex items-start gap-1">
160
- <UIcon
161
- name="i-lucide-alert-circle"
162
- class="w-3 h-3 flex-shrink-0 mt-0.5"
163
- />
164
- <span>{{ step.error }}</span>
165
- </div>
166
- </div>
167
-
168
- <!-- Await Info -->
169
- <div
170
- v-if="step.awaitType"
171
- class="mt-2 p-2 bg-blue-50 dark:bg-blue-900/10 border border-blue-200 dark:border-blue-900/30 rounded text-xs text-blue-600 dark:text-blue-400"
172
- >
173
- <div class="flex items-center gap-1">
174
- <UIcon
175
- name="i-lucide-timer"
176
- class="w-3 h-3"
177
- />
178
- <span>Waiting: {{ step.awaitType }}</span>
179
- </div>
180
- </div>
181
- </div>
182
- </div>
183
- </div>
184
- </div>
185
- </div>
186
- </div>
187
- </div>
188
- </template>
189
-
190
- <script setup>
191
- import { UIcon } from "#components";
192
- defineProps({
193
- runStatus: { type: String, required: false },
194
- startedAt: { type: String, required: false },
195
- completedAt: { type: String, required: false },
196
- steps: { type: Array, required: true }
197
- });
198
- const formatTime = (timestamp) => {
199
- const date = new Date(timestamp);
200
- const now = /* @__PURE__ */ new Date();
201
- const diff = now.getTime() - date.getTime();
202
- const seconds = Math.floor(diff / 1e3);
203
- const minutes = Math.floor(seconds / 60);
204
- const hours = Math.floor(minutes / 60);
205
- const days = Math.floor(hours / 24);
206
- if (days > 0)
207
- return `${days}d ago`;
208
- if (hours > 0)
209
- return `${hours}h ago`;
210
- if (minutes > 0)
211
- return `${minutes}m ago`;
212
- if (seconds > 10)
213
- return `${seconds}s ago`;
214
- return "just now";
215
- };
216
- const getDuration = (start, end) => {
217
- if (!start)
218
- return "\u2014";
219
- const startTime = new Date(start).getTime();
220
- const endTime = end ? new Date(end).getTime() : Date.now();
221
- const diff = endTime - startTime;
222
- const seconds = Math.floor(diff / 1e3);
223
- const minutes = Math.floor(seconds / 60);
224
- const hours = Math.floor(minutes / 60);
225
- if (hours > 0)
226
- return `${hours}h ${minutes % 60}m`;
227
- if (minutes > 0)
228
- return `${minutes}m ${seconds % 60}s`;
229
- return `${seconds}s`;
230
- };
231
- const getStatusColor = (status) => {
232
- switch (status) {
233
- case "completed":
234
- return "bg-emerald-500";
235
- case "failed":
236
- return "bg-red-500";
237
- case "running":
238
- return "bg-blue-500 animate-pulse";
239
- default:
240
- return "bg-gray-300";
241
- }
242
- };
243
- const getStepStatusBg = (status) => {
244
- switch (status) {
245
- case "completed":
246
- return "bg-emerald-50 dark:bg-emerald-900/20";
247
- case "failed":
248
- return "bg-red-50 dark:bg-red-900/20";
249
- case "running":
250
- return "bg-blue-50 dark:bg-blue-900/20";
251
- default:
252
- return "bg-gray-50 dark:bg-gray-900/20";
253
- }
254
- };
255
- const getStepStatusIcon = (status) => {
256
- switch (status) {
257
- case "completed":
258
- return "i-lucide-check-circle";
259
- case "failed":
260
- return "i-lucide-x-circle";
261
- case "running":
262
- return "i-lucide-loader-circle";
263
- default:
264
- return "i-lucide-circle";
265
- }
266
- };
267
- const getStepStatusIconColor = (status) => {
268
- switch (status) {
269
- case "completed":
270
- return "text-emerald-600 dark:text-emerald-400";
271
- case "failed":
272
- return "text-red-600 dark:text-red-400";
273
- case "running":
274
- return "text-blue-600 dark:text-blue-400 animate-spin";
275
- default:
276
- return "text-gray-400";
277
- }
278
- };
279
- const getStepStatusTextColor = (status) => {
280
- switch (status) {
281
- case "completed":
282
- return "text-emerald-600 dark:text-emerald-400";
283
- case "failed":
284
- return "text-red-600 dark:text-red-400";
285
- case "running":
286
- return "text-blue-600 dark:text-blue-400";
287
- default:
288
- return "text-gray-500";
289
- }
290
- };
291
- </script>
@@ -1,9 +0,0 @@
1
- type __VLS_Props = {
2
- runStatus?: string;
3
- startedAt?: string;
4
- completedAt?: string;
5
- steps: any[];
6
- };
7
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
- declare const _default: typeof __VLS_export;
9
- export default _default;
@@ -1,14 +0,0 @@
1
- interface Props {
2
- isRunning?: boolean;
3
- isCompleted?: boolean;
4
- isFailed?: boolean;
5
- isReconnecting?: boolean;
6
- }
7
- declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
8
- isRunning: boolean;
9
- isCompleted: boolean;
10
- isFailed: boolean;
11
- isReconnecting: boolean;
12
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const _default: typeof __VLS_export;
14
- export default _default;
@@ -1,60 +0,0 @@
1
- <template>
2
- <div
3
- class="flex items-center gap-1.5 px-1.5 py-0.5 rounded text-xs border shrink-0"
4
- :class="{
5
- 'bg-emerald-50 dark:bg-emerald-950/30 border-emerald-200 dark:border-emerald-800': isCompleted,
6
- 'bg-red-50 dark:bg-red-950/30 border-red-200 dark:border-red-800': isFailed,
7
- 'bg-blue-50 dark:bg-blue-950/30 border-blue-200 dark:border-blue-800': isRunning,
8
- 'bg-gray-50 dark:bg-gray-900/30 border-gray-200 dark:border-gray-800': isIdle
9
- }"
10
- >
11
- <div
12
- class="w-1 h-1 rounded-full"
13
- :class="{
14
- 'bg-emerald-500': isCompleted,
15
- 'bg-red-500': isFailed,
16
- 'bg-blue-500 animate-pulse': isRunning && !isReconnecting,
17
- 'bg-amber-500 animate-pulse': isReconnecting,
18
- 'bg-gray-400': isIdle
19
- }"
20
- />
21
- <span
22
- class="text-[10px] font-medium uppercase tracking-wider"
23
- :class="{
24
- 'text-emerald-700 dark:text-emerald-400': isCompleted,
25
- 'text-red-700 dark:text-red-400': isFailed,
26
- 'text-blue-700 dark:text-blue-400': isRunning,
27
- 'text-gray-600 dark:text-gray-400': isIdle
28
- }"
29
- >
30
- <template v-if="isReconnecting">
31
- Reconnecting
32
- </template>
33
- <template v-else-if="isRunning">
34
- Running
35
- </template>
36
- <template v-else-if="isCompleted">
37
- Done
38
- </template>
39
- <template v-else-if="isFailed">
40
- Failed
41
- </template>
42
- <template v-else>
43
- Idle
44
- </template>
45
- </span>
46
- </div>
47
- </template>
48
-
49
- <script setup>
50
- import { computed } from "#imports";
51
- const props = defineProps({
52
- isRunning: { type: Boolean, required: false, default: false },
53
- isCompleted: { type: Boolean, required: false, default: false },
54
- isFailed: { type: Boolean, required: false, default: false },
55
- isReconnecting: { type: Boolean, required: false, default: false }
56
- });
57
- const isIdle = computed(() => {
58
- return !props.isRunning && !props.isCompleted && !props.isFailed;
59
- });
60
- </script>
@@ -1,14 +0,0 @@
1
- interface Props {
2
- isRunning?: boolean;
3
- isCompleted?: boolean;
4
- isFailed?: boolean;
5
- isReconnecting?: boolean;
6
- }
7
- declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
8
- isRunning: boolean;
9
- isCompleted: boolean;
10
- isFailed: boolean;
11
- isReconnecting: boolean;
12
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
- declare const _default: typeof __VLS_export;
14
- export default _default;
@@ -1,12 +0,0 @@
1
- type __VLS_Props = {
2
- events: any[];
3
- logs: any[];
4
- isLive?: boolean;
5
- };
6
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- export: () => any;
8
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onExport?: (() => any) | undefined;
10
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const _default: typeof __VLS_export;
12
- export default _default;
@@ -1,127 +0,0 @@
1
- <template>
2
- <div class="flex flex-col h-full">
3
- <!-- Filter Bar -->
4
- <div class="flex items-center gap-3 px-6 py-3 border-b border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900/50 shrink-0">
5
- <div class="flex items-center gap-2">
6
- <span class="text-xs font-medium text-gray-700 dark:text-gray-300">Show:</span>
7
- <URadioGroup
8
- v-model="filter"
9
- :items="filterOptions"
10
- orientation="horizontal"
11
- size="xs"
12
- variant="table"
13
- indicator="hidden"
14
- :ui="{
15
- base: 'size-2',
16
- container: 'h-2',
17
- item: 'p-1'
18
- }"
19
- />
20
- </div>
21
-
22
- <div class="flex items-center gap-2 ml-auto">
23
- <UButton
24
- size="xs"
25
- color="neutral"
26
- variant="outline"
27
- :disabled="filteredItems.length === 0"
28
- @click="$emit('export')"
29
- >
30
- Export JSON
31
- </UButton>
32
- <div class="text-xs text-gray-500">
33
- {{ filteredItems.length }} item{{ filteredItems.length === 1 ? "" : "s" }}
34
- </div>
35
- </div>
36
- </div>
37
-
38
- <!-- Combined Timeline/Logs Content -->
39
- <div class="flex-1 overflow-y-auto overflow-x-hidden">
40
- <div
41
- v-if="filteredItems.length === 0"
42
- class="h-full flex flex-col items-center justify-center text-gray-400 dark:text-gray-500"
43
- >
44
- <UIcon
45
- name="i-lucide-inbox"
46
- class="w-12 h-12 mb-3 opacity-50"
47
- />
48
- <span class="text-sm">No {{ filter === "all" ? "items" : filter }} yet.</span>
49
- </div>
50
- <TimelineList
51
- v-else
52
- :items="filteredItems"
53
- height-class="min-h-full"
54
- />
55
- </div>
56
- </div>
57
- </template>
58
-
59
- <script setup>
60
- import { ref, computed } from "#imports";
61
- import TimelineList from "./TimelineList.vue";
62
- import { UButton, UIcon, URadioGroup } from "#components";
63
- const props = defineProps({
64
- events: { type: Array, required: true },
65
- logs: { type: Array, required: true },
66
- isLive: { type: Boolean, required: false }
67
- });
68
- defineEmits(["export"]);
69
- const filter = ref("all");
70
- const filterOptions = [
71
- { value: "all", label: "All" },
72
- { value: "events", label: "Events" },
73
- { value: "logs", label: "Logs" }
74
- ];
75
- function getItemHash(item) {
76
- if (item.type === "log") {
77
- const message = item.data?.message || item.data?.msg || "";
78
- const level = item.data?.level || "info";
79
- const step2 = item.stepName || item.data?.stepName || "";
80
- const ts2 = item.ts || 0;
81
- return `log-${ts2}-${step2}-${level}-${message}`.toLowerCase();
82
- }
83
- const step = item.stepName || "";
84
- const ts = item.ts || 0;
85
- return `${item.type}-${ts}-${step}`.toLowerCase();
86
- }
87
- const filteredItems = computed(() => {
88
- const allItems = [];
89
- allItems.push(...props.events);
90
- const logItems = props.logs.map((log) => ({
91
- id: `log-${log.ts}`,
92
- ts: log.ts,
93
- type: "log",
94
- stepName: log.step || log.stepName,
95
- data: {
96
- level: log.level,
97
- message: log.msg || log.message,
98
- ...log.data
99
- }
100
- }));
101
- allItems.push(...logItems);
102
- const seenHashes = /* @__PURE__ */ new Set();
103
- const uniqueItems = [];
104
- allItems.forEach((item) => {
105
- const hash = getItemHash(item);
106
- if (!seenHashes.has(hash)) {
107
- seenHashes.add(hash);
108
- uniqueItems.push(item);
109
- }
110
- });
111
- let deduplicatedItems = uniqueItems;
112
- if (filter.value === "events") {
113
- deduplicatedItems = uniqueItems.filter((item) => item.type !== "log");
114
- } else if (filter.value === "logs") {
115
- deduplicatedItems = uniqueItems.filter((item) => item.type === "log");
116
- }
117
- deduplicatedItems.sort((a, b) => {
118
- const getTs = (item) => {
119
- if (typeof item.ts === "number") return item.ts;
120
- if (typeof item.ts === "string") return new Date(item.ts).getTime();
121
- return 0;
122
- };
123
- return getTs(b) - getTs(a);
124
- });
125
- return deduplicatedItems;
126
- });
127
- </script>
@@ -1,12 +0,0 @@
1
- type __VLS_Props = {
2
- events: any[];
3
- logs: any[];
4
- isLive?: boolean;
5
- };
6
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- export: () => any;
8
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onExport?: (() => any) | undefined;
10
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const _default: typeof __VLS_export;
12
- export default _default;
@@ -1,16 +0,0 @@
1
- type __VLS_Props = {
2
- flowName: string;
3
- };
4
- type __VLS_ModelProps = {
5
- modelValue?: boolean;
6
- };
7
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
- scheduled: () => any;
10
- "update:modelValue": (value: boolean) => any;
11
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
12
- onScheduled?: (() => any) | undefined;
13
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
- declare const _default: typeof __VLS_export;
16
- export default _default;