@sanity/runtime-cli 17.3.0-blueprinit.gaf4f184 → 17.3.0-blueprinit.gb1c5e1e

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.3.0-blueprinit.gaf4f184 linux-x64 node-v24.18.0
23
+ @sanity/runtime-cli/17.3.0-blueprinit.gb1c5e1e 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.3.0-blueprinit.gaf4f184/src/commands/blueprints/add.ts)_
106
+ _See code: [src/commands/blueprints/add.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/config.ts)_
143
+ _See code: [src/commands/blueprints/config.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/deploy.ts)_
197
+ _See code: [src/commands/blueprints/deploy.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/destroy.ts)_
235
+ _See code: [src/commands/blueprints/destroy.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/doctor.ts)_
267
+ _See code: [src/commands/blueprints/doctor.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/info.ts)_
304
+ _See code: [src/commands/blueprints/info.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/init.ts)_
368
+ _See code: [src/commands/blueprints/init.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/logs.ts)_
414
+ _See code: [src/commands/blueprints/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/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-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/plan.ts)_
492
+ _See code: [src/commands/blueprints/plan.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/promote.ts)_
528
+ _See code: [src/commands/blueprints/promote.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/blueprints/stacks.ts)_
564
+ _See code: [src/commands/blueprints/stacks.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/functions/add.ts)_
616
+ _See code: [src/commands/functions/add.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/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.3.0-blueprinit.gaf4f184/src/commands/functions/dev.ts)_
651
+ _See code: [src/commands/functions/dev.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/src/commands/functions/dev.ts)_
652
652
 
653
653
  ## `sanity-run functions env add NAME KEY VALUE`
654
654
 
@@ -681,7 +681,7 @@ EXAMPLES
681
681
  $ sanity-run functions env add --stack <name-or-id> MyFunction API_URL https://api.example.com/
682
682
  ```
683
683
 
684
- _See code: [src/commands/functions/env/add.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gaf4f184/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-blueprinit.gb1c5e1e/src/commands/functions/env/add.ts)_
685
685
 
686
686
  ## `sanity-run functions env list NAME`
687
687
 
@@ -711,7 +711,7 @@ EXAMPLES
711
711
  $ sanity-run functions env list --stack <name-or-id> MyFunction
712
712
  ```
713
713
 
714
- _See code: [src/commands/functions/env/list.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gaf4f184/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-blueprinit.gb1c5e1e/src/commands/functions/env/list.ts)_
715
715
 
716
716
  ## `sanity-run functions env remove NAME KEY`
717
717
 
@@ -743,7 +743,7 @@ EXAMPLES
743
743
  $ sanity-run functions env remove --stack <name-or-id> MyFunction API_URL
744
744
  ```
745
745
 
746
- _See code: [src/commands/functions/env/remove.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gaf4f184/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-blueprinit.gb1c5e1e/src/commands/functions/env/remove.ts)_
747
747
 
748
748
  ## `sanity-run functions logs [NAME]`
749
749
 
@@ -783,7 +783,7 @@ EXAMPLES
783
783
  $ sanity-run functions logs <name> --delete
784
784
  ```
785
785
 
786
- _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gaf4f184/src/commands/functions/logs.ts)_
786
+ _See code: [src/commands/functions/logs.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/src/commands/functions/logs.ts)_
787
787
 
788
788
  ## `sanity-run functions test [NAME]`
789
789
 
@@ -840,7 +840,7 @@ EXAMPLES
840
840
  $ sanity-run functions test <name> --event update --data-before '{ "title": "before" }' --data-after '{ "title": "after" }'
841
841
  ```
842
842
 
843
- _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gaf4f184/src/commands/functions/test.ts)_
843
+ _See code: [src/commands/functions/test.ts](https://github.com/sanity-io/runtime-cli/blob/v17.3.0-blueprinit.gb1c5e1e/src/commands/functions/test.ts)_
844
844
 
845
845
  ## `sanity-run help [COMMAND]`
846
846
 
@@ -860,5 +860,5 @@ DESCRIPTION
860
860
  Display help for sanity-run.
861
861
  ```
862
862
 
863
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.53/src/commands/help.ts)_
863
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.55/src/commands/help.ts)_
864
864
  <!-- commandsstop -->
@@ -12,13 +12,8 @@ export declare const pathFlagConfig: {
12
12
  aliases: string[];
13
13
  char: 'p';
14
14
  };
15
- export declare const llmsFlagConfig: {
16
- description: string;
17
- aliases: string[];
18
- };
19
15
  export declare const baseFlags: {
20
16
  json: Interfaces.BooleanFlag<boolean>;
21
- llms: Interfaces.BooleanFlag<boolean>;
22
17
  path: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
23
18
  trace: Interfaces.BooleanFlag<boolean>;
24
19
  'validate-resources': Interfaces.BooleanFlag<boolean>;
@@ -47,7 +42,6 @@ export declare abstract class RuntimeCommand<T extends typeof Command> extends C
47
42
  protected args: Args<T>;
48
43
  static baseFlags: {
49
44
  json: Interfaces.BooleanFlag<boolean>;
50
- llms: Interfaces.BooleanFlag<boolean>;
51
45
  path: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
52
46
  trace: Interfaces.BooleanFlag<boolean>;
53
47
  'validate-resources': Interfaces.BooleanFlag<boolean>;
@@ -119,7 +113,6 @@ export declare abstract class ResolvedCommand<T extends typeof Command> extends
119
113
  static needs: readonly Need[];
120
114
  static baseFlags: {
121
115
  json: Interfaces.BooleanFlag<boolean>;
122
- llms: Interfaces.BooleanFlag<boolean>;
123
116
  path: Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
124
117
  trace: Interfaces.BooleanFlag<boolean>;
125
118
  'validate-resources': Interfaces.BooleanFlag<boolean>;
@@ -6,7 +6,6 @@ import { resolveIds } from './actions/blueprints/resolve.js';
6
6
  import { getStack, resolveStackIdByNameOrId } from './actions/blueprints/stacks.js';
7
7
  import config from './config.js';
8
8
  import { CI_SETUP_DOCS_URL } from './constants.js';
9
- import { commandSkillFilename, readCommandSkill } from './utils/command-skills.js';
10
9
  import { presentBlueprintParserErrors } from './utils/display/errors.js';
11
10
  import { Logger } from './utils/logger.js';
12
11
  import { styleText } from './utils/style-text.js';
@@ -26,19 +25,11 @@ export const pathFlagConfig = {
26
25
  aliases: ['blueprint-path'],
27
26
  char: 'p',
28
27
  };
29
- export const llmsFlagConfig = {
30
- description: 'Show agent-oriented guidance for this command',
31
- aliases: ['skill'],
32
- };
33
28
  export const baseFlags = {
34
29
  json: OclifFlags.boolean({
35
30
  // override defaults from oclif's built-in --json flag
36
31
  description: 'Format output as json',
37
32
  }),
38
- llms: OclifFlags.boolean({
39
- ...llmsFlagConfig,
40
- hidden: true,
41
- }),
42
33
  path: OclifFlags.string({
43
34
  ...pathFlagConfig,
44
35
  hidden: true,
@@ -127,18 +118,6 @@ export class RuntimeCommand extends Command {
127
118
  return commandHelp.generate();
128
119
  }
129
120
  async init() {
130
- if (this.argv.some((arg) => arg === '--llms' || arg === '--skill')) {
131
- const commandId = this.id ?? this.ctor.id;
132
- const skill = await readCommandSkill(commandId);
133
- if (!skill) {
134
- const commandName = commandId.replaceAll(':', ' ');
135
- this.error(`No agent guidance is available for \`${commandName}\`.`, {
136
- suggestions: [`Add it at skills/${commandSkillFilename(commandId)}.`],
137
- });
138
- }
139
- process.stdout.write(skill.endsWith('\n') ? skill : `${skill}\n`);
140
- this.exit();
141
- }
142
121
  const { args, flags } = await this.parse({
143
122
  flags: this.ctor.flags,
144
123
  baseFlags: super.ctor.baseFlags,
@@ -1,5 +1,6 @@
1
1
  import { Flags } from '@oclif/core';
2
- import { llmsFlagConfig, RuntimeCommand } from '../baseCommands.js';
2
+ import { llmsFlagConfig } from '@sanity-labs/oclif-plugin-skills-flag';
3
+ import { RuntimeCommand } from '../baseCommands.js';
3
4
  import { blueprinitCore } from '../cores/blueprinit.js';
4
5
  import { Logger } from '../utils/logger.js';
5
6
  export default class BlueprinitCommand extends RuntimeCommand {
@@ -13,7 +14,7 @@ This hidden command is an experiment; its interface and generated files are not
13
14
  '<%= config.bin %> <%= command.id %> --yes',
14
15
  ];
15
16
  static flags = {
16
- llms: Flags.boolean({ ...llmsFlagConfig }),
17
+ llms: Flags.boolean(llmsFlagConfig),
17
18
  yes: Flags.boolean({
18
19
  char: 'y',
19
20
  description: 'Skip confirmation prompts',
@@ -27598,25 +27598,21 @@ function prettyBytes(number, options) {
27598
27598
  }
27599
27599
 
27600
27600
  const localeOptions = buildLocaleOptions(options);
27601
- let result;
27602
27601
 
27603
- if (number < 1) {
27604
- const numberString = toLocaleString(number, options.locale, localeOptions);
27605
- result = prefix + numberString + separator + UNITS[0];
27606
- } else {
27607
- const exponent = Math.min(Math.floor(options.binary ? log(number) / Math.log(1024) : log10(number) / 3), UNITS.length - 1);
27608
- number = divide(number, (options.binary ? 1024 : 1000) ** exponent);
27602
+ let exponent = 0;
27603
+ if (number >= 1) {
27604
+ exponent = Math.min(Math.floor(options.binary ? log(number) / Math.log(1024) : log10(number) / 3), UNITS.length - 1);
27605
+ }
27609
27606
 
27610
- if (!localeOptions) {
27611
- const minPrecision = Math.max(3, Math.floor(number).toString().length);
27612
- number = number.toPrecision(minPrecision);
27613
- }
27607
+ number = divide(number, (options.binary ? 1024 : 1000) ** exponent);
27614
27608
 
27615
- const numberString = toLocaleString(Number(number), options.locale, localeOptions);
27616
- const unit = UNITS[exponent];
27617
- result = prefix + numberString + separator + unit;
27609
+ if (!localeOptions) {
27610
+ const minPrecision = Math.max(3, Math.floor(number).toString().length);
27611
+ number = Number(number.toPrecision(minPrecision));
27618
27612
  }
27619
27613
 
27614
+ const numberString = toLocaleString(number, options.locale, localeOptions);
27615
+ const result = prefix + numberString + separator + UNITS[exponent];
27620
27616
  return applyFixedWidth(result, options.fixedWidth);
27621
27617
  }
27622
27618