@bastion/tesseract
Version:
The heart and soul of the Bastion bot.
1 lines • 4.33 kB
JavaScript
const a9_0x57638f=a9_0x48b7;(function(_0x43d577,_0x102229){const _0x457da4=a9_0x48b7,_0xa35ae3=_0x43d577();while(!![]){try{const _0x32257d=parseInt(_0x457da4(0x8b))/0x1+parseInt(_0x457da4(0x98))/0x2*(parseInt(_0x457da4(0x90))/0x3)+-parseInt(_0x457da4(0x74))/0x4+parseInt(_0x457da4(0x70))/0x5+-parseInt(_0x457da4(0x84))/0x6*(-parseInt(_0x457da4(0x81))/0x7)+-parseInt(_0x457da4(0x89))/0x8*(parseInt(_0x457da4(0x7c))/0x9)+-parseInt(_0x457da4(0x95))/0xa*(parseInt(_0x457da4(0x87))/0xb);if(_0x32257d===_0x102229)break;else _0xa35ae3['push'](_0xa35ae3['shift']());}catch(_0x149d24){_0xa35ae3['push'](_0xa35ae3['shift']());}}}(a9_0xfbf0,0x88549));const a9_0x461908=(function(){let _0x240866=!![];return function(_0x4d9b90,_0x3ded3b){const _0x5b365c=_0x240866?function(){const _0x42b44e=a9_0x48b7;if(_0x3ded3b){const _0x2e249c=_0x3ded3b[_0x42b44e(0x82)](_0x4d9b90,arguments);return _0x3ded3b=null,_0x2e249c;}}:function(){};return _0x240866=![],_0x5b365c;};}()),a9_0x1286bc=a9_0x461908(this,function(){const _0x5d6326=a9_0x48b7;return a9_0x1286bc[_0x5d6326(0x78)]()[_0x5d6326(0x97)](_0x5d6326(0x86))[_0x5d6326(0x78)]()[_0x5d6326(0x72)](a9_0x1286bc)['search'](_0x5d6326(0x86));});a9_0x1286bc();function a9_0xfbf0(){const _0x2fe8ef=['name','8325DBtbcR','pathToFileURL','init','router','href','1430PFQCuA','dist','search','226bTnNlA','index.js','directory','2645210jGQoLu','existsSync','constructor','isDirectory','2501464qfcAhw','PORT','urlencoded','x-powered-by','toString','statSync','env','routes','9GtNfei','extname','path','push','server','637nMiOzn','apply','json','55254BVotCz','readdirSync','(((.+)+)+)+$','23122uXFGZw','disable','8836368zGOYkw','set','908271bLOwZO','shard-manager','join','use'];a9_0xfbf0=function(){return _0x2fe8ef;};return a9_0xfbf0();}import a9_0x37c674 from'node:fs';import a9_0x572c74 from'node:path';import a9_0x135f27 from'node:url';import a9_0x2fef90 from'express';import a9_0x51b5be from'compression';import a9_0x553734 from'cors';import a9_0x57e567 from'morgan';import a9_0x13a94b from'./server/routes/info.js';import a9_0x41e4b4 from'./server/middlewares/headers.js';import a9_0x12c69d from'./server/middlewares/noroutes.js';import a9_0x4a60be from'./server/middlewares/errors.js';class WebServer{['directory'];[a9_0x57638f(0x80)];constructor(_0x1d8c0d){const _0x1a6896=a9_0x57638f;this[_0x1a6896(0x6f)]=a9_0x572c74['resolve'](_0x1a6896(0x96),_0x1a6896(0x7b)),this['server']=a9_0x2fef90(),this[_0x1a6896(0x80)][_0x1a6896(0x8a)](_0x1a6896(0x8c),_0x1d8c0d),this['server'][_0x1a6896(0x88)](_0x1a6896(0x77)),this['server'][_0x1a6896(0x8e)](a9_0x2fef90[_0x1a6896(0x83)]()),this[_0x1a6896(0x80)][_0x1a6896(0x8e)](a9_0x2fef90[_0x1a6896(0x76)]({'extended':!![]})),this[_0x1a6896(0x80)][_0x1a6896(0x8e)](a9_0x51b5be()),this[_0x1a6896(0x80)]['use'](a9_0x553734()),this[_0x1a6896(0x80)]['use'](a9_0x57e567('dev')),this[_0x1a6896(0x80)][_0x1a6896(0x8e)](a9_0x41e4b4);}[a9_0x57638f(0x7b)](){const _0x5af4ee=a9_0x57638f,_0x18a178=[];for(const _0xfa6530 of a9_0x37c674[_0x5af4ee(0x85)](this[_0x5af4ee(0x6f)])){const _0x209f30=a9_0x572c74['join'](this[_0x5af4ee(0x6f)],_0xfa6530),_0x1a63e2=a9_0x37c674[_0x5af4ee(0x79)](_0x209f30)[_0x5af4ee(0x73)]()?a9_0x572c74[_0x5af4ee(0x8d)](_0x209f30,_0x5af4ee(0x99)):_0x209f30;a9_0x572c74[_0x5af4ee(0x7d)](_0x1a63e2)==='.js'&&a9_0x37c674[_0x5af4ee(0x71)](_0x1a63e2)&&_0x18a178[_0x5af4ee(0x7f)]({'name':a9_0x572c74['parse'](_0xfa6530)[_0x5af4ee(0x8f)],'path':_0x1a63e2});}return _0x18a178;}async[a9_0x57638f(0x92)](){const _0x382d09=a9_0x57638f;this[_0x382d09(0x80)][_0x382d09(0x8e)]('/',a9_0x13a94b);for(const _0x30f18a of this['routes']()){const _0x1e53cb=await import(a9_0x135f27[_0x382d09(0x91)](_0x30f18a[_0x382d09(0x7e)])[_0x382d09(0x94)]);this[_0x382d09(0x80)][_0x382d09(0x8e)]('/'+_0x30f18a[_0x382d09(0x8f)],_0x1e53cb[_0x382d09(0x93)]);}this['server'][_0x382d09(0x8e)](a9_0x12c69d),this['server'][_0x382d09(0x8e)](a9_0x4a60be);}async['start'](_0x57c3c4=0x20b9){const _0xe07f5e=a9_0x57638f;await this[_0xe07f5e(0x92)](),this[_0xe07f5e(0x80)]['listen'](Number['parseInt'](process[_0xe07f5e(0x7a)][_0xe07f5e(0x75)]||_0x57c3c4));}}function a9_0x48b7(_0x26b79c,_0x9f3b48){const _0x1fbb87=a9_0xfbf0();return a9_0x48b7=function(_0x1286bc,_0x461908){_0x1286bc=_0x1286bc-0x6f;let _0xfbf02e=_0x1fbb87[_0x1286bc];return _0xfbf02e;},a9_0x48b7(_0x26b79c,_0x9f3b48);}export default WebServer;