mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-26 13:16:39 +08:00
1 line
2.3 KiB
JavaScript
1 line
2.3 KiB
JavaScript
'use strict';function _0x18a2(){const _0x519c9b=['1362507LmyXjS','1378565VcZAjP','@nestjs/common','20ykKqco','then','mysql2/promise','isArray','8jttbfy','279iFzbOm','5014427mlxllj','log','7577JAsUPP','DB_HOST','CREATE\x20DATABASE\x20','env','__esModule','54tHiSiu','initDatabase','16662204gWzOuO','171381QraYau','DB_PORT','数据库创建成功[','DB_PASS','111056tTaIXI','length','42DnMDcy','Logger','DB_DATABASE'];_0x18a2=function(){return _0x519c9b;};return _0x18a2();}const _0x54d94f=_0xe03b;function _0xe03b(_0x1a2225,_0x58271b){const _0x18a2be=_0x18a2();return _0xe03b=function(_0xe03bbe,_0x23d546){_0xe03bbe=_0xe03bbe-0x1a5;let _0x469f94=_0x18a2be[_0xe03bbe];return _0x469f94;},_0xe03b(_0x1a2225,_0x58271b);}(function(_0x11bb43,_0x1e857c){const _0x245ef3=_0xe03b,_0x20c43e=_0x11bb43();while(!![]){try{const _0x56c28a=-parseInt(_0x245ef3(0x1ba))/0x1*(parseInt(_0x245ef3(0x1ac))/0x2)+parseInt(_0x245ef3(0x1af))/0x3+parseInt(_0x245ef3(0x1b6))/0x4*(parseInt(_0x245ef3(0x1b0))/0x5)+parseInt(_0x245ef3(0x1bf))/0x6*(-parseInt(_0x245ef3(0x1a6))/0x7)+-parseInt(_0x245ef3(0x1aa))/0x8*(-parseInt(_0x245ef3(0x1b7))/0x9)+-parseInt(_0x245ef3(0x1b2))/0xa*(-parseInt(_0x245ef3(0x1b8))/0xb)+-parseInt(_0x245ef3(0x1a5))/0xc;if(_0x56c28a===_0x1e857c)break;else _0x20c43e['push'](_0x20c43e['shift']());}catch(_0x4710e6){_0x20c43e['push'](_0x20c43e['shift']());}}}(_0x18a2,0x8d856));Object['defineProperty'](exports,_0x54d94f(0x1be),{'value':!![]}),exports['initDatabase']=void 0x0;const mysql=require(_0x54d94f(0x1b4)),common_1=require(_0x54d94f(0x1b1));function initDatabase(){const _0x5d6b01=_0x54d94f;mysql['createConnection']({'host':process[_0x5d6b01(0x1bd)][_0x5d6b01(0x1bb)],'user':process['env']['DB_USER'],'password':process[_0x5d6b01(0x1bd)][_0x5d6b01(0x1a9)],'port':parseInt(process['env'][_0x5d6b01(0x1a7)])})[_0x5d6b01(0x1b3)](async _0x841159=>{const _0x3b8d3f=_0x5d6b01,[_0x4cb4e5]=await _0x841159['execute']('SHOW\x20DATABASES\x20LIKE\x20\x27'+process[_0x3b8d3f(0x1bd)]['DB_DATABASE']+'\x27');Array[_0x3b8d3f(0x1b5)](_0x4cb4e5)&&_0x4cb4e5[_0x3b8d3f(0x1ab)]===0x0&&(await _0x841159['execute'](_0x3b8d3f(0x1bc)+process[_0x3b8d3f(0x1bd)][_0x3b8d3f(0x1ae)]),common_1[_0x3b8d3f(0x1ad)][_0x3b8d3f(0x1b9)](_0x3b8d3f(0x1a8)+process[_0x3b8d3f(0x1bd)][_0x3b8d3f(0x1ae)]+']')),await _0x841159['end']();});}exports[_0x54d94f(0x1c0)]=initDatabase; |