@sanity/runtime-cli 10.11.3 → 11.0.2
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 +84 -34
- package/dist/actions/blueprints/index.d.ts +2 -29
- package/dist/actions/blueprints/index.js +0 -42
- package/dist/baseCommands.d.ts +5 -4
- package/dist/baseCommands.js +6 -4
- package/dist/commands/blueprints/add.d.ts +5 -0
- package/dist/commands/blueprints/add.js +35 -9
- package/dist/commands/blueprints/config.d.ts +1 -0
- package/dist/commands/blueprints/config.js +5 -0
- package/dist/commands/blueprints/deploy.js +2 -1
- package/dist/commands/blueprints/destroy.d.ts +1 -0
- package/dist/commands/blueprints/destroy.js +6 -1
- package/dist/commands/blueprints/init.d.ts +1 -0
- package/dist/commands/blueprints/init.js +4 -0
- package/dist/commands/blueprints/stacks.d.ts +1 -0
- package/dist/commands/blueprints/stacks.js +7 -0
- package/dist/commands/functions/add.d.ts +16 -0
- package/dist/commands/functions/add.js +65 -0
- package/dist/commands/functions/env/add.js +2 -1
- package/dist/commands/functions/env/list.js +2 -1
- package/dist/commands/functions/env/remove.js +2 -1
- package/dist/commands/functions/logs.js +2 -1
- package/dist/commands/functions/test.d.ts +1 -0
- package/dist/commands/functions/test.js +5 -0
- package/dist/cores/blueprints/config.d.ts +1 -0
- package/dist/cores/blueprints/config.js +45 -149
- package/dist/cores/blueprints/deploy.d.ts +3 -2
- package/dist/cores/blueprints/deploy.js +3 -3
- package/dist/cores/blueprints/destroy.d.ts +1 -0
- package/dist/cores/blueprints/destroy.js +20 -7
- package/dist/cores/blueprints/doctor.js +43 -4
- package/dist/cores/blueprints/index.d.ts +0 -2
- package/dist/cores/blueprints/index.js +0 -1
- package/dist/cores/blueprints/init.d.ts +1 -0
- package/dist/cores/blueprints/init.js +3 -1
- package/dist/cores/blueprints/plan.js +3 -3
- package/dist/cores/blueprints/stacks.d.ts +1 -0
- package/dist/cores/blueprints/stacks.js +22 -7
- package/dist/cores/{blueprints → functions}/add.d.ts +5 -8
- package/dist/cores/{blueprints → functions}/add.js +22 -43
- package/dist/cores/functions/index.d.ts +2 -0
- package/dist/cores/functions/index.js +1 -0
- package/dist/cores/functions/test.d.ts +1 -0
- package/dist/cores/functions/test.js +2 -4
- package/dist/cores/index.d.ts +3 -2
- package/dist/cores/index.js +9 -8
- package/dist/server/static/index.html +1 -1
- package/dist/server/static/vendor/vendor.bundle.js +30 -5
- package/dist/utils/display/errors.js +5 -2
- package/dist/utils/display/presenters.d.ts +1 -0
- package/dist/utils/display/presenters.js +3 -0
- package/dist/utils/types.d.ts +1 -0
- package/oclif.manifest.json +212 -3
- package/package.json +23 -26
package/oclif.manifest.json
CHANGED
|
@@ -208,6 +208,21 @@
|
|
|
208
208
|
"multiple": false,
|
|
209
209
|
"type": "option"
|
|
210
210
|
},
|
|
211
|
+
"organization-id": {
|
|
212
|
+
"aliases": [
|
|
213
|
+
"organization",
|
|
214
|
+
"organizationId",
|
|
215
|
+
"org"
|
|
216
|
+
],
|
|
217
|
+
"dependsOn": [
|
|
218
|
+
"edit"
|
|
219
|
+
],
|
|
220
|
+
"description": "Update the Organization ID in the configuration. Requires --edit flag",
|
|
221
|
+
"name": "organization-id",
|
|
222
|
+
"hasDynamicHelp": false,
|
|
223
|
+
"multiple": false,
|
|
224
|
+
"type": "option"
|
|
225
|
+
},
|
|
211
226
|
"stack-id": {
|
|
212
227
|
"aliases": [
|
|
213
228
|
"stack",
|
|
@@ -312,12 +327,28 @@
|
|
|
312
327
|
"stack-id",
|
|
313
328
|
"force"
|
|
314
329
|
],
|
|
315
|
-
"description": "Project associated with the Stack
|
|
330
|
+
"description": "Project associated with the Stack",
|
|
316
331
|
"name": "project-id",
|
|
317
332
|
"hasDynamicHelp": false,
|
|
318
333
|
"multiple": false,
|
|
319
334
|
"type": "option"
|
|
320
335
|
},
|
|
336
|
+
"organization-id": {
|
|
337
|
+
"aliases": [
|
|
338
|
+
"organizationId",
|
|
339
|
+
"organization",
|
|
340
|
+
"org"
|
|
341
|
+
],
|
|
342
|
+
"dependsOn": [
|
|
343
|
+
"stack-id",
|
|
344
|
+
"force"
|
|
345
|
+
],
|
|
346
|
+
"description": "Organization associated with the Stack",
|
|
347
|
+
"name": "organization-id",
|
|
348
|
+
"hasDynamicHelp": false,
|
|
349
|
+
"multiple": false,
|
|
350
|
+
"type": "option"
|
|
351
|
+
},
|
|
321
352
|
"stack-id": {
|
|
322
353
|
"aliases": [
|
|
323
354
|
"stackId",
|
|
@@ -493,6 +524,18 @@
|
|
|
493
524
|
"multiple": false,
|
|
494
525
|
"type": "option"
|
|
495
526
|
},
|
|
527
|
+
"organization-id": {
|
|
528
|
+
"aliases": [
|
|
529
|
+
"organization",
|
|
530
|
+
"organizationId",
|
|
531
|
+
"org"
|
|
532
|
+
],
|
|
533
|
+
"description": "Sanity Organization ID to use for the Blueprint",
|
|
534
|
+
"name": "organization-id",
|
|
535
|
+
"hasDynamicHelp": false,
|
|
536
|
+
"multiple": false,
|
|
537
|
+
"type": "option"
|
|
538
|
+
},
|
|
496
539
|
"stack-id": {
|
|
497
540
|
"aliases": [
|
|
498
541
|
"stack",
|
|
@@ -621,7 +664,8 @@
|
|
|
621
664
|
"description": "List all Blueprint stacks",
|
|
622
665
|
"examples": [
|
|
623
666
|
"<%= config.bin %> <%= command.id %>",
|
|
624
|
-
"<%= config.bin %> <%= command.id %> --project-id <projectId>"
|
|
667
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
668
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>"
|
|
625
669
|
],
|
|
626
670
|
"flags": {
|
|
627
671
|
"verbose": {
|
|
@@ -637,10 +681,28 @@
|
|
|
637
681
|
"project"
|
|
638
682
|
],
|
|
639
683
|
"description": "Project ID to show stacks for",
|
|
684
|
+
"exclusive": [
|
|
685
|
+
"organization-id"
|
|
686
|
+
],
|
|
640
687
|
"name": "project-id",
|
|
641
688
|
"hasDynamicHelp": false,
|
|
642
689
|
"multiple": false,
|
|
643
690
|
"type": "option"
|
|
691
|
+
},
|
|
692
|
+
"organization-id": {
|
|
693
|
+
"aliases": [
|
|
694
|
+
"organizationId",
|
|
695
|
+
"organization",
|
|
696
|
+
"org"
|
|
697
|
+
],
|
|
698
|
+
"description": "Organization ID to show stacks for",
|
|
699
|
+
"exclusive": [
|
|
700
|
+
"project-id"
|
|
701
|
+
],
|
|
702
|
+
"name": "organization-id",
|
|
703
|
+
"hasDynamicHelp": false,
|
|
704
|
+
"multiple": false,
|
|
705
|
+
"type": "option"
|
|
644
706
|
}
|
|
645
707
|
},
|
|
646
708
|
"hasDynamicHelp": false,
|
|
@@ -659,6 +721,140 @@
|
|
|
659
721
|
"stacks.js"
|
|
660
722
|
]
|
|
661
723
|
},
|
|
724
|
+
"functions:add": {
|
|
725
|
+
"aliases": [],
|
|
726
|
+
"args": {},
|
|
727
|
+
"description": "Add a Function to your Blueprint",
|
|
728
|
+
"examples": [
|
|
729
|
+
"<%= config.bin %> <%= command.id %>",
|
|
730
|
+
"<%= config.bin %> <%= command.id %> --helpers",
|
|
731
|
+
"<%= config.bin %> <%= command.id %> --name my-function",
|
|
732
|
+
"<%= config.bin %> <%= command.id %> --name my-function --type document-create",
|
|
733
|
+
"<%= config.bin %> <%= command.id %> --name my-function --type document-create --type document-update --lang js"
|
|
734
|
+
],
|
|
735
|
+
"flags": {
|
|
736
|
+
"verbose": {
|
|
737
|
+
"description": "Verbose output",
|
|
738
|
+
"hidden": true,
|
|
739
|
+
"name": "verbose",
|
|
740
|
+
"allowNo": false,
|
|
741
|
+
"type": "boolean"
|
|
742
|
+
},
|
|
743
|
+
"example": {
|
|
744
|
+
"aliases": [
|
|
745
|
+
"recipe"
|
|
746
|
+
],
|
|
747
|
+
"description": "Example to use for the Function",
|
|
748
|
+
"exclusive": [
|
|
749
|
+
"name",
|
|
750
|
+
"fn-type",
|
|
751
|
+
"language",
|
|
752
|
+
"javascript",
|
|
753
|
+
"fn-helpers",
|
|
754
|
+
"fn-installer"
|
|
755
|
+
],
|
|
756
|
+
"name": "example",
|
|
757
|
+
"hasDynamicHelp": false,
|
|
758
|
+
"multiple": false,
|
|
759
|
+
"type": "option"
|
|
760
|
+
},
|
|
761
|
+
"name": {
|
|
762
|
+
"char": "n",
|
|
763
|
+
"description": "Name of the Function to add",
|
|
764
|
+
"name": "name",
|
|
765
|
+
"hasDynamicHelp": false,
|
|
766
|
+
"multiple": false,
|
|
767
|
+
"type": "option"
|
|
768
|
+
},
|
|
769
|
+
"type": {
|
|
770
|
+
"dependsOn": [
|
|
771
|
+
"name"
|
|
772
|
+
],
|
|
773
|
+
"description": "Document change event(s) that should trigger the function; you can specify multiple events by specifying this flag multiple times",
|
|
774
|
+
"name": "type",
|
|
775
|
+
"hasDynamicHelp": false,
|
|
776
|
+
"multiple": true,
|
|
777
|
+
"options": [
|
|
778
|
+
"document-create",
|
|
779
|
+
"document-delete",
|
|
780
|
+
"document-update",
|
|
781
|
+
"document-publish"
|
|
782
|
+
],
|
|
783
|
+
"type": "option"
|
|
784
|
+
},
|
|
785
|
+
"language": {
|
|
786
|
+
"aliases": [
|
|
787
|
+
"lang"
|
|
788
|
+
],
|
|
789
|
+
"description": "Language of the new Function",
|
|
790
|
+
"name": "language",
|
|
791
|
+
"default": "ts",
|
|
792
|
+
"hasDynamicHelp": false,
|
|
793
|
+
"multiple": false,
|
|
794
|
+
"options": [
|
|
795
|
+
"ts",
|
|
796
|
+
"js"
|
|
797
|
+
],
|
|
798
|
+
"type": "option"
|
|
799
|
+
},
|
|
800
|
+
"javascript": {
|
|
801
|
+
"aliases": [
|
|
802
|
+
"js"
|
|
803
|
+
],
|
|
804
|
+
"description": "Use JavaScript instead of TypeScript",
|
|
805
|
+
"exclusive": [
|
|
806
|
+
"language"
|
|
807
|
+
],
|
|
808
|
+
"name": "javascript",
|
|
809
|
+
"allowNo": false,
|
|
810
|
+
"type": "boolean"
|
|
811
|
+
},
|
|
812
|
+
"helpers": {
|
|
813
|
+
"description": "Add helpers to the new Function",
|
|
814
|
+
"name": "helpers",
|
|
815
|
+
"allowNo": true,
|
|
816
|
+
"type": "boolean"
|
|
817
|
+
},
|
|
818
|
+
"installer": {
|
|
819
|
+
"description": "How to install the @sanity/functions helpers",
|
|
820
|
+
"name": "installer",
|
|
821
|
+
"hasDynamicHelp": false,
|
|
822
|
+
"multiple": false,
|
|
823
|
+
"options": [
|
|
824
|
+
"skip",
|
|
825
|
+
"npm",
|
|
826
|
+
"pnpm",
|
|
827
|
+
"yarn"
|
|
828
|
+
],
|
|
829
|
+
"type": "option"
|
|
830
|
+
},
|
|
831
|
+
"install": {
|
|
832
|
+
"char": "i",
|
|
833
|
+
"description": "Shortcut for --fn-installer npm",
|
|
834
|
+
"exclusive": [
|
|
835
|
+
"fn-installer"
|
|
836
|
+
],
|
|
837
|
+
"name": "install",
|
|
838
|
+
"allowNo": false,
|
|
839
|
+
"type": "boolean"
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
"hasDynamicHelp": false,
|
|
843
|
+
"hiddenAliases": [],
|
|
844
|
+
"id": "functions:add",
|
|
845
|
+
"pluginAlias": "@sanity/runtime-cli",
|
|
846
|
+
"pluginName": "@sanity/runtime-cli",
|
|
847
|
+
"pluginType": "core",
|
|
848
|
+
"strict": true,
|
|
849
|
+
"enableJsonFlag": false,
|
|
850
|
+
"isESM": true,
|
|
851
|
+
"relativePath": [
|
|
852
|
+
"dist",
|
|
853
|
+
"commands",
|
|
854
|
+
"functions",
|
|
855
|
+
"add.js"
|
|
856
|
+
]
|
|
857
|
+
},
|
|
662
858
|
"functions:dev": {
|
|
663
859
|
"aliases": [],
|
|
664
860
|
"args": {},
|
|
@@ -972,6 +1168,19 @@
|
|
|
972
1168
|
"multiple": false,
|
|
973
1169
|
"type": "option"
|
|
974
1170
|
},
|
|
1171
|
+
"organization-id": {
|
|
1172
|
+
"aliases": [
|
|
1173
|
+
"organization",
|
|
1174
|
+
"organizationId",
|
|
1175
|
+
"org"
|
|
1176
|
+
],
|
|
1177
|
+
"description": "Sanity Organization ID to use",
|
|
1178
|
+
"name": "organization-id",
|
|
1179
|
+
"required": false,
|
|
1180
|
+
"hasDynamicHelp": false,
|
|
1181
|
+
"multiple": false,
|
|
1182
|
+
"type": "option"
|
|
1183
|
+
},
|
|
975
1184
|
"document-id": {
|
|
976
1185
|
"aliases": [
|
|
977
1186
|
"doc",
|
|
@@ -1178,5 +1387,5 @@
|
|
|
1178
1387
|
]
|
|
1179
1388
|
}
|
|
1180
1389
|
},
|
|
1181
|
-
"version": "
|
|
1390
|
+
"version": "11.0.2"
|
|
1182
1391
|
}
|
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
|
+
"version": "11.0.2",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"sanity-run": "./bin/run.js"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
|
-
"build": "rollup -c && npm run build:ts && npm run build:static",
|
|
60
|
-
"
|
|
59
|
+
"build": "rollup -c && npm run build:ts && npm run build:static && npm run build:oclif",
|
|
60
|
+
"build:oclif": "oclif manifest && oclif readme",
|
|
61
61
|
"build:ts": "shx rm -rf dist *.tsbuildinfo && tsc -b",
|
|
62
62
|
"build:static": "npm run copy:wrapper && npm run copy:server",
|
|
63
63
|
"clean": "shx rm -rf dist oclif.manifest.json",
|
|
@@ -65,24 +65,22 @@
|
|
|
65
65
|
"copy:wrapper": "shx cp ./src/utils/child-process-wrapper.js ./dist/utils/child-process-wrapper.js",
|
|
66
66
|
"lint": "biome ci",
|
|
67
67
|
"lint:write": "biome check --write",
|
|
68
|
-
"prepack": "
|
|
68
|
+
"prepack": "npm run build:oclif",
|
|
69
69
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
70
|
-
"
|
|
71
|
-
"test": "vitest run",
|
|
70
|
+
"test": "vitest run && npm run lint",
|
|
72
71
|
"test:depmgmt": "vitest run --config ./test-depmgmt/vitest.config.ts",
|
|
73
|
-
"test:integration": "cd test/integration && npm run typecheck",
|
|
74
|
-
"typecheck": "tsc --project tsconfig.typecheck.json",
|
|
75
|
-
"posttest": "npm run lint",
|
|
72
|
+
"test:integration": "cd test/integration && npm install && npm run typecheck",
|
|
76
73
|
"test:watch": "vitest",
|
|
74
|
+
"typecheck": "tsc --project tsconfig.typecheck.json",
|
|
77
75
|
"watch": "tsc --watch"
|
|
78
76
|
},
|
|
79
77
|
"dependencies": {
|
|
80
78
|
"@architect/hydrate": "^4.0.10",
|
|
81
79
|
"@architect/inventory": "^4.0.9",
|
|
82
|
-
"@oclif/core": "^4.
|
|
83
|
-
"@oclif/plugin-help": "^6.2.
|
|
84
|
-
"@sanity/blueprints-parser": "^0.
|
|
85
|
-
"@sanity/client": "^7.
|
|
80
|
+
"@oclif/core": "^4.7.2",
|
|
81
|
+
"@oclif/plugin-help": "^6.2.34",
|
|
82
|
+
"@sanity/blueprints-parser": "^0.3.0",
|
|
83
|
+
"@sanity/client": "^7.12.0",
|
|
86
84
|
"adm-zip": "^0.5.16",
|
|
87
85
|
"array-treeify": "^0.1.5",
|
|
88
86
|
"cardinal": "^2.1.1",
|
|
@@ -90,26 +88,26 @@
|
|
|
90
88
|
"eventsource": "^4.0.0",
|
|
91
89
|
"find-up": "^8.0.0",
|
|
92
90
|
"get-folder-size": "^5.0.0",
|
|
93
|
-
"groq-js": "^1.
|
|
94
|
-
"inquirer": "^12.
|
|
95
|
-
"jiti": "^2.6.
|
|
91
|
+
"groq-js": "^1.20.0",
|
|
92
|
+
"inquirer": "^12.10.0",
|
|
93
|
+
"jiti": "^2.6.1",
|
|
96
94
|
"mime-types": "^3.0.1",
|
|
97
95
|
"ora": "^9.0.0",
|
|
98
96
|
"tar-stream": "^3.1.7",
|
|
99
|
-
"vite": "^7.1.
|
|
97
|
+
"vite": "^7.1.12",
|
|
100
98
|
"vite-tsconfig-paths": "^5.1.4",
|
|
101
99
|
"ws": "^8.18.3",
|
|
102
100
|
"xdg-basedir": "^5.1.0"
|
|
103
101
|
},
|
|
104
102
|
"devDependencies": {
|
|
105
|
-
"@biomejs/biome": "2.
|
|
103
|
+
"@biomejs/biome": "2.3.0",
|
|
106
104
|
"@codemirror/lang-json": "^6.0.2",
|
|
107
105
|
"@codemirror/state": "^6.5.2",
|
|
108
106
|
"@enhance/store": "^1.0.2",
|
|
109
|
-
"@lezer/highlight": "^1.2.
|
|
107
|
+
"@lezer/highlight": "^1.2.2",
|
|
110
108
|
"@oclif/test": "^4.1.14",
|
|
111
|
-
"@playwright/test": "^1.
|
|
112
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
109
|
+
"@playwright/test": "^1.56.1",
|
|
110
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
113
111
|
"@sanity/blueprints": "^0.3.0",
|
|
114
112
|
"@sanity/functions": "^1.0.3",
|
|
115
113
|
"@types/adm-zip": "^0.5.7",
|
|
@@ -119,14 +117,14 @@
|
|
|
119
117
|
"@types/tar-stream": "^3.1.4",
|
|
120
118
|
"@types/ws": "^8.18.1",
|
|
121
119
|
"codemirror": "^6.0.2",
|
|
122
|
-
"mentoss": "^0.
|
|
123
|
-
"oclif": "^4.22.
|
|
120
|
+
"mentoss": "^0.12.0",
|
|
121
|
+
"oclif": "^4.22.32",
|
|
124
122
|
"pretty-bytes": "^7.1.0",
|
|
125
123
|
"pretty-ms": "^9.3.0",
|
|
126
|
-
"rollup": "^4.52.
|
|
124
|
+
"rollup": "^4.52.5",
|
|
127
125
|
"shx": "^0.4.0",
|
|
128
126
|
"ts-node": "^10.9.2",
|
|
129
|
-
"typescript": "^5.9.
|
|
127
|
+
"typescript": "^5.9.3",
|
|
130
128
|
"vitest": "3.2.4"
|
|
131
129
|
},
|
|
132
130
|
"oclif": {
|
|
@@ -136,7 +134,6 @@
|
|
|
136
134
|
"plugins": [
|
|
137
135
|
"@oclif/plugin-help"
|
|
138
136
|
],
|
|
139
|
-
"state": "beta",
|
|
140
137
|
"topicSeparator": " ",
|
|
141
138
|
"topics": {
|
|
142
139
|
"blueprints": {
|