{"version":3,"names":["SEPARATOR","verbose","disabled","hidden","formatMessages","messages","chalk","reset","join","success","console","log","green","bold","info","cyan","warn","yellow","error","red","debug","gray","setVerbose","level","isVerbose","disable","enable","hasDebugMessages"],"sources":["../src/logger.ts"],"sourcesContent":["import chalk from 'chalk';\n\nconst SEPARATOR = ', ';\n\nlet verbose = false;\nlet disabled = false;\nlet hidden = false;\n\nconst formatMessages = (messages: Array) =>\n chalk.reset(messages.join(SEPARATOR));\n\nconst success = (...messages: Array) => {\n if (!disabled) {\n console.log(`${chalk.green.bold('success')} ${formatMessages(messages)}`);\n }\n};\n\nconst info = (...messages: Array) => {\n if (!disabled) {\n console.log(`${chalk.cyan.bold('info')} ${formatMessages(messages)}`);\n }\n};\n\nconst warn = (...messages: Array) => {\n if (!disabled) {\n console.warn(`${chalk.yellow.bold('warn')} ${formatMessages(messages)}`);\n }\n};\n\nconst error = (...messages: Array) => {\n if (!disabled) {\n console.error(`${chalk.red.bold('error')} ${formatMessages(messages)}`);\n }\n};\n\nconst debug = (...messages: Array) => {\n if (verbose && !disabled) {\n console.log(`${chalk.gray.bold('debug')} ${formatMessages(messages)}`);\n } else {\n hidden = true;\n }\n};\n\nconst log = (...messages: Array) => {\n if (!disabled) {\n console.log(`${formatMessages(messages)}`);\n }\n};\n\nconst setVerbose = (level: boolean) => {\n verbose = level;\n};\n\nconst isVerbose = () => verbose;\n\nconst disable = () => {\n disabled = true;\n};\n\nconst enable = () => {\n disabled = false;\n};\n\nconst hasDebugMessages = () => hidden;\n\nexport default {\n success,\n info,\n warn,\n error,\n debug,\n log,\n setVerbose,\n isVerbose,\n hasDebugMessages,\n disable,\n enable,\n};\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA0B;AAE1B,MAAMA,SAAS,GAAG,IAAI;AAEtB,IAAIC,OAAO,GAAG,KAAK;AACnB,IAAIC,QAAQ,GAAG,KAAK;AACpB,IAAIC,MAAM,GAAG,KAAK;AAElB,MAAM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