UNPKG

ks-opdev-cli

Version:

ksodev: A CLI based on the WPS Open Platform

1 lines 2.47 kB
(function(_0x228223,_0x2eed4e){const _0x212eba=a5_0x28ca,_0x17e89b=_0x228223();while(!![]){try{const _0x5ca3db=-parseInt(_0x212eba(0x197))/0x1*(parseInt(_0x212eba(0x194))/0x2)+parseInt(_0x212eba(0x1a2))/0x3+-parseInt(_0x212eba(0x19a))/0x4+-parseInt(_0x212eba(0x19f))/0x5+parseInt(_0x212eba(0x1a6))/0x6+parseInt(_0x212eba(0x1a4))/0x7*(parseInt(_0x212eba(0x19c))/0x8)+-parseInt(_0x212eba(0x196))/0x9*(-parseInt(_0x212eba(0x193))/0xa);if(_0x5ca3db===_0x2eed4e)break;else _0x17e89b['push'](_0x17e89b['shift']());}catch(_0x42b9ab){_0x17e89b['push'](_0x17e89b['shift']());}}}(a5_0x4165,0x63096));import{homedir}from'node:os';function a5_0x4165(){const _0x17bf8a=['trunc','uncaughtException','359892cimywo','isFinite','6462104yVMfij','log','randomUUID','2422950pCImsp','trim','SIGTERM','353718GoZNzf','SIGINT','7NvArNd','error','4190280pTTHPJ','WORK_DIR_NAME','445430mbeKNi','38xVHaUl','exit','27VFIBat','40919trHtFQ'];a5_0x4165=function(){return _0x17bf8a;};return a5_0x4165();}import{join}from'node:path';function a5_0x28ca(_0x3510cd,_0x3244ff){const _0x416593=a5_0x4165();return a5_0x28ca=function(_0x28ca2a,_0x401f1b){_0x28ca2a=_0x28ca2a-0x193;let _0x33d7ef=_0x416593[_0x28ca2a];return _0x33d7ef;},a5_0x28ca(_0x3510cd,_0x3244ff);}import a5_0x3fa99b 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 _0x31d15c=a5_0x28ca,_0xc0bacd=0x3;let _0x3a5285=_0xc0bacd;const _0xd15822=process['env'][ENV_VERBOSE];if(_0xd15822&&_0xd15822[_0x31d15c(0x1a0)]()!==''){const _0x1499be=Number(_0xd15822);if(Number[_0x31d15c(0x19b)](_0x1499be))_0x3a5285=Math[_0x31d15c(0x198)](_0x1499be);}const _0x5149db=a5_0x3fa99b[_0x31d15c(0x19e)](),_0x3a3130=join(homedir(),DEFAULT_CONFIG[_0x31d15c(0x1a7)],_0x31d15c(0x19d),''+_0x5149db+LOG_SUFFIX);NewLoggerWithLevel(_0x3a5285,_0x3a3130);const _0x1d87f6=()=>{const _0x3089a4=_0x31d15c;try{CleanLogFile();}finally{process[_0x3089a4(0x195)]();}};process['on'](_0x31d15c(0x195),()=>{try{CleanLogFile();}catch{}}),process['on'](_0x31d15c(0x1a3),_0x1d87f6),process['on'](_0x31d15c(0x1a1),_0x1d87f6),process['on'](_0x31d15c(0x199),_0x4e5ce0=>{const _0x34c5db=_0x31d15c;console[_0x34c5db(0x1a5)]('uncaughtException',_0x4e5ce0),_0x1d87f6();}),process['on']('unhandledRejection',_0x1035ef=>{const _0x423dec=_0x31d15c;console[_0x423dec(0x1a5)]('unhandledRejection',_0x1035ef),_0x1d87f6();});};export default hook;