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,226 +0,0 @@
1
- <template>
2
- <UModal v-model:open="isOpen">
3
- <template #header>
4
- <div class="flex items-center justify-between">
5
- <div>
6
- <h3 class="text-lg font-semibold">
7
- Schedule Flow
8
- </h3>
9
- <p class="text-sm text-gray-500 mt-1">
10
- {{ flowName }}
11
- </p>
12
- </div>
13
- </div>
14
- </template>
15
- <template #body>
16
- <div class="space-y-4">
17
- <!-- Schedule Type -->
18
- <div>
19
- <label class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block">
20
- Schedule Type
21
- </label>
22
- <UTabs
23
- v-model="scheduleType"
24
- :items="typeOptions"
25
- size="sm"
26
- variant="pill"
27
- color="neutral"
28
- />
29
- </div>
30
-
31
- <!-- Cron Pattern -->
32
- <div v-if="scheduleType === 'cron'">
33
- <label class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block">
34
- Pattern
35
- </label>
36
- <USelectMenu
37
- v-model="selectedPreset"
38
- :items="cronPresets"
39
- class="w-full"
40
- placeholder="Select preset or custom"
41
- />
42
- <UInput
43
- v-if="selectedPreset?.value === 'custom'"
44
- v-model="customCron"
45
- placeholder="0 2 * * *"
46
- class="mt-2 w-full"
47
- />
48
- </div>
49
-
50
- <!-- Delay -->
51
- <div v-else-if="scheduleType === 'delay'">
52
- <label class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block">
53
- Delay
54
- </label>
55
- <div class="flex gap-2">
56
- <UInput
57
- v-model="delayValue"
58
- type="number"
59
- placeholder="5"
60
- class="flex-1"
61
- />
62
- <USelectMenu
63
- v-model="delayUnit"
64
- :items="delayUnits"
65
- class="w-32"
66
- />
67
- </div>
68
- </div>
69
-
70
- <!-- Input Data -->
71
- <div>
72
- <label class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block">
73
- Input Data (JSON)
74
- </label>
75
- <UTextarea
76
- v-model="inputJson"
77
- placeholder="{ &quot;key&quot;: &quot;value&quot; }"
78
- :rows="4"
79
- class="font-mono text-sm w-full"
80
- />
81
- <p
82
- v-if="jsonError"
83
- class="text-xs text-red-500 mt-1"
84
- >
85
- {{ jsonError }}
86
- </p>
87
- </div>
88
-
89
- <!-- Description -->
90
- <div>
91
- <label class="text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block">
92
- Description (optional)
93
- </label>
94
- <UInput
95
- v-model="description"
96
- class="w-full"
97
- placeholder="Daily cleanup job"
98
- />
99
- </div>
100
- </div>
101
- </template>
102
- <template #footer>
103
- <div class="flex justify-end gap-2">
104
- <UButton
105
- color="neutral"
106
- variant="ghost"
107
- @click="isOpen = false"
108
- >
109
- Cancel
110
- </UButton>
111
- <UButton
112
- color="primary"
113
- :loading="isSubmitting"
114
- :disabled="!canSubmit"
115
- @click="handleSubmit"
116
- >
117
- Schedule Flow
118
- </UButton>
119
- </div>
120
- </template>
121
- </UModal>
122
- </template>
123
-
124
- <script setup>
125
- import { ref, computed, watch } from "#imports";
126
- import { UModal, UButton, UTabs, USelectMenu, UInput, UTextarea } from "#components";
127
- const props = defineProps({
128
- flowName: { type: String, required: true }
129
- });
130
- const emit = defineEmits(["scheduled"]);
131
- const isOpen = defineModel({ type: Boolean, ...{ default: false } });
132
- const scheduleType = ref("cron");
133
- const typeOptions = [
134
- { label: "Recurring (Cron)", value: "cron" },
135
- { label: "One-time (Delay)", value: "delay" }
136
- ];
137
- const cronPresets = [
138
- { label: "Every minute", value: "* * * * *" },
139
- { label: "Every 5 minutes", value: "*/5 * * * *" },
140
- { label: "Every hour", value: "0 * * * *" },
141
- { label: "Daily at 2 AM", value: "0 2 * * *" },
142
- { label: "Daily at noon", value: "0 12 * * *" },
143
- { label: "Weekly (Monday 9 AM)", value: "0 9 * * 1" },
144
- { label: "Monthly (1st at midnight)", value: "0 0 1 * *" },
145
- { label: "Custom", value: "custom" }
146
- ];
147
- const selectedPreset = ref(cronPresets[3]);
148
- const customCron = ref("");
149
- const delayValue = ref("5");
150
- const delayUnit = ref({ label: "Minutes", value: 6e4 });
151
- const delayUnits = [
152
- { label: "Seconds", value: 1e3 },
153
- { label: "Minutes", value: 6e4 },
154
- { label: "Hours", value: 36e5 },
155
- { label: "Days", value: 864e5 }
156
- ];
157
- const inputJson = ref("");
158
- const description = ref("");
159
- const isSubmitting = ref(false);
160
- const jsonError = computed(() => {
161
- if (!inputJson.value)
162
- return null;
163
- try {
164
- JSON.parse(inputJson.value);
165
- return null;
166
- } catch (e) {
167
- return `Invalid JSON: ${e.message}`;
168
- }
169
- });
170
- const canSubmit = computed(() => {
171
- if (jsonError.value)
172
- return false;
173
- if (scheduleType.value === "cron") {
174
- if (selectedPreset.value?.value === "custom") {
175
- return customCron.value.trim().length > 0;
176
- }
177
- return selectedPreset.value?.value != null;
178
- } else {
179
- const num = Number.parseInt(delayValue.value);
180
- return !Number.isNaN(num) && num > 0;
181
- }
182
- });
183
- const handleSubmit = async () => {
184
- isSubmitting.value = true;
185
- try {
186
- let input = {};
187
- if (inputJson.value) {
188
- input = JSON.parse(inputJson.value);
189
- }
190
- const body = {
191
- input,
192
- metadata: {
193
- description: description.value || void 0
194
- }
195
- };
196
- if (scheduleType.value === "cron") {
197
- body.cron = selectedPreset.value?.value === "custom" ? customCron.value : selectedPreset.value?.value;
198
- } else {
199
- const num = Number.parseInt(delayValue.value);
200
- body.delay = num * delayUnit.value.value;
201
- }
202
- await $fetch(`/api/_flows/${props.flowName}/schedule`, {
203
- method: "POST",
204
- body
205
- });
206
- emit("scheduled");
207
- isOpen.value = false;
208
- inputJson.value = "";
209
- description.value = "";
210
- customCron.value = "";
211
- delayValue.value = "5";
212
- } finally {
213
- isSubmitting.value = false;
214
- }
215
- };
216
- watch(isOpen, (newVal) => {
217
- if (!newVal) {
218
- scheduleType.value = "cron";
219
- selectedPreset.value = cronPresets[3];
220
- inputJson.value = "";
221
- description.value = "";
222
- customCron.value = "";
223
- delayValue.value = "5";
224
- }
225
- });
226
- </script>
@@ -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;
@@ -1,12 +0,0 @@
1
- type __VLS_Props = {
2
- flowName: string;
3
- };
4
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
5
- loadSchedules: () => Promise<void>;
6
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- updated: () => any;
8
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onUpdated?: (() => any) | undefined;
10
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const _default: typeof __VLS_export;
12
- export default _default;
@@ -1,99 +0,0 @@
1
- <template>
2
- <div class="space-y-4">
3
- <div v-if="!schedules || schedules.length === 0">
4
- <UAlert
5
- color="info"
6
- title="No schedules configured"
7
- variant="subtle"
8
- icon="i-lucide-info"
9
- description="Create a schedule to run this flow automatically"
10
- />
11
- </div>
12
-
13
- <div
14
- v-for="schedule in schedules"
15
- :key="schedule.id"
16
- class="border border-gray-200 dark:border-gray-800 rounded-lg p-4"
17
- >
18
- <div class="flex items-start justify-between">
19
- <div class="flex-1">
20
- <div class="flex items-center gap-2 mb-2">
21
- <UIcon
22
- name="i-lucide-clock"
23
- class="text-blue-500"
24
- />
25
- <span class="font-medium text-sm">
26
- {{ schedule.schedule.cron || "One-time delay" }}
27
- </span>
28
- </div>
29
- <div class="text-xs text-gray-500 space-y-1">
30
- <div>
31
- <span class="font-medium">Next run:</span>
32
- {{ formatDate(schedule.nextRun) }}
33
- </div>
34
- <div v-if="schedule.metadata?.description">
35
- <span class="font-medium">Description:</span>
36
- {{ schedule.metadata.description }}
37
- </div>
38
- </div>
39
- </div>
40
- <UButton
41
- icon="i-lucide-trash-2"
42
- color="error"
43
- variant="ghost"
44
- size="xs"
45
- :loading="deletingId === schedule.id"
46
- @click="handleDelete(schedule.id)"
47
- />
48
- </div>
49
- </div>
50
- </div>
51
- </template>
52
-
53
- <script setup>
54
- import { ref, onMounted } from "#imports";
55
- import { UAlert, UButton, UIcon } from "#components";
56
- const props = defineProps({
57
- flowName: { type: String, required: true }
58
- });
59
- const emit = defineEmits(["updated"]);
60
- const schedules = ref([]);
61
- const deletingId = ref(null);
62
- const loadSchedules = async () => {
63
- try {
64
- const data = await $fetch(`/api/_flows/${props.flowName}/schedules`);
65
- schedules.value = data;
66
- } catch (error) {
67
- console.error("Failed to load schedules:", error);
68
- schedules.value = [];
69
- }
70
- };
71
- const handleDelete = async (id) => {
72
- deletingId.value = id;
73
- try {
74
- await $fetch(`/api/_flows/${props.flowName}/schedules/${id}`, {
75
- method: "DELETE"
76
- });
77
- await loadSchedules();
78
- emit("updated");
79
- } catch (error) {
80
- console.error("Failed to delete schedule:", error);
81
- } finally {
82
- deletingId.value = null;
83
- }
84
- };
85
- const formatDate = (date) => {
86
- if (!date)
87
- return "N/A";
88
- return new Date(date).toLocaleString("en-US", {
89
- dateStyle: "medium",
90
- timeStyle: "short"
91
- });
92
- };
93
- onMounted(() => {
94
- loadSchedules();
95
- });
96
- defineExpose({
97
- loadSchedules
98
- });
99
- </script>
@@ -1,12 +0,0 @@
1
- type __VLS_Props = {
2
- flowName: string;
3
- };
4
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
5
- loadSchedules: () => Promise<void>;
6
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
- updated: () => any;
8
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- onUpdated?: (() => any) | undefined;
10
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
- declare const _default: typeof __VLS_export;
12
- export default _default;
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- queue: string;
3
- };
4
- 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>;
5
- declare const _default: typeof __VLS_export;
6
- export default _default;
@@ -1,203 +0,0 @@
1
- <template>
2
- <div class="space-y-4">
3
- <div class="flex justify-end">
4
- <Button
5
- icon="i-heroicons-clock"
6
- color="neutral"
7
- variant="outline"
8
- @click="jobSchedulerEditor = !jobSchedulerEditor"
9
- >
10
- Job Scheduler
11
- </Button>
12
- </div>
13
- <UForm
14
- :schema="schema"
15
- :state="state"
16
- @submit="onSubmit"
17
- >
18
- <UCard
19
- v-if="jobSchedulerEditor"
20
- :ui="{
21
- body: 'space-y-6'
22
- }"
23
- >
24
- <UFormField
25
- label="Name"
26
- name="name"
27
- >
28
- <UInput
29
- v-model="state.name"
30
- placeholder="Name"
31
- class="w-full"
32
- />
33
- </UFormField>
34
- <UTabs
35
- v-model="state.scheduleType"
36
- :items="scheduleInputTypes"
37
- size="xs"
38
- default-value="every"
39
- variant="pill"
40
- color="neutral"
41
- :ui="{
42
- list: 'w-28 self-start',
43
- content: 'w-full'
44
- }"
45
- >
46
- <template #content="{ item }">
47
- <UFormField name="scheduleValue">
48
- <UInput
49
- v-if="item.value === 'every'"
50
- v-model="state.scheduleValue"
51
- class="w-full"
52
- type="number"
53
- />
54
- <UInput
55
- v-if="item.value === 'cron'"
56
- v-model="state.scheduleValue"
57
- class="w-full"
58
- type="string"
59
- />
60
- </UFormField>
61
- </template>
62
- </UTabs>
63
- <div>
64
- <div class="text-sm font-bold mb-2">
65
- Job
66
- </div>
67
- <div class="flex flex-col space-y-2 p-2 rounded-sm ring-1 ring-gray-200 dark:ring-gray-800 shadow">
68
- <UFormField
69
- label="Name"
70
- name="jobName"
71
- >
72
- <UInput
73
- v-model="state.jobName"
74
- placeholder="Job Name"
75
- class="w-full"
76
- />
77
- </UFormField>
78
- <UFormField
79
- label="Data"
80
- name="jobData"
81
- >
82
- <JsonEditorVue
83
- v-model="state.jobData"
84
- :main-menu-bar="false"
85
- mode="text"
86
- />
87
- </UFormField>
88
- </div>
89
- </div>
90
- <template #footer>
91
- <div class="flex justify-end">
92
- <Button
93
- type="submit"
94
- color="neutral"
95
- variant="outline"
96
- class="cursor-pointer"
97
- >
98
- Create
99
- </Button>
100
- </div>
101
- </template>
102
- </UCard>
103
- </UForm>
104
- <div>
105
- <div
106
- v-if="scheduler && scheduler.length > 0"
107
- class="space-y-4"
108
- >
109
- <div
110
- v-for="item of scheduler"
111
- :key="item.key"
112
- class="flex flex-col rounded-sm ring-1 ring-gray-200 dark:ring-gray-800 shadow p-4"
113
- >
114
- <div class="flex justify-end">
115
- <Button
116
- icon="i-heroicons-x-circle"
117
- color="error"
118
- variant="outline"
119
- class="cursor-pointer"
120
- @click="deleteScheduledJob(item.key)"
121
- />
122
- </div>
123
- <div>
124
- <span class="text-sm font-bold">Name:</span> {{ item.key }}
125
- </div>
126
- <div>
127
- <span class="text-sm font-bold">Next schedule:</span> {{
128
- new Date(item.next).toLocaleString("de", {
129
- day: "numeric",
130
- month: "short",
131
- hour: "2-digit",
132
- minute: "2-digit",
133
- second: "2-digit",
134
- hour12: false
135
- })
136
- }}
137
- </div>
138
- </div>
139
- </div>
140
- <div v-else>
141
- <UAlert
142
- color="info"
143
- title="No scheduled jobs"
144
- variant="subtle"
145
- icon="i-heroicons-information-circle"
146
- class="flex items-center space-x-2"
147
- />
148
- </div>
149
- </div>
150
- </div>
151
- </template>
152
-
153
- <script setup>
154
- import { z } from "zod";
155
- import { ref, useFetch } from "#imports";
156
- const props = defineProps({
157
- queue: { type: String, required: true }
158
- });
159
- const jobSchedulerEditor = ref(false);
160
- const scheduleInputTypes = [
161
- { label: "Every", value: "every" },
162
- { label: "Cron", value: "cron" }
163
- ];
164
- const {
165
- data: scheduler,
166
- refresh
167
- } = await useFetch(`/api/_queue/${props.queue}/job/scheduler`, {
168
- method: "GET"
169
- });
170
- const state = ref({
171
- name: void 0,
172
- scheduleType: "every",
173
- scheduleValue: void 0,
174
- jobName: void 0,
175
- jobData: void 0
176
- });
177
- const schema = z.object({
178
- name: z.string().regex(/^\S*$/gm, "No spaces allowed"),
179
- scheduleType: z.enum(["every", "cron"]),
180
- scheduleValue: z.any(),
181
- jobName: z.string().regex(/^\S*$/gm, "No spaces allowed"),
182
- jobData: z.string().default("{}")
183
- });
184
- async function onSubmit(event) {
185
- await $fetch(`/api/_queue/${props.queue}/job/scheduler`, {
186
- method: "POST",
187
- body: {
188
- name: event.data.name,
189
- scheduleType: event.data.scheduleType,
190
- scheduleValue: event.data.scheduleValue,
191
- jobName: event.data.jobName,
192
- jobData: JSON.stringify(event.data.jobData)
193
- }
194
- });
195
- refresh();
196
- }
197
- const deleteScheduledJob = async (id) => {
198
- await $fetch(`/api/_queue/${props.queue}/job/scheduler/${id}`, {
199
- method: "DELETE"
200
- });
201
- refresh();
202
- };
203
- </script>
@@ -1,6 +0,0 @@
1
- type __VLS_Props = {
2
- queue: string;
3
- };
4
- 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>;
5
- declare const _default: typeof __VLS_export;
6
- export default _default;
@@ -1,23 +0,0 @@
1
- import type { DropdownMenuItem } from '@nuxt/ui';
2
- type __VLS_Props = {
3
- title?: string;
4
- link: string;
5
- origin?: string | null;
6
- dropdown?: DropdownMenuItem[];
7
- };
8
- declare var __VLS_24: {};
9
- type __VLS_Slots = {} & {
10
- default?: (props: typeof __VLS_24) => any;
11
- };
12
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
- title: string;
14
- origin: string | null;
15
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
- declare const _default: typeof __VLS_export;
18
- export default _default;
19
- type __VLS_WithSlots<T, S> = T & {
20
- new (): {
21
- $slots: S;
22
- };
23
- };
@@ -1,70 +0,0 @@
1
- <template>
2
- <div
3
- :to="link"
4
- class="rounded-lg divide-y divide-gray-200 dark:divide-gray-800 ring-1 ring-gray-200 dark:ring-gray-800 shadow bg-white dark:bg-gray-900"
5
- >
6
- <div class="px-4 py-5 sm:p-6">
7
- <div class="flex flex-col md:flex-row">
8
- <div class="flex-none flex flex-col justify-between space-y-2">
9
- <ULink
10
- class="inline-flex items-center gap-1"
11
- @click="push(link)"
12
- >
13
- <span class="text-lg font-semibold">{{ title }}</span>
14
- <UIcon
15
- name="i-heroicons-arrow-up-right"
16
- class="w-5 h-5 text-primary-500"
17
- />
18
- </ULink>
19
- <div class="flex flex-wrap items-center gap-2">
20
- <div class="inline-flex gap-1 items-center">
21
- <UIcon
22
- name="i-heroicons-check-circle"
23
- class="w-4 h-4 text-green-500"
24
- />
25
- <span class="text-sm">Active</span>
26
- </div>
27
- <UBadge
28
- v-if="origin"
29
- size="sm"
30
- color="neutral"
31
- >
32
- <span v-if="origin === 'local'">Local</span>
33
- <span v-if="origin === 'remote'">Remote</span>
34
- </UBadge>
35
- </div>
36
- </div>
37
- <div class="grow pr-12">
38
- <div class="flex flex-row gap-4 justify-end">
39
- <slot />
40
- </div>
41
- </div>
42
- <div class="flex-none">
43
- <div class="flex gap-2 items-center">
44
- <UDropdownMenu
45
- :items="dropdown"
46
- >
47
- <UButton
48
- icon="i-heroicons-ellipsis-vertical"
49
- color="neutral"
50
- variant="outline"
51
- />
52
- </UDropdownMenu>
53
- </div>
54
- </div>
55
- </div>
56
- </div>
57
- </div>
58
- </template>
59
-
60
- <script setup>
61
- import { useComponentRouter } from "#imports";
62
- import { ULink, UDropdownMenu, UButton, UIcon, UBadge } from "#components";
63
- defineProps({
64
- title: { type: String, required: false, default: "" },
65
- link: { type: String, required: true },
66
- origin: { type: [String, null], required: false, default: null },
67
- dropdown: { type: Array, required: false }
68
- });
69
- const { push } = useComponentRouter();
70
- </script>