@anveroapi/validator 4.3.1 → 4.3.3
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
|
-
function
|
|
1
|
+
function a0_0x108e(_0x37b71e,_0x3e3d1f){_0x37b71e=_0x37b71e-0x12a;const _0x457625=a0_0x8bab();let _0x498b94=_0x457625[_0x37b71e];return _0x498b94;}function a0_0x8bab(){const _0x598e11=['2824ITNeJm','string','constructor','187900uFbpZZ','PARAMS','265797vJwYtt','../../locales/en_US.json','2OKXLJd','25216KlZsOU','(((.+)+)+)+$','7OUztuG','__esModule','477iDttsn','ValidatorError','44wSLVIx','search','../exception/ValidatorError','11865INNzjS','toString','2179MgFqLT','default','77034kohLqW'];a0_0x8bab=function(){return _0x598e11;};return a0_0x8bab();}const a0_0x767366=a0_0x108e;(function(_0x1ae845,_0x376c49){const _0x5cff41=a0_0x108e,_0x4f2ba8=_0x1ae845();while(!![]){try{const _0x21e240=parseInt(_0x5cff41(0x12f))/0x1*(parseInt(_0x5cff41(0x139))/0x2)+parseInt(_0x5cff41(0x137))/0x3+-parseInt(_0x5cff41(0x13a))/0x4+-parseInt(_0x5cff41(0x12d))/0x5+parseInt(_0x5cff41(0x131))/0x6*(parseInt(_0x5cff41(0x13c))/0x7)+-parseInt(_0x5cff41(0x132))/0x8*(-parseInt(_0x5cff41(0x13e))/0x9)+parseInt(_0x5cff41(0x135))/0xa*(parseInt(_0x5cff41(0x12a))/0xb);if(_0x21e240===_0x376c49)break;else _0x4f2ba8['push'](_0x4f2ba8['shift']());}catch(_0x2487cc){_0x4f2ba8['push'](_0x4f2ba8['shift']());}}}(a0_0x8bab,0x2e189));const a0_0x162120=(function(){let _0x23827c=!![];return function(_0x2a3d97,_0x58acdb){const _0x8cf6d0=_0x23827c?function(){if(_0x58acdb){const _0x1f916a=_0x58acdb['apply'](_0x2a3d97,arguments);return _0x58acdb=null,_0x1f916a;}}:function(){};return _0x23827c=![],_0x8cf6d0;};}()),a0_0x498b94=a0_0x162120(this,function(){const _0x1c46b5=a0_0x108e;return a0_0x498b94[_0x1c46b5(0x12e)]()[_0x1c46b5(0x12b)](_0x1c46b5(0x13b))[_0x1c46b5(0x12e)]()[_0x1c46b5(0x134)](a0_0x498b94)[_0x1c46b5(0x12b)]('(((.+)+)+)+$');});a0_0x498b94();'use strict';Object['defineProperty'](exports,a0_0x767366(0x13d),{'value':!![]});const ValidatorError_1=require(a0_0x767366(0x12c));exports[a0_0x767366(0x130)]={'validator':{'errorStatus':ValidatorError_1[a0_0x767366(0x13f)][a0_0x767366(0x136)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x767366(0x133)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x767366(0x138))},'zh_CN':{'validator':require('../../locales/zh_CN.json')}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a1_0x4e43(_0x58d326,_0x3d8e1c){_0x58d326=_0x58d326-0xc3;const _0x1f5c8b=a1_0x578a();let _0x5e8937=_0x1f5c8b[_0x58d326];return _0x5e8937;}const a1_0x41dfdc=a1_0x4e43;function a1_0x578a(){const _0x22296a=['request','methodArgs','@anveroapi/core','param','query','__decorate','244oCzWBZ','@midwayjs/i18n','res','defineProperty','assign','toString','metadata','constructor','validator','length','locale','./interface','args','428049DRDECz','(((.+)+)+)+$','target','getOwnMetadata','body','function','Inject','method','989643ueblrD','4053217bkMkEP','CustomConfiguration','anvero-api:validator','params','__metadata','53877znjvuO','object','getOwnPropertyDescriptor','Configuration','MidwayDecoratorService','prototype','689970EmeFat','I18N_ATTR_KEY','decorator','@midwayjs/core','search','decorate','getAttr','design:type','1264168JBELvq','36vAGxGM','ValidatorService','2526674LIkQqb','getSchema','undefined','MetadataManager'];a1_0x578a=function(){return _0x22296a;};return a1_0x578a();}(function(_0x3c69e2,_0x2f0a3b){const _0x1606a5=a1_0x4e43,_0x196459=_0x3c69e2();while(!![]){try{const _0x1d66cb=parseInt(_0x1606a5(0xf3))/0x1+-parseInt(_0x1606a5(0xd4))/0x2+-parseInt(_0x1606a5(0xc3))/0x3*(-parseInt(_0x1606a5(0xde))/0x4)+parseInt(_0x1606a5(0xc9))/0x5*(-parseInt(_0x1606a5(0xd2))/0x6)+parseInt(_0x1606a5(0xf4))/0x7+parseInt(_0x1606a5(0xd1))/0x8+-parseInt(_0x1606a5(0xeb))/0x9;if(_0x1d66cb===_0x2f0a3b)break;else _0x196459['push'](_0x196459['shift']());}catch(_0x2e0937){_0x196459['push'](_0x196459['shift']());}}}(a1_0x578a,0xa6d44));const a1_0x286a96=(function(){let _0x11ac35=!![];return function(_0x604541,_0x1b4a8a){const _0x23bd8c=_0x11ac35?function(){if(_0x1b4a8a){const _0x2ee9a9=_0x1b4a8a['apply'](_0x604541,arguments);return _0x1b4a8a=null,_0x2ee9a9;}}:function(){};return _0x11ac35=![],_0x23bd8c;};}()),a1_0x5e8937=a1_0x286a96(this,function(){const _0x42361d=a1_0x4e43;return a1_0x5e8937['toString']()[_0x42361d(0xcd)](_0x42361d(0xec))[_0x42361d(0xe3)]()[_0x42361d(0xe5)](a1_0x5e8937)['search'](_0x42361d(0xec));});a1_0x5e8937();'use strict';var __decorate=this&&this[a1_0x41dfdc(0xdd)]||function(_0x333bb1,_0x4da98e,_0x50079a,_0x45b251){const _0xb5c5dc=a1_0x41dfdc;var _0x1f94ef=arguments['length'],_0x51af40=_0x1f94ef<0x3?_0x4da98e:_0x45b251===null?_0x45b251=Object[_0xb5c5dc(0xc5)](_0x4da98e,_0x50079a):_0x45b251,_0xc3cdfb;if(typeof Reflect===_0xb5c5dc(0xc4)&&typeof Reflect[_0xb5c5dc(0xce)]==='function')_0x51af40=Reflect['decorate'](_0x333bb1,_0x4da98e,_0x50079a,_0x45b251);else{for(var _0x4b768e=_0x333bb1[_0xb5c5dc(0xe7)]-0x1;_0x4b768e>=0x0;_0x4b768e--)if(_0xc3cdfb=_0x333bb1[_0x4b768e])_0x51af40=(_0x1f94ef<0x3?_0xc3cdfb(_0x51af40):_0x1f94ef>0x3?_0xc3cdfb(_0x4da98e,_0x50079a,_0x51af40):_0xc3cdfb(_0x4da98e,_0x50079a))||_0x51af40;}return _0x1f94ef>0x3&&_0x51af40&&Object[_0xb5c5dc(0xe1)](_0x4da98e,_0x50079a,_0x51af40),_0x51af40;},__metadata=this&&this[a1_0x41dfdc(0xf8)]||function(_0x621401,_0x33a533){const _0x4e44ff=a1_0x41dfdc;if(typeof Reflect==='object'&&typeof Reflect[_0x4e44ff(0xe4)]===_0x4e44ff(0xf0))return Reflect[_0x4e44ff(0xe4)](_0x621401,_0x33a533);};Object[a1_0x41dfdc(0xe1)](exports,'__esModule',{'value':!![]}),exports[a1_0x41dfdc(0xf5)]=void 0x0;const i18n_1=require(a1_0x41dfdc(0xdf)),core_1=require(a1_0x41dfdc(0xcc)),core_2=require(a1_0x41dfdc(0xcc)),interface_1=require(a1_0x41dfdc(0xe9)),ValidatorService_1=require('./service/ValidatorService'),i18n=require('@midwayjs/i18n'),anvero=require(a1_0x41dfdc(0xda)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x3f64b7=a1_0x41dfdc;this[_0x3f64b7(0xcb)]['registerMethodHandler'](interface_1['VALIDATOR_KEY'],_0x2f4f65=>{const _0x262753=_0x3f64b7,_0x5965fa=_0x2f4f65[_0x262753(0xe4)],_0x2b4651=core_2['MetadataManager']['getMethodParamTypes'](_0x2f4f65[_0x262753(0xed)],_0x2f4f65['propertyName']);return{'before':_0x3483a0=>{const _0x495b21=_0x262753;var _0x5b39d6,_0x5bbe17,_0x424f97,_0x25c9bd,_0x32c3a7,_0x27eb15,_0x1ba0ac;const _0x5539f2=_0x3483a0[_0x495b21(0xed)][core_1['REQUEST_OBJ_CTX_KEY']],_0x4c04cd=Object[_0x495b21(0xe2)]({},((_0x5b39d6=_0x5539f2===null||_0x5539f2===void 0x0?void 0x0:_0x5539f2[_0x495b21(0xd8)])===null||_0x5b39d6===void 0x0?void 0x0:_0x5b39d6[_0x495b21(0xdc)])||{},((_0x5bbe17=_0x5539f2===null||_0x5539f2===void 0x0?void 0x0:_0x5539f2[_0x495b21(0xd8)])===null||_0x5bbe17===void 0x0?void 0x0:_0x5bbe17[_0x495b21(0xef)])||{}),_0x284f67=(core_2[_0x495b21(0xd7)][_0x495b21(0xee)](interface_1['VALIDATOR_KEY'],_0x3483a0[_0x495b21(0xed)])||[])['find'](_0x45e6f4=>_0x45e6f4[_0x495b21(0xf2)]==_0x3483a0['methodName']);!(_0x5965fa===null||_0x5965fa===void 0x0?void 0x0:_0x5965fa[_0x495b21(0xe8)])&&_0x5539f2&&_0x5539f2[_0x495b21(0xcf)]&&(_0x5965fa['locale']=_0x5539f2['getAttr'](i18n_1[_0x495b21(0xca)]));for(let _0x269505=0x0;_0x269505<_0x2b4651[_0x495b21(0xe7)];_0x269505++){const _0x31a284=_0x2b4651[_0x269505],_0x113dca=this[_0x495b21(0xd3)][_0x495b21(0xd5)](_0x31a284);if(_0x113dca){(typeof _0x3483a0[_0x495b21(0xea)][_0x269505]=='undefined'||typeof _0x3483a0[_0x495b21(0xea)][_0x269505]==_0x495b21(0xf0)||((_0x424f97=_0x3483a0[_0x495b21(0xea)][_0x269505])===null||_0x424f97===void 0x0?void 0x0:_0x424f97[_0x495b21(0xd8)])&&((_0x25c9bd=_0x3483a0['args'][_0x269505])===null||_0x25c9bd===void 0x0?void 0x0:_0x25c9bd[_0x495b21(0xe0)])&&((_0x32c3a7=_0x3483a0[_0x495b21(0xea)][_0x269505])===null||_0x32c3a7===void 0x0?void 0x0:_0x32c3a7['req']))&&(_0x3483a0[_0x495b21(0xea)][_0x269505]=_0x4c04cd);const _0x7e6450=this[_0x495b21(0xd3)][_0x495b21(0xe6)](_0x113dca,_0x3483a0[_0x495b21(0xea)][_0x269505],_0x5965fa);_0x7e6450&&(_0x3483a0[_0x495b21(0xea)][_0x269505]=_0x7e6450);}else(_0x284f67===null||_0x284f67===void 0x0?void 0x0:_0x284f67[_0x495b21(0xd9)][_0x269505])&&typeof((_0x27eb15=_0x5539f2===null||_0x5539f2===void 0x0?void 0x0:_0x5539f2[_0x495b21(0xf7)])===null||_0x27eb15===void 0x0?void 0x0:_0x27eb15[_0x284f67[_0x495b21(0xd9)][_0x269505]])!=_0x495b21(0xd6)&&(_0x3483a0[_0x495b21(0xea)][_0x269505]=typeof((_0x1ba0ac=_0x3483a0[_0x495b21(0xea)][_0x269505])===null||_0x1ba0ac===void 0x0?void 0x0:_0x1ba0ac[_0x495b21(0xdb)])==_0x495b21(0xf0)?_0x31a284(_0x5539f2['params'][_0x284f67[_0x495b21(0xd9)][_0x269505]]):_0x5539f2[_0x495b21(0xf7)][_0x284f67[_0x495b21(0xd9)][_0x269505]]);}},'afterThrow':(_0x258f21,_0x4735a2)=>{throw _0x4735a2;}};});}};exports[a1_0x41dfdc(0xf5)]=CustomConfiguration,__decorate([(0x0,core_2[a1_0x41dfdc(0xf1)])(),__metadata(a1_0x41dfdc(0xd0),core_1[a1_0x41dfdc(0xc7)])],CustomConfiguration['prototype'],a1_0x41dfdc(0xcb),void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x41dfdc(0xd0),ValidatorService_1[a1_0x41dfdc(0xd3)])],CustomConfiguration[a1_0x41dfdc(0xc8)],a1_0x41dfdc(0xd3),void 0x0),exports['CustomConfiguration']=CustomConfiguration=__decorate([(0x0,core_2[a1_0x41dfdc(0xc6)])({'imports':[i18n,anvero],'namespace':a1_0x41dfdc(0xf6),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a2_0x246a(_0x4df1fc,_0xbda3f9){_0x4df1fc=_0x4df1fc-0x185;const _0x1009ad=a2_0x39cd();let _0x51db74=_0x1009ad[_0x4df1fc];return _0x51db74;}const a2_0x331726=a2_0x246a;(function(_0x445816,_0x2805b6){const _0x28dc58=a2_0x246a,_0xb89fd0=_0x445816();while(!![]){try{const _0x8a54f0=-parseInt(_0x28dc58(0x189))/0x1+parseInt(_0x28dc58(0x198))/0x2+-parseInt(_0x28dc58(0x196))/0x3+parseInt(_0x28dc58(0x186))/0x4+parseInt(_0x28dc58(0x195))/0x5+parseInt(_0x28dc58(0x1a8))/0x6+parseInt(_0x28dc58(0x18a))/0x7*(parseInt(_0x28dc58(0x18f))/0x8);if(_0x8a54f0===_0x2805b6)break;else _0xb89fd0['push'](_0xb89fd0['shift']());}catch(_0xb91207){_0xb89fd0['push'](_0xb89fd0['shift']());}}}(a2_0x39cd,0xe4782));const a2_0x5477b5=(function(){let _0x158e43=!![];return function(_0x4daba0,_0x48073f){const _0x539d49=_0x158e43?function(){const _0x4de74a=a2_0x246a;if(_0x48073f){const _0x5280f8=_0x48073f[_0x4de74a(0x194)](_0x4daba0,arguments);return _0x48073f=null,_0x5280f8;}}:function(){};return _0x158e43=![],_0x539d49;};}()),a2_0x51db74=a2_0x5477b5(this,function(){const _0x5565fa=a2_0x246a;return a2_0x51db74[_0x5565fa(0x19c)]()[_0x5565fa(0x18d)]('(((.+)+)+)+$')[_0x5565fa(0x19c)]()['constructor'](a2_0x51db74)[_0x5565fa(0x18d)](_0x5565fa(0x1a7));});a2_0x51db74();'use strict';Object['defineProperty'](exports,a2_0x331726(0x19d),{'value':!![]}),exports['RuleType']=void 0x0,exports[a2_0x331726(0x1a3)]=Rule;const joi=require(a2_0x331726(0x193)),date_1=require(a2_0x331726(0x1a4)),core_1=require(a2_0x331726(0x1a5)),interface_1=require(a2_0x331726(0x1a9));exports[a2_0x331726(0x187)]=joi[a2_0x331726(0x18b)](date_1[a2_0x331726(0x18c)]);function a2_0x39cd(){const _0x1d3c7e=['array','24BqJmfL','getPropertyType','getOwnMetadata','items','joi','apply','3507650yDvJIa','5096496nejoRx','transformTypeFromTSDesign','183932fWmhdN','map','name','label','toString','__esModule','keys','Array','attachMetadata','RULES_KEY','defineMetadata','Rule','@joi/date','@midwayjs/core','meta','(((.+)+)+)+$','7373070XpKIfx','../interface','isSchema','description','function','6758072kHipNh','RuleType','MetadataManager','1212949VIBYmU','316708nVrAkj','extend','default','search'];a2_0x39cd=function(){return _0x1d3c7e;};return a2_0x39cd();}function Rule(_0x436293,_0x16855d,_0x38b592=''){return(_0x1dcaae,_0x583d51)=>{const _0x5cde22=a2_0x246a;var _0x1c58e8;if(_0x583d51)!joi[_0x5cde22(0x1aa)](_0x16855d)&&(_0x16855d===null||_0x16855d===void 0x0?void 0x0:_0x16855d[_0x5cde22(0x19a)])&&(_0x16855d=joi['object'](core_1[_0x5cde22(0x188)][_0x5cde22(0x191)](interface_1[_0x5cde22(0x1a1)],_0x16855d))[_0x5cde22(0x1a6)]({'id':_0x16855d[_0x5cde22(0x19a)]}),core_1[_0x5cde22(0x188)][_0x5cde22(0x197)](core_1['MetadataManager'][_0x5cde22(0x190)](_0x1dcaae,_0x583d51))[_0x5cde22(0x19a)]===_0x5cde22(0x19f)&&(_0x16855d=joi[_0x5cde22(0x18e)]()[_0x5cde22(0x192)](_0x16855d))),joi['isSchema'](_0x16855d)&&(_0x436293&&typeof(_0x16855d===null||_0x16855d===void 0x0?void 0x0:_0x16855d[_0x5cde22(0x19b)])==_0x5cde22(0x185)&&(_0x16855d=_0x16855d[_0x5cde22(0x19b)](_0x436293)),_0x38b592&&typeof(_0x16855d===null||_0x16855d===void 0x0?void 0x0:_0x16855d['description'])==_0x5cde22(0x185)&&(_0x16855d=_0x16855d[_0x5cde22(0x1ab)](_0x38b592)),core_1['MetadataManager'][_0x5cde22(0x1a0)](interface_1['RULES_KEY'],_0x16855d,_0x1dcaae,_0x583d51));else{const _0x17e410=core_1['MetadataManager']['getOwnMetadata'](interface_1[_0x5cde22(0x1a1)],_0x16855d);if(_0x17e410){let _0x1e4197=(_0x1c58e8=core_1[_0x5cde22(0x188)]['getOwnMetadata'](interface_1[_0x5cde22(0x1a1)],_0x1dcaae))!==null&&_0x1c58e8!==void 0x0?_0x1c58e8:{};Object[_0x5cde22(0x19e)](_0x17e410)[_0x5cde22(0x199)](_0x2d8978=>{!_0x1e4197[_0x2d8978]&&(_0x1e4197[_0x2d8978]=_0x17e410[_0x2d8978]);}),core_1[_0x5cde22(0x188)][_0x5cde22(0x1a2)](interface_1[_0x5cde22(0x1a1)],_0x1e4197,_0x1dcaae);}}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x31bb1a=a3_0x206d;(function(_0xc1bc7d,_0x94e74e){const _0x24d6f4=a3_0x206d,_0x1ceddb=_0xc1bc7d();while(!![]){try{const _0x43653d=-parseInt(_0x24d6f4(0x1a5))/0x1*(parseInt(_0x24d6f4(0x19e))/0x2)+parseInt(_0x24d6f4(0x1a1))/0x3+parseInt(_0x24d6f4(0x19d))/0x4+parseInt(_0x24d6f4(0x1ac))/0x5+parseInt(_0x24d6f4(0x1a6))/0x6*(-parseInt(_0x24d6f4(0x1a4))/0x7)+parseInt(_0x24d6f4(0x1a0))/0x8*(parseInt(_0x24d6f4(0x1af))/0x9)+parseInt(_0x24d6f4(0x19f))/0xa;if(_0x43653d===_0x94e74e)break;else _0x1ceddb['push'](_0x1ceddb['shift']());}catch(_0x3901f9){_0x1ceddb['push'](_0x1ceddb['shift']());}}}(a3_0x47f4,0xabee8));const a3_0xd604ec=(function(){let _0x5baf0d=!![];return function(_0x24a587,_0x31c6fa){const _0x12edc6=_0x5baf0d?function(){if(_0x31c6fa){const _0x2c0a72=_0x31c6fa['apply'](_0x24a587,arguments);return _0x31c6fa=null,_0x2c0a72;}}:function(){};return _0x5baf0d=![],_0x12edc6;};}()),a3_0x95151b=a3_0xd604ec(this,function(){const _0x278028=a3_0x206d;return a3_0x95151b[_0x278028(0x1b3)]()[_0x278028(0x1b1)]('(((.+)+)+)+$')['toString']()[_0x278028(0x1a2)](a3_0x95151b)['search'](_0x278028(0x1b6));});a3_0x95151b();'use strict';Object[a3_0x31bb1a(0x1aa)](exports,a3_0x31bb1a(0x1b4),{'value':!![]}),exports['Validator']=Validator,exports[a3_0x31bb1a(0x1b5)]=getFuncArgs;function a3_0x47f4(){const _0x1d6686=['VALIDATOR_KEY','search','indexOf','toString','__esModule','getFuncArgs','(((.+)+)+)+$','904436FlCWAH','6aaUXQX','4237200JMOYGY','217256fSIsEZ','753165xGfXcX','constructor','MetadataManager','1312885ErxyUU','152783nKCSEs','36GMsoeY','replace','createCustomMethodDecorator','../interface','defineProperty','function','6391995fuUjJT','slice','DecoratorManager','36tnLXfK'];a3_0x47f4=function(){return _0x1d6686;};return a3_0x47f4();}function a3_0x206d(_0x759245,_0x4cc4ef){_0x759245=_0x759245-0x19d;const _0x515b30=a3_0x47f4();let _0x95151b=_0x515b30[_0x759245];return _0x95151b;}const core_1=require('@midwayjs/core'),interface_1=require(a3_0x31bb1a(0x1a9));function Validator(_0x2496b6={}){return(_0x36a266,_0x205f74,_0x5f5a5e)=>{const _0xd83ac7=a3_0x206d,_0x55ede1=getFuncArgs(_0x36a266[_0x205f74]);core_1[_0xd83ac7(0x1a3)]['attachMetadata'](interface_1[_0xd83ac7(0x1b0)],{'method':_0x205f74,'methodArgs':_0x55ede1},_0x36a266),core_1[_0xd83ac7(0x1ae)][_0xd83ac7(0x1a8)](interface_1[_0xd83ac7(0x1b0)],_0x2496b6)(_0x36a266,_0x205f74,_0x5f5a5e);};}function getFuncArgs(_0x1feda6){const _0x21a367=a3_0x31bb1a;if(typeof _0x1feda6==_0x21a367(0x1ab)){const _0x5e7bc0=/=>.*$/mg,_0xd6a973=/=[^,)]+/mg,_0x37d755=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x28690d=(_0x1feda6['prototype']?_0x1feda6['prototype'][_0x21a367(0x1a2)][_0x21a367(0x1b3)]():_0x1feda6['toString']())[_0x21a367(0x1a7)](_0x37d755,'')[_0x21a367(0x1a7)](_0x5e7bc0,'')[_0x21a367(0x1a7)](_0xd6a973,''),_0x5c340f=_0x28690d[_0x21a367(0x1ad)](_0x28690d[_0x21a367(0x1b2)]('(')+0x1,_0x28690d[_0x21a367(0x1b2)](')'))['match'](/([^\s,]+)/g)||[];return _0x5c340f;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x21d223=a4_0xe10a;function a4_0xe10a(_0x4ecdac,_0x2bee2a){_0x4ecdac=_0x4ecdac-0xee;var _0x70d773=a4_0x1a62();var _0x4a7164=_0x70d773[_0x4ecdac];return _0x4a7164;}(function(_0x251c23,_0x1262f2){var _0x6a2124=a4_0xe10a,_0x5ddd6b=_0x251c23();while(!![]){try{var _0x4cc0b2=parseInt(_0x6a2124(0xf1))/0x1*(parseInt(_0x6a2124(0xf8))/0x2)+-parseInt(_0x6a2124(0xf4))/0x3+-parseInt(_0x6a2124(0x109))/0x4+-parseInt(_0x6a2124(0xf5))/0x5*(parseInt(_0x6a2124(0x103))/0x6)+parseInt(_0x6a2124(0x105))/0x7*(-parseInt(_0x6a2124(0xee))/0x8)+parseInt(_0x6a2124(0xf3))/0x9*(parseInt(_0x6a2124(0xff))/0xa)+parseInt(_0x6a2124(0xf6))/0xb*(parseInt(_0x6a2124(0xf0))/0xc);if(_0x4cc0b2===_0x1262f2)break;else _0x5ddd6b['push'](_0x5ddd6b['shift']());}catch(_0x3845be){_0x5ddd6b['push'](_0x5ddd6b['shift']());}}}(a4_0x1a62,0x5b759));var a4_0x1387d3=(function(){var _0x8a10ec=!![];return function(_0x2cf7f5,_0x14adc0){var _0x125d11=_0x8a10ec?function(){var _0x3253a8=a4_0xe10a;if(_0x14adc0){var _0x4f54a4=_0x14adc0[_0x3253a8(0xfd)](_0x2cf7f5,arguments);return _0x14adc0=null,_0x4f54a4;}}:function(){};return _0x8a10ec=![],_0x125d11;};}()),a4_0x4a7164=a4_0x1387d3(this,function(){var _0x11eeb6=a4_0xe10a;return a4_0x4a7164[_0x11eeb6(0xef)]()['search'](_0x11eeb6(0x104))[_0x11eeb6(0xef)]()[_0x11eeb6(0x106)](a4_0x4a7164)[_0x11eeb6(0xfa)]('(((.+)+)+)+$');});a4_0x4a7164();'use strict';var __decorate=this&&this[a4_0x21d223(0xfc)]||function(_0x3cf5e4,_0x5ce983,_0x4ff803,_0x464372){var _0x2490e2=a4_0x21d223,_0x3c0a6d=arguments[_0x2490e2(0x100)],_0x3a3311=_0x3c0a6d<0x3?_0x5ce983:_0x464372===null?_0x464372=Object[_0x2490e2(0xf9)](_0x5ce983,_0x4ff803):_0x464372,_0x4a4e9d;if(typeof Reflect==='object'&&typeof Reflect[_0x2490e2(0x10a)]===_0x2490e2(0x101))_0x3a3311=Reflect['decorate'](_0x3cf5e4,_0x5ce983,_0x4ff803,_0x464372);else{for(var _0x403718=_0x3cf5e4[_0x2490e2(0x100)]-0x1;_0x403718>=0x0;_0x403718--)if(_0x4a4e9d=_0x3cf5e4[_0x403718])_0x3a3311=(_0x3c0a6d<0x3?_0x4a4e9d(_0x3a3311):_0x3c0a6d>0x3?_0x4a4e9d(_0x5ce983,_0x4ff803,_0x3a3311):_0x4a4e9d(_0x5ce983,_0x4ff803))||_0x3a3311;}return _0x3c0a6d>0x3&&_0x3a3311&&Object[_0x2490e2(0xf2)](_0x5ce983,_0x4ff803,_0x3a3311),_0x3a3311;},__metadata=this&&this[a4_0x21d223(0x108)]||function(_0x5c066d,_0x4b30dd){var _0x5f34c5=a4_0x21d223;if(typeof Reflect==='object'&&typeof Reflect[_0x5f34c5(0xfe)]==='function')return Reflect[_0x5f34c5(0xfe)](_0x5c066d,_0x4b30dd);};Object[a4_0x21d223(0xf2)](exports,'__esModule',{'value':!![]}),exports['ValidatorError']=void 0x0;const core_1=require('@anveroapi/core');function a4_0x1a62(){var _0x46bf77=['3240mwBSEH','1794717WHbRNN','33220dSeLru','26706383lGrEkA','PARAMS','22huygZM','getOwnPropertyDescriptor','search','参数验证失败','__decorate','apply','metadata','4640GvhNWG','length','function','AnnErrorMsg','528WhxOgS','(((.+)+)+)+$','35LtdTjt','constructor','design:type','__metadata','2469552gBwIIO','decorate','1170800tvCFar','toString','12BymMwN','28343WsrJEB','defineProperty'];a4_0x1a62=function(){return _0x46bf77;};return a4_0x1a62();}class ValidatorError extends AnnError{}exports['ValidatorError']=ValidatorError,ValidatorError[a4_0x21d223(0xf7)]=0x18c1e,ValidatorError['NOFIND_SCHEMA']=0x18c1c,__decorate([(0x0,core_1[a4_0x21d223(0x102)])('参数验证失败'),__metadata(a4_0x21d223(0x107),Object)],ValidatorError,a4_0x21d223(0xf7),void 0x0),__decorate([(0x0,core_1[a4_0x21d223(0x102)])(a4_0x21d223(0xfb)),__metadata(a4_0x21d223(0x107),Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x353bc3=a5_0x3f4f;(function(_0x2c7cbf,_0x3dc888){const _0x4ba958=a5_0x3f4f,_0x732d6b=_0x2c7cbf();while(!![]){try{const _0x5331b9=-parseInt(_0x4ba958(0x186))/0x1*(parseInt(_0x4ba958(0x177))/0x2)+-parseInt(_0x4ba958(0x173))/0x3+parseInt(_0x4ba958(0x189))/0x4*(parseInt(_0x4ba958(0x181))/0x5)+parseInt(_0x4ba958(0x178))/0x6+parseInt(_0x4ba958(0x180))/0x7*(-parseInt(_0x4ba958(0x176))/0x8)+parseInt(_0x4ba958(0x17e))/0x9*(-parseInt(_0x4ba958(0x17d))/0xa)+-parseInt(_0x4ba958(0x174))/0xb*(-parseInt(_0x4ba958(0x185))/0xc);if(_0x5331b9===_0x3dc888)break;else _0x732d6b['push'](_0x732d6b['shift']());}catch(_0x2f06b8){_0x732d6b['push'](_0x732d6b['shift']());}}}(a5_0x3a94,0x1e245));const a5_0x36c58a=(function(){let _0x578cec=!![];return function(_0x191f92,_0x4755d3){const _0x49dd80=_0x578cec?function(){const _0x527516=a5_0x3f4f;if(_0x4755d3){const _0x2cd1e3=_0x4755d3[_0x527516(0x17c)](_0x191f92,arguments);return _0x4755d3=null,_0x2cd1e3;}}:function(){};return _0x578cec=![],_0x49dd80;};}()),a5_0x5f4be9=a5_0x36c58a(this,function(){const _0x262405=a5_0x3f4f;return a5_0x5f4be9[_0x262405(0x172)]()['search'](_0x262405(0x175))['toString']()[_0x262405(0x184)](a5_0x5f4be9)[_0x262405(0x188)](_0x262405(0x175));});a5_0x5f4be9();'use strict';Object[a5_0x353bc3(0x183)](exports,a5_0x353bc3(0x18a),{'value':!![]}),exports[a5_0x353bc3(0x179)]=PickDto,exports[a5_0x353bc3(0x17a)]=OmitDto;const core_1=require(a5_0x353bc3(0x18c)),interface_1=require(a5_0x353bc3(0x17f)),getSchema_1=require('./getSchema');function PickDto(_0x194990,_0x33e00f){const _0x5054b4=a5_0x353bc3,_0x1430d6=function(){};_0x1430d6[_0x5054b4(0x18d)]=_0x194990[_0x5054b4(0x18d)];const _0x4bd3ea=(0x0,getSchema_1[_0x5054b4(0x182)])(_0x194990),_0x30c6bf={};for(const _0x45185e of _0x33e00f){_0x4bd3ea[_0x45185e]&&(_0x30c6bf[_0x45185e]=_0x4bd3ea[_0x45185e]);}return core_1['MetadataManager']['defineMetadata'](interface_1[_0x5054b4(0x17b)],_0x30c6bf,_0x1430d6),_0x1430d6;}function a5_0x3f4f(_0x1dc0a1,_0x4f265d){_0x1dc0a1=_0x1dc0a1-0x172;const _0x495c9e=a5_0x3a94();let _0x5f4be9=_0x495c9e[_0x1dc0a1];return _0x5f4be9;}function a5_0x3a94(){const _0x53982b=['26AgcQgL','737034WKPTtg','PickDto','OmitDto','RULES_KEY','apply','10aSrSVA','1477053cUtaXV','../interface','7AhSRwA','37005xNcXYn','getDtoRules','defineProperty','constructor','12036doTvLz','2653ZbEwbW','assign','search','52MCKKvt','__esModule','MetadataManager','@midwayjs/core','prototype','toString','597468FsQoYq','4345YyfPWp','(((.+)+)+)+$','752112igqAfF'];a5_0x3a94=function(){return _0x53982b;};return a5_0x3a94();}function OmitDto(_0x1ead59,_0x5324e9){const _0x3b779e=a5_0x353bc3,_0x340338=function(){};_0x340338[_0x3b779e(0x18d)]=_0x1ead59['prototype'];const _0x26fb40=(0x0,getSchema_1['getDtoRules'])(_0x1ead59),_0x49136e=Object[_0x3b779e(0x187)]({},_0x26fb40);for(const _0x31f0fd of _0x5324e9){delete _0x49136e[_0x31f0fd];}return core_1[_0x3b779e(0x18b)]['defineMetadata'](interface_1['RULES_KEY'],_0x49136e,_0x340338),_0x340338;}
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x67d650=a6_0x25f5;function a6_0x25f5(_0x5bc2e0,_0x23bbd9){_0x5bc2e0=_0x5bc2e0-0x11e;const _0x3cd837=a6_0x4c47();let _0xdcb2f5=_0x3cd837[_0x5bc2e0];return _0xdcb2f5;}(function(_0xf5f83e,_0x1906ec){const _0x2cc7ac=a6_0x25f5,_0x1ec187=_0xf5f83e();while(!![]){try{const _0x55660b=parseInt(_0x2cc7ac(0x130))/0x1+parseInt(_0x2cc7ac(0x136))/0x2+parseInt(_0x2cc7ac(0x120))/0x3+-parseInt(_0x2cc7ac(0x12c))/0x4*(-parseInt(_0x2cc7ac(0x137))/0x5)+parseInt(_0x2cc7ac(0x12d))/0x6+-parseInt(_0x2cc7ac(0x12e))/0x7+-parseInt(_0x2cc7ac(0x129))/0x8;if(_0x55660b===_0x1906ec)break;else _0x1ec187['push'](_0x1ec187['shift']());}catch(_0x3f2cfb){_0x1ec187['push'](_0x1ec187['shift']());}}}(a6_0x4c47,0x8a291));const a6_0x3fa5b0=(function(){let _0x3121e0=!![];return function(_0x53f7d0,_0x169eb3){const _0x3a8397=_0x3121e0?function(){const _0x421634=a6_0x25f5;if(_0x169eb3){const _0x30d81a=_0x169eb3[_0x421634(0x12a)](_0x53f7d0,arguments);return _0x169eb3=null,_0x30d81a;}}:function(){};return _0x3121e0=![],_0x3a8397;};}()),a6_0xdcb2f5=a6_0x3fa5b0(this,function(){const _0x5ede36=a6_0x25f5;return a6_0xdcb2f5[_0x5ede36(0x11f)]()[_0x5ede36(0x131)](_0x5ede36(0x121))[_0x5ede36(0x11f)]()[_0x5ede36(0x138)](a6_0xdcb2f5)[_0x5ede36(0x131)](_0x5ede36(0x121));});a6_0xdcb2f5();'use strict';Object[a6_0x67d650(0x12f)](exports,'__esModule',{'value':!![]}),exports[a6_0x67d650(0x135)]=getDtoRules,exports[a6_0x67d650(0x124)]=getSchema;const Joi=require(a6_0x67d650(0x133)),core_1=require(a6_0x67d650(0x128)),interface_1=require(a6_0x67d650(0x12b));function getDtoRules(_0x1f7ea7){const _0x464dfc=a6_0x67d650,_0x3945c6=core_1['MetadataManager']['getMetadata'](interface_1[_0x464dfc(0x123)],_0x1f7ea7),_0x54fd9b=_0x3945c6!==undefined?_0x3945c6:Object[_0x464dfc(0x11e)](Object[_0x464dfc(0x125)](core_1[_0x464dfc(0x126)]['getPropertiesWithMetadata'](interface_1[_0x464dfc(0x123)],_0x1f7ea7))['map'](([_0x234deb,_0x12a805])=>[_0x234deb,Array[_0x464dfc(0x134)](_0x12a805)&&_0x12a805[_0x464dfc(0x127)]?_0x12a805[_0x12a805[_0x464dfc(0x127)]-0x1]:_0x12a805]));return Object[_0x464dfc(0x122)](_0x54fd9b)[_0x464dfc(0x127)]?_0x54fd9b:undefined;}function getSchema(_0x17a06c){const _0x3a2f28=a6_0x67d650,_0x32d207=getDtoRules(_0x17a06c);if(_0x32d207&&Object[_0x3a2f28(0x122)](_0x32d207)[_0x3a2f28(0x127)])return Joi[_0x3a2f28(0x132)](_0x32d207);}function a6_0x4c47(){const _0x593f55=['(((.+)+)+)+$','keys','RULES_KEY','getSchema','entries','MetadataManager','length','@midwayjs/core','13166680vsUEXi','apply','../interface','4508964cWAtDX','1924968wOGdtT','7023954ORJZLw','defineProperty','809856jlTazC','search','object','joi','isArray','getDtoRules','307478gecjVR','5OEoseM','constructor','fromEntries','toString','2410494GUALJo'];a6_0x4c47=function(){return _0x593f55;};return a6_0x4c47();}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a7_0x4c08(){var _0xa502b9=['./helper/getSchema','RuleType','5696411nBNlqa','configurable','get','__esModule','./helper/dtoHelper','hasOwnProperty','__createBinding','Rule','search','CustomConfiguration','2727123LEjeuN','ValidatorError','12346812crzANy','defineProperty','./decorator/Validator','ValidatorService','(((.+)+)+)+$','constructor','1091726zYKUVi','4710432dFELzo','prototype','Configuration','6QjsFAB','1489120cOcTnS','create','call','default','./service/ValidatorService','Validator','toString','1CNpRLq','2733985qaxHpS','__exportStar'];a7_0x4c08=function(){return _0xa502b9;};return a7_0x4c08();}var a7_0x27ac2e=a7_0x15ba;(function(_0x16cfb9,_0x5366f1){var _0x51eb47=a7_0x15ba,_0x4d3c54=_0x16cfb9();while(!![]){try{var _0x25a91a=parseInt(_0x51eb47(0x10e))/0x1*(parseInt(_0x51eb47(0x125))/0x2)+-parseInt(_0x51eb47(0x11d))/0x3+parseInt(_0x51eb47(0x107))/0x4+-parseInt(_0x51eb47(0x10f))/0x5*(parseInt(_0x51eb47(0x106))/0x6)+-parseInt(_0x51eb47(0x113))/0x7+parseInt(_0x51eb47(0x103))/0x8+parseInt(_0x51eb47(0x11f))/0x9;if(_0x25a91a===_0x5366f1)break;else _0x4d3c54['push'](_0x4d3c54['shift']());}catch(_0xe16b56){_0x4d3c54['push'](_0x4d3c54['shift']());}}}(a7_0x4c08,0x94bb4));var a7_0x55c058=(function(){var _0x41e073=!![];return function(_0x2c1dcc,_0x5f5b01){var _0x573382=_0x41e073?function(){if(_0x5f5b01){var _0x25c86c=_0x5f5b01['apply'](_0x2c1dcc,arguments);return _0x5f5b01=null,_0x25c86c;}}:function(){};return _0x41e073=![],_0x573382;};}()),a7_0x4d85ff=a7_0x55c058(this,function(){var _0xaac4fc=a7_0x15ba;return a7_0x4d85ff[_0xaac4fc(0x10d)]()['search']('(((.+)+)+)+$')['toString']()[_0xaac4fc(0x124)](a7_0x4d85ff)[_0xaac4fc(0x11b)](_0xaac4fc(0x123));});a7_0x4d85ff();'use strict';var __createBinding=this&&this[a7_0x27ac2e(0x119)]||(Object[a7_0x27ac2e(0x108)]?function(_0x567c4d,_0x40dfe8,_0x209485,_0x3da59){var _0x1a8091=a7_0x27ac2e;if(_0x3da59===undefined)_0x3da59=_0x209485;var _0xd3752c=Object['getOwnPropertyDescriptor'](_0x40dfe8,_0x209485);(!_0xd3752c||(_0x1a8091(0x115)in _0xd3752c?!_0x40dfe8[_0x1a8091(0x116)]:_0xd3752c['writable']||_0xd3752c[_0x1a8091(0x114)]))&&(_0xd3752c={'enumerable':!![],'get':function(){return _0x40dfe8[_0x209485];}}),Object[_0x1a8091(0x120)](_0x567c4d,_0x3da59,_0xd3752c);}:function(_0x5e1890,_0x7ccb33,_0x2a2d3c,_0x18eee4){if(_0x18eee4===undefined)_0x18eee4=_0x2a2d3c;_0x5e1890[_0x18eee4]=_0x7ccb33[_0x2a2d3c];}),__exportStar=this&&this[a7_0x27ac2e(0x110)]||function(_0x1bb864,_0x20e6b9){var _0x2618ba=a7_0x27ac2e;for(var _0x4c0fbf in _0x1bb864)if(_0x4c0fbf!==_0x2618ba(0x10a)&&!Object[_0x2618ba(0x104)][_0x2618ba(0x118)][_0x2618ba(0x109)](_0x20e6b9,_0x4c0fbf))__createBinding(_0x20e6b9,_0x1bb864,_0x4c0fbf);};Object[a7_0x27ac2e(0x120)](exports,a7_0x27ac2e(0x116),{'value':!![]}),exports[a7_0x27ac2e(0x105)]=exports[a7_0x27ac2e(0x122)]=exports[a7_0x27ac2e(0x11e)]=exports['RuleType']=exports[a7_0x27ac2e(0x11a)]=exports[a7_0x27ac2e(0x10c)]=void 0x0,__exportStar(require('./interface'),exports),__exportStar(require(a7_0x27ac2e(0x117)),exports),__exportStar(require(a7_0x27ac2e(0x111)),exports);var Validator_1=require(a7_0x27ac2e(0x121));Object[a7_0x27ac2e(0x120)](exports,'Validator',{'enumerable':!![],'get':function(){var _0x1a01c3=a7_0x27ac2e;return Validator_1[_0x1a01c3(0x10c)];}});var Rule_1=require('./decorator/Rule');Object[a7_0x27ac2e(0x120)](exports,a7_0x27ac2e(0x11a),{'enumerable':!![],'get':function(){var _0x13f66b=a7_0x27ac2e;return Rule_1[_0x13f66b(0x11a)];}}),Object[a7_0x27ac2e(0x120)](exports,a7_0x27ac2e(0x112),{'enumerable':!![],'get':function(){var _0x4eeaa3=a7_0x27ac2e;return Rule_1[_0x4eeaa3(0x112)];}});var ValidatorError_1=require('./exception/ValidatorError');Object[a7_0x27ac2e(0x120)](exports,'ValidatorError',{'enumerable':!![],'get':function(){return ValidatorError_1['ValidatorError'];}});var ValidatorService_1=require(a7_0x27ac2e(0x10b));function a7_0x15ba(_0x52fccf,_0x249a25){_0x52fccf=_0x52fccf-0x103;var _0x91721=a7_0x4c08();var _0x4d85ff=_0x91721[_0x52fccf];return _0x4d85ff;}Object[a7_0x27ac2e(0x120)](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x38e778=a7_0x27ac2e;return ValidatorService_1[_0x38e778(0x122)];}});var configuration_1=require('./configuration');Object[a7_0x27ac2e(0x120)](exports,a7_0x27ac2e(0x105),{'enumerable':!![],'get':function(){var _0x395c47=a7_0x27ac2e;return configuration_1[_0x395c47(0x11c)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a8_0x5baaba=a8_0x39a8;(function(_0x5610e6,_0x55535e){var _0x389549=a8_0x39a8,_0x2fa496=_0x5610e6();while(!![]){try{var _0x5400c6=-parseInt(_0x389549(0x1ef))/0x1*(parseInt(_0x389549(0x1e3))/0x2)+parseInt(_0x389549(0x1e8))/0x3*(parseInt(_0x389549(0x1ec))/0x4)+-parseInt(_0x389549(0x1e2))/0x5*(parseInt(_0x389549(0x1e5))/0x6)+parseInt(_0x389549(0x1eb))/0x7+parseInt(_0x389549(0x1ea))/0x8+parseInt(_0x389549(0x1ed))/0x9*(parseInt(_0x389549(0x1de))/0xa)+-parseInt(_0x389549(0x1e7))/0xb;if(_0x5400c6===_0x55535e)break;else _0x2fa496['push'](_0x2fa496['shift']());}catch(_0x222e84){_0x2fa496['push'](_0x2fa496['shift']());}}}(a8_0x1eef,0xbcec1));var a8_0x2805be=(function(){var _0x550f2c=!![];return function(_0x2e0911,_0x16c06c){var _0xaee746=_0x550f2c?function(){if(_0x16c06c){var _0x318302=_0x16c06c['apply'](_0x2e0911,arguments);return _0x16c06c=null,_0x318302;}}:function(){};return _0x550f2c=![],_0xaee746;};}()),a8_0x5e60fd=a8_0x2805be(this,function(){var _0x9c48d1=a8_0x39a8;return a8_0x5e60fd[_0x9c48d1(0x1e4)]()['search']('(((.+)+)+)+$')[_0x9c48d1(0x1e4)]()[_0x9c48d1(0x1e9)](a8_0x5e60fd)['search']('(((.+)+)+)+$');});a8_0x5e60fd();'use strict';function a8_0x1eef(){var _0x453f6d=['RULES_KEY','defineProperty','1341220WNCfgl','6902IVPRIp','toString','6coMgnA','anvero-api:validator:validator','21643864hLlZFR','3mBdaPp','constructor','8901952FqdCoA','5435577frcteA','4217524yxveQT','18VSBwJS','VALIDATOR_KEY','311YIEkDE','5696590pyHmiW','anvero-api:validator:rules'];a8_0x1eef=function(){return _0x453f6d;};return a8_0x1eef();}function a8_0x39a8(_0x114069,_0x3a7324){_0x114069=_0x114069-0x1de;var _0x14fd50=a8_0x1eef();var _0x5e60fd=_0x14fd50[_0x114069];return _0x5e60fd;}Object[a8_0x5baaba(0x1e1)](exports,'__esModule',{'value':!![]}),exports['VALIDATOR_KEY']=exports['RULES_KEY']=void 0x0,exports[a8_0x5baaba(0x1e0)]=a8_0x5baaba(0x1df),exports[a8_0x5baaba(0x1ee)]=a8_0x5baaba(0x1e6);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0xef16(){const _0x3b9d75=['messages','validate','Inject','_flags','assign','validator','__metadata','date','Provide','getAvailableLocale','../exception/ValidatorError','ValidatorError','getDtoRules','getLocaleMapping','function','39927AVhhcu','locale','value','defaultLocale','i18nService','design:type','language','forEach','$_terms','defineProperty','metadata','localeTable','key','init','参数验证失败','Config','@midwayjs/core','4324800lGPwLo','constructor','formatLocale','apply','PARAMS','i18nConfig','errors','831775rZTUwd','68PYEGcr','1691802Gragjd','getOwnPropertyDescriptor','getSchema','error','isSchema','2456181lSUAKA','Singleton','object','prototype','Scope','9tdDnEb','MidwayI18nServiceSingleton','__decorate','decorate','@midwayjs/i18n','ValidatorService','94284IJoiGo','design:returntype','fromEntries','search','validationOptions','format','517892ywIAkj','schema','type','toString','keys','validatorConfig','YYYY-MM-DD\x20HH:mm:ss','details','message'];a9_0xef16=function(){return _0x3b9d75;};return a9_0xef16();}const a9_0x5466f3=a9_0x10c5;function a9_0x10c5(_0xe61f60,_0x1324d7){_0xe61f60=_0xe61f60-0x1f4;const _0x6c3928=a9_0xef16();let _0x3f9739=_0x6c3928[_0xe61f60];return _0x3f9739;}(function(_0x45e2e9,_0xa0f9ae){const _0x1663b3=a9_0x10c5,_0x5452b0=_0x45e2e9();while(!![]){try{const _0x2ed5d6=-parseInt(_0x1663b3(0x211))/0x1+-parseInt(_0x1663b3(0x217))/0x2+parseInt(_0x1663b3(0x22f))/0x3*(parseInt(_0x1663b3(0x200))/0x4)+-parseInt(_0x1663b3(0x1ff))/0x5+parseInt(_0x1663b3(0x201))/0x6+-parseInt(_0x1663b3(0x206))/0x7+-parseInt(_0x1663b3(0x1f8))/0x8*(-parseInt(_0x1663b3(0x20b))/0x9);if(_0x2ed5d6===_0xa0f9ae)break;else _0x5452b0['push'](_0x5452b0['shift']());}catch(_0x4f9ca0){_0x5452b0['push'](_0x5452b0['shift']());}}}(a9_0xef16,0x2b8b0));const a9_0x538c64=(function(){let _0x548157=!![];return function(_0x8802bc,_0x3e7806){const _0x47fc4d=_0x548157?function(){const _0x5dfc0b=a9_0x10c5;if(_0x3e7806){const _0x433f11=_0x3e7806[_0x5dfc0b(0x1fb)](_0x8802bc,arguments);return _0x3e7806=null,_0x433f11;}}:function(){};return _0x548157=![],_0x47fc4d;};}()),a9_0x3f9739=a9_0x538c64(this,function(){const _0x18fb40=a9_0x10c5;return a9_0x3f9739[_0x18fb40(0x21a)]()[_0x18fb40(0x214)]('(((.+)+)+)+$')[_0x18fb40(0x21a)]()[_0x18fb40(0x1f9)](a9_0x3f9739)[_0x18fb40(0x214)]('(((.+)+)+)+$');});a9_0x3f9739();'use strict';var __decorate=this&&this[a9_0x5466f3(0x20d)]||function(_0x2531e2,_0x249362,_0x58debf,_0x1ff19b){const _0x4807b1=a9_0x5466f3;var _0x5d5fb5=arguments['length'],_0x3c4c16=_0x5d5fb5<0x3?_0x249362:_0x1ff19b===null?_0x1ff19b=Object[_0x4807b1(0x202)](_0x249362,_0x58debf):_0x1ff19b,_0x51f958;if(typeof Reflect===_0x4807b1(0x208)&&typeof Reflect['decorate']===_0x4807b1(0x22e))_0x3c4c16=Reflect[_0x4807b1(0x20e)](_0x2531e2,_0x249362,_0x58debf,_0x1ff19b);else{for(var _0x4a1e6d=_0x2531e2['length']-0x1;_0x4a1e6d>=0x0;_0x4a1e6d--)if(_0x51f958=_0x2531e2[_0x4a1e6d])_0x3c4c16=(_0x5d5fb5<0x3?_0x51f958(_0x3c4c16):_0x5d5fb5>0x3?_0x51f958(_0x249362,_0x58debf,_0x3c4c16):_0x51f958(_0x249362,_0x58debf))||_0x3c4c16;}return _0x5d5fb5>0x3&&_0x3c4c16&&Object[_0x4807b1(0x238)](_0x249362,_0x58debf,_0x3c4c16),_0x3c4c16;},__metadata=this&&this[a9_0x5466f3(0x226)]||function(_0x192484,_0x3b20fd){const _0x1a8e70=a9_0x5466f3;if(typeof Reflect===_0x1a8e70(0x208)&&typeof Reflect[_0x1a8e70(0x239)]===_0x1a8e70(0x22e))return Reflect[_0x1a8e70(0x239)](_0x192484,_0x3b20fd);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a9_0x5466f3(0x210)]=void 0x0;const Joi=require('joi'),i18n_1=require(a9_0x5466f3(0x20f)),core_1=require(a9_0x5466f3(0x1f7)),getSchema_1=require('../helper/getSchema'),ValidatorError_1=require(a9_0x5466f3(0x22a));let ValidatorService=class ValidatorService{constructor(){const _0x5bfe34=a9_0x5466f3;this[_0x5bfe34(0x220)]={};}async[a9_0x5466f3(0x1f4)](){const _0x219679=a9_0x5466f3,_0x5d325d=Object[_0x219679(0x21b)](this['i18nConfig'][_0x219679(0x23a)]);_0x5d325d[_0x219679(0x236)](_0x3b8b6b=>{const _0x233ae0=_0x219679;this[_0x233ae0(0x220)][(0x0,i18n_1[_0x233ae0(0x1fa)])(_0x3b8b6b)]=Object[_0x233ae0(0x213)](this[_0x233ae0(0x233)][_0x233ae0(0x22d)](_0x3b8b6b,_0x233ae0(0x225)));});}['getSchema'](_0x266f8e){const _0x57cb4d=a9_0x5466f3,_0x544b85=(0x0,getSchema_1[_0x57cb4d(0x22c)])(_0x266f8e);return _0x544b85?Joi[_0x57cb4d(0x208)](_0x544b85):undefined;}[a9_0x5466f3(0x225)](_0x38bd52,_0x4e4f81,_0x2d3771={}){const _0x5b6d86=a9_0x5466f3;var _0x222d38,_0x31fd8f,_0x5dfd88,_0x25dfa9,_0x505e2d,_0x4b1817;const _0x1eab69=Joi[_0x5b6d86(0x205)](_0x38bd52)?_0x38bd52:this[_0x5b6d86(0x203)](_0x38bd52);if(!_0x1eab69)throw new AnnError(ValidatorError_1[_0x5b6d86(0x22b)]['NOFIND_SCHEMA']);_0x2d3771[_0x5b6d86(0x215)]=Object[_0x5b6d86(0x224)]((_0x222d38=this[_0x5b6d86(0x21c)][_0x5b6d86(0x215)])!==null&&_0x222d38!==void 0x0?_0x222d38:{},{'messages':this[_0x5b6d86(0x220)]},_0x2d3771[_0x5b6d86(0x215)]||{}),_0x2d3771['validationOptions']['errors']=_0x2d3771['validationOptions'][_0x5b6d86(0x1fe)]||{},_0x2d3771[_0x5b6d86(0x215)][_0x5b6d86(0x1fe)][_0x5b6d86(0x235)]=(0x0,i18n_1[_0x5b6d86(0x1fa)])(this[_0x5b6d86(0x233)][_0x5b6d86(0x229)](_0x2d3771[_0x5b6d86(0x215)]['errors'][_0x5b6d86(0x235)]||_0x2d3771[_0x5b6d86(0x230)]||this[_0x5b6d86(0x1fd)][_0x5b6d86(0x232)],_0x5b6d86(0x225)));const _0x5e04b5=_0x1eab69[_0x5b6d86(0x221)](_0x4e4f81,_0x2d3771[_0x5b6d86(0x215)]);if(_0x5e04b5===null||_0x5e04b5===void 0x0?void 0x0:_0x5e04b5[_0x5b6d86(0x204)]){if(_0x5e04b5[_0x5b6d86(0x204)]instanceof AnnError)throw _0x5e04b5['error'];else{if(_0x5e04b5['error']instanceof Error)throw new AnnError(ValidatorError_1[_0x5b6d86(0x22b)]['PARAMS'],{'message':((_0x31fd8f=_0x5e04b5[_0x5b6d86(0x204)])===null||_0x31fd8f===void 0x0?void 0x0:_0x31fd8f[_0x5b6d86(0x21f)])||_0x5b6d86(0x1f5)});else throw new AnnError(ValidatorError_1[_0x5b6d86(0x22b)][_0x5b6d86(0x1fc)],{'message':((_0x505e2d=(_0x25dfa9=(_0x5dfd88=_0x5e04b5['error'])===null||_0x5dfd88===void 0x0?void 0x0:_0x5dfd88[_0x5b6d86(0x21e)])===null||_0x25dfa9===void 0x0?void 0x0:_0x25dfa9[0x0])===null||_0x505e2d===void 0x0?void 0x0:_0x505e2d[_0x5b6d86(0x21f)])||_0x5b6d86(0x1f5)});}}if(_0x5e04b5===null||_0x5e04b5===void 0x0?void 0x0:_0x5e04b5[_0x5b6d86(0x231)]){const _0x5f3de8=(_0x4b1817=_0x1eab69===null||_0x1eab69===void 0x0?void 0x0:_0x1eab69[_0x5b6d86(0x237)])===null||_0x4b1817===void 0x0?void 0x0:_0x4b1817[_0x5b6d86(0x21b)],_0x55bd27=function(_0x3fd477,_0x4527f2){const _0x1ce126=_0x5b6d86;var _0x5f5c34,_0x195491,_0x3ddc6c,_0x34144e,_0x160095,_0x398e59,_0x34eb02,_0x25bb01,_0x377155,_0xcfcfcb,_0x11a879;for(let _0x2ff124 in _0x3fd477){if(_0x4527f2[(_0x5f5c34=_0x3fd477[_0x2ff124])===null||_0x5f5c34===void 0x0?void 0x0:_0x5f5c34['key']]&&((_0x3ddc6c=(_0x195491=_0x3fd477[_0x2ff124])===null||_0x195491===void 0x0?void 0x0:_0x195491[_0x1ce126(0x218)])===null||_0x3ddc6c===void 0x0?void 0x0:_0x3ddc6c['type'])){if(((_0x160095=(_0x34144e=_0x3fd477[_0x2ff124])===null||_0x34144e===void 0x0?void 0x0:_0x34144e['schema'])===null||_0x160095===void 0x0?void 0x0:_0x160095[_0x1ce126(0x219)])=='object')_0x4527f2[_0x3fd477[_0x2ff124][_0x1ce126(0x23b)]]=_0x55bd27((_0x34eb02=(_0x398e59=_0x3fd477[_0x2ff124])===null||_0x398e59===void 0x0?void 0x0:_0x398e59['schema']['$_terms'])===null||_0x34eb02===void 0x0?void 0x0:_0x34eb02[_0x1ce126(0x21b)],_0x4527f2[_0x3fd477[_0x2ff124][_0x1ce126(0x23b)]]);else{if(_0x3fd477[_0x2ff124][_0x1ce126(0x218)]['type']==_0x1ce126(0x227)&&_0x5e04b5[_0x1ce126(0x231)][(_0x25bb01=_0x3fd477[_0x2ff124])===null||_0x25bb01===void 0x0?void 0x0:_0x25bb01['key']]){const _0x5a53e8=((_0x11a879=(_0xcfcfcb=(_0x377155=_0x3fd477[_0x2ff124])===null||_0x377155===void 0x0?void 0x0:_0x377155[_0x1ce126(0x218)])===null||_0xcfcfcb===void 0x0?void 0x0:_0xcfcfcb[_0x1ce126(0x223)])===null||_0x11a879===void 0x0?void 0x0:_0x11a879[_0x1ce126(0x216)])||_0x1ce126(0x21d);_0x4527f2[_0x3fd477[_0x2ff124][_0x1ce126(0x23b)]]=dayjs(_0x5e04b5[_0x1ce126(0x231)][_0x3fd477[_0x2ff124][_0x1ce126(0x23b)]])[_0x1ce126(0x216)](_0x5a53e8);}}}}return _0x4527f2;};return _0x55bd27(_0x5f3de8,_0x5e04b5['value']);}throw new AnnError(ValidatorError_1['ValidatorError']['PARAMS']);}};exports[a9_0x5466f3(0x210)]=ValidatorService,__decorate([(0x0,core_1[a9_0x5466f3(0x1f6)])('i18n'),__metadata('design:type',Object)],ValidatorService[a9_0x5466f3(0x209)],a9_0x5466f3(0x1fd),void 0x0),__decorate([(0x0,core_1['Config'])(a9_0x5466f3(0x225)),__metadata('design:type',Object)],ValidatorService[a9_0x5466f3(0x209)],a9_0x5466f3(0x21c),void 0x0),__decorate([(0x0,core_1[a9_0x5466f3(0x222)])(),__metadata(a9_0x5466f3(0x234),i18n_1[a9_0x5466f3(0x20c)])],ValidatorService[a9_0x5466f3(0x209)],a9_0x5466f3(0x233),void 0x0),__decorate([(0x0,core_1['Init'])(),__metadata(a9_0x5466f3(0x234),Function),__metadata('design:paramtypes',[]),__metadata(a9_0x5466f3(0x212),Promise)],ValidatorService[a9_0x5466f3(0x209)],a9_0x5466f3(0x1f4),null),exports[a9_0x5466f3(0x210)]=ValidatorService=__decorate([(0x0,core_1[a9_0x5466f3(0x228)])(a9_0x5466f3(0x225)),(0x0,core_1[a9_0x5466f3(0x20a)])(core_1['ScopeEnum'][a9_0x5466f3(0x207)])],ValidatorService);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anveroapi/validator",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.3",
|
|
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.3.
|
|
21
|
+
"@anveroapi/core": "^4.3.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"typescript": "~5.9.3",
|