@anncic-api/validator 2.0.13 → 2.1.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/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_0x3ca9af=a0_0x4647;function a0_0x4647(_0x23e9c4,_0x29365f){const _0xa57103=a0_0x4cb2();return a0_0x4647=function(_0x5de364,_0x2a7d76){_0x5de364=_0x5de364-0x88;let _0x4cb2dd=_0xa57103[_0x5de364];return _0x4cb2dd;},a0_0x4647(_0x23e9c4,_0x29365f);}(function(_0x56623f,_0x60a0b9){const _0x39ace7=a0_0x4647,_0x3011db=_0x56623f();while(!![]){try{const _0x459bfc=-parseInt(_0x39ace7(0x97))/0x1+parseInt(_0x39ace7(0x9b))/0x2*(-parseInt(_0x39ace7(0x95))/0x3)+-parseInt(_0x39ace7(0x93))/0x4+parseInt(_0x39ace7(0x8c))/0x5*(-parseInt(_0x39ace7(0x89))/0x6)+parseInt(_0x39ace7(0x91))/0x7*(-parseInt(_0x39ace7(0x9a))/0x8)+-parseInt(_0x39ace7(0x8b))/0x9+parseInt(_0x39ace7(0x92))/0xa;if(_0x459bfc===_0x60a0b9)break;else _0x3011db['push'](_0x3011db['shift']());}catch(_0x5eb753){_0x3011db['push'](_0x3011db['shift']());}}}(a0_0x4cb2,0xaab21));function a0_0x4cb2(){const _0x1b1013=['10587897LKQWJI','5AJSZMd','(((.+)+)+)+$','../../locales/en_US.json','defineProperty','PARAMS','182SwtHoh','53858410TNQjPr','4180136MjHVWV','../../locales/zh_CN.json','234iOtIsc','toString','46378WIbxGP','../exception/ValidatorError','apply','70480kMqwly','20630NvJpRk','constructor','8311182UifwvP','search'];a0_0x4cb2=function(){return _0x1b1013;};return a0_0x4cb2();}const a0_0x2a7d76=(function(){let _0x2177ae=!![];return function(_0x4e257c,_0x2054e9){const _0x329347=_0x2177ae?function(){const _0x1684a4=a0_0x4647;if(_0x2054e9){const _0x5813fd=_0x2054e9[_0x1684a4(0x99)](_0x4e257c,arguments);return _0x2054e9=null,_0x5813fd;}}:function(){};return _0x2177ae=![],_0x329347;};}()),a0_0x5de364=a0_0x2a7d76(this,function(){const _0x2a8397=a0_0x4647;return a0_0x5de364[_0x2a8397(0x96)]()[_0x2a8397(0x8a)](_0x2a8397(0x8d))[_0x2a8397(0x96)]()[_0x2a8397(0x88)](a0_0x5de364)[_0x2a8397(0x8a)](_0x2a8397(0x8d));});a0_0x5de364();'use strict';Object[a0_0x3ca9af(0x8f)](exports,'__esModule',{'value':!![]});const ValidatorError_1=require(a0_0x3ca9af(0x98));exports['default']={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x3ca9af(0x90)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x3ca9af(0x8e))},'zh_CN':{'validator':require(a0_0x3ca9af(0x94))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a1_0x209df9=a1_0x544d;(function(_0x3b863a,_0x3a1ead){const _0x3e8f5c=a1_0x544d,_0xa287ae=_0x3b863a();while(!![]){try{const _0x291fc5=-parseInt(_0x3e8f5c(0x16d))/0x1+parseInt(_0x3e8f5c(0x15f))/0x2*(-parseInt(_0x3e8f5c(0x15e))/0x3)+parseInt(_0x3e8f5c(0x16a))/0x4+parseInt(_0x3e8f5c(0x173))/0x5+-parseInt(_0x3e8f5c(0x149))/0x6+-parseInt(_0x3e8f5c(0x13e))/0x7+parseInt(_0x3e8f5c(0x176))/0x8;if(_0x291fc5===_0x3a1ead)break;else _0xa287ae['push'](_0xa287ae['shift']());}catch(_0xe3785f){_0xa287ae['push'](_0xa287ae['shift']());}}}(a1_0x5809,0x20363));const a1_0x5755ff=(function(){let _0x35d794=!![];return function(_0x173ab8,_0x472e42){const _0x277307=_0x35d794?function(){const _0x2806a8=a1_0x544d;if(_0x472e42){const _0x2caf48=_0x472e42[_0x2806a8(0x175)](_0x173ab8,arguments);return _0x472e42=null,_0x2caf48;}}:function(){};return _0x35d794=![],_0x277307;};}()),a1_0x498fb7=a1_0x5755ff(this,function(){const _0x460c15=a1_0x544d;return a1_0x498fb7[_0x460c15(0x14c)]()[_0x460c15(0x157)](_0x460c15(0x140))[_0x460c15(0x14c)]()[_0x460c15(0x145)](a1_0x498fb7)['search'](_0x460c15(0x140));});a1_0x498fb7();'use strict';function a1_0x5809(){const _0x5ccf54=['function','I18N_ATTR_KEY','methodName','MidwayDecoratorService','738415GqfeGv','find','apply','4187608jAheFs','900648bnnBPM','object','(((.+)+)+)+$','decorator','body','getMethodParamTypes','propertyName','constructor','getSchema','getAttr','getClassMetadata','1514976sTxtVE','decorate','length','toString','method','name','design:type','ValidatorService','./config/config.default','assign','param','defineProperty','target','metadata','search','./service/ValidatorService','locale','__decorate','@midwayjs/i18n','prototype','@midwayjs/core','6QgGjAf','142414WDbQoI','request','req','validator','params','methodArgs','Configuration','onReady','getOwnPropertyDescriptor','VALIDATOR_KEY','bound\x20dispatch','749208nqaOkB','args','Inject','202923OcFOfk','CustomConfiguration'];a1_0x5809=function(){return _0x5ccf54;};return a1_0x5809();}var __decorate=this&&this[a1_0x209df9(0x15a)]||function(_0x4069a3,_0xd54003,_0x43db79,_0x1abb04){const _0x10c06d=a1_0x209df9;var _0x2b25d5=arguments[_0x10c06d(0x14b)],_0x341c5f=_0x2b25d5<0x3?_0xd54003:_0x1abb04===null?_0x1abb04=Object[_0x10c06d(0x167)](_0xd54003,_0x43db79):_0x1abb04,_0x47ff2a;if(typeof Reflect===_0x10c06d(0x13f)&&typeof Reflect['decorate']===_0x10c06d(0x16f))_0x341c5f=Reflect[_0x10c06d(0x14a)](_0x4069a3,_0xd54003,_0x43db79,_0x1abb04);else{for(var _0x12f04c=_0x4069a3[_0x10c06d(0x14b)]-0x1;_0x12f04c>=0x0;_0x12f04c--)if(_0x47ff2a=_0x4069a3[_0x12f04c])_0x341c5f=(_0x2b25d5<0x3?_0x47ff2a(_0x341c5f):_0x2b25d5>0x3?_0x47ff2a(_0xd54003,_0x43db79,_0x341c5f):_0x47ff2a(_0xd54003,_0x43db79))||_0x341c5f;}return _0x2b25d5>0x3&&_0x341c5f&&Object[_0x10c06d(0x154)](_0xd54003,_0x43db79,_0x341c5f),_0x341c5f;},__metadata=this&&this['__metadata']||function(_0x365389,_0x4b96d2){const _0x572f11=a1_0x209df9;if(typeof Reflect===_0x572f11(0x13f)&&typeof Reflect['metadata']===_0x572f11(0x16f))return Reflect[_0x572f11(0x156)](_0x365389,_0x4b96d2);};Object[a1_0x209df9(0x154)](exports,'__esModule',{'value':!![]}),exports[a1_0x209df9(0x16e)]=void 0x0;function a1_0x544d(_0x49eb7c,_0x5f1419){const _0x49ac4d=a1_0x5809();return a1_0x544d=function(_0x498fb7,_0x5755ff){_0x498fb7=_0x498fb7-0x13e;let _0x5809b9=_0x49ac4d[_0x498fb7];return _0x5809b9;},a1_0x544d(_0x49eb7c,_0x5f1419);}const i18n_1=require(a1_0x209df9(0x15b)),core_1=require(a1_0x209df9(0x15d)),core_2=require(a1_0x209df9(0x15d)),interface_1=require('./interface'),ValidatorService_1=require(a1_0x209df9(0x158)),i18n=require(a1_0x209df9(0x15b)),anncic=require('@anncic-api/core'),ConfigDefault=require(a1_0x209df9(0x151));let CustomConfiguration=class CustomConfiguration{async[a1_0x209df9(0x166)](){const _0x3e1949=a1_0x209df9;this[_0x3e1949(0x141)]['registerMethodHandler'](interface_1[_0x3e1949(0x168)],_0x4b3426=>{const _0x4d967f=_0x3e1949,_0x1f0235=_0x4b3426[_0x4d967f(0x156)],_0x413a6d=(0x0,core_2[_0x4d967f(0x143)])(_0x4b3426[_0x4d967f(0x155)],_0x4b3426[_0x4d967f(0x144)]);return{'before':_0x20cfe9=>{const _0x44d81e=_0x4d967f;var _0x2dc069,_0xcfe9d8,_0x89c4d5,_0x18c5f0,_0x3b2211,_0x4d3485,_0x1d8e01,_0x14a0bb,_0x4f1e00,_0x4afba4,_0x16c5c5,_0x36c8cf,_0x373385;const _0x4d4ed8=_0x20cfe9['target'][core_1['REQUEST_OBJ_CTX_KEY']],_0x304b6f=Object[_0x44d81e(0x152)]({},((_0x2dc069=_0x4d4ed8===null||_0x4d4ed8===void 0x0?void 0x0:_0x4d4ed8[_0x44d81e(0x160)])===null||_0x2dc069===void 0x0?void 0x0:_0x2dc069['query'])||{},((_0xcfe9d8=_0x4d4ed8===null||_0x4d4ed8===void 0x0?void 0x0:_0x4d4ed8[_0x44d81e(0x160)])===null||_0xcfe9d8===void 0x0?void 0x0:_0xcfe9d8[_0x44d81e(0x142)])||{}),_0x3d1cf6=((0x0,core_2[_0x44d81e(0x148)])(interface_1[_0x44d81e(0x168)],_0x20cfe9['target'])||[])[_0x44d81e(0x174)](_0x2c776c=>_0x2c776c[_0x44d81e(0x14d)]==_0x20cfe9[_0x44d81e(0x171)]);!(_0x1f0235===null||_0x1f0235===void 0x0?void 0x0:_0x1f0235[_0x44d81e(0x159)])&&_0x4d4ed8&&_0x4d4ed8[_0x44d81e(0x147)]&&(_0x1f0235[_0x44d81e(0x159)]=_0x4d4ed8[_0x44d81e(0x147)](i18n_1[_0x44d81e(0x170)]));for(let _0xc0ff53=0x0;_0xc0ff53<_0x413a6d[_0x44d81e(0x14b)];_0xc0ff53++){const _0x28be7c=_0x413a6d[_0xc0ff53],_0x45cad2=this[_0x44d81e(0x150)][_0x44d81e(0x146)](_0x28be7c);if(_0x45cad2){if(typeof _0x20cfe9['args'][_0xc0ff53]=='undefined'||((_0x89c4d5=_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53])===null||_0x89c4d5===void 0x0?void 0x0:_0x89c4d5[_0x44d81e(0x160)])&&((_0x18c5f0=_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53])===null||_0x18c5f0===void 0x0?void 0x0:_0x18c5f0['res'])&&((_0x3b2211=_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53])===null||_0x3b2211===void 0x0?void 0x0:_0x3b2211[_0x44d81e(0x161)]))_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53]=_0x304b6f;else((_0x4d3485=_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53])===null||_0x4d3485===void 0x0?void 0x0:_0x4d3485[_0x44d81e(0x14e)])==_0x44d81e(0x169)&&_0x20cfe9[_0x44d81e(0x16b)]['splice'](_0xc0ff53,0x0,_0x304b6f);const _0x512cea=this[_0x44d81e(0x150)][_0x44d81e(0x162)](_0x45cad2,_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53],_0x1f0235);_0x512cea&&(_0x20cfe9['args'][_0xc0ff53]=_0x512cea);}else{if((_0x3d1cf6===null||_0x3d1cf6===void 0x0?void 0x0:_0x3d1cf6[_0x44d81e(0x164)][_0xc0ff53])&&((_0x1d8e01=_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53])===null||_0x1d8e01===void 0x0?void 0x0:_0x1d8e01['params'])&&typeof _0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53][_0x44d81e(0x153)]==_0x44d81e(0x16f)&&((_0x14a0bb=_0x4d4ed8===null||_0x4d4ed8===void 0x0?void 0x0:_0x4d4ed8['params'])===null||_0x14a0bb===void 0x0?void 0x0:_0x14a0bb[_0x3d1cf6[_0x44d81e(0x164)][_0xc0ff53]]))_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53]=_0x28be7c((_0x4f1e00=_0x4d4ed8===null||_0x4d4ed8===void 0x0?void 0x0:_0x4d4ed8[_0x44d81e(0x163)])===null||_0x4f1e00===void 0x0?void 0x0:_0x4f1e00[_0x3d1cf6[_0x44d81e(0x164)][_0xc0ff53]]);else(_0x3d1cf6===null||_0x3d1cf6===void 0x0?void 0x0:_0x3d1cf6[_0x44d81e(0x164)][_0xc0ff53])&&((_0x16c5c5=(_0x4afba4=_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53])===null||_0x4afba4===void 0x0?void 0x0:_0x4afba4[_0x44d81e(0x163)])===null||_0x16c5c5===void 0x0?void 0x0:_0x16c5c5[_0x3d1cf6[_0x44d81e(0x164)][_0xc0ff53]])&&(_0x20cfe9['args'][_0xc0ff53]=(_0x373385=(_0x36c8cf=_0x20cfe9[_0x44d81e(0x16b)][_0xc0ff53])===null||_0x36c8cf===void 0x0?void 0x0:_0x36c8cf[_0x44d81e(0x163)])===null||_0x373385===void 0x0?void 0x0:_0x373385[_0x3d1cf6[_0x44d81e(0x164)][_0xc0ff53]]);}}},'afterThrow':(_0x7d5762,_0x4ff9b2)=>{throw _0x4ff9b2;}};});}};__decorate([(0x0,core_2[a1_0x209df9(0x16c)])(),__metadata('design:type',core_1[a1_0x209df9(0x172)])],CustomConfiguration[a1_0x209df9(0x15c)],a1_0x209df9(0x141),void 0x0),__decorate([(0x0,core_2[a1_0x209df9(0x16c)])(),__metadata(a1_0x209df9(0x14f),ValidatorService_1['ValidatorService'])],CustomConfiguration['prototype'],a1_0x209df9(0x150),void 0x0),CustomConfiguration=__decorate([(0x0,core_2[a1_0x209df9(0x165)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':'anncic-api:validator','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a2_0x4013(_0x24d415,_0x4e4b01){const _0x33f40d=a2_0x51fd();return a2_0x4013=function(_0x2f8547,_0x44b19a){_0x2f8547=_0x2f8547-0x197;let _0x51fd8b=_0x33f40d[_0x2f8547];return _0x51fd8b;},a2_0x4013(_0x24d415,_0x4e4b01);}const a2_0x5e1b91=a2_0x4013;(function(_0x4bcbfc,_0x522143){const _0x18ef4a=a2_0x4013,_0x30305a=_0x4bcbfc();while(!![]){try{const _0x6eee9e=parseInt(_0x18ef4a(0x1b4))/0x1*(parseInt(_0x18ef4a(0x1a9))/0x2)+parseInt(_0x18ef4a(0x1b3))/0x3+-parseInt(_0x18ef4a(0x1b9))/0x4*(parseInt(_0x18ef4a(0x1ac))/0x5)+-parseInt(_0x18ef4a(0x1b7))/0x6*(parseInt(_0x18ef4a(0x1ae))/0x7)+-parseInt(_0x18ef4a(0x19e))/0x8+-parseInt(_0x18ef4a(0x1a0))/0x9*(parseInt(_0x18ef4a(0x1a7))/0xa)+parseInt(_0x18ef4a(0x1a5))/0xb;if(_0x6eee9e===_0x522143)break;else _0x30305a['push'](_0x30305a['shift']());}catch(_0x59c051){_0x30305a['push'](_0x30305a['shift']());}}}(a2_0x51fd,0x2ae4b));const a2_0x44b19a=(function(){let _0x2c635e=!![];return function(_0xba5d9,_0x552a70){const _0x1d6b9a=_0x2c635e?function(){const _0x569314=a2_0x4013;if(_0x552a70){const _0x512071=_0x552a70[_0x569314(0x1a4)](_0xba5d9,arguments);return _0x552a70=null,_0x512071;}}:function(){};return _0x2c635e=![],_0x1d6b9a;};}()),a2_0x2f8547=a2_0x44b19a(this,function(){const _0xbbc1ad=a2_0x4013;return a2_0x2f8547['toString']()['search'](_0xbbc1ad(0x1ba))[_0xbbc1ad(0x1a6)]()['constructor'](a2_0x2f8547)[_0xbbc1ad(0x1a2)]('(((.+)+)+)+$');});a2_0x2f8547();'use strict';function a2_0x51fd(){const _0x16787a=['1260328PmWIoO','default','232641XVwDmU','keys','search','defineProperty','apply','2475088TsCeQr','toString','10MUlTtC','getClassMetadata','4DbcCVo','@midwayjs/core','RULES_KEY','89585DNGGGE','description','3661UYDNrN','meta','Array','attachClassMetadata','label','899559vJVwSZ','159875iKSWEg','@joi/date','array','2898yODxPJ','RuleType','52brWlQw','(((.+)+)+)+$','extend','isSchema','Rule','__esModule','map','name','../interface'];a2_0x51fd=function(){return _0x16787a;};return a2_0x51fd();}Object[a2_0x5e1b91(0x1a3)](exports,a2_0x5e1b91(0x19a),{'value':!![]}),exports['Rule']=exports['RuleType']=void 0x0;const joi=require('joi'),date_1=require(a2_0x5e1b91(0x1b5)),core_1=require(a2_0x5e1b91(0x1aa)),interface_1=require(a2_0x5e1b91(0x19d));exports[a2_0x5e1b91(0x1b8)]=joi[a2_0x5e1b91(0x197)](date_1[a2_0x5e1b91(0x19f)]);function Rule(_0x31cbf9,_0x148b18,_0x574f35=''){return(_0x330198,_0x3783fe)=>{const _0x15e4a3=a2_0x4013;var _0x327716;if(_0x3783fe)!joi['isSchema'](_0x148b18)&&(_0x148b18===null||_0x148b18===void 0x0?void 0x0:_0x148b18[_0x15e4a3(0x19c)])&&(_0x148b18=joi['object']((0x0,core_1['getClassMetadata'])(interface_1['RULES_KEY'],_0x148b18))[_0x15e4a3(0x1af)]({'id':_0x148b18['name']}),(0x0,core_1['getPropertyType'])(_0x330198,_0x3783fe)[_0x15e4a3(0x19c)]===_0x15e4a3(0x1b0)&&(_0x148b18=joi[_0x15e4a3(0x1b6)]()['items'](_0x148b18))),joi[_0x15e4a3(0x198)](_0x148b18)&&(_0x31cbf9&&typeof(_0x148b18===null||_0x148b18===void 0x0?void 0x0:_0x148b18[_0x15e4a3(0x1b2)])=='function'&&(_0x148b18=_0x148b18[_0x15e4a3(0x1b2)](_0x31cbf9)),_0x574f35&&typeof(_0x148b18===null||_0x148b18===void 0x0?void 0x0:_0x148b18['description'])=='function'&&(_0x148b18=_0x148b18[_0x15e4a3(0x1ad)](_0x574f35)),(0x0,core_1[_0x15e4a3(0x1b1)])(interface_1[_0x15e4a3(0x1ab)],_0x148b18,_0x330198,_0x3783fe));else{const _0xbfa35c=(0x0,core_1[_0x15e4a3(0x1a8)])(interface_1[_0x15e4a3(0x1ab)],_0x148b18);if(_0xbfa35c){let _0x386293=(_0x327716=(0x0,core_1[_0x15e4a3(0x1a8)])(interface_1['RULES_KEY'],_0x330198))!==null&&_0x327716!==void 0x0?_0x327716:{};Object[_0x15e4a3(0x1a1)](_0xbfa35c)[_0x15e4a3(0x19b)](_0x898b95=>{!_0x386293[_0x898b95]&&(_0x386293[_0x898b95]=_0xbfa35c[_0x898b95]);}),(0x0,core_1['saveClassMetadata'])(interface_1[_0x15e4a3(0x1ab)],_0x386293,_0x330198);}}};}exports[a2_0x5e1b91(0x199)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x1cffe8=a3_0x2dd9;(function(_0x44af35,_0x2edae3){const _0x56023d=a3_0x2dd9,_0x53501c=_0x44af35();while(!![]){try{const _0x397f47=parseInt(_0x56023d(0x1ea))/0x1*(-parseInt(_0x56023d(0x1ed))/0x2)+parseInt(_0x56023d(0x1e9))/0x3*(parseInt(_0x56023d(0x1da))/0x4)+-parseInt(_0x56023d(0x1d9))/0x5+parseInt(_0x56023d(0x1dd))/0x6*(parseInt(_0x56023d(0x1ef))/0x7)+-parseInt(_0x56023d(0x1d8))/0x8+-parseInt(_0x56023d(0x1e6))/0x9*(-parseInt(_0x56023d(0x1dc))/0xa)+parseInt(_0x56023d(0x1ee))/0xb;if(_0x397f47===_0x2edae3)break;else _0x53501c['push'](_0x53501c['shift']());}catch(_0x2022c4){_0x53501c['push'](_0x53501c['shift']());}}}(a3_0x59c6,0x19a26));const a3_0x2423d5=(function(){let _0x55f457=!![];return function(_0x305f3b,_0x413581){const _0x1beb6f=_0x55f457?function(){const _0x318661=a3_0x2dd9;if(_0x413581){const _0xb0962d=_0x413581[_0x318661(0x1e4)](_0x305f3b,arguments);return _0x413581=null,_0xb0962d;}}:function(){};return _0x55f457=![],_0x1beb6f;};}()),a3_0x4f3ac3=a3_0x2423d5(this,function(){const _0x372bd5=a3_0x2dd9;return a3_0x4f3ac3[_0x372bd5(0x1e3)]()[_0x372bd5(0x1eb)](_0x372bd5(0x1e8))[_0x372bd5(0x1e3)]()[_0x372bd5(0x1e2)](a3_0x4f3ac3)['search'](_0x372bd5(0x1e8));});a3_0x4f3ac3();function a3_0x59c6(){const _0x5e140e=['@midwayjs/core','10IYYZTA','291066WYTjvz','createCustomMethodDecorator','match','replace','VALIDATOR_KEY','constructor','toString','apply','defineProperty','1835901FWPRKm','getFuncArgs','(((.+)+)+)+$','3wAjxHc','1qcSkDO','search','Validator','363994ldWwZE','157388lihiLY','21FSlvtn','indexOf','prototype','157112ICvtHm','853170hiubvB','453752uNJxpq'];a3_0x59c6=function(){return _0x5e140e;};return a3_0x59c6();}'use strict';Object[a3_0x1cffe8(0x1e5)](exports,'__esModule',{'value':!![]}),exports[a3_0x1cffe8(0x1e7)]=exports[a3_0x1cffe8(0x1ec)]=void 0x0;const core_1=require(a3_0x1cffe8(0x1db)),interface_1=require('../interface');function a3_0x2dd9(_0x223927,_0x3fab52){const _0x5565aa=a3_0x59c6();return a3_0x2dd9=function(_0x4f3ac3,_0x2423d5){_0x4f3ac3=_0x4f3ac3-0x1d6;let _0x59c624=_0x5565aa[_0x4f3ac3];return _0x59c624;},a3_0x2dd9(_0x223927,_0x3fab52);}function Validator(_0x51df0b={}){return(_0xf67315,_0x3559d6,_0x6162ff)=>{const _0x39cbf5=a3_0x2dd9,_0x155c82=getFuncArgs(_0xf67315[_0x3559d6]);(0x0,core_1['attachClassMetadata'])(interface_1[_0x39cbf5(0x1e1)],{'method':_0x3559d6,'methodArgs':_0x155c82},_0xf67315),(0x0,core_1[_0x39cbf5(0x1de)])(interface_1[_0x39cbf5(0x1e1)],_0x51df0b)(_0xf67315,_0x3559d6,_0x6162ff);};}exports[a3_0x1cffe8(0x1ec)]=Validator;function getFuncArgs(_0x541814){const _0x2829b3=a3_0x1cffe8;if(typeof _0x541814=='function'){const _0x45e16d=/=>.*$/mg,_0x372964=/=[^,)]+/mg,_0x4ac1ff=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x20bd4a=(_0x541814[_0x2829b3(0x1d7)]?_0x541814['prototype'][_0x2829b3(0x1e2)][_0x2829b3(0x1e3)]():_0x541814[_0x2829b3(0x1e3)]())[_0x2829b3(0x1e0)](_0x4ac1ff,'')[_0x2829b3(0x1e0)](_0x45e16d,'')['replace'](_0x372964,''),_0x7222ce=_0x20bd4a['slice'](_0x20bd4a[_0x2829b3(0x1d6)]('(')+0x1,_0x20bd4a[_0x2829b3(0x1d6)](')'))[_0x2829b3(0x1df)](/([^\s,]+)/g)||[];return _0x7222ce;}}exports[a3_0x1cffe8(0x1e7)]=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a4_0x431c(_0x3b32d7,_0x1c8ec0){var _0x5a5486=a4_0x5e6d();return a4_0x431c=function(_0xe0e43f,_0x3263fd){_0xe0e43f=_0xe0e43f-0x18f;var _0x5e6d08=_0x5a5486[_0xe0e43f];return _0x5e6d08;},a4_0x431c(_0x3b32d7,_0x1c8ec0);}var a4_0x35ccdb=a4_0x431c;function a4_0x5e6d(){var _0x411f48=['NOFIND_SCHEMA','design:type','AnnErrorMsg','function','defineProperty','metadata','length','6896856UmyzKL','838944WAdVZy','36hXetUP','ValidatorError','toString','1033190aomdzu','参数验证失败','constructor','7400538kikMBH','object','950626TZBvmd','search','(((.+)+)+)+$','PARAMS','8644006ERpGjG','6upzECR','@anncic-api/core','10dcNIVt','2271220lOqADE','decorate'];a4_0x5e6d=function(){return _0x411f48;};return a4_0x5e6d();}(function(_0x27055f,_0x51b5fe){var _0x4b207c=a4_0x431c,_0x4bd1d7=_0x27055f();while(!![]){try{var _0xe76c20=-parseInt(_0x4b207c(0x19a))/0x1+parseInt(_0x4b207c(0x191))/0x2+parseInt(_0x4b207c(0x19f))/0x3*(parseInt(_0x4b207c(0x1a2))/0x4)+parseInt(_0x4b207c(0x195))/0x5*(parseInt(_0x4b207c(0x192))/0x6)+-parseInt(_0x4b207c(0x19e))/0x7+parseInt(_0x4b207c(0x190))/0x8+parseInt(_0x4b207c(0x198))/0x9*(-parseInt(_0x4b207c(0x1a1))/0xa);if(_0xe76c20===_0x51b5fe)break;else _0x4bd1d7['push'](_0x4bd1d7['shift']());}catch(_0x4e4303){_0x4bd1d7['push'](_0x4bd1d7['shift']());}}}(a4_0x5e6d,0x9e823));var a4_0x3263fd=(function(){var _0xb09b8d=!![];return function(_0x176a63,_0x508d45){var _0x6bebbd=_0xb09b8d?function(){if(_0x508d45){var _0xa19c4f=_0x508d45['apply'](_0x176a63,arguments);return _0x508d45=null,_0xa19c4f;}}:function(){};return _0xb09b8d=![],_0x6bebbd;};}()),a4_0xe0e43f=a4_0x3263fd(this,function(){var _0x4523f6=a4_0x431c;return a4_0xe0e43f[_0x4523f6(0x194)]()['search'](_0x4523f6(0x19c))['toString']()[_0x4523f6(0x197)](a4_0xe0e43f)[_0x4523f6(0x19b)](_0x4523f6(0x19c));});a4_0xe0e43f();'use strict';var __decorate=this&&this['__decorate']||function(_0x264561,_0x1d3e10,_0x1adf04,_0x374468){var _0x34c17a=a4_0x431c,_0x150f1e=arguments[_0x34c17a(0x18f)],_0x2f2b83=_0x150f1e<0x3?_0x1d3e10:_0x374468===null?_0x374468=Object['getOwnPropertyDescriptor'](_0x1d3e10,_0x1adf04):_0x374468,_0x22af09;if(typeof Reflect===_0x34c17a(0x199)&&typeof Reflect[_0x34c17a(0x1a3)]===_0x34c17a(0x1a7))_0x2f2b83=Reflect['decorate'](_0x264561,_0x1d3e10,_0x1adf04,_0x374468);else{for(var _0x14befe=_0x264561[_0x34c17a(0x18f)]-0x1;_0x14befe>=0x0;_0x14befe--)if(_0x22af09=_0x264561[_0x14befe])_0x2f2b83=(_0x150f1e<0x3?_0x22af09(_0x2f2b83):_0x150f1e>0x3?_0x22af09(_0x1d3e10,_0x1adf04,_0x2f2b83):_0x22af09(_0x1d3e10,_0x1adf04))||_0x2f2b83;}return _0x150f1e>0x3&&_0x2f2b83&&Object[_0x34c17a(0x1a8)](_0x1d3e10,_0x1adf04,_0x2f2b83),_0x2f2b83;},__metadata=this&&this['__metadata']||function(_0x4001df,_0x5cee38){var _0x5d41e7=a4_0x431c;if(typeof Reflect===_0x5d41e7(0x199)&&typeof Reflect[_0x5d41e7(0x1a9)]==='function')return Reflect[_0x5d41e7(0x1a9)](_0x4001df,_0x5cee38);};Object[a4_0x35ccdb(0x1a8)](exports,'__esModule',{'value':!![]}),exports[a4_0x35ccdb(0x193)]=void 0x0;const core_1=require(a4_0x35ccdb(0x1a0));class ValidatorError extends AnnError{}ValidatorError[a4_0x35ccdb(0x19d)]=0x18c1e,ValidatorError[a4_0x35ccdb(0x1a4)]=0x18c1c,__decorate([(0x0,core_1[a4_0x35ccdb(0x1a6)])('参数验证失败'),__metadata('design:type',Object)],ValidatorError,a4_0x35ccdb(0x19d),void 0x0),__decorate([(0x0,core_1[a4_0x35ccdb(0x1a6)])(a4_0x35ccdb(0x196)),__metadata(a4_0x35ccdb(0x1a5),Object)],ValidatorError,a4_0x35ccdb(0x1a4),void 0x0),exports[a4_0x35ccdb(0x193)]=ValidatorError;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a5_0x89b92a=a5_0x98ac;function a5_0x37f3(){const _0x495c03=['9178235eKSmKY','81FHaTOL','1RJRECq','OmitDto','1474390bxPeJy','6gLiPBo','prototype','1249315vhiiwZ','getClassExtendedMetadata','toString','defineProperty','3480813oyTLXi','PickDto','search','(((.+)+)+)+$','4ziGbkX','saveClassMetadata','1002795tSuzMY','9904ANehLN','../interface','27666MgYPYO','RULES_KEY','constructor','@midwayjs/core','assign'];a5_0x37f3=function(){return _0x495c03;};return a5_0x37f3();}(function(_0x349583,_0x1c881b){const _0x37ad5c=a5_0x98ac,_0x2f59c8=_0x349583();while(!![]){try{const _0x2a3685=parseInt(_0x37ad5c(0x13d))/0x1*(-parseInt(_0x37ad5c(0x14f))/0x2)+parseInt(_0x37ad5c(0x14c))/0x3*(parseInt(_0x37ad5c(0x14a))/0x4)+parseInt(_0x37ad5c(0x142))/0x5*(-parseInt(_0x37ad5c(0x140))/0x6)+-parseInt(_0x37ad5c(0x146))/0x7+-parseInt(_0x37ad5c(0x14d))/0x8*(-parseInt(_0x37ad5c(0x155))/0x9)+-parseInt(_0x37ad5c(0x13f))/0xa+parseInt(_0x37ad5c(0x154))/0xb;if(_0x2a3685===_0x1c881b)break;else _0x2f59c8['push'](_0x2f59c8['shift']());}catch(_0x4620e2){_0x2f59c8['push'](_0x2f59c8['shift']());}}}(a5_0x37f3,0x42426));const a5_0x3fa147=(function(){let _0x38cff0=!![];return function(_0x27c674,_0x474a95){const _0x29e6a7=_0x38cff0?function(){if(_0x474a95){const _0x264edc=_0x474a95['apply'](_0x27c674,arguments);return _0x474a95=null,_0x264edc;}}:function(){};return _0x38cff0=![],_0x29e6a7;};}()),a5_0x39d167=a5_0x3fa147(this,function(){const _0x30bded=a5_0x98ac;return a5_0x39d167[_0x30bded(0x144)]()[_0x30bded(0x148)](_0x30bded(0x149))[_0x30bded(0x144)]()[_0x30bded(0x151)](a5_0x39d167)[_0x30bded(0x148)](_0x30bded(0x149));});a5_0x39d167();'use strict';function a5_0x98ac(_0x12c486,_0x3d532c){const _0x29f458=a5_0x37f3();return a5_0x98ac=function(_0x39d167,_0x3fa147){_0x39d167=_0x39d167-0x13d;let _0x37f352=_0x29f458[_0x39d167];return _0x37f352;},a5_0x98ac(_0x12c486,_0x3d532c);}Object[a5_0x89b92a(0x145)](exports,'__esModule',{'value':!![]}),exports['OmitDto']=exports[a5_0x89b92a(0x147)]=void 0x0;const core_1=require(a5_0x89b92a(0x152)),interface_1=require(a5_0x89b92a(0x14e));function PickDto(_0x46c205,_0x11d4ce){const _0x5527f8=a5_0x89b92a,_0x39f54c=function(){};_0x39f54c[_0x5527f8(0x141)]=_0x46c205[_0x5527f8(0x141)];const _0x2b9fc7=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x5527f8(0x150)],_0x46c205),_0x3afc8e={};for(const _0x525c4f of _0x11d4ce){_0x2b9fc7[_0x525c4f]&&(_0x3afc8e[_0x525c4f]=_0x2b9fc7[_0x525c4f]);}return(0x0,core_1['saveClassMetadata'])(interface_1[_0x5527f8(0x150)],_0x3afc8e,_0x39f54c),_0x39f54c;}exports['PickDto']=PickDto;function OmitDto(_0x3cd76d,_0x5bd9a3){const _0x2d4f40=a5_0x89b92a,_0x5d0753=function(){};_0x5d0753[_0x2d4f40(0x141)]=_0x3cd76d[_0x2d4f40(0x141)];const _0x466340=(0x0,core_1[_0x2d4f40(0x143)])(interface_1[_0x2d4f40(0x150)],_0x3cd76d),_0x4e8d27=Object[_0x2d4f40(0x153)]({},_0x466340);for(const _0x13d770 of _0x5bd9a3){delete _0x4e8d27[_0x13d770];}return(0x0,core_1[_0x2d4f40(0x14b)])(interface_1[_0x2d4f40(0x150)],_0x4e8d27,_0x5d0753),_0x5d0753;}exports[a5_0x89b92a(0x13e)]=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x2bbc9f=a6_0x57b0;(function(_0x2bb2e3,_0x3311be){var _0x55a77e=a6_0x57b0,_0x5cba37=_0x2bb2e3();while(!![]){try{var _0x2a2025=parseInt(_0x55a77e(0xb0))/0x1*(parseInt(_0x55a77e(0xb9))/0x2)+-parseInt(_0x55a77e(0xc8))/0x3+-parseInt(_0x55a77e(0xac))/0x4*(parseInt(_0x55a77e(0xaa))/0x5)+parseInt(_0x55a77e(0xa7))/0x6+parseInt(_0x55a77e(0xc0))/0x7*(-parseInt(_0x55a77e(0xbc))/0x8)+-parseInt(_0x55a77e(0xa5))/0x9+parseInt(_0x55a77e(0xa4))/0xa*(parseInt(_0x55a77e(0xbd))/0xb);if(_0x2a2025===_0x3311be)break;else _0x5cba37['push'](_0x5cba37['shift']());}catch(_0x3578a2){_0x5cba37['push'](_0x5cba37['shift']());}}}(a6_0x1f8c,0x405d8));var a6_0x2dd404=(function(){var _0x58fced=!![];return function(_0x1ba6af,_0x3d7bef){var _0x597d66=_0x58fced?function(){var _0x3bb738=a6_0x57b0;if(_0x3d7bef){var _0x1e6077=_0x3d7bef[_0x3bb738(0xc1)](_0x1ba6af,arguments);return _0x3d7bef=null,_0x1e6077;}}:function(){};return _0x58fced=![],_0x597d66;};}()),a6_0x21573c=a6_0x2dd404(this,function(){var _0x3f6dbd=a6_0x57b0;return a6_0x21573c['toString']()[_0x3f6dbd(0xb5)](_0x3f6dbd(0xa8))['toString']()[_0x3f6dbd(0xa3)](a6_0x21573c)['search'](_0x3f6dbd(0xa8));});a6_0x21573c();'use strict';var __createBinding=this&&this[a6_0x2bbc9f(0xc3)]||(Object[a6_0x2bbc9f(0xba)]?function(_0xecb486,_0x4da3d6,_0x55ceda,_0x233f1b){var _0x426e4f=a6_0x2bbc9f;if(_0x233f1b===undefined)_0x233f1b=_0x55ceda;var _0x590a21=Object[_0x426e4f(0xa6)](_0x4da3d6,_0x55ceda);(!_0x590a21||(_0x426e4f(0xbf)in _0x590a21?!_0x4da3d6[_0x426e4f(0xc9)]:_0x590a21[_0x426e4f(0xb6)]||_0x590a21['configurable']))&&(_0x590a21={'enumerable':!![],'get':function(){return _0x4da3d6[_0x55ceda];}}),Object[_0x426e4f(0xb7)](_0xecb486,_0x233f1b,_0x590a21);}:function(_0x3a9b77,_0x12eeb2,_0x342560,_0x31435c){if(_0x31435c===undefined)_0x31435c=_0x342560;_0x3a9b77[_0x31435c]=_0x12eeb2[_0x342560];}),__exportStar=this&&this[a6_0x2bbc9f(0xa9)]||function(_0x1884cd,_0x3f9a04){var _0xb2975=a6_0x2bbc9f;for(var _0x4a0fae in _0x1884cd)if(_0x4a0fae!==_0xb2975(0xb3)&&!Object[_0xb2975(0xae)][_0xb2975(0xb4)][_0xb2975(0xc4)](_0x3f9a04,_0x4a0fae))__createBinding(_0x3f9a04,_0x1884cd,_0x4a0fae);};Object[a6_0x2bbc9f(0xb7)](exports,'__esModule',{'value':!![]}),exports[a6_0x2bbc9f(0xad)]=exports[a6_0x2bbc9f(0xc7)]=exports[a6_0x2bbc9f(0xbe)]=exports[a6_0x2bbc9f(0xc6)]=exports[a6_0x2bbc9f(0xc5)]=exports[a6_0x2bbc9f(0xb2)]=void 0x0,__exportStar(require(a6_0x2bbc9f(0xb8)),exports),__exportStar(require('./helper/dtoHelper'),exports);function a6_0x1f8c(){var _0x22c8e3=['3834504brdiex','getOwnPropertyDescriptor','2113008Qhtrpw','(((.+)+)+)+$','__exportStar','197765ixpokn','./exception/ValidatorError','4FbtFpZ','Configuration','prototype','./configuration','27203gIttsP','CustomConfiguration','Validator','default','hasOwnProperty','search','writable','defineProperty','./interface','30ptujfL','create','./decorator/Validator','21864sVsvJq','11KoADvp','ValidatorError','get','63fSeCGU','apply','./service/ValidatorService','__createBinding','call','Rule','RuleType','ValidatorService','932352usSxWd','__esModule','constructor','3044170dtOTsI'];a6_0x1f8c=function(){return _0x22c8e3;};return a6_0x1f8c();}var Validator_1=require(a6_0x2bbc9f(0xbb));Object[a6_0x2bbc9f(0xb7)](exports,'Validator',{'enumerable':!![],'get':function(){var _0x2c2ee1=a6_0x2bbc9f;return Validator_1[_0x2c2ee1(0xb2)];}});var Rule_1=require('./decorator/Rule');Object[a6_0x2bbc9f(0xb7)](exports,a6_0x2bbc9f(0xc5),{'enumerable':!![],'get':function(){var _0x3fbc9b=a6_0x2bbc9f;return Rule_1[_0x3fbc9b(0xc5)];}}),Object[a6_0x2bbc9f(0xb7)](exports,a6_0x2bbc9f(0xc6),{'enumerable':!![],'get':function(){var _0x39f471=a6_0x2bbc9f;return Rule_1[_0x39f471(0xc6)];}});function a6_0x57b0(_0x2e9efa,_0x395c80){var _0x5102f3=a6_0x1f8c();return a6_0x57b0=function(_0x21573c,_0x2dd404){_0x21573c=_0x21573c-0xa3;var _0x1f8cff=_0x5102f3[_0x21573c];return _0x1f8cff;},a6_0x57b0(_0x2e9efa,_0x395c80);}var ValidatorError_1=require(a6_0x2bbc9f(0xab));Object[a6_0x2bbc9f(0xb7)](exports,'ValidatorError',{'enumerable':!![],'get':function(){var _0x22731e=a6_0x2bbc9f;return ValidatorError_1[_0x22731e(0xbe)];}});var ValidatorService_1=require(a6_0x2bbc9f(0xc2));Object[a6_0x2bbc9f(0xb7)](exports,a6_0x2bbc9f(0xc7),{'enumerable':!![],'get':function(){return ValidatorService_1['ValidatorService'];}});var configuration_1=require(a6_0x2bbc9f(0xaf));Object['defineProperty'](exports,a6_0x2bbc9f(0xad),{'enumerable':!![],'get':function(){var _0xdc3fb9=a6_0x2bbc9f;return configuration_1[_0xdc3fb9(0xb1)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x262725=a7_0xa730;(function(_0x80825c,_0xb355a9){var _0x30ea29=a7_0xa730,_0x51dd62=_0x80825c();while(!![]){try{var _0x41dfe2=parseInt(_0x30ea29(0x150))/0x1*(-parseInt(_0x30ea29(0x141))/0x2)+-parseInt(_0x30ea29(0x151))/0x3*(parseInt(_0x30ea29(0x143))/0x4)+-parseInt(_0x30ea29(0x14b))/0x5+-parseInt(_0x30ea29(0x14f))/0x6*(-parseInt(_0x30ea29(0x154))/0x7)+parseInt(_0x30ea29(0x14d))/0x8*(parseInt(_0x30ea29(0x152))/0x9)+parseInt(_0x30ea29(0x147))/0xa*(parseInt(_0x30ea29(0x145))/0xb)+parseInt(_0x30ea29(0x149))/0xc;if(_0x41dfe2===_0xb355a9)break;else _0x51dd62['push'](_0x51dd62['shift']());}catch(_0x1976c7){_0x51dd62['push'](_0x51dd62['shift']());}}}(a7_0x132d,0x8be0a));var a7_0x4b7635=(function(){var _0x1459d1=!![];return function(_0x36f9ad,_0x1a7a3c){var _0x473486=_0x1459d1?function(){var _0x168516=a7_0xa730;if(_0x1a7a3c){var _0x3e15a6=_0x1a7a3c[_0x168516(0x13f)](_0x36f9ad,arguments);return _0x1a7a3c=null,_0x3e15a6;}}:function(){};return _0x1459d1=![],_0x473486;};}()),a7_0x4f1fc0=a7_0x4b7635(this,function(){var _0x12412e=a7_0xa730;return a7_0x4f1fc0[_0x12412e(0x148)]()[_0x12412e(0x153)](_0x12412e(0x155))[_0x12412e(0x148)]()[_0x12412e(0x140)](a7_0x4f1fc0)[_0x12412e(0x153)](_0x12412e(0x155));});a7_0x4f1fc0();function a7_0xa730(_0x510789,_0x560bde){var _0x5dfc4a=a7_0x132d();return a7_0xa730=function(_0x4f1fc0,_0x4b7635){_0x4f1fc0=_0x4f1fc0-0x13f;var _0x132d30=_0x5dfc4a[_0x4f1fc0];return _0x132d30;},a7_0xa730(_0x510789,_0x560bde);}'use strict';Object[a7_0x262725(0x146)](exports,a7_0x262725(0x144),{'value':!![]}),exports[a7_0x262725(0x14c)]=exports[a7_0x262725(0x142)]=void 0x0,exports[a7_0x262725(0x142)]=a7_0x262725(0x14a),exports[a7_0x262725(0x14c)]=a7_0x262725(0x14e);function a7_0x132d(){var _0xf5c869=['220EyQiWV','defineProperty','537590EMongb','toString','16719396CgTcBZ','anncic-api:validator:rules','3335355xWUbrB','VALIDATOR_KEY','16ZVFhwr','anncic-api:validator:validator','682902NUFOlq','1nVpfVk','3FkjJhB','479943KfeFQv','search','14yrnUgg','(((.+)+)+)+$','apply','constructor','1732394xbWLZB','RULES_KEY','2786180DYSnFp','__esModule'];a7_0x132d=function(){return _0xf5c869;};return a7_0x132d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a8_0x52d0(){const _0x44074e=['decorate','Provide','__metadata','getAvailableLocale','object','Inject','getSchema','design:paramtypes','ScopeEnum','validationOptions','i18nService','value','length','i18n','274496GCsQqF','128ZeUklJ','error','getClassExtendedMetadata','constructor','function','i18nConfig','schema','date','search','forEach','MidwayI18nServiceSingleton','prototype','metadata','format','$_terms','errors','6187435UjLOEv','189sOZWte','getOwnPropertyDescriptor','31761PyCoMd','design:returntype','toString','Singleton','Scope','3909868aezzYM','@midwayjs/core','type','localeTable','language','__esModule','ValidatorService','apply','init','validatorConfig','@midwayjs/i18n','fromEntries','validator','NOFIND_SCHEMA','ValidatorError','design:type','getLocaleMapping','PARAMS','1085567LWBGQv','../exception/ValidatorError','(((.+)+)+)+$','assign','参数验证失败','validate','66YiBUxz','Config','messages','message','keys','4231570PwHBzD','defineProperty','locale','217416JlUldw','Init','isSchema','key'];a8_0x52d0=function(){return _0x44074e;};return a8_0x52d0();}function a8_0x197e(_0x68ba17,_0x2c34bf){const _0x300029=a8_0x52d0();return a8_0x197e=function(_0xaef6ba,_0x38ffcb){_0xaef6ba=_0xaef6ba-0x1c5;let _0x52d0f1=_0x300029[_0xaef6ba];return _0x52d0f1;},a8_0x197e(_0x68ba17,_0x2c34bf);}const a8_0x43e5a7=a8_0x197e;(function(_0x47f50a,_0x127638){const _0xa17033=a8_0x197e,_0x5906eb=_0x47f50a();while(!![]){try{const _0x2470ca=parseInt(_0xa17033(0x1eb))/0x1+parseInt(_0xa17033(0x1ec))/0x2*(-parseInt(_0xa17033(0x1ff))/0x3)+parseInt(_0xa17033(0x204))/0x4+-parseInt(_0xa17033(0x1fc))/0x5+-parseInt(_0xa17033(0x1d1))/0x6*(-parseInt(_0xa17033(0x1cb))/0x7)+-parseInt(_0xa17033(0x1d9))/0x8*(parseInt(_0xa17033(0x1fd))/0x9)+parseInt(_0xa17033(0x1d6))/0xa;if(_0x2470ca===_0x127638)break;else _0x5906eb['push'](_0x5906eb['shift']());}catch(_0x2f6f2d){_0x5906eb['push'](_0x5906eb['shift']());}}}(a8_0x52d0,0xda907));const a8_0x38ffcb=(function(){let _0x273132=!![];return function(_0x5550ac,_0x45a04e){const _0x517d13=_0x273132?function(){const _0x424e08=a8_0x197e;if(_0x45a04e){const _0x4caac1=_0x45a04e[_0x424e08(0x20b)](_0x5550ac,arguments);return _0x45a04e=null,_0x4caac1;}}:function(){};return _0x273132=![],_0x517d13;};}()),a8_0xaef6ba=a8_0x38ffcb(this,function(){const _0x574449=a8_0x197e;return a8_0xaef6ba['toString']()[_0x574449(0x1f4)](_0x574449(0x1cd))[_0x574449(0x201)]()[_0x574449(0x1ef)](a8_0xaef6ba)[_0x574449(0x1f4)]('(((.+)+)+)+$');});a8_0xaef6ba();'use strict';var __decorate=this&&this['__decorate']||function(_0x5bd2e9,_0x16a26b,_0x1ef4fd,_0x218927){const _0x3297da=a8_0x197e;var _0x2c1c82=arguments[_0x3297da(0x1e9)],_0x2e2698=_0x2c1c82<0x3?_0x16a26b:_0x218927===null?_0x218927=Object[_0x3297da(0x1fe)](_0x16a26b,_0x1ef4fd):_0x218927,_0x17430d;if(typeof Reflect===_0x3297da(0x1e1)&&typeof Reflect[_0x3297da(0x1dd)]==='function')_0x2e2698=Reflect[_0x3297da(0x1dd)](_0x5bd2e9,_0x16a26b,_0x1ef4fd,_0x218927);else{for(var _0x4487de=_0x5bd2e9[_0x3297da(0x1e9)]-0x1;_0x4487de>=0x0;_0x4487de--)if(_0x17430d=_0x5bd2e9[_0x4487de])_0x2e2698=(_0x2c1c82<0x3?_0x17430d(_0x2e2698):_0x2c1c82>0x3?_0x17430d(_0x16a26b,_0x1ef4fd,_0x2e2698):_0x17430d(_0x16a26b,_0x1ef4fd))||_0x2e2698;}return _0x2c1c82>0x3&&_0x2e2698&&Object[_0x3297da(0x1d7)](_0x16a26b,_0x1ef4fd,_0x2e2698),_0x2e2698;},__metadata=this&&this[a8_0x43e5a7(0x1df)]||function(_0x2f0aa6,_0x4a5a0e){const _0x11c480=a8_0x43e5a7;if(typeof Reflect===_0x11c480(0x1e1)&&typeof Reflect[_0x11c480(0x1f8)]===_0x11c480(0x1f0))return Reflect[_0x11c480(0x1f8)](_0x2f0aa6,_0x4a5a0e);};Object['defineProperty'](exports,a8_0x43e5a7(0x209),{'value':!![]}),exports['ValidatorService']=void 0x0;const Joi=require('joi'),i18n_1=require(a8_0x43e5a7(0x20e)),core_1=require(a8_0x43e5a7(0x205)),interface_1=require('../interface'),ValidatorError_1=require(a8_0x43e5a7(0x1cc));let ValidatorService=class ValidatorService{constructor(){const _0x3e7636=a8_0x43e5a7;this[_0x3e7636(0x1d3)]={};}async[a8_0x43e5a7(0x20c)](){const _0x368eb3=a8_0x43e5a7,_0x61d577=Object[_0x368eb3(0x1d5)](this[_0x368eb3(0x1f1)][_0x368eb3(0x207)]);_0x61d577[_0x368eb3(0x1f5)](_0x53b5b6=>{const _0x1381c0=_0x368eb3;this['messages'][(0x0,i18n_1['formatLocale'])(_0x53b5b6)]=Object[_0x1381c0(0x20f)](this[_0x1381c0(0x1e7)][_0x1381c0(0x1c9)](_0x53b5b6,_0x1381c0(0x1c5)));});}[a8_0x43e5a7(0x1e3)](_0x44cfba){const _0x3c5790=a8_0x43e5a7,_0x40b95f=(0x0,core_1[_0x3c5790(0x1ee)])(interface_1['RULES_KEY'],_0x44cfba);return _0x40b95f?Joi[_0x3c5790(0x1e1)](_0x40b95f):undefined;}[a8_0x43e5a7(0x1c5)](_0x52e8c1,_0xa9dd1,_0x2234c2={}){const _0x460c31=a8_0x43e5a7;var _0x4618ad,_0x39d4c8,_0x45baf5,_0xe308dc,_0x34867c,_0x922f1f;const _0xbd7dad=Joi[_0x460c31(0x1db)](_0x52e8c1)?_0x52e8c1:this['getSchema'](_0x52e8c1);if(!_0xbd7dad)throw new AnnError(ValidatorError_1[_0x460c31(0x1c7)][_0x460c31(0x1c6)]);_0x2234c2[_0x460c31(0x1e6)]=Object[_0x460c31(0x1ce)]((_0x4618ad=this[_0x460c31(0x20d)][_0x460c31(0x1e6)])!==null&&_0x4618ad!==void 0x0?_0x4618ad:{},{'messages':this[_0x460c31(0x1d3)]},_0x2234c2['validationOptions']||{}),_0x2234c2['validationOptions']['errors']=_0x2234c2['validationOptions']['errors']||{},_0x2234c2[_0x460c31(0x1e6)][_0x460c31(0x1fb)][_0x460c31(0x208)]=(0x0,i18n_1['formatLocale'])(this[_0x460c31(0x1e7)][_0x460c31(0x1e0)](_0x2234c2[_0x460c31(0x1e6)][_0x460c31(0x1fb)][_0x460c31(0x208)]||_0x2234c2[_0x460c31(0x1d8)]||this[_0x460c31(0x1f1)]['defaultLocale'],_0x460c31(0x1c5)));const _0x492971=_0xbd7dad[_0x460c31(0x1d0)](_0xa9dd1,_0x2234c2[_0x460c31(0x1e6)]);if(_0x492971===null||_0x492971===void 0x0?void 0x0:_0x492971[_0x460c31(0x1ed)]){if(_0x492971[_0x460c31(0x1ed)]instanceof AnnError)throw _0x492971[_0x460c31(0x1ed)];else{if(_0x492971[_0x460c31(0x1ed)]instanceof Error)throw new AnnError(ValidatorError_1['ValidatorError'][_0x460c31(0x1ca)],{'message':((_0x39d4c8=_0x492971['error'])===null||_0x39d4c8===void 0x0?void 0x0:_0x39d4c8[_0x460c31(0x1d4)])||_0x460c31(0x1cf)});else throw new AnnError(ValidatorError_1['ValidatorError'][_0x460c31(0x1ca)],{'message':((_0x34867c=(_0xe308dc=(_0x45baf5=_0x492971[_0x460c31(0x1ed)])===null||_0x45baf5===void 0x0?void 0x0:_0x45baf5['details'])===null||_0xe308dc===void 0x0?void 0x0:_0xe308dc[0x0])===null||_0x34867c===void 0x0?void 0x0:_0x34867c[_0x460c31(0x1d4)])||_0x460c31(0x1cf)});}}if(_0x492971===null||_0x492971===void 0x0?void 0x0:_0x492971[_0x460c31(0x1e8)]){const _0x4683b1=(_0x922f1f=_0xbd7dad===null||_0xbd7dad===void 0x0?void 0x0:_0xbd7dad['$_terms'])===null||_0x922f1f===void 0x0?void 0x0:_0x922f1f['keys'],_0x38ab5e=function(_0x4c4de0,_0x43cbba){const _0x4e8e92=_0x460c31;var _0x2a34a5,_0x3b1dc1,_0x56a154,_0x185413,_0x3b5873,_0x3a583e,_0x615366,_0x4fea13,_0x3c1030,_0xa9294f,_0x601dde;for(let _0x3ed3a2 in _0x4c4de0){if(_0x43cbba[(_0x2a34a5=_0x4c4de0[_0x3ed3a2])===null||_0x2a34a5===void 0x0?void 0x0:_0x2a34a5[_0x4e8e92(0x1dc)]]&&((_0x56a154=(_0x3b1dc1=_0x4c4de0[_0x3ed3a2])===null||_0x3b1dc1===void 0x0?void 0x0:_0x3b1dc1[_0x4e8e92(0x1f2)])===null||_0x56a154===void 0x0?void 0x0:_0x56a154[_0x4e8e92(0x206)])){if(((_0x3b5873=(_0x185413=_0x4c4de0[_0x3ed3a2])===null||_0x185413===void 0x0?void 0x0:_0x185413[_0x4e8e92(0x1f2)])===null||_0x3b5873===void 0x0?void 0x0:_0x3b5873[_0x4e8e92(0x206)])==_0x4e8e92(0x1e1))_0x43cbba[_0x4c4de0[_0x3ed3a2]['key']]=_0x38ab5e((_0x615366=(_0x3a583e=_0x4c4de0[_0x3ed3a2])===null||_0x3a583e===void 0x0?void 0x0:_0x3a583e[_0x4e8e92(0x1f2)][_0x4e8e92(0x1fa)])===null||_0x615366===void 0x0?void 0x0:_0x615366[_0x4e8e92(0x1d5)],_0x43cbba[_0x4c4de0[_0x3ed3a2][_0x4e8e92(0x1dc)]]);else{if(_0x4c4de0[_0x3ed3a2][_0x4e8e92(0x1f2)]['type']==_0x4e8e92(0x1f3)&&_0x492971[_0x4e8e92(0x1e8)][(_0x4fea13=_0x4c4de0[_0x3ed3a2])===null||_0x4fea13===void 0x0?void 0x0:_0x4fea13[_0x4e8e92(0x1dc)]]){const _0x5e6f1e=((_0x601dde=(_0xa9294f=(_0x3c1030=_0x4c4de0[_0x3ed3a2])===null||_0x3c1030===void 0x0?void 0x0:_0x3c1030['schema'])===null||_0xa9294f===void 0x0?void 0x0:_0xa9294f['_flags'])===null||_0x601dde===void 0x0?void 0x0:_0x601dde[_0x4e8e92(0x1f9)])||'YYYY-MM-DD\x20HH:mm:ss';_0x43cbba[_0x4c4de0[_0x3ed3a2][_0x4e8e92(0x1dc)]]=dayjs(_0x492971[_0x4e8e92(0x1e8)][_0x4c4de0[_0x3ed3a2][_0x4e8e92(0x1dc)]])['format'](_0x5e6f1e);}}}}return _0x43cbba;};return _0x38ab5e(_0x4683b1,_0x492971['value']);}throw new AnnError(ValidatorError_1[_0x460c31(0x1c7)]['PARAMS']);}};__decorate([(0x0,core_1[a8_0x43e5a7(0x1d2)])(a8_0x43e5a7(0x1ea)),__metadata(a8_0x43e5a7(0x1c8),Object)],ValidatorService[a8_0x43e5a7(0x1f7)],a8_0x43e5a7(0x1f1),void 0x0),__decorate([(0x0,core_1[a8_0x43e5a7(0x1d2)])(a8_0x43e5a7(0x1c5)),__metadata(a8_0x43e5a7(0x1c8),Object)],ValidatorService[a8_0x43e5a7(0x1f7)],a8_0x43e5a7(0x20d),void 0x0),__decorate([(0x0,core_1[a8_0x43e5a7(0x1e2)])(),__metadata(a8_0x43e5a7(0x1c8),i18n_1[a8_0x43e5a7(0x1f6)])],ValidatorService['prototype'],a8_0x43e5a7(0x1e7),void 0x0),__decorate([(0x0,core_1[a8_0x43e5a7(0x1da)])(),__metadata(a8_0x43e5a7(0x1c8),Function),__metadata(a8_0x43e5a7(0x1e4),[]),__metadata(a8_0x43e5a7(0x200),Promise)],ValidatorService[a8_0x43e5a7(0x1f7)],'init',null),ValidatorService=__decorate([(0x0,core_1[a8_0x43e5a7(0x1de)])(a8_0x43e5a7(0x1c5)),(0x0,core_1[a8_0x43e5a7(0x203)])(core_1[a8_0x43e5a7(0x1e5)][a8_0x43e5a7(0x202)])],ValidatorService),exports[a8_0x43e5a7(0x20a)]=ValidatorService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
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.0
|
|
20
|
+
"@anncic-api/core": "^2.1.0",
|
|
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": "23dee54ff8c6aeadc2008146d0d30c6d7d90a5ce"
|
|
30
30
|
}
|