@sanity/runtime-cli 12.4.0 → 13.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/README.md +176 -63
  2. package/dist/actions/blueprints/assets.d.ts +3 -1
  3. package/dist/actions/blueprints/assets.js +8 -4
  4. package/dist/actions/blueprints/blueprint.d.ts +2 -1
  5. package/dist/actions/blueprints/blueprint.js +3 -1
  6. package/dist/actions/blueprints/config.d.ts +5 -2
  7. package/dist/actions/blueprints/config.js +4 -4
  8. package/dist/actions/blueprints/logs-streaming.d.ts +4 -2
  9. package/dist/actions/blueprints/logs-streaming.js +5 -2
  10. package/dist/actions/blueprints/logs.d.ts +2 -1
  11. package/dist/actions/blueprints/logs.js +4 -2
  12. package/dist/actions/blueprints/resources.d.ts +2 -1
  13. package/dist/actions/blueprints/resources.js +2 -2
  14. package/dist/actions/blueprints/stacks.d.ts +12 -6
  15. package/dist/actions/blueprints/stacks.js +18 -11
  16. package/dist/actions/functions/dev.d.ts +2 -1
  17. package/dist/actions/functions/dev.js +2 -2
  18. package/dist/actions/functions/env/list.d.ts +2 -1
  19. package/dist/actions/functions/env/list.js +4 -2
  20. package/dist/actions/functions/env/remove.d.ts +2 -1
  21. package/dist/actions/functions/env/remove.js +4 -2
  22. package/dist/actions/functions/env/update.d.ts +2 -1
  23. package/dist/actions/functions/env/update.js +4 -2
  24. package/dist/actions/functions/logs.d.ts +4 -3
  25. package/dist/actions/functions/logs.js +10 -6
  26. package/dist/actions/node.d.ts +2 -1
  27. package/dist/actions/node.js +2 -2
  28. package/dist/actions/sanity/examples.d.ts +5 -2
  29. package/dist/actions/sanity/examples.js +6 -6
  30. package/dist/actions/sanity/projects.d.ts +7 -3
  31. package/dist/actions/sanity/projects.js +11 -7
  32. package/dist/baseCommands.d.ts +4 -0
  33. package/dist/baseCommands.js +8 -2
  34. package/dist/commands/blueprints/add.d.ts +1 -0
  35. package/dist/commands/blueprints/add.js +12 -8
  36. package/dist/commands/blueprints/config.d.ts +1 -0
  37. package/dist/commands/blueprints/config.js +10 -4
  38. package/dist/commands/blueprints/deploy.d.ts +1 -0
  39. package/dist/commands/blueprints/deploy.js +8 -2
  40. package/dist/commands/blueprints/destroy.d.ts +1 -0
  41. package/dist/commands/blueprints/destroy.js +8 -2
  42. package/dist/commands/blueprints/doctor.d.ts +1 -0
  43. package/dist/commands/blueprints/doctor.js +7 -2
  44. package/dist/commands/blueprints/info.d.ts +1 -0
  45. package/dist/commands/blueprints/info.js +9 -3
  46. package/dist/commands/blueprints/init.d.ts +1 -0
  47. package/dist/commands/blueprints/init.js +20 -11
  48. package/dist/commands/blueprints/logs.d.ts +1 -0
  49. package/dist/commands/blueprints/logs.js +8 -2
  50. package/dist/commands/blueprints/plan.d.ts +1 -0
  51. package/dist/commands/blueprints/plan.js +6 -2
  52. package/dist/commands/blueprints/stacks.d.ts +1 -0
  53. package/dist/commands/blueprints/stacks.js +8 -4
  54. package/dist/commands/functions/add.d.ts +1 -0
  55. package/dist/commands/functions/add.js +8 -2
  56. package/dist/commands/functions/dev.d.ts +1 -0
  57. package/dist/commands/functions/dev.js +14 -3
  58. package/dist/commands/functions/env/add.d.ts +2 -1
  59. package/dist/commands/functions/env/add.js +6 -2
  60. package/dist/commands/functions/env/list.d.ts +2 -1
  61. package/dist/commands/functions/env/list.js +6 -2
  62. package/dist/commands/functions/env/remove.d.ts +2 -1
  63. package/dist/commands/functions/env/remove.js +6 -2
  64. package/dist/commands/functions/logs.d.ts +2 -1
  65. package/dist/commands/functions/logs.js +7 -4
  66. package/dist/commands/functions/test.d.ts +2 -1
  67. package/dist/commands/functions/test.js +6 -2
  68. package/dist/cores/blueprints/config.js +9 -9
  69. package/dist/cores/blueprints/deploy.js +14 -16
  70. package/dist/cores/blueprints/destroy.js +6 -6
  71. package/dist/cores/blueprints/doctor.js +20 -27
  72. package/dist/cores/blueprints/info.js +3 -3
  73. package/dist/cores/blueprints/init.d.ts +3 -3
  74. package/dist/cores/blueprints/init.js +15 -8
  75. package/dist/cores/blueprints/logs.js +6 -7
  76. package/dist/cores/blueprints/plan.js +1 -0
  77. package/dist/cores/blueprints/stacks.js +4 -4
  78. package/dist/cores/functions/add.js +8 -3
  79. package/dist/cores/functions/dev.js +2 -2
  80. package/dist/cores/functions/env/add.js +3 -4
  81. package/dist/cores/functions/env/list.js +3 -4
  82. package/dist/cores/functions/env/remove.js +3 -4
  83. package/dist/cores/functions/index.d.ts +3 -9
  84. package/dist/cores/functions/logs.js +8 -9
  85. package/dist/cores/functions/test.js +7 -8
  86. package/dist/cores/index.d.ts +4 -7
  87. package/dist/cores/index.js +3 -3
  88. package/dist/index.d.ts +18 -2
  89. package/dist/index.js +20 -2
  90. package/dist/server/app.d.ts +2 -1
  91. package/dist/server/app.js +4 -4
  92. package/dist/server/handlers/invoke.d.ts +2 -1
  93. package/dist/server/handlers/invoke.js +2 -2
  94. package/dist/server/static/components/response-panel.js +3 -0
  95. package/dist/server/static/components/rule-panel.js +9 -1
  96. package/dist/utils/display/prompt.d.ts +5 -2
  97. package/dist/utils/display/prompt.js +5 -4
  98. package/dist/utils/functions/fetch-document.d.ts +3 -2
  99. package/dist/utils/functions/fetch-document.js +7 -6
  100. package/dist/utils/index.d.ts +2 -0
  101. package/dist/utils/index.js +2 -0
  102. package/dist/utils/logger.d.ts +13 -0
  103. package/dist/utils/logger.js +61 -0
  104. package/dist/utils/other/github.d.ts +2 -1
  105. package/dist/utils/other/github.js +4 -2
  106. package/dist/utils/other/npmjs.d.ts +2 -1
  107. package/dist/utils/other/npmjs.js +4 -2
  108. package/dist/utils/traced-fetch.d.ts +35 -0
  109. package/dist/utils/traced-fetch.js +238 -0
  110. package/dist/utils/validated-token.d.ts +3 -2
  111. package/dist/utils/validated-token.js +6 -4
  112. package/oclif.manifest.json +175 -38
  113. package/package.json +13 -5
@@ -4,7 +4,7 @@
4
4
  "aliases": [],
5
5
  "args": {
6
6
  "type": {
7
- "description": "Type of Resource to add (e.g. function)",
7
+ "description": "Type of resource to add (only \"function\" is supported)",
8
8
  "name": "type",
9
9
  "options": [
10
10
  "function"
@@ -12,7 +12,7 @@
12
12
  "required": true
13
13
  }
14
14
  },
15
- "description": "Add a Resource to a Blueprint",
15
+ "description": "Scaffolds a new Sanity Function in your Blueprint. Functions are serverless handlers triggered by document events (create, update, delete, publish) or media library events.\n\nAfter adding a function, use 'functions dev' to test locally, then 'blueprints deploy' to publish it.",
16
16
  "examples": [
17
17
  "<%= config.bin %> <%= command.id %> function",
18
18
  "<%= config.bin %> <%= command.id %> function --helpers",
@@ -36,6 +36,13 @@
36
36
  "multiple": false,
37
37
  "type": "option"
38
38
  },
39
+ "trace": {
40
+ "description": "Trace output",
41
+ "hidden": true,
42
+ "name": "trace",
43
+ "allowNo": false,
44
+ "type": "boolean"
45
+ },
39
46
  "verbose": {
40
47
  "description": "Verbose output",
41
48
  "hidden": true,
@@ -47,7 +54,7 @@
47
54
  "aliases": [
48
55
  "recipe"
49
56
  ],
50
- "description": "Example to use for the Resource",
57
+ "description": "Example to use for the function resource. Discover examples at https://www.sanity.io/exchange/type=recipes/by=sanity",
51
58
  "exclusive": [
52
59
  "name",
53
60
  "fn-type",
@@ -63,7 +70,7 @@
63
70
  },
64
71
  "name": {
65
72
  "char": "n",
66
- "description": "Name of the Resource to add",
73
+ "description": "Name of the resource to add",
67
74
  "name": "name",
68
75
  "hasDynamicHelp": false,
69
76
  "multiple": false,
@@ -97,7 +104,7 @@
97
104
  "fn-language",
98
105
  "lang"
99
106
  ],
100
- "description": "Language of the new Function",
107
+ "description": "Language of the new function",
101
108
  "name": "language",
102
109
  "default": "ts",
103
110
  "hasDynamicHelp": false,
@@ -125,7 +132,7 @@
125
132
  "function-helpers",
126
133
  "helpers"
127
134
  ],
128
- "description": "Add helpers to the new Function",
135
+ "description": "Add helpers to the new function",
129
136
  "name": "fn-helpers",
130
137
  "allowNo": true,
131
138
  "type": "boolean"
@@ -135,7 +142,7 @@
135
142
  "function-installer",
136
143
  "installer"
137
144
  ],
138
- "description": "How to install the @sanity/functions helpers",
145
+ "description": "Which package manager to use when installing the @sanity/functions helpers",
139
146
  "name": "fn-installer",
140
147
  "hasDynamicHelp": false,
141
148
  "multiple": false,
@@ -165,6 +172,7 @@
165
172
  "pluginName": "@sanity/runtime-cli",
166
173
  "pluginType": "core",
167
174
  "strict": true,
175
+ "summary": "Add a function resource to a Blueprint",
168
176
  "enableJsonFlag": true,
169
177
  "isESM": true,
170
178
  "relativePath": [
@@ -177,7 +185,7 @@
177
185
  "blueprints:config": {
178
186
  "aliases": [],
179
187
  "args": {},
180
- "description": "View or edit Blueprint configuration",
188
+ "description": "Manages the local Blueprint configuration, which links your Blueprint to a Sanity project and Stack.\n\nWithout flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with ID flags to update values directly (useful for scripting and automation).\n\nIf you need to switch your Blueprint to a different Stack, use --edit --stack-id.",
181
189
  "examples": [
182
190
  "<%= config.bin %> <%= command.id %>",
183
191
  "<%= config.bin %> <%= command.id %> --edit",
@@ -200,6 +208,13 @@
200
208
  "multiple": false,
201
209
  "type": "option"
202
210
  },
211
+ "trace": {
212
+ "description": "Trace output",
213
+ "hidden": true,
214
+ "name": "trace",
215
+ "allowNo": false,
216
+ "type": "boolean"
217
+ },
203
218
  "verbose": {
204
219
  "description": "Verbose output",
205
220
  "hidden": true,
@@ -222,7 +237,7 @@
222
237
  "dependsOn": [
223
238
  "edit"
224
239
  ],
225
- "description": "Directly set the Project ID in the configuration. Requires --edit flag",
240
+ "description": "Directly set the project ID in the configuration. Requires --edit flag",
226
241
  "name": "project-id",
227
242
  "hasDynamicHelp": false,
228
243
  "multiple": false,
@@ -237,7 +252,7 @@
237
252
  "dependsOn": [
238
253
  "edit"
239
254
  ],
240
- "description": "Directly set the Organization ID in the configuration. Requires --edit flag",
255
+ "description": "Directly set the organization ID in the configuration. Requires --edit flag",
241
256
  "name": "organization-id",
242
257
  "hasDynamicHelp": false,
243
258
  "multiple": false,
@@ -265,6 +280,7 @@
265
280
  "pluginName": "@sanity/runtime-cli",
266
281
  "pluginType": "core",
267
282
  "strict": true,
283
+ "summary": "View or edit the local Blueprint configuration",
268
284
  "enableJsonFlag": true,
269
285
  "isESM": true,
270
286
  "relativePath": [
@@ -277,7 +293,7 @@
277
293
  "blueprints:deploy": {
278
294
  "aliases": [],
279
295
  "args": {},
280
- "description": "Deploy a Blueprint",
296
+ "description": "Pushes your local Blueprint configuration to the remote Stack; provisioning, updating, or destroying resources as needed. This is the primary command for applying infrastructure changes.\n\nBefore deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor activity.\n\nUse --no-wait to queue the deployment and return immediately without waiting for completion.",
281
297
  "examples": [
282
298
  "<%= config.bin %> <%= command.id %>",
283
299
  "<%= config.bin %> <%= command.id %> --no-wait"
@@ -298,6 +314,13 @@
298
314
  "multiple": false,
299
315
  "type": "option"
300
316
  },
317
+ "trace": {
318
+ "description": "Trace output",
319
+ "hidden": true,
320
+ "name": "trace",
321
+ "allowNo": false,
322
+ "type": "boolean"
323
+ },
301
324
  "verbose": {
302
325
  "description": "Verbose output",
303
326
  "hidden": true,
@@ -319,6 +342,7 @@
319
342
  "pluginName": "@sanity/runtime-cli",
320
343
  "pluginType": "core",
321
344
  "strict": true,
345
+ "summary": "Deploy the local Blueprint to the remote Stack",
322
346
  "enableJsonFlag": true,
323
347
  "isESM": true,
324
348
  "relativePath": [
@@ -331,7 +355,7 @@
331
355
  "blueprints:destroy": {
332
356
  "aliases": [],
333
357
  "args": {},
334
- "description": "Destroy a Blueprint Stack deployment and its resources (will not delete local files)",
358
+ "description": "Permanently removes the remote Stack and all its provisioned resources. Your local Blueprint files remain untouched, allowing you to redeploy later with 'blueprints init' + 'blueprints deploy'.\n\nThis is a destructive operation. You will be prompted to confirm unless --force is specified.\n\nUse this to clean up test environments or decommission a Stack you no longer need.",
335
359
  "examples": [
336
360
  "<%= config.bin %> <%= command.id %>",
337
361
  "<%= config.bin %> <%= command.id %> --stack-id <stackId> --project-id <projectId> --force --no-wait"
@@ -352,6 +376,13 @@
352
376
  "multiple": false,
353
377
  "type": "option"
354
378
  },
379
+ "trace": {
380
+ "description": "Trace output",
381
+ "hidden": true,
382
+ "name": "trace",
383
+ "allowNo": false,
384
+ "type": "boolean"
385
+ },
355
386
  "verbose": {
356
387
  "description": "Verbose output",
357
388
  "hidden": true,
@@ -430,6 +461,7 @@
430
461
  "pluginName": "@sanity/runtime-cli",
431
462
  "pluginType": "core",
432
463
  "strict": true,
464
+ "summary": "Destroy the remote Stack deployment and its resources (will not delete local files)",
433
465
  "enableJsonFlag": true,
434
466
  "isESM": true,
435
467
  "relativePath": [
@@ -442,7 +474,7 @@
442
474
  "blueprints:doctor": {
443
475
  "aliases": [],
444
476
  "args": {},
445
- "description": "Diagnose potential issues with Blueprint configuration",
477
+ "description": "Analyzes your local Blueprint and remote Stack configuration for common issues, such as missing authentication, invalid project references, or misconfigured resources.\n\nRun this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected issues.",
446
478
  "examples": [],
447
479
  "flags": {
448
480
  "json": {
@@ -460,6 +492,13 @@
460
492
  "multiple": false,
461
493
  "type": "option"
462
494
  },
495
+ "trace": {
496
+ "description": "Trace output",
497
+ "hidden": true,
498
+ "name": "trace",
499
+ "allowNo": false,
500
+ "type": "boolean"
501
+ },
463
502
  "verbose": {
464
503
  "description": "Verbose output",
465
504
  "hidden": false,
@@ -481,6 +520,7 @@
481
520
  "pluginName": "@sanity/runtime-cli",
482
521
  "pluginType": "core",
483
522
  "strict": true,
523
+ "summary": "Diagnose potential issues with local Blueprint and remote Stack configuration",
484
524
  "enableJsonFlag": true,
485
525
  "isESM": true,
486
526
  "relativePath": [
@@ -493,7 +533,7 @@
493
533
  "blueprints:info": {
494
534
  "aliases": [],
495
535
  "args": {},
496
- "description": "Show information about a Blueprint Stack deployment",
536
+ "description": "Displays the current state and metadata of your remote Stack deployment, including deployed resources, status, and configuration.\n\nUse this command to verify a deployment succeeded, check what resources are live, or confirm which Stack your local Blueprint is connected to.\n\nRun 'blueprints stacks' to see all available Stacks in your project or organization.",
497
537
  "examples": [
498
538
  "<%= config.bin %> <%= command.id %>",
499
539
  "<%= config.bin %> <%= command.id %> --id <stackId>"
@@ -514,6 +554,13 @@
514
554
  "multiple": false,
515
555
  "type": "option"
516
556
  },
557
+ "trace": {
558
+ "description": "Trace output",
559
+ "hidden": true,
560
+ "name": "trace",
561
+ "allowNo": false,
562
+ "type": "boolean"
563
+ },
517
564
  "verbose": {
518
565
  "description": "Verbose output",
519
566
  "hidden": true,
@@ -522,7 +569,7 @@
522
569
  "type": "boolean"
523
570
  },
524
571
  "id": {
525
- "description": "Stack ID to show info for (defaults to current Stack)",
572
+ "description": "Stack ID to show info for (defaults to the current Stack)",
526
573
  "name": "id",
527
574
  "hasDynamicHelp": false,
528
575
  "multiple": false,
@@ -536,6 +583,7 @@
536
583
  "pluginName": "@sanity/runtime-cli",
537
584
  "pluginType": "core",
538
585
  "strict": true,
586
+ "summary": "Show information about the local Blueprint's remote Stack deployment",
539
587
  "enableJsonFlag": true,
540
588
  "isESM": true,
541
589
  "relativePath": [
@@ -549,11 +597,11 @@
549
597
  "aliases": [],
550
598
  "args": {
551
599
  "dir": {
552
- "description": "Directory to create the Blueprint in",
600
+ "description": "Directory to create the local Blueprint in",
553
601
  "name": "dir"
554
602
  }
555
603
  },
556
- "description": "Initialize a new Blueprint Stack deployment",
604
+ "description": "A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions, etc.). A Stack is the remote deployment target where your Blueprint is applied.\n[NOTE: Currently, accounts are limited to three (3) Stacks per project scope.]\n\nThis is typically the first command you run in a new project. It creates a local Blueprint manifest file (sanity.blueprint.ts, .js, or .json) and provisions a new remote Stack.\nAdditionally, a Blueprint configuration file is created in .sanity/ containing the scope and Stack IDs. This is .gitignored by default.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.",
557
605
  "examples": [
558
606
  "<%= config.bin %> <%= command.id %>",
559
607
  "<%= config.bin %> <%= command.id %> [directory]",
@@ -577,6 +625,13 @@
577
625
  "multiple": false,
578
626
  "type": "option"
579
627
  },
628
+ "trace": {
629
+ "description": "Trace output",
630
+ "hidden": true,
631
+ "name": "trace",
632
+ "allowNo": false,
633
+ "type": "boolean"
634
+ },
580
635
  "verbose": {
581
636
  "description": "Verbose output",
582
637
  "hidden": false,
@@ -585,7 +640,7 @@
585
640
  "type": "boolean"
586
641
  },
587
642
  "dir": {
588
- "description": "Directory to create the Blueprint in",
643
+ "description": "Directory to create the local Blueprint in",
589
644
  "name": "dir",
590
645
  "hasDynamicHelp": false,
591
646
  "multiple": false,
@@ -595,7 +650,7 @@
595
650
  "aliases": [
596
651
  "recipe"
597
652
  ],
598
- "description": "Example to use for the Blueprint",
653
+ "description": "Example to use for the local Blueprint",
599
654
  "exclusive": [
600
655
  "blueprint-type",
601
656
  "stack-id",
@@ -610,7 +665,7 @@
610
665
  "aliases": [
611
666
  "type"
612
667
  ],
613
- "description": "Blueprint manifest type to use for the Blueprint",
668
+ "description": "Blueprint manifest type to use for the local Blueprint",
614
669
  "name": "blueprint-type",
615
670
  "hasDynamicHelp": false,
616
671
  "multiple": false,
@@ -626,7 +681,7 @@
626
681
  "project",
627
682
  "projectId"
628
683
  ],
629
- "description": "Sanity Project ID to use for the Blueprint",
684
+ "description": "Sanity project ID used to scope local Blueprint and remote Stack",
630
685
  "name": "project-id",
631
686
  "hasDynamicHelp": false,
632
687
  "multiple": false,
@@ -638,7 +693,7 @@
638
693
  "organizationId",
639
694
  "org"
640
695
  ],
641
- "description": "Sanity Organization ID to use for the Blueprint",
696
+ "description": "Sanity organization ID used to scope local Blueprint and remote Stack",
642
697
  "name": "organization-id",
643
698
  "hasDynamicHelp": false,
644
699
  "multiple": false,
@@ -652,7 +707,7 @@
652
707
  "dependsOn": [
653
708
  "project-id"
654
709
  ],
655
- "description": "Existing Stack ID to use for the Blueprint",
710
+ "description": "Existing Stack ID used to scope local Blueprint",
656
711
  "exclusive": [
657
712
  "stack-name"
658
713
  ],
@@ -665,7 +720,7 @@
665
720
  "aliases": [
666
721
  "name"
667
722
  ],
668
- "description": "Name to use for a NEW Stack",
723
+ "description": "Name to use for a new Stack provisioned during initialization",
669
724
  "exclusive": [
670
725
  "stack-id"
671
726
  ],
@@ -682,6 +737,7 @@
682
737
  "pluginName": "@sanity/runtime-cli",
683
738
  "pluginType": "core",
684
739
  "strict": true,
740
+ "summary": "Initialize a local Blueprint and optionally provision a remote Stack deployment",
685
741
  "enableJsonFlag": true,
686
742
  "isESM": true,
687
743
  "relativePath": [
@@ -694,7 +750,7 @@
694
750
  "blueprints:logs": {
695
751
  "aliases": [],
696
752
  "args": {},
697
- "description": "Display logs for a Blueprint Stack deployment",
753
+ "description": "Retrieves Stack deployment logs, useful for debugging and monitoring deployment activity.\n\nUse --watch (-w) to stream logs in real-time.\n\nIf you're not seeing expected logs, verify your Stack is deployed with 'blueprints info'.",
698
754
  "examples": [
699
755
  "<%= config.bin %> <%= command.id %>",
700
756
  "<%= config.bin %> <%= command.id %> --watch"
@@ -715,6 +771,13 @@
715
771
  "multiple": false,
716
772
  "type": "option"
717
773
  },
774
+ "trace": {
775
+ "description": "Trace output",
776
+ "hidden": true,
777
+ "name": "trace",
778
+ "allowNo": false,
779
+ "type": "boolean"
780
+ },
718
781
  "verbose": {
719
782
  "description": "Verbose output",
720
783
  "hidden": true,
@@ -740,6 +803,7 @@
740
803
  "pluginName": "@sanity/runtime-cli",
741
804
  "pluginType": "core",
742
805
  "strict": true,
806
+ "summary": "Display logs for the current Blueprint's Stack deployment",
743
807
  "enableJsonFlag": true,
744
808
  "isESM": true,
745
809
  "relativePath": [
@@ -752,7 +816,7 @@
752
816
  "blueprints:plan": {
753
817
  "aliases": [],
754
818
  "args": {},
755
- "description": "Enumerate resources to be deployed - will not modify any resources",
819
+ "description": "Use this command to preview what changes will be applied to your remote Stack before deploying. This is a safe, read-only operation—no resources are created, modified, or deleted.\n\nRun 'blueprints plan' after making local changes to your Blueprint manifest to verify the expected diff. When ready, run 'blueprints deploy' to apply changes.",
756
820
  "examples": [
757
821
  "<%= config.bin %> <%= command.id %>"
758
822
  ],
@@ -772,6 +836,13 @@
772
836
  "multiple": false,
773
837
  "type": "option"
774
838
  },
839
+ "trace": {
840
+ "description": "Trace output",
841
+ "hidden": true,
842
+ "name": "trace",
843
+ "allowNo": false,
844
+ "type": "boolean"
845
+ },
775
846
  "verbose": {
776
847
  "description": "Verbose output",
777
848
  "hidden": true,
@@ -787,6 +858,7 @@
787
858
  "pluginName": "@sanity/runtime-cli",
788
859
  "pluginType": "core",
789
860
  "strict": true,
861
+ "summary": "Enumerate resources to be deployed to the remote Stack - will not modify any resources",
790
862
  "enableJsonFlag": true,
791
863
  "isESM": true,
792
864
  "relativePath": [
@@ -799,7 +871,7 @@
799
871
  "blueprints:stacks": {
800
872
  "aliases": [],
801
873
  "args": {},
802
- "description": "List all Blueprint Stacks",
874
+ "description": "Shows all Stacks associated with a project or organization. By default, lists Stacks scoped to the local Blueprint.\n\nUse this to discover existing Stacks you can scope a local Blueprint to (using 'blueprints config --edit'), or to audit what's deployed across your project.",
803
875
  "examples": [
804
876
  "<%= config.bin %> <%= command.id %>",
805
877
  "<%= config.bin %> <%= command.id %> --project-id <projectId>",
@@ -821,6 +893,13 @@
821
893
  "multiple": false,
822
894
  "type": "option"
823
895
  },
896
+ "trace": {
897
+ "description": "Trace output",
898
+ "hidden": true,
899
+ "name": "trace",
900
+ "allowNo": false,
901
+ "type": "boolean"
902
+ },
824
903
  "verbose": {
825
904
  "description": "Verbose output",
826
905
  "hidden": true,
@@ -833,7 +912,7 @@
833
912
  "projectId",
834
913
  "project"
835
914
  ],
836
- "description": "Project ID to show stacks for",
915
+ "description": "Project ID to show Stack deployments for",
837
916
  "exclusive": [
838
917
  "organization-id"
839
918
  ],
@@ -848,7 +927,7 @@
848
927
  "organization",
849
928
  "org"
850
929
  ],
851
- "description": "Organization ID to show stacks for",
930
+ "description": "Organization ID to show Stack deployments for",
852
931
  "exclusive": [
853
932
  "project-id"
854
933
  ],
@@ -865,6 +944,7 @@
865
944
  "pluginName": "@sanity/runtime-cli",
866
945
  "pluginType": "core",
867
946
  "strict": true,
947
+ "summary": "List all remote Stack deployments (defaults to the current Blueprint's project scope)",
868
948
  "enableJsonFlag": true,
869
949
  "isESM": true,
870
950
  "relativePath": [
@@ -877,7 +957,7 @@
877
957
  "functions:add": {
878
958
  "aliases": [],
879
959
  "args": {},
880
- "description": "Add a Function to your Blueprint",
960
+ "description": "Scaffolds a new Function in the functions/ folder and templates a resource for your Blueprint manifest.\n\nFunctions are serverless handlers triggered by document events (create, update, delete, publish) or media library events.\n\nAfter adding, use 'functions dev' to test locally, then 'blueprints deploy' to publish.",
881
961
  "examples": [
882
962
  "<%= config.bin %> <%= command.id %>",
883
963
  "<%= config.bin %> <%= command.id %> --helpers",
@@ -901,6 +981,13 @@
901
981
  "multiple": false,
902
982
  "type": "option"
903
983
  },
984
+ "trace": {
985
+ "description": "Trace output",
986
+ "hidden": true,
987
+ "name": "trace",
988
+ "allowNo": false,
989
+ "type": "boolean"
990
+ },
904
991
  "verbose": {
905
992
  "description": "Verbose output",
906
993
  "hidden": true,
@@ -1017,6 +1104,7 @@
1017
1104
  "pluginName": "@sanity/runtime-cli",
1018
1105
  "pluginType": "core",
1019
1106
  "strict": true,
1107
+ "summary": "Add a Function to your Blueprint",
1020
1108
  "enableJsonFlag": true,
1021
1109
  "isESM": true,
1022
1110
  "relativePath": [
@@ -1029,9 +1117,10 @@
1029
1117
  "functions:dev": {
1030
1118
  "aliases": [],
1031
1119
  "args": {},
1032
- "description": "Start the Sanity Function emulator",
1120
+ "description": "Runs a local, web-based development server to test your functions before deploying.\n\nOpen the emulator in your browser to interactively test your functions with the payload editor.\n\nOptionally, set the host and port with the --host and --port flags. Function timeout can be configured with the --timeout flag.\n\nTo invoke a function with the CLI, use 'functions test'.",
1033
1121
  "examples": [
1034
- "<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974"
1122
+ "<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974",
1123
+ "<%= config.bin %> <%= command.id %> --timeout 60"
1035
1124
  ],
1036
1125
  "flags": {
1037
1126
  "json": {
@@ -1049,6 +1138,13 @@
1049
1138
  "multiple": false,
1050
1139
  "type": "option"
1051
1140
  },
1141
+ "trace": {
1142
+ "description": "Trace output",
1143
+ "hidden": true,
1144
+ "name": "trace",
1145
+ "allowNo": false,
1146
+ "type": "boolean"
1147
+ },
1052
1148
  "verbose": {
1053
1149
  "description": "Verbose output",
1054
1150
  "hidden": true,
@@ -1091,6 +1187,7 @@
1091
1187
  "pluginName": "@sanity/runtime-cli",
1092
1188
  "pluginType": "core",
1093
1189
  "strict": true,
1190
+ "summary": "Start the Sanity Function emulator",
1094
1191
  "enableJsonFlag": true,
1095
1192
  "isESM": true,
1096
1193
  "relativePath": [
@@ -1109,7 +1206,7 @@
1109
1206
  "required": false
1110
1207
  }
1111
1208
  },
1112
- "description": "Retrieve or delete logs for a Sanity Function",
1209
+ "description": "Fetches execution logs from a deployed function, useful for debugging production issues or monitoring activity.\n\nUse --watch (-w) to stream logs in real-time. Use --delete to clear all logs for a function (requires confirmation unless --force is specified).",
1113
1210
  "examples": [
1114
1211
  "<%= config.bin %> <%= command.id %> <name>",
1115
1212
  "<%= config.bin %> <%= command.id %> <name> --json",
@@ -1133,6 +1230,13 @@
1133
1230
  "multiple": false,
1134
1231
  "type": "option"
1135
1232
  },
1233
+ "trace": {
1234
+ "description": "Trace output",
1235
+ "hidden": true,
1236
+ "name": "trace",
1237
+ "allowNo": false,
1238
+ "type": "boolean"
1239
+ },
1136
1240
  "verbose": {
1137
1241
  "description": "Verbose output",
1138
1242
  "hidden": true,
@@ -1199,6 +1303,7 @@
1199
1303
  "pluginName": "@sanity/runtime-cli",
1200
1304
  "pluginType": "core",
1201
1305
  "strict": true,
1306
+ "summary": "Retrieve or delete logs for a Sanity Function",
1202
1307
  "enableJsonFlag": true,
1203
1308
  "isESM": true,
1204
1309
  "relativePath": [
@@ -1217,7 +1322,7 @@
1217
1322
  "required": false
1218
1323
  }
1219
1324
  },
1220
- "description": "Invoke a local Sanity Function",
1325
+ "description": "Executes a function locally with the provided payload, simulating how it would run when deployed. Use this to test your function logic before deploying.\n\nProvide test data via --data (inline JSON), --file (JSON file), or --document-id (fetch from Sanity). For update events, use the before/after flag pairs to simulate document changes.",
1221
1326
  "examples": [
1222
1327
  "<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }'",
1223
1328
  "<%= config.bin %> <%= command.id %> <name> --file 'payload.json'",
@@ -1240,6 +1345,13 @@
1240
1345
  "multiple": false,
1241
1346
  "type": "option"
1242
1347
  },
1348
+ "trace": {
1349
+ "description": "Trace output",
1350
+ "hidden": true,
1351
+ "name": "trace",
1352
+ "allowNo": false,
1353
+ "type": "boolean"
1354
+ },
1243
1355
  "verbose": {
1244
1356
  "description": "Verbose output",
1245
1357
  "hidden": true,
@@ -1485,6 +1597,7 @@
1485
1597
  "pluginName": "@sanity/runtime-cli",
1486
1598
  "pluginType": "core",
1487
1599
  "strict": true,
1600
+ "summary": "Invoke a local Sanity Function",
1488
1601
  "enableJsonFlag": true,
1489
1602
  "isESM": true,
1490
1603
  "relativePath": [
@@ -1513,7 +1626,7 @@
1513
1626
  "required": true
1514
1627
  }
1515
1628
  },
1516
- "description": "Add or set the value of an environment variable for a Sanity function",
1629
+ "description": "Sets an environment variable in a deployed Sanity Function. If the variable already exists, its value is updated.\n\nEnvironment variables are useful for API keys, configuration values, and other secrets that shouldn't be hardcoded. Changes take effect on the next function invocation.",
1517
1630
  "examples": [
1518
1631
  "<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/"
1519
1632
  ],
@@ -1533,6 +1646,13 @@
1533
1646
  "multiple": false,
1534
1647
  "type": "option"
1535
1648
  },
1649
+ "trace": {
1650
+ "description": "Trace output",
1651
+ "hidden": true,
1652
+ "name": "trace",
1653
+ "allowNo": false,
1654
+ "type": "boolean"
1655
+ },
1536
1656
  "verbose": {
1537
1657
  "description": "Verbose output",
1538
1658
  "hidden": true,
@@ -1548,6 +1668,7 @@
1548
1668
  "pluginName": "@sanity/runtime-cli",
1549
1669
  "pluginType": "core",
1550
1670
  "strict": true,
1671
+ "summary": "Add or set an environment variable for a deployed function",
1551
1672
  "enableJsonFlag": true,
1552
1673
  "isESM": true,
1553
1674
  "relativePath": [
@@ -1567,7 +1688,7 @@
1567
1688
  "required": true
1568
1689
  }
1569
1690
  },
1570
- "description": "List the environment variables for a Sanity function",
1691
+ "description": "Displays all environment variables (keys only) configured in a deployed Sanity Function.\n\nUse 'functions env add' to set variables or 'functions env remove' to delete them.",
1571
1692
  "examples": [
1572
1693
  "<%= config.bin %> <%= command.id %> MyFunction"
1573
1694
  ],
@@ -1587,6 +1708,13 @@
1587
1708
  "multiple": false,
1588
1709
  "type": "option"
1589
1710
  },
1711
+ "trace": {
1712
+ "description": "Trace output",
1713
+ "hidden": true,
1714
+ "name": "trace",
1715
+ "allowNo": false,
1716
+ "type": "boolean"
1717
+ },
1590
1718
  "verbose": {
1591
1719
  "description": "Verbose output",
1592
1720
  "hidden": true,
@@ -1602,6 +1730,7 @@
1602
1730
  "pluginName": "@sanity/runtime-cli",
1603
1731
  "pluginType": "core",
1604
1732
  "strict": true,
1733
+ "summary": "List environment variables for a deployed function",
1605
1734
  "enableJsonFlag": true,
1606
1735
  "isESM": true,
1607
1736
  "relativePath": [
@@ -1626,7 +1755,7 @@
1626
1755
  "required": true
1627
1756
  }
1628
1757
  },
1629
- "description": "Remove an environment variable for a Sanity function",
1758
+ "description": "Deletes an environment variable from a deployed Sanity Function. The change takes effect on the next function invocation.\n\nUse 'functions env list' to see current variables before removing.",
1630
1759
  "examples": [
1631
1760
  "<%= config.bin %> <%= command.id %> MyFunction API_URL"
1632
1761
  ],
@@ -1646,6 +1775,13 @@
1646
1775
  "multiple": false,
1647
1776
  "type": "option"
1648
1777
  },
1778
+ "trace": {
1779
+ "description": "Trace output",
1780
+ "hidden": true,
1781
+ "name": "trace",
1782
+ "allowNo": false,
1783
+ "type": "boolean"
1784
+ },
1649
1785
  "verbose": {
1650
1786
  "description": "Verbose output",
1651
1787
  "hidden": true,
@@ -1661,6 +1797,7 @@
1661
1797
  "pluginName": "@sanity/runtime-cli",
1662
1798
  "pluginType": "core",
1663
1799
  "strict": true,
1800
+ "summary": "Remove an environment variable from a deployed function",
1664
1801
  "enableJsonFlag": true,
1665
1802
  "isESM": true,
1666
1803
  "relativePath": [
@@ -1672,5 +1809,5 @@
1672
1809
  ]
1673
1810
  }
1674
1811
  },
1675
- "version": "12.4.0"
1812
+ "version": "13.0.1"
1676
1813
  }