UNPKG

@ks-opdev/cli

Version:

ksodev: A CLI based on the WPS Open Platform

1 lines 2.6 kB
function a5_0x1f77(){const _0x32ab61=['1177aFhZbQ','156455pnXkAN','8lvGiaS','1881505lEkChe','30NaxQpv','361623XnZgyK','49580WQhrJL','isFinite','trunc','40IWfrPw','SIGINT','exit','553742CTpfrg','log','44iYpNjd','603963VFndFz','unhandledRejection','trim','48822oCDfqK','env','WORK_DIR_NAME','randomUUID','240QRNKTu','error','SIGTERM','uncaughtException'];a5_0x1f77=function(){return _0x32ab61;};return a5_0x1f77();}(function(_0xeb0d85,_0x40b3ce){const _0x1005a7=a5_0x4769,_0xd66176=_0xeb0d85();while(!![]){try{const _0x18f559=parseInt(_0x1005a7(0x1ea))/0x1+parseInt(_0x1005a7(0x1d9))/0x2*(-parseInt(_0x1005a7(0x1dd))/0x3)+parseInt(_0x1005a7(0x1e7))/0x4*(parseInt(_0x1005a7(0x1e8))/0x5)+-parseInt(_0x1005a7(0x1e9))/0x6*(parseInt(_0x1005a7(0x1d7))/0x7)+-parseInt(_0x1005a7(0x1ee))/0x8*(-parseInt(_0x1005a7(0x1da))/0x9)+-parseInt(_0x1005a7(0x1eb))/0xa*(parseInt(_0x1005a7(0x1e5))/0xb)+-parseInt(_0x1005a7(0x1e1))/0xc*(-parseInt(_0x1005a7(0x1e6))/0xd);if(_0x18f559===_0x40b3ce)break;else _0xd66176['push'](_0xd66176['shift']());}catch(_0x2e20aa){_0xd66176['push'](_0xd66176['shift']());}}}(a5_0x1f77,0x6337c));import{homedir}from'node:os';import{join}from'node:path';function a5_0x4769(_0x20b9bf,_0x100aed){const _0x1f77fd=a5_0x1f77();return a5_0x4769=function(_0x476959,_0x1b01e4){_0x476959=_0x476959-0x1d6;let _0x31a7ea=_0x1f77fd[_0x476959];return _0x31a7ea;},a5_0x4769(_0x20b9bf,_0x100aed);}import a5_0x4de36d from'node:crypto';import{ENV_VERBOSE,LOG_SUFFIX,DEFAULT_CONFIG}from'../../lib/config/constants.js';import{CleanLogFile,NewLoggerWithLevel}from'../../lib/log/logger.js';const hook=async function(){const _0x33c2f9=a5_0x4769,_0x2d9598=0x3;let _0x5ce29d=_0x2d9598;const _0x1d5638=process[_0x33c2f9(0x1de)][ENV_VERBOSE];if(_0x1d5638&&_0x1d5638[_0x33c2f9(0x1dc)]()!==''){const _0x5a9407=Number(_0x1d5638);if(Number[_0x33c2f9(0x1ec)](_0x5a9407))_0x5ce29d=Math[_0x33c2f9(0x1ed)](_0x5a9407);}const _0x3613c7=a5_0x4de36d[_0x33c2f9(0x1e0)](),_0x2f7cc7=join(homedir(),DEFAULT_CONFIG[_0x33c2f9(0x1df)],_0x33c2f9(0x1d8),''+_0x3613c7+LOG_SUFFIX);NewLoggerWithLevel(_0x5ce29d,_0x2f7cc7);const _0x11fedc=()=>{try{CleanLogFile();}finally{process['exit']();}};process['on'](_0x33c2f9(0x1d6),()=>{try{CleanLogFile();}catch{}}),process['on'](_0x33c2f9(0x1ef),_0x11fedc),process['on'](_0x33c2f9(0x1e3),_0x11fedc),process['on'](_0x33c2f9(0x1e4),_0x45435e=>{const _0x22bd3b=_0x33c2f9;console[_0x22bd3b(0x1e2)](_0x22bd3b(0x1e4),_0x45435e),_0x11fedc();}),process['on'](_0x33c2f9(0x1db),_0x11a790=>{const _0x2c3ecf=_0x33c2f9;console[_0x2c3ecf(0x1e2)](_0x2c3ecf(0x1db),_0x11a790),_0x11fedc();});};export default hook;