@@ -19,7 +19,7 @@ import { getAgent } from '../lib/http-agent.js'
1919import {
2020 NETLIFY_CYAN ,
2121 USER_AGENT ,
22- chalk ,
22+ picocolors ,
2323 error ,
2424 exit ,
2525 getToken ,
@@ -28,7 +28,7 @@ import {
2828 normalizeConfig ,
2929 padLeft ,
3030 pollForToken ,
31- sortOptions ,
31+ compareOptions ,
3232 warn ,
3333} from '../utils/command-helpers.js'
3434import { FeatureFlags } from '../utils/feature-flags.js'
@@ -106,7 +106,7 @@ async function selectWorkspace(project: Project, filter?: string): Promise<strin
106106
107107 if ( ! selected ) {
108108 log ( )
109- log ( chalk . cyan ( `We've detected multiple sites inside your repository` ) )
109+ log ( picocolors . cyan ( `We've detected multiple sites inside your repository` ) )
110110
111111 if ( isCI ) {
112112 throw new Error (
@@ -128,7 +128,7 @@ async function selectWorkspace(project: Project, filter?: string): Promise<strin
128128 ( project . workspace ?. packages || [ ] )
129129 . filter ( ( pkg ) => pkg . path . includes ( input ) )
130130 . map ( ( pkg ) => ( {
131- name : `${ pkg . name ? `${ chalk . bold ( pkg . name ) } ` : '' } ${ pkg . path } ${ chalk . dim (
131+ name : `${ pkg . name ? `${ picocolors . bold ( pkg . name ) } ` : '' } ${ pkg . path } ${ picocolors . dim (
132132 `--filter ${ pkg . name || pkg . path } ` ,
133133 ) } `,
134134 value : pkg . path ,
@@ -287,7 +287,7 @@ export default class BaseCommand extends Command {
287287
288288 if ( description ) {
289289 const pad = termWidth + HELP_SEPARATOR_WIDTH
290- const fullText = `${ bang } ${ term . padEnd ( pad - ( isCommand ? 2 : 0 ) ) } ${ chalk . grey ( description ) } `
290+ const fullText = `${ bang } ${ term . padEnd ( pad - ( isCommand ? 2 : 0 ) ) } ${ picocolors . gray ( description ) } `
291291 return helper . wrap ( fullText , helpWidth - HELP_INDENT_WIDTH , pad )
292292 }
293293
@@ -304,34 +304,34 @@ export default class BaseCommand extends Command {
304304
305305 // on the parent help command the version should be displayed
306306 if ( this . name ( ) === 'netlify' ) {
307- output = [ ...output , chalk . bold ( 'VERSION' ) , formatHelpList ( [ formatItem ( USER_AGENT ) ] ) , '' ]
307+ output = [ ...output , picocolors . bold ( 'VERSION' ) , formatHelpList ( [ formatItem ( USER_AGENT ) ] ) , '' ]
308308 }
309309
310310 // Usage
311- output = [ ...output , chalk . bold ( 'USAGE' ) , helper . commandUsage ( command ) , '' ]
311+ output = [ ...output , picocolors . bold ( 'USAGE' ) , helper . commandUsage ( command ) , '' ]
312312
313313 // Arguments
314314 const argumentList = helper
315315 . visibleArguments ( command )
316316 . map ( ( argument ) => formatItem ( helper . argumentTerm ( argument ) , helper . argumentDescription ( argument ) ) )
317317 if ( argumentList . length !== 0 ) {
318- output = [ ...output , chalk . bold ( 'ARGUMENTS' ) , formatHelpList ( argumentList ) , '' ]
318+ output = [ ...output , picocolors . bold ( 'ARGUMENTS' ) , formatHelpList ( argumentList ) , '' ]
319319 }
320320
321321 if ( command . #noBaseOptions === false ) {
322322 // Options
323323 const optionList = helper
324324 . visibleOptions ( command )
325- . sort ( sortOptions )
325+ . sort ( compareOptions )
326326 . map ( ( option ) => formatItem ( helper . optionTerm ( option ) , helper . optionDescription ( option ) ) )
327327 if ( optionList . length !== 0 ) {
328- output = [ ...output , chalk . bold ( 'OPTIONS' ) , formatHelpList ( optionList ) , '' ]
328+ output = [ ...output , picocolors . bold ( 'OPTIONS' ) , formatHelpList ( optionList ) , '' ]
329329 }
330330 }
331331
332332 // Description
333333 if ( commandDescription . length !== 0 ) {
334- output = [ ...output , chalk . bold ( 'DESCRIPTION' ) , formatHelpList ( commandDescription ) , '' ]
334+ output = [ ...output , picocolors . bold ( 'DESCRIPTION' ) , formatHelpList ( commandDescription ) , '' ]
335335 }
336336
337337 // Aliases
@@ -340,13 +340,13 @@ export default class BaseCommand extends Command {
340340 if ( command . _aliases . length !== 0 ) {
341341 // @ts -expect-error TS(2551) FIXME: Property '_aliases' does not exist on type 'Comman... Remove this comment to see the full error message
342342 const aliases = command . _aliases . map ( ( alias ) => formatItem ( `${ parentCommand . name ( ) } ${ alias } ` , null , true ) )
343- output = [ ...output , chalk . bold ( 'ALIASES' ) , formatHelpList ( aliases ) , '' ]
343+ output = [ ...output , picocolors . bold ( 'ALIASES' ) , formatHelpList ( aliases ) , '' ]
344344 }
345345
346346 if ( command . examples . length !== 0 ) {
347347 output = [
348348 ...output ,
349- chalk . bold ( 'EXAMPLES' ) ,
349+ picocolors . bold ( 'EXAMPLES' ) ,
350350 formatHelpList ( command . examples . map ( ( example ) => `${ HELP_$ } ${ example } ` ) ) ,
351351 '' ,
352352 ]
@@ -356,7 +356,7 @@ export default class BaseCommand extends Command {
356356 formatItem ( cmd . name ( ) , helper . subcommandDescription ( cmd ) . split ( '\n' ) [ 0 ] , true ) ,
357357 )
358358 if ( commandList . length !== 0 ) {
359- output = [ ...output , chalk . bold ( 'COMMANDS' ) , formatHelpList ( commandList ) , '' ]
359+ output = [ ...output , picocolors . bold ( 'COMMANDS' ) , formatHelpList ( commandList ) , '' ]
360360 }
361361
362362 return [ ...output , '' ] . join ( '\n' )
@@ -410,7 +410,6 @@ export default class BaseCommand extends Command {
410410 const authLink = `${ webUI } /authorize?response_type=ticket&ticket=${ ticket . id } `
411411
412412 log ( `Opening ${ authLink } ` )
413- // @ts -expect-error TS(2345) FIXME: Argument of type '{ url: string; }' is not assigna... Remove this comment to see the full error message
414413 await openBrowser ( { url : authLink } )
415414
416415 const accessToken = await pollForToken ( {
@@ -448,11 +447,11 @@ export default class BaseCommand extends Command {
448447
449448 // Log success
450449 log ( )
451- log ( `${ chalk . greenBright ( 'You are now logged into your Netlify account!' ) } ` )
450+ log ( `${ picocolors . greenBright ( 'You are now logged into your Netlify account!' ) } ` )
452451 log ( )
453- log ( `Run ${ chalk . cyanBright ( 'netlify status' ) } for account details` )
452+ log ( `Run ${ picocolors . cyanBright ( 'netlify status' ) } for account details` )
454453 log ( )
455- log ( `To see all available commands run: ${ chalk . cyanBright ( 'netlify help' ) } ` )
454+ log ( `To see all available commands run: ${ picocolors . cyanBright ( 'netlify help' ) } ` )
456455 log ( )
457456 return accessToken
458457 }
0 commit comments