@sanity/runtime-cli 17.2.0-next.ga4b9ae7 → 17.3.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/17.2.0-next.ga4b9ae7 linux-x64 node-v24.18.0
23
+ @sanity/runtime-cli/17.3.0 linux-x64 node-v24.18.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/v17.2.0-next.ga4b9ae7/src/commands/blueprints/add.ts)_
106
+ _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.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/v17.2.0-next.ga4b9ae7/src/commands/blueprints/config.ts)_
143
+ _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/config.ts)_
144
144
 
145
145
  ## `sanity-run blueprints deploy`
146
146
 
@@ -194,7 +194,7 @@ EXAMPLES
194
194
  $ sanity-run blueprints deploy --new-stack-name <new-name>
195
195
  ```
196
196
 
197
- _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/deploy.ts)_
197
+ _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/deploy.ts)_
198
198
 
199
199
  ## `sanity-run blueprints destroy`
200
200
 
@@ -232,7 +232,7 @@ EXAMPLES
232
232
  $ sanity-run blueprints destroy --stack <name-or-id> --project-id <projectId> --force --no-wait
233
233
  ```
234
234
 
235
- _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/destroy.ts)_
235
+ _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/destroy.ts)_
236
236
 
237
237
  ## `sanity-run blueprints doctor`
238
238
 
@@ -264,7 +264,7 @@ EXAMPLES
264
264
  $ sanity-run blueprints doctor --fix
265
265
  ```
266
266
 
267
- _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/doctor.ts)_
267
+ _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/doctor.ts)_
268
268
 
269
269
  ## `sanity-run blueprints info`
270
270
 
@@ -301,7 +301,7 @@ EXAMPLES
301
301
  $ sanity-run blueprints info --organization-id <orgId> --stack <name-or-id>
302
302
  ```
303
303
 
304
- _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/info.ts)_
304
+ _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/info.ts)_
305
305
 
306
306
  ## `sanity-run blueprints init [DIR]`
307
307
 
@@ -365,7 +365,7 @@ EXAMPLES
365
365
  $ sanity-run blueprints init old-stack --type <json|js|ts> --project-id <projectId> --stack-id <existingStackId>
366
366
  ```
367
367
 
368
- _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/init.ts)_
368
+ _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/init.ts)_
369
369
 
370
370
  ## `sanity-run blueprints logs`
371
371
 
@@ -411,7 +411,7 @@ EXAMPLES
411
411
  $ sanity-run blueprints logs --before 2026-05-01T00:00:00Z
412
412
  ```
413
413
 
414
- _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/logs.ts)_
414
+ _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/logs.ts)_
415
415
 
416
416
  ## `sanity-run blueprints mint-deploy-token`
417
417
 
@@ -456,7 +456,7 @@ EXAMPLES
456
456
  $ sanity-run blueprints mint-deploy-token --organization-id <orgId>
457
457
  ```
458
458
 
459
- _See code: [src/commands/blueprints/mint-deploy-token.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/mint-deploy-token.ts)_
459
+ _See code: [src/commands/blueprints/mint-deploy-token.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/mint-deploy-token.ts)_
460
460
 
461
461
  ## `sanity-run blueprints plan`
462
462
 
@@ -489,7 +489,7 @@ EXAMPLES
489
489
  $ sanity-run blueprints plan --organization-id <orgId> --stack <name-or-id>
490
490
  ```
491
491
 
492
- _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/plan.ts)_
492
+ _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/plan.ts)_
493
493
 
494
494
  ## `sanity-run blueprints promote`
495
495
 
@@ -525,7 +525,7 @@ EXAMPLES
525
525
  $ sanity-run blueprints promote --new-stack-name <new-name>
526
526
  ```
527
527
 
528
- _See code: [src/commands/blueprints/promote.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/promote.ts)_
528
+ _See code: [src/commands/blueprints/promote.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/promote.ts)_
529
529
 
530
530
  ## `sanity-run blueprints stacks`
531
531
 
@@ -561,7 +561,7 @@ EXAMPLES
561
561
  $ sanity-run blueprints stacks --organization-id <organizationId> --include-projects
562
562
  ```
563
563
 
564
- _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/blueprints/stacks.ts)_
564
+ _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/blueprints/stacks.ts)_
565
565
 
566
566
  ## `sanity-run functions add`
567
567
 
@@ -613,7 +613,7 @@ EXAMPLES
613
613
  $ sanity-run functions add --name my-function --type document-create --type document-update --lang js
614
614
  ```
615
615
 
616
- _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/functions/add.ts)_
616
+ _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/functions/add.ts)_
617
617
 
618
618
  ## `sanity-run functions dev`
619
619
 
@@ -648,7 +648,7 @@ EXAMPLES
648
648
  $ sanity-run functions dev --timeout 60
649
649
  ```
650
650
 
651
- _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/functions/dev.ts)_
651
+ _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/functions/dev.ts)_
652
652
 
653
653
  ## `sanity-run functions env add NAME KEY VALUE`
654
654
 
@@ -656,7 +656,7 @@ Add or set an environment variable for a deployed function
656
656
 
657
657
  ```
658
658
  USAGE
659
- $ sanity-run functions env add NAME KEY VALUE [--json]
659
+ $ sanity-run functions env add NAME KEY VALUE [--json] [--stack <value>]
660
660
 
661
661
  ARGUMENTS
662
662
  NAME The name of the Sanity Function
@@ -664,7 +664,8 @@ ARGUMENTS
664
664
  VALUE The value of the environment variable
665
665
 
666
666
  FLAGS
667
- --json Format output as json
667
+ --json Format output as json
668
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
668
669
 
669
670
  DESCRIPTION
670
671
  Add or set an environment variable for a deployed function
@@ -676,9 +677,11 @@ DESCRIPTION
676
677
 
677
678
  EXAMPLES
678
679
  $ sanity-run functions env add MyFunction API_URL https://api.example.com/
680
+
681
+ $ sanity-run functions env add --stack <name-or-id> MyFunction API_URL https://api.example.com/
679
682
  ```
680
683
 
681
- _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/functions/env/add.ts)_
684
+ _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/functions/env/add.ts)_
682
685
 
683
686
  ## `sanity-run functions env list NAME`
684
687
 
@@ -686,13 +689,14 @@ List environment variables for a deployed function
686
689
 
687
690
  ```
688
691
  USAGE
689
- $ sanity-run functions env list NAME [--json]
692
+ $ sanity-run functions env list NAME [--json] [--stack <value>]
690
693
 
691
694
  ARGUMENTS
692
695
  NAME The name of the Sanity Function
693
696
 
694
697
  FLAGS
695
- --json Format output as json
698
+ --json Format output as json
699
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
696
700
 
697
701
  DESCRIPTION
698
702
  List environment variables for a deployed function
@@ -703,9 +707,11 @@ DESCRIPTION
703
707
 
704
708
  EXAMPLES
705
709
  $ sanity-run functions env list MyFunction
710
+
711
+ $ sanity-run functions env list --stack <name-or-id> MyFunction
706
712
  ```
707
713
 
708
- _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/functions/env/list.ts)_
714
+ _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/functions/env/list.ts)_
709
715
 
710
716
  ## `sanity-run functions env remove NAME KEY`
711
717
 
@@ -713,14 +719,15 @@ Remove an environment variable from a deployed function
713
719
 
714
720
  ```
715
721
  USAGE
716
- $ sanity-run functions env remove NAME KEY [--json]
722
+ $ sanity-run functions env remove NAME KEY [--json] [--stack <value>]
717
723
 
718
724
  ARGUMENTS
719
725
  NAME The name of the Sanity Function
720
726
  KEY The name of the environment variable
721
727
 
722
728
  FLAGS
723
- --json Format output as json
729
+ --json Format output as json
730
+ --stack=<value> Stack name or ID to use instead of the locally configured Stack
724
731
 
725
732
  DESCRIPTION
726
733
  Remove an environment variable from a deployed function
@@ -732,9 +739,11 @@ DESCRIPTION
732
739
 
733
740
  EXAMPLES
734
741
  $ sanity-run functions env remove MyFunction API_URL
742
+
743
+ $ sanity-run functions env remove --stack <name-or-id> MyFunction API_URL
735
744
  ```
736
745
 
737
- _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/functions/env/remove.ts)_
746
+ _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/functions/env/remove.ts)_
738
747
 
739
748
  ## `sanity-run functions logs [NAME]`
740
749
 
@@ -774,7 +783,7 @@ EXAMPLES
774
783
  $ sanity-run functions logs <name> --delete
775
784
  ```
776
785
 
777
- _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/functions/logs.ts)_
786
+ _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/functions/logs.ts)_
778
787
 
779
788
  ## `sanity-run functions test [NAME]`
780
789
 
@@ -831,7 +840,7 @@ EXAMPLES
831
840
  $ sanity-run functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
832
841
  ```
833
842
 
834
- _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v17.2.0-next.ga4b9ae7/src/commands/functions/test.ts)_
843
+ _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0/src/commands/functions/test.ts)_
835
844
 
836
845
  ## `sanity-run help [COMMAND]`
837
846
 
@@ -8,6 +8,9 @@ export default class EnvAddCommand extends ResolvedCommand<typeof EnvAddCommand>
8
8
  key: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
9
9
  value: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
10
10
  };
11
+ static flags: {
12
+ stack: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ };
11
14
  static examples: string[];
12
15
  run(): Promise<Record<string, unknown> | undefined>;
13
16
  }
@@ -1,5 +1,5 @@
1
- import { Args } from '@oclif/core';
2
- import { ResolvedCommand } from '../../../baseCommands.js';
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { ResolvedCommand, stackFlagConfig } from '../../../baseCommands.js';
3
3
  import { functionEnvAddCore } from '../../../cores/functions/env/add.js';
4
4
  import { Logger } from '../../../utils/logger.js';
5
5
  export default class EnvAddCommand extends ResolvedCommand {
@@ -13,8 +13,12 @@ Environment variables are useful for API keys, configuration values, and other s
13
13
  key: Args.string({ description: 'The name of the environment variable', required: true }),
14
14
  value: Args.string({ description: 'The value of the environment variable', required: true }),
15
15
  };
16
+ static flags = {
17
+ stack: Flags.string({ ...stackFlagConfig }),
18
+ };
16
19
  static examples = [
17
20
  '<%= config.bin %> <%= command.id %> MyFunction API_URL https://api.example.com/',
21
+ '<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction API_URL https://api.example.com/',
18
22
  ];
19
23
  async run() {
20
24
  const result = await functionEnvAddCore({
@@ -6,6 +6,9 @@ export default class EnvListCommand extends ResolvedCommand<typeof EnvListComman
6
6
  static args: {
7
7
  name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
8
8
  };
9
+ static flags: {
10
+ stack: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
9
12
  static examples: string[];
10
13
  run(): Promise<Record<string, unknown> | undefined>;
11
14
  }
@@ -1,5 +1,5 @@
1
- import { Args } from '@oclif/core';
2
- import { ResolvedCommand } from '../../../baseCommands.js';
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { ResolvedCommand, stackFlagConfig } from '../../../baseCommands.js';
3
3
  import { functionEnvListCore } from '../../../cores/functions/env/list.js';
4
4
  import { Logger } from '../../../utils/logger.js';
5
5
  export default class EnvListCommand extends ResolvedCommand {
@@ -11,7 +11,13 @@ Use 'functions env add' to set variables or 'functions env remove' to delete the
11
11
  static args = {
12
12
  name: Args.string({ description: 'The name of the Sanity Function', required: true }),
13
13
  };
14
- static examples = ['<%= config.bin %> <%= command.id %> MyFunction'];
14
+ static flags = {
15
+ stack: Flags.string({ ...stackFlagConfig }),
16
+ };
17
+ static examples = [
18
+ '<%= config.bin %> <%= command.id %> MyFunction',
19
+ '<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction',
20
+ ];
15
21
  async run() {
16
22
  const result = await functionEnvListCore({
17
23
  bin: this.config.bin,
@@ -7,6 +7,9 @@ export default class EnvRemoveCommand extends ResolvedCommand<typeof EnvRemoveCo
7
7
  name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
8
8
  key: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
9
9
  };
10
+ static flags: {
11
+ stack: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ };
10
13
  static examples: string[];
11
14
  run(): Promise<Record<string, unknown> | undefined>;
12
15
  }
@@ -1,5 +1,5 @@
1
- import { Args } from '@oclif/core';
2
- import { ResolvedCommand } from '../../../baseCommands.js';
1
+ import { Args, Flags } from '@oclif/core';
2
+ import { ResolvedCommand, stackFlagConfig } from '../../../baseCommands.js';
3
3
  import { functionEnvRemoveCore } from '../../../cores/functions/env/remove.js';
4
4
  import { Logger } from '../../../utils/logger.js';
5
5
  export default class EnvRemoveCommand extends ResolvedCommand {
@@ -12,7 +12,13 @@ Use 'functions env list' to see current variables before removing.`;
12
12
  name: Args.string({ description: 'The name of the Sanity Function', required: true }),
13
13
  key: Args.string({ description: 'The name of the environment variable', required: true }),
14
14
  };
15
- static examples = ['<%= config.bin %> <%= command.id %> MyFunction API_URL'];
15
+ static flags = {
16
+ stack: Flags.string({ ...stackFlagConfig }),
17
+ };
18
+ static examples = [
19
+ '<%= config.bin %> <%= command.id %> MyFunction API_URL',
20
+ '<%= config.bin %> <%= command.id %> --stack <name-or-id> MyFunction API_URL',
21
+ ];
16
22
  async run() {
17
23
  const result = await functionEnvRemoveCore({
18
24
  bin: this.config.bin,