@fluidgrids/cli 2026.1108.1 → 2026.1109.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +9705 -33
  3. package/package.json +36 -32
  4. package/dist/auth/device-login.d.ts +0 -31
  5. package/dist/auth/device-login.d.ts.map +0 -1
  6. package/dist/auth/device-login.js +0 -75
  7. package/dist/auth/device-login.js.map +0 -1
  8. package/dist/auth/token-auth.d.ts +0 -49
  9. package/dist/auth/token-auth.d.ts.map +0 -1
  10. package/dist/auth/token-auth.js +0 -279
  11. package/dist/auth/token-auth.js.map +0 -1
  12. package/dist/cli.d.ts +0 -10
  13. package/dist/cli.d.ts.map +0 -1
  14. package/dist/cli.js.map +0 -1
  15. package/dist/code-first/api.d.ts +0 -607
  16. package/dist/code-first/api.d.ts.map +0 -1
  17. package/dist/code-first/api.js +0 -438
  18. package/dist/code-first/api.js.map +0 -1
  19. package/dist/code-first/code-upload.d.ts +0 -68
  20. package/dist/code-first/code-upload.d.ts.map +0 -1
  21. package/dist/code-first/code-upload.js +0 -223
  22. package/dist/code-first/code-upload.js.map +0 -1
  23. package/dist/code-first/commands/codegen.d.ts +0 -20
  24. package/dist/code-first/commands/codegen.d.ts.map +0 -1
  25. package/dist/code-first/commands/codegen.js +0 -50
  26. package/dist/code-first/commands/codegen.js.map +0 -1
  27. package/dist/code-first/commands/diff.d.ts +0 -28
  28. package/dist/code-first/commands/diff.d.ts.map +0 -1
  29. package/dist/code-first/commands/diff.js +0 -73
  30. package/dist/code-first/commands/diff.js.map +0 -1
  31. package/dist/code-first/commands/hotfix.d.ts +0 -55
  32. package/dist/code-first/commands/hotfix.d.ts.map +0 -1
  33. package/dist/code-first/commands/hotfix.js +0 -231
  34. package/dist/code-first/commands/hotfix.js.map +0 -1
  35. package/dist/code-first/commands/import.d.ts +0 -40
  36. package/dist/code-first/commands/import.d.ts.map +0 -1
  37. package/dist/code-first/commands/import.js +0 -235
  38. package/dist/code-first/commands/import.js.map +0 -1
  39. package/dist/code-first/commands/init.d.ts +0 -33
  40. package/dist/code-first/commands/init.d.ts.map +0 -1
  41. package/dist/code-first/commands/init.js +0 -177
  42. package/dist/code-first/commands/init.js.map +0 -1
  43. package/dist/code-first/commands/interface.d.ts +0 -12
  44. package/dist/code-first/commands/interface.d.ts.map +0 -1
  45. package/dist/code-first/commands/interface.js +0 -21
  46. package/dist/code-first/commands/interface.js.map +0 -1
  47. package/dist/code-first/commands/pull.d.ts +0 -63
  48. package/dist/code-first/commands/pull.d.ts.map +0 -1
  49. package/dist/code-first/commands/pull.js +0 -266
  50. package/dist/code-first/commands/pull.js.map +0 -1
  51. package/dist/code-first/commands/push.d.ts +0 -104
  52. package/dist/code-first/commands/push.d.ts.map +0 -1
  53. package/dist/code-first/commands/push.js +0 -320
  54. package/dist/code-first/commands/push.js.map +0 -1
  55. package/dist/code-first/commands/replay.d.ts +0 -44
  56. package/dist/code-first/commands/replay.d.ts.map +0 -1
  57. package/dist/code-first/commands/replay.js +0 -271
  58. package/dist/code-first/commands/replay.js.map +0 -1
  59. package/dist/code-first/commands/runs.d.ts +0 -168
  60. package/dist/code-first/commands/runs.d.ts.map +0 -1
  61. package/dist/code-first/commands/runs.js +0 -598
  62. package/dist/code-first/commands/runs.js.map +0 -1
  63. package/dist/code-first/commands/suite.d.ts +0 -57
  64. package/dist/code-first/commands/suite.d.ts.map +0 -1
  65. package/dist/code-first/commands/suite.js +0 -197
  66. package/dist/code-first/commands/suite.js.map +0 -1
  67. package/dist/code-first/commands/validate.d.ts +0 -38
  68. package/dist/code-first/commands/validate.d.ts.map +0 -1
  69. package/dist/code-first/commands/validate.js +0 -140
  70. package/dist/code-first/commands/validate.js.map +0 -1
  71. package/dist/code-first/commands/versions.d.ts +0 -63
  72. package/dist/code-first/commands/versions.d.ts.map +0 -1
  73. package/dist/code-first/commands/versions.js +0 -204
  74. package/dist/code-first/commands/versions.js.map +0 -1
  75. package/dist/code-first/connections.d.ts +0 -55
  76. package/dist/code-first/connections.d.ts.map +0 -1
  77. package/dist/code-first/connections.js +0 -180
  78. package/dist/code-first/connections.js.map +0 -1
  79. package/dist/code-first/durable-operations.d.ts +0 -41
  80. package/dist/code-first/durable-operations.d.ts.map +0 -1
  81. package/dist/code-first/durable-operations.js +0 -135
  82. package/dist/code-first/durable-operations.js.map +0 -1
  83. package/dist/code-first/history.d.ts +0 -30
  84. package/dist/code-first/history.d.ts.map +0 -1
  85. package/dist/code-first/history.js +0 -139
  86. package/dist/code-first/history.js.map +0 -1
  87. package/dist/code-first/imports.d.ts +0 -22
  88. package/dist/code-first/imports.d.ts.map +0 -1
  89. package/dist/code-first/imports.js +0 -67
  90. package/dist/code-first/imports.js.map +0 -1
  91. package/dist/code-first/index.d.ts +0 -18
  92. package/dist/code-first/index.d.ts.map +0 -1
  93. package/dist/code-first/index.js +0 -36
  94. package/dist/code-first/index.js.map +0 -1
  95. package/dist/code-first/junit.d.ts +0 -24
  96. package/dist/code-first/junit.d.ts.map +0 -1
  97. package/dist/code-first/junit.js +0 -163
  98. package/dist/code-first/junit.js.map +0 -1
  99. package/dist/code-first/lowering.d.ts +0 -104
  100. package/dist/code-first/lowering.d.ts.map +0 -1
  101. package/dist/code-first/lowering.js +0 -254
  102. package/dist/code-first/lowering.js.map +0 -1
  103. package/dist/code-first/operations.d.ts +0 -55
  104. package/dist/code-first/operations.d.ts.map +0 -1
  105. package/dist/code-first/operations.js +0 -165
  106. package/dist/code-first/operations.js.map +0 -1
  107. package/dist/code-first/parity-operations.d.ts +0 -44
  108. package/dist/code-first/parity-operations.d.ts.map +0 -1
  109. package/dist/code-first/parity-operations.js +0 -211
  110. package/dist/code-first/parity-operations.js.map +0 -1
  111. package/dist/code-first/parity.d.ts +0 -83
  112. package/dist/code-first/parity.d.ts.map +0 -1
  113. package/dist/code-first/parity.js +0 -301
  114. package/dist/code-first/parity.js.map +0 -1
  115. package/dist/code-first/presigned.d.ts +0 -21
  116. package/dist/code-first/presigned.d.ts.map +0 -1
  117. package/dist/code-first/presigned.js +0 -85
  118. package/dist/code-first/presigned.js.map +0 -1
  119. package/dist/code-first/project.d.ts +0 -130
  120. package/dist/code-first/project.d.ts.map +0 -1
  121. package/dist/code-first/project.js +0 -308
  122. package/dist/code-first/project.js.map +0 -1
  123. package/dist/code-first/python-build.d.ts +0 -78
  124. package/dist/code-first/python-build.d.ts.map +0 -1
  125. package/dist/code-first/python-build.js +0 -268
  126. package/dist/code-first/python-build.js.map +0 -1
  127. package/dist/code-first/python.d.ts +0 -103
  128. package/dist/code-first/python.d.ts.map +0 -1
  129. package/dist/code-first/python.js +0 -260
  130. package/dist/code-first/python.js.map +0 -1
  131. package/dist/code-first/redact.d.ts +0 -31
  132. package/dist/code-first/redact.d.ts.map +0 -1
  133. package/dist/code-first/redact.js +0 -159
  134. package/dist/code-first/redact.js.map +0 -1
  135. package/dist/code-first/register.d.ts +0 -35
  136. package/dist/code-first/register.d.ts.map +0 -1
  137. package/dist/code-first/register.js +0 -420
  138. package/dist/code-first/register.js.map +0 -1
  139. package/dist/code-first/remote.d.ts +0 -58
  140. package/dist/code-first/remote.d.ts.map +0 -1
  141. package/dist/code-first/remote.js +0 -126
  142. package/dist/code-first/remote.js.map +0 -1
  143. package/dist/code-first/replay.d.ts +0 -36
  144. package/dist/code-first/replay.d.ts.map +0 -1
  145. package/dist/code-first/replay.js +0 -52
  146. package/dist/code-first/replay.js.map +0 -1
  147. package/dist/code-first/shared.d.ts +0 -53
  148. package/dist/code-first/shared.d.ts.map +0 -1
  149. package/dist/code-first/shared.js +0 -94
  150. package/dist/code-first/shared.js.map +0 -1
  151. package/dist/code-first/test-suite-operations.d.ts +0 -16
  152. package/dist/code-first/test-suite-operations.d.ts.map +0 -1
  153. package/dist/code-first/test-suite-operations.js +0 -44
  154. package/dist/code-first/test-suite-operations.js.map +0 -1
  155. package/dist/config/apply.d.ts +0 -51
  156. package/dist/config/apply.d.ts.map +0 -1
  157. package/dist/config/apply.js +0 -121
  158. package/dist/config/apply.js.map +0 -1
  159. package/dist/config/commands.d.ts +0 -58
  160. package/dist/config/commands.d.ts.map +0 -1
  161. package/dist/config/commands.js +0 -252
  162. package/dist/config/commands.js.map +0 -1
  163. package/dist/config/profiles.d.ts +0 -108
  164. package/dist/config/profiles.d.ts.map +0 -1
  165. package/dist/config/profiles.js +0 -339
  166. package/dist/config/profiles.js.map +0 -1
  167. package/dist/flag-hint.d.ts +0 -46
  168. package/dist/flag-hint.d.ts.map +0 -1
  169. package/dist/flag-hint.js +0 -114
  170. package/dist/flag-hint.js.map +0 -1
  171. package/dist/modules.d.ts +0 -17
  172. package/dist/modules.d.ts.map +0 -1
  173. package/dist/modules.js +0 -65
  174. package/dist/modules.js.map +0 -1
  175. package/dist/phase-c/api.d.ts +0 -433
  176. package/dist/phase-c/api.d.ts.map +0 -1
  177. package/dist/phase-c/api.js +0 -334
  178. package/dist/phase-c/api.js.map +0 -1
  179. package/dist/phase-c/commands/activities.d.ts +0 -119
  180. package/dist/phase-c/commands/activities.d.ts.map +0 -1
  181. package/dist/phase-c/commands/activities.js +0 -287
  182. package/dist/phase-c/commands/activities.js.map +0 -1
  183. package/dist/phase-c/commands/batch.d.ts +0 -90
  184. package/dist/phase-c/commands/batch.d.ts.map +0 -1
  185. package/dist/phase-c/commands/batch.js +0 -296
  186. package/dist/phase-c/commands/batch.js.map +0 -1
  187. package/dist/phase-c/commands/queues.d.ts +0 -67
  188. package/dist/phase-c/commands/queues.d.ts.map +0 -1
  189. package/dist/phase-c/commands/queues.js +0 -183
  190. package/dist/phase-c/commands/queues.js.map +0 -1
  191. package/dist/phase-c/commands/run-control.d.ts +0 -76
  192. package/dist/phase-c/commands/run-control.d.ts.map +0 -1
  193. package/dist/phase-c/commands/run-control.js +0 -245
  194. package/dist/phase-c/commands/run-control.js.map +0 -1
  195. package/dist/phase-c/commands/schedules.d.ts +0 -63
  196. package/dist/phase-c/commands/schedules.d.ts.map +0 -1
  197. package/dist/phase-c/commands/schedules.js +0 -198
  198. package/dist/phase-c/commands/schedules.js.map +0 -1
  199. package/dist/phase-c/commands/search-attributes.d.ts +0 -30
  200. package/dist/phase-c/commands/search-attributes.d.ts.map +0 -1
  201. package/dist/phase-c/commands/search-attributes.js +0 -70
  202. package/dist/phase-c/commands/search-attributes.js.map +0 -1
  203. package/dist/phase-c/commands/signal-tokens.d.ts +0 -27
  204. package/dist/phase-c/commands/signal-tokens.d.ts.map +0 -1
  205. package/dist/phase-c/commands/signal-tokens.js +0 -68
  206. package/dist/phase-c/commands/signal-tokens.js.map +0 -1
  207. package/dist/phase-c/commands/worker-run.d.ts +0 -109
  208. package/dist/phase-c/commands/worker-run.d.ts.map +0 -1
  209. package/dist/phase-c/commands/worker-run.js +0 -484
  210. package/dist/phase-c/commands/worker-run.js.map +0 -1
  211. package/dist/phase-c/commands/workers.d.ts +0 -46
  212. package/dist/phase-c/commands/workers.d.ts.map +0 -1
  213. package/dist/phase-c/commands/workers.js +0 -140
  214. package/dist/phase-c/commands/workers.js.map +0 -1
  215. package/dist/phase-c/index.d.ts +0 -16
  216. package/dist/phase-c/index.d.ts.map +0 -1
  217. package/dist/phase-c/index.js +0 -25
  218. package/dist/phase-c/index.js.map +0 -1
  219. package/dist/phase-c/operations.d.ts +0 -67
  220. package/dist/phase-c/operations.d.ts.map +0 -1
  221. package/dist/phase-c/operations.js +0 -559
  222. package/dist/phase-c/operations.js.map +0 -1
  223. package/dist/phase-c/register.d.ts +0 -39
  224. package/dist/phase-c/register.d.ts.map +0 -1
  225. package/dist/phase-c/register.js +0 -678
  226. package/dist/phase-c/register.js.map +0 -1
  227. package/dist/phase-c/shared.d.ts +0 -44
  228. package/dist/phase-c/shared.d.ts.map +0 -1
  229. package/dist/phase-c/shared.js +0 -146
  230. package/dist/phase-c/shared.js.map +0 -1
  231. package/dist/product-defaults.d.ts +0 -11
  232. package/dist/product-defaults.d.ts.map +0 -1
  233. package/dist/product-defaults.js +0 -25
  234. package/dist/product-defaults.js.map +0 -1
  235. package/dist/program.d.ts +0 -25
  236. package/dist/program.d.ts.map +0 -1
  237. package/dist/program.js +0 -60
  238. package/dist/program.js.map +0 -1
@@ -1,678 +0,0 @@
1
- /**
2
- * Commander registrations of the Phase C command groups (BOFF-9906, CX7: this
3
- * package owns the command tree and its names; spec code-first 11 §2.36).
4
- *
5
- * | Group | Wraps |
6
- * |---|---|
7
- * | `config set\|get\|list\|delete\|migrate` | `~/.fluidgrids/config.toml` (local) |
8
- * | `queues list\|describe\|create\|update\|delete\|builds` | `taskQueues`, `taskQueueStats`, `taskQueueWorkers`, `create/update/deleteTaskQueue` |
9
- * | `workers list`, `workers tokens list\|create\|rotate\|delete\|allow-connections` | `workflowWorkers`, `workerTokens`, `create/rotate/deleteWorkerToken`, `setWorkerTokenConnectionAllowlist` |
10
- * | `worker run`, `dev [--lang ts\|py]` | the SDK worker (an ephemeral queue and token for `dev`) |
11
- * | `runs query\|update\|update-status\|reset\|trace` | `queryWorkflowRun`, `updateWorkflowRun`, `workflowRunUpdate`, `resetWorkflowRun(ToLastCleanTask)`, `workflowRunHierarchy` + `pending` |
12
- * | `runs batch <type>`, `batch list\|describe\|cancel` | `startBatchOperation/Terminate/Export`, `workflowBatchOperation(s)`, `cancelBatchOperation` |
13
- * | `activities …`, `activities pause-rules …` | the activity operations and pause rules |
14
- * | `signal-token create\|revoke\|list` | `create/revokeWorkflowSignalToken`, `workflowSignalTokens` |
15
- * | `search-attributes list\|create\|delete` | `workflowSearchAttributes`, `create/deleteWorkflowSearchAttribute` |
16
- * | `schedules list\|describe\|trigger\|backfill\|pause\|unpause` | `workflowScheduledJobs`, `workflowScheduleDescribe`, `trigger/backfill/pause/unpauseWorkflowSchedule` |
17
- *
18
- * Every implementation loads on first use, so the other commands start as fast
19
- * as before. Only types are imported statically here; keep it that way.
20
- */
21
- import { withGlobalFormat } from '../code-first/shared.js';
22
- const OUTPUT_OPTION = ['-f, --format <format>', 'Output format (json, table, yaml)'];
23
- const PROJECT_OPTION = [
24
- '--project <dir>',
25
- 'Project directory (default: nearest fluidgrids.config.json)',
26
- ];
27
- const FORCE_OPTION = ['--force', 'Skip the confirmation prompt'];
28
- function collect(value, previous = []) {
29
- return [...previous, value];
30
- }
31
- function envFactory(env) {
32
- let built;
33
- return async () => {
34
- if (!built) {
35
- const { phaseCEnv } = await import('./shared.js');
36
- built = phaseCEnv(env);
37
- }
38
- return built;
39
- };
40
- }
41
- function addTargetOptions(command) {
42
- return command
43
- .option('--workflow-id <id>', 'The latest run of this workflow id instead of a run id (with --key)')
44
- .option('--key <workflowKey>', 'With --workflow-id: the workflow key')
45
- .option('--first-run-id <id>', 'With --workflow-id: only the chain that started with this run');
46
- }
47
- function addSelectorOptions(command) {
48
- return command
49
- .option('--activity-id <id>', 'One activity of the run')
50
- .option('--type <activityType>', 'Every open activity of this node type (or user activity name)')
51
- .option('--all', 'Every open activity of the run');
52
- }
53
- function addActivityOptionFlags(command) {
54
- return command
55
- .option('--max-retries <n>', 'Retries after the first attempt')
56
- .option('--retry-delay <duration>', 'Delay before the first retry (ms, 1.5s, 5m, PT2H)')
57
- .option('--backoff <n>', 'Backoff multiplier (at least 1)')
58
- .option('--max-delay <duration>', 'Longest retry delay')
59
- .option('--retry-on <types>', 'Error types to retry (comma separated, repeatable)', collect)
60
- .option('--non-retryable <types>', 'Application failure types never retried (comma separated, repeatable)', collect)
61
- .option('--start-to-close <duration>', 'Start-to-close timeout')
62
- .option('--schedule-to-close <duration>', 'Schedule-to-close timeout')
63
- .option('--schedule-to-start <duration>', 'Schedule-to-start timeout')
64
- .option('--heartbeat-timeout <duration>', 'Heartbeat timeout');
65
- }
66
- // --------------------------------------------------------------------- config
67
- export function registerConfig(program, env) {
68
- const config = program
69
- .command('config')
70
- .description('Client profiles in ~/.fluidgrids/config.toml (read by the CLI and both SDKs; --profile picks one)');
71
- const configEnv = async () => {
72
- const { osKeychain } = await import('../config/profiles.js');
73
- return {
74
- ctx: env.ctx,
75
- env: process.env,
76
- keychain: osKeychain(),
77
- readStdin: async () => {
78
- if (process.stdin.isTTY)
79
- return '';
80
- const chunks = [];
81
- for await (const chunk of process.stdin) {
82
- chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(String(chunk)));
83
- }
84
- return Buffer.concat(chunks).toString('utf8');
85
- },
86
- };
87
- };
88
- const withProfile = (options, command) => {
89
- const resolved = withGlobalFormat(options, command);
90
- const profile = command.optsWithGlobals()['profile'];
91
- return typeof profile === 'string' ? { ...resolved, profile } : resolved;
92
- };
93
- config
94
- .command('set <key> [value]')
95
- .description('Set a profile key (apiUrl, workspace, product, environment, tokenRef, codecServerUrl, payloadConverter), `token` (into the OS keychain, from stdin or --from-env) or `defaultProfile`')
96
- .option('--from-env <VAR>', 'With `token`: read the token from this environment variable')
97
- .option(...OUTPUT_OPTION)
98
- .action(async (key, value, options, command) => {
99
- const { runConfigSet } = await import('../config/commands.js');
100
- await runConfigSet(await configEnv(), key, value, withProfile(options, command));
101
- });
102
- config
103
- .command('get [key]')
104
- .description('The resolved profile (environment overrides included); never a token')
105
- .option(...OUTPUT_OPTION)
106
- .action(async (key, options, command) => {
107
- const { runConfigGet } = await import('../config/commands.js');
108
- await runConfigGet(await configEnv(), key, withProfile(options, command));
109
- });
110
- config
111
- .command('list')
112
- .description('Every profile of the config file')
113
- .option(...OUTPUT_OPTION)
114
- .action(async (options, command) => {
115
- const { runConfigList } = await import('../config/commands.js');
116
- await runConfigList(await configEnv(), withProfile(options, command));
117
- });
118
- config
119
- .command('delete [key]')
120
- .description('Remove a key, or the whole profile (and the keychain token the CLI stored for it)')
121
- .option('--keep-token', 'With no key: keep the keychain token')
122
- .option(...OUTPUT_OPTION)
123
- .action(async (key, options, command) => {
124
- const { runConfigDelete } = await import('../config/commands.js');
125
- await runConfigDelete(await configEnv(), key, withProfile(options, command));
126
- });
127
- config
128
- .command('migrate')
129
- .description("Write the CLI's current workspace endpoint and workspace into a profile (tokens are never copied)")
130
- .option('--token-env <VAR>', "Point the profile's tokenRef at this environment variable")
131
- .option('--set-default', 'Make it the default profile')
132
- .option(...OUTPUT_OPTION)
133
- .action(async (options, command) => {
134
- const { runConfigMigrate } = await import('../config/commands.js');
135
- await runConfigMigrate(await configEnv(), withProfile(options, command));
136
- });
137
- }
138
- // ------------------------------------------------------------ queues, workers
139
- export function registerQueues(program, make) {
140
- const queues = program
141
- .command('queues')
142
- .description('Task queues: managed and the self-hosted queues of the workspace');
143
- queues
144
- .command('list')
145
- .description('The workspace task queues (taskQueues)')
146
- .option(...OUTPUT_OPTION)
147
- .action(async (options, command) => {
148
- const { runQueuesList } = await import('./commands/queues.js');
149
- await runQueuesList(await make(), withGlobalFormat(options, command));
150
- });
151
- queues
152
- .command('describe <name>')
153
- .description('Backlog, rates, pollers and workers of a queue (taskQueueStats, taskQueueWorkers)')
154
- .option('--environment <env>', 'DEV, STAGING or PROD (an environment-scoped queue)')
155
- .option(...OUTPUT_OPTION)
156
- .action(async (name, options, command) => {
157
- const { runQueuesDescribe } = await import('./commands/queues.js');
158
- await runQueuesDescribe(await make(), name, withGlobalFormat(options, command));
159
- });
160
- queues
161
- .command('create <name>')
162
- .description('Create a self-hosted task queue (needs fluidgrids.self-hosted-workers)')
163
- .option('--environment <env>', 'Scope it to DEV, STAGING or PROD (default: every environment)')
164
- .option('--description <text>', 'Description')
165
- .option('--max-tasks-per-second <n>', 'Activity dispatch rate limit (0.01 to 10000)')
166
- .option('--worker-unavailable-timeout <seconds>', 'How long an activity waits for a worker (10 s to 7 days; default 600)')
167
- .option(...OUTPUT_OPTION)
168
- .action(async (name, options, command) => {
169
- const { runQueuesCreate } = await import('./commands/queues.js');
170
- await runQueuesCreate(await make(), name, withGlobalFormat(options, command));
171
- });
172
- queues
173
- .command('update <name>')
174
- .description("Change a queue's description, rate limit or worker-unavailable timeout")
175
- .option('--environment <env>', 'The environment-scoped row to change')
176
- .option('--description <text>', 'New description (an empty string clears it)')
177
- .option('--max-tasks-per-second <n>', 'New rate limit')
178
- .option('--clear-max-tasks-per-second', 'Remove the rate limit')
179
- .option('--worker-unavailable-timeout <seconds>', 'New worker-unavailable timeout')
180
- .option(...OUTPUT_OPTION)
181
- .action(async (name, options, command) => {
182
- const { runQueuesUpdate } = await import('./commands/queues.js');
183
- await runQueuesUpdate(await make(), name, withGlobalFormat(options, command));
184
- });
185
- queues
186
- .command('delete <name>')
187
- .description('Delete a self-hosted queue (refused while open runs or activities use it)')
188
- .option('--environment <env>', 'The environment-scoped row to delete')
189
- .option(...FORCE_OPTION)
190
- .option(...OUTPUT_OPTION)
191
- .action(async (name, options, command) => {
192
- const { runQueuesDelete } = await import('./commands/queues.js');
193
- await runQueuesDelete(await make(), name, withGlobalFormat(options, command));
194
- });
195
- queues
196
- .command('builds <name>')
197
- .description("The build ids the queue's workers serve")
198
- .option(...OUTPUT_OPTION)
199
- .action(async (name, options, command) => {
200
- const { runQueuesBuilds } = await import('./commands/queues.js');
201
- await runQueuesBuilds(await make(), name, withGlobalFormat(options, command));
202
- });
203
- }
204
- export function registerWorkers(program, make) {
205
- const workers = program
206
- .command('workers')
207
- .description('Self-hosted workers of the workspace and their worker tokens');
208
- workers
209
- .command('list')
210
- .description('Connected (and recently ended) self-hosted workers (workflowWorkers)')
211
- .option('--queue <name>', 'Only workers serving this task queue')
212
- .option('--build-id <id>', 'Only workers serving this build')
213
- .option('--stale', 'Only stale workers (silent for 2 minutes)')
214
- .option('--not-stale', 'Only workers that are not stale')
215
- .option('--include-ended', 'Also workers that disconnected in the last 7 days')
216
- .option(...OUTPUT_OPTION)
217
- .action(async (options, command) => {
218
- const { runWorkersList } = await import('./commands/workers.js');
219
- await runWorkersList(await make(), withGlobalFormat(options, command));
220
- });
221
- const tokens = workers.command('tokens').description('Worker tokens (fgr_…)');
222
- tokens
223
- .command('list')
224
- .description('The worker tokens (never the tokens themselves)')
225
- .option(...OUTPUT_OPTION)
226
- .action(async (options, command) => {
227
- const { runTokensList } = await import('./commands/workers.js');
228
- await runTokensList(await make(), withGlobalFormat(options, command));
229
- });
230
- tokens
231
- .command('create <name>')
232
- .description('Issue a worker token for task queues; it is shown once')
233
- .option('--queue <names>', 'Self-hosted task queue (comma separated, repeatable)', collect)
234
- .option('--allow-connection <names>', 'Connections user activities may resolve through it (workspace admins; repeatable)', collect)
235
- .option(...OUTPUT_OPTION)
236
- .action(async (name, options, command) => {
237
- const { runTokensCreate } = await import('./commands/workers.js');
238
- await runTokensCreate(await make(), name, withGlobalFormat(options, command));
239
- });
240
- tokens
241
- .command('rotate <id>')
242
- .description('Issue a new token; the old one stops working and its workers disconnect')
243
- .option(...FORCE_OPTION)
244
- .option(...OUTPUT_OPTION)
245
- .action(async (id, options, command) => {
246
- const { runTokensRotate } = await import('./commands/workers.js');
247
- await runTokensRotate(await make(), id, withGlobalFormat(options, command));
248
- });
249
- tokens
250
- .command('delete <id>')
251
- .description('Delete a worker token; its workers disconnect')
252
- .option(...FORCE_OPTION)
253
- .option(...OUTPUT_OPTION)
254
- .action(async (id, options, command) => {
255
- const { runTokensDelete } = await import('./commands/workers.js');
256
- await runTokensDelete(await make(), id, withGlobalFormat(options, command));
257
- });
258
- tokens
259
- .command('allow-connections <id> [names...]')
260
- .description('Replace the connections user activities may resolve through a token (workspace admins; each release is audited)')
261
- .option('--clear', 'Allow no connection')
262
- .option(...OUTPUT_OPTION)
263
- .action(async (id, names, options, command) => {
264
- const { runTokensAllowConnections } = await import('./commands/workers.js');
265
- await runTokensAllowConnections(await make(), id, names, withGlobalFormat(options, command));
266
- });
267
- }
268
- function addWorkerOptions(command) {
269
- return command
270
- .option('--activities <module>', 'Activities to serve: a .ts/.js module (TypeScript) or a module name (Python)')
271
- .option('--no-workflows', 'Serve activities only, no workflow bundle')
272
- .option('--identity <name>', 'Worker identity (default hostname@pid)')
273
- .option('--max-concurrent-activities <n>', 'Activity slots (default 100)')
274
- .option('--max-concurrent-workflow-tasks <n>', 'Workflow task slots (default 4)')
275
- .option('--max-activities-per-second <n>', "This worker's activity start rate")
276
- .option('--metrics-port <port>', 'Serve Prometheus metrics on 127.0.0.1:<port>')
277
- .option('--bridge-url <url>', 'Bridge URL (default FLUIDGRIDS_BRIDGE_URL, else the workspace gateway /runner-bridge)')
278
- .option(...PROJECT_OPTION)
279
- .option(...OUTPUT_OPTION);
280
- }
281
- export function registerWorkerRun(program, make) {
282
- const worker = program.command('worker').description('Run a self-hosted worker for the project');
283
- addWorkerOptions(worker
284
- .command('run')
285
- .description("Serve the project's workflow bundle and activities on task queues (token from FLUIDGRIDS_WORKER_TOKEN)")
286
- .option('--queue <names>', 'Task queue to serve (comma separated, repeatable)', collect)
287
- .option('--build', 'Build the bundle now instead of using the one `push` wrote')
288
- .option('--token-env <VAR>', 'Read the worker token from this variable')).action(async (options, command) => {
289
- const { runWorkerRun } = await import('./commands/worker-run.js');
290
- await runWorkerRun(await make(), withGlobalFormat(options, command));
291
- });
292
- addWorkerOptions(program
293
- .command('dev')
294
- .description('Development loop: build, create an ephemeral queue and worker token, run the worker until Ctrl-C, then clean up')
295
- .option('--lang <lang>', 'ts or py (must match the project)')
296
- .option('--keep', 'Keep the ephemeral queue and token afterwards')).action(async (options, command) => {
297
- const { runDev } = await import('./commands/worker-run.js');
298
- await runDev(await make(), withGlobalFormat(options, command));
299
- });
300
- }
301
- // --------------------------------------------------------- runs, activities
302
- function runsGroup(program) {
303
- return (program.commands.find((command) => command.name() === 'runs') ??
304
- program.command('runs').description('FluidGrids workflow runs'));
305
- }
306
- export function registerRunControl(program, make) {
307
- const runs = runsGroup(program);
308
- addTargetOptions(runs
309
- .command('query <runIdOrName> [name]')
310
- .description('Ask a run a question without changing it: `<runId> <name>`, or `<name> --workflow-id <id> --key <key>` (needs fluidgrids.run-control)')
311
- .option('--args <json>', 'Query arguments (JSON)')
312
- .option('--reject-condition <condition>', 'none, not-open or not-completed-cleanly'))
313
- .option(...OUTPUT_OPTION)
314
- .action(async (first, second, options, command) => {
315
- const { runQuery } = await import('./commands/run-control.js');
316
- await runQuery(await make(), first, second, withGlobalFormat(options, command));
317
- });
318
- addTargetOptions(runs
319
- .command('update <runIdOrName> [name]')
320
- .description('Send an update to a durable run and wait for it (needs fluidgrids.run-control): `<runId> <name>`')
321
- .option('--args <json>', 'Update arguments (JSON)')
322
- .option('--update-id <id>', 'Idempotency id (default a new UUID)')
323
- .option('--wait-for <stage>', 'accepted or completed (default completed)')
324
- .option('--timeout <ms>', 'Give up waiting after this many milliseconds', '60000')
325
- .option('--poll-interval <ms>', 'Delay between polls of an accepted update', '1000'))
326
- .option(...OUTPUT_OPTION)
327
- .action(async (first, second, options, command) => {
328
- const { runUpdate } = await import('./commands/run-control.js');
329
- await runUpdate(await make(), first, second, withGlobalFormat(options, command));
330
- });
331
- addTargetOptions(runs
332
- .command('update-status <runIdOrUpdateId> [updateId]')
333
- .description('One update of a run by its update id (workflowRunUpdate): `<runId> <updateId>`'))
334
- .option(...OUTPUT_OPTION)
335
- .action(async (first, second, options, command) => {
336
- const { runUpdateStatus } = await import('./commands/run-control.js');
337
- await runUpdateStatus(await make(), first, second, withGlobalFormat(options, command));
338
- });
339
- addTargetOptions(runs
340
- .command('reset [runId]')
341
- .description('Reset a durable run to a completed workflow task; a new run continues from there (needs fluidgrids.run-control)')
342
- .option('--to <point>', 'A history seq, first-task, last-task, last-continue-as-new, build-id or last-clean-task')
343
- .option('--build-id <id>', 'With --to build-id: the bundle the reset steps back from')
344
- .option('--reason <text>', 'Reason recorded on both runs')
345
- .option('--no-reapply-signals', 'Do not re-apply the signals received after the reset point')
346
- .option('--no-reapply-updates', 'Do not re-apply the updates accepted after the reset point')
347
- .option(...FORCE_OPTION))
348
- .option(...OUTPUT_OPTION)
349
- .action(async (runId, options, command) => {
350
- const { runReset } = await import('./commands/run-control.js');
351
- await runReset(await make(), runId, withGlobalFormat(options, command));
352
- });
353
- addTargetOptions(runs
354
- .command('trace [runId]')
355
- .description('The run hierarchy with what each open run waits on (workflowRunHierarchy, pending)'))
356
- .option(...OUTPUT_OPTION)
357
- .action(async (runId, options, command) => {
358
- const { runTrace } = await import('./commands/run-control.js');
359
- await runTrace(await make(), runId, withGlobalFormat(options, command));
360
- });
361
- addActivityOptionFlags(addSelectorOptions(runs
362
- .command('batch <type>')
363
- .description('Apply an operation to many runs: signal, cancel, terminate, reset, pause-activity, unpause-activity, reset-activity, update-activity-options, update-run-options or export (needs fluidgrids.run-control)')
364
- .option('--run-id <ids>', 'The runs (comma separated, repeatable; at most 1,000)', collect)
365
- .option('--key <workflowKey>', 'Filter: runs of this workflow key')
366
- .option('--status <status>', 'Filter: runs with this status')
367
- .option('--kind <kind>', 'Filter: GRAPH or DURABLE_FN runs')
368
- .option('--workflow-id <id>', 'Filter: runs with this workflow id')
369
- .option('--first-run-id <id>', 'Filter: the chain that started with this run')
370
- .option('--search-attributes <json>', 'Filter: a search-attribute filter ({and, or, text}; needs fluidgrids.search-attributes)')
371
- .option('--filter <json>', 'Filter: a ListWorkflowRunsInput object')
372
- .option('--reason <text>', 'Why (recorded with the job and each operation)')
373
- .option('--rate <n>', 'Operations per second, 1 to 50 (default 50)')
374
- .option('--dry-run', 'Count the runs the job would select; start nothing')
375
- .option('--signal <name>', 'signal: the signal to send')
376
- .option('--payload <json>', 'signal: its payload')
377
- .option('--to <point>', 'reset: where to reset each run')
378
- .option('--build-id <id>', 'reset --to build-id: the bundle to step back from')
379
- .option('--no-reapply-signals', 'reset: do not re-apply signals')
380
- .option('--no-reapply-updates', 'reset: do not re-apply updates')
381
- .option('--reset-attempts', 'unpause-activity: restart the attempt count')
382
- .option('--reset-heartbeat', 'unpause-activity, reset-activity: drop heartbeat details')
383
- .option('--pin <version>', 'update-run-options: pin each run to this version')
384
- .option('--auto-upgrade', 'update-run-options: move each run to the active version')
385
- .option('--clear-override', "update-run-options: remove each run's override")
386
- .option(...FORCE_OPTION)))
387
- .option(...OUTPUT_OPTION)
388
- .action(async (type, options, command) => {
389
- const { runBatchStart } = await import('./commands/batch.js');
390
- await runBatchStart(await make(), type, withGlobalFormat(options, command));
391
- });
392
- }
393
- export function registerBatch(program, make) {
394
- const batch = program
395
- .command('batch')
396
- .description('Batch operations over runs (start one with `runs batch <type>`)');
397
- batch
398
- .command('list')
399
- .description('The workspace batch jobs, newest first')
400
- .option('--status <status>', 'PENDING, RUNNING, COMPLETED, FAILED or CANCELLED')
401
- .option('--limit <n>', 'Jobs per page (default 20)')
402
- .option('--after <cursor>', 'The next page')
403
- .option(...OUTPUT_OPTION)
404
- .action(async (options, command) => {
405
- const { runBatchList } = await import('./commands/batch.js');
406
- await runBatchList(await make(), withGlobalFormat(options, command));
407
- });
408
- batch
409
- .command('describe <id>')
410
- .description('One batch job; --watch follows it until it ends')
411
- .option('--watch', 'Poll until the job ends')
412
- .option('--poll-interval <ms>', 'With --watch: delay between polls', '2000')
413
- .option('--timeout <ms>', 'With --watch: give up after this many milliseconds', '3600000')
414
- .option(...OUTPUT_OPTION)
415
- .action(async (id, options, command) => {
416
- const { runBatchDescribe } = await import('./commands/batch.js');
417
- await runBatchDescribe(await make(), id, withGlobalFormat(options, command));
418
- });
419
- batch
420
- .command('cancel <id>')
421
- .description('Cancel a batch job; the runs it has not reached are left as they are')
422
- .option(...FORCE_OPTION)
423
- .option(...OUTPUT_OPTION)
424
- .action(async (id, options, command) => {
425
- const { runBatchCancel } = await import('./commands/batch.js');
426
- await runBatchCancel(await make(), id, withGlobalFormat(options, command));
427
- });
428
- }
429
- function addCompletionTarget(command) {
430
- return addTargetOptions(command).option('--task-token-env <VAR>', "Act through the activity's task token, read from this variable (asynchronous completion)");
431
- }
432
- export function registerActivities(program, make) {
433
- const activities = program
434
- .command('activities')
435
- .description('Durable-function activities: completion, pause, reset, options and pause rules');
436
- addCompletionTarget(activities
437
- .command('complete [runId] [activityId]')
438
- .description('Complete an activity that waits for an asynchronous completion')
439
- .option('--result <json>', 'The result (JSON)'))
440
- .option(...OUTPUT_OPTION)
441
- .action(async (first, second, options, command) => {
442
- const { runActivityComplete } = await import('./commands/activities.js');
443
- await runActivityComplete(await make(), first, second, withGlobalFormat(options, command));
444
- });
445
- addCompletionTarget(activities
446
- .command('fail [runId] [activityId]')
447
- .description('Fail an activity that waits for an asynchronous completion')
448
- .option('--message <text>', 'The failure message')
449
- .option('--type <type>', 'The application failure type')
450
- .option('--error-type <type>', 'TRANSIENT, PERMANENT, TIMEOUT, VALIDATION, … (default UNKNOWN)')
451
- .option('--non-retryable', 'Never retry it')
452
- .option('--details <json>', 'Failure details (JSON)'))
453
- .option(...OUTPUT_OPTION)
454
- .action(async (first, second, options, command) => {
455
- const { runActivityFail } = await import('./commands/activities.js');
456
- await runActivityFail(await make(), first, second, withGlobalFormat(options, command));
457
- });
458
- addCompletionTarget(activities
459
- .command('heartbeat [runId] [activityId]')
460
- .description('Heartbeat an activity that waits for an asynchronous completion')
461
- .option('--details <json>', 'Heartbeat details (JSON)'))
462
- .option(...OUTPUT_OPTION)
463
- .action(async (first, second, options, command) => {
464
- const { runActivityHeartbeat } = await import('./commands/activities.js');
465
- await runActivityHeartbeat(await make(), first, second, withGlobalFormat(options, command));
466
- });
467
- addTargetOptions(addSelectorOptions(activities
468
- .command('pause [runId]')
469
- .description('Pause activities of a run (needs fluidgrids.run-control)')
470
- .option('--reason <text>', 'Why')))
471
- .option(...OUTPUT_OPTION)
472
- .action(async (runId, options, command) => {
473
- const { runActivityPause } = await import('./commands/activities.js');
474
- await runActivityPause(await make(), runId, withGlobalFormat(options, command));
475
- });
476
- addTargetOptions(addSelectorOptions(activities
477
- .command('unpause [runId]')
478
- .description('Unpause activities; their next attempt is dispatched now')
479
- .option('--reset-attempts', 'Restart the attempt count')
480
- .option('--reset-heartbeat', 'Drop the heartbeat details')))
481
- .option(...OUTPUT_OPTION)
482
- .action(async (runId, options, command) => {
483
- const { runActivityUnpause } = await import('./commands/activities.js');
484
- await runActivityUnpause(await make(), runId, withGlobalFormat(options, command));
485
- });
486
- addTargetOptions(addSelectorOptions(activities
487
- .command('reset [runId]')
488
- .description('Restart activities at attempt 1 (a running attempt is cancelled first)')
489
- .option('--reset-heartbeat', 'Drop the heartbeat details')
490
- .option(...FORCE_OPTION)))
491
- .option(...OUTPUT_OPTION)
492
- .action(async (runId, options, command) => {
493
- const { runActivityReset } = await import('./commands/activities.js');
494
- await runActivityReset(await make(), runId, withGlobalFormat(options, command));
495
- });
496
- addActivityOptionFlags(addTargetOptions(addSelectorOptions(activities
497
- .command('update-options [runId]')
498
- .description('Change the retry policy and timeouts of activities from their next attempt (needs fluidgrids.run-control)'))))
499
- .option(...OUTPUT_OPTION)
500
- .action(async (runId, options, command) => {
501
- const { runActivityUpdateOptions } = await import('./commands/activities.js');
502
- await runActivityUpdateOptions(await make(), runId, withGlobalFormat(options, command));
503
- });
504
- const rules = activities
505
- .command('pause-rules')
506
- .description('Workspace rules that pause matching activities when they are scheduled');
507
- rules
508
- .command('list')
509
- .description('The pause rules that have not expired')
510
- .option(...OUTPUT_OPTION)
511
- .action(async (options, command) => {
512
- const { runPauseRulesList } = await import('./commands/activities.js');
513
- await runPauseRulesList(await make(), withGlobalFormat(options, command));
514
- });
515
- rules
516
- .command('create')
517
- .description('Create a pause rule (at most 100; needs fluidgrids.run-control)')
518
- .option('--activity-type <type>', 'Matches the node type (or user activity name)')
519
- .option('--node-type <type>', 'Matches the node type')
520
- .option('--workflow-key <key>', 'Only activities of this workflow')
521
- .option('--reason <text>', 'Why')
522
- .option('--expires-at <time>', 'The rule ends then (ISO-8601)')
523
- .option('--expires-in <duration>', 'The rule ends after this long (5m, 2h, PT1H)')
524
- .option(...OUTPUT_OPTION)
525
- .action(async (options, command) => {
526
- const { runPauseRulesCreate } = await import('./commands/activities.js');
527
- await runPauseRulesCreate(await make(), withGlobalFormat(options, command));
528
- });
529
- rules
530
- .command('delete <id>')
531
- .description('Delete a pause rule; everything it paused is unpaused')
532
- .option(...OUTPUT_OPTION)
533
- .action(async (id, options, command) => {
534
- const { runPauseRulesDelete } = await import('./commands/activities.js');
535
- await runPauseRulesDelete(await make(), id, withGlobalFormat(options, command));
536
- });
537
- }
538
- // --------------------------------------- signal tokens, search attributes, schedules
539
- export function registerSignalTokens(program, make) {
540
- const tokens = program
541
- .command('signal-token')
542
- .description('Signal tokens: a URL that signals a run without a platform credential');
543
- addTargetOptions(tokens
544
- .command('create [runId]')
545
- .description('Create a signal token for a run; shown once (needs fluidgrids.run-control)')
546
- .option('--signal <name>', 'The signal a POST sends (one the run declares)')
547
- .option('--ttl <duration>', 'Lifetime, 60 s to 90 days (default 30 days)')
548
- .option('--reusable', 'Usable until it expires (default: spent by its first signal)')
549
- .option('--allow-ip <cidrs>', 'IPv4 addresses or CIDR ranges a post must come from (repeatable)', collect))
550
- .option(...OUTPUT_OPTION)
551
- .action(async (runId, options, command) => {
552
- const { runSignalTokenCreate } = await import('./commands/signal-tokens.js');
553
- await runSignalTokenCreate(await make(), runId, withGlobalFormat(options, command));
554
- });
555
- tokens
556
- .command('revoke <id>')
557
- .description('Revoke a signal token')
558
- .option(...OUTPUT_OPTION)
559
- .action(async (id, options, command) => {
560
- const { runSignalTokenRevoke } = await import('./commands/signal-tokens.js');
561
- await runSignalTokenRevoke(await make(), id, withGlobalFormat(options, command));
562
- });
563
- tokens
564
- .command('list <runId>')
565
- .description('The signal tokens of a run (never the tokens themselves)')
566
- .option(...OUTPUT_OPTION)
567
- .action(async (runId, options, command) => {
568
- const { runSignalTokenList } = await import('./commands/signal-tokens.js');
569
- await runSignalTokenList(await make(), runId, withGlobalFormat(options, command));
570
- });
571
- }
572
- export function registerSearchAttributes(program, make) {
573
- const attributes = program
574
- .command('search-attributes')
575
- .description('Run search attributes the workspace defines');
576
- attributes
577
- .command('list')
578
- .description('The defined search attributes')
579
- .option(...OUTPUT_OPTION)
580
- .action(async (options, command) => {
581
- const { runSearchAttributesList } = await import('./commands/search-attributes.js');
582
- await runSearchAttributesList(await make(), withGlobalFormat(options, command));
583
- });
584
- attributes
585
- .command('create <name>')
586
- .description('Define a search attribute (at most 50; needs fluidgrids.search-attributes)')
587
- .option('--type <type>', 'KEYWORD, TEXT, INT, DOUBLE, BOOL, DATETIME or KEYWORD_LIST')
588
- .option('--description <text>', 'Description')
589
- .option(...OUTPUT_OPTION)
590
- .action(async (name, options, command) => {
591
- const { runSearchAttributesCreate } = await import('./commands/search-attributes.js');
592
- await runSearchAttributesCreate(await make(), name, withGlobalFormat(options, command));
593
- });
594
- attributes
595
- .command('delete <name>')
596
- .description('Delete a search attribute (runs keep their values)')
597
- .option(...FORCE_OPTION)
598
- .option(...OUTPUT_OPTION)
599
- .action(async (name, options, command) => {
600
- const { runSearchAttributesDelete } = await import('./commands/search-attributes.js');
601
- await runSearchAttributesDelete(await make(), name, withGlobalFormat(options, command));
602
- });
603
- }
604
- export function registerSchedules(program, make) {
605
- const schedules = program
606
- .command('schedules')
607
- .description('Schedule Trigger nodes: describe, trigger, backfill, pause and unpause (created by pushing a version)');
608
- schedules
609
- .command('list')
610
- .description('One row per Schedule Trigger node (workflowScheduledJobs)')
611
- .option('--key <workflowKey>', 'Only this workflow')
612
- .option(...OUTPUT_OPTION)
613
- .action(async (options, command) => {
614
- const { runSchedulesList } = await import('./commands/schedules.js');
615
- await runSchedulesList(await make(), withGlobalFormat(options, command));
616
- });
617
- schedules
618
- .command('describe <workflowKey> <triggerNodeId>')
619
- .description('Spec, state, next fire times and recent ticks (needs fluidgrids.schedule-policies)')
620
- .option(...OUTPUT_OPTION)
621
- .action(async (key, node, options, command) => {
622
- const { runSchedulesDescribe } = await import('./commands/schedules.js');
623
- await runSchedulesDescribe(await make(), key, node, withGlobalFormat(options, command));
624
- });
625
- schedules
626
- .command('trigger <workflowKey> <triggerNodeId>')
627
- .description('Start one action now (a MANUAL tick; counts one run)')
628
- .option('--overlap-policy <policy>', 'skip, buffer-one, buffer-all, cancel-other, terminate-other or allow-all')
629
- .option(...OUTPUT_OPTION)
630
- .action(async (key, node, options, command) => {
631
- const { runSchedulesTrigger } = await import('./commands/schedules.js');
632
- await runSchedulesTrigger(await make(), key, node, withGlobalFormat(options, command));
633
- });
634
- schedules
635
- .command('backfill <workflowKey> <triggerNodeId>')
636
- .description('Run the fire times between --from and --to (at most 1,000, in the past)')
637
- .option('--from <time>', 'Start (ISO-8601)')
638
- .option('--to <time>', 'End (ISO-8601, in the past)')
639
- .option('--overlap-policy <policy>', 'Overlap policy of the backfilled ticks')
640
- .option(...FORCE_OPTION)
641
- .option(...OUTPUT_OPTION)
642
- .action(async (key, node, options, command) => {
643
- const { runSchedulesBackfill } = await import('./commands/schedules.js');
644
- await runSchedulesBackfill(await make(), key, node, withGlobalFormat(options, command));
645
- });
646
- schedules
647
- .command('pause <workflowKey> <triggerNodeId>')
648
- .description('Pause the schedule with a note until it is unpaused')
649
- .option('--note <text>', 'Why')
650
- .option(...OUTPUT_OPTION)
651
- .action(async (key, node, options, command) => {
652
- const { runSchedulesPause } = await import('./commands/schedules.js');
653
- await runSchedulesPause(await make(), key, node, withGlobalFormat(options, command));
654
- });
655
- schedules
656
- .command('unpause <workflowKey> <triggerNodeId>')
657
- .description('Unpause the schedule')
658
- .option(...OUTPUT_OPTION)
659
- .action(async (key, node, options, command) => {
660
- const { runSchedulesUnpause } = await import('./commands/schedules.js');
661
- await runSchedulesUnpause(await make(), key, node, withGlobalFormat(options, command));
662
- });
663
- }
664
- /** Every Phase C group, on the program the code-first module built. */
665
- export function registerPhaseC(program, env) {
666
- const make = envFactory(env);
667
- registerConfig(program, env);
668
- registerQueues(program, make);
669
- registerWorkers(program, make);
670
- registerWorkerRun(program, make);
671
- registerRunControl(program, make);
672
- registerBatch(program, make);
673
- registerActivities(program, make);
674
- registerSignalTokens(program, make);
675
- registerSearchAttributes(program, make);
676
- registerSchedules(program, make);
677
- }
678
- //# sourceMappingURL=register.js.map