@anveroapi/validator 4.2.0 → 4.3.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/helper/getSchema.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 +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a0_0x3e73c6=a0_0x3a15;(function(_0x2badf5,_0x24a882){const _0x240f55=a0_0x3a15,_0x40c80f=_0x2badf5();while(!![]){try{const _0x242565=-parseInt(_0x240f55(0x1da))/0x1*(parseInt(_0x240f55(0x1d7))/0x2)+parseInt(_0x240f55(0x1dd))/0x3*(-parseInt(_0x240f55(0x1d8))/0x4)+parseInt(_0x240f55(0x1cd))/0x5+-parseInt(_0x240f55(0x1d0))/0x6*(-parseInt(_0x240f55(0x1db))/0x7)+parseInt(_0x240f55(0x1dc))/0x8+-parseInt(_0x240f55(0x1d6))/0x9+-parseInt(_0x240f55(0x1d1))/0xa*(-parseInt(_0x240f55(0x1cb))/0xb);if(_0x242565===_0x24a882)break;else _0x40c80f['push'](_0x40c80f['shift']());}catch(_0x25fb05){_0x40c80f['push'](_0x40c80f['shift']());}}}(a0_0x4592,0xcb9d2));function a0_0x4592(){const _0x23ed39=['20SJQAxA','../../locales/en_US.json','constructor','__esModule','defineProperty','1787157QoicaN','116izvsyi','4NyNWIV','default','11527awkOoR','7126SOEjKD','1475544tAbnuG','704949HByusM','toString','(((.+)+)+)+$','apply','ValidatorError','6094627jBviza','search','2332175IvzYMn','PARAMS','string','1044bplXgB'];a0_0x4592=function(){return _0x23ed39;};return a0_0x4592();}function a0_0x3a15(_0x26565b,_0x13e453){_0x26565b=_0x26565b-0x1cb;const _0x1dbd8d=a0_0x4592();let _0x8a62d4=_0x1dbd8d[_0x26565b];return _0x8a62d4;}const a0_0x224f1e=(function(){let _0x77b3f9=!![];return function(_0x77208,_0x5c1a48){const _0x21fab9=_0x77b3f9?function(){const _0x20f45a=a0_0x3a15;if(_0x5c1a48){const _0x73263f=_0x5c1a48[_0x20f45a(0x1e0)](_0x77208,arguments);return _0x5c1a48=null,_0x73263f;}}:function(){};return _0x77b3f9=![],_0x21fab9;};}()),a0_0x8a62d4=a0_0x224f1e(this,function(){const _0x361cbb=a0_0x3a15;return a0_0x8a62d4[_0x361cbb(0x1de)]()[_0x361cbb(0x1cc)](_0x361cbb(0x1df))[_0x361cbb(0x1de)]()[_0x361cbb(0x1d3)](a0_0x8a62d4)[_0x361cbb(0x1cc)]('(((.+)+)+)+$');});a0_0x8a62d4();'use strict';Object[a0_0x3e73c6(0x1d5)](exports,a0_0x3e73c6(0x1d4),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');exports[a0_0x3e73c6(0x1d9)]={'validator':{'errorStatus':ValidatorError_1[a0_0x3e73c6(0x1e1)][a0_0x3e73c6(0x1ce)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x3e73c6(0x1cf)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x3e73c6(0x1d2))},'zh_CN':{'validator':require('../../locales/zh_CN.json')}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a1_0x9535(){const _0x24d1f9=['object','getOwnPropertyDescriptor','function','req','target','./interface','decorator','request','getMethodParamTypes','3533646yqsSXa','6676548jiOpPu','validator','VALIDATOR_KEY','param','onReady','2435013UHHpBp','method','747746IhouTK','design:type','anvero-api:validator','./service/ValidatorService','REQUEST_OBJ_CTX_KEY','__decorate','@midwayjs/core','methodName','2tkDvBa','8WAFzAn','length','locale','40EFICqV','10NuhFQW','getSchema','args','prototype','body','9772939PGPAKb','undefined','params','constructor','decorate','methodArgs','defineProperty','getAttr','Inject','(((.+)+)+)+$','toString','metadata','MetadataManager','find','2702925XyvFKG','@midwayjs/i18n','registerMethodHandler','@anveroapi/core','ValidatorService','getOwnMetadata','2165261mroNas','CustomConfiguration','search'];a1_0x9535=function(){return _0x24d1f9;};return a1_0x9535();}const a1_0x3e0d05=a1_0x14c0;(function(_0x253a99,_0x4dc7b5){const _0x2ed1a0=a1_0x14c0,_0x5afbb7=_0x253a99();while(!![]){try{const _0xabe13d=parseInt(_0x2ed1a0(0x1ed))/0x1*(-parseInt(_0x2ed1a0(0x1e5))/0x2)+parseInt(_0x2ed1a0(0x205))/0x3+-parseInt(_0x2ed1a0(0x1de))/0x4+parseInt(_0x2ed1a0(0x1f2))/0x5*(-parseInt(_0x2ed1a0(0x1dd))/0x6)+parseInt(_0x2ed1a0(0x20b))/0x7*(parseInt(_0x2ed1a0(0x1ee))/0x8)+-parseInt(_0x2ed1a0(0x1e3))/0x9+-parseInt(_0x2ed1a0(0x1f1))/0xa*(-parseInt(_0x2ed1a0(0x1f7))/0xb);if(_0xabe13d===_0x4dc7b5)break;else _0x5afbb7['push'](_0x5afbb7['shift']());}catch(_0x3d0a51){_0x5afbb7['push'](_0x5afbb7['shift']());}}}(a1_0x9535,0xdb6d4));const a1_0x4c7cdb=(function(){let _0x12351d=!![];return function(_0x9dd2dc,_0x4df749){const _0x4c5787=_0x12351d?function(){if(_0x4df749){const _0x299e7f=_0x4df749['apply'](_0x9dd2dc,arguments);return _0x4df749=null,_0x299e7f;}}:function(){};return _0x12351d=![],_0x4c5787;};}()),a1_0x211473=a1_0x4c7cdb(this,function(){const _0x2300b5=a1_0x14c0;return a1_0x211473[_0x2300b5(0x201)]()[_0x2300b5(0x20d)](_0x2300b5(0x200))[_0x2300b5(0x201)]()[_0x2300b5(0x1fa)](a1_0x211473)[_0x2300b5(0x20d)](_0x2300b5(0x200));});a1_0x211473();'use strict';var __decorate=this&&this[a1_0x3e0d05(0x1ea)]||function(_0x47bfee,_0x36613c,_0x46f9e1,_0x50ed98){const _0x24b82a=a1_0x3e0d05;var _0x2750ce=arguments['length'],_0x18aba5=_0x2750ce<0x3?_0x36613c:_0x50ed98===null?_0x50ed98=Object[_0x24b82a(0x20f)](_0x36613c,_0x46f9e1):_0x50ed98,_0x4c0956;if(typeof Reflect==='object'&&typeof Reflect[_0x24b82a(0x1fb)]==='function')_0x18aba5=Reflect[_0x24b82a(0x1fb)](_0x47bfee,_0x36613c,_0x46f9e1,_0x50ed98);else{for(var _0x15f2be=_0x47bfee[_0x24b82a(0x1ef)]-0x1;_0x15f2be>=0x0;_0x15f2be--)if(_0x4c0956=_0x47bfee[_0x15f2be])_0x18aba5=(_0x2750ce<0x3?_0x4c0956(_0x18aba5):_0x2750ce>0x3?_0x4c0956(_0x36613c,_0x46f9e1,_0x18aba5):_0x4c0956(_0x36613c,_0x46f9e1))||_0x18aba5;}return _0x2750ce>0x3&&_0x18aba5&&Object['defineProperty'](_0x36613c,_0x46f9e1,_0x18aba5),_0x18aba5;},__metadata=this&&this['__metadata']||function(_0x2760c5,_0x11f27){const _0x4c631f=a1_0x3e0d05;if(typeof Reflect===_0x4c631f(0x20e)&&typeof Reflect[_0x4c631f(0x202)]===_0x4c631f(0x210))return Reflect[_0x4c631f(0x202)](_0x2760c5,_0x11f27);};function a1_0x14c0(_0x1bba76,_0x22e949){_0x1bba76=_0x1bba76-0x1dd;const _0x150679=a1_0x9535();let _0x211473=_0x150679[_0x1bba76];return _0x211473;}Object[a1_0x3e0d05(0x1fd)](exports,'__esModule',{'value':!![]}),exports[a1_0x3e0d05(0x20c)]=void 0x0;const i18n_1=require(a1_0x3e0d05(0x206)),core_1=require(a1_0x3e0d05(0x1eb)),core_2=require(a1_0x3e0d05(0x1eb)),interface_1=require(a1_0x3e0d05(0x213)),ValidatorService_1=require(a1_0x3e0d05(0x1e8)),i18n=require('@midwayjs/i18n'),anvero=require(a1_0x3e0d05(0x208)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{async[a1_0x3e0d05(0x1e2)](){const _0xccb24b=a1_0x3e0d05;this[_0xccb24b(0x214)][_0xccb24b(0x207)](interface_1[_0xccb24b(0x1e0)],_0x1de553=>{const _0x4c65b9=_0xccb24b,_0x45dc9e=_0x1de553[_0x4c65b9(0x202)],_0x40414c=core_2[_0x4c65b9(0x203)][_0x4c65b9(0x216)](_0x1de553[_0x4c65b9(0x212)],_0x1de553['propertyName']);return{'before':_0x49447d=>{const _0x1e22e6=_0x4c65b9;var _0x51552f,_0x3085ff,_0x46d82d,_0x5213cd,_0x126ed8,_0x59d33a,_0x41c93c;const _0x55ab60=_0x49447d[_0x1e22e6(0x212)][core_1[_0x1e22e6(0x1e9)]],_0x3e7ece=Object['assign']({},((_0x51552f=_0x55ab60===null||_0x55ab60===void 0x0?void 0x0:_0x55ab60[_0x1e22e6(0x215)])===null||_0x51552f===void 0x0?void 0x0:_0x51552f['query'])||{},((_0x3085ff=_0x55ab60===null||_0x55ab60===void 0x0?void 0x0:_0x55ab60[_0x1e22e6(0x215)])===null||_0x3085ff===void 0x0?void 0x0:_0x3085ff[_0x1e22e6(0x1f6)])||{}),_0x843648=(core_2[_0x1e22e6(0x203)][_0x1e22e6(0x20a)](interface_1[_0x1e22e6(0x1e0)],_0x49447d[_0x1e22e6(0x212)])||[])[_0x1e22e6(0x204)](_0x102d75=>_0x102d75[_0x1e22e6(0x1e4)]==_0x49447d[_0x1e22e6(0x1ec)]);!(_0x45dc9e===null||_0x45dc9e===void 0x0?void 0x0:_0x45dc9e[_0x1e22e6(0x1f0)])&&_0x55ab60&&_0x55ab60[_0x1e22e6(0x1fe)]&&(_0x45dc9e[_0x1e22e6(0x1f0)]=_0x55ab60[_0x1e22e6(0x1fe)](i18n_1['I18N_ATTR_KEY']));for(let _0x371540=0x0;_0x371540<_0x40414c['length'];_0x371540++){const _0x146c8e=_0x40414c[_0x371540],_0x223b6e=this[_0x1e22e6(0x209)][_0x1e22e6(0x1f3)](_0x146c8e);if(_0x223b6e){(typeof _0x49447d[_0x1e22e6(0x1f4)][_0x371540]==_0x1e22e6(0x1f8)||typeof _0x49447d[_0x1e22e6(0x1f4)][_0x371540]==_0x1e22e6(0x210)||((_0x46d82d=_0x49447d['args'][_0x371540])===null||_0x46d82d===void 0x0?void 0x0:_0x46d82d[_0x1e22e6(0x215)])&&((_0x5213cd=_0x49447d['args'][_0x371540])===null||_0x5213cd===void 0x0?void 0x0:_0x5213cd['res'])&&((_0x126ed8=_0x49447d[_0x1e22e6(0x1f4)][_0x371540])===null||_0x126ed8===void 0x0?void 0x0:_0x126ed8[_0x1e22e6(0x211)]))&&(_0x49447d[_0x1e22e6(0x1f4)][_0x371540]=_0x3e7ece);const _0x280688=this[_0x1e22e6(0x209)][_0x1e22e6(0x1df)](_0x223b6e,_0x49447d[_0x1e22e6(0x1f4)][_0x371540],_0x45dc9e);_0x280688&&(_0x49447d['args'][_0x371540]=_0x280688);}else(_0x843648===null||_0x843648===void 0x0?void 0x0:_0x843648[_0x1e22e6(0x1fc)][_0x371540])&&typeof((_0x59d33a=_0x55ab60===null||_0x55ab60===void 0x0?void 0x0:_0x55ab60[_0x1e22e6(0x1f9)])===null||_0x59d33a===void 0x0?void 0x0:_0x59d33a[_0x843648[_0x1e22e6(0x1fc)][_0x371540]])!='undefined'&&(_0x49447d[_0x1e22e6(0x1f4)][_0x371540]=typeof((_0x41c93c=_0x49447d[_0x1e22e6(0x1f4)][_0x371540])===null||_0x41c93c===void 0x0?void 0x0:_0x41c93c[_0x1e22e6(0x1e1)])==_0x1e22e6(0x210)?_0x146c8e(_0x55ab60['params'][_0x843648[_0x1e22e6(0x1fc)][_0x371540]]):_0x55ab60[_0x1e22e6(0x1f9)][_0x843648[_0x1e22e6(0x1fc)][_0x371540]]);}},'afterThrow':(_0x129886,_0x15a76e)=>{throw _0x15a76e;}};});}};exports[a1_0x3e0d05(0x20c)]=CustomConfiguration,__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x3e0d05(0x1e6),core_1['MidwayDecoratorService'])],CustomConfiguration[a1_0x3e0d05(0x1f5)],a1_0x3e0d05(0x214),void 0x0),__decorate([(0x0,core_2[a1_0x3e0d05(0x1ff)])(),__metadata('design:type',ValidatorService_1[a1_0x3e0d05(0x209)])],CustomConfiguration[a1_0x3e0d05(0x1f5)],a1_0x3e0d05(0x209),void 0x0),exports['CustomConfiguration']=CustomConfiguration=__decorate([(0x0,core_2['Configuration'])({'imports':[i18n,anvero],'namespace':a1_0x3e0d05(0x1e7),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a2_0x28f67f=a2_0x4ebf;(function(_0x4952a4,_0x8452ff){const _0x25cab3=a2_0x4ebf,_0x4f778e=_0x4952a4();while(!![]){try{const _0x27e2a8=parseInt(_0x25cab3(0x18c))/0x1*(parseInt(_0x25cab3(0x198))/0x2)+parseInt(_0x25cab3(0x18b))/0x3+-parseInt(_0x25cab3(0x17a))/0x4*(-parseInt(_0x25cab3(0x190))/0x5)+-parseInt(_0x25cab3(0x193))/0x6*(parseInt(_0x25cab3(0x183))/0x7)+-parseInt(_0x25cab3(0x17d))/0x8*(parseInt(_0x25cab3(0x187))/0x9)+-parseInt(_0x25cab3(0x184))/0xa*(-parseInt(_0x25cab3(0x17b))/0xb)+parseInt(_0x25cab3(0x18e))/0xc*(parseInt(_0x25cab3(0x189))/0xd);if(_0x27e2a8===_0x8452ff)break;else _0x4f778e['push'](_0x4f778e['shift']());}catch(_0x3a60dc){_0x4f778e['push'](_0x4f778e['shift']());}}}(a2_0x42c6,0x7b16f));const a2_0x19d126=(function(){let _0x1f1b47=!![];return function(_0x263b0e,_0x5e06bd){const _0x55433f=_0x1f1b47?function(){const _0x7c5484=a2_0x4ebf;if(_0x5e06bd){const _0x2793ea=_0x5e06bd[_0x7c5484(0x18a)](_0x263b0e,arguments);return _0x5e06bd=null,_0x2793ea;}}:function(){};return _0x1f1b47=![],_0x55433f;};}()),a2_0x196b2c=a2_0x19d126(this,function(){const _0x5c3295=a2_0x4ebf;return a2_0x196b2c['toString']()[_0x5c3295(0x18d)](_0x5c3295(0x180))['toString']()[_0x5c3295(0x188)](a2_0x196b2c)[_0x5c3295(0x18d)](_0x5c3295(0x180));});a2_0x196b2c();'use strict';function a2_0x42c6(){const _0x258791=['getOwnMetadata','function','@joi/date','__esModule','MetadataManager','4MAVapc','107470vCjdHn','name','3809560dRqkDp','../interface','RULES_KEY','(((.+)+)+)+$','map','keys','14VVtTYk','110OMVDXb','items','getPropertyType','18bdGQUz','constructor','7371XkJTpN','apply','72456NrWQEJ','1zNLXjq','search','37032aDvuAt','joi','544640ZbhBTs','RuleType','Array','2027112UTiILC','extend','meta','defineMetadata','isSchema','283914UPGVwD'];a2_0x42c6=function(){return _0x258791;};return a2_0x42c6();}Object['defineProperty'](exports,a2_0x28f67f(0x178),{'value':!![]}),exports[a2_0x28f67f(0x191)]=void 0x0,exports['Rule']=Rule;function a2_0x4ebf(_0x178dc1,_0x5de135){_0x178dc1=_0x178dc1-0x178;const _0x13072b=a2_0x42c6();let _0x196b2c=_0x13072b[_0x178dc1];return _0x196b2c;}const joi=require(a2_0x28f67f(0x18f)),date_1=require(a2_0x28f67f(0x19b)),core_1=require('@midwayjs/core'),interface_1=require(a2_0x28f67f(0x17e));exports['RuleType']=joi[a2_0x28f67f(0x194)](date_1['default']);function Rule(_0x2ba8c2,_0x4464d7,_0x1b0873=''){return(_0x49af17,_0x56dcb2)=>{const _0x5e98a0=a2_0x4ebf;var _0x218507;if(_0x56dcb2)!joi[_0x5e98a0(0x197)](_0x4464d7)&&(_0x4464d7===null||_0x4464d7===void 0x0?void 0x0:_0x4464d7[_0x5e98a0(0x17c)])&&(_0x4464d7=joi['object'](core_1['MetadataManager'][_0x5e98a0(0x199)](interface_1[_0x5e98a0(0x17f)],_0x4464d7))[_0x5e98a0(0x195)]({'id':_0x4464d7[_0x5e98a0(0x17c)]}),core_1[_0x5e98a0(0x179)]['transformTypeFromTSDesign'](core_1[_0x5e98a0(0x179)][_0x5e98a0(0x186)](_0x49af17,_0x56dcb2))['name']===_0x5e98a0(0x192)&&(_0x4464d7=joi['array']()[_0x5e98a0(0x185)](_0x4464d7))),joi[_0x5e98a0(0x197)](_0x4464d7)&&(_0x2ba8c2&&typeof(_0x4464d7===null||_0x4464d7===void 0x0?void 0x0:_0x4464d7['label'])=='function'&&(_0x4464d7=_0x4464d7['label'](_0x2ba8c2)),_0x1b0873&&typeof(_0x4464d7===null||_0x4464d7===void 0x0?void 0x0:_0x4464d7['description'])==_0x5e98a0(0x19a)&&(_0x4464d7=_0x4464d7['description'](_0x1b0873)),core_1[_0x5e98a0(0x179)]['attachMetadata'](interface_1[_0x5e98a0(0x17f)],_0x4464d7,_0x49af17,_0x56dcb2));else{const _0x2fce38=core_1['MetadataManager'][_0x5e98a0(0x199)](interface_1[_0x5e98a0(0x17f)],_0x4464d7);if(_0x2fce38){let _0x3614d=(_0x218507=core_1['MetadataManager'][_0x5e98a0(0x199)](interface_1[_0x5e98a0(0x17f)],_0x49af17))!==null&&_0x218507!==void 0x0?_0x218507:{};Object[_0x5e98a0(0x182)](_0x2fce38)[_0x5e98a0(0x181)](_0x3f3ba9=>{!_0x3614d[_0x3f3ba9]&&(_0x3614d[_0x3f3ba9]=_0x2fce38[_0x3f3ba9]);}),core_1[_0x5e98a0(0x179)][_0x5e98a0(0x196)](interface_1['RULES_KEY'],_0x3614d,_0x49af17);}}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x1ade51=a3_0x33a8;function a3_0x1fbd(){const _0x35512a=['indexOf','../interface','function','20pPwEfw','slice','__esModule','993846pFrVTD','replace','7BFPRBZ','constructor','@midwayjs/core','VALIDATOR_KEY','prototype','toString','27792EBfHGp','defineProperty','4611608TWlSKE','30gCPHSt','11FTKFtG','search','309860bsiXJq','7542624GOqSpt','(((.+)+)+)+$','100425iNAuyk','apply','match','createCustomMethodDecorator','3CUqjRl','MetadataManager','Validator','attachMetadata','getFuncArgs','1364481ivrElX'];a3_0x1fbd=function(){return _0x35512a;};return a3_0x1fbd();}(function(_0x42f1f3,_0x345d10){const _0x10e798=a3_0x33a8,_0x30b7ea=_0x42f1f3();while(!![]){try{const _0x9a1374=parseInt(_0x10e798(0xae))/0x1+-parseInt(_0x10e798(0x9d))/0x2*(parseInt(_0x10e798(0xb2))/0x3)+-parseInt(_0x10e798(0xab))/0x4*(-parseInt(_0x10e798(0x9a))/0x5)+-parseInt(_0x10e798(0xa5))/0x6+-parseInt(_0x10e798(0x9f))/0x7*(-parseInt(_0x10e798(0xa7))/0x8)+parseInt(_0x10e798(0xb7))/0x9*(parseInt(_0x10e798(0xa8))/0xa)+parseInt(_0x10e798(0xa9))/0xb*(-parseInt(_0x10e798(0xac))/0xc);if(_0x9a1374===_0x345d10)break;else _0x30b7ea['push'](_0x30b7ea['shift']());}catch(_0xc12e18){_0x30b7ea['push'](_0x30b7ea['shift']());}}}(a3_0x1fbd,0x4c0a0));const a3_0x491834=(function(){let _0x1fbe6a=!![];return function(_0x44eda3,_0xe9eb65){const _0x495535=_0x1fbe6a?function(){const _0x2b0308=a3_0x33a8;if(_0xe9eb65){const _0x3700b5=_0xe9eb65[_0x2b0308(0xaf)](_0x44eda3,arguments);return _0xe9eb65=null,_0x3700b5;}}:function(){};return _0x1fbe6a=![],_0x495535;};}()),a3_0x25afe6=a3_0x491834(this,function(){const _0x26d24e=a3_0x33a8;return a3_0x25afe6['toString']()[_0x26d24e(0xaa)](_0x26d24e(0xad))['toString']()[_0x26d24e(0xa0)](a3_0x25afe6)[_0x26d24e(0xaa)](_0x26d24e(0xad));});function a3_0x33a8(_0x51820d,_0x151136){_0x51820d=_0x51820d-0x99;const _0x9aa7e8=a3_0x1fbd();let _0x25afe6=_0x9aa7e8[_0x51820d];return _0x25afe6;}a3_0x25afe6();'use strict';Object[a3_0x1ade51(0xa6)](exports,a3_0x1ade51(0x9c),{'value':!![]}),exports[a3_0x1ade51(0xb4)]=Validator,exports[a3_0x1ade51(0xb6)]=getFuncArgs;const core_1=require(a3_0x1ade51(0xa1)),interface_1=require(a3_0x1ade51(0xb9));function Validator(_0x5d37e3={}){return(_0xfb5aec,_0x76e586,_0x165dab)=>{const _0x1aebf6=a3_0x33a8,_0x214f21=getFuncArgs(_0xfb5aec[_0x76e586]);core_1[_0x1aebf6(0xb3)][_0x1aebf6(0xb5)](interface_1[_0x1aebf6(0xa2)],{'method':_0x76e586,'methodArgs':_0x214f21},_0xfb5aec),core_1['DecoratorManager'][_0x1aebf6(0xb1)](interface_1[_0x1aebf6(0xa2)],_0x5d37e3)(_0xfb5aec,_0x76e586,_0x165dab);};}function getFuncArgs(_0x180883){const _0x5b212e=a3_0x1ade51;if(typeof _0x180883==_0x5b212e(0x99)){const _0x4cc343=/=>.*$/mg,_0x23062f=/=[^,)]+/mg,_0x362bfd=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x440d61=(_0x180883[_0x5b212e(0xa3)]?_0x180883[_0x5b212e(0xa3)][_0x5b212e(0xa0)]['toString']():_0x180883[_0x5b212e(0xa4)]())[_0x5b212e(0x9e)](_0x362bfd,'')[_0x5b212e(0x9e)](_0x4cc343,'')[_0x5b212e(0x9e)](_0x23062f,''),_0x24330e=_0x440d61[_0x5b212e(0x9b)](_0x440d61[_0x5b212e(0xb8)]('(')+0x1,_0x440d61[_0x5b212e(0xb8)](')'))[_0x5b212e(0xb0)](/([^\s,]+)/g)||[];return _0x24330e;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x4c48b3=a4_0x1cb6;(function(_0x441971,_0x1ac707){var _0x45b72d=a4_0x1cb6,_0x3b8ba0=_0x441971();while(!![]){try{var _0x4d2dc7=parseInt(_0x45b72d(0x135))/0x1*(parseInt(_0x45b72d(0x12a))/0x2)+parseInt(_0x45b72d(0x12f))/0x3+-parseInt(_0x45b72d(0x13a))/0x4+parseInt(_0x45b72d(0x12b))/0x5*(parseInt(_0x45b72d(0x13b))/0x6)+parseInt(_0x45b72d(0x127))/0x7+parseInt(_0x45b72d(0x136))/0x8*(parseInt(_0x45b72d(0x137))/0x9)+-parseInt(_0x45b72d(0x13c))/0xa;if(_0x4d2dc7===_0x1ac707)break;else _0x3b8ba0['push'](_0x3b8ba0['shift']());}catch(_0x39f8ed){_0x3b8ba0['push'](_0x3b8ba0['shift']());}}}(a4_0x4c71,0x9fe3e));var a4_0x4a4293=(function(){var _0x3a9f85=!![];return function(_0x46c3e1,_0x45d622){var _0x16df77=_0x3a9f85?function(){if(_0x45d622){var _0x4b55d4=_0x45d622['apply'](_0x46c3e1,arguments);return _0x45d622=null,_0x4b55d4;}}:function(){};return _0x3a9f85=![],_0x16df77;};}()),a4_0xc7152b=a4_0x4a4293(this,function(){var _0x3cd96c=a4_0x1cb6;return a4_0xc7152b['toString']()[_0x3cd96c(0x12e)]('(((.+)+)+)+$')['toString']()[_0x3cd96c(0x139)](a4_0xc7152b)[_0x3cd96c(0x12e)]('(((.+)+)+)+$');});function a4_0x1cb6(_0x2ed757,_0x515853){_0x2ed757=_0x2ed757-0x123;var _0xf70d97=a4_0x4c71();var _0xc7152b=_0xf70d97[_0x2ed757];return _0xc7152b;}a4_0xc7152b();function a4_0x4c71(){var _0x2904fa=['metadata','function','参数验证失败','ValidatorError','1737WFtsHS','24KdIbAZ','1297368bxPyxQ','object','constructor','2489560wzYBYL','6hgRQou','14730870VeZIpi','__esModule','__decorate','design:type','PARAMS','length','decorate','3378480vmwTLz','__metadata','@anveroapi/core','692dqJCrh','2369195VZwHxH','defineProperty','AnnErrorMsg','search','2281350yDbJsX','NOFIND_SCHEMA'];a4_0x4c71=function(){return _0x2904fa;};return a4_0x4c71();}'use strict';var __decorate=this&&this[a4_0x4c48b3(0x13e)]||function(_0x48ace6,_0x9b983d,_0x19853a,_0x19a2d6){var _0x314ce0=a4_0x4c48b3,_0x5d5c41=arguments[_0x314ce0(0x125)],_0x80ddba=_0x5d5c41<0x3?_0x9b983d:_0x19a2d6===null?_0x19a2d6=Object['getOwnPropertyDescriptor'](_0x9b983d,_0x19853a):_0x19a2d6,_0x5ef560;if(typeof Reflect===_0x314ce0(0x138)&&typeof Reflect[_0x314ce0(0x126)]===_0x314ce0(0x132))_0x80ddba=Reflect[_0x314ce0(0x126)](_0x48ace6,_0x9b983d,_0x19853a,_0x19a2d6);else{for(var _0x5d93ad=_0x48ace6[_0x314ce0(0x125)]-0x1;_0x5d93ad>=0x0;_0x5d93ad--)if(_0x5ef560=_0x48ace6[_0x5d93ad])_0x80ddba=(_0x5d5c41<0x3?_0x5ef560(_0x80ddba):_0x5d5c41>0x3?_0x5ef560(_0x9b983d,_0x19853a,_0x80ddba):_0x5ef560(_0x9b983d,_0x19853a))||_0x80ddba;}return _0x5d5c41>0x3&&_0x80ddba&&Object['defineProperty'](_0x9b983d,_0x19853a,_0x80ddba),_0x80ddba;},__metadata=this&&this[a4_0x4c48b3(0x128)]||function(_0x131b76,_0x19f55d){var _0x2dda5c=a4_0x4c48b3;if(typeof Reflect===_0x2dda5c(0x138)&&typeof Reflect[_0x2dda5c(0x131)]===_0x2dda5c(0x132))return Reflect[_0x2dda5c(0x131)](_0x131b76,_0x19f55d);};Object[a4_0x4c48b3(0x12c)](exports,a4_0x4c48b3(0x13d),{'value':!![]}),exports[a4_0x4c48b3(0x134)]=void 0x0;const core_1=require(a4_0x4c48b3(0x129));class ValidatorError extends AnnError{}exports[a4_0x4c48b3(0x134)]=ValidatorError,ValidatorError[a4_0x4c48b3(0x124)]=0x18c1e,ValidatorError[a4_0x4c48b3(0x130)]=0x18c1c,__decorate([(0x0,core_1[a4_0x4c48b3(0x12d)])(a4_0x4c48b3(0x133)),__metadata(a4_0x4c48b3(0x123),Object)],ValidatorError,'PARAMS',void 0x0),__decorate([(0x0,core_1['AnnErrorMsg'])(a4_0x4c48b3(0x133)),__metadata(a4_0x4c48b3(0x123),Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x3e4453=a5_0x2129;(function(_0x2ad30a,_0xf5c49a){const _0x2da434=a5_0x2129,_0x20fa5e=_0x2ad30a();while(!![]){try{const _0x795298=parseInt(_0x2da434(0x79))/0x1+-parseInt(_0x2da434(0x75))/0x2*(parseInt(_0x2da434(0x7b))/0x3)+-parseInt(_0x2da434(0x84))/0x4*(-parseInt(_0x2da434(0x7d))/0x5)+parseInt(_0x2da434(0x78))/0x6*(-parseInt(_0x2da434(0x83))/0x7)+parseInt(_0x2da434(0x74))/0x8*(-parseInt(_0x2da434(0x77))/0x9)+-parseInt(_0x2da434(0x73))/0xa*(parseInt(_0x2da434(0x6e))/0xb)+-parseInt(_0x2da434(0x72))/0xc*(-parseInt(_0x2da434(0x6d))/0xd);if(_0x795298===_0xf5c49a)break;else _0x20fa5e['push'](_0x20fa5e['shift']());}catch(_0x536219){_0x20fa5e['push'](_0x20fa5e['shift']());}}}(a5_0x53e9,0x408a8));const a5_0x28f1c5=(function(){let _0x50ad83=!![];return function(_0x137cb9,_0x7963ce){const _0x1fe014=_0x50ad83?function(){const _0x4752da=a5_0x2129;if(_0x7963ce){const _0x5e19ba=_0x7963ce[_0x4752da(0x86)](_0x137cb9,arguments);return _0x7963ce=null,_0x5e19ba;}}:function(){};return _0x50ad83=![],_0x1fe014;};}()),a5_0xf11103=a5_0x28f1c5(this,function(){const _0x4af56d=a5_0x2129;return a5_0xf11103[_0x4af56d(0x7e)]()[_0x4af56d(0x6c)](_0x4af56d(0x76))['toString']()[_0x4af56d(0x7c)](a5_0xf11103)[_0x4af56d(0x6c)](_0x4af56d(0x76));});a5_0xf11103();'use strict';function a5_0x53e9(){const _0x22a405=['PickDto','3LsksZG','constructor','37330AknwSU','toString','prototype','MetadataManager','getDtoRules','@midwayjs/core','13139GxsRLX','8VDMkbd','RULES_KEY','apply','assign','defineProperty','./getSchema','search','26YwnKEz','583MeeuAl','defineMetadata','__esModule','../interface','4947996SkuHrk','65660HcPElR','48bdONTS','50172cxPabI','(((.+)+)+)+$','715527dewLqS','372kYffQH','391238WdUWIB'];a5_0x53e9=function(){return _0x22a405;};return a5_0x53e9();}Object[a5_0x3e4453(0x6a)](exports,a5_0x3e4453(0x70),{'value':!![]}),exports[a5_0x3e4453(0x7a)]=PickDto,exports['OmitDto']=OmitDto;const core_1=require(a5_0x3e4453(0x82)),interface_1=require(a5_0x3e4453(0x71)),getSchema_1=require(a5_0x3e4453(0x6b));function PickDto(_0x54a2a8,_0x18db1e){const _0x6bc50c=a5_0x3e4453,_0xe3262c=function(){};_0xe3262c[_0x6bc50c(0x7f)]=_0x54a2a8[_0x6bc50c(0x7f)];const _0x17d5cf=(0x0,getSchema_1['getDtoRules'])(_0x54a2a8),_0xc49661={};for(const _0x3e22b5 of _0x18db1e){_0x17d5cf[_0x3e22b5]&&(_0xc49661[_0x3e22b5]=_0x17d5cf[_0x3e22b5]);}return core_1[_0x6bc50c(0x80)][_0x6bc50c(0x6f)](interface_1[_0x6bc50c(0x85)],_0xc49661,_0xe3262c),_0xe3262c;}function a5_0x2129(_0x457a1,_0xdc797e){_0x457a1=_0x457a1-0x6a;const _0x512508=a5_0x53e9();let _0xf11103=_0x512508[_0x457a1];return _0xf11103;}function OmitDto(_0x555e61,_0x5a4186){const _0x240ce9=a5_0x3e4453,_0x22ae94=function(){};_0x22ae94[_0x240ce9(0x7f)]=_0x555e61[_0x240ce9(0x7f)];const _0x4aeee4=(0x0,getSchema_1[_0x240ce9(0x81)])(_0x555e61),_0x3b459f=Object[_0x240ce9(0x87)]({},_0x4aeee4);for(const _0x464bd2 of _0x5a4186){delete _0x3b459f[_0x464bd2];}return core_1[_0x240ce9(0x80)][_0x240ce9(0x6f)](interface_1[_0x240ce9(0x85)],_0x3b459f,_0x22ae94),_0x22ae94;}
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x34c77d=a6_0x2e14;(function(_0x168775,_0x414797){const _0x860ae6=a6_0x2e14,_0xff5f8f=_0x168775();while(!![]){try{const _0x4ea9da=parseInt(_0x860ae6(0xba))/0x1+parseInt(_0x860ae6(0xab))/0x2*(parseInt(_0x860ae6(0xb9))/0x3)+-parseInt(_0x860ae6(0xb8))/0x4+parseInt(_0x860ae6(0xb2))/0x5+parseInt(_0x860ae6(0xa9))/0x6+-parseInt(_0x860ae6(0xa4))/0x7*(parseInt(_0x860ae6(0xb5))/0x8)+-parseInt(_0x860ae6(0xaa))/0x9*(parseInt(_0x860ae6(0xa6))/0xa);if(_0x4ea9da===_0x414797)break;else _0xff5f8f['push'](_0xff5f8f['shift']());}catch(_0x574525){_0xff5f8f['push'](_0xff5f8f['shift']());}}}(a6_0x5c73,0x910a8));const a6_0x735d88=(function(){let _0x414da4=!![];return function(_0x2de71b,_0x2b0845){const _0x2604e8=_0x414da4?function(){if(_0x2b0845){const _0x65d2ea=_0x2b0845['apply'](_0x2de71b,arguments);return _0x2b0845=null,_0x65d2ea;}}:function(){};return _0x414da4=![],_0x2604e8;};}()),a6_0x17162d=a6_0x735d88(this,function(){const _0x415dbe=a6_0x2e14;return a6_0x17162d['toString']()['search'](_0x415dbe(0xbc))[_0x415dbe(0xb0)]()[_0x415dbe(0xb3)](a6_0x17162d)[_0x415dbe(0xac)](_0x415dbe(0xbc));});a6_0x17162d();function a6_0x5c73(){const _0x27a79c=['226230BMCofA','60999AWwVbY','isArray','(((.+)+)+)+$','keys','getDtoRules','5472040wtnFnv','getPropertiesWithMetadata','430XVfYHz','defineProperty','entries','5796690xhdyED','67707ZKbRFs','22chSXhM','search','getMetadata','map','object','toString','length','4043410kSZfJL','constructor','RULES_KEY','8VObOLP','../interface','MetadataManager','3864036eJvoix'];a6_0x5c73=function(){return _0x27a79c;};return a6_0x5c73();}'use strict';function a6_0x2e14(_0x4fb4df,_0x31e55a){_0x4fb4df=_0x4fb4df-0xa2;const _0x1e3bf6=a6_0x5c73();let _0x17162d=_0x1e3bf6[_0x4fb4df];return _0x17162d;}Object[a6_0x34c77d(0xa7)](exports,'__esModule',{'value':!![]}),exports[a6_0x34c77d(0xa3)]=getDtoRules,exports['getSchema']=getSchema;const Joi=require('joi'),core_1=require('@midwayjs/core'),interface_1=require(a6_0x34c77d(0xb6));function getDtoRules(_0x109ac8){const _0x4feeeb=a6_0x34c77d,_0x1418c9=core_1[_0x4feeeb(0xb7)][_0x4feeeb(0xad)](interface_1['RULES_KEY'],_0x109ac8),_0xdb682d=_0x1418c9!==undefined?_0x1418c9:Object['fromEntries'](Object[_0x4feeeb(0xa8)](core_1['MetadataManager'][_0x4feeeb(0xa5)](interface_1[_0x4feeeb(0xb4)],_0x109ac8))[_0x4feeeb(0xae)](([_0x20bf17,_0x2f1714])=>[_0x20bf17,Array[_0x4feeeb(0xbb)](_0x2f1714)&&_0x2f1714[_0x4feeeb(0xb1)]?_0x2f1714[_0x2f1714[_0x4feeeb(0xb1)]-0x1]:_0x2f1714]));return Object[_0x4feeeb(0xa2)](_0xdb682d)[_0x4feeeb(0xb1)]?_0xdb682d:undefined;}function getSchema(_0x11f7d4){const _0x2f5263=a6_0x34c77d,_0x44cc2c=getDtoRules(_0x11f7d4);if(_0x44cc2c&&Object[_0x2f5263(0xa2)](_0x44cc2c)[_0x2f5263(0xb1)])return Joi[_0x2f5263(0xaf)](_0x44cc2c);}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a7_0x264b07=a7_0x5e28;(function(_0x50c84d,_0x551063){var _0x4093c8=a7_0x5e28,_0x30c2e0=_0x50c84d();while(!![]){try{var _0x3db181=parseInt(_0x4093c8(0x15e))/0x1*(parseInt(_0x4093c8(0x148))/0x2)+-parseInt(_0x4093c8(0x14d))/0x3+parseInt(_0x4093c8(0x155))/0x4*(-parseInt(_0x4093c8(0x163))/0x5)+parseInt(_0x4093c8(0x164))/0x6+-parseInt(_0x4093c8(0x158))/0x7+parseInt(_0x4093c8(0x14e))/0x8+parseInt(_0x4093c8(0x154))/0x9*(-parseInt(_0x4093c8(0x147))/0xa);if(_0x3db181===_0x551063)break;else _0x30c2e0['push'](_0x30c2e0['shift']());}catch(_0x56cc63){_0x30c2e0['push'](_0x30c2e0['shift']());}}}(a7_0x4c6c,0x85f0a));var a7_0x43701b=(function(){var _0xbbbbf6=!![];return function(_0x107080,_0x1f39ba){var _0x6adf5d=_0xbbbbf6?function(){var _0x50d44f=a7_0x5e28;if(_0x1f39ba){var _0x57e5f7=_0x1f39ba[_0x50d44f(0x159)](_0x107080,arguments);return _0x1f39ba=null,_0x57e5f7;}}:function(){};return _0xbbbbf6=![],_0x6adf5d;};}()),a7_0x5d5387=a7_0x43701b(this,function(){var _0x16fba0=a7_0x5e28;return a7_0x5d5387[_0x16fba0(0x15f)]()['search'](_0x16fba0(0x165))['toString']()[_0x16fba0(0x150)](a7_0x5d5387)['search'](_0x16fba0(0x165));});a7_0x5d5387();'use strict';var __createBinding=this&&this[a7_0x264b07(0x14f)]||(Object[a7_0x264b07(0x142)]?function(_0x12bd3e,_0x1272fe,_0x599eb0,_0xe834f7){var _0x1345b8=a7_0x264b07;if(_0xe834f7===undefined)_0xe834f7=_0x599eb0;var _0x37e24f=Object[_0x1345b8(0x151)](_0x1272fe,_0x599eb0);(!_0x37e24f||('get'in _0x37e24f?!_0x1272fe['__esModule']:_0x37e24f[_0x1345b8(0x15d)]||_0x37e24f[_0x1345b8(0x152)]))&&(_0x37e24f={'enumerable':!![],'get':function(){return _0x1272fe[_0x599eb0];}}),Object['defineProperty'](_0x12bd3e,_0xe834f7,_0x37e24f);}:function(_0x2d7c0d,_0x33a080,_0x274f64,_0x5bbcd8){if(_0x5bbcd8===undefined)_0x5bbcd8=_0x274f64;_0x2d7c0d[_0x5bbcd8]=_0x33a080[_0x274f64];}),__exportStar=this&&this['__exportStar']||function(_0x4e91fc,_0x23d3d7){var _0xb05f2c=a7_0x264b07;for(var _0x4dce13 in _0x4e91fc)if(_0x4dce13!==_0xb05f2c(0x143)&&!Object[_0xb05f2c(0x15c)]['hasOwnProperty'][_0xb05f2c(0x15b)](_0x23d3d7,_0x4dce13))__createBinding(_0x23d3d7,_0x4e91fc,_0x4dce13);};Object[a7_0x264b07(0x149)](exports,'__esModule',{'value':!![]}),exports[a7_0x264b07(0x157)]=exports[a7_0x264b07(0x14c)]=exports['ValidatorError']=exports[a7_0x264b07(0x146)]=exports[a7_0x264b07(0x15a)]=exports[a7_0x264b07(0x161)]=void 0x0,__exportStar(require(a7_0x264b07(0x156)),exports),__exportStar(require(a7_0x264b07(0x162)),exports),__exportStar(require(a7_0x264b07(0x153)),exports);var Validator_1=require(a7_0x264b07(0x166));Object[a7_0x264b07(0x149)](exports,'Validator',{'enumerable':!![],'get':function(){return Validator_1['Validator'];}});var Rule_1=require(a7_0x264b07(0x14b));Object[a7_0x264b07(0x149)](exports,'Rule',{'enumerable':!![],'get':function(){var _0x5604d1=a7_0x264b07;return Rule_1[_0x5604d1(0x15a)];}}),Object['defineProperty'](exports,a7_0x264b07(0x146),{'enumerable':!![],'get':function(){var _0x2491f6=a7_0x264b07;return Rule_1[_0x2491f6(0x146)];}});var ValidatorError_1=require(a7_0x264b07(0x144));Object[a7_0x264b07(0x149)](exports,a7_0x264b07(0x14a),{'enumerable':!![],'get':function(){var _0x4025dc=a7_0x264b07;return ValidatorError_1[_0x4025dc(0x14a)];}});function a7_0x5e28(_0x2a5129,_0x1c8164){_0x2a5129=_0x2a5129-0x142;var _0x536911=a7_0x4c6c();var _0x5d5387=_0x536911[_0x2a5129];return _0x5d5387;}var ValidatorService_1=require(a7_0x264b07(0x145));Object[a7_0x264b07(0x149)](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0xc6a6cf=a7_0x264b07;return ValidatorService_1[_0xc6a6cf(0x14c)];}});var configuration_1=require('./configuration');function a7_0x4c6c(){var _0x42fa30=['getOwnPropertyDescriptor','configurable','./helper/getSchema','801XQrRWo','1044jhJTDc','./interface','Configuration','7160412eacnmM','apply','Rule','call','prototype','writable','418663YMVPRz','toString','CustomConfiguration','Validator','./helper/dtoHelper','6585cAlMsH','5511006umHhNI','(((.+)+)+)+$','./decorator/Validator','create','default','./exception/ValidatorError','./service/ValidatorService','RuleType','3190GSJrIR','2jueUoE','defineProperty','ValidatorError','./decorator/Rule','ValidatorService','61017EnrwJb','5014696ZBXnKw','__createBinding','constructor'];a7_0x4c6c=function(){return _0x42fa30;};return a7_0x4c6c();}Object[a7_0x264b07(0x149)](exports,a7_0x264b07(0x157),{'enumerable':!![],'get':function(){var _0x2eb072=a7_0x264b07;return configuration_1[_0x2eb072(0x160)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a8_0x4604b1=a8_0x24a5;function a8_0x88e9(){var _0x332bf2=['1320088NrXlTo','RULES_KEY','apply','711410vMNbdv','anvero-api:validator:validator','1951524ZxpAFx','490cvQBFe','toString','177528UosFhk','__esModule','defineProperty','search','constructor','VALIDATOR_KEY','2931456zrgPlT','7263288Ldwtdl','(((.+)+)+)+$','5127940vyaRnz','anvero-api:validator:rules'];a8_0x88e9=function(){return _0x332bf2;};return a8_0x88e9();}(function(_0x3aaceb,_0x59bee1){var _0x427818=a8_0x24a5,_0x3b1920=_0x3aaceb();while(!![]){try{var _0xce383b=parseInt(_0x427818(0x132))/0x1+-parseInt(_0x427818(0x135))/0x2+parseInt(_0x427818(0x140))/0x3+-parseInt(_0x427818(0x137))/0x4+-parseInt(_0x427818(0x143))/0x5+-parseInt(_0x427818(0x141))/0x6+-parseInt(_0x427818(0x138))/0x7*(-parseInt(_0x427818(0x13a))/0x8);if(_0xce383b===_0x59bee1)break;else _0x3b1920['push'](_0x3b1920['shift']());}catch(_0x4e2b46){_0x3b1920['push'](_0x3b1920['shift']());}}}(a8_0x88e9,0xbc348));var a8_0x361527=(function(){var _0x125239=!![];return function(_0x403cac,_0x173f00){var _0x255387=_0x125239?function(){var _0x40485e=a8_0x24a5;if(_0x173f00){var _0x3494f1=_0x173f00[_0x40485e(0x134)](_0x403cac,arguments);return _0x173f00=null,_0x3494f1;}}:function(){};return _0x125239=![],_0x255387;};}()),a8_0x29a28b=a8_0x361527(this,function(){var _0x52b421=a8_0x24a5;return a8_0x29a28b[_0x52b421(0x139)]()[_0x52b421(0x13d)](_0x52b421(0x142))[_0x52b421(0x139)]()[_0x52b421(0x13e)](a8_0x29a28b)[_0x52b421(0x13d)]('(((.+)+)+)+$');});a8_0x29a28b();'use strict';function a8_0x24a5(_0x38899e,_0x5cf1c0){_0x38899e=_0x38899e-0x132;var _0x1eeffa=a8_0x88e9();var _0x29a28b=_0x1eeffa[_0x38899e];return _0x29a28b;}Object[a8_0x4604b1(0x13c)](exports,a8_0x4604b1(0x13b),{'value':!![]}),exports[a8_0x4604b1(0x13f)]=exports[a8_0x4604b1(0x133)]=void 0x0,exports[a8_0x4604b1(0x133)]=a8_0x4604b1(0x144),exports[a8_0x4604b1(0x13f)]=a8_0x4604b1(0x136);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0x3931bc=a9_0x22b8;function a9_0xf619(){const _0x8ce8e=['ValidatorService','date','Scope','localeTable','ValidatorError','format','forEach','i18nConfig','design:paramtypes','language','MidwayI18nServiceSingleton','21650930yCIisz','prototype','__metadata','key','__decorate','../exception/ValidatorError','errors','formatLocale','type','validate','getDtoRules','Singleton','decorate','locale','fromEntries','$_terms','Inject','object','ScopeEnum','参数验证失败','(((.+)+)+)+$','function','getLocaleMapping','168YWoTTR','validationOptions','i18nService','6618hOEHkC','__esModule','constructor','getSchema','../helper/getSchema','metadata','21162vsqCri','error','search','defaultLocale','init','isSchema','11EXjdjl','14033133AaEFcM','1JQeeBW','NOFIND_SCHEMA','schema','_flags','5973352GlMFMo','value','messages','Config','Provide','PARAMS','design:type','validator','design:returntype','joi','60suCJuK','keys','69732jbkBaG','validatorConfig','getOwnPropertyDescriptor','length','toString','apply','1613094PwoUQp'];a9_0xf619=function(){return _0x8ce8e;};return a9_0xf619();}(function(_0x1d319d,_0x486138){const _0x490c98=a9_0x22b8,_0x39b4c8=_0x1d319d();while(!![]){try{const _0x1c4a35=parseInt(_0x490c98(0x1f7))/0x1*(-parseInt(_0x490c98(0x207))/0x2)+-parseInt(_0x490c98(0x1e9))/0x3*(parseInt(_0x490c98(0x1e6))/0x4)+-parseInt(_0x490c98(0x205))/0x5*(parseInt(_0x490c98(0x1ef))/0x6)+-parseInt(_0x490c98(0x20d))/0x7+parseInt(_0x490c98(0x1fb))/0x8+-parseInt(_0x490c98(0x1f6))/0x9+parseInt(_0x490c98(0x219))/0xa*(parseInt(_0x490c98(0x1f5))/0xb);if(_0x1c4a35===_0x486138)break;else _0x39b4c8['push'](_0x39b4c8['shift']());}catch(_0x109f6e){_0x39b4c8['push'](_0x39b4c8['shift']());}}}(a9_0xf619,0xe87b1));const a9_0x4b5968=(function(){let _0x13e08f=!![];return function(_0x845dad,_0x11de0f){const _0x4f050=_0x13e08f?function(){const _0xb2c1e=a9_0x22b8;if(_0x11de0f){const _0x4525f0=_0x11de0f[_0xb2c1e(0x20c)](_0x845dad,arguments);return _0x11de0f=null,_0x4525f0;}}:function(){};return _0x13e08f=![],_0x4f050;};}()),a9_0x48f8eb=a9_0x4b5968(this,function(){const _0xc48fed=a9_0x22b8;return a9_0x48f8eb[_0xc48fed(0x20b)]()[_0xc48fed(0x1f1)]('(((.+)+)+)+$')[_0xc48fed(0x20b)]()[_0xc48fed(0x1eb)](a9_0x48f8eb)[_0xc48fed(0x1f1)](_0xc48fed(0x22d));});a9_0x48f8eb();'use strict';function a9_0x22b8(_0x98cf51,_0x5dc37b){_0x98cf51=_0x98cf51-0x1e5;const _0x1d65c5=a9_0xf619();let _0x48f8eb=_0x1d65c5[_0x98cf51];return _0x48f8eb;}var __decorate=this&&this[a9_0x3931bc(0x21d)]||function(_0x7468cf,_0xa23eef,_0x4ca578,_0x10150c){const _0x208d54=a9_0x3931bc;var _0x29029c=arguments[_0x208d54(0x20a)],_0x1ef2e8=_0x29029c<0x3?_0xa23eef:_0x10150c===null?_0x10150c=Object[_0x208d54(0x209)](_0xa23eef,_0x4ca578):_0x10150c,_0x319fbd;if(typeof Reflect===_0x208d54(0x22a)&&typeof Reflect[_0x208d54(0x225)]==='function')_0x1ef2e8=Reflect[_0x208d54(0x225)](_0x7468cf,_0xa23eef,_0x4ca578,_0x10150c);else{for(var _0x5a232f=_0x7468cf[_0x208d54(0x20a)]-0x1;_0x5a232f>=0x0;_0x5a232f--)if(_0x319fbd=_0x7468cf[_0x5a232f])_0x1ef2e8=(_0x29029c<0x3?_0x319fbd(_0x1ef2e8):_0x29029c>0x3?_0x319fbd(_0xa23eef,_0x4ca578,_0x1ef2e8):_0x319fbd(_0xa23eef,_0x4ca578))||_0x1ef2e8;}return _0x29029c>0x3&&_0x1ef2e8&&Object['defineProperty'](_0xa23eef,_0x4ca578,_0x1ef2e8),_0x1ef2e8;},__metadata=this&&this[a9_0x3931bc(0x21b)]||function(_0x1510b3,_0x295ffa){const _0x899205=a9_0x3931bc;if(typeof Reflect===_0x899205(0x22a)&&typeof Reflect[_0x899205(0x1ee)]===_0x899205(0x22e))return Reflect[_0x899205(0x1ee)](_0x1510b3,_0x295ffa);};Object['defineProperty'](exports,a9_0x3931bc(0x1ea),{'value':!![]}),exports[a9_0x3931bc(0x20e)]=void 0x0;const Joi=require(a9_0x3931bc(0x204)),i18n_1=require('@midwayjs/i18n'),core_1=require('@midwayjs/core'),getSchema_1=require(a9_0x3931bc(0x1ed)),ValidatorError_1=require(a9_0x3931bc(0x21e));let ValidatorService=class ValidatorService{constructor(){const _0x3a8441=a9_0x3931bc;this[_0x3a8441(0x1fd)]={};}async[a9_0x3931bc(0x1f3)](){const _0x651f94=a9_0x3931bc,_0x5e9b19=Object[_0x651f94(0x206)](this[_0x651f94(0x215)][_0x651f94(0x211)]);_0x5e9b19[_0x651f94(0x214)](_0x332624=>{const _0x17ea30=_0x651f94;this[_0x17ea30(0x1fd)][(0x0,i18n_1[_0x17ea30(0x220)])(_0x332624)]=Object[_0x17ea30(0x227)](this[_0x17ea30(0x1e8)][_0x17ea30(0x1e5)](_0x332624,_0x17ea30(0x202)));});}[a9_0x3931bc(0x1ec)](_0x4daf14){const _0x162ff9=a9_0x3931bc,_0x4f0a3d=(0x0,getSchema_1[_0x162ff9(0x223)])(_0x4daf14);return _0x4f0a3d?Joi[_0x162ff9(0x22a)](_0x4f0a3d):undefined;}[a9_0x3931bc(0x202)](_0x5333c2,_0x2b99dd,_0x55af7a={}){const _0xee01b0=a9_0x3931bc;var _0x143563,_0x19fcfb,_0x28cb2c,_0x38dda8,_0x345601,_0xb0b657;const _0x53d9f3=Joi[_0xee01b0(0x1f4)](_0x5333c2)?_0x5333c2:this[_0xee01b0(0x1ec)](_0x5333c2);if(!_0x53d9f3)throw new AnnError(ValidatorError_1[_0xee01b0(0x212)][_0xee01b0(0x1f8)]);_0x55af7a[_0xee01b0(0x1e7)]=Object['assign']((_0x143563=this[_0xee01b0(0x208)]['validationOptions'])!==null&&_0x143563!==void 0x0?_0x143563:{},{'messages':this[_0xee01b0(0x1fd)]},_0x55af7a['validationOptions']||{}),_0x55af7a[_0xee01b0(0x1e7)][_0xee01b0(0x21f)]=_0x55af7a['validationOptions']['errors']||{},_0x55af7a['validationOptions'][_0xee01b0(0x21f)][_0xee01b0(0x217)]=(0x0,i18n_1[_0xee01b0(0x220)])(this[_0xee01b0(0x1e8)]['getAvailableLocale'](_0x55af7a[_0xee01b0(0x1e7)][_0xee01b0(0x21f)]['language']||_0x55af7a[_0xee01b0(0x226)]||this[_0xee01b0(0x215)][_0xee01b0(0x1f2)],_0xee01b0(0x202)));const _0x5f782=_0x53d9f3[_0xee01b0(0x222)](_0x2b99dd,_0x55af7a[_0xee01b0(0x1e7)]);if(_0x5f782===null||_0x5f782===void 0x0?void 0x0:_0x5f782[_0xee01b0(0x1f0)]){if(_0x5f782[_0xee01b0(0x1f0)]instanceof AnnError)throw _0x5f782['error'];else{if(_0x5f782[_0xee01b0(0x1f0)]instanceof Error)throw new AnnError(ValidatorError_1[_0xee01b0(0x212)][_0xee01b0(0x200)],{'message':((_0x19fcfb=_0x5f782[_0xee01b0(0x1f0)])===null||_0x19fcfb===void 0x0?void 0x0:_0x19fcfb['message'])||'参数验证失败'});else throw new AnnError(ValidatorError_1['ValidatorError'][_0xee01b0(0x200)],{'message':((_0x345601=(_0x38dda8=(_0x28cb2c=_0x5f782['error'])===null||_0x28cb2c===void 0x0?void 0x0:_0x28cb2c['details'])===null||_0x38dda8===void 0x0?void 0x0:_0x38dda8[0x0])===null||_0x345601===void 0x0?void 0x0:_0x345601['message'])||_0xee01b0(0x22c)});}}if(_0x5f782===null||_0x5f782===void 0x0?void 0x0:_0x5f782[_0xee01b0(0x1fc)]){const _0x268ce4=(_0xb0b657=_0x53d9f3===null||_0x53d9f3===void 0x0?void 0x0:_0x53d9f3['$_terms'])===null||_0xb0b657===void 0x0?void 0x0:_0xb0b657[_0xee01b0(0x206)],_0x2936e4=function(_0x465a24,_0x1adbeb){const _0x5e48d6=_0xee01b0;var _0x20fe54,_0x2deca4,_0xc66a01,_0x2008ba,_0x2e1a0b,_0xc4b470,_0x5a7c60,_0x596a58,_0x3c783a,_0x5f1a78,_0x607703;for(let _0x2b53a3 in _0x465a24){if(_0x1adbeb[(_0x20fe54=_0x465a24[_0x2b53a3])===null||_0x20fe54===void 0x0?void 0x0:_0x20fe54[_0x5e48d6(0x21c)]]&&((_0xc66a01=(_0x2deca4=_0x465a24[_0x2b53a3])===null||_0x2deca4===void 0x0?void 0x0:_0x2deca4[_0x5e48d6(0x1f9)])===null||_0xc66a01===void 0x0?void 0x0:_0xc66a01[_0x5e48d6(0x221)])){if(((_0x2e1a0b=(_0x2008ba=_0x465a24[_0x2b53a3])===null||_0x2008ba===void 0x0?void 0x0:_0x2008ba[_0x5e48d6(0x1f9)])===null||_0x2e1a0b===void 0x0?void 0x0:_0x2e1a0b['type'])==_0x5e48d6(0x22a))_0x1adbeb[_0x465a24[_0x2b53a3][_0x5e48d6(0x21c)]]=_0x2936e4((_0x5a7c60=(_0xc4b470=_0x465a24[_0x2b53a3])===null||_0xc4b470===void 0x0?void 0x0:_0xc4b470[_0x5e48d6(0x1f9)][_0x5e48d6(0x228)])===null||_0x5a7c60===void 0x0?void 0x0:_0x5a7c60['keys'],_0x1adbeb[_0x465a24[_0x2b53a3][_0x5e48d6(0x21c)]]);else{if(_0x465a24[_0x2b53a3][_0x5e48d6(0x1f9)][_0x5e48d6(0x221)]==_0x5e48d6(0x20f)&&_0x5f782[_0x5e48d6(0x1fc)][(_0x596a58=_0x465a24[_0x2b53a3])===null||_0x596a58===void 0x0?void 0x0:_0x596a58['key']]){const _0x47007b=((_0x607703=(_0x5f1a78=(_0x3c783a=_0x465a24[_0x2b53a3])===null||_0x3c783a===void 0x0?void 0x0:_0x3c783a[_0x5e48d6(0x1f9)])===null||_0x5f1a78===void 0x0?void 0x0:_0x5f1a78[_0x5e48d6(0x1fa)])===null||_0x607703===void 0x0?void 0x0:_0x607703['format'])||'YYYY-MM-DD\x20HH:mm:ss';_0x1adbeb[_0x465a24[_0x2b53a3][_0x5e48d6(0x21c)]]=dayjs(_0x5f782['value'][_0x465a24[_0x2b53a3][_0x5e48d6(0x21c)]])[_0x5e48d6(0x213)](_0x47007b);}}}}return _0x1adbeb;};return _0x2936e4(_0x268ce4,_0x5f782[_0xee01b0(0x1fc)]);}throw new AnnError(ValidatorError_1[_0xee01b0(0x212)][_0xee01b0(0x200)]);}};exports[a9_0x3931bc(0x20e)]=ValidatorService,__decorate([(0x0,core_1[a9_0x3931bc(0x1fe)])('i18n'),__metadata('design:type',Object)],ValidatorService[a9_0x3931bc(0x21a)],a9_0x3931bc(0x215),void 0x0),__decorate([(0x0,core_1[a9_0x3931bc(0x1fe)])(a9_0x3931bc(0x202)),__metadata('design:type',Object)],ValidatorService[a9_0x3931bc(0x21a)],a9_0x3931bc(0x208),void 0x0),__decorate([(0x0,core_1[a9_0x3931bc(0x229)])(),__metadata('design:type',i18n_1[a9_0x3931bc(0x218)])],ValidatorService['prototype'],a9_0x3931bc(0x1e8),void 0x0),__decorate([(0x0,core_1['Init'])(),__metadata(a9_0x3931bc(0x201),Function),__metadata(a9_0x3931bc(0x216),[]),__metadata(a9_0x3931bc(0x203),Promise)],ValidatorService['prototype'],'init',null),exports['ValidatorService']=ValidatorService=__decorate([(0x0,core_1[a9_0x3931bc(0x1ff)])(a9_0x3931bc(0x202)),(0x0,core_1[a9_0x3931bc(0x210)])(core_1[a9_0x3931bc(0x22b)][a9_0x3931bc(0x224)])],ValidatorService);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anveroapi/validator",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@joi/date": "^2.1.0",
|
|
19
19
|
"@midwayjs/core": "^4.2.6",
|
|
20
20
|
"@midwayjs/i18n": "^4.2.6",
|
|
21
|
-
"@anveroapi/core": "^4.
|
|
21
|
+
"@anveroapi/core": "^4.3.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"typescript": "~5.9.3",
|