@sanity/workflows-cli 0.0.0-stage → 0.0.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +1574 -0
  2. package/LICENSE +21 -0
  3. package/README.md +797 -2
  4. package/bin/run.js +8 -0
  5. package/dist/command-ids.d.ts +10 -0
  6. package/dist/command-ids.js +10 -0
  7. package/dist/commands/workflows/abort.d.ts +29 -0
  8. package/dist/commands/workflows/abort.js +50 -0
  9. package/dist/commands/workflows/blueprints/generate.d.ts +12 -0
  10. package/dist/commands/workflows/blueprints/generate.js +46 -0
  11. package/dist/commands/workflows/codemod/packages.d.ts +13 -0
  12. package/dist/commands/workflows/codemod/packages.js +41 -0
  13. package/dist/commands/workflows/definitions/delete.d.ts +44 -0
  14. package/dist/commands/workflows/definitions/delete.js +74 -0
  15. package/dist/commands/workflows/definitions/diff.d.ts +23 -0
  16. package/dist/commands/workflows/definitions/diff.js +55 -0
  17. package/dist/commands/workflows/definitions/list.d.ts +51 -0
  18. package/dist/commands/workflows/definitions/list.js +139 -0
  19. package/dist/commands/workflows/definitions/show.d.ts +65 -0
  20. package/dist/commands/workflows/definitions/show.js +129 -0
  21. package/dist/commands/workflows/definitions/validate.d.ts +14 -0
  22. package/dist/commands/workflows/definitions/validate.js +50 -0
  23. package/dist/commands/workflows/deploy.d.ts +117 -0
  24. package/dist/commands/workflows/deploy.js +266 -0
  25. package/dist/commands/workflows/diagnose.d.ts +52 -0
  26. package/dist/commands/workflows/diagnose.js +195 -0
  27. package/dist/commands/workflows/fire-action.d.ts +53 -0
  28. package/dist/commands/workflows/fire-action.js +182 -0
  29. package/dist/commands/workflows/list.d.ts +78 -0
  30. package/dist/commands/workflows/list.js +248 -0
  31. package/dist/commands/workflows/nuke.d.ts +73 -0
  32. package/dist/commands/workflows/nuke.js +176 -0
  33. package/dist/commands/workflows/reset-activity.d.ts +32 -0
  34. package/dist/commands/workflows/reset-activity.js +60 -0
  35. package/dist/commands/workflows/show.d.ts +29 -0
  36. package/dist/commands/workflows/show.js +156 -0
  37. package/dist/commands/workflows/start.d.ts +57 -0
  38. package/dist/commands/workflows/start.js +196 -0
  39. package/dist/commands/workflows/tail.d.ts +23 -0
  40. package/dist/commands/workflows/tail.js +83 -0
  41. package/dist/commands/workflows/whoami.d.ts +15 -0
  42. package/dist/commands/workflows/whoami.js +53 -0
  43. package/dist/help.d.ts +13 -0
  44. package/dist/help.js +50 -0
  45. package/dist/hooks/finally/telemetry.d.ts +3 -0
  46. package/dist/hooks/finally/telemetry.js +9 -0
  47. package/dist/hooks/prerun/telemetry.d.ts +28 -0
  48. package/dist/hooks/prerun/telemetry.js +37 -0
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.js +1 -0
  51. package/dist/lib/base-command.d.ts +14 -0
  52. package/dist/lib/base-command.js +34 -0
  53. package/dist/lib/blueprint-emit.d.ts +56 -0
  54. package/dist/lib/blueprint-emit.js +233 -0
  55. package/dist/lib/blueprint-needs.d.ts +5 -0
  56. package/dist/lib/blueprint-needs.js +205 -0
  57. package/dist/lib/blueprint-stacks.d.ts +6 -0
  58. package/dist/lib/blueprint-stacks.js +88 -0
  59. package/dist/lib/cause-detail.d.ts +9 -0
  60. package/dist/lib/cause-detail.js +112 -0
  61. package/dist/lib/client.d.ts +24 -0
  62. package/dist/lib/client.js +40 -0
  63. package/dist/lib/codemod/manifest-rewrite.d.ts +14 -0
  64. package/dist/lib/codemod/manifest-rewrite.js +97 -0
  65. package/dist/lib/codemod/package-map.d.ts +22 -0
  66. package/dist/lib/codemod/package-map.js +72 -0
  67. package/dist/lib/codemod/report.d.ts +5 -0
  68. package/dist/lib/codemod/report.js +43 -0
  69. package/dist/lib/codemod/run.d.ts +23 -0
  70. package/dist/lib/codemod/run.js +103 -0
  71. package/dist/lib/codemod/source-rewrite.d.ts +18 -0
  72. package/dist/lib/codemod/source-rewrite.js +155 -0
  73. package/dist/lib/command-context.d.ts +20 -0
  74. package/dist/lib/command-context.js +24 -0
  75. package/dist/lib/command-telemetry.d.ts +54 -0
  76. package/dist/lib/command-telemetry.js +82 -0
  77. package/dist/lib/context.d.ts +155 -0
  78. package/dist/lib/context.js +268 -0
  79. package/dist/lib/default-partition.d.ts +23 -0
  80. package/dist/lib/default-partition.js +48 -0
  81. package/dist/lib/definition-files.d.ts +11 -0
  82. package/dist/lib/definition-files.js +58 -0
  83. package/dist/lib/definitions.d.ts +63 -0
  84. package/dist/lib/definitions.js +84 -0
  85. package/dist/lib/diff.d.ts +12 -0
  86. package/dist/lib/diff.js +93 -0
  87. package/dist/lib/env.d.ts +7 -0
  88. package/dist/lib/env.js +8 -0
  89. package/dist/lib/fail.d.ts +29 -0
  90. package/dist/lib/fail.js +46 -0
  91. package/dist/lib/flags.d.ts +49 -0
  92. package/dist/lib/flags.js +117 -0
  93. package/dist/lib/follow-up-command.d.ts +18 -0
  94. package/dist/lib/follow-up-command.js +12 -0
  95. package/dist/lib/history-rows.d.ts +3 -0
  96. package/dist/lib/history-rows.js +44 -0
  97. package/dist/lib/load-config.d.ts +46 -0
  98. package/dist/lib/load-config.js +110 -0
  99. package/dist/lib/nuke.d.ts +124 -0
  100. package/dist/lib/nuke.js +206 -0
  101. package/dist/lib/operation-args.d.ts +42 -0
  102. package/dist/lib/operation-args.js +21 -0
  103. package/dist/lib/ops-report.d.ts +47 -0
  104. package/dist/lib/ops-report.js +31 -0
  105. package/dist/lib/params.d.ts +3 -0
  106. package/dist/lib/params.js +21 -0
  107. package/dist/lib/pick-dataset.d.ts +10 -0
  108. package/dist/lib/pick-dataset.js +30 -0
  109. package/dist/lib/prompt.d.ts +35 -0
  110. package/dist/lib/prompt.js +11 -0
  111. package/dist/lib/read-fanout.d.ts +45 -0
  112. package/dist/lib/read-fanout.js +44 -0
  113. package/dist/lib/select-deployment.d.ts +31 -0
  114. package/dist/lib/select-deployment.js +91 -0
  115. package/dist/lib/share-definitions.d.ts +101 -0
  116. package/dist/lib/share-definitions.js +188 -0
  117. package/dist/lib/telemetry-setup.d.ts +81 -0
  118. package/dist/lib/telemetry-setup.js +111 -0
  119. package/dist/lib/telemetry.d.ts +78 -0
  120. package/dist/lib/telemetry.js +90 -0
  121. package/dist/lib/ui.d.ts +91 -0
  122. package/dist/lib/ui.js +116 -0
  123. package/dist/standalone-argv.d.ts +14 -0
  124. package/dist/standalone-argv.js +57 -0
  125. package/oclif.manifest.json +1731 -0
  126. package/package.json +118 -3
@@ -0,0 +1,1731 @@
1
+ {
2
+ "commands": {
3
+ "workflows:abort": {
4
+ "aliases": [],
5
+ "args": {
6
+ "instanceId": {
7
+ "description": "Workflow instance id.",
8
+ "name": "instanceId",
9
+ "required": true
10
+ }
11
+ },
12
+ "description": "Abort an in-flight workflow instance — a hard stop: pending effects are cancelled, stage guards removed, and the instance is marked terminal where it stands.",
13
+ "examples": [
14
+ "<%= config.bin %> workflows abort wf-instance.abc123",
15
+ "<%= config.bin %> workflows abort wf-instance.abc123 --reason 'superseded by relaunch'"
16
+ ],
17
+ "flags": {
18
+ "path": {
19
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
20
+ "name": "path",
21
+ "hasDynamicHelp": false,
22
+ "helpValue": "<file|dir>",
23
+ "multiple": false,
24
+ "type": "option"
25
+ },
26
+ "deployment": {
27
+ "description": "Deployment name — narrow the instance search to the resource that deployment targets; the partition still comes from the loaded instance.",
28
+ "exclusive": [
29
+ "partition"
30
+ ],
31
+ "name": "deployment",
32
+ "hasDynamicHelp": false,
33
+ "multiple": false,
34
+ "type": "option"
35
+ },
36
+ "partition": {
37
+ "aliases": [
38
+ "tag"
39
+ ],
40
+ "description": "Workflow environment partition (e.g. prod, test) — narrows which resources are searched for the instance; the instance's stored partition is what the command uses.",
41
+ "exclusive": [
42
+ "deployment"
43
+ ],
44
+ "name": "partition",
45
+ "hasDynamicHelp": false,
46
+ "multiple": false,
47
+ "type": "option"
48
+ },
49
+ "reason": {
50
+ "description": "Reason for aborting (recorded in history).",
51
+ "name": "reason",
52
+ "hasDynamicHelp": false,
53
+ "multiple": false,
54
+ "type": "option"
55
+ }
56
+ },
57
+ "hasDynamicHelp": false,
58
+ "hiddenAliases": [],
59
+ "id": "workflows:abort",
60
+ "pluginAlias": "@sanity/workflows-cli",
61
+ "pluginName": "@sanity/workflows-cli",
62
+ "pluginType": "core",
63
+ "strict": true,
64
+ "telemetry": {
65
+ "redacted": [
66
+ "reason"
67
+ ]
68
+ },
69
+ "isESM": true,
70
+ "relativePath": [
71
+ "dist",
72
+ "commands",
73
+ "workflows",
74
+ "abort.js"
75
+ ]
76
+ },
77
+ "workflows:deploy": {
78
+ "aliases": [],
79
+ "args": {},
80
+ "description": "Validate workflow definitions, check any generated runtime beside the config against them, then diff and deploy to the resource bound by the selected deployment. A generated runtime that no longer matches the definitions fails the deploy before anything is written; regenerate it with `sanity-workflows blueprints generate`.",
81
+ "examples": [
82
+ "<%= config.bin %> workflows deploy --deployment review-prod",
83
+ "<%= config.bin %> workflows deploy --partition prod",
84
+ "<%= config.bin %> workflows deploy --all-partitions",
85
+ "<%= config.bin %> workflows deploy --check",
86
+ "<%= config.bin %> workflows deploy --dry-run",
87
+ "<%= config.bin %> workflows deploy --check --verbose",
88
+ "<%= config.bin %> workflows deploy --only product-launch"
89
+ ],
90
+ "flags": {
91
+ "path": {
92
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
93
+ "name": "path",
94
+ "hasDynamicHelp": false,
95
+ "helpValue": "<file|dir>",
96
+ "multiple": false,
97
+ "type": "option"
98
+ },
99
+ "deployment": {
100
+ "description": "Deployment name — the unique identity of one deployment in the config.",
101
+ "exclusive": [
102
+ "partition"
103
+ ],
104
+ "name": "deployment",
105
+ "hasDynamicHelp": false,
106
+ "multiple": false,
107
+ "type": "option"
108
+ },
109
+ "partition": {
110
+ "aliases": [
111
+ "tag"
112
+ ],
113
+ "description": "Workflow partition (e.g. prod, test) — deploys every deployment using that partition across configured resources.",
114
+ "exclusive": [
115
+ "deployment"
116
+ ],
117
+ "name": "partition",
118
+ "hasDynamicHelp": false,
119
+ "multiple": false,
120
+ "type": "option"
121
+ },
122
+ "all-partitions": {
123
+ "aliases": [
124
+ "all-tags"
125
+ ],
126
+ "description": "Deploy every deployment in the config, not just a selection.",
127
+ "exclusive": [
128
+ "partition",
129
+ "deployment"
130
+ ],
131
+ "name": "all-partitions",
132
+ "allowNo": false,
133
+ "type": "boolean"
134
+ },
135
+ "dry-run": {
136
+ "description": "Validate definitions, check any generated runtime against them, and diff against the deployed version; do not write.",
137
+ "name": "dry-run",
138
+ "allowNo": false,
139
+ "type": "boolean"
140
+ },
141
+ "check": {
142
+ "description": "Validate definitions and check any generated runtime against them; do not contact the dataset.",
143
+ "name": "check",
144
+ "allowNo": false,
145
+ "type": "boolean"
146
+ },
147
+ "verbose": {
148
+ "description": "When no generated runtime is here, print the full report of the Sanity Functions the selected deployments need, in place of the summary.",
149
+ "name": "verbose",
150
+ "allowNo": false,
151
+ "type": "boolean"
152
+ },
153
+ "only": {
154
+ "description": "Limit deploy/check/diff to a single workflow definition by name (deployments are selected with --deployment). Every targeted deployment must contain it. The generated-runtime check still covers the whole config, because the generated tree declares every deployment in it.",
155
+ "name": "only",
156
+ "hasDynamicHelp": false,
157
+ "multiple": false,
158
+ "type": "option"
159
+ },
160
+ "share-defs": {
161
+ "description": "Share the definition documents newly created by this deploy with Sanity — the full document, verbatim (structure, names, filters, effect configuration, seeded values), plus its deployment coordinates (project and dataset, or resource id); never content documents, instances, or your Sanity auth token. Sharing is the default in every environment, including CI / non-TTY / DO_NOT_TRACK. Use --no-share-defs to opt out.",
162
+ "name": "share-defs",
163
+ "allowNo": true,
164
+ "type": "boolean"
165
+ }
166
+ },
167
+ "hasDynamicHelp": false,
168
+ "hiddenAliases": [],
169
+ "id": "workflows:deploy",
170
+ "pluginAlias": "@sanity/workflows-cli",
171
+ "pluginName": "@sanity/workflows-cli",
172
+ "pluginType": "core",
173
+ "strict": true,
174
+ "isESM": true,
175
+ "relativePath": [
176
+ "dist",
177
+ "commands",
178
+ "workflows",
179
+ "deploy.js"
180
+ ]
181
+ },
182
+ "workflows:diagnose": {
183
+ "aliases": [],
184
+ "args": {
185
+ "instanceId": {
186
+ "description": "Workflow instance id.",
187
+ "name": "instanceId",
188
+ "required": true
189
+ }
190
+ },
191
+ "description": "Explain why a workflow instance is or isn't progressing, and what would unstick it.",
192
+ "examples": [
193
+ "<%= config.bin %> workflows diagnose wf-instance.abc123",
194
+ "<%= config.bin %> workflows diagnose wf-instance.abc123 --partition prod",
195
+ "<%= config.bin %> workflows diagnose wf-instance.abc123 --json"
196
+ ],
197
+ "flags": {
198
+ "path": {
199
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
200
+ "name": "path",
201
+ "hasDynamicHelp": false,
202
+ "helpValue": "<file|dir>",
203
+ "multiple": false,
204
+ "type": "option"
205
+ },
206
+ "deployment": {
207
+ "description": "Deployment name — narrow the instance search to the resource that deployment targets; the partition still comes from the loaded instance.",
208
+ "exclusive": [
209
+ "partition"
210
+ ],
211
+ "name": "deployment",
212
+ "hasDynamicHelp": false,
213
+ "multiple": false,
214
+ "type": "option"
215
+ },
216
+ "partition": {
217
+ "aliases": [
218
+ "tag"
219
+ ],
220
+ "description": "Workflow environment partition (e.g. prod, test) — narrows which resources are searched for the instance; the instance's stored partition is what the command uses.",
221
+ "exclusive": [
222
+ "deployment"
223
+ ],
224
+ "name": "partition",
225
+ "hasDynamicHelp": false,
226
+ "multiple": false,
227
+ "type": "option"
228
+ },
229
+ "project-id": {
230
+ "char": "p",
231
+ "dependsOn": [
232
+ "dataset"
233
+ ],
234
+ "description": "Project ID of the dataset to read (overrides sanity.workflow.ts)",
235
+ "exclusive": [
236
+ "media-library-id",
237
+ "path",
238
+ "deployment"
239
+ ],
240
+ "helpGroup": "OVERRIDE",
241
+ "name": "project-id",
242
+ "hasDynamicHelp": false,
243
+ "helpValue": "<id>",
244
+ "multiple": false,
245
+ "type": "option"
246
+ },
247
+ "dataset": {
248
+ "char": "d",
249
+ "dependsOn": [
250
+ "project-id"
251
+ ],
252
+ "description": "Dataset to read (overrides sanity.workflow.ts)",
253
+ "exclusive": [
254
+ "media-library-id",
255
+ "path",
256
+ "deployment"
257
+ ],
258
+ "helpGroup": "OVERRIDE",
259
+ "name": "dataset",
260
+ "hasDynamicHelp": false,
261
+ "helpValue": "<name>",
262
+ "multiple": false,
263
+ "type": "option"
264
+ },
265
+ "media-library-id": {
266
+ "description": "Media library to read (overrides sanity.workflow.ts)",
267
+ "exclusive": [
268
+ "project-id",
269
+ "dataset",
270
+ "path",
271
+ "deployment"
272
+ ],
273
+ "helpGroup": "OVERRIDE",
274
+ "name": "media-library-id",
275
+ "hasDynamicHelp": false,
276
+ "helpValue": "<id>",
277
+ "multiple": false,
278
+ "type": "option"
279
+ },
280
+ "json": {
281
+ "description": "Emit structured JSON instead of rendered output.",
282
+ "name": "json",
283
+ "allowNo": false,
284
+ "type": "boolean"
285
+ }
286
+ },
287
+ "hasDynamicHelp": false,
288
+ "hiddenAliases": [],
289
+ "id": "workflows:diagnose",
290
+ "pluginAlias": "@sanity/workflows-cli",
291
+ "pluginName": "@sanity/workflows-cli",
292
+ "pluginType": "core",
293
+ "strict": true,
294
+ "isESM": true,
295
+ "relativePath": [
296
+ "dist",
297
+ "commands",
298
+ "workflows",
299
+ "diagnose.js"
300
+ ]
301
+ },
302
+ "workflows:fire-action": {
303
+ "aliases": [],
304
+ "args": {
305
+ "instanceId": {
306
+ "description": "Workflow instance id.",
307
+ "name": "instanceId",
308
+ "required": true
309
+ }
310
+ },
311
+ "description": "Fire an action on an instance to unstick a waiting activity — the write acts as the configured token. Omit --action to list what can be fired.",
312
+ "examples": [
313
+ "<%= config.bin %> workflows fire-action wf-instance.abc123",
314
+ "<%= config.bin %> workflows fire-action wf-instance.abc123 --activity approve --action approve",
315
+ "<%= config.bin %> workflows fire-action wf-instance.abc123 --activity publish --action publish --param note=shipping"
316
+ ],
317
+ "flags": {
318
+ "path": {
319
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
320
+ "name": "path",
321
+ "hasDynamicHelp": false,
322
+ "helpValue": "<file|dir>",
323
+ "multiple": false,
324
+ "type": "option"
325
+ },
326
+ "deployment": {
327
+ "description": "Deployment name — narrow the instance search to the resource that deployment targets; the partition still comes from the loaded instance.",
328
+ "exclusive": [
329
+ "partition"
330
+ ],
331
+ "name": "deployment",
332
+ "hasDynamicHelp": false,
333
+ "multiple": false,
334
+ "type": "option"
335
+ },
336
+ "partition": {
337
+ "aliases": [
338
+ "tag"
339
+ ],
340
+ "description": "Workflow environment partition (e.g. prod, test) — narrows which resources are searched for the instance; the instance's stored partition is what the command uses.",
341
+ "exclusive": [
342
+ "deployment"
343
+ ],
344
+ "name": "partition",
345
+ "hasDynamicHelp": false,
346
+ "multiple": false,
347
+ "type": "option"
348
+ },
349
+ "activity": {
350
+ "description": "Activity the action belongs to. Required to fire; omit --action to list.",
351
+ "name": "activity",
352
+ "hasDynamicHelp": false,
353
+ "multiple": false,
354
+ "type": "option"
355
+ },
356
+ "action": {
357
+ "description": "Action to fire. Omit to list the actions available on the instance.",
358
+ "name": "action",
359
+ "hasDynamicHelp": false,
360
+ "multiple": false,
361
+ "type": "option"
362
+ },
363
+ "param": {
364
+ "description": "Action param as key=value (repeatable). Values are JSON-parsed, falling back to a string.",
365
+ "name": "param",
366
+ "default": [],
367
+ "hasDynamicHelp": false,
368
+ "multiple": true,
369
+ "type": "option"
370
+ },
371
+ "json": {
372
+ "description": "Emit structured JSON instead of rendered output.",
373
+ "name": "json",
374
+ "allowNo": false,
375
+ "type": "boolean"
376
+ }
377
+ },
378
+ "hasDynamicHelp": false,
379
+ "hiddenAliases": [],
380
+ "id": "workflows:fire-action",
381
+ "pluginAlias": "@sanity/workflows-cli",
382
+ "pluginName": "@sanity/workflows-cli",
383
+ "pluginType": "core",
384
+ "strict": true,
385
+ "telemetry": {
386
+ "redacted": [
387
+ "param"
388
+ ]
389
+ },
390
+ "isESM": true,
391
+ "relativePath": [
392
+ "dist",
393
+ "commands",
394
+ "workflows",
395
+ "fire-action.js"
396
+ ]
397
+ },
398
+ "workflows:list": {
399
+ "aliases": [],
400
+ "args": {},
401
+ "description": "List workflow instances (in-flight by default) across the resources sanity.workflow.ts declares, or in the one resource --project-id/--dataset or --media-library-id names.",
402
+ "examples": [
403
+ "<%= config.bin %> workflows list",
404
+ "<%= config.bin %> workflows list --include-completed",
405
+ "<%= config.bin %> workflows list --definition product-launch",
406
+ "<%= config.bin %> workflows list --document dataset:proj:ds:article-1",
407
+ "<%= config.bin %> workflows list --assignment-user gAda --assignment-role legal --assignment-state routed",
408
+ "<%= config.bin %> workflows list --partition prod",
409
+ "<%= config.bin %> workflows list --json"
410
+ ],
411
+ "flags": {
412
+ "path": {
413
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
414
+ "name": "path",
415
+ "hasDynamicHelp": false,
416
+ "helpValue": "<file|dir>",
417
+ "multiple": false,
418
+ "type": "option"
419
+ },
420
+ "deployment": {
421
+ "description": "Deployment name — read only the resource and partition that deployment targets.",
422
+ "exclusive": [
423
+ "partition"
424
+ ],
425
+ "name": "deployment",
426
+ "hasDynamicHelp": false,
427
+ "multiple": false,
428
+ "type": "option"
429
+ },
430
+ "partition": {
431
+ "aliases": [
432
+ "tag"
433
+ ],
434
+ "description": "Workflow environment partition (e.g. prod, test) — an optional query filter that also narrows which resources are searched; omit to span them all.",
435
+ "exclusive": [
436
+ "deployment"
437
+ ],
438
+ "name": "partition",
439
+ "hasDynamicHelp": false,
440
+ "multiple": false,
441
+ "type": "option"
442
+ },
443
+ "project-id": {
444
+ "char": "p",
445
+ "dependsOn": [
446
+ "dataset"
447
+ ],
448
+ "description": "Project ID of the dataset to read (overrides sanity.workflow.ts)",
449
+ "exclusive": [
450
+ "media-library-id",
451
+ "path",
452
+ "deployment"
453
+ ],
454
+ "helpGroup": "OVERRIDE",
455
+ "name": "project-id",
456
+ "hasDynamicHelp": false,
457
+ "helpValue": "<id>",
458
+ "multiple": false,
459
+ "type": "option"
460
+ },
461
+ "dataset": {
462
+ "char": "d",
463
+ "dependsOn": [
464
+ "project-id"
465
+ ],
466
+ "description": "Dataset to read (overrides sanity.workflow.ts)",
467
+ "exclusive": [
468
+ "media-library-id",
469
+ "path",
470
+ "deployment"
471
+ ],
472
+ "helpGroup": "OVERRIDE",
473
+ "name": "dataset",
474
+ "hasDynamicHelp": false,
475
+ "helpValue": "<name>",
476
+ "multiple": false,
477
+ "type": "option"
478
+ },
479
+ "media-library-id": {
480
+ "description": "Media library to read (overrides sanity.workflow.ts)",
481
+ "exclusive": [
482
+ "project-id",
483
+ "dataset",
484
+ "path",
485
+ "deployment"
486
+ ],
487
+ "helpGroup": "OVERRIDE",
488
+ "name": "media-library-id",
489
+ "hasDynamicHelp": false,
490
+ "helpValue": "<id>",
491
+ "multiple": false,
492
+ "type": "option"
493
+ },
494
+ "include-completed": {
495
+ "description": "Include completed/aborted instances (default: in-flight only).",
496
+ "name": "include-completed",
497
+ "allowNo": false,
498
+ "type": "boolean"
499
+ },
500
+ "failed": {
501
+ "description": "Only instances with at least one failed activity.",
502
+ "name": "failed",
503
+ "allowNo": false,
504
+ "type": "boolean"
505
+ },
506
+ "definition": {
507
+ "description": "Only instances of this workflow definition (its `name`; the instance's `definition` field).",
508
+ "name": "definition",
509
+ "hasDynamicHelp": false,
510
+ "multiple": false,
511
+ "type": "option"
512
+ },
513
+ "document": {
514
+ "description": "Only instances that reference this document (resource-qualified GDR URI, e.g. \"dataset:proj:ds:article-1\").",
515
+ "name": "document",
516
+ "hasDynamicHelp": false,
517
+ "multiple": false,
518
+ "type": "option"
519
+ },
520
+ "assignment-user": {
521
+ "description": "Account-global user id used for viewer-scoped assignment filtering and counts.",
522
+ "name": "assignment-user",
523
+ "hasDynamicHelp": false,
524
+ "multiple": false,
525
+ "type": "option"
526
+ },
527
+ "assignment-role": {
528
+ "description": "A literal project role held by --assignment-user. Repeat for multiple roles.",
529
+ "name": "assignment-role",
530
+ "hasDynamicHelp": false,
531
+ "multiple": true,
532
+ "type": "option"
533
+ },
534
+ "assignment-state": {
535
+ "description": "Assignment state to include: unrouted, routed (offered through a supplied role), or held. Repeat for multiple states.",
536
+ "name": "assignment-state",
537
+ "hasDynamicHelp": false,
538
+ "multiple": true,
539
+ "options": [
540
+ "unrouted",
541
+ "routed",
542
+ "held"
543
+ ],
544
+ "type": "option"
545
+ },
546
+ "limit": {
547
+ "description": "Maximum rows to return.",
548
+ "name": "limit",
549
+ "default": 50,
550
+ "hasDynamicHelp": false,
551
+ "multiple": false,
552
+ "type": "option"
553
+ },
554
+ "json": {
555
+ "description": "Emit structured JSON instead of rendered output.",
556
+ "name": "json",
557
+ "allowNo": false,
558
+ "type": "boolean"
559
+ }
560
+ },
561
+ "hasDynamicHelp": false,
562
+ "hiddenAliases": [],
563
+ "id": "workflows:list",
564
+ "pluginAlias": "@sanity/workflows-cli",
565
+ "pluginName": "@sanity/workflows-cli",
566
+ "pluginType": "core",
567
+ "strict": true,
568
+ "isESM": true,
569
+ "relativePath": [
570
+ "dist",
571
+ "commands",
572
+ "workflows",
573
+ "list.js"
574
+ ]
575
+ },
576
+ "workflows:nuke": {
577
+ "aliases": [],
578
+ "args": {},
579
+ "description": "The reset for a dataset holding engine documents the versioned upgrade framework cannot yet migrate: deletes the partition's instances, definitions, and guards (across every alias-bound resource). --instance <id> instead deletes one terminal instance plus its guards. Content documents are never touched. Prints a dry-run plan, then confirms (--force skips the prompt; the plan still prints).",
580
+ "examples": [
581
+ "<%= config.bin %> workflows nuke --deployment plugin-dev",
582
+ "<%= config.bin %> workflows nuke --partition plugin-dev --force",
583
+ "<%= config.bin %> workflows nuke --instance plugin-dev.wf-instance.abc123"
584
+ ],
585
+ "flags": {
586
+ "path": {
587
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
588
+ "name": "path",
589
+ "hasDynamicHelp": false,
590
+ "helpValue": "<file|dir>",
591
+ "multiple": false,
592
+ "type": "option"
593
+ },
594
+ "deployment": {
595
+ "description": "The deployment name to reset. With --instance, narrows which deployment the instance is looked up in when its partition spans several.",
596
+ "name": "deployment",
597
+ "hasDynamicHelp": false,
598
+ "multiple": false,
599
+ "type": "option"
600
+ },
601
+ "partition": {
602
+ "aliases": [
603
+ "tag"
604
+ ],
605
+ "description": "The deployment partition to reset (while it names exactly one deployment). Not valid with --instance, which reads its partition from the stored instance.",
606
+ "name": "partition",
607
+ "hasDynamicHelp": false,
608
+ "multiple": false,
609
+ "type": "option"
610
+ },
611
+ "instance": {
612
+ "description": "Delete a single terminal instance by id, plus its guard docs, instead of a partition.",
613
+ "name": "instance",
614
+ "hasDynamicHelp": false,
615
+ "multiple": false,
616
+ "type": "option"
617
+ },
618
+ "force": {
619
+ "description": "Skip the confirmation prompt (for scripts/CI). The plan still prints.",
620
+ "name": "force",
621
+ "allowNo": false,
622
+ "type": "boolean"
623
+ }
624
+ },
625
+ "hasDynamicHelp": false,
626
+ "hiddenAliases": [],
627
+ "id": "workflows:nuke",
628
+ "pluginAlias": "@sanity/workflows-cli",
629
+ "pluginName": "@sanity/workflows-cli",
630
+ "pluginType": "core",
631
+ "strict": true,
632
+ "summary": "Delete engine-owned documents — a whole deployment partition, or a single instance.",
633
+ "isESM": true,
634
+ "relativePath": [
635
+ "dist",
636
+ "commands",
637
+ "workflows",
638
+ "nuke.js"
639
+ ]
640
+ },
641
+ "workflows:reset-activity": {
642
+ "aliases": [],
643
+ "args": {
644
+ "instanceId": {
645
+ "description": "Workflow instance id.",
646
+ "name": "instanceId",
647
+ "required": true
648
+ },
649
+ "activity": {
650
+ "description": "Activity name within the current stage.",
651
+ "name": "activity",
652
+ "required": true
653
+ }
654
+ },
655
+ "description": "Reset a failed activity on an in-flight instance — back to active to re-run it, or --skip to bypass it (mark it skipped) so a gated exit transition can fire.",
656
+ "examples": [
657
+ "<%= config.bin %> workflows reset-activity wf-instance.abc123 legal-review",
658
+ "<%= config.bin %> workflows reset-activity wf-instance.abc123 legal-review --skip"
659
+ ],
660
+ "flags": {
661
+ "path": {
662
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
663
+ "name": "path",
664
+ "hasDynamicHelp": false,
665
+ "helpValue": "<file|dir>",
666
+ "multiple": false,
667
+ "type": "option"
668
+ },
669
+ "deployment": {
670
+ "description": "Deployment name — narrow the instance search to the resource that deployment targets; the partition still comes from the loaded instance.",
671
+ "exclusive": [
672
+ "partition"
673
+ ],
674
+ "name": "deployment",
675
+ "hasDynamicHelp": false,
676
+ "multiple": false,
677
+ "type": "option"
678
+ },
679
+ "partition": {
680
+ "aliases": [
681
+ "tag"
682
+ ],
683
+ "description": "Workflow environment partition (e.g. prod, test) — narrows which resources are searched for the instance; the instance's stored partition is what the command uses.",
684
+ "exclusive": [
685
+ "deployment"
686
+ ],
687
+ "name": "partition",
688
+ "hasDynamicHelp": false,
689
+ "multiple": false,
690
+ "type": "option"
691
+ },
692
+ "skip": {
693
+ "description": "Bypass the activity (mark it skipped) instead of re-running it (back to active).",
694
+ "name": "skip",
695
+ "allowNo": false,
696
+ "type": "boolean"
697
+ }
698
+ },
699
+ "hasDynamicHelp": false,
700
+ "hiddenAliases": [],
701
+ "id": "workflows:reset-activity",
702
+ "pluginAlias": "@sanity/workflows-cli",
703
+ "pluginName": "@sanity/workflows-cli",
704
+ "pluginType": "core",
705
+ "strict": true,
706
+ "isESM": true,
707
+ "relativePath": [
708
+ "dist",
709
+ "commands",
710
+ "workflows",
711
+ "reset-activity.js"
712
+ ]
713
+ },
714
+ "workflows:show": {
715
+ "aliases": [],
716
+ "args": {
717
+ "instanceId": {
718
+ "description": "Workflow instance document id.",
719
+ "name": "instanceId",
720
+ "required": true
721
+ }
722
+ },
723
+ "description": "Show the state, activities, and effects of a workflow instance.",
724
+ "examples": [
725
+ "<%= config.bin %> workflows show wf-instance.abc123",
726
+ "<%= config.bin %> workflows show wf-instance.abc123 --include history",
727
+ "<%= config.bin %> workflows show wf-instance.abc123 --json"
728
+ ],
729
+ "flags": {
730
+ "path": {
731
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
732
+ "name": "path",
733
+ "hasDynamicHelp": false,
734
+ "helpValue": "<file|dir>",
735
+ "multiple": false,
736
+ "type": "option"
737
+ },
738
+ "deployment": {
739
+ "description": "Deployment name — narrow the instance search to the resource that deployment targets; the partition still comes from the loaded instance.",
740
+ "exclusive": [
741
+ "partition"
742
+ ],
743
+ "name": "deployment",
744
+ "hasDynamicHelp": false,
745
+ "multiple": false,
746
+ "type": "option"
747
+ },
748
+ "partition": {
749
+ "aliases": [
750
+ "tag"
751
+ ],
752
+ "description": "Workflow environment partition (e.g. prod, test) — narrows which resources are searched for the instance; the instance's stored partition is what the command uses.",
753
+ "exclusive": [
754
+ "deployment"
755
+ ],
756
+ "name": "partition",
757
+ "hasDynamicHelp": false,
758
+ "multiple": false,
759
+ "type": "option"
760
+ },
761
+ "project-id": {
762
+ "char": "p",
763
+ "dependsOn": [
764
+ "dataset"
765
+ ],
766
+ "description": "Project ID of the dataset to read (overrides sanity.workflow.ts)",
767
+ "exclusive": [
768
+ "media-library-id",
769
+ "path",
770
+ "deployment"
771
+ ],
772
+ "helpGroup": "OVERRIDE",
773
+ "name": "project-id",
774
+ "hasDynamicHelp": false,
775
+ "helpValue": "<id>",
776
+ "multiple": false,
777
+ "type": "option"
778
+ },
779
+ "dataset": {
780
+ "char": "d",
781
+ "dependsOn": [
782
+ "project-id"
783
+ ],
784
+ "description": "Dataset to read (overrides sanity.workflow.ts)",
785
+ "exclusive": [
786
+ "media-library-id",
787
+ "path",
788
+ "deployment"
789
+ ],
790
+ "helpGroup": "OVERRIDE",
791
+ "name": "dataset",
792
+ "hasDynamicHelp": false,
793
+ "helpValue": "<name>",
794
+ "multiple": false,
795
+ "type": "option"
796
+ },
797
+ "media-library-id": {
798
+ "description": "Media library to read (overrides sanity.workflow.ts)",
799
+ "exclusive": [
800
+ "project-id",
801
+ "dataset",
802
+ "path",
803
+ "deployment"
804
+ ],
805
+ "helpGroup": "OVERRIDE",
806
+ "name": "media-library-id",
807
+ "hasDynamicHelp": false,
808
+ "helpValue": "<id>",
809
+ "multiple": false,
810
+ "type": "option"
811
+ },
812
+ "include": {
813
+ "description": "Optional sections to include in rendered output (--json always carries the full document).",
814
+ "name": "include",
815
+ "default": [],
816
+ "hasDynamicHelp": false,
817
+ "multiple": true,
818
+ "options": [
819
+ "history"
820
+ ],
821
+ "type": "option"
822
+ },
823
+ "json": {
824
+ "description": "Emit structured JSON instead of rendered output.",
825
+ "name": "json",
826
+ "allowNo": false,
827
+ "type": "boolean"
828
+ }
829
+ },
830
+ "hasDynamicHelp": false,
831
+ "hiddenAliases": [],
832
+ "id": "workflows:show",
833
+ "pluginAlias": "@sanity/workflows-cli",
834
+ "pluginName": "@sanity/workflows-cli",
835
+ "pluginType": "core",
836
+ "strict": true,
837
+ "isESM": true,
838
+ "relativePath": [
839
+ "dist",
840
+ "commands",
841
+ "workflows",
842
+ "show.js"
843
+ ]
844
+ },
845
+ "workflows:start": {
846
+ "aliases": [],
847
+ "args": {
848
+ "name": {
849
+ "description": "Workflow definition name.",
850
+ "name": "name",
851
+ "required": true
852
+ }
853
+ },
854
+ "description": "Start a workflow instance from a deployed definition. Supply values for the workflow's input-sourced fields with --field (e.g. the subject document ref).",
855
+ "examples": [
856
+ "<%= config.bin %> workflows start product-launch",
857
+ "<%= config.bin %> workflows start article-review --field subject='{\"id\":\"dataset:proj:ds:article-1\",\"type\":\"article\"}'",
858
+ "<%= config.bin %> workflows start release-review --field release=rA1b2C3d4",
859
+ "<%= config.bin %> workflows start release-review --field release=rA1b2C3d4 --release-resource content",
860
+ "<%= config.bin %> workflows start product-launch --version 2 --partition prod",
861
+ "<%= config.bin %> workflows start product-launch --instance-id prod.wf-instance.a1b2c3d4e5f6"
862
+ ],
863
+ "flags": {
864
+ "path": {
865
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
866
+ "name": "path",
867
+ "hasDynamicHelp": false,
868
+ "helpValue": "<file|dir>",
869
+ "multiple": false,
870
+ "type": "option"
871
+ },
872
+ "deployment": {
873
+ "description": "Deployment name — the unique identity of one deployment in the config.",
874
+ "exclusive": [
875
+ "partition"
876
+ ],
877
+ "name": "deployment",
878
+ "hasDynamicHelp": false,
879
+ "multiple": false,
880
+ "type": "option"
881
+ },
882
+ "partition": {
883
+ "aliases": [
884
+ "tag"
885
+ ],
886
+ "description": "Workflow environment partition (e.g. prod, test) — selects the deployment to act on while the partition names exactly one; pass --deployment when it spans several.",
887
+ "exclusive": [
888
+ "deployment"
889
+ ],
890
+ "name": "partition",
891
+ "hasDynamicHelp": false,
892
+ "multiple": false,
893
+ "type": "option"
894
+ },
895
+ "version": {
896
+ "description": "Definition version to start from (default: highest deployed).",
897
+ "name": "version",
898
+ "hasDynamicHelp": false,
899
+ "multiple": false,
900
+ "type": "option"
901
+ },
902
+ "field": {
903
+ "description": "Initial value for a declared input-sourced field, as name=value (repeatable). Values are JSON-parsed, falling back to a string; ref kinds take a JSON object with a GDR `id` and doc `type`. A release ref also takes a bare Content Release name.",
904
+ "name": "field",
905
+ "default": [],
906
+ "hasDynamicHelp": false,
907
+ "multiple": true,
908
+ "type": "option"
909
+ },
910
+ "release-resource": {
911
+ "description": "Resource alias (from the deployment's `resourceAliases`) that bare release names in --field point at. Needed when the deployment binds several other resources.",
912
+ "name": "release-resource",
913
+ "hasDynamicHelp": false,
914
+ "helpValue": "<alias>",
915
+ "multiple": false,
916
+ "type": "option"
917
+ },
918
+ "instance-id": {
919
+ "description": "Start under this instance id — for retries. The id is the start's idempotency key: pass the id of a start that failed partway and the engine resumes it instead of creating a duplicate (an already-settled start replays as a no-op). Omit to mint a fresh id.",
920
+ "name": "instance-id",
921
+ "hasDynamicHelp": false,
922
+ "multiple": false,
923
+ "type": "option"
924
+ },
925
+ "json": {
926
+ "description": "Emit structured JSON instead of rendered output.",
927
+ "name": "json",
928
+ "allowNo": false,
929
+ "type": "boolean"
930
+ }
931
+ },
932
+ "hasDynamicHelp": false,
933
+ "hiddenAliases": [],
934
+ "id": "workflows:start",
935
+ "pluginAlias": "@sanity/workflows-cli",
936
+ "pluginName": "@sanity/workflows-cli",
937
+ "pluginType": "core",
938
+ "strict": true,
939
+ "telemetry": {
940
+ "redacted": [
941
+ "field"
942
+ ]
943
+ },
944
+ "isESM": true,
945
+ "relativePath": [
946
+ "dist",
947
+ "commands",
948
+ "workflows",
949
+ "start.js"
950
+ ]
951
+ },
952
+ "workflows:tail": {
953
+ "aliases": [],
954
+ "args": {
955
+ "instanceId": {
956
+ "description": "Workflow instance id to tail.",
957
+ "name": "instanceId",
958
+ "required": true
959
+ }
960
+ },
961
+ "description": "Stream new history entries on a workflow instance as they land in the dataset.",
962
+ "examples": [
963
+ "<%= config.bin %> workflows tail wf-instance.abc123"
964
+ ],
965
+ "flags": {
966
+ "path": {
967
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
968
+ "name": "path",
969
+ "hasDynamicHelp": false,
970
+ "helpValue": "<file|dir>",
971
+ "multiple": false,
972
+ "type": "option"
973
+ },
974
+ "deployment": {
975
+ "description": "Deployment name — narrow the instance search to the resource that deployment targets; the partition still comes from the loaded instance.",
976
+ "exclusive": [
977
+ "partition"
978
+ ],
979
+ "name": "deployment",
980
+ "hasDynamicHelp": false,
981
+ "multiple": false,
982
+ "type": "option"
983
+ },
984
+ "partition": {
985
+ "aliases": [
986
+ "tag"
987
+ ],
988
+ "description": "Workflow environment partition (e.g. prod, test) — narrows which resources are searched for the instance; the instance's stored partition is what the command uses.",
989
+ "exclusive": [
990
+ "deployment"
991
+ ],
992
+ "name": "partition",
993
+ "hasDynamicHelp": false,
994
+ "multiple": false,
995
+ "type": "option"
996
+ },
997
+ "project-id": {
998
+ "char": "p",
999
+ "dependsOn": [
1000
+ "dataset"
1001
+ ],
1002
+ "description": "Project ID of the dataset to read (overrides sanity.workflow.ts)",
1003
+ "exclusive": [
1004
+ "media-library-id",
1005
+ "path",
1006
+ "deployment"
1007
+ ],
1008
+ "helpGroup": "OVERRIDE",
1009
+ "name": "project-id",
1010
+ "hasDynamicHelp": false,
1011
+ "helpValue": "<id>",
1012
+ "multiple": false,
1013
+ "type": "option"
1014
+ },
1015
+ "dataset": {
1016
+ "char": "d",
1017
+ "dependsOn": [
1018
+ "project-id"
1019
+ ],
1020
+ "description": "Dataset to read (overrides sanity.workflow.ts)",
1021
+ "exclusive": [
1022
+ "media-library-id",
1023
+ "path",
1024
+ "deployment"
1025
+ ],
1026
+ "helpGroup": "OVERRIDE",
1027
+ "name": "dataset",
1028
+ "hasDynamicHelp": false,
1029
+ "helpValue": "<name>",
1030
+ "multiple": false,
1031
+ "type": "option"
1032
+ },
1033
+ "media-library-id": {
1034
+ "description": "Media library to read (overrides sanity.workflow.ts)",
1035
+ "exclusive": [
1036
+ "project-id",
1037
+ "dataset",
1038
+ "path",
1039
+ "deployment"
1040
+ ],
1041
+ "helpGroup": "OVERRIDE",
1042
+ "name": "media-library-id",
1043
+ "hasDynamicHelp": false,
1044
+ "helpValue": "<id>",
1045
+ "multiple": false,
1046
+ "type": "option"
1047
+ }
1048
+ },
1049
+ "hasDynamicHelp": false,
1050
+ "hiddenAliases": [],
1051
+ "id": "workflows:tail",
1052
+ "pluginAlias": "@sanity/workflows-cli",
1053
+ "pluginName": "@sanity/workflows-cli",
1054
+ "pluginType": "core",
1055
+ "strict": true,
1056
+ "isESM": true,
1057
+ "relativePath": [
1058
+ "dist",
1059
+ "commands",
1060
+ "workflows",
1061
+ "tail.js"
1062
+ ]
1063
+ },
1064
+ "workflows:whoami": {
1065
+ "aliases": [],
1066
+ "args": {},
1067
+ "description": "Show the user ID Workflows records for your login. Put the Sanity user ID in user assignee fields.",
1068
+ "examples": [
1069
+ "<%= config.bin %> workflows whoami",
1070
+ "<%= config.bin %> workflows whoami --json",
1071
+ "<%= config.bin %> workflows whoami --project-id abc123 --dataset production"
1072
+ ],
1073
+ "flags": {
1074
+ "path": {
1075
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
1076
+ "name": "path",
1077
+ "hasDynamicHelp": false,
1078
+ "helpValue": "<file|dir>",
1079
+ "multiple": false,
1080
+ "type": "option"
1081
+ },
1082
+ "deployment": {
1083
+ "description": "Deployment name — read only the resource and partition that deployment targets.",
1084
+ "exclusive": [
1085
+ "partition"
1086
+ ],
1087
+ "name": "deployment",
1088
+ "hasDynamicHelp": false,
1089
+ "multiple": false,
1090
+ "type": "option"
1091
+ },
1092
+ "partition": {
1093
+ "aliases": [
1094
+ "tag"
1095
+ ],
1096
+ "description": "Workflow environment partition (e.g. prod, test) — an optional query filter that also narrows which resources are searched; omit to span them all.",
1097
+ "exclusive": [
1098
+ "deployment"
1099
+ ],
1100
+ "name": "partition",
1101
+ "hasDynamicHelp": false,
1102
+ "multiple": false,
1103
+ "type": "option"
1104
+ },
1105
+ "project-id": {
1106
+ "char": "p",
1107
+ "dependsOn": [
1108
+ "dataset"
1109
+ ],
1110
+ "description": "Project ID of the dataset to read (overrides sanity.workflow.ts)",
1111
+ "exclusive": [
1112
+ "media-library-id",
1113
+ "path",
1114
+ "deployment"
1115
+ ],
1116
+ "helpGroup": "OVERRIDE",
1117
+ "name": "project-id",
1118
+ "hasDynamicHelp": false,
1119
+ "helpValue": "<id>",
1120
+ "multiple": false,
1121
+ "type": "option"
1122
+ },
1123
+ "dataset": {
1124
+ "char": "d",
1125
+ "dependsOn": [
1126
+ "project-id"
1127
+ ],
1128
+ "description": "Dataset to read (overrides sanity.workflow.ts)",
1129
+ "exclusive": [
1130
+ "media-library-id",
1131
+ "path",
1132
+ "deployment"
1133
+ ],
1134
+ "helpGroup": "OVERRIDE",
1135
+ "name": "dataset",
1136
+ "hasDynamicHelp": false,
1137
+ "helpValue": "<name>",
1138
+ "multiple": false,
1139
+ "type": "option"
1140
+ },
1141
+ "media-library-id": {
1142
+ "description": "Media library to read (overrides sanity.workflow.ts)",
1143
+ "exclusive": [
1144
+ "project-id",
1145
+ "dataset",
1146
+ "path",
1147
+ "deployment"
1148
+ ],
1149
+ "helpGroup": "OVERRIDE",
1150
+ "name": "media-library-id",
1151
+ "hasDynamicHelp": false,
1152
+ "helpValue": "<id>",
1153
+ "multiple": false,
1154
+ "type": "option"
1155
+ },
1156
+ "json": {
1157
+ "description": "Emit structured JSON instead of rendered output.",
1158
+ "name": "json",
1159
+ "allowNo": false,
1160
+ "type": "boolean"
1161
+ }
1162
+ },
1163
+ "hasDynamicHelp": false,
1164
+ "hiddenAliases": [],
1165
+ "id": "workflows:whoami",
1166
+ "pluginAlias": "@sanity/workflows-cli",
1167
+ "pluginName": "@sanity/workflows-cli",
1168
+ "pluginType": "core",
1169
+ "strict": true,
1170
+ "isESM": true,
1171
+ "relativePath": [
1172
+ "dist",
1173
+ "commands",
1174
+ "workflows",
1175
+ "whoami.js"
1176
+ ]
1177
+ },
1178
+ "workflows:blueprints:generate": {
1179
+ "aliases": [],
1180
+ "args": {},
1181
+ "description": "Generate the Sanity Blueprints runtime the definitions require, next to sanity.workflow.ts. Writes the workflow resources, one function per derived need, the effect-handler registry, and a handler stub per declared effect. Covers every deployment in the config, because the emitted resources module declares them all. Document functions deploy from sanity.blueprint.ts to a project stack with a project token; a generated heartbeat deploys from workflows-heartbeat/ to an organization stack with an organization deploy token.",
1182
+ "examples": [
1183
+ "<%= config.bin %> workflows blueprints generate",
1184
+ "<%= config.bin %> workflows blueprints generate --verbose",
1185
+ "<%= config.bin %> workflows blueprints generate --check"
1186
+ ],
1187
+ "flags": {
1188
+ "path": {
1189
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
1190
+ "name": "path",
1191
+ "hasDynamicHelp": false,
1192
+ "helpValue": "<file|dir>",
1193
+ "multiple": false,
1194
+ "type": "option"
1195
+ },
1196
+ "check": {
1197
+ "description": "Verify the tree on disk still matches the definitions; write nothing and exit non-zero on any difference. The CI drift gate.",
1198
+ "name": "check",
1199
+ "allowNo": false,
1200
+ "type": "boolean"
1201
+ },
1202
+ "verbose": {
1203
+ "description": "Print the full runtime-needs report, every file written, and the heartbeat stack instructions even when its files are unchanged, in place of the summary of what changed and what needs you.",
1204
+ "exclusive": [
1205
+ "check"
1206
+ ],
1207
+ "name": "verbose",
1208
+ "allowNo": false,
1209
+ "type": "boolean"
1210
+ }
1211
+ },
1212
+ "hasDynamicHelp": false,
1213
+ "hiddenAliases": [
1214
+ "workflows:blueprint:generate"
1215
+ ],
1216
+ "id": "workflows:blueprints:generate",
1217
+ "pluginAlias": "@sanity/workflows-cli",
1218
+ "pluginName": "@sanity/workflows-cli",
1219
+ "pluginType": "core",
1220
+ "strict": true,
1221
+ "isESM": true,
1222
+ "relativePath": [
1223
+ "dist",
1224
+ "commands",
1225
+ "workflows",
1226
+ "blueprints",
1227
+ "generate.js"
1228
+ ]
1229
+ },
1230
+ "workflows:codemod:packages": {
1231
+ "aliases": [],
1232
+ "args": {
1233
+ "path": {
1234
+ "description": "File or directory to rewrite. Pass several to limit the run; defaults to the current directory. Directories skip node_modules, dist, and files git ignores.",
1235
+ "name": "path"
1236
+ }
1237
+ },
1238
+ "description": "Move imports and package.json dependencies from the retired Workflows packages to @sanity/workflows, @sanity/workflows-ui, @sanity/workflows-cli, and @sanity/workflows-test. Rewrites module specifiers in import, export, dynamic import(), require(), and vi.mock() calls, and replaces the old packages in every package.json dependency field. Package names in other strings, comments, and built-up specifiers are listed for you to fix by hand. Generated blueprint files are skipped: run blueprints generate after installing. Lockfiles are never edited.",
1239
+ "examples": [
1240
+ "<%= config.bin %> workflows codemod packages --dry-run",
1241
+ "<%= config.bin %> workflows codemod packages",
1242
+ "<%= config.bin %> workflows codemod packages apps/studio packages/shared"
1243
+ ],
1244
+ "flags": {
1245
+ "dry-run": {
1246
+ "description": "Print what would change and write nothing.",
1247
+ "name": "dry-run",
1248
+ "allowNo": false,
1249
+ "type": "boolean"
1250
+ }
1251
+ },
1252
+ "hasDynamicHelp": false,
1253
+ "hiddenAliases": [],
1254
+ "id": "workflows:codemod:packages",
1255
+ "pluginAlias": "@sanity/workflows-cli",
1256
+ "pluginName": "@sanity/workflows-cli",
1257
+ "pluginType": "core",
1258
+ "strict": false,
1259
+ "isESM": true,
1260
+ "relativePath": [
1261
+ "dist",
1262
+ "commands",
1263
+ "workflows",
1264
+ "codemod",
1265
+ "packages.js"
1266
+ ]
1267
+ },
1268
+ "workflows:definitions:delete": {
1269
+ "aliases": [],
1270
+ "args": {
1271
+ "name": {
1272
+ "description": "Workflow definition name.",
1273
+ "name": "name",
1274
+ "required": true
1275
+ }
1276
+ },
1277
+ "description": "Delete a deployed workflow definition (every version, or one via --version). Refuses while non-terminal instances exist unless --cascade aborts them first — instances are aborted in place, never deleted.",
1278
+ "examples": [
1279
+ "<%= config.bin %> workflows definitions delete my-workflow",
1280
+ "<%= config.bin %> workflows definitions delete my-workflow --version 2",
1281
+ "<%= config.bin %> workflows definitions delete my-workflow --cascade --reason 'workflow retired'"
1282
+ ],
1283
+ "flags": {
1284
+ "path": {
1285
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
1286
+ "name": "path",
1287
+ "hasDynamicHelp": false,
1288
+ "helpValue": "<file|dir>",
1289
+ "multiple": false,
1290
+ "type": "option"
1291
+ },
1292
+ "deployment": {
1293
+ "description": "Deployment name — the unique identity of one deployment in the config.",
1294
+ "exclusive": [
1295
+ "partition"
1296
+ ],
1297
+ "name": "deployment",
1298
+ "hasDynamicHelp": false,
1299
+ "multiple": false,
1300
+ "type": "option"
1301
+ },
1302
+ "partition": {
1303
+ "aliases": [
1304
+ "tag"
1305
+ ],
1306
+ "description": "Workflow environment partition (e.g. prod, test) — selects the deployment to act on while the partition names exactly one; pass --deployment when it spans several.",
1307
+ "exclusive": [
1308
+ "deployment"
1309
+ ],
1310
+ "name": "partition",
1311
+ "hasDynamicHelp": false,
1312
+ "multiple": false,
1313
+ "type": "option"
1314
+ },
1315
+ "version": {
1316
+ "description": "Delete only this deployed version (default: every version).",
1317
+ "name": "version",
1318
+ "hasDynamicHelp": false,
1319
+ "multiple": false,
1320
+ "type": "option"
1321
+ },
1322
+ "cascade": {
1323
+ "description": "Abort every non-terminal instance pinned to the targeted versions, then delete.",
1324
+ "name": "cascade",
1325
+ "allowNo": false,
1326
+ "type": "boolean"
1327
+ },
1328
+ "reason": {
1329
+ "description": "Free-text reason — recorded on each cascade-abort history entry.",
1330
+ "name": "reason",
1331
+ "hasDynamicHelp": false,
1332
+ "multiple": false,
1333
+ "type": "option"
1334
+ }
1335
+ },
1336
+ "hasDynamicHelp": false,
1337
+ "hiddenAliases": [
1338
+ "workflows:definition:delete"
1339
+ ],
1340
+ "id": "workflows:definitions:delete",
1341
+ "pluginAlias": "@sanity/workflows-cli",
1342
+ "pluginName": "@sanity/workflows-cli",
1343
+ "pluginType": "core",
1344
+ "strict": true,
1345
+ "telemetry": {
1346
+ "redacted": [
1347
+ "reason"
1348
+ ]
1349
+ },
1350
+ "isESM": true,
1351
+ "relativePath": [
1352
+ "dist",
1353
+ "commands",
1354
+ "workflows",
1355
+ "definitions",
1356
+ "delete.js"
1357
+ ]
1358
+ },
1359
+ "workflows:definitions:diff": {
1360
+ "aliases": [],
1361
+ "args": {
1362
+ "name": {
1363
+ "description": "Workflow definition name.",
1364
+ "name": "name",
1365
+ "required": true
1366
+ }
1367
+ },
1368
+ "description": "Diff an in-code definition against the deployed version (latest by default).",
1369
+ "examples": [
1370
+ "<%= config.bin %> workflows definitions diff product-launch",
1371
+ "<%= config.bin %> workflows definitions diff product-launch --version 2"
1372
+ ],
1373
+ "flags": {
1374
+ "path": {
1375
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
1376
+ "name": "path",
1377
+ "hasDynamicHelp": false,
1378
+ "helpValue": "<file|dir>",
1379
+ "multiple": false,
1380
+ "type": "option"
1381
+ },
1382
+ "deployment": {
1383
+ "description": "Deployment name — the unique identity of one deployment in the config.",
1384
+ "exclusive": [
1385
+ "partition"
1386
+ ],
1387
+ "name": "deployment",
1388
+ "hasDynamicHelp": false,
1389
+ "multiple": false,
1390
+ "type": "option"
1391
+ },
1392
+ "partition": {
1393
+ "aliases": [
1394
+ "tag"
1395
+ ],
1396
+ "description": "Workflow environment partition (e.g. prod, test) — selects the deployment to act on while the partition names exactly one; pass --deployment when it spans several.",
1397
+ "exclusive": [
1398
+ "deployment"
1399
+ ],
1400
+ "name": "partition",
1401
+ "hasDynamicHelp": false,
1402
+ "multiple": false,
1403
+ "type": "option"
1404
+ },
1405
+ "version": {
1406
+ "description": "Deployed version to diff against (default: latest).",
1407
+ "name": "version",
1408
+ "hasDynamicHelp": false,
1409
+ "multiple": false,
1410
+ "type": "option"
1411
+ }
1412
+ },
1413
+ "hasDynamicHelp": false,
1414
+ "hiddenAliases": [
1415
+ "workflows:definition:diff"
1416
+ ],
1417
+ "id": "workflows:definitions:diff",
1418
+ "pluginAlias": "@sanity/workflows-cli",
1419
+ "pluginName": "@sanity/workflows-cli",
1420
+ "pluginType": "core",
1421
+ "strict": true,
1422
+ "isESM": true,
1423
+ "relativePath": [
1424
+ "dist",
1425
+ "commands",
1426
+ "workflows",
1427
+ "definitions",
1428
+ "diff.js"
1429
+ ]
1430
+ },
1431
+ "workflows:definitions:list": {
1432
+ "aliases": [],
1433
+ "args": {},
1434
+ "description": "List deployed workflow definitions.",
1435
+ "examples": [
1436
+ "<%= config.bin %> workflows definitions list",
1437
+ "<%= config.bin %> workflows definitions list --partition prod",
1438
+ "<%= config.bin %> workflows definitions list --json"
1439
+ ],
1440
+ "flags": {
1441
+ "path": {
1442
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
1443
+ "name": "path",
1444
+ "hasDynamicHelp": false,
1445
+ "helpValue": "<file|dir>",
1446
+ "multiple": false,
1447
+ "type": "option"
1448
+ },
1449
+ "deployment": {
1450
+ "description": "Deployment name — read only the resource and partition that deployment targets.",
1451
+ "exclusive": [
1452
+ "partition"
1453
+ ],
1454
+ "name": "deployment",
1455
+ "hasDynamicHelp": false,
1456
+ "multiple": false,
1457
+ "type": "option"
1458
+ },
1459
+ "partition": {
1460
+ "aliases": [
1461
+ "tag"
1462
+ ],
1463
+ "description": "Workflow environment partition (e.g. prod, test) — an optional query filter that also narrows which resources are searched; omit to span them all.",
1464
+ "exclusive": [
1465
+ "deployment"
1466
+ ],
1467
+ "name": "partition",
1468
+ "hasDynamicHelp": false,
1469
+ "multiple": false,
1470
+ "type": "option"
1471
+ },
1472
+ "project-id": {
1473
+ "char": "p",
1474
+ "dependsOn": [
1475
+ "dataset"
1476
+ ],
1477
+ "description": "Project ID of the dataset to read (overrides sanity.workflow.ts)",
1478
+ "exclusive": [
1479
+ "media-library-id",
1480
+ "path",
1481
+ "deployment"
1482
+ ],
1483
+ "helpGroup": "OVERRIDE",
1484
+ "name": "project-id",
1485
+ "hasDynamicHelp": false,
1486
+ "helpValue": "<id>",
1487
+ "multiple": false,
1488
+ "type": "option"
1489
+ },
1490
+ "dataset": {
1491
+ "char": "d",
1492
+ "dependsOn": [
1493
+ "project-id"
1494
+ ],
1495
+ "description": "Dataset to read (overrides sanity.workflow.ts)",
1496
+ "exclusive": [
1497
+ "media-library-id",
1498
+ "path",
1499
+ "deployment"
1500
+ ],
1501
+ "helpGroup": "OVERRIDE",
1502
+ "name": "dataset",
1503
+ "hasDynamicHelp": false,
1504
+ "helpValue": "<name>",
1505
+ "multiple": false,
1506
+ "type": "option"
1507
+ },
1508
+ "media-library-id": {
1509
+ "description": "Media library to read (overrides sanity.workflow.ts)",
1510
+ "exclusive": [
1511
+ "project-id",
1512
+ "dataset",
1513
+ "path",
1514
+ "deployment"
1515
+ ],
1516
+ "helpGroup": "OVERRIDE",
1517
+ "name": "media-library-id",
1518
+ "hasDynamicHelp": false,
1519
+ "helpValue": "<id>",
1520
+ "multiple": false,
1521
+ "type": "option"
1522
+ },
1523
+ "limit": {
1524
+ "description": "The maximum number of definitions to return.",
1525
+ "name": "limit",
1526
+ "default": 100,
1527
+ "hasDynamicHelp": false,
1528
+ "multiple": false,
1529
+ "type": "option"
1530
+ },
1531
+ "name": {
1532
+ "description": "Filter to a single workflow definition name (e.g. product-launch).",
1533
+ "name": "name",
1534
+ "hasDynamicHelp": false,
1535
+ "multiple": false,
1536
+ "type": "option"
1537
+ },
1538
+ "json": {
1539
+ "description": "Emit structured JSON instead of rendered output.",
1540
+ "name": "json",
1541
+ "allowNo": false,
1542
+ "type": "boolean"
1543
+ }
1544
+ },
1545
+ "hasDynamicHelp": false,
1546
+ "hiddenAliases": [
1547
+ "workflows:definition:list"
1548
+ ],
1549
+ "id": "workflows:definitions:list",
1550
+ "pluginAlias": "@sanity/workflows-cli",
1551
+ "pluginName": "@sanity/workflows-cli",
1552
+ "pluginType": "core",
1553
+ "strict": true,
1554
+ "isESM": true,
1555
+ "relativePath": [
1556
+ "dist",
1557
+ "commands",
1558
+ "workflows",
1559
+ "definitions",
1560
+ "list.js"
1561
+ ]
1562
+ },
1563
+ "workflows:definitions:show": {
1564
+ "aliases": [],
1565
+ "args": {
1566
+ "name": {
1567
+ "description": "Workflow definition name.",
1568
+ "name": "name",
1569
+ "required": true
1570
+ }
1571
+ },
1572
+ "description": "Show a deployed workflow definition.",
1573
+ "flags": {
1574
+ "path": {
1575
+ "description": "Path to a sanity.workflow file, or a directory to search from upward through its parents. Defaults to the current directory.",
1576
+ "name": "path",
1577
+ "hasDynamicHelp": false,
1578
+ "helpValue": "<file|dir>",
1579
+ "multiple": false,
1580
+ "type": "option"
1581
+ },
1582
+ "deployment": {
1583
+ "description": "Deployment name — read only the resource and partition that deployment targets.",
1584
+ "exclusive": [
1585
+ "partition"
1586
+ ],
1587
+ "name": "deployment",
1588
+ "hasDynamicHelp": false,
1589
+ "multiple": false,
1590
+ "type": "option"
1591
+ },
1592
+ "partition": {
1593
+ "aliases": [
1594
+ "tag"
1595
+ ],
1596
+ "description": "Workflow environment partition (e.g. prod, test) — an optional query filter that also narrows which resources are searched; omit to span them all.",
1597
+ "exclusive": [
1598
+ "deployment"
1599
+ ],
1600
+ "name": "partition",
1601
+ "hasDynamicHelp": false,
1602
+ "multiple": false,
1603
+ "type": "option"
1604
+ },
1605
+ "project-id": {
1606
+ "char": "p",
1607
+ "dependsOn": [
1608
+ "dataset"
1609
+ ],
1610
+ "description": "Project ID of the dataset to read (overrides sanity.workflow.ts)",
1611
+ "exclusive": [
1612
+ "media-library-id",
1613
+ "path",
1614
+ "deployment"
1615
+ ],
1616
+ "helpGroup": "OVERRIDE",
1617
+ "name": "project-id",
1618
+ "hasDynamicHelp": false,
1619
+ "helpValue": "<id>",
1620
+ "multiple": false,
1621
+ "type": "option"
1622
+ },
1623
+ "dataset": {
1624
+ "char": "d",
1625
+ "dependsOn": [
1626
+ "project-id"
1627
+ ],
1628
+ "description": "Dataset to read (overrides sanity.workflow.ts)",
1629
+ "exclusive": [
1630
+ "media-library-id",
1631
+ "path",
1632
+ "deployment"
1633
+ ],
1634
+ "helpGroup": "OVERRIDE",
1635
+ "name": "dataset",
1636
+ "hasDynamicHelp": false,
1637
+ "helpValue": "<name>",
1638
+ "multiple": false,
1639
+ "type": "option"
1640
+ },
1641
+ "media-library-id": {
1642
+ "description": "Media library to read (overrides sanity.workflow.ts)",
1643
+ "exclusive": [
1644
+ "project-id",
1645
+ "dataset",
1646
+ "path",
1647
+ "deployment"
1648
+ ],
1649
+ "helpGroup": "OVERRIDE",
1650
+ "name": "media-library-id",
1651
+ "hasDynamicHelp": false,
1652
+ "helpValue": "<id>",
1653
+ "multiple": false,
1654
+ "type": "option"
1655
+ },
1656
+ "version": {
1657
+ "description": "Specific version (default: latest).",
1658
+ "name": "version",
1659
+ "hasDynamicHelp": false,
1660
+ "multiple": false,
1661
+ "type": "option"
1662
+ },
1663
+ "json": {
1664
+ "description": "Emit structured JSON instead of rendered output.",
1665
+ "name": "json",
1666
+ "allowNo": false,
1667
+ "type": "boolean"
1668
+ }
1669
+ },
1670
+ "hasDynamicHelp": false,
1671
+ "hiddenAliases": [
1672
+ "workflows:definition:show"
1673
+ ],
1674
+ "id": "workflows:definitions:show",
1675
+ "pluginAlias": "@sanity/workflows-cli",
1676
+ "pluginName": "@sanity/workflows-cli",
1677
+ "pluginType": "core",
1678
+ "strict": true,
1679
+ "isESM": true,
1680
+ "relativePath": [
1681
+ "dist",
1682
+ "commands",
1683
+ "workflows",
1684
+ "definitions",
1685
+ "show.js"
1686
+ ]
1687
+ },
1688
+ "workflows:definitions:validate": {
1689
+ "aliases": [],
1690
+ "args": {
1691
+ "file": {
1692
+ "description": "JSON file holding one definition or an array of them. Pass several files to validate a parent and its child workflows together.",
1693
+ "name": "file",
1694
+ "required": true
1695
+ }
1696
+ },
1697
+ "description": "Validate workflow definitions in JSON files without a config, login, or network access. Checks shape, cross-field rules, and GROQ syntax; deploy additionally checks duplicate names, spawn dependencies, resource bindings, project roles, and the reader-model acknowledgement. Exits non-zero when any definition is invalid. A file that cannot be read, is not valid JSON, or does not hold definition objects stops the command with an error message instead of a report, including with --json.",
1698
+ "examples": [
1699
+ "<%= config.bin %> workflows definitions validate review.json",
1700
+ "<%= config.bin %> workflows definitions validate parent.json child.json",
1701
+ "<%= config.bin %> workflows definitions validate review.json --json"
1702
+ ],
1703
+ "flags": {
1704
+ "json": {
1705
+ "description": "Emit structured JSON instead of rendered output.",
1706
+ "name": "json",
1707
+ "allowNo": false,
1708
+ "type": "boolean"
1709
+ }
1710
+ },
1711
+ "hasDynamicHelp": false,
1712
+ "hiddenAliases": [
1713
+ "workflows:definition:validate"
1714
+ ],
1715
+ "id": "workflows:definitions:validate",
1716
+ "pluginAlias": "@sanity/workflows-cli",
1717
+ "pluginName": "@sanity/workflows-cli",
1718
+ "pluginType": "core",
1719
+ "strict": false,
1720
+ "isESM": true,
1721
+ "relativePath": [
1722
+ "dist",
1723
+ "commands",
1724
+ "workflows",
1725
+ "definitions",
1726
+ "validate.js"
1727
+ ]
1728
+ }
1729
+ },
1730
+ "version": "0.0.0"
1731
+ }