@anncic-api/validator 2.1.3 → 2.1.4
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
|
-
const
|
|
1
|
+
const a0_0x39bb7d=a0_0x5168;(function(_0x193bac,_0x1c4b25){const _0x40fcc1=a0_0x5168,_0x346ed5=_0x193bac();while(!![]){try{const _0x6be0b3=parseInt(_0x40fcc1(0xf0))/0x1+-parseInt(_0x40fcc1(0xf9))/0x2+parseInt(_0x40fcc1(0xf7))/0x3*(parseInt(_0x40fcc1(0xef))/0x4)+parseInt(_0x40fcc1(0xf5))/0x5+parseInt(_0x40fcc1(0xee))/0x6+parseInt(_0x40fcc1(0xf8))/0x7+-parseInt(_0x40fcc1(0xed))/0x8;if(_0x6be0b3===_0x1c4b25)break;else _0x346ed5['push'](_0x346ed5['shift']());}catch(_0x1b4452){_0x346ed5['push'](_0x346ed5['shift']());}}}(a0_0x3f20,0x4018b));const a0_0xaa3c4a=(function(){let _0x5be1fd=!![];return function(_0x12672b,_0x579f12){const _0x2b6cc6=_0x5be1fd?function(){const _0x44c563=a0_0x5168;if(_0x579f12){const _0x472f48=_0x579f12[_0x44c563(0xf6)](_0x12672b,arguments);return _0x579f12=null,_0x472f48;}}:function(){};return _0x5be1fd=![],_0x2b6cc6;};}()),a0_0x212b9b=a0_0xaa3c4a(this,function(){const _0x4570ba=a0_0x5168;return a0_0x212b9b[_0x4570ba(0xe9)]()[_0x4570ba(0xec)](_0x4570ba(0xfa))[_0x4570ba(0xe9)]()[_0x4570ba(0xf2)](a0_0x212b9b)[_0x4570ba(0xec)]('(((.+)+)+)+$');});a0_0x212b9b();'use strict';Object[a0_0x39bb7d(0xeb)](exports,a0_0x39bb7d(0xfb),{'value':!![]});const ValidatorError_1=require(a0_0x39bb7d(0xf3));function a0_0x5168(_0x587da6,_0xbe5ffa){const _0x3a9ad9=a0_0x3f20();return a0_0x5168=function(_0x212b9b,_0xaa3c4a){_0x212b9b=_0x212b9b-0xe9;let _0x3f20d0=_0x3a9ad9[_0x212b9b];return _0x3f20d0;},a0_0x5168(_0x587da6,_0xbe5ffa);}function a0_0x3f20(){const _0x3dd73f=['PARAMS','defineProperty','search','10097808VptAPw','2923608NdIBnb','5948gBWKGb','1672LTeZIw','../../locales/zh_CN.json','constructor','../exception/ValidatorError','string','749470LBctNc','apply','831NXysFZ','3630011aVtQPR','89082jpLyWD','(((.+)+)+)+$','__esModule','toString'];a0_0x3f20=function(){return _0x3dd73f;};return a0_0x3f20();}exports['default']={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x39bb7d(0xea)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x39bb7d(0xf4)}},'i18n':{'localeTable':{'en_US':{'validator':require('../../locales/en_US.json')},'zh_CN':{'validator':require(a0_0x39bb7d(0xf1))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x18bcdd=a1_0x59e6;(function(_0x59e16a,_0x401443){const _0x24029f=a1_0x59e6,_0x56e013=_0x59e16a();while(!![]){try{const _0x3f62fa=parseInt(_0x24029f(0x126))/0x1*(parseInt(_0x24029f(0x133))/0x2)+-parseInt(_0x24029f(0x122))/0x3+-parseInt(_0x24029f(0x13e))/0x4*(-parseInt(_0x24029f(0x138))/0x5)+parseInt(_0x24029f(0x12d))/0x6*(-parseInt(_0x24029f(0x11f))/0x7)+parseInt(_0x24029f(0x141))/0x8+parseInt(_0x24029f(0x144))/0x9*(parseInt(_0x24029f(0x11d))/0xa)+-parseInt(_0x24029f(0x137))/0xb*(-parseInt(_0x24029f(0x148))/0xc);if(_0x3f62fa===_0x401443)break;else _0x56e013['push'](_0x56e013['shift']());}catch(_0x282b31){_0x56e013['push'](_0x56e013['shift']());}}}(a1_0x9816,0x96cdc));const a1_0x7624d6=(function(){let _0xd22e19=!![];return function(_0x5c1eb3,_0x329c5b){const _0x2d0758=_0xd22e19?function(){const _0x58e892=a1_0x59e6;if(_0x329c5b){const _0x3ed595=_0x329c5b[_0x58e892(0x14f)](_0x5c1eb3,arguments);return _0x329c5b=null,_0x3ed595;}}:function(){};return _0xd22e19=![],_0x2d0758;};}()),a1_0x538d21=a1_0x7624d6(this,function(){const _0x10dacc=a1_0x59e6;return a1_0x538d21['toString']()[_0x10dacc(0x142)](_0x10dacc(0x13d))[_0x10dacc(0x145)]()['constructor'](a1_0x538d21)['search'](_0x10dacc(0x13d));});a1_0x538d21();function a1_0x9816(){const _0x459cbf=['anncic-api:validator','1839501eNNjvm','__metadata','./config/config.default','defineProperty','48TPvAzB','assign','ValidatorService','decorator','length','splice','getAttr','108534KcCZSi','request','undefined','find','getMethodParamTypes','design:type','50626BLQFAH','./interface','params','REQUEST_OBJ_CTX_KEY','148973picKvP','576185OsPfyP','methodName','locale','body','./service/ValidatorService','(((.+)+)+)+$','8pNsekO','target','metadata','4145440SUSwZY','search','method','9GQPpBb','toString','@midwayjs/core','getOwnPropertyDescriptor','12eoRtrz','object','function','I18N_ATTR_KEY','registerMethodHandler','validator','prototype','apply','Configuration','methodArgs','res','__esModule','VALIDATOR_KEY','decorate','CustomConfiguration','MidwayDecoratorService','@midwayjs/i18n','Inject','name','2485330vUNsgy','args','385McYRJR','getClassMetadata'];a1_0x9816=function(){return _0x459cbf;};return a1_0x9816();}'use strict';var __decorate=this&&this['__decorate']||function(_0x744660,_0x30340c,_0x55ee22,_0x4443ab){const _0x51c169=a1_0x59e6;var _0x422599=arguments['length'],_0x1bc5d0=_0x422599<0x3?_0x30340c:_0x4443ab===null?_0x4443ab=Object[_0x51c169(0x147)](_0x30340c,_0x55ee22):_0x4443ab,_0x5c9b39;if(typeof Reflect===_0x51c169(0x149)&&typeof Reflect['decorate']===_0x51c169(0x14a))_0x1bc5d0=Reflect[_0x51c169(0x155)](_0x744660,_0x30340c,_0x55ee22,_0x4443ab);else{for(var _0x2b246f=_0x744660['length']-0x1;_0x2b246f>=0x0;_0x2b246f--)if(_0x5c9b39=_0x744660[_0x2b246f])_0x1bc5d0=(_0x422599<0x3?_0x5c9b39(_0x1bc5d0):_0x422599>0x3?_0x5c9b39(_0x30340c,_0x55ee22,_0x1bc5d0):_0x5c9b39(_0x30340c,_0x55ee22))||_0x1bc5d0;}return _0x422599>0x3&&_0x1bc5d0&&Object[_0x51c169(0x125)](_0x30340c,_0x55ee22,_0x1bc5d0),_0x1bc5d0;},__metadata=this&&this[a1_0x18bcdd(0x123)]||function(_0xd0b584,_0x5a7b6d){const _0x265c7c=a1_0x18bcdd;if(typeof Reflect===_0x265c7c(0x149)&&typeof Reflect[_0x265c7c(0x140)]===_0x265c7c(0x14a))return Reflect[_0x265c7c(0x140)](_0xd0b584,_0x5a7b6d);};Object['defineProperty'](exports,a1_0x18bcdd(0x153),{'value':!![]}),exports[a1_0x18bcdd(0x156)]=void 0x0;function a1_0x59e6(_0x171b07,_0x6e27e3){const _0x470276=a1_0x9816();return a1_0x59e6=function(_0x538d21,_0x7624d6){_0x538d21=_0x538d21-0x119;let _0x981639=_0x470276[_0x538d21];return _0x981639;},a1_0x59e6(_0x171b07,_0x6e27e3);}const i18n_1=require(a1_0x18bcdd(0x11a)),core_1=require(a1_0x18bcdd(0x146)),core_2=require(a1_0x18bcdd(0x146)),interface_1=require(a1_0x18bcdd(0x134)),ValidatorService_1=require(a1_0x18bcdd(0x13c)),i18n=require('@midwayjs/i18n'),anncic=require('@anncic-api/core'),ConfigDefault=require(a1_0x18bcdd(0x124));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x111aaf=a1_0x18bcdd;this[_0x111aaf(0x129)][_0x111aaf(0x14c)](interface_1[_0x111aaf(0x154)],_0x5a5181=>{const _0x36c1c8=_0x111aaf,_0x468b0b=_0x5a5181[_0x36c1c8(0x140)],_0x27fbf0=(0x0,core_2[_0x36c1c8(0x131)])(_0x5a5181[_0x36c1c8(0x13f)],_0x5a5181['propertyName']);return{'before':_0x5588e8=>{const _0x4b00e2=_0x36c1c8;var _0x1a0309,_0x374c91,_0x7abcc,_0x25ebed,_0x7fbd24,_0x42136b,_0x290cc4,_0x162b41,_0x2b1af1,_0x52ee56,_0x2d1329,_0x4d5b10,_0x19e3df;const _0x58c8f4=_0x5588e8[_0x4b00e2(0x13f)][core_1[_0x4b00e2(0x136)]],_0x3d38d5=Object[_0x4b00e2(0x127)]({},((_0x1a0309=_0x58c8f4===null||_0x58c8f4===void 0x0?void 0x0:_0x58c8f4[_0x4b00e2(0x12e)])===null||_0x1a0309===void 0x0?void 0x0:_0x1a0309['query'])||{},((_0x374c91=_0x58c8f4===null||_0x58c8f4===void 0x0?void 0x0:_0x58c8f4[_0x4b00e2(0x12e)])===null||_0x374c91===void 0x0?void 0x0:_0x374c91[_0x4b00e2(0x13b)])||{}),_0x5a33ff=((0x0,core_2[_0x4b00e2(0x120)])(interface_1[_0x4b00e2(0x154)],_0x5588e8[_0x4b00e2(0x13f)])||[])[_0x4b00e2(0x130)](_0x4ba0fa=>_0x4ba0fa[_0x4b00e2(0x143)]==_0x5588e8[_0x4b00e2(0x139)]);!(_0x468b0b===null||_0x468b0b===void 0x0?void 0x0:_0x468b0b['locale'])&&_0x58c8f4&&_0x58c8f4['getAttr']&&(_0x468b0b[_0x4b00e2(0x13a)]=_0x58c8f4[_0x4b00e2(0x12c)](i18n_1[_0x4b00e2(0x14b)]));for(let _0xa3229d=0x0;_0xa3229d<_0x27fbf0[_0x4b00e2(0x12a)];_0xa3229d++){const _0x464330=_0x27fbf0[_0xa3229d],_0x594dc8=this[_0x4b00e2(0x128)]['getSchema'](_0x464330);if(_0x594dc8){if(typeof _0x5588e8[_0x4b00e2(0x11e)][_0xa3229d]==_0x4b00e2(0x12f)||((_0x7abcc=_0x5588e8['args'][_0xa3229d])===null||_0x7abcc===void 0x0?void 0x0:_0x7abcc['request'])&&((_0x25ebed=_0x5588e8[_0x4b00e2(0x11e)][_0xa3229d])===null||_0x25ebed===void 0x0?void 0x0:_0x25ebed[_0x4b00e2(0x152)])&&((_0x7fbd24=_0x5588e8[_0x4b00e2(0x11e)][_0xa3229d])===null||_0x7fbd24===void 0x0?void 0x0:_0x7fbd24['req']))_0x5588e8[_0x4b00e2(0x11e)][_0xa3229d]=_0x3d38d5;else((_0x42136b=_0x5588e8['args'][_0xa3229d])===null||_0x42136b===void 0x0?void 0x0:_0x42136b[_0x4b00e2(0x11c)])=='bound\x20dispatch'&&_0x5588e8[_0x4b00e2(0x11e)][_0x4b00e2(0x12b)](_0xa3229d,0x0,_0x3d38d5);const _0x106235=this[_0x4b00e2(0x128)][_0x4b00e2(0x14d)](_0x594dc8,_0x5588e8[_0x4b00e2(0x11e)][_0xa3229d],_0x468b0b);_0x106235&&(_0x5588e8[_0x4b00e2(0x11e)][_0xa3229d]=_0x106235);}else{if((_0x5a33ff===null||_0x5a33ff===void 0x0?void 0x0:_0x5a33ff[_0x4b00e2(0x151)][_0xa3229d])&&((_0x290cc4=_0x5588e8[_0x4b00e2(0x11e)][_0xa3229d])===null||_0x290cc4===void 0x0?void 0x0:_0x290cc4[_0x4b00e2(0x135)])&&typeof _0x5588e8[_0x4b00e2(0x11e)][_0xa3229d]['param']=='function'&&((_0x162b41=_0x58c8f4===null||_0x58c8f4===void 0x0?void 0x0:_0x58c8f4['params'])===null||_0x162b41===void 0x0?void 0x0:_0x162b41[_0x5a33ff[_0x4b00e2(0x151)][_0xa3229d]]))_0x5588e8['args'][_0xa3229d]=_0x464330((_0x2b1af1=_0x58c8f4===null||_0x58c8f4===void 0x0?void 0x0:_0x58c8f4[_0x4b00e2(0x135)])===null||_0x2b1af1===void 0x0?void 0x0:_0x2b1af1[_0x5a33ff[_0x4b00e2(0x151)][_0xa3229d]]);else(_0x5a33ff===null||_0x5a33ff===void 0x0?void 0x0:_0x5a33ff[_0x4b00e2(0x151)][_0xa3229d])&&((_0x2d1329=(_0x52ee56=_0x5588e8[_0x4b00e2(0x11e)][_0xa3229d])===null||_0x52ee56===void 0x0?void 0x0:_0x52ee56[_0x4b00e2(0x135)])===null||_0x2d1329===void 0x0?void 0x0:_0x2d1329[_0x5a33ff[_0x4b00e2(0x151)][_0xa3229d]])&&(_0x5588e8['args'][_0xa3229d]=(_0x19e3df=(_0x4d5b10=_0x5588e8[_0x4b00e2(0x11e)][_0xa3229d])===null||_0x4d5b10===void 0x0?void 0x0:_0x4d5b10[_0x4b00e2(0x135)])===null||_0x19e3df===void 0x0?void 0x0:_0x19e3df[_0x5a33ff['methodArgs'][_0xa3229d]]);}}},'afterThrow':(_0x59f26a,_0x29815e)=>{throw _0x29815e;}};});}};__decorate([(0x0,core_2[a1_0x18bcdd(0x11b)])(),__metadata('design:type',core_1[a1_0x18bcdd(0x119)])],CustomConfiguration[a1_0x18bcdd(0x14e)],'decorator',void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x18bcdd(0x132),ValidatorService_1[a1_0x18bcdd(0x128)])],CustomConfiguration['prototype'],'ValidatorService',void 0x0),CustomConfiguration=__decorate([(0x0,core_2[a1_0x18bcdd(0x150)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x18bcdd(0x121),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x51a6c2=a2_0xb736;(function(_0x59e46f,_0x5877b9){const _0x2bc794=a2_0xb736,_0x11d517=_0x59e46f();while(!![]){try{const _0x3b23e9=parseInt(_0x2bc794(0x121))/0x1+-parseInt(_0x2bc794(0x115))/0x2+parseInt(_0x2bc794(0x105))/0x3+-parseInt(_0x2bc794(0x110))/0x4*(parseInt(_0x2bc794(0x11f))/0x5)+parseInt(_0x2bc794(0x113))/0x6*(parseInt(_0x2bc794(0x124))/0x7)+-parseInt(_0x2bc794(0x107))/0x8*(-parseInt(_0x2bc794(0x11e))/0x9)+-parseInt(_0x2bc794(0x126))/0xa*(parseInt(_0x2bc794(0x117))/0xb);if(_0x3b23e9===_0x5877b9)break;else _0x11d517['push'](_0x11d517['shift']());}catch(_0x5a21d4){_0x11d517['push'](_0x11d517['shift']());}}}(a2_0xe920,0x9c6b4));const a2_0x4faccd=(function(){let _0x39e7ad=!![];return function(_0x426e30,_0x1d3e92){const _0xd6f7e2=_0x39e7ad?function(){const _0xe2e41f=a2_0xb736;if(_0x1d3e92){const _0x5c610b=_0x1d3e92[_0xe2e41f(0x11c)](_0x426e30,arguments);return _0x1d3e92=null,_0x5c610b;}}:function(){};return _0x39e7ad=![],_0xd6f7e2;};}()),a2_0x3dad5a=a2_0x4faccd(this,function(){const _0x5800ef=a2_0xb736;return a2_0x3dad5a['toString']()[_0x5800ef(0x109)](_0x5800ef(0x129))['toString']()[_0x5800ef(0x111)](a2_0x3dad5a)[_0x5800ef(0x109)](_0x5800ef(0x129));});a2_0x3dad5a();'use strict';function a2_0xe920(){const _0x332191=['isSchema','5795256ubYaSZ','joi','443512yOmqIH','saveClassMetadata','11EKQGms','Array','__esModule','attachClassMetadata','../interface','apply','Rule','90954OmuGeC','5KcXBOZ','extend','46311OzvHDL','default','getPropertyType','7DjSQPt','RULES_KEY','1905730pOxUyE','@midwayjs/core','keys','(((.+)+)+)+$','name','description','meta','3007173XwijPl','RuleType','160wLMYLM','map','search','array','function','@joi/date','object','getClassMetadata','label','4654708YTsPlp','constructor'];a2_0xe920=function(){return _0x332191;};return a2_0xe920();}Object['defineProperty'](exports,a2_0x51a6c2(0x119),{'value':!![]}),exports[a2_0x51a6c2(0x11d)]=exports[a2_0x51a6c2(0x106)]=void 0x0;const joi=require(a2_0x51a6c2(0x114)),date_1=require(a2_0x51a6c2(0x10c)),core_1=require(a2_0x51a6c2(0x127)),interface_1=require(a2_0x51a6c2(0x11b));exports['RuleType']=joi[a2_0x51a6c2(0x120)](date_1[a2_0x51a6c2(0x122)]);function a2_0xb736(_0x124a5b,_0x1a4c09){const _0x1ea811=a2_0xe920();return a2_0xb736=function(_0x3dad5a,_0x4faccd){_0x3dad5a=_0x3dad5a-0x105;let _0xe9201c=_0x1ea811[_0x3dad5a];return _0xe9201c;},a2_0xb736(_0x124a5b,_0x1a4c09);}function Rule(_0x5247b7,_0x4c9fec,_0x498cd6=''){return(_0x2974c7,_0x530868)=>{const _0x1b39a1=a2_0xb736;var _0x5327d2;if(_0x530868)!joi[_0x1b39a1(0x112)](_0x4c9fec)&&(_0x4c9fec===null||_0x4c9fec===void 0x0?void 0x0:_0x4c9fec[_0x1b39a1(0x12a)])&&(_0x4c9fec=joi[_0x1b39a1(0x10d)]((0x0,core_1[_0x1b39a1(0x10e)])(interface_1[_0x1b39a1(0x125)],_0x4c9fec))[_0x1b39a1(0x12c)]({'id':_0x4c9fec[_0x1b39a1(0x12a)]}),(0x0,core_1[_0x1b39a1(0x123)])(_0x2974c7,_0x530868)[_0x1b39a1(0x12a)]===_0x1b39a1(0x118)&&(_0x4c9fec=joi[_0x1b39a1(0x10a)]()['items'](_0x4c9fec))),joi[_0x1b39a1(0x112)](_0x4c9fec)&&(_0x5247b7&&typeof(_0x4c9fec===null||_0x4c9fec===void 0x0?void 0x0:_0x4c9fec[_0x1b39a1(0x10f)])==_0x1b39a1(0x10b)&&(_0x4c9fec=_0x4c9fec[_0x1b39a1(0x10f)](_0x5247b7)),_0x498cd6&&typeof(_0x4c9fec===null||_0x4c9fec===void 0x0?void 0x0:_0x4c9fec[_0x1b39a1(0x12b)])==_0x1b39a1(0x10b)&&(_0x4c9fec=_0x4c9fec[_0x1b39a1(0x12b)](_0x498cd6)),(0x0,core_1[_0x1b39a1(0x11a)])(interface_1[_0x1b39a1(0x125)],_0x4c9fec,_0x2974c7,_0x530868));else{const _0x10e5ac=(0x0,core_1[_0x1b39a1(0x10e)])(interface_1['RULES_KEY'],_0x4c9fec);if(_0x10e5ac){let _0x492c81=(_0x5327d2=(0x0,core_1[_0x1b39a1(0x10e)])(interface_1[_0x1b39a1(0x125)],_0x2974c7))!==null&&_0x5327d2!==void 0x0?_0x5327d2:{};Object[_0x1b39a1(0x128)](_0x10e5ac)[_0x1b39a1(0x108)](_0x641128=>{!_0x492c81[_0x641128]&&(_0x492c81[_0x641128]=_0x10e5ac[_0x641128]);}),(0x0,core_1[_0x1b39a1(0x116)])(interface_1[_0x1b39a1(0x125)],_0x492c81,_0x2974c7);}}};}exports['Rule']=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x100595=a3_0x3ddb;(function(_0x30d6e1,_0x422072){const _0x9e5182=a3_0x3ddb,_0x2c2b29=_0x30d6e1();while(!![]){try{const _0x31e4f3=-parseInt(_0x9e5182(0x91))/0x1*(parseInt(_0x9e5182(0x89))/0x2)+parseInt(_0x9e5182(0x94))/0x3+-parseInt(_0x9e5182(0x93))/0x4+-parseInt(_0x9e5182(0x8a))/0x5*(parseInt(_0x9e5182(0x8b))/0x6)+-parseInt(_0x9e5182(0x87))/0x7+parseInt(_0x9e5182(0x92))/0x8*(parseInt(_0x9e5182(0x86))/0x9)+parseInt(_0x9e5182(0x97))/0xa;if(_0x31e4f3===_0x422072)break;else _0x2c2b29['push'](_0x2c2b29['shift']());}catch(_0x19ee11){_0x2c2b29['push'](_0x2c2b29['shift']());}}}(a3_0x3430,0x2487c));function a3_0x3ddb(_0x1d35e9,_0x36254d){const _0x5a6054=a3_0x3430();return a3_0x3ddb=function(_0x5733b8,_0x14bdff){_0x5733b8=_0x5733b8-0x86;let _0x343086=_0x5a6054[_0x5733b8];return _0x343086;},a3_0x3ddb(_0x1d35e9,_0x36254d);}const a3_0x14bdff=(function(){let _0xf6d636=!![];return function(_0x438257,_0x1d0c26){const _0x45d9ad=_0xf6d636?function(){if(_0x1d0c26){const _0x5e8a7d=_0x1d0c26['apply'](_0x438257,arguments);return _0x1d0c26=null,_0x5e8a7d;}}:function(){};return _0xf6d636=![],_0x45d9ad;};}()),a3_0x5733b8=a3_0x14bdff(this,function(){const _0x3f126e=a3_0x3ddb;return a3_0x5733b8[_0x3f126e(0x90)]()['search'](_0x3f126e(0x8f))[_0x3f126e(0x90)]()[_0x3f126e(0x9b)](a3_0x5733b8)['search'](_0x3f126e(0x8f));});a3_0x5733b8();'use strict';Object['defineProperty'](exports,a3_0x100595(0x8e),{'value':!![]}),exports[a3_0x100595(0x88)]=exports[a3_0x100595(0x98)]=void 0x0;function a3_0x3430(){const _0x18bc13=['toString','1621LjkqQf','8FiLdlC','131176XPyrID','646998dsBRNI','../interface','indexOf','1296360NbDjxg','Validator','createCustomMethodDecorator','prototype','constructor','@midwayjs/core','replace','713826RSdBIu','128576KTXXlU','getFuncArgs','10AjnIWF','15NcCytA','431442GeBTHX','VALIDATOR_KEY','function','__esModule','(((.+)+)+)+$'];a3_0x3430=function(){return _0x18bc13;};return a3_0x3430();}const core_1=require(a3_0x100595(0x9c)),interface_1=require(a3_0x100595(0x95));function Validator(_0x3747d2={}){return(_0x261170,_0x1f0b48,_0x5adbe6)=>{const _0x2910ee=a3_0x3ddb,_0x4941ff=getFuncArgs(_0x261170[_0x1f0b48]);(0x0,core_1['attachClassMetadata'])(interface_1[_0x2910ee(0x8c)],{'method':_0x1f0b48,'methodArgs':_0x4941ff},_0x261170),(0x0,core_1[_0x2910ee(0x99)])(interface_1['VALIDATOR_KEY'],_0x3747d2)(_0x261170,_0x1f0b48,_0x5adbe6);};}exports[a3_0x100595(0x98)]=Validator;function getFuncArgs(_0x3aed04){const _0x4b7f24=a3_0x100595;if(typeof _0x3aed04==_0x4b7f24(0x8d)){const _0x512f8f=/=>.*$/mg,_0x31ceb0=/=[^,)]+/mg,_0x3afd4a=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x34b686=(_0x3aed04[_0x4b7f24(0x9a)]?_0x3aed04[_0x4b7f24(0x9a)]['constructor'][_0x4b7f24(0x90)]():_0x3aed04[_0x4b7f24(0x90)]())['replace'](_0x3afd4a,'')[_0x4b7f24(0x9d)](_0x512f8f,'')[_0x4b7f24(0x9d)](_0x31ceb0,''),_0x279bd4=_0x34b686['slice'](_0x34b686['indexOf']('(')+0x1,_0x34b686[_0x4b7f24(0x96)](')'))['match'](/([^\s,]+)/g)||[];return _0x279bd4;}}exports[a3_0x100595(0x88)]=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x6f776c=a4_0x171f;(function(_0x46c77d,_0x4bb20c){var _0x41c7c3=a4_0x171f,_0xb6b089=_0x46c77d();while(!![]){try{var _0x4ee674=-parseInt(_0x41c7c3(0x100))/0x1*(-parseInt(_0x41c7c3(0x10b))/0x2)+parseInt(_0x41c7c3(0xf5))/0x3+-parseInt(_0x41c7c3(0xfb))/0x4+parseInt(_0x41c7c3(0xfd))/0x5+parseInt(_0x41c7c3(0xef))/0x6*(-parseInt(_0x41c7c3(0x10a))/0x7)+parseInt(_0x41c7c3(0xfe))/0x8*(parseInt(_0x41c7c3(0xf7))/0x9)+-parseInt(_0x41c7c3(0xf8))/0xa;if(_0x4ee674===_0x4bb20c)break;else _0xb6b089['push'](_0xb6b089['shift']());}catch(_0x24df8e){_0xb6b089['push'](_0xb6b089['shift']());}}}(a4_0x233c,0x84281));var a4_0x3b33b8=(function(){var _0x3603bb=!![];return function(_0x2b43ce,_0x1074f5){var _0x5ab265=_0x3603bb?function(){var _0x250227=a4_0x171f;if(_0x1074f5){var _0x4e6d53=_0x1074f5[_0x250227(0x105)](_0x2b43ce,arguments);return _0x1074f5=null,_0x4e6d53;}}:function(){};return _0x3603bb=![],_0x5ab265;};}()),a4_0x476bd3=a4_0x3b33b8(this,function(){var _0x24c928=a4_0x171f;return a4_0x476bd3['toString']()[_0x24c928(0x107)](_0x24c928(0xf3))[_0x24c928(0xff)]()['constructor'](a4_0x476bd3)[_0x24c928(0x107)](_0x24c928(0xf3));});a4_0x476bd3();'use strict';var __decorate=this&&this[a4_0x6f776c(0xf9)]||function(_0x55b7da,_0x1ac3b6,_0x376c7e,_0x1f9d25){var _0x567f53=a4_0x6f776c,_0x532058=arguments[_0x567f53(0xf0)],_0x102341=_0x532058<0x3?_0x1ac3b6:_0x1f9d25===null?_0x1f9d25=Object[_0x567f53(0x101)](_0x1ac3b6,_0x376c7e):_0x1f9d25,_0x34a827;if(typeof Reflect===_0x567f53(0x106)&&typeof Reflect['decorate']===_0x567f53(0xf1))_0x102341=Reflect[_0x567f53(0x103)](_0x55b7da,_0x1ac3b6,_0x376c7e,_0x1f9d25);else{for(var _0x2c3d24=_0x55b7da['length']-0x1;_0x2c3d24>=0x0;_0x2c3d24--)if(_0x34a827=_0x55b7da[_0x2c3d24])_0x102341=(_0x532058<0x3?_0x34a827(_0x102341):_0x532058>0x3?_0x34a827(_0x1ac3b6,_0x376c7e,_0x102341):_0x34a827(_0x1ac3b6,_0x376c7e))||_0x102341;}return _0x532058>0x3&&_0x102341&&Object[_0x567f53(0x109)](_0x1ac3b6,_0x376c7e,_0x102341),_0x102341;},__metadata=this&&this[a4_0x6f776c(0x102)]||function(_0x21a2ba,_0x1e8767){var _0x3c306a=a4_0x6f776c;if(typeof Reflect===_0x3c306a(0x106)&&typeof Reflect[_0x3c306a(0x108)]==='function')return Reflect[_0x3c306a(0x108)](_0x21a2ba,_0x1e8767);};function a4_0x171f(_0x3ac254,_0x5f1f7b){var _0x422407=a4_0x233c();return a4_0x171f=function(_0x476bd3,_0x3b33b8){_0x476bd3=_0x476bd3-0xed;var _0x233c9a=_0x422407[_0x476bd3];return _0x233c9a;},a4_0x171f(_0x3ac254,_0x5f1f7b);}function a4_0x233c(){var _0xabe4c3=['design:type','NOFIND_SCHEMA','677094ENVrbO','length','function','@anncic-api/core','(((.+)+)+)+$','AnnErrorMsg','1479561CnQSiw','__esModule','5841sleaeX','6426710qppAcZ','__decorate','ValidatorError','2031320QIKGAs','PARAMS','1831665MNBNxH','11080ymaPnf','toString','33997kQazNH','getOwnPropertyDescriptor','__metadata','decorate','参数验证失败','apply','object','search','metadata','defineProperty','21FtYPEi','16JMNGBb'];a4_0x233c=function(){return _0xabe4c3;};return a4_0x233c();}Object[a4_0x6f776c(0x109)](exports,a4_0x6f776c(0xf6),{'value':!![]}),exports['ValidatorError']=void 0x0;const core_1=require(a4_0x6f776c(0xf2));class ValidatorError extends AnnError{}ValidatorError[a4_0x6f776c(0xfc)]=0x18c1e,ValidatorError[a4_0x6f776c(0xee)]=0x18c1c,__decorate([(0x0,core_1[a4_0x6f776c(0xf4)])('参数验证失败'),__metadata(a4_0x6f776c(0xed),Object)],ValidatorError,a4_0x6f776c(0xfc),void 0x0),__decorate([(0x0,core_1['AnnErrorMsg'])(a4_0x6f776c(0x104)),__metadata(a4_0x6f776c(0xed),Object)],ValidatorError,a4_0x6f776c(0xee),void 0x0),exports[a4_0x6f776c(0xfa)]=ValidatorError;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x16c06b=a5_0x1802;function a5_0x1802(_0x361d06,_0x36bb91){const _0x5284ae=a5_0x9c93();return a5_0x1802=function(_0x2ced4d,_0x1a87e4){_0x2ced4d=_0x2ced4d-0x1ad;let _0x9c9386=_0x5284ae[_0x2ced4d];return _0x9c9386;},a5_0x1802(_0x361d06,_0x36bb91);}(function(_0x1c1e46,_0x1014a2){const _0xf7d36f=a5_0x1802,_0x366745=_0x1c1e46();while(!![]){try{const _0x5d1a1d=parseInt(_0xf7d36f(0x1c2))/0x1*(-parseInt(_0xf7d36f(0x1bc))/0x2)+-parseInt(_0xf7d36f(0x1b8))/0x3+-parseInt(_0xf7d36f(0x1c3))/0x4*(parseInt(_0xf7d36f(0x1b2))/0x5)+-parseInt(_0xf7d36f(0x1af))/0x6+-parseInt(_0xf7d36f(0x1bf))/0x7*(parseInt(_0xf7d36f(0x1b1))/0x8)+parseInt(_0xf7d36f(0x1b4))/0x9+parseInt(_0xf7d36f(0x1bb))/0xa;if(_0x5d1a1d===_0x1014a2)break;else _0x366745['push'](_0x366745['shift']());}catch(_0x2992b4){_0x366745['push'](_0x366745['shift']());}}}(a5_0x9c93,0xb1da8));const a5_0x1a87e4=(function(){let _0x308a90=!![];return function(_0x2d3fa2,_0x1910d5){const _0x53e3e2=_0x308a90?function(){if(_0x1910d5){const _0x59fda4=_0x1910d5['apply'](_0x2d3fa2,arguments);return _0x1910d5=null,_0x59fda4;}}:function(){};return _0x308a90=![],_0x53e3e2;};}()),a5_0x2ced4d=a5_0x1a87e4(this,function(){const _0x43fa0a=a5_0x1802;return a5_0x2ced4d['toString']()[_0x43fa0a(0x1c0)](_0x43fa0a(0x1b7))['toString']()[_0x43fa0a(0x1b5)](a5_0x2ced4d)[_0x43fa0a(0x1c0)]('(((.+)+)+)+$');});a5_0x2ced4d();'use strict';Object['defineProperty'](exports,a5_0x16c06b(0x1b9),{'value':!![]}),exports['OmitDto']=exports[a5_0x16c06b(0x1b3)]=void 0x0;function a5_0x9c93(){const _0x1410a3=['prototype','128czNJMQ','157580jZXYpB','PickDto','10117323iSyFBO','constructor','@midwayjs/core','(((.+)+)+)+$','1020246YMoKtF','__esModule','getClassExtendedMetadata','26961050sZqrrH','20366DmoapD','OmitDto','../interface','591178stfsdp','search','saveClassMetadata','19ROdYvH','112TLCOoM','RULES_KEY','assign','1946958sncfOZ'];a5_0x9c93=function(){return _0x1410a3;};return a5_0x9c93();}const core_1=require(a5_0x16c06b(0x1b6)),interface_1=require(a5_0x16c06b(0x1be));function PickDto(_0x575432,_0x11cee2){const _0x35e01a=a5_0x16c06b,_0x3761fb=function(){};_0x3761fb[_0x35e01a(0x1b0)]=_0x575432[_0x35e01a(0x1b0)];const _0x3224bf=(0x0,core_1['getClassExtendedMetadata'])(interface_1['RULES_KEY'],_0x575432),_0x1d588f={};for(const _0x2c4e5f of _0x11cee2){_0x3224bf[_0x2c4e5f]&&(_0x1d588f[_0x2c4e5f]=_0x3224bf[_0x2c4e5f]);}return(0x0,core_1[_0x35e01a(0x1c1)])(interface_1[_0x35e01a(0x1ad)],_0x1d588f,_0x3761fb),_0x3761fb;}exports[a5_0x16c06b(0x1b3)]=PickDto;function OmitDto(_0x103ccb,_0xfbc9d1){const _0xa0d5b=a5_0x16c06b,_0x2168c6=function(){};_0x2168c6['prototype']=_0x103ccb[_0xa0d5b(0x1b0)];const _0x491533=(0x0,core_1[_0xa0d5b(0x1ba)])(interface_1[_0xa0d5b(0x1ad)],_0x103ccb),_0x454d86=Object[_0xa0d5b(0x1ae)]({},_0x491533);for(const _0x171acc of _0xfbc9d1){delete _0x454d86[_0x171acc];}return(0x0,core_1[_0xa0d5b(0x1c1)])(interface_1[_0xa0d5b(0x1ad)],_0x454d86,_0x2168c6),_0x2168c6;}exports[a5_0x16c06b(0x1bd)]=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a6_0x361e(_0x47ee1a,_0x393593){var _0x5a707e=a6_0x573a();return a6_0x361e=function(_0x63a989,_0x414dd9){_0x63a989=_0x63a989-0x1c4;var _0x573acd=_0x5a707e[_0x63a989];return _0x573acd;},a6_0x361e(_0x47ee1a,_0x393593);}var a6_0x15e5e7=a6_0x361e;(function(_0x7f1471,_0x271e5c){var _0x109c0d=a6_0x361e,_0x3eaa9d=_0x7f1471();while(!![]){try{var _0x2adbb3=-parseInt(_0x109c0d(0x1e4))/0x1*(-parseInt(_0x109c0d(0x1e3))/0x2)+-parseInt(_0x109c0d(0x1d1))/0x3*(parseInt(_0x109c0d(0x1ce))/0x4)+-parseInt(_0x109c0d(0x1de))/0x5*(-parseInt(_0x109c0d(0x1db))/0x6)+-parseInt(_0x109c0d(0x1e8))/0x7+parseInt(_0x109c0d(0x1d7))/0x8+-parseInt(_0x109c0d(0x1e5))/0x9+parseInt(_0x109c0d(0x1e1))/0xa;if(_0x2adbb3===_0x271e5c)break;else _0x3eaa9d['push'](_0x3eaa9d['shift']());}catch(_0x3ea4bd){_0x3eaa9d['push'](_0x3eaa9d['shift']());}}}(a6_0x573a,0xa50ba));var a6_0x414dd9=(function(){var _0x480c2c=!![];return function(_0x1b8b4f,_0x2b9145){var _0x464be5=_0x480c2c?function(){var _0x5ac0d4=a6_0x361e;if(_0x2b9145){var _0x5e0b4d=_0x2b9145[_0x5ac0d4(0x1c9)](_0x1b8b4f,arguments);return _0x2b9145=null,_0x5e0b4d;}}:function(){};return _0x480c2c=![],_0x464be5;};}()),a6_0x63a989=a6_0x414dd9(this,function(){var _0x111730=a6_0x361e;return a6_0x63a989[_0x111730(0x1d2)]()[_0x111730(0x1e2)](_0x111730(0x1df))[_0x111730(0x1d2)]()[_0x111730(0x1cd)](a6_0x63a989)[_0x111730(0x1e2)]('(((.+)+)+)+$');});a6_0x63a989();'use strict';var __createBinding=this&&this['__createBinding']||(Object[a6_0x15e5e7(0x1ea)]?function(_0xdcfce,_0x193f8e,_0xb976b,_0x1b0665){var _0x52e311=a6_0x15e5e7;if(_0x1b0665===undefined)_0x1b0665=_0xb976b;var _0x2b0490=Object[_0x52e311(0x1d4)](_0x193f8e,_0xb976b);(!_0x2b0490||(_0x52e311(0x1cb)in _0x2b0490?!_0x193f8e[_0x52e311(0x1c8)]:_0x2b0490[_0x52e311(0x1e7)]||_0x2b0490['configurable']))&&(_0x2b0490={'enumerable':!![],'get':function(){return _0x193f8e[_0xb976b];}}),Object['defineProperty'](_0xdcfce,_0x1b0665,_0x2b0490);}:function(_0x1d6963,_0x55c5b9,_0x1c8031,_0x2ec3e3){if(_0x2ec3e3===undefined)_0x2ec3e3=_0x1c8031;_0x1d6963[_0x2ec3e3]=_0x55c5b9[_0x1c8031];}),__exportStar=this&&this[a6_0x15e5e7(0x1e6)]||function(_0x3f0e90,_0x2cab08){var _0x3a906d=a6_0x15e5e7;for(var _0x26f525 in _0x3f0e90)if(_0x26f525!==_0x3a906d(0x1c5)&&!Object[_0x3a906d(0x1da)]['hasOwnProperty'][_0x3a906d(0x1e0)](_0x2cab08,_0x26f525))__createBinding(_0x2cab08,_0x3f0e90,_0x26f525);};Object[a6_0x15e5e7(0x1c6)](exports,a6_0x15e5e7(0x1c8),{'value':!![]}),exports['Configuration']=exports[a6_0x15e5e7(0x1e9)]=exports['ValidatorError']=exports[a6_0x15e5e7(0x1d6)]=exports[a6_0x15e5e7(0x1d9)]=exports['Validator']=void 0x0,__exportStar(require(a6_0x15e5e7(0x1d3)),exports),__exportStar(require(a6_0x15e5e7(0x1cf)),exports);var Validator_1=require(a6_0x15e5e7(0x1ca));Object['defineProperty'](exports,'Validator',{'enumerable':!![],'get':function(){var _0x146fbf=a6_0x15e5e7;return Validator_1[_0x146fbf(0x1c7)];}});var Rule_1=require(a6_0x15e5e7(0x1d0));Object[a6_0x15e5e7(0x1c6)](exports,a6_0x15e5e7(0x1d9),{'enumerable':!![],'get':function(){return Rule_1['Rule'];}}),Object[a6_0x15e5e7(0x1c6)](exports,a6_0x15e5e7(0x1d6),{'enumerable':!![],'get':function(){var _0x29d00c=a6_0x15e5e7;return Rule_1[_0x29d00c(0x1d6)];}});var ValidatorError_1=require(a6_0x15e5e7(0x1d8));Object[a6_0x15e5e7(0x1c6)](exports,a6_0x15e5e7(0x1dc),{'enumerable':!![],'get':function(){return ValidatorError_1['ValidatorError'];}});var ValidatorService_1=require(a6_0x15e5e7(0x1dd));Object[a6_0x15e5e7(0x1c6)](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x5ce1f3=a6_0x15e5e7;return ValidatorService_1[_0x5ce1f3(0x1e9)];}});var configuration_1=require(a6_0x15e5e7(0x1c4));function a6_0x573a(){var _0x419e1b=['__exportStar','writable','8482607yFaqXI','ValidatorService','create','./configuration','default','defineProperty','Validator','__esModule','apply','./decorator/Validator','get','CustomConfiguration','constructor','3000SDfocR','./helper/dtoHelper','./decorator/Rule','483Wbgyoy','toString','./interface','getOwnPropertyDescriptor','Configuration','RuleType','6076664MbyPqn','./exception/ValidatorError','Rule','prototype','6770382yZAyOX','ValidatorError','./service/ValidatorService','5CSuUOR','(((.+)+)+)+$','call','7358550HNaqkb','search','42120jLCNhK','12xVpLKQ','7811802usnpnS'];a6_0x573a=function(){return _0x419e1b;};return a6_0x573a();}Object[a6_0x15e5e7(0x1c6)](exports,a6_0x15e5e7(0x1d5),{'enumerable':!![],'get':function(){var _0x5b975c=a6_0x15e5e7;return configuration_1[_0x5b975c(0x1cc)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a7_0x1e67c0=a7_0x4ee9;(function(_0x6b574b,_0x17da02){var _0x9f05e8=a7_0x4ee9,_0x2fdb6f=_0x6b574b();while(!![]){try{var _0x2e0cbc=-parseInt(_0x9f05e8(0x91))/0x1+-parseInt(_0x9f05e8(0x97))/0x2*(-parseInt(_0x9f05e8(0x98))/0x3)+parseInt(_0x9f05e8(0x9a))/0x4*(-parseInt(_0x9f05e8(0x90))/0x5)+parseInt(_0x9f05e8(0x96))/0x6+-parseInt(_0x9f05e8(0x95))/0x7+-parseInt(_0x9f05e8(0x8c))/0x8+parseInt(_0x9f05e8(0x94))/0x9;if(_0x2e0cbc===_0x17da02)break;else _0x2fdb6f['push'](_0x2fdb6f['shift']());}catch(_0x4163c3){_0x2fdb6f['push'](_0x2fdb6f['shift']());}}}(a7_0x20e6,0x73bf0));var a7_0xa60be3=(function(){var _0x1759b2=!![];return function(_0x3b93e5,_0x483364){var _0x4b93cf=_0x1759b2?function(){if(_0x483364){var _0x478fca=_0x483364['apply'](_0x3b93e5,arguments);return _0x483364=null,_0x478fca;}}:function(){};return _0x1759b2=![],_0x4b93cf;};}()),a7_0x1daeb6=a7_0xa60be3(this,function(){var _0x38118a=a7_0x4ee9;return a7_0x1daeb6[_0x38118a(0x8b)]()[_0x38118a(0x8f)]('(((.+)+)+)+$')[_0x38118a(0x8b)]()['constructor'](a7_0x1daeb6)[_0x38118a(0x8f)](_0x38118a(0x99));});a7_0x1daeb6();function a7_0x4ee9(_0x2affc5,_0x2199e3){var _0x1c725a=a7_0x20e6();return a7_0x4ee9=function(_0x1daeb6,_0xa60be3){_0x1daeb6=_0x1daeb6-0x8b;var _0x20e639=_0x1c725a[_0x1daeb6];return _0x20e639;},a7_0x4ee9(_0x2affc5,_0x2199e3);}function a7_0x20e6(){var _0x5ca6d3=['13494600yKLMTe','101892uThCxI','4044444dtJUdT','6izISYl','336054OgBUOf','(((.+)+)+)+$','1057372mGkidZ','toString','7473448ehiJyq','anncic-api:validator:rules','VALIDATOR_KEY','search','5gaUMtz','822352QVtJxp','RULES_KEY','__esModule'];a7_0x20e6=function(){return _0x5ca6d3;};return a7_0x20e6();}'use strict';Object['defineProperty'](exports,a7_0x1e67c0(0x93),{'value':!![]}),exports['VALIDATOR_KEY']=exports['RULES_KEY']=void 0x0,exports[a7_0x1e67c0(0x92)]=a7_0x1e67c0(0x8d),exports[a7_0x1e67c0(0x8e)]='anncic-api:validator:validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x368061=a8_0x4c4c;(function(_0x67cf92,_0x12770f){const _0x591dbf=a8_0x4c4c,_0x1491ab=_0x67cf92();while(!![]){try{const _0x53d22f=parseInt(_0x591dbf(0x153))/0x1*(-parseInt(_0x591dbf(0x146))/0x2)+-parseInt(_0x591dbf(0x129))/0x3+-parseInt(_0x591dbf(0x12b))/0x4+-parseInt(_0x591dbf(0x11f))/0x5*(parseInt(_0x591dbf(0x139))/0x6)+-parseInt(_0x591dbf(0x131))/0x7+parseInt(_0x591dbf(0x13d))/0x8+-parseInt(_0x591dbf(0x15f))/0x9*(-parseInt(_0x591dbf(0x124))/0xa);if(_0x53d22f===_0x12770f)break;else _0x1491ab['push'](_0x1491ab['shift']());}catch(_0xfe7a82){_0x1491ab['push'](_0x1491ab['shift']());}}}(a8_0x4f80,0xc7627));const a8_0x4b0bf1=(function(){let _0x7a1521=!![];return function(_0xa8afce,_0x5a6c90){const _0x40add5=_0x7a1521?function(){const _0x5e47ed=a8_0x4c4c;if(_0x5a6c90){const _0x43f435=_0x5a6c90[_0x5e47ed(0x130)](_0xa8afce,arguments);return _0x5a6c90=null,_0x43f435;}}:function(){};return _0x7a1521=![],_0x40add5;};}()),a8_0x1228e2=a8_0x4b0bf1(this,function(){const _0x457333=a8_0x4c4c;return a8_0x1228e2[_0x457333(0x12c)]()[_0x457333(0x123)](_0x457333(0x158))[_0x457333(0x12c)]()[_0x457333(0x13e)](a8_0x1228e2)['search']('(((.+)+)+)+$');});a8_0x1228e2();'use strict';var __decorate=this&&this[a8_0x368061(0x15a)]||function(_0x5ea9bf,_0x5997c4,_0x23e2f1,_0x5bf85c){const _0x4867c7=a8_0x368061;var _0x25b5ca=arguments[_0x4867c7(0x144)],_0x50be00=_0x25b5ca<0x3?_0x5997c4:_0x5bf85c===null?_0x5bf85c=Object[_0x4867c7(0x143)](_0x5997c4,_0x23e2f1):_0x5bf85c,_0x2b0eb9;if(typeof Reflect===_0x4867c7(0x150)&&typeof Reflect[_0x4867c7(0x160)]===_0x4867c7(0x120))_0x50be00=Reflect[_0x4867c7(0x160)](_0x5ea9bf,_0x5997c4,_0x23e2f1,_0x5bf85c);else{for(var _0x7284e6=_0x5ea9bf['length']-0x1;_0x7284e6>=0x0;_0x7284e6--)if(_0x2b0eb9=_0x5ea9bf[_0x7284e6])_0x50be00=(_0x25b5ca<0x3?_0x2b0eb9(_0x50be00):_0x25b5ca>0x3?_0x2b0eb9(_0x5997c4,_0x23e2f1,_0x50be00):_0x2b0eb9(_0x5997c4,_0x23e2f1))||_0x50be00;}return _0x25b5ca>0x3&&_0x50be00&&Object[_0x4867c7(0x121)](_0x5997c4,_0x23e2f1,_0x50be00),_0x50be00;},__metadata=this&&this[a8_0x368061(0x140)]||function(_0x2471dd,_0x1a82df){const _0x218e07=a8_0x368061;if(typeof Reflect===_0x218e07(0x150)&&typeof Reflect[_0x218e07(0x154)]===_0x218e07(0x120))return Reflect[_0x218e07(0x154)](_0x2471dd,_0x1a82df);};Object[a8_0x368061(0x121)](exports,a8_0x368061(0x156),{'value':!![]}),exports[a8_0x368061(0x166)]=void 0x0;function a8_0x4c4c(_0x530143,_0x5ae8d4){const _0x261833=a8_0x4f80();return a8_0x4c4c=function(_0x1228e2,_0x4b0bf1){_0x1228e2=_0x1228e2-0x11e;let _0x4f80bc=_0x261833[_0x1228e2];return _0x4f80bc;},a8_0x4c4c(_0x530143,_0x5ae8d4);}const Joi=require(a8_0x368061(0x12e)),i18n_1=require(a8_0x368061(0x15c)),core_1=require(a8_0x368061(0x137)),interface_1=require(a8_0x368061(0x14a)),ValidatorError_1=require(a8_0x368061(0x133));let ValidatorService=class ValidatorService{constructor(){const _0x2ceab8=a8_0x368061;this[_0x2ceab8(0x12a)]={};}async[a8_0x368061(0x127)](){const _0x5b489e=a8_0x368061,_0x4de48c=Object[_0x5b489e(0x125)](this[_0x5b489e(0x11e)][_0x5b489e(0x14f)]);_0x4de48c['forEach'](_0x41aea0=>{const _0x435992=_0x5b489e;this['messages'][(0x0,i18n_1[_0x435992(0x161)])(_0x41aea0)]=Object[_0x435992(0x134)](this[_0x435992(0x138)][_0x435992(0x136)](_0x41aea0,'validator'));});}[a8_0x368061(0x164)](_0x2f7f75){const _0x2d792f=a8_0x368061,_0x4dc4ca=(0x0,core_1[_0x2d792f(0x162)])(interface_1[_0x2d792f(0x159)],_0x2f7f75);return _0x4dc4ca?Joi[_0x2d792f(0x150)](_0x4dc4ca):undefined;}['validator'](_0x199072,_0x35d8f6,_0x2ac196={}){const _0x2c74d4=a8_0x368061;var _0x9cfacc,_0x1d99ba,_0xbc3536,_0x363e4b,_0x6199bf,_0x11fec7;const _0x5ddc85=Joi[_0x2c74d4(0x15e)](_0x199072)?_0x199072:this[_0x2c74d4(0x164)](_0x199072);if(!_0x5ddc85)throw new AnnError(ValidatorError_1['ValidatorError'][_0x2c74d4(0x151)]);_0x2ac196[_0x2c74d4(0x167)]=Object['assign']((_0x9cfacc=this[_0x2c74d4(0x128)][_0x2c74d4(0x167)])!==null&&_0x9cfacc!==void 0x0?_0x9cfacc:{},{'messages':this[_0x2c74d4(0x12a)]},_0x2ac196['validationOptions']||{}),_0x2ac196['validationOptions'][_0x2c74d4(0x13c)]=_0x2ac196[_0x2c74d4(0x167)][_0x2c74d4(0x13c)]||{},_0x2ac196['validationOptions'][_0x2c74d4(0x13c)]['language']=(0x0,i18n_1['formatLocale'])(this[_0x2c74d4(0x138)]['getAvailableLocale'](_0x2ac196[_0x2c74d4(0x167)][_0x2c74d4(0x13c)]['language']||_0x2ac196[_0x2c74d4(0x14d)]||this[_0x2c74d4(0x11e)][_0x2c74d4(0x135)],'validator'));const _0x11f77b=_0x5ddc85[_0x2c74d4(0x169)](_0x35d8f6,_0x2ac196['validationOptions']);if(_0x11f77b===null||_0x11f77b===void 0x0?void 0x0:_0x11f77b[_0x2c74d4(0x147)]){if(_0x11f77b['error']instanceof AnnError)throw _0x11f77b['error'];else{if(_0x11f77b[_0x2c74d4(0x147)]instanceof Error)throw new AnnError(ValidatorError_1[_0x2c74d4(0x152)]['PARAMS'],{'message':((_0x1d99ba=_0x11f77b[_0x2c74d4(0x147)])===null||_0x1d99ba===void 0x0?void 0x0:_0x1d99ba[_0x2c74d4(0x126)])||'参数验证失败'});else throw new AnnError(ValidatorError_1[_0x2c74d4(0x152)][_0x2c74d4(0x157)],{'message':((_0x6199bf=(_0x363e4b=(_0xbc3536=_0x11f77b['error'])===null||_0xbc3536===void 0x0?void 0x0:_0xbc3536['details'])===null||_0x363e4b===void 0x0?void 0x0:_0x363e4b[0x0])===null||_0x6199bf===void 0x0?void 0x0:_0x6199bf[_0x2c74d4(0x126)])||_0x2c74d4(0x15d)});}}if(_0x11f77b===null||_0x11f77b===void 0x0?void 0x0:_0x11f77b[_0x2c74d4(0x149)]){const _0x180893=(_0x11fec7=_0x5ddc85===null||_0x5ddc85===void 0x0?void 0x0:_0x5ddc85[_0x2c74d4(0x148)])===null||_0x11fec7===void 0x0?void 0x0:_0x11fec7[_0x2c74d4(0x125)],_0x3b098b=function(_0x20fb58,_0x43a2c6){const _0x5aaea8=_0x2c74d4;var _0x1aa717,_0xf4d39d,_0x1879cf,_0x2cfe75,_0x194af8,_0x286d66,_0xdb889,_0x5c906e,_0x451fe8,_0x3bdf32,_0x17f7be;for(let _0x1cf4a8 in _0x20fb58){if(_0x43a2c6[(_0x1aa717=_0x20fb58[_0x1cf4a8])===null||_0x1aa717===void 0x0?void 0x0:_0x1aa717[_0x5aaea8(0x14e)]]&&((_0x1879cf=(_0xf4d39d=_0x20fb58[_0x1cf4a8])===null||_0xf4d39d===void 0x0?void 0x0:_0xf4d39d[_0x5aaea8(0x13f)])===null||_0x1879cf===void 0x0?void 0x0:_0x1879cf[_0x5aaea8(0x163)])){if(((_0x194af8=(_0x2cfe75=_0x20fb58[_0x1cf4a8])===null||_0x2cfe75===void 0x0?void 0x0:_0x2cfe75[_0x5aaea8(0x13f)])===null||_0x194af8===void 0x0?void 0x0:_0x194af8['type'])==_0x5aaea8(0x150))_0x43a2c6[_0x20fb58[_0x1cf4a8][_0x5aaea8(0x14e)]]=_0x3b098b((_0xdb889=(_0x286d66=_0x20fb58[_0x1cf4a8])===null||_0x286d66===void 0x0?void 0x0:_0x286d66[_0x5aaea8(0x13f)][_0x5aaea8(0x148)])===null||_0xdb889===void 0x0?void 0x0:_0xdb889[_0x5aaea8(0x125)],_0x43a2c6[_0x20fb58[_0x1cf4a8][_0x5aaea8(0x14e)]]);else{if(_0x20fb58[_0x1cf4a8][_0x5aaea8(0x13f)]['type']==_0x5aaea8(0x13a)&&_0x11f77b[_0x5aaea8(0x149)][(_0x5c906e=_0x20fb58[_0x1cf4a8])===null||_0x5c906e===void 0x0?void 0x0:_0x5c906e[_0x5aaea8(0x14e)]]){const _0xfe3a12=((_0x17f7be=(_0x3bdf32=(_0x451fe8=_0x20fb58[_0x1cf4a8])===null||_0x451fe8===void 0x0?void 0x0:_0x451fe8[_0x5aaea8(0x13f)])===null||_0x3bdf32===void 0x0?void 0x0:_0x3bdf32[_0x5aaea8(0x13b)])===null||_0x17f7be===void 0x0?void 0x0:_0x17f7be[_0x5aaea8(0x132)])||_0x5aaea8(0x142);_0x43a2c6[_0x20fb58[_0x1cf4a8]['key']]=dayjs(_0x11f77b['value'][_0x20fb58[_0x1cf4a8][_0x5aaea8(0x14e)]])['format'](_0xfe3a12);}}}}return _0x43a2c6;};return _0x3b098b(_0x180893,_0x11f77b['value']);}throw new AnnError(ValidatorError_1[_0x2c74d4(0x152)][_0x2c74d4(0x157)]);}};__decorate([(0x0,core_1[a8_0x368061(0x15b)])('i18n'),__metadata(a8_0x368061(0x122),Object)],ValidatorService[a8_0x368061(0x14b)],'i18nConfig',void 0x0),__decorate([(0x0,core_1[a8_0x368061(0x15b)])('validator'),__metadata(a8_0x368061(0x122),Object)],ValidatorService[a8_0x368061(0x14b)],a8_0x368061(0x128),void 0x0),__decorate([(0x0,core_1[a8_0x368061(0x165)])(),__metadata(a8_0x368061(0x122),i18n_1['MidwayI18nServiceSingleton'])],ValidatorService[a8_0x368061(0x14b)],a8_0x368061(0x138),void 0x0),__decorate([(0x0,core_1[a8_0x368061(0x12d)])(),__metadata('design:type',Function),__metadata(a8_0x368061(0x14c),[]),__metadata(a8_0x368061(0x155),Promise)],ValidatorService['prototype'],a8_0x368061(0x127),null),ValidatorService=__decorate([(0x0,core_1[a8_0x368061(0x168)])('validator'),(0x0,core_1[a8_0x368061(0x145)])(core_1[a8_0x368061(0x141)][a8_0x368061(0x12f)])],ValidatorService),exports['ValidatorService']=ValidatorService;function a8_0x4f80(){const _0x257125=['errors','1994152iFRzwp','constructor','schema','__metadata','ScopeEnum','YYYY-MM-DD\x20HH:mm:ss','getOwnPropertyDescriptor','length','Scope','12pcliQM','error','$_terms','value','../interface','prototype','design:paramtypes','locale','key','localeTable','object','NOFIND_SCHEMA','ValidatorError','214777uYUbyS','metadata','design:returntype','__esModule','PARAMS','(((.+)+)+)+$','RULES_KEY','__decorate','Config','@midwayjs/i18n','参数验证失败','isSchema','42532929hbnhFT','decorate','formatLocale','getClassExtendedMetadata','type','getSchema','Inject','ValidatorService','validationOptions','Provide','validate','i18nConfig','5yqXTBS','function','defineProperty','design:type','search','10AoWsCY','keys','message','init','validatorConfig','738954HdLljX','messages','6469448LcYzYB','toString','Init','joi','Singleton','apply','172669FebDGB','format','../exception/ValidatorError','fromEntries','defaultLocale','getLocaleMapping','@midwayjs/core','i18nService','5888772gYVkGL','date','_flags'];a8_0x4f80=function(){return _0x257125;};return a8_0x4f80();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
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": "^2.1.
|
|
20
|
+
"@anncic-api/core": "^2.1.4",
|
|
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": "4db310a6e493ba5d6fb4f6e2cc74c29602526df7"
|
|
30
30
|
}
|