@@ -5,9 +5,10 @@ import { v4 as uuid } from 'uuid';
5
5
import isEmpty from 'lodash/isEmpty' ;
6
6
import { join , resolve } from 'path' ;
7
7
import cloneDeep from 'lodash/cloneDeep' ;
8
- import { cliux , sanitizePath , TableFlags , TableHeader , log } from '@contentstack/cli-utilities' ;
8
+ import { cliux , sanitizePath , TableFlags , TableHeader } from '@contentstack/cli-utilities' ;
9
9
import { createWriteStream , existsSync , mkdirSync , readFileSync , writeFileSync , rmSync } from 'fs' ;
10
10
import config from './config' ;
11
+ import { print } from './util/log' ;
11
12
import { auditMsg } from './messages' ;
12
13
import { BaseCommand } from './base-command' ;
13
14
import {
@@ -186,7 +187,13 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
186
187
187
188
let dataModuleWise : Record < string , any > = await new ModuleDataReader ( cloneDeep ( constructorParam ) ) . run ( ) ;
188
189
for ( const module of this . sharedConfig . flags . modules || this . sharedConfig . modules ) {
189
- log . info ( this . $t ( this . messages . AUDIT_START_SPINNER , { module } ) ) ;
190
+ print ( [
191
+ {
192
+ bold : true ,
193
+ color : 'whiteBright' ,
194
+ message : this . $t ( this . messages . AUDIT_START_SPINNER , { module } ) ,
195
+ } ,
196
+ ] ) ;
190
197
191
198
constructorParam [ 'moduleName' ] = module ;
192
199
@@ -262,7 +269,18 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
262
269
break ;
263
270
}
264
271
265
- log . info ( `${ this . $t ( this . messages . AUDIT_START_SPINNER , { module } ) } done` ) ;
272
+ print ( [
273
+ {
274
+ bold : true ,
275
+ color : 'whiteBright' ,
276
+ message : this . $t ( this . messages . AUDIT_START_SPINNER , { module } ) ,
277
+ } ,
278
+ {
279
+ bold : true ,
280
+ message : ' done' ,
281
+ color : 'whiteBright' ,
282
+ } ,
283
+ ] ) ;
266
284
}
267
285
268
286
this . prepareReport ( 'Summary' , this . summaryDataToPrint ) ;
@@ -361,7 +379,13 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
361
379
this . log ( '' ) ; // NOTE adding new line
362
380
for ( const { module, missingRefs } of allMissingRefs ) {
363
381
if ( ! isEmpty ( missingRefs ) ) {
364
- log . info ( ` ${ module } ` ) ;
382
+ print ( [
383
+ {
384
+ bold : true ,
385
+ color : 'cyan' ,
386
+ message : ` ${ module } ` ,
387
+ } ,
388
+ ] ) ;
365
389
const tableValues = Object . values ( missingRefs ) . flat ( ) ;
366
390
367
391
const tableHeaders : TableHeader [ ] = [
@@ -417,8 +441,8 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
417
441
continue ;
418
442
}
419
443
420
- log . info ( ` ${ module } ` ) ;
421
-
444
+ print ( [ { bold : true , color : 'cyan' , message : ` ${ module } ` } ] ) ;
445
+
422
446
const tableValues = Object . values ( missingRefs ) . flat ( ) ;
423
447
missingRefs = Object . values ( missingRefs ) . flat ( ) ;
424
448
const tableKeys = Object . keys ( missingRefs [ 0 ] ) ;
0 commit comments