@sanity/runtime-cli 14.13.3 → 15.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 (65) hide show
  1. package/README.md +215 -118
  2. package/dist/actions/blueprints/blueprint.js +13 -11
  3. package/dist/actions/blueprints/logs.d.ts +2 -1
  4. package/dist/actions/blueprints/logs.js +4 -5
  5. package/dist/actions/blueprints/resources.js +1 -0
  6. package/dist/actions/blueprints/stacks.d.ts +3 -1
  7. package/dist/actions/blueprints/stacks.js +11 -2
  8. package/dist/actions/functions/test.js +1 -1
  9. package/dist/actions/sanity/access.d.ts +38 -0
  10. package/dist/actions/sanity/access.js +23 -0
  11. package/dist/actions/sanity/projects.d.ts +1 -1
  12. package/dist/baseCommands.d.ts +2 -0
  13. package/dist/baseCommands.js +8 -5
  14. package/dist/commands/blueprints/add.js +1 -1
  15. package/dist/commands/blueprints/deploy.d.ts +2 -0
  16. package/dist/commands/blueprints/deploy.js +6 -2
  17. package/dist/commands/blueprints/destroy.js +0 -2
  18. package/dist/commands/blueprints/info.d.ts +1 -0
  19. package/dist/commands/blueprints/info.js +3 -1
  20. package/dist/commands/blueprints/init.js +2 -0
  21. package/dist/commands/blueprints/logs.d.ts +5 -0
  22. package/dist/commands/blueprints/logs.js +26 -3
  23. package/dist/commands/blueprints/mint-deploy-token.d.ts +14 -0
  24. package/dist/commands/blueprints/mint-deploy-token.js +47 -0
  25. package/dist/commands/blueprints/plan.d.ts +2 -0
  26. package/dist/commands/blueprints/plan.js +8 -2
  27. package/dist/commands/blueprints/promote.d.ts +2 -1
  28. package/dist/commands/blueprints/promote.js +7 -2
  29. package/dist/commands/blueprints/stacks.js +1 -1
  30. package/dist/commands/functions/add.js +1 -1
  31. package/dist/cores/blueprints/config.js +34 -34
  32. package/dist/cores/blueprints/doctor.js +7 -7
  33. package/dist/cores/blueprints/init.js +99 -76
  34. package/dist/cores/blueprints/logs.d.ts +3 -0
  35. package/dist/cores/blueprints/logs.js +15 -9
  36. package/dist/cores/blueprints/mint-deploy-token.d.ts +15 -0
  37. package/dist/cores/blueprints/mint-deploy-token.js +111 -0
  38. package/dist/cores/blueprints/promote.d.ts +1 -0
  39. package/dist/cores/blueprints/promote.js +25 -4
  40. package/dist/cores/functions/add.js +4 -5
  41. package/dist/cores/index.d.ts +1 -2
  42. package/dist/cores/index.js +1 -3
  43. package/dist/index.d.ts +0 -18
  44. package/dist/index.js +0 -20
  45. package/dist/utils/clipboard.d.ts +14 -0
  46. package/dist/utils/clipboard.js +73 -0
  47. package/dist/utils/display/errors.d.ts +5 -1
  48. package/dist/utils/display/prompt.d.ts +55 -15
  49. package/dist/utils/display/prompt.js +271 -45
  50. package/oclif.manifest.json +320 -18
  51. package/package.json +21 -67
  52. package/dist/actions/blueprints/index.d.ts +0 -16
  53. package/dist/actions/blueprints/index.js +0 -10
  54. package/dist/actions/functions/index.d.ts +0 -4
  55. package/dist/actions/functions/index.js +0 -4
  56. package/dist/actions/sanity/index.d.ts +0 -1
  57. package/dist/actions/sanity/index.js +0 -1
  58. package/dist/cores/blueprints/index.d.ts +0 -20
  59. package/dist/cores/blueprints/index.js +0 -10
  60. package/dist/cores/functions/index.d.ts +0 -16
  61. package/dist/cores/functions/index.js +0 -8
  62. package/dist/utils/display/index.d.ts +0 -5
  63. package/dist/utils/display/index.js +0 -5
  64. package/dist/utils/index.d.ts +0 -8
  65. package/dist/utils/index.js +0 -8
package/README.md CHANGED
@@ -20,7 +20,7 @@ $ npm install -g @sanity/runtime-cli
20
20
  $ sanity-run COMMAND
21
21
  running command...
22
22
  $ sanity-run (--version)
23
- @sanity/runtime-cli/14.13.3 linux-x64 node-v24.14.1
23
+ @sanity/runtime-cli/15.0.0 linux-x64 node-v24.14.1
24
24
  $ sanity-run --help [COMMAND]
25
25
  USAGE
26
26
  $ sanity-run COMMAND
@@ -37,7 +37,9 @@ USAGE
37
37
  * [`sanity-run blueprints info`](#sanity-run-blueprints-info)
38
38
  * [`sanity-run blueprints init [DIR]`](#sanity-run-blueprints-init-dir)
39
39
  * [`sanity-run blueprints logs`](#sanity-run-blueprints-logs)
40
+ * [`sanity-run blueprints mint-deploy-token`](#sanity-run-blueprints-mint-deploy-token)
40
41
  * [`sanity-run blueprints plan`](#sanity-run-blueprints-plan)
42
+ * [`sanity-run blueprints promote`](#sanity-run-blueprints-promote)
41
43
  * [`sanity-run blueprints stacks`](#sanity-run-blueprints-stacks)
42
44
  * [`sanity-run functions add`](#sanity-run-functions-add)
43
45
  * [`sanity-run functions dev`](#sanity-run-functions-dev)
@@ -54,7 +56,7 @@ USAGE
54
56
 
55
57
  ```
56
58
  USAGE
57
- $ sanity-run blueprints add TYPE [--json] [--validate-resources] [--example <value> | -n <value> | --fn-type
59
+ $ sanity-run blueprints add TYPE [--json] [--example <value> | -n <value> | --fn-type
58
60
  document-publish|document-create|document-delete|document-update|media-library-asset-create|media-library-asset-dele
59
61
  te|media-library-asset-update|scheduled-function|sync-tag-invalidate... | --language ts|js | --javascript |
60
62
  --fn-helpers | --fn-installer skip|npm|pnpm|yarn] [-i | ]
@@ -63,23 +65,22 @@ ARGUMENTS
63
65
  TYPE (function) Type of resource to add (only "function" is supported)
64
66
 
65
67
  FLAGS
66
- -i, --install Shortcut for --fn-installer npm
67
- -n, --name=<value> Name of the resource to add
68
- --example=<value> Example to use for the function resource. Discover examples at
69
- https://www.sanity.io/exchange/type=recipes/by=sanity
70
- --[no-]fn-helpers Add helpers to the new function
71
- --fn-installer=<option> Which package manager to use when installing the @sanity/functions helpers
72
- <options: skip|npm|pnpm|yarn>
73
- --fn-type=<option>... Document change event(s) that should trigger the function; you can specify multiple
74
- events by specifying this flag multiple times
75
- <options: document-publish|document-create|document-delete|document-update|media-librar
76
- y-asset-create|media-library-asset-delete|media-library-asset-update|scheduled-function
77
- |sync-tag-invalidate>
78
- --javascript Use JavaScript instead of TypeScript
79
- --json Format output as json
80
- --language=<option> [default: ts] Language of the new function
81
- <options: ts|js>
82
- --[no-]validate-resources Validate resources
68
+ -i, --install Shortcut for --fn-installer npm
69
+ -n, --name=<value> Name of the resource to add
70
+ --example=<value> Example to use for the function resource. Discover examples at
71
+ https://www.sanity.io/exchange/type=recipes/by=sanity
72
+ --[no-]fn-helpers Add helpers to the new function
73
+ --fn-installer=<option> Which package manager to use when installing the @sanity/functions helpers
74
+ <options: skip|npm|pnpm|yarn>
75
+ --fn-type=<option>... Document change event(s) that should trigger the function; you can specify multiple
76
+ events by specifying this flag multiple times
77
+ <options: document-publish|document-create|document-delete|document-update|media-library-
78
+ asset-create|media-library-asset-delete|media-library-asset-update|scheduled-function|syn
79
+ c-tag-invalidate>
80
+ --javascript Use JavaScript instead of TypeScript
81
+ --json Format output as json
82
+ --language=<option> [default: ts] Language of the new function
83
+ <options: ts|js>
83
84
 
84
85
  DESCRIPTION
85
86
  [deprecated] Use "functions add" instead
@@ -102,7 +103,7 @@ EXAMPLES
102
103
  $ sanity-run blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
103
104
  ```
104
105
 
105
- _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/add.ts)_
106
+ _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/add.ts)_
106
107
 
107
108
  ## `sanity-run blueprints config`
108
109
 
@@ -110,8 +111,7 @@ View or edit the local Blueprint configuration
110
111
 
111
112
  ```
112
113
  USAGE
113
- $ sanity-run blueprints config [--json] [--validate-resources] [--stack <value> -e] [--project-id <value> ]
114
- [--organization-id <value> ]
114
+ $ sanity-run blueprints config [--json] [--stack <value> -e] [--project-id <value> ] [--organization-id <value> ]
115
115
 
116
116
  FLAGS
117
117
  -e, --edit Modify the configuration interactively, or directly when combined with ID flags.
@@ -119,7 +119,6 @@ FLAGS
119
119
  --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
120
120
  --project-id=<value> Sanity project ID used to scope Blueprint and Stack
121
121
  --stack=<value> Stack name or ID to set in the configuration. Requires --edit flag
122
- --[no-]validate-resources Validate resources
123
122
 
124
123
  DESCRIPTION
125
124
  View or edit the local Blueprint configuration
@@ -141,7 +140,7 @@ EXAMPLES
141
140
  $ sanity-run blueprints config --edit --project-id <projectId> --stack <name-or-id>
142
141
  ```
143
142
 
144
- _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/config.ts)_
143
+ _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/config.ts)_
145
144
 
146
145
  ## `sanity-run blueprints deploy`
147
146
 
@@ -149,14 +148,17 @@ Deploy the local Blueprint to the remote Stack
149
148
 
150
149
  ```
151
150
  USAGE
152
- $ sanity-run blueprints deploy [--json] [--validate-resources] [--stack <value>] [-m <value>] [--no-wait]
151
+ $ sanity-run blueprints deploy [--json] [--stack <value>] [--project-id <value> | --organization-id <value>] [-m
152
+ <value>] [--no-wait] [--new-stack-name <value>]
153
153
 
154
154
  FLAGS
155
155
  -m, --message=<value> Message describing the deployment (e.g. reason for change)
156
156
  --json Format output as json
157
+ --new-stack-name=<value> Set a new name for the Stack
157
158
  --no-wait Do not wait for Stack deployment to complete
159
+ --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
160
+ --project-id=<value> Sanity project ID used to scope Blueprint and Stack
158
161
  --stack=<value> Stack name or ID to use instead of the locally configured Stack
159
- --[no-]validate-resources Validate resources
160
162
 
161
163
  DESCRIPTION
162
164
  Deploy the local Blueprint to the remote Stack
@@ -181,9 +183,15 @@ EXAMPLES
181
183
  $ sanity-run blueprints deploy --no-wait
182
184
 
183
185
  $ sanity-run blueprints deploy --fn-installer npm
186
+
187
+ $ sanity-run blueprints deploy --stack <name-or-id>
188
+
189
+ $ sanity-run blueprints deploy --organization-id <orgId> --stack <name-or-id>
190
+
191
+ $ sanity-run blueprints deploy --new-stack-name <new-name>
184
192
  ```
185
193
 
186
- _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/deploy.ts)_
194
+ _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/deploy.ts)_
187
195
 
188
196
  ## `sanity-run blueprints destroy`
189
197
 
@@ -191,8 +199,8 @@ Destroy a remote Stack deployment and its resources
191
199
 
192
200
  ```
193
201
  USAGE
194
- $ sanity-run blueprints destroy [--json] [--validate-resources] [--project-id <value> --stack <value> --force]
195
- [--organization-id <value> ] [--no-wait]
202
+ $ sanity-run blueprints destroy [--json] [--project-id <value> --stack <value> --force] [--organization-id <value> ]
203
+ [--no-wait]
196
204
 
197
205
  FLAGS
198
206
  --force Force Stack destruction (skip confirmation)
@@ -201,7 +209,6 @@ FLAGS
201
209
  --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
202
210
  --project-id=<value> Sanity project ID used to scope Blueprint and Stack
203
211
  --stack=<value> Stack name or ID to destroy (defaults to the locally configured Stack)
204
- --[no-]validate-resources Validate resources
205
212
 
206
213
  DESCRIPTION
207
214
  Destroy a remote Stack deployment and its resources
@@ -219,7 +226,7 @@ EXAMPLES
219
226
  $ sanity-run blueprints destroy --stack <name-or-id> --project-id <projectId> --force --no-wait
220
227
  ```
221
228
 
222
- _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/destroy.ts)_
229
+ _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/destroy.ts)_
223
230
 
224
231
  ## `sanity-run blueprints doctor`
225
232
 
@@ -227,14 +234,13 @@ Diagnose potential issues with local Blueprint and remote Stack configuration
227
234
 
228
235
  ```
229
236
  USAGE
230
- $ sanity-run blueprints doctor [--json] [-p <value>] [--validate-resources] [--verbose] [--fix]
237
+ $ sanity-run blueprints doctor [--json] [-p <value>] [--verbose] [--fix]
231
238
 
232
239
  FLAGS
233
- -p, --path=<value> [env: SANITY_BLUEPRINT_PATH] Path to a Blueprint file or directory containing one
234
- --fix Interactively fix configuration issues
235
- --json Format output as json
236
- --[no-]validate-resources Validate resources
237
- --[no-]verbose Verbose output; defaults to true
240
+ -p, --path=<value> [env: SANITY_BLUEPRINT_PATH] Path to a Blueprint file or directory containing one
241
+ --fix Interactively fix configuration issues
242
+ --json Format output as json
243
+ --[no-]verbose Verbose output; defaults to true
238
244
 
239
245
  DESCRIPTION
240
246
  Diagnose potential issues with local Blueprint and remote Stack configuration
@@ -251,7 +257,7 @@ EXAMPLES
251
257
  $ sanity-run blueprints doctor --fix
252
258
  ```
253
259
 
254
- _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/doctor.ts)_
260
+ _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/doctor.ts)_
255
261
 
256
262
  ## `sanity-run blueprints info`
257
263
 
@@ -259,13 +265,13 @@ Display the status and resources of the remote Stack deployment
259
265
 
260
266
  ```
261
267
  USAGE
262
- $ sanity-run blueprints info [--json] [--validate-resources] [--stack <value>] [--project-id <value>]
268
+ $ sanity-run blueprints info [--json] [--stack <value>] [--project-id <value> | --organization-id <value>]
263
269
 
264
270
  FLAGS
265
271
  --json Format output as json
272
+ --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
266
273
  --project-id=<value> Sanity project ID used to scope Blueprint and Stack
267
274
  --stack=<value> Stack name or ID
268
- --[no-]validate-resources Validate resources
269
275
 
270
276
  DESCRIPTION
271
277
  Display the status and resources of the remote Stack deployment
@@ -284,9 +290,11 @@ EXAMPLES
284
290
  $ sanity-run blueprints info --stack <name-or-id>
285
291
 
286
292
  $ sanity-run blueprints info --project-id <id> --stack <name-or-id>
293
+
294
+ $ sanity-run blueprints info --organization-id <orgId> --stack <name-or-id>
287
295
  ```
288
296
 
289
- _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/info.ts)_
297
+ _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/info.ts)_
290
298
 
291
299
  ## `sanity-run blueprints init [DIR]`
292
300
 
@@ -294,9 +302,8 @@ Initialize a Blueprint and create a remote Stack
294
302
 
295
303
  ```
296
304
  USAGE
297
- $ sanity-run blueprints init [DIR] [--json] [--validate-resources] [--dir <value>] [--example <value> |
298
- --blueprint-type json|js|ts | --stack-id <value> | --stack-name <value>] [--project-id <value>] [--organization-id
299
- <value>]
305
+ $ sanity-run blueprints init [DIR] [--json] [--dir <value>] [--example <value> | --blueprint-type json|js|ts |
306
+ --stack-id <value> | --stack-name <value>] [--project-id <value> | --organization-id <value>]
300
307
 
301
308
  ARGUMENTS
302
309
  [DIR] Directory to create the local Blueprint in
@@ -311,7 +318,6 @@ FLAGS
311
318
  --project-id=<value> Sanity project ID used to scope Blueprint and Stack
312
319
  --stack-id=<value> Existing Stack ID used to scope local Blueprint
313
320
  --stack-name=<value> Name to use for a new Stack provisioned during initialization
314
- --[no-]validate-resources Validate resources
315
321
 
316
322
  DESCRIPTION
317
323
  Initialize a Blueprint and create a remote Stack
@@ -339,7 +345,7 @@ EXAMPLES
339
345
  $ sanity-run blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
340
346
  ```
341
347
 
342
- _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/init.ts)_
348
+ _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/init.ts)_
343
349
 
344
350
  ## `sanity-run blueprints logs`
345
351
 
@@ -347,20 +353,27 @@ Display logs for the current Blueprint's Stack deployment
347
353
 
348
354
  ```
349
355
  USAGE
350
- $ sanity-run blueprints logs [--json] [--validate-resources] [--stack <value>] [-w]
356
+ $ sanity-run blueprints logs [--json] [--stack <value>] [--project-id <value> | --organization-id <value>] [-l
357
+ <value> | -w] [--since <value> | ] [--before <value> | ]
351
358
 
352
359
  FLAGS
353
- -w, --watch Watch for new Stack logs (streaming mode)
360
+ -l, --limit=<value> Maximum number of log entries to retrieve (1-500)
361
+ -w, --watch Watch for new Stack logs
362
+ --before=<value> Only show logs before this ISO 8601 timestamp
354
363
  --json Format output as json
364
+ --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
365
+ --project-id=<value> Sanity project ID used to scope Blueprint and Stack
366
+ --since=<value> Only show logs after this ISO 8601 timestamp
355
367
  --stack=<value> Stack name or ID to use instead of the locally configured Stack
356
- --[no-]validate-resources Validate resources
357
368
 
358
369
  DESCRIPTION
359
370
  Display logs for the current Blueprint's Stack deployment
360
371
 
361
372
  Retrieves Stack deployment logs, useful for debugging and monitoring deployment activity.
362
373
 
363
- Use --watch (-w) to stream logs in real-time.
374
+ Use --watch (-w) to tail logs in real-time.
375
+
376
+ Use --limit, --since, or --before to narrow the result set when not watching.
364
377
 
365
378
  If you're not seeing expected logs, verify your Stack is deployed with 'blueprints info'.
366
379
 
@@ -368,9 +381,62 @@ EXAMPLES
368
381
  $ sanity-run blueprints logs
369
382
 
370
383
  $ sanity-run blueprints logs --watch
384
+
385
+ $ sanity-run blueprints logs --stack <name-or-id>
386
+
387
+ $ sanity-run blueprints logs --limit 500
388
+
389
+ $ sanity-run blueprints logs --since 2026-05-01T00:00:00Z
390
+
391
+ $ sanity-run blueprints logs --before 2026-05-01T00:00:00Z
371
392
  ```
372
393
 
373
- _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/logs.ts)_
394
+ _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/logs.ts)_
395
+
396
+ ## `sanity-run blueprints mint-deploy-token`
397
+
398
+ Create a robot API token for deploying Blueprints from CI/CD
399
+
400
+ ```
401
+ USAGE
402
+ $ sanity-run blueprints mint-deploy-token [--project-id <value> | --organization-id <value>] [--label <value>] [-P |
403
+ --json]
404
+
405
+ FLAGS
406
+ -P, --print Print only the raw token to stdout (suitable for shell substitution)
407
+ --json Format output as json
408
+ --label=<value> Human-readable label for the robot. Defaults to a generated value.
409
+ --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
410
+ --project-id=<value> Sanity project ID used to scope Blueprint and Stack
411
+
412
+ DESCRIPTION
413
+ Create a robot API token for deploying Blueprints from CI/CD
414
+
415
+ Mints a long-lived robot token with the role required to plan, deploy, and destroy Blueprints in this project or
416
+ organization.
417
+
418
+ By default the command runs interactively and asks how you want to receive the token (clipboard, print, or exit). Use
419
+ --print to emit only the raw token for shell pipelines, or --json for full API output.
420
+
421
+ The minted token is also visible in your Sanity Manage UI under Robots, where it can be revoked.
422
+
423
+ EXAMPLES
424
+ $ sanity-run blueprints mint-deploy-token
425
+
426
+ $ sanity-run blueprints mint-deploy-token --label "ci-deploy"
427
+
428
+ $ sanity-run blueprints mint-deploy-token --print
429
+
430
+ export SANITY_AUTH_TOKEN=$(sanity-run blueprints mint-deploy-token --print)
431
+
432
+ $ sanity-run blueprints mint-deploy-token --json
433
+
434
+ $ sanity-run blueprints mint-deploy-token --project-id <projectId>
435
+
436
+ $ sanity-run blueprints mint-deploy-token --organization-id <orgId>
437
+ ```
438
+
439
+ _See code: [src/commands/blueprints/mint-deploy-token.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/mint-deploy-token.ts)_
374
440
 
375
441
  ## `sanity-run blueprints plan`
376
442
 
@@ -378,12 +444,13 @@ Preview changes that will be applied to the remote Stack
378
444
 
379
445
  ```
380
446
  USAGE
381
- $ sanity-run blueprints plan [--json] [--validate-resources] [--stack <value>]
447
+ $ sanity-run blueprints plan [--json] [--stack <value>] [--project-id <value> | --organization-id <value>]
382
448
 
383
449
  FLAGS
384
450
  --json Format output as json
451
+ --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
452
+ --project-id=<value> Sanity project ID used to scope Blueprint and Stack
385
453
  --stack=<value> Stack name or ID to use instead of the locally configured Stack
386
- --[no-]validate-resources Validate resources
387
454
 
388
455
  DESCRIPTION
389
456
  Preview changes that will be applied to the remote Stack
@@ -396,9 +463,49 @@ DESCRIPTION
396
463
 
397
464
  EXAMPLES
398
465
  $ sanity-run blueprints plan
466
+
467
+ $ sanity-run blueprints plan --stack <name-or-id>
468
+
469
+ $ sanity-run blueprints plan --organization-id <orgId> --stack <name-or-id>
470
+ ```
471
+
472
+ _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/plan.ts)_
473
+
474
+ ## `sanity-run blueprints promote`
475
+
476
+ Promote a Stack from project scope to organization scope
477
+
478
+ ```
479
+ USAGE
480
+ $ sanity-run blueprints promote [--json] [--stack <value>] [--project-id <value> | ] [--force] [--new-stack-name
481
+ <value>]
482
+
483
+ FLAGS
484
+ --force Skip confirmation prompt
485
+ --json Format output as json
486
+ --new-stack-name=<value> Set a new name for the Stack while promoting
487
+ --project-id=<value> Sanity project ID used to scope Blueprint and Stack
488
+ --stack=<value> Stack name or ID to promote
489
+
490
+ DESCRIPTION
491
+ Promote a Stack from project scope to organization scope
492
+
493
+ Promotes a deployed Stack to organization scope, enabling management of org-level resources. Promotion cannot be
494
+ reversed.
495
+
496
+ Your local Blueprint configuration will be updated to reflect the new scope.
497
+
498
+ EXAMPLES
499
+ $ sanity-run blueprints promote
500
+
501
+ $ sanity-run blueprints promote --stack <name-or-id>
502
+
503
+ $ sanity-run blueprints promote --project-id <projectId> --stack <name-or-id>
504
+
505
+ $ sanity-run blueprints promote --new-stack-name <new-name>
399
506
  ```
400
507
 
401
- _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/plan.ts)_
508
+ _See code: [src/commands/blueprints/promote.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/promote.ts)_
402
509
 
403
510
  ## `sanity-run blueprints stacks`
404
511
 
@@ -406,15 +513,13 @@ List remote Stack deployments for your project or organization
406
513
 
407
514
  ```
408
515
  USAGE
409
- $ sanity-run blueprints stacks [--json] [--validate-resources] [--project-id <value> | --organization-id <value> |
410
- --include-projects]
516
+ $ sanity-run blueprints stacks [--json] [--project-id <value> | --organization-id <value> | --include-projects]
411
517
 
412
518
  FLAGS
413
519
  --include-projects Include Stacks from all projects within the organization. Requires --organization-id.
414
520
  --json Format output as json
415
521
  --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
416
522
  --project-id=<value> Sanity project ID used to scope Blueprint and Stack
417
- --[no-]validate-resources Validate resources
418
523
 
419
524
  DESCRIPTION
420
525
  List remote Stack deployments for your project or organization
@@ -436,7 +541,7 @@ EXAMPLES
436
541
  $ sanity-run blueprints stacks --organization-id <organizationId> --include-projects
437
542
  ```
438
543
 
439
- _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/blueprints/stacks.ts)_
544
+ _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/blueprints/stacks.ts)_
440
545
 
441
546
  ## `sanity-run functions add`
442
547
 
@@ -444,28 +549,27 @@ Add a Function to your Blueprint
444
549
 
445
550
  ```
446
551
  USAGE
447
- $ sanity-run functions add [--json] [--validate-resources] [--example <value> | -n <value> | | --language ts|js
448
- | --javascript | | ] [--type document-publish|document-create|document-delete|document-update|media-library-asset-c
449
- reate|media-library-asset-delete|media-library-asset-update|scheduled-function|sync-tag-invalidate... ] [--helpers]
450
- [--installer skip|npm|pnpm|yarn] [-i | ]
552
+ $ sanity-run functions add [--json] [--example <value> | -n <value> | | --language ts|js | --javascript | | ]
553
+ [--type document-publish|document-create|document-delete|document-update|media-library-asset-create|media-library-as
554
+ set-delete|media-library-asset-update|scheduled-function|sync-tag-invalidate... ] [--helpers] [--installer
555
+ skip|npm|pnpm|yarn] [-i | ]
451
556
 
452
557
  FLAGS
453
- -i, --install Shortcut for --fn-installer npm
454
- -n, --name=<value> Name of the Function to add
455
- --example=<value> Example to use for the Function
456
- --[no-]helpers Add helpers to the new Function
457
- --installer=<option> How to install the @sanity/functions helpers
458
- <options: skip|npm|pnpm|yarn>
459
- --javascript Use JavaScript instead of TypeScript
460
- --json Format output as json
461
- --language=<option> [default: ts] Language of the new Function
462
- <options: ts|js>
463
- --type=<option>... Document change event(s) that should trigger the function; you can specify multiple
464
- events by specifying this flag multiple times
465
- <options: document-publish|document-create|document-delete|document-update|media-librar
466
- y-asset-create|media-library-asset-delete|media-library-asset-update|scheduled-function
467
- |sync-tag-invalidate>
468
- --[no-]validate-resources Validate resources
558
+ -i, --install Shortcut for --fn-installer npm
559
+ -n, --name=<value> Name of the Function to add
560
+ --example=<value> Example to use for the Function
561
+ --[no-]helpers Add helpers to the new Function
562
+ --installer=<option> How to install the @sanity/functions helpers
563
+ <options: skip|npm|pnpm|yarn>
564
+ --javascript Use JavaScript instead of TypeScript
565
+ --json Format output as json
566
+ --language=<option> [default: ts] Language of the new Function
567
+ <options: ts|js>
568
+ --type=<option>... Document change event(s) that should trigger the function; you can specify multiple events
569
+ by specifying this flag multiple times
570
+ <options: document-publish|document-create|document-delete|document-update|media-library-ass
571
+ et-create|media-library-asset-delete|media-library-asset-update|scheduled-function|sync-tag-
572
+ invalidate>
469
573
 
470
574
  DESCRIPTION
471
575
  Add a Function to your Blueprint
@@ -489,7 +593,7 @@ EXAMPLES
489
593
  $ sanity-run functions add --name my-function --type document-create --type document-update --lang js
490
594
  ```
491
595
 
492
- _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/functions/add.ts)_
596
+ _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/functions/add.ts)_
493
597
 
494
598
  ## `sanity-run functions dev`
495
599
 
@@ -497,15 +601,14 @@ Start the Sanity Function emulator
497
601
 
498
602
  ```
499
603
  USAGE
500
- $ sanity-run functions dev [--json] [--validate-resources] [-h <value>] [-p <value>] [-t <value>]
604
+ $ sanity-run functions dev [--json] [-h <value>] [-p <value>] [-t <value>]
501
605
 
502
606
  FLAGS
503
- -h, --host=<value> The local network interface at which to listen. [default: "localhost"]
504
- -p, --port=<value> TCP port to start emulator on. [default: 8080]
505
- -t, --timeout=<value> Maximum execution time for all functions, in seconds. Takes precedence over
506
- function-specific `timeout`
507
- --json Format output as json
508
- --[no-]validate-resources Validate resources
607
+ -h, --host=<value> The local network interface at which to listen. [default: "localhost"]
608
+ -p, --port=<value> TCP port to start emulator on. [default: 8080]
609
+ -t, --timeout=<value> Maximum execution time for all functions, in seconds. Takes precedence over function-specific
610
+ `timeout`
611
+ --json Format output as json
509
612
 
510
613
  DESCRIPTION
511
614
  Start the Sanity Function emulator
@@ -525,7 +628,7 @@ EXAMPLES
525
628
  $ sanity-run functions dev --timeout 60
526
629
  ```
527
630
 
528
- _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/functions/dev.ts)_
631
+ _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/functions/dev.ts)_
529
632
 
530
633
  ## `sanity-run functions env add NAME KEY VALUE`
531
634
 
@@ -533,7 +636,7 @@ Add or set an environment variable for a deployed function
533
636
 
534
637
  ```
535
638
  USAGE
536
- $ sanity-run functions env add NAME KEY VALUE [--json] [--validate-resources]
639
+ $ sanity-run functions env add NAME KEY VALUE [--json]
537
640
 
538
641
  ARGUMENTS
539
642
  NAME The name of the Sanity Function
@@ -541,8 +644,7 @@ ARGUMENTS
541
644
  VALUE The value of the environment variable
542
645
 
543
646
  FLAGS
544
- --json Format output as json
545
- --[no-]validate-resources Validate resources
647
+ --json Format output as json
546
648
 
547
649
  DESCRIPTION
548
650
  Add or set an environment variable for a deployed function
@@ -556,7 +658,7 @@ EXAMPLES
556
658
  $ sanity-run functions env add MyFunction API_URL https://api.example.com/
557
659
  ```
558
660
 
559
- _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/functions/env/add.ts)_
661
+ _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/functions/env/add.ts)_
560
662
 
561
663
  ## `sanity-run functions env list NAME`
562
664
 
@@ -564,14 +666,13 @@ List environment variables for a deployed function
564
666
 
565
667
  ```
566
668
  USAGE
567
- $ sanity-run functions env list NAME [--json] [--validate-resources]
669
+ $ sanity-run functions env list NAME [--json]
568
670
 
569
671
  ARGUMENTS
570
672
  NAME The name of the Sanity Function
571
673
 
572
674
  FLAGS
573
- --json Format output as json
574
- --[no-]validate-resources Validate resources
675
+ --json Format output as json
575
676
 
576
677
  DESCRIPTION
577
678
  List environment variables for a deployed function
@@ -584,7 +685,7 @@ EXAMPLES
584
685
  $ sanity-run functions env list MyFunction
585
686
  ```
586
687
 
587
- _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/functions/env/list.ts)_
688
+ _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/functions/env/list.ts)_
588
689
 
589
690
  ## `sanity-run functions env remove NAME KEY`
590
691
 
@@ -592,15 +693,14 @@ Remove an environment variable from a deployed function
592
693
 
593
694
  ```
594
695
  USAGE
595
- $ sanity-run functions env remove NAME KEY [--json] [--validate-resources]
696
+ $ sanity-run functions env remove NAME KEY [--json]
596
697
 
597
698
  ARGUMENTS
598
699
  NAME The name of the Sanity Function
599
700
  KEY The name of the environment variable
600
701
 
601
702
  FLAGS
602
- --json Format output as json
603
- --[no-]validate-resources Validate resources
703
+ --json Format output as json
604
704
 
605
705
  DESCRIPTION
606
706
  Remove an environment variable from a deployed function
@@ -614,7 +714,7 @@ EXAMPLES
614
714
  $ sanity-run functions env remove MyFunction API_URL
615
715
  ```
616
716
 
617
- _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/functions/env/remove.ts)_
717
+ _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/functions/env/remove.ts)_
618
718
 
619
719
  ## `sanity-run functions logs [NAME]`
620
720
 
@@ -622,21 +722,19 @@ Retrieve or delete logs for a Sanity Function
622
722
 
623
723
  ```
624
724
  USAGE
625
- $ sanity-run functions logs [NAME] [--validate-resources] [--stack <value>] [-u] [-f [-d | -l <value> | --json]]
626
- [-w]
725
+ $ sanity-run functions logs [NAME] [--stack <value>] [-u] [-f [-d | -l <value> | --json]] [-w]
627
726
 
628
727
  ARGUMENTS
629
728
  [NAME] The name of the Sanity Function
630
729
 
631
730
  FLAGS
632
- -d, --delete Delete all logs for the function
633
- -f, --force Skip confirmation for deleting logs
634
- -l, --limit=<value> [default: 50] Total number of log entries to retrieve
635
- -u, --utc Show dates in UTC time zone
636
- -w, --watch Watch for new logs (streaming mode)
637
- --json Format output as json
638
- --stack=<value> Stack name or ID to use instead of the locally configured Stack
639
- --[no-]validate-resources Validate resources
731
+ -d, --delete Delete all logs for the function
732
+ -f, --force Skip confirmation for deleting logs
733
+ -l, --limit=<value> [default: 50] Total number of log entries to retrieve
734
+ -u, --utc Show dates in UTC time zone
735
+ -w, --watch Watch for new logs (streaming mode)
736
+ --json Format output as json
737
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
640
738
 
641
739
  DESCRIPTION
642
740
  Retrieve or delete logs for a Sanity Function
@@ -656,7 +754,7 @@ EXAMPLES
656
754
  $ sanity-run functions logs <name> --delete
657
755
  ```
658
756
 
659
- _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/functions/logs.ts)_
757
+ _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/functions/logs.ts)_
660
758
 
661
759
  ## `sanity-run functions test [NAME]`
662
760
 
@@ -664,11 +762,11 @@ Invoke a local Sanity Function
664
762
 
665
763
  ```
666
764
  USAGE
667
- $ sanity-run functions test [NAME] [--json] [--validate-resources] [--organization-id <value>] [--data-before
668
- <value> | [-d <value> | -f <value> | --document-id <value>] | | | --file-before <value> | --file-after <value> |
669
- --document-id-before <value> | --document-id-after <value>] [--data-after <value> | | | | | | | ] [-e
670
- create|update|delete] [-t <value>] [-a <value>] [--with-user-token] [--media-library-id <value> | --project-id
671
- <value> | --dataset <value>]
765
+ $ sanity-run functions test [NAME] [--json] [--data-before <value> | [-d <value> | -f <value> | --document-id
766
+ <value>] | | | --file-before <value> | --file-after <value> | --document-id-before <value> | --document-id-after
767
+ <value>] [--data-after <value> | | | | | | | ] [-e create|update|delete] [-t <value>] [-a <value>]
768
+ [--with-user-token] [--media-library-id <value> | [--project-id <value> | --organization-id <value>] | --dataset
769
+ <value>]
672
770
 
673
771
  ARGUMENTS
674
772
  [NAME] The name of the Sanity Function
@@ -692,7 +790,6 @@ FLAGS
692
790
  --media-library-id=<value> Sanity Media Library ID to use
693
791
  --organization-id=<value> Sanity organization ID used to scope Blueprint and Stack
694
792
  --project-id=<value> Sanity project ID used to scope Blueprint and Stack
695
- --[no-]validate-resources Validate resources
696
793
  --with-user-token Prime access token from CLI config
697
794
 
698
795
  DESCRIPTION
@@ -714,7 +811,7 @@ EXAMPLES
714
811
  $ sanity-run functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
715
812
  ```
716
813
 
717
- _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v14.13.3/src/commands/functions/test.ts)_
814
+ _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0.0/src/commands/functions/test.ts)_
718
815
 
719
816
  ## `sanity-run help [COMMAND]`
720
817
 
@@ -734,5 +831,5 @@ DESCRIPTION
734
831
  Display help for sanity-run.
735
832
  ```
736
833
 
737
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.38/src/commands/help.ts)_
834
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.45/src/commands/help.ts)_
738
835
  <!-- commandsstop -->