@@ -19,7 +19,7 @@ import { getAgent } from '../lib/http-agent.js'
1919import  { 
2020  NETLIFY_CYAN , 
2121  USER_AGENT , 
22-   chalk , 
22+   ansis , 
2323  logAndThrowError , 
2424  exit , 
2525  getToken , 
@@ -28,7 +28,7 @@ import {
2828  normalizeConfig , 
2929  padLeft , 
3030  pollForToken , 
31-   sortOptions , 
31+   compareOptions , 
3232  warn , 
3333  logError , 
3434}  from  '../utils/command-helpers.js' 
@@ -107,7 +107,7 @@ async function selectWorkspace(project: Project, filter?: string): Promise<strin
107107
108108  if  ( ! selected )  { 
109109    log ( ) 
110-     log ( chalk . cyan ( `We've detected multiple sites inside your repository` ) ) 
110+     log ( ansis . cyan ( `We've detected multiple sites inside your repository` ) ) 
111111
112112    if  ( isCI )  { 
113113      throw  new  Error ( 
@@ -129,7 +129,7 @@ async function selectWorkspace(project: Project, filter?: string): Promise<strin
129129        ( project . workspace ?. packages  ||  [ ] ) 
130130          . filter ( ( pkg )  =>  pkg . path . includes ( input ) ) 
131131          . map ( ( pkg )  =>  ( { 
132-             name : `${ pkg . name  ? `${ chalk . bold ( pkg . name ) }   : '' } ${ pkg . path } ${ chalk . dim (  
132+             name : `${ pkg . name  ? `${ ansis . bold ( pkg . name ) }   : '' } ${ pkg . path } ${ ansis . dim (  
133133              `--filter ${ pkg . name  ||  pkg . path }  ,  
134134            ) }  `, 
135135            value : pkg . path , 
@@ -286,7 +286,7 @@ export default class BaseCommand extends Command {
286286
287287        if  ( description )  { 
288288          const  pad  =  termWidth  +  HELP_SEPARATOR_WIDTH 
289-           const  fullText  =  `${ bang } ${ term . padEnd ( pad  -  ( isCommand  ? 2  : 0 ) ) } ${ chalk . grey ( description ) }  
289+           const  fullText  =  `${ bang } ${ term . padEnd ( pad  -  ( isCommand  ? 2  : 0 ) ) } ${ ansis . gray ( description ) }  
290290          return  helper . wrap ( fullText ,  helpWidth  -  HELP_INDENT_WIDTH ,  pad ) 
291291        } 
292292
@@ -303,34 +303,34 @@ export default class BaseCommand extends Command {
303303
304304      // on the parent help command the version should be displayed 
305305      if  ( this . name ( )  ===  'netlify' )  { 
306-         output  =  [ ...output ,  chalk . bold ( 'VERSION' ) ,  formatHelpList ( [ formatItem ( USER_AGENT ) ] ) ,  '' ] 
306+         output  =  [ ...output ,  ansis . bold ( 'VERSION' ) ,  formatHelpList ( [ formatItem ( USER_AGENT ) ] ) ,  '' ] 
307307      } 
308308
309309      // Usage 
310-       output  =  [ ...output ,  chalk . bold ( 'USAGE' ) ,  helper . commandUsage ( command ) ,  '' ] 
310+       output  =  [ ...output ,  ansis . bold ( 'USAGE' ) ,  helper . commandUsage ( command ) ,  '' ] 
311311
312312      // Arguments 
313313      const  argumentList  =  helper 
314314        . visibleArguments ( command ) 
315315        . map ( ( argument )  =>  formatItem ( helper . argumentTerm ( argument ) ,  helper . argumentDescription ( argument ) ) ) 
316316      if  ( argumentList . length  !==  0 )  { 
317-         output  =  [ ...output ,  chalk . bold ( 'ARGUMENTS' ) ,  formatHelpList ( argumentList ) ,  '' ] 
317+         output  =  [ ...output ,  ansis . bold ( 'ARGUMENTS' ) ,  formatHelpList ( argumentList ) ,  '' ] 
318318      } 
319319
320320      if  ( command . #noBaseOptions ===  false )  { 
321321        // Options 
322322        const  optionList  =  helper 
323323          . visibleOptions ( command ) 
324-           . sort ( sortOptions ) 
324+           . sort ( compareOptions ) 
325325          . map ( ( option )  =>  formatItem ( helper . optionTerm ( option ) ,  helper . optionDescription ( option ) ) ) 
326326        if  ( optionList . length  !==  0 )  { 
327-           output  =  [ ...output ,  chalk . bold ( 'OPTIONS' ) ,  formatHelpList ( optionList ) ,  '' ] 
327+           output  =  [ ...output ,  ansis . bold ( 'OPTIONS' ) ,  formatHelpList ( optionList ) ,  '' ] 
328328        } 
329329      } 
330330
331331      // Description 
332332      if  ( commandDescription . length  !==  0 )  { 
333-         output  =  [ ...output ,  chalk . bold ( 'DESCRIPTION' ) ,  formatHelpList ( commandDescription ) ,  '' ] 
333+         output  =  [ ...output ,  ansis . bold ( 'DESCRIPTION' ) ,  formatHelpList ( commandDescription ) ,  '' ] 
334334      } 
335335
336336      // Aliases 
@@ -339,13 +339,13 @@ export default class BaseCommand extends Command {
339339      if  ( command . _aliases . length  !==  0 )  { 
340340        // @ts -expect-error TS(2551) FIXME: Property '_aliases' does not exist on type 'Comman... Remove this comment to see the full error message 
341341        const  aliases  =  command . _aliases . map ( ( alias )  =>  formatItem ( `${ parentCommand . name ( ) } ${ alias }  ,  null ,  true ) ) 
342-         output  =  [ ...output ,  chalk . bold ( 'ALIASES' ) ,  formatHelpList ( aliases ) ,  '' ] 
342+         output  =  [ ...output ,  ansis . bold ( 'ALIASES' ) ,  formatHelpList ( aliases ) ,  '' ] 
343343      } 
344344
345345      if  ( command . examples . length  !==  0 )  { 
346346        output  =  [ 
347347          ...output , 
348-           chalk . bold ( 'EXAMPLES' ) , 
348+           ansis . bold ( 'EXAMPLES' ) , 
349349          formatHelpList ( command . examples . map ( ( example )  =>  `${ HELP_$ } ${ example }  ) ) , 
350350          '' , 
351351        ] 
@@ -355,7 +355,7 @@ export default class BaseCommand extends Command {
355355        formatItem ( cmd . name ( ) ,  helper . subcommandDescription ( cmd ) . split ( '\n' ) [ 0 ] ,  true ) , 
356356      ) 
357357      if  ( commandList . length  !==  0 )  { 
358-         output  =  [ ...output ,  chalk . bold ( 'COMMANDS' ) ,  formatHelpList ( commandList ) ,  '' ] 
358+         output  =  [ ...output ,  ansis . bold ( 'COMMANDS' ) ,  formatHelpList ( commandList ) ,  '' ] 
359359      } 
360360
361361      return  [ ...output ,  '' ] . join ( '\n' ) 
@@ -450,11 +450,11 @@ export default class BaseCommand extends Command {
450450
451451    // Log success 
452452    log ( ) 
453-     log ( chalk . greenBright ( 'You are now logged into your Netlify account!' ) ) 
453+     log ( ansis . greenBright ( 'You are now logged into your Netlify account!' ) ) 
454454    log ( ) 
455-     log ( `Run ${ chalk . cyanBright ( 'netlify status' ) }  ) 
455+     log ( `Run ${ ansis . cyanBright ( 'netlify status' ) }  ) 
456456    log ( ) 
457-     log ( `To see all available commands run: ${ chalk . cyanBright ( 'netlify help' ) }  ) 
457+     log ( `To see all available commands run: ${ ansis . cyanBright ( 'netlify help' ) }  ) 
458458    log ( ) 
459459    return  accessToken 
460460  } 
0 commit comments