turbodepot-node
Version:
General purpose multi storage library (ORM, Logs, Users, Files, Objects)
1 lines • 1.23 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConsoleManager=void 0;var ConsoleManager=function(){function o(){this.colorTitle="[36m%s[0m",this.colorSuccess="[32m%s[0m",this.colorWarning="[33m%s[0m",this.colorError="[31m%s[0m"}return o.prototype.text=function(o){console.log(o)},o.prototype.title=function(o){console.log(this.colorTitle,o)},o.prototype.success=function(o,r){void 0===r&&(r=!1),console.log(this.colorSuccess,o),r&&process.exit(0)},o.prototype.warning=function(o,r){void 0===r&&(r=!1),console.log(this.colorWarning,o),r&&process.exit(1)},o.prototype.warnings=function(o,r){if(void 0===r&&(r=!1),o.length>0){for(var e=0,t=o;e<t.length;e++){var s=t[e];console.log(this.colorWarning,s)}r&&process.exit(1)}},o.prototype.error=function(o,r){void 0===r&&(r=!0),console.log(this.colorError,o),r&&process.exit(1)},o.prototype.errors=function(o,r){if(void 0===r&&(r=!0),o.length>0){for(var e=0,t=o;e<t.length;e++){var s=t[e];console.log(this.colorError,s)}r&&process.exit(1)}},o.prototype.waitForKeyPress=function(){var o="pause";"win32"!==process.platform&&(o="read"),require("child_process").spawnSync(o+" _ ",{shell:!0,stdio:[0,1,2]})},o}();exports.ConsoleManager=ConsoleManager;