import chalk from "chalk" ; import { captureException } from "./sentry" ; const prefixes = { cliInfo : `${ chalk . blueBright ( "info" ) } ${ chalk . green ( "plasmic-cli" ) }` , cliError : `${ chalk . red ( "error" ) } ${ chalk . green ( "plasmic-cli" ) }` , info : `${ chalk . blueBright ( "info" ) } ${ chalk . green ( "plasmic-loader" ) }` , warn : `${ chalk . yellow ( "warn" ) } ${ chalk . green ( "plasmic-loader" ) }` , error : `${ chalk . red ( "error" ) } ${ chalk . green ( "plasmic-loader" ) }` , } ; export function cliInfo ( message ) { console . log ( `${ prefixes . cliInfo } - ${ message }` ) ; } export function cliError ( message ) { console . log ( `${ prefixes . cliError } - ${ message }` ) ; } export function info ( message ) { console . log ( `${ prefixes . info } - ${ message }` ) ; } export function warn ( message ) { console . warn ( `${ prefixes . warn } - ${ message }` ) ; } export function error ( message ) { console . error ( `${ prefixes . error } - ${ message }` ) ; } export function crash ( message , err ? ) { error ( message ) ; if ( err ) { console . error ( err ) ; captureException ( err ) . then ( ( ) => process . exit ( 1 ) ) ; return ; } process . exit ( 1 ) ; }