@hatchet-dev/typescript-sdk 1.13.1 → 1.15.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/docs/doc_types.d.ts +12 -0
- package/docs/doc_types.js +62 -0
- package/docs/generate.js +87 -0
- package/docs/paths.d.ts +2 -0
- package/docs/paths.js +16 -0
- package/docs/shared.d.ts +3 -0
- package/docs/shared.js +6 -0
- package/package.json +5 -4
- package/{clients → src/clients}/admin/admin-client.d.ts +17 -9
- package/{clients → src/clients}/admin/admin-client.js +26 -10
- package/{clients → src/clients}/dispatcher/action-listener.d.ts +4 -4
- package/{clients → src/clients}/dispatcher/action-listener.js +3 -3
- package/{clients → src/clients}/dispatcher/dispatcher-client.d.ts +10 -10
- package/{clients → src/clients}/dispatcher/dispatcher-client.js +5 -5
- package/{clients → src/clients}/dispatcher/heartbeat/heartbeat-controller.d.ts +2 -2
- package/{clients → src/clients}/dispatcher/heartbeat/heartbeat-controller.js +14 -2
- package/{clients → src/clients}/dispatcher/heartbeat/heartbeat-worker.js +7 -6
- package/{clients → src/clients}/event/event-client.d.ts +8 -9
- package/{clients → src/clients}/event/event-client.js +6 -6
- package/{clients → src/clients}/hatchet-client/client-config.d.ts +17 -7
- package/{clients → src/clients}/hatchet-client/client-config.js +3 -0
- package/{clients → src/clients}/hatchet-client/hatchet-logger.d.ts +1 -1
- package/{clients → src/clients}/hatchet-client/hatchet-logger.js +2 -1
- package/src/clients/hatchet-client/index.d.ts +3 -0
- package/{clients → src/clients}/hatchet-client/index.js +2 -2
- package/{clients → src/clients}/listeners/durable-listener/durable-listener-client.d.ts +11 -5
- package/{clients → src/clients}/listeners/durable-listener/durable-listener-client.js +9 -1
- package/{clients → src/clients}/listeners/durable-listener/pooled-durable-listener-client.d.ts +11 -4
- package/{clients → src/clients}/listeners/durable-listener/pooled-durable-listener-client.js +68 -16
- package/{clients → src/clients}/listeners/run-listener/child-listener-client.d.ts +3 -3
- package/{clients → src/clients}/listeners/run-listener/child-listener-client.js +4 -3
- package/{clients → src/clients}/listeners/run-listener/pooled-child-listener-client.d.ts +11 -3
- package/{clients → src/clients}/listeners/run-listener/pooled-child-listener-client.js +65 -9
- package/src/clients/rest/api.js +21 -0
- package/{clients → src/clients}/rest/generated/Api.d.ts +2 -2
- package/{clients → src/clients}/rest/generated/data-contracts.d.ts +6 -0
- package/{index.d.ts → src/index.d.ts} +3 -4
- package/{index.js → src/index.js} +3 -4
- package/{examples → src/legacy/examples}/affinity-workers.js +2 -2
- package/{examples → src/legacy/examples}/bulk-fanout-trigger.js +1 -1
- package/{examples → src/legacy/examples}/bulk-fanout-worker.js +1 -1
- package/{examples → src/legacy/examples}/bulk-trigger.js +1 -1
- package/{examples → src/legacy/examples}/concurrency/cancel-in-progress/concurrency-event.js +1 -1
- package/{examples → src/legacy/examples}/concurrency/cancel-in-progress/concurrency-worker.js +1 -1
- package/{examples → src/legacy/examples}/concurrency/group-round-robin/concurrency-event.js +1 -1
- package/{examples → src/legacy/examples}/concurrency/group-round-robin/concurrency-worker-expression.js +2 -2
- package/{examples → src/legacy/examples}/concurrency/group-round-robin/concurrency-worker-key-fn.js +2 -2
- package/{examples → src/legacy/examples}/crons/cron-worker.d.ts +1 -1
- package/{examples → src/legacy/examples}/crons/cron-worker.js +1 -1
- package/{examples → src/legacy/examples}/crons/programatic-crons.js +1 -1
- package/{examples → src/legacy/examples}/dag-worker.js +1 -1
- package/{examples → src/legacy/examples}/example-event-with-results.js +2 -2
- package/{examples → src/legacy/examples}/example-event.js +1 -1
- package/{examples → src/legacy/examples}/fanout-worker.js +1 -1
- package/{examples → src/legacy/examples}/logger.js +1 -1
- package/{examples → src/legacy/examples}/manual-trigger.js +1 -1
- package/{examples → src/legacy/examples}/multi-workflow.js +1 -1
- package/{examples → src/legacy/examples}/namespaced-worker.js +1 -1
- package/{examples → src/legacy/examples}/on-failure.js +1 -1
- package/{examples → src/legacy/examples}/rate-limit/events.js +1 -1
- package/{examples → src/legacy/examples}/rate-limit/worker.js +2 -2
- package/{examples → src/legacy/examples}/retries-with-backoff.js +1 -1
- package/{examples → src/legacy/examples}/retries-worker.js +1 -1
- package/{examples → src/legacy/examples}/scheduled-runs/programatic-schedules.js +1 -1
- package/{examples → src/legacy/examples}/simple-worker.d.ts +1 -1
- package/{examples → src/legacy/examples}/simple-worker.js +1 -1
- package/{examples → src/legacy/examples}/sticky-trigger.js +1 -1
- package/{examples → src/legacy/examples}/sticky-worker-with-check.js +2 -2
- package/{examples → src/legacy/examples}/sticky-worker.js +2 -2
- package/{examples → src/legacy/examples}/stream-by-additional-meta.js +2 -2
- package/{clients/hatchet-client/hatchet-client.d.ts → src/legacy/legacy-client.d.ts} +8 -13
- package/src/legacy/legacy-client.js +67 -0
- package/src/legacy/legacy-transformer.d.ts +38 -0
- package/src/legacy/legacy-transformer.js +181 -0
- package/{step.d.ts → src/legacy/step.d.ts} +30 -31
- package/{step.js → src/legacy/step.js} +17 -16
- package/{workflow.d.ts → src/legacy/workflow.d.ts} +47 -50
- package/{workflow.js → src/legacy/workflow.js} +3 -6
- package/{protoc → src/protoc}/v1/workflows.d.ts +8 -0
- package/{protoc → src/protoc}/v1/workflows.js +109 -2
- package/{protoc → src/protoc}/workflows/workflows.d.ts +9 -0
- package/{protoc → src/protoc}/workflows/workflows.js +109 -2
- package/src/sdk.d.ts +2 -0
- package/{sdk.js → src/sdk.js} +1 -1
- package/src/step.d.ts +1 -0
- package/{clients/worker/index.js → src/step.js} +4 -1
- package/src/util/abort-error.d.ts +38 -0
- package/src/util/abort-error.js +58 -0
- package/{util → src/util}/config-loader/config-loader.d.ts +1 -1
- package/{util → src/util}/config-loader/config-loader.js +1 -1
- package/{util → src/util}/grpc-helpers.d.ts +1 -1
- package/src/util/hatchet-promise/hatchet-promise.d.ts +13 -0
- package/{util → src/util}/hatchet-promise/hatchet-promise.js +3 -2
- package/src/util/logger/index.d.ts +2 -0
- package/{util → src/util}/logger/index.js +1 -0
- package/{util → src/util}/logger/logger.d.ts +1 -1
- package/src/util/logger/task-run-log.d.ts +3 -0
- package/src/util/logger/task-run-log.js +20 -0
- package/{util → src/util}/sleep.d.ts +5 -2
- package/src/util/sleep.js +37 -0
- package/{util → src/util}/workflow-run-ref.d.ts +9 -3
- package/{util → src/util}/workflow-run-ref.js +5 -3
- package/{v1 → src/v1}/client/admin.d.ts +24 -8
- package/{v1 → src/v1}/client/admin.js +50 -18
- package/{v1 → src/v1}/client/client.d.ts +59 -23
- package/{v1 → src/v1}/client/client.interface.d.ts +9 -2
- package/{v1 → src/v1}/client/client.js +73 -35
- package/{v1 → src/v1}/client/features/cel.d.ts +1 -1
- package/{v1 → src/v1}/client/features/cel.js +1 -1
- package/{v1 → src/v1}/client/features/crons.d.ts +8 -6
- package/{v1 → src/v1}/client/features/crons.js +6 -5
- package/{v1 → src/v1}/client/features/filters.d.ts +30 -0
- package/{v1 → src/v1}/client/features/filters.js +30 -0
- package/{v1 → src/v1}/client/features/metrics.d.ts +10 -6
- package/{v1 → src/v1}/client/features/metrics.js +10 -6
- package/src/v1/client/features/ratelimits.d.ts +30 -0
- package/{v1 → src/v1}/client/features/ratelimits.js +13 -3
- package/{v1 → src/v1}/client/features/runs.d.ts +43 -8
- package/{v1 → src/v1}/client/features/runs.js +38 -3
- package/{v1 → src/v1}/client/features/schedules.d.ts +7 -4
- package/{v1 → src/v1}/client/features/schedules.js +7 -5
- package/{v1 → src/v1}/client/features/tenant.d.ts +4 -1
- package/src/v1/client/features/webhooks.d.ts +54 -0
- package/{v1 → src/v1}/client/features/webhooks.js +31 -5
- package/src/v1/client/features/workers.d.ts +38 -0
- package/{v1 → src/v1}/client/features/workers.js +25 -1
- package/src/v1/client/features/workflows.d.ts +42 -0
- package/{v1 → src/v1}/client/features/workflows.js +27 -10
- package/{v1 → src/v1}/client/worker/context.d.ts +78 -18
- package/{v1 → src/v1}/client/worker/context.js +120 -27
- package/{v1 → src/v1}/client/worker/deprecated/deprecation.d.ts +1 -1
- package/{v1 → src/v1}/client/worker/deprecated/legacy-registration.d.ts +2 -2
- package/{v1 → src/v1}/client/worker/deprecated/legacy-registration.js +2 -2
- package/{v1 → src/v1}/client/worker/deprecated/legacy-v1-worker.d.ts +5 -5
- package/{v1 → src/v1}/client/worker/deprecated/legacy-v1-worker.js +2 -2
- package/{v1 → src/v1}/client/worker/deprecated/legacy-worker.js +9 -7
- package/{v1 → src/v1}/client/worker/health-server.d.ts +1 -1
- package/{v1 → src/v1}/client/worker/slot-utils.d.ts +3 -3
- package/{v1 → src/v1}/client/worker/worker-internal.d.ts +13 -22
- package/{v1 → src/v1}/client/worker/worker-internal.js +232 -216
- package/{v1 → src/v1}/client/worker/worker.d.ts +19 -19
- package/{v1 → src/v1}/client/worker/worker.js +45 -30
- package/{v1 → src/v1}/conditions/transformer.d.ts +1 -1
- package/{v1 → src/v1}/declaration.d.ts +120 -15
- package/{v1 → src/v1}/declaration.js +118 -10
- package/src/v1/examples/__e2e__/harness.d.ts +19 -0
- package/src/v1/examples/__e2e__/harness.js +70 -0
- package/{v1 → src/v1}/examples/affinity/affinity-workers.js +4 -4
- package/src/v1/examples/bulk_fanout/workflow.d.ts +9 -0
- package/src/v1/examples/bulk_fanout/workflow.js +34 -0
- package/src/v1/examples/bulk_operations/workflow.d.ts +3 -0
- package/src/v1/examples/bulk_operations/workflow.js +44 -0
- package/src/v1/examples/cancellation/cancellation-workflow.d.ts +2 -0
- package/src/v1/examples/cancellation/cancellation-workflow.js +69 -0
- package/src/v1/examples/cancellation/run.js +53 -0
- package/src/v1/examples/cancellation/worker.js +29 -0
- package/{v1 → src/v1}/examples/cancellations/run.js +1 -1
- package/{v1 → src/v1}/examples/cancellations/workflow.js +1 -1
- package/{v1 → src/v1}/examples/concurrency-rr/workflow.js +1 -1
- package/src/v1/examples/concurrency-types.d.ts +5 -0
- package/src/v1/examples/concurrency_cancel_in_progress/workflow.d.ts +9 -0
- package/src/v1/examples/concurrency_cancel_in_progress/workflow.js +45 -0
- package/src/v1/examples/concurrency_cancel_newest/workflow.d.ts +9 -0
- package/src/v1/examples/concurrency_cancel_newest/workflow.js +45 -0
- package/src/v1/examples/concurrency_limit_rr/load.js +54 -0
- package/src/v1/examples/concurrency_limit_rr/run.js +39 -0
- package/src/v1/examples/concurrency_limit_rr/worker.js +24 -0
- package/src/v1/examples/concurrency_limit_rr/workflow.d.ts +12 -0
- package/src/v1/examples/concurrency_limit_rr/workflow.js +62 -0
- package/src/v1/examples/concurrency_multiple_keys/workflow.d.ts +12 -0
- package/src/v1/examples/concurrency_multiple_keys/workflow.js +42 -0
- package/src/v1/examples/concurrency_workflow_level/workflow.d.ts +13 -0
- package/src/v1/examples/concurrency_workflow_level/workflow.js +49 -0
- package/{v1/examples/dag_match_condition → src/v1/examples/conditions}/complex-workflow.js +2 -2
- package/{v1/examples/dag_match_condition → src/v1/examples/conditions}/workflow.js +2 -2
- package/{v1 → src/v1}/examples/dag/interface-workflow.d.ts +2 -2
- package/src/v1/examples/dag_match_condition/complex-workflow.d.ts +1 -0
- package/src/v1/examples/dag_match_condition/complex-workflow.js +107 -0
- package/src/v1/examples/dag_match_condition/run.js +25 -0
- package/src/v1/examples/dag_match_condition/worker.js +24 -0
- package/src/v1/examples/dag_match_condition/workflow.d.ts +11 -0
- package/src/v1/examples/dag_match_condition/workflow.js +41 -0
- package/{v1 → src/v1}/examples/deep/workflow.js +1 -1
- package/src/v1/examples/durable/workflow.d.ts +7 -0
- package/src/v1/examples/durable/workflow.js +116 -0
- package/{v1 → src/v1}/examples/durable-event/workflow.js +1 -1
- package/src/v1/examples/durable-sleep/event.js +28 -0
- package/{v1 → src/v1}/examples/durable-sleep/workflow.js +1 -1
- package/src/v1/examples/durable_event/event.js +28 -0
- package/src/v1/examples/durable_event/run.js +30 -0
- package/src/v1/examples/durable_event/worker.js +24 -0
- package/src/v1/examples/durable_event/workflow.d.ts +6 -0
- package/src/v1/examples/durable_event/workflow.js +46 -0
- package/src/v1/examples/durable_sleep/event.js +28 -0
- package/src/v1/examples/durable_sleep/run.js +30 -0
- package/src/v1/examples/durable_sleep/worker.js +24 -0
- package/src/v1/examples/durable_sleep/workflow.d.ts +1 -0
- package/src/v1/examples/durable_sleep/workflow.js +31 -0
- package/src/v1/examples/e2e-worker.js +82 -0
- package/src/v1/examples/events/filter.js +32 -0
- package/{v1 → src/v1}/examples/hatchet-client.d.ts +1 -1
- package/{v1 → src/v1}/examples/hatchet-client.js +1 -1
- package/{v1 → src/v1}/examples/high-memory/workflow-with-child.js +1 -1
- package/{v1 → src/v1}/examples/landing_page/durable-excution.js +1 -1
- package/{v1 → src/v1}/examples/landing_page/flow-control.js +1 -1
- package/src/v1/examples/legacy/workflow.d.ts +2 -0
- package/{examples → src/v1/examples/logger}/byo-logger.js +1 -1
- package/src/v1/examples/logger/workflow.d.ts +2 -0
- package/src/v1/examples/logger/workflow.js +38 -0
- package/src/v1/examples/logging/byo-logger.js +73 -0
- package/src/v1/examples/logging/logger.js +46 -0
- package/{v1 → src/v1}/examples/middleware/client.d.ts +1 -1
- package/{v1 → src/v1}/examples/middleware/client.js +1 -1
- package/{v1 → src/v1}/examples/middleware/recipes.js +1 -1
- package/{v1 → src/v1}/examples/migration-guides/hatchet-client.d.ts +1 -1
- package/{v1 → src/v1}/examples/migration-guides/hatchet-client.js +1 -1
- package/{v1 → src/v1}/examples/multiple_wf_concurrency/workflow.d.ts +1 -1
- package/{v1 → src/v1}/examples/multiple_wf_concurrency/workflow.js +3 -3
- package/{v1 → src/v1}/examples/non_retryable/workflow.js +1 -1
- package/src/v1/examples/on_event/event.js +53 -0
- package/src/v1/examples/on_event/worker.js +24 -0
- package/src/v1/examples/on_event/workflow.d.ts +19 -0
- package/src/v1/examples/on_event/workflow.js +60 -0
- package/{v1 → src/v1}/examples/on_failure/workflow.d.ts +1 -0
- package/{v1 → src/v1}/examples/on_failure/workflow.js +12 -7
- package/{v1 → src/v1}/examples/priority/run.js +1 -1
- package/src/v1/examples/priority/workflow.d.ts +8 -0
- package/{v1 → src/v1}/examples/priority/workflow.js +2 -2
- package/{v1 → src/v1}/examples/quickstart/hatchet-client.d.ts +1 -1
- package/{v1 → src/v1}/examples/quickstart/hatchet-client.js +1 -1
- package/src/v1/examples/quickstart/run.d.ts +1 -0
- package/src/v1/examples/quickstart/worker.d.ts +1 -0
- package/src/v1/examples/rate_limit/workflow.d.ts +1 -0
- package/{v1 → src/v1}/examples/rate_limit/workflow.js +1 -1
- package/src/v1/examples/retries/run.d.ts +1 -0
- package/src/v1/examples/retries/worker.d.ts +1 -0
- package/{v1 → src/v1}/examples/retries/workflow.js +2 -2
- package/src/v1/examples/return_exceptions/workflow.d.ts +6 -0
- package/src/v1/examples/return_exceptions/workflow.js +22 -0
- package/src/v1/examples/run_details/workflow.d.ts +4 -0
- package/src/v1/examples/run_details/workflow.js +65 -0
- package/src/v1/examples/runtime_affinity/workflow.d.ts +3 -0
- package/src/v1/examples/runtime_affinity/workflow.js +19 -0
- package/src/v1/examples/simple/bulk.d.ts +1 -0
- package/src/v1/examples/simple/client-run.d.ts +1 -0
- package/src/v1/examples/simple/cron.d.ts +1 -0
- package/src/v1/examples/simple/delay.d.ts +1 -0
- package/src/v1/examples/simple/e2e-workflows.d.ts +14 -0
- package/src/v1/examples/simple/e2e-workflows.js +27 -0
- package/src/v1/examples/simple/enqueue.d.ts +1 -0
- package/{v1 → src/v1}/examples/simple/enqueue.js +2 -2
- package/src/v1/examples/simple/replay-cancel.d.ts +1 -0
- package/{v1 → src/v1}/examples/simple/replay-cancel.js +1 -1
- package/src/v1/examples/simple/schedule.d.ts +1 -0
- package/src/v1/examples/simple/typed-run-methods.d.ts +1 -0
- package/src/v1/examples/simple/worker.d.ts +1 -0
- package/src/v1/examples/sticky/run.d.ts +1 -0
- package/src/v1/examples/sticky/worker.d.ts +1 -0
- package/src/v1/examples/sticky/workflow.d.ts +5 -0
- package/{v1 → src/v1}/examples/sticky/workflow.js +2 -2
- package/src/v1/examples/streaming/run.d.ts +1 -0
- package/src/v1/examples/streaming/worker.d.ts +1 -0
- package/src/v1/examples/timeout/run.d.ts +1 -0
- package/src/v1/examples/timeout/run.js +30 -0
- package/src/v1/examples/timeout/worker.d.ts +1 -0
- package/src/v1/examples/timeout/worker.js +25 -0
- package/src/v1/examples/timeout/workflow.d.ts +10 -0
- package/src/v1/examples/timeout/workflow.js +56 -0
- package/src/v1/examples/timeouts/run.d.ts +1 -0
- package/src/v1/examples/timeouts/worker.d.ts +1 -0
- package/{v1 → src/v1}/examples/timeouts/workflow.js +1 -1
- package/src/v1/examples/webhooks/workflow.d.ts +5 -0
- package/src/v1/examples/webhooks/workflow.js +23 -0
- package/{v1 → src/v1}/examples/with_timeouts/workflow.js +1 -1
- package/{v1 → src/v1}/index.d.ts +1 -0
- package/{v1 → src/v1}/index.js +1 -0
- package/{v1 → src/v1}/parent-run-context-vars.d.ts +6 -0
- package/{v1 → src/v1}/parent-run-context-vars.js +3 -0
- package/{v1 → src/v1}/task.d.ts +22 -7
- package/src/v1/task.js +14 -0
- package/{v1 → src/v1}/types.d.ts +1 -1
- package/src/v1/types.js +2 -0
- package/src/version.d.ts +1 -0
- package/{version.js → src/version.js} +1 -1
- package/src/workflow.d.ts +3 -0
- package/src/workflow.js +25 -0
- package/clients/hatchet-client/hatchet-client.js +0 -108
- package/clients/hatchet-client/index.d.ts +0 -3
- package/clients/rest/api.js +0 -13
- package/clients/worker/handler.d.ts +0 -50
- package/clients/worker/handler.js +0 -214
- package/clients/worker/index.d.ts +0 -1
- package/clients/worker/worker.d.ts +0 -59
- package/clients/worker/worker.js +0 -568
- package/examples/webhooks.js +0 -45
- package/sdk.d.ts +0 -2
- package/util/hatchet-promise/hatchet-promise.d.ts +0 -6
- package/util/logger/index.d.ts +0 -1
- package/util/sleep.js +0 -14
- package/v1/client/features/ratelimits.d.ts +0 -20
- package/v1/client/features/webhooks.d.ts +0 -28
- package/v1/client/features/workers.d.ts +0 -14
- package/v1/client/features/workflows.d.ts +0 -24
- package/v1/examples/legacy/workflow.d.ts +0 -2
- package/v1/examples/priority/workflow.d.ts +0 -8
- package/v1/examples/sticky/workflow.d.ts +0 -5
- package/v1/task.js +0 -11
- package/version.d.ts +0 -1
- /package/{clients/dispatcher/heartbeat/heartbeat-worker.d.ts → docs/generate.d.ts} +0 -0
- /package/{clients → src/clients}/admin/index.d.ts +0 -0
- /package/{clients → src/clients}/admin/index.js +0 -0
- /package/{examples/affinity-workers.d.ts → src/clients/dispatcher/heartbeat/heartbeat-worker.d.ts} +0 -0
- /package/{clients → src/clients}/rest/api.d.ts +0 -0
- /package/{clients → src/clients}/rest/generated/Api.js +0 -0
- /package/{clients → src/clients}/rest/generated/data-contracts.js +0 -0
- /package/{clients → src/clients}/rest/generated/http-client.d.ts +0 -0
- /package/{clients → src/clients}/rest/generated/http-client.js +0 -0
- /package/{clients → src/clients}/rest/index.d.ts +0 -0
- /package/{clients → src/clients}/rest/index.js +0 -0
- /package/{v1/examples/affinity → src/legacy/examples}/affinity-workers.d.ts +0 -0
- /package/{examples → src/legacy/examples}/bulk-fanout-trigger.d.ts +0 -0
- /package/{examples → src/legacy/examples}/bulk-fanout-worker.d.ts +0 -0
- /package/{examples → src/legacy/examples}/bulk-trigger.d.ts +0 -0
- /package/{examples → src/legacy/examples}/byo-logger.d.ts +0 -0
- /package/{v1/examples/logging → src/legacy/examples}/byo-logger.js +0 -0
- /package/{examples → src/legacy/examples}/concurrency/cancel-in-progress/concurrency-event.d.ts +0 -0
- /package/{examples → src/legacy/examples}/concurrency/cancel-in-progress/concurrency-worker.d.ts +0 -0
- /package/{examples → src/legacy/examples}/concurrency/group-round-robin/concurrency-event.d.ts +0 -0
- /package/{examples → src/legacy/examples}/concurrency/group-round-robin/concurrency-worker-expression.d.ts +0 -0
- /package/{examples → src/legacy/examples}/concurrency/group-round-robin/concurrency-worker-key-fn.d.ts +0 -0
- /package/{examples → src/legacy/examples}/crons/programatic-crons.d.ts +0 -0
- /package/{examples → src/legacy/examples}/dag-worker.d.ts +0 -0
- /package/{examples → src/legacy/examples}/example-event-with-results.d.ts +0 -0
- /package/{examples → src/legacy/examples}/example-event.d.ts +0 -0
- /package/{examples → src/legacy/examples}/fanout-worker.d.ts +0 -0
- /package/{examples → src/legacy/examples}/logger.d.ts +0 -0
- /package/{examples → src/legacy/examples}/manual-trigger.d.ts +0 -0
- /package/{examples → src/legacy/examples}/multi-workflow.d.ts +0 -0
- /package/{examples → src/legacy/examples}/namespaced-worker.d.ts +0 -0
- /package/{examples → src/legacy/examples}/on-failure.d.ts +0 -0
- /package/{examples → src/legacy/examples}/rate-limit/events.d.ts +0 -0
- /package/{examples → src/legacy/examples}/rate-limit/worker.d.ts +0 -0
- /package/{examples → src/legacy/examples}/retries-with-backoff.d.ts +0 -0
- /package/{examples → src/legacy/examples}/retries-worker.d.ts +0 -0
- /package/{examples → src/legacy/examples}/scheduled-runs/programatic-schedules.d.ts +0 -0
- /package/{examples → src/legacy/examples}/sticky-trigger.d.ts +0 -0
- /package/{examples → src/legacy/examples}/sticky-worker-with-check.d.ts +0 -0
- /package/{examples → src/legacy/examples}/sticky-worker.d.ts +0 -0
- /package/{examples → src/legacy/examples}/stream-by-additional-meta.d.ts +0 -0
- /package/{protoc → src/protoc}/dispatcher/dispatcher.d.ts +0 -0
- /package/{protoc → src/protoc}/dispatcher/dispatcher.js +0 -0
- /package/{protoc → src/protoc}/dispatcher/index.d.ts +0 -0
- /package/{protoc → src/protoc}/dispatcher/index.js +0 -0
- /package/{protoc → src/protoc}/events/events.d.ts +0 -0
- /package/{protoc → src/protoc}/events/events.js +0 -0
- /package/{protoc → src/protoc}/events/index.d.ts +0 -0
- /package/{protoc → src/protoc}/events/index.js +0 -0
- /package/{protoc → src/protoc}/google/protobuf/timestamp.d.ts +0 -0
- /package/{protoc → src/protoc}/google/protobuf/timestamp.js +0 -0
- /package/{protoc → src/protoc}/google/protobuf/wrappers.d.ts +0 -0
- /package/{protoc → src/protoc}/google/protobuf/wrappers.js +0 -0
- /package/{protoc → src/protoc}/v1/dispatcher.d.ts +0 -0
- /package/{protoc → src/protoc}/v1/dispatcher.js +0 -0
- /package/{protoc → src/protoc}/v1/shared/condition.d.ts +0 -0
- /package/{protoc → src/protoc}/v1/shared/condition.js +0 -0
- /package/{protoc → src/protoc}/workflows/index.d.ts +0 -0
- /package/{protoc → src/protoc}/workflows/index.js +0 -0
- /package/{protoc → src/protoc}/workflows/v1-admin.d.ts +0 -0
- /package/{protoc → src/protoc}/workflows/v1-admin.js +0 -0
- /package/{util → src/util}/apply-namespace.d.ts +0 -0
- /package/{util → src/util}/apply-namespace.js +0 -0
- /package/{util → src/util}/batch.d.ts +0 -0
- /package/{util → src/util}/batch.js +0 -0
- /package/{util → src/util}/config-loader/index.d.ts +0 -0
- /package/{util → src/util}/config-loader/index.js +0 -0
- /package/{util → src/util}/config-loader/token.d.ts +0 -0
- /package/{util → src/util}/config-loader/token.js +0 -0
- /package/{util → src/util}/errors/hatchet-error.d.ts +0 -0
- /package/{util → src/util}/errors/hatchet-error.js +0 -0
- /package/{util → src/util}/grpc-helpers.js +0 -0
- /package/{util → src/util}/logger/logger.js +0 -0
- /package/{util → src/util}/parse.d.ts +0 -0
- /package/{util → src/util}/parse.js +0 -0
- /package/{util → src/util}/retrier.d.ts +0 -0
- /package/{util → src/util}/retrier.js +0 -0
- /package/{util → src/util}/thread-helper.d.ts +0 -0
- /package/{util → src/util}/thread-helper.js +0 -0
- /package/{util → src/util}/uuid.d.ts +0 -0
- /package/{util → src/util}/uuid.js +0 -0
- /package/{v1 → src/v1}/client/client.interface.js +0 -0
- /package/{v1 → src/v1}/client/duration.d.ts +0 -0
- /package/{v1 → src/v1}/client/duration.js +0 -0
- /package/{v1 → src/v1}/client/features/index.d.ts +0 -0
- /package/{v1 → src/v1}/client/features/index.js +0 -0
- /package/{v1 → src/v1}/client/features/tenant.js +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/deprecation.js +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/index.d.ts +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/index.js +0 -0
- /package/{v1 → src/v1}/client/worker/deprecated/legacy-worker.d.ts +0 -0
- /package/{v1 → src/v1}/client/worker/health-server.js +0 -0
- /package/{v1 → src/v1}/client/worker/slot-utils.js +0 -0
- /package/{v1 → src/v1}/conditions/base.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/base.js +0 -0
- /package/{v1 → src/v1}/conditions/index.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/index.js +0 -0
- /package/{v1 → src/v1}/conditions/parent-condition.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/parent-condition.js +0 -0
- /package/{v1 → src/v1}/conditions/sleep-condition.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/sleep-condition.js +0 -0
- /package/{v1 → src/v1}/conditions/transformer.js +0 -0
- /package/{v1 → src/v1}/conditions/user-event-condition.d.ts +0 -0
- /package/{v1 → src/v1}/conditions/user-event-condition.js +0 -0
- /package/{examples/webhooks.d.ts → src/v1/examples/affinity/affinity-workers.d.ts} +0 -0
- /package/{v1/examples/cancellations → src/v1/examples/cancellation}/run.d.ts +0 -0
- /package/{v1/examples/cancellations → src/v1/examples/cancellation}/worker.d.ts +0 -0
- /package/{v1/examples/child_workflows → src/v1/examples/cancellations}/run.d.ts +0 -0
- /package/{v1/examples/child_workflows → src/v1/examples/cancellations}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/cancellations/worker.js +0 -0
- /package/{v1 → src/v1}/examples/cancellations/workflow.d.ts +0 -0
- /package/{v1/examples/concurrency-rr → src/v1/examples/child_workflows}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/run.js +0 -0
- /package/{v1/examples/concurrency-rr → src/v1/examples/child_workflows}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/worker.js +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/child_workflows/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/load.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/load.js +0 -0
- /package/{v1/examples/dag → src/v1/examples/concurrency-rr}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/run.js +0 -0
- /package/{v1/examples/dag → src/v1/examples/concurrency-rr}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/worker.js +0 -0
- /package/{v1 → src/v1}/examples/concurrency-rr/workflow.d.ts +0 -0
- /package/{v1/types.js → src/v1/examples/concurrency-types.js} +0 -0
- /package/{v1/examples/dag_match_condition/event.d.ts → src/v1/examples/concurrency_limit_rr/load.d.ts} +0 -0
- /package/{v1/examples/dag_match_condition → src/v1/examples/concurrency_limit_rr}/run.d.ts +0 -0
- /package/{v1/examples/dag_match_condition → src/v1/examples/concurrency_limit_rr}/worker.d.ts +0 -0
- /package/{v1/examples/dag_match_condition → src/v1/examples/conditions}/complex-workflow.d.ts +0 -0
- /package/{v1/examples/durable-event → src/v1/examples/conditions}/event.d.ts +0 -0
- /package/{v1/examples/dag_match_condition → src/v1/examples/conditions}/event.js +0 -0
- /package/{v1/examples/deep → src/v1/examples/conditions}/run.d.ts +0 -0
- /package/{v1/examples/dag_match_condition → src/v1/examples/conditions}/run.js +0 -0
- /package/{v1/examples/deep → src/v1/examples/conditions}/worker.d.ts +0 -0
- /package/{v1/examples/dag_match_condition → src/v1/examples/conditions}/worker.js +0 -0
- /package/{v1/examples/dag_match_condition → src/v1/examples/conditions}/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag/interface-workflow.js +0 -0
- /package/{v1/examples/durable-event → src/v1/examples/dag}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag/run.js +0 -0
- /package/{v1/examples/durable-event → src/v1/examples/dag}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag/worker.js +0 -0
- /package/{v1 → src/v1}/examples/dag/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/dag/workflow.js +0 -0
- /package/{v1/examples/durable-sleep → src/v1/examples/dag_match_condition}/event.d.ts +0 -0
- /package/{v1/examples/durable-sleep → src/v1/examples/dag_match_condition}/event.js +0 -0
- /package/{v1/examples/durable-sleep → src/v1/examples/dag_match_condition}/run.d.ts +0 -0
- /package/{v1/examples/durable-sleep → src/v1/examples/dag_match_condition}/worker.d.ts +0 -0
- /package/{v1/examples/high-memory → src/v1/examples/deep}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/deep/run.js +0 -0
- /package/{v1/examples/inferred-typing → src/v1/examples/deep}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/deep/worker.js +0 -0
- /package/{v1 → src/v1}/examples/deep/workflow.d.ts +0 -0
- /package/{v1/examples/on_event → src/v1/examples/durable-event}/event.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-event/event.js +0 -0
- /package/{v1/examples/inferred-typing → src/v1/examples/durable-event}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-event/run.js +0 -0
- /package/{v1/examples/legacy → src/v1/examples/durable-event}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-event/worker.js +0 -0
- /package/{v1 → src/v1}/examples/durable-event/workflow.d.ts +0 -0
- /package/{v1/examples/high-memory/child-worker.d.ts → src/v1/examples/durable-sleep/event.d.ts} +0 -0
- /package/{v1/examples/legacy → src/v1/examples/durable-sleep}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/run.js +0 -0
- /package/{v1/examples/middleware → src/v1/examples/durable-sleep}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/worker.js +0 -0
- /package/{v1 → src/v1}/examples/durable-sleep/workflow.d.ts +0 -0
- /package/{v1/examples/high-memory/parent-worker.d.ts → src/v1/examples/durable_event/event.d.ts} +0 -0
- /package/{v1/examples/middleware → src/v1/examples/durable_event}/run.d.ts +0 -0
- /package/{v1/examples/multiple_wf_concurrency → src/v1/examples/durable_event}/worker.d.ts +0 -0
- /package/{v1/examples/landing_page/scheduling.d.ts → src/v1/examples/durable_sleep/event.d.ts} +0 -0
- /package/{v1/examples/multiple_wf_concurrency → src/v1/examples/durable_sleep}/run.d.ts +0 -0
- /package/{v1/examples/non_retryable → src/v1/examples/durable_sleep}/worker.d.ts +0 -0
- /package/{v1/examples/logging/byo-logger.d.ts → src/v1/examples/e2e-worker.d.ts} +0 -0
- /package/{v1/examples/logging/logger.d.ts → src/v1/examples/events/event.d.ts} +0 -0
- /package/{v1/examples/on_event → src/v1/examples/events}/event.js +0 -0
- /package/{v1/examples/on_event → src/v1/examples/events}/filter.d.ts +0 -0
- /package/{v1/examples/on_cron → src/v1/examples/events}/worker.d.ts +0 -0
- /package/{v1/examples/on_event → src/v1/examples/events}/worker.js +0 -0
- /package/{v1/examples/on_event → src/v1/examples/events}/workflow.d.ts +0 -0
- /package/{v1/examples/on_event → src/v1/examples/events}/workflow.js +0 -0
- /package/{v1/examples/middleware/recipes.d.ts → src/v1/examples/high-memory/child-worker.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/high-memory/child-worker.js +0 -0
- /package/{v1/examples/non_retryable/run.d.ts → src/v1/examples/high-memory/parent-worker.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/high-memory/parent-worker.js +0 -0
- /package/{v1/examples/on_failure → src/v1/examples/high-memory}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/high-memory/run.js +0 -0
- /package/{v1 → src/v1}/examples/high-memory/workflow-with-child.d.ts +0 -0
- /package/{v1/examples/on_success → src/v1/examples/inferred-typing}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/run.js +0 -0
- /package/{v1/examples/on_event → src/v1/examples/inferred-typing}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/worker.js +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/inferred-typing/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/landing_page/durable-excution.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/event-signaling.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/event-signaling.js +0 -0
- /package/{v1 → src/v1}/examples/landing_page/flow-control.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/queues.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/queues.js +0 -0
- /package/{v1/examples/on_failure/worker.d.ts → src/v1/examples/landing_page/scheduling.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/landing_page/scheduling.js +0 -0
- /package/{v1 → src/v1}/examples/landing_page/task-routing.d.ts +0 -0
- /package/{v1 → src/v1}/examples/landing_page/task-routing.js +0 -0
- /package/{v1/examples/priority → src/v1/examples/legacy}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/legacy/run.js +0 -0
- /package/{v1/examples/on_success → src/v1/examples/legacy}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/legacy/worker.js +0 -0
- /package/{v1 → src/v1}/examples/legacy/workflow.js +0 -0
- /package/{v1/examples/priority/worker.d.ts → src/v1/examples/logger/byo-logger.d.ts} +0 -0
- /package/{v1/examples/quickstart/run.d.ts → src/v1/examples/logger/logger.d.ts} +0 -0
- /package/{v1/examples/logging → src/v1/examples/logger}/logger.js +0 -0
- /package/{v1/examples/quickstart/worker.d.ts → src/v1/examples/logging/byo-logger.d.ts} +0 -0
- /package/{v1/examples/rate_limit/workflow.d.ts → src/v1/examples/logging/logger.d.ts} +0 -0
- /package/{v1/examples/retries/run.d.ts → src/v1/examples/middleware/recipes.d.ts} +0 -0
- /package/{v1/examples/sticky → src/v1/examples/middleware}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/middleware/run.js +0 -0
- /package/{v1/examples/retries → src/v1/examples/middleware}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/middleware/worker.js +0 -0
- /package/{v1 → src/v1}/examples/middleware/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/middleware/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/migration-guides/mergent.d.ts +0 -0
- /package/{v1 → src/v1}/examples/migration-guides/mergent.js +0 -0
- /package/{v1/examples/streaming → src/v1/examples/multiple_wf_concurrency}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/multiple_wf_concurrency/run.js +0 -0
- /package/{v1/examples/simple → src/v1/examples/multiple_wf_concurrency}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/multiple_wf_concurrency/worker.js +0 -0
- /package/{v1/examples/timeouts → src/v1/examples/non_retryable}/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/non_retryable/run.js +0 -0
- /package/{v1/examples/sticky → src/v1/examples/non_retryable}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/non_retryable/worker.js +0 -0
- /package/{v1 → src/v1}/examples/non_retryable/workflow.d.ts +0 -0
- /package/{v1/examples/streaming → src/v1/examples/on_cron}/worker.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_cron/worker.js +0 -0
- /package/{v1 → src/v1}/examples/on_cron/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_cron/workflow.js +0 -0
- /package/{v1/examples/simple/bulk.d.ts → src/v1/examples/on_event/event.d.ts} +0 -0
- /package/{v1/examples/simple/client-run.d.ts → src/v1/examples/on_event/filter.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/on_event/filter.js +0 -0
- /package/{v1/examples/timeouts → src/v1/examples/on_event}/worker.d.ts +0 -0
- /package/{v1/examples/simple/cron.d.ts → src/v1/examples/on_failure/run.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/on_failure/run.js +0 -0
- /package/{v1/examples/simple/delay.d.ts → src/v1/examples/on_failure/worker.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/on_failure/worker.js +0 -0
- /package/{v1/examples/simple/enqueue.d.ts → src/v1/examples/on_success/run.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/on_success/run.js +0 -0
- /package/{v1/examples/simple/replay-cancel.d.ts → src/v1/examples/on_success/worker.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/on_success/worker.js +0 -0
- /package/{v1 → src/v1}/examples/on_success/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/on_success/workflow.js +0 -0
- /package/{v1/examples/simple/schedule.d.ts → src/v1/examples/priority/run.d.ts} +0 -0
- /package/{v1/examples/simple/typed-run-methods.d.ts → src/v1/examples/priority/worker.d.ts} +0 -0
- /package/{v1 → src/v1}/examples/priority/worker.js +0 -0
- /package/{v1 → src/v1}/examples/quickstart/run.js +0 -0
- /package/{v1 → src/v1}/examples/quickstart/worker.js +0 -0
- /package/{v1 → src/v1}/examples/quickstart/workflows/first-task.d.ts +0 -0
- /package/{v1 → src/v1}/examples/quickstart/workflows/first-task.js +0 -0
- /package/{v1 → src/v1}/examples/retries/run.js +0 -0
- /package/{v1 → src/v1}/examples/retries/worker.js +0 -0
- /package/{v1 → src/v1}/examples/retries/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/bulk.js +0 -0
- /package/{v1 → src/v1}/examples/simple/client-run.js +0 -0
- /package/{v1 → src/v1}/examples/simple/cron.js +0 -0
- /package/{v1 → src/v1}/examples/simple/delay.js +0 -0
- /package/{v1 → src/v1}/examples/simple/run.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/run.js +0 -0
- /package/{v1 → src/v1}/examples/simple/schedule.js +0 -0
- /package/{v1 → src/v1}/examples/simple/stub-workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/stub-workflow.js +0 -0
- /package/{v1 → src/v1}/examples/simple/typed-run-methods.js +0 -0
- /package/{v1 → src/v1}/examples/simple/worker.js +0 -0
- /package/{v1 → src/v1}/examples/simple/workflow-with-child.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/workflow-with-child.js +0 -0
- /package/{v1 → src/v1}/examples/simple/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/simple/zod.d.ts +0 -0
- /package/{v1 → src/v1}/examples/simple/zod.js +0 -0
- /package/{v1 → src/v1}/examples/sticky/run.js +0 -0
- /package/{v1 → src/v1}/examples/sticky/worker.js +0 -0
- /package/{v1 → src/v1}/examples/streaming/nextjs-proxy.d.ts +0 -0
- /package/{v1 → src/v1}/examples/streaming/nextjs-proxy.js +0 -0
- /package/{v1 → src/v1}/examples/streaming/run.js +0 -0
- /package/{v1 → src/v1}/examples/streaming/worker.js +0 -0
- /package/{v1 → src/v1}/examples/streaming/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/streaming/workflow.js +0 -0
- /package/{v1 → src/v1}/examples/timeouts/run.js +0 -0
- /package/{v1 → src/v1}/examples/timeouts/worker.js +0 -0
- /package/{v1 → src/v1}/examples/timeouts/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/examples/with_timeouts/workflow.d.ts +0 -0
- /package/{v1 → src/v1}/slot-types.d.ts +0 -0
- /package/{v1 → src/v1}/slot-types.js +0 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isLegacyWorkflow = isLegacyWorkflow;
|
|
4
|
+
exports.warnLegacyWorkflow = warnLegacyWorkflow;
|
|
5
|
+
exports.transformLegacyWorkflow = transformLegacyWorkflow;
|
|
6
|
+
exports.normalizeWorkflow = normalizeWorkflow;
|
|
7
|
+
exports.normalizeWorkflows = normalizeWorkflows;
|
|
8
|
+
exports.getWorkflowName = getWorkflowName;
|
|
9
|
+
const step_1 = require("../../legacy/step");
|
|
10
|
+
const declaration_1 = require("../v1/declaration");
|
|
11
|
+
const LEGACY_WORKFLOW_WARNING = [
|
|
12
|
+
'',
|
|
13
|
+
'\x1b[33m╔══════════════════════════════════════════════════════════════════════════════╗',
|
|
14
|
+
'║ ║',
|
|
15
|
+
'║ ⚠ DEPRECATION WARNING: Legacy workflow format detected. ║',
|
|
16
|
+
'║ ║',
|
|
17
|
+
'║ Please migrate to the v1 SDK: ║',
|
|
18
|
+
'║ https://docs.hatchet.run/home/migration-guide-typescript ║',
|
|
19
|
+
'║ ║',
|
|
20
|
+
'╚══════════════════════════════════════════════════════════════════════════════╝\x1b[0m',
|
|
21
|
+
'',
|
|
22
|
+
].join('\n');
|
|
23
|
+
/**
|
|
24
|
+
* Type guard: returns true if the workflow is a legacy v0 Workflow (not a BaseWorkflowDeclaration).
|
|
25
|
+
*/
|
|
26
|
+
function isLegacyWorkflow(workflow) {
|
|
27
|
+
return (workflow != null &&
|
|
28
|
+
typeof workflow === 'object' &&
|
|
29
|
+
!(workflow instanceof declaration_1.BaseWorkflowDeclaration) &&
|
|
30
|
+
'id' in workflow &&
|
|
31
|
+
'steps' in workflow &&
|
|
32
|
+
Array.isArray(workflow.steps));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Emits a deprecation warning for legacy workflow usage.
|
|
36
|
+
*/
|
|
37
|
+
function warnLegacyWorkflow() {
|
|
38
|
+
console.warn(LEGACY_WORKFLOW_WARNING);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Transforms a legacy v0 Workflow into a v1 WorkflowDeclaration.
|
|
42
|
+
*
|
|
43
|
+
* The transformed declaration can be registered with a worker and executed
|
|
44
|
+
* by the v1 runtime. Legacy step `run` functions are wrapped to receive
|
|
45
|
+
* a V0Context for backwards compatibility.
|
|
46
|
+
*/
|
|
47
|
+
function transformLegacyWorkflow(workflow) {
|
|
48
|
+
// Map concurrency
|
|
49
|
+
let concurrency;
|
|
50
|
+
if (workflow.concurrency) {
|
|
51
|
+
if (workflow.concurrency.key) {
|
|
52
|
+
console.warn('[hatchet] Legacy concurrency key functions are not supported in v1. ' +
|
|
53
|
+
'Use CEL expressions instead: https://docs.hatchet.run/home/v1-sdk-improvements');
|
|
54
|
+
}
|
|
55
|
+
concurrency = {
|
|
56
|
+
expression: workflow.concurrency.expression || workflow.concurrency.name,
|
|
57
|
+
maxRuns: workflow.concurrency.maxRuns,
|
|
58
|
+
limitStrategy: workflow.concurrency.limitStrategy,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const opts = {
|
|
62
|
+
name: workflow.id,
|
|
63
|
+
description: workflow.description,
|
|
64
|
+
version: workflow.version,
|
|
65
|
+
sticky: workflow.sticky != null ? workflow.sticky : undefined,
|
|
66
|
+
on: workflow.on ? workflow.on : undefined,
|
|
67
|
+
concurrency,
|
|
68
|
+
taskDefaults: {
|
|
69
|
+
executionTimeout: workflow.timeout,
|
|
70
|
+
scheduleTimeout: workflow.scheduleTimeout,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
const declaration = new declaration_1.WorkflowDeclaration(opts);
|
|
74
|
+
// Build task lookup for parent resolution (parents are strings in legacy, objects in v1)
|
|
75
|
+
const taskMap = {};
|
|
76
|
+
for (const step of workflow.steps) {
|
|
77
|
+
const taskOpts = legacyStepToTaskOpts(step, taskMap, workflow.timeout);
|
|
78
|
+
taskMap[step.name] = taskOpts;
|
|
79
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
80
|
+
declaration.definition._tasks.push(taskOpts);
|
|
81
|
+
}
|
|
82
|
+
// Handle onFailure
|
|
83
|
+
if (workflow.onFailure) {
|
|
84
|
+
declaration.definition.onFailure = {
|
|
85
|
+
fn: wrapLegacyStepRun(workflow.onFailure),
|
|
86
|
+
executionTimeout: (workflow.onFailure.timeout || workflow.timeout),
|
|
87
|
+
retries: workflow.onFailure.retries,
|
|
88
|
+
rateLimits: mapLegacyRateLimits(workflow.onFailure.rate_limits),
|
|
89
|
+
desiredWorkerLabels: workflow.onFailure.worker_labels,
|
|
90
|
+
backoff: workflow.onFailure.backoff,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return declaration;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Converts a legacy CreateStep to a v1 CreateWorkflowTaskOpts.
|
|
97
|
+
*/
|
|
98
|
+
function legacyStepToTaskOpts(step, taskMap, workflowTimeout) {
|
|
99
|
+
var _a;
|
|
100
|
+
return {
|
|
101
|
+
name: step.name,
|
|
102
|
+
fn: wrapLegacyStepRun(step),
|
|
103
|
+
executionTimeout: (step.timeout || workflowTimeout),
|
|
104
|
+
retries: step.retries,
|
|
105
|
+
rateLimits: mapLegacyRateLimits(step.rate_limits),
|
|
106
|
+
desiredWorkerLabels: step.worker_labels,
|
|
107
|
+
backoff: step.backoff,
|
|
108
|
+
parents: (_a = step.parents) === null || _a === void 0 ? void 0 : _a.map((name) => taskMap[name]).filter(Boolean),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Wraps a legacy step's `run(ctx: V0Context)` function into a v1-compatible
|
|
113
|
+
* `fn(input, ctx: Context)` function by constructing a V0Context at runtime.
|
|
114
|
+
*/
|
|
115
|
+
function wrapLegacyStepRun(step) {
|
|
116
|
+
return (input, ctx) => {
|
|
117
|
+
// Access the V1Worker from the ContextWorker's private field.
|
|
118
|
+
// This is intentionally accessing a private field for legacy compatibility.
|
|
119
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
120
|
+
const v1Worker = ctx.worker.worker;
|
|
121
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
122
|
+
const v0ctx = new step_1.V0Context(ctx.action, ctx.v1.v0, v1Worker);
|
|
123
|
+
// Share the abort controller so cancellation propagates
|
|
124
|
+
v0ctx.controller = ctx.controller;
|
|
125
|
+
return step.run(v0ctx);
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Maps legacy rate limits to v1 format.
|
|
130
|
+
*/
|
|
131
|
+
function mapLegacyRateLimits(limits) {
|
|
132
|
+
if (!limits)
|
|
133
|
+
return undefined;
|
|
134
|
+
return limits.map((l) => ({
|
|
135
|
+
staticKey: l.staticKey || l.key,
|
|
136
|
+
dynamicKey: l.dynamicKey,
|
|
137
|
+
units: l.units,
|
|
138
|
+
limit: l.limit,
|
|
139
|
+
duration: l.duration,
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Normalizes a workflow: if it is a legacy Workflow, emits a deprecation warning
|
|
144
|
+
* and transforms it into a BaseWorkflowDeclaration. If already a v1 declaration,
|
|
145
|
+
* returns it as-is.
|
|
146
|
+
*/
|
|
147
|
+
function normalizeWorkflow(workflow) {
|
|
148
|
+
if (isLegacyWorkflow(workflow)) {
|
|
149
|
+
warnLegacyWorkflow();
|
|
150
|
+
return transformLegacyWorkflow(workflow);
|
|
151
|
+
}
|
|
152
|
+
return workflow;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Normalizes an array of workflows, transforming any legacy workflows and
|
|
156
|
+
* emitting deprecation warnings.
|
|
157
|
+
*/
|
|
158
|
+
function normalizeWorkflows(workflows) {
|
|
159
|
+
return workflows.map(normalizeWorkflow);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Extracts the workflow name from a workflow-like value.
|
|
163
|
+
* Works for strings, BaseWorkflowDeclaration, WorkflowDefinition, and legacy Workflow.
|
|
164
|
+
* Emits a deprecation warning if a legacy workflow is detected.
|
|
165
|
+
*/
|
|
166
|
+
function getWorkflowName(workflow) {
|
|
167
|
+
if (typeof workflow === 'string') {
|
|
168
|
+
return workflow;
|
|
169
|
+
}
|
|
170
|
+
if (workflow instanceof declaration_1.BaseWorkflowDeclaration) {
|
|
171
|
+
return workflow.name;
|
|
172
|
+
}
|
|
173
|
+
if (isLegacyWorkflow(workflow)) {
|
|
174
|
+
warnLegacyWorkflow();
|
|
175
|
+
return workflow.id;
|
|
176
|
+
}
|
|
177
|
+
if ('name' in workflow) {
|
|
178
|
+
return workflow.name;
|
|
179
|
+
}
|
|
180
|
+
throw new Error('Invalid workflow: must be a string, BaseWorkflowDeclaration, or legacy Workflow object');
|
|
181
|
+
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { JsonObject } from '@bufbuild/protobuf';
|
|
3
3
|
import { Workflow } from './workflow';
|
|
4
|
-
import { Action } from '
|
|
5
|
-
import { LogLevel } from '
|
|
6
|
-
import { Logger } from '
|
|
7
|
-
import WorkflowRunRef from '
|
|
8
|
-
import { WorkerLabels } from '
|
|
9
|
-
import { CreateStepRateLimit, RateLimitDuration, WorkerLabelComparator } from '
|
|
10
|
-
import { CreateWorkflowTaskOpts, Priority } from '
|
|
11
|
-
import { RunOpts, TaskWorkflowDeclaration, BaseWorkflowDeclaration as WorkflowV1 } from '
|
|
12
|
-
import { Conditions } from '
|
|
13
|
-
import { Duration } from '
|
|
14
|
-
import { JsonValue, OutputType } from '
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { LegacyHatchetClient } from './clients/hatchet-client';
|
|
4
|
+
import { Action } from '../clients/dispatcher/action-listener';
|
|
5
|
+
import { LogLevel } from '../clients/event/event-client';
|
|
6
|
+
import { Logger } from '../util/logger';
|
|
7
|
+
import WorkflowRunRef from '../util/workflow-run-ref';
|
|
8
|
+
import { WorkerLabels } from '../clients/dispatcher/dispatcher-client';
|
|
9
|
+
import { CreateStepRateLimit, RateLimitDuration, WorkerLabelComparator } from '../protoc/workflows';
|
|
10
|
+
import { CreateWorkflowTaskOpts, Priority } from '../v1';
|
|
11
|
+
import { RunOpts, TaskWorkflowDeclaration, BaseWorkflowDeclaration as WorkflowV1 } from '../v1/declaration';
|
|
12
|
+
import { Conditions } from '../v1/conditions';
|
|
13
|
+
import { Duration } from '../v1/client/duration';
|
|
14
|
+
import { JsonValue, OutputType } from '../v1/types';
|
|
15
|
+
import { InternalWorker } from '../v1/client/worker/worker-internal';
|
|
16
|
+
import { LegacyHatchetClient } from './legacy-client';
|
|
18
17
|
export declare const CreateRateLimitSchema: z.ZodObject<{
|
|
19
18
|
key: z.ZodOptional<z.ZodString>;
|
|
20
19
|
staticKey: z.ZodOptional<z.ZodString>;
|
|
@@ -25,17 +24,17 @@ export declare const CreateRateLimitSchema: z.ZodObject<{
|
|
|
25
24
|
}, "strip", z.ZodTypeAny, {
|
|
26
25
|
units: string | number;
|
|
27
26
|
key?: string | undefined;
|
|
27
|
+
duration?: RateLimitDuration | undefined;
|
|
28
28
|
staticKey?: string | undefined;
|
|
29
29
|
dynamicKey?: string | undefined;
|
|
30
30
|
limit?: string | number | undefined;
|
|
31
|
-
duration?: RateLimitDuration | undefined;
|
|
32
31
|
}, {
|
|
33
32
|
units: string | number;
|
|
34
33
|
key?: string | undefined;
|
|
34
|
+
duration?: RateLimitDuration | undefined;
|
|
35
35
|
staticKey?: string | undefined;
|
|
36
36
|
dynamicKey?: string | undefined;
|
|
37
37
|
limit?: string | number | undefined;
|
|
38
|
-
duration?: RateLimitDuration | undefined;
|
|
39
38
|
}>;
|
|
40
39
|
export declare const DesiredWorkerLabelSchema: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
41
40
|
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
@@ -45,13 +44,13 @@ export declare const DesiredWorkerLabelSchema: z.ZodOptional<z.ZodUnion<[z.ZodSt
|
|
|
45
44
|
}, "strip", z.ZodTypeAny, {
|
|
46
45
|
value: string | number;
|
|
47
46
|
required?: boolean | undefined;
|
|
48
|
-
weight?: number | undefined;
|
|
49
47
|
comparator?: WorkerLabelComparator | undefined;
|
|
48
|
+
weight?: number | undefined;
|
|
50
49
|
}, {
|
|
51
50
|
value: string | number;
|
|
52
51
|
required?: boolean | undefined;
|
|
53
|
-
weight?: number | undefined;
|
|
54
52
|
comparator?: WorkerLabelComparator | undefined;
|
|
53
|
+
weight?: number | undefined;
|
|
55
54
|
}>]>>;
|
|
56
55
|
export declare const CreateStepSchema: z.ZodObject<{
|
|
57
56
|
name: z.ZodString;
|
|
@@ -68,17 +67,17 @@ export declare const CreateStepSchema: z.ZodObject<{
|
|
|
68
67
|
}, "strip", z.ZodTypeAny, {
|
|
69
68
|
units: string | number;
|
|
70
69
|
key?: string | undefined;
|
|
70
|
+
duration?: RateLimitDuration | undefined;
|
|
71
71
|
staticKey?: string | undefined;
|
|
72
72
|
dynamicKey?: string | undefined;
|
|
73
73
|
limit?: string | number | undefined;
|
|
74
|
-
duration?: RateLimitDuration | undefined;
|
|
75
74
|
}, {
|
|
76
75
|
units: string | number;
|
|
77
76
|
key?: string | undefined;
|
|
77
|
+
duration?: RateLimitDuration | undefined;
|
|
78
78
|
staticKey?: string | undefined;
|
|
79
79
|
dynamicKey?: string | undefined;
|
|
80
80
|
limit?: string | number | undefined;
|
|
81
|
-
duration?: RateLimitDuration | undefined;
|
|
82
81
|
}>, "many">>;
|
|
83
82
|
worker_labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodLazy<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
84
83
|
value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
@@ -88,13 +87,13 @@ export declare const CreateStepSchema: z.ZodObject<{
|
|
|
88
87
|
}, "strip", z.ZodTypeAny, {
|
|
89
88
|
value: string | number;
|
|
90
89
|
required?: boolean | undefined;
|
|
91
|
-
weight?: number | undefined;
|
|
92
90
|
comparator?: WorkerLabelComparator | undefined;
|
|
91
|
+
weight?: number | undefined;
|
|
93
92
|
}, {
|
|
94
93
|
value: string | number;
|
|
95
94
|
required?: boolean | undefined;
|
|
96
|
-
weight?: number | undefined;
|
|
97
95
|
comparator?: WorkerLabelComparator | undefined;
|
|
96
|
+
weight?: number | undefined;
|
|
98
97
|
}>]>>>>>;
|
|
99
98
|
backoff: z.ZodOptional<z.ZodObject<{
|
|
100
99
|
factor: z.ZodOptional<z.ZodNumber>;
|
|
@@ -114,16 +113,16 @@ export declare const CreateStepSchema: z.ZodObject<{
|
|
|
114
113
|
rate_limits?: {
|
|
115
114
|
units: string | number;
|
|
116
115
|
key?: string | undefined;
|
|
116
|
+
duration?: RateLimitDuration | undefined;
|
|
117
117
|
staticKey?: string | undefined;
|
|
118
118
|
dynamicKey?: string | undefined;
|
|
119
119
|
limit?: string | number | undefined;
|
|
120
|
-
duration?: RateLimitDuration | undefined;
|
|
121
120
|
}[] | undefined;
|
|
122
121
|
worker_labels?: Record<string, string | number | {
|
|
123
122
|
value: string | number;
|
|
124
123
|
required?: boolean | undefined;
|
|
125
|
-
weight?: number | undefined;
|
|
126
124
|
comparator?: WorkerLabelComparator | undefined;
|
|
125
|
+
weight?: number | undefined;
|
|
127
126
|
} | undefined> | undefined;
|
|
128
127
|
backoff?: {
|
|
129
128
|
factor?: number | undefined;
|
|
@@ -137,16 +136,16 @@ export declare const CreateStepSchema: z.ZodObject<{
|
|
|
137
136
|
rate_limits?: {
|
|
138
137
|
units: string | number;
|
|
139
138
|
key?: string | undefined;
|
|
139
|
+
duration?: RateLimitDuration | undefined;
|
|
140
140
|
staticKey?: string | undefined;
|
|
141
141
|
dynamicKey?: string | undefined;
|
|
142
142
|
limit?: string | number | undefined;
|
|
143
|
-
duration?: RateLimitDuration | undefined;
|
|
144
143
|
}[] | undefined;
|
|
145
144
|
worker_labels?: Record<string, string | number | {
|
|
146
145
|
value: string | number;
|
|
147
146
|
required?: boolean | undefined;
|
|
148
|
-
weight?: number | undefined;
|
|
149
147
|
comparator?: WorkerLabelComparator | undefined;
|
|
148
|
+
weight?: number | undefined;
|
|
150
149
|
} | undefined> | undefined;
|
|
151
150
|
backoff?: {
|
|
152
151
|
factor?: number | undefined;
|
|
@@ -169,9 +168,9 @@ interface ContextData<T, K> {
|
|
|
169
168
|
user_data: K;
|
|
170
169
|
step_run_errors: Record<string, string>;
|
|
171
170
|
}
|
|
172
|
-
export declare class
|
|
171
|
+
export declare class V0ContextWorker {
|
|
173
172
|
private worker;
|
|
174
|
-
constructor(worker:
|
|
173
|
+
constructor(worker: InternalWorker);
|
|
175
174
|
/**
|
|
176
175
|
* Gets the ID of the worker.
|
|
177
176
|
* @returns The ID of the worker.
|
|
@@ -201,11 +200,11 @@ export declare class V0Context<T, K = {}> {
|
|
|
201
200
|
controller: AbortController;
|
|
202
201
|
action: Action;
|
|
203
202
|
v0: LegacyHatchetClient;
|
|
204
|
-
worker:
|
|
203
|
+
worker: V0ContextWorker;
|
|
205
204
|
overridesData: Record<string, any>;
|
|
206
205
|
logger: Logger;
|
|
207
206
|
spawnIndex: number;
|
|
208
|
-
constructor(action: Action, client: LegacyHatchetClient, worker:
|
|
207
|
+
constructor(action: Action, client: LegacyHatchetClient, worker: InternalWorker);
|
|
209
208
|
get abortController(): AbortController;
|
|
210
209
|
get cancelled(): boolean;
|
|
211
210
|
/**
|
|
@@ -286,7 +285,7 @@ export declare class V0Context<T, K = {}> {
|
|
|
286
285
|
/**
|
|
287
286
|
* Gets the ID of the current task run.
|
|
288
287
|
* @returns The task run ID.
|
|
289
|
-
* @deprecated use taskRunExternalId
|
|
288
|
+
* @deprecated use taskRunExternalId instead
|
|
290
289
|
*/
|
|
291
290
|
taskRunId(): string;
|
|
292
291
|
/**
|
|
@@ -45,20 +45,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.V0DurableContext = exports.V0Context = exports.
|
|
48
|
+
exports.V0DurableContext = exports.V0Context = exports.V0ContextWorker = exports.CreateStepSchema = exports.DesiredWorkerLabelSchema = exports.CreateRateLimitSchema = void 0;
|
|
49
49
|
exports.mapRateLimit = mapRateLimit;
|
|
50
50
|
/* eslint-disable no-underscore-dangle */
|
|
51
51
|
/* eslint-disable max-classes-per-file */
|
|
52
|
-
const hatchet_error_1 = __importDefault(require("
|
|
52
|
+
const hatchet_error_1 = __importDefault(require("../../util/errors/hatchet-error"));
|
|
53
53
|
const z = __importStar(require("zod"));
|
|
54
|
-
const parse_1 = require("
|
|
55
|
-
const workflows_1 = require("
|
|
56
|
-
const v1_1 = require("
|
|
57
|
-
const declaration_1 = require("
|
|
58
|
-
const conditions_1 = require("
|
|
59
|
-
const condition_1 = require("
|
|
60
|
-
const transformer_1 = require("
|
|
61
|
-
const apply_namespace_1 = require("
|
|
54
|
+
const parse_1 = require("../util/parse");
|
|
55
|
+
const workflows_1 = require("../protoc/workflows");
|
|
56
|
+
const v1_1 = require("../v1");
|
|
57
|
+
const declaration_1 = require("../v1/declaration");
|
|
58
|
+
const conditions_1 = require("../v1/conditions");
|
|
59
|
+
const condition_1 = require("../protoc/v1/shared/condition");
|
|
60
|
+
const transformer_1 = require("../v1/conditions/transformer");
|
|
61
|
+
const apply_namespace_1 = require("../util/apply-namespace");
|
|
62
62
|
exports.CreateRateLimitSchema = z.object({
|
|
63
63
|
key: z.string().optional(),
|
|
64
64
|
staticKey: z.string().optional(),
|
|
@@ -96,7 +96,7 @@ exports.CreateStepSchema = z.object({
|
|
|
96
96
|
})
|
|
97
97
|
.optional(),
|
|
98
98
|
});
|
|
99
|
-
class
|
|
99
|
+
class V0ContextWorker {
|
|
100
100
|
constructor(worker) {
|
|
101
101
|
this.worker = worker;
|
|
102
102
|
}
|
|
@@ -131,7 +131,7 @@ class ContextWorker {
|
|
|
131
131
|
return this.worker.upsertLabels(labels);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
exports.
|
|
134
|
+
exports.V0ContextWorker = V0ContextWorker;
|
|
135
135
|
class V0Context {
|
|
136
136
|
constructor(action, client, worker) {
|
|
137
137
|
// @deprecated use ctx.abortController instead
|
|
@@ -143,7 +143,7 @@ class V0Context {
|
|
|
143
143
|
this.data = data;
|
|
144
144
|
this.action = action;
|
|
145
145
|
this.v0 = client;
|
|
146
|
-
this.worker = new
|
|
146
|
+
this.worker = new V0ContextWorker(worker);
|
|
147
147
|
this.logger = client.config.logger(`Context Logger`, client.config.log_level);
|
|
148
148
|
// if this is a getGroupKeyRunId, the data is the workflow input
|
|
149
149
|
if (action.getGroupKeyRunId !== '') {
|
|
@@ -286,10 +286,10 @@ class V0Context {
|
|
|
286
286
|
/**
|
|
287
287
|
* Gets the ID of the current task run.
|
|
288
288
|
* @returns The task run ID.
|
|
289
|
-
* @deprecated use taskRunExternalId
|
|
289
|
+
* @deprecated use taskRunExternalId instead
|
|
290
290
|
*/
|
|
291
291
|
taskRunId() {
|
|
292
|
-
return this.taskRunExternalId
|
|
292
|
+
return this.action.taskRunExternalId;
|
|
293
293
|
}
|
|
294
294
|
/**
|
|
295
295
|
* Gets the number of times the current task has been retried.
|
|
@@ -654,7 +654,8 @@ function mapRateLimit(limits) {
|
|
|
654
654
|
});
|
|
655
655
|
}
|
|
656
656
|
// Helper function to validate CEL expressions
|
|
657
|
-
|
|
657
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
658
|
+
function validateCelExpression(expr) {
|
|
658
659
|
// This is a placeholder. In a real implementation, you'd need to use a CEL parser or validator.
|
|
659
660
|
// For now, we'll just return true to mimic the behavior.
|
|
660
661
|
return true;
|