@@ -6,10 +6,12 @@ import { inspect } from "node:util";
66
77// Import Third-party Dependencies
88import * as rc from "@nodesecure/rc" ;
9- import kleur from "kleur" ;
109
1110// Import Internal Dependencies
1211import { store } from "../../src/localStorage.ts" ;
12+ import * as utils from "../../src/utils/index.ts" ;
13+
14+ const { formatter } = utils ;
1315
1416import { fetchPackagesAndRepositoriesData } from "../../src/analysis/fetch.ts" ;
1517import * as CONSTANTS from "../../src/constants.ts" ;
@@ -29,7 +31,7 @@ export async function execute(options: ExecuteOptions = {}) {
2931 const { debug : debugMode } = options ;
3032
3133 if ( debugMode ) {
32- console . log ( kleur . bgMagenta ( ) . bold ( " > Debug mode enabled \n" ) ) ;
34+ console . log ( formatter . bgMagenta . bold ( " > Debug mode enabled \n" ) ) ;
3335 }
3436
3537 const [ configResult ] = await Promise . all ( [
@@ -47,8 +49,8 @@ export async function execute(options: ExecuteOptions = {}) {
4749 throw new Error ( "At least one reporter must be selected (either 'HTML' or 'PDF')" ) ;
4850 }
4951
50- console . log ( `>> title: ${ kleur . cyan ( ) . bold ( report . title ) } ` ) ;
51- console . log ( `>> reporters: ${ kleur . magenta ( ) . bold ( report . reporters . join ( "," ) ) } \n` ) ;
52+ console . log ( `>> title: ${ formatter . cyan . bold ( report . title ) } ` ) ;
53+ console . log ( `>> reporters: ${ formatter . magenta . bold ( report . reporters . join ( "," ) ) } \n` ) ;
5254
5355 store . run ( config , async ( ) => {
5456 try {
@@ -57,7 +59,7 @@ export async function execute(options: ExecuteOptions = {}) {
5759 debug ( data ) ;
5860 }
5961 await reporting . proceed ( data ) ;
60- console . log ( kleur . green ( ) . bold ( "\n>> Security report successfully generated! Enjoy 🚀.\n" ) ) ;
62+ console . log ( formatter . green . bold ( "\n>> Security report successfully generated! Enjoy 🚀.\n" ) ) ;
6163 }
6264 catch ( error ) {
6365 console . error ( error ) ;
0 commit comments