@sanity/runtime-cli 4.4.0 → 4.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -77
- package/dist/actions/blueprints/assets.d.ts +1 -0
- package/dist/actions/blueprints/assets.js +21 -4
- package/dist/actions/blueprints/blueprint.d.ts +6 -12
- package/dist/actions/blueprints/blueprint.js +38 -45
- package/dist/actions/blueprints/index.d.ts +33 -0
- package/dist/actions/blueprints/index.js +32 -0
- package/dist/actions/blueprints/projects.d.ts +9 -0
- package/dist/actions/blueprints/projects.js +12 -0
- package/dist/actions/blueprints/stacks.d.ts +0 -12
- package/dist/actions/blueprints/stacks.js +3 -30
- package/dist/actions/functions/test.d.ts +2 -2
- package/dist/actions/functions/test.js +2 -2
- package/dist/baseCommands.d.ts +24 -0
- package/dist/baseCommands.js +69 -0
- package/dist/commands/blueprints/add.d.ts +1 -1
- package/dist/commands/blueprints/add.js +7 -6
- package/dist/commands/blueprints/config.d.ts +1 -1
- package/dist/commands/blueprints/config.js +24 -11
- package/dist/commands/blueprints/deploy.d.ts +2 -2
- package/dist/commands/blueprints/deploy.js +18 -33
- package/dist/commands/blueprints/destroy.d.ts +4 -3
- package/dist/commands/blueprints/destroy.js +32 -35
- package/dist/commands/blueprints/info.d.ts +2 -2
- package/dist/commands/blueprints/info.js +16 -36
- package/dist/commands/blueprints/init.d.ts +10 -2
- package/dist/commands/blueprints/init.js +85 -26
- package/dist/commands/blueprints/logs.d.ts +2 -2
- package/dist/commands/blueprints/logs.js +18 -32
- package/dist/commands/blueprints/plan.d.ts +2 -2
- package/dist/commands/blueprints/plan.js +10 -16
- package/dist/commands/blueprints/stacks.d.ts +3 -2
- package/dist/commands/blueprints/stacks.js +10 -29
- package/dist/commands/functions/env/add.d.ts +2 -2
- package/dist/commands/functions/env/add.js +6 -17
- package/dist/commands/functions/env/list.d.ts +2 -2
- package/dist/commands/functions/env/list.js +10 -17
- package/dist/commands/functions/env/remove.d.ts +2 -2
- package/dist/commands/functions/env/remove.js +6 -17
- package/dist/commands/functions/invoke.d.ts +2 -2
- package/dist/commands/functions/invoke.js +7 -14
- package/dist/commands/functions/logs.d.ts +3 -7
- package/dist/commands/functions/logs.js +21 -37
- package/dist/commands/functions/test.d.ts +3 -3
- package/dist/commands/functions/test.js +13 -14
- package/dist/server/app.js +82 -14
- package/dist/server/static/api.js +24 -3
- package/dist/server/static/components/function-list.js +4 -4
- package/dist/server/static/components/response-panel.js +14 -3
- package/dist/server/static/index.html +1 -0
- package/dist/utils/build-payload.d.ts +1 -1
- package/dist/utils/build-payload.js +3 -3
- package/dist/utils/bundle/bundle-function.d.ts +8 -0
- package/dist/utils/bundle/bundle-function.js +125 -0
- package/dist/utils/bundle/cleanup-source-maps.d.ts +10 -0
- package/dist/utils/bundle/cleanup-source-maps.js +53 -0
- package/dist/utils/bundle/find-up.d.ts +16 -0
- package/dist/utils/bundle/find-up.js +39 -0
- package/dist/utils/bundle/verify-handler.d.ts +2 -0
- package/dist/utils/bundle/verify-handler.js +13 -0
- package/dist/utils/child-process-wrapper.js +8 -6
- package/dist/utils/display/blueprints-formatting.js +2 -2
- package/dist/utils/display/errors.d.ts +4 -0
- package/dist/utils/display/errors.js +27 -0
- package/dist/utils/display/index.d.ts +1 -0
- package/dist/utils/display/index.js +1 -0
- package/dist/utils/functions/find-entry-point.d.ts +11 -0
- package/dist/utils/functions/find-entry-point.js +75 -0
- package/dist/utils/functions/should-bundle.d.ts +2 -0
- package/dist/utils/functions/should-bundle.js +23 -0
- package/dist/utils/invoke-local.d.ts +2 -2
- package/dist/utils/invoke-local.js +49 -8
- package/dist/utils/is-record.d.ts +1 -0
- package/dist/utils/is-record.js +3 -0
- package/dist/utils/parse-json-object.d.ts +1 -0
- package/dist/utils/parse-json-object.js +10 -0
- package/dist/utils/types.d.ts +13 -4
- package/dist/utils/types.js +9 -3
- package/oclif.manifest.json +59 -37
- package/package.json +5 -1
- package/dist/utils/is-json.d.ts +0 -1
- package/dist/utils/is-json.js +0 -12
package/oclif.manifest.json
CHANGED
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"<%= config.bin %> <%= command.id %>",
|
|
66
66
|
"<%= config.bin %> <%= command.id %> --test-config",
|
|
67
67
|
"<%= config.bin %> <%= command.id %> --edit",
|
|
68
|
-
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId>
|
|
68
|
+
"<%= config.bin %> <%= command.id %> --edit --project-id <projectId>"
|
|
69
69
|
],
|
|
70
70
|
"flags": {
|
|
71
71
|
"test-config": {
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
"edit"
|
|
110
110
|
],
|
|
111
111
|
"description": "Update the Stack ID in the configuration. Requires --edit flag",
|
|
112
|
+
"hidden": true,
|
|
112
113
|
"name": "stack-id",
|
|
113
114
|
"hasDynamicHelp": false,
|
|
114
115
|
"multiple": false,
|
|
@@ -136,7 +137,8 @@
|
|
|
136
137
|
"args": {},
|
|
137
138
|
"description": "Deploy a Blueprint",
|
|
138
139
|
"examples": [
|
|
139
|
-
"<%= config.bin %> <%= command.id %>"
|
|
140
|
+
"<%= config.bin %> <%= command.id %>",
|
|
141
|
+
"<%= config.bin %> <%= command.id %> --no-wait"
|
|
140
142
|
],
|
|
141
143
|
"flags": {
|
|
142
144
|
"no-wait": {
|
|
@@ -153,7 +155,6 @@
|
|
|
153
155
|
"pluginName": "@sanity/runtime-cli",
|
|
154
156
|
"pluginType": "core",
|
|
155
157
|
"strict": true,
|
|
156
|
-
"enableJsonFlag": false,
|
|
157
158
|
"isESM": true,
|
|
158
159
|
"relativePath": [
|
|
159
160
|
"dist",
|
|
@@ -165,25 +166,40 @@
|
|
|
165
166
|
"blueprints:destroy": {
|
|
166
167
|
"aliases": [],
|
|
167
168
|
"args": {},
|
|
168
|
-
"description": "Destroy a
|
|
169
|
+
"description": "Destroy a Blueprint deployment",
|
|
169
170
|
"examples": [
|
|
170
|
-
"<%= config.bin %> <%= command.id %>"
|
|
171
|
-
"<%= config.bin %> <%= command.id %> --id ST-a1b2c3"
|
|
171
|
+
"<%= config.bin %> <%= command.id %>"
|
|
172
172
|
],
|
|
173
173
|
"flags": {
|
|
174
|
+
"force": {
|
|
175
|
+
"description": "Force destroy (skip confirmation)",
|
|
176
|
+
"name": "force",
|
|
177
|
+
"allowNo": false,
|
|
178
|
+
"type": "boolean"
|
|
179
|
+
},
|
|
180
|
+
"projectId": {
|
|
181
|
+
"dependsOn": [
|
|
182
|
+
"id",
|
|
183
|
+
"force"
|
|
184
|
+
],
|
|
185
|
+
"description": "Project associated with the Stack (defaults to current Project)",
|
|
186
|
+
"hidden": true,
|
|
187
|
+
"name": "projectId",
|
|
188
|
+
"hasDynamicHelp": false,
|
|
189
|
+
"multiple": false,
|
|
190
|
+
"type": "option"
|
|
191
|
+
},
|
|
174
192
|
"id": {
|
|
193
|
+
"dependsOn": [
|
|
194
|
+
"projectId",
|
|
195
|
+
"force"
|
|
196
|
+
],
|
|
175
197
|
"description": "Stack ID to destroy (defaults to current Stack)",
|
|
198
|
+
"hidden": true,
|
|
176
199
|
"name": "id",
|
|
177
|
-
"required": false,
|
|
178
200
|
"hasDynamicHelp": false,
|
|
179
201
|
"multiple": false,
|
|
180
202
|
"type": "option"
|
|
181
|
-
},
|
|
182
|
-
"force": {
|
|
183
|
-
"description": "Force destroy (skip confirmation)",
|
|
184
|
-
"name": "force",
|
|
185
|
-
"allowNo": false,
|
|
186
|
-
"type": "boolean"
|
|
187
203
|
}
|
|
188
204
|
},
|
|
189
205
|
"hasDynamicHelp": false,
|
|
@@ -193,7 +209,6 @@
|
|
|
193
209
|
"pluginName": "@sanity/runtime-cli",
|
|
194
210
|
"pluginType": "core",
|
|
195
211
|
"strict": true,
|
|
196
|
-
"enableJsonFlag": false,
|
|
197
212
|
"isESM": true,
|
|
198
213
|
"relativePath": [
|
|
199
214
|
"dist",
|
|
@@ -205,16 +220,15 @@
|
|
|
205
220
|
"blueprints:info": {
|
|
206
221
|
"aliases": [],
|
|
207
222
|
"args": {},
|
|
208
|
-
"description": "Show information about a
|
|
223
|
+
"description": "Show information about a Blueprint deployment",
|
|
209
224
|
"examples": [
|
|
210
|
-
"<%= config.bin %> <%= command.id %>"
|
|
211
|
-
"<%= config.bin %> <%= command.id %> --id ST-a1b2c3"
|
|
225
|
+
"<%= config.bin %> <%= command.id %>"
|
|
212
226
|
],
|
|
213
227
|
"flags": {
|
|
214
228
|
"id": {
|
|
215
229
|
"description": "Stack ID to show info for (defaults to current stack)",
|
|
230
|
+
"hidden": true,
|
|
216
231
|
"name": "id",
|
|
217
|
-
"required": false,
|
|
218
232
|
"hasDynamicHelp": false,
|
|
219
233
|
"multiple": false,
|
|
220
234
|
"type": "option"
|
|
@@ -227,7 +241,6 @@
|
|
|
227
241
|
"pluginName": "@sanity/runtime-cli",
|
|
228
242
|
"pluginType": "core",
|
|
229
243
|
"strict": true,
|
|
230
|
-
"enableJsonFlag": false,
|
|
231
244
|
"isESM": true,
|
|
232
245
|
"relativePath": [
|
|
233
246
|
"dist",
|
|
@@ -238,15 +251,27 @@
|
|
|
238
251
|
},
|
|
239
252
|
"blueprints:init": {
|
|
240
253
|
"aliases": [],
|
|
241
|
-
"args": {
|
|
254
|
+
"args": {
|
|
255
|
+
"dir": {
|
|
256
|
+
"description": "Directory to create the Blueprint in",
|
|
257
|
+
"name": "dir"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
242
260
|
"description": "Initialize a new Blueprint",
|
|
243
261
|
"examples": [
|
|
244
262
|
"<%= config.bin %> <%= command.id %>",
|
|
263
|
+
"<%= config.bin %> <%= command.id %> [directory]",
|
|
245
264
|
"<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts>",
|
|
246
|
-
"<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts> --project-id <projectId>
|
|
247
|
-
"<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts> --project-id <projectId> --stack-name <stackName>"
|
|
265
|
+
"<%= config.bin %> <%= command.id %> --blueprint-type <json|js|ts> --project-id <projectId>"
|
|
248
266
|
],
|
|
249
267
|
"flags": {
|
|
268
|
+
"dir": {
|
|
269
|
+
"description": "Directory to create the Blueprint in",
|
|
270
|
+
"name": "dir",
|
|
271
|
+
"hasDynamicHelp": false,
|
|
272
|
+
"multiple": false,
|
|
273
|
+
"type": "option"
|
|
274
|
+
},
|
|
250
275
|
"blueprint-type": {
|
|
251
276
|
"aliases": [
|
|
252
277
|
"type"
|
|
@@ -285,6 +310,7 @@
|
|
|
285
310
|
"exclusive": [
|
|
286
311
|
"stack-name"
|
|
287
312
|
],
|
|
313
|
+
"hidden": true,
|
|
288
314
|
"name": "stack-id",
|
|
289
315
|
"hasDynamicHelp": false,
|
|
290
316
|
"multiple": false,
|
|
@@ -294,7 +320,6 @@
|
|
|
294
320
|
"aliases": [
|
|
295
321
|
"name"
|
|
296
322
|
],
|
|
297
|
-
"char": "n",
|
|
298
323
|
"dependsOn": [
|
|
299
324
|
"project-id"
|
|
300
325
|
],
|
|
@@ -302,6 +327,7 @@
|
|
|
302
327
|
"exclusive": [
|
|
303
328
|
"stack-id"
|
|
304
329
|
],
|
|
330
|
+
"hidden": true,
|
|
305
331
|
"name": "stack-name",
|
|
306
332
|
"hasDynamicHelp": false,
|
|
307
333
|
"multiple": false,
|
|
@@ -327,7 +353,7 @@
|
|
|
327
353
|
"blueprints:logs": {
|
|
328
354
|
"aliases": [],
|
|
329
355
|
"args": {},
|
|
330
|
-
"description": "Display logs for a Blueprint
|
|
356
|
+
"description": "Display logs for a Blueprint deployment",
|
|
331
357
|
"examples": [
|
|
332
358
|
"<%= config.bin %> <%= command.id %>",
|
|
333
359
|
"<%= config.bin %> <%= command.id %> --watch"
|
|
@@ -349,7 +375,6 @@
|
|
|
349
375
|
"pluginName": "@sanity/runtime-cli",
|
|
350
376
|
"pluginType": "core",
|
|
351
377
|
"strict": true,
|
|
352
|
-
"enableJsonFlag": false,
|
|
353
378
|
"isESM": true,
|
|
354
379
|
"relativePath": [
|
|
355
380
|
"dist",
|
|
@@ -373,7 +398,6 @@
|
|
|
373
398
|
"pluginName": "@sanity/runtime-cli",
|
|
374
399
|
"pluginType": "core",
|
|
375
400
|
"strict": true,
|
|
376
|
-
"enableJsonFlag": false,
|
|
377
401
|
"isESM": true,
|
|
378
402
|
"relativePath": [
|
|
379
403
|
"dist",
|
|
@@ -401,13 +425,13 @@
|
|
|
401
425
|
}
|
|
402
426
|
},
|
|
403
427
|
"hasDynamicHelp": false,
|
|
428
|
+
"hidden": true,
|
|
404
429
|
"hiddenAliases": [],
|
|
405
430
|
"id": "blueprints:stacks",
|
|
406
431
|
"pluginAlias": "@sanity/runtime-cli",
|
|
407
432
|
"pluginName": "@sanity/runtime-cli",
|
|
408
433
|
"pluginType": "core",
|
|
409
434
|
"strict": true,
|
|
410
|
-
"enableJsonFlag": false,
|
|
411
435
|
"isESM": true,
|
|
412
436
|
"relativePath": [
|
|
413
437
|
"dist",
|
|
@@ -491,7 +515,6 @@
|
|
|
491
515
|
"pluginName": "@sanity/runtime-cli",
|
|
492
516
|
"pluginType": "core",
|
|
493
517
|
"strict": true,
|
|
494
|
-
"enableJsonFlag": false,
|
|
495
518
|
"isESM": true,
|
|
496
519
|
"relativePath": [
|
|
497
520
|
"dist",
|
|
@@ -566,7 +589,6 @@
|
|
|
566
589
|
"pluginName": "@sanity/runtime-cli",
|
|
567
590
|
"pluginType": "core",
|
|
568
591
|
"strict": true,
|
|
569
|
-
"enableJsonFlag": false,
|
|
570
592
|
"isESM": true,
|
|
571
593
|
"relativePath": [
|
|
572
594
|
"dist",
|
|
@@ -635,9 +657,13 @@
|
|
|
635
657
|
"multiple": false,
|
|
636
658
|
"type": "option"
|
|
637
659
|
},
|
|
638
|
-
"project": {
|
|
639
|
-
"
|
|
640
|
-
|
|
660
|
+
"project-id": {
|
|
661
|
+
"aliases": [
|
|
662
|
+
"project",
|
|
663
|
+
"projectId"
|
|
664
|
+
],
|
|
665
|
+
"description": "Sanity Project ID to use",
|
|
666
|
+
"name": "project-id",
|
|
641
667
|
"required": false,
|
|
642
668
|
"hasDynamicHelp": false,
|
|
643
669
|
"multiple": false,
|
|
@@ -651,7 +677,6 @@
|
|
|
651
677
|
"pluginName": "@sanity/runtime-cli",
|
|
652
678
|
"pluginType": "core",
|
|
653
679
|
"strict": true,
|
|
654
|
-
"enableJsonFlag": false,
|
|
655
680
|
"isESM": true,
|
|
656
681
|
"relativePath": [
|
|
657
682
|
"dist",
|
|
@@ -691,7 +716,6 @@
|
|
|
691
716
|
"pluginName": "@sanity/runtime-cli",
|
|
692
717
|
"pluginType": "core",
|
|
693
718
|
"strict": true,
|
|
694
|
-
"enableJsonFlag": false,
|
|
695
719
|
"isESM": true,
|
|
696
720
|
"relativePath": [
|
|
697
721
|
"dist",
|
|
@@ -722,7 +746,6 @@
|
|
|
722
746
|
"pluginName": "@sanity/runtime-cli",
|
|
723
747
|
"pluginType": "core",
|
|
724
748
|
"strict": true,
|
|
725
|
-
"enableJsonFlag": false,
|
|
726
749
|
"isESM": true,
|
|
727
750
|
"relativePath": [
|
|
728
751
|
"dist",
|
|
@@ -758,7 +781,6 @@
|
|
|
758
781
|
"pluginName": "@sanity/runtime-cli",
|
|
759
782
|
"pluginType": "core",
|
|
760
783
|
"strict": true,
|
|
761
|
-
"enableJsonFlag": false,
|
|
762
784
|
"isESM": true,
|
|
763
785
|
"relativePath": [
|
|
764
786
|
"dist",
|
|
@@ -769,5 +791,5 @@
|
|
|
769
791
|
]
|
|
770
792
|
}
|
|
771
793
|
},
|
|
772
|
-
"version": "4.
|
|
794
|
+
"version": "4.5.1"
|
|
773
795
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/runtime-cli",
|
|
3
3
|
"description": "Sanity's Runtime CLI for Blueprints and Functions",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.5.1",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"postbuild": "oclif manifest && oclif readme",
|
|
48
48
|
"build:ts": "shx rm -rf dist *.tsbuildinfo && tsc -b",
|
|
49
49
|
"build:static": "npm run copy:wrapper && npm run copy:server",
|
|
50
|
+
"clean": "shx rm -rf dist oclif.manifest.json",
|
|
50
51
|
"copy:server": "shx cp -r ./src/server/static ./dist/server",
|
|
51
52
|
"copy:wrapper": "shx cp ./src/utils/child-process-wrapper.js ./dist/utils/child-process-wrapper.js",
|
|
52
53
|
"lint": "biome ci",
|
|
@@ -66,8 +67,11 @@
|
|
|
66
67
|
"chalk": "^5.4.1",
|
|
67
68
|
"color-json": "^3.0.5",
|
|
68
69
|
"eventsource": "^3.0.6",
|
|
70
|
+
"find-up": "^7.0.0",
|
|
69
71
|
"inquirer": "^12.5.2",
|
|
70
72
|
"mime-types": "^3.0.1",
|
|
73
|
+
"vite": "^6.3.3",
|
|
74
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
71
75
|
"xdg-basedir": "^5.1.0",
|
|
72
76
|
"yocto-spinner": "^0.2.1"
|
|
73
77
|
},
|
package/dist/utils/is-json.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function isJson(jsonString: string): null | object;
|