@sanity/runtime-cli 14.9.0 → 14.10.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 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/14.9.0 linux-x64 node-v24.14.1
23
+ @sanity/runtime-cli/14.10.0 linux-x64 node-v24.14.1
24
24
  $ sanity-run --help [COMMAND]
25
25
  USAGE
26
26
  $ sanity-run COMMAND
@@ -101,7 +101,7 @@ EXAMPLES
101
101
  $ sanity-run blueprints add function --name my-function --fn-type document-create --fn-type document-update --lang js
102
102
  ```
103
103
 
104
- _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/add.ts)_
104
+ _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/add.ts)_
105
105
 
106
106
  ## `sanity-run blueprints config`
107
107
 
@@ -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/v14.9.0/src/commands/blueprints/config.ts)_
143
+ _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/config.ts)_
144
144
 
145
145
  ## `sanity-run blueprints deploy`
146
146
 
@@ -148,13 +148,14 @@ Deploy the local Blueprint to the remote Stack
148
148
 
149
149
  ```
150
150
  USAGE
151
- $ sanity-run blueprints deploy [--json] [--validate-resources] [--stack <value>] [--no-wait]
151
+ $ sanity-run blueprints deploy [--json] [--validate-resources] [--stack <value>] [-m <value>] [--no-wait]
152
152
 
153
153
  FLAGS
154
- --json Format output as json
155
- --no-wait Do not wait for Stack deployment to complete
156
- --stack=<value> Stack name or ID to use instead of the locally configured Stack
157
- --[no-]validate-resources Validate resources
154
+ -m, --message=<value> Message describing the deployment (e.g. reason for change)
155
+ --json Format output as json
156
+ --no-wait Do not wait for Stack deployment to complete
157
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
158
+ --[no-]validate-resources Validate resources
158
159
 
159
160
  DESCRIPTION
160
161
  Deploy the local Blueprint to the remote Stack
@@ -174,12 +175,14 @@ DESCRIPTION
174
175
  EXAMPLES
175
176
  $ sanity-run blueprints deploy
176
177
 
178
+ $ sanity-run blueprints deploy --message "Enable staging dataset"
179
+
177
180
  $ sanity-run blueprints deploy --no-wait
178
181
 
179
182
  $ sanity-run blueprints deploy --fn-installer npm
180
183
  ```
181
184
 
182
- _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/deploy.ts)_
185
+ _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/deploy.ts)_
183
186
 
184
187
  ## `sanity-run blueprints destroy`
185
188
 
@@ -215,7 +218,7 @@ EXAMPLES
215
218
  $ sanity-run blueprints destroy --stack <name-or-id> --project-id <projectId> --force --no-wait
216
219
  ```
217
220
 
218
- _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/destroy.ts)_
221
+ _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/destroy.ts)_
219
222
 
220
223
  ## `sanity-run blueprints doctor`
221
224
 
@@ -247,7 +250,7 @@ EXAMPLES
247
250
  $ sanity-run blueprints doctor --fix
248
251
  ```
249
252
 
250
- _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/doctor.ts)_
253
+ _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/doctor.ts)_
251
254
 
252
255
  ## `sanity-run blueprints info`
253
256
 
@@ -279,7 +282,7 @@ EXAMPLES
279
282
  $ sanity-run blueprints info --stack <name-or-id>
280
283
  ```
281
284
 
282
- _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/info.ts)_
285
+ _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/info.ts)_
283
286
 
284
287
  ## `sanity-run blueprints init [DIR]`
285
288
 
@@ -333,7 +336,7 @@ EXAMPLES
333
336
  $ sanity-run blueprints init --blueprint-type <json|js|ts> --stack-name <stackName>
334
337
  ```
335
338
 
336
- _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/init.ts)_
339
+ _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/init.ts)_
337
340
 
338
341
  ## `sanity-run blueprints logs`
339
342
 
@@ -364,7 +367,7 @@ EXAMPLES
364
367
  $ sanity-run blueprints logs --watch
365
368
  ```
366
369
 
367
- _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/logs.ts)_
370
+ _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/logs.ts)_
368
371
 
369
372
  ## `sanity-run blueprints plan`
370
373
 
@@ -392,7 +395,7 @@ EXAMPLES
392
395
  $ sanity-run blueprints plan
393
396
  ```
394
397
 
395
- _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/plan.ts)_
398
+ _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/plan.ts)_
396
399
 
397
400
  ## `sanity-run blueprints stacks`
398
401
 
@@ -424,7 +427,7 @@ EXAMPLES
424
427
  $ sanity-run blueprints stacks --organization-id <organizationId>
425
428
  ```
426
429
 
427
- _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/blueprints/stacks.ts)_
430
+ _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/blueprints/stacks.ts)_
428
431
 
429
432
  ## `sanity-run functions add`
430
433
 
@@ -477,7 +480,7 @@ EXAMPLES
477
480
  $ sanity-run functions add --name my-function --type document-create --type document-update --lang js
478
481
  ```
479
482
 
480
- _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/functions/add.ts)_
483
+ _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/functions/add.ts)_
481
484
 
482
485
  ## `sanity-run functions dev`
483
486
 
@@ -513,7 +516,7 @@ EXAMPLES
513
516
  $ sanity-run functions dev --timeout 60
514
517
  ```
515
518
 
516
- _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/functions/dev.ts)_
519
+ _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/functions/dev.ts)_
517
520
 
518
521
  ## `sanity-run functions env add NAME KEY VALUE`
519
522
 
@@ -544,7 +547,7 @@ EXAMPLES
544
547
  $ sanity-run functions env add MyFunction API_URL https://api.example.com/
545
548
  ```
546
549
 
547
- _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/functions/env/add.ts)_
550
+ _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/functions/env/add.ts)_
548
551
 
549
552
  ## `sanity-run functions env list NAME`
550
553
 
@@ -572,7 +575,7 @@ EXAMPLES
572
575
  $ sanity-run functions env list MyFunction
573
576
  ```
574
577
 
575
- _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/functions/env/list.ts)_
578
+ _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/functions/env/list.ts)_
576
579
 
577
580
  ## `sanity-run functions env remove NAME KEY`
578
581
 
@@ -602,7 +605,7 @@ EXAMPLES
602
605
  $ sanity-run functions env remove MyFunction API_URL
603
606
  ```
604
607
 
605
- _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/functions/env/remove.ts)_
608
+ _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/functions/env/remove.ts)_
606
609
 
607
610
  ## `sanity-run functions logs [NAME]`
608
611
 
@@ -644,7 +647,7 @@ EXAMPLES
644
647
  $ sanity-run functions logs <name> --delete
645
648
  ```
646
649
 
647
- _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/functions/logs.ts)_
650
+ _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/functions/logs.ts)_
648
651
 
649
652
  ## `sanity-run functions test [NAME]`
650
653
 
@@ -702,7 +705,7 @@ EXAMPLES
702
705
  $ sanity-run functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
703
706
  ```
704
707
 
705
- _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v14.9.0/src/commands/functions/test.ts)_
708
+ _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v14.10.0/src/commands/functions/test.ts)_
706
709
 
707
710
  ## `sanity-run help [COMMAND]`
708
711
 
@@ -5,6 +5,7 @@ export default class DeployCommand extends DeployedStackCommand<typeof DeployCom
5
5
  static examples: string[];
6
6
  static flags: {
7
7
  stack: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ message: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
9
  'fn-installer': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
10
  'no-wait': import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
11
  'new-stack-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -16,11 +16,16 @@ Use --fn-installer to force which package manager to use when deploying function
16
16
  Set SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.`;
17
17
  static examples = [
18
18
  '<%= config.bin %> <%= command.id %>',
19
+ '<%= config.bin %> <%= command.id %> --message "Enable staging dataset"',
19
20
  '<%= config.bin %> <%= command.id %> --no-wait',
20
21
  '<%= config.bin %> <%= command.id %> --fn-installer npm',
21
22
  ];
22
23
  static flags = {
23
24
  stack: unhide(stackFlag),
25
+ message: Flags.string({
26
+ description: 'Message describing the deployment (e.g. reason for change)',
27
+ char: 'm',
28
+ }),
24
29
  'fn-installer': Flags.string({
25
30
  description: 'Which package manager to use when installing Function dependencies',
26
31
  aliases: ['function-installer', 'installer'],
package/dist/constants.js CHANGED
@@ -30,6 +30,7 @@ export const FUNCTION_TYPES = [
30
30
  export const PROJECT_SCOPED_FUNCTION_TYPES = new Set([
31
31
  SANITY_FUNCTION_DOCUMENT,
32
32
  SANITY_FUNCTION_MEDIA_LIBRARY_ASSET,
33
+ SANITY_FUNCTION_SYNC_TAG_INVALIDATE,
33
34
  ]);
34
35
  export const ORGANIZATION_SCOPED_FUNCTION_TYPES = new Set([
35
36
  SANITY_FUNCTION_SCHEDULED,
@@ -12,6 +12,7 @@ export interface BlueprintDeployOptions extends CoreConfig {
12
12
  'fn-installer'?: string;
13
13
  'no-wait'?: boolean;
14
14
  'new-stack-name'?: string;
15
+ message?: string;
15
16
  verbose?: boolean;
16
17
  };
17
18
  }
@@ -54,6 +54,7 @@ export async function blueprintDeployCore(options) {
54
54
  scopeId,
55
55
  name: stackName,
56
56
  document: { resources },
57
+ userMessage: flags.message,
57
58
  },
58
59
  auth,
59
60
  logger: log,
@@ -163,6 +163,8 @@ export async function blueprintDoctorCore(options) {
163
163
  ? ` ${styleText('dim', new Date(time).toLocaleString('sv-SE'))}`
164
164
  : '';
165
165
  stackRows.push(['Operation', `${op.status}${timestamp}`]);
166
+ if (op.userMessage)
167
+ stackRows.push([' Message', `"${op.userMessage}"`]);
166
168
  }
167
169
  if (stack.resources) {
168
170
  stackRows.push(['Resources', `${stack.resources.length}`]);
@@ -197,6 +197,8 @@ export function formatStackInfo(stack, isCurrentStack = false) {
197
197
  parts.push(styleText('yellow', `(${formatDuration(op.createdAt, op.completedAt)})`));
198
198
  }
199
199
  rows.push(['Operation', parts.join(' ')]);
200
+ if (op.userMessage)
201
+ rows.push([' Message', `"${op.userMessage}"`]);
200
202
  }
201
203
  return renderSection(title, rows);
202
204
  }
@@ -72,6 +72,8 @@ export interface StackOperation {
72
72
  status: string;
73
73
  createdAt?: string;
74
74
  completedAt?: string;
75
+ userMessage?: string;
76
+ systemMessage?: string;
75
77
  }
76
78
  /** @internal */
77
79
  export interface StackMutation {
@@ -81,6 +83,7 @@ export interface StackMutation {
81
83
  document: {
82
84
  resources?: BlueprintResource[];
83
85
  };
86
+ userMessage?: string;
84
87
  }
85
88
  /** @internal */
86
89
  export interface BuildPayloadOptions {
@@ -317,6 +317,7 @@
317
317
  "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 60-second timeout for processing resource assets.",
318
318
  "examples": [
319
319
  "<%= config.bin %> <%= command.id %>",
320
+ "<%= config.bin %> <%= command.id %> --message \"Enable staging dataset\"",
320
321
  "<%= config.bin %> <%= command.id %> --no-wait",
321
322
  "<%= config.bin %> <%= command.id %> --fn-installer npm"
322
323
  ],
@@ -368,6 +369,14 @@
368
369
  "multiple": false,
369
370
  "type": "option"
370
371
  },
372
+ "message": {
373
+ "char": "m",
374
+ "description": "Message describing the deployment (e.g. reason for change)",
375
+ "name": "message",
376
+ "hasDynamicHelp": false,
377
+ "multiple": false,
378
+ "type": "option"
379
+ },
371
380
  "fn-installer": {
372
381
  "aliases": [
373
382
  "function-installer",
@@ -2238,5 +2247,5 @@
2238
2247
  ]
2239
2248
  }
2240
2249
  },
2241
- "version": "14.9.0"
2250
+ "version": "14.10.0"
2242
2251
  }
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": "14.9.0",
4
+ "version": "14.10.0",
5
5
  "author": "Sanity Runtime Team",
6
6
  "type": "module",
7
7
  "license": "MIT",