import chalk from 'chalk' ; const logger = console ; export function paddedLog ( message ) { const newMessage = message . split ( '\n' ) . map ( ( line ) => `    ${ line }` ) . join ( '\n' ) ; logger . log ( newMessage ) ; } export const commandLog = ( message ) => { process . stdout . write ( chalk . cyan ( ' • ' ) + message ) ; return ( errorMessage ? , errorInfo ? ) => { if ( errorMessage ) { process . stdout . write ( `. ${ chalk . red ( '✖' ) }\n` ) ; logger . error ( `\n     ${ chalk . red ( errorMessage ) }` ) ; if ( ! errorInfo ) { return ; } const newErrorInfo = errorInfo . split ( '\n' ) . map ( ( line ) => `     ${ chalk . dim ( line ) }` ) . join ( '\n' ) ; logger . error ( `${ newErrorInfo }\n` ) ; return ; } process . stdout . write ( `. ${ chalk . green ( '✓' ) }\n` ) ; } ; } ;