trakk-js
Version:
Automatic Documentation Generation - Real-Time Code Execution Flow - Testing / Debugging - Onboarding - for Front-End Applications
3 lines (2 loc) • 7.67 kB
JavaScript
const _0x28f2bb=_0x39a6;(function(_0x1547f8,_0x3f1fc3){const _0x60963c=_0x39a6,_0x3bb586=_0x1547f8();while(!![]){try{const _0x1470fb=parseInt(_0x60963c(0x17f))/0x1+-parseInt(_0x60963c(0x167))/0x2+parseInt(_0x60963c(0x195))/0x3+parseInt(_0x60963c(0x192))/0x4+-parseInt(_0x60963c(0x16a))/0x5+-parseInt(_0x60963c(0x169))/0x6*(-parseInt(_0x60963c(0x16c))/0x7)+parseInt(_0x60963c(0x171))/0x8*(-parseInt(_0x60963c(0x187))/0x9);if(_0x1470fb===_0x3f1fc3)break;else _0x3bb586['push'](_0x3bb586['shift']());}catch(_0x138ef5){_0x3bb586['push'](_0x3bb586['shift']());}}}(_0x38be,0x3acde));import _0x41be52 from'../utils/get-folders.js';import _0x51a10d from'../utils/get-user-config.js';import _0x5d24a4 from'../utils/rer.js';import _0x23e1a0 from'../utils/watch.js';function _0x39a6(_0x55ea90,_0x2748a2){const _0x38bea7=_0x38be();return _0x39a6=function(_0x39a68f,_0x1ae099){_0x39a68f=_0x39a68f-0x162;let _0x2da683=_0x38bea7[_0x39a68f];return _0x2da683;},_0x39a6(_0x55ea90,_0x2748a2);}import _0x17b257 from'../utils/kill-child.js';import _0x54c335 from'fs';import{spawn}from'child_process';import _0x33c65f from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta[_0x28f2bb(0x190)]),__dirname=_0x33c65f[_0x28f2bb(0x183)](__filename);let isShuttingDown=![];async function killEmAll(_0xdc6bb2,_0x21b4ea,_0x3f3403){const _0x2a1ea7=_0x28f2bb,_0x376323={'axHDI':function(_0x283b8d,_0x52dea1){return _0x283b8d(_0x52dea1);},'fbPsP':_0x2a1ea7(0x19e)},_0x52287c=_0x2a1ea7(0x18b)[_0x2a1ea7(0x185)]('|');let _0x417f7e=0x0;while(!![]){switch(_0x52287c[_0x417f7e++]){case'0':isShuttingDown=!![];continue;case'1':_0x21b4ea&&_0x21b4ea?.[_0x2a1ea7(0x198)]?.();continue;case'2':await _0x376323[_0x2a1ea7(0x168)](_0x17b257,_0xdc6bb2);continue;case'3':_0x3f3403&&await _0x5d24a4({'error':JSON['stringify']({'name':_0x3f3403?.[_0x2a1ea7(0x1a0)],'message':_0x3f3403?.[_0x2a1ea7(0x16b)],'stack':_0x3f3403?.[_0x2a1ea7(0x197)]},null,0x2),'file':_0x376323[_0x2a1ea7(0x19a)],'context':_0x2a1ea7(0x186)});continue;case'4':if(isShuttingDown)return;continue;}break;}}function spawnTrakk(_0x27dd11){const _0x4f1f9b=_0x28f2bb,_0x45ad1d={'lhNfu':'[trakk.js]\x20Encountered\x20an\x20error\x20and\x20will\x20now\x20exit...','VXfRz':function(_0x34e180,_0x1eda5d,_0x298d90,_0x4473ed){return _0x34e180(_0x1eda5d,_0x298d90,_0x4473ed);},'AWVJU':_0x4f1f9b(0x180),'AZbwy':'inherit','Xdocv':'exit','gOvSv':'error'},_0x56e7dd=Object[_0x4f1f9b(0x184)](_0x27dd11)[_0x4f1f9b(0x175)](_0x2c350b=>'--'+_0x2c350b+'='+_0x27dd11[_0x2c350b]),_0x28aca6=_0x33c65f[_0x4f1f9b(0x164)](__dirname,_0x4f1f9b(0x178)),_0x3ec149=[_0x28aca6][_0x4f1f9b(0x16f)](_0x56e7dd),_0x194426=_0x45ad1d[_0x4f1f9b(0x189)](spawn,_0x45ad1d['AWVJU'],_0x3ec149,{'stdio':_0x45ad1d[_0x4f1f9b(0x162)]});return _0x194426['on'](_0x45ad1d[_0x4f1f9b(0x172)],_0xa42838=>{const _0xabceba=_0x4f1f9b;console[_0xabceba(0x17d)](_0xabceba(0x170)),process['exit'](0x1);}),_0x194426['on'](_0x45ad1d['gOvSv'],_0x5d9fc8=>{const _0x1da6d0=_0x4f1f9b;console[_0x1da6d0(0x17d)](_0x45ad1d[_0x1da6d0(0x17b)]),process[_0x1da6d0(0x18c)](0x1);}),_0x194426;}const dashboardDomain=_0x28f2bb(0x16e),ASKING_FOR_VERSION=process['argv'][_0x28f2bb(0x196)](_0xf9a802=>/--?v(ersion)?/[_0x28f2bb(0x177)](_0xf9a802));if(ASKING_FOR_VERSION){const __filename=fileURLToPath(import.meta['url']),__dirname=_0x33c65f['dirname'](__filename),{version}=JSON[_0x28f2bb(0x17e)](_0x54c335[_0x28f2bb(0x176)](_0x33c65f[_0x28f2bb(0x164)](__dirname,_0x28f2bb(0x181)),_0x28f2bb(0x199)));console['log']('\x0a\x0aYour\x20trakk-js\x20version\x20is\x20'+version+'\x0a\x0a'),process[_0x28f2bb(0x18c)](0x0);}function _0x38be(){const _0x58fc82=['192292rIkWwm','axHDI','6kClMuR','2116005dQKBMh','message','566860fxhGDH','[trakk.js]\x20Encountered\x20an\x20uncaughtException\x20and\x20will\x20now\x20exit...','https://trakkjs.allthat.is','concat','[trakk.js]\x20Encountered\x20an\x20error\x20and\x20will\x20now\x20exit...','4403768fGAUEW','Xdocv','IaosK','SIGTERM','map','readFileSync','test','../utils/start-trakk.js','bRUmE','log','lhNfu','TVGBb','error','parse','469244tvkEft','node','../package.json','start','dirname','keys','split','killEmAll()','9AOPgFs','uncaughtException','VXfRz','unhandledRejection','4|3|0|1|2','exit','dudIY','MZSOi','SxpLC','url','OOwXU','1483908cRBcOi','include','weNSL','1168437avfPVO','some','stack','stop','utf-8','fbPsP','tfLmS','[trakk.js]\x20Received\x20SIGINT\x20and\x20will\x20now\x20exit...','SIGINT','node_modules/trakk-js/bin/trakk.js','UCtWl','name','AZbwy','CfAEf','join','BgwMs','beforeExit'];_0x38be=function(){return _0x58fc82;};return _0x38be();};((async()=>{const _0x86e6a6=_0x28f2bb,_0x1eb8b1={'XOFab':function(_0x353283,_0x4be552){return _0x353283(_0x4be552);},'bRUmE':_0x86e6a6(0x19c),'dudIY':function(_0x3ab386,_0x33f229,_0x2a25ee){return _0x3ab386(_0x33f229,_0x2a25ee);},'gsFTL':'[trakk.js]\x20Received\x20SIGTERM\x20and\x20will\x20now\x20exit...','IaosK':_0x86e6a6(0x16d),'CfAEf':function(_0x394419,_0x4ef638,_0x511f04,_0x2f65db){return _0x394419(_0x4ef638,_0x511f04,_0x2f65db);},'OOwXU':'[trakk.js]\x20Encountered\x20an\x20unhandledRejection\x20and\x20will\x20now\x20exit...','tfLmS':function(_0x41810c){return _0x41810c();},'MZSOi':'[trakk.js]\x20Encountered\x20an\x20error\x20and\x20will\x20now\x20exit...','weNSL':function(_0x13b57,_0x5a00d8,_0x217d4b,_0x4a5d2f){return _0x13b57(_0x5a00d8,_0x217d4b,_0x4a5d2f);},'nSjKv':function(_0x2c18e2){return _0x2c18e2();},'wIsmv':function(_0x1a83bb,_0x52781e){return _0x1a83bb(_0x52781e);},'SxpLC':function(_0x553715,_0xdbf5c2,_0x161591,_0x4adff2){return _0x553715(_0xdbf5c2,_0x161591,_0x4adff2);},'TVGBb':_0x86e6a6(0x174),'UCtWl':_0x86e6a6(0x188),'BgwMs':_0x86e6a6(0x18a)};console[_0x86e6a6(0x17a)]('\x0a\x0a\x0a[trakk.js]\x20Cloning\x20your\x20application\x20into\x20a\x20temporary\x20local\x20folder...\x0a\x0a');let _0x173c9d,_0x32ddd2;try{_0x173c9d=_0x1eb8b1[_0x86e6a6(0x19b)](_0x51a10d);}catch(_0x1c1bff){console[_0x86e6a6(0x17d)](_0x1eb8b1[_0x86e6a6(0x18e)]),await _0x1eb8b1[_0x86e6a6(0x194)](killEmAll,_0x32ddd2,_0x23e1a0,_0x1c1bff),process[_0x86e6a6(0x18c)](0x1);}try{const {pathToAppRootFolder:_0x21f179}=_0x1eb8b1['nSjKv'](_0x41be52);_0x32ddd2=_0x1eb8b1['wIsmv'](spawnTrakk,{'dashboardDomain':dashboardDomain}),_0x23e1a0[_0x86e6a6(0x182)](_0x21f179,{'include':_0x173c9d[_0x86e6a6(0x193)],'exclude':_0x173c9d['exclude']},async()=>{await _0x1eb8b1['XOFab'](killEmAll,_0x32ddd2),_0x32ddd2=spawnTrakk({'dashboardDomain':dashboardDomain});});}catch(_0x3647dd){console[_0x86e6a6(0x17d)](_0x1eb8b1[_0x86e6a6(0x18e)]),await _0x1eb8b1[_0x86e6a6(0x18f)](killEmAll,_0x32ddd2,_0x23e1a0,_0x3647dd),process[_0x86e6a6(0x18c)](0x1);}process['on'](_0x86e6a6(0x19d),async()=>{const _0xa0365f=_0x86e6a6;console[_0xa0365f(0x17a)](_0x1eb8b1[_0xa0365f(0x179)]),await _0x1eb8b1[_0xa0365f(0x18d)](killEmAll,_0x32ddd2,_0x23e1a0),process[_0xa0365f(0x18c)](0x0);}),process['on'](_0x1eb8b1[_0x86e6a6(0x17c)],async()=>{const _0x27b88a=_0x86e6a6;console[_0x27b88a(0x17a)](_0x1eb8b1['gsFTL']),await _0x1eb8b1[_0x27b88a(0x18d)](killEmAll,_0x32ddd2,_0x23e1a0),process[_0x27b88a(0x18c)](0x0);}),process['on'](_0x1eb8b1[_0x86e6a6(0x19f)],async _0x5f59ec=>{const _0x7a5a4b=_0x86e6a6;console[_0x7a5a4b(0x17d)](_0x1eb8b1[_0x7a5a4b(0x173)]),await _0x1eb8b1[_0x7a5a4b(0x163)](killEmAll,_0x32ddd2,_0x23e1a0,_0x5f59ec),process[_0x7a5a4b(0x18c)](0x1);}),process['on'](_0x1eb8b1[_0x86e6a6(0x165)],async _0x11d9eb=>{const _0x47e5f5=_0x86e6a6;console[_0x47e5f5(0x17d)](_0x1eb8b1[_0x47e5f5(0x191)]),await _0x1eb8b1[_0x47e5f5(0x163)](killEmAll,_0x32ddd2,_0x23e1a0,_0x11d9eb),process[_0x47e5f5(0x18c)](0x1);}),process['on'](_0x86e6a6(0x166),async()=>{await _0x1eb8b1['dudIY'](killEmAll,_0x32ddd2,_0x23e1a0);});})());