node-server-dev 3.1.8 → 3.2.1
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.d.ts → browser/index.d.ts} +1 -1
- package/dist/cjs/browser/index.d.ts.map +1 -0
- package/dist/cjs/browser/index.js +1 -0
- package/dist/cjs/browser/tools.d.ts +3 -0
- package/dist/cjs/browser/tools.d.ts.map +1 -0
- package/dist/cjs/browser/tools.js +1 -0
- 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.d.ts +5 -1
- package/dist/cjs/index.d.ts.map +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 +10 -1
- package/dist/cjs/package/mysql_backup/promise.js +195 -187
- package/dist/cjs/server.d.ts.map +1 -1
- package/dist/cjs/server.js +1 -1
- package/dist/cjs/start.d.ts.map +1 -1
- package/dist/cjs/start.js +1 -1
- package/dist/cjs/update.js +1 -1
- package/dist/esm/{browser.d.ts → browser/index.d.ts} +1 -1
- package/dist/esm/browser/index.d.ts.map +1 -0
- package/dist/esm/browser/index.js +1 -0
- package/dist/esm/browser/tools.d.ts +3 -0
- package/dist/esm/browser/tools.d.ts.map +1 -0
- package/dist/esm/browser/tools.js +1 -0
- 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.d.ts +5 -1
- package/dist/esm/index.d.ts.map +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 +10 -1
- package/dist/esm/package/mysql_backup/promise.js +195 -187
- package/dist/esm/server.d.ts.map +1 -1
- package/dist/esm/server.js +1 -1
- package/dist/esm/start.d.ts.map +1 -1
- package/dist/esm/start.js +1 -1
- package/dist/esm/update.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/browser.d.ts.map +0 -1
- package/dist/cjs/browser.js +0 -1
- package/dist/esm/browser.d.ts.map +0 -1
- package/dist/esm/browser.js +0 -1
package/dist/esm/hash/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(function(
|
1
|
+
(function(_0x174b3a,_0x7d04dd){var _0x5e4bda=a15_0x2324,_0x2922fa=_0x174b3a();while(!![]){try{var _0x4dfe7c=-parseInt(_0x5e4bda(0x1b0))/0x1*(-parseInt(_0x5e4bda(0x1ae))/0x2)+-parseInt(_0x5e4bda(0x1a6))/0x3*(-parseInt(_0x5e4bda(0x1a5))/0x4)+parseInt(_0x5e4bda(0x1a7))/0x5*(-parseInt(_0x5e4bda(0x1af))/0x6)+-parseInt(_0x5e4bda(0x1ad))/0x7+-parseInt(_0x5e4bda(0x1a9))/0x8*(-parseInt(_0x5e4bda(0x1b2))/0x9)+-parseInt(_0x5e4bda(0x1ac))/0xa+parseInt(_0x5e4bda(0x1b1))/0xb;if(_0x4dfe7c===_0x7d04dd)break;else _0x2922fa['push'](_0x2922fa['shift']());}catch(_0x353986){_0x2922fa['push'](_0x2922fa['shift']());}}}(a15_0x114c,0x85d7a));import a15_0x4447d5 from'md5';import a15_0x5f2227 from'sha1';import a15_0x26b278 from'sha256';function a15_0x2324(_0x17d00c,_0x32b8d4){var _0x114c65=a15_0x114c();return a15_0x2324=function(_0x232498,_0x4dc669){_0x232498=_0x232498-0x1a5;var _0x541372=_0x114c65[_0x232498];return _0x541372;},a15_0x2324(_0x17d00c,_0x32b8d4);}function a15_0x114c(){var _0x145d67=['40SEIIVE','sha1','27752YGAxHR','MD5加盐','sha256','9835390JiMNoS','3885084iycDqk','8706hqvFEE','480zbdPgR','126kIoLVg','5630185dgYLlA','2619OXqwpm','sha1混淆','70468wqhqqQ','3pLqRPE'];a15_0x114c=function(){return _0x145d67;};return a15_0x114c();}function hash(_0x31a1b4,_0x34a003){var _0x4cd0eb=a15_0x2324;if(_0x34a003==_0x4cd0eb(0x1ab))return a15_0x26b278(_0x31a1b4+a15_0x5f2227(_0x31a1b4+_0x4cd0eb(0x1b3))+a15_0x4447d5(_0x31a1b4+_0x4cd0eb(0x1aa)));else return _0x34a003==_0x4cd0eb(0x1a8)?a15_0x5f2227(_0x31a1b4+a15_0x26b278(_0x31a1b4+'sha1混淆')+a15_0x4447d5(_0x31a1b4+_0x4cd0eb(0x1aa))):a15_0x4447d5(_0x31a1b4+a15_0x26b278(_0x31a1b4+_0x4cd0eb(0x1b3))+a15_0x5f2227(_0x31a1b4+_0x4cd0eb(0x1aa)));}export default hash;
|
package/dist/esm/id/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a16_0x2d118d=a16_0x9987;(function(_0x253144,_0x29deff){const _0x50d811=a16_0x9987,_0xf5b2f6=_0x253144();while(!![]){try{const _0x3320b9=-parseInt(_0x50d811(0x1ba))/0x1*(-parseInt(_0x50d811(0x1c1))/0x2)+parseInt(_0x50d811(0x1bf))/0x3+parseInt(_0x50d811(0x1c2))/0x4+parseInt(_0x50d811(0x1be))/0x5+-parseInt(_0x50d811(0x1bd))/0x6+-parseInt(_0x50d811(0x1b9))/0x7+parseInt(_0x50d811(0x1c3))/0x8;if(_0x3320b9===_0x29deff)break;else _0xf5b2f6['push'](_0xf5b2f6['shift']());}catch(_0x369825){_0xf5b2f6['push'](_0xf5b2f6['shift']());}}}(a16_0x4610,0xb722c));import a16_0x3eb83e from'./random';const BaseTime=+new Date(a16_0x2d118d(0x1c0));function a16_0x4610(){const _0x4c32d2=['9929339ElCgbZ','183893QeMvHt','NODE_APP_INSTANCE','env','6913992SRZDTz','5223585sRrOqO','2212761pmbjQg','2025-01-01','14iGBWpU','63124ZtPAvw','1884776YPpoYI'];a16_0x4610=function(){return _0x4c32d2;};return a16_0x4610();}let lastTimeTick,lastRandomNumberTick=a16_0x3eb83e(0x1,0x3);function id(){const _0x109572=a16_0x2d118d,_0x5941d6=Math['min'](process[_0x109572(0x1bc)][_0x109572(0x1bb)]?+process['env'][_0x109572(0x1bb)]:a16_0x3eb83e(0x0,0x9),0x9);let _0x1aa2da=+new Date()-BaseTime;return lastRandomNumberTick=_0x1aa2da==lastTimeTick?++lastRandomNumberTick:a16_0x3eb83e(0x0,0x3),lastTimeTick=_0x1aa2da,+(''+_0x1aa2da+_0x5941d6+lastRandomNumberTick);}function a16_0x9987(_0x58d502,_0x4b33f5){const _0x461080=a16_0x4610();return a16_0x9987=function(_0x998768,_0x3d22c9){_0x998768=_0x998768-0x1b9;let _0x34dd3e=_0x461080[_0x998768];return _0x34dd3e;},a16_0x9987(_0x58d502,_0x4b33f5);}export default id;
|
package/dist/esm/id/random.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
function
|
1
|
+
function a17_0x5a1f(_0x280767,_0x9c4bf4){const _0x303b57=a17_0x303b();return a17_0x5a1f=function(_0x5a1f21,_0x55072d){_0x5a1f21=_0x5a1f21-0x187;let _0xa59797=_0x303b57[_0x5a1f21];return _0xa59797;},a17_0x5a1f(_0x280767,_0x9c4bf4);}const a17_0x24f5b7=a17_0x5a1f;(function(_0xb5cdd1,_0x577daf){const _0x9f4704=a17_0x5a1f,_0x3f48b8=_0xb5cdd1();while(!![]){try{const _0x5c479a=parseInt(_0x9f4704(0x18f))/0x1*(parseInt(_0x9f4704(0x188))/0x2)+parseInt(_0x9f4704(0x189))/0x3+parseInt(_0x9f4704(0x18b))/0x4+-parseInt(_0x9f4704(0x18e))/0x5*(-parseInt(_0x9f4704(0x18c))/0x6)+parseInt(_0x9f4704(0x18d))/0x7+-parseInt(_0x9f4704(0x187))/0x8+-parseInt(_0x9f4704(0x190))/0x9;if(_0x5c479a===_0x577daf)break;else _0x3f48b8['push'](_0x3f48b8['shift']());}catch(_0x34258e){_0x3f48b8['push'](_0x3f48b8['shift']());}}}(a17_0x303b,0xe5b50));const random=(_0x27ebf1,_0x379626)=>Math['round'](Math[a17_0x24f5b7(0x18a)]()*(_0x379626-_0x27ebf1))+_0x27ebf1;export default random;function a17_0x303b(){const _0x443046=['6118288aJbbNv','48204YsnXBA','4263063RsmojS','random','727552LoFZrB','12mhTDpV','8750637DndbuU','1519485QsgZCS','69azsgMx','30763494PXrjqd'];a17_0x303b=function(){return _0x443046;};return a17_0x303b();}
|
package/dist/esm/index.d.ts
CHANGED
@@ -2,6 +2,7 @@ import md5 from "md5";
|
|
2
2
|
import sha1 from "sha1";
|
3
3
|
import sha256 from "sha256";
|
4
4
|
import hash from "./hash";
|
5
|
+
import cookie from "js-cookie";
|
5
6
|
declare let id: () => number;
|
6
7
|
declare let getAllRouter: () => Promise<never[]>;
|
7
8
|
declare let mysql: {};
|
@@ -19,7 +20,10 @@ declare const all: {
|
|
19
20
|
sha1: typeof sha1;
|
20
21
|
md5: typeof md5;
|
21
22
|
jwt: () => void;
|
23
|
+
cookie: cookie.CookiesStatic<string> & {
|
24
|
+
noConflict?(): Cookies.CookiesStatic;
|
25
|
+
};
|
22
26
|
};
|
23
27
|
export default all;
|
24
|
-
export { uuid, id, getAllRouter, mysql, sha1, sha256, md5, hash, jwt };
|
28
|
+
export { uuid, id, getAllRouter, mysql, sha1, sha256, md5, hash, jwt, cookie };
|
25
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,IAAI,MAAM,QAAQ,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAI1B,OAAO,MAAM,MAAM,WAAW,CAAC;AAM/B,QAAA,IAAI,EAAE,cAAU,CAAC;AACjB,QAAA,IAAI,YAAY,wBAAiB,CAAC;AAClC,QAAA,IAAI,KAAK,IAAK,CAAC;AACf,QAAA,IAAI,GAAG,YAAW,CAAC;AAQnB,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAE7C;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,OAEjC;AAKD,eAAO,IAAI,GAAG,QAA4C,CAAC;AA4C3D,QAAA,MAAM,IAAI,2KAAK,CAAC;AAEhB,QAAA,MAAM,GAAG;;;;;;;;;;uBAcqxC,QAAS,aAAa;;CAJnzC,CAAC;AAEF,eAAe,GAAG,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/esm/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a18_0x2175e9=a18_0x3a83;(function(_0x32854a,_0x5e4be3){const _0x6d5f7e=a18_0x3a83,_0x69415b=_0x32854a();while(!![]){try{const _0x1f3425=-parseInt(_0x6d5f7e(0x8c))/0x1+-parseInt(_0x6d5f7e(0x87))/0x2*(-parseInt(_0x6d5f7e(0x81))/0x3)+-parseInt(_0x6d5f7e(0x7d))/0x4+-parseInt(_0x6d5f7e(0x73))/0x5*(-parseInt(_0x6d5f7e(0x85))/0x6)+-parseInt(_0x6d5f7e(0x74))/0x7*(-parseInt(_0x6d5f7e(0x83))/0x8)+-parseInt(_0x6d5f7e(0x8a))/0x9+-parseInt(_0x6d5f7e(0x72))/0xa*(-parseInt(_0x6d5f7e(0x7a))/0xb);if(_0x1f3425===_0x5e4be3)break;else _0x69415b['push'](_0x69415b['shift']());}catch(_0xf1c4c5){_0x69415b['push'](_0x69415b['shift']());}}}(a18_0x547b,0xbf88d));var __awaiter=this&&this[a18_0x2175e9(0x90)]||function(_0x33ec1e,_0x2703b8,_0x5d47a5,_0x52a680){function _0x33634c(_0x55758a){return _0x55758a instanceof _0x5d47a5?_0x55758a:new _0x5d47a5(function(_0x412dd9){_0x412dd9(_0x55758a);});}return new(_0x5d47a5||(_0x5d47a5=Promise))(function(_0x5e0c6d,_0x339995){const _0x310a75=a18_0x3a83;function _0x4f4bc3(_0x2b29b6){const _0x3b5bb8=a18_0x3a83;try{_0x24f955(_0x52a680[_0x3b5bb8(0x7f)](_0x2b29b6));}catch(_0xdcabea){_0x339995(_0xdcabea);}}function _0x369d90(_0x2f3c4f){try{_0x24f955(_0x52a680['throw'](_0x2f3c4f));}catch(_0x3b2a85){_0x339995(_0x3b2a85);}}function _0x24f955(_0x4565e5){const _0x269aad=a18_0x3a83;_0x4565e5[_0x269aad(0x8f)]?_0x5e0c6d(_0x4565e5[_0x269aad(0x75)]):_0x33634c(_0x4565e5['value'])['then'](_0x4f4bc3,_0x369d90);}_0x24f955((_0x52a680=_0x52a680[_0x310a75(0x79)](_0x33ec1e,_0x2703b8||[]))[_0x310a75(0x7f)]());});};import{v4}from'uuid';import a18_0x32292c from'md5';import a18_0x72c5e2 from'sha1';import a18_0x21c7f7 from'sha256';import a18_0x31b073 from'./start';import a18_0x51eb23 from'./hash';import a18_0x3429b1 from'path';import a18_0x4695d5 from'@fingerprintjs/fingerprintjs';function a18_0x547b(){const _0x26ddba=['mysql','9cQRSEz','not_update','604344BGXdrn','catch','5244114KWiANN','sort','459806ZaCwSC','./jwt','aHR0cHM6Ly9ldmVudC1hcGkuYmxvZ3dlYi5jbg==','35640wCSYbn','./mac','1181711NUGMPw','join','get','done','__awaiter','10GPAdEb','5VGazPB','105xCUBls','value','load','dev','node.js','apply','8035907iKdAUf','then','map','5828856HklBmh','aHR0cDovL2xvY2FsaG9zdDoxMDg4','next'];a18_0x547b=function(){return _0x26ddba;};return a18_0x547b();}import{decode}from'js-base64';import a18_0x3fd04d from'js-cookie';const isBrowser=typeof window!=='undefined';let id=()=>0x1,getAllRouter=()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){return[];}),mysql={},jwt=()=>{};const globalObject=isBrowser?window:global;let metaEvent=Object['assign']((globalObject===null||globalObject===void 0x0?void 0x0:globalObject['meta_event'])||{},{'connectError':![],'isDBDataEmpty':![]});export function setEnv(_0x2f001f,_0xd3b456){metaEvent[_0x2f001f]=_0xd3b456;}function a18_0x3a83(_0x1ae452,_0x476dfd){const _0x547bf3=a18_0x547b();return a18_0x3a83=function(_0x3a83c5,_0x5a1899){_0x3a83c5=_0x3a83c5-0x72;let _0x52bdb9=_0x547bf3[_0x3a83c5];return _0x52bdb9;},a18_0x3a83(_0x1ae452,_0x476dfd);}export function getEnv(_0x53dd57){return metaEvent[_0x53dd57];}let dev=a18_0x2175e9(0x7e),pro=a18_0x2175e9(0x89);export let url=getEnv(a18_0x2175e9(0x77))?decode(dev):decode(pro);if(!isBrowser){id=require('./id')['default'],getAllRouter=require('./getAllRouter')['default'],mysql=require('./server')[a18_0x2175e9(0x80)],jwt=require(a18_0x2175e9(0x88))['default'];if(!(metaEvent===null||metaEvent===void 0x0?void 0x0:metaEvent[a18_0x2175e9(0x82)])){}}let mac=[];((()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const _0x18ba68=a18_0x2175e9;if(!isBrowser){const _0xfc20d0=require(a18_0x3429b1[_0x18ba68(0x8d)](__dirname,_0x18ba68(0x8b)))['default'];mac=_0xfc20d0();}else{let _0x4991c6=yield a18_0x4695d5[_0x18ba68(0x76)]()[_0x18ba68(0x7b)](_0x4d4201=>_0x4d4201[_0x18ba68(0x8e)]())['then'](_0x350e43=>{const _0x1ea0d=_0x350e43['visitorId'];return _0x1ea0d;})[_0x18ba68(0x84)](()=>'');mac=[_0x4991c6];}const _0x3bad89=mac[_0x18ba68(0x86)]()[_0x18ba68(0x7c)](_0x525fbb=>a18_0x72c5e2(_0x525fbb+_0x18ba68(0x78)))['join'](';'),_0x28904a=a18_0x21c7f7(_0x3bad89);globalObject['hash_id']=_0x28904a,globalObject['hash_key']!=a18_0x21c7f7(_0x28904a+a18_0x72c5e2(_0x18ba68(0x78)+_0x28904a))&&a18_0x31b073();}))());const uuid=v4,all={'uuid':uuid,'id':id,'getAllRouter':getAllRouter,'mysql':mysql,'hash':a18_0x51eb23,'sha1':a18_0x72c5e2,'md5':a18_0x32292c,'jwt':jwt,'cookie':a18_0x3fd04d};export default all;export{uuid,id,getAllRouter,mysql,a18_0x72c5e2 as sha1,a18_0x21c7f7 as sha256,a18_0x32292c as md5,a18_0x51eb23 as hash,jwt,a18_0x3fd04d as cookie};
|
package/dist/esm/jwt/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
var a19_0x1cbd29=a19_0x3683;(function(_0xbf41e6,_0x98aea4){var _0x509816=a19_0x3683,_0x114c07=_0xbf41e6();while(!![]){try{var _0xe3287b=-parseInt(_0x509816(0x7d))/0x1+parseInt(_0x509816(0x80))/0x2+parseInt(_0x509816(0x7e))/0x3+parseInt(_0x509816(0x7a))/0x4*(parseInt(_0x509816(0x75))/0x5)+-parseInt(_0x509816(0x7c))/0x6*(parseInt(_0x509816(0x70))/0x7)+parseInt(_0x509816(0x77))/0x8+-parseInt(_0x509816(0x73))/0x9*(parseInt(_0x509816(0x72))/0xa);if(_0xe3287b===_0x98aea4)break;else _0x114c07['push'](_0x114c07['shift']());}catch(_0x4cdb29){_0x114c07['push'](_0x114c07['shift']());}}}(a19_0x3045,0xb6e87));var __awaiter=this&&this[a19_0x1cbd29(0x74)]||function(_0x3771e4,_0x8064c0,_0x33f8ba,_0x445c88){function _0x388daf(_0xa82910){return _0xa82910 instanceof _0x33f8ba?_0xa82910:new _0x33f8ba(function(_0x40d446){_0x40d446(_0xa82910);});}return new(_0x33f8ba||(_0x33f8ba=Promise))(function(_0x584ba5,_0x5898e4){var _0x19fb73=a19_0x3683;function _0x204e18(_0x134705){var _0x11bba2=a19_0x3683;try{_0x1d8c0a(_0x445c88[_0x11bba2(0x7b)](_0x134705));}catch(_0x3769c0){_0x5898e4(_0x3769c0);}}function _0x18e776(_0x2769db){var _0x4a7c70=a19_0x3683;try{_0x1d8c0a(_0x445c88[_0x4a7c70(0x79)](_0x2769db));}catch(_0x1eead5){_0x5898e4(_0x1eead5);}}function _0x1d8c0a(_0x4299d4){var _0x4d1f3f=a19_0x3683;_0x4299d4[_0x4d1f3f(0x76)]?_0x584ba5(_0x4299d4['value']):_0x388daf(_0x4299d4[_0x4d1f3f(0x7f)])['then'](_0x204e18,_0x18e776);}_0x1d8c0a((_0x445c88=_0x445c88['apply'](_0x3771e4,_0x8064c0||[]))[_0x19fb73(0x7b)]());});};import a19_0x3bf54d from'jsonwebtoken';function a19_0x3683(_0x5ce2ec,_0x1043ac){var _0x30457c=a19_0x3045();return a19_0x3683=function(_0x3683d8,_0x1f2bed){_0x3683d8=_0x3683d8-0x70;var _0x3247cd=_0x30457c[_0x3683d8];return _0x3247cd;},a19_0x3683(_0x5ce2ec,_0x1043ac);}function jwt(_0x93854e){var _0x2785b5=a19_0x1cbd29;return!global[_0x2785b5(0x71)]&&(global[_0x2785b5(0x71)]=_0x93854e['key']),{'sign':_0x32efa6=>a19_0x3bf54d[_0x2785b5(0x78)](_0x32efa6,global[_0x2785b5(0x71)],{'expiresIn':_0x93854e[_0x2785b5(0x81)]||'365d'}),'verify':function(_0xc4c3b4){return __awaiter(this,void 0x0,void 0x0,function*(){return new Promise((_0x56fbdd,_0x262385)=>{var _0x382bbe=a19_0x3683;a19_0x3bf54d[_0x382bbe(0x82)](_0xc4c3b4,global[_0x382bbe(0x71)],function(_0x5b8f0b,_0x932aea){return __awaiter(this,void 0x0,void 0x0,function*(){_0x5b8f0b?_0x262385():_0x56fbdd(_0x932aea);});});});});}};}export default jwt;function a19_0x3045(){var _0x5516d5=['throw','80AACWEB','next','24bVpFgr','246508psEhPs','3368079DJSmZT','value','2253842dOeVEa','expiresIn','verify','23499ZrjhZq','jwt_key','26155930BxAVVi','9WRfHkT','__awaiter','24575jrKLsB','done','10214448vnjiEt','sign'];a19_0x3045=function(){return _0x5516d5;};return a19_0x3045();}
|
package/dist/esm/mac/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a20_0x4e8bbc=a20_0xeb6b;(function(_0x38ac00,_0x4b0223){const _0x3a862c=a20_0xeb6b,_0x2139d9=_0x38ac00();while(!![]){try{const _0x2a6ae3=parseInt(_0x3a862c(0xe6))/0x1*(-parseInt(_0x3a862c(0xef))/0x2)+-parseInt(_0x3a862c(0xed))/0x3*(parseInt(_0x3a862c(0xfd))/0x4)+parseInt(_0x3a862c(0xf6))/0x5*(-parseInt(_0x3a862c(0x100))/0x6)+-parseInt(_0x3a862c(0xfc))/0x7+parseInt(_0x3a862c(0xf4))/0x8+-parseInt(_0x3a862c(0xf7))/0x9+parseInt(_0x3a862c(0xe7))/0xa;if(_0x2a6ae3===_0x4b0223)break;else _0x2139d9['push'](_0x2139d9['shift']());}catch(_0x1abc8c){_0x2139d9['push'](_0x2139d9['shift']());}}}(a20_0x9f54,0x4e9bf));import{networkInterfaces}from'os';function isZeroMac(_0x2a7c2e){const _0x41b164=a20_0xeb6b;return/^(0{1,2}[:-]){5}0{1,2}$/[_0x41b164(0xeb)](_0x2a7c2e);}function getMac(_0x2b4fe4=a20_0x4e8bbc(0xfa)){const _0x31b112=a20_0x4e8bbc,_0x16fbac=networkInterfaces();let _0xe60378=[];for(const _0x1095b6 of Object['values'](_0x16fbac)){const _0x4e81c9=_0x1095b6[_0x31b112(0xee)](_0x7830a4=>!_0x7830a4[_0x31b112(0xfe)]&&!isZeroMac(_0x7830a4['mac'])&&(!_0x7830a4[_0x31b112(0xf3)]||_0x7830a4[_0x31b112(0xf3)]===_0x2b4fe4)&&!isVirtualMac(_0x7830a4['mac']));_0x4e81c9&&_0xe60378[_0x31b112(0xf1)](_0x4e81c9[_0x31b112(0xea)]);}return[...new Set(_0xe60378)];}const isValid=_0x14a899=>_0x14a899[a20_0x4e8bbc(0xfe)]===![]&&!isZeroMac(_0x14a899[a20_0x4e8bbc(0xea)]),virtualMacPrefix=new Set([a20_0x4e8bbc(0xec),a20_0x4e8bbc(0xe4),'00:50:56',a20_0x4e8bbc(0xff),a20_0x4e8bbc(0xf9),'02:00:4c',a20_0x4e8bbc(0xe5),'00:0f:4b',a20_0x4e8bbc(0x101),a20_0x4e8bbc(0xf5),a20_0x4e8bbc(0xe9)]);function a20_0xeb6b(_0x3b2e82,_0x30f2ab){const _0x9f5450=a20_0x9f54();return a20_0xeb6b=function(_0xeb6b58,_0x3c5613){_0xeb6b58=_0xeb6b58-0xe4;let _0x4f52ad=_0x9f5450[_0xeb6b58];return _0x4f52ad;},a20_0xeb6b(_0x3b2e82,_0x30f2ab);}export function isMac(_0x10bc72){return/^([\da-f]{1,2}[:-]){5}([\da-f]{1,2})$/i['test'](_0x10bc72);}export function formatMac(_0x28f584){const _0x30c030=a20_0x4e8bbc;return String(_0x28f584)[_0x30c030(0xe8)]()[_0x30c030(0xf2)]()[_0x30c030(0xf0)](/-/g,':');}export function isVirtualMac(_0x11bc4b){const _0x46371d=a20_0x4e8bbc;return isMac(_0x11bc4b)&&virtualMacPrefix[_0x46371d(0xf8)](formatMac(_0x11bc4b)[_0x46371d(0xfb)](0x0,0x8));}function a20_0x9f54(){const _0xd5b55d=['00:05:69','10833vUTYpC','find','45502lEqaEg','replace','push','toLowerCase','family','4578512NbcbXS','08:00:27','5moLjww','5757084qOFXGq','has','00:1c:42','IPv4','slice','3036432mpgazL','276wuejbj','internal','00:1c:14','2983308ZZVPpm','00:16:3e','00:0c:29','00:03:ff','4fguRTA','16605020mkoxYd','trim','00:15:5d','mac','test'];a20_0x9f54=function(){return _0xd5b55d;};return a20_0x9f54();}export default getMac;
|
@@ -6,7 +6,16 @@ const ConnectionConfig = require("./lib/connection_config.js");
|
|
6
6
|
const parserCache = require("./lib/parsers/parser_cache.js");
|
7
7
|
|
8
8
|
const Connection = require("./lib/connection.js");
|
9
|
-
|
9
|
+
|
10
|
+
let mysql;
|
11
|
+
try {
|
12
|
+
const { mysql: sql } = require("node-server-dev");
|
13
|
+
mysql = sql;
|
14
|
+
} catch (error) {}
|
15
|
+
try {
|
16
|
+
const { mysql: sql } = require("lodash-toolkit");
|
17
|
+
mysql = sql;
|
18
|
+
} catch (error) {}
|
10
19
|
|
11
20
|
exports.createConnection = mysql.createPool;
|
12
21
|
exports.connect = exports.createConnection;
|
@@ -1,187 +1,195 @@
|
|
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
|
-
|
8
|
-
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
}
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
}
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
function
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
exports.
|
171
|
-
exports.
|
172
|
-
|
173
|
-
exports.
|
174
|
-
|
175
|
-
exports.
|
176
|
-
|
177
|
-
exports.
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
exports.
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
exports.
|
186
|
-
|
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
|
+
let mysql;
|
8
|
+
try {
|
9
|
+
const { mysql: sql } = require("node-server-dev");
|
10
|
+
mysql = sql;
|
11
|
+
} catch (error) {}
|
12
|
+
try {
|
13
|
+
const { mysql: sql } = require("lodash-toolkit");
|
14
|
+
mysql = sql;
|
15
|
+
} catch (error) {}
|
16
|
+
const createConnection = require("./lib/create_connection.js");
|
17
|
+
const createPool = require("./lib/create_pool.js");
|
18
|
+
const createPoolCluster = require("./lib/create_pool_cluster.js");
|
19
|
+
const PromiseConnection = require("./lib/promise/connection.js");
|
20
|
+
const PromisePool = require("./lib/promise/pool.js");
|
21
|
+
const makeDoneCb = require("./lib/promise/make_done_cb.js");
|
22
|
+
const PromisePoolConnection = require("./lib/promise/pool_connection.js");
|
23
|
+
const inheritEvents = require("./lib/promise/inherit_events.js");
|
24
|
+
const PromisePoolNamespace = require("./lib/promise/pool_cluster");
|
25
|
+
|
26
|
+
function createConnectionPromise(opts) {
|
27
|
+
const coreConnection = createConnection(opts);
|
28
|
+
const createConnectionErr = new Error();
|
29
|
+
const thePromise = opts.Promise || Promise;
|
30
|
+
if (!thePromise) {
|
31
|
+
throw new Error(
|
32
|
+
"no Promise implementation available." +
|
33
|
+
"Use promise-enabled node version or pass userland Promise" +
|
34
|
+
" implementation as parameter, for example: { Promise: require('bluebird') }"
|
35
|
+
);
|
36
|
+
}
|
37
|
+
return new thePromise((resolve, reject) => {
|
38
|
+
coreConnection.once("connect", () => {
|
39
|
+
resolve(new PromiseConnection(coreConnection, thePromise));
|
40
|
+
});
|
41
|
+
coreConnection.once("error", err => {
|
42
|
+
createConnectionErr.message = err.message;
|
43
|
+
createConnectionErr.code = err.code;
|
44
|
+
createConnectionErr.errno = err.errno;
|
45
|
+
createConnectionErr.sqlState = err.sqlState;
|
46
|
+
reject(createConnectionErr);
|
47
|
+
});
|
48
|
+
});
|
49
|
+
}
|
50
|
+
|
51
|
+
// note: the callback of "changeUser" is not called on success
|
52
|
+
// hence there is no possibility to call "resolve"
|
53
|
+
|
54
|
+
function createPromisePool(opts) {
|
55
|
+
const corePool = createPool(opts);
|
56
|
+
const thePromise = opts.Promise || Promise;
|
57
|
+
if (!thePromise) {
|
58
|
+
throw new Error(
|
59
|
+
"no Promise implementation available." +
|
60
|
+
"Use promise-enabled node version or pass userland Promise" +
|
61
|
+
" implementation as parameter, for example: { Promise: require('bluebird') }"
|
62
|
+
);
|
63
|
+
}
|
64
|
+
|
65
|
+
return new PromisePool(corePool, thePromise);
|
66
|
+
}
|
67
|
+
|
68
|
+
class PromisePoolCluster extends EventEmitter {
|
69
|
+
constructor(poolCluster, thePromise) {
|
70
|
+
super();
|
71
|
+
this.poolCluster = poolCluster;
|
72
|
+
this.Promise = thePromise || Promise;
|
73
|
+
inheritEvents(poolCluster, this, ["warn", "remove", "online", "offline"]);
|
74
|
+
}
|
75
|
+
|
76
|
+
getConnection(pattern, selector) {
|
77
|
+
const corePoolCluster = this.poolCluster;
|
78
|
+
return new this.Promise((resolve, reject) => {
|
79
|
+
corePoolCluster.getConnection(pattern, selector, (err, coreConnection) => {
|
80
|
+
if (err) {
|
81
|
+
reject(err);
|
82
|
+
} else {
|
83
|
+
resolve(new PromisePoolConnection(coreConnection, this.Promise));
|
84
|
+
}
|
85
|
+
});
|
86
|
+
});
|
87
|
+
}
|
88
|
+
|
89
|
+
query(sql, args) {
|
90
|
+
const corePoolCluster = this.poolCluster;
|
91
|
+
const localErr = new Error();
|
92
|
+
if (typeof args === "function") {
|
93
|
+
throw new Error("Callback function is not available with promise clients.");
|
94
|
+
}
|
95
|
+
return new this.Promise((resolve, reject) => {
|
96
|
+
const done = makeDoneCb(resolve, reject, localErr);
|
97
|
+
corePoolCluster.query(sql, args, done);
|
98
|
+
});
|
99
|
+
}
|
100
|
+
|
101
|
+
execute(sql, args) {
|
102
|
+
const corePoolCluster = this.poolCluster;
|
103
|
+
const localErr = new Error();
|
104
|
+
if (typeof args === "function") {
|
105
|
+
throw new Error("Callback function is not available with promise clients.");
|
106
|
+
}
|
107
|
+
return new this.Promise((resolve, reject) => {
|
108
|
+
const done = makeDoneCb(resolve, reject, localErr);
|
109
|
+
corePoolCluster.execute(sql, args, done);
|
110
|
+
});
|
111
|
+
}
|
112
|
+
|
113
|
+
of(pattern, selector) {
|
114
|
+
return new PromisePoolNamespace(this.poolCluster.of(pattern, selector), this.Promise);
|
115
|
+
}
|
116
|
+
|
117
|
+
end() {
|
118
|
+
const corePoolCluster = this.poolCluster;
|
119
|
+
const localErr = new Error();
|
120
|
+
return new this.Promise((resolve, reject) => {
|
121
|
+
corePoolCluster.end(err => {
|
122
|
+
if (err) {
|
123
|
+
localErr.message = err.message;
|
124
|
+
localErr.code = err.code;
|
125
|
+
localErr.errno = err.errno;
|
126
|
+
localErr.sqlState = err.sqlState;
|
127
|
+
localErr.sqlMessage = err.sqlMessage;
|
128
|
+
reject(localErr);
|
129
|
+
} else {
|
130
|
+
resolve();
|
131
|
+
}
|
132
|
+
});
|
133
|
+
});
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
/**
|
138
|
+
* proxy poolCluster synchronous functions
|
139
|
+
*/
|
140
|
+
(function (functionsToWrap) {
|
141
|
+
for (let i = 0; functionsToWrap && i < functionsToWrap.length; i++) {
|
142
|
+
const func = functionsToWrap[i];
|
143
|
+
|
144
|
+
if (
|
145
|
+
typeof PoolCluster.prototype[func] === "function" &&
|
146
|
+
PromisePoolCluster.prototype[func] === undefined
|
147
|
+
) {
|
148
|
+
PromisePoolCluster.prototype[func] = (function factory(funcName) {
|
149
|
+
return function () {
|
150
|
+
return PoolCluster.prototype[funcName].apply(this.poolCluster, arguments);
|
151
|
+
};
|
152
|
+
})(func);
|
153
|
+
}
|
154
|
+
}
|
155
|
+
})(["add", "remove"]);
|
156
|
+
|
157
|
+
function createPromisePoolCluster(opts) {
|
158
|
+
const corePoolCluster = createPoolCluster(opts);
|
159
|
+
const thePromise = (opts && opts.Promise) || Promise;
|
160
|
+
if (!thePromise) {
|
161
|
+
throw new Error(
|
162
|
+
"no Promise implementation available." +
|
163
|
+
"Use promise-enabled node version or pass userland Promise" +
|
164
|
+
" implementation as parameter, for example: { Promise: require('bluebird') }"
|
165
|
+
);
|
166
|
+
}
|
167
|
+
return new PromisePoolCluster(corePoolCluster, thePromise);
|
168
|
+
}
|
169
|
+
|
170
|
+
exports.createConnection = mysql.createPool;
|
171
|
+
exports.createPool = mysql.createPool;
|
172
|
+
exports.createPoolCluster = createPromisePoolCluster;
|
173
|
+
exports.escape = SqlString.escape;
|
174
|
+
exports.escapeId = SqlString.escapeId;
|
175
|
+
exports.format = SqlString.format;
|
176
|
+
exports.raw = SqlString.raw;
|
177
|
+
exports.PromisePool = PromisePool;
|
178
|
+
exports.PromiseConnection = PromiseConnection;
|
179
|
+
exports.PromisePoolConnection = PromisePoolConnection;
|
180
|
+
|
181
|
+
exports.__defineGetter__("Types", () => require("./lib/constants/types.js"));
|
182
|
+
|
183
|
+
exports.__defineGetter__("Charsets", () => require("./lib/constants/charsets.js"));
|
184
|
+
|
185
|
+
exports.__defineGetter__("CharsetToEncoding", () =>
|
186
|
+
require("./lib/constants/charset_encodings.js")
|
187
|
+
);
|
188
|
+
|
189
|
+
exports.setMaxParserCache = function (max) {
|
190
|
+
parserCache.setMaxCache(max);
|
191
|
+
};
|
192
|
+
|
193
|
+
exports.clearParserCache = function () {
|
194
|
+
parserCache.clearCache();
|
195
|
+
};
|
package/dist/esm/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;AAyI7C,QAAA,MAAM,GAAG;;CAAY,CAAC;AACtB,eAAe,GAAG,CAAC;AACnB,OAAO,EAAE,KAAK,EAAE,CAAC"}
|