nvent 0.4.4 → 0.5.0

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 (293) hide show
  1. package/dist/module.d.mts +4 -185
  2. package/dist/module.json +3 -3
  3. package/dist/module.mjs +451 -257
  4. package/dist/runtime/adapters/base/index.d.ts +6 -0
  5. package/dist/runtime/adapters/base/index.js +1 -0
  6. package/dist/runtime/adapters/base/store-validator.d.ts +48 -0
  7. package/dist/runtime/adapters/base/store-validator.js +147 -0
  8. package/dist/runtime/adapters/builtin/file-queue.d.ts +67 -0
  9. package/dist/runtime/adapters/builtin/file-queue.js +499 -0
  10. package/dist/runtime/adapters/builtin/file-store.d.ts +32 -0
  11. package/dist/runtime/adapters/builtin/file-store.js +206 -0
  12. package/dist/runtime/adapters/builtin/file-stream.d.ts +39 -0
  13. package/dist/runtime/adapters/builtin/file-stream.js +56 -0
  14. package/dist/runtime/adapters/builtin/index.d.ts +10 -0
  15. package/dist/runtime/adapters/builtin/index.js +5 -0
  16. package/dist/runtime/adapters/builtin/memory-queue.d.ts +52 -0
  17. package/dist/runtime/adapters/builtin/memory-queue.js +243 -0
  18. package/dist/runtime/adapters/builtin/memory-store.d.ts +68 -0
  19. package/dist/runtime/adapters/builtin/memory-store.js +333 -0
  20. package/dist/runtime/adapters/builtin/memory-stream.d.ts +21 -0
  21. package/dist/runtime/adapters/builtin/memory-stream.js +56 -0
  22. package/dist/runtime/adapters/factory.d.ts +31 -0
  23. package/dist/runtime/adapters/factory.js +134 -0
  24. package/dist/runtime/adapters/index.d.ts +8 -0
  25. package/dist/runtime/adapters/index.js +3 -0
  26. package/dist/runtime/adapters/interfaces/index.d.ts +11 -0
  27. package/dist/runtime/adapters/interfaces/index.js +3 -0
  28. package/dist/runtime/adapters/interfaces/queue.d.ts +150 -0
  29. package/dist/runtime/adapters/interfaces/store.d.ts +297 -0
  30. package/dist/runtime/adapters/interfaces/stream.d.ts +62 -0
  31. package/dist/runtime/adapters/registry.d.ts +85 -0
  32. package/dist/runtime/adapters/registry.js +161 -0
  33. package/dist/runtime/config/index.d.ts +29 -0
  34. package/dist/runtime/config/index.js +175 -0
  35. package/dist/runtime/config/types.d.ts +397 -0
  36. package/dist/runtime/config/types.js +0 -0
  37. package/dist/runtime/{server-utils/events → events}/eventBus.d.ts +1 -1
  38. package/dist/runtime/events/types.d.ts +145 -0
  39. package/dist/runtime/events/types.js +0 -0
  40. package/dist/runtime/events/utils/scheduleTrigger.d.ts +8 -0
  41. package/dist/runtime/events/utils/scheduleTrigger.js +69 -0
  42. package/dist/runtime/events/utils/stallDetector.d.ts +140 -0
  43. package/dist/runtime/events/utils/stallDetector.js +436 -0
  44. package/dist/runtime/events/utils/triggerRuntime.d.ts +58 -0
  45. package/dist/runtime/events/utils/triggerRuntime.js +212 -0
  46. package/dist/runtime/{server-utils/events → events}/wiring/flowWiring.d.ts +12 -11
  47. package/dist/runtime/events/wiring/flowWiring.js +1020 -0
  48. package/dist/runtime/events/wiring/registry.d.ts +19 -0
  49. package/dist/runtime/events/wiring/registry.js +35 -0
  50. package/dist/runtime/events/wiring/stateWiring.d.ts +37 -0
  51. package/dist/runtime/events/wiring/stateWiring.js +92 -0
  52. package/dist/runtime/events/wiring/streamWiring.d.ts +36 -0
  53. package/dist/runtime/events/wiring/streamWiring.js +156 -0
  54. package/dist/runtime/events/wiring/triggerWiring.d.ts +21 -0
  55. package/dist/runtime/events/wiring/triggerWiring.js +412 -0
  56. package/dist/runtime/nitro/plugins/00.adapters.d.ts +14 -0
  57. package/dist/runtime/nitro/plugins/00.adapters.js +73 -0
  58. package/dist/runtime/nitro/plugins/02.workers.js +63 -0
  59. package/dist/runtime/nitro/plugins/03.triggers.d.ts +12 -0
  60. package/dist/runtime/nitro/plugins/03.triggers.js +55 -0
  61. package/dist/runtime/nitro/routes/webhook.await.d.ts +23 -0
  62. package/dist/runtime/nitro/routes/webhook.await.js +90 -0
  63. package/dist/runtime/nitro/routes/webhook.trigger.d.ts +69 -0
  64. package/dist/runtime/nitro/routes/webhook.trigger.js +64 -0
  65. package/dist/runtime/nitro/utils/adapters.d.ts +66 -0
  66. package/dist/runtime/nitro/utils/adapters.js +51 -0
  67. package/dist/runtime/nitro/utils/awaitPatterns/event.d.ts +15 -0
  68. package/dist/runtime/nitro/utils/awaitPatterns/event.js +120 -0
  69. package/dist/runtime/nitro/utils/awaitPatterns/index.d.ts +28 -0
  70. package/dist/runtime/nitro/utils/awaitPatterns/index.js +55 -0
  71. package/dist/runtime/nitro/utils/awaitPatterns/schedule.d.ts +16 -0
  72. package/dist/runtime/nitro/utils/awaitPatterns/schedule.js +78 -0
  73. package/dist/runtime/nitro/utils/awaitPatterns/time.d.ts +15 -0
  74. package/dist/runtime/nitro/utils/awaitPatterns/time.js +67 -0
  75. package/dist/runtime/nitro/utils/awaitPatterns/webhook.d.ts +15 -0
  76. package/dist/runtime/nitro/utils/awaitPatterns/webhook.js +120 -0
  77. package/dist/runtime/nitro/utils/defineFunction.d.ts +10 -0
  78. package/dist/runtime/nitro/utils/defineFunction.js +17 -0
  79. package/dist/runtime/nitro/utils/defineFunctionConfig.d.ts +310 -0
  80. package/dist/runtime/nitro/utils/defineFunctionConfig.js +3 -0
  81. package/dist/runtime/nitro/utils/defineHooks.d.ts +41 -0
  82. package/dist/runtime/nitro/utils/defineHooks.js +6 -0
  83. package/dist/runtime/nitro/utils/registerAdapter.d.ts +59 -0
  84. package/dist/runtime/nitro/utils/registerAdapter.js +13 -0
  85. package/dist/runtime/nitro/utils/useAwait.d.ts +71 -0
  86. package/dist/runtime/nitro/utils/useAwait.js +139 -0
  87. package/dist/runtime/{server-utils → nitro}/utils/useEventManager.d.ts +2 -2
  88. package/dist/runtime/{server-utils → nitro}/utils/useEventManager.js +1 -1
  89. package/dist/runtime/nitro/utils/useFlow.d.ts +68 -0
  90. package/dist/runtime/nitro/utils/useFlow.js +226 -0
  91. package/dist/runtime/nitro/utils/useHookRegistry.d.ts +34 -0
  92. package/dist/runtime/nitro/utils/useHookRegistry.js +25 -0
  93. package/dist/runtime/{server-utils → nitro}/utils/useNventLogger.js +2 -2
  94. package/dist/runtime/nitro/utils/useRunContext.d.ts +6 -0
  95. package/dist/runtime/nitro/utils/useRunContext.js +102 -0
  96. package/dist/runtime/nitro/utils/useStreamTopics.d.ts +83 -0
  97. package/dist/runtime/nitro/utils/useStreamTopics.js +94 -0
  98. package/dist/runtime/nitro/utils/useTrigger.d.ts +150 -0
  99. package/dist/runtime/nitro/utils/useTrigger.js +320 -0
  100. package/dist/runtime/scheduler/index.d.ts +33 -0
  101. package/dist/runtime/scheduler/index.js +38 -0
  102. package/dist/runtime/scheduler/scheduler.d.ts +113 -0
  103. package/dist/runtime/scheduler/scheduler.js +623 -0
  104. package/dist/runtime/scheduler/types.d.ts +116 -0
  105. package/dist/runtime/scheduler/types.js +0 -0
  106. package/dist/runtime/tsconfig.json +8 -0
  107. package/dist/runtime/worker/node/runner.d.ts +53 -0
  108. package/dist/runtime/worker/node/runner.js +327 -0
  109. package/dist/types.d.mts +2 -2
  110. package/package.json +16 -46
  111. package/LICENSE +0 -21
  112. package/README.md +0 -389
  113. package/dist/runtime/app/assets/vueflow.css +0 -1
  114. package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +0 -33
  115. package/dist/runtime/app/components/ConfirmDialog.vue +0 -121
  116. package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +0 -33
  117. package/dist/runtime/app/components/FlowDiagram.d.vue.ts +0 -64
  118. package/dist/runtime/app/components/FlowDiagram.vue +0 -338
  119. package/dist/runtime/app/components/FlowDiagram.vue.d.ts +0 -64
  120. package/dist/runtime/app/components/FlowNodeCard.d.vue.ts +0 -29
  121. package/dist/runtime/app/components/FlowNodeCard.vue +0 -156
  122. package/dist/runtime/app/components/FlowNodeCard.vue.d.ts +0 -29
  123. package/dist/runtime/app/components/FlowRunOverview.d.vue.ts +0 -9
  124. package/dist/runtime/app/components/FlowRunOverview.vue +0 -291
  125. package/dist/runtime/app/components/FlowRunOverview.vue.d.ts +0 -9
  126. package/dist/runtime/app/components/FlowRunStatusBadge.d.vue.ts +0 -14
  127. package/dist/runtime/app/components/FlowRunStatusBadge.vue +0 -60
  128. package/dist/runtime/app/components/FlowRunStatusBadge.vue.d.ts +0 -14
  129. package/dist/runtime/app/components/FlowRunTimeline.d.vue.ts +0 -12
  130. package/dist/runtime/app/components/FlowRunTimeline.vue +0 -127
  131. package/dist/runtime/app/components/FlowRunTimeline.vue.d.ts +0 -12
  132. package/dist/runtime/app/components/FlowScheduleDialog.d.vue.ts +0 -16
  133. package/dist/runtime/app/components/FlowScheduleDialog.vue +0 -226
  134. package/dist/runtime/app/components/FlowScheduleDialog.vue.d.ts +0 -16
  135. package/dist/runtime/app/components/FlowSchedulesList.d.vue.ts +0 -12
  136. package/dist/runtime/app/components/FlowSchedulesList.vue +0 -99
  137. package/dist/runtime/app/components/FlowSchedulesList.vue.d.ts +0 -12
  138. package/dist/runtime/app/components/JobScheduling.d.vue.ts +0 -6
  139. package/dist/runtime/app/components/JobScheduling.vue +0 -203
  140. package/dist/runtime/app/components/JobScheduling.vue.d.ts +0 -6
  141. package/dist/runtime/app/components/ListItem.d.vue.ts +0 -23
  142. package/dist/runtime/app/components/ListItem.vue +0 -70
  143. package/dist/runtime/app/components/ListItem.vue.d.ts +0 -23
  144. package/dist/runtime/app/components/QueueConfigDetails.d.vue.ts +0 -45
  145. package/dist/runtime/app/components/QueueConfigDetails.vue +0 -412
  146. package/dist/runtime/app/components/QueueConfigDetails.vue.d.ts +0 -45
  147. package/dist/runtime/app/components/StatCounter.d.vue.ts +0 -9
  148. package/dist/runtime/app/components/StatCounter.vue +0 -25
  149. package/dist/runtime/app/components/StatCounter.vue.d.ts +0 -9
  150. package/dist/runtime/app/components/TimelineList.d.vue.ts +0 -7
  151. package/dist/runtime/app/components/TimelineList.vue +0 -210
  152. package/dist/runtime/app/components/TimelineList.vue.d.ts +0 -7
  153. package/dist/runtime/app/components/nhealth/component-router.d.vue.ts +0 -46
  154. package/dist/runtime/app/components/nhealth/component-router.vue +0 -26
  155. package/dist/runtime/app/components/nhealth/component-router.vue.d.ts +0 -46
  156. package/dist/runtime/app/components/nhealth/component-shell.d.vue.ts +0 -24
  157. package/dist/runtime/app/components/nhealth/component-shell.vue +0 -89
  158. package/dist/runtime/app/components/nhealth/component-shell.vue.d.ts +0 -24
  159. package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +0 -14
  160. package/dist/runtime/app/composables/useAnalyzedFlows.js +0 -8
  161. package/dist/runtime/app/composables/useComponentRouter.d.ts +0 -38
  162. package/dist/runtime/app/composables/useComponentRouter.js +0 -240
  163. package/dist/runtime/app/composables/useFlowRunTimeline.d.ts +0 -80
  164. package/dist/runtime/app/composables/useFlowRunTimeline.js +0 -68
  165. package/dist/runtime/app/composables/useFlowRuns.d.ts +0 -18
  166. package/dist/runtime/app/composables/useFlowRuns.js +0 -32
  167. package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +0 -24
  168. package/dist/runtime/app/composables/useFlowRunsInfinite.js +0 -123
  169. package/dist/runtime/app/composables/useFlowRunsPolling.d.ts +0 -9
  170. package/dist/runtime/app/composables/useFlowRunsPolling.js +0 -33
  171. package/dist/runtime/app/composables/useFlowState.d.ts +0 -125
  172. package/dist/runtime/app/composables/useFlowState.js +0 -211
  173. package/dist/runtime/app/composables/useFlowWebSocket.d.ts +0 -27
  174. package/dist/runtime/app/composables/useFlowWebSocket.js +0 -205
  175. package/dist/runtime/app/composables/useFlowsNavigation.d.ts +0 -10
  176. package/dist/runtime/app/composables/useFlowsNavigation.js +0 -58
  177. package/dist/runtime/app/composables/useQueueJobs.d.ts +0 -26
  178. package/dist/runtime/app/composables/useQueueJobs.js +0 -20
  179. package/dist/runtime/app/composables/useQueueUpdates.d.ts +0 -26
  180. package/dist/runtime/app/composables/useQueueUpdates.js +0 -122
  181. package/dist/runtime/app/composables/useQueues.d.ts +0 -45
  182. package/dist/runtime/app/composables/useQueues.js +0 -26
  183. package/dist/runtime/app/composables/useQueuesLive.d.ts +0 -19
  184. package/dist/runtime/app/composables/useQueuesLive.js +0 -143
  185. package/dist/runtime/app/pages/flows/index.d.vue.ts +0 -3
  186. package/dist/runtime/app/pages/flows/index.vue +0 -645
  187. package/dist/runtime/app/pages/flows/index.vue.d.ts +0 -3
  188. package/dist/runtime/app/pages/index.d.vue.ts +0 -3
  189. package/dist/runtime/app/pages/index.vue +0 -34
  190. package/dist/runtime/app/pages/index.vue.d.ts +0 -3
  191. package/dist/runtime/app/pages/queues/index.d.vue.ts +0 -3
  192. package/dist/runtime/app/pages/queues/index.vue +0 -229
  193. package/dist/runtime/app/pages/queues/index.vue.d.ts +0 -3
  194. package/dist/runtime/app/pages/queues/job.d.vue.ts +0 -3
  195. package/dist/runtime/app/pages/queues/job.vue +0 -262
  196. package/dist/runtime/app/pages/queues/job.vue.d.ts +0 -3
  197. package/dist/runtime/app/pages/queues/jobs.d.vue.ts +0 -3
  198. package/dist/runtime/app/pages/queues/jobs.vue +0 -291
  199. package/dist/runtime/app/pages/queues/jobs.vue.d.ts +0 -3
  200. package/dist/runtime/app/plugins/vueflow.client.d.ts +0 -2
  201. package/dist/runtime/app/plugins/vueflow.client.js +0 -11
  202. package/dist/runtime/constants.d.ts +0 -11
  203. package/dist/runtime/constants.js +0 -11
  204. package/dist/runtime/schema.d.ts +0 -37
  205. package/dist/runtime/schema.js +0 -20
  206. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.d.ts +0 -10
  207. package/dist/runtime/server/api/_flows/[name]/clear-history.delete.js +0 -44
  208. package/dist/runtime/server/api/_flows/[name]/runs.get.d.ts +0 -7
  209. package/dist/runtime/server/api/_flows/[name]/runs.get.js +0 -53
  210. package/dist/runtime/server/api/_flows/[name]/schedule.post.js +0 -57
  211. package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.d.ts +0 -2
  212. package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.js +0 -42
  213. package/dist/runtime/server/api/_flows/[name]/schedules.get.d.ts +0 -2
  214. package/dist/runtime/server/api/_flows/[name]/schedules.get.js +0 -48
  215. package/dist/runtime/server/api/_flows/[name]/start.post.d.ts +0 -2
  216. package/dist/runtime/server/api/_flows/[name]/start.post.js +0 -9
  217. package/dist/runtime/server/api/_flows/index.get.d.ts +0 -6
  218. package/dist/runtime/server/api/_flows/index.get.js +0 -5
  219. package/dist/runtime/server/api/_flows/ws.d.ts +0 -60
  220. package/dist/runtime/server/api/_flows/ws.js +0 -188
  221. package/dist/runtime/server/api/_queues/[name]/job/[id].get.d.ts +0 -2
  222. package/dist/runtime/server/api/_queues/[name]/job/[id].get.js +0 -9
  223. package/dist/runtime/server/api/_queues/[name]/job/index.get.d.ts +0 -2
  224. package/dist/runtime/server/api/_queues/[name]/job/index.get.js +0 -18
  225. package/dist/runtime/server/api/_queues/index.get.d.ts +0 -2
  226. package/dist/runtime/server/api/_queues/index.get.js +0 -63
  227. package/dist/runtime/server/api/_queues/ws.d.ts +0 -48
  228. package/dist/runtime/server/api/_queues/ws.js +0 -205
  229. package/dist/runtime/server/plugins/00.event-store.d.ts +0 -13
  230. package/dist/runtime/server/plugins/00.event-store.js +0 -16
  231. package/dist/runtime/server/plugins/flow-management.d.ts +0 -13
  232. package/dist/runtime/server/plugins/flow-management.js +0 -65
  233. package/dist/runtime/server/plugins/queue-management.d.ts +0 -2
  234. package/dist/runtime/server/plugins/queue-management.js +0 -27
  235. package/dist/runtime/server/plugins/state-cleanup.d.ts +0 -11
  236. package/dist/runtime/server/plugins/state-cleanup.js +0 -93
  237. package/dist/runtime/server/plugins/worker-management.d.ts +0 -2
  238. package/dist/runtime/server/plugins/worker-management.js +0 -33
  239. package/dist/runtime/server/tsconfig.json +0 -3
  240. package/dist/runtime/server-utils/events/adapters/fileAdapter.d.ts +0 -2
  241. package/dist/runtime/server-utils/events/adapters/fileAdapter.js +0 -382
  242. package/dist/runtime/server-utils/events/adapters/memoryAdapter.d.ts +0 -2
  243. package/dist/runtime/server-utils/events/adapters/memoryAdapter.js +0 -171
  244. package/dist/runtime/server-utils/events/adapters/redis/redisAdapter.d.ts +0 -2
  245. package/dist/runtime/server-utils/events/adapters/redis/redisAdapter.js +0 -348
  246. package/dist/runtime/server-utils/events/adapters/redis/redisPubSubGateway.d.ts +0 -30
  247. package/dist/runtime/server-utils/events/adapters/redis/redisPubSubGateway.js +0 -82
  248. package/dist/runtime/server-utils/events/eventStoreFactory.d.ts +0 -19
  249. package/dist/runtime/server-utils/events/eventStoreFactory.js +0 -44
  250. package/dist/runtime/server-utils/events/streamNames.d.ts +0 -17
  251. package/dist/runtime/server-utils/events/streamNames.js +0 -17
  252. package/dist/runtime/server-utils/events/types.d.ts +0 -63
  253. package/dist/runtime/server-utils/events/wiring/flowWiring.js +0 -409
  254. package/dist/runtime/server-utils/events/wiring/registry.d.ts +0 -10
  255. package/dist/runtime/server-utils/events/wiring/registry.js +0 -24
  256. package/dist/runtime/server-utils/queue/adapters/bullmq.d.ts +0 -18
  257. package/dist/runtime/server-utils/queue/adapters/bullmq.js +0 -164
  258. package/dist/runtime/server-utils/queue/queueFactory.d.ts +0 -3
  259. package/dist/runtime/server-utils/queue/queueFactory.js +0 -10
  260. package/dist/runtime/server-utils/queue/types.d.ts +0 -47
  261. package/dist/runtime/server-utils/state/adapters/redis.d.ts +0 -2
  262. package/dist/runtime/server-utils/state/adapters/redis.js +0 -42
  263. package/dist/runtime/server-utils/state/stateFactory.d.ts +0 -3
  264. package/dist/runtime/server-utils/state/stateFactory.js +0 -17
  265. package/dist/runtime/server-utils/state/types.d.ts +0 -23
  266. package/dist/runtime/server-utils/utils/defineQueueConfig.d.ts +0 -154
  267. package/dist/runtime/server-utils/utils/defineQueueConfig.js +0 -2
  268. package/dist/runtime/server-utils/utils/defineQueueWorker.d.ts +0 -10
  269. package/dist/runtime/server-utils/utils/defineQueueWorker.js +0 -17
  270. package/dist/runtime/server-utils/utils/useEventStore.d.ts +0 -20
  271. package/dist/runtime/server-utils/utils/useEventStore.js +0 -119
  272. package/dist/runtime/server-utils/utils/useFlowEngine.d.ts +0 -9
  273. package/dist/runtime/server-utils/utils/useFlowEngine.js +0 -44
  274. package/dist/runtime/server-utils/utils/useLogs.d.ts +0 -41
  275. package/dist/runtime/server-utils/utils/useLogs.js +0 -74
  276. package/dist/runtime/server-utils/utils/useQueue.d.ts +0 -31
  277. package/dist/runtime/server-utils/utils/useQueue.js +0 -24
  278. package/dist/runtime/server-utils/worker/adapter.d.ts +0 -4
  279. package/dist/runtime/server-utils/worker/adapter.js +0 -66
  280. package/dist/runtime/server-utils/worker/runner/node.d.ts +0 -27
  281. package/dist/runtime/server-utils/worker/runner/node.js +0 -196
  282. package/dist/runtime/types.d.ts +0 -132
  283. /package/dist/runtime/{server-utils/events/types.js → adapters/interfaces/queue.js} +0 -0
  284. /package/dist/runtime/{server-utils/queue/types.js → adapters/interfaces/store.js} +0 -0
  285. /package/dist/runtime/{server-utils/state/types.js → adapters/interfaces/stream.js} +0 -0
  286. /package/dist/runtime/{server-utils/events → events}/eventBus.js +0 -0
  287. /package/dist/runtime/{server/plugins/00.ws-lifecycle.d.ts → nitro/plugins/01.ws-lifecycle.d.ts} +0 -0
  288. /package/dist/runtime/{server/plugins/00.ws-lifecycle.js → nitro/plugins/01.ws-lifecycle.js} +0 -0
  289. /package/dist/runtime/{server/api/_flows/[name]/schedule.post.d.ts → nitro/plugins/02.workers.d.ts} +0 -0
  290. /package/dist/runtime/{server-utils → nitro}/utils/useNventLogger.d.ts +0 -0
  291. /package/dist/runtime/{server-utils → nitro}/utils/wsPeerManager.d.ts +0 -0
  292. /package/dist/runtime/{server-utils → nitro}/utils/wsPeerManager.js +0 -0
  293. /package/dist/runtime/{python → worker/python}/get_config.py +0 -0
@@ -1,291 +0,0 @@
1
- <template>
2
- <div class="h-full flex flex-col overflow-hidden">
3
- <!-- Header -->
4
- <div class="border-b border-gray-200 dark:border-gray-800 px-6 py-3 shrink-0">
5
- <div class="flex items-center justify-between">
6
- <div class="flex items-center gap-4">
7
- <UButton
8
- icon="i-lucide-arrow-left"
9
- size="xs"
10
- color="neutral"
11
- variant="ghost"
12
- @click="back"
13
- />
14
- <div>
15
- <h1 class="text-lg font-semibold">
16
- {{ queueName }}
17
- </h1>
18
- <p class="text-xs text-gray-500">
19
- Queue Jobs
20
- </p>
21
- </div>
22
- </div>
23
- <div class="flex items-center gap-3">
24
- <div
25
- v-if="isConnected"
26
- class="flex items-center gap-1.5 text-xs text-emerald-600 dark:text-emerald-400"
27
- >
28
- <div class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse" />
29
- <span>Live</span>
30
- <span
31
- v-if="isAutoRefreshing"
32
- class="text-[10px] text-gray-400"
33
- >
34
- (updating...)
35
- </span>
36
- </div>
37
- <div
38
- v-else-if="isReconnecting"
39
- class="flex items-center gap-1.5 text-xs text-amber-600 dark:text-amber-400"
40
- >
41
- <div class="w-2 h-2 rounded-full bg-amber-500 animate-pulse" />
42
- <span>Reconnecting...</span>
43
- </div>
44
- <UBadge
45
- :label="counts?.active.toString() || '0'"
46
- color="warning"
47
- variant="subtle"
48
- >
49
- <template #leading>
50
- Active
51
- </template>
52
- </UBadge>
53
- <UBadge
54
- :label="counts?.waiting.toString() || '0'"
55
- color="info"
56
- variant="subtle"
57
- >
58
- <template #leading>
59
- Waiting
60
- </template>
61
- </UBadge>
62
- <UBadge
63
- :label="counts?.completed.toString() || '0'"
64
- color="success"
65
- variant="subtle"
66
- >
67
- <template #leading>
68
- Completed
69
- </template>
70
- </UBadge>
71
- <UBadge
72
- :label="counts?.failed.toString() || '0'"
73
- color="error"
74
- variant="subtle"
75
- >
76
- <template #leading>
77
- Failed
78
- </template>
79
- </UBadge>
80
- <USelectMenu
81
- v-model="selectedStateOption"
82
- :items="stateOptions"
83
- placeholder="All States"
84
- size="xs"
85
- class="w-32"
86
- />
87
- <UButton
88
- icon="i-lucide-refresh-cw"
89
- size="xs"
90
- color="neutral"
91
- variant="ghost"
92
- :loading="status === 'pending'"
93
- @click.prevent="onRefresh"
94
- >
95
- Refresh
96
- </UButton>
97
- </div>
98
- </div>
99
- </div>
100
-
101
- <!-- Main Content -->
102
- <div class="flex-1 min-h-0 overflow-hidden flex flex-col">
103
- <div
104
- v-if="!data || !data.jobs || data.jobs.length === 0"
105
- class="flex-1 flex items-center justify-center text-sm text-gray-400"
106
- >
107
- No jobs found
108
- </div>
109
- <template v-else>
110
- <div class="flex-1 min-h-0 p-4 overflow-auto">
111
- <UTable
112
- ref="table"
113
- v-model:pagination="pagination"
114
- :data="data.jobs"
115
- :columns="columns"
116
- :loading="status === 'pending'"
117
- :pagination-options="{
118
- getPaginationRowModel: getPaginationRowModel()
119
- }"
120
- :ui="{
121
- base: 'table-fixed border-separate border-spacing-0',
122
- thead: '[&>tr]:bg-elevated/50 [&>tr]:after:content-none',
123
- tbody: '[&>tr]:last:[&>td]:border-b-0',
124
- th: 'py-2 first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r',
125
- td: 'border-b border-default',
126
- separator: 'h-0'
127
- }"
128
- />
129
- </div>
130
-
131
- <div class="flex items-center justify-between gap-3 border-t border-default p-4 shrink-0">
132
- <div class="text-sm text-muted">
133
- Showing {{ Math.min(pagination.pageIndex * pagination.pageSize + pagination.pageSize, data.jobs.length) }} of {{ data.jobs.length }} job(s)
134
- <span
135
- v-if="selectedState"
136
- class="text-gray-400"
137
- >
138
- (filtered by {{ selectedStateOption?.label }})
139
- </span>
140
- </div>
141
- <div class="flex items-center gap-1.5">
142
- <UPagination
143
- :default-page="(table?.tableApi?.getState().pagination.pageIndex || 0) + 1"
144
- :items-per-page="table?.tableApi?.getState().pagination.pageSize || 20"
145
- :total="data.jobs.length"
146
- @update:page="(p) => table?.tableApi?.setPageIndex(p - 1)"
147
- />
148
- </div>
149
- </div>
150
- </template>
151
- </div>
152
- </div>
153
- </template>
154
-
155
- <script setup>
156
- import { ref, computed, watch, resolveComponent, useTemplateRef, h } from "#imports";
157
- import { getPaginationRowModel } from "@tanstack/table-core";
158
- import { UTable, UButton, UBadge, UPagination, USelectMenu } from "#components";
159
- import { useQueueJobs } from "../../composables/useQueueJobs";
160
- import { useQueueUpdates } from "../../composables/useQueueUpdates";
161
- import { useComponentRouter } from "../../composables/useComponentRouter";
162
- const UBadgeComponent = resolveComponent("UBadge");
163
- const UButtonComponent = resolveComponent("UButton");
164
- const router = useComponentRouter();
165
- const queueName = computed(() => router.route.value?.params?.name || "");
166
- const stateOptions = [
167
- { label: "All States", value: null },
168
- { label: "Waiting", value: "waiting" },
169
- { label: "Active", value: "active" },
170
- { label: "Completed", value: "completed" },
171
- { label: "Failed", value: "failed" },
172
- { label: "Delayed", value: "delayed" },
173
- { label: "Paused", value: "paused" }
174
- ];
175
- const selectedStateOption = ref(stateOptions[0]);
176
- const selectedState = computed(() => selectedStateOption.value?.value ?? null);
177
- const { data, refresh, status } = useQueueJobs(queueName, selectedState);
178
- const { counts, isConnected, isReconnecting, shouldRefreshJobs, resetRefreshFlag } = useQueueUpdates(queueName);
179
- const isAutoRefreshing = ref(false);
180
- watch(selectedState, () => {
181
- if (table.value?.tableApi) {
182
- table.value.tableApi.setPageIndex(0);
183
- }
184
- });
185
- watch(shouldRefreshJobs, async (shouldRefresh) => {
186
- if (shouldRefresh) {
187
- isAutoRefreshing.value = true;
188
- await refresh();
189
- resetRefreshFlag();
190
- setTimeout(() => {
191
- isAutoRefreshing.value = false;
192
- }, 500);
193
- }
194
- });
195
- const table = useTemplateRef("table");
196
- const pagination = ref({
197
- pageIndex: 0,
198
- pageSize: 20
199
- });
200
- const onRefresh = async () => {
201
- await refresh();
202
- };
203
- const back = () => {
204
- router.push("/queues");
205
- };
206
- const selectJob = (jobId) => {
207
- router.push(`/queues/${queueName.value}/jobs/${jobId}`);
208
- };
209
- const columns = [
210
- {
211
- accessorKey: "id",
212
- header: "Job ID",
213
- cell: ({ row }) => {
214
- const id = row.original.id;
215
- return h("div", {
216
- class: "font-mono text-xs cursor-pointer hover:underline",
217
- onClick: () => selectJob(row.original.id)
218
- }, id.length > 16 ? `${id.substring(0, 8)}...${id.substring(id.length - 8)}` : id);
219
- }
220
- },
221
- {
222
- accessorKey: "name",
223
- header: "Name",
224
- cell: ({ row }) => {
225
- return h("div", {
226
- class: "font-medium cursor-pointer hover:underline",
227
- onClick: () => selectJob(row.original.id)
228
- }, row.original.name);
229
- }
230
- },
231
- {
232
- accessorKey: "state",
233
- header: "State",
234
- cell: ({ row }) => {
235
- const state = row.original.state;
236
- const colorMap = {
237
- waiting: "info",
238
- active: "warning",
239
- completed: "success",
240
- failed: "error",
241
- delayed: "secondary",
242
- paused: "warning"
243
- };
244
- return h(UBadgeComponent, {
245
- label: state || "unknown",
246
- color: colorMap[state || ""] || "neutral",
247
- variant: "subtle",
248
- class: "capitalize"
249
- });
250
- }
251
- },
252
- {
253
- accessorKey: "timestamp",
254
- header: "Created",
255
- cell: ({ row }) => {
256
- const timestamp = row.original.timestamp;
257
- if (!timestamp) return h("div", { class: "text-gray-400 text-xs" }, "-");
258
- const date = new Date(timestamp);
259
- return h(
260
- "div",
261
- { class: "text-xs" },
262
- date.toLocaleString("de-DE", {
263
- timeZone: "Europe/Berlin",
264
- day: "2-digit",
265
- month: "2-digit",
266
- year: "numeric",
267
- hour: "2-digit",
268
- minute: "2-digit",
269
- second: "2-digit"
270
- })
271
- );
272
- }
273
- },
274
- {
275
- id: "actions",
276
- header: "",
277
- cell: ({ row }) => {
278
- return h(UButtonComponent, {
279
- icon: "i-lucide-arrow-right",
280
- size: "xs",
281
- color: "neutral",
282
- variant: "ghost",
283
- square: true,
284
- onClick: () => {
285
- selectJob(row.original.id);
286
- }
287
- });
288
- }
289
- }
290
- ];
291
- </script>
@@ -1,3 +0,0 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
- declare const _default: typeof __VLS_export;
3
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
- export default _default;
@@ -1,11 +0,0 @@
1
- import { defineNuxtPlugin } from "#imports";
2
- import { VueFlow } from "@vue-flow/core";
3
- import { Controls } from "@vue-flow/controls";
4
- import { MiniMap } from "@vue-flow/minimap";
5
- import { Background } from "@vue-flow/background";
6
- export default defineNuxtPlugin((nuxtApp) => {
7
- nuxtApp.vueApp.component("VueFlow", VueFlow);
8
- nuxtApp.vueApp.component("Controls", Controls);
9
- nuxtApp.vueApp.component("MiniMap", MiniMap);
10
- nuxtApp.vueApp.component("Background", Background);
11
- });
@@ -1,11 +0,0 @@
1
- export declare const QUEUE_STATUSES: {
2
- readonly latest: "latest";
3
- readonly active: "active";
4
- readonly waiting: "waiting";
5
- readonly waitingChildren: "waiting-children";
6
- readonly prioritized: "prioritized";
7
- readonly completed: "completed";
8
- readonly failed: "failed";
9
- readonly delayed: "delayed";
10
- readonly paused: "paused";
11
- };
@@ -1,11 +0,0 @@
1
- export const QUEUE_STATUSES = {
2
- latest: "latest",
3
- active: "active",
4
- waiting: "waiting",
5
- waitingChildren: "waiting-children",
6
- prioritized: "prioritized",
7
- completed: "completed",
8
- failed: "failed",
9
- delayed: "delayed",
10
- paused: "paused"
11
- };
@@ -1,37 +0,0 @@
1
- import z from 'zod';
2
- export declare const JobSchema: z.ZodObject<{
3
- id: z.ZodString;
4
- name: z.ZodString;
5
- data: z.ZodAny;
6
- progress: z.ZodNumber;
7
- opts: z.ZodObject<{
8
- attempts: z.ZodNumber;
9
- delay: z.ZodOptional<z.ZodNumber>;
10
- }, z.core.$strip>;
11
- state: z.ZodAny;
12
- returnvalue: z.ZodAny;
13
- attemptsStarted: z.ZodNumber;
14
- attemptsMade: z.ZodNumber;
15
- delay: z.ZodNumber;
16
- timestamp: z.ZodNumber;
17
- finishedOn: z.ZodOptional<z.ZodNumber>;
18
- processedOn: z.ZodOptional<z.ZodNumber>;
19
- }, z.core.$strip>;
20
- export declare const JobSchemaArray: z.ZodArray<z.ZodObject<{
21
- id: z.ZodString;
22
- name: z.ZodString;
23
- data: z.ZodAny;
24
- progress: z.ZodNumber;
25
- opts: z.ZodObject<{
26
- attempts: z.ZodNumber;
27
- delay: z.ZodOptional<z.ZodNumber>;
28
- }, z.core.$strip>;
29
- state: z.ZodAny;
30
- returnvalue: z.ZodAny;
31
- attemptsStarted: z.ZodNumber;
32
- attemptsMade: z.ZodNumber;
33
- delay: z.ZodNumber;
34
- timestamp: z.ZodNumber;
35
- finishedOn: z.ZodOptional<z.ZodNumber>;
36
- processedOn: z.ZodOptional<z.ZodNumber>;
37
- }, z.core.$strip>>;
@@ -1,20 +0,0 @@
1
- import z from "zod";
2
- export const JobSchema = z.object({
3
- id: z.string(),
4
- name: z.string(),
5
- data: z.any(),
6
- progress: z.number(),
7
- opts: z.object({
8
- attempts: z.number(),
9
- delay: z.number().optional()
10
- }),
11
- state: z.any(),
12
- returnvalue: z.any(),
13
- attemptsStarted: z.number(),
14
- attemptsMade: z.number(),
15
- delay: z.number(),
16
- timestamp: z.number(),
17
- finishedOn: z.number().optional(),
18
- processedOn: z.number().optional()
19
- });
20
- export const JobSchemaArray = z.array(JobSchema);
@@ -1,10 +0,0 @@
1
- /**
2
- * DELETE /api/_flows/:flowName/clear-history
3
- *
4
- * Clears all event history for a specific flow.
5
- * This deletes:
6
- * - All flow run streams (nq:flow:run-*)
7
- * - The flow runs index (nq:flows:<flowName>)
8
- */
9
- declare const _default: any;
10
- export default _default;
@@ -1,44 +0,0 @@
1
- import { defineEventHandler, createError, useEventStore } from "#imports";
2
- export default defineEventHandler(async (event) => {
3
- const flowName = event.context.params?.name;
4
- if (!flowName) {
5
- throw createError({ statusCode: 400, statusMessage: "Flow name required" });
6
- }
7
- try {
8
- const store = useEventStore();
9
- const names = store.names();
10
- let deletedStreams = 0;
11
- let deletedIndex = false;
12
- const indexKey = names.flowIndex(flowName);
13
- if (store.indexRead) {
14
- const runs = await store.indexRead(indexKey, { limit: 1e4 });
15
- if (store.deleteStream) {
16
- for (const run of runs) {
17
- const streamName = names.flow(run.id);
18
- await store.deleteStream(streamName);
19
- if (store.deleteIndex) {
20
- const metaKey = `${indexKey}:meta:${run.id}`;
21
- await store.deleteIndex(metaKey);
22
- }
23
- deletedStreams++;
24
- }
25
- }
26
- }
27
- if (store.deleteIndex) {
28
- await store.deleteIndex(indexKey);
29
- deletedIndex = true;
30
- }
31
- return {
32
- success: true,
33
- flowName,
34
- deletedStreams,
35
- deletedIndex
36
- };
37
- } catch (error) {
38
- throw createError({
39
- statusCode: 500,
40
- statusMessage: "Failed to clear flow history",
41
- data: error instanceof Error ? error.message : String(error)
42
- });
43
- }
44
- });
@@ -1,7 +0,0 @@
1
- /**
2
- * GET /api/_flows/:name/runs?limit=50&offset=0
3
- *
4
- * List runs for a specific flow with pagination support
5
- */
6
- declare const _default: any;
7
- export default _default;
@@ -1,53 +0,0 @@
1
- import { defineEventHandler, getRouterParam, getQuery, useEventStore, useNventLogger } from "#imports";
2
- export default defineEventHandler(async (event) => {
3
- const logger = useNventLogger("api-flows-runs");
4
- const flowName = getRouterParam(event, "name");
5
- const query = getQuery(event);
6
- const limit = Math.min(Number.parseInt(query.limit) || 50, 100);
7
- const offset = Math.max(Number.parseInt(query.offset) || 0, 0);
8
- const status = query.status;
9
- event.node.res.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
10
- event.node.res.setHeader("Pragma", "no-cache");
11
- if (!flowName) {
12
- return { error: "Missing flow name" };
13
- }
14
- const store = useEventStore();
15
- const names = store.names();
16
- try {
17
- const runIndexKey = names.flowIndex(flowName);
18
- let totalCount = 0;
19
- try {
20
- const allEntries = await store.indexRead(runIndexKey, { limit: 1e4 });
21
- totalCount = allEntries.length;
22
- } catch {
23
- totalCount = 0;
24
- }
25
- const entries = await store.indexRead(runIndexKey, { offset, limit });
26
- const filteredEntries = status ? entries.filter((e) => e.metadata?.status === status) : entries;
27
- const items = filteredEntries.map((entry) => ({
28
- id: entry.id,
29
- flowName,
30
- status: entry.metadata?.status || "unknown",
31
- createdAt: new Date(entry.score).toISOString(),
32
- startedAt: entry.metadata?.startedAt ? new Date(entry.metadata.startedAt).toISOString() : void 0,
33
- completedAt: entry.metadata?.completedAt ? new Date(entry.metadata.completedAt).toISOString() : void 0,
34
- stepCount: entry.metadata?.stepCount || 0,
35
- completedSteps: entry.metadata?.completedSteps || 0
36
- }));
37
- return {
38
- flowName,
39
- count: items.length,
40
- total: totalCount,
41
- offset,
42
- limit,
43
- hasMore: offset + items.length < totalCount,
44
- items
45
- };
46
- } catch (err) {
47
- logger.error("[flows/runs] error:", { error: err });
48
- return {
49
- error: "Failed to list runs",
50
- message: err instanceof Error ? err.message : String(err)
51
- };
52
- }
53
- });
@@ -1,57 +0,0 @@
1
- import { defineEventHandler, readBody, getRouterParam, createError, useQueue, $useQueueRegistry } from "#imports";
2
- export default defineEventHandler(async (event) => {
3
- const flowName = getRouterParam(event, "name");
4
- if (!flowName) {
5
- throw createError({ statusCode: 400, statusMessage: "Flow name is required" });
6
- }
7
- const body = await readBody(event);
8
- const { input, cron, delay, jobId, metadata } = body;
9
- if (cron && delay) {
10
- throw createError({
11
- statusCode: 400,
12
- statusMessage: "Cannot specify both cron and delay"
13
- });
14
- }
15
- if (!cron && !delay) {
16
- throw createError({
17
- statusCode: 400,
18
- statusMessage: "Must specify either cron or delay"
19
- });
20
- }
21
- const registry = $useQueueRegistry();
22
- const flow = registry?.flows?.[flowName];
23
- if (!flow || !flow.entry) {
24
- throw createError({ statusCode: 404, statusMessage: `Flow '${flowName}' not found` });
25
- }
26
- const queueName = typeof flow.entry.queue === "string" ? flow.entry.queue : flow.entry.queue?.name || flow.entry.queue;
27
- const queue = useQueue();
28
- const scheduleOpts = {};
29
- if (cron) scheduleOpts.cron = cron;
30
- if (delay) scheduleOpts.delay = delay;
31
- const jobData = {
32
- __scheduledFlowStart: true,
33
- __flowName: flowName,
34
- __flowInput: input || {},
35
- __schedule: {
36
- metadata,
37
- createdAt: (/* @__PURE__ */ new Date()).toISOString()
38
- }
39
- };
40
- const id = await queue.schedule(
41
- queueName,
42
- {
43
- name: flow.entry.step,
44
- data: jobData,
45
- opts: jobId ? { jobId } : void 0
46
- },
47
- scheduleOpts
48
- );
49
- return {
50
- id,
51
- flowName,
52
- queue: queueName,
53
- step: flow.entry.step,
54
- schedule: scheduleOpts,
55
- createdAt: (/* @__PURE__ */ new Date()).toISOString()
56
- };
57
- });
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,42 +0,0 @@
1
- import { defineEventHandler, getRouterParam, createError, useRuntimeConfig, $useQueueRegistry } from "#imports";
2
- import { Queue } from "bullmq";
3
- export default defineEventHandler(async (event) => {
4
- const flowName = getRouterParam(event, "name");
5
- const scheduleId = getRouterParam(event, "id");
6
- if (!flowName || !scheduleId) {
7
- throw createError({ statusCode: 400, statusMessage: "Flow name and schedule ID are required" });
8
- }
9
- const registry = $useQueueRegistry();
10
- const flow = registry?.flows?.[flowName];
11
- if (!flow || !flow.entry) {
12
- throw createError({ statusCode: 404, statusMessage: `Flow '${flowName}' not found` });
13
- }
14
- const queueName = typeof flow.entry.queue === "string" ? flow.entry.queue : flow.entry.queue?.name || flow.entry.queue;
15
- const rc = useRuntimeConfig();
16
- const connection = rc.queue?.redis;
17
- let prefix;
18
- try {
19
- if (registry && Array.isArray(registry.workers)) {
20
- const worker = registry.workers.find((w) => w?.queue?.name === queueName);
21
- if (worker?.queue?.prefix) {
22
- prefix = worker.queue.prefix;
23
- }
24
- }
25
- } catch {
26
- }
27
- const queue = new Queue(queueName, { connection, prefix });
28
- try {
29
- await queue.removeRepeatableByKey(scheduleId);
30
- await queue.close();
31
- return {
32
- success: true,
33
- message: "Schedule deleted successfully"
34
- };
35
- } catch (error) {
36
- await queue.close();
37
- throw createError({
38
- statusCode: 500,
39
- statusMessage: `Failed to delete schedule: ${error.message}`
40
- });
41
- }
42
- });
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,48 +0,0 @@
1
- import { defineEventHandler, getRouterParam, createError, useRuntimeConfig, $useQueueRegistry } from "#imports";
2
- import { Queue } from "bullmq";
3
- export default defineEventHandler(async (event) => {
4
- const flowName = getRouterParam(event, "name");
5
- if (!flowName) {
6
- throw createError({ statusCode: 400, statusMessage: "Flow name is required" });
7
- }
8
- const registry = $useQueueRegistry();
9
- const flow = registry?.flows?.[flowName];
10
- if (!flow || !flow.entry) {
11
- throw createError({ statusCode: 404, statusMessage: `Flow '${flowName}' not found` });
12
- }
13
- const rc = useRuntimeConfig();
14
- const connection = rc.queue?.redis;
15
- const queueName = typeof flow.entry.queue === "string" ? flow.entry.queue : flow.entry.queue?.name || flow.entry.queue;
16
- let prefix;
17
- try {
18
- if (registry && Array.isArray(registry.workers)) {
19
- const worker = registry.workers.find((w) => w?.queue?.name === queueName);
20
- if (worker?.queue?.prefix) {
21
- prefix = worker.queue.prefix;
22
- }
23
- }
24
- } catch {
25
- }
26
- const queue = new Queue(queueName, { connection, prefix });
27
- try {
28
- const repeatableJobs = await queue.getRepeatableJobs();
29
- const schedules = repeatableJobs.filter((job) => job.name === flow.entry.step).map((job) => ({
30
- id: job.key,
31
- flowName,
32
- queue: queueName,
33
- step: flow.entry.step,
34
- schedule: {
35
- cron: job.pattern
36
- },
37
- nextRun: job.next ? new Date(job.next).toISOString() : void 0
38
- }));
39
- await queue.close();
40
- return schedules;
41
- } catch (error) {
42
- await queue.close();
43
- throw createError({
44
- statusCode: 500,
45
- statusMessage: `Failed to list schedules: ${error.message}`
46
- });
47
- }
48
- });
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;