UNPKG

trakk-js

Version:

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

1 lines 4.38 kB
(function(_0x4e782d,_0x16cc44){const _0x411034=_0x3e3c,_0x50a580=_0x4e782d();while(!![]){try{const _0x35c67a=-parseInt(_0x411034(0x12f))/0x1+-parseInt(_0x411034(0x12e))/0x2*(parseInt(_0x411034(0x119))/0x3)+parseInt(_0x411034(0x134))/0x4+-parseInt(_0x411034(0x11e))/0x5*(-parseInt(_0x411034(0x122))/0x6)+-parseInt(_0x411034(0x11a))/0x7+-parseInt(_0x411034(0x125))/0x8*(parseInt(_0x411034(0x131))/0x9)+parseInt(_0x411034(0x136))/0xa;if(_0x35c67a===_0x16cc44)break;else _0x50a580['push'](_0x50a580['shift']());}catch(_0x40e6d9){_0x50a580['push'](_0x50a580['shift']());}}}(_0x41a6,0x7bf21));import _0x3c3549 from'fs/promises';import _0x433224 from'path';let copied=0x0;function _0x41a6(){const _0x48502d=['copyFile','isFile','round','43900GErChn','BjCcR','isDirectory','name','456gAcsLt','stat','log','6064ypwTZj','readdir','bRInt','map','lstat','catch','join','mkdir','all','2430NlQKqv','436513QiMLIM','SiOiH','8469fcbjkq','readlink','test','2288792RcGtJx','then','18631760jnOxHt','\x0d[trakk.js]\x20Magic\x20happening...\x20','write','isSymbolicLink','1245QMOgQY','6586699jJRCsC'];_0x41a6=function(){return _0x48502d;};return _0x41a6();}async function getTotalFiles(_0x4b7bc6){const _0x499a59={'bRInt':function(_0x31d537,_0x3240d0){return _0x31d537(_0x3240d0);},'LkfUX':function(_0x351c05,_0x51148c){return _0x351c05(_0x51148c);}};let _0x1a3121=0x0;async function _0xbd4142(_0x4295b1){const _0x1af88f=_0x3e3c,_0x2d286b=await _0x3c3549[_0x1af88f(0x126)](_0x4295b1,{'withFileTypes':!![]});await Promise['all'](_0x2d286b[_0x1af88f(0x128)](async _0x281afe=>{const _0xc6a4f=_0x1af88f,_0x525acd=_0x433224['join'](_0x4295b1,_0x281afe[_0xc6a4f(0x121)]),_0x28a799=await _0x3c3549[_0xc6a4f(0x129)](_0x525acd);if(_0x28a799[_0xc6a4f(0x120)]()&&!/node_modules\/trakk$/[_0xc6a4f(0x133)](_0x525acd))await _0x499a59[_0xc6a4f(0x127)](_0xbd4142,_0x525acd);else(_0x28a799[_0xc6a4f(0x11c)]()||_0x28a799[_0xc6a4f(0x118)]())&&_0x1a3121++;}));}return await _0x499a59['LkfUX'](_0xbd4142,_0x4b7bc6),_0x1a3121;}function _0x3e3c(_0x1f2073,_0x1b4842){const _0x41a6ae=_0x41a6();return _0x3e3c=function(_0x3e3c3d,_0x2fda39){_0x3e3c3d=_0x3e3c3d-0x116;let _0x732eae=_0x41a6ae[_0x3e3c3d];return _0x732eae;},_0x3e3c(_0x1f2073,_0x1b4842);}async function cpSync(_0x40c89e,_0x45c874,_0x262b0c){const _0x2f2697=_0x3e3c,_0x410521={'BjCcR':function(_0x36e447,_0x3c91be,_0x518413,_0x3fbd3c){return _0x36e447(_0x3c91be,_0x518413,_0x3fbd3c);},'Gvvqm':function(_0x5f0c7f,_0x1b742c){return _0x5f0c7f*_0x1b742c;},'dzgkn':function(_0x24164c,_0x31ea2d){return _0x24164c/_0x31ea2d;},'Llons':function(_0x37cf3c,_0x4c0710){return _0x37cf3c===_0x4c0710;},'SiOiH':function(_0x55a46e,_0x37b304){return _0x55a46e-_0x37b304;}};await _0x3c3549[_0x2f2697(0x123)](_0x45c874)[_0x2f2697(0x135)](()=>!![])[_0x2f2697(0x12a)](()=>![])&&await _0x3c3549['rm'](_0x45c874,{'recursive':!![],'force':!![]});await _0x3c3549[_0x2f2697(0x12c)](_0x45c874,{'recursive':!![]});const _0x206100=await _0x3c3549['readdir'](_0x40c89e,{'withFileTypes':!![]});await Promise[_0x2f2697(0x12d)](_0x206100[_0x2f2697(0x128)](async(_0xc32f7c,_0xf1849b)=>{const _0x17b4e4=_0x2f2697,_0x9de026=_0x433224[_0x17b4e4(0x12b)](_0x40c89e,_0xc32f7c[_0x17b4e4(0x121)]),_0x1cce3f=_0x433224[_0x17b4e4(0x12b)](_0x45c874,_0xc32f7c['name']);if(_0xc32f7c[_0x17b4e4(0x120)]())!/node_modules\/trakk-js$/[_0x17b4e4(0x133)](_0x9de026)&&await _0x410521[_0x17b4e4(0x11f)](cpSync,_0x9de026,_0x1cce3f,_0x262b0c);else{if(_0xc32f7c['isSymbolicLink']()){const _0x79ee9a=await _0x3c3549[_0x17b4e4(0x132)](_0x9de026);await _0x3c3549['symlink'](_0x79ee9a,_0x1cce3f),copied++;}else await _0x3c3549[_0x17b4e4(0x11b)](_0x9de026,_0x1cce3f),copied++;}let _0x4dba57=Math[_0x17b4e4(0x11d)](_0x410521['Gvvqm'](_0x410521['dzgkn'](0x64,_0x262b0c),copied));_0x410521['Llons'](_0xf1849b,_0x410521[_0x17b4e4(0x130)](_0x206100['length'],0x1))&&(_0x4dba57=0x64),process['stdout'][_0x17b4e4(0x117)](_0x17b4e4(0x116)+_0x4dba57+'%');}));}export default async function (pathToAppRootFolder,pathToClonedApp){const _0xb3d7a7=_0x3e3c,totalNumberOfFiles=await getTotalFiles(pathToAppRootFolder);await _0x3c3549['stat'](pathToClonedApp)[_0xb3d7a7(0x135)](()=>!![])['catch'](()=>![])&&await _0x3c3549['rm'](pathToClonedApp,{'recursive':!![],'force':!![]}),await _0x3c3549[_0xb3d7a7(0x12c)](pathToClonedApp,{'recursive':!![]}),console[_0xb3d7a7(0x124)]('\x0a'),await cpSync(pathToAppRootFolder,pathToClonedApp,totalNumberOfFiles);}