mirror of
https://github.com/xiaoyiweb/YiAi.git
synced 2025-09-26 13:16:39 +08:00
1 line
2.2 KiB
JavaScript
1 line
2.2 KiB
JavaScript
'use strict';const _0x30c1e6=_0x394a;function _0x17a8(){const _0x122fd1=['length','14236SlCGJr','DB_PORT','415YqDqAZ','7GobUAV','Logger','mysql2/promise','DB_HOST','DB_PASS','execute','__esModule','565630xeRGDy','447090nqSYWL','DB_USER','68044tRuLAI','isArray','716776Mxnmkl','env','2662074NTbDnv','297459RxosIi','log','createConnection','SHOW\x20DATABASES\x20LIKE\x20\x27','数据库创建成功[','then','initDatabase','DB_DATABASE','@nestjs/common'];_0x17a8=function(){return _0x122fd1;};return _0x17a8();}(function(_0x2b5ed5,_0x3a1b31){const _0x263aef=_0x394a,_0x4d2f23=_0x2b5ed5();while(!![]){try{const _0x51a2b0=-parseInt(_0x263aef(0xf1))/0x1+parseInt(_0x263aef(0xee))/0x2+parseInt(_0x263aef(0xf6))/0x3+parseInt(_0x263aef(0xe4))/0x4*(parseInt(_0x263aef(0xe6))/0x5)+-parseInt(_0x263aef(0xef))/0x6+-parseInt(_0x263aef(0xe7))/0x7*(parseInt(_0x263aef(0xf3))/0x8)+-parseInt(_0x263aef(0xf5))/0x9;if(_0x51a2b0===_0x3a1b31)break;else _0x4d2f23['push'](_0x4d2f23['shift']());}catch(_0x4b048e){_0x4d2f23['push'](_0x4d2f23['shift']());}}}(_0x17a8,0x247af));Object['defineProperty'](exports,_0x30c1e6(0xed),{'value':!![]}),exports[_0x30c1e6(0xfc)]=void 0x0;function _0x394a(_0x22827a,_0x1ff3ed){const _0x17a8bb=_0x17a8();return _0x394a=function(_0x394ae6,_0x2dc6ea){_0x394ae6=_0x394ae6-0xe1;let _0x1e425c=_0x17a8bb[_0x394ae6];return _0x1e425c;},_0x394a(_0x22827a,_0x1ff3ed);}const mysql=require(_0x30c1e6(0xe9)),common_1=require(_0x30c1e6(0xe2));function initDatabase(){const _0x15efa4=_0x30c1e6;mysql[_0x15efa4(0xf8)]({'host':process[_0x15efa4(0xf4)][_0x15efa4(0xea)],'user':process[_0x15efa4(0xf4)][_0x15efa4(0xf0)],'password':process[_0x15efa4(0xf4)][_0x15efa4(0xeb)],'port':parseInt(process[_0x15efa4(0xf4)][_0x15efa4(0xe5)])})[_0x15efa4(0xfb)](async _0x3b127c=>{const _0x1b68e3=_0x15efa4,[_0x26a68d]=await _0x3b127c[_0x1b68e3(0xec)](_0x1b68e3(0xf9)+process['env'][_0x1b68e3(0xe1)]+'\x27');Array[_0x1b68e3(0xf2)](_0x26a68d)&&_0x26a68d[_0x1b68e3(0xe3)]===0x0&&(await _0x3b127c[_0x1b68e3(0xec)]('CREATE\x20DATABASE\x20'+process['env'][_0x1b68e3(0xe1)]),common_1[_0x1b68e3(0xe8)][_0x1b68e3(0xf7)](_0x1b68e3(0xfa)+process[_0x1b68e3(0xf4)][_0x1b68e3(0xe1)]+']')),await _0x3b127c['end']();});}exports['initDatabase']=initDatabase; |