@@ -18,60 +18,49 @@ export const execCommand = async (
1818 return res ?. stdout ?. trim ( ) || "" ;
1919} ;
2020
21- export class PrettyError extends Error {
22- constructor ( message : string ) {
23- super ( message ) ;
24- this . name = this . constructor . name ;
25-
26- if ( typeof Error . captureStackTrace === "function" )
27- Error . captureStackTrace ( this , this . constructor ) ;
28- else this . stack = new Error ( message ) . stack ;
29- }
30- }
31-
3221export function handleError ( error : unknown ) {
33- if ( error instanceof PrettyError ) printError ( error ) ;
22+ error && printError ( error ) ;
3423 process . exitCode = 1 ;
3524}
3625
3726export const loggerInfo = ( content : string ) => {
3827 if ( ACTIVATION ) {
39- console . log ( green ( `[CG INFO]: ` ) , `${ content } ` ) ;
28+ console . log ( green ( `[CODEG]: ` ) , `${ content } ` ) ;
4029 }
4130} ;
4231
4332export const loggerWarring = ( content : string | unknown ) => {
4433 if ( ACTIVATION ) {
45- console . log ( lightYellow ( `[CG WARRING]: ` ) , `${ content } ` ) ;
34+ console . log ( lightYellow ( `[CODEG]: ` ) , `${ content } ` ) ;
4635 }
4736} ;
4837
4938export const loggerSuccess = ( content : string ) => {
5039 if ( ACTIVATION ) {
51- console . log ( lightGreen ( `[CG SUCCESS]: ` ) , `${ content } ` ) ;
40+ console . log ( lightGreen ( `[CODEG]: ` ) , `${ content } ` ) ;
5241 }
5342} ;
5443
5544export const loggerError = ( content : string | unknown ) => {
5645 if ( ACTIVATION ) {
57- console . log ( lightRed ( `[CG ERROR]: ` ) , `${ content } ` ) ;
46+ console . log ( lightRed ( `[CODEG]: ` ) , `${ content } ` ) ;
5847 }
5948} ;
6049
6150export const printInfo = ( content : string ) => {
62- console . log ( green ( `[CG INFO]: ` ) , `${ content } ` ) ;
51+ console . log ( green ( `[CODEG]: ` ) , `${ content } ` ) ;
6352} ;
6453
6554export const printWarring = ( content : string ) => {
66- console . log ( lightYellow ( `[CG WARRING ]:` ) , `${ content } ` ) ;
55+ console . log ( lightYellow ( `[CODEG ]:` ) , `${ content } ` ) ;
6756} ;
6857
6958export const printSuccess = ( content : string ) => {
70- console . log ( lightGreen ( `[CG SUCCESS]: ` ) , `${ content } ` ) ;
59+ console . log ( lightGreen ( `[CODEG]: ` ) , `${ content } ` ) ;
7160} ;
7261
7362export const printError = ( content : string | unknown ) => {
74- console . log ( lightRed ( `[CG ERROR]: ` ) , `${ content } ` ) ;
63+ console . log ( lightRed ( `[CODEG]: ` ) , `${ content } ` ) ;
7564} ;
7665
7766/**
0 commit comments