@@ -19,7 +19,7 @@ import { getAgent } from '../lib/http-agent.js'
19
19
import {
20
20
NETLIFY_CYAN ,
21
21
USER_AGENT ,
22
- chalk ,
22
+ picocolors ,
23
23
error ,
24
24
exit ,
25
25
getToken ,
@@ -28,7 +28,7 @@ import {
28
28
normalizeConfig ,
29
29
padLeft ,
30
30
pollForToken ,
31
- sortOptions ,
31
+ compareOptions ,
32
32
warn ,
33
33
} from '../utils/command-helpers.js'
34
34
import { FeatureFlags } from '../utils/feature-flags.js'
@@ -106,7 +106,7 @@ async function selectWorkspace(project: Project, filter?: string): Promise<strin
106
106
107
107
if ( ! selected ) {
108
108
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` ) )
110
110
111
111
if ( isCI ) {
112
112
throw new Error (
@@ -128,7 +128,7 @@ async function selectWorkspace(project: Project, filter?: string): Promise<strin
128
128
( project . workspace ?. packages || [ ] )
129
129
. filter ( ( pkg ) => pkg . path . includes ( input ) )
130
130
. 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 (
132
132
`--filter ${ pkg . name || pkg . path } ` ,
133
133
) } `,
134
134
value : pkg . path ,
@@ -287,7 +287,7 @@ export default class BaseCommand extends Command {
287
287
288
288
if ( description ) {
289
289
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 ) } `
291
291
return helper . wrap ( fullText , helpWidth - HELP_INDENT_WIDTH , pad )
292
292
}
293
293
@@ -304,34 +304,34 @@ export default class BaseCommand extends Command {
304
304
305
305
// on the parent help command the version should be displayed
306
306
if ( this . name ( ) === 'netlify' ) {
307
- output = [ ...output , chalk . bold ( 'VERSION' ) , formatHelpList ( [ formatItem ( USER_AGENT ) ] ) , '' ]
307
+ output = [ ...output , picocolors . bold ( 'VERSION' ) , formatHelpList ( [ formatItem ( USER_AGENT ) ] ) , '' ]
308
308
}
309
309
310
310
// Usage
311
- output = [ ...output , chalk . bold ( 'USAGE' ) , helper . commandUsage ( command ) , '' ]
311
+ output = [ ...output , picocolors . bold ( 'USAGE' ) , helper . commandUsage ( command ) , '' ]
312
312
313
313
// Arguments
314
314
const argumentList = helper
315
315
. visibleArguments ( command )
316
316
. map ( ( argument ) => formatItem ( helper . argumentTerm ( argument ) , helper . argumentDescription ( argument ) ) )
317
317
if ( argumentList . length !== 0 ) {
318
- output = [ ...output , chalk . bold ( 'ARGUMENTS' ) , formatHelpList ( argumentList ) , '' ]
318
+ output = [ ...output , picocolors . bold ( 'ARGUMENTS' ) , formatHelpList ( argumentList ) , '' ]
319
319
}
320
320
321
321
if ( command . #noBaseOptions === false ) {
322
322
// Options
323
323
const optionList = helper
324
324
. visibleOptions ( command )
325
- . sort ( sortOptions )
325
+ . sort ( compareOptions )
326
326
. map ( ( option ) => formatItem ( helper . optionTerm ( option ) , helper . optionDescription ( option ) ) )
327
327
if ( optionList . length !== 0 ) {
328
- output = [ ...output , chalk . bold ( 'OPTIONS' ) , formatHelpList ( optionList ) , '' ]
328
+ output = [ ...output , picocolors . bold ( 'OPTIONS' ) , formatHelpList ( optionList ) , '' ]
329
329
}
330
330
}
331
331
332
332
// Description
333
333
if ( commandDescription . length !== 0 ) {
334
- output = [ ...output , chalk . bold ( 'DESCRIPTION' ) , formatHelpList ( commandDescription ) , '' ]
334
+ output = [ ...output , picocolors . bold ( 'DESCRIPTION' ) , formatHelpList ( commandDescription ) , '' ]
335
335
}
336
336
337
337
// Aliases
@@ -340,13 +340,13 @@ export default class BaseCommand extends Command {
340
340
if ( command . _aliases . length !== 0 ) {
341
341
// @ts -expect-error TS(2551) FIXME: Property '_aliases' does not exist on type 'Comman... Remove this comment to see the full error message
342
342
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 ) , '' ]
344
344
}
345
345
346
346
if ( command . examples . length !== 0 ) {
347
347
output = [
348
348
...output ,
349
- chalk . bold ( 'EXAMPLES' ) ,
349
+ picocolors . bold ( 'EXAMPLES' ) ,
350
350
formatHelpList ( command . examples . map ( ( example ) => `${ HELP_$ } ${ example } ` ) ) ,
351
351
'' ,
352
352
]
@@ -356,7 +356,7 @@ export default class BaseCommand extends Command {
356
356
formatItem ( cmd . name ( ) , helper . subcommandDescription ( cmd ) . split ( '\n' ) [ 0 ] , true ) ,
357
357
)
358
358
if ( commandList . length !== 0 ) {
359
- output = [ ...output , chalk . bold ( 'COMMANDS' ) , formatHelpList ( commandList ) , '' ]
359
+ output = [ ...output , picocolors . bold ( 'COMMANDS' ) , formatHelpList ( commandList ) , '' ]
360
360
}
361
361
362
362
return [ ...output , '' ] . join ( '\n' )
@@ -410,7 +410,6 @@ export default class BaseCommand extends Command {
410
410
const authLink = `${ webUI } /authorize?response_type=ticket&ticket=${ ticket . id } `
411
411
412
412
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
414
413
await openBrowser ( { url : authLink } )
415
414
416
415
const accessToken = await pollForToken ( {
@@ -448,11 +447,11 @@ export default class BaseCommand extends Command {
448
447
449
448
// Log success
450
449
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!' ) } ` )
452
451
log ( )
453
- log ( `Run ${ chalk . cyanBright ( 'netlify status' ) } for account details` )
452
+ log ( `Run ${ picocolors . cyanBright ( 'netlify status' ) } for account details` )
454
453
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' ) } ` )
456
455
log ( )
457
456
return accessToken
458
457
}
0 commit comments