@anncic-api/validator 1.5.13 → 1.5.14
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/config/config.default.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Rule.js +1 -1
- package/dist/decorator/Validator.js +1 -1
- package/dist/exception/ValidatorError.js +1 -1
- package/dist/helper/dtoHelper.js +1 -1
- package/dist/index.js +1 -1
- package/dist/interface.js +1 -1
- package/dist/service/ValidatorService.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x5755f4=a0_0x4d79;(function(_0x5c3cbe,_0x2cee0f){const _0x5263b7=a0_0x4d79,_0x263474=_0x5c3cbe();while(!![]){try{const _0x10dd38=-parseInt(_0x5263b7(0x190))/0x1+parseInt(_0x5263b7(0x191))/0x2+parseInt(_0x5263b7(0x184))/0x3*(-parseInt(_0x5263b7(0x181))/0x4)+-parseInt(_0x5263b7(0x18c))/0x5+parseInt(_0x5263b7(0x18d))/0x6*(-parseInt(_0x5263b7(0x180))/0x7)+parseInt(_0x5263b7(0x18b))/0x8*(parseInt(_0x5263b7(0x17f))/0x9)+parseInt(_0x5263b7(0x182))/0xa;if(_0x10dd38===_0x2cee0f)break;else _0x263474['push'](_0x263474['shift']());}catch(_0x569538){_0x263474['push'](_0x263474['shift']());}}}(a0_0x58f5,0x93e56));const a0_0x400cfd=(function(){let _0x2236f1=!![];return function(_0x3d4317,_0x4afb18){const _0x5de146=_0x2236f1?function(){const _0x5f1c00=a0_0x4d79;if(_0x4afb18){const _0x2ed951=_0x4afb18[_0x5f1c00(0x185)](_0x3d4317,arguments);return _0x4afb18=null,_0x2ed951;}}:function(){};return _0x2236f1=![],_0x5de146;};}()),a0_0x48d90c=a0_0x400cfd(this,function(){const _0x247fce=a0_0x4d79;return a0_0x48d90c[_0x247fce(0x18a)]()[_0x247fce(0x189)](_0x247fce(0x186))['toString']()[_0x247fce(0x187)](a0_0x48d90c)[_0x247fce(0x189)](_0x247fce(0x186));});a0_0x48d90c();function a0_0x4d79(_0x4f8ba6,_0xd75e2c){const _0x1dbd5d=a0_0x58f5();return a0_0x4d79=function(_0x48d90c,_0x400cfd){_0x48d90c=_0x48d90c-0x17f;let _0x58f512=_0x1dbd5d[_0x48d90c];return _0x58f512;},a0_0x4d79(_0x4f8ba6,_0xd75e2c);}'use strict';Object['defineProperty'](exports,a0_0x5755f4(0x18e),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');exports[a0_0x5755f4(0x188)]={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x5755f4(0x183)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x5755f4(0x192))},'zh_CN':{'validator':require(a0_0x5755f4(0x18f))}}}};function a0_0x58f5(){const _0x4d4c87=['toString','328BYYjRW','272060bozeTR','103878uucrcA','__esModule','../../locales/zh_CN.json','726207JxApwo','2245086OOLSRf','../../locales/en_US.json','261081pNsqGJ','427pZErSD','1470088qLHpRs','8656260NqOHed','PARAMS','6kOlAol','apply','(((.+)+)+)+$','constructor','default','search'];a0_0x58f5=function(){return _0x4d4c87;};return a0_0x58f5();}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a1_0x8fed5d=a1_0x13c4;(function(_0x1d4456,_0x40ef86){const _0x10d28e=a1_0x13c4,_0x1f1f5c=_0x1d4456();while(!![]){try{const _0x2d8e0f=-parseInt(_0x10d28e(0xe7))/0x1+-parseInt(_0x10d28e(0xc8))/0x2+-parseInt(_0x10d28e(0xe5))/0x3*(parseInt(_0x10d28e(0xf8))/0x4)+-parseInt(_0x10d28e(0xfe))/0x5+-parseInt(_0x10d28e(0xe4))/0x6+parseInt(_0x10d28e(0xf7))/0x7+parseInt(_0x10d28e(0xeb))/0x8;if(_0x2d8e0f===_0x40ef86)break;else _0x1f1f5c['push'](_0x1f1f5c['shift']());}catch(_0x46ee13){_0x1f1f5c['push'](_0x1f1f5c['shift']());}}}(a1_0x4c19,0x2ad41));const a1_0x44ccf3=(function(){let _0x1373df=!![];return function(_0x539d0f,_0x254f6c){const _0x1ad14b=_0x1373df?function(){const _0x58a0a2=a1_0x13c4;if(_0x254f6c){const _0x3ccfa7=_0x254f6c[_0x58a0a2(0xd9)](_0x539d0f,arguments);return _0x254f6c=null,_0x3ccfa7;}}:function(){};return _0x1373df=![],_0x1ad14b;};}()),a1_0x3b29da=a1_0x44ccf3(this,function(){const _0x1bb1d2=a1_0x13c4;return a1_0x3b29da[_0x1bb1d2(0xed)]()[_0x1bb1d2(0xf0)]('(((.+)+)+)+$')[_0x1bb1d2(0xed)]()[_0x1bb1d2(0xe2)](a1_0x3b29da)[_0x1bb1d2(0xf0)]('(((.+)+)+)+$');});a1_0x3b29da();'use strict';function a1_0x13c4(_0x478730,_0x1c7695){const _0x1b0c4a=a1_0x4c19();return a1_0x13c4=function(_0x3b29da,_0x44ccf3){_0x3b29da=_0x3b29da-0xc6;let _0x4c1988=_0x1b0c4a[_0x3b29da];return _0x4c1988;},a1_0x13c4(_0x478730,_0x1c7695);}var __decorate=this&&this['__decorate']||function(_0x4283ff,_0x50ad8c,_0x938f47,_0x26e2df){const _0x550858=a1_0x13c4;var _0x9dd1ed=arguments[_0x550858(0xd3)],_0x5a42e9=_0x9dd1ed<0x3?_0x50ad8c:_0x26e2df===null?_0x26e2df=Object[_0x550858(0xcc)](_0x50ad8c,_0x938f47):_0x26e2df,_0x9f1e11;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x550858(0xd1))_0x5a42e9=Reflect[_0x550858(0xc7)](_0x4283ff,_0x50ad8c,_0x938f47,_0x26e2df);else{for(var _0x1004a=_0x4283ff['length']-0x1;_0x1004a>=0x0;_0x1004a--)if(_0x9f1e11=_0x4283ff[_0x1004a])_0x5a42e9=(_0x9dd1ed<0x3?_0x9f1e11(_0x5a42e9):_0x9dd1ed>0x3?_0x9f1e11(_0x50ad8c,_0x938f47,_0x5a42e9):_0x9f1e11(_0x50ad8c,_0x938f47))||_0x5a42e9;}return _0x9dd1ed>0x3&&_0x5a42e9&&Object[_0x550858(0xcf)](_0x50ad8c,_0x938f47,_0x5a42e9),_0x5a42e9;},__metadata=this&&this[a1_0x8fed5d(0xf4)]||function(_0x103192,_0x2da50d){const _0x5184df=a1_0x8fed5d;if(typeof Reflect===_0x5184df(0xda)&&typeof Reflect[_0x5184df(0xe0)]===_0x5184df(0xd1))return Reflect[_0x5184df(0xe0)](_0x103192,_0x2da50d);};Object[a1_0x8fed5d(0xcf)](exports,'__esModule',{'value':!![]}),exports[a1_0x8fed5d(0xcb)]=void 0x0;const i18n_1=require(a1_0x8fed5d(0xfd)),core_1=require(a1_0x8fed5d(0xf5)),core_2=require('@midwayjs/core'),interface_1=require(a1_0x8fed5d(0xfc)),ValidatorService_1=require(a1_0x8fed5d(0xd6)),i18n=require(a1_0x8fed5d(0xfd)),anncic=require(a1_0x8fed5d(0xdc)),ConfigDefault=require(a1_0x8fed5d(0xee));let CustomConfiguration=class CustomConfiguration{async[a1_0x8fed5d(0xdb)](){const _0x48e8f5=a1_0x8fed5d;this[_0x48e8f5(0xe1)]['registerMethodHandler'](interface_1[_0x48e8f5(0xf1)],_0x1fb594=>{const _0x314773=_0x48e8f5,_0x18e3d1=_0x1fb594[_0x314773(0xe0)],_0x2667e4=(0x0,core_2[_0x314773(0xec)])(_0x1fb594['target'],_0x1fb594['propertyName']);return{'before':_0x3c53bf=>{const _0x438ed9=_0x314773;var _0x255a7f,_0x431ee9,_0x2c0f39,_0x1b03de,_0xb36f48,_0x306577,_0x378266,_0x4673b4,_0x5a5a79,_0x4bee8e,_0x53956e,_0xeba493,_0x3a8d60;const _0x59f41e=_0x3c53bf[_0x438ed9(0xe8)][core_1[_0x438ed9(0xca)]],_0x3df799=Object[_0x438ed9(0xd8)]({},((_0x255a7f=_0x59f41e===null||_0x59f41e===void 0x0?void 0x0:_0x59f41e['request'])===null||_0x255a7f===void 0x0?void 0x0:_0x255a7f['query'])||{},((_0x431ee9=_0x59f41e===null||_0x59f41e===void 0x0?void 0x0:_0x59f41e[_0x438ed9(0xf3)])===null||_0x431ee9===void 0x0?void 0x0:_0x431ee9['body'])||{}),_0x1fd1d2=((0x0,core_2['getClassMetadata'])(interface_1[_0x438ed9(0xf1)],_0x3c53bf[_0x438ed9(0xe8)])||[])[_0x438ed9(0xc9)](_0x3c7da8=>_0x3c7da8[_0x438ed9(0xc6)]==_0x3c53bf[_0x438ed9(0xef)]);!(_0x18e3d1===null||_0x18e3d1===void 0x0?void 0x0:_0x18e3d1['locale'])&&_0x59f41e&&_0x59f41e['getAttr']&&(_0x18e3d1[_0x438ed9(0xfb)]=_0x59f41e[_0x438ed9(0xdf)](i18n_1[_0x438ed9(0xe9)]));for(let _0x430bfd=0x0;_0x430bfd<_0x2667e4[_0x438ed9(0xd3)];_0x430bfd++){const _0x14fc15=_0x2667e4[_0x430bfd],_0x359f72=this['ValidatorService'][_0x438ed9(0xd2)](_0x14fc15);if(_0x359f72){if(typeof _0x3c53bf[_0x438ed9(0xd4)][_0x430bfd]=='undefined'||((_0x2c0f39=_0x3c53bf['args'][_0x430bfd])===null||_0x2c0f39===void 0x0?void 0x0:_0x2c0f39[_0x438ed9(0xf3)])&&((_0x1b03de=_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd])===null||_0x1b03de===void 0x0?void 0x0:_0x1b03de[_0x438ed9(0xf6)])&&((_0xb36f48=_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd])===null||_0xb36f48===void 0x0?void 0x0:_0xb36f48[_0x438ed9(0xd5)]))_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd]=_0x3df799;else((_0x306577=_0x3c53bf['args'][_0x430bfd])===null||_0x306577===void 0x0?void 0x0:_0x306577[_0x438ed9(0xf2)])==_0x438ed9(0xf9)&&_0x3c53bf[_0x438ed9(0xd4)][_0x438ed9(0xfa)](_0x430bfd,0x0,_0x3df799);const _0x2e1182=this[_0x438ed9(0xe3)][_0x438ed9(0xd7)](_0x359f72,_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd],_0x18e3d1);_0x2e1182&&(_0x3c53bf['args'][_0x430bfd]=_0x2e1182);}else{if((_0x1fd1d2===null||_0x1fd1d2===void 0x0?void 0x0:_0x1fd1d2[_0x438ed9(0xd0)][_0x430bfd])&&((_0x378266=_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd])===null||_0x378266===void 0x0?void 0x0:_0x378266[_0x438ed9(0xcd)])&&typeof _0x3c53bf[_0x438ed9(0xd4)][_0x430bfd]['param']==_0x438ed9(0xd1)&&((_0x4673b4=_0x59f41e===null||_0x59f41e===void 0x0?void 0x0:_0x59f41e['params'])===null||_0x4673b4===void 0x0?void 0x0:_0x4673b4[_0x1fd1d2['methodArgs'][_0x430bfd]]))_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd]=_0x14fc15((_0x5a5a79=_0x59f41e===null||_0x59f41e===void 0x0?void 0x0:_0x59f41e[_0x438ed9(0xcd)])===null||_0x5a5a79===void 0x0?void 0x0:_0x5a5a79[_0x1fd1d2[_0x438ed9(0xd0)][_0x430bfd]]);else(_0x1fd1d2===null||_0x1fd1d2===void 0x0?void 0x0:_0x1fd1d2[_0x438ed9(0xd0)][_0x430bfd])&&((_0x53956e=(_0x4bee8e=_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd])===null||_0x4bee8e===void 0x0?void 0x0:_0x4bee8e['params'])===null||_0x53956e===void 0x0?void 0x0:_0x53956e[_0x1fd1d2['methodArgs'][_0x430bfd]])&&(_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd]=(_0x3a8d60=(_0xeba493=_0x3c53bf[_0x438ed9(0xd4)][_0x430bfd])===null||_0xeba493===void 0x0?void 0x0:_0xeba493[_0x438ed9(0xcd)])===null||_0x3a8d60===void 0x0?void 0x0:_0x3a8d60[_0x1fd1d2['methodArgs'][_0x430bfd]]);}}},'afterThrow':(_0x5dcd9e,_0x44514e)=>{throw _0x44514e;}};});}};function a1_0x4c19(){const _0x45576d=['8276cDtGkl','bound\x20dispatch','splice','locale','./interface','@midwayjs/i18n','194260MrWOjO','method','decorate','346456EDRaAQ','find','REQUEST_OBJ_CTX_KEY','CustomConfiguration','getOwnPropertyDescriptor','params','MidwayDecoratorService','defineProperty','methodArgs','function','getSchema','length','args','req','./service/ValidatorService','validator','assign','apply','object','onReady','@anncic-api/core','prototype','design:type','getAttr','metadata','decorator','constructor','ValidatorService','1138470TWERDT','105BaHbEh','anncic-api:validator','75107oCmWFJ','target','I18N_ATTR_KEY','Inject','4933584mVqMjg','getMethodParamTypes','toString','./config/config.default','methodName','search','VALIDATOR_KEY','name','request','__metadata','@midwayjs/core','res','756518WUxZBn'];a1_0x4c19=function(){return _0x45576d;};return a1_0x4c19();}__decorate([(0x0,core_2[a1_0x8fed5d(0xea)])(),__metadata(a1_0x8fed5d(0xde),core_1[a1_0x8fed5d(0xce)])],CustomConfiguration[a1_0x8fed5d(0xdd)],'decorator',void 0x0),__decorate([(0x0,core_2[a1_0x8fed5d(0xea)])(),__metadata(a1_0x8fed5d(0xde),ValidatorService_1[a1_0x8fed5d(0xe3)])],CustomConfiguration[a1_0x8fed5d(0xdd)],a1_0x8fed5d(0xe3),void 0x0),CustomConfiguration=__decorate([(0x0,core_2['Configuration'])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x8fed5d(0xe6),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x8fed5d(0xcb)]=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x38f1f9=a2_0x4004;(function(_0x5e71df,_0x4ec165){const _0x15c926=a2_0x4004,_0x11637c=_0x5e71df();while(!![]){try{const _0x12864b=parseInt(_0x15c926(0x119))/0x1*(parseInt(_0x15c926(0x118))/0x2)+parseInt(_0x15c926(0x10f))/0x3+parseInt(_0x15c926(0x106))/0x4*(parseInt(_0x15c926(0x120))/0x5)+parseInt(_0x15c926(0x10a))/0x6*(parseInt(_0x15c926(0x123))/0x7)+parseInt(_0x15c926(0x122))/0x8+-parseInt(_0x15c926(0x121))/0x9*(parseInt(_0x15c926(0x113))/0xa)+-parseInt(_0x15c926(0x108))/0xb*(parseInt(_0x15c926(0x11d))/0xc);if(_0x12864b===_0x4ec165)break;else _0x11637c['push'](_0x11637c['shift']());}catch(_0x42148a){_0x11637c['push'](_0x11637c['shift']());}}}(a2_0x16ff,0xb3c74));const a2_0x50f81b=(function(){let _0x2ae138=!![];return function(_0xc72a2c,_0x259741){const _0x510cc5=_0x2ae138?function(){if(_0x259741){const _0x85bfb9=_0x259741['apply'](_0xc72a2c,arguments);return _0x259741=null,_0x85bfb9;}}:function(){};return _0x2ae138=![],_0x510cc5;};}()),a2_0x3534d5=a2_0x50f81b(this,function(){const _0x1b20c2=a2_0x4004;return a2_0x3534d5[_0x1b20c2(0x101)]()['search'](_0x1b20c2(0x112))['toString']()['constructor'](a2_0x3534d5)[_0x1b20c2(0x115)]('(((.+)+)+)+$');});function a2_0x16ff(){const _0x543ec0=['1272160fplLPl','7203627KDcnTD','8965368MALeVM','1008kVQuiF','items','label','toString','../interface','array','extend','Array','8dqIrxt','getPropertyType','29381rQdbyJ','Rule','8394dAYGHU','object','RuleType','function','map','1338285fyyjOK','default','saveClassMetadata','(((.+)+)+)+$','10xQKrPm','getClassMetadata','search','name','description','3006jmujbr','101sBpGKA','__esModule','defineProperty','joi','4008qRjRUp','RULES_KEY','isSchema'];a2_0x16ff=function(){return _0x543ec0;};return a2_0x16ff();}a2_0x3534d5();'use strict';Object[a2_0x38f1f9(0x11b)](exports,a2_0x38f1f9(0x11a),{'value':!![]}),exports['Rule']=exports['RuleType']=void 0x0;const joi=require(a2_0x38f1f9(0x11c)),date_1=require('@joi/date'),core_1=require('@midwayjs/core'),interface_1=require(a2_0x38f1f9(0x102));function a2_0x4004(_0x5e2644,_0x41d2df){const _0x38cc8b=a2_0x16ff();return a2_0x4004=function(_0x3534d5,_0x50f81b){_0x3534d5=_0x3534d5-0xff;let _0x16fff6=_0x38cc8b[_0x3534d5];return _0x16fff6;},a2_0x4004(_0x5e2644,_0x41d2df);}exports[a2_0x38f1f9(0x10c)]=joi[a2_0x38f1f9(0x104)](date_1[a2_0x38f1f9(0x110)]);function Rule(_0x37c6fe,_0x44cabb,_0x2f96c0=''){return(_0x2713b8,_0x5f259f)=>{const _0x1afe31=a2_0x4004;var _0x2d632c;if(_0x5f259f)!joi[_0x1afe31(0x11f)](_0x44cabb)&&(_0x44cabb===null||_0x44cabb===void 0x0?void 0x0:_0x44cabb[_0x1afe31(0x116)])&&(_0x44cabb=joi[_0x1afe31(0x10b)]((0x0,core_1['getClassMetadata'])(interface_1[_0x1afe31(0x11e)],_0x44cabb))['meta']({'id':_0x44cabb[_0x1afe31(0x116)]}),(0x0,core_1[_0x1afe31(0x107)])(_0x2713b8,_0x5f259f)[_0x1afe31(0x116)]===_0x1afe31(0x105)&&(_0x44cabb=joi[_0x1afe31(0x103)]()[_0x1afe31(0xff)](_0x44cabb))),joi[_0x1afe31(0x11f)](_0x44cabb)&&(_0x37c6fe&&typeof(_0x44cabb===null||_0x44cabb===void 0x0?void 0x0:_0x44cabb['label'])==_0x1afe31(0x10d)&&(_0x44cabb=_0x44cabb[_0x1afe31(0x100)](_0x37c6fe)),_0x2f96c0&&typeof(_0x44cabb===null||_0x44cabb===void 0x0?void 0x0:_0x44cabb[_0x1afe31(0x117)])=='function'&&(_0x44cabb=_0x44cabb[_0x1afe31(0x117)](_0x2f96c0)),(0x0,core_1['attachClassMetadata'])(interface_1[_0x1afe31(0x11e)],_0x44cabb,_0x2713b8,_0x5f259f));else{const _0x8c8c6e=(0x0,core_1[_0x1afe31(0x114)])(interface_1[_0x1afe31(0x11e)],_0x44cabb);if(_0x8c8c6e){let _0x11e69f=(_0x2d632c=(0x0,core_1[_0x1afe31(0x114)])(interface_1[_0x1afe31(0x11e)],_0x2713b8))!==null&&_0x2d632c!==void 0x0?_0x2d632c:{};Object['keys'](_0x8c8c6e)[_0x1afe31(0x10e)](_0x10cf3c=>{!_0x11e69f[_0x10cf3c]&&(_0x11e69f[_0x10cf3c]=_0x8c8c6e[_0x10cf3c]);}),(0x0,core_1[_0x1afe31(0x111)])(interface_1[_0x1afe31(0x11e)],_0x11e69f,_0x2713b8);}}};}exports[a2_0x38f1f9(0x109)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x432989=a3_0x2f0e;(function(_0xbfe90b,_0x2765cc){const _0x2cd03f=a3_0x2f0e,_0x174955=_0xbfe90b();while(!![]){try{const _0x2dfc90=-parseInt(_0x2cd03f(0x1e5))/0x1*(parseInt(_0x2cd03f(0x1e9))/0x2)+-parseInt(_0x2cd03f(0x1eb))/0x3*(parseInt(_0x2cd03f(0x1e6))/0x4)+parseInt(_0x2cd03f(0x1ec))/0x5+-parseInt(_0x2cd03f(0x1ea))/0x6+-parseInt(_0x2cd03f(0x1d9))/0x7+parseInt(_0x2cd03f(0x1db))/0x8+parseInt(_0x2cd03f(0x1de))/0x9;if(_0x2dfc90===_0x2765cc)break;else _0x174955['push'](_0x174955['shift']());}catch(_0xe8e066){_0x174955['push'](_0x174955['shift']());}}}(a3_0x28ce,0x4de1e));const a3_0x4e1f06=(function(){let _0xb4de82=!![];return function(_0x16a437,_0x293cb7){const _0x40fef8=_0xb4de82?function(){if(_0x293cb7){const _0x39c9df=_0x293cb7['apply'](_0x16a437,arguments);return _0x293cb7=null,_0x39c9df;}}:function(){};return _0xb4de82=![],_0x40fef8;};}()),a3_0x3e51d6=a3_0x4e1f06(this,function(){const _0x12c05a=a3_0x2f0e;return a3_0x3e51d6[_0x12c05a(0x1d8)]()['search']('(((.+)+)+)+$')[_0x12c05a(0x1d8)]()['constructor'](a3_0x3e51d6)[_0x12c05a(0x1da)](_0x12c05a(0x1d6));});a3_0x3e51d6();'use strict';Object[a3_0x432989(0x1dd)](exports,'__esModule',{'value':!![]}),exports['getFuncArgs']=exports[a3_0x432989(0x1d5)]=void 0x0;function a3_0x28ce(){const _0xab4631=['352038TbolBp','2019Jrdgke','3170zjSRCW','function','prototype','Validator','(((.+)+)+)+$','indexOf','toString','2341731HoWHWY','search','4246880BcGZXn','match','defineProperty','2714391JJaIVQ','createCustomMethodDecorator','attachClassMetadata','slice','replace','getFuncArgs','@midwayjs/core','54NnSbPh','428RcmdcE','../interface','VALIDATOR_KEY','1810aCwfjO'];a3_0x28ce=function(){return _0xab4631;};return a3_0x28ce();}const core_1=require(a3_0x432989(0x1e4)),interface_1=require(a3_0x432989(0x1e7));function Validator(_0x385f55={}){return(_0x36d701,_0x5898a6,_0x45cab5)=>{const _0x68607b=a3_0x2f0e,_0x30f0e2=getFuncArgs(_0x36d701[_0x5898a6]);(0x0,core_1[_0x68607b(0x1e0)])(interface_1[_0x68607b(0x1e8)],{'method':_0x5898a6,'methodArgs':_0x30f0e2},_0x36d701),(0x0,core_1[_0x68607b(0x1df)])(interface_1[_0x68607b(0x1e8)],_0x385f55)(_0x36d701,_0x5898a6,_0x45cab5);};}function a3_0x2f0e(_0x5dd08e,_0x25dc66){const _0x48789e=a3_0x28ce();return a3_0x2f0e=function(_0x3e51d6,_0x4e1f06){_0x3e51d6=_0x3e51d6-0x1d5;let _0x28ce43=_0x48789e[_0x3e51d6];return _0x28ce43;},a3_0x2f0e(_0x5dd08e,_0x25dc66);}exports[a3_0x432989(0x1d5)]=Validator;function getFuncArgs(_0x446d1c){const _0xb0fc32=a3_0x432989;if(typeof _0x446d1c==_0xb0fc32(0x1ed)){const _0x3ff4c6=/=>.*$/mg,_0x122bd2=/=[^,)]+/mg,_0x4d2a38=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x309c8c=(_0x446d1c['prototype']?_0x446d1c[_0xb0fc32(0x1ee)]['constructor'][_0xb0fc32(0x1d8)]():_0x446d1c[_0xb0fc32(0x1d8)]())[_0xb0fc32(0x1e2)](_0x4d2a38,'')['replace'](_0x3ff4c6,'')[_0xb0fc32(0x1e2)](_0x122bd2,''),_0x10fd7b=_0x309c8c[_0xb0fc32(0x1e1)](_0x309c8c[_0xb0fc32(0x1d7)]('(')+0x1,_0x309c8c[_0xb0fc32(0x1d7)](')'))[_0xb0fc32(0x1dc)](/([^\s,]+)/g)||[];return _0x10fd7b;}}exports[a3_0x432989(0x1e3)]=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0xbd09ad=a4_0x4c01;function a4_0x2576(){var _0x47f18a=['104362fyzytB','18nTxbku','15hlpIYV','77324ZvZyzm','__esModule','__decorate','defineProperty','function','NOFIND_SCHEMA','2852663YnoWnW','参数验证失败','object','search','apply','ValidatorError','1058550kDoLlM','__metadata','toString','length','91uqFeFr','(((.+)+)+)+$','decorate','2KWavmW','AnnErrorMsg','139110jqfnOn','470577NCgHZC','design:type','metadata','60568wOxMQO'];a4_0x2576=function(){return _0x47f18a;};return a4_0x2576();}(function(_0x526685,_0x365f20){var _0x306ca1=a4_0x4c01,_0x1af965=_0x526685();while(!![]){try{var _0x1c908e=parseInt(_0x306ca1(0x201))/0x1*(parseInt(_0x306ca1(0x208))/0x2)+parseInt(_0x306ca1(0x204))/0x3+-parseInt(_0x306ca1(0x20b))/0x4+-parseInt(_0x306ca1(0x20a))/0x5*(parseInt(_0x306ca1(0x203))/0x6)+-parseInt(_0x306ca1(0x1fe))/0x7*(parseInt(_0x306ca1(0x207))/0x8)+-parseInt(_0x306ca1(0x209))/0x9*(parseInt(_0x306ca1(0x1fa))/0xa)+parseInt(_0x306ca1(0x1f4))/0xb;if(_0x1c908e===_0x365f20)break;else _0x1af965['push'](_0x1af965['shift']());}catch(_0x1218e0){_0x1af965['push'](_0x1af965['shift']());}}}(a4_0x2576,0x1dabf));var a4_0x50d267=(function(){var _0x58e668=!![];return function(_0x55d389,_0x257c86){var _0x478236=_0x58e668?function(){var _0x2329a7=a4_0x4c01;if(_0x257c86){var _0x18afaf=_0x257c86[_0x2329a7(0x1f8)](_0x55d389,arguments);return _0x257c86=null,_0x18afaf;}}:function(){};return _0x58e668=![],_0x478236;};}()),a4_0x4cec78=a4_0x50d267(this,function(){var _0x18f637=a4_0x4c01;return a4_0x4cec78['toString']()[_0x18f637(0x1f7)](_0x18f637(0x1ff))[_0x18f637(0x1fc)]()['constructor'](a4_0x4cec78)[_0x18f637(0x1f7)](_0x18f637(0x1ff));});a4_0x4cec78();'use strict';var __decorate=this&&this[a4_0xbd09ad(0x1f0)]||function(_0x4f44c2,_0x44ca29,_0x53f0f3,_0x118970){var _0xec4155=a4_0xbd09ad,_0x40997b=arguments[_0xec4155(0x1fd)],_0x1dca78=_0x40997b<0x3?_0x44ca29:_0x118970===null?_0x118970=Object['getOwnPropertyDescriptor'](_0x44ca29,_0x53f0f3):_0x118970,_0x4e1d74;if(typeof Reflect===_0xec4155(0x1f6)&&typeof Reflect['decorate']===_0xec4155(0x1f2))_0x1dca78=Reflect[_0xec4155(0x200)](_0x4f44c2,_0x44ca29,_0x53f0f3,_0x118970);else{for(var _0x2bce45=_0x4f44c2['length']-0x1;_0x2bce45>=0x0;_0x2bce45--)if(_0x4e1d74=_0x4f44c2[_0x2bce45])_0x1dca78=(_0x40997b<0x3?_0x4e1d74(_0x1dca78):_0x40997b>0x3?_0x4e1d74(_0x44ca29,_0x53f0f3,_0x1dca78):_0x4e1d74(_0x44ca29,_0x53f0f3))||_0x1dca78;}return _0x40997b>0x3&&_0x1dca78&&Object[_0xec4155(0x1f1)](_0x44ca29,_0x53f0f3,_0x1dca78),_0x1dca78;},__metadata=this&&this[a4_0xbd09ad(0x1fb)]||function(_0x543584,_0x283a47){var _0x3db9b3=a4_0xbd09ad;if(typeof Reflect==='object'&&typeof Reflect[_0x3db9b3(0x206)]===_0x3db9b3(0x1f2))return Reflect[_0x3db9b3(0x206)](_0x543584,_0x283a47);};function a4_0x4c01(_0x5ca6ec,_0x31a75c){var _0x101ad9=a4_0x2576();return a4_0x4c01=function(_0x4cec78,_0x50d267){_0x4cec78=_0x4cec78-0x1ef;var _0x2576bd=_0x101ad9[_0x4cec78];return _0x2576bd;},a4_0x4c01(_0x5ca6ec,_0x31a75c);}Object[a4_0xbd09ad(0x1f1)](exports,a4_0xbd09ad(0x1ef),{'value':!![]}),exports[a4_0xbd09ad(0x1f9)]=void 0x0;const core_1=require('@anncic-api/core');class ValidatorError{}ValidatorError['PARAMS']=0x3df374,ValidatorError[a4_0xbd09ad(0x1f3)]=0x3df36a,__decorate([(0x0,core_1['AnnErrorMsg'])('参数验证失败'),__metadata(a4_0xbd09ad(0x205),Object)],ValidatorError,'PARAMS',void 0x0),__decorate([(0x0,core_1[a4_0xbd09ad(0x202)])(a4_0xbd09ad(0x1f5)),__metadata(a4_0xbd09ad(0x205),Object)],ValidatorError,a4_0xbd09ad(0x1f3),void 0x0),exports[a4_0xbd09ad(0x1f9)]=ValidatorError;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x1374b2=a5_0x33eb;(function(_0x3ca8a3,_0x201659){const _0x10fd28=a5_0x33eb,_0x47b0fe=_0x3ca8a3();while(!![]){try{const _0x15a2bb=parseInt(_0x10fd28(0xc7))/0x1*(-parseInt(_0x10fd28(0xce))/0x2)+-parseInt(_0x10fd28(0xc6))/0x3*(parseInt(_0x10fd28(0xca))/0x4)+parseInt(_0x10fd28(0xc8))/0x5+parseInt(_0x10fd28(0xc2))/0x6+parseInt(_0x10fd28(0xba))/0x7+-parseInt(_0x10fd28(0xbb))/0x8*(parseInt(_0x10fd28(0xcd))/0x9)+parseInt(_0x10fd28(0xb8))/0xa;if(_0x15a2bb===_0x201659)break;else _0x47b0fe['push'](_0x47b0fe['shift']());}catch(_0x5ae5b2){_0x47b0fe['push'](_0x47b0fe['shift']());}}}(a5_0x56a7,0x18b93));const a5_0x8fe488=(function(){let _0x9ad7f7=!![];return function(_0xc7be83,_0x3c2444){const _0x560d15=_0x9ad7f7?function(){const _0x254690=a5_0x33eb;if(_0x3c2444){const _0x4c97ff=_0x3c2444[_0x254690(0xb9)](_0xc7be83,arguments);return _0x3c2444=null,_0x4c97ff;}}:function(){};return _0x9ad7f7=![],_0x560d15;};}()),a5_0x1ff255=a5_0x8fe488(this,function(){const _0x65d71a=a5_0x33eb;return a5_0x1ff255[_0x65d71a(0xbe)]()[_0x65d71a(0xc3)](_0x65d71a(0xb7))[_0x65d71a(0xbe)]()[_0x65d71a(0xc5)](a5_0x1ff255)['search'](_0x65d71a(0xb7));});a5_0x1ff255();'use strict';Object[a5_0x1374b2(0xc9)](exports,a5_0x1374b2(0xbc),{'value':!![]}),exports[a5_0x1374b2(0xcc)]=exports[a5_0x1374b2(0xbd)]=void 0x0;function a5_0x56a7(){const _0x5e3ae3=['1388hWzyLU','prototype','OmitDto','81uKuZFq','188618RqBsbG','getClassExtendedMetadata','(((.+)+)+)+$','1016190uOJeqU','apply','1062971QxxyOE','85912fBxEMo','__esModule','PickDto','toString','assign','RULES_KEY','saveClassMetadata','854994nafAdt','search','../interface','constructor','927UUXDpj','2qTYqMM','488940XHihgK','defineProperty'];a5_0x56a7=function(){return _0x5e3ae3;};return a5_0x56a7();}const core_1=require('@midwayjs/core'),interface_1=require(a5_0x1374b2(0xc4));function PickDto(_0x260c6d,_0x3befa2){const _0x57d4db=a5_0x1374b2,_0x18f614=function(){};_0x18f614['prototype']=_0x260c6d[_0x57d4db(0xcb)];const _0x3ad732=(0x0,core_1[_0x57d4db(0xcf)])(interface_1[_0x57d4db(0xc0)],_0x260c6d),_0x3d3933={};for(const _0x3b5eb3 of _0x3befa2){_0x3ad732[_0x3b5eb3]&&(_0x3d3933[_0x3b5eb3]=_0x3ad732[_0x3b5eb3]);}return(0x0,core_1[_0x57d4db(0xc1)])(interface_1['RULES_KEY'],_0x3d3933,_0x18f614),_0x18f614;}exports[a5_0x1374b2(0xbd)]=PickDto;function a5_0x33eb(_0xc849b7,_0x43f3ce){const _0xabae3a=a5_0x56a7();return a5_0x33eb=function(_0x1ff255,_0x8fe488){_0x1ff255=_0x1ff255-0xb7;let _0x56a7e6=_0xabae3a[_0x1ff255];return _0x56a7e6;},a5_0x33eb(_0xc849b7,_0x43f3ce);}function OmitDto(_0x27a7c0,_0x36cc6d){const _0x1b2988=a5_0x1374b2,_0x9f387d=function(){};_0x9f387d[_0x1b2988(0xcb)]=_0x27a7c0[_0x1b2988(0xcb)];const _0x15984b=(0x0,core_1['getClassExtendedMetadata'])(interface_1['RULES_KEY'],_0x27a7c0),_0x397207=Object[_0x1b2988(0xbf)]({},_0x15984b);for(const _0x1c1437 of _0x36cc6d){delete _0x397207[_0x1c1437];}return(0x0,core_1[_0x1b2988(0xc1)])(interface_1[_0x1b2988(0xc0)],_0x397207,_0x9f387d),_0x9f387d;}exports['OmitDto']=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var a6_0x12c542=a6_0x5dee;function a6_0x5dee(_0x5b19c6,_0x48d251){var _0x4db808=a6_0x5266();return a6_0x5dee=function(_0x587288,_0x23f980){_0x587288=_0x587288-0x1c4;var _0x5266dc=_0x4db808[_0x587288];return _0x5266dc;},a6_0x5dee(_0x5b19c6,_0x48d251);}(function(_0x393c23,_0x39cf15){var _0x41df2b=a6_0x5dee,_0x3f162b=_0x393c23();while(!![]){try{var _0x104609=parseInt(_0x41df2b(0x1d7))/0x1+parseInt(_0x41df2b(0x1d3))/0x2*(parseInt(_0x41df2b(0x1e5))/0x3)+-parseInt(_0x41df2b(0x1e3))/0x4*(-parseInt(_0x41df2b(0x1de))/0x5)+-parseInt(_0x41df2b(0x1cc))/0x6+-parseInt(_0x41df2b(0x1c6))/0x7*(parseInt(_0x41df2b(0x1cf))/0x8)+parseInt(_0x41df2b(0x1d6))/0x9+-parseInt(_0x41df2b(0x1d8))/0xa;if(_0x104609===_0x39cf15)break;else _0x3f162b['push'](_0x3f162b['shift']());}catch(_0x26d701){_0x3f162b['push'](_0x3f162b['shift']());}}}(a6_0x5266,0x9c1b7));var a6_0x23f980=(function(){var _0x232217=!![];return function(_0x9946f7,_0x1760cb){var _0x28614=_0x232217?function(){var _0x4115a4=a6_0x5dee;if(_0x1760cb){var _0x17eaf1=_0x1760cb[_0x4115a4(0x1e2)](_0x9946f7,arguments);return _0x1760cb=null,_0x17eaf1;}}:function(){};return _0x232217=![],_0x28614;};}()),a6_0x587288=a6_0x23f980(this,function(){var _0x1a71c1=a6_0x5dee;return a6_0x587288[_0x1a71c1(0x1dc)]()[_0x1a71c1(0x1d0)]('(((.+)+)+)+$')[_0x1a71c1(0x1dc)]()['constructor'](a6_0x587288)[_0x1a71c1(0x1d0)](_0x1a71c1(0x1d4));});function a6_0x5266(){var _0x33946e=['8fFZRXU','search','Rule','call','2qebGIG','(((.+)+)+)+$','ValidatorError','10742769EAotUF','125889CiKAva','14107420FEBgkq','__createBinding','CustomConfiguration','RuleType','toString','Validator','20nRzuMb','prototype','ValidatorService','./decorator/Rule','apply','1023596CdYalv','get','1639338gDcfAx','configurable','./helper/dtoHelper','writable','Configuration','./service/ValidatorService','__exportStar','1119923sVzGQU','./decorator/Validator','hasOwnProperty','__esModule','default','getOwnPropertyDescriptor','4076556mlkHfp','./exception/ValidatorError','defineProperty'];a6_0x5266=function(){return _0x33946e;};return a6_0x5266();}a6_0x587288();'use strict';var __createBinding=this&&this[a6_0x12c542(0x1d9)]||(Object['create']?function(_0x42acd8,_0x1b5e53,_0x1dcf6b,_0x584b48){var _0x2614b4=a6_0x12c542;if(_0x584b48===undefined)_0x584b48=_0x1dcf6b;var _0x4111df=Object[_0x2614b4(0x1cb)](_0x1b5e53,_0x1dcf6b);(!_0x4111df||(_0x2614b4(0x1e4)in _0x4111df?!_0x1b5e53['__esModule']:_0x4111df[_0x2614b4(0x1e8)]||_0x4111df[_0x2614b4(0x1e6)]))&&(_0x4111df={'enumerable':!![],'get':function(){return _0x1b5e53[_0x1dcf6b];}}),Object[_0x2614b4(0x1ce)](_0x42acd8,_0x584b48,_0x4111df);}:function(_0x34f886,_0x5df0ae,_0x3c61d4,_0x5536ce){if(_0x5536ce===undefined)_0x5536ce=_0x3c61d4;_0x34f886[_0x5536ce]=_0x5df0ae[_0x3c61d4];}),__exportStar=this&&this[a6_0x12c542(0x1c5)]||function(_0x26adac,_0xa559c7){var _0x410f64=a6_0x12c542;for(var _0x4b0394 in _0x26adac)if(_0x4b0394!==_0x410f64(0x1ca)&&!Object[_0x410f64(0x1df)][_0x410f64(0x1c8)][_0x410f64(0x1d2)](_0xa559c7,_0x4b0394))__createBinding(_0xa559c7,_0x26adac,_0x4b0394);};Object[a6_0x12c542(0x1ce)](exports,a6_0x12c542(0x1c9),{'value':!![]}),exports[a6_0x12c542(0x1e9)]=exports[a6_0x12c542(0x1e0)]=exports[a6_0x12c542(0x1d5)]=exports[a6_0x12c542(0x1db)]=exports[a6_0x12c542(0x1d1)]=exports[a6_0x12c542(0x1dd)]=void 0x0,__exportStar(require('./interface'),exports),__exportStar(require(a6_0x12c542(0x1e7)),exports);var Validator_1=require(a6_0x12c542(0x1c7));Object['defineProperty'](exports,a6_0x12c542(0x1dd),{'enumerable':!![],'get':function(){var _0x4cef77=a6_0x12c542;return Validator_1[_0x4cef77(0x1dd)];}});var Rule_1=require(a6_0x12c542(0x1e1));Object[a6_0x12c542(0x1ce)](exports,a6_0x12c542(0x1d1),{'enumerable':!![],'get':function(){var _0x3716f6=a6_0x12c542;return Rule_1[_0x3716f6(0x1d1)];}}),Object[a6_0x12c542(0x1ce)](exports,a6_0x12c542(0x1db),{'enumerable':!![],'get':function(){var _0xa8eda6=a6_0x12c542;return Rule_1[_0xa8eda6(0x1db)];}});var ValidatorError_1=require(a6_0x12c542(0x1cd));Object[a6_0x12c542(0x1ce)](exports,'ValidatorError',{'enumerable':!![],'get':function(){var _0x552e37=a6_0x12c542;return ValidatorError_1[_0x552e37(0x1d5)];}});var ValidatorService_1=require(a6_0x12c542(0x1c4));Object[a6_0x12c542(0x1ce)](exports,a6_0x12c542(0x1e0),{'enumerable':!![],'get':function(){var _0x3a140f=a6_0x12c542;return ValidatorService_1[_0x3a140f(0x1e0)];}});var configuration_1=require('./configuration');Object[a6_0x12c542(0x1ce)](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x5f3066=a6_0x12c542;return configuration_1[_0x5f3066(0x1da)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x5c46c7=a7_0xc5b7;function a7_0xc5b7(_0x11bd89,_0x522822){var _0x25e3a6=a7_0x324b();return a7_0xc5b7=function(_0xdbcb6b,_0x4e1c2a){_0xdbcb6b=_0xdbcb6b-0x121;var _0x324b53=_0x25e3a6[_0xdbcb6b];return _0x324b53;},a7_0xc5b7(_0x11bd89,_0x522822);}(function(_0xa271dd,_0x349998){var _0x1dbb1b=a7_0xc5b7,_0xe0c283=_0xa271dd();while(!![]){try{var _0x333143=parseInt(_0x1dbb1b(0x131))/0x1+parseInt(_0x1dbb1b(0x123))/0x2+-parseInt(_0x1dbb1b(0x125))/0x3*(parseInt(_0x1dbb1b(0x12e))/0x4)+parseInt(_0x1dbb1b(0x12c))/0x5+-parseInt(_0x1dbb1b(0x121))/0x6+parseInt(_0x1dbb1b(0x126))/0x7+parseInt(_0x1dbb1b(0x128))/0x8*(parseInt(_0x1dbb1b(0x12f))/0x9);if(_0x333143===_0x349998)break;else _0xe0c283['push'](_0xe0c283['shift']());}catch(_0x5c6267){_0xe0c283['push'](_0xe0c283['shift']());}}}(a7_0x324b,0xe9c0d));function a7_0x324b(){var _0x58760c=['1697356nXBrhW','1098hOaVOX','VALIDATOR_KEY','78201TJCGmz','search','1726422iZJrSs','anncic-api:validator:validator','1820366sUooEp','constructor','3QqThAy','70497Jqvvpv','(((.+)+)+)+$','11904kEuRkB','apply','toString','__esModule','2447690CJIWhV','RULES_KEY'];a7_0x324b=function(){return _0x58760c;};return a7_0x324b();}var a7_0x4e1c2a=(function(){var _0x3cce3d=!![];return function(_0x45adcc,_0x2c6d5b){var _0x5bf585=_0x3cce3d?function(){var _0x239ce6=a7_0xc5b7;if(_0x2c6d5b){var _0x217cb9=_0x2c6d5b[_0x239ce6(0x129)](_0x45adcc,arguments);return _0x2c6d5b=null,_0x217cb9;}}:function(){};return _0x3cce3d=![],_0x5bf585;};}()),a7_0xdbcb6b=a7_0x4e1c2a(this,function(){var _0x5e319e=a7_0xc5b7;return a7_0xdbcb6b[_0x5e319e(0x12a)]()[_0x5e319e(0x132)]('(((.+)+)+)+$')[_0x5e319e(0x12a)]()[_0x5e319e(0x124)](a7_0xdbcb6b)[_0x5e319e(0x132)](_0x5e319e(0x127));});a7_0xdbcb6b();'use strict';Object['defineProperty'](exports,a7_0x5c46c7(0x12b),{'value':!![]}),exports[a7_0x5c46c7(0x130)]=exports[a7_0x5c46c7(0x12d)]=void 0x0,exports[a7_0x5c46c7(0x12d)]='anncic-api:validator:rules',exports[a7_0x5c46c7(0x130)]=a7_0x5c46c7(0x122);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a8_0x1df45f=a8_0x5bde;(function(_0x531704,_0x31a6ca){const _0x4ff0f0=a8_0x5bde,_0xee335b=_0x531704();while(!![]){try{const _0x2b32ea=-parseInt(_0x4ff0f0(0xad))/0x1*(-parseInt(_0x4ff0f0(0xb9))/0x2)+parseInt(_0x4ff0f0(0xbe))/0x3*(parseInt(_0x4ff0f0(0x9e))/0x4)+-parseInt(_0x4ff0f0(0x98))/0x5+parseInt(_0x4ff0f0(0xaa))/0x6*(-parseInt(_0x4ff0f0(0xd6))/0x7)+-parseInt(_0x4ff0f0(0xb5))/0x8+-parseInt(_0x4ff0f0(0xb4))/0x9*(-parseInt(_0x4ff0f0(0xce))/0xa)+-parseInt(_0x4ff0f0(0x9d))/0xb;if(_0x2b32ea===_0x31a6ca)break;else _0xee335b['push'](_0xee335b['shift']());}catch(_0x4ffaaa){_0xee335b['push'](_0xee335b['shift']());}}}(a8_0x3d39,0xedd78));const a8_0x3e45e7=(function(){let _0x5894f7=!![];return function(_0x1e8263,_0x45f309){const _0x305657=_0x5894f7?function(){const _0x528c28=a8_0x5bde;if(_0x45f309){const _0x3661d2=_0x45f309[_0x528c28(0xbc)](_0x1e8263,arguments);return _0x45f309=null,_0x3661d2;}}:function(){};return _0x5894f7=![],_0x305657;};}()),a8_0x100df4=a8_0x3e45e7(this,function(){const _0xa402aa=a8_0x5bde;return a8_0x100df4[_0xa402aa(0xda)]()['search']('(((.+)+)+)+$')['toString']()[_0xa402aa(0xd0)](a8_0x100df4)[_0xa402aa(0xae)](_0xa402aa(0xb7));});a8_0x100df4();'use strict';function a8_0x5bde(_0x37a058,_0x663dd7){const _0x2f93a6=a8_0x3d39();return a8_0x5bde=function(_0x100df4,_0x3e45e7){_0x100df4=_0x100df4-0x96;let _0x3d39c8=_0x2f93a6[_0x100df4];return _0x3d39c8;},a8_0x5bde(_0x37a058,_0x663dd7);}var __decorate=this&&this['__decorate']||function(_0x2f4a24,_0x143e01,_0x28a0cb,_0x4c624f){const _0x5a8357=a8_0x5bde;var _0x485bc3=arguments[_0x5a8357(0x9b)],_0x5dcee9=_0x485bc3<0x3?_0x143e01:_0x4c624f===null?_0x4c624f=Object[_0x5a8357(0xb6)](_0x143e01,_0x28a0cb):_0x4c624f,_0x468fa4;if(typeof Reflect===_0x5a8357(0xa8)&&typeof Reflect[_0x5a8357(0xba)]===_0x5a8357(0xb3))_0x5dcee9=Reflect['decorate'](_0x2f4a24,_0x143e01,_0x28a0cb,_0x4c624f);else{for(var _0x255b50=_0x2f4a24['length']-0x1;_0x255b50>=0x0;_0x255b50--)if(_0x468fa4=_0x2f4a24[_0x255b50])_0x5dcee9=(_0x485bc3<0x3?_0x468fa4(_0x5dcee9):_0x485bc3>0x3?_0x468fa4(_0x143e01,_0x28a0cb,_0x5dcee9):_0x468fa4(_0x143e01,_0x28a0cb))||_0x5dcee9;}return _0x485bc3>0x3&&_0x5dcee9&&Object[_0x5a8357(0xa7)](_0x143e01,_0x28a0cb,_0x5dcee9),_0x5dcee9;},__metadata=this&&this['__metadata']||function(_0x4509e5,_0x1798ca){const _0x3f5168=a8_0x5bde;if(typeof Reflect==='object'&&typeof Reflect[_0x3f5168(0xd7)]==='function')return Reflect[_0x3f5168(0xd7)](_0x4509e5,_0x1798ca);};Object[a8_0x1df45f(0xa7)](exports,a8_0x1df45f(0xc9),{'value':!![]}),exports[a8_0x1df45f(0xa0)]=void 0x0;function a8_0x3d39(){const _0x417607=['formatLocale','design:returntype','MidwayI18nServiceSingleton','function','117iVtxSE','13793600kNceXx','getOwnPropertyDescriptor','(((.+)+)+)+$','design:type','109826CVeDNJ','decorate','_flags','apply','Scope','2454798wLcUXV','prototype','Init','design:paramtypes','YYYY-MM-DD\x20HH:mm:ss','validatorConfig','@midwayjs/i18n','Config','validationOptions','@midwayjs/core','ValidatorError','__esModule','locale','error','validator','details','890490MIqIGb','key','constructor','schema','$_terms','fromEntries','errors','getClassExtendedMetadata','1477GTDxhF','metadata','keys','assign','toString','getAvailableLocale','Inject','message','messages','参数验证失败','1456310GjhNfe','language','init','length','i18nService','10612239tOXXaJ','8UuZeFD','forEach','ValidatorService','Singleton','isSchema','PARAMS','RULES_KEY','type','getSchema','defineProperty','object','value','2922rnSbBV','i18nConfig','../exception/ValidatorError','23pVFzve','search','localeTable'];a8_0x3d39=function(){return _0x417607;};return a8_0x3d39();}const Joi=require('joi'),i18n_1=require(a8_0x1df45f(0xc4)),core_1=require(a8_0x1df45f(0xc7)),interface_1=require('../interface'),ValidatorError_1=require(a8_0x1df45f(0xac));let ValidatorService=class ValidatorService{constructor(){const _0x519594=a8_0x1df45f;this[_0x519594(0x96)]={};}async['init'](){const _0x129785=a8_0x1df45f,_0x4232d2=Object['keys'](this[_0x129785(0xab)][_0x129785(0xaf)]);_0x4232d2[_0x129785(0x9f)](_0x5623c5=>{const _0x553fce=_0x129785;this['messages'][(0x0,i18n_1[_0x553fce(0xb0)])(_0x5623c5)]=Object[_0x553fce(0xd3)](this[_0x553fce(0x9c)]['getLocaleMapping'](_0x5623c5,_0x553fce(0xcc)));});}[a8_0x1df45f(0xa6)](_0x3b43d6){const _0x425443=a8_0x1df45f,_0x368d32=(0x0,core_1[_0x425443(0xd5)])(interface_1[_0x425443(0xa4)],_0x3b43d6);return _0x368d32?Joi[_0x425443(0xa8)](_0x368d32):undefined;}[a8_0x1df45f(0xcc)](_0x4eb996,_0x4965a4,_0x2ec2f3={}){const _0x40b0af=a8_0x1df45f;var _0x3a2320,_0x287bf5,_0x2a9242,_0x5a00a7,_0xba3b96,_0x640452;const _0x109e81=Joi[_0x40b0af(0xa2)](_0x4eb996)?_0x4eb996:this[_0x40b0af(0xa6)](_0x4eb996);if(!_0x109e81)throw new AnnError(ValidatorError_1[_0x40b0af(0xc8)]['NOFIND_SCHEMA']);_0x2ec2f3['validationOptions']=Object[_0x40b0af(0xd9)]((_0x3a2320=this[_0x40b0af(0xc3)][_0x40b0af(0xc6)])!==null&&_0x3a2320!==void 0x0?_0x3a2320:{},{'messages':this[_0x40b0af(0x96)]},_0x2ec2f3[_0x40b0af(0xc6)]||{}),_0x2ec2f3[_0x40b0af(0xc6)][_0x40b0af(0xd4)]=_0x2ec2f3[_0x40b0af(0xc6)]['errors']||{},_0x2ec2f3[_0x40b0af(0xc6)][_0x40b0af(0xd4)]['language']=(0x0,i18n_1[_0x40b0af(0xb0)])(this['i18nService'][_0x40b0af(0xdb)](_0x2ec2f3['validationOptions'][_0x40b0af(0xd4)][_0x40b0af(0x99)]||_0x2ec2f3[_0x40b0af(0xca)]||this[_0x40b0af(0xab)]['defaultLocale'],_0x40b0af(0xcc)));const _0x23d240=_0x109e81['validate'](_0x4965a4,_0x2ec2f3[_0x40b0af(0xc6)]);if(_0x23d240===null||_0x23d240===void 0x0?void 0x0:_0x23d240[_0x40b0af(0xcb)]){if(_0x23d240[_0x40b0af(0xcb)]instanceof AnnError)throw _0x23d240[_0x40b0af(0xcb)];else{if(_0x23d240[_0x40b0af(0xcb)]instanceof Error)throw new AnnError(ValidatorError_1[_0x40b0af(0xc8)][_0x40b0af(0xa3)],{'message':((_0x287bf5=_0x23d240['error'])===null||_0x287bf5===void 0x0?void 0x0:_0x287bf5[_0x40b0af(0xdd)])||'参数验证失败'});else throw new AnnError(ValidatorError_1['ValidatorError'][_0x40b0af(0xa3)],{'message':((_0xba3b96=(_0x5a00a7=(_0x2a9242=_0x23d240[_0x40b0af(0xcb)])===null||_0x2a9242===void 0x0?void 0x0:_0x2a9242[_0x40b0af(0xcd)])===null||_0x5a00a7===void 0x0?void 0x0:_0x5a00a7[0x0])===null||_0xba3b96===void 0x0?void 0x0:_0xba3b96[_0x40b0af(0xdd)])||_0x40b0af(0x97)});}}if(_0x23d240===null||_0x23d240===void 0x0?void 0x0:_0x23d240['value']){const _0x308e7a=(_0x640452=_0x109e81===null||_0x109e81===void 0x0?void 0x0:_0x109e81[_0x40b0af(0xd2)])===null||_0x640452===void 0x0?void 0x0:_0x640452['keys'],_0x504448=function(_0x2a4032,_0x5ac9e0){const _0x48f311=_0x40b0af;var _0x5687c6,_0x512bd2,_0x9327cf,_0x4697d7,_0x257eb9,_0x19b9c8,_0x241a1d,_0x4fcd79,_0x3b8c4d,_0x39b247,_0x5a0848;for(let _0x1b2375 in _0x2a4032){if(_0x5ac9e0[(_0x5687c6=_0x2a4032[_0x1b2375])===null||_0x5687c6===void 0x0?void 0x0:_0x5687c6[_0x48f311(0xcf)]]&&((_0x9327cf=(_0x512bd2=_0x2a4032[_0x1b2375])===null||_0x512bd2===void 0x0?void 0x0:_0x512bd2[_0x48f311(0xd1)])===null||_0x9327cf===void 0x0?void 0x0:_0x9327cf[_0x48f311(0xa5)])){if(((_0x257eb9=(_0x4697d7=_0x2a4032[_0x1b2375])===null||_0x4697d7===void 0x0?void 0x0:_0x4697d7[_0x48f311(0xd1)])===null||_0x257eb9===void 0x0?void 0x0:_0x257eb9[_0x48f311(0xa5)])==_0x48f311(0xa8))_0x5ac9e0[_0x2a4032[_0x1b2375][_0x48f311(0xcf)]]=_0x504448((_0x241a1d=(_0x19b9c8=_0x2a4032[_0x1b2375])===null||_0x19b9c8===void 0x0?void 0x0:_0x19b9c8[_0x48f311(0xd1)][_0x48f311(0xd2)])===null||_0x241a1d===void 0x0?void 0x0:_0x241a1d[_0x48f311(0xd8)],_0x5ac9e0[_0x2a4032[_0x1b2375][_0x48f311(0xcf)]]);else{if(_0x2a4032[_0x1b2375][_0x48f311(0xd1)]['type']=='date'&&_0x23d240[_0x48f311(0xa9)][(_0x4fcd79=_0x2a4032[_0x1b2375])===null||_0x4fcd79===void 0x0?void 0x0:_0x4fcd79[_0x48f311(0xcf)]]){const _0x1107e0=((_0x5a0848=(_0x39b247=(_0x3b8c4d=_0x2a4032[_0x1b2375])===null||_0x3b8c4d===void 0x0?void 0x0:_0x3b8c4d[_0x48f311(0xd1)])===null||_0x39b247===void 0x0?void 0x0:_0x39b247[_0x48f311(0xbb)])===null||_0x5a0848===void 0x0?void 0x0:_0x5a0848['format'])||_0x48f311(0xc2);_0x5ac9e0[_0x2a4032[_0x1b2375][_0x48f311(0xcf)]]=dayjs(_0x23d240[_0x48f311(0xa9)][_0x2a4032[_0x1b2375][_0x48f311(0xcf)]])['format'](_0x1107e0);}}}}return _0x5ac9e0;};return _0x504448(_0x308e7a,_0x23d240['value']);}throw new AnnError(ValidatorError_1[_0x40b0af(0xc8)]['PARAMS']);}};__decorate([(0x0,core_1[a8_0x1df45f(0xc5)])('i18n'),__metadata(a8_0x1df45f(0xb8),Object)],ValidatorService[a8_0x1df45f(0xbf)],'i18nConfig',void 0x0),__decorate([(0x0,core_1[a8_0x1df45f(0xc5)])(a8_0x1df45f(0xcc)),__metadata('design:type',Object)],ValidatorService[a8_0x1df45f(0xbf)],a8_0x1df45f(0xc3),void 0x0),__decorate([(0x0,core_1[a8_0x1df45f(0xdc)])(),__metadata(a8_0x1df45f(0xb8),i18n_1[a8_0x1df45f(0xb2)])],ValidatorService['prototype'],'i18nService',void 0x0),__decorate([(0x0,core_1[a8_0x1df45f(0xc0)])(),__metadata('design:type',Function),__metadata(a8_0x1df45f(0xc1),[]),__metadata(a8_0x1df45f(0xb1),Promise)],ValidatorService[a8_0x1df45f(0xbf)],a8_0x1df45f(0x9a),null),ValidatorService=__decorate([(0x0,core_1['Provide'])('validator'),(0x0,core_1[a8_0x1df45f(0xbd)])(core_1['ScopeEnum'][a8_0x1df45f(0xa1)])],ValidatorService),exports[a8_0x1df45f(0xa0)]=ValidatorService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.14",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/core": "^1.5.
|
|
20
|
+
"@anncic-api/core": "^1.5.14",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.7.0"
|
|
23
23
|
},
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"javascript-obfuscator": "^4.0.0",
|
|
27
27
|
"typescript": "^4.7.4"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "149f4c080cadff936b73c619a551b3caebf1b0e4"
|
|
30
30
|
}
|