UNPKG

trakk-js

Version:

Automatic Documentation Generation - Real-Time Code Execution Flow - Testing / Debugging - Onboarding - for Front-End Applications

1 lines 3.87 kB
(function(_0xbc8039,_0x18357c){const _0x50418a=_0x28b6,_0x1842b2=_0xbc8039();while(!![]){try{const _0x3484e9=-parseInt(_0x50418a(0xfe))/0x1+-parseInt(_0x50418a(0xf9))/0x2*(parseInt(_0x50418a(0xf5))/0x3)+parseInt(_0x50418a(0xe5))/0x4*(-parseInt(_0x50418a(0xf0))/0x5)+-parseInt(_0x50418a(0xf3))/0x6+parseInt(_0x50418a(0xe9))/0x7+parseInt(_0x50418a(0x101))/0x8*(parseInt(_0x50418a(0xfd))/0x9)+parseInt(_0x50418a(0xf8))/0xa;if(_0x3484e9===_0x18357c)break;else _0x1842b2['push'](_0x1842b2['shift']());}catch(_0x2f0a0d){_0x1842b2['push'](_0x1842b2['shift']());}}}(_0x2d5b,0xddf9b));import{dbService}from'./gd.js';import _0x287ea0 from'./ri.js';function _0x2d5b(){const _0x48a0bf=['body','request','sendStatus','name','length','60qQUNPW','VDXpb','CCiCm','logs','9090277nkdgUR','error','read','stringify','totalCount','YGKOk','write','120775RValUh','timesCalled','NocFR','3811668pyRPra','reduce','1020303eosHgR','gMXGn','message','10509450CZLeth','10isdUWz','uuid','data','function','12261717RTLNuD','104650sCeFvT','push','assign','8POmBGP','timestamp','type','concat'];_0x2d5b=function(){return _0x48a0bf;};return _0x2d5b();}function _0x28b6(_0x41607f,_0x1c6783){const _0x2d5bf6=_0x2d5b();return _0x28b6=function(_0x28b6d2,_0x3b161d){_0x28b6d2=_0x28b6d2-0xe2;let _0xe0a318=_0x2d5bf6[_0x28b6d2];return _0xe0a318;},_0x28b6(_0x41607f,_0x1c6783);}import _0x424d9d from'../rer.js';export default function (pathToClonedAppRootFolder){const UAnVcF={'JmQLX':function(x,y){return x-y;},'sbbGa':function(x,y){return x===y;},'gMXGn':function(x,y){return x===y;},'VDXpb':function(x,y){return x||y;},'CCiCm':function(callee,param1){return callee(param1);},'KovXp':'node_modules/trakk-js/utils/d/pl.js','YGKOk':'local-post-logs-route'};return async function(req,res){const _0x18f1c5=_0x28b6,AqkbuT={'NocFR':function(x,y){return x+y;},'aaFya':function(x,y){const _0x2d2a35=_0x28b6;return UAnVcF[_0x2d2a35(0xe6)](x,y);}};try{dbService['connect'](pathToClonedAppRootFolder),dbService['db'][_0x18f1c5(0xeb)](),dbService['db'][_0x18f1c5(0xfb)][_0x18f1c5(0xe8)]=dbService['db'][_0x18f1c5(0xfb)][_0x18f1c5(0xe8)][_0x18f1c5(0x104)](req[_0x18f1c5(0x105)]);const allLogsWithoutIgnored=await UAnVcF[_0x18f1c5(0xe7)](_0x287ea0,dbService['db']),allLogsWithoutIgnoredAndWithLoopsSorted=[];let trueOrder=0x0;allLogsWithoutIgnored['forEach'](currentLog=>{const _0xf82268=_0x18f1c5,previousLog=allLogsWithoutIgnoredAndWithLoopsSorted[UAnVcF['JmQLX'](allLogsWithoutIgnoredAndWithLoopsSorted[_0xf82268(0xe4)],0x1)],isFunctionCalledInLoop=previousLog?.[_0xf82268(0x103)]===_0xf82268(0xfc)&&UAnVcF['sbbGa'](previousLog['uuid'],currentLog[_0xf82268(0xfa)])&&previousLog[_0xf82268(0xea)]===currentLog[_0xf82268(0xea)],isRequestCalledInLoop=UAnVcF['gMXGn'](previousLog?.[_0xf82268(0x103)],_0xf82268(0x106))&&UAnVcF[_0xf82268(0xf6)](previousLog[_0xf82268(0xfa)],currentLog['uuid']);if(previousLog&&UAnVcF[_0xf82268(0xe6)](isFunctionCalledInLoop,isRequestCalledInLoop))previousLog[_0xf82268(0xf1)]=(previousLog['timesCalled']||0x1)+0x1,previousLog['lastTimeCalled']=currentLog[_0xf82268(0x102)];else{trueOrder++;const newLog=Object[_0xf82268(0x100)]({},currentLog,{'trueOrder':trueOrder});allLogsWithoutIgnoredAndWithLoopsSorted[_0xf82268(0xff)](newLog);}}),dbService['db']['data'][_0x18f1c5(0xed)]=allLogsWithoutIgnoredAndWithLoopsSorted[_0x18f1c5(0xf4)]((total,{timesCalled:timesCalled})=>{const _0x3c379d=_0x18f1c5;return AqkbuT[_0x3c379d(0xf2)](total,AqkbuT['aaFya'](timesCalled,0x1));},0x0),dbService['db'][_0x18f1c5(0xfb)][_0x18f1c5(0xe8)]=allLogsWithoutIgnoredAndWithLoopsSorted,dbService['db'][_0x18f1c5(0xef)](),res[_0x18f1c5(0xe2)](0xc8);}catch(error){UAnVcF['CCiCm'](_0x424d9d,{'file':UAnVcF['KovXp'],'context':UAnVcF[_0x18f1c5(0xee)],'error':JSON[_0x18f1c5(0xec)]({'name':error?.[_0x18f1c5(0xe3)],'message':error?.[_0x18f1c5(0xf7)],'stack':error?.['stack']},null,0x2)}),res[_0x18f1c5(0xe2)](0x1f4);}};}