@@ -7,6 +7,7 @@ import { logger } from '@socketsecurity/registry/lib/logger'
77import { hasOwn , toSortedObject } from '@socketsecurity/registry/lib/objects'
88import { normalizePath } from '@socketsecurity/registry/lib/path'
99import { naturalCompare } from '@socketsecurity/registry/lib/sorts'
10+ import { Spinner } from '@socketsecurity/registry/lib/spinner'
1011import {
1112 indentString ,
1213 trimNewlines ,
@@ -24,7 +25,7 @@ import { commonFlags } from '../flags.mts'
2425import { getVisibleTokenPrefix } from './sdk.mts'
2526import { tildify } from './tildify.mts'
2627
27- import type { MeowFlags } from '../flags.mts'
28+ import type { MeowFlag , MeowFlags } from '../flags.mts'
2829import type { Options , Result } from 'meow'
2930
3031export interface CliAlias {
@@ -300,8 +301,14 @@ export async function meowWithSubcommands(
300301 booleanDefault : undefined ,
301302 } )
302303
304+ const noSpinner = cli1 . flags [ 'spinner' ] === false
303305 const orgFlag = String ( cli1 . flags [ 'org' ] || '' ) || undefined
304306
307+ // Use CI spinner style when --no-spinner is passed.
308+ if ( noSpinner ) {
309+ constants . spinner . spinner = Spinner . spinners [ 'ci' ] !
310+ }
311+
305312 // Hard override the config if instructed to do so.
306313 // The env var overrides the --flag, which overrides the persisted config
307314 // Also, when either of these are used, config updates won't persist.
@@ -501,7 +508,17 @@ export async function meowWithSubcommands(
501508 lines . push ( '' )
502509 }
503510 lines . push (
504- ` ${ getFlagListOutput ( flags , { indent : HELP_INDENT , padName : HELP_PAD_NAME } ) } ` ,
511+ ` ${ getFlagListOutput (
512+ {
513+ ...flags ,
514+ // Explicitly document the negated --no-spinner variant.
515+ noSpinner : {
516+ ...flags [ 'spinner' ] ,
517+ hidden : false ,
518+ } as MeowFlag ,
519+ } ,
520+ { indent : HELP_INDENT , padName : HELP_PAD_NAME } ,
521+ ) } `,
505522 )
506523 if ( isRootCommand ) {
507524 lines . push (
@@ -604,6 +621,13 @@ export function meowOrExit({
604621 importMeta,
605622 } )
606623
624+ const noSpinner = cli . flags [ 'spinner' ] === false
625+
626+ // Use CI spinner style when --no-spinner is passed.
627+ if ( noSpinner ) {
628+ constants . spinner . spinner = Spinner . spinners [ 'ci' ] !
629+ }
630+
607631 if ( ! shouldSuppressBanner ( cli . flags ) ) {
608632 const orgFlag = String ( cli . flags [ 'org' ] || '' ) . trim ( ) || undefined
609633 emitBanner ( command , orgFlag )
0 commit comments