@sanity/runtime-cli 17.1.0 → 17.2.0-blueprinit.gd1553d6
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 +38 -28
- package/dist/actions/blueprinit/manifest.d.ts +13 -0
- package/dist/actions/blueprinit/manifest.js +57 -0
- package/dist/actions/blueprinit/studio.d.ts +6 -0
- package/dist/actions/blueprinit/studio.js +43 -0
- package/dist/actions/blueprinit/templates.d.ts +34 -0
- package/dist/actions/blueprinit/templates.js +83 -0
- package/dist/actions/blueprinit/workspace.d.ts +15 -0
- package/dist/actions/blueprinit/workspace.js +142 -0
- package/dist/actions/blueprints/assets.d.ts +2 -1
- package/dist/actions/blueprints/assets.js +17 -26
- package/dist/actions/blueprints/blueprint.d.ts +1 -1
- package/dist/actions/blueprints/pre-deploy.d.ts +29 -0
- package/dist/actions/blueprints/pre-deploy.js +164 -0
- package/dist/actions/blueprints/wait-for-operation.js +4 -0
- package/dist/actions/sanity/datasets.d.ts +15 -0
- package/dist/actions/sanity/datasets.js +26 -0
- package/dist/actions/sanity/examples.d.ts +4 -4
- package/dist/baseCommands.d.ts +4 -4
- package/dist/commands/blueprinit.d.ts +13 -0
- package/dist/commands/blueprinit.js +44 -0
- package/dist/commands/blueprints/add.d.ts +1 -1
- package/dist/commands/blueprints/config.d.ts +1 -1
- package/dist/commands/blueprints/deploy.d.ts +1 -1
- package/dist/commands/blueprints/destroy.d.ts +1 -1
- package/dist/commands/blueprints/doctor.d.ts +0 -1
- package/dist/commands/blueprints/doctor.js +3 -7
- package/dist/commands/blueprints/info.d.ts +1 -1
- package/dist/commands/blueprints/logs.d.ts +1 -1
- package/dist/commands/blueprints/mint-deploy-token.d.ts +1 -1
- package/dist/commands/blueprints/plan.d.ts +1 -1
- package/dist/commands/blueprints/promote.d.ts +1 -1
- package/dist/commands/blueprints/stacks.d.ts +1 -1
- package/dist/commands/functions/add.d.ts +1 -1
- package/dist/commands/functions/build.d.ts +1 -1
- package/dist/commands/functions/dev.d.ts +1 -1
- package/dist/commands/functions/env/add.d.ts +4 -1
- package/dist/commands/functions/env/add.js +6 -2
- package/dist/commands/functions/env/list.d.ts +4 -1
- package/dist/commands/functions/env/list.js +9 -3
- package/dist/commands/functions/env/remove.d.ts +4 -1
- package/dist/commands/functions/env/remove.js +9 -3
- package/dist/commands/functions/logs.d.ts +1 -1
- package/dist/commands/functions/test.d.ts +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/cores/blueprinit/adopt.d.ts +6 -0
- package/dist/cores/blueprinit/adopt.js +90 -0
- package/dist/cores/blueprinit/finish.d.ts +14 -0
- package/dist/cores/blueprinit/finish.js +36 -0
- package/dist/cores/blueprinit/fresh.d.ts +3 -0
- package/dist/cores/blueprinit/fresh.js +88 -0
- package/dist/cores/blueprinit/prompts.d.ts +4 -0
- package/dist/cores/blueprinit/prompts.js +14 -0
- package/dist/cores/blueprinit/selection.d.ts +15 -0
- package/dist/cores/blueprinit/selection.js +63 -0
- package/dist/cores/blueprinit/types.d.ts +13 -0
- package/dist/cores/blueprinit/types.js +1 -0
- package/dist/cores/blueprinit.d.ts +7 -0
- package/dist/cores/blueprinit.js +39 -0
- package/dist/cores/blueprints/deploy.js +18 -65
- package/dist/cores/blueprints/doctor.js +15 -12
- package/dist/cores/functions/build.js +3 -2
- package/dist/cores/functions/test.js +4 -2
- package/dist/server/app.js +8 -2
- package/dist/server/static/favicon-dark.svg +1 -0
- package/dist/server/static/favicon.svg +1 -0
- package/dist/server/static/index.html +1 -1
- package/dist/server/static/vendor/vendor.bundle.js +5 -0
- package/dist/utils/functions/child-process-wrapper.js +13 -171
- package/dist/utils/functions/child-runtime/console.d.ts +1 -0
- package/dist/utils/functions/child-runtime/console.js +50 -0
- package/dist/utils/functions/child-runtime/invoke.d.ts +4 -0
- package/dist/utils/functions/child-runtime/invoke.js +47 -0
- package/dist/utils/functions/child-runtime/resources.d.ts +4 -0
- package/dist/utils/functions/child-runtime/resources.js +59 -0
- package/dist/utils/functions/find-entry-point.d.ts +1 -1
- package/dist/utils/functions/find-entry-point.js +10 -12
- package/dist/utils/functions/invoke/local.js +1 -1
- package/dist/utils/functions/invoke/prepare.d.ts +1 -1
- package/dist/utils/functions/invoke/prepare.js +19 -8
- package/dist/utils/functions/package-json.d.ts +1 -2
- package/dist/utils/functions/package-json.js +4 -6
- package/dist/utils/functions/prepare-asset.d.ts +2 -2
- package/dist/utils/functions/prepare-asset.js +18 -7
- package/dist/utils/functions/resolve-dependencies.d.ts +4 -1
- package/dist/utils/functions/resolve-dependencies.js +5 -6
- package/dist/utils/functions/resource-to-arc.d.ts +1 -1
- package/dist/utils/functions/resource-to-arc.js +4 -5
- package/dist/utils/functions/should-transpile.d.ts +7 -1
- package/dist/utils/functions/should-transpile.js +10 -10
- package/dist/utils/functions/transpile/function.d.ts +4 -1
- package/dist/utils/functions/transpile/function.js +9 -14
- package/dist/utils/functions/transpile/verify-handler.js +1 -1
- package/dist/utils/logger.d.ts +7 -5
- package/dist/utils/logger.js +33 -1
- package/dist/utils/progress.d.ts +5 -0
- package/dist/utils/progress.js +40 -0
- package/dist/utils/studios/prepare-asset.d.ts +6 -0
- package/dist/utils/studios/prepare-asset.js +139 -0
- package/dist/utils/types.d.ts +9 -8
- package/dist/utils/types.js +2 -3
- package/oclif.manifest.json +1049 -951
- package/package.json +30 -23
package/oclif.manifest.json
CHANGED
|
@@ -1,15 +1,124 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"
|
|
3
|
+
"blueprinit": {
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {},
|
|
6
|
-
"description": "Scaffolds a
|
|
6
|
+
"description": "Scaffolds a Blueprint, Studio, and starter function around an existing Sanity project.\n\nThis hidden command is an experiment; its interface and generated files are not stable.",
|
|
7
7
|
"examples": [
|
|
8
8
|
"<%= config.bin %> <%= command.id %>",
|
|
9
|
-
"<%= config.bin %> <%= command.id %> --
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
9
|
+
"<%= config.bin %> <%= command.id %> --yes"
|
|
10
|
+
],
|
|
11
|
+
"flags": {
|
|
12
|
+
"json": {
|
|
13
|
+
"description": "Format output as json",
|
|
14
|
+
"name": "json",
|
|
15
|
+
"allowNo": false,
|
|
16
|
+
"type": "boolean"
|
|
17
|
+
},
|
|
18
|
+
"path": {
|
|
19
|
+
"aliases": [
|
|
20
|
+
"blueprint-path"
|
|
21
|
+
],
|
|
22
|
+
"char": "p",
|
|
23
|
+
"description": "Path to a Blueprint file or directory containing one",
|
|
24
|
+
"env": "SANITY_BLUEPRINT_PATH",
|
|
25
|
+
"hidden": true,
|
|
26
|
+
"name": "path",
|
|
27
|
+
"hasDynamicHelp": false,
|
|
28
|
+
"multiple": false,
|
|
29
|
+
"type": "option"
|
|
30
|
+
},
|
|
31
|
+
"trace": {
|
|
32
|
+
"description": "Trace output",
|
|
33
|
+
"hidden": true,
|
|
34
|
+
"name": "trace",
|
|
35
|
+
"allowNo": false,
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
"validate-resources": {
|
|
39
|
+
"description": "Validate resources",
|
|
40
|
+
"hidden": true,
|
|
41
|
+
"name": "validate-resources",
|
|
42
|
+
"allowNo": true,
|
|
43
|
+
"type": "boolean"
|
|
44
|
+
},
|
|
45
|
+
"verbose": {
|
|
46
|
+
"description": "Verbose output",
|
|
47
|
+
"hidden": true,
|
|
48
|
+
"name": "verbose",
|
|
49
|
+
"allowNo": false,
|
|
50
|
+
"type": "boolean"
|
|
51
|
+
},
|
|
52
|
+
"yes": {
|
|
53
|
+
"char": "y",
|
|
54
|
+
"description": "Skip confirmation prompts",
|
|
55
|
+
"name": "yes",
|
|
56
|
+
"allowNo": false,
|
|
57
|
+
"type": "boolean"
|
|
58
|
+
},
|
|
59
|
+
"organization-id": {
|
|
60
|
+
"aliases": [
|
|
61
|
+
"organization",
|
|
62
|
+
"organizationId",
|
|
63
|
+
"org"
|
|
64
|
+
],
|
|
65
|
+
"description": "Organization to use when the account has several",
|
|
66
|
+
"name": "organization-id",
|
|
67
|
+
"hasDynamicHelp": false,
|
|
68
|
+
"multiple": false,
|
|
69
|
+
"type": "option"
|
|
70
|
+
},
|
|
71
|
+
"project-id": {
|
|
72
|
+
"aliases": [
|
|
73
|
+
"project",
|
|
74
|
+
"projectId"
|
|
75
|
+
],
|
|
76
|
+
"description": "Project to use when the organization has several",
|
|
77
|
+
"name": "project-id",
|
|
78
|
+
"hasDynamicHelp": false,
|
|
79
|
+
"multiple": false,
|
|
80
|
+
"type": "option"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"hasDynamicHelp": false,
|
|
84
|
+
"hidden": true,
|
|
85
|
+
"hiddenAliases": [],
|
|
86
|
+
"id": "blueprinit",
|
|
87
|
+
"pluginAlias": "@sanity/runtime-cli",
|
|
88
|
+
"pluginName": "@sanity/runtime-cli",
|
|
89
|
+
"pluginType": "core",
|
|
90
|
+
"strict": true,
|
|
91
|
+
"summary": "Experimental blueprints-first project init",
|
|
92
|
+
"enableJsonFlag": true,
|
|
93
|
+
"isESM": true,
|
|
94
|
+
"relativePath": [
|
|
95
|
+
"dist",
|
|
96
|
+
"commands",
|
|
97
|
+
"blueprinit.js"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"blueprints:add": {
|
|
101
|
+
"aliases": [],
|
|
102
|
+
"args": {
|
|
103
|
+
"type": {
|
|
104
|
+
"description": "Type of resource to add (only \"function\" is supported)",
|
|
105
|
+
"name": "type",
|
|
106
|
+
"options": [
|
|
107
|
+
"function"
|
|
108
|
+
],
|
|
109
|
+
"required": true
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"deprecationOptions": {
|
|
113
|
+
"to": "functions add"
|
|
114
|
+
},
|
|
115
|
+
"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",
|
|
116
|
+
"examples": [
|
|
117
|
+
"<%= config.bin %> <%= command.id %> function",
|
|
118
|
+
"<%= config.bin %> <%= command.id %> function --helpers",
|
|
119
|
+
"<%= config.bin %> <%= command.id %> function --name my-function",
|
|
120
|
+
"<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create",
|
|
121
|
+
"<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create --fn-type document-update --lang js"
|
|
13
122
|
],
|
|
14
123
|
"flags": {
|
|
15
124
|
"json": {
|
|
@@ -95,7 +204,7 @@
|
|
|
95
204
|
"aliases": [
|
|
96
205
|
"recipe"
|
|
97
206
|
],
|
|
98
|
-
"description": "Example to use for the
|
|
207
|
+
"description": "Example to use for the function resource. Discover examples at https://www.sanity.io/exchange/type=recipes/by=sanity",
|
|
99
208
|
"exclusive": [
|
|
100
209
|
"name",
|
|
101
210
|
"fn-type",
|
|
@@ -111,18 +220,21 @@
|
|
|
111
220
|
},
|
|
112
221
|
"name": {
|
|
113
222
|
"char": "n",
|
|
114
|
-
"description": "Name of the
|
|
223
|
+
"description": "Name of the resource to add",
|
|
115
224
|
"name": "name",
|
|
116
225
|
"hasDynamicHelp": false,
|
|
117
226
|
"multiple": false,
|
|
118
227
|
"type": "option"
|
|
119
228
|
},
|
|
120
|
-
"type": {
|
|
229
|
+
"fn-type": {
|
|
230
|
+
"aliases": [
|
|
231
|
+
"function-type"
|
|
232
|
+
],
|
|
121
233
|
"dependsOn": [
|
|
122
234
|
"name"
|
|
123
235
|
],
|
|
124
236
|
"description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
|
|
125
|
-
"name": "type",
|
|
237
|
+
"name": "fn-type",
|
|
126
238
|
"hasDynamicHelp": false,
|
|
127
239
|
"multiple": true,
|
|
128
240
|
"options": [
|
|
@@ -140,9 +252,11 @@
|
|
|
140
252
|
},
|
|
141
253
|
"language": {
|
|
142
254
|
"aliases": [
|
|
255
|
+
"function-language",
|
|
256
|
+
"fn-language",
|
|
143
257
|
"lang"
|
|
144
258
|
],
|
|
145
|
-
"description": "Language of the new
|
|
259
|
+
"description": "Language of the new function",
|
|
146
260
|
"name": "language",
|
|
147
261
|
"default": "ts",
|
|
148
262
|
"hasDynamicHelp": false,
|
|
@@ -165,15 +279,23 @@
|
|
|
165
279
|
"allowNo": false,
|
|
166
280
|
"type": "boolean"
|
|
167
281
|
},
|
|
168
|
-
"helpers": {
|
|
169
|
-
"
|
|
170
|
-
|
|
282
|
+
"fn-helpers": {
|
|
283
|
+
"aliases": [
|
|
284
|
+
"function-helpers",
|
|
285
|
+
"helpers"
|
|
286
|
+
],
|
|
287
|
+
"description": "Add helpers to the new function",
|
|
288
|
+
"name": "fn-helpers",
|
|
171
289
|
"allowNo": true,
|
|
172
290
|
"type": "boolean"
|
|
173
291
|
},
|
|
174
|
-
"installer": {
|
|
175
|
-
"
|
|
176
|
-
|
|
292
|
+
"fn-installer": {
|
|
293
|
+
"aliases": [
|
|
294
|
+
"function-installer",
|
|
295
|
+
"installer"
|
|
296
|
+
],
|
|
297
|
+
"description": "Which package manager to use when installing the @sanity/functions helpers",
|
|
298
|
+
"name": "fn-installer",
|
|
177
299
|
"hasDynamicHelp": false,
|
|
178
300
|
"multiple": false,
|
|
179
301
|
"options": [
|
|
@@ -197,12 +319,13 @@
|
|
|
197
319
|
},
|
|
198
320
|
"hasDynamicHelp": false,
|
|
199
321
|
"hiddenAliases": [],
|
|
200
|
-
"id": "
|
|
322
|
+
"id": "blueprints:add",
|
|
201
323
|
"pluginAlias": "@sanity/runtime-cli",
|
|
202
324
|
"pluginName": "@sanity/runtime-cli",
|
|
203
325
|
"pluginType": "core",
|
|
326
|
+
"state": "deprecated",
|
|
204
327
|
"strict": true,
|
|
205
|
-
"summary": "
|
|
328
|
+
"summary": "[deprecated] Use \"functions add\" instead",
|
|
206
329
|
"enableJsonFlag": true,
|
|
207
330
|
"needs": [
|
|
208
331
|
"blueprint"
|
|
@@ -211,19 +334,20 @@
|
|
|
211
334
|
"relativePath": [
|
|
212
335
|
"dist",
|
|
213
336
|
"commands",
|
|
214
|
-
"
|
|
337
|
+
"blueprints",
|
|
215
338
|
"add.js"
|
|
216
339
|
]
|
|
217
340
|
},
|
|
218
|
-
"
|
|
341
|
+
"blueprints:config": {
|
|
219
342
|
"aliases": [],
|
|
220
|
-
"args": {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
343
|
+
"args": {},
|
|
344
|
+
"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.",
|
|
345
|
+
"examples": [
|
|
346
|
+
"<%= config.bin %> <%= command.id %>",
|
|
347
|
+
"<%= config.bin %> <%= command.id %> --edit",
|
|
348
|
+
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId>",
|
|
349
|
+
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack <name-or-id>"
|
|
350
|
+
],
|
|
227
351
|
"flags": {
|
|
228
352
|
"json": {
|
|
229
353
|
"description": "Format output as json",
|
|
@@ -266,8 +390,14 @@
|
|
|
266
390
|
"type": "boolean"
|
|
267
391
|
},
|
|
268
392
|
"stack": {
|
|
269
|
-
"
|
|
270
|
-
|
|
393
|
+
"aliases": [
|
|
394
|
+
"stack-id",
|
|
395
|
+
"stackId"
|
|
396
|
+
],
|
|
397
|
+
"dependsOn": [
|
|
398
|
+
"edit"
|
|
399
|
+
],
|
|
400
|
+
"description": "Stack name or ID to set in the configuration. Requires --edit flag",
|
|
271
401
|
"name": "stack",
|
|
272
402
|
"hasDynamicHelp": false,
|
|
273
403
|
"multiple": false,
|
|
@@ -278,11 +408,13 @@
|
|
|
278
408
|
"project",
|
|
279
409
|
"projectId"
|
|
280
410
|
],
|
|
411
|
+
"dependsOn": [
|
|
412
|
+
"edit"
|
|
413
|
+
],
|
|
281
414
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
282
415
|
"exclusive": [
|
|
283
416
|
"organization-id"
|
|
284
417
|
],
|
|
285
|
-
"hidden": true,
|
|
286
418
|
"name": "project-id",
|
|
287
419
|
"hasDynamicHelp": false,
|
|
288
420
|
"multiple": false,
|
|
@@ -294,70 +426,59 @@
|
|
|
294
426
|
"organizationId",
|
|
295
427
|
"org"
|
|
296
428
|
],
|
|
429
|
+
"dependsOn": [
|
|
430
|
+
"edit"
|
|
431
|
+
],
|
|
297
432
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
298
433
|
"exclusive": [
|
|
299
434
|
"project-id"
|
|
300
435
|
],
|
|
301
|
-
"hidden": true,
|
|
302
436
|
"name": "organization-id",
|
|
303
437
|
"hasDynamicHelp": false,
|
|
304
438
|
"multiple": false,
|
|
305
439
|
"type": "option"
|
|
306
440
|
},
|
|
307
|
-
"
|
|
308
|
-
"
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
"
|
|
313
|
-
"hidden": true,
|
|
314
|
-
"name": "fn-installer",
|
|
315
|
-
"hasDynamicHelp": false,
|
|
316
|
-
"multiple": false,
|
|
317
|
-
"options": [
|
|
318
|
-
"npm",
|
|
319
|
-
"pnpm",
|
|
320
|
-
"yarn"
|
|
321
|
-
],
|
|
322
|
-
"type": "option"
|
|
323
|
-
},
|
|
324
|
-
"out-dir": {
|
|
325
|
-
"char": "o",
|
|
326
|
-
"description": "Output directory for zip files",
|
|
327
|
-
"name": "out-dir",
|
|
328
|
-
"hasDynamicHelp": false,
|
|
329
|
-
"multiple": false,
|
|
330
|
-
"type": "option"
|
|
441
|
+
"edit": {
|
|
442
|
+
"char": "e",
|
|
443
|
+
"description": "Modify the configuration interactively, or directly when combined with ID flags.",
|
|
444
|
+
"name": "edit",
|
|
445
|
+
"allowNo": false,
|
|
446
|
+
"type": "boolean"
|
|
331
447
|
}
|
|
332
448
|
},
|
|
333
449
|
"hasDynamicHelp": false,
|
|
334
|
-
"hidden": true,
|
|
335
450
|
"hiddenAliases": [],
|
|
336
|
-
"id": "
|
|
451
|
+
"id": "blueprints:config",
|
|
337
452
|
"pluginAlias": "@sanity/runtime-cli",
|
|
338
453
|
"pluginName": "@sanity/runtime-cli",
|
|
339
454
|
"pluginType": "core",
|
|
340
455
|
"strict": true,
|
|
341
|
-
"summary": "
|
|
456
|
+
"summary": "View or edit the local Blueprint configuration",
|
|
342
457
|
"enableJsonFlag": true,
|
|
343
458
|
"needs": [
|
|
459
|
+
"token",
|
|
344
460
|
"blueprint"
|
|
345
461
|
],
|
|
346
462
|
"isESM": true,
|
|
347
463
|
"relativePath": [
|
|
348
464
|
"dist",
|
|
349
465
|
"commands",
|
|
350
|
-
"
|
|
351
|
-
"
|
|
466
|
+
"blueprints",
|
|
467
|
+
"config.js"
|
|
352
468
|
]
|
|
353
469
|
},
|
|
354
|
-
"
|
|
470
|
+
"blueprints:deploy": {
|
|
355
471
|
"aliases": [],
|
|
356
472
|
"args": {},
|
|
357
|
-
"description": "
|
|
473
|
+
"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 60-second timeout for processing resource assets.\n\nExit codes: 0 deployed, 2 deployment failed, 75 deployment accepted but completion could not be confirmed (rerun 'blueprints info' to check).",
|
|
358
474
|
"examples": [
|
|
359
|
-
"<%= config.bin %> <%= command.id %>
|
|
360
|
-
"<%= config.bin %> <%= command.id %> --
|
|
475
|
+
"<%= config.bin %> <%= command.id %>",
|
|
476
|
+
"<%= config.bin %> <%= command.id %> --message \"Enable staging dataset\"",
|
|
477
|
+
"<%= config.bin %> <%= command.id %> --no-wait",
|
|
478
|
+
"<%= config.bin %> <%= command.id %> --fn-installer npm",
|
|
479
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
480
|
+
"<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>",
|
|
481
|
+
"<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
|
|
361
482
|
],
|
|
362
483
|
"flags": {
|
|
363
484
|
"json": {
|
|
@@ -402,7 +523,6 @@
|
|
|
402
523
|
},
|
|
403
524
|
"stack": {
|
|
404
525
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
405
|
-
"hidden": true,
|
|
406
526
|
"name": "stack",
|
|
407
527
|
"hasDynamicHelp": false,
|
|
408
528
|
"multiple": false,
|
|
@@ -417,7 +537,6 @@
|
|
|
417
537
|
"exclusive": [
|
|
418
538
|
"organization-id"
|
|
419
539
|
],
|
|
420
|
-
"hidden": true,
|
|
421
540
|
"name": "project-id",
|
|
422
541
|
"hasDynamicHelp": false,
|
|
423
542
|
"multiple": false,
|
|
@@ -433,35 +552,45 @@
|
|
|
433
552
|
"exclusive": [
|
|
434
553
|
"project-id"
|
|
435
554
|
],
|
|
436
|
-
"hidden": true,
|
|
437
555
|
"name": "organization-id",
|
|
438
556
|
"hasDynamicHelp": false,
|
|
439
557
|
"multiple": false,
|
|
440
558
|
"type": "option"
|
|
441
559
|
},
|
|
442
|
-
"
|
|
443
|
-
"char": "
|
|
444
|
-
"description": "
|
|
445
|
-
"name": "
|
|
446
|
-
"required": false,
|
|
560
|
+
"message": {
|
|
561
|
+
"char": "m",
|
|
562
|
+
"description": "Message describing the deployment (e.g. reason for change)",
|
|
563
|
+
"name": "message",
|
|
447
564
|
"hasDynamicHelp": false,
|
|
448
565
|
"multiple": false,
|
|
449
566
|
"type": "option"
|
|
450
567
|
},
|
|
451
|
-
"
|
|
452
|
-
"
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
568
|
+
"fn-installer": {
|
|
569
|
+
"aliases": [
|
|
570
|
+
"function-installer",
|
|
571
|
+
"installer"
|
|
572
|
+
],
|
|
573
|
+
"description": "Which package manager to use when installing Function dependencies",
|
|
574
|
+
"hidden": true,
|
|
575
|
+
"name": "fn-installer",
|
|
456
576
|
"hasDynamicHelp": false,
|
|
457
577
|
"multiple": false,
|
|
578
|
+
"options": [
|
|
579
|
+
"npm",
|
|
580
|
+
"pnpm",
|
|
581
|
+
"yarn"
|
|
582
|
+
],
|
|
458
583
|
"type": "option"
|
|
459
584
|
},
|
|
460
|
-
"
|
|
461
|
-
"
|
|
462
|
-
"
|
|
463
|
-
"
|
|
464
|
-
"
|
|
585
|
+
"no-wait": {
|
|
586
|
+
"description": "Do not wait for Stack deployment to complete",
|
|
587
|
+
"name": "no-wait",
|
|
588
|
+
"allowNo": false,
|
|
589
|
+
"type": "boolean"
|
|
590
|
+
},
|
|
591
|
+
"new-stack-name": {
|
|
592
|
+
"description": "Set a new name for the Stack",
|
|
593
|
+
"name": "new-stack-name",
|
|
465
594
|
"hasDynamicHelp": false,
|
|
466
595
|
"multiple": false,
|
|
467
596
|
"type": "option"
|
|
@@ -469,39 +598,32 @@
|
|
|
469
598
|
},
|
|
470
599
|
"hasDynamicHelp": false,
|
|
471
600
|
"hiddenAliases": [],
|
|
472
|
-
"id": "
|
|
601
|
+
"id": "blueprints:deploy",
|
|
473
602
|
"pluginAlias": "@sanity/runtime-cli",
|
|
474
603
|
"pluginName": "@sanity/runtime-cli",
|
|
475
604
|
"pluginType": "core",
|
|
476
605
|
"strict": true,
|
|
477
|
-
"summary": "
|
|
606
|
+
"summary": "Deploy the local Blueprint to the remote Stack",
|
|
478
607
|
"enableJsonFlag": true,
|
|
479
608
|
"needs": [
|
|
609
|
+
"deployedStack",
|
|
480
610
|
"blueprint"
|
|
481
611
|
],
|
|
482
612
|
"isESM": true,
|
|
483
613
|
"relativePath": [
|
|
484
614
|
"dist",
|
|
485
615
|
"commands",
|
|
486
|
-
"
|
|
487
|
-
"
|
|
616
|
+
"blueprints",
|
|
617
|
+
"deploy.js"
|
|
488
618
|
]
|
|
489
619
|
},
|
|
490
|
-
"
|
|
620
|
+
"blueprints:destroy": {
|
|
491
621
|
"aliases": [],
|
|
492
|
-
"args": {
|
|
493
|
-
|
|
494
|
-
"description": "The name of the Sanity Function",
|
|
495
|
-
"name": "name",
|
|
496
|
-
"required": false
|
|
497
|
-
}
|
|
498
|
-
},
|
|
499
|
-
"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).",
|
|
622
|
+
"args": {},
|
|
623
|
+
"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).",
|
|
500
624
|
"examples": [
|
|
501
|
-
"<%= config.bin %> <%= command.id %>
|
|
502
|
-
"<%= config.bin %> <%= command.id %> <name> --
|
|
503
|
-
"<%= config.bin %> <%= command.id %> <name> --limit 100",
|
|
504
|
-
"<%= config.bin %> <%= command.id %> <name> --delete"
|
|
625
|
+
"<%= config.bin %> <%= command.id %>",
|
|
626
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id> --project-id <projectId> --force --no-wait"
|
|
505
627
|
],
|
|
506
628
|
"flags": {
|
|
507
629
|
"json": {
|
|
@@ -545,7 +667,11 @@
|
|
|
545
667
|
"type": "boolean"
|
|
546
668
|
},
|
|
547
669
|
"stack": {
|
|
548
|
-
"
|
|
670
|
+
"aliases": [
|
|
671
|
+
"stack-id",
|
|
672
|
+
"stackId"
|
|
673
|
+
],
|
|
674
|
+
"description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
|
|
549
675
|
"name": "stack",
|
|
550
676
|
"hasDynamicHelp": false,
|
|
551
677
|
"multiple": false,
|
|
@@ -556,11 +682,14 @@
|
|
|
556
682
|
"project",
|
|
557
683
|
"projectId"
|
|
558
684
|
],
|
|
685
|
+
"dependsOn": [
|
|
686
|
+
"stack",
|
|
687
|
+
"force"
|
|
688
|
+
],
|
|
559
689
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
560
690
|
"exclusive": [
|
|
561
691
|
"organization-id"
|
|
562
692
|
],
|
|
563
|
-
"hidden": true,
|
|
564
693
|
"name": "project-id",
|
|
565
694
|
"hasDynamicHelp": false,
|
|
566
695
|
"multiple": false,
|
|
@@ -572,104 +701,136 @@
|
|
|
572
701
|
"organizationId",
|
|
573
702
|
"org"
|
|
574
703
|
],
|
|
704
|
+
"dependsOn": [
|
|
705
|
+
"stack",
|
|
706
|
+
"force"
|
|
707
|
+
],
|
|
575
708
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
576
709
|
"exclusive": [
|
|
577
710
|
"project-id"
|
|
578
711
|
],
|
|
579
|
-
"hidden": true,
|
|
580
712
|
"name": "organization-id",
|
|
581
713
|
"hasDynamicHelp": false,
|
|
582
714
|
"multiple": false,
|
|
583
715
|
"type": "option"
|
|
584
716
|
},
|
|
585
|
-
"
|
|
586
|
-
"
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
"
|
|
590
|
-
"
|
|
717
|
+
"force": {
|
|
718
|
+
"aliases": [
|
|
719
|
+
"f"
|
|
720
|
+
],
|
|
721
|
+
"description": "Force Stack destruction (skip confirmation)",
|
|
722
|
+
"name": "force",
|
|
723
|
+
"allowNo": false,
|
|
724
|
+
"type": "boolean"
|
|
725
|
+
},
|
|
726
|
+
"no-wait": {
|
|
727
|
+
"description": "Do not wait for Stack destruction to complete",
|
|
728
|
+
"name": "no-wait",
|
|
729
|
+
"allowNo": false,
|
|
730
|
+
"type": "boolean"
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
"hasDynamicHelp": false,
|
|
734
|
+
"hiddenAliases": [],
|
|
735
|
+
"id": "blueprints:destroy",
|
|
736
|
+
"pluginAlias": "@sanity/runtime-cli",
|
|
737
|
+
"pluginName": "@sanity/runtime-cli",
|
|
738
|
+
"pluginType": "core",
|
|
739
|
+
"strict": true,
|
|
740
|
+
"summary": "Destroy a remote Stack deployment and its resources",
|
|
741
|
+
"enableJsonFlag": true,
|
|
742
|
+
"needs": [
|
|
743
|
+
"scope"
|
|
744
|
+
],
|
|
745
|
+
"isESM": true,
|
|
746
|
+
"relativePath": [
|
|
747
|
+
"dist",
|
|
748
|
+
"commands",
|
|
749
|
+
"blueprints",
|
|
750
|
+
"destroy.js"
|
|
751
|
+
]
|
|
752
|
+
},
|
|
753
|
+
"blueprints:doctor": {
|
|
754
|
+
"aliases": [],
|
|
755
|
+
"args": {},
|
|
756
|
+
"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.",
|
|
757
|
+
"examples": [
|
|
758
|
+
"<%= config.bin %> <%= command.id %>",
|
|
759
|
+
"<%= config.bin %> <%= command.id %> --fix"
|
|
760
|
+
],
|
|
761
|
+
"flags": {
|
|
762
|
+
"json": {
|
|
763
|
+
"description": "Format output as json",
|
|
764
|
+
"name": "json",
|
|
765
|
+
"allowNo": false,
|
|
766
|
+
"type": "boolean"
|
|
767
|
+
},
|
|
768
|
+
"path": {
|
|
769
|
+
"aliases": [
|
|
770
|
+
"blueprint-path"
|
|
771
|
+
],
|
|
772
|
+
"char": "p",
|
|
773
|
+
"description": "Path to a Blueprint file or directory containing one",
|
|
774
|
+
"env": "SANITY_BLUEPRINT_PATH",
|
|
775
|
+
"name": "path",
|
|
591
776
|
"hasDynamicHelp": false,
|
|
592
777
|
"multiple": false,
|
|
593
778
|
"type": "option"
|
|
594
779
|
},
|
|
595
|
-
"
|
|
596
|
-
"
|
|
597
|
-
"
|
|
598
|
-
"name": "
|
|
599
|
-
"required": false,
|
|
780
|
+
"trace": {
|
|
781
|
+
"description": "Trace output",
|
|
782
|
+
"hidden": true,
|
|
783
|
+
"name": "trace",
|
|
600
784
|
"allowNo": false,
|
|
601
785
|
"type": "boolean"
|
|
602
786
|
},
|
|
603
|
-
"
|
|
604
|
-
"
|
|
605
|
-
"
|
|
606
|
-
"
|
|
607
|
-
|
|
608
|
-
"json"
|
|
609
|
-
],
|
|
610
|
-
"name": "delete",
|
|
611
|
-
"required": false,
|
|
612
|
-
"allowNo": false,
|
|
787
|
+
"validate-resources": {
|
|
788
|
+
"description": "Validate resources",
|
|
789
|
+
"hidden": true,
|
|
790
|
+
"name": "validate-resources",
|
|
791
|
+
"allowNo": true,
|
|
613
792
|
"type": "boolean"
|
|
614
793
|
},
|
|
615
|
-
"
|
|
616
|
-
"
|
|
617
|
-
"
|
|
618
|
-
|
|
619
|
-
],
|
|
620
|
-
"description": "Skip confirmation for deleting logs",
|
|
621
|
-
"name": "force",
|
|
622
|
-
"required": false,
|
|
794
|
+
"verbose": {
|
|
795
|
+
"description": "Verbose output",
|
|
796
|
+
"hidden": true,
|
|
797
|
+
"name": "verbose",
|
|
623
798
|
"allowNo": false,
|
|
624
799
|
"type": "boolean"
|
|
625
800
|
},
|
|
626
|
-
"
|
|
627
|
-
"
|
|
628
|
-
|
|
629
|
-
],
|
|
630
|
-
"char": "w",
|
|
631
|
-
"description": "Watch for new logs (streaming mode)",
|
|
632
|
-
"name": "watch",
|
|
801
|
+
"fix": {
|
|
802
|
+
"description": "Interactively fix configuration issues",
|
|
803
|
+
"name": "fix",
|
|
633
804
|
"allowNo": false,
|
|
634
805
|
"type": "boolean"
|
|
635
806
|
}
|
|
636
807
|
},
|
|
637
808
|
"hasDynamicHelp": false,
|
|
638
809
|
"hiddenAliases": [],
|
|
639
|
-
"id": "
|
|
810
|
+
"id": "blueprints:doctor",
|
|
640
811
|
"pluginAlias": "@sanity/runtime-cli",
|
|
641
812
|
"pluginName": "@sanity/runtime-cli",
|
|
642
813
|
"pluginType": "core",
|
|
643
814
|
"strict": true,
|
|
644
|
-
"summary": "
|
|
815
|
+
"summary": "Diagnose potential issues with local Blueprint and remote Stack configuration",
|
|
645
816
|
"enableJsonFlag": true,
|
|
646
|
-
"needs": [
|
|
647
|
-
"deployedStack",
|
|
648
|
-
"blueprint"
|
|
649
|
-
],
|
|
650
817
|
"isESM": true,
|
|
651
818
|
"relativePath": [
|
|
652
819
|
"dist",
|
|
653
820
|
"commands",
|
|
654
|
-
"
|
|
655
|
-
"
|
|
821
|
+
"blueprints",
|
|
822
|
+
"doctor.js"
|
|
656
823
|
]
|
|
657
824
|
},
|
|
658
|
-
"
|
|
825
|
+
"blueprints:info": {
|
|
659
826
|
"aliases": [],
|
|
660
|
-
"args": {
|
|
661
|
-
|
|
662
|
-
"description": "The name of the Sanity Function",
|
|
663
|
-
"name": "name",
|
|
664
|
-
"required": false
|
|
665
|
-
}
|
|
666
|
-
},
|
|
667
|
-
"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.",
|
|
827
|
+
"args": {},
|
|
828
|
+
"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.",
|
|
668
829
|
"examples": [
|
|
669
|
-
"<%= config.bin %> <%= command.id %>
|
|
670
|
-
"<%= config.bin %> <%= command.id %> <name>
|
|
671
|
-
"<%= config.bin %> <%= command.id %> <
|
|
672
|
-
"<%= config.bin %> <%= command.id %> <
|
|
830
|
+
"<%= config.bin %> <%= command.id %>",
|
|
831
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
832
|
+
"<%= config.bin %> <%= command.id %> --project-id <id> --stack <name-or-id>",
|
|
833
|
+
"<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
|
|
673
834
|
],
|
|
674
835
|
"flags": {
|
|
675
836
|
"json": {
|
|
@@ -713,8 +874,10 @@
|
|
|
713
874
|
"type": "boolean"
|
|
714
875
|
},
|
|
715
876
|
"stack": {
|
|
716
|
-
"
|
|
717
|
-
|
|
877
|
+
"aliases": [
|
|
878
|
+
"id"
|
|
879
|
+
],
|
|
880
|
+
"description": "Stack name or ID",
|
|
718
881
|
"name": "stack",
|
|
719
882
|
"hasDynamicHelp": false,
|
|
720
883
|
"multiple": false,
|
|
@@ -748,255 +911,48 @@
|
|
|
748
911
|
"hasDynamicHelp": false,
|
|
749
912
|
"multiple": false,
|
|
750
913
|
"type": "option"
|
|
751
|
-
},
|
|
752
|
-
"data": {
|
|
753
|
-
"char": "d",
|
|
754
|
-
"description": "Data to send to the function",
|
|
755
|
-
"exclusive": [
|
|
756
|
-
"file",
|
|
757
|
-
"document-id"
|
|
758
|
-
],
|
|
759
|
-
"name": "data",
|
|
760
|
-
"required": false,
|
|
761
|
-
"hasDynamicHelp": false,
|
|
762
|
-
"multiple": false,
|
|
763
|
-
"type": "option"
|
|
764
|
-
},
|
|
765
|
-
"data-before": {
|
|
766
|
-
"description": "Original document",
|
|
767
|
-
"exclusive": [
|
|
768
|
-
"data",
|
|
769
|
-
"file",
|
|
770
|
-
"document-id",
|
|
771
|
-
"file-before",
|
|
772
|
-
"file-after",
|
|
773
|
-
"document-id-before",
|
|
774
|
-
"document-id-after"
|
|
775
|
-
],
|
|
776
|
-
"name": "data-before",
|
|
777
|
-
"required": false,
|
|
778
|
-
"hasDynamicHelp": false,
|
|
779
|
-
"multiple": false,
|
|
780
|
-
"type": "option"
|
|
781
|
-
},
|
|
782
|
-
"data-after": {
|
|
783
|
-
"description": "Current document",
|
|
784
|
-
"exclusive": [
|
|
785
|
-
"data",
|
|
786
|
-
"file",
|
|
787
|
-
"document-id",
|
|
788
|
-
"file-before",
|
|
789
|
-
"file-after",
|
|
790
|
-
"document-id-before",
|
|
791
|
-
"document-id-after"
|
|
792
|
-
],
|
|
793
|
-
"name": "data-after",
|
|
794
|
-
"required": false,
|
|
795
|
-
"hasDynamicHelp": false,
|
|
796
|
-
"multiple": false,
|
|
797
|
-
"type": "option"
|
|
798
|
-
},
|
|
799
|
-
"event": {
|
|
800
|
-
"char": "e",
|
|
801
|
-
"description": "Type of event (create, update, delete)",
|
|
802
|
-
"name": "event",
|
|
803
|
-
"required": false,
|
|
804
|
-
"hasDynamicHelp": false,
|
|
805
|
-
"multiple": false,
|
|
806
|
-
"options": [
|
|
807
|
-
"create",
|
|
808
|
-
"update",
|
|
809
|
-
"delete"
|
|
810
|
-
],
|
|
811
|
-
"type": "option"
|
|
812
|
-
},
|
|
813
|
-
"file": {
|
|
814
|
-
"char": "f",
|
|
815
|
-
"description": "Read data from file and send to the function",
|
|
816
|
-
"exclusive": [
|
|
817
|
-
"data",
|
|
818
|
-
"document-id"
|
|
819
|
-
],
|
|
820
|
-
"name": "file",
|
|
821
|
-
"required": false,
|
|
822
|
-
"hasDynamicHelp": false,
|
|
823
|
-
"multiple": false,
|
|
824
|
-
"type": "option"
|
|
825
|
-
},
|
|
826
|
-
"file-before": {
|
|
827
|
-
"description": "Original document",
|
|
828
|
-
"exclusive": [
|
|
829
|
-
"data",
|
|
830
|
-
"file",
|
|
831
|
-
"document-id",
|
|
832
|
-
"data-before",
|
|
833
|
-
"data-after",
|
|
834
|
-
"document-id-before",
|
|
835
|
-
"document-id-after"
|
|
836
|
-
],
|
|
837
|
-
"name": "file-before",
|
|
838
|
-
"required": false,
|
|
839
|
-
"hasDynamicHelp": false,
|
|
840
|
-
"multiple": false,
|
|
841
|
-
"type": "option"
|
|
842
|
-
},
|
|
843
|
-
"file-after": {
|
|
844
|
-
"description": "Current document",
|
|
845
|
-
"exclusive": [
|
|
846
|
-
"data",
|
|
847
|
-
"file",
|
|
848
|
-
"document-id",
|
|
849
|
-
"data-before",
|
|
850
|
-
"data-after",
|
|
851
|
-
"document-id-before",
|
|
852
|
-
"document-id-after"
|
|
853
|
-
],
|
|
854
|
-
"name": "file-after",
|
|
855
|
-
"required": false,
|
|
856
|
-
"hasDynamicHelp": false,
|
|
857
|
-
"multiple": false,
|
|
858
|
-
"type": "option"
|
|
859
|
-
},
|
|
860
|
-
"timeout": {
|
|
861
|
-
"char": "t",
|
|
862
|
-
"description": "Execution timeout value in seconds",
|
|
863
|
-
"name": "timeout",
|
|
864
|
-
"required": false,
|
|
865
|
-
"hasDynamicHelp": false,
|
|
866
|
-
"multiple": false,
|
|
867
|
-
"type": "option"
|
|
868
|
-
},
|
|
869
|
-
"api": {
|
|
870
|
-
"char": "a",
|
|
871
|
-
"description": "Sanity API Version to use",
|
|
872
|
-
"name": "api",
|
|
873
|
-
"required": false,
|
|
874
|
-
"hasDynamicHelp": false,
|
|
875
|
-
"multiple": false,
|
|
876
|
-
"type": "option"
|
|
877
|
-
},
|
|
878
|
-
"dataset": {
|
|
879
|
-
"description": "The Sanity dataset to use",
|
|
880
|
-
"name": "dataset",
|
|
881
|
-
"required": false,
|
|
882
|
-
"hasDynamicHelp": false,
|
|
883
|
-
"multiple": false,
|
|
884
|
-
"type": "option"
|
|
885
|
-
},
|
|
886
|
-
"document-id": {
|
|
887
|
-
"aliases": [
|
|
888
|
-
"doc",
|
|
889
|
-
"documentId"
|
|
890
|
-
],
|
|
891
|
-
"description": "Document to fetch and send to function",
|
|
892
|
-
"exclusive": [
|
|
893
|
-
"data",
|
|
894
|
-
"file"
|
|
895
|
-
],
|
|
896
|
-
"name": "document-id",
|
|
897
|
-
"required": false,
|
|
898
|
-
"hasDynamicHelp": false,
|
|
899
|
-
"multiple": false,
|
|
900
|
-
"type": "option"
|
|
901
|
-
},
|
|
902
|
-
"document-id-before": {
|
|
903
|
-
"description": "Original document",
|
|
904
|
-
"exclusive": [
|
|
905
|
-
"data",
|
|
906
|
-
"file",
|
|
907
|
-
"document-id",
|
|
908
|
-
"data-before",
|
|
909
|
-
"data-after",
|
|
910
|
-
"file-before",
|
|
911
|
-
"file-after"
|
|
912
|
-
],
|
|
913
|
-
"name": "document-id-before",
|
|
914
|
-
"required": false,
|
|
915
|
-
"hasDynamicHelp": false,
|
|
916
|
-
"multiple": false,
|
|
917
|
-
"type": "option"
|
|
918
|
-
},
|
|
919
|
-
"document-id-after": {
|
|
920
|
-
"description": "Current document",
|
|
921
|
-
"exclusive": [
|
|
922
|
-
"data",
|
|
923
|
-
"file",
|
|
924
|
-
"document-id",
|
|
925
|
-
"data-before",
|
|
926
|
-
"data-after",
|
|
927
|
-
"file-before",
|
|
928
|
-
"file-after"
|
|
929
|
-
],
|
|
930
|
-
"name": "document-id-after",
|
|
931
|
-
"required": false,
|
|
932
|
-
"hasDynamicHelp": false,
|
|
933
|
-
"multiple": false,
|
|
934
|
-
"type": "option"
|
|
935
|
-
},
|
|
936
|
-
"with-user-token": {
|
|
937
|
-
"description": "Prime access token from CLI config",
|
|
938
|
-
"name": "with-user-token",
|
|
939
|
-
"allowNo": false,
|
|
940
|
-
"type": "boolean"
|
|
941
|
-
},
|
|
942
|
-
"media-library-id": {
|
|
943
|
-
"aliases": [
|
|
944
|
-
"media"
|
|
945
|
-
],
|
|
946
|
-
"description": "Sanity Media Library ID to use",
|
|
947
|
-
"exclusive": [
|
|
948
|
-
"project-id",
|
|
949
|
-
"dataset"
|
|
950
|
-
],
|
|
951
|
-
"name": "media-library-id",
|
|
952
|
-
"required": false,
|
|
953
|
-
"hasDynamicHelp": false,
|
|
954
|
-
"multiple": false,
|
|
955
|
-
"type": "option"
|
|
956
914
|
}
|
|
957
915
|
},
|
|
958
916
|
"hasDynamicHelp": false,
|
|
959
917
|
"hiddenAliases": [],
|
|
960
|
-
"id": "
|
|
918
|
+
"id": "blueprints:info",
|
|
961
919
|
"pluginAlias": "@sanity/runtime-cli",
|
|
962
920
|
"pluginName": "@sanity/runtime-cli",
|
|
963
921
|
"pluginType": "core",
|
|
964
922
|
"strict": true,
|
|
965
|
-
"summary": "
|
|
923
|
+
"summary": "Display the status and resources of the remote Stack deployment",
|
|
966
924
|
"enableJsonFlag": true,
|
|
967
925
|
"needs": [
|
|
968
|
-
"
|
|
926
|
+
"deployedStack"
|
|
969
927
|
],
|
|
970
928
|
"isESM": true,
|
|
971
929
|
"relativePath": [
|
|
972
930
|
"dist",
|
|
973
931
|
"commands",
|
|
974
|
-
"
|
|
975
|
-
"
|
|
932
|
+
"blueprints",
|
|
933
|
+
"info.js"
|
|
976
934
|
]
|
|
977
935
|
},
|
|
978
|
-
"blueprints:
|
|
936
|
+
"blueprints:init": {
|
|
979
937
|
"aliases": [],
|
|
980
938
|
"args": {
|
|
981
|
-
"
|
|
982
|
-
"description": "
|
|
983
|
-
"name": "
|
|
984
|
-
"options": [
|
|
985
|
-
"function"
|
|
986
|
-
],
|
|
987
|
-
"required": true
|
|
939
|
+
"dir": {
|
|
940
|
+
"description": "Directory to create the local Blueprint in (defaults to the current directory)",
|
|
941
|
+
"name": "dir"
|
|
988
942
|
}
|
|
989
943
|
},
|
|
990
|
-
"
|
|
991
|
-
"to": "functions add"
|
|
992
|
-
},
|
|
993
|
-
"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",
|
|
944
|
+
"description": "A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions, etc.). A Stack is the remote deployment target where your Blueprint is applied.\n[NOTE: Currently, accounts are limited to three (3) Stacks per project scope.]\n\nThis is typically the first command you run in a new project. It creates a local Blueprint manifest file (sanity.blueprint.ts, .js, or .json) and provisions a new remote Stack.\nAdditionally, a Blueprint configuration file is created in .sanity/ containing the scope and Stack IDs. This is .gitignored by default.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.\n\nRunning without a directory prompts to confirm the current directory. Run 'blueprints init .' to initialize in the current directory without a prompt.",
|
|
994
945
|
"examples": [
|
|
995
|
-
"<%= config.bin %> <%= command.id %>
|
|
996
|
-
"<%= config.bin %> <%= command.id %>
|
|
997
|
-
"<%= config.bin %> <%= command.id %>
|
|
998
|
-
"<%= config.bin %> <%= command.id %>
|
|
999
|
-
"<%= config.bin %> <%= command.id %>
|
|
946
|
+
"<%= config.bin %> <%= command.id %>",
|
|
947
|
+
"<%= config.bin %> <%= command.id %> .",
|
|
948
|
+
"<%= config.bin %> <%= command.id %> [directory]",
|
|
949
|
+
"<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts>",
|
|
950
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
951
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
952
|
+
"<%= config.bin %> <%= command.id %> --stack-name <newStackName>",
|
|
953
|
+
"<%= config.bin %> <%= command.id %> --stack-id <existingStackId>",
|
|
954
|
+
"<%= config.bin %> <%= command.id %> new-stack --type <json|js|ts> --org <organizationId> --name <newStackName>",
|
|
955
|
+
"<%= config.bin %> <%= command.id %> old-stack --type <json|js|ts> --project-id <projectId> --stack-id <existingStackId>"
|
|
1000
956
|
],
|
|
1001
957
|
"flags": {
|
|
1002
958
|
"json": {
|
|
@@ -1039,246 +995,41 @@
|
|
|
1039
995
|
"allowNo": false,
|
|
1040
996
|
"type": "boolean"
|
|
1041
997
|
},
|
|
1042
|
-
"
|
|
1043
|
-
"description": "
|
|
1044
|
-
"
|
|
1045
|
-
"name": "stack",
|
|
1046
|
-
"hasDynamicHelp": false,
|
|
1047
|
-
"multiple": false,
|
|
1048
|
-
"type": "option"
|
|
1049
|
-
},
|
|
1050
|
-
"project-id": {
|
|
1051
|
-
"aliases": [
|
|
1052
|
-
"project",
|
|
1053
|
-
"projectId"
|
|
1054
|
-
],
|
|
1055
|
-
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1056
|
-
"exclusive": [
|
|
1057
|
-
"organization-id"
|
|
1058
|
-
],
|
|
1059
|
-
"hidden": true,
|
|
1060
|
-
"name": "project-id",
|
|
1061
|
-
"hasDynamicHelp": false,
|
|
1062
|
-
"multiple": false,
|
|
1063
|
-
"type": "option"
|
|
1064
|
-
},
|
|
1065
|
-
"organization-id": {
|
|
1066
|
-
"aliases": [
|
|
1067
|
-
"organization",
|
|
1068
|
-
"organizationId",
|
|
1069
|
-
"org"
|
|
1070
|
-
],
|
|
1071
|
-
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1072
|
-
"exclusive": [
|
|
1073
|
-
"project-id"
|
|
1074
|
-
],
|
|
1075
|
-
"hidden": true,
|
|
1076
|
-
"name": "organization-id",
|
|
1077
|
-
"hasDynamicHelp": false,
|
|
1078
|
-
"multiple": false,
|
|
1079
|
-
"type": "option"
|
|
1080
|
-
},
|
|
1081
|
-
"example": {
|
|
1082
|
-
"aliases": [
|
|
1083
|
-
"recipe"
|
|
1084
|
-
],
|
|
1085
|
-
"description": "Example to use for the function resource. Discover examples at https://www.sanity.io/exchange/type=recipes/by=sanity",
|
|
1086
|
-
"exclusive": [
|
|
1087
|
-
"name",
|
|
1088
|
-
"fn-type",
|
|
1089
|
-
"language",
|
|
1090
|
-
"javascript",
|
|
1091
|
-
"fn-helpers",
|
|
1092
|
-
"fn-installer"
|
|
1093
|
-
],
|
|
1094
|
-
"name": "example",
|
|
1095
|
-
"hasDynamicHelp": false,
|
|
1096
|
-
"multiple": false,
|
|
1097
|
-
"type": "option"
|
|
1098
|
-
},
|
|
1099
|
-
"name": {
|
|
1100
|
-
"char": "n",
|
|
1101
|
-
"description": "Name of the resource to add",
|
|
1102
|
-
"name": "name",
|
|
1103
|
-
"hasDynamicHelp": false,
|
|
1104
|
-
"multiple": false,
|
|
1105
|
-
"type": "option"
|
|
1106
|
-
},
|
|
1107
|
-
"fn-type": {
|
|
1108
|
-
"aliases": [
|
|
1109
|
-
"function-type"
|
|
1110
|
-
],
|
|
1111
|
-
"dependsOn": [
|
|
1112
|
-
"name"
|
|
1113
|
-
],
|
|
1114
|
-
"description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
|
|
1115
|
-
"name": "fn-type",
|
|
1116
|
-
"hasDynamicHelp": false,
|
|
1117
|
-
"multiple": true,
|
|
1118
|
-
"options": [
|
|
1119
|
-
"document-publish",
|
|
1120
|
-
"document-create",
|
|
1121
|
-
"document-delete",
|
|
1122
|
-
"document-update",
|
|
1123
|
-
"media-library-asset-create",
|
|
1124
|
-
"media-library-asset-delete",
|
|
1125
|
-
"media-library-asset-update",
|
|
1126
|
-
"scheduled-function",
|
|
1127
|
-
"sync-tag-invalidate"
|
|
1128
|
-
],
|
|
1129
|
-
"type": "option"
|
|
1130
|
-
},
|
|
1131
|
-
"language": {
|
|
1132
|
-
"aliases": [
|
|
1133
|
-
"function-language",
|
|
1134
|
-
"fn-language",
|
|
1135
|
-
"lang"
|
|
1136
|
-
],
|
|
1137
|
-
"description": "Language of the new function",
|
|
1138
|
-
"name": "language",
|
|
1139
|
-
"default": "ts",
|
|
1140
|
-
"hasDynamicHelp": false,
|
|
1141
|
-
"multiple": false,
|
|
1142
|
-
"options": [
|
|
1143
|
-
"ts",
|
|
1144
|
-
"js"
|
|
1145
|
-
],
|
|
1146
|
-
"type": "option"
|
|
1147
|
-
},
|
|
1148
|
-
"javascript": {
|
|
1149
|
-
"aliases": [
|
|
1150
|
-
"js"
|
|
1151
|
-
],
|
|
1152
|
-
"description": "Use JavaScript instead of TypeScript",
|
|
1153
|
-
"exclusive": [
|
|
1154
|
-
"language"
|
|
1155
|
-
],
|
|
1156
|
-
"name": "javascript",
|
|
1157
|
-
"allowNo": false,
|
|
1158
|
-
"type": "boolean"
|
|
1159
|
-
},
|
|
1160
|
-
"fn-helpers": {
|
|
1161
|
-
"aliases": [
|
|
1162
|
-
"function-helpers",
|
|
1163
|
-
"helpers"
|
|
1164
|
-
],
|
|
1165
|
-
"description": "Add helpers to the new function",
|
|
1166
|
-
"name": "fn-helpers",
|
|
1167
|
-
"allowNo": true,
|
|
1168
|
-
"type": "boolean"
|
|
1169
|
-
},
|
|
1170
|
-
"fn-installer": {
|
|
1171
|
-
"aliases": [
|
|
1172
|
-
"function-installer",
|
|
1173
|
-
"installer"
|
|
1174
|
-
],
|
|
1175
|
-
"description": "Which package manager to use when installing the @sanity/functions helpers",
|
|
1176
|
-
"name": "fn-installer",
|
|
1177
|
-
"hasDynamicHelp": false,
|
|
1178
|
-
"multiple": false,
|
|
1179
|
-
"options": [
|
|
1180
|
-
"skip",
|
|
1181
|
-
"npm",
|
|
1182
|
-
"pnpm",
|
|
1183
|
-
"yarn"
|
|
1184
|
-
],
|
|
1185
|
-
"type": "option"
|
|
1186
|
-
},
|
|
1187
|
-
"install": {
|
|
1188
|
-
"char": "i",
|
|
1189
|
-
"description": "Shortcut for --fn-installer npm",
|
|
1190
|
-
"exclusive": [
|
|
1191
|
-
"fn-installer"
|
|
1192
|
-
],
|
|
1193
|
-
"name": "install",
|
|
1194
|
-
"allowNo": false,
|
|
1195
|
-
"type": "boolean"
|
|
1196
|
-
}
|
|
1197
|
-
},
|
|
1198
|
-
"hasDynamicHelp": false,
|
|
1199
|
-
"hiddenAliases": [],
|
|
1200
|
-
"id": "blueprints:add",
|
|
1201
|
-
"pluginAlias": "@sanity/runtime-cli",
|
|
1202
|
-
"pluginName": "@sanity/runtime-cli",
|
|
1203
|
-
"pluginType": "core",
|
|
1204
|
-
"state": "deprecated",
|
|
1205
|
-
"strict": true,
|
|
1206
|
-
"summary": "[deprecated] Use \"functions add\" instead",
|
|
1207
|
-
"enableJsonFlag": true,
|
|
1208
|
-
"needs": [
|
|
1209
|
-
"blueprint"
|
|
1210
|
-
],
|
|
1211
|
-
"isESM": true,
|
|
1212
|
-
"relativePath": [
|
|
1213
|
-
"dist",
|
|
1214
|
-
"commands",
|
|
1215
|
-
"blueprints",
|
|
1216
|
-
"add.js"
|
|
1217
|
-
]
|
|
1218
|
-
},
|
|
1219
|
-
"blueprints:config": {
|
|
1220
|
-
"aliases": [],
|
|
1221
|
-
"args": {},
|
|
1222
|
-
"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.",
|
|
1223
|
-
"examples": [
|
|
1224
|
-
"<%= config.bin %> <%= command.id %>",
|
|
1225
|
-
"<%= config.bin %> <%= command.id %> --edit",
|
|
1226
|
-
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId>",
|
|
1227
|
-
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack <name-or-id>"
|
|
1228
|
-
],
|
|
1229
|
-
"flags": {
|
|
1230
|
-
"json": {
|
|
1231
|
-
"description": "Format output as json",
|
|
1232
|
-
"name": "json",
|
|
1233
|
-
"allowNo": false,
|
|
1234
|
-
"type": "boolean"
|
|
1235
|
-
},
|
|
1236
|
-
"path": {
|
|
1237
|
-
"aliases": [
|
|
1238
|
-
"blueprint-path"
|
|
1239
|
-
],
|
|
1240
|
-
"char": "p",
|
|
1241
|
-
"description": "Path to a Blueprint file or directory containing one",
|
|
1242
|
-
"env": "SANITY_BLUEPRINT_PATH",
|
|
1243
|
-
"hidden": true,
|
|
1244
|
-
"name": "path",
|
|
998
|
+
"dir": {
|
|
999
|
+
"description": "Directory to create the local Blueprint in",
|
|
1000
|
+
"name": "dir",
|
|
1245
1001
|
"hasDynamicHelp": false,
|
|
1246
|
-
"multiple": false,
|
|
1247
|
-
"type": "option"
|
|
1248
|
-
},
|
|
1249
|
-
"trace": {
|
|
1250
|
-
"description": "Trace output",
|
|
1251
|
-
"hidden": true,
|
|
1252
|
-
"name": "trace",
|
|
1253
|
-
"allowNo": false,
|
|
1254
|
-
"type": "boolean"
|
|
1255
|
-
},
|
|
1256
|
-
"validate-resources": {
|
|
1257
|
-
"description": "Validate resources",
|
|
1258
|
-
"hidden": true,
|
|
1259
|
-
"name": "validate-resources",
|
|
1260
|
-
"allowNo": true,
|
|
1261
|
-
"type": "boolean"
|
|
1262
|
-
},
|
|
1263
|
-
"verbose": {
|
|
1264
|
-
"description": "Verbose output",
|
|
1265
|
-
"hidden": true,
|
|
1266
|
-
"name": "verbose",
|
|
1267
|
-
"allowNo": false,
|
|
1268
|
-
"type": "boolean"
|
|
1002
|
+
"multiple": false,
|
|
1003
|
+
"type": "option"
|
|
1269
1004
|
},
|
|
1270
|
-
"
|
|
1005
|
+
"example": {
|
|
1271
1006
|
"aliases": [
|
|
1007
|
+
"recipe"
|
|
1008
|
+
],
|
|
1009
|
+
"description": "Example to use for the local Blueprint",
|
|
1010
|
+
"exclusive": [
|
|
1011
|
+
"blueprint-type",
|
|
1272
1012
|
"stack-id",
|
|
1273
|
-
"
|
|
1013
|
+
"stack-name"
|
|
1274
1014
|
],
|
|
1275
|
-
"
|
|
1276
|
-
|
|
1015
|
+
"name": "example",
|
|
1016
|
+
"hasDynamicHelp": false,
|
|
1017
|
+
"multiple": false,
|
|
1018
|
+
"type": "option"
|
|
1019
|
+
},
|
|
1020
|
+
"blueprint-type": {
|
|
1021
|
+
"aliases": [
|
|
1022
|
+
"type"
|
|
1277
1023
|
],
|
|
1278
|
-
"description": "
|
|
1279
|
-
"name": "
|
|
1024
|
+
"description": "Blueprint manifest type to use for the local Blueprint",
|
|
1025
|
+
"name": "blueprint-type",
|
|
1280
1026
|
"hasDynamicHelp": false,
|
|
1281
1027
|
"multiple": false,
|
|
1028
|
+
"options": [
|
|
1029
|
+
"json",
|
|
1030
|
+
"js",
|
|
1031
|
+
"ts"
|
|
1032
|
+
],
|
|
1282
1033
|
"type": "option"
|
|
1283
1034
|
},
|
|
1284
1035
|
"project-id": {
|
|
@@ -1286,9 +1037,6 @@
|
|
|
1286
1037
|
"project",
|
|
1287
1038
|
"projectId"
|
|
1288
1039
|
],
|
|
1289
|
-
"dependsOn": [
|
|
1290
|
-
"edit"
|
|
1291
|
-
],
|
|
1292
1040
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1293
1041
|
"exclusive": [
|
|
1294
1042
|
"organization-id"
|
|
@@ -1304,9 +1052,6 @@
|
|
|
1304
1052
|
"organizationId",
|
|
1305
1053
|
"org"
|
|
1306
1054
|
],
|
|
1307
|
-
"dependsOn": [
|
|
1308
|
-
"edit"
|
|
1309
|
-
],
|
|
1310
1055
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1311
1056
|
"exclusive": [
|
|
1312
1057
|
"project-id"
|
|
@@ -1316,47 +1061,79 @@
|
|
|
1316
1061
|
"multiple": false,
|
|
1317
1062
|
"type": "option"
|
|
1318
1063
|
},
|
|
1319
|
-
"
|
|
1320
|
-
"
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
"
|
|
1324
|
-
"
|
|
1064
|
+
"stack-id": {
|
|
1065
|
+
"aliases": [
|
|
1066
|
+
"stackId"
|
|
1067
|
+
],
|
|
1068
|
+
"description": "Existing Stack ID used to scope local Blueprint",
|
|
1069
|
+
"exclusive": [
|
|
1070
|
+
"stack-name"
|
|
1071
|
+
],
|
|
1072
|
+
"name": "stack-id",
|
|
1073
|
+
"relationships": [
|
|
1074
|
+
{
|
|
1075
|
+
"type": "some",
|
|
1076
|
+
"flags": [
|
|
1077
|
+
"project-id",
|
|
1078
|
+
"organization-id"
|
|
1079
|
+
]
|
|
1080
|
+
}
|
|
1081
|
+
],
|
|
1082
|
+
"hasDynamicHelp": false,
|
|
1083
|
+
"multiple": false,
|
|
1084
|
+
"type": "option"
|
|
1085
|
+
},
|
|
1086
|
+
"stack-name": {
|
|
1087
|
+
"aliases": [
|
|
1088
|
+
"name"
|
|
1089
|
+
],
|
|
1090
|
+
"description": "Name to use for a new Stack provisioned during initialization",
|
|
1091
|
+
"exclusive": [
|
|
1092
|
+
"stack-id"
|
|
1093
|
+
],
|
|
1094
|
+
"name": "stack-name",
|
|
1095
|
+
"relationships": [
|
|
1096
|
+
{
|
|
1097
|
+
"type": "some",
|
|
1098
|
+
"flags": [
|
|
1099
|
+
"project-id",
|
|
1100
|
+
"organization-id"
|
|
1101
|
+
]
|
|
1102
|
+
}
|
|
1103
|
+
],
|
|
1104
|
+
"hasDynamicHelp": false,
|
|
1105
|
+
"multiple": false,
|
|
1106
|
+
"type": "option"
|
|
1325
1107
|
}
|
|
1326
1108
|
},
|
|
1327
1109
|
"hasDynamicHelp": false,
|
|
1328
1110
|
"hiddenAliases": [],
|
|
1329
|
-
"id": "blueprints:
|
|
1111
|
+
"id": "blueprints:init",
|
|
1330
1112
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1331
1113
|
"pluginName": "@sanity/runtime-cli",
|
|
1332
1114
|
"pluginType": "core",
|
|
1333
1115
|
"strict": true,
|
|
1334
|
-
"summary": "
|
|
1116
|
+
"summary": "Initialize a Blueprint and create a remote Stack",
|
|
1335
1117
|
"enableJsonFlag": true,
|
|
1336
|
-
"needs": [
|
|
1337
|
-
"token",
|
|
1338
|
-
"blueprint"
|
|
1339
|
-
],
|
|
1340
1118
|
"isESM": true,
|
|
1341
1119
|
"relativePath": [
|
|
1342
1120
|
"dist",
|
|
1343
1121
|
"commands",
|
|
1344
1122
|
"blueprints",
|
|
1345
|
-
"
|
|
1123
|
+
"init.js"
|
|
1346
1124
|
]
|
|
1347
1125
|
},
|
|
1348
|
-
"blueprints:
|
|
1126
|
+
"blueprints:logs": {
|
|
1349
1127
|
"aliases": [],
|
|
1350
1128
|
"args": {},
|
|
1351
|
-
"description": "
|
|
1129
|
+
"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'.",
|
|
1352
1130
|
"examples": [
|
|
1353
1131
|
"<%= config.bin %> <%= command.id %>",
|
|
1354
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1355
|
-
"<%= config.bin %> <%= command.id %> --no-wait",
|
|
1356
|
-
"<%= config.bin %> <%= command.id %> --fn-installer npm",
|
|
1132
|
+
"<%= config.bin %> <%= command.id %> --watch",
|
|
1357
1133
|
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
1358
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1359
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1134
|
+
"<%= config.bin %> <%= command.id %> --limit 500",
|
|
1135
|
+
"<%= config.bin %> <%= command.id %> --since 2026-05-01T00:00:00Z",
|
|
1136
|
+
"<%= config.bin %> <%= command.id %> --before 2026-05-01T00:00:00Z"
|
|
1360
1137
|
],
|
|
1361
1138
|
"flags": {
|
|
1362
1139
|
"json": {
|
|
@@ -1435,40 +1212,43 @@
|
|
|
1435
1212
|
"multiple": false,
|
|
1436
1213
|
"type": "option"
|
|
1437
1214
|
},
|
|
1438
|
-
"
|
|
1439
|
-
"
|
|
1440
|
-
|
|
1441
|
-
|
|
1215
|
+
"watch": {
|
|
1216
|
+
"aliases": [
|
|
1217
|
+
"follow"
|
|
1218
|
+
],
|
|
1219
|
+
"char": "w",
|
|
1220
|
+
"description": "Watch for new Stack logs",
|
|
1221
|
+
"name": "watch",
|
|
1222
|
+
"allowNo": false,
|
|
1223
|
+
"type": "boolean"
|
|
1224
|
+
},
|
|
1225
|
+
"limit": {
|
|
1226
|
+
"char": "l",
|
|
1227
|
+
"description": "Maximum number of log entries to retrieve (1-500)",
|
|
1228
|
+
"exclusive": [
|
|
1229
|
+
"watch"
|
|
1230
|
+
],
|
|
1231
|
+
"name": "limit",
|
|
1442
1232
|
"hasDynamicHelp": false,
|
|
1443
1233
|
"multiple": false,
|
|
1444
1234
|
"type": "option"
|
|
1445
1235
|
},
|
|
1446
|
-
"
|
|
1447
|
-
"
|
|
1448
|
-
|
|
1449
|
-
"
|
|
1236
|
+
"since": {
|
|
1237
|
+
"description": "Only show logs after this ISO 8601 timestamp",
|
|
1238
|
+
"exclusive": [
|
|
1239
|
+
"watch"
|
|
1450
1240
|
],
|
|
1451
|
-
"
|
|
1452
|
-
"hidden": true,
|
|
1453
|
-
"name": "fn-installer",
|
|
1241
|
+
"name": "since",
|
|
1454
1242
|
"hasDynamicHelp": false,
|
|
1455
1243
|
"multiple": false,
|
|
1456
|
-
"options": [
|
|
1457
|
-
"npm",
|
|
1458
|
-
"pnpm",
|
|
1459
|
-
"yarn"
|
|
1460
|
-
],
|
|
1461
1244
|
"type": "option"
|
|
1462
1245
|
},
|
|
1463
|
-
"
|
|
1464
|
-
"description": "
|
|
1465
|
-
"
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
"new-stack-name": {
|
|
1470
|
-
"description": "Set a new name for the Stack",
|
|
1471
|
-
"name": "new-stack-name",
|
|
1246
|
+
"before": {
|
|
1247
|
+
"description": "Only show logs before this ISO 8601 timestamp",
|
|
1248
|
+
"exclusive": [
|
|
1249
|
+
"watch"
|
|
1250
|
+
],
|
|
1251
|
+
"name": "before",
|
|
1472
1252
|
"hasDynamicHelp": false,
|
|
1473
1253
|
"multiple": false,
|
|
1474
1254
|
"type": "option"
|
|
@@ -1476,32 +1256,36 @@
|
|
|
1476
1256
|
},
|
|
1477
1257
|
"hasDynamicHelp": false,
|
|
1478
1258
|
"hiddenAliases": [],
|
|
1479
|
-
"id": "blueprints:
|
|
1259
|
+
"id": "blueprints:logs",
|
|
1480
1260
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1481
1261
|
"pluginName": "@sanity/runtime-cli",
|
|
1482
1262
|
"pluginType": "core",
|
|
1483
1263
|
"strict": true,
|
|
1484
|
-
"summary": "
|
|
1264
|
+
"summary": "Display logs for the current Blueprint's Stack deployment",
|
|
1485
1265
|
"enableJsonFlag": true,
|
|
1486
1266
|
"needs": [
|
|
1487
|
-
"deployedStack"
|
|
1488
|
-
"blueprint"
|
|
1267
|
+
"deployedStack"
|
|
1489
1268
|
],
|
|
1490
1269
|
"isESM": true,
|
|
1491
1270
|
"relativePath": [
|
|
1492
1271
|
"dist",
|
|
1493
1272
|
"commands",
|
|
1494
1273
|
"blueprints",
|
|
1495
|
-
"
|
|
1274
|
+
"logs.js"
|
|
1496
1275
|
]
|
|
1497
1276
|
},
|
|
1498
|
-
"blueprints:
|
|
1277
|
+
"blueprints:mint-deploy-token": {
|
|
1499
1278
|
"aliases": [],
|
|
1500
1279
|
"args": {},
|
|
1501
|
-
"description": "
|
|
1280
|
+
"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.",
|
|
1502
1281
|
"examples": [
|
|
1503
1282
|
"<%= config.bin %> <%= command.id %>",
|
|
1504
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1283
|
+
"<%= config.bin %> <%= command.id %> --label \"ci-deploy\"",
|
|
1284
|
+
"<%= config.bin %> <%= command.id %> --print",
|
|
1285
|
+
"export SANITY_AUTH_TOKEN=$(<%= config.bin %> <%= command.id %> --print)",
|
|
1286
|
+
"<%= config.bin %> <%= command.id %> --json",
|
|
1287
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
1288
|
+
"<%= config.bin %> <%= command.id %> --organization-id <orgId>"
|
|
1505
1289
|
],
|
|
1506
1290
|
"flags": {
|
|
1507
1291
|
"json": {
|
|
@@ -1545,11 +1329,8 @@
|
|
|
1545
1329
|
"type": "boolean"
|
|
1546
1330
|
},
|
|
1547
1331
|
"stack": {
|
|
1548
|
-
"
|
|
1549
|
-
|
|
1550
|
-
"stackId"
|
|
1551
|
-
],
|
|
1552
|
-
"description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
|
|
1332
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1333
|
+
"hidden": true,
|
|
1553
1334
|
"name": "stack",
|
|
1554
1335
|
"hasDynamicHelp": false,
|
|
1555
1336
|
"multiple": false,
|
|
@@ -1560,10 +1341,6 @@
|
|
|
1560
1341
|
"project",
|
|
1561
1342
|
"projectId"
|
|
1562
1343
|
],
|
|
1563
|
-
"dependsOn": [
|
|
1564
|
-
"stack",
|
|
1565
|
-
"force"
|
|
1566
|
-
],
|
|
1567
1344
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1568
1345
|
"exclusive": [
|
|
1569
1346
|
"organization-id"
|
|
@@ -1579,10 +1356,6 @@
|
|
|
1579
1356
|
"organizationId",
|
|
1580
1357
|
"org"
|
|
1581
1358
|
],
|
|
1582
|
-
"dependsOn": [
|
|
1583
|
-
"stack",
|
|
1584
|
-
"force"
|
|
1585
|
-
],
|
|
1586
1359
|
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1587
1360
|
"exclusive": [
|
|
1588
1361
|
"project-id"
|
|
@@ -1592,30 +1365,32 @@
|
|
|
1592
1365
|
"multiple": false,
|
|
1593
1366
|
"type": "option"
|
|
1594
1367
|
},
|
|
1595
|
-
"
|
|
1596
|
-
"
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
"
|
|
1600
|
-
"
|
|
1601
|
-
"allowNo": false,
|
|
1602
|
-
"type": "boolean"
|
|
1368
|
+
"label": {
|
|
1369
|
+
"description": "Human-readable label for the robot. Defaults to a generated value.",
|
|
1370
|
+
"name": "label",
|
|
1371
|
+
"hasDynamicHelp": false,
|
|
1372
|
+
"multiple": false,
|
|
1373
|
+
"type": "option"
|
|
1603
1374
|
},
|
|
1604
|
-
"
|
|
1605
|
-
"
|
|
1606
|
-
"
|
|
1375
|
+
"print": {
|
|
1376
|
+
"char": "P",
|
|
1377
|
+
"description": "Print only the raw token to stdout (suitable for shell substitution)",
|
|
1378
|
+
"exclusive": [
|
|
1379
|
+
"json"
|
|
1380
|
+
],
|
|
1381
|
+
"name": "print",
|
|
1607
1382
|
"allowNo": false,
|
|
1608
1383
|
"type": "boolean"
|
|
1609
1384
|
}
|
|
1610
1385
|
},
|
|
1611
1386
|
"hasDynamicHelp": false,
|
|
1612
1387
|
"hiddenAliases": [],
|
|
1613
|
-
"id": "blueprints:
|
|
1388
|
+
"id": "blueprints:mint-deploy-token",
|
|
1614
1389
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1615
1390
|
"pluginName": "@sanity/runtime-cli",
|
|
1616
1391
|
"pluginType": "core",
|
|
1617
1392
|
"strict": true,
|
|
1618
|
-
"summary": "
|
|
1393
|
+
"summary": "Create a robot API token for deploying Blueprints from CI/CD",
|
|
1619
1394
|
"enableJsonFlag": true,
|
|
1620
1395
|
"needs": [
|
|
1621
1396
|
"scope"
|
|
@@ -1625,16 +1400,17 @@
|
|
|
1625
1400
|
"dist",
|
|
1626
1401
|
"commands",
|
|
1627
1402
|
"blueprints",
|
|
1628
|
-
"
|
|
1403
|
+
"mint-deploy-token.js"
|
|
1629
1404
|
]
|
|
1630
1405
|
},
|
|
1631
|
-
"blueprints:
|
|
1406
|
+
"blueprints:plan": {
|
|
1632
1407
|
"aliases": [],
|
|
1633
1408
|
"args": {},
|
|
1634
|
-
"description": "
|
|
1409
|
+
"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.",
|
|
1635
1410
|
"examples": [
|
|
1636
1411
|
"<%= config.bin %> <%= command.id %>",
|
|
1637
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1412
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
1413
|
+
"<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
|
|
1638
1414
|
],
|
|
1639
1415
|
"flags": {
|
|
1640
1416
|
"json": {
|
|
@@ -1650,6 +1426,7 @@
|
|
|
1650
1426
|
"char": "p",
|
|
1651
1427
|
"description": "Path to a Blueprint file or directory containing one",
|
|
1652
1428
|
"env": "SANITY_BLUEPRINT_PATH",
|
|
1429
|
+
"hidden": true,
|
|
1653
1430
|
"name": "path",
|
|
1654
1431
|
"hasDynamicHelp": false,
|
|
1655
1432
|
"multiple": false,
|
|
@@ -1670,44 +1447,79 @@
|
|
|
1670
1447
|
"type": "boolean"
|
|
1671
1448
|
},
|
|
1672
1449
|
"verbose": {
|
|
1673
|
-
"description": "Verbose output
|
|
1450
|
+
"description": "Verbose output",
|
|
1451
|
+
"hidden": true,
|
|
1674
1452
|
"name": "verbose",
|
|
1675
|
-
"allowNo":
|
|
1453
|
+
"allowNo": false,
|
|
1676
1454
|
"type": "boolean"
|
|
1677
1455
|
},
|
|
1678
|
-
"
|
|
1679
|
-
"description": "
|
|
1680
|
-
"name": "
|
|
1681
|
-
"
|
|
1682
|
-
"
|
|
1456
|
+
"stack": {
|
|
1457
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1458
|
+
"name": "stack",
|
|
1459
|
+
"hasDynamicHelp": false,
|
|
1460
|
+
"multiple": false,
|
|
1461
|
+
"type": "option"
|
|
1462
|
+
},
|
|
1463
|
+
"project-id": {
|
|
1464
|
+
"aliases": [
|
|
1465
|
+
"project",
|
|
1466
|
+
"projectId"
|
|
1467
|
+
],
|
|
1468
|
+
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1469
|
+
"exclusive": [
|
|
1470
|
+
"organization-id"
|
|
1471
|
+
],
|
|
1472
|
+
"name": "project-id",
|
|
1473
|
+
"hasDynamicHelp": false,
|
|
1474
|
+
"multiple": false,
|
|
1475
|
+
"type": "option"
|
|
1476
|
+
},
|
|
1477
|
+
"organization-id": {
|
|
1478
|
+
"aliases": [
|
|
1479
|
+
"organization",
|
|
1480
|
+
"organizationId",
|
|
1481
|
+
"org"
|
|
1482
|
+
],
|
|
1483
|
+
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
1484
|
+
"exclusive": [
|
|
1485
|
+
"project-id"
|
|
1486
|
+
],
|
|
1487
|
+
"name": "organization-id",
|
|
1488
|
+
"hasDynamicHelp": false,
|
|
1489
|
+
"multiple": false,
|
|
1490
|
+
"type": "option"
|
|
1683
1491
|
}
|
|
1684
1492
|
},
|
|
1685
1493
|
"hasDynamicHelp": false,
|
|
1686
1494
|
"hiddenAliases": [],
|
|
1687
|
-
"id": "blueprints:
|
|
1495
|
+
"id": "blueprints:plan",
|
|
1688
1496
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1689
1497
|
"pluginName": "@sanity/runtime-cli",
|
|
1690
1498
|
"pluginType": "core",
|
|
1691
1499
|
"strict": true,
|
|
1692
|
-
"summary": "
|
|
1500
|
+
"summary": "Preview changes that will be applied to the remote Stack",
|
|
1693
1501
|
"enableJsonFlag": true,
|
|
1502
|
+
"needs": [
|
|
1503
|
+
"token",
|
|
1504
|
+
"blueprint"
|
|
1505
|
+
],
|
|
1694
1506
|
"isESM": true,
|
|
1695
1507
|
"relativePath": [
|
|
1696
1508
|
"dist",
|
|
1697
1509
|
"commands",
|
|
1698
1510
|
"blueprints",
|
|
1699
|
-
"
|
|
1511
|
+
"plan.js"
|
|
1700
1512
|
]
|
|
1701
1513
|
},
|
|
1702
|
-
"blueprints:
|
|
1514
|
+
"blueprints:promote": {
|
|
1703
1515
|
"aliases": [],
|
|
1704
1516
|
"args": {},
|
|
1705
|
-
"description": "
|
|
1517
|
+
"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.",
|
|
1706
1518
|
"examples": [
|
|
1707
1519
|
"<%= config.bin %> <%= command.id %>",
|
|
1708
1520
|
"<%= config.bin %> <%= command.id %> --stack <name-or-id>",
|
|
1709
|
-
"<%= config.bin %> <%= command.id %> --project-id <
|
|
1710
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1521
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId> --stack <name-or-id>",
|
|
1522
|
+
"<%= config.bin %> <%= command.id %> --new-stack-name <new-name>"
|
|
1711
1523
|
],
|
|
1712
1524
|
"flags": {
|
|
1713
1525
|
"json": {
|
|
@@ -1754,7 +1566,7 @@
|
|
|
1754
1566
|
"aliases": [
|
|
1755
1567
|
"id"
|
|
1756
1568
|
],
|
|
1757
|
-
"description": "Stack name or ID",
|
|
1569
|
+
"description": "Stack name or ID to promote",
|
|
1758
1570
|
"name": "stack",
|
|
1759
1571
|
"hasDynamicHelp": false,
|
|
1760
1572
|
"multiple": false,
|
|
@@ -1784,52 +1596,56 @@
|
|
|
1784
1596
|
"exclusive": [
|
|
1785
1597
|
"project-id"
|
|
1786
1598
|
],
|
|
1599
|
+
"hidden": true,
|
|
1787
1600
|
"name": "organization-id",
|
|
1788
1601
|
"hasDynamicHelp": false,
|
|
1789
1602
|
"multiple": false,
|
|
1790
1603
|
"type": "option"
|
|
1604
|
+
},
|
|
1605
|
+
"force": {
|
|
1606
|
+
"description": "Skip confirmation prompt",
|
|
1607
|
+
"name": "force",
|
|
1608
|
+
"allowNo": false,
|
|
1609
|
+
"type": "boolean"
|
|
1610
|
+
},
|
|
1611
|
+
"new-stack-name": {
|
|
1612
|
+
"description": "Set a new name for the Stack while promoting",
|
|
1613
|
+
"name": "new-stack-name",
|
|
1614
|
+
"hasDynamicHelp": false,
|
|
1615
|
+
"multiple": false,
|
|
1616
|
+
"type": "option"
|
|
1791
1617
|
}
|
|
1792
1618
|
},
|
|
1793
1619
|
"hasDynamicHelp": false,
|
|
1794
1620
|
"hiddenAliases": [],
|
|
1795
|
-
"id": "blueprints:
|
|
1621
|
+
"id": "blueprints:promote",
|
|
1796
1622
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1797
1623
|
"pluginName": "@sanity/runtime-cli",
|
|
1798
1624
|
"pluginType": "core",
|
|
1799
1625
|
"strict": true,
|
|
1800
|
-
"summary": "
|
|
1626
|
+
"summary": "Promote a Stack from project scope to organization scope",
|
|
1801
1627
|
"enableJsonFlag": true,
|
|
1802
1628
|
"needs": [
|
|
1803
|
-
"deployedStack"
|
|
1629
|
+
"deployedStack",
|
|
1630
|
+
"blueprint"
|
|
1804
1631
|
],
|
|
1805
1632
|
"isESM": true,
|
|
1806
1633
|
"relativePath": [
|
|
1807
1634
|
"dist",
|
|
1808
1635
|
"commands",
|
|
1809
1636
|
"blueprints",
|
|
1810
|
-
"
|
|
1637
|
+
"promote.js"
|
|
1811
1638
|
]
|
|
1812
1639
|
},
|
|
1813
|
-
"blueprints:
|
|
1640
|
+
"blueprints:stacks": {
|
|
1814
1641
|
"aliases": [],
|
|
1815
|
-
"args": {
|
|
1816
|
-
|
|
1817
|
-
"description": "Directory to create the local Blueprint in (defaults to the current directory)",
|
|
1818
|
-
"name": "dir"
|
|
1819
|
-
}
|
|
1820
|
-
},
|
|
1821
|
-
"description": "A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions, etc.). A Stack is the remote deployment target where your Blueprint is applied.\n[NOTE: Currently, accounts are limited to three (3) Stacks per project scope.]\n\nThis is typically the first command you run in a new project. It creates a local Blueprint manifest file (sanity.blueprint.ts, .js, or .json) and provisions a new remote Stack.\nAdditionally, a Blueprint configuration file is created in .sanity/ containing the scope and Stack IDs. This is .gitignored by default.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.\n\nRunning without a directory prompts to confirm the current directory. Run 'blueprints init .' to initialize in the current directory without a prompt.",
|
|
1642
|
+
"args": {},
|
|
1643
|
+
"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\nUse --include-projects with --organization-id to also list Stacks from all projects within the organization.",
|
|
1822
1644
|
"examples": [
|
|
1823
1645
|
"<%= config.bin %> <%= command.id %>",
|
|
1824
|
-
"<%= config.bin %> <%= command.id %> .",
|
|
1825
|
-
"<%= config.bin %> <%= command.id %> [directory]",
|
|
1826
|
-
"<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts>",
|
|
1827
|
-
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
1828
1646
|
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
1829
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1830
|
-
"<%= config.bin %> <%= command.id %> --
|
|
1831
|
-
"<%= config.bin %> <%= command.id %> new-stack --type <json|js|ts> --org <organizationId> --name <newStackName>",
|
|
1832
|
-
"<%= config.bin %> <%= command.id %> old-stack --type <json|js|ts> --project-id <projectId> --stack-id <existingStackId>"
|
|
1647
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
1648
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId> --include-projects"
|
|
1833
1649
|
],
|
|
1834
1650
|
"flags": {
|
|
1835
1651
|
"json": {
|
|
@@ -1872,41 +1688,12 @@
|
|
|
1872
1688
|
"allowNo": false,
|
|
1873
1689
|
"type": "boolean"
|
|
1874
1690
|
},
|
|
1875
|
-
"
|
|
1876
|
-
"description": "
|
|
1877
|
-
"
|
|
1878
|
-
"
|
|
1879
|
-
"multiple": false,
|
|
1880
|
-
"type": "option"
|
|
1881
|
-
},
|
|
1882
|
-
"example": {
|
|
1883
|
-
"aliases": [
|
|
1884
|
-
"recipe"
|
|
1885
|
-
],
|
|
1886
|
-
"description": "Example to use for the local Blueprint",
|
|
1887
|
-
"exclusive": [
|
|
1888
|
-
"blueprint-type",
|
|
1889
|
-
"stack-id",
|
|
1890
|
-
"stack-name"
|
|
1891
|
-
],
|
|
1892
|
-
"name": "example",
|
|
1893
|
-
"hasDynamicHelp": false,
|
|
1894
|
-
"multiple": false,
|
|
1895
|
-
"type": "option"
|
|
1896
|
-
},
|
|
1897
|
-
"blueprint-type": {
|
|
1898
|
-
"aliases": [
|
|
1899
|
-
"type"
|
|
1900
|
-
],
|
|
1901
|
-
"description": "Blueprint manifest type to use for the local Blueprint",
|
|
1902
|
-
"name": "blueprint-type",
|
|
1691
|
+
"stack": {
|
|
1692
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1693
|
+
"hidden": true,
|
|
1694
|
+
"name": "stack",
|
|
1903
1695
|
"hasDynamicHelp": false,
|
|
1904
1696
|
"multiple": false,
|
|
1905
|
-
"options": [
|
|
1906
|
-
"json",
|
|
1907
|
-
"js",
|
|
1908
|
-
"ts"
|
|
1909
|
-
],
|
|
1910
1697
|
"type": "option"
|
|
1911
1698
|
},
|
|
1912
1699
|
"project-id": {
|
|
@@ -1916,7 +1703,8 @@
|
|
|
1916
1703
|
],
|
|
1917
1704
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
1918
1705
|
"exclusive": [
|
|
1919
|
-
"organization-id"
|
|
1706
|
+
"organization-id",
|
|
1707
|
+
"include-projects"
|
|
1920
1708
|
],
|
|
1921
1709
|
"name": "project-id",
|
|
1922
1710
|
"hasDynamicHelp": false,
|
|
@@ -1938,79 +1726,46 @@
|
|
|
1938
1726
|
"multiple": false,
|
|
1939
1727
|
"type": "option"
|
|
1940
1728
|
},
|
|
1941
|
-
"
|
|
1942
|
-
"
|
|
1943
|
-
"
|
|
1944
|
-
],
|
|
1945
|
-
"description": "Existing Stack ID used to scope local Blueprint",
|
|
1946
|
-
"exclusive": [
|
|
1947
|
-
"stack-name"
|
|
1948
|
-
],
|
|
1949
|
-
"name": "stack-id",
|
|
1950
|
-
"relationships": [
|
|
1951
|
-
{
|
|
1952
|
-
"type": "some",
|
|
1953
|
-
"flags": [
|
|
1954
|
-
"project-id",
|
|
1955
|
-
"organization-id"
|
|
1956
|
-
]
|
|
1957
|
-
}
|
|
1958
|
-
],
|
|
1959
|
-
"hasDynamicHelp": false,
|
|
1960
|
-
"multiple": false,
|
|
1961
|
-
"type": "option"
|
|
1962
|
-
},
|
|
1963
|
-
"stack-name": {
|
|
1964
|
-
"aliases": [
|
|
1965
|
-
"name"
|
|
1966
|
-
],
|
|
1967
|
-
"description": "Name to use for a new Stack provisioned during initialization",
|
|
1968
|
-
"exclusive": [
|
|
1969
|
-
"stack-id"
|
|
1970
|
-
],
|
|
1971
|
-
"name": "stack-name",
|
|
1972
|
-
"relationships": [
|
|
1973
|
-
{
|
|
1974
|
-
"type": "some",
|
|
1975
|
-
"flags": [
|
|
1976
|
-
"project-id",
|
|
1977
|
-
"organization-id"
|
|
1978
|
-
]
|
|
1979
|
-
}
|
|
1729
|
+
"include-projects": {
|
|
1730
|
+
"dependsOn": [
|
|
1731
|
+
"organization-id"
|
|
1980
1732
|
],
|
|
1981
|
-
"
|
|
1982
|
-
"
|
|
1983
|
-
"
|
|
1733
|
+
"description": "Include Stacks from all projects within the organization. Requires --organization-id.",
|
|
1734
|
+
"name": "include-projects",
|
|
1735
|
+
"allowNo": false,
|
|
1736
|
+
"type": "boolean"
|
|
1984
1737
|
}
|
|
1985
1738
|
},
|
|
1986
1739
|
"hasDynamicHelp": false,
|
|
1987
1740
|
"hiddenAliases": [],
|
|
1988
|
-
"id": "blueprints:
|
|
1741
|
+
"id": "blueprints:stacks",
|
|
1989
1742
|
"pluginAlias": "@sanity/runtime-cli",
|
|
1990
1743
|
"pluginName": "@sanity/runtime-cli",
|
|
1991
1744
|
"pluginType": "core",
|
|
1992
1745
|
"strict": true,
|
|
1993
|
-
"summary": "
|
|
1746
|
+
"summary": "List remote Stack deployments for your project or organization",
|
|
1994
1747
|
"enableJsonFlag": true,
|
|
1748
|
+
"needs": [
|
|
1749
|
+
"scope"
|
|
1750
|
+
],
|
|
1995
1751
|
"isESM": true,
|
|
1996
1752
|
"relativePath": [
|
|
1997
1753
|
"dist",
|
|
1998
1754
|
"commands",
|
|
1999
1755
|
"blueprints",
|
|
2000
|
-
"
|
|
1756
|
+
"stacks.js"
|
|
2001
1757
|
]
|
|
2002
1758
|
},
|
|
2003
|
-
"
|
|
1759
|
+
"functions:add": {
|
|
2004
1760
|
"aliases": [],
|
|
2005
1761
|
"args": {},
|
|
2006
|
-
"description": "
|
|
1762
|
+
"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.",
|
|
2007
1763
|
"examples": [
|
|
2008
1764
|
"<%= config.bin %> <%= command.id %>",
|
|
2009
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2010
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2011
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2012
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2013
|
-
"<%= config.bin %> <%= command.id %> --before 2026-05-01T00:00:00Z"
|
|
1765
|
+
"<%= config.bin %> <%= command.id %> --helpers",
|
|
1766
|
+
"<%= config.bin %> <%= command.id %> --name my-function",
|
|
1767
|
+
"<%= config.bin %> <%= command.id %> --name my-function --type document-create",
|
|
1768
|
+
"<%= config.bin %> <%= command.id %> --name my-function --type document-create --type document-update --lang js"
|
|
2014
1769
|
],
|
|
2015
1770
|
"flags": {
|
|
2016
1771
|
"json": {
|
|
@@ -2055,6 +1810,7 @@
|
|
|
2055
1810
|
},
|
|
2056
1811
|
"stack": {
|
|
2057
1812
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
1813
|
+
"hidden": true,
|
|
2058
1814
|
"name": "stack",
|
|
2059
1815
|
"hasDynamicHelp": false,
|
|
2060
1816
|
"multiple": false,
|
|
@@ -2069,6 +1825,7 @@
|
|
|
2069
1825
|
"exclusive": [
|
|
2070
1826
|
"organization-id"
|
|
2071
1827
|
],
|
|
1828
|
+
"hidden": true,
|
|
2072
1829
|
"name": "project-id",
|
|
2073
1830
|
"hasDynamicHelp": false,
|
|
2074
1831
|
"multiple": false,
|
|
@@ -2084,86 +1841,145 @@
|
|
|
2084
1841
|
"exclusive": [
|
|
2085
1842
|
"project-id"
|
|
2086
1843
|
],
|
|
1844
|
+
"hidden": true,
|
|
2087
1845
|
"name": "organization-id",
|
|
2088
1846
|
"hasDynamicHelp": false,
|
|
2089
1847
|
"multiple": false,
|
|
2090
1848
|
"type": "option"
|
|
2091
1849
|
},
|
|
2092
|
-
"
|
|
1850
|
+
"example": {
|
|
1851
|
+
"aliases": [
|
|
1852
|
+
"recipe"
|
|
1853
|
+
],
|
|
1854
|
+
"description": "Example to use for the Function",
|
|
1855
|
+
"exclusive": [
|
|
1856
|
+
"name",
|
|
1857
|
+
"fn-type",
|
|
1858
|
+
"language",
|
|
1859
|
+
"javascript",
|
|
1860
|
+
"fn-helpers",
|
|
1861
|
+
"fn-installer"
|
|
1862
|
+
],
|
|
1863
|
+
"name": "example",
|
|
1864
|
+
"hasDynamicHelp": false,
|
|
1865
|
+
"multiple": false,
|
|
1866
|
+
"type": "option"
|
|
1867
|
+
},
|
|
1868
|
+
"name": {
|
|
1869
|
+
"char": "n",
|
|
1870
|
+
"description": "Name of the Function to add",
|
|
1871
|
+
"name": "name",
|
|
1872
|
+
"hasDynamicHelp": false,
|
|
1873
|
+
"multiple": false,
|
|
1874
|
+
"type": "option"
|
|
1875
|
+
},
|
|
1876
|
+
"type": {
|
|
1877
|
+
"dependsOn": [
|
|
1878
|
+
"name"
|
|
1879
|
+
],
|
|
1880
|
+
"description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
|
|
1881
|
+
"name": "type",
|
|
1882
|
+
"hasDynamicHelp": false,
|
|
1883
|
+
"multiple": true,
|
|
1884
|
+
"options": [
|
|
1885
|
+
"document-publish",
|
|
1886
|
+
"document-create",
|
|
1887
|
+
"document-delete",
|
|
1888
|
+
"document-update",
|
|
1889
|
+
"media-library-asset-create",
|
|
1890
|
+
"media-library-asset-delete",
|
|
1891
|
+
"media-library-asset-update",
|
|
1892
|
+
"scheduled-function",
|
|
1893
|
+
"sync-tag-invalidate"
|
|
1894
|
+
],
|
|
1895
|
+
"type": "option"
|
|
1896
|
+
},
|
|
1897
|
+
"language": {
|
|
1898
|
+
"aliases": [
|
|
1899
|
+
"lang"
|
|
1900
|
+
],
|
|
1901
|
+
"description": "Language of the new Function",
|
|
1902
|
+
"name": "language",
|
|
1903
|
+
"default": "ts",
|
|
1904
|
+
"hasDynamicHelp": false,
|
|
1905
|
+
"multiple": false,
|
|
1906
|
+
"options": [
|
|
1907
|
+
"ts",
|
|
1908
|
+
"js"
|
|
1909
|
+
],
|
|
1910
|
+
"type": "option"
|
|
1911
|
+
},
|
|
1912
|
+
"javascript": {
|
|
2093
1913
|
"aliases": [
|
|
2094
|
-
"
|
|
1914
|
+
"js"
|
|
2095
1915
|
],
|
|
2096
|
-
"
|
|
2097
|
-
"
|
|
2098
|
-
|
|
1916
|
+
"description": "Use JavaScript instead of TypeScript",
|
|
1917
|
+
"exclusive": [
|
|
1918
|
+
"language"
|
|
1919
|
+
],
|
|
1920
|
+
"name": "javascript",
|
|
2099
1921
|
"allowNo": false,
|
|
2100
1922
|
"type": "boolean"
|
|
2101
1923
|
},
|
|
2102
|
-
"
|
|
2103
|
-
"
|
|
2104
|
-
"
|
|
2105
|
-
"
|
|
2106
|
-
|
|
2107
|
-
],
|
|
2108
|
-
"name": "limit",
|
|
2109
|
-
"hasDynamicHelp": false,
|
|
2110
|
-
"multiple": false,
|
|
2111
|
-
"type": "option"
|
|
1924
|
+
"helpers": {
|
|
1925
|
+
"description": "Add helpers to the new Function",
|
|
1926
|
+
"name": "helpers",
|
|
1927
|
+
"allowNo": true,
|
|
1928
|
+
"type": "boolean"
|
|
2112
1929
|
},
|
|
2113
|
-
"
|
|
2114
|
-
"description": "
|
|
2115
|
-
"
|
|
2116
|
-
"watch"
|
|
2117
|
-
],
|
|
2118
|
-
"name": "since",
|
|
1930
|
+
"installer": {
|
|
1931
|
+
"description": "How to install the @sanity/functions helpers",
|
|
1932
|
+
"name": "installer",
|
|
2119
1933
|
"hasDynamicHelp": false,
|
|
2120
1934
|
"multiple": false,
|
|
1935
|
+
"options": [
|
|
1936
|
+
"skip",
|
|
1937
|
+
"npm",
|
|
1938
|
+
"pnpm",
|
|
1939
|
+
"yarn"
|
|
1940
|
+
],
|
|
2121
1941
|
"type": "option"
|
|
2122
1942
|
},
|
|
2123
|
-
"
|
|
2124
|
-
"
|
|
1943
|
+
"install": {
|
|
1944
|
+
"char": "i",
|
|
1945
|
+
"description": "Shortcut for --fn-installer npm",
|
|
2125
1946
|
"exclusive": [
|
|
2126
|
-
"
|
|
1947
|
+
"fn-installer"
|
|
2127
1948
|
],
|
|
2128
|
-
"name": "
|
|
2129
|
-
"
|
|
2130
|
-
"
|
|
2131
|
-
"type": "option"
|
|
1949
|
+
"name": "install",
|
|
1950
|
+
"allowNo": false,
|
|
1951
|
+
"type": "boolean"
|
|
2132
1952
|
}
|
|
2133
1953
|
},
|
|
2134
1954
|
"hasDynamicHelp": false,
|
|
2135
1955
|
"hiddenAliases": [],
|
|
2136
|
-
"id": "
|
|
1956
|
+
"id": "functions:add",
|
|
2137
1957
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2138
1958
|
"pluginName": "@sanity/runtime-cli",
|
|
2139
1959
|
"pluginType": "core",
|
|
2140
1960
|
"strict": true,
|
|
2141
|
-
"summary": "
|
|
1961
|
+
"summary": "Add a Function to your Blueprint",
|
|
2142
1962
|
"enableJsonFlag": true,
|
|
2143
1963
|
"needs": [
|
|
2144
|
-
"
|
|
1964
|
+
"blueprint"
|
|
2145
1965
|
],
|
|
2146
1966
|
"isESM": true,
|
|
2147
1967
|
"relativePath": [
|
|
2148
1968
|
"dist",
|
|
2149
1969
|
"commands",
|
|
2150
|
-
"
|
|
2151
|
-
"
|
|
1970
|
+
"functions",
|
|
1971
|
+
"add.js"
|
|
2152
1972
|
]
|
|
2153
1973
|
},
|
|
2154
|
-
"
|
|
1974
|
+
"functions:build": {
|
|
2155
1975
|
"aliases": [],
|
|
2156
|
-
"args": {
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
"<%= config.bin %> <%= command.id %> --json",
|
|
2164
|
-
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
2165
|
-
"<%= config.bin %> <%= command.id %> --organization-id <orgId>"
|
|
2166
|
-
],
|
|
1976
|
+
"args": {
|
|
1977
|
+
"name": {
|
|
1978
|
+
"description": "The name of the Sanity Function",
|
|
1979
|
+
"name": "name",
|
|
1980
|
+
"required": false
|
|
1981
|
+
}
|
|
1982
|
+
},
|
|
2167
1983
|
"flags": {
|
|
2168
1984
|
"json": {
|
|
2169
1985
|
"description": "Format output as json",
|
|
@@ -2222,6 +2038,7 @@
|
|
|
2222
2038
|
"exclusive": [
|
|
2223
2039
|
"organization-id"
|
|
2224
2040
|
],
|
|
2041
|
+
"hidden": true,
|
|
2225
2042
|
"name": "project-id",
|
|
2226
2043
|
"hasDynamicHelp": false,
|
|
2227
2044
|
"multiple": false,
|
|
@@ -2237,57 +2054,66 @@
|
|
|
2237
2054
|
"exclusive": [
|
|
2238
2055
|
"project-id"
|
|
2239
2056
|
],
|
|
2057
|
+
"hidden": true,
|
|
2240
2058
|
"name": "organization-id",
|
|
2241
2059
|
"hasDynamicHelp": false,
|
|
2242
2060
|
"multiple": false,
|
|
2243
2061
|
"type": "option"
|
|
2244
2062
|
},
|
|
2245
|
-
"
|
|
2246
|
-
"
|
|
2247
|
-
|
|
2063
|
+
"fn-installer": {
|
|
2064
|
+
"aliases": [
|
|
2065
|
+
"function-installer",
|
|
2066
|
+
"installer"
|
|
2067
|
+
],
|
|
2068
|
+
"description": "Which package manager to use when building Functions",
|
|
2069
|
+
"hidden": true,
|
|
2070
|
+
"name": "fn-installer",
|
|
2248
2071
|
"hasDynamicHelp": false,
|
|
2249
2072
|
"multiple": false,
|
|
2073
|
+
"options": [
|
|
2074
|
+
"npm",
|
|
2075
|
+
"pnpm",
|
|
2076
|
+
"yarn"
|
|
2077
|
+
],
|
|
2250
2078
|
"type": "option"
|
|
2251
2079
|
},
|
|
2252
|
-
"
|
|
2253
|
-
"char": "
|
|
2254
|
-
"description": "
|
|
2255
|
-
"
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
"
|
|
2259
|
-
"allowNo": false,
|
|
2260
|
-
"type": "boolean"
|
|
2080
|
+
"out-dir": {
|
|
2081
|
+
"char": "o",
|
|
2082
|
+
"description": "Output directory for zip files",
|
|
2083
|
+
"name": "out-dir",
|
|
2084
|
+
"hasDynamicHelp": false,
|
|
2085
|
+
"multiple": false,
|
|
2086
|
+
"type": "option"
|
|
2261
2087
|
}
|
|
2262
2088
|
},
|
|
2263
2089
|
"hasDynamicHelp": false,
|
|
2090
|
+
"hidden": true,
|
|
2264
2091
|
"hiddenAliases": [],
|
|
2265
|
-
"id": "
|
|
2092
|
+
"id": "functions:build",
|
|
2266
2093
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2267
2094
|
"pluginName": "@sanity/runtime-cli",
|
|
2268
2095
|
"pluginType": "core",
|
|
2269
2096
|
"strict": true,
|
|
2270
|
-
"summary": "
|
|
2097
|
+
"summary": "Build Sanity Function(s) to zip archives",
|
|
2271
2098
|
"enableJsonFlag": true,
|
|
2272
2099
|
"needs": [
|
|
2273
|
-
"
|
|
2100
|
+
"blueprint"
|
|
2274
2101
|
],
|
|
2275
2102
|
"isESM": true,
|
|
2276
2103
|
"relativePath": [
|
|
2277
2104
|
"dist",
|
|
2278
2105
|
"commands",
|
|
2279
|
-
"
|
|
2280
|
-
"
|
|
2106
|
+
"functions",
|
|
2107
|
+
"build.js"
|
|
2281
2108
|
]
|
|
2282
2109
|
},
|
|
2283
|
-
"
|
|
2110
|
+
"functions:dev": {
|
|
2284
2111
|
"aliases": [],
|
|
2285
2112
|
"args": {},
|
|
2286
|
-
"description": "
|
|
2113
|
+
"description": "Runs a local, web-based development server to test your functions before deploying.\n\nOpen the emulator in your browser to interactively test your functions with the payload editor.\n\nOptionally, set the host and port with the --host and --port flags. Function timeout can be configured with the --timeout flag.\n\nTo invoke a function with the CLI, use 'functions test'.",
|
|
2287
2114
|
"examples": [
|
|
2288
|
-
"<%= config.bin %> <%= command.id %>",
|
|
2289
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2290
|
-
"<%= config.bin %> <%= command.id %> --organization-id <orgId> --stack <name-or-id>"
|
|
2115
|
+
"<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974",
|
|
2116
|
+
"<%= config.bin %> <%= command.id %> --timeout 60"
|
|
2291
2117
|
],
|
|
2292
2118
|
"flags": {
|
|
2293
2119
|
"json": {
|
|
@@ -2332,6 +2158,7 @@
|
|
|
2332
2158
|
},
|
|
2333
2159
|
"stack": {
|
|
2334
2160
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
2161
|
+
"hidden": true,
|
|
2335
2162
|
"name": "stack",
|
|
2336
2163
|
"hasDynamicHelp": false,
|
|
2337
2164
|
"multiple": false,
|
|
@@ -2346,6 +2173,7 @@
|
|
|
2346
2173
|
"exclusive": [
|
|
2347
2174
|
"organization-id"
|
|
2348
2175
|
],
|
|
2176
|
+
"hidden": true,
|
|
2349
2177
|
"name": "project-id",
|
|
2350
2178
|
"hasDynamicHelp": false,
|
|
2351
2179
|
"multiple": false,
|
|
@@ -2361,42 +2189,75 @@
|
|
|
2361
2189
|
"exclusive": [
|
|
2362
2190
|
"project-id"
|
|
2363
2191
|
],
|
|
2192
|
+
"hidden": true,
|
|
2364
2193
|
"name": "organization-id",
|
|
2365
2194
|
"hasDynamicHelp": false,
|
|
2366
2195
|
"multiple": false,
|
|
2367
2196
|
"type": "option"
|
|
2197
|
+
},
|
|
2198
|
+
"host": {
|
|
2199
|
+
"char": "h",
|
|
2200
|
+
"description": "The local network interface at which to listen. [default: \"localhost\"]",
|
|
2201
|
+
"name": "host",
|
|
2202
|
+
"required": false,
|
|
2203
|
+
"hasDynamicHelp": false,
|
|
2204
|
+
"multiple": false,
|
|
2205
|
+
"type": "option"
|
|
2206
|
+
},
|
|
2207
|
+
"port": {
|
|
2208
|
+
"char": "p",
|
|
2209
|
+
"description": "TCP port to start emulator on. [default: 8080]",
|
|
2210
|
+
"name": "port",
|
|
2211
|
+
"required": false,
|
|
2212
|
+
"hasDynamicHelp": false,
|
|
2213
|
+
"multiple": false,
|
|
2214
|
+
"type": "option"
|
|
2215
|
+
},
|
|
2216
|
+
"timeout": {
|
|
2217
|
+
"char": "t",
|
|
2218
|
+
"description": "Maximum execution time for all functions, in seconds. Takes precedence over function-specific `timeout`",
|
|
2219
|
+
"name": "timeout",
|
|
2220
|
+
"required": false,
|
|
2221
|
+
"hasDynamicHelp": false,
|
|
2222
|
+
"multiple": false,
|
|
2223
|
+
"type": "option"
|
|
2368
2224
|
}
|
|
2369
2225
|
},
|
|
2370
2226
|
"hasDynamicHelp": false,
|
|
2371
2227
|
"hiddenAliases": [],
|
|
2372
|
-
"id": "
|
|
2228
|
+
"id": "functions:dev",
|
|
2373
2229
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2374
2230
|
"pluginName": "@sanity/runtime-cli",
|
|
2375
2231
|
"pluginType": "core",
|
|
2376
2232
|
"strict": true,
|
|
2377
|
-
"summary": "
|
|
2233
|
+
"summary": "Start the Sanity Function emulator",
|
|
2378
2234
|
"enableJsonFlag": true,
|
|
2379
2235
|
"needs": [
|
|
2380
|
-
"token",
|
|
2381
2236
|
"blueprint"
|
|
2382
2237
|
],
|
|
2383
2238
|
"isESM": true,
|
|
2384
2239
|
"relativePath": [
|
|
2385
2240
|
"dist",
|
|
2386
2241
|
"commands",
|
|
2387
|
-
"
|
|
2388
|
-
"
|
|
2242
|
+
"functions",
|
|
2243
|
+
"dev.js"
|
|
2389
2244
|
]
|
|
2390
2245
|
},
|
|
2391
|
-
"
|
|
2246
|
+
"functions:logs": {
|
|
2392
2247
|
"aliases": [],
|
|
2393
|
-
"args": {
|
|
2394
|
-
|
|
2248
|
+
"args": {
|
|
2249
|
+
"name": {
|
|
2250
|
+
"description": "The name of the Sanity Function",
|
|
2251
|
+
"name": "name",
|
|
2252
|
+
"required": false
|
|
2253
|
+
}
|
|
2254
|
+
},
|
|
2255
|
+
"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).",
|
|
2395
2256
|
"examples": [
|
|
2396
|
-
"<%= config.bin %> <%= command.id %>",
|
|
2397
|
-
"<%= config.bin %> <%= command.id %>
|
|
2398
|
-
"<%= config.bin %> <%= command.id %>
|
|
2399
|
-
"<%= config.bin %> <%= command.id %>
|
|
2257
|
+
"<%= config.bin %> <%= command.id %> <name>",
|
|
2258
|
+
"<%= config.bin %> <%= command.id %> <name> --json",
|
|
2259
|
+
"<%= config.bin %> <%= command.id %> <name> --limit 100",
|
|
2260
|
+
"<%= config.bin %> <%= command.id %> <name> --delete"
|
|
2400
2261
|
],
|
|
2401
2262
|
"flags": {
|
|
2402
2263
|
"json": {
|
|
@@ -2440,10 +2301,7 @@
|
|
|
2440
2301
|
"type": "boolean"
|
|
2441
2302
|
},
|
|
2442
2303
|
"stack": {
|
|
2443
|
-
"
|
|
2444
|
-
"id"
|
|
2445
|
-
],
|
|
2446
|
-
"description": "Stack name or ID to promote",
|
|
2304
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
2447
2305
|
"name": "stack",
|
|
2448
2306
|
"hasDynamicHelp": false,
|
|
2449
2307
|
"multiple": false,
|
|
@@ -2458,6 +2316,7 @@
|
|
|
2458
2316
|
"exclusive": [
|
|
2459
2317
|
"organization-id"
|
|
2460
2318
|
],
|
|
2319
|
+
"hidden": true,
|
|
2461
2320
|
"name": "project-id",
|
|
2462
2321
|
"hasDynamicHelp": false,
|
|
2463
2322
|
"multiple": false,
|
|
@@ -2479,28 +2338,66 @@
|
|
|
2479
2338
|
"multiple": false,
|
|
2480
2339
|
"type": "option"
|
|
2481
2340
|
},
|
|
2341
|
+
"limit": {
|
|
2342
|
+
"char": "l",
|
|
2343
|
+
"description": "Total number of log entries to retrieve",
|
|
2344
|
+
"name": "limit",
|
|
2345
|
+
"required": false,
|
|
2346
|
+
"default": 50,
|
|
2347
|
+
"hasDynamicHelp": false,
|
|
2348
|
+
"multiple": false,
|
|
2349
|
+
"type": "option"
|
|
2350
|
+
},
|
|
2351
|
+
"utc": {
|
|
2352
|
+
"char": "u",
|
|
2353
|
+
"description": "Show dates in UTC time zone",
|
|
2354
|
+
"name": "utc",
|
|
2355
|
+
"required": false,
|
|
2356
|
+
"allowNo": false,
|
|
2357
|
+
"type": "boolean"
|
|
2358
|
+
},
|
|
2359
|
+
"delete": {
|
|
2360
|
+
"char": "d",
|
|
2361
|
+
"description": "Delete all logs for the function",
|
|
2362
|
+
"exclusive": [
|
|
2363
|
+
"limit",
|
|
2364
|
+
"json"
|
|
2365
|
+
],
|
|
2366
|
+
"name": "delete",
|
|
2367
|
+
"required": false,
|
|
2368
|
+
"allowNo": false,
|
|
2369
|
+
"type": "boolean"
|
|
2370
|
+
},
|
|
2482
2371
|
"force": {
|
|
2483
|
-
"
|
|
2372
|
+
"char": "f",
|
|
2373
|
+
"dependsOn": [
|
|
2374
|
+
"delete"
|
|
2375
|
+
],
|
|
2376
|
+
"description": "Skip confirmation for deleting logs",
|
|
2484
2377
|
"name": "force",
|
|
2378
|
+
"required": false,
|
|
2485
2379
|
"allowNo": false,
|
|
2486
2380
|
"type": "boolean"
|
|
2487
2381
|
},
|
|
2488
|
-
"
|
|
2489
|
-
"
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
"
|
|
2493
|
-
"
|
|
2382
|
+
"watch": {
|
|
2383
|
+
"aliases": [
|
|
2384
|
+
"follow"
|
|
2385
|
+
],
|
|
2386
|
+
"char": "w",
|
|
2387
|
+
"description": "Watch for new logs (streaming mode)",
|
|
2388
|
+
"name": "watch",
|
|
2389
|
+
"allowNo": false,
|
|
2390
|
+
"type": "boolean"
|
|
2494
2391
|
}
|
|
2495
2392
|
},
|
|
2496
2393
|
"hasDynamicHelp": false,
|
|
2497
2394
|
"hiddenAliases": [],
|
|
2498
|
-
"id": "
|
|
2395
|
+
"id": "functions:logs",
|
|
2499
2396
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2500
2397
|
"pluginName": "@sanity/runtime-cli",
|
|
2501
2398
|
"pluginType": "core",
|
|
2502
2399
|
"strict": true,
|
|
2503
|
-
"summary": "
|
|
2400
|
+
"summary": "Retrieve or delete logs for a Sanity Function",
|
|
2504
2401
|
"enableJsonFlag": true,
|
|
2505
2402
|
"needs": [
|
|
2506
2403
|
"deployedStack",
|
|
@@ -2510,19 +2407,25 @@
|
|
|
2510
2407
|
"relativePath": [
|
|
2511
2408
|
"dist",
|
|
2512
2409
|
"commands",
|
|
2513
|
-
"
|
|
2514
|
-
"
|
|
2410
|
+
"functions",
|
|
2411
|
+
"logs.js"
|
|
2515
2412
|
]
|
|
2516
2413
|
},
|
|
2517
|
-
"
|
|
2414
|
+
"functions:test": {
|
|
2518
2415
|
"aliases": [],
|
|
2519
|
-
"args": {
|
|
2520
|
-
|
|
2416
|
+
"args": {
|
|
2417
|
+
"name": {
|
|
2418
|
+
"description": "The name of the Sanity Function",
|
|
2419
|
+
"name": "name",
|
|
2420
|
+
"required": false
|
|
2421
|
+
}
|
|
2422
|
+
},
|
|
2423
|
+
"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.",
|
|
2521
2424
|
"examples": [
|
|
2522
|
-
"<%= config.bin %> <%= command.id %>",
|
|
2523
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2524
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2525
|
-
"<%= config.bin %> <%= command.id %> --
|
|
2425
|
+
"<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }'",
|
|
2426
|
+
"<%= config.bin %> <%= command.id %> <name> --file 'payload.json'",
|
|
2427
|
+
"<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }' --timeout 60",
|
|
2428
|
+
"<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ \"title\": \"before\" }' --data-after '{ \"title\": \"after\" }'"
|
|
2526
2429
|
],
|
|
2527
2430
|
"flags": {
|
|
2528
2431
|
"json": {
|
|
@@ -2580,8 +2483,7 @@
|
|
|
2580
2483
|
],
|
|
2581
2484
|
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
2582
2485
|
"exclusive": [
|
|
2583
|
-
"organization-id"
|
|
2584
|
-
"include-projects"
|
|
2486
|
+
"organization-id"
|
|
2585
2487
|
],
|
|
2586
2488
|
"name": "project-id",
|
|
2587
2489
|
"hasDynamicHelp": false,
|
|
@@ -2603,34 +2505,230 @@
|
|
|
2603
2505
|
"multiple": false,
|
|
2604
2506
|
"type": "option"
|
|
2605
2507
|
},
|
|
2606
|
-
"
|
|
2607
|
-
"
|
|
2608
|
-
|
|
2508
|
+
"data": {
|
|
2509
|
+
"char": "d",
|
|
2510
|
+
"description": "Data to send to the function",
|
|
2511
|
+
"exclusive": [
|
|
2512
|
+
"file",
|
|
2513
|
+
"document-id"
|
|
2609
2514
|
],
|
|
2610
|
-
"
|
|
2611
|
-
"
|
|
2515
|
+
"name": "data",
|
|
2516
|
+
"required": false,
|
|
2517
|
+
"hasDynamicHelp": false,
|
|
2518
|
+
"multiple": false,
|
|
2519
|
+
"type": "option"
|
|
2520
|
+
},
|
|
2521
|
+
"data-before": {
|
|
2522
|
+
"description": "Original document",
|
|
2523
|
+
"exclusive": [
|
|
2524
|
+
"data",
|
|
2525
|
+
"file",
|
|
2526
|
+
"document-id",
|
|
2527
|
+
"file-before",
|
|
2528
|
+
"file-after",
|
|
2529
|
+
"document-id-before",
|
|
2530
|
+
"document-id-after"
|
|
2531
|
+
],
|
|
2532
|
+
"name": "data-before",
|
|
2533
|
+
"required": false,
|
|
2534
|
+
"hasDynamicHelp": false,
|
|
2535
|
+
"multiple": false,
|
|
2536
|
+
"type": "option"
|
|
2537
|
+
},
|
|
2538
|
+
"data-after": {
|
|
2539
|
+
"description": "Current document",
|
|
2540
|
+
"exclusive": [
|
|
2541
|
+
"data",
|
|
2542
|
+
"file",
|
|
2543
|
+
"document-id",
|
|
2544
|
+
"file-before",
|
|
2545
|
+
"file-after",
|
|
2546
|
+
"document-id-before",
|
|
2547
|
+
"document-id-after"
|
|
2548
|
+
],
|
|
2549
|
+
"name": "data-after",
|
|
2550
|
+
"required": false,
|
|
2551
|
+
"hasDynamicHelp": false,
|
|
2552
|
+
"multiple": false,
|
|
2553
|
+
"type": "option"
|
|
2554
|
+
},
|
|
2555
|
+
"event": {
|
|
2556
|
+
"char": "e",
|
|
2557
|
+
"description": "Type of event (create, update, delete)",
|
|
2558
|
+
"name": "event",
|
|
2559
|
+
"required": false,
|
|
2560
|
+
"hasDynamicHelp": false,
|
|
2561
|
+
"multiple": false,
|
|
2562
|
+
"options": [
|
|
2563
|
+
"create",
|
|
2564
|
+
"update",
|
|
2565
|
+
"delete"
|
|
2566
|
+
],
|
|
2567
|
+
"type": "option"
|
|
2568
|
+
},
|
|
2569
|
+
"file": {
|
|
2570
|
+
"char": "f",
|
|
2571
|
+
"description": "Read data from file and send to the function",
|
|
2572
|
+
"exclusive": [
|
|
2573
|
+
"data",
|
|
2574
|
+
"document-id"
|
|
2575
|
+
],
|
|
2576
|
+
"name": "file",
|
|
2577
|
+
"required": false,
|
|
2578
|
+
"hasDynamicHelp": false,
|
|
2579
|
+
"multiple": false,
|
|
2580
|
+
"type": "option"
|
|
2581
|
+
},
|
|
2582
|
+
"file-before": {
|
|
2583
|
+
"description": "Original document",
|
|
2584
|
+
"exclusive": [
|
|
2585
|
+
"data",
|
|
2586
|
+
"file",
|
|
2587
|
+
"document-id",
|
|
2588
|
+
"data-before",
|
|
2589
|
+
"data-after",
|
|
2590
|
+
"document-id-before",
|
|
2591
|
+
"document-id-after"
|
|
2592
|
+
],
|
|
2593
|
+
"name": "file-before",
|
|
2594
|
+
"required": false,
|
|
2595
|
+
"hasDynamicHelp": false,
|
|
2596
|
+
"multiple": false,
|
|
2597
|
+
"type": "option"
|
|
2598
|
+
},
|
|
2599
|
+
"file-after": {
|
|
2600
|
+
"description": "Current document",
|
|
2601
|
+
"exclusive": [
|
|
2602
|
+
"data",
|
|
2603
|
+
"file",
|
|
2604
|
+
"document-id",
|
|
2605
|
+
"data-before",
|
|
2606
|
+
"data-after",
|
|
2607
|
+
"document-id-before",
|
|
2608
|
+
"document-id-after"
|
|
2609
|
+
],
|
|
2610
|
+
"name": "file-after",
|
|
2611
|
+
"required": false,
|
|
2612
|
+
"hasDynamicHelp": false,
|
|
2613
|
+
"multiple": false,
|
|
2614
|
+
"type": "option"
|
|
2615
|
+
},
|
|
2616
|
+
"timeout": {
|
|
2617
|
+
"char": "t",
|
|
2618
|
+
"description": "Execution timeout value in seconds",
|
|
2619
|
+
"name": "timeout",
|
|
2620
|
+
"required": false,
|
|
2621
|
+
"hasDynamicHelp": false,
|
|
2622
|
+
"multiple": false,
|
|
2623
|
+
"type": "option"
|
|
2624
|
+
},
|
|
2625
|
+
"api": {
|
|
2626
|
+
"char": "a",
|
|
2627
|
+
"description": "Sanity API Version to use",
|
|
2628
|
+
"name": "api",
|
|
2629
|
+
"required": false,
|
|
2630
|
+
"hasDynamicHelp": false,
|
|
2631
|
+
"multiple": false,
|
|
2632
|
+
"type": "option"
|
|
2633
|
+
},
|
|
2634
|
+
"dataset": {
|
|
2635
|
+
"description": "The Sanity dataset to use",
|
|
2636
|
+
"name": "dataset",
|
|
2637
|
+
"required": false,
|
|
2638
|
+
"hasDynamicHelp": false,
|
|
2639
|
+
"multiple": false,
|
|
2640
|
+
"type": "option"
|
|
2641
|
+
},
|
|
2642
|
+
"document-id": {
|
|
2643
|
+
"aliases": [
|
|
2644
|
+
"doc",
|
|
2645
|
+
"documentId"
|
|
2646
|
+
],
|
|
2647
|
+
"description": "Document to fetch and send to function",
|
|
2648
|
+
"exclusive": [
|
|
2649
|
+
"data",
|
|
2650
|
+
"file"
|
|
2651
|
+
],
|
|
2652
|
+
"name": "document-id",
|
|
2653
|
+
"required": false,
|
|
2654
|
+
"hasDynamicHelp": false,
|
|
2655
|
+
"multiple": false,
|
|
2656
|
+
"type": "option"
|
|
2657
|
+
},
|
|
2658
|
+
"document-id-before": {
|
|
2659
|
+
"description": "Original document",
|
|
2660
|
+
"exclusive": [
|
|
2661
|
+
"data",
|
|
2662
|
+
"file",
|
|
2663
|
+
"document-id",
|
|
2664
|
+
"data-before",
|
|
2665
|
+
"data-after",
|
|
2666
|
+
"file-before",
|
|
2667
|
+
"file-after"
|
|
2668
|
+
],
|
|
2669
|
+
"name": "document-id-before",
|
|
2670
|
+
"required": false,
|
|
2671
|
+
"hasDynamicHelp": false,
|
|
2672
|
+
"multiple": false,
|
|
2673
|
+
"type": "option"
|
|
2674
|
+
},
|
|
2675
|
+
"document-id-after": {
|
|
2676
|
+
"description": "Current document",
|
|
2677
|
+
"exclusive": [
|
|
2678
|
+
"data",
|
|
2679
|
+
"file",
|
|
2680
|
+
"document-id",
|
|
2681
|
+
"data-before",
|
|
2682
|
+
"data-after",
|
|
2683
|
+
"file-before",
|
|
2684
|
+
"file-after"
|
|
2685
|
+
],
|
|
2686
|
+
"name": "document-id-after",
|
|
2687
|
+
"required": false,
|
|
2688
|
+
"hasDynamicHelp": false,
|
|
2689
|
+
"multiple": false,
|
|
2690
|
+
"type": "option"
|
|
2691
|
+
},
|
|
2692
|
+
"with-user-token": {
|
|
2693
|
+
"description": "Prime access token from CLI config",
|
|
2694
|
+
"name": "with-user-token",
|
|
2612
2695
|
"allowNo": false,
|
|
2613
2696
|
"type": "boolean"
|
|
2697
|
+
},
|
|
2698
|
+
"media-library-id": {
|
|
2699
|
+
"aliases": [
|
|
2700
|
+
"media"
|
|
2701
|
+
],
|
|
2702
|
+
"description": "Sanity Media Library ID to use",
|
|
2703
|
+
"exclusive": [
|
|
2704
|
+
"project-id",
|
|
2705
|
+
"dataset"
|
|
2706
|
+
],
|
|
2707
|
+
"name": "media-library-id",
|
|
2708
|
+
"required": false,
|
|
2709
|
+
"hasDynamicHelp": false,
|
|
2710
|
+
"multiple": false,
|
|
2711
|
+
"type": "option"
|
|
2614
2712
|
}
|
|
2615
2713
|
},
|
|
2616
2714
|
"hasDynamicHelp": false,
|
|
2617
2715
|
"hiddenAliases": [],
|
|
2618
|
-
"id": "
|
|
2716
|
+
"id": "functions:test",
|
|
2619
2717
|
"pluginAlias": "@sanity/runtime-cli",
|
|
2620
2718
|
"pluginName": "@sanity/runtime-cli",
|
|
2621
2719
|
"pluginType": "core",
|
|
2622
2720
|
"strict": true,
|
|
2623
|
-
"summary": "
|
|
2721
|
+
"summary": "Invoke a local Sanity Function",
|
|
2624
2722
|
"enableJsonFlag": true,
|
|
2625
2723
|
"needs": [
|
|
2626
|
-
"
|
|
2724
|
+
"blueprint"
|
|
2627
2725
|
],
|
|
2628
2726
|
"isESM": true,
|
|
2629
2727
|
"relativePath": [
|
|
2630
2728
|
"dist",
|
|
2631
2729
|
"commands",
|
|
2632
|
-
"
|
|
2633
|
-
"
|
|
2730
|
+
"functions",
|
|
2731
|
+
"test.js"
|
|
2634
2732
|
]
|
|
2635
2733
|
},
|
|
2636
2734
|
"functions:env:add": {
|
|
@@ -2654,7 +2752,8 @@
|
|
|
2654
2752
|
},
|
|
2655
2753
|
"description": "Sets an environment variable in a deployed Sanity Function. If the variable already exists, its value is updated.\n\nEnvironment variables are useful for API keys, configuration values, and other secrets that shouldn't be hardcoded. Changes take effect on the next function invocation.",
|
|
2656
2754
|
"examples": [
|
|
2657
|
-
"<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/"
|
|
2755
|
+
"<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/",
|
|
2756
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction API_URL https://api.example.com/"
|
|
2658
2757
|
],
|
|
2659
2758
|
"flags": {
|
|
2660
2759
|
"json": {
|
|
@@ -2699,7 +2798,6 @@
|
|
|
2699
2798
|
},
|
|
2700
2799
|
"stack": {
|
|
2701
2800
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
2702
|
-
"hidden": true,
|
|
2703
2801
|
"name": "stack",
|
|
2704
2802
|
"hasDynamicHelp": false,
|
|
2705
2803
|
"multiple": false,
|
|
@@ -2770,7 +2868,8 @@
|
|
|
2770
2868
|
},
|
|
2771
2869
|
"description": "Displays all environment variables (keys only) configured in a deployed Sanity Function.\n\nUse 'functions env add' to set variables or 'functions env remove' to delete them.",
|
|
2772
2870
|
"examples": [
|
|
2773
|
-
"<%= config.bin %> <%= command.id %> MyFunction"
|
|
2871
|
+
"<%= config.bin %> <%= command.id %> MyFunction",
|
|
2872
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction"
|
|
2774
2873
|
],
|
|
2775
2874
|
"flags": {
|
|
2776
2875
|
"json": {
|
|
@@ -2815,7 +2914,6 @@
|
|
|
2815
2914
|
},
|
|
2816
2915
|
"stack": {
|
|
2817
2916
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
2818
|
-
"hidden": true,
|
|
2819
2917
|
"name": "stack",
|
|
2820
2918
|
"hasDynamicHelp": false,
|
|
2821
2919
|
"multiple": false,
|
|
@@ -2891,7 +2989,8 @@
|
|
|
2891
2989
|
},
|
|
2892
2990
|
"description": "Deletes an environment variable from a deployed Sanity Function. The change takes effect on the next function invocation.\n\nUse 'functions env list' to see current variables before removing.",
|
|
2893
2991
|
"examples": [
|
|
2894
|
-
"<%= config.bin %> <%= command.id %> MyFunction API_URL"
|
|
2992
|
+
"<%= config.bin %> <%= command.id %> MyFunction API_URL",
|
|
2993
|
+
"<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction API_URL"
|
|
2895
2994
|
],
|
|
2896
2995
|
"flags": {
|
|
2897
2996
|
"json": {
|
|
@@ -2936,7 +3035,6 @@
|
|
|
2936
3035
|
},
|
|
2937
3036
|
"stack": {
|
|
2938
3037
|
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
2939
|
-
"hidden": true,
|
|
2940
3038
|
"name": "stack",
|
|
2941
3039
|
"hasDynamicHelp": false,
|
|
2942
3040
|
"multiple": false,
|
|
@@ -2997,5 +3095,5 @@
|
|
|
2997
3095
|
]
|
|
2998
3096
|
}
|
|
2999
3097
|
},
|
|
3000
|
-
"version": "17.
|
|
3098
|
+
"version": "17.2.0-blueprinit.gd1553d6"
|
|
3001
3099
|
}
|