1- import chalk from 'chalk ' ;
1+ import { getChalk } from '@contentstack/cli-utilities ' ;
22import * as csv from 'fast-csv' ;
33import { copy } from 'fs-extra' ;
44import { v4 as uuid } from 'uuid' ;
@@ -55,7 +55,7 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
5555 minWidth : 7 ,
5656 header : 'Fix Status' ,
5757 get : ( row : any ) => {
58- return row . fixStatus === 'Fixed' ? chalk . greenBright ( row . fixStatus ) : chalk . redBright ( row . fixStatus ) ;
58+ return row . fixStatus === 'Fixed' ? getChalk ( ) . greenBright ( row . fixStatus ) : getChalk ( ) . redBright ( row . fixStatus ) ;
5959 } ,
6060 } ,
6161 } ;
@@ -548,7 +548,7 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
548548 value : 'missingRefs' ,
549549 alias : 'Missing references' ,
550550 formatter : ( cellValue : any ) => {
551- return chalk . red ( typeof cellValue === 'object' ? JSON . stringify ( cellValue ) : cellValue ) ;
551+ return getChalk ( ) . red ( typeof cellValue === 'object' ? JSON . stringify ( cellValue ) : cellValue ) ;
552552 } ,
553553 } ,
554554 {
@@ -588,7 +588,7 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
588588 value : key ,
589589 formatter : ( cellValue : any ) => {
590590 if ( key === 'fixStatus' || key === 'Fixable' || key === 'Fixed' ) {
591- return chalk . green ( typeof cellValue === 'object' ? JSON . stringify ( cellValue ) : cellValue ) ;
591+ return getChalk ( ) . green ( typeof cellValue === 'object' ? JSON . stringify ( cellValue ) : cellValue ) ;
592592 } else if (
593593 key === 'content_types' ||
594594 key === 'branches' ||
@@ -598,9 +598,9 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
598598 key === 'Non-Fixable' ||
599599 key === 'Not-Fixed'
600600 ) {
601- return chalk . red ( typeof cellValue === 'object' ? JSON . stringify ( cellValue ) : cellValue ) ;
601+ return getChalk ( ) . red ( typeof cellValue === 'object' ? JSON . stringify ( cellValue ) : cellValue ) ;
602602 } else {
603- return chalk . white ( typeof cellValue === 'object' ? JSON . stringify ( cellValue ) : cellValue ) ;
603+ return getChalk ( ) . white ( typeof cellValue === 'object' ? JSON . stringify ( cellValue ) : cellValue ) ;
604604 }
605605 } ,
606606 } ) ) ;
0 commit comments