@adonis-agora/durable 1.0.0-rc.2 → 1.0.0-rc.20
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/CHANGELOG.md +198 -0
- package/dist/assets/spa/assets/index-BgoNV3TR.css +1 -0
- package/dist/assets/spa/assets/index-DzXygyDm.js +57 -0
- package/dist/assets/spa/assets/index-DzXygyDm.js.map +1 -0
- package/dist/assets/spa/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/assets/spa/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/assets/spa/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/assets/spa/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/assets/spa/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- package/dist/assets/spa/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/dist/assets/spa/assets/sora-latin-400-normal-CRt88UEn.woff2 +0 -0
- package/dist/assets/spa/assets/sora-latin-400-normal-OW7qkl5a.woff +0 -0
- package/dist/assets/spa/assets/sora-latin-500-normal-01eiPEn0.woff2 +0 -0
- package/dist/assets/spa/assets/sora-latin-500-normal-w58xtEt9.woff +0 -0
- package/dist/assets/spa/assets/sora-latin-600-normal-1_7fyUAY.woff +0 -0
- package/dist/assets/spa/assets/sora-latin-600-normal-Cdg4DaK0.woff2 +0 -0
- package/dist/assets/spa/assets/sora-latin-700-normal-9waGdLWo.woff2 +0 -0
- package/dist/assets/spa/assets/sora-latin-700-normal-BKPfQAnC.woff +0 -0
- package/dist/assets/spa/index.html +2 -8
- package/dist/commands/agora_doctor.d.ts +23 -0
- package/dist/commands/agora_doctor.d.ts.map +1 -0
- package/dist/commands/agora_doctor.js +110 -0
- package/dist/commands/agora_doctor.js.map +1 -0
- package/dist/commands/durable_doctor.d.ts +8 -0
- package/dist/commands/durable_doctor.d.ts.map +1 -0
- package/dist/commands/durable_doctor.js +8 -0
- package/dist/commands/durable_doctor.js.map +1 -0
- package/dist/commands/durable_worker.d.ts +3 -3
- package/dist/commands/durable_worker.js +7 -7
- package/dist/commands/durable_worker.js.map +1 -1
- package/dist/commands/health.d.ts +12 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +34 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/lifecycle_republish.d.ts +8 -9
- package/dist/commands/lifecycle_republish.d.ts.map +1 -1
- package/dist/commands/lifecycle_republish.js +29 -16
- package/dist/commands/lifecycle_republish.js.map +1 -1
- package/dist/commands/main.d.ts +25 -5
- package/dist/commands/main.d.ts.map +1 -1
- package/dist/commands/main.js +54 -7
- package/dist/commands/main.js.map +1 -1
- package/dist/commands/runs.d.ts +9 -16
- package/dist/commands/runs.d.ts.map +1 -1
- package/dist/commands/runs.js +60 -47
- package/dist/commands/runs.js.map +1 -1
- package/dist/commands/runs_bulk.d.ts +17 -0
- package/dist/commands/runs_bulk.d.ts.map +1 -0
- package/dist/commands/runs_bulk.js +74 -0
- package/dist/commands/runs_bulk.js.map +1 -0
- package/dist/commands/runs_cancel.d.ts +15 -0
- package/dist/commands/runs_cancel.d.ts.map +1 -0
- package/dist/commands/runs_cancel.js +39 -0
- package/dist/commands/runs_cancel.js.map +1 -0
- package/dist/commands/runs_continue.d.ts +12 -0
- package/dist/commands/runs_continue.d.ts.map +1 -0
- package/dist/commands/runs_continue.js +28 -0
- package/dist/commands/runs_continue.js.map +1 -0
- package/dist/commands/runs_event.d.ts +13 -0
- package/dist/commands/runs_event.d.ts.map +1 -0
- package/dist/commands/runs_event.js +28 -0
- package/dist/commands/runs_event.js.map +1 -0
- package/dist/commands/runs_fan.d.ts +16 -0
- package/dist/commands/runs_fan.d.ts.map +1 -0
- package/dist/commands/runs_fan.js +58 -0
- package/dist/commands/runs_fan.js.map +1 -0
- package/dist/commands/runs_redispatch.d.ts +14 -0
- package/dist/commands/runs_redispatch.d.ts.map +1 -0
- package/dist/commands/runs_redispatch.js +35 -0
- package/dist/commands/runs_redispatch.js.map +1 -0
- package/dist/commands/runs_replay.d.ts +14 -0
- package/dist/commands/runs_replay.d.ts.map +1 -0
- package/dist/commands/runs_replay.js +38 -0
- package/dist/commands/runs_replay.js.map +1 -0
- package/dist/commands/runs_retry.d.ts +13 -0
- package/dist/commands/runs_retry.d.ts.map +1 -0
- package/dist/commands/runs_retry.js +29 -0
- package/dist/commands/runs_retry.js.map +1 -0
- package/dist/commands/runs_show.d.ts +14 -0
- package/dist/commands/runs_show.d.ts.map +1 -0
- package/dist/commands/runs_show.js +96 -0
- package/dist/commands/runs_show.js.map +1 -0
- package/dist/commands/runs_signal.d.ts +17 -0
- package/dist/commands/runs_signal.d.ts.map +1 -0
- package/dist/commands/runs_signal.js +49 -0
- package/dist/commands/runs_signal.js.map +1 -0
- package/dist/commands/runs_update.d.ts +15 -0
- package/dist/commands/runs_update.d.ts.map +1 -0
- package/dist/commands/runs_update.js +39 -0
- package/dist/commands/runs_update.js.map +1 -0
- package/dist/commands/runs_values.d.ts +15 -0
- package/dist/commands/runs_values.d.ts.map +1 -0
- package/dist/commands/runs_values.js +45 -0
- package/dist/commands/runs_values.js.map +1 -0
- package/dist/commands/schedules.d.ts +18 -0
- package/dist/commands/schedules.d.ts.map +1 -0
- package/dist/commands/schedules.js +70 -0
- package/dist/commands/schedules.js.map +1 -0
- package/dist/commands/schedules_pause.d.ts +16 -0
- package/dist/commands/schedules_pause.d.ts.map +1 -0
- package/dist/commands/schedules_pause.js +40 -0
- package/dist/commands/schedules_pause.js.map +1 -0
- package/dist/commands/schedules_resume.d.ts +8 -0
- package/dist/commands/schedules_resume.d.ts.map +1 -0
- package/dist/commands/schedules_resume.js +8 -0
- package/dist/commands/schedules_resume.js.map +1 -0
- package/dist/commands/schedules_trigger.d.ts +13 -0
- package/dist/commands/schedules_trigger.d.ts.map +1 -0
- package/dist/commands/schedules_trigger.js +32 -0
- package/dist/commands/schedules_trigger.js.map +1 -0
- package/dist/commands/tasks_complete.d.ts +15 -0
- package/dist/commands/tasks_complete.d.ts.map +1 -0
- package/dist/commands/tasks_complete.js +41 -0
- package/dist/commands/tasks_complete.js.map +1 -0
- package/dist/commands/tasks_fail.d.ts +16 -0
- package/dist/commands/tasks_fail.d.ts.map +1 -0
- package/dist/commands/tasks_fail.js +47 -0
- package/dist/commands/tasks_fail.js.map +1 -0
- package/dist/commands/workers.d.ts +11 -0
- package/dist/commands/workers.d.ts.map +1 -0
- package/dist/commands/workers.js +35 -0
- package/dist/commands/workers.js.map +1 -0
- package/dist/commands/workflows_lifecycle.d.ts +12 -0
- package/dist/commands/workflows_lifecycle.d.ts.map +1 -0
- package/dist/commands/workflows_lifecycle.js +37 -0
- package/dist/commands/workflows_lifecycle.js.map +1 -0
- package/dist/configure.d.ts +1 -1
- package/dist/configure.js +1 -1
- package/dist/providers/dashboard_provider.d.ts +57 -54
- package/dist/providers/dashboard_provider.d.ts.map +1 -1
- package/dist/providers/dashboard_provider.js +399 -288
- package/dist/providers/dashboard_provider.js.map +1 -1
- package/dist/providers/durable_provider.d.ts.map +1 -1
- package/dist/providers/durable_provider.js +67 -37
- package/dist/providers/durable_provider.js.map +1 -1
- package/dist/src/commands/console_command.d.ts +82 -0
- package/dist/src/commands/console_command.d.ts.map +1 -0
- package/dist/src/commands/console_command.js +238 -0
- package/dist/src/commands/console_command.js.map +1 -0
- package/dist/src/commands/runs.js +2 -2
- package/dist/src/commands/runs.js.map +1 -1
- package/dist/src/concurrency.d.ts.map +1 -1
- package/dist/src/concurrency.js +1 -0
- package/dist/src/concurrency.js.map +1 -1
- package/dist/src/config_types.d.ts +79 -26
- package/dist/src/config_types.d.ts.map +1 -1
- package/dist/src/dashboard/access_denied_page.d.ts +5 -7
- package/dist/src/dashboard/access_denied_page.d.ts.map +1 -1
- package/dist/src/dashboard/access_denied_page.js +2 -6
- package/dist/src/dashboard/access_denied_page.js.map +1 -1
- package/dist/src/dashboard/audit.d.ts +14 -0
- package/dist/src/dashboard/audit.d.ts.map +1 -0
- package/dist/src/dashboard/audit.js +36 -0
- package/dist/src/dashboard/audit.js.map +1 -0
- package/dist/src/dashboard/console_authorize.d.ts +98 -0
- package/dist/src/dashboard/console_authorize.d.ts.map +1 -0
- package/dist/src/dashboard/console_authorize.js +163 -0
- package/dist/src/dashboard/console_authorize.js.map +1 -0
- package/dist/src/dashboard/console_shell.d.ts +45 -0
- package/dist/src/dashboard/console_shell.d.ts.map +1 -0
- package/dist/src/dashboard/console_shell.js +125 -0
- package/dist/src/dashboard/console_shell.js.map +1 -0
- package/dist/src/dashboard/console_switcher.d.ts +132 -0
- package/dist/src/dashboard/console_switcher.d.ts.map +1 -0
- package/dist/src/dashboard/console_switcher.js +201 -0
- package/dist/src/dashboard/console_switcher.js.map +1 -0
- package/dist/src/dashboard/define_config.d.ts +68 -81
- package/dist/src/dashboard/define_config.d.ts.map +1 -1
- package/dist/src/dashboard/define_config.js +18 -112
- package/dist/src/dashboard/define_config.js.map +1 -1
- package/dist/src/dashboard/dev_tools.d.ts +102 -0
- package/dist/src/dashboard/dev_tools.d.ts.map +1 -0
- package/dist/src/dashboard/dev_tools.js +502 -0
- package/dist/src/dashboard/dev_tools.js.map +1 -0
- package/dist/src/dashboard/diagnostics-recorder.d.ts +1 -1
- package/dist/src/dashboard/diagnostics-recorder.js +1 -1
- package/dist/src/dashboard/gateway-adapter.d.ts +6 -6
- package/dist/src/dashboard/gateway-adapter.d.ts.map +1 -1
- package/dist/src/dashboard/gateway-adapter.js +5 -5
- package/dist/src/dashboard/gateway-adapter.js.map +1 -1
- package/dist/src/dashboard/handlers.d.ts +48 -39
- package/dist/src/dashboard/handlers.d.ts.map +1 -1
- package/dist/src/dashboard/handlers.js +181 -83
- package/dist/src/dashboard/handlers.js.map +1 -1
- package/dist/src/dashboard/index.d.ts +12 -9
- package/dist/src/dashboard/index.d.ts.map +1 -1
- package/dist/src/dashboard/index.js +10 -7
- package/dist/src/dashboard/index.js.map +1 -1
- package/dist/src/dashboard/list-filters.d.ts +27 -0
- package/dist/src/dashboard/list-filters.d.ts.map +1 -0
- package/dist/src/dashboard/list-filters.js +69 -0
- package/dist/src/dashboard/list-filters.js.map +1 -0
- package/dist/src/dashboard/openapi.d.ts.map +1 -1
- package/dist/src/dashboard/openapi.js +127 -52
- package/dist/src/dashboard/openapi.js.map +1 -1
- package/dist/src/dashboard/run-filter.d.ts +18 -15
- package/dist/src/dashboard/run-filter.d.ts.map +1 -1
- package/dist/src/dashboard/run-filter.js +30 -22
- package/dist/src/dashboard/run-filter.js.map +1 -1
- package/dist/src/dashboard/spa.d.ts +26 -1
- package/dist/src/dashboard/spa.d.ts.map +1 -1
- package/dist/src/dashboard/spa.js +9 -2
- package/dist/src/dashboard/spa.js.map +1 -1
- package/dist/src/dashboard/tenant_scope.d.ts +38 -0
- package/dist/src/dashboard/tenant_scope.d.ts.map +1 -0
- package/dist/src/dashboard/tenant_scope.js +166 -0
- package/dist/src/dashboard/tenant_scope.js.map +1 -0
- package/dist/src/define_config.d.ts +27 -12
- package/dist/src/define_config.d.ts.map +1 -1
- package/dist/src/define_config.js +9 -4
- package/dist/src/define_config.js.map +1 -1
- package/dist/src/diagnostics/index.d.ts +11 -0
- package/dist/src/diagnostics/index.d.ts.map +1 -0
- package/dist/src/diagnostics/index.js +6 -0
- package/dist/src/diagnostics/index.js.map +1 -0
- package/dist/src/diagnostics/transport.d.ts +71 -0
- package/dist/src/diagnostics/transport.d.ts.map +1 -0
- package/dist/src/diagnostics/transport.js +188 -0
- package/dist/src/diagnostics/transport.js.map +1 -0
- package/dist/src/diagnostics-bridge.d.ts +2 -1
- package/dist/src/diagnostics-bridge.d.ts.map +1 -1
- package/dist/src/diagnostics-bridge.js +7 -1
- package/dist/src/diagnostics-bridge.js.map +1 -1
- package/dist/src/doctor/agora_doctor.d.ts +116 -0
- package/dist/src/doctor/agora_doctor.d.ts.map +1 -0
- package/dist/src/doctor/agora_doctor.js +685 -0
- package/dist/src/doctor/agora_doctor.js.map +1 -0
- package/dist/src/doctor/checks.d.ts +28 -0
- package/dist/src/doctor/checks.d.ts.map +1 -0
- package/dist/src/doctor/checks.js +288 -0
- package/dist/src/doctor/checks.js.map +1 -0
- package/dist/src/doctor/index.d.ts +9 -0
- package/dist/src/doctor/index.d.ts.map +1 -0
- package/dist/src/doctor/index.js +16 -0
- package/dist/src/doctor/index.js.map +1 -0
- package/dist/src/engine.d.ts +55 -9
- package/dist/src/engine.d.ts.map +1 -1
- package/dist/src/engine.js +333 -84
- package/dist/src/engine.js.map +1 -1
- package/dist/src/errors.d.ts +9 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +13 -0
- package/dist/src/errors.js.map +1 -1
- package/dist/src/event-trigger-bridge.d.ts +5 -14
- package/dist/src/event-trigger-bridge.d.ts.map +1 -1
- package/dist/src/event-trigger-bridge.js +11 -99
- package/dist/src/event-trigger-bridge.js.map +1 -1
- package/dist/src/index.d.ts +8 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/interfaces.d.ts +53 -9
- package/dist/src/interfaces.d.ts.map +1 -1
- package/dist/src/interfaces.js +8 -0
- package/dist/src/interfaces.js.map +1 -1
- package/dist/src/origin.js +3 -3
- package/dist/src/role_bindings.d.ts +8 -8
- package/dist/src/role_bindings.js +8 -8
- package/dist/src/run-gateway/interface.d.ts +4 -3
- package/dist/src/run-gateway/interface.d.ts.map +1 -1
- package/dist/src/run-gateway/proxy-run-gateway.d.ts +4 -2
- package/dist/src/run-gateway/proxy-run-gateway.d.ts.map +1 -1
- package/dist/src/run-gateway/proxy-run-gateway.js +21 -6
- package/dist/src/run-gateway/proxy-run-gateway.js.map +1 -1
- package/dist/src/run-gateway/run-request-responder.d.ts +6 -1
- package/dist/src/run-gateway/run-request-responder.d.ts.map +1 -1
- package/dist/src/run-gateway/run-request-responder.js +30 -3
- package/dist/src/run-gateway/run-request-responder.js.map +1 -1
- package/dist/src/run-gateway/store-run-gateway.d.ts +4 -4
- package/dist/src/run-gateway/store-run-gateway.d.ts.map +1 -1
- package/dist/src/run-gateway/store-run-gateway.js +4 -4
- package/dist/src/run-gateway/store-run-gateway.js.map +1 -1
- package/dist/src/run-gateway/tenant-auth.d.ts +19 -1
- package/dist/src/run-gateway/tenant-auth.d.ts.map +1 -1
- package/dist/src/run-gateway/tenant-auth.js +133 -0
- package/dist/src/run-gateway/tenant-auth.js.map +1 -1
- package/dist/src/run-gateway/tenant-scoped-gateway.d.ts +10 -0
- package/dist/src/run-gateway/tenant-scoped-gateway.d.ts.map +1 -0
- package/dist/src/run-gateway/tenant-scoped-gateway.js +107 -0
- package/dist/src/run-gateway/tenant-scoped-gateway.js.map +1 -0
- package/dist/src/run-value-facets.d.ts +1 -1
- package/dist/src/run-value-facets.d.ts.map +1 -1
- package/dist/src/run-value-facets.js +5 -1
- package/dist/src/run-value-facets.js.map +1 -1
- package/dist/src/scheduler.d.ts.map +1 -1
- package/dist/src/scheduler.js +2 -1
- package/dist/src/scheduler.js.map +1 -1
- package/dist/src/schedules.d.ts +16 -1
- package/dist/src/schedules.d.ts.map +1 -1
- package/dist/src/schedules.js +29 -4
- package/dist/src/schedules.js.map +1 -1
- package/dist/src/services/main.d.ts +3 -3
- package/dist/src/services/main.js +6 -6
- package/dist/src/services/main.js.map +1 -1
- package/dist/src/singleton-admission.d.ts.map +1 -1
- package/dist/src/singleton-admission.js +2 -0
- package/dist/src/singleton-admission.js.map +1 -1
- package/dist/src/singleton-gate.d.ts +1 -1
- package/dist/src/singleton-gate.d.ts.map +1 -1
- package/dist/src/singleton-gate.js +4 -3
- package/dist/src/singleton-gate.js.map +1 -1
- package/dist/src/sql-schema.d.ts +54 -0
- package/dist/src/sql-schema.d.ts.map +1 -0
- package/dist/src/sql-schema.js +145 -0
- package/dist/src/sql-schema.js.map +1 -0
- package/dist/src/stores/factory.d.ts +6 -0
- package/dist/src/stores/factory.d.ts.map +1 -1
- package/dist/src/stores/factory.js +3 -0
- package/dist/src/stores/factory.js.map +1 -1
- package/dist/src/stores/lucid-mappers.d.ts +3 -0
- package/dist/src/stores/lucid-mappers.d.ts.map +1 -1
- package/dist/src/stores/lucid-mappers.js +12 -0
- package/dist/src/stores/lucid-mappers.js.map +1 -1
- package/dist/src/stores/lucid-pg-hot-path.d.ts +6 -2
- package/dist/src/stores/lucid-pg-hot-path.d.ts.map +1 -1
- package/dist/src/stores/lucid-pg-hot-path.js +7 -3
- package/dist/src/stores/lucid-pg-hot-path.js.map +1 -1
- package/dist/src/stores/lucid-schema.d.ts +18 -4
- package/dist/src/stores/lucid-schema.d.ts.map +1 -1
- package/dist/src/stores/lucid-schema.js +106 -61
- package/dist/src/stores/lucid-schema.js.map +1 -1
- package/dist/src/stores/lucid.d.ts +42 -2
- package/dist/src/stores/lucid.d.ts.map +1 -1
- package/dist/src/stores/lucid.js +450 -231
- package/dist/src/stores/lucid.js.map +1 -1
- package/dist/src/tenancy.d.ts +104 -0
- package/dist/src/tenancy.d.ts.map +1 -0
- package/dist/src/tenancy.js +91 -0
- package/dist/src/tenancy.js.map +1 -0
- package/dist/src/testing/in-memory-state-store.d.ts.map +1 -1
- package/dist/src/testing/in-memory-state-store.js +9 -3
- package/dist/src/testing/in-memory-state-store.js.map +1 -1
- package/dist/src/testing-kit/state-store-conformance.d.ts.map +1 -1
- package/dist/src/testing-kit/state-store-conformance.js +59 -0
- package/dist/src/testing-kit/state-store-conformance.js.map +1 -1
- package/dist/src/testing-kit/transport-conformance.d.ts.map +1 -1
- package/dist/src/testing-kit/transport-conformance.js +5 -1
- package/dist/src/testing-kit/transport-conformance.js.map +1 -1
- package/dist/src/transports/bullmq/bullmq-transport.d.ts +1 -1
- package/dist/src/transports/bullmq/bullmq-transport.d.ts.map +1 -1
- package/dist/src/transports/bullmq/bullmq-transport.js +14 -3
- package/dist/src/transports/bullmq/bullmq-transport.js.map +1 -1
- package/dist/src/transports/db-schema.d.ts +13 -5
- package/dist/src/transports/db-schema.d.ts.map +1 -1
- package/dist/src/transports/db-schema.js +52 -27
- package/dist/src/transports/db-schema.js.map +1 -1
- package/dist/src/transports/db.d.ts +6 -0
- package/dist/src/transports/db.d.ts.map +1 -1
- package/dist/src/transports/db.js +91 -42
- package/dist/src/transports/db.js.map +1 -1
- package/dist/src/transports/factory.d.ts +16 -0
- package/dist/src/transports/factory.d.ts.map +1 -1
- package/dist/src/transports/factory.js +6 -1
- package/dist/src/transports/factory.js.map +1 -1
- package/dist/src/transports/queue.d.ts +2 -2
- package/dist/src/transports/queue.d.ts.map +1 -1
- package/dist/src/transports/queue.js +49 -8
- package/dist/src/transports/queue.js.map +1 -1
- package/dist/src/transports/worker-keys-db.d.ts +5 -0
- package/dist/src/transports/worker-keys-db.d.ts.map +1 -1
- package/dist/src/transports/worker-keys-db.js +10 -8
- package/dist/src/transports/worker-keys-db.js.map +1 -1
- package/dist/src/workflow-discovery.d.ts +1 -1
- package/dist/src/workflow-discovery.d.ts.map +1 -1
- package/dist/src/workflow-discovery.js +4 -7
- package/dist/src/workflow-discovery.js.map +1 -1
- package/dist/src/workflow-events.d.ts +20 -51
- package/dist/src/workflow-events.d.ts.map +1 -1
- package/dist/src/workflow-events.js +12 -30
- package/dist/src/workflow-events.js.map +1 -1
- package/dist/src/workflow-ref.d.ts +1 -1
- package/dist/stubs/config/durable_dashboard.stub +9 -29
- package/dist/stubs/database/migrations/create_durable_tables.stub +12 -2
- package/dist/stubs/database/migrations/create_durable_transport_messages.stub +34 -5
- package/dist/stubs/database/migrations/create_durable_transport_tables.stub +30 -8
- package/dist/stubs/database/migrations/create_durable_transport_worker_keys.stub +24 -2
- package/package.json +25 -7
- package/skills/durable-cluster/SKILL.md +43 -23
- package/skills/durable-reliability/SKILL.md +13 -7
- package/dist/assets/spa/assets/index-70hGzOnT.css +0 -1
- package/dist/assets/spa/assets/index-CJjMAUau.js +0 -16
- package/dist/assets/spa/assets/index-CJjMAUau.js.map +0 -1
- package/dist/commands/retry.d.ts +0 -16
- package/dist/commands/retry.d.ts.map +0 -1
- package/dist/commands/retry.js +0 -34
- package/dist/commands/retry.js.map +0 -1
- package/dist/src/dashboard/auth.d.ts +0 -134
- package/dist/src/dashboard/auth.d.ts.map +0 -1
- package/dist/src/dashboard/auth.js +0 -156
- package/dist/src/dashboard/auth.js.map +0 -1
- package/dist/src/dashboard/login_page.d.ts +0 -36
- package/dist/src/dashboard/login_page.d.ts.map +0 -1
- package/dist/src/dashboard/login_page.js +0 -158
- package/dist/src/dashboard/login_page.js.map +0 -1
- package/dist/src/dashboard/session_cookie.d.ts +0 -45
- package/dist/src/dashboard/session_cookie.d.ts.map +0 -1
- package/dist/src/dashboard/session_cookie.js +0 -97
- package/dist/src/dashboard/session_cookie.js.map +0 -1
package/dist/commands/main.js
CHANGED
|
@@ -1,27 +1,74 @@
|
|
|
1
1
|
import { ListLoader } from '@adonisjs/core/ace';
|
|
2
|
+
import AgoraDoctor from './agora_doctor.js';
|
|
3
|
+
import DurableDoctor from './durable_doctor.js';
|
|
2
4
|
import DurableWorker from './durable_worker.js';
|
|
3
5
|
import DurableExport from './export_run.js';
|
|
6
|
+
import DurableHealth from './health.js';
|
|
4
7
|
import DurableLifecycleRepublish from './lifecycle_republish.js';
|
|
5
8
|
import MakeWorkflow from './make_workflow.js';
|
|
6
|
-
import DurableRetry from './retry.js';
|
|
7
9
|
import DurableRuns from './runs.js';
|
|
10
|
+
import DurableRunsBulk from './runs_bulk.js';
|
|
11
|
+
import DurableRunsCancel from './runs_cancel.js';
|
|
12
|
+
import DurableRunsContinue from './runs_continue.js';
|
|
13
|
+
import DurableRunsEvent from './runs_event.js';
|
|
14
|
+
import DurableRunsFan from './runs_fan.js';
|
|
15
|
+
import DurableRunsRedispatch from './runs_redispatch.js';
|
|
16
|
+
import DurableRunsReplay from './runs_replay.js';
|
|
17
|
+
import DurableRunsRetry from './runs_retry.js';
|
|
18
|
+
import DurableRunsShow from './runs_show.js';
|
|
19
|
+
import DurableRunsSignal from './runs_signal.js';
|
|
20
|
+
import DurableRunsUpdate from './runs_update.js';
|
|
21
|
+
import DurableRunsValues from './runs_values.js';
|
|
22
|
+
import DurableSchedules from './schedules.js';
|
|
23
|
+
import DurableSchedulesPause from './schedules_pause.js';
|
|
24
|
+
import DurableSchedulesResume from './schedules_resume.js';
|
|
25
|
+
import DurableSchedulesTrigger from './schedules_trigger.js';
|
|
26
|
+
import DurableTasksComplete from './tasks_complete.js';
|
|
27
|
+
import DurableTasksFail from './tasks_fail.js';
|
|
8
28
|
import DurableWork from './work.js';
|
|
29
|
+
import DurableWorkers from './workers.js';
|
|
30
|
+
import DurableWorkflowsLifecycle from './workflows_lifecycle.js';
|
|
9
31
|
/**
|
|
10
32
|
* The commands barrel for `@adonis-agora/durable`. Registered in an app's `adonisrc` via
|
|
11
33
|
* `rcFile.addCommand('@adonis-agora/durable/commands')` (done by this package's `configure`). The ace
|
|
12
34
|
* kernel imports this module and treats it as a commands loader: a {@link ListLoader} over the durable
|
|
13
|
-
* commands (`durable:work`, `durable:worker
|
|
14
|
-
*
|
|
35
|
+
* commands — the workers (`durable:work`, `durable:worker`), the operator commands that mirror the
|
|
36
|
+
* console (`durable:runs*`, `durable:tasks:*`, `durable:schedules*`, `durable:workers`,
|
|
37
|
+
* `durable:health`, `durable:workflows:lifecycle`, `durable:lifecycle:republish`), `durable:export`,
|
|
38
|
+
* `make:workflow`, `agora:doctor` and `durable:doctor`.
|
|
15
39
|
*/
|
|
16
|
-
const
|
|
40
|
+
export const DURABLE_COMMANDS = [
|
|
17
41
|
DurableWork,
|
|
18
42
|
DurableWorker,
|
|
19
43
|
DurableRuns,
|
|
20
|
-
|
|
21
|
-
|
|
44
|
+
DurableRunsShow,
|
|
45
|
+
DurableRunsFan,
|
|
46
|
+
DurableRunsValues,
|
|
47
|
+
DurableRunsEvent,
|
|
48
|
+
DurableRunsRetry,
|
|
49
|
+
DurableRunsReplay,
|
|
50
|
+
DurableRunsRedispatch,
|
|
51
|
+
DurableRunsCancel,
|
|
52
|
+
DurableRunsContinue,
|
|
53
|
+
DurableRunsSignal,
|
|
54
|
+
DurableRunsUpdate,
|
|
55
|
+
DurableRunsBulk,
|
|
56
|
+
DurableTasksComplete,
|
|
57
|
+
DurableTasksFail,
|
|
58
|
+
DurableSchedules,
|
|
59
|
+
DurableSchedulesPause,
|
|
60
|
+
DurableSchedulesResume,
|
|
61
|
+
DurableSchedulesTrigger,
|
|
62
|
+
DurableWorkers,
|
|
63
|
+
DurableHealth,
|
|
64
|
+
DurableWorkflowsLifecycle,
|
|
22
65
|
DurableLifecycleRepublish,
|
|
66
|
+
DurableExport,
|
|
23
67
|
MakeWorkflow,
|
|
24
|
-
|
|
68
|
+
AgoraDoctor,
|
|
69
|
+
DurableDoctor,
|
|
70
|
+
];
|
|
71
|
+
const loader = new ListLoader(DURABLE_COMMANDS);
|
|
25
72
|
export const getMetaData = loader.getMetaData.bind(loader);
|
|
26
73
|
export const getCommand = loader.getCommand.bind(loader);
|
|
27
74
|
export default loader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../commands/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,yBAAyB,MAAM,0BAA0B,CAAC;AACjE,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../commands/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,WAAW,MAAM,mBAAmB,CAAC;AAC5C,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AA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;IACjB,iBAAiB;IACjB,eAAe;IACf,oBAAoB;IACpB,gBAAgB;IAChB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,uBAAuB;IACvB,cAAc;IACd,aAAa;IACb,yBAAyB;IACzB,yBAAyB;IACzB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,aAAa;CACd,CAAC;AAEF,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAEhD,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAe,MAAM,CAAC"}
|
package/dist/commands/runs.d.ts
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { CommandOptions } from '@adonisjs/core/types/ace';
|
|
1
|
+
import { RunFilterCommand } from '../src/commands/console_command.js';
|
|
3
2
|
/**
|
|
4
|
-
* `node ace durable:runs` — list
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Every row also carries liveness signals (UPDATED age, RECOVERY attempts, PENDING remote-step age) —
|
|
9
|
-
* `suspended` alone can't tell a run mid-step apart from one whose dispatch was lost (see
|
|
10
|
-
* `src/commands/runs.ts`'s module doc). `--stale` narrows the listing to exactly the runs that look
|
|
11
|
-
* stranded by that signal.
|
|
3
|
+
* `node ace durable:runs` — list runs, newest first, through the console's `GET /runs` handler (same
|
|
4
|
+
* filters, paging, tenant scope and redaction). Every row carries liveness signals (UPDATED age,
|
|
5
|
+
* RECOVERY attempts, PENDING remote-step age); `--stale` narrows the page to the runs that look
|
|
6
|
+
* stranded by them.
|
|
12
7
|
*/
|
|
13
|
-
export default class DurableRuns extends
|
|
8
|
+
export default class DurableRuns extends RunFilterCommand {
|
|
14
9
|
static commandName: string;
|
|
15
10
|
static description: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
workflow?: string;
|
|
19
|
-
limit: number;
|
|
11
|
+
page?: number;
|
|
12
|
+
size?: number;
|
|
20
13
|
stale?: string;
|
|
21
|
-
|
|
14
|
+
protected perform(): Promise<void>;
|
|
22
15
|
}
|
|
23
16
|
//# sourceMappingURL=runs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAsBlF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,gBAAgB;IACvD,OAAgB,WAAW,SAAkB;IAC7C,OAAgB,WAAW,SAA2D;IAG9E,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEvB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDvC;CACF"}
|
package/dist/commands/runs.js
CHANGED
|
@@ -4,65 +4,78 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { flags } from '@adonisjs/core/ace';
|
|
8
|
+
import { pageFooter, RunFilterCommand } from '../src/commands/console_command.js';
|
|
9
|
+
import { attachLiveness, DEFAULT_STALE_MS, filterStale, parseDurationMs, renderRunsTable, staleHint, } from '../src/commands/runs.js';
|
|
10
|
+
import { listRuns } from '../src/dashboard/handlers.js';
|
|
10
11
|
/**
|
|
11
|
-
* `node ace durable:runs` — list
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* Every row also carries liveness signals (UPDATED age, RECOVERY attempts, PENDING remote-step age) —
|
|
16
|
-
* `suspended` alone can't tell a run mid-step apart from one whose dispatch was lost (see
|
|
17
|
-
* `src/commands/runs.ts`'s module doc). `--stale` narrows the listing to exactly the runs that look
|
|
18
|
-
* stranded by that signal.
|
|
12
|
+
* `node ace durable:runs` — list runs, newest first, through the console's `GET /runs` handler (same
|
|
13
|
+
* filters, paging, tenant scope and redaction). Every row carries liveness signals (UPDATED age,
|
|
14
|
+
* RECOVERY attempts, PENDING remote-step age); `--stale` narrows the page to the runs that look
|
|
15
|
+
* stranded by them.
|
|
19
16
|
*/
|
|
20
|
-
export default class DurableRuns extends
|
|
17
|
+
export default class DurableRuns extends RunFilterCommand {
|
|
21
18
|
static commandName = 'durable:runs';
|
|
22
|
-
static description = 'List
|
|
23
|
-
|
|
24
|
-
async run() {
|
|
25
|
-
const engine = await this.app.container.make(WorkflowEngine);
|
|
19
|
+
static description = 'List durable workflow runs (filters, paging, --stale)';
|
|
20
|
+
async perform() {
|
|
26
21
|
const wantsStale = this.stale !== undefined;
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
22
|
+
const query = this.runFilter();
|
|
23
|
+
// No explicit --status: `--stale` reads the only statuses a stranded dispatch shows up in, so
|
|
24
|
+
// newer terminal runs don't push a stale candidate off the page.
|
|
25
|
+
if (wantsStale && !query.filter?.status) {
|
|
26
|
+
query.filter = { ...query.filter, status: ['running', 'suspended', 'cancelling'] };
|
|
27
|
+
}
|
|
28
|
+
const deps = await this.deps();
|
|
29
|
+
const body = await this.call(listRuns, {
|
|
30
|
+
query: {
|
|
31
|
+
...query,
|
|
32
|
+
...(this.page !== undefined ? { page: String(this.page) } : {}),
|
|
33
|
+
...(this.size !== undefined ? { size: String(this.size) } : {}),
|
|
34
|
+
},
|
|
35
|
+
}, deps);
|
|
36
|
+
// The liveness columns read each in-flight run's checkpoints through the same port.
|
|
37
|
+
const runs = body.data.map((row) => ({ ...row, updatedAt: new Date(row.updatedAt) }));
|
|
38
|
+
const lister = {
|
|
39
|
+
listRuns: async () => runs,
|
|
40
|
+
listCheckpoints: (id) => deps.engine.listCheckpoints(id),
|
|
41
|
+
};
|
|
42
|
+
let live = await attachLiveness(lister, runs);
|
|
43
|
+
if (wantsStale) {
|
|
44
|
+
const threshold = this.stale === ''
|
|
45
|
+
? DEFAULT_STALE_MS
|
|
46
|
+
: (parseDurationMs(this.stale ?? '') ?? DEFAULT_STALE_MS);
|
|
47
|
+
live = filterStale(live, threshold);
|
|
48
|
+
}
|
|
49
|
+
if (this.json) {
|
|
50
|
+
const kept = new Set(live.map((l) => l.run.id));
|
|
51
|
+
const liveness = new Map(live.map((l) => [l.run.id, l.stalePending]));
|
|
52
|
+
this.printJson({
|
|
53
|
+
data: body.data
|
|
54
|
+
.filter((row) => kept.has(row.id))
|
|
55
|
+
.map((row) => ({ ...row, pending: liveness.get(row.id) ?? null })),
|
|
56
|
+
meta: body.meta,
|
|
57
|
+
});
|
|
39
58
|
return;
|
|
40
59
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.logger.warning(staleHint(run.id));
|
|
60
|
+
this.logger.log(renderRunsTable(live));
|
|
61
|
+
if (live.length > 0 || body.meta.total > 0)
|
|
62
|
+
this.logger.log(pageFooter(body.meta));
|
|
63
|
+
if (wantsStale)
|
|
64
|
+
for (const { run } of live)
|
|
65
|
+
this.logger.warning(staleHint(run.id));
|
|
48
66
|
}
|
|
49
67
|
}
|
|
50
68
|
__decorate([
|
|
51
|
-
flags.
|
|
52
|
-
|
|
53
|
-
})
|
|
54
|
-
], DurableRuns.prototype, "status", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
flags.string({ description: 'Filter by workflow name' })
|
|
57
|
-
], DurableRuns.prototype, "workflow", void 0);
|
|
69
|
+
flags.number({ description: 'Page, 1-based (default 1)' })
|
|
70
|
+
], DurableRuns.prototype, "page", void 0);
|
|
58
71
|
__decorate([
|
|
59
|
-
flags.number({ description: '
|
|
60
|
-
], DurableRuns.prototype, "
|
|
72
|
+
flags.number({ description: 'Rows per page (default 50, at most 200)' })
|
|
73
|
+
], DurableRuns.prototype, "size", void 0);
|
|
61
74
|
__decorate([
|
|
62
75
|
flags.string({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
'
|
|
76
|
+
allowEmptyValue: true,
|
|
77
|
+
description: 'Only running/suspended/cancelling runs whose oldest pending remote step exceeds this age (the ' +
|
|
78
|
+
'"probably stranded" view). Bare --stale uses 15m; --stale=1h / --stale=90s set your own.',
|
|
66
79
|
})
|
|
67
80
|
], DurableRuns.prototype, "stale", void 0);
|
|
68
81
|
//# sourceMappingURL=runs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAaxD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAA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C;gBACpE,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACnF,IAAI,UAAU;YAAE,KAAK,MAAM,EAAE,GAAG,EAAE,IAAI,IAAI;gBAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACrF,CAAC;CACF;AArES;IADP,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;yCACrC;AAGd;IADP,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;yCACnD;AAQd;IANP,KAAK,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,IAAI;QACrB,WAAW,EACT,gGAAgG;YAChG,0FAA0F;KAC7F,CAAC;0CACqB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RunFilterCommand } from '../src/commands/console_command.js';
|
|
2
|
+
/**
|
|
3
|
+
* `node ace durable:runs:bulk <retry|cancel> [filters]` — retry or cancel every run matching the
|
|
4
|
+
* filters (at most 500), through the console's `POST /bulk/:action`. A run that cannot take the
|
|
5
|
+
* action is skipped. `--dry-run` lists what would be acted on; otherwise it asks first (`--force`
|
|
6
|
+
* skips).
|
|
7
|
+
*/
|
|
8
|
+
export default class DurableRunsBulk extends RunFilterCommand {
|
|
9
|
+
static commandName: string;
|
|
10
|
+
static description: string;
|
|
11
|
+
action: string;
|
|
12
|
+
compensate: boolean;
|
|
13
|
+
dryRun: boolean;
|
|
14
|
+
force: boolean;
|
|
15
|
+
protected perform(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=runs_bulk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_bulk.d.ts","sourceRoot":"","sources":["../../commands/runs_bulk.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAQlF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,gBAAgB;IAC3D,OAAgB,WAAW,SAAuB;IAClD,OAAgB,WAAW,SAA+D;IAGlF,MAAM,EAAE,MAAM,CAAC;IAGf,UAAU,EAAE,OAAO,CAAC;IAGpB,MAAM,EAAE,OAAO,CAAC;IAGhB,KAAK,EAAE,OAAO,CAAC;IAEvB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAsDvC;CACF"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { args, flags } from '@adonisjs/core/ace';
|
|
8
|
+
import { CliRefusal, RunFilterCommand } from '../src/commands/console_command.js';
|
|
9
|
+
import { renderRunsTable } from '../src/commands/runs.js';
|
|
10
|
+
import { bulkAction, listRuns } from '../src/dashboard/handlers.js';
|
|
11
|
+
/** The bulk action acts on at most this many matching runs (the console's cap). */
|
|
12
|
+
const BULK_CAP = 500;
|
|
13
|
+
/**
|
|
14
|
+
* `node ace durable:runs:bulk <retry|cancel> [filters]` — retry or cancel every run matching the
|
|
15
|
+
* filters (at most 500), through the console's `POST /bulk/:action`. A run that cannot take the
|
|
16
|
+
* action is skipped. `--dry-run` lists what would be acted on; otherwise it asks first (`--force`
|
|
17
|
+
* skips).
|
|
18
|
+
*/
|
|
19
|
+
export default class DurableRunsBulk extends RunFilterCommand {
|
|
20
|
+
static commandName = 'durable:runs:bulk';
|
|
21
|
+
static description = 'Retry or cancel every run matching a filter (at most 500)';
|
|
22
|
+
async perform() {
|
|
23
|
+
if (this.action !== 'retry' && this.action !== 'cancel') {
|
|
24
|
+
throw new CliRefusal('action must be retry or cancel.');
|
|
25
|
+
}
|
|
26
|
+
if (this.compensate && this.action !== 'cancel') {
|
|
27
|
+
throw new CliRefusal('--compensate goes with cancel.');
|
|
28
|
+
}
|
|
29
|
+
const query = this.runFilter();
|
|
30
|
+
const deps = await this.deps();
|
|
31
|
+
const preview = await this.call(listRuns, { query: { ...query, size: '200' } }, deps);
|
|
32
|
+
const matched = preview.meta.total;
|
|
33
|
+
const acting = Math.min(matched, BULK_CAP);
|
|
34
|
+
const scope = Object.keys(query).length > 0 ? 'matching the filter' : 'of every run (no filter)';
|
|
35
|
+
if (this.dryRun) {
|
|
36
|
+
if (this.json) {
|
|
37
|
+
this.printJson({ action: this.action, matched, wouldApply: acting, data: preview.data });
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const rows = preview.data.map((row) => ({
|
|
41
|
+
run: { ...row, updatedAt: new Date(row.updatedAt) },
|
|
42
|
+
ageMs: Date.now() - new Date(row.updatedAt).getTime(),
|
|
43
|
+
recoveryAttempts: Number(row.recoveryAttempts ?? 0),
|
|
44
|
+
stalePending: null,
|
|
45
|
+
}));
|
|
46
|
+
this.logger.log(renderRunsTable(rows));
|
|
47
|
+
this.logger.info(`Dry run: ${this.action} would act on ${acting} run(s) ${scope} (${matched} matched${matched > BULK_CAP ? `, capped at ${BULK_CAP}` : ''}).`);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
await this.confirm(this.force, `${this.action === 'retry' ? 'Retry' : 'Cancel'} up to ${acting} run(s) ${scope}${this.compensate ? ' and run their compensations' : ''}?`);
|
|
51
|
+
this.audit(`${this.action} ${JSON.stringify(query.filter ?? {})}`);
|
|
52
|
+
const body = await this.call(bulkAction, {
|
|
53
|
+
params: { action: this.action },
|
|
54
|
+
query,
|
|
55
|
+
...(this.compensate ? { body: { compensate: true } } : {}),
|
|
56
|
+
}, deps);
|
|
57
|
+
if (this.json)
|
|
58
|
+
return this.printJson(body);
|
|
59
|
+
this.logger.success(`${this.action}: applied to ${body.applied} of ${body.matched} matching run(s).`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
__decorate([
|
|
63
|
+
args.string({ description: 'retry | cancel' })
|
|
64
|
+
], DurableRunsBulk.prototype, "action", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
flags.boolean({ description: 'With cancel: also run each run’s compensations (saga undo)' })
|
|
67
|
+
], DurableRunsBulk.prototype, "compensate", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
flags.boolean({ description: 'List the matching runs and stop' })
|
|
70
|
+
], DurableRunsBulk.prototype, "dryRun", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
flags.boolean({ description: 'Do not ask for confirmation' })
|
|
73
|
+
], DurableRunsBulk.prototype, "force", void 0);
|
|
74
|
+
//# sourceMappingURL=runs_bulk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_bulk.js","sourceRoot":"","sources":["../../commands/runs_bulk.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EA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IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;QACnE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAC1B,UAAU,EACV;YACE,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YAC/B,KAAK;YACL,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3D,EACD,IAAI,CACL,CAAC;QACF,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CACjB,GAAG,IAAI,CAAC,MAAM,gBAAgB,IAAI,CAAC,OAAO,OAAO,IAAI,CAAC,OAAO,mBAAmB,CACjF,CAAC;IACJ,CAAC;CACF;AAlES;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;+CACxB;AAGf;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,4DAA4D,EAAE,CAAC;mDACjE;AAGpB;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;+CAC1C;AAGhB;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;8CACvC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DurableConsoleCommand } from '../src/commands/console_command.js';
|
|
2
|
+
/**
|
|
3
|
+
* `node ace durable:runs:cancel <id> [--compensate]` — cancel a run through the console's
|
|
4
|
+
* `POST /runs/:id/cancel`; `--compensate` also runs the saga undo of its completed steps. Asks first
|
|
5
|
+
* (`--force` skips).
|
|
6
|
+
*/
|
|
7
|
+
export default class DurableRunsCancel extends DurableConsoleCommand {
|
|
8
|
+
static commandName: string;
|
|
9
|
+
static description: string;
|
|
10
|
+
id: string;
|
|
11
|
+
compensate: boolean;
|
|
12
|
+
force: boolean;
|
|
13
|
+
protected perform(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=runs_cancel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_cancel.d.ts","sourceRoot":"","sources":["../../commands/runs_cancel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAI3E;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,qBAAqB;IAClE,OAAgB,WAAW,SAAyB;IACpD,OAAgB,WAAW,SAAyD;IAG5E,EAAE,EAAE,MAAM,CAAC;IAGX,UAAU,EAAE,OAAO,CAAC;IAGpB,KAAK,EAAE,OAAO,CAAC;IAEvB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAYvC;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { args, flags } from '@adonisjs/core/ace';
|
|
8
|
+
import { DurableConsoleCommand } from '../src/commands/console_command.js';
|
|
9
|
+
import { cancelRun } from '../src/dashboard/handlers.js';
|
|
10
|
+
/**
|
|
11
|
+
* `node ace durable:runs:cancel <id> [--compensate]` — cancel a run through the console's
|
|
12
|
+
* `POST /runs/:id/cancel`; `--compensate` also runs the saga undo of its completed steps. Asks first
|
|
13
|
+
* (`--force` skips).
|
|
14
|
+
*/
|
|
15
|
+
export default class DurableRunsCancel extends DurableConsoleCommand {
|
|
16
|
+
static commandName = 'durable:runs:cancel';
|
|
17
|
+
static description = 'Cancel a run (--compensate also runs its saga undo)';
|
|
18
|
+
async perform() {
|
|
19
|
+
await this.confirm(this.force, this.compensate ? `Cancel ${this.id} and run its compensations?` : `Cancel ${this.id}?`);
|
|
20
|
+
this.audit(this.id);
|
|
21
|
+
const body = await this.call(cancelRun, {
|
|
22
|
+
params: { id: this.id },
|
|
23
|
+
body: { compensate: this.compensate === true },
|
|
24
|
+
});
|
|
25
|
+
if (this.json)
|
|
26
|
+
return this.printJson(body);
|
|
27
|
+
this.logger.success(`Run ${this.id} cancelled (status: ${body.result.status}).`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
__decorate([
|
|
31
|
+
args.string({ description: 'Run id' })
|
|
32
|
+
], DurableRunsCancel.prototype, "id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
flags.boolean({ description: 'Also run the compensations of its completed steps (saga undo)' })
|
|
35
|
+
], DurableRunsCancel.prototype, "compensate", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
flags.boolean({ description: 'Do not ask for confirmation' })
|
|
38
|
+
], DurableRunsCancel.prototype, "force", void 0);
|
|
39
|
+
//# sourceMappingURL=runs_cancel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_cancel.js","sourceRoot":"","sources":["../../commands/runs_cancel.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,qBAAqB;IAClE,MAAM,CAAU,WAAW,GAAG,qBAAqB,CAAC;IACpD,MAAM,CAAU,WAAW,GAAG,qDAAqD,CAAC;IAW1E,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,CAAC,OAAO,CAChB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,EAAE,6BAA6B,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,EAAE,GAAG,CACxF,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAwB,SAAS,EAAE;YAC7D,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE;YACvB,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;SAC/C,CAAC,CAAC;QACH,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,EAAE,uBAAuB,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;IACnF,CAAC;CACF;AArBS;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;6CACpB;AAGX;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,+DAA+D,EAAE,CAAC;qDACpE;AAGpB;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;gDACvC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DurableConsoleCommand } from '../src/commands/console_command.js';
|
|
2
|
+
/**
|
|
3
|
+
* `node ace durable:runs:continue <id>` — resume a run paused at a `ctx.breakpoint()`, through the
|
|
4
|
+
* console's `POST /runs/:id/continue`. Fails when the run is not paused at one.
|
|
5
|
+
*/
|
|
6
|
+
export default class DurableRunsContinue extends DurableConsoleCommand {
|
|
7
|
+
static commandName: string;
|
|
8
|
+
static description: string;
|
|
9
|
+
id: string;
|
|
10
|
+
protected perform(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=runs_continue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_continue.d.ts","sourceRoot":"","sources":["../../commands/runs_continue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAI3E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,qBAAqB;IACpE,OAAgB,WAAW,SAA2B;IACtD,OAAgB,WAAW,SAA+C;IAGlE,EAAE,EAAE,MAAM,CAAC;IAEnB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAKvC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { args } from '@adonisjs/core/ace';
|
|
8
|
+
import { DurableConsoleCommand } from '../src/commands/console_command.js';
|
|
9
|
+
import { continueRun } from '../src/dashboard/handlers.js';
|
|
10
|
+
/**
|
|
11
|
+
* `node ace durable:runs:continue <id>` — resume a run paused at a `ctx.breakpoint()`, through the
|
|
12
|
+
* console's `POST /runs/:id/continue`. Fails when the run is not paused at one.
|
|
13
|
+
*/
|
|
14
|
+
export default class DurableRunsContinue extends DurableConsoleCommand {
|
|
15
|
+
static commandName = 'durable:runs:continue';
|
|
16
|
+
static description = 'Resume a run paused at a ctx.breakpoint()';
|
|
17
|
+
async perform() {
|
|
18
|
+
this.audit(this.id);
|
|
19
|
+
const body = await this.call(continueRun, { params: { id: this.id } });
|
|
20
|
+
if (this.json)
|
|
21
|
+
return this.printJson(body);
|
|
22
|
+
this.logger.success(`Run ${this.id} continued (status: ${body.result.status}).`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
__decorate([
|
|
26
|
+
args.string({ description: 'Run id' })
|
|
27
|
+
], DurableRunsContinue.prototype, "id", void 0);
|
|
28
|
+
//# sourceMappingURL=runs_continue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_continue.js","sourceRoot":"","sources":["../../commands/runs_continue.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,qBAAqB;IACpE,MAAM,CAAU,WAAW,GAAG,uBAAuB,CAAC;IACtD,MAAM,CAAU,WAAW,GAAG,2CAA2C,CAAC;IAKhE,KAAK,CAAC,OAAO;QACrB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAwB,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9F,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,EAAE,uBAAuB,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;IACnF,CAAC;CACF;AARS;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;+CACpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DurableConsoleCommand } from '../src/commands/console_command.js';
|
|
2
|
+
/**
|
|
3
|
+
* `node ace durable:runs:event <id> <key>` — the latest value a run published for `key` with
|
|
4
|
+
* `ctx.setEvent`, through the console's `GET /runs/:id/events/:key` (a live query, no side effect).
|
|
5
|
+
*/
|
|
6
|
+
export default class DurableRunsEvent extends DurableConsoleCommand {
|
|
7
|
+
static commandName: string;
|
|
8
|
+
static description: string;
|
|
9
|
+
id: string;
|
|
10
|
+
key: string;
|
|
11
|
+
protected perform(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=runs_event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_event.d.ts","sourceRoot":"","sources":["../../commands/runs_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAG3E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,qBAAqB;IACjE,OAAgB,WAAW,SAAwB;IACnD,OAAgB,WAAW,SAA6D;IAGhF,EAAE,EAAE,MAAM,CAAC;IAGX,GAAG,EAAE,MAAM,CAAC;IAEpB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAGvC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { args } from '@adonisjs/core/ace';
|
|
8
|
+
import { DurableConsoleCommand } from '../src/commands/console_command.js';
|
|
9
|
+
import { getRunEvent } from '../src/dashboard/handlers.js';
|
|
10
|
+
/**
|
|
11
|
+
* `node ace durable:runs:event <id> <key>` — the latest value a run published for `key` with
|
|
12
|
+
* `ctx.setEvent`, through the console's `GET /runs/:id/events/:key` (a live query, no side effect).
|
|
13
|
+
*/
|
|
14
|
+
export default class DurableRunsEvent extends DurableConsoleCommand {
|
|
15
|
+
static commandName = 'durable:runs:event';
|
|
16
|
+
static description = 'Read the latest value a run published with ctx.setEvent';
|
|
17
|
+
async perform() {
|
|
18
|
+
const body = await this.call(getRunEvent, { params: { id: this.id, key: this.key } });
|
|
19
|
+
this.printJson(this.json ? body : body.value);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
__decorate([
|
|
23
|
+
args.string({ description: 'Run id' })
|
|
24
|
+
], DurableRunsEvent.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
args.string({ description: 'Event key' })
|
|
27
|
+
], DurableRunsEvent.prototype, "key", void 0);
|
|
28
|
+
//# sourceMappingURL=runs_event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_event.js","sourceRoot":"","sources":["../../commands/runs_event.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,qBAAqB;IACjE,MAAM,CAAU,WAAW,GAAG,oBAAoB,CAAC;IACnD,MAAM,CAAU,WAAW,GAAG,yDAAyD,CAAC;IAQ9E,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACtF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;CACF;AATS;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;4CACpB;AAGX;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;6CACtB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DurableConsoleCommand } from '../src/commands/console_command.js';
|
|
2
|
+
/**
|
|
3
|
+
* `node ace durable:runs:fan <id> <group>` — one page of a wide fan's member steps (a fan
|
|
4
|
+
* `durable:runs:show` summarized), through the console's `GET /runs/:id/fans/:group`.
|
|
5
|
+
*/
|
|
6
|
+
export default class DurableRunsFan extends DurableConsoleCommand {
|
|
7
|
+
static commandName: string;
|
|
8
|
+
static description: string;
|
|
9
|
+
id: string;
|
|
10
|
+
group: string;
|
|
11
|
+
failed: boolean;
|
|
12
|
+
page?: number;
|
|
13
|
+
size?: number;
|
|
14
|
+
protected perform(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=runs_fan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs_fan.d.ts","sourceRoot":"","sources":["../../commands/runs_fan.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,qBAAqB,EAGtB,MAAM,oCAAoC,CAAC;AAG5C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,qBAAqB;IAC/D,OAAgB,WAAW,SAAsB;IACjD,OAAgB,WAAW,SAAkD;IAGrE,EAAE,EAAE,MAAM,CAAC;IAGX,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,OAAO,CAAC;IAGhB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAgCvC;CACF"}
|