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.
- package/dist/module.d.mts +4 -185
- package/dist/module.json +3 -3
- package/dist/module.mjs +451 -257
- package/dist/runtime/adapters/base/index.d.ts +6 -0
- package/dist/runtime/adapters/base/index.js +1 -0
- package/dist/runtime/adapters/base/store-validator.d.ts +48 -0
- package/dist/runtime/adapters/base/store-validator.js +147 -0
- package/dist/runtime/adapters/builtin/file-queue.d.ts +67 -0
- package/dist/runtime/adapters/builtin/file-queue.js +499 -0
- package/dist/runtime/adapters/builtin/file-store.d.ts +32 -0
- package/dist/runtime/adapters/builtin/file-store.js +206 -0
- package/dist/runtime/adapters/builtin/file-stream.d.ts +39 -0
- package/dist/runtime/adapters/builtin/file-stream.js +56 -0
- package/dist/runtime/adapters/builtin/index.d.ts +10 -0
- package/dist/runtime/adapters/builtin/index.js +5 -0
- package/dist/runtime/adapters/builtin/memory-queue.d.ts +52 -0
- package/dist/runtime/adapters/builtin/memory-queue.js +243 -0
- package/dist/runtime/adapters/builtin/memory-store.d.ts +68 -0
- package/dist/runtime/adapters/builtin/memory-store.js +333 -0
- package/dist/runtime/adapters/builtin/memory-stream.d.ts +21 -0
- package/dist/runtime/adapters/builtin/memory-stream.js +56 -0
- package/dist/runtime/adapters/factory.d.ts +31 -0
- package/dist/runtime/adapters/factory.js +134 -0
- package/dist/runtime/adapters/index.d.ts +8 -0
- package/dist/runtime/adapters/index.js +3 -0
- package/dist/runtime/adapters/interfaces/index.d.ts +11 -0
- package/dist/runtime/adapters/interfaces/index.js +3 -0
- package/dist/runtime/adapters/interfaces/queue.d.ts +150 -0
- package/dist/runtime/adapters/interfaces/store.d.ts +297 -0
- package/dist/runtime/adapters/interfaces/stream.d.ts +62 -0
- package/dist/runtime/adapters/registry.d.ts +85 -0
- package/dist/runtime/adapters/registry.js +161 -0
- package/dist/runtime/config/index.d.ts +29 -0
- package/dist/runtime/config/index.js +175 -0
- package/dist/runtime/config/types.d.ts +397 -0
- package/dist/runtime/config/types.js +0 -0
- package/dist/runtime/{server-utils/events → events}/eventBus.d.ts +1 -1
- package/dist/runtime/events/types.d.ts +145 -0
- package/dist/runtime/events/types.js +0 -0
- package/dist/runtime/events/utils/scheduleTrigger.d.ts +8 -0
- package/dist/runtime/events/utils/scheduleTrigger.js +69 -0
- package/dist/runtime/events/utils/stallDetector.d.ts +140 -0
- package/dist/runtime/events/utils/stallDetector.js +436 -0
- package/dist/runtime/events/utils/triggerRuntime.d.ts +58 -0
- package/dist/runtime/events/utils/triggerRuntime.js +212 -0
- package/dist/runtime/{server-utils/events → events}/wiring/flowWiring.d.ts +12 -11
- package/dist/runtime/events/wiring/flowWiring.js +1020 -0
- package/dist/runtime/events/wiring/registry.d.ts +19 -0
- package/dist/runtime/events/wiring/registry.js +35 -0
- package/dist/runtime/events/wiring/stateWiring.d.ts +37 -0
- package/dist/runtime/events/wiring/stateWiring.js +92 -0
- package/dist/runtime/events/wiring/streamWiring.d.ts +36 -0
- package/dist/runtime/events/wiring/streamWiring.js +156 -0
- package/dist/runtime/events/wiring/triggerWiring.d.ts +21 -0
- package/dist/runtime/events/wiring/triggerWiring.js +412 -0
- package/dist/runtime/nitro/plugins/00.adapters.d.ts +14 -0
- package/dist/runtime/nitro/plugins/00.adapters.js +73 -0
- package/dist/runtime/nitro/plugins/02.workers.js +63 -0
- package/dist/runtime/nitro/plugins/03.triggers.d.ts +12 -0
- package/dist/runtime/nitro/plugins/03.triggers.js +55 -0
- package/dist/runtime/nitro/routes/webhook.await.d.ts +23 -0
- package/dist/runtime/nitro/routes/webhook.await.js +90 -0
- package/dist/runtime/nitro/routes/webhook.trigger.d.ts +69 -0
- package/dist/runtime/nitro/routes/webhook.trigger.js +64 -0
- package/dist/runtime/nitro/utils/adapters.d.ts +66 -0
- package/dist/runtime/nitro/utils/adapters.js +51 -0
- package/dist/runtime/nitro/utils/awaitPatterns/event.d.ts +15 -0
- package/dist/runtime/nitro/utils/awaitPatterns/event.js +120 -0
- package/dist/runtime/nitro/utils/awaitPatterns/index.d.ts +28 -0
- package/dist/runtime/nitro/utils/awaitPatterns/index.js +55 -0
- package/dist/runtime/nitro/utils/awaitPatterns/schedule.d.ts +16 -0
- package/dist/runtime/nitro/utils/awaitPatterns/schedule.js +78 -0
- package/dist/runtime/nitro/utils/awaitPatterns/time.d.ts +15 -0
- package/dist/runtime/nitro/utils/awaitPatterns/time.js +67 -0
- package/dist/runtime/nitro/utils/awaitPatterns/webhook.d.ts +15 -0
- package/dist/runtime/nitro/utils/awaitPatterns/webhook.js +120 -0
- package/dist/runtime/nitro/utils/defineFunction.d.ts +10 -0
- package/dist/runtime/nitro/utils/defineFunction.js +17 -0
- package/dist/runtime/nitro/utils/defineFunctionConfig.d.ts +310 -0
- package/dist/runtime/nitro/utils/defineFunctionConfig.js +3 -0
- package/dist/runtime/nitro/utils/defineHooks.d.ts +41 -0
- package/dist/runtime/nitro/utils/defineHooks.js +6 -0
- package/dist/runtime/nitro/utils/registerAdapter.d.ts +59 -0
- package/dist/runtime/nitro/utils/registerAdapter.js +13 -0
- package/dist/runtime/nitro/utils/useAwait.d.ts +71 -0
- package/dist/runtime/nitro/utils/useAwait.js +139 -0
- package/dist/runtime/{server-utils → nitro}/utils/useEventManager.d.ts +2 -2
- package/dist/runtime/{server-utils → nitro}/utils/useEventManager.js +1 -1
- package/dist/runtime/nitro/utils/useFlow.d.ts +68 -0
- package/dist/runtime/nitro/utils/useFlow.js +226 -0
- package/dist/runtime/nitro/utils/useHookRegistry.d.ts +34 -0
- package/dist/runtime/nitro/utils/useHookRegistry.js +25 -0
- package/dist/runtime/{server-utils → nitro}/utils/useNventLogger.js +2 -2
- package/dist/runtime/nitro/utils/useRunContext.d.ts +6 -0
- package/dist/runtime/nitro/utils/useRunContext.js +102 -0
- package/dist/runtime/nitro/utils/useStreamTopics.d.ts +83 -0
- package/dist/runtime/nitro/utils/useStreamTopics.js +94 -0
- package/dist/runtime/nitro/utils/useTrigger.d.ts +150 -0
- package/dist/runtime/nitro/utils/useTrigger.js +320 -0
- package/dist/runtime/scheduler/index.d.ts +33 -0
- package/dist/runtime/scheduler/index.js +38 -0
- package/dist/runtime/scheduler/scheduler.d.ts +113 -0
- package/dist/runtime/scheduler/scheduler.js +623 -0
- package/dist/runtime/scheduler/types.d.ts +116 -0
- package/dist/runtime/scheduler/types.js +0 -0
- package/dist/runtime/tsconfig.json +8 -0
- package/dist/runtime/worker/node/runner.d.ts +53 -0
- package/dist/runtime/worker/node/runner.js +327 -0
- package/dist/types.d.mts +2 -2
- package/package.json +16 -46
- package/LICENSE +0 -21
- package/README.md +0 -389
- package/dist/runtime/app/assets/vueflow.css +0 -1
- package/dist/runtime/app/components/ConfirmDialog.d.vue.ts +0 -33
- package/dist/runtime/app/components/ConfirmDialog.vue +0 -121
- package/dist/runtime/app/components/ConfirmDialog.vue.d.ts +0 -33
- package/dist/runtime/app/components/FlowDiagram.d.vue.ts +0 -64
- package/dist/runtime/app/components/FlowDiagram.vue +0 -338
- package/dist/runtime/app/components/FlowDiagram.vue.d.ts +0 -64
- package/dist/runtime/app/components/FlowNodeCard.d.vue.ts +0 -29
- package/dist/runtime/app/components/FlowNodeCard.vue +0 -156
- package/dist/runtime/app/components/FlowNodeCard.vue.d.ts +0 -29
- package/dist/runtime/app/components/FlowRunOverview.d.vue.ts +0 -9
- package/dist/runtime/app/components/FlowRunOverview.vue +0 -291
- package/dist/runtime/app/components/FlowRunOverview.vue.d.ts +0 -9
- package/dist/runtime/app/components/FlowRunStatusBadge.d.vue.ts +0 -14
- package/dist/runtime/app/components/FlowRunStatusBadge.vue +0 -60
- package/dist/runtime/app/components/FlowRunStatusBadge.vue.d.ts +0 -14
- package/dist/runtime/app/components/FlowRunTimeline.d.vue.ts +0 -12
- package/dist/runtime/app/components/FlowRunTimeline.vue +0 -127
- package/dist/runtime/app/components/FlowRunTimeline.vue.d.ts +0 -12
- package/dist/runtime/app/components/FlowScheduleDialog.d.vue.ts +0 -16
- package/dist/runtime/app/components/FlowScheduleDialog.vue +0 -226
- package/dist/runtime/app/components/FlowScheduleDialog.vue.d.ts +0 -16
- package/dist/runtime/app/components/FlowSchedulesList.d.vue.ts +0 -12
- package/dist/runtime/app/components/FlowSchedulesList.vue +0 -99
- package/dist/runtime/app/components/FlowSchedulesList.vue.d.ts +0 -12
- package/dist/runtime/app/components/JobScheduling.d.vue.ts +0 -6
- package/dist/runtime/app/components/JobScheduling.vue +0 -203
- package/dist/runtime/app/components/JobScheduling.vue.d.ts +0 -6
- package/dist/runtime/app/components/ListItem.d.vue.ts +0 -23
- package/dist/runtime/app/components/ListItem.vue +0 -70
- package/dist/runtime/app/components/ListItem.vue.d.ts +0 -23
- package/dist/runtime/app/components/QueueConfigDetails.d.vue.ts +0 -45
- package/dist/runtime/app/components/QueueConfigDetails.vue +0 -412
- package/dist/runtime/app/components/QueueConfigDetails.vue.d.ts +0 -45
- package/dist/runtime/app/components/StatCounter.d.vue.ts +0 -9
- package/dist/runtime/app/components/StatCounter.vue +0 -25
- package/dist/runtime/app/components/StatCounter.vue.d.ts +0 -9
- package/dist/runtime/app/components/TimelineList.d.vue.ts +0 -7
- package/dist/runtime/app/components/TimelineList.vue +0 -210
- package/dist/runtime/app/components/TimelineList.vue.d.ts +0 -7
- package/dist/runtime/app/components/nhealth/component-router.d.vue.ts +0 -46
- package/dist/runtime/app/components/nhealth/component-router.vue +0 -26
- package/dist/runtime/app/components/nhealth/component-router.vue.d.ts +0 -46
- package/dist/runtime/app/components/nhealth/component-shell.d.vue.ts +0 -24
- package/dist/runtime/app/components/nhealth/component-shell.vue +0 -89
- package/dist/runtime/app/components/nhealth/component-shell.vue.d.ts +0 -24
- package/dist/runtime/app/composables/useAnalyzedFlows.d.ts +0 -14
- package/dist/runtime/app/composables/useAnalyzedFlows.js +0 -8
- package/dist/runtime/app/composables/useComponentRouter.d.ts +0 -38
- package/dist/runtime/app/composables/useComponentRouter.js +0 -240
- package/dist/runtime/app/composables/useFlowRunTimeline.d.ts +0 -80
- package/dist/runtime/app/composables/useFlowRunTimeline.js +0 -68
- package/dist/runtime/app/composables/useFlowRuns.d.ts +0 -18
- package/dist/runtime/app/composables/useFlowRuns.js +0 -32
- package/dist/runtime/app/composables/useFlowRunsInfinite.d.ts +0 -24
- package/dist/runtime/app/composables/useFlowRunsInfinite.js +0 -123
- package/dist/runtime/app/composables/useFlowRunsPolling.d.ts +0 -9
- package/dist/runtime/app/composables/useFlowRunsPolling.js +0 -33
- package/dist/runtime/app/composables/useFlowState.d.ts +0 -125
- package/dist/runtime/app/composables/useFlowState.js +0 -211
- package/dist/runtime/app/composables/useFlowWebSocket.d.ts +0 -27
- package/dist/runtime/app/composables/useFlowWebSocket.js +0 -205
- package/dist/runtime/app/composables/useFlowsNavigation.d.ts +0 -10
- package/dist/runtime/app/composables/useFlowsNavigation.js +0 -58
- package/dist/runtime/app/composables/useQueueJobs.d.ts +0 -26
- package/dist/runtime/app/composables/useQueueJobs.js +0 -20
- package/dist/runtime/app/composables/useQueueUpdates.d.ts +0 -26
- package/dist/runtime/app/composables/useQueueUpdates.js +0 -122
- package/dist/runtime/app/composables/useQueues.d.ts +0 -45
- package/dist/runtime/app/composables/useQueues.js +0 -26
- package/dist/runtime/app/composables/useQueuesLive.d.ts +0 -19
- package/dist/runtime/app/composables/useQueuesLive.js +0 -143
- package/dist/runtime/app/pages/flows/index.d.vue.ts +0 -3
- package/dist/runtime/app/pages/flows/index.vue +0 -645
- package/dist/runtime/app/pages/flows/index.vue.d.ts +0 -3
- package/dist/runtime/app/pages/index.d.vue.ts +0 -3
- package/dist/runtime/app/pages/index.vue +0 -34
- package/dist/runtime/app/pages/index.vue.d.ts +0 -3
- package/dist/runtime/app/pages/queues/index.d.vue.ts +0 -3
- package/dist/runtime/app/pages/queues/index.vue +0 -229
- package/dist/runtime/app/pages/queues/index.vue.d.ts +0 -3
- package/dist/runtime/app/pages/queues/job.d.vue.ts +0 -3
- package/dist/runtime/app/pages/queues/job.vue +0 -262
- package/dist/runtime/app/pages/queues/job.vue.d.ts +0 -3
- package/dist/runtime/app/pages/queues/jobs.d.vue.ts +0 -3
- package/dist/runtime/app/pages/queues/jobs.vue +0 -291
- package/dist/runtime/app/pages/queues/jobs.vue.d.ts +0 -3
- package/dist/runtime/app/plugins/vueflow.client.d.ts +0 -2
- package/dist/runtime/app/plugins/vueflow.client.js +0 -11
- package/dist/runtime/constants.d.ts +0 -11
- package/dist/runtime/constants.js +0 -11
- package/dist/runtime/schema.d.ts +0 -37
- package/dist/runtime/schema.js +0 -20
- package/dist/runtime/server/api/_flows/[name]/clear-history.delete.d.ts +0 -10
- package/dist/runtime/server/api/_flows/[name]/clear-history.delete.js +0 -44
- package/dist/runtime/server/api/_flows/[name]/runs.get.d.ts +0 -7
- package/dist/runtime/server/api/_flows/[name]/runs.get.js +0 -53
- package/dist/runtime/server/api/_flows/[name]/schedule.post.js +0 -57
- package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.d.ts +0 -2
- package/dist/runtime/server/api/_flows/[name]/schedules/[id].delete.js +0 -42
- package/dist/runtime/server/api/_flows/[name]/schedules.get.d.ts +0 -2
- package/dist/runtime/server/api/_flows/[name]/schedules.get.js +0 -48
- package/dist/runtime/server/api/_flows/[name]/start.post.d.ts +0 -2
- package/dist/runtime/server/api/_flows/[name]/start.post.js +0 -9
- package/dist/runtime/server/api/_flows/index.get.d.ts +0 -6
- package/dist/runtime/server/api/_flows/index.get.js +0 -5
- package/dist/runtime/server/api/_flows/ws.d.ts +0 -60
- package/dist/runtime/server/api/_flows/ws.js +0 -188
- package/dist/runtime/server/api/_queues/[name]/job/[id].get.d.ts +0 -2
- package/dist/runtime/server/api/_queues/[name]/job/[id].get.js +0 -9
- package/dist/runtime/server/api/_queues/[name]/job/index.get.d.ts +0 -2
- package/dist/runtime/server/api/_queues/[name]/job/index.get.js +0 -18
- package/dist/runtime/server/api/_queues/index.get.d.ts +0 -2
- package/dist/runtime/server/api/_queues/index.get.js +0 -63
- package/dist/runtime/server/api/_queues/ws.d.ts +0 -48
- package/dist/runtime/server/api/_queues/ws.js +0 -205
- package/dist/runtime/server/plugins/00.event-store.d.ts +0 -13
- package/dist/runtime/server/plugins/00.event-store.js +0 -16
- package/dist/runtime/server/plugins/flow-management.d.ts +0 -13
- package/dist/runtime/server/plugins/flow-management.js +0 -65
- package/dist/runtime/server/plugins/queue-management.d.ts +0 -2
- package/dist/runtime/server/plugins/queue-management.js +0 -27
- package/dist/runtime/server/plugins/state-cleanup.d.ts +0 -11
- package/dist/runtime/server/plugins/state-cleanup.js +0 -93
- package/dist/runtime/server/plugins/worker-management.d.ts +0 -2
- package/dist/runtime/server/plugins/worker-management.js +0 -33
- package/dist/runtime/server/tsconfig.json +0 -3
- package/dist/runtime/server-utils/events/adapters/fileAdapter.d.ts +0 -2
- package/dist/runtime/server-utils/events/adapters/fileAdapter.js +0 -382
- package/dist/runtime/server-utils/events/adapters/memoryAdapter.d.ts +0 -2
- package/dist/runtime/server-utils/events/adapters/memoryAdapter.js +0 -171
- package/dist/runtime/server-utils/events/adapters/redis/redisAdapter.d.ts +0 -2
- package/dist/runtime/server-utils/events/adapters/redis/redisAdapter.js +0 -348
- package/dist/runtime/server-utils/events/adapters/redis/redisPubSubGateway.d.ts +0 -30
- package/dist/runtime/server-utils/events/adapters/redis/redisPubSubGateway.js +0 -82
- package/dist/runtime/server-utils/events/eventStoreFactory.d.ts +0 -19
- package/dist/runtime/server-utils/events/eventStoreFactory.js +0 -44
- package/dist/runtime/server-utils/events/streamNames.d.ts +0 -17
- package/dist/runtime/server-utils/events/streamNames.js +0 -17
- package/dist/runtime/server-utils/events/types.d.ts +0 -63
- package/dist/runtime/server-utils/events/wiring/flowWiring.js +0 -409
- package/dist/runtime/server-utils/events/wiring/registry.d.ts +0 -10
- package/dist/runtime/server-utils/events/wiring/registry.js +0 -24
- package/dist/runtime/server-utils/queue/adapters/bullmq.d.ts +0 -18
- package/dist/runtime/server-utils/queue/adapters/bullmq.js +0 -164
- package/dist/runtime/server-utils/queue/queueFactory.d.ts +0 -3
- package/dist/runtime/server-utils/queue/queueFactory.js +0 -10
- package/dist/runtime/server-utils/queue/types.d.ts +0 -47
- package/dist/runtime/server-utils/state/adapters/redis.d.ts +0 -2
- package/dist/runtime/server-utils/state/adapters/redis.js +0 -42
- package/dist/runtime/server-utils/state/stateFactory.d.ts +0 -3
- package/dist/runtime/server-utils/state/stateFactory.js +0 -17
- package/dist/runtime/server-utils/state/types.d.ts +0 -23
- package/dist/runtime/server-utils/utils/defineQueueConfig.d.ts +0 -154
- package/dist/runtime/server-utils/utils/defineQueueConfig.js +0 -2
- package/dist/runtime/server-utils/utils/defineQueueWorker.d.ts +0 -10
- package/dist/runtime/server-utils/utils/defineQueueWorker.js +0 -17
- package/dist/runtime/server-utils/utils/useEventStore.d.ts +0 -20
- package/dist/runtime/server-utils/utils/useEventStore.js +0 -119
- package/dist/runtime/server-utils/utils/useFlowEngine.d.ts +0 -9
- package/dist/runtime/server-utils/utils/useFlowEngine.js +0 -44
- package/dist/runtime/server-utils/utils/useLogs.d.ts +0 -41
- package/dist/runtime/server-utils/utils/useLogs.js +0 -74
- package/dist/runtime/server-utils/utils/useQueue.d.ts +0 -31
- package/dist/runtime/server-utils/utils/useQueue.js +0 -24
- package/dist/runtime/server-utils/worker/adapter.d.ts +0 -4
- package/dist/runtime/server-utils/worker/adapter.js +0 -66
- package/dist/runtime/server-utils/worker/runner/node.d.ts +0 -27
- package/dist/runtime/server-utils/worker/runner/node.js +0 -196
- package/dist/runtime/types.d.ts +0 -132
- /package/dist/runtime/{server-utils/events/types.js → adapters/interfaces/queue.js} +0 -0
- /package/dist/runtime/{server-utils/queue/types.js → adapters/interfaces/store.js} +0 -0
- /package/dist/runtime/{server-utils/state/types.js → adapters/interfaces/stream.js} +0 -0
- /package/dist/runtime/{server-utils/events → events}/eventBus.js +0 -0
- /package/dist/runtime/{server/plugins/00.ws-lifecycle.d.ts → nitro/plugins/01.ws-lifecycle.d.ts} +0 -0
- /package/dist/runtime/{server/plugins/00.ws-lifecycle.js → nitro/plugins/01.ws-lifecycle.js} +0 -0
- /package/dist/runtime/{server/api/_flows/[name]/schedule.post.d.ts → nitro/plugins/02.workers.d.ts} +0 -0
- /package/dist/runtime/{server-utils → nitro}/utils/useNventLogger.d.ts +0 -0
- /package/dist/runtime/{server-utils → nitro}/utils/wsPeerManager.d.ts +0 -0
- /package/dist/runtime/{server-utils → nitro}/utils/wsPeerManager.js +0 -0
- /package/dist/runtime/{python → worker/python}/get_config.py +0 -0
package/README.md
DELETED
|
@@ -1,389 +0,0 @@
|
|
|
1
|
-
# Nuxt Queue
|
|
2
|
-
|
|
3
|
-
Event-sourced queue and flow orchestration for Nuxt. Built on BullMQ with integrated real-time monitoring and multi-step workflow support.
|
|
4
|
-
|
|
5
|
-
## ✨ Features
|
|
6
|
-
|
|
7
|
-
- 🔄 **Queue Management**: Reliable job processing with BullMQ
|
|
8
|
-
- 🎭 **Flow Orchestration**: Multi-step workflows with event sourcing
|
|
9
|
-
- ⏰ **Flow Scheduling**: Cron-based and delayed flow execution
|
|
10
|
-
- ⚡ **Real-time Updates**: Redis Pub/Sub for <100ms latency monitoring
|
|
11
|
-
- 📊 **Event Sourcing**: Complete audit trail of all flow operations
|
|
12
|
-
- 🎨 **Development UI**: Visual flow diagrams, timeline, and scheduling
|
|
13
|
-
- 🔌 **Worker Context**: Rich runtime with state, logging, and events
|
|
14
|
-
- 📦 **Auto-discovery**: Filesystem-based worker registry
|
|
15
|
-
- 🚀 **Horizontal Scaling**: Stateless architecture for easy scaling
|
|
16
|
-
- 🔍 **Full Observability**: Real-time logs, metrics, and event streams
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
**Version**: v0.4.0
|
|
22
|
-
**Status**: ✅ Current Implementation
|
|
23
|
-
**Last Updated**: 2025-11-07
|
|
24
|
-
✅ Core queue and flow functionality
|
|
25
|
-
✅ Event sourcing with Redis Streams
|
|
26
|
-
✅ Real-time monitoring UI with Vue Flow diagrams
|
|
27
|
-
✅ Flow scheduling (cron patterns and delays)
|
|
28
|
-
✅ Worker context with state, logging, and events
|
|
29
|
-
✅ Auto-discovery and flow analysis
|
|
30
|
-
🚧 Comprehensive trigger system (planned v0.5)
|
|
31
|
-
🚧 Python workers (planned v0.5)
|
|
32
|
-
🚧 Postgres adapters (planned v0.6)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## 🗃️ Event Schema & Storage
|
|
36
|
-
|
|
37
|
-
All flow operations are event-sourced and stored in Redis Streams (`nq:flow:<runId>`). Events are immutable, type-safe, and provide a complete audit trail.
|
|
38
|
-
|
|
39
|
-
**Event types:**
|
|
40
|
-
|
|
41
|
-
- `flow.start`, `flow.completed`, `flow.failed`
|
|
42
|
-
- `step.started`, `step.completed`, `step.failed`, `step.retry`
|
|
43
|
-
- `log`, `emit`, `state`
|
|
44
|
-
|
|
45
|
-
See [Event Schema](./specs/v0.4/event-schema.md) for full details and field definitions.
|
|
46
|
-
|
|
47
|
-
## 🏆 Best Practices
|
|
48
|
-
|
|
49
|
-
- Keep steps small and focused
|
|
50
|
-
- Use state for shared data between steps
|
|
51
|
-
- Use `ctx.flow.emit()` to trigger downstream steps
|
|
52
|
-
- Log with context using `ctx.logger.log()`
|
|
53
|
-
- Set concurrency based on resource needs
|
|
54
|
-
- Use `on-complete` state cleanup for automatic state management
|
|
55
|
-
- Document schedules with metadata for maintainability
|
|
56
|
-
|
|
57
|
-
## ⚠️ Limitations (v0.4)
|
|
58
|
-
|
|
59
|
-
1. **TypeScript only**: Python workers not yet implemented (planned for v0.5)
|
|
60
|
-
2. **No complex triggers**: Only basic scheduling available (v0.5 will add triggers)
|
|
61
|
-
3. **No await patterns**: Pausing flows for time/events planned for v0.5
|
|
62
|
-
4. **Redis only**: No Postgres adapter yet (planned for v0.6)
|
|
63
|
-
5. **State separate from events**: Not unified with stream store (planned for v0.6)
|
|
64
|
-
6. **Basic logging**: No advanced logger adapters (planned for v0.7)
|
|
65
|
-
7. **No schedule editing**: Must delete and recreate schedules (v0.5 will add full trigger management)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## 🚀 Quick Start
|
|
69
|
-
|
|
70
|
-
### Installation
|
|
71
|
-
|
|
72
|
-
```sh
|
|
73
|
-
npx nuxi@latest module add nuxt-queue
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Configuration
|
|
77
|
-
|
|
78
|
-
```ts
|
|
79
|
-
// nuxt.config.ts
|
|
80
|
-
export default defineNuxtConfig({
|
|
81
|
-
modules: ['nuxt-queue'],
|
|
82
|
-
queue: {
|
|
83
|
-
ui: true, // Enable dev UI
|
|
84
|
-
// Shortcut: Configure all backends with one setting
|
|
85
|
-
store: {
|
|
86
|
-
adapter: 'redis',
|
|
87
|
-
redis: {
|
|
88
|
-
host: '127.0.0.1',
|
|
89
|
-
port: 6379,
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
// Or configure individually:
|
|
93
|
-
// queue: {
|
|
94
|
-
// adapter: 'redis',
|
|
95
|
-
// redis: { host: '127.0.0.1', port: 6379 },
|
|
96
|
-
// defaultConfig: { concurrency: 2 }
|
|
97
|
-
// },
|
|
98
|
-
// state: {
|
|
99
|
-
// adapter: 'redis',
|
|
100
|
-
// redis: { host: '127.0.0.1', port: 6379 }
|
|
101
|
-
// },
|
|
102
|
-
// eventStore: {
|
|
103
|
-
// adapter: 'memory' // Use memory for events
|
|
104
|
-
// },
|
|
105
|
-
},
|
|
106
|
-
})
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Create Your First Worker
|
|
110
|
-
|
|
111
|
-
```typescript
|
|
112
|
-
// server/queues/example/process.ts
|
|
113
|
-
export default defineQueueWorker(async (job, ctx) => {
|
|
114
|
-
// Access job data
|
|
115
|
-
const { message } = job.data
|
|
116
|
-
|
|
117
|
-
// Log to stream
|
|
118
|
-
ctx.logger.log('info', 'Processing message', { message })
|
|
119
|
-
|
|
120
|
-
// Store state
|
|
121
|
-
await ctx.state.set('processedAt', new Date().toISOString())
|
|
122
|
-
|
|
123
|
-
// Return result
|
|
124
|
-
return { success: true, processed: message }
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
export const config = defineQueueConfig({
|
|
128
|
-
concurrency: 5,
|
|
129
|
-
})
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Enqueue a Job
|
|
133
|
-
|
|
134
|
-
```typescript
|
|
135
|
-
// API route or wherever
|
|
136
|
-
const queueProvider = useQueueProvider()
|
|
137
|
-
await queueProvider.enqueue('process', {
|
|
138
|
-
name: 'process',
|
|
139
|
-
data: { message: 'Hello World' }
|
|
140
|
-
})
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Create a Flow
|
|
144
|
-
|
|
145
|
-
Multi-step workflows with event-driven orchestration:
|
|
146
|
-
|
|
147
|
-
```typescript
|
|
148
|
-
// server/queues/my-flow/start.ts
|
|
149
|
-
export default defineQueueWorker(async (job, ctx) => {
|
|
150
|
-
ctx.logger.log('info', 'Flow started')
|
|
151
|
-
const prepared = { step: 1, data: job.data }
|
|
152
|
-
|
|
153
|
-
// Emit event to trigger next steps
|
|
154
|
-
ctx.flow.emit('data.prepared', prepared)
|
|
155
|
-
|
|
156
|
-
return prepared
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
-
export const config = defineQueueConfig({
|
|
160
|
-
flow: {
|
|
161
|
-
names: ['my-flow'],
|
|
162
|
-
role: 'entry',
|
|
163
|
-
step: 'start',
|
|
164
|
-
emits: ['data.prepared']
|
|
165
|
-
}
|
|
166
|
-
})
|
|
167
|
-
|
|
168
|
-
// server/queues/my-flow/process.ts
|
|
169
|
-
export default defineQueueWorker(async (job, ctx) => {
|
|
170
|
-
const result = await processData(job.data)
|
|
171
|
-
|
|
172
|
-
// Emit to trigger next step
|
|
173
|
-
ctx.flow.emit('data.processed', result)
|
|
174
|
-
|
|
175
|
-
return result
|
|
176
|
-
})
|
|
177
|
-
|
|
178
|
-
export const config = defineQueueConfig({
|
|
179
|
-
flow: {
|
|
180
|
-
names: ['my-flow'],
|
|
181
|
-
role: 'step',
|
|
182
|
-
step: 'process',
|
|
183
|
-
subscribes: ['data.prepared'], // Triggered by start
|
|
184
|
-
emits: ['data.processed']
|
|
185
|
-
}
|
|
186
|
-
})
|
|
187
|
-
|
|
188
|
-
// server/queues/my-flow/validate.ts
|
|
189
|
-
export default defineQueueWorker(async (job, ctx) => {
|
|
190
|
-
const validated = await validate(job.data)
|
|
191
|
-
ctx.flow.emit('validation.complete', validated)
|
|
192
|
-
return validated
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
export const config = defineQueueConfig({
|
|
196
|
-
flow: {
|
|
197
|
-
names: ['my-flow'],
|
|
198
|
-
role: 'step',
|
|
199
|
-
step: 'validate',
|
|
200
|
-
subscribes: ['data.prepared'], // Also triggered by start (parallel with process)
|
|
201
|
-
emits: ['validation.complete']
|
|
202
|
-
}
|
|
203
|
-
})
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
**Start the flow:**
|
|
207
|
-
```typescript
|
|
208
|
-
const { startFlow } = useFlowEngine()
|
|
209
|
-
await startFlow('my-flow', { input: 'data' })
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
**Flow execution**: Entry step emits `data.prepared` → Both `process` and `validate` steps run in parallel (they both subscribe to `data.prepared`) → Each emits its own completion event for downstream steps.
|
|
213
|
-
|
|
214
|
-
### Schedule a Flow
|
|
215
|
-
|
|
216
|
-
Schedule flows to run automatically with cron patterns or delays:
|
|
217
|
-
|
|
218
|
-
```typescript
|
|
219
|
-
// Schedule a flow to run daily at 2 AM
|
|
220
|
-
await $fetch('/api/_flows/my-flow/schedule', {
|
|
221
|
-
method: 'POST',
|
|
222
|
-
body: {
|
|
223
|
-
cron: '0 2 * * *',
|
|
224
|
-
input: { retentionDays: 30 },
|
|
225
|
-
metadata: {
|
|
226
|
-
description: 'Daily cleanup job'
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
})
|
|
230
|
-
|
|
231
|
-
// Schedule a one-time delayed execution (5 minutes)
|
|
232
|
-
await $fetch('/api/_flows/reminder-flow/schedule', {
|
|
233
|
-
method: 'POST',
|
|
234
|
-
body: {
|
|
235
|
-
delay: 300000, // milliseconds
|
|
236
|
-
input: { userId: '123', message: 'Check your email' }
|
|
237
|
-
}
|
|
238
|
-
})
|
|
239
|
-
|
|
240
|
-
// List all schedules for a flow
|
|
241
|
-
const schedules = await $fetch('/api/_flows/my-flow/schedules')
|
|
242
|
-
|
|
243
|
-
// Delete a schedule
|
|
244
|
-
await $fetch('/api/_flows/my-flow/schedules/schedule-id', {
|
|
245
|
-
method: 'DELETE'
|
|
246
|
-
})
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
**Common cron patterns:**
|
|
250
|
-
- `* * * * *` - Every minute
|
|
251
|
-
- `*/5 * * * *` - Every 5 minutes
|
|
252
|
-
- `0 * * * *` - Every hour
|
|
253
|
-
- `0 2 * * *` - Daily at 2 AM
|
|
254
|
-
- `0 9 * * 1` - Every Monday at 9 AM
|
|
255
|
-
- `0 0 1 * *` - First day of month at midnight
|
|
256
|
-
|
|
257
|
-
## 🎨 Development UI
|
|
258
|
-
|
|
259
|
-
Access the built-in UI as `<QueueApp />` component:
|
|
260
|
-
|
|
261
|
-
- 📊 **Dashboard**: Overview of queues and flows
|
|
262
|
-
- 🔄 **Flow Diagrams**: Visual representation with Vue Flow
|
|
263
|
-
- ⏰ **Flow Scheduling**: Create and manage cron-based or delayed schedules
|
|
264
|
-
- 📝 **Event Timeline**: Real-time event stream with step details
|
|
265
|
-
- 📋 **Logs**: Filtered logging by flow/step
|
|
266
|
-
- 📈 **Metrics**: Queue statistics and performance
|
|
267
|
-
- 🔍 **Flow Runs**: Complete history with status tracking
|
|
268
|
-
|
|
269
|
-
## 🏗️ Architecture
|
|
270
|
-
|
|
271
|
-
### Event Sourcing
|
|
272
|
-
|
|
273
|
-
Every flow operation is stored as an event in Redis Streams:
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
nq:flow:<runId>
|
|
277
|
-
├─ flow.start
|
|
278
|
-
├─ step.started
|
|
279
|
-
├─ log
|
|
280
|
-
├─ step.completed
|
|
281
|
-
├─ step.started
|
|
282
|
-
├─ log
|
|
283
|
-
├─ step.completed
|
|
284
|
-
└─ flow.completed
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
### Real-time Distribution
|
|
288
|
-
|
|
289
|
-
Events are broadcast via Redis Pub/Sub for instant UI updates (<100ms latency).
|
|
290
|
-
|
|
291
|
-
### Worker Context
|
|
292
|
-
|
|
293
|
-
Every worker receives a rich context:
|
|
294
|
-
|
|
295
|
-
```typescript
|
|
296
|
-
{
|
|
297
|
-
jobId: string // BullMQ job ID
|
|
298
|
-
queue: string // Queue name
|
|
299
|
-
flowId: string // Flow run UUID
|
|
300
|
-
flowName: string // Flow definition name
|
|
301
|
-
stepName: string // Current step name
|
|
302
|
-
logger: {
|
|
303
|
-
log(level, msg, meta) // Structured logging
|
|
304
|
-
},
|
|
305
|
-
state: {
|
|
306
|
-
get(key) // Get flow-scoped state
|
|
307
|
-
set(key, value, opts) // Set with optional TTL
|
|
308
|
-
delete(key) // Delete state
|
|
309
|
-
},
|
|
310
|
-
flow: {
|
|
311
|
-
emit(eventName, data) // Emit flow event to trigger subscribed steps
|
|
312
|
-
startFlow(name, input) // Start nested flow
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
## 📚 Documentation
|
|
318
|
-
|
|
319
|
-
### v0.4 Documentation
|
|
320
|
-
- **[Current Implementation](./specs/v0.4/current-implementation.md)** - Complete v0.4 architecture
|
|
321
|
-
- **[Event Schema](./specs/v0.4/event-schema.md)** - Event types and structure
|
|
322
|
-
- **[Flow Scheduling](./specs/v0.4/flow-scheduling.md)** - Scheduling specification
|
|
323
|
-
- **[Quick Reference](./specs/v0.4/quick-reference.md)** - One-page API reference
|
|
324
|
-
|
|
325
|
-
### API & Advanced
|
|
326
|
-
- **[API Reference](./specs/v0.4/current-implementation.md#api-endpoints)** - REST endpoints for flows/queues
|
|
327
|
-
- **[Logging](./specs/v0.4/logging.md)** - Server logging and best practices
|
|
328
|
-
|
|
329
|
-
### Roadmap & Future
|
|
330
|
-
- **[Roadmap](./specs/roadmap.md)** - Planned features across versions
|
|
331
|
-
- **[v0.5 Trigger System](./specs/v0.5/trigger-system.md)** - Next-gen event handling
|
|
332
|
-
- **[v0.6 Multi-language Workers](./specs/v0.6/multi-language-workers.md)** - Python support
|
|
333
|
-
- **[v0.6 Postgres Backend](./specs/v0.6/postgres-backend.md)** - PgBoss integration
|
|
334
|
-
|
|
335
|
-
## 🔮 Roadmap
|
|
336
|
-
|
|
337
|
-
### v0.4 (Current - November 2025)
|
|
338
|
-
✅ Core queue and flow orchestration
|
|
339
|
-
✅ Event sourcing with Redis Streams
|
|
340
|
-
✅ Real-time monitoring UI
|
|
341
|
-
✅ Flow scheduling (cron and delays)
|
|
342
|
-
✅ Worker context with state and logging
|
|
343
|
-
|
|
344
|
-
### v0.5
|
|
345
|
-
- 🎯 Comprehensive trigger system (schedule, webhook, event, manual)
|
|
346
|
-
- ⏱️ Await patterns (time, event, condition)
|
|
347
|
-
- 🐍 Python worker support with RPC bridge
|
|
348
|
-
- 🔗 Webhook triggers with auto-setup
|
|
349
|
-
|
|
350
|
-
### v0.6
|
|
351
|
-
- 🐘 PgBoss queue provider option
|
|
352
|
-
- 🗄️ Postgres stream store adapter
|
|
353
|
-
- 🔄 Unified state and event storage
|
|
354
|
-
- 📊 Advanced state management
|
|
355
|
-
|
|
356
|
-
### v0.7
|
|
357
|
-
- 📊 Enhanced logger with multiple adapters
|
|
358
|
-
- 🌐 HTTP mode for workers (REST/gRPC)
|
|
359
|
-
- 🔌 External service hooks
|
|
360
|
-
- 🎨 Pluggable worker execution modes
|
|
361
|
-
|
|
362
|
-
See [specs/roadmap.md](./specs/roadmap.md) for complete details.
|
|
363
|
-
|
|
364
|
-
## 🤝 Contributing
|
|
365
|
-
|
|
366
|
-
Contributions welcome! Please read our architecture docs first:
|
|
367
|
-
|
|
368
|
-
1. Review [specs/v0.4/current-implementation.md](./specs/v0.4/current-implementation.md)
|
|
369
|
-
2. Check [specs/roadmap.md](./specs/roadmap.md) for planned features
|
|
370
|
-
3. Open an issue to discuss changes
|
|
371
|
-
4. Submit a PR with tests
|
|
372
|
-
|
|
373
|
-
### Development Setup
|
|
374
|
-
|
|
375
|
-
```bash
|
|
376
|
-
# Install dependencies
|
|
377
|
-
yarn install
|
|
378
|
-
|
|
379
|
-
# Start playground with dev UI
|
|
380
|
-
cd playground
|
|
381
|
-
yarn dev
|
|
382
|
-
|
|
383
|
-
# Run tests
|
|
384
|
-
yarn test
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
## 📄 License
|
|
388
|
-
|
|
389
|
-
[MIT License](./LICENSE) - Copyright (c) DevJoghurt
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import "@vue-flow/core/dist/style.css";@import "@vue-flow/core/dist/theme-default.css";@import "@vue-flow/controls/dist/style.css";@import "@vue-flow/minimap/dist/style.css";
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
title: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
items?: string[];
|
|
5
|
-
warning?: string;
|
|
6
|
-
confirmLabel?: string;
|
|
7
|
-
cancelLabel?: string;
|
|
8
|
-
confirmColor?: 'primary' | 'error' | 'warning' | 'success';
|
|
9
|
-
icon?: string;
|
|
10
|
-
iconColor?: 'primary' | 'error' | 'warning' | 'success' | 'info';
|
|
11
|
-
loading?: boolean;
|
|
12
|
-
}
|
|
13
|
-
type __VLS_Props = Props;
|
|
14
|
-
type __VLS_ModelProps = {
|
|
15
|
-
'open'?: boolean;
|
|
16
|
-
};
|
|
17
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
-
cancel: () => any;
|
|
20
|
-
"update:open": (value: boolean) => any;
|
|
21
|
-
confirm: () => any;
|
|
22
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
-
onCancel?: (() => any) | undefined;
|
|
24
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
25
|
-
onConfirm?: (() => any) | undefined;
|
|
26
|
-
}>, {
|
|
27
|
-
confirmLabel: string;
|
|
28
|
-
cancelLabel: string;
|
|
29
|
-
confirmColor: "primary" | "error" | "warning" | "success";
|
|
30
|
-
iconColor: "primary" | "error" | "warning" | "success" | "info";
|
|
31
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
-
declare const _default: typeof __VLS_export;
|
|
33
|
-
export default _default;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<UModal
|
|
3
|
-
v-model:open="isOpen"
|
|
4
|
-
:ui="{
|
|
5
|
-
content: 'max-w-md'
|
|
6
|
-
}"
|
|
7
|
-
>
|
|
8
|
-
<template #header>
|
|
9
|
-
<div class="flex items-start gap-3">
|
|
10
|
-
<div
|
|
11
|
-
v-if="icon"
|
|
12
|
-
class="shrink-0 rounded-full p-2"
|
|
13
|
-
:class="iconColorClasses"
|
|
14
|
-
>
|
|
15
|
-
<UIcon
|
|
16
|
-
:name="icon"
|
|
17
|
-
class="size-5"
|
|
18
|
-
/>
|
|
19
|
-
</div>
|
|
20
|
-
<div class="flex-1 min-w-0">
|
|
21
|
-
<h3 class="text-base font-semibold text-gray-900 dark:text-gray-100">
|
|
22
|
-
{{ title }}
|
|
23
|
-
</h3>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<template #body>
|
|
29
|
-
<div class="space-y-3">
|
|
30
|
-
<p
|
|
31
|
-
v-if="description"
|
|
32
|
-
class="text-sm text-gray-600 dark:text-gray-400"
|
|
33
|
-
>
|
|
34
|
-
{{ description }}
|
|
35
|
-
</p>
|
|
36
|
-
<ul
|
|
37
|
-
v-if="items && items.length > 0"
|
|
38
|
-
class="space-y-2 text-sm text-gray-600 dark:text-gray-400"
|
|
39
|
-
>
|
|
40
|
-
<li
|
|
41
|
-
v-for="(item, index) in items"
|
|
42
|
-
:key="index"
|
|
43
|
-
class="flex items-start gap-2"
|
|
44
|
-
>
|
|
45
|
-
<UIcon
|
|
46
|
-
name="i-lucide-circle"
|
|
47
|
-
class="size-1.5 mt-1.5 shrink-0"
|
|
48
|
-
/>
|
|
49
|
-
<span>{{ item }}</span>
|
|
50
|
-
</li>
|
|
51
|
-
</ul>
|
|
52
|
-
<p
|
|
53
|
-
v-if="warning"
|
|
54
|
-
class="text-sm font-medium text-amber-600 dark:text-amber-400"
|
|
55
|
-
>
|
|
56
|
-
{{ warning }}
|
|
57
|
-
</p>
|
|
58
|
-
</div>
|
|
59
|
-
</template>
|
|
60
|
-
|
|
61
|
-
<template #footer>
|
|
62
|
-
<div class="flex justify-end gap-2">
|
|
63
|
-
<UButton
|
|
64
|
-
color="neutral"
|
|
65
|
-
variant="ghost"
|
|
66
|
-
:disabled="loading"
|
|
67
|
-
@click="handleCancel"
|
|
68
|
-
>
|
|
69
|
-
{{ cancelLabel }}
|
|
70
|
-
</UButton>
|
|
71
|
-
<UButton
|
|
72
|
-
:color="confirmColor"
|
|
73
|
-
:loading="loading"
|
|
74
|
-
@click="handleConfirm"
|
|
75
|
-
>
|
|
76
|
-
{{ confirmLabel }}
|
|
77
|
-
</UButton>
|
|
78
|
-
</div>
|
|
79
|
-
</template>
|
|
80
|
-
</UModal>
|
|
81
|
-
</template>
|
|
82
|
-
|
|
83
|
-
<script setup>
|
|
84
|
-
import { computed } from "#imports";
|
|
85
|
-
import { UModal, UButton, UIcon } from "#components";
|
|
86
|
-
const props = defineProps({
|
|
87
|
-
title: { type: String, required: true },
|
|
88
|
-
description: { type: String, required: false },
|
|
89
|
-
items: { type: Array, required: false },
|
|
90
|
-
warning: { type: String, required: false },
|
|
91
|
-
confirmLabel: { type: String, required: false, default: "Confirm" },
|
|
92
|
-
cancelLabel: { type: String, required: false, default: "Cancel" },
|
|
93
|
-
confirmColor: { type: String, required: false, default: "primary" },
|
|
94
|
-
icon: { type: String, required: false },
|
|
95
|
-
iconColor: { type: String, required: false, default: "primary" },
|
|
96
|
-
loading: { type: Boolean, required: false }
|
|
97
|
-
});
|
|
98
|
-
const isOpen = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
99
|
-
const emit = defineEmits(["confirm", "cancel"]);
|
|
100
|
-
const iconColorClasses = computed(() => {
|
|
101
|
-
switch (props.iconColor) {
|
|
102
|
-
case "error":
|
|
103
|
-
return "bg-red-50 dark:bg-red-950/50 text-red-600 dark:text-red-400";
|
|
104
|
-
case "warning":
|
|
105
|
-
return "bg-amber-50 dark:bg-amber-950/50 text-amber-600 dark:text-amber-400";
|
|
106
|
-
case "success":
|
|
107
|
-
return "bg-emerald-50 dark:bg-emerald-950/50 text-emerald-600 dark:text-emerald-400";
|
|
108
|
-
case "info":
|
|
109
|
-
return "bg-blue-50 dark:bg-blue-950/50 text-blue-600 dark:text-blue-400";
|
|
110
|
-
default:
|
|
111
|
-
return "bg-primary-50 dark:bg-primary-950/50 text-primary-600 dark:text-primary-400";
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
const handleConfirm = () => {
|
|
115
|
-
emit("confirm");
|
|
116
|
-
};
|
|
117
|
-
const handleCancel = () => {
|
|
118
|
-
isOpen.value = false;
|
|
119
|
-
emit("cancel");
|
|
120
|
-
};
|
|
121
|
-
</script>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
title: string;
|
|
3
|
-
description?: string;
|
|
4
|
-
items?: string[];
|
|
5
|
-
warning?: string;
|
|
6
|
-
confirmLabel?: string;
|
|
7
|
-
cancelLabel?: string;
|
|
8
|
-
confirmColor?: 'primary' | 'error' | 'warning' | 'success';
|
|
9
|
-
icon?: string;
|
|
10
|
-
iconColor?: 'primary' | 'error' | 'warning' | 'success' | 'info';
|
|
11
|
-
loading?: boolean;
|
|
12
|
-
}
|
|
13
|
-
type __VLS_Props = Props;
|
|
14
|
-
type __VLS_ModelProps = {
|
|
15
|
-
'open'?: boolean;
|
|
16
|
-
};
|
|
17
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
-
cancel: () => any;
|
|
20
|
-
"update:open": (value: boolean) => any;
|
|
21
|
-
confirm: () => any;
|
|
22
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
-
onCancel?: (() => any) | undefined;
|
|
24
|
-
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
25
|
-
onConfirm?: (() => any) | undefined;
|
|
26
|
-
}>, {
|
|
27
|
-
confirmLabel: string;
|
|
28
|
-
cancelLabel: string;
|
|
29
|
-
confirmColor: "primary" | "error" | "warning" | "success";
|
|
30
|
-
iconColor: "primary" | "error" | "warning" | "success" | "info";
|
|
31
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
-
declare const _default: typeof __VLS_export;
|
|
33
|
-
export default _default;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
interface FlowEntry {
|
|
2
|
-
step: string;
|
|
3
|
-
queue: string;
|
|
4
|
-
workerId: string;
|
|
5
|
-
runtime?: 'nodejs' | 'python';
|
|
6
|
-
runtype?: 'inprocess' | 'task';
|
|
7
|
-
emits?: string[];
|
|
8
|
-
}
|
|
9
|
-
interface FlowStep {
|
|
10
|
-
queue: string;
|
|
11
|
-
workerId: string;
|
|
12
|
-
subscribes?: string[];
|
|
13
|
-
runtime?: 'nodejs' | 'python';
|
|
14
|
-
runtype?: 'inprocess' | 'task';
|
|
15
|
-
emits?: string[];
|
|
16
|
-
}
|
|
17
|
-
interface AnalyzedStep extends FlowStep {
|
|
18
|
-
name: string;
|
|
19
|
-
dependsOn: string[];
|
|
20
|
-
triggers: string[];
|
|
21
|
-
level: number;
|
|
22
|
-
}
|
|
23
|
-
interface FlowMeta {
|
|
24
|
-
id: string;
|
|
25
|
-
entry?: FlowEntry;
|
|
26
|
-
steps?: Record<string, FlowStep>;
|
|
27
|
-
analyzed?: {
|
|
28
|
-
levels: string[][];
|
|
29
|
-
maxLevel: number;
|
|
30
|
-
steps: Record<string, AnalyzedStep>;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
interface StepStatus {
|
|
34
|
-
status: 'pending' | 'running' | 'completed' | 'failed' | 'retrying' | 'waiting' | 'timeout';
|
|
35
|
-
attempt?: number;
|
|
36
|
-
error?: string;
|
|
37
|
-
}
|
|
38
|
-
type __VLS_Props = {
|
|
39
|
-
flow?: FlowMeta | null;
|
|
40
|
-
heightClass?: string;
|
|
41
|
-
showControls?: boolean;
|
|
42
|
-
showMiniMap?: boolean;
|
|
43
|
-
showBackground?: boolean;
|
|
44
|
-
stepStates?: Record<string, StepStatus>;
|
|
45
|
-
};
|
|
46
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
47
|
-
nodeSelected: (payload: {
|
|
48
|
-
id: string;
|
|
49
|
-
}) => any;
|
|
50
|
-
nodeAction: (payload: {
|
|
51
|
-
id: string;
|
|
52
|
-
action: "run" | "logs" | "details";
|
|
53
|
-
}) => any;
|
|
54
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
55
|
-
onNodeSelected?: ((payload: {
|
|
56
|
-
id: string;
|
|
57
|
-
}) => any) | undefined;
|
|
58
|
-
onNodeAction?: ((payload: {
|
|
59
|
-
id: string;
|
|
60
|
-
action: "run" | "logs" | "details";
|
|
61
|
-
}) => any) | undefined;
|
|
62
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
63
|
-
declare const _default: typeof __VLS_export;
|
|
64
|
-
export default _default;
|