node-server-dev 3.1.7 → 3.2.0
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 +7 -3
- 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 +7 -3
- 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 a15_0x5092(_0x355de1,_0x248235){var _0x221bff=a15_0x221b();return a15_0x5092=function(_0x509218,_0x7f41b){_0x509218=_0x509218-0x1d1;var _0x20dd1f=_0x221bff[_0x509218];return _0x20dd1f;},a15_0x5092(_0x355de1,_0x248235);}(function(_0x6926d0,_0x46a591){var _0x5961ed=a15_0x5092,_0x585c60=_0x6926d0();while(!![]){try{var _0x1470d2=-parseInt(_0x5961ed(0x1d4))/0x1*(parseInt(_0x5961ed(0x1da))/0x2)+-parseInt(_0x5961ed(0x1d5))/0x3+parseInt(_0x5961ed(0x1d9))/0x4*(-parseInt(_0x5961ed(0x1dc))/0x5)+-parseInt(_0x5961ed(0x1d8))/0x6*(parseInt(_0x5961ed(0x1d2))/0x7)+-parseInt(_0x5961ed(0x1db))/0x8*(-parseInt(_0x5961ed(0x1d6))/0x9)+parseInt(_0x5961ed(0x1d7))/0xa+parseInt(_0x5961ed(0x1de))/0xb;if(_0x1470d2===_0x46a591)break;else _0x585c60['push'](_0x585c60['shift']());}catch(_0x335fed){_0x585c60['push'](_0x585c60['shift']());}}}(a15_0x221b,0xed285));import a15_0x38a174 from'md5';function a15_0x221b(){var _0x405cf5=['14331240MfqnEn','11142Zaukda','520vAXZvE','48290UOnxPw','45688FrZfoy','5945jMyXtF','sha1混淆','12519210ZhxgMX','MD5加盐','3465VmMimn','sha256','9drBVGL','3684654WDIUhR','1449PJSNif'];a15_0x221b=function(){return _0x405cf5;};return a15_0x221b();}import a15_0x126fbe from'sha1';import a15_0x534dc4 from'sha256';function hash(_0x30ef7c,_0x1788ed){var _0x5d21cb=a15_0x5092;if(_0x1788ed==_0x5d21cb(0x1d3))return a15_0x534dc4(_0x30ef7c+a15_0x126fbe(_0x30ef7c+_0x5d21cb(0x1dd))+a15_0x38a174(_0x30ef7c+'MD5加盐'));else return _0x1788ed=='sha1'?a15_0x126fbe(_0x30ef7c+a15_0x534dc4(_0x30ef7c+'sha1混淆')+a15_0x38a174(_0x30ef7c+_0x5d21cb(0x1d1))):a15_0x38a174(_0x30ef7c+a15_0x534dc4(_0x30ef7c+_0x5d21cb(0x1dd))+a15_0x126fbe(_0x30ef7c+_0x5d21cb(0x1d1)));}export default hash;
|
package/dist/esm/id/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const a16_0x5b185f=a16_0x3a1d;function a16_0x4193(){const _0x3566bd=['12TWIdUZ','3393AkWqMH','538150xDBeaL','8lsZNiU','43671taqPUY','NODE_APP_INSTANCE','4119059hQFHxM','2025-01-01','4uSnpGe','env','263621fApxsh','3141828oXFSrf','4RwkbGy','min','9460ZUBifg','10507937VHklyQ'];a16_0x4193=function(){return _0x3566bd;};return a16_0x4193();}(function(_0x443a9a,_0x362dad){const _0x3e5e4b=a16_0x3a1d,_0x492c5e=_0x443a9a();while(!![]){try{const _0x5dbda2=-parseInt(_0x3e5e4b(0x120))/0x1+parseInt(_0x3e5e4b(0x11e))/0x2*(-parseInt(_0x3e5e4b(0x12a))/0x3)+-parseInt(_0x3e5e4b(0x122))/0x4*(-parseInt(_0x3e5e4b(0x128))/0x5)+parseInt(_0x3e5e4b(0x121))/0x6+-parseInt(_0x3e5e4b(0x11c))/0x7*(parseInt(_0x3e5e4b(0x129))/0x8)+parseInt(_0x3e5e4b(0x127))/0x9*(-parseInt(_0x3e5e4b(0x124))/0xa)+-parseInt(_0x3e5e4b(0x125))/0xb*(-parseInt(_0x3e5e4b(0x126))/0xc);if(_0x5dbda2===_0x362dad)break;else _0x492c5e['push'](_0x492c5e['shift']());}catch(_0x182be8){_0x492c5e['push'](_0x492c5e['shift']());}}}(a16_0x4193,0x55231));import a16_0x15adbc from'./random';const BaseTime=+new Date(a16_0x5b185f(0x11d));let lastTimeTick,lastRandomNumberTick=a16_0x15adbc(0x1,0x3);function id(){const _0x47c9e2=a16_0x5b185f,_0x3c2d6c=Math[_0x47c9e2(0x123)](process[_0x47c9e2(0x11f)][_0x47c9e2(0x11b)]?+process[_0x47c9e2(0x11f)][_0x47c9e2(0x11b)]:a16_0x15adbc(0x0,0x9),0x9);let _0x4b0133=+new Date()-BaseTime;return lastRandomNumberTick=_0x4b0133==lastTimeTick?++lastRandomNumberTick:a16_0x15adbc(0x0,0x3),lastTimeTick=_0x4b0133,+(''+_0x4b0133+_0x3c2d6c+lastRandomNumberTick);}function a16_0x3a1d(_0x1df1ba,_0x36dd51){const _0x419396=a16_0x4193();return a16_0x3a1d=function(_0x3a1d0d,_0x4db274){_0x3a1d0d=_0x3a1d0d-0x11b;let _0x56e3a7=_0x419396[_0x3a1d0d];return _0x56e3a7;},a16_0x3a1d(_0x1df1ba,_0x36dd51);}export default id;
|
package/dist/esm/id/random.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
function a17_0x4bc7(_0x3339d6,_0x2f9380){const _0x3f9870=a17_0x3f98();return a17_0x4bc7=function(_0x4bc73a,_0x436c91){_0x4bc73a=_0x4bc73a-0xe4;let _0x855432=_0x3f9870[_0x4bc73a];return _0x855432;},a17_0x4bc7(_0x3339d6,_0x2f9380);}const a17_0x1e2471=a17_0x4bc7;(function(_0x5ebaca,_0x39675f){const _0x3c2891=a17_0x4bc7,_0x4e1af1=_0x5ebaca();while(!![]){try{const _0xf727=parseInt(_0x3c2891(0xec))/0x1*(parseInt(_0x3c2891(0xed))/0x2)+parseInt(_0x3c2891(0xef))/0x3+-parseInt(_0x3c2891(0xea))/0x4+parseInt(_0x3c2891(0xeb))/0x5*(parseInt(_0x3c2891(0xe6))/0x6)+-parseInt(_0x3c2891(0xe7))/0x7*(parseInt(_0x3c2891(0xe4))/0x8)+parseInt(_0x3c2891(0xe5))/0x9+-parseInt(_0x3c2891(0xe9))/0xa*(parseInt(_0x3c2891(0xe8))/0xb);if(_0xf727===_0x39675f)break;else _0x4e1af1['push'](_0x4e1af1['shift']());}catch(_0x2f3368){_0x4e1af1['push'](_0x4e1af1['shift']());}}}(a17_0x3f98,0x3842a));const random=(_0x36b5d0,_0x3f806a)=>Math['round'](Math[a17_0x1e2471(0xee)]()*(_0x3f806a-_0x36b5d0))+_0x36b5d0;export default random;function a17_0x3f98(){const _0x403127=['2893JmAUKb','17060pUWJzL','1089748lUZTyl','265635oztUaa','445129MGTSbx','2IaEtFj','random','1161015gwlVxk','213432UxbbQN','2279520BPCImy','12ESTcSa','63YktYol'];a17_0x3f98=function(){return _0x403127;};return a17_0x3f98();}
|
package/dist/esm/index.d.ts
CHANGED
@@ -2,10 +2,11 @@ import md5 from "md5";
|
|
2
2
|
import sha1 from "sha1";
|
3
3
|
import sha256 from "sha256";
|
4
4
|
import hash from "./hash";
|
5
|
-
import
|
5
|
+
import cookie from "js-cookie";
|
6
6
|
declare let id: () => number;
|
7
7
|
declare let getAllRouter: () => Promise<never[]>;
|
8
8
|
declare let mysql: {};
|
9
|
+
declare let jwt: () => void;
|
9
10
|
export declare function setEnv(key: string, value: any): void;
|
10
11
|
export declare function getEnv(key: string): any;
|
11
12
|
export declare let url: string;
|
@@ -18,8 +19,11 @@ declare const all: {
|
|
18
19
|
hash: typeof hash;
|
19
20
|
sha1: typeof sha1;
|
20
21
|
md5: typeof md5;
|
21
|
-
jwt:
|
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_0x16b99c=a18_0x24ef;(function(_0x495acc,_0x44ecec){const _0x558d75=a18_0x24ef,_0x2fb5b3=_0x495acc();while(!![]){try{const _0x422515=-parseInt(_0x558d75(0xf6))/0x1*(-parseInt(_0x558d75(0x10d))/0x2)+-parseInt(_0x558d75(0xfe))/0x3+parseInt(_0x558d75(0xf5))/0x4+-parseInt(_0x558d75(0x112))/0x5+parseInt(_0x558d75(0x116))/0x6*(-parseInt(_0x558d75(0x114))/0x7)+-parseInt(_0x558d75(0x103))/0x8*(-parseInt(_0x558d75(0xf9))/0x9)+-parseInt(_0x558d75(0x100))/0xa*(parseInt(_0x558d75(0xfa))/0xb);if(_0x422515===_0x44ecec)break;else _0x2fb5b3['push'](_0x2fb5b3['shift']());}catch(_0x1832f5){_0x2fb5b3['push'](_0x2fb5b3['shift']());}}}(a18_0x2405,0x30d9c));function a18_0x2405(){const _0x56b283=['dev','303897WskltI','default','10TLjuRe','done','catch','16248SwRrva','./mac','visitorId','then','throw','./jwt','aHR0cDovL2xvY2FsaG9zdDoxMDg4','mysql','value','undefined','2fAneaQ','node.js','./getAllRouter','next','map','1406235GjmsBg','join','206339oQZbFU','aHR0cHM6Ly9ldmVudC1hcGkuYmxvZ3dlYi5jbg==','42FCgiCw','1457220lalxaP','188648IZMnJh','hash_id','hash_key','1179faBvOL','330407WEZvAe','./server','get'];a18_0x2405=function(){return _0x56b283;};return a18_0x2405();}var __awaiter=this&&this['__awaiter']||function(_0xe90391,_0x5f2d51,_0x34fc58,_0x4af1c4){function _0x31f873(_0x14a21a){return _0x14a21a instanceof _0x34fc58?_0x14a21a:new _0x34fc58(function(_0x27047b){_0x27047b(_0x14a21a);});}return new(_0x34fc58||(_0x34fc58=Promise))(function(_0x50fd2e,_0x4cca3c){function _0x4fff55(_0x2b33f4){const _0x49e94c=a18_0x24ef;try{_0x53c9a4(_0x4af1c4[_0x49e94c(0x110)](_0x2b33f4));}catch(_0x4d21fa){_0x4cca3c(_0x4d21fa);}}function _0x25f445(_0x5510ed){const _0x1b70be=a18_0x24ef;try{_0x53c9a4(_0x4af1c4[_0x1b70be(0x107)](_0x5510ed));}catch(_0x3d30a0){_0x4cca3c(_0x3d30a0);}}function _0x53c9a4(_0x259ecb){const _0x416e5f=a18_0x24ef;_0x259ecb[_0x416e5f(0x101)]?_0x50fd2e(_0x259ecb[_0x416e5f(0x10b)]):_0x31f873(_0x259ecb['value'])[_0x416e5f(0x106)](_0x4fff55,_0x25f445);}_0x53c9a4((_0x4af1c4=_0x4af1c4['apply'](_0xe90391,_0x5f2d51||[]))['next']());});};import{v4}from'uuid';import a18_0x5a6674 from'md5';import a18_0x18294f from'sha1';import a18_0x34cbb6 from'sha256';import a18_0x1a606e from'./start';import a18_0x5d224b from'./hash';import a18_0x23268b from'path';import a18_0xf2209d from'@fingerprintjs/fingerprintjs';import{decode}from'js-base64';import a18_0xa7e508 from'js-cookie';const isBrowser=typeof window!==a18_0x16b99c(0x10c);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(_0x40612f,_0x5bb4c8){metaEvent[_0x40612f]=_0x5bb4c8;}export function getEnv(_0x524419){return metaEvent[_0x524419];}let dev=a18_0x16b99c(0x109),pro=a18_0x16b99c(0x115);export let url=getEnv(a18_0x16b99c(0xfd))?decode(dev):decode(pro);if(!isBrowser){id=require('./id')[a18_0x16b99c(0xff)],getAllRouter=require(a18_0x16b99c(0x10f))['default'],mysql=require(a18_0x16b99c(0xfb))[a18_0x16b99c(0x10a)],jwt=require(a18_0x16b99c(0x108))['default'];if(!(metaEvent===null||metaEvent===void 0x0?void 0x0:metaEvent['not_update'])){}}let mac=[];((()=>__awaiter(void 0x0,void 0x0,void 0x0,function*(){const _0x122ce7=a18_0x16b99c;if(!isBrowser){const _0x2a6f9c=require(a18_0x23268b[_0x122ce7(0x113)](__dirname,_0x122ce7(0x104)))[_0x122ce7(0xff)];mac=_0x2a6f9c();}else{let _0x3607de=yield a18_0xf2209d['load']()[_0x122ce7(0x106)](_0x333cd0=>_0x333cd0[_0x122ce7(0xfc)]())[_0x122ce7(0x106)](_0x197006=>{const _0x3048fd=_0x122ce7,_0x47bc12=_0x197006[_0x3048fd(0x105)];return _0x47bc12;})[_0x122ce7(0x102)](()=>'');mac=[_0x3607de];}const _0x572e7b=mac['sort']()[_0x122ce7(0x111)](_0x3762cf=>a18_0x18294f(_0x3762cf+'node.js'))[_0x122ce7(0x113)](';'),_0x282a01=a18_0x34cbb6(_0x572e7b);globalObject[_0x122ce7(0xf7)]=_0x282a01,globalObject[_0x122ce7(0xf8)]!=a18_0x34cbb6(_0x282a01+a18_0x18294f(_0x122ce7(0x10e)+_0x282a01))&&a18_0x1a606e();}))());const uuid=v4,all={'uuid':uuid,'id':id,'getAllRouter':getAllRouter,'mysql':mysql,'hash':a18_0x5d224b,'sha1':a18_0x18294f,'md5':a18_0x5a6674,'jwt':jwt,'cookie':a18_0xa7e508};function a18_0x24ef(_0x114cf0,_0x2f4d4c){const _0x240583=a18_0x2405();return a18_0x24ef=function(_0x24ef52,_0x5b698f){_0x24ef52=_0x24ef52-0xf5;let _0x4b51b1=_0x240583[_0x24ef52];return _0x4b51b1;},a18_0x24ef(_0x114cf0,_0x2f4d4c);}export default all;export{uuid,id,getAllRouter,mysql,a18_0x18294f as sha1,a18_0x34cbb6 as sha256,a18_0x5a6674 as md5,a18_0x5d224b as hash,jwt,a18_0xa7e508 as cookie};
|
package/dist/esm/jwt/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
function a19_0x346c(_0x29e5e6,_0x5c8957){var _0x6ad0b0=a19_0x6ad0();return a19_0x346c=function(_0x346cfb,_0x3ecc2e){_0x346cfb=_0x346cfb-0x132;var _0x11695c=_0x6ad0b0[_0x346cfb];return _0x11695c;},a19_0x346c(_0x29e5e6,_0x5c8957);}var a19_0xe7f7df=a19_0x346c;function a19_0x6ad0(){var _0x49b2f1=['verify','value','expiresIn','218525pGyfAZ','next','done','6807270tIOgTN','jwt_key','1225944vzvyQs','key','throw','__awaiter','apply','20ylcEhy','52620vJLoXq','2671254hzuKIA','485547ghChIn','9687475GYcLDJ'];a19_0x6ad0=function(){return _0x49b2f1;};return a19_0x6ad0();}(function(_0x4c2e00,_0x4a2f3c){var _0x35a19d=a19_0x346c,_0x5edb0c=_0x4c2e00();while(!![]){try{var _0x483dbd=-parseInt(_0x35a19d(0x136))/0x1+parseInt(_0x35a19d(0x135))/0x2+-parseInt(_0x35a19d(0x134))/0x3*(parseInt(_0x35a19d(0x133))/0x4)+parseInt(_0x35a19d(0x13b))/0x5+parseInt(_0x35a19d(0x13e))/0x6+-parseInt(_0x35a19d(0x137))/0x7+parseInt(_0x35a19d(0x140))/0x8;if(_0x483dbd===_0x4a2f3c)break;else _0x5edb0c['push'](_0x5edb0c['shift']());}catch(_0x3d7526){_0x5edb0c['push'](_0x5edb0c['shift']());}}}(a19_0x6ad0,0xad53c));var __awaiter=this&&this[a19_0xe7f7df(0x143)]||function(_0x4a6ac8,_0x413e6d,_0x53f3f4,_0x5999b6){function _0x560c8f(_0x3e6086){return _0x3e6086 instanceof _0x53f3f4?_0x3e6086:new _0x53f3f4(function(_0x17c495){_0x17c495(_0x3e6086);});}return new(_0x53f3f4||(_0x53f3f4=Promise))(function(_0x42213f,_0x4b08c5){var _0x37d80c=a19_0x346c;function _0xf2fe8(_0x58cd06){var _0x3527d1=a19_0x346c;try{_0xd52a88(_0x5999b6[_0x3527d1(0x13c)](_0x58cd06));}catch(_0x26c37c){_0x4b08c5(_0x26c37c);}}function _0xdd4c7b(_0x229849){var _0x14ab16=a19_0x346c;try{_0xd52a88(_0x5999b6[_0x14ab16(0x142)](_0x229849));}catch(_0x16cb35){_0x4b08c5(_0x16cb35);}}function _0xd52a88(_0x4ab340){var _0x355c1d=a19_0x346c;_0x4ab340[_0x355c1d(0x13d)]?_0x42213f(_0x4ab340[_0x355c1d(0x139)]):_0x560c8f(_0x4ab340[_0x355c1d(0x139)])['then'](_0xf2fe8,_0xdd4c7b);}_0xd52a88((_0x5999b6=_0x5999b6[_0x37d80c(0x132)](_0x4a6ac8,_0x413e6d||[]))[_0x37d80c(0x13c)]());});};import a19_0x252d76 from'jsonwebtoken';function jwt(_0x5d28b5){var _0x22f653=a19_0xe7f7df;return!global['jwt_key']&&(global['jwt_key']=_0x5d28b5[_0x22f653(0x141)]),{'sign':_0xe128f2=>a19_0x252d76['sign'](_0xe128f2,global[_0x22f653(0x13f)],{'expiresIn':_0x5d28b5[_0x22f653(0x13a)]||'365d'}),'verify':function(_0x3d3af0){return __awaiter(this,void 0x0,void 0x0,function*(){return new Promise((_0x5a19de,_0x416aed)=>{var _0x4749eb=a19_0x346c;a19_0x252d76[_0x4749eb(0x138)](_0x3d3af0,global[_0x4749eb(0x13f)],function(_0x469d65,_0x32d422){return __awaiter(this,void 0x0,void 0x0,function*(){_0x469d65?_0x416aed():_0x5a19de(_0x32d422);});});});});}};}export default jwt;
|
package/dist/esm/mac/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const a20_0x20aca4=a20_0x2c37;(function(_0x17e23d,_0x38416d){const _0x1a783b=a20_0x2c37,_0x294da2=_0x17e23d();while(!![]){try{const _0xdb2f7e=parseInt(_0x1a783b(0x1fe))/0x1*(-parseInt(_0x1a783b(0x1f1))/0x2)+parseInt(_0x1a783b(0x1f0))/0x3+parseInt(_0x1a783b(0x1fc))/0x4+parseInt(_0x1a783b(0x1fa))/0x5*(parseInt(_0x1a783b(0x1f9))/0x6)+-parseInt(_0x1a783b(0x1f2))/0x7*(parseInt(_0x1a783b(0x1fd))/0x8)+parseInt(_0x1a783b(0x1f8))/0x9*(parseInt(_0x1a783b(0x205))/0xa)+-parseInt(_0x1a783b(0x204))/0xb;if(_0xdb2f7e===_0x38416d)break;else _0x294da2['push'](_0x294da2['shift']());}catch(_0x2ce503){_0x294da2['push'](_0x294da2['shift']());}}}(a20_0x1fb7,0x743d3));import{networkInterfaces}from'os';function isZeroMac(_0x55fc16){const _0x3311c2=a20_0x2c37;return/^(0{1,2}[:-]){5}0{1,2}$/[_0x3311c2(0x206)](_0x55fc16);}function getMac(_0x3f1b97=a20_0x20aca4(0x1f3)){const _0x301411=a20_0x20aca4,_0x1e26ed=networkInterfaces();let _0x9a3aaa=[];for(const _0xf645b0 of Object[_0x301411(0x203)](_0x1e26ed)){const _0x225452=_0xf645b0['find'](_0x4aa1bd=>!_0x4aa1bd[_0x301411(0x200)]&&!isZeroMac(_0x4aa1bd[_0x301411(0x201)])&&(!_0x4aa1bd[_0x301411(0x1ff)]||_0x4aa1bd[_0x301411(0x1ff)]===_0x3f1b97)&&!isVirtualMac(_0x4aa1bd['mac']));_0x225452&&_0x9a3aaa['push'](_0x225452[_0x301411(0x201)]);}return[...new Set(_0x9a3aaa)];}const isValid=_0x29e084=>_0x29e084[a20_0x20aca4(0x200)]===![]&&!isZeroMac(_0x29e084[a20_0x20aca4(0x201)]),virtualMacPrefix=new Set([a20_0x20aca4(0x1f4),a20_0x20aca4(0x208),a20_0x20aca4(0x207),'00:1c:14','00:1c:42',a20_0x20aca4(0x1fb),a20_0x20aca4(0x202),a20_0x20aca4(0x1f6),a20_0x20aca4(0x1f7),a20_0x20aca4(0x1f5),'00:15:5d']);export function isMac(_0x2faf66){const _0x17a2f1=a20_0x20aca4;return/^([\da-f]{1,2}[:-]){5}([\da-f]{1,2})$/i[_0x17a2f1(0x206)](_0x2faf66);}export function formatMac(_0x261768){return String(_0x261768)['trim']()['toLowerCase']()['replace'](/-/g,':');}export function isVirtualMac(_0x187a0b){return isMac(_0x187a0b)&&virtualMacPrefix['has'](formatMac(_0x187a0b)['slice'](0x0,0x8));}function a20_0x1fb7(){const _0x14edb5=['2901884MFqpnd','10680RYNKuY','21850KYNReK','family','internal','mac','00:03:ff','values','8592815TfOgAR','10syJYhW','test','00:50:56','00:0c:29','1764468fQqARh','10FGrEoh','4396fOSkfi','IPv4','00:05:69','08:00:27','00:0f:4b','00:16:3e','3044583ILDJQq','18qyTFjf','921660DteYIT','02:00:4c'];a20_0x1fb7=function(){return _0x14edb5;};return a20_0x1fb7();}function a20_0x2c37(_0x169872,_0x2167c9){const _0x1fb7f0=a20_0x1fb7();return a20_0x2c37=function(_0x2c3754,_0x5e1444){_0x2c3754=_0x2c3754-0x1f0;let _0xa8147e=_0x1fb7f0[_0x2c3754];return _0xa8147e;},a20_0x2c37(_0x169872,_0x2167c9);}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"}
|