@sanity/runtime-cli 15.0.5 → 15.1.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 +20 -20
- package/dist/commands/blueprints/plan.js +0 -1
- package/dist/cores/blueprints/deploy.js +8 -3
- package/dist/cores/blueprints/destroy.js +3 -3
- package/dist/cores/blueprints/plan.js +7 -1
- package/dist/server/static/components/app.css +29 -570
- package/dist/server/static/index.html +1 -0
- package/dist/server/static/vendor/design-tokens/color.css +107 -0
- package/dist/server/static/vendor/design-tokens/container.css +12 -0
- package/dist/server/static/vendor/design-tokens/fontFamily.css +8 -0
- package/dist/server/static/vendor/design-tokens/fontWeight.css +10 -0
- package/dist/server/static/vendor/design-tokens/index.css +14 -0
- package/dist/server/static/vendor/design-tokens/radius.css +14 -0
- package/dist/server/static/vendor/design-tokens/shadow.css +12 -0
- package/dist/server/static/vendor/design-tokens/space.css +16 -0
- package/dist/server/static/vendor/design-tokens/typography.css +32 -0
- package/dist/utils/blueprints/{log-hints.d.ts → hints.d.ts} +7 -7
- package/dist/utils/blueprints/{log-hints.js → hints.js} +9 -6
- package/oclif.manifest.json +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @sanity/runtime-cli
|
|
|
20
20
|
$ sanity-run COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ sanity-run (--version)
|
|
23
|
-
@sanity/runtime-cli/15.0
|
|
23
|
+
@sanity/runtime-cli/15.1.0 linux-x64 node-v24.15.0
|
|
24
24
|
$ sanity-run --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ sanity-run COMMAND
|
|
@@ -103,7 +103,7 @@ EXAMPLES
|
|
|
103
103
|
$ sanity-run blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
106
|
+
_See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/add.ts)_
|
|
107
107
|
|
|
108
108
|
## `sanity-run blueprints config`
|
|
109
109
|
|
|
@@ -140,7 +140,7 @@ EXAMPLES
|
|
|
140
140
|
$ sanity-run blueprints config --edit --project-id <projectId> --stack <name-or-id>
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
143
|
+
_See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/config.ts)_
|
|
144
144
|
|
|
145
145
|
## `sanity-run blueprints deploy`
|
|
146
146
|
|
|
@@ -191,7 +191,7 @@ EXAMPLES
|
|
|
191
191
|
$ sanity-run blueprints deploy --new-stack-name <new-name>
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
194
|
+
_See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/deploy.ts)_
|
|
195
195
|
|
|
196
196
|
## `sanity-run blueprints destroy`
|
|
197
197
|
|
|
@@ -226,7 +226,7 @@ EXAMPLES
|
|
|
226
226
|
$ sanity-run blueprints destroy --stack <name-or-id> --project-id <projectId> --force --no-wait
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
229
|
+
_See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/destroy.ts)_
|
|
230
230
|
|
|
231
231
|
## `sanity-run blueprints doctor`
|
|
232
232
|
|
|
@@ -257,7 +257,7 @@ EXAMPLES
|
|
|
257
257
|
$ sanity-run blueprints doctor --fix
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
_See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
260
|
+
_See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/doctor.ts)_
|
|
261
261
|
|
|
262
262
|
## `sanity-run blueprints info`
|
|
263
263
|
|
|
@@ -294,7 +294,7 @@ EXAMPLES
|
|
|
294
294
|
$ sanity-run blueprints info --organization-id <orgId> --stack <name-or-id>
|
|
295
295
|
```
|
|
296
296
|
|
|
297
|
-
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
297
|
+
_See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/info.ts)_
|
|
298
298
|
|
|
299
299
|
## `sanity-run blueprints init [DIR]`
|
|
300
300
|
|
|
@@ -345,7 +345,7 @@ EXAMPLES
|
|
|
345
345
|
$ sanity-run blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
348
|
+
_See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/init.ts)_
|
|
349
349
|
|
|
350
350
|
## `sanity-run blueprints logs`
|
|
351
351
|
|
|
@@ -391,7 +391,7 @@ EXAMPLES
|
|
|
391
391
|
$ sanity-run blueprints logs --before 2026-05-01T00:00:00Z
|
|
392
392
|
```
|
|
393
393
|
|
|
394
|
-
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
394
|
+
_See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/logs.ts)_
|
|
395
395
|
|
|
396
396
|
## `sanity-run blueprints mint-deploy-token`
|
|
397
397
|
|
|
@@ -436,7 +436,7 @@ EXAMPLES
|
|
|
436
436
|
$ sanity-run blueprints mint-deploy-token --organization-id <orgId>
|
|
437
437
|
```
|
|
438
438
|
|
|
439
|
-
_See code: [src/commands/blueprints/mint-deploy-token.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
439
|
+
_See code: [src/commands/blueprints/mint-deploy-token.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/mint-deploy-token.ts)_
|
|
440
440
|
|
|
441
441
|
## `sanity-run blueprints plan`
|
|
442
442
|
|
|
@@ -469,7 +469,7 @@ EXAMPLES
|
|
|
469
469
|
$ sanity-run blueprints plan --organization-id <orgId> --stack <name-or-id>
|
|
470
470
|
```
|
|
471
471
|
|
|
472
|
-
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
472
|
+
_See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/plan.ts)_
|
|
473
473
|
|
|
474
474
|
## `sanity-run blueprints promote`
|
|
475
475
|
|
|
@@ -505,7 +505,7 @@ EXAMPLES
|
|
|
505
505
|
$ sanity-run blueprints promote --new-stack-name <new-name>
|
|
506
506
|
```
|
|
507
507
|
|
|
508
|
-
_See code: [src/commands/blueprints/promote.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
508
|
+
_See code: [src/commands/blueprints/promote.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/promote.ts)_
|
|
509
509
|
|
|
510
510
|
## `sanity-run blueprints stacks`
|
|
511
511
|
|
|
@@ -541,7 +541,7 @@ EXAMPLES
|
|
|
541
541
|
$ sanity-run blueprints stacks --organization-id <organizationId> --include-projects
|
|
542
542
|
```
|
|
543
543
|
|
|
544
|
-
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
544
|
+
_See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/blueprints/stacks.ts)_
|
|
545
545
|
|
|
546
546
|
## `sanity-run functions add`
|
|
547
547
|
|
|
@@ -593,7 +593,7 @@ EXAMPLES
|
|
|
593
593
|
$ sanity-run functions add --name my-function --type document-create --type document-update --lang js
|
|
594
594
|
```
|
|
595
595
|
|
|
596
|
-
_See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
596
|
+
_See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/functions/add.ts)_
|
|
597
597
|
|
|
598
598
|
## `sanity-run functions dev`
|
|
599
599
|
|
|
@@ -628,7 +628,7 @@ EXAMPLES
|
|
|
628
628
|
$ sanity-run functions dev --timeout 60
|
|
629
629
|
```
|
|
630
630
|
|
|
631
|
-
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
631
|
+
_See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/functions/dev.ts)_
|
|
632
632
|
|
|
633
633
|
## `sanity-run functions env add NAME KEY VALUE`
|
|
634
634
|
|
|
@@ -658,7 +658,7 @@ EXAMPLES
|
|
|
658
658
|
$ sanity-run functions env add MyFunction API_URL https://api.example.com/
|
|
659
659
|
```
|
|
660
660
|
|
|
661
|
-
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
661
|
+
_See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/functions/env/add.ts)_
|
|
662
662
|
|
|
663
663
|
## `sanity-run functions env list NAME`
|
|
664
664
|
|
|
@@ -685,7 +685,7 @@ EXAMPLES
|
|
|
685
685
|
$ sanity-run functions env list MyFunction
|
|
686
686
|
```
|
|
687
687
|
|
|
688
|
-
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
688
|
+
_See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/functions/env/list.ts)_
|
|
689
689
|
|
|
690
690
|
## `sanity-run functions env remove NAME KEY`
|
|
691
691
|
|
|
@@ -714,7 +714,7 @@ EXAMPLES
|
|
|
714
714
|
$ sanity-run functions env remove MyFunction API_URL
|
|
715
715
|
```
|
|
716
716
|
|
|
717
|
-
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
717
|
+
_See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/functions/env/remove.ts)_
|
|
718
718
|
|
|
719
719
|
## `sanity-run functions logs [NAME]`
|
|
720
720
|
|
|
@@ -754,7 +754,7 @@ EXAMPLES
|
|
|
754
754
|
$ sanity-run functions logs <name> --delete
|
|
755
755
|
```
|
|
756
756
|
|
|
757
|
-
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
757
|
+
_See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/functions/logs.ts)_
|
|
758
758
|
|
|
759
759
|
## `sanity-run functions test [NAME]`
|
|
760
760
|
|
|
@@ -811,7 +811,7 @@ EXAMPLES
|
|
|
811
811
|
$ sanity-run functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
|
|
812
812
|
```
|
|
813
813
|
|
|
814
|
-
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v15.0
|
|
814
|
+
_See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v15.1.0/src/commands/functions/test.ts)_
|
|
815
815
|
|
|
816
816
|
## `sanity-run help [COMMAND]`
|
|
817
817
|
|
|
@@ -24,7 +24,6 @@ Run 'blueprints plan' after making local changes to your Blueprint manifest to v
|
|
|
24
24
|
log: Logger(this.log.bind(this), this.flags),
|
|
25
25
|
token: this.sanityToken,
|
|
26
26
|
blueprint: this.blueprint,
|
|
27
|
-
validateResources: this.flags['validate-resources'],
|
|
28
27
|
flags: this.flags,
|
|
29
28
|
});
|
|
30
29
|
if (!result.success)
|
|
@@ -2,7 +2,7 @@ import { setTimeout as sleep } from 'node:timers/promises';
|
|
|
2
2
|
import { stashAsset } from '../../actions/blueprints/assets.js';
|
|
3
3
|
import { setupLogPolling } from '../../actions/blueprints/logs-polling.js';
|
|
4
4
|
import { getStack, updateStack } from '../../actions/blueprints/stacks.js';
|
|
5
|
-
import {
|
|
5
|
+
import { createHintCollector } from '../../utils/blueprints/hints.js';
|
|
6
6
|
import { niceId } from '../../utils/display/presenters.js';
|
|
7
7
|
import { styleText } from '../../utils/style-text.js';
|
|
8
8
|
import { isAssetResource } from '../../utils/types.js';
|
|
@@ -61,10 +61,15 @@ export async function blueprintDeployCore(options) {
|
|
|
61
61
|
});
|
|
62
62
|
if (!deployOk) {
|
|
63
63
|
spinner.fail(`${styleText('red', 'Failed')} to update Stack deployment`);
|
|
64
|
+
const hints = createHintCollector(bin);
|
|
65
|
+
if (deployError) {
|
|
66
|
+
hints.inspectMessage(deployError);
|
|
67
|
+
}
|
|
64
68
|
return {
|
|
65
69
|
success: false,
|
|
66
70
|
error: deployError || 'Failed to update Stack deployment',
|
|
67
71
|
suggestions: [
|
|
72
|
+
...hints.getSuggestions(),
|
|
68
73
|
`Run \`npx ${bin} blueprints plan\` to preview changes before deploying.`,
|
|
69
74
|
`Run \`npx ${bin} blueprints doctor\` to check your configuration.`,
|
|
70
75
|
],
|
|
@@ -82,7 +87,7 @@ export async function blueprintDeployCore(options) {
|
|
|
82
87
|
}
|
|
83
88
|
log(styleText('dim', 'Stack deployment progress:'));
|
|
84
89
|
log('');
|
|
85
|
-
const logHints =
|
|
90
|
+
const logHints = createHintCollector(bin);
|
|
86
91
|
let logStreamCleanup = null;
|
|
87
92
|
try {
|
|
88
93
|
let lastLogAt = Date.now();
|
|
@@ -96,7 +101,7 @@ export async function blueprintDeployCore(options) {
|
|
|
96
101
|
onActivity: () => {
|
|
97
102
|
lastLogAt = Date.now();
|
|
98
103
|
},
|
|
99
|
-
onLogEntry: (logEntry) => logHints.
|
|
104
|
+
onLogEntry: (logEntry) => logHints.inspectLog(logEntry),
|
|
100
105
|
});
|
|
101
106
|
while (true) {
|
|
102
107
|
const { ok, stack: currentStack } = await getStack({ stackId: stack.id, auth, logger: log });
|
|
@@ -2,7 +2,7 @@ import { setTimeout as sleep } from 'node:timers/promises';
|
|
|
2
2
|
import { confirm } from '@inquirer/prompts';
|
|
3
3
|
import { setupLogPolling } from '../../actions/blueprints/logs-polling.js';
|
|
4
4
|
import { destroyStack, getStack, resolveStackIdByNameOrId } from '../../actions/blueprints/stacks.js';
|
|
5
|
-
import {
|
|
5
|
+
import { createHintCollector } from '../../utils/blueprints/hints.js';
|
|
6
6
|
import { niceId } from '../../utils/display/presenters.js';
|
|
7
7
|
import { styleText } from '../../utils/style-text.js';
|
|
8
8
|
export async function blueprintDestroyCore(options) {
|
|
@@ -134,7 +134,7 @@ async function waitForDestruction(options) {
|
|
|
134
134
|
const { stackId, stackName, operationId, auth, log, bin } = options;
|
|
135
135
|
log(styleText('dim', 'Stack destruction progress:'));
|
|
136
136
|
log('');
|
|
137
|
-
const logHints =
|
|
137
|
+
const logHints = createHintCollector(bin);
|
|
138
138
|
let logStreamCleanup = null;
|
|
139
139
|
try {
|
|
140
140
|
let lastLogAt = Date.now();
|
|
@@ -147,7 +147,7 @@ async function waitForDestruction(options) {
|
|
|
147
147
|
onActivity: () => {
|
|
148
148
|
lastLogAt = Date.now();
|
|
149
149
|
},
|
|
150
|
-
onLogEntry: (logEntry) => logHints.
|
|
150
|
+
onLogEntry: (logEntry) => logHints.inspectLog(logEntry),
|
|
151
151
|
});
|
|
152
152
|
while (true) {
|
|
153
153
|
const { ok, stack: currentStack } = await getStack({ stackId, auth, logger: log });
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { planStack, resolveStackIdByNameOrId } from '../../actions/blueprints/stacks.js';
|
|
2
|
+
import { createHintCollector } from '../../utils/blueprints/hints.js';
|
|
2
3
|
import { formatDeploymentPlan, formatResourceTree, hasActionableChanges, } from '../../utils/display/blueprints-formatting.js';
|
|
3
4
|
import { styleText } from '../../utils/style-text.js';
|
|
4
5
|
export async function blueprintPlanCore(options) {
|
|
@@ -42,9 +43,11 @@ export async function blueprintPlanCore(options) {
|
|
|
42
43
|
});
|
|
43
44
|
spinner.stop().clear();
|
|
44
45
|
if (!planResponse.ok) {
|
|
46
|
+
const hints = createHintCollector(bin);
|
|
45
47
|
if (planResponse.problems) {
|
|
46
48
|
log('');
|
|
47
49
|
for (const problem of planResponse.problems) {
|
|
50
|
+
hints.inspectMessage(problem.message);
|
|
48
51
|
const messages = problem.message
|
|
49
52
|
.split('\n')
|
|
50
53
|
.map((s) => s.trim())
|
|
@@ -60,7 +63,10 @@ export async function blueprintPlanCore(options) {
|
|
|
60
63
|
return {
|
|
61
64
|
success: false,
|
|
62
65
|
error: 'Deployment plan has problems',
|
|
63
|
-
suggestions: [
|
|
66
|
+
suggestions: [
|
|
67
|
+
...hints.getSuggestions(),
|
|
68
|
+
`Fix the issues above, then run \`npx ${bin} blueprints deploy\`.`,
|
|
69
|
+
],
|
|
64
70
|
};
|
|
65
71
|
}
|
|
66
72
|
log('');
|