bunqueue 2.8.59 → 2.9.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/README.md +109 -77
- package/dist/application/background/dlq.js +2 -0
- package/dist/application/contextFactory.js +5 -0
- package/dist/application/dlqManager.d.ts +11 -1
- package/dist/application/dlqManager.js +48 -10
- package/dist/application/dlqRetry.js +59 -38
- package/dist/application/eventsManager.d.ts +1 -1
- package/dist/application/eventsManager.js +30 -26
- package/dist/application/lockManager.js +1 -1
- package/dist/application/operations/jobManagement.d.ts +4 -0
- package/dist/application/operations/jobMoveOperations.js +9 -4
- package/dist/application/postgres-queue-manager/batchSnapshot.d.ts +16 -0
- package/dist/application/postgres-queue-manager/batchSnapshot.js +17 -0
- package/dist/application/postgres-queue-manager/cloud.d.ts +30 -0
- package/dist/application/postgres-queue-manager/cloud.js +55 -0
- package/dist/application/postgres-queue-manager/config.d.ts +5 -0
- package/dist/application/postgres-queue-manager/config.js +1 -0
- package/dist/application/postgres-queue-manager/control.d.ts +26 -0
- package/dist/application/postgres-queue-manager/control.js +186 -0
- package/dist/application/postgres-queue-manager/deferredWrites.d.ts +13 -0
- package/dist/application/postgres-queue-manager/deferredWrites.js +60 -0
- package/dist/application/postgres-queue-manager/delivery.d.ts +19 -0
- package/dist/application/postgres-queue-manager/delivery.js +80 -0
- package/dist/application/postgres-queue-manager/lease.d.ts +13 -0
- package/dist/application/postgres-queue-manager/lease.js +88 -0
- package/dist/application/postgres-queue-manager/lifetimeMetrics.d.ts +32 -0
- package/dist/application/postgres-queue-manager/lifetimeMetrics.js +53 -0
- package/dist/application/postgres-queue-manager/maintenance.d.ts +14 -0
- package/dist/application/postgres-queue-manager/maintenance.js +100 -0
- package/dist/application/postgres-queue-manager/operationGate.d.ts +26 -0
- package/dist/application/postgres-queue-manager/operationGate.js +96 -0
- package/dist/application/postgres-queue-manager/operations.d.ts +25 -0
- package/dist/application/postgres-queue-manager/operations.js +194 -0
- package/dist/application/postgres-queue-manager/projectionRefreshes.d.ts +43 -0
- package/dist/application/postgres-queue-manager/projectionRefreshes.js +170 -0
- package/dist/application/postgres-queue-manager/queries.d.ts +142 -0
- package/dist/application/postgres-queue-manager/queries.js +231 -0
- package/dist/application/postgres-queue-manager/relationships.d.ts +10 -0
- package/dist/application/postgres-queue-manager/relationships.js +45 -0
- package/dist/application/postgres-queue-manager/services.d.ts +31 -0
- package/dist/application/postgres-queue-manager/services.js +149 -0
- package/dist/application/postgres-queue-manager/snapshot.d.ts +51 -0
- package/dist/application/postgres-queue-manager/snapshot.js +236 -0
- package/dist/application/postgres-queue-manager/snapshotViews.d.ts +15 -0
- package/dist/application/postgres-queue-manager/snapshotViews.js +100 -0
- package/dist/application/postgres-queue-manager/startupEventBuffer.d.ts +12 -0
- package/dist/application/postgres-queue-manager/startupEventBuffer.js +36 -0
- package/dist/application/postgres-queue-manager/state.d.ts +47 -0
- package/dist/application/postgres-queue-manager/state.js +273 -0
- package/dist/application/postgres-queue-manager/terminalDelivery.d.ts +20 -0
- package/dist/application/postgres-queue-manager/terminalDelivery.js +100 -0
- package/dist/application/postgresQueueManager.d.ts +2 -0
- package/dist/application/postgresQueueManager.js +1 -0
- package/dist/application/queue-manager/ack.js +1 -1
- package/dist/application/queue-manager/delivery.js +1 -1
- package/dist/application/queue-manager/flow-failures.js +4 -0
- package/dist/application/queue-manager/limits.d.ts +2 -0
- package/dist/application/queue-manager/limits.js +4 -0
- package/dist/application/queue-manager/observability.js +15 -3
- package/dist/application/queue-manager/queries.d.ts +7 -0
- package/dist/application/queue-manager/queries.js +9 -0
- package/dist/application/queue-manager/services.d.ts +1 -1
- package/dist/application/queue-manager/services.js +4 -2
- package/dist/application/queue-manager/state.js +16 -1
- package/dist/application/statsManager.d.ts +1 -1
- package/dist/application/statsManager.js +1 -1
- package/dist/cli/commands/server.js +1 -1
- package/dist/client/events.js +2 -2
- package/dist/client/flow.js +0 -1
- package/dist/client/forwarder.d.ts +6 -4
- package/dist/client/forwarder.js +5 -3
- package/dist/client/queue/dlq.d.ts +2 -0
- package/dist/client/queue/dlq.js +14 -0
- package/dist/client/queue/dlqOps.d.ts +2 -0
- package/dist/client/queue/dlqOps.js +4 -0
- package/dist/client/queue/helpers.js +2 -0
- package/dist/client/queue/operations/add/single.js +1 -1
- package/dist/client/queue/runtime/configuration.d.ts +4 -0
- package/dist/client/queue/runtime/configuration.js +8 -0
- package/dist/client/sandboxed/runtime/state.js +2 -2
- package/dist/client/tcp/connection.d.ts +1 -1
- package/dist/client/tcp/connection.js +1 -1
- package/dist/client/tcp/runtime/state.js +2 -2
- package/dist/client/types/metrics.d.ts +1 -1
- package/dist/client/worker/runtime/control.js +0 -1
- package/dist/client/worker/runtime/execution.js +3 -8
- package/dist/client/worker/runtime/lifecycle.js +0 -1
- package/dist/client/worker/runtime/polling.d.ts +1 -0
- package/dist/client/worker/runtime/polling.js +9 -0
- package/dist/client/worker/runtime/state.js +3 -3
- package/dist/client/workflow/compensationChild.d.ts +2 -0
- package/dist/client/workflow/compensationChild.js +3 -1
- package/dist/client/workflow/compensationPass.d.ts +1 -0
- package/dist/client/workflow/compensationPass.js +18 -2
- package/dist/client/workflow/compensator.d.ts +2 -1
- package/dist/client/workflow/compensator.js +11 -3
- package/dist/client/workflow/engine.js +1 -1
- package/dist/client/workflow/executionFence.d.ts +15 -0
- package/dist/client/workflow/executionFence.js +29 -0
- package/dist/client/workflow/executor.d.ts +5 -11
- package/dist/client/workflow/executor.js +48 -47
- package/dist/client/workflow/executorLifecycle.d.ts +1 -0
- package/dist/client/workflow/executorLifecycle.js +41 -10
- package/dist/client/workflow/executorNodes.d.ts +1 -0
- package/dist/client/workflow/executorNodes.js +45 -16
- package/dist/client/workflow/executorQueue.d.ts +9 -0
- package/dist/client/workflow/executorQueue.js +15 -0
- package/dist/client/workflow/forEachRunner.d.ts +4 -0
- package/dist/client/workflow/forEachRunner.js +70 -0
- package/dist/client/workflow/loops.d.ts +4 -5
- package/dist/client/workflow/loops.js +27 -93
- package/dist/client/workflow/mapRunner.d.ts +1 -1
- package/dist/client/workflow/mapRunner.js +11 -2
- package/dist/client/workflow/recovery.d.ts +1 -0
- package/dist/client/workflow/recovery.js +24 -18
- package/dist/client/workflow/rollbackControl.d.ts +1 -0
- package/dist/client/workflow/rollbackControl.js +5 -2
- package/dist/client/workflow/runner.d.ts +3 -1
- package/dist/client/workflow/runner.js +26 -3
- package/dist/client/workflow/stepTypes.js +1 -1
- package/dist/client/workflow/subWorkflowRunner.d.ts +1 -0
- package/dist/client/workflow/subWorkflowRunner.js +7 -0
- package/dist/client/workflow/waitFor.d.ts +4 -0
- package/dist/client/workflow/waitFor.js +23 -11
- package/dist/client/workflow/workflowDecisions.d.ts +1 -1
- package/dist/client/workflow/workflowDecisions.js +3 -1
- package/dist/config/resolve.d.ts +14 -0
- package/dist/config/resolve.js +50 -5
- package/dist/config/types.d.ts +18 -0
- package/dist/domain/queue/dlqShard.d.ts +2 -0
- package/dist/domain/queue/dlqShard.js +16 -0
- package/dist/domain/queue/shard/dlq.d.ts +1 -0
- package/dist/domain/queue/shard/dlq.js +3 -0
- package/dist/domain/types/commands/dlq.d.ts +5 -0
- package/dist/domain/types/commands/union.d.ts +1 -1
- package/dist/domain/types/cron.d.ts +5 -0
- package/dist/domain/types/cron.js +14 -3
- package/dist/domain/types/dlq.d.ts +1 -1
- package/dist/domain/types/dlq.js +1 -2
- package/dist/domain/types/jobs/model.d.ts +1 -1
- package/dist/infrastructure/cloud/commandHandler.js +5 -3
- package/dist/infrastructure/cloud/commands/integrations.js +11 -11
- package/dist/infrastructure/cloud/commands/jobs.js +48 -40
- package/dist/infrastructure/cloud/commands/queues.js +61 -75
- package/dist/infrastructure/cloud/queueAdapter/local.d.ts +41 -0
- package/dist/infrastructure/cloud/queueAdapter/local.js +187 -0
- package/dist/infrastructure/cloud/queueAdapter/postgres.d.ts +42 -0
- package/dist/infrastructure/cloud/queueAdapter/postgres.js +188 -0
- package/dist/infrastructure/cloud/queueAdapter/registry.d.ts +4 -0
- package/dist/infrastructure/cloud/queueAdapter/registry.js +15 -0
- package/dist/infrastructure/cloud/queueAdapter/types.d.ts +87 -0
- package/dist/infrastructure/cloud/queueAdapter/types.js +1 -0
- package/dist/infrastructure/cloud/snapshot/analytics.d.ts +2 -0
- package/dist/infrastructure/cloud/snapshot/analytics.js +7 -0
- package/dist/infrastructure/cloud/snapshot/collector.d.ts +4 -0
- package/dist/infrastructure/cloud/snapshot/collector.js +39 -1
- package/dist/infrastructure/cloud/snapshot/config.d.ts +3 -0
- package/dist/infrastructure/cloud/snapshot/config.js +43 -0
- package/dist/infrastructure/cloud/snapshot/jobs.d.ts +3 -0
- package/dist/infrastructure/cloud/snapshot/jobs.js +32 -1
- package/dist/infrastructure/cloud/snapshotCollector.js +20 -35
- package/dist/infrastructure/cloud/snapshotHelpers.d.ts +3 -3
- package/dist/infrastructure/cloud/snapshotHelpers.js +3 -3
- package/dist/infrastructure/cloud/statsRefresh.js +2 -1
- package/dist/infrastructure/cloud/types/command.d.ts +2 -2
- package/dist/infrastructure/persistence/postgres/admission.d.ts +18 -0
- package/dist/infrastructure/persistence/postgres/admission.js +193 -0
- package/dist/infrastructure/persistence/postgres/admissionParent.d.ts +5 -0
- package/dist/infrastructure/persistence/postgres/admissionParent.js +35 -0
- package/dist/infrastructure/persistence/postgres/admissionResult.d.ts +9 -0
- package/dist/infrastructure/persistence/postgres/admissionResult.js +1 -0
- package/dist/infrastructure/persistence/postgres/admissionStore.d.ts +12 -0
- package/dist/infrastructure/persistence/postgres/admissionStore.js +101 -0
- package/dist/infrastructure/persistence/postgres/advisoryLocks.d.ts +2 -0
- package/dist/infrastructure/persistence/postgres/advisoryLocks.js +13 -0
- package/dist/infrastructure/persistence/postgres/batchAdmission.d.ts +11 -0
- package/dist/infrastructure/persistence/postgres/batchAdmission.js +110 -0
- package/dist/infrastructure/persistence/postgres/batchCompletion.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/batchCompletion.js +174 -0
- package/dist/infrastructure/persistence/postgres/batchEvents.d.ts +14 -0
- package/dist/infrastructure/persistence/postgres/batchEvents.js +72 -0
- package/dist/infrastructure/persistence/postgres/brokerSessions.d.ts +14 -0
- package/dist/infrastructure/persistence/postgres/brokerSessions.js +94 -0
- package/dist/infrastructure/persistence/postgres/claimBatch.d.ts +11 -0
- package/dist/infrastructure/persistence/postgres/claimBatch.js +56 -0
- package/dist/infrastructure/persistence/postgres/claimSelection.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/claimSelection.js +198 -0
- package/dist/infrastructure/persistence/postgres/claims.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/claims.js +137 -0
- package/dist/infrastructure/persistence/postgres/cloudReadModel.d.ts +26 -0
- package/dist/infrastructure/persistence/postgres/cloudReadModel.js +123 -0
- package/dist/infrastructure/persistence/postgres/codec.d.ts +30 -0
- package/dist/infrastructure/persistence/postgres/codec.js +82 -0
- package/dist/infrastructure/persistence/postgres/completionEvents.d.ts +11 -0
- package/dist/infrastructure/persistence/postgres/completionEvents.js +21 -0
- package/dist/infrastructure/persistence/postgres/completionLifecycle.d.ts +11 -0
- package/dist/infrastructure/persistence/postgres/completionLifecycle.js +145 -0
- package/dist/infrastructure/persistence/postgres/completionOutcome.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/completionOutcome.js +112 -0
- package/dist/infrastructure/persistence/postgres/completionQueries.d.ts +10 -0
- package/dist/infrastructure/persistence/postgres/completionQueries.js +87 -0
- package/dist/infrastructure/persistence/postgres/connection.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/connection.js +15 -0
- package/dist/infrastructure/persistence/postgres/context.d.ts +28 -0
- package/dist/infrastructure/persistence/postgres/context.js +74 -0
- package/dist/infrastructure/persistence/postgres/control.d.ts +23 -0
- package/dist/infrastructure/persistence/postgres/control.js +105 -0
- package/dist/infrastructure/persistence/postgres/crons.d.ts +18 -0
- package/dist/infrastructure/persistence/postgres/crons.js +205 -0
- package/dist/infrastructure/persistence/postgres/deduplication.d.ts +9 -0
- package/dist/infrastructure/persistence/postgres/deduplication.js +47 -0
- package/dist/infrastructure/persistence/postgres/dependencyDestruction.d.ts +14 -0
- package/dist/infrastructure/persistence/postgres/dependencyDestruction.js +74 -0
- package/dist/infrastructure/persistence/postgres/dependencyPromotion.d.ts +29 -0
- package/dist/infrastructure/persistence/postgres/dependencyPromotion.js +212 -0
- package/dist/infrastructure/persistence/postgres/destructiveMutations.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/destructiveMutations.js +111 -0
- package/dist/infrastructure/persistence/postgres/dlqLifecycle.d.ts +13 -0
- package/dist/infrastructure/persistence/postgres/dlqLifecycle.js +184 -0
- package/dist/infrastructure/persistence/postgres/dlqMaintenance.d.ts +6 -0
- package/dist/infrastructure/persistence/postgres/dlqMaintenance.js +36 -0
- package/dist/infrastructure/persistence/postgres/dlqRetryPlan.d.ts +21 -0
- package/dist/infrastructure/persistence/postgres/dlqRetryPlan.js +92 -0
- package/dist/infrastructure/persistence/postgres/eventCommitGc.d.ts +27 -0
- package/dist/infrastructure/persistence/postgres/eventCommitGc.js +62 -0
- package/dist/infrastructure/persistence/postgres/eventJournal.d.ts +18 -0
- package/dist/infrastructure/persistence/postgres/eventJournal.js +76 -0
- package/dist/infrastructure/persistence/postgres/eventJournalSchema.d.ts +5 -0
- package/dist/infrastructure/persistence/postgres/eventJournalSchema.js +253 -0
- package/dist/infrastructure/persistence/postgres/eventPruneWatermarks.d.ts +24 -0
- package/dist/infrastructure/persistence/postgres/eventPruneWatermarks.js +111 -0
- package/dist/infrastructure/persistence/postgres/eventRetention.d.ts +18 -0
- package/dist/infrastructure/persistence/postgres/eventRetention.js +76 -0
- package/dist/infrastructure/persistence/postgres/events.d.ts +45 -0
- package/dist/infrastructure/persistence/postgres/events.js +249 -0
- package/dist/infrastructure/persistence/postgres/expiry.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/expiry.js +74 -0
- package/dist/infrastructure/persistence/postgres/flowFailures.d.ts +17 -0
- package/dist/infrastructure/persistence/postgres/flowFailures.js +199 -0
- package/dist/infrastructure/persistence/postgres/jobData.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/jobData.js +32 -0
- package/dist/infrastructure/persistence/postgres/leaseRelease.d.ts +9 -0
- package/dist/infrastructure/persistence/postgres/leaseRelease.js +120 -0
- package/dist/infrastructure/persistence/postgres/leaseRenewal.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/leaseRenewal.js +35 -0
- package/dist/infrastructure/persistence/postgres/lifetimeMetrics.d.ts +15 -0
- package/dist/infrastructure/persistence/postgres/lifetimeMetrics.js +46 -0
- package/dist/infrastructure/persistence/postgres/lifetimeMetricsFinalizer.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/lifetimeMetricsFinalizer.js +13 -0
- package/dist/infrastructure/persistence/postgres/logs.d.ts +6 -0
- package/dist/infrastructure/persistence/postgres/logs.js +70 -0
- package/dist/infrastructure/persistence/postgres/maintenance.d.ts +6 -0
- package/dist/infrastructure/persistence/postgres/maintenance.js +138 -0
- package/dist/infrastructure/persistence/postgres/maintenanceFlights.d.ts +14 -0
- package/dist/infrastructure/persistence/postgres/maintenanceFlights.js +66 -0
- package/dist/infrastructure/persistence/postgres/metricWrites.d.ts +9 -0
- package/dist/infrastructure/persistence/postgres/metricWrites.js +94 -0
- package/dist/infrastructure/persistence/postgres/mutations.d.ts +9 -0
- package/dist/infrastructure/persistence/postgres/mutations.js +171 -0
- package/dist/infrastructure/persistence/postgres/outcomes.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/outcomes.js +194 -0
- package/dist/infrastructure/persistence/postgres/policies.d.ts +11 -0
- package/dist/infrastructure/persistence/postgres/policies.js +18 -0
- package/dist/infrastructure/persistence/postgres/postCommitMaintenance.d.ts +17 -0
- package/dist/infrastructure/persistence/postgres/postCommitMaintenance.js +117 -0
- package/dist/infrastructure/persistence/postgres/promotion.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/promotion.js +43 -0
- package/dist/infrastructure/persistence/postgres/queries.d.ts +22 -0
- package/dist/infrastructure/persistence/postgres/queries.js +152 -0
- package/dist/infrastructure/persistence/postgres/queueDestruction.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/queueDestruction.js +154 -0
- package/dist/infrastructure/persistence/postgres/queueLifecycle.d.ts +10 -0
- package/dist/infrastructure/persistence/postgres/queueLifecycle.js +60 -0
- package/dist/infrastructure/persistence/postgres/rateLimit.d.ts +6 -0
- package/dist/infrastructure/persistence/postgres/rateLimit.js +10 -0
- package/dist/infrastructure/persistence/postgres/readModels.d.ts +32 -0
- package/dist/infrastructure/persistence/postgres/readModels.js +72 -0
- package/dist/infrastructure/persistence/postgres/recovery.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/recovery.js +178 -0
- package/dist/infrastructure/persistence/postgres/relationships.d.ts +9 -0
- package/dist/infrastructure/persistence/postgres/relationships.js +201 -0
- package/dist/infrastructure/persistence/postgres/removeUnprocessedChildren.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/removeUnprocessedChildren.js +241 -0
- package/dist/infrastructure/persistence/postgres/repeatMutations.d.ts +5 -0
- package/dist/infrastructure/persistence/postgres/repeatMutations.js +37 -0
- package/dist/infrastructure/persistence/postgres/runtime.d.ts +46 -0
- package/dist/infrastructure/persistence/postgres/runtime.js +236 -0
- package/dist/infrastructure/persistence/postgres/runtimeConfig.d.ts +21 -0
- package/dist/infrastructure/persistence/postgres/runtimeConfig.js +39 -0
- package/dist/infrastructure/persistence/postgres/schema.d.ts +4 -0
- package/dist/infrastructure/persistence/postgres/schema.js +257 -0
- package/dist/infrastructure/persistence/postgres/schemaInitialization.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/schemaInitialization.js +221 -0
- package/dist/infrastructure/persistence/postgres/serialAdmission.d.ts +6 -0
- package/dist/infrastructure/persistence/postgres/serialAdmission.js +96 -0
- package/dist/infrastructure/persistence/postgres/snapshotBudget.d.ts +3 -0
- package/dist/infrastructure/persistence/postgres/snapshotBudget.js +83 -0
- package/dist/infrastructure/persistence/postgres/storageHealth.d.ts +10 -0
- package/dist/infrastructure/persistence/postgres/storageHealth.js +29 -0
- package/dist/infrastructure/persistence/postgres/store.d.ts +90 -0
- package/dist/infrastructure/persistence/postgres/store.js +136 -0
- package/dist/infrastructure/persistence/postgres/telemetry.d.ts +6 -0
- package/dist/infrastructure/persistence/postgres/telemetry.js +88 -0
- package/dist/infrastructure/persistence/postgres/terminal.d.ts +8 -0
- package/dist/infrastructure/persistence/postgres/terminal.js +137 -0
- package/dist/infrastructure/persistence/postgres/transactionRetry.d.ts +6 -0
- package/dist/infrastructure/persistence/postgres/transactionRetry.js +42 -0
- package/dist/infrastructure/persistence/postgres/types.d.ts +175 -0
- package/dist/infrastructure/persistence/postgres/types.js +1 -0
- package/dist/infrastructure/persistence/postgres/workers.d.ts +15 -0
- package/dist/infrastructure/persistence/postgres/workers.js +126 -0
- package/dist/infrastructure/persistence/postgres.d.ts +2 -0
- package/dist/infrastructure/persistence/postgres.js +1 -0
- package/dist/infrastructure/persistence/sqlite/jobs.js +2 -0
- package/dist/infrastructure/persistence/sqlite.d.ts +1 -1
- package/dist/infrastructure/scheduler/cron/persisted.d.ts +5 -0
- package/dist/infrastructure/scheduler/cron/persisted.js +27 -0
- package/dist/infrastructure/scheduler/cron/runtime.js +5 -10
- package/dist/infrastructure/scheduler/cron/validation.d.ts +3 -0
- package/dist/infrastructure/scheduler/cron/validation.js +11 -0
- package/dist/infrastructure/scheduler/cronParser.d.ts +1 -1
- package/dist/infrastructure/scheduler/cronParser.js +144 -11
- package/dist/infrastructure/server/bootstrap.d.ts +2 -3
- package/dist/infrastructure/server/bootstrap.js +33 -59
- package/dist/infrastructure/server/errors.d.ts +4 -0
- package/dist/infrastructure/server/errors.js +54 -0
- package/dist/infrastructure/server/handler-routes/control.d.ts +5 -5
- package/dist/infrastructure/server/handler-routes/control.js +3 -1
- package/dist/infrastructure/server/handler-routes/jobs.js +0 -3
- package/dist/infrastructure/server/handler-routes/monitoring.d.ts +2 -2
- package/dist/infrastructure/server/handler.js +9 -11
- package/dist/infrastructure/server/handlerRoutes.d.ts +2 -2
- package/dist/infrastructure/server/handlerRoutes.js +2 -2
- package/dist/infrastructure/server/handlers/advanced/dependencies.js +7 -6
- package/dist/infrastructure/server/handlers/advanced/jobs.js +19 -6
- package/dist/infrastructure/server/handlers/advanced/queue.d.ts +9 -9
- package/dist/infrastructure/server/handlers/advanced/queue.js +91 -27
- package/dist/infrastructure/server/handlers/core.js +32 -31
- package/dist/infrastructure/server/handlers/cron.d.ts +4 -4
- package/dist/infrastructure/server/handlers/cron.js +60 -59
- package/dist/infrastructure/server/handlers/dashboard.d.ts +1 -1
- package/dist/infrastructure/server/handlers/dashboard.js +21 -8
- package/dist/infrastructure/server/handlers/dlq.d.ts +6 -3
- package/dist/infrastructure/server/handlers/dlq.js +35 -9
- package/dist/infrastructure/server/handlers/flow.js +2 -1
- package/dist/infrastructure/server/handlers/management.d.ts +5 -5
- package/dist/infrastructure/server/handlers/management.js +36 -9
- package/dist/infrastructure/server/handlers/monitoring/health.d.ts +5 -5
- package/dist/infrastructure/server/handlers/monitoring/health.js +45 -16
- package/dist/infrastructure/server/handlers/monitoring/operations.d.ts +1 -1
- package/dist/infrastructure/server/handlers/monitoring/operations.js +8 -1
- package/dist/infrastructure/server/handlers/monitoring/workers.d.ts +3 -3
- package/dist/infrastructure/server/handlers/monitoring/workers.js +31 -7
- package/dist/infrastructure/server/handlers/pushBatchValidation.d.ts +3 -1
- package/dist/infrastructure/server/handlers/pushBatchValidation.js +52 -7
- package/dist/infrastructure/server/handlers/query.d.ts +1 -1
- package/dist/infrastructure/server/handlers/query.js +5 -4
- package/dist/infrastructure/server/http.js +2 -2
- package/dist/infrastructure/server/httpDashboardEndpoints.d.ts +1 -1
- package/dist/infrastructure/server/httpDashboardEndpoints.js +19 -6
- package/dist/infrastructure/server/httpEndpoints.js +20 -7
- package/dist/infrastructure/server/httpRouteQueues.js +11 -1
- package/dist/infrastructure/server/shutdownCoordinator.d.ts +24 -0
- package/dist/infrastructure/server/shutdownCoordinator.js +106 -0
- package/dist/infrastructure/server/sseHandler.js +8 -3
- package/dist/infrastructure/server/storageAdapter.d.ts +29 -0
- package/dist/infrastructure/server/storageAdapter.js +61 -0
- package/dist/infrastructure/server/storageManager.d.ts +12 -0
- package/dist/infrastructure/server/storageManager.js +102 -0
- package/dist/infrastructure/server/tcp.js +2 -3
- package/dist/infrastructure/server/ws/snapshots.d.ts +1 -1
- package/dist/infrastructure/server/ws/snapshots.js +19 -4
- package/dist/infrastructure/server/wsHandler.js +10 -5
- package/dist/main.js +1 -1
- package/dist/mcp/backend/embedded/services.js +2 -1
- package/dist/mcp/index.d.ts +2 -2
- package/dist/mcp/index.js +2 -2
- package/dist/shared/storageHealth.d.ts +9 -0
- package/dist/shared/storageHealth.js +12 -0
- package/package.json +85 -74
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { PostgresQueueManager } from '../../application/postgresQueueManager';
|
|
2
|
+
import { QueueManager } from '../../application/queueManager';
|
|
3
|
+
import { ServerStorageManager, StorageAdapterRegistry, } from './storageAdapter';
|
|
4
|
+
function localAdapter(driver) {
|
|
5
|
+
return {
|
|
6
|
+
driver,
|
|
7
|
+
startupError: (config) => driver === 'sqlite' && !config.dataPath
|
|
8
|
+
? 'SQLite storage requires storage.dataPath or BUNQUEUE_DATA_PATH.'
|
|
9
|
+
: null,
|
|
10
|
+
create: (config) => Promise.resolve(new QueueManager({
|
|
11
|
+
...(driver === 'sqlite' && { dataPath: config.dataPath }),
|
|
12
|
+
maxPrometheusQueues: config.maxPrometheusQueues,
|
|
13
|
+
})),
|
|
14
|
+
shutdown: (manager) => {
|
|
15
|
+
manager.shutdown();
|
|
16
|
+
return Promise.resolve();
|
|
17
|
+
},
|
|
18
|
+
display: (config) => driver === 'sqlite' && config.dataPath
|
|
19
|
+
? `SQLite · ${config.dataPath}`
|
|
20
|
+
: 'in-memory · ephemeral',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const postgresAdapter = {
|
|
24
|
+
driver: 'postgres',
|
|
25
|
+
startupError(config) {
|
|
26
|
+
if (!config.postgresUrl) {
|
|
27
|
+
return 'PostgreSQL storage requires storage.url or BUNQUEUE_POSTGRES_URL.';
|
|
28
|
+
}
|
|
29
|
+
if (config.dataPath) {
|
|
30
|
+
return 'PostgreSQL storage cannot be combined with SQLite dataPath configuration.';
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
},
|
|
34
|
+
async create(config) {
|
|
35
|
+
if (!config.postgresUrl)
|
|
36
|
+
throw new Error('PostgreSQL storage URL is missing');
|
|
37
|
+
const manager = new PostgresQueueManager({
|
|
38
|
+
maxPrometheusQueues: config.maxPrometheusQueues,
|
|
39
|
+
postgres: {
|
|
40
|
+
url: config.postgresUrl,
|
|
41
|
+
namespace: config.postgresNamespace,
|
|
42
|
+
poolSize: config.postgresPoolSize,
|
|
43
|
+
leaseDurationMs: config.postgresLeaseDurationMs,
|
|
44
|
+
pollIntervalMs: config.postgresPollIntervalMs,
|
|
45
|
+
statementTimeoutMs: config.postgresStatementTimeoutMs,
|
|
46
|
+
lockTimeoutMs: config.postgresLockTimeoutMs,
|
|
47
|
+
idleTransactionTimeoutMs: config.postgresIdleTransactionTimeoutMs,
|
|
48
|
+
maxConcurrentOperations: config.postgresMaxConcurrentOperations,
|
|
49
|
+
maxQueuedOperations: config.postgresMaxQueuedOperations,
|
|
50
|
+
maxSnapshotJobs: config.postgresMaxSnapshotJobs,
|
|
51
|
+
maxSnapshotPayloadBytes: config.postgresMaxSnapshotPayloadBytes,
|
|
52
|
+
...(config.postgresBrokerId && { brokerId: config.postgresBrokerId }),
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
try {
|
|
56
|
+
await manager.waitUntilReady();
|
|
57
|
+
return manager;
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
await manager.shutdownPostgres().catch(() => undefined);
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
async shutdown(manager) {
|
|
65
|
+
if (!(manager instanceof PostgresQueueManager)) {
|
|
66
|
+
throw new Error('PostgreSQL adapter received an incompatible queue manager');
|
|
67
|
+
}
|
|
68
|
+
await manager.shutdownPostgres();
|
|
69
|
+
},
|
|
70
|
+
display: (config) => `PostgreSQL · namespace ${config.postgresNamespace}`,
|
|
71
|
+
};
|
|
72
|
+
export const serverStorageAdapters = new StorageAdapterRegistry([
|
|
73
|
+
localAdapter('memory'),
|
|
74
|
+
localAdapter('sqlite'),
|
|
75
|
+
postgresAdapter,
|
|
76
|
+
]);
|
|
77
|
+
export const serverStorageManager = new ServerStorageManager(serverStorageAdapters);
|
|
78
|
+
export function storageStartupError(config) {
|
|
79
|
+
return serverStorageManager.startupError(config);
|
|
80
|
+
}
|
|
81
|
+
export function backupStartupError(config) {
|
|
82
|
+
const driver = config.storageDriver ?? (config.dataPath ? 'sqlite' : 'memory');
|
|
83
|
+
if (config.s3BackupEnabled && (driver !== 'sqlite' || !config.dataPath)) {
|
|
84
|
+
return ('S3 backup requires persistent SQLite storage. Set BUNQUEUE_DATA_PATH ' +
|
|
85
|
+
'or storage.dataPath before enabling S3_BACKUP_ENABLED.');
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
export async function createServerQueueManager(config) {
|
|
90
|
+
return await serverStorageManager.create(config);
|
|
91
|
+
}
|
|
92
|
+
export async function shutdownServerQueueManager(manager) {
|
|
93
|
+
if (await serverStorageManager.shutdown(manager))
|
|
94
|
+
return;
|
|
95
|
+
if (manager instanceof PostgresQueueManager)
|
|
96
|
+
await manager.shutdownPostgres();
|
|
97
|
+
else
|
|
98
|
+
manager.shutdown();
|
|
99
|
+
}
|
|
100
|
+
export function storageDisplay(config) {
|
|
101
|
+
return serverStorageManager.display(config);
|
|
102
|
+
}
|
|
@@ -2,6 +2,7 @@ import { tcpLog } from '../../shared/logger';
|
|
|
2
2
|
import { decodeMessagePack } from '../../shared/msgpack';
|
|
3
3
|
import { withSemaphore } from '../../shared/semaphore';
|
|
4
4
|
import { handleCommand } from './handler';
|
|
5
|
+
import { sanitizeServerError } from './errors';
|
|
5
6
|
import { FrameSizeError } from './protocol';
|
|
6
7
|
import { getRateLimiter } from './rateLimiter';
|
|
7
8
|
import { TcpConnectionRegistry } from './tcp/connections';
|
|
@@ -69,9 +70,7 @@ export function createTcpServer(queueManager, config) {
|
|
|
69
70
|
registry.dropForWriteOverflow(socket);
|
|
70
71
|
}
|
|
71
72
|
catch (error) {
|
|
72
|
-
|
|
73
|
-
const message = raw.includes('SQLITE') || raw.includes('database') ? 'Internal server error' : raw;
|
|
74
|
-
writeQueue.write(socket, tcpErrorResponse(message, command.reqId));
|
|
73
|
+
writeQueue.write(socket, tcpErrorResponse(sanitizeServerError(error), command.reqId));
|
|
75
74
|
registry.dropForWriteOverflow(socket);
|
|
76
75
|
}
|
|
77
76
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { QueueManager } from '../../../application/queueManager';
|
|
2
|
-
export declare function buildStatsSnapshot(queueManager: QueueManager): Record<string, unknown
|
|
2
|
+
export declare function buildStatsSnapshot(queueManager: QueueManager): Record<string, unknown> | Promise<Record<string, unknown>>;
|
|
3
3
|
export declare function buildHealthSnapshot(queueManager: QueueManager, connectionCount: number, connectionType?: 'ws' | 'sse'): Record<string, unknown>;
|
|
4
4
|
export declare function buildStorageSnapshot(queueManager: QueueManager): Record<string, unknown>;
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { throughputTracker } from '../../../application/throughputTracker';
|
|
2
|
+
import { isStorageDegraded } from '../../../shared/storageHealth';
|
|
3
|
+
const WORKER_TIMEOUT_MS = parseInt(Bun.env.WORKER_TIMEOUT_MS ?? '30000', 10);
|
|
2
4
|
export function buildStatsSnapshot(queueManager) {
|
|
5
|
+
const manager = queueManager;
|
|
6
|
+
if (manager.listWorkersDurable || manager.listCronsDurable) {
|
|
7
|
+
return Promise.all([
|
|
8
|
+
manager.listWorkersDurable
|
|
9
|
+
? manager.listWorkersDurable()
|
|
10
|
+
: Promise.resolve(manager.workerManager.list()),
|
|
11
|
+
manager.listCronsDurable ? manager.listCronsDurable() : Promise.resolve(manager.listCrons()),
|
|
12
|
+
]).then(([workers, crons]) => statsSnapshot(manager, workers, crons.length));
|
|
13
|
+
}
|
|
14
|
+
return statsSnapshot(manager, manager.workerManager.list(), manager.listCrons().length);
|
|
15
|
+
}
|
|
16
|
+
function statsSnapshot(queueManager, workers, cronJobs) {
|
|
3
17
|
const stats = queueManager.getStats();
|
|
4
18
|
const rates = throughputTracker.getRates();
|
|
5
19
|
const perQueue = queueManager.getPerQueueStats();
|
|
6
|
-
const
|
|
20
|
+
const now = Date.now();
|
|
21
|
+
const activeWorkers = workers.filter((worker) => now - worker.lastSeen < WORKER_TIMEOUT_MS);
|
|
7
22
|
const queues = {};
|
|
8
23
|
for (const [name, value] of perQueue) {
|
|
9
24
|
queues[name] = {
|
|
@@ -27,15 +42,15 @@ export function buildStatsSnapshot(queueManager) {
|
|
|
27
42
|
pullPerSec: rates.pullPerSec,
|
|
28
43
|
uptime: stats.uptime,
|
|
29
44
|
queues,
|
|
30
|
-
workers: { total:
|
|
31
|
-
cronJobs
|
|
45
|
+
workers: { total: workers.length, active: activeWorkers.length },
|
|
46
|
+
cronJobs,
|
|
32
47
|
};
|
|
33
48
|
}
|
|
34
49
|
export function buildHealthSnapshot(queueManager, connectionCount, connectionType = 'ws') {
|
|
35
50
|
const memory = process.memoryUsage();
|
|
36
51
|
const storage = queueManager.getStorageStatus();
|
|
37
52
|
return {
|
|
38
|
-
ok: !storage
|
|
53
|
+
ok: !isStorageDegraded(storage),
|
|
39
54
|
uptime: Math.floor(process.uptime()),
|
|
40
55
|
memory: {
|
|
41
56
|
rss: Math.round(memory.rss / 1024 / 1024),
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Legacy: clients that never Subscribe get all events in old format
|
|
13
13
|
*/
|
|
14
14
|
import { handleCommand } from './handler';
|
|
15
|
+
import { sanitizeServerError } from './errors';
|
|
15
16
|
import { parseCommand, serializeResponse, errorResponse } from './protocol';
|
|
16
17
|
import { QueueCountsScheduler } from './queueCountsScheduler';
|
|
17
18
|
import { matchesWsSubscription, MAX_WS_CLIENTS, textDecoder, WS_BACKPRESSURE_BYTES, WS_EVENT_MAP, } from './ws/constants';
|
|
@@ -61,7 +62,7 @@ export class WsHandler {
|
|
|
61
62
|
});
|
|
62
63
|
this.statsInterval ??= setInterval(() => {
|
|
63
64
|
if (this.clients.size > 0)
|
|
64
|
-
this.broadcastStats(qm);
|
|
65
|
+
void this.broadcastStats(qm);
|
|
65
66
|
}, 5000);
|
|
66
67
|
this.healthInterval ??= setInterval(() => {
|
|
67
68
|
if (this.clients.size > 0)
|
|
@@ -90,8 +91,13 @@ export class WsHandler {
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
// ── Periodic broadcasts ──────────────────────────────────
|
|
93
|
-
broadcastStats(qm) {
|
|
94
|
-
|
|
94
|
+
async broadcastStats(qm) {
|
|
95
|
+
try {
|
|
96
|
+
this.emit('stats:snapshot', await buildStatsSnapshot(qm));
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
// A failed durable read must not be replaced by a stale local snapshot.
|
|
100
|
+
}
|
|
95
101
|
}
|
|
96
102
|
broadcastHealth(qm) {
|
|
97
103
|
this.emit('health:status', buildHealthSnapshot(qm, this.clients.size));
|
|
@@ -199,8 +205,7 @@ export class WsHandler {
|
|
|
199
205
|
ws.send(serializeResponse(response));
|
|
200
206
|
}
|
|
201
207
|
catch (err) {
|
|
202
|
-
|
|
203
|
-
ws.send(errorResponse(msg, cmd.reqId));
|
|
208
|
+
ws.send(errorResponse(sanitizeServerError(err), cmd.reqId));
|
|
204
209
|
}
|
|
205
210
|
}
|
|
206
211
|
getClients() {
|
package/dist/main.js
CHANGED
|
@@ -30,7 +30,7 @@ async function startServer() {
|
|
|
30
30
|
// Load config file (bunqueue.config.ts) if present, then merge with env vars
|
|
31
31
|
const fileConfig = await loadConfigFile();
|
|
32
32
|
const config = resolveServerConfig(fileConfig);
|
|
33
|
-
bootServer(fileConfig, config);
|
|
33
|
+
await bootServer(fileConfig, config);
|
|
34
34
|
}
|
|
35
35
|
// Logger env-var bootstrap only applies when this file is the entry point.
|
|
36
36
|
// Imported consumers (e.g. user config files using `defineConfig`) must not
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jobId as toJobId } from '../../../domain/types/job';
|
|
2
2
|
import { serializeMcpCron } from '../serializers';
|
|
3
3
|
import { EmbeddedQueueBackend } from './queues';
|
|
4
|
+
import { clientStorageStatus } from '../../../shared/storageHealth';
|
|
4
5
|
export class EmbeddedServiceBackend extends EmbeddedQueueBackend {
|
|
5
6
|
addCron(input) {
|
|
6
7
|
return Promise.resolve(serializeMcpCron(this.manager.addCron(input)));
|
|
@@ -93,7 +94,7 @@ export class EmbeddedServiceBackend extends EmbeddedQueueBackend {
|
|
|
93
94
|
return Promise.resolve(this.manager.getPrometheusMetrics());
|
|
94
95
|
}
|
|
95
96
|
getStorageStatus() {
|
|
96
|
-
const status = this.manager.getStorageStatus();
|
|
97
|
+
const status = clientStorageStatus(this.manager.getStorageStatus());
|
|
97
98
|
return Promise.resolve({ diskFull: status.diskFull, error: status.error });
|
|
98
99
|
}
|
|
99
100
|
clearJobLogs(id, keepLogs) {
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* Uses the official @modelcontextprotocol/sdk for protocol compliance.
|
|
7
7
|
*
|
|
8
8
|
* Supports two connection modes:
|
|
9
|
-
* - embedded (default):
|
|
10
|
-
* - tcp: Connect to a remote
|
|
9
|
+
* - embedded (default): In-memory or direct SQLite access via QueueManager
|
|
10
|
+
* - tcp: Connect to a remote memory/SQLite or PostgreSQL-backed server
|
|
11
11
|
*
|
|
12
12
|
* @example Embedded mode (Claude Desktop):
|
|
13
13
|
* ```json
|
package/dist/mcp/index.js
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* Uses the official @modelcontextprotocol/sdk for protocol compliance.
|
|
8
8
|
*
|
|
9
9
|
* Supports two connection modes:
|
|
10
|
-
* - embedded (default):
|
|
11
|
-
* - tcp: Connect to a remote
|
|
10
|
+
* - embedded (default): In-memory or direct SQLite access via QueueManager
|
|
11
|
+
* - tcp: Connect to a remote memory/SQLite or PostgreSQL-backed server
|
|
12
12
|
*
|
|
13
13
|
* @example Embedded mode (Claude Desktop):
|
|
14
14
|
* ```json
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface StorageHealthStatus {
|
|
2
|
+
readonly diskFull: boolean;
|
|
3
|
+
readonly error: string | null;
|
|
4
|
+
readonly since: number | null;
|
|
5
|
+
}
|
|
6
|
+
/** A storage error is degraded even when the underlying failure is not a full disk. */
|
|
7
|
+
export declare function isStorageDegraded(status: StorageHealthStatus): boolean;
|
|
8
|
+
/** Project internal health into a client-safe copy without mutating runtime diagnostics. */
|
|
9
|
+
export declare function clientStorageStatus(status: StorageHealthStatus): StorageHealthStatus;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** A storage error is degraded even when the underlying failure is not a full disk. */
|
|
2
|
+
export function isStorageDegraded(status) {
|
|
3
|
+
return status.diskFull || status.error !== null;
|
|
4
|
+
}
|
|
5
|
+
/** Project internal health into a client-safe copy without mutating runtime diagnostics. */
|
|
6
|
+
export function clientStorageStatus(status) {
|
|
7
|
+
return {
|
|
8
|
+
diskFull: status.diskFull,
|
|
9
|
+
error: status.error === null || status.diskFull ? status.error : 'Internal server error',
|
|
10
|
+
since: status.since,
|
|
11
|
+
};
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,74 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunqueue",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "High-performance job queue for Bun
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
"version": "2.9.0",
|
|
4
|
+
"description": "High-performance job queue for Bun and AI agents. Memory or one-file SQLite, optional PostgreSQL 15–18 multi-broker persistence, cron, retries, DLQ, and MCP.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"agentic",
|
|
7
|
+
"ai",
|
|
8
|
+
"ai-agent",
|
|
9
|
+
"ai-native",
|
|
10
|
+
"automation",
|
|
11
|
+
"background-jobs",
|
|
12
|
+
"bullmq-alternative",
|
|
13
|
+
"bun",
|
|
14
|
+
"compensation",
|
|
15
|
+
"cron",
|
|
16
|
+
"dead-letter-queue",
|
|
17
|
+
"delayed-jobs",
|
|
18
|
+
"dlq",
|
|
19
|
+
"human-in-the-loop",
|
|
20
|
+
"inngest-alternative",
|
|
21
|
+
"job-queue",
|
|
22
|
+
"mcp",
|
|
23
|
+
"message-queue",
|
|
24
|
+
"model-context-protocol",
|
|
25
|
+
"multi-broker",
|
|
26
|
+
"multi-step",
|
|
27
|
+
"orchestration",
|
|
28
|
+
"postgresql",
|
|
29
|
+
"priority-queue",
|
|
30
|
+
"prometheus",
|
|
31
|
+
"queue",
|
|
32
|
+
"redis-alternative",
|
|
33
|
+
"retries",
|
|
34
|
+
"saga",
|
|
35
|
+
"saga-pattern",
|
|
36
|
+
"scheduler",
|
|
37
|
+
"sqlite",
|
|
38
|
+
"step-functions",
|
|
39
|
+
"task-queue",
|
|
40
|
+
"temporal-alternative",
|
|
41
|
+
"typescript",
|
|
42
|
+
"webhooks",
|
|
43
|
+
"worker",
|
|
44
|
+
"workflow",
|
|
45
|
+
"workflow-engine"
|
|
46
|
+
],
|
|
47
|
+
"homepage": "https://bunqueue.dev",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/egeominotti/bunqueue/issues"
|
|
50
|
+
},
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"author": "egeominotti",
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "git+https://github.com/egeominotti/bunqueue.git"
|
|
56
|
+
},
|
|
8
57
|
"bin": {
|
|
9
58
|
"bunqueue": "./dist/cli/index.js",
|
|
10
59
|
"bunqueue-mcp": "./dist/mcp/index.js"
|
|
11
60
|
},
|
|
61
|
+
"files": [
|
|
62
|
+
"dist/**/*.js",
|
|
63
|
+
"dist/**/*.d.ts",
|
|
64
|
+
"!dist/bunqueue",
|
|
65
|
+
"!dist/benchmark",
|
|
66
|
+
"README.md",
|
|
67
|
+
"LICENSE"
|
|
68
|
+
],
|
|
69
|
+
"type": "module",
|
|
70
|
+
"main": "dist/main.js",
|
|
71
|
+
"types": "dist/main.d.ts",
|
|
12
72
|
"exports": {
|
|
13
73
|
".": {
|
|
14
74
|
"types": "./dist/main.d.ts",
|
|
@@ -42,14 +102,6 @@
|
|
|
42
102
|
},
|
|
43
103
|
"./package.json": "./package.json"
|
|
44
104
|
},
|
|
45
|
-
"files": [
|
|
46
|
-
"dist/**/*.js",
|
|
47
|
-
"dist/**/*.d.ts",
|
|
48
|
-
"!dist/bunqueue",
|
|
49
|
-
"!dist/benchmark",
|
|
50
|
-
"README.md",
|
|
51
|
-
"LICENSE"
|
|
52
|
-
],
|
|
53
105
|
"scripts": {
|
|
54
106
|
"prepare": "git config core.hooksPath .husky",
|
|
55
107
|
"dev": "bun run --watch src/main.ts",
|
|
@@ -58,47 +110,56 @@
|
|
|
58
110
|
"build:lib": "tsc -p tsconfig.build.json",
|
|
59
111
|
"docs:api": "bun run scripts/build-api-reference.ts",
|
|
60
112
|
"check:docs-data": "bun run scripts/check-docs-data.ts",
|
|
61
|
-
"test": "BUNQUEUE_EMBEDDED=1 bun test",
|
|
113
|
+
"test": "BUNQUEUE_EMBEDDED=1 bun test --parallel=4",
|
|
62
114
|
"test:core-e2e": "bun test test/core-e2e/core-public-api.e2e.test.ts",
|
|
63
115
|
"test:model": "BUNQUEUE_EMBEDDED=1 bun test test/model-based/queue-model.test.ts test/model-based/workflow-model.test.ts test/model-based/flow-producer-model.test.ts test/model-based/backup-model.test.ts test/model-based/monitoring-model.test.ts test/model-based/enterprise-telemetry-model.test.ts",
|
|
116
|
+
"test:postgres": "bun scripts/test-postgres.ts",
|
|
117
|
+
"test:postgres:smoke": "bun scripts/test-postgres.ts --profile=smoke",
|
|
118
|
+
"test:postgres:destruction": "bun scripts/test-postgres.ts --profile=destruction",
|
|
119
|
+
"test:postgres:pressure": "BUNQUEUE_POSTGRES_TEN_BROKER_SOAK=1 bun scripts/test-postgres.ts --profile=pressure",
|
|
120
|
+
"test:postgres:battle": "BUNQUEUE_POSTGRES_TEN_BROKER_SOAK=1 BUNQUEUE_POSTGRES_FC_RUNS=100 bun scripts/test-postgres.ts --profile=battle",
|
|
121
|
+
"test:postgres:fast-check": "bun scripts/test-postgres.ts test/postgres-fast-check-*.test.ts",
|
|
122
|
+
"test:postgres:ten-broker": "BUNQUEUE_POSTGRES_TEN_BROKER_SOAK=1 bun scripts/test-postgres.ts test/postgres-ten-processes.test.ts",
|
|
64
123
|
"test:sandbox": "bun run scripts/test-sandbox.ts",
|
|
65
124
|
"test:sandbox:sdk": "bun run scripts/test-sdk-sandbox.ts",
|
|
66
125
|
"bench": "bun run bench/comprehensive.ts",
|
|
67
126
|
"bench:tcp": "bun run bench/tcp-bench.ts",
|
|
68
127
|
"bench:autobatch": "bun run bench/local-autobatch.ts",
|
|
128
|
+
"bench:postgres:versions": "bun run bench/postgres-versions.ts",
|
|
69
129
|
"bench:pushbulk": "bun run bench/pushbulk-delta.ts",
|
|
70
130
|
"bench:workflow": "bun run bench/workflow-engine.ts",
|
|
71
131
|
"bench:workflow:scale": "bun run bench/workflow-engine/scale.ts",
|
|
72
132
|
"bench:joblist": "bun run bench/job-list-perf.ts",
|
|
73
133
|
"bench:compare": "bun run bench/comparison/run.ts",
|
|
74
|
-
"lint": "
|
|
75
|
-
"lint:fix": "
|
|
76
|
-
"format": "
|
|
77
|
-
"format:check": "
|
|
134
|
+
"lint": "oxlint src",
|
|
135
|
+
"lint:fix": "oxlint --fix src",
|
|
136
|
+
"format": "oxfmt --write src",
|
|
137
|
+
"format:check": "oxfmt --check src",
|
|
78
138
|
"typecheck": "tsc --noEmit",
|
|
79
|
-
"check:
|
|
80
|
-
"check": "bun run typecheck &&
|
|
139
|
+
"check:oxc": "bun run lint && bun run format:check",
|
|
140
|
+
"check": "bun run typecheck && bun run check:oxc && bun run check:docs-data",
|
|
81
141
|
"prepublishOnly": "bun run build:lib"
|
|
82
142
|
},
|
|
83
143
|
"dependencies": {
|
|
84
|
-
"croner": "10.0.1",
|
|
85
144
|
"msgpackr": "^1.11.8"
|
|
86
145
|
},
|
|
87
146
|
"devDependencies": {
|
|
88
147
|
"@ai-sdk/anthropic": "^4.0.22",
|
|
89
148
|
"@anthropic-ai/claude-agent-sdk": "^0.3.220",
|
|
90
|
-
"@biomejs/biome": "2.5.1",
|
|
91
149
|
"@langchain/core": "^1.2.3",
|
|
92
150
|
"@langchain/langgraph": "^1.4.8",
|
|
93
151
|
"@mastra/core": "^1.53.0",
|
|
94
152
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
95
153
|
"@openai/agents": "^0.13.5",
|
|
96
|
-
"@types/bun": "^1.
|
|
154
|
+
"@types/bun": "^1.4.0",
|
|
97
155
|
"ai": "^7.0.38",
|
|
98
156
|
"bullmq": "^5.79.3",
|
|
99
157
|
"elysia": "^1.4.25",
|
|
100
158
|
"fast-check": "^4.9.0",
|
|
101
159
|
"ioredis": "^5.11.1",
|
|
160
|
+
"oxfmt": "0.64.0",
|
|
161
|
+
"oxlint": "1.79.0",
|
|
162
|
+
"oxlint-tsgolint": "7.0.2001",
|
|
102
163
|
"typedoc": "^0.28.20",
|
|
103
164
|
"typescript": "^5.9.3",
|
|
104
165
|
"zod": "^4.3.6"
|
|
@@ -111,57 +172,7 @@
|
|
|
111
172
|
"optional": true
|
|
112
173
|
}
|
|
113
174
|
},
|
|
114
|
-
"keywords": [
|
|
115
|
-
"bun",
|
|
116
|
-
"job-queue",
|
|
117
|
-
"message-queue",
|
|
118
|
-
"task-queue",
|
|
119
|
-
"background-jobs",
|
|
120
|
-
"queue",
|
|
121
|
-
"worker",
|
|
122
|
-
"cron",
|
|
123
|
-
"scheduler",
|
|
124
|
-
"sqlite",
|
|
125
|
-
"redis-alternative",
|
|
126
|
-
"bullmq-alternative",
|
|
127
|
-
"priority-queue",
|
|
128
|
-
"delayed-jobs",
|
|
129
|
-
"retries",
|
|
130
|
-
"dead-letter-queue",
|
|
131
|
-
"dlq",
|
|
132
|
-
"webhooks",
|
|
133
|
-
"prometheus",
|
|
134
|
-
"typescript",
|
|
135
|
-
"ai",
|
|
136
|
-
"ai-agent",
|
|
137
|
-
"ai-native",
|
|
138
|
-
"mcp",
|
|
139
|
-
"model-context-protocol",
|
|
140
|
-
"agentic",
|
|
141
|
-
"automation",
|
|
142
|
-
"workflow",
|
|
143
|
-
"workflow-engine",
|
|
144
|
-
"orchestration",
|
|
145
|
-
"saga",
|
|
146
|
-
"saga-pattern",
|
|
147
|
-
"temporal-alternative",
|
|
148
|
-
"inngest-alternative",
|
|
149
|
-
"step-functions",
|
|
150
|
-
"multi-step",
|
|
151
|
-
"compensation",
|
|
152
|
-
"human-in-the-loop"
|
|
153
|
-
],
|
|
154
|
-
"author": "egeominotti",
|
|
155
|
-
"license": "MIT",
|
|
156
|
-
"repository": {
|
|
157
|
-
"type": "git",
|
|
158
|
-
"url": "git+https://github.com/egeominotti/bunqueue.git"
|
|
159
|
-
},
|
|
160
|
-
"bugs": {
|
|
161
|
-
"url": "https://github.com/egeominotti/bunqueue/issues"
|
|
162
|
-
},
|
|
163
|
-
"homepage": "https://bunqueue.dev",
|
|
164
175
|
"engines": {
|
|
165
|
-
"bun": ">=1.
|
|
176
|
+
"bun": ">=1.4.0"
|
|
166
177
|
}
|
|
167
178
|
}
|