@sanity/runtime-cli 17.17.0 → 17.18.0-next.g8775ede
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -25
- package/dist/actions/blueprints/resources.js +94 -1
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +3 -0
- package/dist/cores/functions/add.js +12 -2
- package/dist/utils/functions/extract-durable-config.d.ts +1 -1
- package/dist/utils/functions/extract-durable-config.js +9 -16
- package/oclif.manifest.json +993 -991
- package/package.json +4 -4
package/oclif.manifest.json
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"
|
|
3
|
+
"blueprints:add": {
|
|
4
4
|
"aliases": [],
|
|
5
|
-
"args": {
|
|
6
|
-
|
|
5
|
+
"args": {
|
|
6
|
+
"type": {
|
|
7
|
+
"description": "Type of resource to add (only \"function\" is supported)",
|
|
8
|
+
"name": "type",
|
|
9
|
+
"options": [
|
|
10
|
+
"function"
|
|
11
|
+
],
|
|
12
|
+
"required": true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"deprecationOptions": {
|
|
16
|
+
"to": "functions add"
|
|
17
|
+
},
|
|
18
|
+
"description": "This command is deprecated. Use \"functions add\" instead.\n\nEquivalent usage:\n $ <%= config.bin %> functions add\n $ <%= config.bin %> functions add --name my-function --type document-create",
|
|
7
19
|
"examples": [
|
|
8
|
-
"<%= config.bin %> <%= command.id %>",
|
|
9
|
-
"<%= config.bin %> <%= command.id %> --helpers",
|
|
10
|
-
"<%= config.bin %> <%= command.id %> --name my-function",
|
|
11
|
-
"<%= config.bin %> <%= command.id %> --name my-function --type document-create",
|
|
12
|
-
"<%= config.bin %> <%= command.id %> --name my-function --type document-create --type document-update --lang js"
|
|
20
|
+
"<%= config.bin %> <%= command.id %> function",
|
|
21
|
+
"<%= config.bin %> <%= command.id %> function --helpers",
|
|
22
|
+
"<%= config.bin %> <%= command.id %> function --name my-function",
|
|
23
|
+
"<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create",
|
|
24
|
+
"<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create --fn-type document-update --lang js"
|
|
13
25
|
],
|
|
14
26
|
"flags": {
|
|
15
27
|
"json": {
|
|
@@ -95,15 +107,14 @@
|
|
|
95
107
|
"aliases": [
|
|
96
108
|
"recipe"
|
|
97
109
|
],
|
|
98
|
-
"description": "Example to use for the
|
|
110
|
+
"description": "Example to use for the function resource. Discover examples at https://www.sanity.io/exchange/type=recipes/by=sanity",
|
|
99
111
|
"exclusive": [
|
|
100
112
|
"name",
|
|
101
|
-
"type",
|
|
113
|
+
"fn-type",
|
|
102
114
|
"language",
|
|
103
115
|
"javascript",
|
|
104
|
-
"helpers",
|
|
105
|
-
"installer"
|
|
106
|
-
"install"
|
|
116
|
+
"fn-helpers",
|
|
117
|
+
"fn-installer"
|
|
107
118
|
],
|
|
108
119
|
"name": "example",
|
|
109
120
|
"hasDynamicHelp": false,
|
|
@@ -112,18 +123,21 @@
|
|
|
112
123
|
},
|
|
113
124
|
"name": {
|
|
114
125
|
"char": "n",
|
|
115
|
-
"description": "Name of the
|
|
126
|
+
"description": "Name of the resource to add",
|
|
116
127
|
"name": "name",
|
|
117
128
|
"hasDynamicHelp": false,
|
|
118
129
|
"multiple": false,
|
|
119
130
|
"type": "option"
|
|
120
131
|
},
|
|
121
|
-
"type": {
|
|
132
|
+
"fn-type": {
|
|
133
|
+
"aliases": [
|
|
134
|
+
"function-type"
|
|
135
|
+
],
|
|
122
136
|
"dependsOn": [
|
|
123
137
|
"name"
|
|
124
138
|
],
|
|
125
139
|
"description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
|
|
126
|
-
"name": "type",
|
|
140
|
+
"name": "fn-type",
|
|
127
141
|
"hasDynamicHelp": false,
|
|
128
142
|
"multiple": true,
|
|
129
143
|
"options": [
|
|
@@ -136,15 +150,18 @@
|
|
|
136
150
|
"media-library-asset-update",
|
|
137
151
|
"pub-sub",
|
|
138
152
|
"scheduled-function",
|
|
139
|
-
"sync-tag-invalidate"
|
|
153
|
+
"sync-tag-invalidate",
|
|
154
|
+
"durable-function"
|
|
140
155
|
],
|
|
141
156
|
"type": "option"
|
|
142
157
|
},
|
|
143
158
|
"language": {
|
|
144
159
|
"aliases": [
|
|
160
|
+
"function-language",
|
|
161
|
+
"fn-language",
|
|
145
162
|
"lang"
|
|
146
163
|
],
|
|
147
|
-
"description": "Language of the new
|
|
164
|
+
"description": "Language of the new function",
|
|
148
165
|
"name": "language",
|
|
149
166
|
"default": "ts",
|
|
150
167
|
"hasDynamicHelp": false,
|
|
@@ -167,15 +184,23 @@
|
|
|
167
184
|
"allowNo": false,
|
|
168
185
|
"type": "boolean"
|
|
169
186
|
},
|
|
170
|
-
"helpers": {
|
|
171
|
-
"
|
|
172
|
-
|
|
187
|
+
"fn-helpers": {
|
|
188
|
+
"aliases": [
|
|
189
|
+
"function-helpers",
|
|
190
|
+
"helpers"
|
|
191
|
+
],
|
|
192
|
+
"description": "Add helpers to the new function",
|
|
193
|
+
"name": "fn-helpers",
|
|
173
194
|
"allowNo": true,
|
|
174
195
|
"type": "boolean"
|
|
175
196
|
},
|
|
176
|
-
"installer": {
|
|
177
|
-
"
|
|
178
|
-
|
|
197
|
+
"fn-installer": {
|
|
198
|
+
"aliases": [
|
|
199
|
+
"function-installer",
|
|
200
|
+
"installer"
|
|
201
|
+
],
|
|
202
|
+
"description": "Which package manager to use when installing the @sanity/functions helpers",
|
|
203
|
+
"name": "fn-installer",
|
|
179
204
|
"hasDynamicHelp": false,
|
|
180
205
|
"multiple": false,
|
|
181
206
|
"options": [
|
|
@@ -188,9 +213,9 @@
|
|
|
188
213
|
},
|
|
189
214
|
"install": {
|
|
190
215
|
"char": "i",
|
|
191
|
-
"description": "Shortcut for --installer npm",
|
|
216
|
+
"description": "Shortcut for --fn-installer npm",
|
|
192
217
|
"exclusive": [
|
|
193
|
-
"installer"
|
|
218
|
+
"fn-installer"
|
|
194
219
|
],
|
|
195
220
|
"name": "install",
|
|
196
221
|
"allowNo": false,
|
|
@@ -199,12 +224,13 @@
|
|
|
199
224
|
},
|
|
200
225
|
"hasDynamicHelp": false,
|
|
201
226
|
"hiddenAliases": [],
|
|
202
|
-
"id": "
|
|
227
|
+
"id": "blueprints:add",
|
|
203
228
|
"pluginAlias": "@sanity/runtime-cli",
|
|
204
229
|
"pluginName": "@sanity/runtime-cli",
|
|
205
230
|
"pluginType": "core",
|
|
231
|
+
"state": "deprecated",
|
|
206
232
|
"strict": true,
|
|
207
|
-
"summary": "
|
|
233
|
+
"summary": "[deprecated] Use \"functions add\" instead",
|
|
208
234
|
"enableJsonFlag": true,
|
|
209
235
|
"needs": [
|
|
210
236
|
"blueprint"
|
|
@@ -213,19 +239,20 @@
|
|
|
213
239
|
"relativePath": [
|
|
214
240
|
"dist",
|
|
215
241
|
"commands",
|
|
216
|
-
"
|
|
242
|
+
"blueprints",
|
|
217
243
|
"add.js"
|
|
218
244
|
]
|
|
219
245
|
},
|
|
220
|
-
"
|
|
246
|
+
"blueprints:config": {
|
|
221
247
|
"aliases": [],
|
|
222
|
-
"args": {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
248
|
+
"args": {},
|
|
249
|
+
"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.",
|
|
250
|
+
"examples": [
|
|
251
|
+
"<%= config.bin %> <%= command.id %>",
|
|
252
|
+
"<%= config.bin %> <%= command.id %> --edit",
|
|
253
|
+
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId>",
|
|
254
|
+
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack <name-or-id>"
|
|
255
|
+
],
|
|
229
256
|
"flags": {
|
|
230
257
|
"json": {
|
|
231
258
|
"description": "Format output as json",
|
|
@@ -268,8 +295,14 @@
|
|
|
268
295
|
"type": "boolean"
|
|
269
296
|
},
|
|
270
297
|
"stack": {
|
|
271
|
-
"
|
|
272
|
-
|
|
298
|
+
"aliases": [
|
|
299
|
+
"stack-id",
|
|
300
|
+
"stackId"
|
|
301
|
+
],
|
|
302
|
+
"dependsOn": [
|
|
303
|
+
"edit"
|
|
304
|
+
],
|
|
305
|
+
"description": "Stack name or ID to set in the configuration. Requires --edit flag",
|
|
273
306
|
"name": "stack",
|
|
274
307
|
"hasDynamicHelp": false,
|
|
275
308
|
"multiple": false,
|
|
@@ -280,11 +313,13 @@
|
|
|
280
313
|
"project",
|
|
281
314
|
"projectId"
|
|
282
315
|
],
|
|
316
|
+
"dependsOn": [
|
|
317
|
+
"edit"
|
|
318
|
+
],
|
|
283
319
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
284
320
|
"exclusive": [
|
|
285
321
|
"organization-id"
|
|
286
322
|
],
|
|
287
|
-
"hidden": true,
|
|
288
323
|
"name": "project-id",
|
|
289
324
|
"hasDynamicHelp": false,
|
|
290
325
|
"multiple": false,
|
|
@@ -296,70 +331,59 @@
|
|
|
296
331
|
"organizationId",
|
|
297
332
|
"org"
|
|
298
333
|
],
|
|
334
|
+
"dependsOn": [
|
|
335
|
+
"edit"
|
|
336
|
+
],
|
|
299
337
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
300
338
|
"exclusive": [
|
|
301
339
|
"project-id"
|
|
302
340
|
],
|
|
303
|
-
"hidden": true,
|
|
304
341
|
"name": "organization-id",
|
|
305
342
|
"hasDynamicHelp": false,
|
|
306
343
|
"multiple": false,
|
|
307
344
|
"type": "option"
|
|
308
345
|
},
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
"
|
|
315
|
-
"hidden": true,
|
|
316
|
-
"name": "fn-installer",
|
|
317
|
-
"hasDynamicHelp": false,
|
|
318
|
-
"multiple": false,
|
|
319
|
-
"options": [
|
|
320
|
-
"npm",
|
|
321
|
-
"pnpm",
|
|
322
|
-
"yarn"
|
|
323
|
-
],
|
|
324
|
-
"type": "option"
|
|
325
|
-
},
|
|
326
|
-
"out-dir": {
|
|
327
|
-
"char": "o",
|
|
328
|
-
"description": "Output directory for zip files",
|
|
329
|
-
"name": "out-dir",
|
|
330
|
-
"hasDynamicHelp": false,
|
|
331
|
-
"multiple": false,
|
|
332
|
-
"type": "option"
|
|
346
|
+
"edit": {
|
|
347
|
+
"char": "e",
|
|
348
|
+
"description": "Modify the configuration interactively, or directly when combined with ID flags.",
|
|
349
|
+
"name": "edit",
|
|
350
|
+
"allowNo": false,
|
|
351
|
+
"type": "boolean"
|
|
333
352
|
}
|
|
334
353
|
},
|
|
335
354
|
"hasDynamicHelp": false,
|
|
336
|
-
"hidden": true,
|
|
337
355
|
"hiddenAliases": [],
|
|
338
|
-
"id": "
|
|
356
|
+
"id": "blueprints:config",
|
|
339
357
|
"pluginAlias": "@sanity/runtime-cli",
|
|
340
358
|
"pluginName": "@sanity/runtime-cli",
|
|
341
359
|
"pluginType": "core",
|
|
342
360
|
"strict": true,
|
|
343
|
-
"summary": "
|
|
361
|
+
"summary": "View or edit the local Blueprint configuration",
|
|
344
362
|
"enableJsonFlag": true,
|
|
345
363
|
"needs": [
|
|
364
|
+
"token",
|
|
346
365
|
"blueprint"
|
|
347
366
|
],
|
|
348
367
|
"isESM": true,
|
|
349
368
|
"relativePath": [
|
|
350
369
|
"dist",
|
|
351
370
|
"commands",
|
|
352
|
-
"
|
|
353
|
-
"
|
|
371
|
+
"blueprints",
|
|
372
|
+
"config.js"
|
|
354
373
|
]
|
|
355
374
|
},
|
|
356
|
-
"
|
|
375
|
+
"blueprints:deploy": {
|
|
357
376
|
"aliases": [],
|
|
358
377
|
"args": {},
|
|
359
|
-
"description": "
|
|
378
|
+
"description": "Applies your local Blueprint to the remote Stack, creating, updating, or removing 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.\n\nUse --fn-installer to force which package manager to use when deploying functions.\n\nSet SANITY_ASSET_TIMEOUT (seconds) to override the 180-second timeout for processing resource assets.\n\nSet SANITY_ASSET_CONCURRENCY to override how many resource assets are processed at once (default 4).\n\nExit codes: 0 deployed, 2 deployment failed, 75 deployment accepted but completion could not be confirmed (rerun 'blueprints info' to check).",
|
|
360
379
|
"examples": [
|
|
361
|
-
"<%= config.bin %> <%= command.id %>
|
|
362
|
-
"<%= config.bin %> <%= command.id %> --
|
|
380
|
+
"<%= config.bin %> <%= command.id %>",
|
|
381
|
+
"<%= config.bin %> <%= command.id %> --message \"Enable staging dataset\"",
|
|
382
|
+
"<%= config.bin %> <%= command.id %> --no-wait",
|
|
383
|
+
"<%= config.bin %> <%= command.id %> --fn-installer npm",
|
|
384
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
385
|
+
"<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>",
|
|
386
|
+
"<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
|
|
363
387
|
],
|
|
364
388
|
"flags": {
|
|
365
389
|
"json": {
|
|
@@ -404,7 +428,6 @@
|
|
|
404
428
|
},
|
|
405
429
|
"stack": {
|
|
406
430
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
407
|
-
"hidden": true,
|
|
408
431
|
"name": "stack",
|
|
409
432
|
"hasDynamicHelp": false,
|
|
410
433
|
"multiple": false,
|
|
@@ -419,7 +442,6 @@
|
|
|
419
442
|
"exclusive": [
|
|
420
443
|
"organization-id"
|
|
421
444
|
],
|
|
422
|
-
"hidden": true,
|
|
423
445
|
"name": "project-id",
|
|
424
446
|
"hasDynamicHelp": false,
|
|
425
447
|
"multiple": false,
|
|
@@ -435,35 +457,56 @@
|
|
|
435
457
|
"exclusive": [
|
|
436
458
|
"project-id"
|
|
437
459
|
],
|
|
438
|
-
"hidden": true,
|
|
439
460
|
"name": "organization-id",
|
|
440
461
|
"hasDynamicHelp": false,
|
|
441
462
|
"multiple": false,
|
|
442
463
|
"type": "option"
|
|
443
464
|
},
|
|
444
|
-
"
|
|
445
|
-
"char": "
|
|
446
|
-
"description": "
|
|
447
|
-
"name": "
|
|
448
|
-
"required": false,
|
|
465
|
+
"message": {
|
|
466
|
+
"char": "m",
|
|
467
|
+
"description": "Message describing the deployment (e.g. reason for change)",
|
|
468
|
+
"name": "message",
|
|
449
469
|
"hasDynamicHelp": false,
|
|
450
470
|
"multiple": false,
|
|
451
471
|
"type": "option"
|
|
452
472
|
},
|
|
453
|
-
"
|
|
454
|
-
"
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
473
|
+
"fn-installer": {
|
|
474
|
+
"aliases": [
|
|
475
|
+
"function-installer",
|
|
476
|
+
"installer"
|
|
477
|
+
],
|
|
478
|
+
"description": "Which package manager to use when installing Function dependencies",
|
|
479
|
+
"hidden": true,
|
|
480
|
+
"name": "fn-installer",
|
|
458
481
|
"hasDynamicHelp": false,
|
|
459
482
|
"multiple": false,
|
|
483
|
+
"options": [
|
|
484
|
+
"npm",
|
|
485
|
+
"pnpm",
|
|
486
|
+
"yarn"
|
|
487
|
+
],
|
|
460
488
|
"type": "option"
|
|
461
489
|
},
|
|
462
|
-
"
|
|
463
|
-
"
|
|
464
|
-
"
|
|
465
|
-
"
|
|
466
|
-
"
|
|
490
|
+
"no-wait": {
|
|
491
|
+
"description": "Do not wait for Stack deployment to complete",
|
|
492
|
+
"name": "no-wait",
|
|
493
|
+
"allowNo": false,
|
|
494
|
+
"type": "boolean"
|
|
495
|
+
},
|
|
496
|
+
"configure": {
|
|
497
|
+
"aliases": [
|
|
498
|
+
"config",
|
|
499
|
+
"init"
|
|
500
|
+
],
|
|
501
|
+
"description": "Configure the local Blueprint interactively before deploying",
|
|
502
|
+
"hidden": true,
|
|
503
|
+
"name": "configure",
|
|
504
|
+
"allowNo": false,
|
|
505
|
+
"type": "boolean"
|
|
506
|
+
},
|
|
507
|
+
"new-stack-name": {
|
|
508
|
+
"description": "Set a new name for the Stack",
|
|
509
|
+
"name": "new-stack-name",
|
|
467
510
|
"hasDynamicHelp": false,
|
|
468
511
|
"multiple": false,
|
|
469
512
|
"type": "option"
|
|
@@ -471,34 +514,32 @@
|
|
|
471
514
|
},
|
|
472
515
|
"hasDynamicHelp": false,
|
|
473
516
|
"hiddenAliases": [],
|
|
474
|
-
"id": "
|
|
517
|
+
"id": "blueprints:deploy",
|
|
475
518
|
"pluginAlias": "@sanity/runtime-cli",
|
|
476
519
|
"pluginName": "@sanity/runtime-cli",
|
|
477
520
|
"pluginType": "core",
|
|
478
521
|
"strict": true,
|
|
479
|
-
"summary": "
|
|
522
|
+
"summary": "Deploy the local Blueprint to the remote Stack",
|
|
480
523
|
"enableJsonFlag": true,
|
|
481
524
|
"needs": [
|
|
525
|
+
"deployedStack",
|
|
482
526
|
"blueprint"
|
|
483
527
|
],
|
|
484
528
|
"isESM": true,
|
|
485
529
|
"relativePath": [
|
|
486
530
|
"dist",
|
|
487
531
|
"commands",
|
|
488
|
-
"
|
|
489
|
-
"
|
|
532
|
+
"blueprints",
|
|
533
|
+
"deploy.js"
|
|
490
534
|
]
|
|
491
535
|
},
|
|
492
|
-
"
|
|
536
|
+
"blueprints:destroy": {
|
|
493
537
|
"aliases": [],
|
|
494
538
|
"args": {},
|
|
495
|
-
"description": "
|
|
539
|
+
"description": "Permanently removes the remote Stack and all its provisioned resources. Your Blueprint manifest and resource files remain intact; \"stackId\" is unset in your local config.\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.\n\nExit codes: 0 destroyed, 2 destruction failed, 75 destruction accepted but completion could not be confirmed (rerun 'blueprints info' to check).",
|
|
496
540
|
"examples": [
|
|
497
541
|
"<%= config.bin %> <%= command.id %>",
|
|
498
|
-
"<%= config.bin %> <%= command.id %> --
|
|
499
|
-
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
500
|
-
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
501
|
-
"<%= config.bin %> <%= command.id %> --project-id <projectId> --json"
|
|
542
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id> --project-id <projectId> --force --no-wait"
|
|
502
543
|
],
|
|
503
544
|
"flags": {
|
|
504
545
|
"json": {
|
|
@@ -535,15 +576,18 @@
|
|
|
535
576
|
"type": "boolean"
|
|
536
577
|
},
|
|
537
578
|
"verbose": {
|
|
538
|
-
"
|
|
539
|
-
"
|
|
579
|
+
"description": "Verbose output",
|
|
580
|
+
"hidden": true,
|
|
540
581
|
"name": "verbose",
|
|
541
582
|
"allowNo": false,
|
|
542
583
|
"type": "boolean"
|
|
543
584
|
},
|
|
544
585
|
"stack": {
|
|
545
|
-
"
|
|
546
|
-
|
|
586
|
+
"aliases": [
|
|
587
|
+
"stack-id",
|
|
588
|
+
"stackId"
|
|
589
|
+
],
|
|
590
|
+
"description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
|
|
547
591
|
"name": "stack",
|
|
548
592
|
"hasDynamicHelp": false,
|
|
549
593
|
"multiple": false,
|
|
@@ -554,9 +598,13 @@
|
|
|
554
598
|
"project",
|
|
555
599
|
"projectId"
|
|
556
600
|
],
|
|
557
|
-
"
|
|
558
|
-
|
|
559
|
-
"
|
|
601
|
+
"dependsOn": [
|
|
602
|
+
"stack",
|
|
603
|
+
"force"
|
|
604
|
+
],
|
|
605
|
+
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
606
|
+
"exclusive": [
|
|
607
|
+
"organization-id"
|
|
560
608
|
],
|
|
561
609
|
"name": "project-id",
|
|
562
610
|
"hasDynamicHelp": false,
|
|
@@ -569,6 +617,10 @@
|
|
|
569
617
|
"organizationId",
|
|
570
618
|
"org"
|
|
571
619
|
],
|
|
620
|
+
"dependsOn": [
|
|
621
|
+
"stack",
|
|
622
|
+
"force"
|
|
623
|
+
],
|
|
572
624
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
573
625
|
"exclusive": [
|
|
574
626
|
"project-id"
|
|
@@ -577,17 +629,29 @@
|
|
|
577
629
|
"hasDynamicHelp": false,
|
|
578
630
|
"multiple": false,
|
|
579
631
|
"type": "option"
|
|
632
|
+
},
|
|
633
|
+
"force": {
|
|
634
|
+
"char": "f",
|
|
635
|
+
"description": "Force Stack destruction (skip confirmation)",
|
|
636
|
+
"name": "force",
|
|
637
|
+
"allowNo": false,
|
|
638
|
+
"type": "boolean"
|
|
639
|
+
},
|
|
640
|
+
"no-wait": {
|
|
641
|
+
"description": "Do not wait for Stack destruction to complete",
|
|
642
|
+
"name": "no-wait",
|
|
643
|
+
"allowNo": false,
|
|
644
|
+
"type": "boolean"
|
|
580
645
|
}
|
|
581
646
|
},
|
|
582
647
|
"hasDynamicHelp": false,
|
|
583
|
-
"hidden": true,
|
|
584
648
|
"hiddenAliases": [],
|
|
585
|
-
"id": "
|
|
649
|
+
"id": "blueprints:destroy",
|
|
586
650
|
"pluginAlias": "@sanity/runtime-cli",
|
|
587
651
|
"pluginName": "@sanity/runtime-cli",
|
|
588
652
|
"pluginType": "core",
|
|
589
653
|
"strict": true,
|
|
590
|
-
"summary": "
|
|
654
|
+
"summary": "Destroy a remote Stack deployment and its resources",
|
|
591
655
|
"enableJsonFlag": true,
|
|
592
656
|
"needs": [
|
|
593
657
|
"scope"
|
|
@@ -596,25 +660,91 @@
|
|
|
596
660
|
"relativePath": [
|
|
597
661
|
"dist",
|
|
598
662
|
"commands",
|
|
599
|
-
"
|
|
600
|
-
"
|
|
663
|
+
"blueprints",
|
|
664
|
+
"destroy.js"
|
|
601
665
|
]
|
|
602
666
|
},
|
|
603
|
-
"
|
|
667
|
+
"blueprints:doctor": {
|
|
604
668
|
"aliases": [],
|
|
605
|
-
"args": {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
669
|
+
"args": {},
|
|
670
|
+
"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.\n\nSupports --json for programmatic consumption of diagnostic results.",
|
|
671
|
+
"examples": [
|
|
672
|
+
"<%= config.bin %> <%= command.id %>",
|
|
673
|
+
"<%= config.bin %> <%= command.id %> --fix"
|
|
674
|
+
],
|
|
675
|
+
"flags": {
|
|
676
|
+
"json": {
|
|
677
|
+
"description": "Format output as json",
|
|
678
|
+
"name": "json",
|
|
679
|
+
"allowNo": false,
|
|
680
|
+
"type": "boolean"
|
|
681
|
+
},
|
|
682
|
+
"path": {
|
|
683
|
+
"aliases": [
|
|
684
|
+
"blueprint-path"
|
|
685
|
+
],
|
|
686
|
+
"char": "p",
|
|
687
|
+
"description": "Path to a Blueprint file or directory containing one",
|
|
688
|
+
"env": "SANITY_BLUEPRINT_PATH",
|
|
689
|
+
"name": "path",
|
|
690
|
+
"hasDynamicHelp": false,
|
|
691
|
+
"multiple": false,
|
|
692
|
+
"type": "option"
|
|
693
|
+
},
|
|
694
|
+
"trace": {
|
|
695
|
+
"description": "Trace output",
|
|
696
|
+
"hidden": true,
|
|
697
|
+
"name": "trace",
|
|
698
|
+
"allowNo": false,
|
|
699
|
+
"type": "boolean"
|
|
700
|
+
},
|
|
701
|
+
"validate-resources": {
|
|
702
|
+
"description": "Validate resources",
|
|
703
|
+
"hidden": true,
|
|
704
|
+
"name": "validate-resources",
|
|
705
|
+
"allowNo": true,
|
|
706
|
+
"type": "boolean"
|
|
707
|
+
},
|
|
708
|
+
"verbose": {
|
|
709
|
+
"description": "Verbose output",
|
|
710
|
+
"hidden": true,
|
|
711
|
+
"name": "verbose",
|
|
712
|
+
"allowNo": false,
|
|
713
|
+
"type": "boolean"
|
|
714
|
+
},
|
|
715
|
+
"fix": {
|
|
716
|
+
"description": "Interactively fix configuration issues",
|
|
717
|
+
"name": "fix",
|
|
718
|
+
"allowNo": false,
|
|
719
|
+
"type": "boolean"
|
|
610
720
|
}
|
|
611
721
|
},
|
|
612
|
-
"
|
|
722
|
+
"hasDynamicHelp": false,
|
|
723
|
+
"hiddenAliases": [],
|
|
724
|
+
"id": "blueprints:doctor",
|
|
725
|
+
"pluginAlias": "@sanity/runtime-cli",
|
|
726
|
+
"pluginName": "@sanity/runtime-cli",
|
|
727
|
+
"pluginType": "core",
|
|
728
|
+
"strict": true,
|
|
729
|
+
"summary": "Diagnose potential issues with local Blueprint and remote Stack configuration",
|
|
730
|
+
"enableJsonFlag": true,
|
|
731
|
+
"isESM": true,
|
|
732
|
+
"relativePath": [
|
|
733
|
+
"dist",
|
|
734
|
+
"commands",
|
|
735
|
+
"blueprints",
|
|
736
|
+
"doctor.js"
|
|
737
|
+
]
|
|
738
|
+
},
|
|
739
|
+
"blueprints:info": {
|
|
740
|
+
"aliases": [],
|
|
741
|
+
"args": {},
|
|
742
|
+
"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.",
|
|
613
743
|
"examples": [
|
|
614
|
-
"<%= config.bin %> <%= command.id %>
|
|
615
|
-
"<%= config.bin %> <%= command.id %> <name>
|
|
616
|
-
"<%= config.bin %> <%= command.id %> <
|
|
617
|
-
"<%= config.bin %> <%= command.id %> <
|
|
744
|
+
"<%= config.bin %> <%= command.id %>",
|
|
745
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
746
|
+
"<%= config.bin %> <%= command.id %> --project-id <id> --stack <name-or-id>",
|
|
747
|
+
"<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
|
|
618
748
|
],
|
|
619
749
|
"flags": {
|
|
620
750
|
"json": {
|
|
@@ -651,14 +781,17 @@
|
|
|
651
781
|
"type": "boolean"
|
|
652
782
|
},
|
|
653
783
|
"verbose": {
|
|
654
|
-
"
|
|
655
|
-
"
|
|
784
|
+
"char": "v",
|
|
785
|
+
"description": "Show resource and external IDs",
|
|
656
786
|
"name": "verbose",
|
|
657
787
|
"allowNo": false,
|
|
658
788
|
"type": "boolean"
|
|
659
789
|
},
|
|
660
790
|
"stack": {
|
|
661
|
-
"
|
|
791
|
+
"aliases": [
|
|
792
|
+
"id"
|
|
793
|
+
],
|
|
794
|
+
"description": "Stack name or ID",
|
|
662
795
|
"name": "stack",
|
|
663
796
|
"hasDynamicHelp": false,
|
|
664
797
|
"multiple": false,
|
|
@@ -673,7 +806,6 @@
|
|
|
673
806
|
"exclusive": [
|
|
674
807
|
"organization-id"
|
|
675
808
|
],
|
|
676
|
-
"hidden": true,
|
|
677
809
|
"name": "project-id",
|
|
678
810
|
"hasDynamicHelp": false,
|
|
679
811
|
"multiple": false,
|
|
@@ -689,103 +821,52 @@
|
|
|
689
821
|
"exclusive": [
|
|
690
822
|
"project-id"
|
|
691
823
|
],
|
|
692
|
-
"hidden": true,
|
|
693
824
|
"name": "organization-id",
|
|
694
825
|
"hasDynamicHelp": false,
|
|
695
826
|
"multiple": false,
|
|
696
827
|
"type": "option"
|
|
697
|
-
},
|
|
698
|
-
"limit": {
|
|
699
|
-
"char": "l",
|
|
700
|
-
"description": "Total number of log entries to retrieve",
|
|
701
|
-
"name": "limit",
|
|
702
|
-
"required": false,
|
|
703
|
-
"default": 50,
|
|
704
|
-
"hasDynamicHelp": false,
|
|
705
|
-
"multiple": false,
|
|
706
|
-
"type": "option"
|
|
707
|
-
},
|
|
708
|
-
"utc": {
|
|
709
|
-
"char": "u",
|
|
710
|
-
"description": "Show dates in UTC time zone",
|
|
711
|
-
"name": "utc",
|
|
712
|
-
"required": false,
|
|
713
|
-
"allowNo": false,
|
|
714
|
-
"type": "boolean"
|
|
715
|
-
},
|
|
716
|
-
"delete": {
|
|
717
|
-
"char": "d",
|
|
718
|
-
"description": "Delete all logs for the function",
|
|
719
|
-
"exclusive": [
|
|
720
|
-
"limit",
|
|
721
|
-
"json"
|
|
722
|
-
],
|
|
723
|
-
"name": "delete",
|
|
724
|
-
"required": false,
|
|
725
|
-
"allowNo": false,
|
|
726
|
-
"type": "boolean"
|
|
727
|
-
},
|
|
728
|
-
"force": {
|
|
729
|
-
"char": "f",
|
|
730
|
-
"dependsOn": [
|
|
731
|
-
"delete"
|
|
732
|
-
],
|
|
733
|
-
"description": "Skip confirmation for deleting logs",
|
|
734
|
-
"name": "force",
|
|
735
|
-
"required": false,
|
|
736
|
-
"allowNo": false,
|
|
737
|
-
"type": "boolean"
|
|
738
|
-
},
|
|
739
|
-
"watch": {
|
|
740
|
-
"aliases": [
|
|
741
|
-
"follow"
|
|
742
|
-
],
|
|
743
|
-
"char": "w",
|
|
744
|
-
"description": "Watch for new logs (streaming mode)",
|
|
745
|
-
"exclusive": [
|
|
746
|
-
"json"
|
|
747
|
-
],
|
|
748
|
-
"name": "watch",
|
|
749
|
-
"allowNo": false,
|
|
750
|
-
"type": "boolean"
|
|
751
828
|
}
|
|
752
829
|
},
|
|
753
830
|
"hasDynamicHelp": false,
|
|
754
831
|
"hiddenAliases": [],
|
|
755
|
-
"id": "
|
|
832
|
+
"id": "blueprints:info",
|
|
756
833
|
"pluginAlias": "@sanity/runtime-cli",
|
|
757
834
|
"pluginName": "@sanity/runtime-cli",
|
|
758
835
|
"pluginType": "core",
|
|
759
836
|
"strict": true,
|
|
760
|
-
"summary": "
|
|
837
|
+
"summary": "Display the status and resources of the remote Stack deployment",
|
|
761
838
|
"enableJsonFlag": true,
|
|
762
839
|
"needs": [
|
|
763
|
-
"deployedStack"
|
|
764
|
-
"blueprint"
|
|
840
|
+
"deployedStack"
|
|
765
841
|
],
|
|
766
842
|
"isESM": true,
|
|
767
843
|
"relativePath": [
|
|
768
844
|
"dist",
|
|
769
845
|
"commands",
|
|
770
|
-
"
|
|
771
|
-
"
|
|
846
|
+
"blueprints",
|
|
847
|
+
"info.js"
|
|
772
848
|
]
|
|
773
849
|
},
|
|
774
|
-
"
|
|
850
|
+
"blueprints:init": {
|
|
775
851
|
"aliases": [],
|
|
776
852
|
"args": {
|
|
777
|
-
"
|
|
778
|
-
"description": "
|
|
779
|
-
"name": "
|
|
780
|
-
"required": false
|
|
853
|
+
"dir": {
|
|
854
|
+
"description": "Directory to create the local Blueprint in (defaults to the current directory)",
|
|
855
|
+
"name": "dir"
|
|
781
856
|
}
|
|
782
857
|
},
|
|
783
|
-
"description": "
|
|
858
|
+
"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\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. A .gitignore covering node_modules, .env, and Function build output is created or updated; the .sanity/ config itself is not ignored.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.\n\nRunning without a directory prompts to confirm the current directory. Run 'blueprints init .' to initialize in the current directory without a prompt.",
|
|
784
859
|
"examples": [
|
|
785
|
-
"<%= config.bin %> <%= command.id %>
|
|
786
|
-
"<%= config.bin %> <%= command.id %>
|
|
787
|
-
"<%= config.bin %> <%= command.id %>
|
|
788
|
-
"<%= config.bin %> <%= command.id %>
|
|
860
|
+
"<%= config.bin %> <%= command.id %>",
|
|
861
|
+
"<%= config.bin %> <%= command.id %> .",
|
|
862
|
+
"<%= config.bin %> <%= command.id %> [directory]",
|
|
863
|
+
"<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts>",
|
|
864
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
865
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
866
|
+
"<%= config.bin %> <%= command.id %> --stack-name <newStackName>",
|
|
867
|
+
"<%= config.bin %> <%= command.id %> --stack-id <existingStackId>",
|
|
868
|
+
"<%= config.bin %> <%= command.id %> new-stack --type <json|js|ts> --org <organizationId> --name <newStackName>",
|
|
869
|
+
"<%= config.bin %> <%= command.id %> old-stack --type <json|js|ts> --project-id <projectId> --stack-id <existingStackId>"
|
|
789
870
|
],
|
|
790
871
|
"flags": {
|
|
791
872
|
"json": {
|
|
@@ -828,346 +909,41 @@
|
|
|
828
909
|
"allowNo": false,
|
|
829
910
|
"type": "boolean"
|
|
830
911
|
},
|
|
831
|
-
"
|
|
832
|
-
"description": "
|
|
833
|
-
"
|
|
834
|
-
"name": "stack",
|
|
912
|
+
"dir": {
|
|
913
|
+
"description": "Directory to create the local Blueprint in",
|
|
914
|
+
"name": "dir",
|
|
835
915
|
"hasDynamicHelp": false,
|
|
836
916
|
"multiple": false,
|
|
837
917
|
"type": "option"
|
|
838
918
|
},
|
|
839
|
-
"
|
|
919
|
+
"example": {
|
|
840
920
|
"aliases": [
|
|
841
|
-
"
|
|
842
|
-
"projectId"
|
|
921
|
+
"recipe"
|
|
843
922
|
],
|
|
844
|
-
"description": "
|
|
923
|
+
"description": "Example to use for the local Blueprint",
|
|
845
924
|
"exclusive": [
|
|
846
|
-
"
|
|
925
|
+
"blueprint-type",
|
|
926
|
+
"stack-id",
|
|
927
|
+
"stack-name"
|
|
847
928
|
],
|
|
848
|
-
"name": "
|
|
929
|
+
"name": "example",
|
|
849
930
|
"hasDynamicHelp": false,
|
|
850
931
|
"multiple": false,
|
|
851
932
|
"type": "option"
|
|
852
933
|
},
|
|
853
|
-
"
|
|
934
|
+
"blueprint-type": {
|
|
854
935
|
"aliases": [
|
|
855
|
-
"
|
|
856
|
-
"organizationId",
|
|
857
|
-
"org"
|
|
858
|
-
],
|
|
859
|
-
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
860
|
-
"exclusive": [
|
|
861
|
-
"project-id"
|
|
936
|
+
"type"
|
|
862
937
|
],
|
|
863
|
-
"
|
|
938
|
+
"description": "Blueprint manifest type to use for the local Blueprint",
|
|
939
|
+
"name": "blueprint-type",
|
|
864
940
|
"hasDynamicHelp": false,
|
|
865
941
|
"multiple": false,
|
|
866
|
-
"type": "option"
|
|
867
|
-
},
|
|
868
|
-
"data": {
|
|
869
|
-
"char": "d",
|
|
870
|
-
"description": "Data to send to the function",
|
|
871
|
-
"exclusive": [
|
|
872
|
-
"file",
|
|
873
|
-
"document-id"
|
|
874
|
-
],
|
|
875
|
-
"name": "data",
|
|
876
|
-
"required": false,
|
|
877
|
-
"hasDynamicHelp": false,
|
|
878
|
-
"multiple": false,
|
|
879
|
-
"type": "option"
|
|
880
|
-
},
|
|
881
|
-
"data-before": {
|
|
882
|
-
"description": "Original document",
|
|
883
|
-
"exclusive": [
|
|
884
|
-
"data",
|
|
885
|
-
"file",
|
|
886
|
-
"document-id",
|
|
887
|
-
"file-before",
|
|
888
|
-
"file-after",
|
|
889
|
-
"document-id-before",
|
|
890
|
-
"document-id-after"
|
|
891
|
-
],
|
|
892
|
-
"name": "data-before",
|
|
893
|
-
"required": false,
|
|
894
|
-
"hasDynamicHelp": false,
|
|
895
|
-
"multiple": false,
|
|
896
|
-
"type": "option"
|
|
897
|
-
},
|
|
898
|
-
"data-after": {
|
|
899
|
-
"description": "Current document",
|
|
900
|
-
"exclusive": [
|
|
901
|
-
"data",
|
|
902
|
-
"file",
|
|
903
|
-
"document-id",
|
|
904
|
-
"file-before",
|
|
905
|
-
"file-after",
|
|
906
|
-
"document-id-before",
|
|
907
|
-
"document-id-after"
|
|
908
|
-
],
|
|
909
|
-
"name": "data-after",
|
|
910
|
-
"required": false,
|
|
911
|
-
"hasDynamicHelp": false,
|
|
912
|
-
"multiple": false,
|
|
913
|
-
"type": "option"
|
|
914
|
-
},
|
|
915
|
-
"event": {
|
|
916
|
-
"char": "e",
|
|
917
|
-
"description": "Type of event (create, update, delete)",
|
|
918
|
-
"name": "event",
|
|
919
|
-
"required": false,
|
|
920
|
-
"hasDynamicHelp": false,
|
|
921
|
-
"multiple": false,
|
|
922
|
-
"options": [
|
|
923
|
-
"create",
|
|
924
|
-
"update",
|
|
925
|
-
"delete"
|
|
926
|
-
],
|
|
927
|
-
"type": "option"
|
|
928
|
-
},
|
|
929
|
-
"file": {
|
|
930
|
-
"char": "f",
|
|
931
|
-
"description": "Read data from file and send to the function",
|
|
932
|
-
"exclusive": [
|
|
933
|
-
"data",
|
|
934
|
-
"document-id"
|
|
935
|
-
],
|
|
936
|
-
"name": "file",
|
|
937
|
-
"required": false,
|
|
938
|
-
"hasDynamicHelp": false,
|
|
939
|
-
"multiple": false,
|
|
940
|
-
"type": "option"
|
|
941
|
-
},
|
|
942
|
-
"file-before": {
|
|
943
|
-
"description": "Original document",
|
|
944
|
-
"exclusive": [
|
|
945
|
-
"data",
|
|
946
|
-
"file",
|
|
947
|
-
"document-id",
|
|
948
|
-
"data-before",
|
|
949
|
-
"data-after",
|
|
950
|
-
"document-id-before",
|
|
951
|
-
"document-id-after"
|
|
952
|
-
],
|
|
953
|
-
"name": "file-before",
|
|
954
|
-
"required": false,
|
|
955
|
-
"hasDynamicHelp": false,
|
|
956
|
-
"multiple": false,
|
|
957
|
-
"type": "option"
|
|
958
|
-
},
|
|
959
|
-
"file-after": {
|
|
960
|
-
"description": "Current document",
|
|
961
|
-
"exclusive": [
|
|
962
|
-
"data",
|
|
963
|
-
"file",
|
|
964
|
-
"document-id",
|
|
965
|
-
"data-before",
|
|
966
|
-
"data-after",
|
|
967
|
-
"document-id-before",
|
|
968
|
-
"document-id-after"
|
|
969
|
-
],
|
|
970
|
-
"name": "file-after",
|
|
971
|
-
"required": false,
|
|
972
|
-
"hasDynamicHelp": false,
|
|
973
|
-
"multiple": false,
|
|
974
|
-
"type": "option"
|
|
975
|
-
},
|
|
976
|
-
"timeout": {
|
|
977
|
-
"char": "t",
|
|
978
|
-
"description": "Execution timeout value in seconds",
|
|
979
|
-
"name": "timeout",
|
|
980
|
-
"required": false,
|
|
981
|
-
"hasDynamicHelp": false,
|
|
982
|
-
"multiple": false,
|
|
983
|
-
"type": "option"
|
|
984
|
-
},
|
|
985
|
-
"api": {
|
|
986
|
-
"char": "a",
|
|
987
|
-
"description": "Sanity API Version to use",
|
|
988
|
-
"name": "api",
|
|
989
|
-
"required": false,
|
|
990
|
-
"hasDynamicHelp": false,
|
|
991
|
-
"multiple": false,
|
|
992
|
-
"type": "option"
|
|
993
|
-
},
|
|
994
|
-
"dataset": {
|
|
995
|
-
"description": "The Sanity dataset to use",
|
|
996
|
-
"name": "dataset",
|
|
997
|
-
"required": false,
|
|
998
|
-
"hasDynamicHelp": false,
|
|
999
|
-
"multiple": false,
|
|
1000
|
-
"type": "option"
|
|
1001
|
-
},
|
|
1002
|
-
"document-id": {
|
|
1003
|
-
"aliases": [
|
|
1004
|
-
"doc",
|
|
1005
|
-
"documentId"
|
|
1006
|
-
],
|
|
1007
|
-
"description": "Document to fetch and send to function",
|
|
1008
|
-
"exclusive": [
|
|
1009
|
-
"data",
|
|
1010
|
-
"file"
|
|
1011
|
-
],
|
|
1012
|
-
"name": "document-id",
|
|
1013
|
-
"required": false,
|
|
1014
|
-
"hasDynamicHelp": false,
|
|
1015
|
-
"multiple": false,
|
|
1016
|
-
"type": "option"
|
|
1017
|
-
},
|
|
1018
|
-
"document-id-before": {
|
|
1019
|
-
"description": "Original document",
|
|
1020
|
-
"exclusive": [
|
|
1021
|
-
"data",
|
|
1022
|
-
"file",
|
|
1023
|
-
"document-id",
|
|
1024
|
-
"data-before",
|
|
1025
|
-
"data-after",
|
|
1026
|
-
"file-before",
|
|
1027
|
-
"file-after"
|
|
1028
|
-
],
|
|
1029
|
-
"name": "document-id-before",
|
|
1030
|
-
"required": false,
|
|
1031
|
-
"hasDynamicHelp": false,
|
|
1032
|
-
"multiple": false,
|
|
1033
|
-
"type": "option"
|
|
1034
|
-
},
|
|
1035
|
-
"document-id-after": {
|
|
1036
|
-
"description": "Current document",
|
|
1037
|
-
"exclusive": [
|
|
1038
|
-
"data",
|
|
1039
|
-
"file",
|
|
1040
|
-
"document-id",
|
|
1041
|
-
"data-before",
|
|
1042
|
-
"data-after",
|
|
1043
|
-
"file-before",
|
|
1044
|
-
"file-after"
|
|
1045
|
-
],
|
|
1046
|
-
"name": "document-id-after",
|
|
1047
|
-
"required": false,
|
|
1048
|
-
"hasDynamicHelp": false,
|
|
1049
|
-
"multiple": false,
|
|
1050
|
-
"type": "option"
|
|
1051
|
-
},
|
|
1052
|
-
"with-user-token": {
|
|
1053
|
-
"description": "Prime access token from CLI config",
|
|
1054
|
-
"name": "with-user-token",
|
|
1055
|
-
"allowNo": false,
|
|
1056
|
-
"type": "boolean"
|
|
1057
|
-
},
|
|
1058
|
-
"media-library-id": {
|
|
1059
|
-
"aliases": [
|
|
1060
|
-
"media"
|
|
1061
|
-
],
|
|
1062
|
-
"description": "Sanity Media Library ID to use",
|
|
1063
|
-
"exclusive": [
|
|
1064
|
-
"project-id",
|
|
1065
|
-
"dataset"
|
|
1066
|
-
],
|
|
1067
|
-
"name": "media-library-id",
|
|
1068
|
-
"required": false,
|
|
1069
|
-
"hasDynamicHelp": false,
|
|
1070
|
-
"multiple": false,
|
|
1071
|
-
"type": "option"
|
|
1072
|
-
},
|
|
1073
|
-
"no-wait": {
|
|
1074
|
-
"description": "Skip durable wait delays instead of sleeping",
|
|
1075
|
-
"name": "no-wait",
|
|
1076
|
-
"required": false,
|
|
1077
|
-
"allowNo": false,
|
|
1078
|
-
"type": "boolean"
|
|
1079
|
-
}
|
|
1080
|
-
},
|
|
1081
|
-
"hasDynamicHelp": false,
|
|
1082
|
-
"hiddenAliases": [],
|
|
1083
|
-
"id": "functions:test",
|
|
1084
|
-
"pluginAlias": "@sanity/runtime-cli",
|
|
1085
|
-
"pluginName": "@sanity/runtime-cli",
|
|
1086
|
-
"pluginType": "core",
|
|
1087
|
-
"strict": true,
|
|
1088
|
-
"summary": "Invoke a local Sanity Function",
|
|
1089
|
-
"enableJsonFlag": true,
|
|
1090
|
-
"needs": [
|
|
1091
|
-
"blueprint"
|
|
1092
|
-
],
|
|
1093
|
-
"isESM": true,
|
|
1094
|
-
"relativePath": [
|
|
1095
|
-
"dist",
|
|
1096
|
-
"commands",
|
|
1097
|
-
"functions",
|
|
1098
|
-
"test.js"
|
|
1099
|
-
]
|
|
1100
|
-
},
|
|
1101
|
-
"blueprints:add": {
|
|
1102
|
-
"aliases": [],
|
|
1103
|
-
"args": {
|
|
1104
|
-
"type": {
|
|
1105
|
-
"description": "Type of resource to add (only \"function\" is supported)",
|
|
1106
|
-
"name": "type",
|
|
1107
942
|
"options": [
|
|
1108
|
-
"
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
}
|
|
1112
|
-
},
|
|
1113
|
-
"deprecationOptions": {
|
|
1114
|
-
"to": "functions add"
|
|
1115
|
-
},
|
|
1116
|
-
"description": "This command is deprecated. Use \"functions add\" instead.\n\nEquivalent usage:\n $ <%= config.bin %> functions add\n $ <%= config.bin %> functions add --name my-function --type document-create",
|
|
1117
|
-
"examples": [
|
|
1118
|
-
"<%= config.bin %> <%= command.id %> function",
|
|
1119
|
-
"<%= config.bin %> <%= command.id %> function --helpers",
|
|
1120
|
-
"<%= config.bin %> <%= command.id %> function --name my-function",
|
|
1121
|
-
"<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create",
|
|
1122
|
-
"<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create --fn-type document-update --lang js"
|
|
1123
|
-
],
|
|
1124
|
-
"flags": {
|
|
1125
|
-
"json": {
|
|
1126
|
-
"description": "Format output as json",
|
|
1127
|
-
"name": "json",
|
|
1128
|
-
"allowNo": false,
|
|
1129
|
-
"type": "boolean"
|
|
1130
|
-
},
|
|
1131
|
-
"path": {
|
|
1132
|
-
"aliases": [
|
|
1133
|
-
"blueprint-path"
|
|
943
|
+
"json",
|
|
944
|
+
"js",
|
|
945
|
+
"ts"
|
|
1134
946
|
],
|
|
1135
|
-
"char": "p",
|
|
1136
|
-
"description": "Path to a Blueprint file or directory containing one",
|
|
1137
|
-
"env": "SANITY_BLUEPRINT_PATH",
|
|
1138
|
-
"hidden": true,
|
|
1139
|
-
"name": "path",
|
|
1140
|
-
"hasDynamicHelp": false,
|
|
1141
|
-
"multiple": false,
|
|
1142
|
-
"type": "option"
|
|
1143
|
-
},
|
|
1144
|
-
"trace": {
|
|
1145
|
-
"description": "Trace output",
|
|
1146
|
-
"hidden": true,
|
|
1147
|
-
"name": "trace",
|
|
1148
|
-
"allowNo": false,
|
|
1149
|
-
"type": "boolean"
|
|
1150
|
-
},
|
|
1151
|
-
"validate-resources": {
|
|
1152
|
-
"description": "Validate resources",
|
|
1153
|
-
"hidden": true,
|
|
1154
|
-
"name": "validate-resources",
|
|
1155
|
-
"allowNo": true,
|
|
1156
|
-
"type": "boolean"
|
|
1157
|
-
},
|
|
1158
|
-
"verbose": {
|
|
1159
|
-
"description": "Verbose output",
|
|
1160
|
-
"hidden": true,
|
|
1161
|
-
"name": "verbose",
|
|
1162
|
-
"allowNo": false,
|
|
1163
|
-
"type": "boolean"
|
|
1164
|
-
},
|
|
1165
|
-
"stack": {
|
|
1166
|
-
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1167
|
-
"hidden": true,
|
|
1168
|
-
"name": "stack",
|
|
1169
|
-
"hasDynamicHelp": false,
|
|
1170
|
-
"multiple": false,
|
|
1171
947
|
"type": "option"
|
|
1172
948
|
},
|
|
1173
949
|
"project-id": {
|
|
@@ -1179,7 +955,6 @@
|
|
|
1179
955
|
"exclusive": [
|
|
1180
956
|
"organization-id"
|
|
1181
957
|
],
|
|
1182
|
-
"hidden": true,
|
|
1183
958
|
"name": "project-id",
|
|
1184
959
|
"hasDynamicHelp": false,
|
|
1185
960
|
"multiple": false,
|
|
@@ -1195,160 +970,84 @@
|
|
|
1195
970
|
"exclusive": [
|
|
1196
971
|
"project-id"
|
|
1197
972
|
],
|
|
1198
|
-
"hidden": true,
|
|
1199
973
|
"name": "organization-id",
|
|
1200
974
|
"hasDynamicHelp": false,
|
|
1201
975
|
"multiple": false,
|
|
1202
976
|
"type": "option"
|
|
1203
977
|
},
|
|
1204
|
-
"
|
|
978
|
+
"stack-id": {
|
|
1205
979
|
"aliases": [
|
|
1206
|
-
"
|
|
980
|
+
"stackId"
|
|
1207
981
|
],
|
|
1208
|
-
"description": "
|
|
982
|
+
"description": "Existing Stack ID used to scope local Blueprint",
|
|
1209
983
|
"exclusive": [
|
|
1210
|
-
"name"
|
|
1211
|
-
"fn-type",
|
|
1212
|
-
"language",
|
|
1213
|
-
"javascript",
|
|
1214
|
-
"fn-helpers",
|
|
1215
|
-
"fn-installer"
|
|
1216
|
-
],
|
|
1217
|
-
"name": "example",
|
|
1218
|
-
"hasDynamicHelp": false,
|
|
1219
|
-
"multiple": false,
|
|
1220
|
-
"type": "option"
|
|
1221
|
-
},
|
|
1222
|
-
"name": {
|
|
1223
|
-
"char": "n",
|
|
1224
|
-
"description": "Name of the resource to add",
|
|
1225
|
-
"name": "name",
|
|
1226
|
-
"hasDynamicHelp": false,
|
|
1227
|
-
"multiple": false,
|
|
1228
|
-
"type": "option"
|
|
1229
|
-
},
|
|
1230
|
-
"fn-type": {
|
|
1231
|
-
"aliases": [
|
|
1232
|
-
"function-type"
|
|
1233
|
-
],
|
|
1234
|
-
"dependsOn": [
|
|
1235
|
-
"name"
|
|
1236
|
-
],
|
|
1237
|
-
"description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
|
|
1238
|
-
"name": "fn-type",
|
|
1239
|
-
"hasDynamicHelp": false,
|
|
1240
|
-
"multiple": true,
|
|
1241
|
-
"options": [
|
|
1242
|
-
"document-publish",
|
|
1243
|
-
"document-create",
|
|
1244
|
-
"document-delete",
|
|
1245
|
-
"document-update",
|
|
1246
|
-
"media-library-asset-create",
|
|
1247
|
-
"media-library-asset-delete",
|
|
1248
|
-
"media-library-asset-update",
|
|
1249
|
-
"pub-sub",
|
|
1250
|
-
"scheduled-function",
|
|
1251
|
-
"sync-tag-invalidate"
|
|
984
|
+
"stack-name"
|
|
1252
985
|
],
|
|
1253
|
-
"
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
986
|
+
"name": "stack-id",
|
|
987
|
+
"relationships": [
|
|
988
|
+
{
|
|
989
|
+
"type": "some",
|
|
990
|
+
"flags": [
|
|
991
|
+
"project-id",
|
|
992
|
+
"organization-id"
|
|
993
|
+
]
|
|
994
|
+
}
|
|
1260
995
|
],
|
|
1261
|
-
"description": "Language of the new function",
|
|
1262
|
-
"name": "language",
|
|
1263
|
-
"default": "ts",
|
|
1264
996
|
"hasDynamicHelp": false,
|
|
1265
997
|
"multiple": false,
|
|
1266
|
-
"options": [
|
|
1267
|
-
"ts",
|
|
1268
|
-
"js"
|
|
1269
|
-
],
|
|
1270
998
|
"type": "option"
|
|
1271
999
|
},
|
|
1272
|
-
"
|
|
1000
|
+
"stack-name": {
|
|
1273
1001
|
"aliases": [
|
|
1274
|
-
"
|
|
1002
|
+
"name"
|
|
1275
1003
|
],
|
|
1276
|
-
"description": "
|
|
1004
|
+
"description": "Name to use for a new Stack provisioned during initialization",
|
|
1277
1005
|
"exclusive": [
|
|
1278
|
-
"
|
|
1279
|
-
],
|
|
1280
|
-
"name": "javascript",
|
|
1281
|
-
"allowNo": false,
|
|
1282
|
-
"type": "boolean"
|
|
1283
|
-
},
|
|
1284
|
-
"fn-helpers": {
|
|
1285
|
-
"aliases": [
|
|
1286
|
-
"function-helpers",
|
|
1287
|
-
"helpers"
|
|
1006
|
+
"stack-id"
|
|
1288
1007
|
],
|
|
1289
|
-
"
|
|
1290
|
-
"
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1008
|
+
"name": "stack-name",
|
|
1009
|
+
"relationships": [
|
|
1010
|
+
{
|
|
1011
|
+
"type": "some",
|
|
1012
|
+
"flags": [
|
|
1013
|
+
"project-id",
|
|
1014
|
+
"organization-id"
|
|
1015
|
+
]
|
|
1016
|
+
}
|
|
1298
1017
|
],
|
|
1299
|
-
"description": "Which package manager to use when installing the @sanity/functions helpers",
|
|
1300
|
-
"name": "fn-installer",
|
|
1301
1018
|
"hasDynamicHelp": false,
|
|
1302
1019
|
"multiple": false,
|
|
1303
|
-
"options": [
|
|
1304
|
-
"skip",
|
|
1305
|
-
"npm",
|
|
1306
|
-
"pnpm",
|
|
1307
|
-
"yarn"
|
|
1308
|
-
],
|
|
1309
1020
|
"type": "option"
|
|
1310
|
-
},
|
|
1311
|
-
"install": {
|
|
1312
|
-
"char": "i",
|
|
1313
|
-
"description": "Shortcut for --fn-installer npm",
|
|
1314
|
-
"exclusive": [
|
|
1315
|
-
"fn-installer"
|
|
1316
|
-
],
|
|
1317
|
-
"name": "install",
|
|
1318
|
-
"allowNo": false,
|
|
1319
|
-
"type": "boolean"
|
|
1320
1021
|
}
|
|
1321
1022
|
},
|
|
1322
1023
|
"hasDynamicHelp": false,
|
|
1323
1024
|
"hiddenAliases": [],
|
|
1324
|
-
"id": "blueprints:
|
|
1025
|
+
"id": "blueprints:init",
|
|
1325
1026
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1326
1027
|
"pluginName": "@sanity/runtime-cli",
|
|
1327
1028
|
"pluginType": "core",
|
|
1328
|
-
"state": "deprecated",
|
|
1329
1029
|
"strict": true,
|
|
1330
|
-
"summary": "
|
|
1331
|
-
"enableJsonFlag": true,
|
|
1332
|
-
"needs": [
|
|
1333
|
-
"blueprint"
|
|
1334
|
-
],
|
|
1030
|
+
"summary": "Initialize a Blueprint and create a remote Stack",
|
|
1031
|
+
"enableJsonFlag": true,
|
|
1335
1032
|
"isESM": true,
|
|
1336
1033
|
"relativePath": [
|
|
1337
1034
|
"dist",
|
|
1338
1035
|
"commands",
|
|
1339
1036
|
"blueprints",
|
|
1340
|
-
"
|
|
1037
|
+
"init.js"
|
|
1341
1038
|
]
|
|
1342
1039
|
},
|
|
1343
|
-
"blueprints:
|
|
1040
|
+
"blueprints:logs": {
|
|
1344
1041
|
"aliases": [],
|
|
1345
1042
|
"args": {},
|
|
1346
|
-
"description": "
|
|
1043
|
+
"description": "Retrieves Stack deployment logs, useful for debugging and monitoring deployment activity.\n\nUse --watch (-w) to tail logs in real-time.\n\nUse --limit, --since, or --before to narrow the result set when not watching.\n\nIf you're not seeing expected logs, verify your Stack is deployed with 'blueprints info'.",
|
|
1347
1044
|
"examples": [
|
|
1348
1045
|
"<%= config.bin %> <%= command.id %>",
|
|
1349
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1350
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1351
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1046
|
+
"<%= config.bin %> <%= command.id %> --watch",
|
|
1047
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
1048
|
+
"<%= config.bin %> <%= command.id %> --limit 500",
|
|
1049
|
+
"<%= config.bin %> <%= command.id %> --since 2026-05-01T00:00:00Z",
|
|
1050
|
+
"<%= config.bin %> <%= command.id %> --before 2026-05-01T00:00:00Z"
|
|
1352
1051
|
],
|
|
1353
1052
|
"flags": {
|
|
1354
1053
|
"json": {
|
|
@@ -1392,14 +1091,7 @@
|
|
|
1392
1091
|
"type": "boolean"
|
|
1393
1092
|
},
|
|
1394
1093
|
"stack": {
|
|
1395
|
-
"
|
|
1396
|
-
"stack-id",
|
|
1397
|
-
"stackId"
|
|
1398
|
-
],
|
|
1399
|
-
"dependsOn": [
|
|
1400
|
-
"edit"
|
|
1401
|
-
],
|
|
1402
|
-
"description": "Stack name or ID to set in the configuration. Requires --edit flag",
|
|
1094
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1403
1095
|
"name": "stack",
|
|
1404
1096
|
"hasDynamicHelp": false,
|
|
1405
1097
|
"multiple": false,
|
|
@@ -1410,9 +1102,6 @@
|
|
|
1410
1102
|
"project",
|
|
1411
1103
|
"projectId"
|
|
1412
1104
|
],
|
|
1413
|
-
"dependsOn": [
|
|
1414
|
-
"edit"
|
|
1415
|
-
],
|
|
1416
1105
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1417
1106
|
"exclusive": [
|
|
1418
1107
|
"organization-id"
|
|
@@ -1428,9 +1117,6 @@
|
|
|
1428
1117
|
"organizationId",
|
|
1429
1118
|
"org"
|
|
1430
1119
|
],
|
|
1431
|
-
"dependsOn": [
|
|
1432
|
-
"edit"
|
|
1433
|
-
],
|
|
1434
1120
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1435
1121
|
"exclusive": [
|
|
1436
1122
|
"project-id"
|
|
@@ -1440,47 +1126,83 @@
|
|
|
1440
1126
|
"multiple": false,
|
|
1441
1127
|
"type": "option"
|
|
1442
1128
|
},
|
|
1443
|
-
"
|
|
1444
|
-
"
|
|
1445
|
-
|
|
1446
|
-
|
|
1129
|
+
"watch": {
|
|
1130
|
+
"aliases": [
|
|
1131
|
+
"follow"
|
|
1132
|
+
],
|
|
1133
|
+
"char": "w",
|
|
1134
|
+
"description": "Watch for new Stack logs",
|
|
1135
|
+
"exclusive": [
|
|
1136
|
+
"json"
|
|
1137
|
+
],
|
|
1138
|
+
"name": "watch",
|
|
1447
1139
|
"allowNo": false,
|
|
1448
1140
|
"type": "boolean"
|
|
1141
|
+
},
|
|
1142
|
+
"limit": {
|
|
1143
|
+
"char": "l",
|
|
1144
|
+
"description": "Maximum number of log entries to retrieve (1-500)",
|
|
1145
|
+
"exclusive": [
|
|
1146
|
+
"watch"
|
|
1147
|
+
],
|
|
1148
|
+
"name": "limit",
|
|
1149
|
+
"hasDynamicHelp": false,
|
|
1150
|
+
"multiple": false,
|
|
1151
|
+
"type": "option"
|
|
1152
|
+
},
|
|
1153
|
+
"since": {
|
|
1154
|
+
"description": "Only show logs after this ISO 8601 timestamp",
|
|
1155
|
+
"exclusive": [
|
|
1156
|
+
"watch"
|
|
1157
|
+
],
|
|
1158
|
+
"name": "since",
|
|
1159
|
+
"hasDynamicHelp": false,
|
|
1160
|
+
"multiple": false,
|
|
1161
|
+
"type": "option"
|
|
1162
|
+
},
|
|
1163
|
+
"before": {
|
|
1164
|
+
"description": "Only show logs before this ISO 8601 timestamp",
|
|
1165
|
+
"exclusive": [
|
|
1166
|
+
"watch"
|
|
1167
|
+
],
|
|
1168
|
+
"name": "before",
|
|
1169
|
+
"hasDynamicHelp": false,
|
|
1170
|
+
"multiple": false,
|
|
1171
|
+
"type": "option"
|
|
1449
1172
|
}
|
|
1450
1173
|
},
|
|
1451
1174
|
"hasDynamicHelp": false,
|
|
1452
1175
|
"hiddenAliases": [],
|
|
1453
|
-
"id": "blueprints:
|
|
1176
|
+
"id": "blueprints:logs",
|
|
1454
1177
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1455
1178
|
"pluginName": "@sanity/runtime-cli",
|
|
1456
1179
|
"pluginType": "core",
|
|
1457
1180
|
"strict": true,
|
|
1458
|
-
"summary": "
|
|
1181
|
+
"summary": "Display logs for the current Blueprint's Stack deployment",
|
|
1459
1182
|
"enableJsonFlag": true,
|
|
1460
1183
|
"needs": [
|
|
1461
|
-
"
|
|
1462
|
-
"blueprint"
|
|
1184
|
+
"deployedStack"
|
|
1463
1185
|
],
|
|
1464
1186
|
"isESM": true,
|
|
1465
1187
|
"relativePath": [
|
|
1466
1188
|
"dist",
|
|
1467
1189
|
"commands",
|
|
1468
1190
|
"blueprints",
|
|
1469
|
-
"
|
|
1191
|
+
"logs.js"
|
|
1470
1192
|
]
|
|
1471
1193
|
},
|
|
1472
|
-
"blueprints:deploy": {
|
|
1194
|
+
"blueprints:mint-deploy-token": {
|
|
1473
1195
|
"aliases": [],
|
|
1474
1196
|
"args": {},
|
|
1475
|
-
"description": "
|
|
1197
|
+
"description": "Mints a long-lived robot token with the role required to plan, deploy, and destroy Blueprints in this project or organization.\n\nBy default the command runs interactively and asks how you want to receive the token (clipboard, print, or exit). Use --print to emit only the raw token for shell pipelines, or --json for full API output.\n\nThe minted token is also visible in your Sanity Manage UI under Robots, where it can be revoked.",
|
|
1476
1198
|
"examples": [
|
|
1477
1199
|
"<%= config.bin %> <%= command.id %>",
|
|
1478
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1479
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1480
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1481
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1482
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1483
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1200
|
+
"<%= config.bin %> <%= command.id %> --label \"ci-deploy\"",
|
|
1201
|
+
"<%= config.bin %> <%= command.id %> --print",
|
|
1202
|
+
"export SANITY_AUTH_TOKEN=$(<%= config.bin %> <%= command.id %> --print)",
|
|
1203
|
+
"<%= config.bin %> <%= command.id %> --json",
|
|
1204
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
1205
|
+
"<%= config.bin %> <%= command.id %> --organization-id <orgId>"
|
|
1484
1206
|
],
|
|
1485
1207
|
"flags": {
|
|
1486
1208
|
"json": {
|
|
@@ -1525,6 +1247,7 @@
|
|
|
1525
1247
|
},
|
|
1526
1248
|
"stack": {
|
|
1527
1249
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1250
|
+
"hidden": true,
|
|
1528
1251
|
"name": "stack",
|
|
1529
1252
|
"hasDynamicHelp": false,
|
|
1530
1253
|
"multiple": false,
|
|
@@ -1559,84 +1282,52 @@
|
|
|
1559
1282
|
"multiple": false,
|
|
1560
1283
|
"type": "option"
|
|
1561
1284
|
},
|
|
1562
|
-
"
|
|
1563
|
-
"
|
|
1564
|
-
"
|
|
1565
|
-
"name": "message",
|
|
1566
|
-
"hasDynamicHelp": false,
|
|
1567
|
-
"multiple": false,
|
|
1568
|
-
"type": "option"
|
|
1569
|
-
},
|
|
1570
|
-
"fn-installer": {
|
|
1571
|
-
"aliases": [
|
|
1572
|
-
"function-installer",
|
|
1573
|
-
"installer"
|
|
1574
|
-
],
|
|
1575
|
-
"description": "Which package manager to use when installing Function dependencies",
|
|
1576
|
-
"hidden": true,
|
|
1577
|
-
"name": "fn-installer",
|
|
1285
|
+
"label": {
|
|
1286
|
+
"description": "Human-readable label for the robot. Defaults to a generated value.",
|
|
1287
|
+
"name": "label",
|
|
1578
1288
|
"hasDynamicHelp": false,
|
|
1579
1289
|
"multiple": false,
|
|
1580
|
-
"options": [
|
|
1581
|
-
"npm",
|
|
1582
|
-
"pnpm",
|
|
1583
|
-
"yarn"
|
|
1584
|
-
],
|
|
1585
1290
|
"type": "option"
|
|
1586
1291
|
},
|
|
1587
|
-
"
|
|
1588
|
-
"
|
|
1589
|
-
"
|
|
1590
|
-
"
|
|
1591
|
-
|
|
1592
|
-
},
|
|
1593
|
-
"configure": {
|
|
1594
|
-
"aliases": [
|
|
1595
|
-
"config",
|
|
1596
|
-
"init"
|
|
1292
|
+
"print": {
|
|
1293
|
+
"char": "P",
|
|
1294
|
+
"description": "Print only the raw token to stdout (suitable for shell substitution)",
|
|
1295
|
+
"exclusive": [
|
|
1296
|
+
"json"
|
|
1597
1297
|
],
|
|
1598
|
-
"
|
|
1599
|
-
"hidden": true,
|
|
1600
|
-
"name": "configure",
|
|
1298
|
+
"name": "print",
|
|
1601
1299
|
"allowNo": false,
|
|
1602
1300
|
"type": "boolean"
|
|
1603
|
-
},
|
|
1604
|
-
"new-stack-name": {
|
|
1605
|
-
"description": "Set a new name for the Stack",
|
|
1606
|
-
"name": "new-stack-name",
|
|
1607
|
-
"hasDynamicHelp": false,
|
|
1608
|
-
"multiple": false,
|
|
1609
|
-
"type": "option"
|
|
1610
1301
|
}
|
|
1611
1302
|
},
|
|
1612
1303
|
"hasDynamicHelp": false,
|
|
1613
1304
|
"hiddenAliases": [],
|
|
1614
|
-
"id": "blueprints:deploy",
|
|
1305
|
+
"id": "blueprints:mint-deploy-token",
|
|
1615
1306
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1616
1307
|
"pluginName": "@sanity/runtime-cli",
|
|
1617
1308
|
"pluginType": "core",
|
|
1618
1309
|
"strict": true,
|
|
1619
|
-
"summary": "
|
|
1310
|
+
"summary": "Create a robot API token for deploying Blueprints from CI/CD",
|
|
1620
1311
|
"enableJsonFlag": true,
|
|
1621
1312
|
"needs": [
|
|
1622
|
-
"
|
|
1623
|
-
"blueprint"
|
|
1313
|
+
"scope"
|
|
1624
1314
|
],
|
|
1625
1315
|
"isESM": true,
|
|
1626
1316
|
"relativePath": [
|
|
1627
1317
|
"dist",
|
|
1628
1318
|
"commands",
|
|
1629
1319
|
"blueprints",
|
|
1630
|
-
"deploy.js"
|
|
1320
|
+
"mint-deploy-token.js"
|
|
1631
1321
|
]
|
|
1632
1322
|
},
|
|
1633
|
-
"blueprints:
|
|
1323
|
+
"blueprints:plan": {
|
|
1634
1324
|
"aliases": [],
|
|
1635
1325
|
"args": {},
|
|
1636
|
-
"description": "
|
|
1326
|
+
"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.",
|
|
1637
1327
|
"examples": [
|
|
1638
1328
|
"<%= config.bin %> <%= command.id %>",
|
|
1639
|
-
"<%= config.bin %> <%= command.id %> --stack <name-or-id>
|
|
1329
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
1330
|
+
"<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
|
|
1640
1331
|
],
|
|
1641
1332
|
"flags": {
|
|
1642
1333
|
"json": {
|
|
@@ -1680,11 +1371,7 @@
|
|
|
1680
1371
|
"type": "boolean"
|
|
1681
1372
|
},
|
|
1682
1373
|
"stack": {
|
|
1683
|
-
"
|
|
1684
|
-
"stack-id",
|
|
1685
|
-
"stackId"
|
|
1686
|
-
],
|
|
1687
|
-
"description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
|
|
1374
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1688
1375
|
"name": "stack",
|
|
1689
1376
|
"hasDynamicHelp": false,
|
|
1690
1377
|
"multiple": false,
|
|
@@ -1695,10 +1382,6 @@
|
|
|
1695
1382
|
"project",
|
|
1696
1383
|
"projectId"
|
|
1697
1384
|
],
|
|
1698
|
-
"dependsOn": [
|
|
1699
|
-
"stack",
|
|
1700
|
-
"force"
|
|
1701
|
-
],
|
|
1702
1385
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1703
1386
|
"exclusive": [
|
|
1704
1387
|
"organization-id"
|
|
@@ -1714,10 +1397,6 @@
|
|
|
1714
1397
|
"organizationId",
|
|
1715
1398
|
"org"
|
|
1716
1399
|
],
|
|
1717
|
-
"dependsOn": [
|
|
1718
|
-
"stack",
|
|
1719
|
-
"force"
|
|
1720
|
-
],
|
|
1721
1400
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1722
1401
|
"exclusive": [
|
|
1723
1402
|
"project-id"
|
|
@@ -1726,48 +1405,38 @@
|
|
|
1726
1405
|
"hasDynamicHelp": false,
|
|
1727
1406
|
"multiple": false,
|
|
1728
1407
|
"type": "option"
|
|
1729
|
-
},
|
|
1730
|
-
"force": {
|
|
1731
|
-
"char": "f",
|
|
1732
|
-
"description": "Force Stack destruction (skip confirmation)",
|
|
1733
|
-
"name": "force",
|
|
1734
|
-
"allowNo": false,
|
|
1735
|
-
"type": "boolean"
|
|
1736
|
-
},
|
|
1737
|
-
"no-wait": {
|
|
1738
|
-
"description": "Do not wait for Stack destruction to complete",
|
|
1739
|
-
"name": "no-wait",
|
|
1740
|
-
"allowNo": false,
|
|
1741
|
-
"type": "boolean"
|
|
1742
1408
|
}
|
|
1743
1409
|
},
|
|
1744
1410
|
"hasDynamicHelp": false,
|
|
1745
1411
|
"hiddenAliases": [],
|
|
1746
|
-
"id": "blueprints:
|
|
1412
|
+
"id": "blueprints:plan",
|
|
1747
1413
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1748
1414
|
"pluginName": "@sanity/runtime-cli",
|
|
1749
1415
|
"pluginType": "core",
|
|
1750
1416
|
"strict": true,
|
|
1751
|
-
"summary": "
|
|
1417
|
+
"summary": "Preview changes that will be applied to the remote Stack",
|
|
1752
1418
|
"enableJsonFlag": true,
|
|
1753
1419
|
"needs": [
|
|
1754
|
-
"
|
|
1420
|
+
"token",
|
|
1421
|
+
"blueprint"
|
|
1755
1422
|
],
|
|
1756
1423
|
"isESM": true,
|
|
1757
1424
|
"relativePath": [
|
|
1758
1425
|
"dist",
|
|
1759
1426
|
"commands",
|
|
1760
1427
|
"blueprints",
|
|
1761
|
-
"
|
|
1428
|
+
"plan.js"
|
|
1762
1429
|
]
|
|
1763
1430
|
},
|
|
1764
|
-
"blueprints:
|
|
1431
|
+
"blueprints:promote": {
|
|
1765
1432
|
"aliases": [],
|
|
1766
1433
|
"args": {},
|
|
1767
|
-
"description": "
|
|
1434
|
+
"description": "Promotes a deployed Stack to organization scope, enabling management of org-level resources. Promotion cannot be reversed.\n\nYour local Blueprint configuration will be updated to reflect the new scope.",
|
|
1768
1435
|
"examples": [
|
|
1769
1436
|
"<%= config.bin %> <%= command.id %>",
|
|
1770
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1437
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
1438
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId> --stack <name-or-id>",
|
|
1439
|
+
"<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
|
|
1771
1440
|
],
|
|
1772
1441
|
"flags": {
|
|
1773
1442
|
"json": {
|
|
@@ -1783,6 +1452,7 @@
|
|
|
1783
1452
|
"char": "p",
|
|
1784
1453
|
"description": "Path to a Blueprint file or directory containing one",
|
|
1785
1454
|
"env": "SANITY_BLUEPRINT_PATH",
|
|
1455
|
+
"hidden": true,
|
|
1786
1456
|
"name": "path",
|
|
1787
1457
|
"hasDynamicHelp": false,
|
|
1788
1458
|
"multiple": false,
|
|
@@ -1809,39 +1479,91 @@
|
|
|
1809
1479
|
"allowNo": false,
|
|
1810
1480
|
"type": "boolean"
|
|
1811
1481
|
},
|
|
1812
|
-
"
|
|
1813
|
-
"
|
|
1814
|
-
|
|
1482
|
+
"stack": {
|
|
1483
|
+
"aliases": [
|
|
1484
|
+
"id"
|
|
1485
|
+
],
|
|
1486
|
+
"description": "Stack name or ID to promote",
|
|
1487
|
+
"name": "stack",
|
|
1488
|
+
"hasDynamicHelp": false,
|
|
1489
|
+
"multiple": false,
|
|
1490
|
+
"type": "option"
|
|
1491
|
+
},
|
|
1492
|
+
"project-id": {
|
|
1493
|
+
"aliases": [
|
|
1494
|
+
"project",
|
|
1495
|
+
"projectId"
|
|
1496
|
+
],
|
|
1497
|
+
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1498
|
+
"exclusive": [
|
|
1499
|
+
"organization-id"
|
|
1500
|
+
],
|
|
1501
|
+
"name": "project-id",
|
|
1502
|
+
"hasDynamicHelp": false,
|
|
1503
|
+
"multiple": false,
|
|
1504
|
+
"type": "option"
|
|
1505
|
+
},
|
|
1506
|
+
"organization-id": {
|
|
1507
|
+
"aliases": [
|
|
1508
|
+
"organization",
|
|
1509
|
+
"organizationId",
|
|
1510
|
+
"org"
|
|
1511
|
+
],
|
|
1512
|
+
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1513
|
+
"exclusive": [
|
|
1514
|
+
"project-id"
|
|
1515
|
+
],
|
|
1516
|
+
"hidden": true,
|
|
1517
|
+
"name": "organization-id",
|
|
1518
|
+
"hasDynamicHelp": false,
|
|
1519
|
+
"multiple": false,
|
|
1520
|
+
"type": "option"
|
|
1521
|
+
},
|
|
1522
|
+
"force": {
|
|
1523
|
+
"description": "Skip confirmation prompt",
|
|
1524
|
+
"name": "force",
|
|
1815
1525
|
"allowNo": false,
|
|
1816
1526
|
"type": "boolean"
|
|
1527
|
+
},
|
|
1528
|
+
"new-stack-name": {
|
|
1529
|
+
"description": "Set a new name for the Stack while promoting",
|
|
1530
|
+
"name": "new-stack-name",
|
|
1531
|
+
"hasDynamicHelp": false,
|
|
1532
|
+
"multiple": false,
|
|
1533
|
+
"type": "option"
|
|
1817
1534
|
}
|
|
1818
1535
|
},
|
|
1819
1536
|
"hasDynamicHelp": false,
|
|
1820
1537
|
"hiddenAliases": [],
|
|
1821
|
-
"id": "blueprints:
|
|
1538
|
+
"id": "blueprints:promote",
|
|
1822
1539
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1823
1540
|
"pluginName": "@sanity/runtime-cli",
|
|
1824
1541
|
"pluginType": "core",
|
|
1825
1542
|
"strict": true,
|
|
1826
|
-
"summary": "
|
|
1543
|
+
"summary": "Promote a Stack from project scope to organization scope",
|
|
1827
1544
|
"enableJsonFlag": true,
|
|
1545
|
+
"needs": [
|
|
1546
|
+
"deployedStack",
|
|
1547
|
+
"blueprint"
|
|
1548
|
+
],
|
|
1828
1549
|
"isESM": true,
|
|
1829
1550
|
"relativePath": [
|
|
1830
1551
|
"dist",
|
|
1831
1552
|
"commands",
|
|
1832
1553
|
"blueprints",
|
|
1833
|
-
"
|
|
1554
|
+
"promote.js"
|
|
1834
1555
|
]
|
|
1835
1556
|
},
|
|
1836
|
-
"blueprints:
|
|
1557
|
+
"blueprints:stacks": {
|
|
1837
1558
|
"aliases": [],
|
|
1838
1559
|
"args": {},
|
|
1839
|
-
"description": "
|
|
1560
|
+
"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.\n\nWithout a scope, prompts for an organization or project. Use --all to list Stacks across every organization and project you can access, or --include-projects with --organization-id for one organization and its projects.",
|
|
1840
1561
|
"examples": [
|
|
1841
1562
|
"<%= config.bin %> <%= command.id %>",
|
|
1842
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1843
|
-
"<%= config.bin %> <%= command.id %> --project-id <
|
|
1844
|
-
"<%= config.bin %> <%= command.id %> --organization-id <
|
|
1563
|
+
"<%= config.bin %> <%= command.id %> --all",
|
|
1564
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
1565
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
1566
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId> --include-projects"
|
|
1845
1567
|
],
|
|
1846
1568
|
"flags": {
|
|
1847
1569
|
"json": {
|
|
@@ -1878,17 +1600,15 @@
|
|
|
1878
1600
|
"type": "boolean"
|
|
1879
1601
|
},
|
|
1880
1602
|
"verbose": {
|
|
1881
|
-
"
|
|
1882
|
-
"
|
|
1603
|
+
"description": "Verbose output",
|
|
1604
|
+
"hidden": true,
|
|
1883
1605
|
"name": "verbose",
|
|
1884
1606
|
"allowNo": false,
|
|
1885
1607
|
"type": "boolean"
|
|
1886
1608
|
},
|
|
1887
1609
|
"stack": {
|
|
1888
|
-
"
|
|
1889
|
-
|
|
1890
|
-
],
|
|
1891
|
-
"description": "Stack name or ID",
|
|
1610
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1611
|
+
"hidden": true,
|
|
1892
1612
|
"name": "stack",
|
|
1893
1613
|
"hasDynamicHelp": false,
|
|
1894
1614
|
"multiple": false,
|
|
@@ -1901,7 +1621,9 @@
|
|
|
1901
1621
|
],
|
|
1902
1622
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1903
1623
|
"exclusive": [
|
|
1904
|
-
"organization-id"
|
|
1624
|
+
"organization-id",
|
|
1625
|
+
"include-projects",
|
|
1626
|
+
"all"
|
|
1905
1627
|
],
|
|
1906
1628
|
"name": "project-id",
|
|
1907
1629
|
"hasDynamicHelp": false,
|
|
@@ -1916,54 +1638,65 @@
|
|
|
1916
1638
|
],
|
|
1917
1639
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1918
1640
|
"exclusive": [
|
|
1919
|
-
"project-id"
|
|
1641
|
+
"project-id",
|
|
1642
|
+
"all"
|
|
1920
1643
|
],
|
|
1921
1644
|
"name": "organization-id",
|
|
1922
1645
|
"hasDynamicHelp": false,
|
|
1923
1646
|
"multiple": false,
|
|
1924
1647
|
"type": "option"
|
|
1648
|
+
},
|
|
1649
|
+
"include-projects": {
|
|
1650
|
+
"dependsOn": [
|
|
1651
|
+
"organization-id"
|
|
1652
|
+
],
|
|
1653
|
+
"description": "Include Stacks from all projects within the organization. Requires --organization-id.",
|
|
1654
|
+
"name": "include-projects",
|
|
1655
|
+
"allowNo": false,
|
|
1656
|
+
"type": "boolean"
|
|
1657
|
+
},
|
|
1658
|
+
"all": {
|
|
1659
|
+
"description": "List Stacks from every organization and project you have access to",
|
|
1660
|
+
"exclusive": [
|
|
1661
|
+
"project-id",
|
|
1662
|
+
"organization-id",
|
|
1663
|
+
"include-projects"
|
|
1664
|
+
],
|
|
1665
|
+
"name": "all",
|
|
1666
|
+
"allowNo": false,
|
|
1667
|
+
"type": "boolean"
|
|
1925
1668
|
}
|
|
1926
1669
|
},
|
|
1927
1670
|
"hasDynamicHelp": false,
|
|
1928
1671
|
"hiddenAliases": [],
|
|
1929
|
-
"id": "blueprints:
|
|
1672
|
+
"id": "blueprints:stacks",
|
|
1930
1673
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1931
1674
|
"pluginName": "@sanity/runtime-cli",
|
|
1932
1675
|
"pluginType": "core",
|
|
1933
1676
|
"strict": true,
|
|
1934
|
-
"summary": "
|
|
1677
|
+
"summary": "List remote Stack deployments for your project or organization",
|
|
1935
1678
|
"enableJsonFlag": true,
|
|
1936
1679
|
"needs": [
|
|
1937
|
-
"
|
|
1680
|
+
"token"
|
|
1938
1681
|
],
|
|
1939
1682
|
"isESM": true,
|
|
1940
1683
|
"relativePath": [
|
|
1941
1684
|
"dist",
|
|
1942
1685
|
"commands",
|
|
1943
1686
|
"blueprints",
|
|
1944
|
-
"
|
|
1687
|
+
"stacks.js"
|
|
1945
1688
|
]
|
|
1946
1689
|
},
|
|
1947
|
-
"
|
|
1690
|
+
"functions:add": {
|
|
1948
1691
|
"aliases": [],
|
|
1949
|
-
"args": {
|
|
1950
|
-
|
|
1951
|
-
"description": "Directory to create the local Blueprint in (defaults to the current directory)",
|
|
1952
|
-
"name": "dir"
|
|
1953
|
-
}
|
|
1954
|
-
},
|
|
1955
|
-
"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\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. A .gitignore covering node_modules, .env, and Function build output is created or updated; the .sanity/ config itself is not ignored.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.\n\nRunning without a directory prompts to confirm the current directory. Run 'blueprints init .' to initialize in the current directory without a prompt.",
|
|
1692
|
+
"args": {},
|
|
1693
|
+
"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, live content or media-library events (create, update, delete, publish).\n\nAfter adding, use 'functions dev' to test locally, then 'blueprints deploy' to publish.",
|
|
1956
1694
|
"examples": [
|
|
1957
1695
|
"<%= config.bin %> <%= command.id %>",
|
|
1958
|
-
"<%= config.bin %> <%= command.id %>
|
|
1959
|
-
"<%= config.bin %> <%= command.id %>
|
|
1960
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1961
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1962
|
-
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
1963
|
-
"<%= config.bin %> <%= command.id %> --stack-name <newStackName>",
|
|
1964
|
-
"<%= config.bin %> <%= command.id %> --stack-id <existingStackId>",
|
|
1965
|
-
"<%= config.bin %> <%= command.id %> new-stack --type <json|js|ts> --org <organizationId> --name <newStackName>",
|
|
1966
|
-
"<%= config.bin %> <%= command.id %> old-stack --type <json|js|ts> --project-id <projectId> --stack-id <existingStackId>"
|
|
1696
|
+
"<%= config.bin %> <%= command.id %> --helpers",
|
|
1697
|
+
"<%= config.bin %> <%= command.id %> --name my-function",
|
|
1698
|
+
"<%= config.bin %> <%= command.id %> --name my-function --type document-create",
|
|
1699
|
+
"<%= config.bin %> <%= command.id %> --name my-function --type document-create --type document-update --lang js"
|
|
1967
1700
|
],
|
|
1968
1701
|
"flags": {
|
|
1969
1702
|
"json": {
|
|
@@ -2006,41 +1739,12 @@
|
|
|
2006
1739
|
"allowNo": false,
|
|
2007
1740
|
"type": "boolean"
|
|
2008
1741
|
},
|
|
2009
|
-
"
|
|
2010
|
-
"description": "
|
|
2011
|
-
"
|
|
2012
|
-
"
|
|
2013
|
-
"multiple": false,
|
|
2014
|
-
"type": "option"
|
|
2015
|
-
},
|
|
2016
|
-
"example": {
|
|
2017
|
-
"aliases": [
|
|
2018
|
-
"recipe"
|
|
2019
|
-
],
|
|
2020
|
-
"description": "Example to use for the local Blueprint",
|
|
2021
|
-
"exclusive": [
|
|
2022
|
-
"blueprint-type",
|
|
2023
|
-
"stack-id",
|
|
2024
|
-
"stack-name"
|
|
2025
|
-
],
|
|
2026
|
-
"name": "example",
|
|
2027
|
-
"hasDynamicHelp": false,
|
|
2028
|
-
"multiple": false,
|
|
2029
|
-
"type": "option"
|
|
2030
|
-
},
|
|
2031
|
-
"blueprint-type": {
|
|
2032
|
-
"aliases": [
|
|
2033
|
-
"type"
|
|
2034
|
-
],
|
|
2035
|
-
"description": "Blueprint manifest type to use for the local Blueprint",
|
|
2036
|
-
"name": "blueprint-type",
|
|
1742
|
+
"stack": {
|
|
1743
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1744
|
+
"hidden": true,
|
|
1745
|
+
"name": "stack",
|
|
2037
1746
|
"hasDynamicHelp": false,
|
|
2038
1747
|
"multiple": false,
|
|
2039
|
-
"options": [
|
|
2040
|
-
"json",
|
|
2041
|
-
"js",
|
|
2042
|
-
"ts"
|
|
2043
|
-
],
|
|
2044
1748
|
"type": "option"
|
|
2045
1749
|
},
|
|
2046
1750
|
"project-id": {
|
|
@@ -2052,6 +1756,7 @@
|
|
|
2052
1756
|
"exclusive": [
|
|
2053
1757
|
"organization-id"
|
|
2054
1758
|
],
|
|
1759
|
+
"hidden": true,
|
|
2055
1760
|
"name": "project-id",
|
|
2056
1761
|
"hasDynamicHelp": false,
|
|
2057
1762
|
"multiple": false,
|
|
@@ -2067,85 +1772,148 @@
|
|
|
2067
1772
|
"exclusive": [
|
|
2068
1773
|
"project-id"
|
|
2069
1774
|
],
|
|
1775
|
+
"hidden": true,
|
|
2070
1776
|
"name": "organization-id",
|
|
2071
1777
|
"hasDynamicHelp": false,
|
|
2072
1778
|
"multiple": false,
|
|
2073
1779
|
"type": "option"
|
|
2074
1780
|
},
|
|
2075
|
-
"
|
|
1781
|
+
"example": {
|
|
2076
1782
|
"aliases": [
|
|
2077
|
-
"
|
|
1783
|
+
"recipe"
|
|
2078
1784
|
],
|
|
2079
|
-
"description": "
|
|
1785
|
+
"description": "Example to use for the Function",
|
|
2080
1786
|
"exclusive": [
|
|
2081
|
-
"
|
|
1787
|
+
"name",
|
|
1788
|
+
"type",
|
|
1789
|
+
"language",
|
|
1790
|
+
"javascript",
|
|
1791
|
+
"helpers",
|
|
1792
|
+
"installer",
|
|
1793
|
+
"install"
|
|
2082
1794
|
],
|
|
2083
|
-
"name": "
|
|
2084
|
-
"
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
1795
|
+
"name": "example",
|
|
1796
|
+
"hasDynamicHelp": false,
|
|
1797
|
+
"multiple": false,
|
|
1798
|
+
"type": "option"
|
|
1799
|
+
},
|
|
1800
|
+
"name": {
|
|
1801
|
+
"char": "n",
|
|
1802
|
+
"description": "Name of the Function to add",
|
|
1803
|
+
"name": "name",
|
|
1804
|
+
"hasDynamicHelp": false,
|
|
1805
|
+
"multiple": false,
|
|
1806
|
+
"type": "option"
|
|
1807
|
+
},
|
|
1808
|
+
"type": {
|
|
1809
|
+
"dependsOn": [
|
|
1810
|
+
"name"
|
|
1811
|
+
],
|
|
1812
|
+
"description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
|
|
1813
|
+
"name": "type",
|
|
1814
|
+
"hasDynamicHelp": false,
|
|
1815
|
+
"multiple": true,
|
|
1816
|
+
"options": [
|
|
1817
|
+
"document-publish",
|
|
1818
|
+
"document-create",
|
|
1819
|
+
"document-delete",
|
|
1820
|
+
"document-update",
|
|
1821
|
+
"media-library-asset-create",
|
|
1822
|
+
"media-library-asset-delete",
|
|
1823
|
+
"media-library-asset-update",
|
|
1824
|
+
"pub-sub",
|
|
1825
|
+
"scheduled-function",
|
|
1826
|
+
"sync-tag-invalidate",
|
|
1827
|
+
"durable-function"
|
|
2092
1828
|
],
|
|
1829
|
+
"type": "option"
|
|
1830
|
+
},
|
|
1831
|
+
"language": {
|
|
1832
|
+
"aliases": [
|
|
1833
|
+
"lang"
|
|
1834
|
+
],
|
|
1835
|
+
"description": "Language of the new Function",
|
|
1836
|
+
"name": "language",
|
|
1837
|
+
"default": "ts",
|
|
2093
1838
|
"hasDynamicHelp": false,
|
|
2094
1839
|
"multiple": false,
|
|
1840
|
+
"options": [
|
|
1841
|
+
"ts",
|
|
1842
|
+
"js"
|
|
1843
|
+
],
|
|
2095
1844
|
"type": "option"
|
|
2096
1845
|
},
|
|
2097
|
-
"
|
|
1846
|
+
"javascript": {
|
|
2098
1847
|
"aliases": [
|
|
2099
|
-
"
|
|
1848
|
+
"js"
|
|
2100
1849
|
],
|
|
2101
|
-
"description": "
|
|
1850
|
+
"description": "Use JavaScript instead of TypeScript",
|
|
2102
1851
|
"exclusive": [
|
|
2103
|
-
"
|
|
2104
|
-
],
|
|
2105
|
-
"name": "stack-name",
|
|
2106
|
-
"relationships": [
|
|
2107
|
-
{
|
|
2108
|
-
"type": "some",
|
|
2109
|
-
"flags": [
|
|
2110
|
-
"project-id",
|
|
2111
|
-
"organization-id"
|
|
2112
|
-
]
|
|
2113
|
-
}
|
|
1852
|
+
"language"
|
|
2114
1853
|
],
|
|
1854
|
+
"name": "javascript",
|
|
1855
|
+
"allowNo": false,
|
|
1856
|
+
"type": "boolean"
|
|
1857
|
+
},
|
|
1858
|
+
"helpers": {
|
|
1859
|
+
"description": "Add helpers to the new Function",
|
|
1860
|
+
"name": "helpers",
|
|
1861
|
+
"allowNo": true,
|
|
1862
|
+
"type": "boolean"
|
|
1863
|
+
},
|
|
1864
|
+
"installer": {
|
|
1865
|
+
"description": "How to install the @sanity/functions helpers",
|
|
1866
|
+
"name": "installer",
|
|
2115
1867
|
"hasDynamicHelp": false,
|
|
2116
1868
|
"multiple": false,
|
|
1869
|
+
"options": [
|
|
1870
|
+
"skip",
|
|
1871
|
+
"npm",
|
|
1872
|
+
"pnpm",
|
|
1873
|
+
"yarn"
|
|
1874
|
+
],
|
|
2117
1875
|
"type": "option"
|
|
1876
|
+
},
|
|
1877
|
+
"install": {
|
|
1878
|
+
"char": "i",
|
|
1879
|
+
"description": "Shortcut for --installer npm",
|
|
1880
|
+
"exclusive": [
|
|
1881
|
+
"installer"
|
|
1882
|
+
],
|
|
1883
|
+
"name": "install",
|
|
1884
|
+
"allowNo": false,
|
|
1885
|
+
"type": "boolean"
|
|
2118
1886
|
}
|
|
2119
1887
|
},
|
|
2120
1888
|
"hasDynamicHelp": false,
|
|
2121
1889
|
"hiddenAliases": [],
|
|
2122
|
-
"id": "
|
|
1890
|
+
"id": "functions:add",
|
|
2123
1891
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2124
1892
|
"pluginName": "@sanity/runtime-cli",
|
|
2125
1893
|
"pluginType": "core",
|
|
2126
1894
|
"strict": true,
|
|
2127
|
-
"summary": "
|
|
1895
|
+
"summary": "Add a Function to your Blueprint",
|
|
2128
1896
|
"enableJsonFlag": true,
|
|
1897
|
+
"needs": [
|
|
1898
|
+
"blueprint"
|
|
1899
|
+
],
|
|
2129
1900
|
"isESM": true,
|
|
2130
1901
|
"relativePath": [
|
|
2131
1902
|
"dist",
|
|
2132
1903
|
"commands",
|
|
2133
|
-
"
|
|
2134
|
-
"
|
|
1904
|
+
"functions",
|
|
1905
|
+
"add.js"
|
|
2135
1906
|
]
|
|
2136
1907
|
},
|
|
2137
|
-
"
|
|
1908
|
+
"functions:build": {
|
|
2138
1909
|
"aliases": [],
|
|
2139
|
-
"args": {
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
"<%= config.bin %> <%= command.id %> --since 2026-05-01T00:00:00Z",
|
|
2147
|
-
"<%= config.bin %> <%= command.id %> --before 2026-05-01T00:00:00Z"
|
|
2148
|
-
],
|
|
1910
|
+
"args": {
|
|
1911
|
+
"name": {
|
|
1912
|
+
"description": "The name of the Sanity Function",
|
|
1913
|
+
"name": "name",
|
|
1914
|
+
"required": false
|
|
1915
|
+
}
|
|
1916
|
+
},
|
|
2149
1917
|
"flags": {
|
|
2150
1918
|
"json": {
|
|
2151
1919
|
"description": "Format output as json",
|
|
@@ -2189,6 +1957,7 @@
|
|
|
2189
1957
|
},
|
|
2190
1958
|
"stack": {
|
|
2191
1959
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1960
|
+
"hidden": true,
|
|
2192
1961
|
"name": "stack",
|
|
2193
1962
|
"hasDynamicHelp": false,
|
|
2194
1963
|
"multiple": false,
|
|
@@ -2203,6 +1972,7 @@
|
|
|
2203
1972
|
"exclusive": [
|
|
2204
1973
|
"organization-id"
|
|
2205
1974
|
],
|
|
1975
|
+
"hidden": true,
|
|
2206
1976
|
"name": "project-id",
|
|
2207
1977
|
"hasDynamicHelp": false,
|
|
2208
1978
|
"multiple": false,
|
|
@@ -2218,88 +1988,66 @@
|
|
|
2218
1988
|
"exclusive": [
|
|
2219
1989
|
"project-id"
|
|
2220
1990
|
],
|
|
1991
|
+
"hidden": true,
|
|
2221
1992
|
"name": "organization-id",
|
|
2222
1993
|
"hasDynamicHelp": false,
|
|
2223
1994
|
"multiple": false,
|
|
2224
1995
|
"type": "option"
|
|
2225
1996
|
},
|
|
2226
|
-
"
|
|
1997
|
+
"fn-installer": {
|
|
2227
1998
|
"aliases": [
|
|
2228
|
-
"
|
|
2229
|
-
|
|
2230
|
-
"char": "w",
|
|
2231
|
-
"description": "Watch for new Stack logs",
|
|
2232
|
-
"exclusive": [
|
|
2233
|
-
"json"
|
|
2234
|
-
],
|
|
2235
|
-
"name": "watch",
|
|
2236
|
-
"allowNo": false,
|
|
2237
|
-
"type": "boolean"
|
|
2238
|
-
},
|
|
2239
|
-
"limit": {
|
|
2240
|
-
"char": "l",
|
|
2241
|
-
"description": "Maximum number of log entries to retrieve (1-500)",
|
|
2242
|
-
"exclusive": [
|
|
2243
|
-
"watch"
|
|
1999
|
+
"function-installer",
|
|
2000
|
+
"installer"
|
|
2244
2001
|
],
|
|
2245
|
-
"
|
|
2002
|
+
"description": "Which package manager to use when building Functions",
|
|
2003
|
+
"hidden": true,
|
|
2004
|
+
"name": "fn-installer",
|
|
2246
2005
|
"hasDynamicHelp": false,
|
|
2247
2006
|
"multiple": false,
|
|
2248
|
-
"
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
"exclusive": [
|
|
2253
|
-
"watch"
|
|
2007
|
+
"options": [
|
|
2008
|
+
"npm",
|
|
2009
|
+
"pnpm",
|
|
2010
|
+
"yarn"
|
|
2254
2011
|
],
|
|
2255
|
-
"name": "since",
|
|
2256
|
-
"hasDynamicHelp": false,
|
|
2257
|
-
"multiple": false,
|
|
2258
2012
|
"type": "option"
|
|
2259
2013
|
},
|
|
2260
|
-
"
|
|
2261
|
-
"
|
|
2262
|
-
"
|
|
2263
|
-
|
|
2264
|
-
],
|
|
2265
|
-
"name": "before",
|
|
2014
|
+
"out-dir": {
|
|
2015
|
+
"char": "o",
|
|
2016
|
+
"description": "Output directory for zip files",
|
|
2017
|
+
"name": "out-dir",
|
|
2266
2018
|
"hasDynamicHelp": false,
|
|
2267
2019
|
"multiple": false,
|
|
2268
2020
|
"type": "option"
|
|
2269
2021
|
}
|
|
2270
2022
|
},
|
|
2271
2023
|
"hasDynamicHelp": false,
|
|
2024
|
+
"hidden": true,
|
|
2272
2025
|
"hiddenAliases": [],
|
|
2273
|
-
"id": "
|
|
2026
|
+
"id": "functions:build",
|
|
2274
2027
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2275
2028
|
"pluginName": "@sanity/runtime-cli",
|
|
2276
2029
|
"pluginType": "core",
|
|
2277
2030
|
"strict": true,
|
|
2278
|
-
"summary": "
|
|
2031
|
+
"summary": "Build Sanity Function(s) to zip archives",
|
|
2279
2032
|
"enableJsonFlag": true,
|
|
2280
2033
|
"needs": [
|
|
2281
|
-
"
|
|
2034
|
+
"blueprint"
|
|
2282
2035
|
],
|
|
2283
2036
|
"isESM": true,
|
|
2284
2037
|
"relativePath": [
|
|
2285
2038
|
"dist",
|
|
2286
2039
|
"commands",
|
|
2287
|
-
"
|
|
2288
|
-
"
|
|
2040
|
+
"functions",
|
|
2041
|
+
"build.js"
|
|
2289
2042
|
]
|
|
2290
2043
|
},
|
|
2291
|
-
"
|
|
2044
|
+
"functions:dev": {
|
|
2292
2045
|
"aliases": [],
|
|
2293
2046
|
"args": {},
|
|
2294
|
-
"description": "
|
|
2047
|
+
"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. The live-reload WebSocket server shares this host and port. Function timeout can be configured with the --timeout flag.\n\nTo invoke a function with the CLI, use 'functions test'.",
|
|
2295
2048
|
"examples": [
|
|
2296
|
-
"<%= config.bin %> <%= command.id %>",
|
|
2297
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2298
|
-
"<%= config.bin %> <%= command.id %> --print",
|
|
2299
|
-
"export SANITY_AUTH_TOKEN=$(<%= config.bin %> <%= command.id %> --print)",
|
|
2300
|
-
"<%= config.bin %> <%= command.id %> --json",
|
|
2301
|
-
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
2302
|
-
"<%= config.bin %> <%= command.id %> --organization-id <orgId>"
|
|
2049
|
+
"<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 3333",
|
|
2050
|
+
"<%= config.bin %> <%= command.id %> --timeout 60"
|
|
2303
2051
|
],
|
|
2304
2052
|
"flags": {
|
|
2305
2053
|
"json": {
|
|
@@ -2359,6 +2107,7 @@
|
|
|
2359
2107
|
"exclusive": [
|
|
2360
2108
|
"organization-id"
|
|
2361
2109
|
],
|
|
2110
|
+
"hidden": true,
|
|
2362
2111
|
"name": "project-id",
|
|
2363
2112
|
"hasDynamicHelp": false,
|
|
2364
2113
|
"multiple": false,
|
|
@@ -2374,57 +2123,70 @@
|
|
|
2374
2123
|
"exclusive": [
|
|
2375
2124
|
"project-id"
|
|
2376
2125
|
],
|
|
2126
|
+
"hidden": true,
|
|
2377
2127
|
"name": "organization-id",
|
|
2378
2128
|
"hasDynamicHelp": false,
|
|
2379
2129
|
"multiple": false,
|
|
2380
2130
|
"type": "option"
|
|
2381
2131
|
},
|
|
2382
|
-
"
|
|
2383
|
-
"
|
|
2384
|
-
"
|
|
2132
|
+
"host": {
|
|
2133
|
+
"char": "h",
|
|
2134
|
+
"description": "The local network interface at which to listen. [default: \"localhost\"]",
|
|
2135
|
+
"name": "host",
|
|
2136
|
+
"required": false,
|
|
2385
2137
|
"hasDynamicHelp": false,
|
|
2386
2138
|
"multiple": false,
|
|
2387
2139
|
"type": "option"
|
|
2388
2140
|
},
|
|
2389
|
-
"
|
|
2390
|
-
"char": "
|
|
2391
|
-
"description": "
|
|
2392
|
-
"
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
"
|
|
2396
|
-
"
|
|
2397
|
-
|
|
2141
|
+
"port": {
|
|
2142
|
+
"char": "p",
|
|
2143
|
+
"description": "TCP port to start emulator on. [default: 8080]",
|
|
2144
|
+
"name": "port",
|
|
2145
|
+
"required": false,
|
|
2146
|
+
"hasDynamicHelp": false,
|
|
2147
|
+
"multiple": false,
|
|
2148
|
+
"type": "option"
|
|
2149
|
+
},
|
|
2150
|
+
"timeout": {
|
|
2151
|
+
"char": "t",
|
|
2152
|
+
"description": "Maximum execution time for all functions, in seconds. Takes precedence over function-specific `timeout`",
|
|
2153
|
+
"name": "timeout",
|
|
2154
|
+
"required": false,
|
|
2155
|
+
"hasDynamicHelp": false,
|
|
2156
|
+
"multiple": false,
|
|
2157
|
+
"type": "option"
|
|
2398
2158
|
}
|
|
2399
2159
|
},
|
|
2400
2160
|
"hasDynamicHelp": false,
|
|
2401
2161
|
"hiddenAliases": [],
|
|
2402
|
-
"id": "
|
|
2162
|
+
"id": "functions:dev",
|
|
2403
2163
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2404
2164
|
"pluginName": "@sanity/runtime-cli",
|
|
2405
2165
|
"pluginType": "core",
|
|
2406
2166
|
"strict": true,
|
|
2407
|
-
"summary": "
|
|
2167
|
+
"summary": "Start the Sanity Function emulator",
|
|
2408
2168
|
"enableJsonFlag": true,
|
|
2409
2169
|
"needs": [
|
|
2410
|
-
"
|
|
2170
|
+
"blueprint"
|
|
2411
2171
|
],
|
|
2412
2172
|
"isESM": true,
|
|
2413
2173
|
"relativePath": [
|
|
2414
2174
|
"dist",
|
|
2415
2175
|
"commands",
|
|
2416
|
-
"
|
|
2417
|
-
"
|
|
2176
|
+
"functions",
|
|
2177
|
+
"dev.js"
|
|
2418
2178
|
]
|
|
2419
2179
|
},
|
|
2420
|
-
"
|
|
2180
|
+
"functions:list": {
|
|
2421
2181
|
"aliases": [],
|
|
2422
2182
|
"args": {},
|
|
2423
|
-
"description": "
|
|
2183
|
+
"description": "Lists functions deployed directly in the selected project or organization scope. The local Blueprint config supplies the scope by default.\n\nUse --project-id or --organization-id to select a scope without a local Blueprint. Organization results include organization-scoped functions only.",
|
|
2424
2184
|
"examples": [
|
|
2425
2185
|
"<%= config.bin %> <%= command.id %>",
|
|
2426
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2427
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2186
|
+
"<%= config.bin %> <%= command.id %> --verbose",
|
|
2187
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
2188
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
2189
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId> --json"
|
|
2428
2190
|
],
|
|
2429
2191
|
"flags": {
|
|
2430
2192
|
"json": {
|
|
@@ -2461,14 +2223,15 @@
|
|
|
2461
2223
|
"type": "boolean"
|
|
2462
2224
|
},
|
|
2463
2225
|
"verbose": {
|
|
2464
|
-
"
|
|
2465
|
-
"
|
|
2226
|
+
"char": "v",
|
|
2227
|
+
"description": "Show function configuration details",
|
|
2466
2228
|
"name": "verbose",
|
|
2467
2229
|
"allowNo": false,
|
|
2468
2230
|
"type": "boolean"
|
|
2469
2231
|
},
|
|
2470
2232
|
"stack": {
|
|
2471
2233
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
2234
|
+
"hidden": true,
|
|
2472
2235
|
"name": "stack",
|
|
2473
2236
|
"hasDynamicHelp": false,
|
|
2474
2237
|
"multiple": false,
|
|
@@ -2505,35 +2268,41 @@
|
|
|
2505
2268
|
}
|
|
2506
2269
|
},
|
|
2507
2270
|
"hasDynamicHelp": false,
|
|
2271
|
+
"hidden": true,
|
|
2508
2272
|
"hiddenAliases": [],
|
|
2509
|
-
"id": "
|
|
2273
|
+
"id": "functions:list",
|
|
2510
2274
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2511
2275
|
"pluginName": "@sanity/runtime-cli",
|
|
2512
2276
|
"pluginType": "core",
|
|
2513
2277
|
"strict": true,
|
|
2514
|
-
"summary": "
|
|
2278
|
+
"summary": "List deployed Sanity Functions",
|
|
2515
2279
|
"enableJsonFlag": true,
|
|
2516
2280
|
"needs": [
|
|
2517
|
-
"
|
|
2518
|
-
"blueprint"
|
|
2281
|
+
"scope"
|
|
2519
2282
|
],
|
|
2520
2283
|
"isESM": true,
|
|
2521
2284
|
"relativePath": [
|
|
2522
2285
|
"dist",
|
|
2523
2286
|
"commands",
|
|
2524
|
-
"
|
|
2525
|
-
"
|
|
2287
|
+
"functions",
|
|
2288
|
+
"list.js"
|
|
2526
2289
|
]
|
|
2527
2290
|
},
|
|
2528
|
-
"
|
|
2291
|
+
"functions:logs": {
|
|
2529
2292
|
"aliases": [],
|
|
2530
|
-
"args": {
|
|
2531
|
-
|
|
2293
|
+
"args": {
|
|
2294
|
+
"name": {
|
|
2295
|
+
"description": "The name of the Sanity Function",
|
|
2296
|
+
"name": "name",
|
|
2297
|
+
"required": false
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2300
|
+
"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).",
|
|
2532
2301
|
"examples": [
|
|
2533
|
-
"<%= config.bin %> <%= command.id %>",
|
|
2534
|
-
"<%= config.bin %> <%= command.id %>
|
|
2535
|
-
"<%= config.bin %> <%= command.id %>
|
|
2536
|
-
"<%= config.bin %> <%= command.id %>
|
|
2302
|
+
"<%= config.bin %> <%= command.id %> <name>",
|
|
2303
|
+
"<%= config.bin %> <%= command.id %> <name> --json",
|
|
2304
|
+
"<%= config.bin %> <%= command.id %> <name> --limit 100",
|
|
2305
|
+
"<%= config.bin %> <%= command.id %> <name> --delete"
|
|
2537
2306
|
],
|
|
2538
2307
|
"flags": {
|
|
2539
2308
|
"json": {
|
|
@@ -2577,10 +2346,7 @@
|
|
|
2577
2346
|
"type": "boolean"
|
|
2578
2347
|
},
|
|
2579
2348
|
"stack": {
|
|
2580
|
-
"
|
|
2581
|
-
"id"
|
|
2582
|
-
],
|
|
2583
|
-
"description": "Stack name or ID to promote",
|
|
2349
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
2584
2350
|
"name": "stack",
|
|
2585
2351
|
"hasDynamicHelp": false,
|
|
2586
2352
|
"multiple": false,
|
|
@@ -2595,6 +2361,7 @@
|
|
|
2595
2361
|
"exclusive": [
|
|
2596
2362
|
"organization-id"
|
|
2597
2363
|
],
|
|
2364
|
+
"hidden": true,
|
|
2598
2365
|
"name": "project-id",
|
|
2599
2366
|
"hasDynamicHelp": false,
|
|
2600
2367
|
"multiple": false,
|
|
@@ -2616,28 +2383,69 @@
|
|
|
2616
2383
|
"multiple": false,
|
|
2617
2384
|
"type": "option"
|
|
2618
2385
|
},
|
|
2386
|
+
"limit": {
|
|
2387
|
+
"char": "l",
|
|
2388
|
+
"description": "Total number of log entries to retrieve",
|
|
2389
|
+
"name": "limit",
|
|
2390
|
+
"required": false,
|
|
2391
|
+
"default": 50,
|
|
2392
|
+
"hasDynamicHelp": false,
|
|
2393
|
+
"multiple": false,
|
|
2394
|
+
"type": "option"
|
|
2395
|
+
},
|
|
2396
|
+
"utc": {
|
|
2397
|
+
"char": "u",
|
|
2398
|
+
"description": "Show dates in UTC time zone",
|
|
2399
|
+
"name": "utc",
|
|
2400
|
+
"required": false,
|
|
2401
|
+
"allowNo": false,
|
|
2402
|
+
"type": "boolean"
|
|
2403
|
+
},
|
|
2404
|
+
"delete": {
|
|
2405
|
+
"char": "d",
|
|
2406
|
+
"description": "Delete all logs for the function",
|
|
2407
|
+
"exclusive": [
|
|
2408
|
+
"limit",
|
|
2409
|
+
"json"
|
|
2410
|
+
],
|
|
2411
|
+
"name": "delete",
|
|
2412
|
+
"required": false,
|
|
2413
|
+
"allowNo": false,
|
|
2414
|
+
"type": "boolean"
|
|
2415
|
+
},
|
|
2619
2416
|
"force": {
|
|
2620
|
-
"
|
|
2417
|
+
"char": "f",
|
|
2418
|
+
"dependsOn": [
|
|
2419
|
+
"delete"
|
|
2420
|
+
],
|
|
2421
|
+
"description": "Skip confirmation for deleting logs",
|
|
2621
2422
|
"name": "force",
|
|
2423
|
+
"required": false,
|
|
2622
2424
|
"allowNo": false,
|
|
2623
2425
|
"type": "boolean"
|
|
2624
2426
|
},
|
|
2625
|
-
"
|
|
2626
|
-
"
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
"
|
|
2630
|
-
"
|
|
2427
|
+
"watch": {
|
|
2428
|
+
"aliases": [
|
|
2429
|
+
"follow"
|
|
2430
|
+
],
|
|
2431
|
+
"char": "w",
|
|
2432
|
+
"description": "Watch for new logs (streaming mode)",
|
|
2433
|
+
"exclusive": [
|
|
2434
|
+
"json"
|
|
2435
|
+
],
|
|
2436
|
+
"name": "watch",
|
|
2437
|
+
"allowNo": false,
|
|
2438
|
+
"type": "boolean"
|
|
2631
2439
|
}
|
|
2632
2440
|
},
|
|
2633
2441
|
"hasDynamicHelp": false,
|
|
2634
2442
|
"hiddenAliases": [],
|
|
2635
|
-
"id": "
|
|
2443
|
+
"id": "functions:logs",
|
|
2636
2444
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2637
2445
|
"pluginName": "@sanity/runtime-cli",
|
|
2638
2446
|
"pluginType": "core",
|
|
2639
2447
|
"strict": true,
|
|
2640
|
-
"summary": "
|
|
2448
|
+
"summary": "Retrieve or delete logs for a Sanity Function",
|
|
2641
2449
|
"enableJsonFlag": true,
|
|
2642
2450
|
"needs": [
|
|
2643
2451
|
"deployedStack",
|
|
@@ -2647,20 +2455,25 @@
|
|
|
2647
2455
|
"relativePath": [
|
|
2648
2456
|
"dist",
|
|
2649
2457
|
"commands",
|
|
2650
|
-
"
|
|
2651
|
-
"
|
|
2458
|
+
"functions",
|
|
2459
|
+
"logs.js"
|
|
2652
2460
|
]
|
|
2653
2461
|
},
|
|
2654
|
-
"
|
|
2462
|
+
"functions:test": {
|
|
2655
2463
|
"aliases": [],
|
|
2656
|
-
"args": {
|
|
2657
|
-
|
|
2464
|
+
"args": {
|
|
2465
|
+
"name": {
|
|
2466
|
+
"description": "The name of the Sanity Function",
|
|
2467
|
+
"name": "name",
|
|
2468
|
+
"required": false
|
|
2469
|
+
}
|
|
2470
|
+
},
|
|
2471
|
+
"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.",
|
|
2658
2472
|
"examples": [
|
|
2659
|
-
"<%= config.bin %> <%= command.id %>",
|
|
2660
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2661
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2662
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2663
|
-
"<%= config.bin %> <%= command.id %> --organization-id <organizationId> --include-projects"
|
|
2473
|
+
"<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }'",
|
|
2474
|
+
"<%= config.bin %> <%= command.id %> <name> --file 'payload.json'",
|
|
2475
|
+
"<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }' --timeout 60",
|
|
2476
|
+
"<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ \"title\": \"before\" }' --data-after '{ \"title\": \"after\" }'"
|
|
2664
2477
|
],
|
|
2665
2478
|
"flags": {
|
|
2666
2479
|
"json": {
|
|
@@ -2718,9 +2531,7 @@
|
|
|
2718
2531
|
],
|
|
2719
2532
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
2720
2533
|
"exclusive": [
|
|
2721
|
-
"organization-id"
|
|
2722
|
-
"include-projects",
|
|
2723
|
-
"all"
|
|
2534
|
+
"organization-id"
|
|
2724
2535
|
],
|
|
2725
2536
|
"name": "project-id",
|
|
2726
2537
|
"hasDynamicHelp": false,
|
|
@@ -2735,53 +2546,244 @@
|
|
|
2735
2546
|
],
|
|
2736
2547
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
2737
2548
|
"exclusive": [
|
|
2738
|
-
"project-id"
|
|
2739
|
-
"all"
|
|
2549
|
+
"project-id"
|
|
2740
2550
|
],
|
|
2741
2551
|
"name": "organization-id",
|
|
2742
2552
|
"hasDynamicHelp": false,
|
|
2743
2553
|
"multiple": false,
|
|
2744
2554
|
"type": "option"
|
|
2745
2555
|
},
|
|
2746
|
-
"
|
|
2747
|
-
"
|
|
2748
|
-
|
|
2556
|
+
"data": {
|
|
2557
|
+
"char": "d",
|
|
2558
|
+
"description": "Data to send to the function",
|
|
2559
|
+
"exclusive": [
|
|
2560
|
+
"file",
|
|
2561
|
+
"document-id"
|
|
2749
2562
|
],
|
|
2750
|
-
"
|
|
2751
|
-
"
|
|
2563
|
+
"name": "data",
|
|
2564
|
+
"required": false,
|
|
2565
|
+
"hasDynamicHelp": false,
|
|
2566
|
+
"multiple": false,
|
|
2567
|
+
"type": "option"
|
|
2568
|
+
},
|
|
2569
|
+
"data-before": {
|
|
2570
|
+
"description": "Original document",
|
|
2571
|
+
"exclusive": [
|
|
2572
|
+
"data",
|
|
2573
|
+
"file",
|
|
2574
|
+
"document-id",
|
|
2575
|
+
"file-before",
|
|
2576
|
+
"file-after",
|
|
2577
|
+
"document-id-before",
|
|
2578
|
+
"document-id-after"
|
|
2579
|
+
],
|
|
2580
|
+
"name": "data-before",
|
|
2581
|
+
"required": false,
|
|
2582
|
+
"hasDynamicHelp": false,
|
|
2583
|
+
"multiple": false,
|
|
2584
|
+
"type": "option"
|
|
2585
|
+
},
|
|
2586
|
+
"data-after": {
|
|
2587
|
+
"description": "Current document",
|
|
2588
|
+
"exclusive": [
|
|
2589
|
+
"data",
|
|
2590
|
+
"file",
|
|
2591
|
+
"document-id",
|
|
2592
|
+
"file-before",
|
|
2593
|
+
"file-after",
|
|
2594
|
+
"document-id-before",
|
|
2595
|
+
"document-id-after"
|
|
2596
|
+
],
|
|
2597
|
+
"name": "data-after",
|
|
2598
|
+
"required": false,
|
|
2599
|
+
"hasDynamicHelp": false,
|
|
2600
|
+
"multiple": false,
|
|
2601
|
+
"type": "option"
|
|
2602
|
+
},
|
|
2603
|
+
"event": {
|
|
2604
|
+
"char": "e",
|
|
2605
|
+
"description": "Type of event (create, update, delete)",
|
|
2606
|
+
"name": "event",
|
|
2607
|
+
"required": false,
|
|
2608
|
+
"hasDynamicHelp": false,
|
|
2609
|
+
"multiple": false,
|
|
2610
|
+
"options": [
|
|
2611
|
+
"create",
|
|
2612
|
+
"update",
|
|
2613
|
+
"delete"
|
|
2614
|
+
],
|
|
2615
|
+
"type": "option"
|
|
2616
|
+
},
|
|
2617
|
+
"file": {
|
|
2618
|
+
"char": "f",
|
|
2619
|
+
"description": "Read data from file and send to the function",
|
|
2620
|
+
"exclusive": [
|
|
2621
|
+
"data",
|
|
2622
|
+
"document-id"
|
|
2623
|
+
],
|
|
2624
|
+
"name": "file",
|
|
2625
|
+
"required": false,
|
|
2626
|
+
"hasDynamicHelp": false,
|
|
2627
|
+
"multiple": false,
|
|
2628
|
+
"type": "option"
|
|
2629
|
+
},
|
|
2630
|
+
"file-before": {
|
|
2631
|
+
"description": "Original document",
|
|
2632
|
+
"exclusive": [
|
|
2633
|
+
"data",
|
|
2634
|
+
"file",
|
|
2635
|
+
"document-id",
|
|
2636
|
+
"data-before",
|
|
2637
|
+
"data-after",
|
|
2638
|
+
"document-id-before",
|
|
2639
|
+
"document-id-after"
|
|
2640
|
+
],
|
|
2641
|
+
"name": "file-before",
|
|
2642
|
+
"required": false,
|
|
2643
|
+
"hasDynamicHelp": false,
|
|
2644
|
+
"multiple": false,
|
|
2645
|
+
"type": "option"
|
|
2646
|
+
},
|
|
2647
|
+
"file-after": {
|
|
2648
|
+
"description": "Current document",
|
|
2649
|
+
"exclusive": [
|
|
2650
|
+
"data",
|
|
2651
|
+
"file",
|
|
2652
|
+
"document-id",
|
|
2653
|
+
"data-before",
|
|
2654
|
+
"data-after",
|
|
2655
|
+
"document-id-before",
|
|
2656
|
+
"document-id-after"
|
|
2657
|
+
],
|
|
2658
|
+
"name": "file-after",
|
|
2659
|
+
"required": false,
|
|
2660
|
+
"hasDynamicHelp": false,
|
|
2661
|
+
"multiple": false,
|
|
2662
|
+
"type": "option"
|
|
2663
|
+
},
|
|
2664
|
+
"timeout": {
|
|
2665
|
+
"char": "t",
|
|
2666
|
+
"description": "Execution timeout value in seconds",
|
|
2667
|
+
"name": "timeout",
|
|
2668
|
+
"required": false,
|
|
2669
|
+
"hasDynamicHelp": false,
|
|
2670
|
+
"multiple": false,
|
|
2671
|
+
"type": "option"
|
|
2672
|
+
},
|
|
2673
|
+
"api": {
|
|
2674
|
+
"char": "a",
|
|
2675
|
+
"description": "Sanity API Version to use",
|
|
2676
|
+
"name": "api",
|
|
2677
|
+
"required": false,
|
|
2678
|
+
"hasDynamicHelp": false,
|
|
2679
|
+
"multiple": false,
|
|
2680
|
+
"type": "option"
|
|
2681
|
+
},
|
|
2682
|
+
"dataset": {
|
|
2683
|
+
"description": "The Sanity dataset to use",
|
|
2684
|
+
"name": "dataset",
|
|
2685
|
+
"required": false,
|
|
2686
|
+
"hasDynamicHelp": false,
|
|
2687
|
+
"multiple": false,
|
|
2688
|
+
"type": "option"
|
|
2689
|
+
},
|
|
2690
|
+
"document-id": {
|
|
2691
|
+
"aliases": [
|
|
2692
|
+
"doc",
|
|
2693
|
+
"documentId"
|
|
2694
|
+
],
|
|
2695
|
+
"description": "Document to fetch and send to function",
|
|
2696
|
+
"exclusive": [
|
|
2697
|
+
"data",
|
|
2698
|
+
"file"
|
|
2699
|
+
],
|
|
2700
|
+
"name": "document-id",
|
|
2701
|
+
"required": false,
|
|
2702
|
+
"hasDynamicHelp": false,
|
|
2703
|
+
"multiple": false,
|
|
2704
|
+
"type": "option"
|
|
2705
|
+
},
|
|
2706
|
+
"document-id-before": {
|
|
2707
|
+
"description": "Original document",
|
|
2708
|
+
"exclusive": [
|
|
2709
|
+
"data",
|
|
2710
|
+
"file",
|
|
2711
|
+
"document-id",
|
|
2712
|
+
"data-before",
|
|
2713
|
+
"data-after",
|
|
2714
|
+
"file-before",
|
|
2715
|
+
"file-after"
|
|
2716
|
+
],
|
|
2717
|
+
"name": "document-id-before",
|
|
2718
|
+
"required": false,
|
|
2719
|
+
"hasDynamicHelp": false,
|
|
2720
|
+
"multiple": false,
|
|
2721
|
+
"type": "option"
|
|
2722
|
+
},
|
|
2723
|
+
"document-id-after": {
|
|
2724
|
+
"description": "Current document",
|
|
2725
|
+
"exclusive": [
|
|
2726
|
+
"data",
|
|
2727
|
+
"file",
|
|
2728
|
+
"document-id",
|
|
2729
|
+
"data-before",
|
|
2730
|
+
"data-after",
|
|
2731
|
+
"file-before",
|
|
2732
|
+
"file-after"
|
|
2733
|
+
],
|
|
2734
|
+
"name": "document-id-after",
|
|
2735
|
+
"required": false,
|
|
2736
|
+
"hasDynamicHelp": false,
|
|
2737
|
+
"multiple": false,
|
|
2738
|
+
"type": "option"
|
|
2739
|
+
},
|
|
2740
|
+
"with-user-token": {
|
|
2741
|
+
"description": "Prime access token from CLI config",
|
|
2742
|
+
"name": "with-user-token",
|
|
2752
2743
|
"allowNo": false,
|
|
2753
2744
|
"type": "boolean"
|
|
2754
2745
|
},
|
|
2755
|
-
"
|
|
2756
|
-
"
|
|
2746
|
+
"media-library-id": {
|
|
2747
|
+
"aliases": [
|
|
2748
|
+
"media"
|
|
2749
|
+
],
|
|
2750
|
+
"description": "Sanity Media Library ID to use",
|
|
2757
2751
|
"exclusive": [
|
|
2758
2752
|
"project-id",
|
|
2759
|
-
"
|
|
2760
|
-
"include-projects"
|
|
2753
|
+
"dataset"
|
|
2761
2754
|
],
|
|
2762
|
-
"name": "
|
|
2755
|
+
"name": "media-library-id",
|
|
2756
|
+
"required": false,
|
|
2757
|
+
"hasDynamicHelp": false,
|
|
2758
|
+
"multiple": false,
|
|
2759
|
+
"type": "option"
|
|
2760
|
+
},
|
|
2761
|
+
"no-wait": {
|
|
2762
|
+
"description": "Skip durable wait delays instead of sleeping",
|
|
2763
|
+
"name": "no-wait",
|
|
2764
|
+
"required": false,
|
|
2763
2765
|
"allowNo": false,
|
|
2764
2766
|
"type": "boolean"
|
|
2765
2767
|
}
|
|
2766
2768
|
},
|
|
2767
2769
|
"hasDynamicHelp": false,
|
|
2768
2770
|
"hiddenAliases": [],
|
|
2769
|
-
"id": "
|
|
2771
|
+
"id": "functions:test",
|
|
2770
2772
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2771
2773
|
"pluginName": "@sanity/runtime-cli",
|
|
2772
2774
|
"pluginType": "core",
|
|
2773
2775
|
"strict": true,
|
|
2774
|
-
"summary": "
|
|
2776
|
+
"summary": "Invoke a local Sanity Function",
|
|
2775
2777
|
"enableJsonFlag": true,
|
|
2776
2778
|
"needs": [
|
|
2777
|
-
"
|
|
2779
|
+
"blueprint"
|
|
2778
2780
|
],
|
|
2779
2781
|
"isESM": true,
|
|
2780
2782
|
"relativePath": [
|
|
2781
2783
|
"dist",
|
|
2782
2784
|
"commands",
|
|
2783
|
-
"
|
|
2784
|
-
"
|
|
2785
|
+
"functions",
|
|
2786
|
+
"test.js"
|
|
2785
2787
|
]
|
|
2786
2788
|
},
|
|
2787
2789
|
"functions:env:add": {
|
|
@@ -3148,5 +3150,5 @@
|
|
|
3148
3150
|
]
|
|
3149
3151
|
}
|
|
3150
3152
|
},
|
|
3151
|
-
"version": "17.
|
|
3153
|
+
"version": "17.18.0-next.g8775ede"
|
|
3152
3154
|
}
|