@sanity/runtime-cli 12.3.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +190 -76
- package/dist/actions/blueprints/assets.d.ts +3 -1
- package/dist/actions/blueprints/assets.js +15 -5
- package/dist/actions/blueprints/blueprint.d.ts +2 -1
- package/dist/actions/blueprints/blueprint.js +3 -1
- package/dist/actions/blueprints/config.d.ts +5 -2
- package/dist/actions/blueprints/config.js +4 -4
- package/dist/actions/blueprints/logs-streaming.d.ts +4 -2
- package/dist/actions/blueprints/logs-streaming.js +5 -2
- package/dist/actions/blueprints/logs.d.ts +2 -1
- package/dist/actions/blueprints/logs.js +4 -2
- package/dist/actions/blueprints/resources.d.ts +2 -1
- package/dist/actions/blueprints/resources.js +2 -2
- package/dist/actions/blueprints/stacks.d.ts +12 -6
- package/dist/actions/blueprints/stacks.js +18 -11
- package/dist/actions/functions/dev.d.ts +2 -1
- package/dist/actions/functions/dev.js +2 -2
- package/dist/actions/functions/env/list.d.ts +2 -1
- package/dist/actions/functions/env/list.js +4 -2
- package/dist/actions/functions/env/remove.d.ts +2 -1
- package/dist/actions/functions/env/remove.js +4 -2
- package/dist/actions/functions/env/update.d.ts +2 -1
- package/dist/actions/functions/env/update.js +4 -2
- package/dist/actions/functions/logs.d.ts +4 -3
- package/dist/actions/functions/logs.js +10 -6
- package/dist/actions/node.d.ts +2 -1
- package/dist/actions/node.js +2 -2
- package/dist/actions/sanity/examples.d.ts +5 -2
- package/dist/actions/sanity/examples.js +6 -6
- package/dist/actions/sanity/projects.d.ts +7 -3
- package/dist/actions/sanity/projects.js +11 -7
- package/dist/baseCommands.d.ts +47 -7
- package/dist/baseCommands.js +90 -12
- package/dist/commands/blueprints/add.d.ts +3 -2
- package/dist/commands/blueprints/add.js +14 -10
- package/dist/commands/blueprints/config.d.ts +3 -2
- package/dist/commands/blueprints/config.js +12 -6
- package/dist/commands/blueprints/deploy.d.ts +3 -2
- package/dist/commands/blueprints/deploy.js +10 -4
- package/dist/commands/blueprints/destroy.d.ts +3 -2
- package/dist/commands/blueprints/destroy.js +10 -4
- package/dist/commands/blueprints/doctor.d.ts +6 -4
- package/dist/commands/blueprints/doctor.js +17 -14
- package/dist/commands/blueprints/info.d.ts +3 -2
- package/dist/commands/blueprints/info.js +11 -5
- package/dist/commands/blueprints/init.d.ts +3 -2
- package/dist/commands/blueprints/init.js +26 -20
- package/dist/commands/blueprints/logs.d.ts +3 -2
- package/dist/commands/blueprints/logs.js +10 -4
- package/dist/commands/blueprints/plan.d.ts +3 -2
- package/dist/commands/blueprints/plan.js +8 -4
- package/dist/commands/blueprints/stacks.d.ts +3 -2
- package/dist/commands/blueprints/stacks.js +10 -6
- package/dist/commands/functions/add.d.ts +3 -2
- package/dist/commands/functions/add.js +10 -4
- package/dist/commands/functions/dev.d.ts +3 -2
- package/dist/commands/functions/dev.js +16 -5
- package/dist/commands/functions/env/add.d.ts +4 -3
- package/dist/commands/functions/env/add.js +8 -4
- package/dist/commands/functions/env/list.d.ts +4 -3
- package/dist/commands/functions/env/list.js +8 -4
- package/dist/commands/functions/env/remove.d.ts +4 -3
- package/dist/commands/functions/env/remove.js +8 -4
- package/dist/commands/functions/logs.d.ts +5 -4
- package/dist/commands/functions/logs.js +11 -5
- package/dist/commands/functions/test.d.ts +5 -4
- package/dist/commands/functions/test.js +13 -6
- package/dist/cores/blueprints/config.d.ts +2 -5
- package/dist/cores/blueprints/config.js +9 -9
- package/dist/cores/blueprints/deploy.js +14 -17
- package/dist/cores/blueprints/destroy.d.ts +2 -5
- package/dist/cores/blueprints/destroy.js +6 -6
- package/dist/cores/blueprints/doctor.js +32 -29
- package/dist/cores/blueprints/info.js +5 -5
- package/dist/cores/blueprints/init.d.ts +3 -3
- package/dist/cores/blueprints/init.js +15 -8
- package/dist/cores/blueprints/logs.js +6 -7
- package/dist/cores/blueprints/plan.js +1 -0
- package/dist/cores/blueprints/stacks.d.ts +2 -5
- package/dist/cores/blueprints/stacks.js +4 -4
- package/dist/cores/functions/add.js +8 -3
- package/dist/cores/functions/dev.js +2 -2
- package/dist/cores/functions/env/add.js +3 -4
- package/dist/cores/functions/env/list.js +3 -4
- package/dist/cores/functions/env/remove.js +3 -4
- package/dist/cores/functions/index.d.ts +3 -9
- package/dist/cores/functions/logs.d.ts +3 -1
- package/dist/cores/functions/logs.js +19 -11
- package/dist/cores/functions/test.d.ts +3 -1
- package/dist/cores/functions/test.js +18 -10
- package/dist/cores/index.d.ts +4 -7
- package/dist/cores/index.js +3 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/server/app.d.ts +2 -1
- package/dist/server/app.js +4 -4
- package/dist/server/handlers/invoke.d.ts +2 -1
- package/dist/server/handlers/invoke.js +2 -2
- package/dist/server/static/components/app.css +0 -116
- package/dist/server/static/components/clear-button.js +1 -1
- package/dist/server/static/components/console-panel.js +27 -6
- package/dist/server/static/components/fetch-button.js +1 -1
- package/dist/server/static/components/filter-api-version.js +39 -3
- package/dist/server/static/components/filter-document-id.js +39 -3
- package/dist/server/static/components/filter-with-token.js +27 -4
- package/dist/server/static/components/filters.js +127 -62
- package/dist/server/static/components/function-list.js +33 -13
- package/dist/server/static/components/network-spinner.js +6 -4
- package/dist/server/static/components/payload-panel.js +46 -24
- package/dist/server/static/components/response-panel.js +33 -6
- package/dist/server/static/components/rule-panel.js +13 -4
- package/dist/server/static/components/run-panel.js +14 -7
- package/dist/server/static/components/select-dropdown.js +34 -5
- package/dist/server/static/components/shared-styles.js +31 -0
- package/dist/server/static/components/toggle-switch.js +11 -2
- package/dist/utils/display/blueprints-formatting.d.ts +2 -2
- package/dist/utils/display/blueprints-formatting.js +31 -26
- package/dist/utils/display/prompt.d.ts +5 -2
- package/dist/utils/display/prompt.js +5 -4
- package/dist/utils/find-function.d.ts +4 -0
- package/dist/utils/find-function.js +6 -0
- package/dist/utils/functions/fetch-document.d.ts +3 -2
- package/dist/utils/functions/fetch-document.js +7 -6
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/logger.d.ts +13 -0
- package/dist/utils/logger.js +61 -0
- package/dist/utils/other/github.d.ts +2 -1
- package/dist/utils/other/github.js +4 -2
- package/dist/utils/other/npmjs.d.ts +2 -1
- package/dist/utils/other/npmjs.js +4 -2
- package/dist/utils/traced-fetch.d.ts +35 -0
- package/dist/utils/traced-fetch.js +238 -0
- package/dist/utils/validated-token.d.ts +3 -2
- package/dist/utils/validated-token.js +6 -4
- package/oclif.manifest.json +455 -75
- package/package.json +14 -6
package/oclif.manifest.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"aliases": [],
|
|
5
5
|
"args": {
|
|
6
6
|
"type": {
|
|
7
|
-
"description": "Type of
|
|
7
|
+
"description": "Type of resource to add (only \"function\" is supported)",
|
|
8
8
|
"name": "type",
|
|
9
9
|
"options": [
|
|
10
10
|
"function"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"required": true
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"description": "
|
|
15
|
+
"description": "Scaffolds a new Sanity Function in your Blueprint. Functions are serverless handlers triggered by document events (create, update, delete, publish) or media library events.\n\nAfter adding a function, use 'functions dev' to test locally, then 'blueprints deploy' to publish it.",
|
|
16
16
|
"examples": [
|
|
17
17
|
"<%= config.bin %> <%= command.id %> function",
|
|
18
18
|
"<%= config.bin %> <%= command.id %> function --helpers",
|
|
@@ -21,6 +21,28 @@
|
|
|
21
21
|
"<%= config.bin %> <%= command.id %> function --name my-function --fn-type document-create --fn-type document-update --lang js"
|
|
22
22
|
],
|
|
23
23
|
"flags": {
|
|
24
|
+
"json": {
|
|
25
|
+
"description": "Format output as json.",
|
|
26
|
+
"hidden": true,
|
|
27
|
+
"name": "json",
|
|
28
|
+
"allowNo": false,
|
|
29
|
+
"type": "boolean"
|
|
30
|
+
},
|
|
31
|
+
"path": {
|
|
32
|
+
"description": "Path to the directory containing the Blueprint",
|
|
33
|
+
"hidden": true,
|
|
34
|
+
"name": "path",
|
|
35
|
+
"hasDynamicHelp": false,
|
|
36
|
+
"multiple": false,
|
|
37
|
+
"type": "option"
|
|
38
|
+
},
|
|
39
|
+
"trace": {
|
|
40
|
+
"description": "Trace output",
|
|
41
|
+
"hidden": true,
|
|
42
|
+
"name": "trace",
|
|
43
|
+
"allowNo": false,
|
|
44
|
+
"type": "boolean"
|
|
45
|
+
},
|
|
24
46
|
"verbose": {
|
|
25
47
|
"description": "Verbose output",
|
|
26
48
|
"hidden": true,
|
|
@@ -32,7 +54,7 @@
|
|
|
32
54
|
"aliases": [
|
|
33
55
|
"recipe"
|
|
34
56
|
],
|
|
35
|
-
"description": "Example to use for the
|
|
57
|
+
"description": "Example to use for the function resource. Discover examples at https://www.sanity.io/exchange/type=recipes/by=sanity",
|
|
36
58
|
"exclusive": [
|
|
37
59
|
"name",
|
|
38
60
|
"fn-type",
|
|
@@ -48,7 +70,7 @@
|
|
|
48
70
|
},
|
|
49
71
|
"name": {
|
|
50
72
|
"char": "n",
|
|
51
|
-
"description": "Name of the
|
|
73
|
+
"description": "Name of the resource to add",
|
|
52
74
|
"name": "name",
|
|
53
75
|
"hasDynamicHelp": false,
|
|
54
76
|
"multiple": false,
|
|
@@ -82,7 +104,7 @@
|
|
|
82
104
|
"fn-language",
|
|
83
105
|
"lang"
|
|
84
106
|
],
|
|
85
|
-
"description": "Language of the new
|
|
107
|
+
"description": "Language of the new function",
|
|
86
108
|
"name": "language",
|
|
87
109
|
"default": "ts",
|
|
88
110
|
"hasDynamicHelp": false,
|
|
@@ -110,7 +132,7 @@
|
|
|
110
132
|
"function-helpers",
|
|
111
133
|
"helpers"
|
|
112
134
|
],
|
|
113
|
-
"description": "Add helpers to the new
|
|
135
|
+
"description": "Add helpers to the new function",
|
|
114
136
|
"name": "fn-helpers",
|
|
115
137
|
"allowNo": true,
|
|
116
138
|
"type": "boolean"
|
|
@@ -120,7 +142,7 @@
|
|
|
120
142
|
"function-installer",
|
|
121
143
|
"installer"
|
|
122
144
|
],
|
|
123
|
-
"description": "
|
|
145
|
+
"description": "Which package manager to use when installing the @sanity/functions helpers",
|
|
124
146
|
"name": "fn-installer",
|
|
125
147
|
"hasDynamicHelp": false,
|
|
126
148
|
"multiple": false,
|
|
@@ -150,7 +172,8 @@
|
|
|
150
172
|
"pluginName": "@sanity/runtime-cli",
|
|
151
173
|
"pluginType": "core",
|
|
152
174
|
"strict": true,
|
|
153
|
-
"
|
|
175
|
+
"summary": "Add a function resource to a Blueprint",
|
|
176
|
+
"enableJsonFlag": true,
|
|
154
177
|
"isESM": true,
|
|
155
178
|
"relativePath": [
|
|
156
179
|
"dist",
|
|
@@ -162,7 +185,7 @@
|
|
|
162
185
|
"blueprints:config": {
|
|
163
186
|
"aliases": [],
|
|
164
187
|
"args": {},
|
|
165
|
-
"description": "
|
|
188
|
+
"description": "Manages the local Blueprint configuration, which links your Blueprint to a Sanity project and Stack.\n\nWithout flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with ID flags to update values directly (useful for scripting and automation).\n\nIf you need to switch your Blueprint to a different Stack, use --edit --stack-id.",
|
|
166
189
|
"examples": [
|
|
167
190
|
"<%= config.bin %> <%= command.id %>",
|
|
168
191
|
"<%= config.bin %> <%= command.id %> --edit",
|
|
@@ -170,6 +193,28 @@
|
|
|
170
193
|
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack-id <stackId>"
|
|
171
194
|
],
|
|
172
195
|
"flags": {
|
|
196
|
+
"json": {
|
|
197
|
+
"description": "Format output as json.",
|
|
198
|
+
"hidden": true,
|
|
199
|
+
"name": "json",
|
|
200
|
+
"allowNo": false,
|
|
201
|
+
"type": "boolean"
|
|
202
|
+
},
|
|
203
|
+
"path": {
|
|
204
|
+
"description": "Path to the directory containing the Blueprint",
|
|
205
|
+
"hidden": true,
|
|
206
|
+
"name": "path",
|
|
207
|
+
"hasDynamicHelp": false,
|
|
208
|
+
"multiple": false,
|
|
209
|
+
"type": "option"
|
|
210
|
+
},
|
|
211
|
+
"trace": {
|
|
212
|
+
"description": "Trace output",
|
|
213
|
+
"hidden": true,
|
|
214
|
+
"name": "trace",
|
|
215
|
+
"allowNo": false,
|
|
216
|
+
"type": "boolean"
|
|
217
|
+
},
|
|
173
218
|
"verbose": {
|
|
174
219
|
"description": "Verbose output",
|
|
175
220
|
"hidden": true,
|
|
@@ -192,7 +237,7 @@
|
|
|
192
237
|
"dependsOn": [
|
|
193
238
|
"edit"
|
|
194
239
|
],
|
|
195
|
-
"description": "Directly set the
|
|
240
|
+
"description": "Directly set the project ID in the configuration. Requires --edit flag",
|
|
196
241
|
"name": "project-id",
|
|
197
242
|
"hasDynamicHelp": false,
|
|
198
243
|
"multiple": false,
|
|
@@ -207,7 +252,7 @@
|
|
|
207
252
|
"dependsOn": [
|
|
208
253
|
"edit"
|
|
209
254
|
],
|
|
210
|
-
"description": "Directly set the
|
|
255
|
+
"description": "Directly set the organization ID in the configuration. Requires --edit flag",
|
|
211
256
|
"name": "organization-id",
|
|
212
257
|
"hasDynamicHelp": false,
|
|
213
258
|
"multiple": false,
|
|
@@ -235,7 +280,8 @@
|
|
|
235
280
|
"pluginName": "@sanity/runtime-cli",
|
|
236
281
|
"pluginType": "core",
|
|
237
282
|
"strict": true,
|
|
238
|
-
"
|
|
283
|
+
"summary": "View or edit the local Blueprint configuration",
|
|
284
|
+
"enableJsonFlag": true,
|
|
239
285
|
"isESM": true,
|
|
240
286
|
"relativePath": [
|
|
241
287
|
"dist",
|
|
@@ -247,12 +293,34 @@
|
|
|
247
293
|
"blueprints:deploy": {
|
|
248
294
|
"aliases": [],
|
|
249
295
|
"args": {},
|
|
250
|
-
"description": "
|
|
296
|
+
"description": "Pushes your local Blueprint configuration to the remote Stack; provisioning, updating, or destroying resources as needed. This is the primary command for applying infrastructure changes.\n\nBefore deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor activity.\n\nUse --no-wait to queue the deployment and return immediately without waiting for completion.",
|
|
251
297
|
"examples": [
|
|
252
298
|
"<%= config.bin %> <%= command.id %>",
|
|
253
299
|
"<%= config.bin %> <%= command.id %> --no-wait"
|
|
254
300
|
],
|
|
255
301
|
"flags": {
|
|
302
|
+
"json": {
|
|
303
|
+
"description": "Format output as json.",
|
|
304
|
+
"hidden": true,
|
|
305
|
+
"name": "json",
|
|
306
|
+
"allowNo": false,
|
|
307
|
+
"type": "boolean"
|
|
308
|
+
},
|
|
309
|
+
"path": {
|
|
310
|
+
"description": "Path to the directory containing the Blueprint",
|
|
311
|
+
"hidden": true,
|
|
312
|
+
"name": "path",
|
|
313
|
+
"hasDynamicHelp": false,
|
|
314
|
+
"multiple": false,
|
|
315
|
+
"type": "option"
|
|
316
|
+
},
|
|
317
|
+
"trace": {
|
|
318
|
+
"description": "Trace output",
|
|
319
|
+
"hidden": true,
|
|
320
|
+
"name": "trace",
|
|
321
|
+
"allowNo": false,
|
|
322
|
+
"type": "boolean"
|
|
323
|
+
},
|
|
256
324
|
"verbose": {
|
|
257
325
|
"description": "Verbose output",
|
|
258
326
|
"hidden": true,
|
|
@@ -274,7 +342,8 @@
|
|
|
274
342
|
"pluginName": "@sanity/runtime-cli",
|
|
275
343
|
"pluginType": "core",
|
|
276
344
|
"strict": true,
|
|
277
|
-
"
|
|
345
|
+
"summary": "Deploy the local Blueprint to the remote Stack",
|
|
346
|
+
"enableJsonFlag": true,
|
|
278
347
|
"isESM": true,
|
|
279
348
|
"relativePath": [
|
|
280
349
|
"dist",
|
|
@@ -286,12 +355,34 @@
|
|
|
286
355
|
"blueprints:destroy": {
|
|
287
356
|
"aliases": [],
|
|
288
357
|
"args": {},
|
|
289
|
-
"description": "
|
|
358
|
+
"description": "Permanently removes the remote Stack and all its provisioned resources. Your local Blueprint files remain untouched, allowing you to redeploy later with 'blueprints init' + 'blueprints deploy'.\n\nThis is a destructive operation. You will be prompted to confirm unless --force is specified.\n\nUse this to clean up test environments or decommission a Stack you no longer need.",
|
|
290
359
|
"examples": [
|
|
291
360
|
"<%= config.bin %> <%= command.id %>",
|
|
292
361
|
"<%= config.bin %> <%= command.id %> --stack-id <stackId> --project-id <projectId> --force --no-wait"
|
|
293
362
|
],
|
|
294
363
|
"flags": {
|
|
364
|
+
"json": {
|
|
365
|
+
"description": "Format output as json.",
|
|
366
|
+
"hidden": true,
|
|
367
|
+
"name": "json",
|
|
368
|
+
"allowNo": false,
|
|
369
|
+
"type": "boolean"
|
|
370
|
+
},
|
|
371
|
+
"path": {
|
|
372
|
+
"description": "Path to the directory containing the Blueprint",
|
|
373
|
+
"hidden": true,
|
|
374
|
+
"name": "path",
|
|
375
|
+
"hasDynamicHelp": false,
|
|
376
|
+
"multiple": false,
|
|
377
|
+
"type": "option"
|
|
378
|
+
},
|
|
379
|
+
"trace": {
|
|
380
|
+
"description": "Trace output",
|
|
381
|
+
"hidden": true,
|
|
382
|
+
"name": "trace",
|
|
383
|
+
"allowNo": false,
|
|
384
|
+
"type": "boolean"
|
|
385
|
+
},
|
|
295
386
|
"verbose": {
|
|
296
387
|
"description": "Verbose output",
|
|
297
388
|
"hidden": true,
|
|
@@ -370,7 +461,8 @@
|
|
|
370
461
|
"pluginName": "@sanity/runtime-cli",
|
|
371
462
|
"pluginType": "core",
|
|
372
463
|
"strict": true,
|
|
373
|
-
"
|
|
464
|
+
"summary": "Destroy the remote Stack deployment and its resources (will not delete local files)",
|
|
465
|
+
"enableJsonFlag": true,
|
|
374
466
|
"isESM": true,
|
|
375
467
|
"relativePath": [
|
|
376
468
|
"dist",
|
|
@@ -382,22 +474,38 @@
|
|
|
382
474
|
"blueprints:doctor": {
|
|
383
475
|
"aliases": [],
|
|
384
476
|
"args": {},
|
|
385
|
-
"description": "
|
|
477
|
+
"description": "Analyzes your local Blueprint and remote Stack configuration for common issues, such as missing authentication, invalid project references, or misconfigured resources.\n\nRun this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected issues.",
|
|
386
478
|
"examples": [],
|
|
387
479
|
"flags": {
|
|
388
|
-
"
|
|
389
|
-
"description": "
|
|
390
|
-
"
|
|
480
|
+
"json": {
|
|
481
|
+
"description": "Format output as json.",
|
|
482
|
+
"hidden": false,
|
|
483
|
+
"name": "json",
|
|
391
484
|
"allowNo": false,
|
|
392
485
|
"type": "boolean"
|
|
393
486
|
},
|
|
394
487
|
"path": {
|
|
395
|
-
"description": "Path to the
|
|
488
|
+
"description": "Path to the directory containing the Blueprint",
|
|
489
|
+
"hidden": false,
|
|
396
490
|
"name": "path",
|
|
397
491
|
"hasDynamicHelp": false,
|
|
398
492
|
"multiple": false,
|
|
399
493
|
"type": "option"
|
|
400
494
|
},
|
|
495
|
+
"trace": {
|
|
496
|
+
"description": "Trace output",
|
|
497
|
+
"hidden": true,
|
|
498
|
+
"name": "trace",
|
|
499
|
+
"allowNo": false,
|
|
500
|
+
"type": "boolean"
|
|
501
|
+
},
|
|
502
|
+
"verbose": {
|
|
503
|
+
"description": "Verbose output",
|
|
504
|
+
"hidden": false,
|
|
505
|
+
"name": "verbose",
|
|
506
|
+
"allowNo": false,
|
|
507
|
+
"type": "boolean"
|
|
508
|
+
},
|
|
401
509
|
"fix": {
|
|
402
510
|
"description": "Interactively fix configuration issues",
|
|
403
511
|
"name": "fix",
|
|
@@ -412,7 +520,8 @@
|
|
|
412
520
|
"pluginName": "@sanity/runtime-cli",
|
|
413
521
|
"pluginType": "core",
|
|
414
522
|
"strict": true,
|
|
415
|
-
"
|
|
523
|
+
"summary": "Diagnose potential issues with local Blueprint and remote Stack configuration",
|
|
524
|
+
"enableJsonFlag": true,
|
|
416
525
|
"isESM": true,
|
|
417
526
|
"relativePath": [
|
|
418
527
|
"dist",
|
|
@@ -424,12 +533,34 @@
|
|
|
424
533
|
"blueprints:info": {
|
|
425
534
|
"aliases": [],
|
|
426
535
|
"args": {},
|
|
427
|
-
"description": "
|
|
536
|
+
"description": "Displays the current state and metadata of your remote Stack deployment, including deployed resources, status, and configuration.\n\nUse this command to verify a deployment succeeded, check what resources are live, or confirm which Stack your local Blueprint is connected to.\n\nRun 'blueprints stacks' to see all available Stacks in your project or organization.",
|
|
428
537
|
"examples": [
|
|
429
538
|
"<%= config.bin %> <%= command.id %>",
|
|
430
539
|
"<%= config.bin %> <%= command.id %> --id <stackId>"
|
|
431
540
|
],
|
|
432
541
|
"flags": {
|
|
542
|
+
"json": {
|
|
543
|
+
"description": "Format output as json.",
|
|
544
|
+
"hidden": true,
|
|
545
|
+
"name": "json",
|
|
546
|
+
"allowNo": false,
|
|
547
|
+
"type": "boolean"
|
|
548
|
+
},
|
|
549
|
+
"path": {
|
|
550
|
+
"description": "Path to the directory containing the Blueprint",
|
|
551
|
+
"hidden": true,
|
|
552
|
+
"name": "path",
|
|
553
|
+
"hasDynamicHelp": false,
|
|
554
|
+
"multiple": false,
|
|
555
|
+
"type": "option"
|
|
556
|
+
},
|
|
557
|
+
"trace": {
|
|
558
|
+
"description": "Trace output",
|
|
559
|
+
"hidden": true,
|
|
560
|
+
"name": "trace",
|
|
561
|
+
"allowNo": false,
|
|
562
|
+
"type": "boolean"
|
|
563
|
+
},
|
|
433
564
|
"verbose": {
|
|
434
565
|
"description": "Verbose output",
|
|
435
566
|
"hidden": true,
|
|
@@ -438,7 +569,7 @@
|
|
|
438
569
|
"type": "boolean"
|
|
439
570
|
},
|
|
440
571
|
"id": {
|
|
441
|
-
"description": "Stack ID to show info for (defaults to current Stack)",
|
|
572
|
+
"description": "Stack ID to show info for (defaults to the current Stack)",
|
|
442
573
|
"name": "id",
|
|
443
574
|
"hasDynamicHelp": false,
|
|
444
575
|
"multiple": false,
|
|
@@ -452,7 +583,8 @@
|
|
|
452
583
|
"pluginName": "@sanity/runtime-cli",
|
|
453
584
|
"pluginType": "core",
|
|
454
585
|
"strict": true,
|
|
455
|
-
"
|
|
586
|
+
"summary": "Show information about the local Blueprint's remote Stack deployment",
|
|
587
|
+
"enableJsonFlag": true,
|
|
456
588
|
"isESM": true,
|
|
457
589
|
"relativePath": [
|
|
458
590
|
"dist",
|
|
@@ -465,11 +597,11 @@
|
|
|
465
597
|
"aliases": [],
|
|
466
598
|
"args": {
|
|
467
599
|
"dir": {
|
|
468
|
-
"description": "Directory to create the Blueprint in",
|
|
600
|
+
"description": "Directory to create the local Blueprint in",
|
|
469
601
|
"name": "dir"
|
|
470
602
|
}
|
|
471
603
|
},
|
|
472
|
-
"description": "
|
|
604
|
+
"description": "A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions, etc.). A Stack is the remote deployment target where your Blueprint is applied.\n[NOTE: Currently, accounts are limited to three (3) Stacks per project scope.]\n\nThis is typically the first command you run in a new project. It creates a local Blueprint manifest file (sanity.blueprint.ts, .js, or .json) and provisions a new remote Stack.\nAdditionally, a Blueprint configuration file is created in .sanity/ containing the scope and Stack IDs. This is .gitignored by default.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.",
|
|
473
605
|
"examples": [
|
|
474
606
|
"<%= config.bin %> <%= command.id %>",
|
|
475
607
|
"<%= config.bin %> <%= command.id %> [directory]",
|
|
@@ -478,8 +610,37 @@
|
|
|
478
610
|
"<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts> --stack-name <stackName>"
|
|
479
611
|
],
|
|
480
612
|
"flags": {
|
|
613
|
+
"json": {
|
|
614
|
+
"description": "Format output as json.",
|
|
615
|
+
"hidden": true,
|
|
616
|
+
"name": "json",
|
|
617
|
+
"allowNo": false,
|
|
618
|
+
"type": "boolean"
|
|
619
|
+
},
|
|
620
|
+
"path": {
|
|
621
|
+
"description": "Path to the directory containing the Blueprint",
|
|
622
|
+
"hidden": true,
|
|
623
|
+
"name": "path",
|
|
624
|
+
"hasDynamicHelp": false,
|
|
625
|
+
"multiple": false,
|
|
626
|
+
"type": "option"
|
|
627
|
+
},
|
|
628
|
+
"trace": {
|
|
629
|
+
"description": "Trace output",
|
|
630
|
+
"hidden": true,
|
|
631
|
+
"name": "trace",
|
|
632
|
+
"allowNo": false,
|
|
633
|
+
"type": "boolean"
|
|
634
|
+
},
|
|
635
|
+
"verbose": {
|
|
636
|
+
"description": "Verbose output",
|
|
637
|
+
"hidden": false,
|
|
638
|
+
"name": "verbose",
|
|
639
|
+
"allowNo": false,
|
|
640
|
+
"type": "boolean"
|
|
641
|
+
},
|
|
481
642
|
"dir": {
|
|
482
|
-
"description": "Directory to create the Blueprint in",
|
|
643
|
+
"description": "Directory to create the local Blueprint in",
|
|
483
644
|
"name": "dir",
|
|
484
645
|
"hasDynamicHelp": false,
|
|
485
646
|
"multiple": false,
|
|
@@ -489,7 +650,7 @@
|
|
|
489
650
|
"aliases": [
|
|
490
651
|
"recipe"
|
|
491
652
|
],
|
|
492
|
-
"description": "Example to use for the Blueprint",
|
|
653
|
+
"description": "Example to use for the local Blueprint",
|
|
493
654
|
"exclusive": [
|
|
494
655
|
"blueprint-type",
|
|
495
656
|
"stack-id",
|
|
@@ -504,7 +665,7 @@
|
|
|
504
665
|
"aliases": [
|
|
505
666
|
"type"
|
|
506
667
|
],
|
|
507
|
-
"description": "Blueprint manifest type to use for the Blueprint",
|
|
668
|
+
"description": "Blueprint manifest type to use for the local Blueprint",
|
|
508
669
|
"name": "blueprint-type",
|
|
509
670
|
"hasDynamicHelp": false,
|
|
510
671
|
"multiple": false,
|
|
@@ -520,7 +681,7 @@
|
|
|
520
681
|
"project",
|
|
521
682
|
"projectId"
|
|
522
683
|
],
|
|
523
|
-
"description": "Sanity
|
|
684
|
+
"description": "Sanity project ID used to scope local Blueprint and remote Stack",
|
|
524
685
|
"name": "project-id",
|
|
525
686
|
"hasDynamicHelp": false,
|
|
526
687
|
"multiple": false,
|
|
@@ -532,7 +693,7 @@
|
|
|
532
693
|
"organizationId",
|
|
533
694
|
"org"
|
|
534
695
|
],
|
|
535
|
-
"description": "Sanity
|
|
696
|
+
"description": "Sanity organization ID used to scope local Blueprint and remote Stack",
|
|
536
697
|
"name": "organization-id",
|
|
537
698
|
"hasDynamicHelp": false,
|
|
538
699
|
"multiple": false,
|
|
@@ -546,7 +707,7 @@
|
|
|
546
707
|
"dependsOn": [
|
|
547
708
|
"project-id"
|
|
548
709
|
],
|
|
549
|
-
"description": "Existing Stack ID to
|
|
710
|
+
"description": "Existing Stack ID used to scope local Blueprint",
|
|
550
711
|
"exclusive": [
|
|
551
712
|
"stack-name"
|
|
552
713
|
],
|
|
@@ -559,7 +720,7 @@
|
|
|
559
720
|
"aliases": [
|
|
560
721
|
"name"
|
|
561
722
|
],
|
|
562
|
-
"description": "Name to use for a
|
|
723
|
+
"description": "Name to use for a new Stack provisioned during initialization",
|
|
563
724
|
"exclusive": [
|
|
564
725
|
"stack-id"
|
|
565
726
|
],
|
|
@@ -567,12 +728,6 @@
|
|
|
567
728
|
"hasDynamicHelp": false,
|
|
568
729
|
"multiple": false,
|
|
569
730
|
"type": "option"
|
|
570
|
-
},
|
|
571
|
-
"verbose": {
|
|
572
|
-
"description": "Verbose output",
|
|
573
|
-
"name": "verbose",
|
|
574
|
-
"allowNo": false,
|
|
575
|
-
"type": "boolean"
|
|
576
731
|
}
|
|
577
732
|
},
|
|
578
733
|
"hasDynamicHelp": false,
|
|
@@ -582,7 +737,8 @@
|
|
|
582
737
|
"pluginName": "@sanity/runtime-cli",
|
|
583
738
|
"pluginType": "core",
|
|
584
739
|
"strict": true,
|
|
585
|
-
"
|
|
740
|
+
"summary": "Initialize a local Blueprint and optionally provision a remote Stack deployment",
|
|
741
|
+
"enableJsonFlag": true,
|
|
586
742
|
"isESM": true,
|
|
587
743
|
"relativePath": [
|
|
588
744
|
"dist",
|
|
@@ -594,12 +750,34 @@
|
|
|
594
750
|
"blueprints:logs": {
|
|
595
751
|
"aliases": [],
|
|
596
752
|
"args": {},
|
|
597
|
-
"description": "
|
|
753
|
+
"description": "Retrieves Stack deployment logs, useful for debugging and monitoring deployment activity.\n\nUse --watch (-w) to stream logs in real-time.\n\nIf you're not seeing expected logs, verify your Stack is deployed with 'blueprints info'.",
|
|
598
754
|
"examples": [
|
|
599
755
|
"<%= config.bin %> <%= command.id %>",
|
|
600
756
|
"<%= config.bin %> <%= command.id %> --watch"
|
|
601
757
|
],
|
|
602
758
|
"flags": {
|
|
759
|
+
"json": {
|
|
760
|
+
"description": "Format output as json.",
|
|
761
|
+
"hidden": true,
|
|
762
|
+
"name": "json",
|
|
763
|
+
"allowNo": false,
|
|
764
|
+
"type": "boolean"
|
|
765
|
+
},
|
|
766
|
+
"path": {
|
|
767
|
+
"description": "Path to the directory containing the Blueprint",
|
|
768
|
+
"hidden": true,
|
|
769
|
+
"name": "path",
|
|
770
|
+
"hasDynamicHelp": false,
|
|
771
|
+
"multiple": false,
|
|
772
|
+
"type": "option"
|
|
773
|
+
},
|
|
774
|
+
"trace": {
|
|
775
|
+
"description": "Trace output",
|
|
776
|
+
"hidden": true,
|
|
777
|
+
"name": "trace",
|
|
778
|
+
"allowNo": false,
|
|
779
|
+
"type": "boolean"
|
|
780
|
+
},
|
|
603
781
|
"verbose": {
|
|
604
782
|
"description": "Verbose output",
|
|
605
783
|
"hidden": true,
|
|
@@ -625,7 +803,8 @@
|
|
|
625
803
|
"pluginName": "@sanity/runtime-cli",
|
|
626
804
|
"pluginType": "core",
|
|
627
805
|
"strict": true,
|
|
628
|
-
"
|
|
806
|
+
"summary": "Display logs for the current Blueprint's Stack deployment",
|
|
807
|
+
"enableJsonFlag": true,
|
|
629
808
|
"isESM": true,
|
|
630
809
|
"relativePath": [
|
|
631
810
|
"dist",
|
|
@@ -637,11 +816,33 @@
|
|
|
637
816
|
"blueprints:plan": {
|
|
638
817
|
"aliases": [],
|
|
639
818
|
"args": {},
|
|
640
|
-
"description": "
|
|
819
|
+
"description": "Use this command to preview what changes will be applied to your remote Stack before deploying. This is a safe, read-only operation—no resources are created, modified, or deleted.\n\nRun 'blueprints plan' after making local changes to your Blueprint manifest to verify the expected diff. When ready, run 'blueprints deploy' to apply changes.",
|
|
641
820
|
"examples": [
|
|
642
821
|
"<%= config.bin %> <%= command.id %>"
|
|
643
822
|
],
|
|
644
823
|
"flags": {
|
|
824
|
+
"json": {
|
|
825
|
+
"description": "Format output as json.",
|
|
826
|
+
"hidden": true,
|
|
827
|
+
"name": "json",
|
|
828
|
+
"allowNo": false,
|
|
829
|
+
"type": "boolean"
|
|
830
|
+
},
|
|
831
|
+
"path": {
|
|
832
|
+
"description": "Path to the directory containing the Blueprint",
|
|
833
|
+
"hidden": true,
|
|
834
|
+
"name": "path",
|
|
835
|
+
"hasDynamicHelp": false,
|
|
836
|
+
"multiple": false,
|
|
837
|
+
"type": "option"
|
|
838
|
+
},
|
|
839
|
+
"trace": {
|
|
840
|
+
"description": "Trace output",
|
|
841
|
+
"hidden": true,
|
|
842
|
+
"name": "trace",
|
|
843
|
+
"allowNo": false,
|
|
844
|
+
"type": "boolean"
|
|
845
|
+
},
|
|
645
846
|
"verbose": {
|
|
646
847
|
"description": "Verbose output",
|
|
647
848
|
"hidden": true,
|
|
@@ -657,7 +858,8 @@
|
|
|
657
858
|
"pluginName": "@sanity/runtime-cli",
|
|
658
859
|
"pluginType": "core",
|
|
659
860
|
"strict": true,
|
|
660
|
-
"
|
|
861
|
+
"summary": "Enumerate resources to be deployed to the remote Stack - will not modify any resources",
|
|
862
|
+
"enableJsonFlag": true,
|
|
661
863
|
"isESM": true,
|
|
662
864
|
"relativePath": [
|
|
663
865
|
"dist",
|
|
@@ -669,13 +871,35 @@
|
|
|
669
871
|
"blueprints:stacks": {
|
|
670
872
|
"aliases": [],
|
|
671
873
|
"args": {},
|
|
672
|
-
"description": "
|
|
874
|
+
"description": "Shows all Stacks associated with a project or organization. By default, lists Stacks scoped to the local Blueprint.\n\nUse this to discover existing Stacks you can scope a local Blueprint to (using 'blueprints config --edit'), or to audit what's deployed across your project.",
|
|
673
875
|
"examples": [
|
|
674
876
|
"<%= config.bin %> <%= command.id %>",
|
|
675
877
|
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
676
878
|
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>"
|
|
677
879
|
],
|
|
678
880
|
"flags": {
|
|
881
|
+
"json": {
|
|
882
|
+
"description": "Format output as json.",
|
|
883
|
+
"hidden": true,
|
|
884
|
+
"name": "json",
|
|
885
|
+
"allowNo": false,
|
|
886
|
+
"type": "boolean"
|
|
887
|
+
},
|
|
888
|
+
"path": {
|
|
889
|
+
"description": "Path to the directory containing the Blueprint",
|
|
890
|
+
"hidden": true,
|
|
891
|
+
"name": "path",
|
|
892
|
+
"hasDynamicHelp": false,
|
|
893
|
+
"multiple": false,
|
|
894
|
+
"type": "option"
|
|
895
|
+
},
|
|
896
|
+
"trace": {
|
|
897
|
+
"description": "Trace output",
|
|
898
|
+
"hidden": true,
|
|
899
|
+
"name": "trace",
|
|
900
|
+
"allowNo": false,
|
|
901
|
+
"type": "boolean"
|
|
902
|
+
},
|
|
679
903
|
"verbose": {
|
|
680
904
|
"description": "Verbose output",
|
|
681
905
|
"hidden": true,
|
|
@@ -688,7 +912,7 @@
|
|
|
688
912
|
"projectId",
|
|
689
913
|
"project"
|
|
690
914
|
],
|
|
691
|
-
"description": "Project ID to show
|
|
915
|
+
"description": "Project ID to show Stack deployments for",
|
|
692
916
|
"exclusive": [
|
|
693
917
|
"organization-id"
|
|
694
918
|
],
|
|
@@ -703,7 +927,7 @@
|
|
|
703
927
|
"organization",
|
|
704
928
|
"org"
|
|
705
929
|
],
|
|
706
|
-
"description": "Organization ID to show
|
|
930
|
+
"description": "Organization ID to show Stack deployments for",
|
|
707
931
|
"exclusive": [
|
|
708
932
|
"project-id"
|
|
709
933
|
],
|
|
@@ -720,7 +944,8 @@
|
|
|
720
944
|
"pluginName": "@sanity/runtime-cli",
|
|
721
945
|
"pluginType": "core",
|
|
722
946
|
"strict": true,
|
|
723
|
-
"
|
|
947
|
+
"summary": "List all remote Stack deployments (defaults to the current Blueprint's project scope)",
|
|
948
|
+
"enableJsonFlag": true,
|
|
724
949
|
"isESM": true,
|
|
725
950
|
"relativePath": [
|
|
726
951
|
"dist",
|
|
@@ -732,7 +957,7 @@
|
|
|
732
957
|
"functions:add": {
|
|
733
958
|
"aliases": [],
|
|
734
959
|
"args": {},
|
|
735
|
-
"description": "
|
|
960
|
+
"description": "Scaffolds a new Function in the functions/ folder and templates a resource for your Blueprint manifest.\n\nFunctions are serverless handlers triggered by document events (create, update, delete, publish) or media library events.\n\nAfter adding, use 'functions dev' to test locally, then 'blueprints deploy' to publish.",
|
|
736
961
|
"examples": [
|
|
737
962
|
"<%= config.bin %> <%= command.id %>",
|
|
738
963
|
"<%= config.bin %> <%= command.id %> --helpers",
|
|
@@ -741,6 +966,28 @@
|
|
|
741
966
|
"<%= config.bin %> <%= command.id %> --name my-function --type document-create --type document-update --lang js"
|
|
742
967
|
],
|
|
743
968
|
"flags": {
|
|
969
|
+
"json": {
|
|
970
|
+
"description": "Format output as json.",
|
|
971
|
+
"hidden": true,
|
|
972
|
+
"name": "json",
|
|
973
|
+
"allowNo": false,
|
|
974
|
+
"type": "boolean"
|
|
975
|
+
},
|
|
976
|
+
"path": {
|
|
977
|
+
"description": "Path to the directory containing the Blueprint",
|
|
978
|
+
"hidden": true,
|
|
979
|
+
"name": "path",
|
|
980
|
+
"hasDynamicHelp": false,
|
|
981
|
+
"multiple": false,
|
|
982
|
+
"type": "option"
|
|
983
|
+
},
|
|
984
|
+
"trace": {
|
|
985
|
+
"description": "Trace output",
|
|
986
|
+
"hidden": true,
|
|
987
|
+
"name": "trace",
|
|
988
|
+
"allowNo": false,
|
|
989
|
+
"type": "boolean"
|
|
990
|
+
},
|
|
744
991
|
"verbose": {
|
|
745
992
|
"description": "Verbose output",
|
|
746
993
|
"hidden": true,
|
|
@@ -857,7 +1104,8 @@
|
|
|
857
1104
|
"pluginName": "@sanity/runtime-cli",
|
|
858
1105
|
"pluginType": "core",
|
|
859
1106
|
"strict": true,
|
|
860
|
-
"
|
|
1107
|
+
"summary": "Add a Function to your Blueprint",
|
|
1108
|
+
"enableJsonFlag": true,
|
|
861
1109
|
"isESM": true,
|
|
862
1110
|
"relativePath": [
|
|
863
1111
|
"dist",
|
|
@@ -869,11 +1117,34 @@
|
|
|
869
1117
|
"functions:dev": {
|
|
870
1118
|
"aliases": [],
|
|
871
1119
|
"args": {},
|
|
872
|
-
"description": "
|
|
1120
|
+
"description": "Runs a local, web-based development server to test your functions before deploying.\n\nOpen the emulator in your browser to interactively test your functions with the payload editor.\n\nOptionally, set the host and port with the --host and --port flags. Function timeout can be configured with the --timeout flag.\n\nTo invoke a function with the CLI, use 'functions test'.",
|
|
873
1121
|
"examples": [
|
|
874
|
-
"<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974"
|
|
1122
|
+
"<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 8974",
|
|
1123
|
+
"<%= config.bin %> <%= command.id %> --timeout 60"
|
|
875
1124
|
],
|
|
876
1125
|
"flags": {
|
|
1126
|
+
"json": {
|
|
1127
|
+
"description": "Format output as json.",
|
|
1128
|
+
"hidden": true,
|
|
1129
|
+
"name": "json",
|
|
1130
|
+
"allowNo": false,
|
|
1131
|
+
"type": "boolean"
|
|
1132
|
+
},
|
|
1133
|
+
"path": {
|
|
1134
|
+
"description": "Path to the directory containing the Blueprint",
|
|
1135
|
+
"hidden": true,
|
|
1136
|
+
"name": "path",
|
|
1137
|
+
"hasDynamicHelp": false,
|
|
1138
|
+
"multiple": false,
|
|
1139
|
+
"type": "option"
|
|
1140
|
+
},
|
|
1141
|
+
"trace": {
|
|
1142
|
+
"description": "Trace output",
|
|
1143
|
+
"hidden": true,
|
|
1144
|
+
"name": "trace",
|
|
1145
|
+
"allowNo": false,
|
|
1146
|
+
"type": "boolean"
|
|
1147
|
+
},
|
|
877
1148
|
"verbose": {
|
|
878
1149
|
"description": "Verbose output",
|
|
879
1150
|
"hidden": true,
|
|
@@ -916,7 +1187,8 @@
|
|
|
916
1187
|
"pluginName": "@sanity/runtime-cli",
|
|
917
1188
|
"pluginType": "core",
|
|
918
1189
|
"strict": true,
|
|
919
|
-
"
|
|
1190
|
+
"summary": "Start the Sanity Function emulator",
|
|
1191
|
+
"enableJsonFlag": true,
|
|
920
1192
|
"isESM": true,
|
|
921
1193
|
"relativePath": [
|
|
922
1194
|
"dist",
|
|
@@ -931,10 +1203,10 @@
|
|
|
931
1203
|
"name": {
|
|
932
1204
|
"description": "The name of the Sanity Function",
|
|
933
1205
|
"name": "name",
|
|
934
|
-
"required":
|
|
1206
|
+
"required": false
|
|
935
1207
|
}
|
|
936
1208
|
},
|
|
937
|
-
"description": "
|
|
1209
|
+
"description": "Fetches execution logs from a deployed function, useful for debugging production issues or monitoring activity.\n\nUse --watch (-w) to stream logs in real-time. Use --delete to clear all logs for a function (requires confirmation unless --force is specified).",
|
|
938
1210
|
"examples": [
|
|
939
1211
|
"<%= config.bin %> <%= command.id %> <name>",
|
|
940
1212
|
"<%= config.bin %> <%= command.id %> <name> --json",
|
|
@@ -942,6 +1214,29 @@
|
|
|
942
1214
|
"<%= config.bin %> <%= command.id %> <name> --delete"
|
|
943
1215
|
],
|
|
944
1216
|
"flags": {
|
|
1217
|
+
"json": {
|
|
1218
|
+
"char": "j",
|
|
1219
|
+
"description": "Return logs in JSON format",
|
|
1220
|
+
"name": "json",
|
|
1221
|
+
"required": false,
|
|
1222
|
+
"allowNo": false,
|
|
1223
|
+
"type": "boolean"
|
|
1224
|
+
},
|
|
1225
|
+
"path": {
|
|
1226
|
+
"description": "Path to the directory containing the Blueprint",
|
|
1227
|
+
"hidden": true,
|
|
1228
|
+
"name": "path",
|
|
1229
|
+
"hasDynamicHelp": false,
|
|
1230
|
+
"multiple": false,
|
|
1231
|
+
"type": "option"
|
|
1232
|
+
},
|
|
1233
|
+
"trace": {
|
|
1234
|
+
"description": "Trace output",
|
|
1235
|
+
"hidden": true,
|
|
1236
|
+
"name": "trace",
|
|
1237
|
+
"allowNo": false,
|
|
1238
|
+
"type": "boolean"
|
|
1239
|
+
},
|
|
945
1240
|
"verbose": {
|
|
946
1241
|
"description": "Verbose output",
|
|
947
1242
|
"hidden": true,
|
|
@@ -959,14 +1254,6 @@
|
|
|
959
1254
|
"multiple": false,
|
|
960
1255
|
"type": "option"
|
|
961
1256
|
},
|
|
962
|
-
"json": {
|
|
963
|
-
"char": "j",
|
|
964
|
-
"description": "Return logs in JSON format",
|
|
965
|
-
"name": "json",
|
|
966
|
-
"required": false,
|
|
967
|
-
"allowNo": false,
|
|
968
|
-
"type": "boolean"
|
|
969
|
-
},
|
|
970
1257
|
"utc": {
|
|
971
1258
|
"char": "u",
|
|
972
1259
|
"description": "Show dates in UTC time zone",
|
|
@@ -1016,7 +1303,8 @@
|
|
|
1016
1303
|
"pluginName": "@sanity/runtime-cli",
|
|
1017
1304
|
"pluginType": "core",
|
|
1018
1305
|
"strict": true,
|
|
1019
|
-
"
|
|
1306
|
+
"summary": "Retrieve or delete logs for a Sanity Function",
|
|
1307
|
+
"enableJsonFlag": true,
|
|
1020
1308
|
"isESM": true,
|
|
1021
1309
|
"relativePath": [
|
|
1022
1310
|
"dist",
|
|
@@ -1031,10 +1319,10 @@
|
|
|
1031
1319
|
"name": {
|
|
1032
1320
|
"description": "The name of the Sanity Function",
|
|
1033
1321
|
"name": "name",
|
|
1034
|
-
"required":
|
|
1322
|
+
"required": false
|
|
1035
1323
|
}
|
|
1036
1324
|
},
|
|
1037
|
-
"description": "
|
|
1325
|
+
"description": "Executes a function locally with the provided payload, simulating how it would run when deployed. Use this to test your function logic before deploying.\n\nProvide test data via --data (inline JSON), --file (JSON file), or --document-id (fetch from Sanity). For update events, use the before/after flag pairs to simulate document changes.",
|
|
1038
1326
|
"examples": [
|
|
1039
1327
|
"<%= config.bin %> <%= command.id %> <name> --data '{ \"id\": 1 }'",
|
|
1040
1328
|
"<%= config.bin %> <%= command.id %> <name> --file 'payload.json'",
|
|
@@ -1042,6 +1330,28 @@
|
|
|
1042
1330
|
"<%= config.bin %> <%= command.id %> <name> --event update --data-before '{ \"title\": \"before\" }' --data-after '{ \"title\": \"after\" }'"
|
|
1043
1331
|
],
|
|
1044
1332
|
"flags": {
|
|
1333
|
+
"json": {
|
|
1334
|
+
"description": "Format output as json.",
|
|
1335
|
+
"hidden": true,
|
|
1336
|
+
"name": "json",
|
|
1337
|
+
"allowNo": false,
|
|
1338
|
+
"type": "boolean"
|
|
1339
|
+
},
|
|
1340
|
+
"path": {
|
|
1341
|
+
"description": "Path to the directory containing the Blueprint",
|
|
1342
|
+
"hidden": true,
|
|
1343
|
+
"name": "path",
|
|
1344
|
+
"hasDynamicHelp": false,
|
|
1345
|
+
"multiple": false,
|
|
1346
|
+
"type": "option"
|
|
1347
|
+
},
|
|
1348
|
+
"trace": {
|
|
1349
|
+
"description": "Trace output",
|
|
1350
|
+
"hidden": true,
|
|
1351
|
+
"name": "trace",
|
|
1352
|
+
"allowNo": false,
|
|
1353
|
+
"type": "boolean"
|
|
1354
|
+
},
|
|
1045
1355
|
"verbose": {
|
|
1046
1356
|
"description": "Verbose output",
|
|
1047
1357
|
"hidden": true,
|
|
@@ -1287,7 +1597,8 @@
|
|
|
1287
1597
|
"pluginName": "@sanity/runtime-cli",
|
|
1288
1598
|
"pluginType": "core",
|
|
1289
1599
|
"strict": true,
|
|
1290
|
-
"
|
|
1600
|
+
"summary": "Invoke a local Sanity Function",
|
|
1601
|
+
"enableJsonFlag": true,
|
|
1291
1602
|
"isESM": true,
|
|
1292
1603
|
"relativePath": [
|
|
1293
1604
|
"dist",
|
|
@@ -1315,11 +1626,33 @@
|
|
|
1315
1626
|
"required": true
|
|
1316
1627
|
}
|
|
1317
1628
|
},
|
|
1318
|
-
"description": "
|
|
1629
|
+
"description": "Sets an environment variable in a deployed Sanity Function. If the variable already exists, its value is updated.\n\nEnvironment variables are useful for API keys, configuration values, and other secrets that shouldn't be hardcoded. Changes take effect on the next function invocation.",
|
|
1319
1630
|
"examples": [
|
|
1320
1631
|
"<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/"
|
|
1321
1632
|
],
|
|
1322
1633
|
"flags": {
|
|
1634
|
+
"json": {
|
|
1635
|
+
"description": "Format output as json.",
|
|
1636
|
+
"hidden": true,
|
|
1637
|
+
"name": "json",
|
|
1638
|
+
"allowNo": false,
|
|
1639
|
+
"type": "boolean"
|
|
1640
|
+
},
|
|
1641
|
+
"path": {
|
|
1642
|
+
"description": "Path to the directory containing the Blueprint",
|
|
1643
|
+
"hidden": true,
|
|
1644
|
+
"name": "path",
|
|
1645
|
+
"hasDynamicHelp": false,
|
|
1646
|
+
"multiple": false,
|
|
1647
|
+
"type": "option"
|
|
1648
|
+
},
|
|
1649
|
+
"trace": {
|
|
1650
|
+
"description": "Trace output",
|
|
1651
|
+
"hidden": true,
|
|
1652
|
+
"name": "trace",
|
|
1653
|
+
"allowNo": false,
|
|
1654
|
+
"type": "boolean"
|
|
1655
|
+
},
|
|
1323
1656
|
"verbose": {
|
|
1324
1657
|
"description": "Verbose output",
|
|
1325
1658
|
"hidden": true,
|
|
@@ -1335,7 +1668,8 @@
|
|
|
1335
1668
|
"pluginName": "@sanity/runtime-cli",
|
|
1336
1669
|
"pluginType": "core",
|
|
1337
1670
|
"strict": true,
|
|
1338
|
-
"
|
|
1671
|
+
"summary": "Add or set an environment variable for a deployed function",
|
|
1672
|
+
"enableJsonFlag": true,
|
|
1339
1673
|
"isESM": true,
|
|
1340
1674
|
"relativePath": [
|
|
1341
1675
|
"dist",
|
|
@@ -1354,11 +1688,33 @@
|
|
|
1354
1688
|
"required": true
|
|
1355
1689
|
}
|
|
1356
1690
|
},
|
|
1357
|
-
"description": "
|
|
1691
|
+
"description": "Displays all environment variables (keys only) configured in a deployed Sanity Function.\n\nUse 'functions env add' to set variables or 'functions env remove' to delete them.",
|
|
1358
1692
|
"examples": [
|
|
1359
1693
|
"<%= config.bin %> <%= command.id %> MyFunction"
|
|
1360
1694
|
],
|
|
1361
1695
|
"flags": {
|
|
1696
|
+
"json": {
|
|
1697
|
+
"description": "Format output as json.",
|
|
1698
|
+
"hidden": true,
|
|
1699
|
+
"name": "json",
|
|
1700
|
+
"allowNo": false,
|
|
1701
|
+
"type": "boolean"
|
|
1702
|
+
},
|
|
1703
|
+
"path": {
|
|
1704
|
+
"description": "Path to the directory containing the Blueprint",
|
|
1705
|
+
"hidden": true,
|
|
1706
|
+
"name": "path",
|
|
1707
|
+
"hasDynamicHelp": false,
|
|
1708
|
+
"multiple": false,
|
|
1709
|
+
"type": "option"
|
|
1710
|
+
},
|
|
1711
|
+
"trace": {
|
|
1712
|
+
"description": "Trace output",
|
|
1713
|
+
"hidden": true,
|
|
1714
|
+
"name": "trace",
|
|
1715
|
+
"allowNo": false,
|
|
1716
|
+
"type": "boolean"
|
|
1717
|
+
},
|
|
1362
1718
|
"verbose": {
|
|
1363
1719
|
"description": "Verbose output",
|
|
1364
1720
|
"hidden": true,
|
|
@@ -1374,7 +1730,8 @@
|
|
|
1374
1730
|
"pluginName": "@sanity/runtime-cli",
|
|
1375
1731
|
"pluginType": "core",
|
|
1376
1732
|
"strict": true,
|
|
1377
|
-
"
|
|
1733
|
+
"summary": "List environment variables for a deployed function",
|
|
1734
|
+
"enableJsonFlag": true,
|
|
1378
1735
|
"isESM": true,
|
|
1379
1736
|
"relativePath": [
|
|
1380
1737
|
"dist",
|
|
@@ -1398,11 +1755,33 @@
|
|
|
1398
1755
|
"required": true
|
|
1399
1756
|
}
|
|
1400
1757
|
},
|
|
1401
|
-
"description": "
|
|
1758
|
+
"description": "Deletes an environment variable from a deployed Sanity Function. The change takes effect on the next function invocation.\n\nUse 'functions env list' to see current variables before removing.",
|
|
1402
1759
|
"examples": [
|
|
1403
1760
|
"<%= config.bin %> <%= command.id %> MyFunction API_URL"
|
|
1404
1761
|
],
|
|
1405
1762
|
"flags": {
|
|
1763
|
+
"json": {
|
|
1764
|
+
"description": "Format output as json.",
|
|
1765
|
+
"hidden": true,
|
|
1766
|
+
"name": "json",
|
|
1767
|
+
"allowNo": false,
|
|
1768
|
+
"type": "boolean"
|
|
1769
|
+
},
|
|
1770
|
+
"path": {
|
|
1771
|
+
"description": "Path to the directory containing the Blueprint",
|
|
1772
|
+
"hidden": true,
|
|
1773
|
+
"name": "path",
|
|
1774
|
+
"hasDynamicHelp": false,
|
|
1775
|
+
"multiple": false,
|
|
1776
|
+
"type": "option"
|
|
1777
|
+
},
|
|
1778
|
+
"trace": {
|
|
1779
|
+
"description": "Trace output",
|
|
1780
|
+
"hidden": true,
|
|
1781
|
+
"name": "trace",
|
|
1782
|
+
"allowNo": false,
|
|
1783
|
+
"type": "boolean"
|
|
1784
|
+
},
|
|
1406
1785
|
"verbose": {
|
|
1407
1786
|
"description": "Verbose output",
|
|
1408
1787
|
"hidden": true,
|
|
@@ -1418,7 +1797,8 @@
|
|
|
1418
1797
|
"pluginName": "@sanity/runtime-cli",
|
|
1419
1798
|
"pluginType": "core",
|
|
1420
1799
|
"strict": true,
|
|
1421
|
-
"
|
|
1800
|
+
"summary": "Remove an environment variable from a deployed function",
|
|
1801
|
+
"enableJsonFlag": true,
|
|
1422
1802
|
"isESM": true,
|
|
1423
1803
|
"relativePath": [
|
|
1424
1804
|
"dist",
|
|
@@ -1429,5 +1809,5 @@
|
|
|
1429
1809
|
]
|
|
1430
1810
|
}
|
|
1431
1811
|
},
|
|
1432
|
-
"version": "
|
|
1812
|
+
"version": "13.0.0"
|
|
1433
1813
|
}
|