@sanity/runtime-cli 17.3.2 → 17.4.0-blueprinit.g596ac51
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 +50 -47
- package/SKILL.md +59 -0
- package/dist/actions/blueprinit/manifest.d.ts +15 -0
- package/dist/actions/blueprinit/manifest.js +82 -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 +16 -0
- package/dist/actions/blueprinit/workspace.js +143 -0
- package/dist/actions/blueprints/pre-deploy.d.ts +15 -6
- package/dist/actions/blueprints/pre-deploy.js +29 -70
- package/dist/actions/blueprints/process-assets.d.ts +29 -0
- package/dist/actions/blueprints/process-assets.js +80 -0
- package/dist/actions/functions/list.d.ts +34 -0
- package/dist/actions/functions/list.js +33 -0
- package/dist/actions/sanity/datasets.d.ts +15 -0
- package/dist/actions/sanity/datasets.js +26 -0
- package/dist/baseCommands.d.ts +2 -0
- package/dist/baseCommands.js +3 -0
- package/dist/commands/blueprinit.d.ts +17 -0
- package/dist/commands/blueprinit.js +59 -0
- package/dist/commands/blueprints/deploy.d.ts +2 -0
- package/dist/commands/blueprints/deploy.js +22 -1
- package/dist/commands/blueprints/destroy.js +1 -1
- package/dist/commands/blueprints/info.d.ts +1 -0
- package/dist/commands/blueprints/info.js +5 -0
- package/dist/commands/blueprints/init.js +1 -2
- package/dist/commands/blueprints/logs.js +1 -0
- package/dist/commands/functions/add.js +3 -3
- package/dist/commands/functions/dev.js +2 -2
- package/dist/commands/functions/list.d.ts +14 -0
- package/dist/commands/functions/list.js +38 -0
- package/dist/commands/functions/logs.d.ts +1 -1
- package/dist/commands/functions/logs.js +3 -0
- package/dist/cores/blueprinit/adopt.d.ts +6 -0
- package/dist/cores/blueprinit/adopt.js +119 -0
- package/dist/cores/blueprinit/finish.d.ts +14 -0
- package/dist/cores/blueprinit/finish.js +64 -0
- package/dist/cores/blueprinit/fresh.d.ts +3 -0
- package/dist/cores/blueprinit/fresh.js +120 -0
- package/dist/cores/blueprinit/preview.d.ts +15 -0
- package/dist/cores/blueprinit/preview.js +14 -0
- package/dist/cores/blueprinit/prompts.d.ts +5 -0
- package/dist/cores/blueprinit/prompts.js +22 -0
- package/dist/cores/blueprinit/selection.d.ts +15 -0
- package/dist/cores/blueprinit/selection.js +90 -0
- package/dist/cores/blueprinit/types.d.ts +16 -0
- package/dist/cores/blueprinit/types.js +1 -0
- package/dist/cores/blueprinit.d.ts +7 -0
- package/dist/cores/blueprinit.js +48 -0
- package/dist/cores/blueprints/deploy.js +69 -19
- package/dist/cores/functions/add.js +1 -1
- package/dist/cores/functions/list.d.ts +10 -0
- package/dist/cores/functions/list.js +34 -0
- package/dist/utils/display/blueprints-formatting.js +3 -3
- package/dist/utils/display/functions-formatting.d.ts +7 -0
- package/dist/utils/display/functions-formatting.js +95 -0
- package/dist/utils/style-text.js +1 -0
- package/oclif.manifest.json +271 -15
- package/package.json +31 -17
- package/skills/_functions-build.md +23 -0
- package/skills/_functions-list.md +28 -0
- package/skills/blueprinit.md +155 -0
- package/skills/blueprints-add.md +8 -0
- package/skills/blueprints-config.md +33 -0
- package/skills/blueprints-deploy.md +36 -0
- package/skills/blueprints-destroy.md +30 -0
- package/skills/blueprints-doctor.md +31 -0
- package/skills/blueprints-info.md +23 -0
- package/skills/blueprints-init.md +48 -0
- package/skills/blueprints-logs.md +33 -0
- package/skills/blueprints-mint-deploy-token.md +25 -0
- package/skills/blueprints-plan.md +28 -0
- package/skills/blueprints-promote.md +31 -0
- package/skills/blueprints-stacks.md +28 -0
- package/skills/functions-add.md +35 -0
- package/skills/functions-dev.md +21 -0
- package/skills/functions-env-add.md +29 -0
- package/skills/functions-env-list.md +21 -0
- package/skills/functions-env-remove.md +22 -0
- package/skills/functions-logs.md +39 -0
- package/skills/functions-test.md +31 -0
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,134 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
+
"blueprinit": {
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"args": {},
|
|
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
|
+
"examples": [
|
|
8
|
+
"<%= config.bin %> <%= command.id %>",
|
|
9
|
+
"<%= config.bin %> <%= command.id %> --yes",
|
|
10
|
+
"<%= config.bin %> <%= command.id %> --project-id <id> --dataset <name> --yes"
|
|
11
|
+
],
|
|
12
|
+
"flags": {
|
|
13
|
+
"json": {
|
|
14
|
+
"description": "Format output as json",
|
|
15
|
+
"name": "json",
|
|
16
|
+
"allowNo": false,
|
|
17
|
+
"type": "boolean"
|
|
18
|
+
},
|
|
19
|
+
"path": {
|
|
20
|
+
"aliases": [
|
|
21
|
+
"blueprint-path"
|
|
22
|
+
],
|
|
23
|
+
"char": "p",
|
|
24
|
+
"description": "Path to a Blueprint file or directory containing one",
|
|
25
|
+
"env": "SANITY_BLUEPRINT_PATH",
|
|
26
|
+
"hidden": true,
|
|
27
|
+
"name": "path",
|
|
28
|
+
"hasDynamicHelp": false,
|
|
29
|
+
"multiple": false,
|
|
30
|
+
"type": "option"
|
|
31
|
+
},
|
|
32
|
+
"trace": {
|
|
33
|
+
"description": "Trace output",
|
|
34
|
+
"hidden": true,
|
|
35
|
+
"name": "trace",
|
|
36
|
+
"allowNo": false,
|
|
37
|
+
"type": "boolean"
|
|
38
|
+
},
|
|
39
|
+
"validate-resources": {
|
|
40
|
+
"description": "Validate resources",
|
|
41
|
+
"hidden": true,
|
|
42
|
+
"name": "validate-resources",
|
|
43
|
+
"allowNo": true,
|
|
44
|
+
"type": "boolean"
|
|
45
|
+
},
|
|
46
|
+
"verbose": {
|
|
47
|
+
"description": "Verbose output",
|
|
48
|
+
"hidden": true,
|
|
49
|
+
"name": "verbose",
|
|
50
|
+
"allowNo": false,
|
|
51
|
+
"type": "boolean"
|
|
52
|
+
},
|
|
53
|
+
"llms": {
|
|
54
|
+
"aliases": [
|
|
55
|
+
"skill"
|
|
56
|
+
],
|
|
57
|
+
"description": "Show agent-oriented guidance for this command",
|
|
58
|
+
"hidden": true,
|
|
59
|
+
"name": "llms",
|
|
60
|
+
"allowNo": false,
|
|
61
|
+
"type": "boolean"
|
|
62
|
+
},
|
|
63
|
+
"yes": {
|
|
64
|
+
"char": "y",
|
|
65
|
+
"description": "Skip confirmation prompts",
|
|
66
|
+
"name": "yes",
|
|
67
|
+
"allowNo": false,
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
"organization-id": {
|
|
71
|
+
"aliases": [
|
|
72
|
+
"organization",
|
|
73
|
+
"organizationId",
|
|
74
|
+
"org"
|
|
75
|
+
],
|
|
76
|
+
"description": "Organization to use when the account has several",
|
|
77
|
+
"name": "organization-id",
|
|
78
|
+
"hasDynamicHelp": false,
|
|
79
|
+
"multiple": false,
|
|
80
|
+
"type": "option"
|
|
81
|
+
},
|
|
82
|
+
"project-id": {
|
|
83
|
+
"aliases": [
|
|
84
|
+
"project",
|
|
85
|
+
"projectId"
|
|
86
|
+
],
|
|
87
|
+
"description": "Project to use when the organization has several",
|
|
88
|
+
"name": "project-id",
|
|
89
|
+
"hasDynamicHelp": false,
|
|
90
|
+
"multiple": false,
|
|
91
|
+
"type": "option"
|
|
92
|
+
},
|
|
93
|
+
"dataset": {
|
|
94
|
+
"description": "Dataset to attach",
|
|
95
|
+
"name": "dataset",
|
|
96
|
+
"hasDynamicHelp": false,
|
|
97
|
+
"multiple": false,
|
|
98
|
+
"type": "option"
|
|
99
|
+
},
|
|
100
|
+
"stack-name": {
|
|
101
|
+
"description": "Name for the new organization-scoped Stack",
|
|
102
|
+
"name": "stack-name",
|
|
103
|
+
"hasDynamicHelp": false,
|
|
104
|
+
"multiple": false,
|
|
105
|
+
"type": "option"
|
|
106
|
+
},
|
|
107
|
+
"studio-name": {
|
|
108
|
+
"description": "Name and hosted slug for the Studio resource",
|
|
109
|
+
"name": "studio-name",
|
|
110
|
+
"hasDynamicHelp": false,
|
|
111
|
+
"multiple": false,
|
|
112
|
+
"type": "option"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"hasDynamicHelp": false,
|
|
116
|
+
"hidden": true,
|
|
117
|
+
"hiddenAliases": [],
|
|
118
|
+
"id": "blueprinit",
|
|
119
|
+
"pluginAlias": "@sanity/runtime-cli",
|
|
120
|
+
"pluginName": "@sanity/runtime-cli",
|
|
121
|
+
"pluginType": "core",
|
|
122
|
+
"strict": true,
|
|
123
|
+
"summary": "Experimental blueprints-first project init",
|
|
124
|
+
"enableJsonFlag": true,
|
|
125
|
+
"isESM": true,
|
|
126
|
+
"relativePath": [
|
|
127
|
+
"dist",
|
|
128
|
+
"commands",
|
|
129
|
+
"blueprinit.js"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
3
132
|
"blueprints:add": {
|
|
4
133
|
"aliases": [],
|
|
5
134
|
"args": {
|
|
@@ -373,7 +502,7 @@
|
|
|
373
502
|
"blueprints:deploy": {
|
|
374
503
|
"aliases": [],
|
|
375
504
|
"args": {},
|
|
376
|
-
"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
|
|
505
|
+
"description": "Applies your local Blueprint to the remote Stack, creating, updating, or removing resources as needed. This is the primary command for applying infrastructure changes.\n\nBefore deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor activity.\n\nUse --no-wait to queue the deployment and return immediately without waiting for completion.\n\nUse --fn-installer to force which package manager to use when deploying functions.\n\nSet SANITY_ASSET_TIMEOUT (seconds) to override the 180-second timeout for processing resource assets.\n\nSet SANITY_ASSET_CONCURRENCY to override how many resource assets are processed at once (default 4).\n\nExit codes: 0 deployed, 2 deployment failed, 75 deployment accepted but completion could not be confirmed (rerun 'blueprints info' to check).",
|
|
377
506
|
"examples": [
|
|
378
507
|
"<%= config.bin %> <%= command.id %>",
|
|
379
508
|
"<%= config.bin %> <%= command.id %> --message \"Enable staging dataset\"",
|
|
@@ -491,6 +620,17 @@
|
|
|
491
620
|
"allowNo": false,
|
|
492
621
|
"type": "boolean"
|
|
493
622
|
},
|
|
623
|
+
"configure": {
|
|
624
|
+
"aliases": [
|
|
625
|
+
"config",
|
|
626
|
+
"init"
|
|
627
|
+
],
|
|
628
|
+
"description": "Configure the local Blueprint interactively before deploying",
|
|
629
|
+
"hidden": true,
|
|
630
|
+
"name": "configure",
|
|
631
|
+
"allowNo": false,
|
|
632
|
+
"type": "boolean"
|
|
633
|
+
},
|
|
494
634
|
"new-stack-name": {
|
|
495
635
|
"description": "Set a new name for the Stack",
|
|
496
636
|
"name": "new-stack-name",
|
|
@@ -618,9 +758,7 @@
|
|
|
618
758
|
"type": "option"
|
|
619
759
|
},
|
|
620
760
|
"force": {
|
|
621
|
-
"
|
|
622
|
-
"f"
|
|
623
|
-
],
|
|
761
|
+
"char": "f",
|
|
624
762
|
"description": "Force Stack destruction (skip confirmation)",
|
|
625
763
|
"name": "force",
|
|
626
764
|
"allowNo": false,
|
|
@@ -770,8 +908,8 @@
|
|
|
770
908
|
"type": "boolean"
|
|
771
909
|
},
|
|
772
910
|
"verbose": {
|
|
773
|
-
"
|
|
774
|
-
"
|
|
911
|
+
"char": "v",
|
|
912
|
+
"description": "Show resource and external IDs",
|
|
775
913
|
"name": "verbose",
|
|
776
914
|
"allowNo": false,
|
|
777
915
|
"type": "boolean"
|
|
@@ -844,7 +982,7 @@
|
|
|
844
982
|
"name": "dir"
|
|
845
983
|
}
|
|
846
984
|
},
|
|
847
|
-
"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
|
|
985
|
+
"description": "A Blueprint is your local infrastructure-as-code configuration that defines Sanity resources (datasets, functions, etc.). A Stack is the remote deployment target where your Blueprint is applied.\n\nThis is typically the first command you run in a new project. It creates a local Blueprint manifest file (sanity.blueprint.ts, .js, or .json) and provisions a new remote Stack.\nAdditionally, a Blueprint configuration file is created in .sanity/ containing the scope and Stack IDs. A .gitignore covering node_modules, .env, and Function build output is created or updated; the .sanity/ config itself is not ignored.\n\nAfter initialization, use 'blueprints plan' to preview changes, then 'blueprints deploy' to apply them.\n\nRunning without a directory prompts to confirm the current directory. Run 'blueprints init .' to initialize in the current directory without a prompt.",
|
|
848
986
|
"examples": [
|
|
849
987
|
"<%= config.bin %> <%= command.id %>",
|
|
850
988
|
"<%= config.bin %> <%= command.id %> .",
|
|
@@ -1121,6 +1259,9 @@
|
|
|
1121
1259
|
],
|
|
1122
1260
|
"char": "w",
|
|
1123
1261
|
"description": "Watch for new Stack logs",
|
|
1262
|
+
"exclusive": [
|
|
1263
|
+
"json"
|
|
1264
|
+
],
|
|
1124
1265
|
"name": "watch",
|
|
1125
1266
|
"allowNo": false,
|
|
1126
1267
|
"type": "boolean"
|
|
@@ -1757,11 +1898,12 @@
|
|
|
1757
1898
|
"description": "Example to use for the Function",
|
|
1758
1899
|
"exclusive": [
|
|
1759
1900
|
"name",
|
|
1760
|
-
"
|
|
1901
|
+
"type",
|
|
1761
1902
|
"language",
|
|
1762
1903
|
"javascript",
|
|
1763
|
-
"
|
|
1764
|
-
"
|
|
1904
|
+
"helpers",
|
|
1905
|
+
"installer",
|
|
1906
|
+
"install"
|
|
1765
1907
|
],
|
|
1766
1908
|
"name": "example",
|
|
1767
1909
|
"hasDynamicHelp": false,
|
|
@@ -1845,9 +1987,9 @@
|
|
|
1845
1987
|
},
|
|
1846
1988
|
"install": {
|
|
1847
1989
|
"char": "i",
|
|
1848
|
-
"description": "Shortcut for --
|
|
1990
|
+
"description": "Shortcut for --installer npm",
|
|
1849
1991
|
"exclusive": [
|
|
1850
|
-
"
|
|
1992
|
+
"installer"
|
|
1851
1993
|
],
|
|
1852
1994
|
"name": "install",
|
|
1853
1995
|
"allowNo": false,
|
|
@@ -2013,9 +2155,9 @@
|
|
|
2013
2155
|
"functions:dev": {
|
|
2014
2156
|
"aliases": [],
|
|
2015
2157
|
"args": {},
|
|
2016
|
-
"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'.",
|
|
2158
|
+
"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. Port 8974 is reserved for the emulator's live-reload WebSocket server. Function timeout can be configured with the --timeout flag.\n\nTo invoke a function with the CLI, use 'functions test'.",
|
|
2017
2159
|
"examples": [
|
|
2018
|
-
"<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port
|
|
2160
|
+
"<%= config.bin %> <%= command.id %> --host 127.0.0.1 --port 3333",
|
|
2019
2161
|
"<%= config.bin %> <%= command.id %> --timeout 60"
|
|
2020
2162
|
],
|
|
2021
2163
|
"flags": {
|
|
@@ -2146,6 +2288,117 @@
|
|
|
2146
2288
|
"dev.js"
|
|
2147
2289
|
]
|
|
2148
2290
|
},
|
|
2291
|
+
"functions:list": {
|
|
2292
|
+
"aliases": [],
|
|
2293
|
+
"args": {},
|
|
2294
|
+
"description": "Lists functions deployed directly in the selected project or organization scope. The local Blueprint config supplies the scope by default.\n\nUse --project-id or --organization-id to select a scope without a local Blueprint. Organization results include organization-scoped functions only.",
|
|
2295
|
+
"examples": [
|
|
2296
|
+
"<%= config.bin %> <%= command.id %>",
|
|
2297
|
+
"<%= config.bin %> <%= command.id %> --verbose",
|
|
2298
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId>",
|
|
2299
|
+
"<%= config.bin %> <%= command.id %> --organization-id <organizationId>",
|
|
2300
|
+
"<%= config.bin %> <%= command.id %> --project-id <projectId> --json"
|
|
2301
|
+
],
|
|
2302
|
+
"flags": {
|
|
2303
|
+
"json": {
|
|
2304
|
+
"description": "Format output as json",
|
|
2305
|
+
"name": "json",
|
|
2306
|
+
"allowNo": false,
|
|
2307
|
+
"type": "boolean"
|
|
2308
|
+
},
|
|
2309
|
+
"path": {
|
|
2310
|
+
"aliases": [
|
|
2311
|
+
"blueprint-path"
|
|
2312
|
+
],
|
|
2313
|
+
"char": "p",
|
|
2314
|
+
"description": "Path to a Blueprint file or directory containing one",
|
|
2315
|
+
"env": "SANITY_BLUEPRINT_PATH",
|
|
2316
|
+
"hidden": true,
|
|
2317
|
+
"name": "path",
|
|
2318
|
+
"hasDynamicHelp": false,
|
|
2319
|
+
"multiple": false,
|
|
2320
|
+
"type": "option"
|
|
2321
|
+
},
|
|
2322
|
+
"trace": {
|
|
2323
|
+
"description": "Trace output",
|
|
2324
|
+
"hidden": true,
|
|
2325
|
+
"name": "trace",
|
|
2326
|
+
"allowNo": false,
|
|
2327
|
+
"type": "boolean"
|
|
2328
|
+
},
|
|
2329
|
+
"validate-resources": {
|
|
2330
|
+
"description": "Validate resources",
|
|
2331
|
+
"hidden": true,
|
|
2332
|
+
"name": "validate-resources",
|
|
2333
|
+
"allowNo": true,
|
|
2334
|
+
"type": "boolean"
|
|
2335
|
+
},
|
|
2336
|
+
"verbose": {
|
|
2337
|
+
"char": "v",
|
|
2338
|
+
"description": "Show function configuration details",
|
|
2339
|
+
"name": "verbose",
|
|
2340
|
+
"allowNo": false,
|
|
2341
|
+
"type": "boolean"
|
|
2342
|
+
},
|
|
2343
|
+
"stack": {
|
|
2344
|
+
"description": "Stack name or ID to use instead of the locally configured Stack",
|
|
2345
|
+
"hidden": true,
|
|
2346
|
+
"name": "stack",
|
|
2347
|
+
"hasDynamicHelp": false,
|
|
2348
|
+
"multiple": false,
|
|
2349
|
+
"type": "option"
|
|
2350
|
+
},
|
|
2351
|
+
"project-id": {
|
|
2352
|
+
"aliases": [
|
|
2353
|
+
"project",
|
|
2354
|
+
"projectId"
|
|
2355
|
+
],
|
|
2356
|
+
"description": "Sanity project ID used to scope Blueprint and Stack",
|
|
2357
|
+
"exclusive": [
|
|
2358
|
+
"organization-id"
|
|
2359
|
+
],
|
|
2360
|
+
"name": "project-id",
|
|
2361
|
+
"hasDynamicHelp": false,
|
|
2362
|
+
"multiple": false,
|
|
2363
|
+
"type": "option"
|
|
2364
|
+
},
|
|
2365
|
+
"organization-id": {
|
|
2366
|
+
"aliases": [
|
|
2367
|
+
"organization",
|
|
2368
|
+
"organizationId",
|
|
2369
|
+
"org"
|
|
2370
|
+
],
|
|
2371
|
+
"description": "Sanity organization ID used to scope Blueprint and Stack",
|
|
2372
|
+
"exclusive": [
|
|
2373
|
+
"project-id"
|
|
2374
|
+
],
|
|
2375
|
+
"name": "organization-id",
|
|
2376
|
+
"hasDynamicHelp": false,
|
|
2377
|
+
"multiple": false,
|
|
2378
|
+
"type": "option"
|
|
2379
|
+
}
|
|
2380
|
+
},
|
|
2381
|
+
"hasDynamicHelp": false,
|
|
2382
|
+
"hidden": true,
|
|
2383
|
+
"hiddenAliases": [],
|
|
2384
|
+
"id": "functions:list",
|
|
2385
|
+
"pluginAlias": "@sanity/runtime-cli",
|
|
2386
|
+
"pluginName": "@sanity/runtime-cli",
|
|
2387
|
+
"pluginType": "core",
|
|
2388
|
+
"strict": true,
|
|
2389
|
+
"summary": "List deployed Sanity Functions",
|
|
2390
|
+
"enableJsonFlag": true,
|
|
2391
|
+
"needs": [
|
|
2392
|
+
"scope"
|
|
2393
|
+
],
|
|
2394
|
+
"isESM": true,
|
|
2395
|
+
"relativePath": [
|
|
2396
|
+
"dist",
|
|
2397
|
+
"commands",
|
|
2398
|
+
"functions",
|
|
2399
|
+
"list.js"
|
|
2400
|
+
]
|
|
2401
|
+
},
|
|
2149
2402
|
"functions:logs": {
|
|
2150
2403
|
"aliases": [],
|
|
2151
2404
|
"args": {
|
|
@@ -2288,6 +2541,9 @@
|
|
|
2288
2541
|
],
|
|
2289
2542
|
"char": "w",
|
|
2290
2543
|
"description": "Watch for new logs (streaming mode)",
|
|
2544
|
+
"exclusive": [
|
|
2545
|
+
"json"
|
|
2546
|
+
],
|
|
2291
2547
|
"name": "watch",
|
|
2292
2548
|
"allowNo": false,
|
|
2293
2549
|
"type": "boolean"
|
|
@@ -2998,5 +3254,5 @@
|
|
|
2998
3254
|
]
|
|
2999
3255
|
}
|
|
3000
3256
|
},
|
|
3001
|
-
"version": "17.
|
|
3257
|
+
"version": "17.4.0-blueprinit.g596ac51"
|
|
3002
3258
|
}
|
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": "17.
|
|
4
|
+
"version": "17.4.0-blueprinit.g596ac51",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"./bin",
|
|
28
28
|
"./dist",
|
|
29
|
+
"./SKILL.md",
|
|
30
|
+
"./skills",
|
|
29
31
|
"./oclif.manifest.json"
|
|
30
32
|
],
|
|
31
33
|
"bin": {
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
"lint:fix": "npm run lint:write",
|
|
49
51
|
"prepare": "npm run build",
|
|
50
52
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
51
|
-
"test": "vitest run && npm run test:depmgmt && npm run lint",
|
|
53
|
+
"test": "npm run typecheck && vitest run && npm run test:depmgmt && npm run lint",
|
|
52
54
|
"test:depmgmt": "vitest run --config ./test-depmgmt/vitest.config.ts",
|
|
53
55
|
"test:coverage": "vitest run --coverage --coverage.include \"runtime-cli/src/**/*\"",
|
|
54
56
|
"test:scenarios": "vitest run test/scenarios",
|
|
@@ -63,19 +65,20 @@
|
|
|
63
65
|
"@architect/hydrate": "~6.0.2",
|
|
64
66
|
"@architect/inventory": "~6.1.0",
|
|
65
67
|
"@inquirer/prompts": "^8.5.2",
|
|
66
|
-
"@oclif/core": "^4.13.
|
|
67
|
-
"@oclif/plugin-help": "^6.2.
|
|
68
|
+
"@oclif/core": "^4.13.3",
|
|
69
|
+
"@oclif/plugin-help": "^6.2.56",
|
|
68
70
|
"@sanity-labs/design-tokens": "^0.0.2-alpha.2",
|
|
69
|
-
"@sanity/
|
|
71
|
+
"@sanity-labs/oclif-plugin-skills-flag": "^0.2.1",
|
|
72
|
+
"@sanity/blueprints": "^0.23.2",
|
|
70
73
|
"@sanity/blueprints-parser": "^0.4.0",
|
|
71
|
-
"@sanity/cli-build": "^5.
|
|
72
|
-
"@sanity/cli-core": "^2.
|
|
73
|
-
"@sanity/client": "^7.
|
|
74
|
+
"@sanity/cli-build": "^5.1.0",
|
|
75
|
+
"@sanity/cli-core": "^2.8.1",
|
|
76
|
+
"@sanity/client": "^7.26.2",
|
|
74
77
|
"adm-zip": "^0.6.0",
|
|
75
78
|
"array-treeify": "^0.1.5",
|
|
76
79
|
"cardinal": "^2.1.1",
|
|
77
80
|
"empathic": "^2.0.1",
|
|
78
|
-
"eventsource": "^4.1.
|
|
81
|
+
"eventsource": "^4.1.1",
|
|
79
82
|
"groq-js": "^2.0.0",
|
|
80
83
|
"jiti": "^2.7.0",
|
|
81
84
|
"mime-types": "^3.0.2",
|
|
@@ -84,20 +87,20 @@
|
|
|
84
87
|
"strip-ansi": "^7.2.0",
|
|
85
88
|
"tar-fs": "^3.1.3",
|
|
86
89
|
"tar-stream": "^3.2.0",
|
|
87
|
-
"vite": "^8.1
|
|
88
|
-
"ws": "^8.21.
|
|
90
|
+
"vite": "^8.2.1",
|
|
91
|
+
"ws": "^8.21.3",
|
|
89
92
|
"xdg-basedir": "^5.1.0"
|
|
90
93
|
},
|
|
91
94
|
"devDependencies": {
|
|
92
|
-
"@biomejs/biome": "2.5.
|
|
95
|
+
"@biomejs/biome": "2.5.7",
|
|
93
96
|
"@codemirror/lang-json": "^6.0.2",
|
|
94
97
|
"@codemirror/state": "^6.7.1",
|
|
95
98
|
"@enhance/store": "^1.0.2",
|
|
96
99
|
"@lezer/highlight": "^1.2.3",
|
|
97
100
|
"@oclif/test": "^4.1.21",
|
|
98
|
-
"@playwright/test": "^1.62.
|
|
101
|
+
"@playwright/test": "^1.62.1",
|
|
99
102
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
100
|
-
"@sanity/functions": "^1.
|
|
103
|
+
"@sanity/functions": "^1.6.0",
|
|
101
104
|
"@types/adm-zip": "^0.5.8",
|
|
102
105
|
"@types/cardinal": "^2.1.1",
|
|
103
106
|
"@types/mime-types": "^3.0.1",
|
|
@@ -108,10 +111,10 @@
|
|
|
108
111
|
"@vitest/coverage-v8": "4.1.10",
|
|
109
112
|
"codemirror": "^6.0.2",
|
|
110
113
|
"mentoss": "^0.13.0",
|
|
111
|
-
"oclif": "^4.23.
|
|
114
|
+
"oclif": "^4.23.30",
|
|
112
115
|
"pretty-bytes": "^7.1.1",
|
|
113
116
|
"pretty-ms": "^9.3.0",
|
|
114
|
-
"rollup": "^4.62.
|
|
117
|
+
"rollup": "^4.62.4",
|
|
115
118
|
"shx": "^0.4.0",
|
|
116
119
|
"typescript": "^7.0.2",
|
|
117
120
|
"vitest": "4.1.10"
|
|
@@ -121,7 +124,8 @@
|
|
|
121
124
|
"dirname": "sanity-run",
|
|
122
125
|
"commands": "./dist/commands",
|
|
123
126
|
"plugins": [
|
|
124
|
-
"@oclif/plugin-help"
|
|
127
|
+
"@oclif/plugin-help",
|
|
128
|
+
"@sanity-labs/oclif-plugin-skills-flag"
|
|
125
129
|
],
|
|
126
130
|
"topicSeparator": " ",
|
|
127
131
|
"topics": {
|
|
@@ -133,6 +137,16 @@
|
|
|
133
137
|
}
|
|
134
138
|
}
|
|
135
139
|
},
|
|
140
|
+
"oclif-plugin-skills-flag": {
|
|
141
|
+
"flag": "skill",
|
|
142
|
+
"aliases": [
|
|
143
|
+
"agent",
|
|
144
|
+
"llm",
|
|
145
|
+
"llms",
|
|
146
|
+
"skills"
|
|
147
|
+
],
|
|
148
|
+
"directory": "skills"
|
|
149
|
+
},
|
|
136
150
|
"publishConfig": {
|
|
137
151
|
"access": "public",
|
|
138
152
|
"provenance": false
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# `npx @sanity/cli functions build`
|
|
2
|
+
|
|
3
|
+
Build local Functions into zip archives. This command is hidden from generated help; use it when archive artifacts are explicitly needed, not as a required step before `blueprints deploy`.
|
|
4
|
+
|
|
5
|
+
## Build
|
|
6
|
+
|
|
7
|
+
Build every local Function in the Blueprint:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx @sanity/cli functions build --json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Build one Function into a chosen directory:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx @sanity/cli functions build process-order --out-dir artifacts/functions --json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Without `--out-dir`, archives are written to `.build/` beside the Blueprint manifest. An existing archive with the same Function name is replaced.
|
|
20
|
+
|
|
21
|
+
The JSON result contains `built`, `errors`, and `outDir`. A run can succeed when some Functions build and others fail, so inspect `errors` even when the exit code is zero. If every build fails, the command exits with an error.
|
|
22
|
+
|
|
23
|
+
The `.gitignore` written by `blueprints init` covers `functions/**/.build/`, not the top-level `.build/` these archives land in, so exclude the output directory before committing.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# `npx @sanity/cli functions list`
|
|
2
|
+
|
|
3
|
+
List Functions deployed in a project or organization scope. This command is hidden from generated help. Results cover the whole scope rather than one Stack; use `blueprints info` for the resources of a single Stack.
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
Use the locally configured scope:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx @sanity/cli functions list --json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Select a scope explicitly when working outside a local Blueprint:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx @sanity/cli functions list --project-id PROJECT_ID --json
|
|
17
|
+
npx @sanity/cli functions list --organization-id ORGANIZATION_ID --json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The two flags are mutually exclusive. No Blueprint manifest is required: the scope resolves from those flags, from `SANITY_PROJECT_ID` or `SANITY_ORGANIZATION_ID`, or from `.sanity/blueprint.config.json`, and the command fails with `Missing scope` when none of them do. The scope is sent with the request, so a project and its organization return different sets: scheduled Functions are organization-scoped, every other type is project-scoped.
|
|
21
|
+
|
|
22
|
+
## Read the result
|
|
23
|
+
|
|
24
|
+
The JSON result contains `functions`, `scopeType`, and `scopeId`. Each entry carries `id`, `name`, `displayName`, `type`, `runtime`, `status`, `memory`, `storage`, `timeout`, `resourceType`, `resourceId`, `url`, `createdAt`, and `updatedAt`. An empty scope still emits `{"functions": []}` and exits `0`, so check the array length rather than the exit code.
|
|
25
|
+
|
|
26
|
+
Default output is one line per Function with its name, ID, type, and last update time. `--verbose` (`-v`) instead prints the type, update time, memory, timeout, and event rule of each.
|
|
27
|
+
|
|
28
|
+
Treat this as an inspection command. `functions logs`, `functions env add`, and `functions env remove` address a Function by its Blueprint resource name resolved through the deployed Stack, not by the `id` shown here.
|