@anveroapi/validator 4.0.0 → 4.0.2
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.d.ts +3 -0
- 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 +33 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a0_0x37d1(_0x4628e8,_0x32a65f){_0x4628e8=_0x4628e8-0xef;const _0x586124=a0_0x580d();let _0x42e2a7=_0x586124[_0x4628e8];return _0x42e2a7;}const a0_0x11df12=a0_0x37d1;(function(_0x10dfb9,_0x3463f6){const _0x41a252=a0_0x37d1,_0x415987=_0x10dfb9();while(!![]){try{const _0x2e1cf9=-parseInt(_0x41a252(0xf3))/0x1+-parseInt(_0x41a252(0xf5))/0x2+-parseInt(_0x41a252(0xfe))/0x3+parseInt(_0x41a252(0xfb))/0x4*(parseInt(_0x41a252(0xf7))/0x5)+-parseInt(_0x41a252(0xf9))/0x6*(parseInt(_0x41a252(0xf6))/0x7)+-parseInt(_0x41a252(0x100))/0x8*(parseInt(_0x41a252(0xf2))/0x9)+parseInt(_0x41a252(0xfa))/0xa;if(_0x2e1cf9===_0x3463f6)break;else _0x415987['push'](_0x415987['shift']());}catch(_0x36d1ab){_0x415987['push'](_0x415987['shift']());}}}(a0_0x580d,0x627aa));const a0_0x3f8264=(function(){let _0x5158ef=!![];return function(_0x45dbfc,_0x17a362){const _0x5a2dbe=_0x5158ef?function(){if(_0x17a362){const _0xb825b8=_0x17a362['apply'](_0x45dbfc,arguments);return _0x17a362=null,_0xb825b8;}}:function(){};return _0x5158ef=![],_0x5a2dbe;};}()),a0_0x42e2a7=a0_0x3f8264(this,function(){const _0x328fe9=a0_0x37d1;return a0_0x42e2a7[_0x328fe9(0xfd)]()[_0x328fe9(0x102)](_0x328fe9(0xfc))[_0x328fe9(0xfd)]()['constructor'](a0_0x42e2a7)[_0x328fe9(0x102)](_0x328fe9(0xfc));});a0_0x42e2a7();'use strict';Object[a0_0x11df12(0xf4)](exports,a0_0x11df12(0xf1),{'value':!![]});function a0_0x580d(){const _0xc962b3=['search','ValidatorError','../exception/ValidatorError','__esModule','99PdehBf','557296vpeCUt','defineProperty','429836KAONEl','5355ywrXQj','30OKMTjZ','default','5994IGTnPP','29162310vrjaPh','42692oVINPe','(((.+)+)+)+$','toString','2328030XBoODi','string','192320seCzBW','../../locales/en_US.json'];a0_0x580d=function(){return _0xc962b3;};return a0_0x580d();}const ValidatorError_1=require(a0_0x11df12(0xf0));exports[a0_0x11df12(0xf8)]={'validator':{'errorStatus':ValidatorError_1[a0_0x11df12(0xef)]['PARAMS'],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x11df12(0xff)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x11df12(0x101))},'zh_CN':{'validator':require('../../locales/zh_CN.json')}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a1_0x3e53(){const _0x837469=['prototype','./interface','length','@anveroapi/core','bound\x20dispatch','__decorate','params','args','11eZcXil','ValidatorService','decorator','603624dSEqxf','target','MetadataManager','@midwayjs/i18n','req','getOwnPropertyDescriptor','getSchema','634264xoDOiu','40AFuKks','query','request','(((.+)+)+)+$','object','toString','function','assign','metadata','4VXLkXd','52374iMSMUC','@midwayjs/core','registerMethodHandler','CustomConfiguration','Inject','14qYHXAJ','body','method','param','./config/config.default','search','decorate','3286230Cztsgb','design:type','I18N_ATTR_KEY','604401wqwXzN','methodArgs','572966VWRULJ','__esModule','getAttr','93015ZAryiN','find','anvero-api:validator','getOwnMetadata','propertyName','locale','VALIDATOR_KEY','defineProperty'];a1_0x3e53=function(){return _0x837469;};return a1_0x3e53();}const a1_0x5e99bc=a1_0x2b8f;(function(_0x4b2205,_0xcddfda){const _0x9d42ec=a1_0x2b8f,_0x112044=_0x4b2205();while(!![]){try{const _0x2dc2b4=-parseInt(_0x9d42ec(0x148))/0x1+parseInt(_0x9d42ec(0x132))/0x2+-parseInt(_0x9d42ec(0x130))/0x3*(-parseInt(_0x9d42ec(0x159))/0x4)+parseInt(_0x9d42ec(0x150))/0x5*(-parseInt(_0x9d42ec(0x15a))/0x6)+-parseInt(_0x9d42ec(0x15f))/0x7*(-parseInt(_0x9d42ec(0x14f))/0x8)+parseInt(_0x9d42ec(0x135))/0x9+parseInt(_0x9d42ec(0x12d))/0xa*(parseInt(_0x9d42ec(0x145))/0xb);if(_0x2dc2b4===_0xcddfda)break;else _0x112044['push'](_0x112044['shift']());}catch(_0x3e3bea){_0x112044['push'](_0x112044['shift']());}}}(a1_0x3e53,0x4c2d2));function a1_0x2b8f(_0x330628,_0x389a86){_0x330628=_0x330628-0x127;const _0x20b96e=a1_0x3e53();let _0x48fd19=_0x20b96e[_0x330628];return _0x48fd19;}const a1_0x43775b=(function(){let _0x2ced87=!![];return function(_0x1eef86,_0x3c7945){const _0x46595d=_0x2ced87?function(){if(_0x3c7945){const _0x1b12bd=_0x3c7945['apply'](_0x1eef86,arguments);return _0x3c7945=null,_0x1b12bd;}}:function(){};return _0x2ced87=![],_0x46595d;};}()),a1_0x48fd19=a1_0x43775b(this,function(){const _0x456972=a1_0x2b8f;return a1_0x48fd19[_0x456972(0x155)]()[_0x456972(0x12b)]('(((.+)+)+)+$')['toString']()['constructor'](a1_0x48fd19)[_0x456972(0x12b)](_0x456972(0x153));});a1_0x48fd19();'use strict';var __decorate=this&&this[a1_0x5e99bc(0x142)]||function(_0x5714cb,_0x21a154,_0x13f151,_0x3d2697){const _0x25c64e=a1_0x5e99bc;var _0x1edf4d=arguments[_0x25c64e(0x13f)],_0x518fea=_0x1edf4d<0x3?_0x21a154:_0x3d2697===null?_0x3d2697=Object[_0x25c64e(0x14d)](_0x21a154,_0x13f151):_0x3d2697,_0x41699d;if(typeof Reflect===_0x25c64e(0x154)&&typeof Reflect[_0x25c64e(0x12c)]===_0x25c64e(0x156))_0x518fea=Reflect[_0x25c64e(0x12c)](_0x5714cb,_0x21a154,_0x13f151,_0x3d2697);else{for(var _0x42e588=_0x5714cb[_0x25c64e(0x13f)]-0x1;_0x42e588>=0x0;_0x42e588--)if(_0x41699d=_0x5714cb[_0x42e588])_0x518fea=(_0x1edf4d<0x3?_0x41699d(_0x518fea):_0x1edf4d>0x3?_0x41699d(_0x21a154,_0x13f151,_0x518fea):_0x41699d(_0x21a154,_0x13f151))||_0x518fea;}return _0x1edf4d>0x3&&_0x518fea&&Object[_0x25c64e(0x13c)](_0x21a154,_0x13f151,_0x518fea),_0x518fea;},__metadata=this&&this['__metadata']||function(_0x100fa2,_0xa065bc){const _0x2e9c66=a1_0x5e99bc;if(typeof Reflect===_0x2e9c66(0x154)&&typeof Reflect[_0x2e9c66(0x158)]==='function')return Reflect['metadata'](_0x100fa2,_0xa065bc);};Object[a1_0x5e99bc(0x13c)](exports,a1_0x5e99bc(0x133),{'value':!![]}),exports[a1_0x5e99bc(0x15d)]=void 0x0;const i18n_1=require(a1_0x5e99bc(0x14b)),core_1=require('@midwayjs/core'),core_2=require(a1_0x5e99bc(0x15b)),interface_1=require(a1_0x5e99bc(0x13e)),ValidatorService_1=require('./service/ValidatorService'),i18n=require(a1_0x5e99bc(0x14b)),anvero=require(a1_0x5e99bc(0x140)),ConfigDefault=require(a1_0x5e99bc(0x12a));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x4c692b=a1_0x5e99bc;this[_0x4c692b(0x147)][_0x4c692b(0x15c)](interface_1[_0x4c692b(0x13b)],_0x314c4e=>{const _0x469f78=_0x4c692b,_0x475297=_0x314c4e[_0x469f78(0x158)],_0x48ba4b=core_2[_0x469f78(0x14a)]['getMethodParamTypes'](_0x314c4e['target'],_0x314c4e[_0x469f78(0x139)]);return{'before':_0x467c36=>{const _0x46264e=_0x469f78;var _0x321058,_0x534256,_0x1c4b1c,_0x3c42bb,_0x3d113a,_0xe88869,_0x23c0cc,_0xafad77,_0x2d3226,_0x3c26b8,_0xbddf0c,_0x5e3c64,_0x258bfe;const _0x1e8af8=_0x467c36[_0x46264e(0x149)][core_1['REQUEST_OBJ_CTX_KEY']],_0x6c6ab4=Object[_0x46264e(0x157)]({},((_0x321058=_0x1e8af8===null||_0x1e8af8===void 0x0?void 0x0:_0x1e8af8['request'])===null||_0x321058===void 0x0?void 0x0:_0x321058[_0x46264e(0x151)])||{},((_0x534256=_0x1e8af8===null||_0x1e8af8===void 0x0?void 0x0:_0x1e8af8[_0x46264e(0x152)])===null||_0x534256===void 0x0?void 0x0:_0x534256[_0x46264e(0x127)])||{}),_0x20111e=(core_2[_0x46264e(0x14a)][_0x46264e(0x138)](interface_1[_0x46264e(0x13b)],_0x467c36[_0x46264e(0x149)])||[])[_0x46264e(0x136)](_0x2c37d3=>_0x2c37d3[_0x46264e(0x128)]==_0x467c36['methodName']);!(_0x475297===null||_0x475297===void 0x0?void 0x0:_0x475297[_0x46264e(0x13a)])&&_0x1e8af8&&_0x1e8af8['getAttr']&&(_0x475297[_0x46264e(0x13a)]=_0x1e8af8[_0x46264e(0x134)](i18n_1[_0x46264e(0x12f)]));for(let _0x56ce95=0x0;_0x56ce95<_0x48ba4b[_0x46264e(0x13f)];_0x56ce95++){const _0x5638bf=_0x48ba4b[_0x56ce95],_0x451cea=this[_0x46264e(0x146)][_0x46264e(0x14e)](_0x5638bf);if(_0x451cea){if(typeof _0x467c36[_0x46264e(0x144)][_0x56ce95]=='undefined'||((_0x1c4b1c=_0x467c36['args'][_0x56ce95])===null||_0x1c4b1c===void 0x0?void 0x0:_0x1c4b1c[_0x46264e(0x152)])&&((_0x3c42bb=_0x467c36['args'][_0x56ce95])===null||_0x3c42bb===void 0x0?void 0x0:_0x3c42bb['res'])&&((_0x3d113a=_0x467c36[_0x46264e(0x144)][_0x56ce95])===null||_0x3d113a===void 0x0?void 0x0:_0x3d113a[_0x46264e(0x14c)]))_0x467c36[_0x46264e(0x144)][_0x56ce95]=_0x6c6ab4;else((_0xe88869=_0x467c36['args'][_0x56ce95])===null||_0xe88869===void 0x0?void 0x0:_0xe88869['name'])==_0x46264e(0x141)&&_0x467c36[_0x46264e(0x144)]['splice'](_0x56ce95,0x0,_0x6c6ab4);const _0x3d29ba=this['ValidatorService']['validator'](_0x451cea,_0x467c36[_0x46264e(0x144)][_0x56ce95],_0x475297);_0x3d29ba&&(_0x467c36[_0x46264e(0x144)][_0x56ce95]=_0x3d29ba);}else{if((_0x20111e===null||_0x20111e===void 0x0?void 0x0:_0x20111e[_0x46264e(0x131)][_0x56ce95])&&((_0x23c0cc=_0x467c36[_0x46264e(0x144)][_0x56ce95])===null||_0x23c0cc===void 0x0?void 0x0:_0x23c0cc[_0x46264e(0x143)])&&typeof _0x467c36[_0x46264e(0x144)][_0x56ce95][_0x46264e(0x129)]==_0x46264e(0x156)&&((_0xafad77=_0x1e8af8===null||_0x1e8af8===void 0x0?void 0x0:_0x1e8af8[_0x46264e(0x143)])===null||_0xafad77===void 0x0?void 0x0:_0xafad77[_0x20111e[_0x46264e(0x131)][_0x56ce95]]))_0x467c36['args'][_0x56ce95]=_0x5638bf((_0x2d3226=_0x1e8af8===null||_0x1e8af8===void 0x0?void 0x0:_0x1e8af8['params'])===null||_0x2d3226===void 0x0?void 0x0:_0x2d3226[_0x20111e[_0x46264e(0x131)][_0x56ce95]]);else(_0x20111e===null||_0x20111e===void 0x0?void 0x0:_0x20111e['methodArgs'][_0x56ce95])&&((_0xbddf0c=(_0x3c26b8=_0x467c36[_0x46264e(0x144)][_0x56ce95])===null||_0x3c26b8===void 0x0?void 0x0:_0x3c26b8[_0x46264e(0x143)])===null||_0xbddf0c===void 0x0?void 0x0:_0xbddf0c[_0x20111e['methodArgs'][_0x56ce95]])&&(_0x467c36[_0x46264e(0x144)][_0x56ce95]=(_0x258bfe=(_0x5e3c64=_0x467c36['args'][_0x56ce95])===null||_0x5e3c64===void 0x0?void 0x0:_0x5e3c64[_0x46264e(0x143)])===null||_0x258bfe===void 0x0?void 0x0:_0x258bfe[_0x20111e[_0x46264e(0x131)][_0x56ce95]]);}}},'afterThrow':(_0x3b0b5e,_0x20c824)=>{throw _0x20c824;}};});}};exports[a1_0x5e99bc(0x15d)]=CustomConfiguration,__decorate([(0x0,core_2[a1_0x5e99bc(0x15e)])(),__metadata(a1_0x5e99bc(0x12e),core_1['MidwayDecoratorService'])],CustomConfiguration[a1_0x5e99bc(0x13d)],'decorator',void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata('design:type',ValidatorService_1['ValidatorService'])],CustomConfiguration[a1_0x5e99bc(0x13d)],'ValidatorService',void 0x0),exports[a1_0x5e99bc(0x15d)]=CustomConfiguration=__decorate([(0x0,core_2['Configuration'])({'imports':[i18n,anvero],'namespace':a1_0x5e99bc(0x137),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x584eec=a2_0x4c79;(function(_0x57c705,_0x3dd8ef){const _0x559e12=a2_0x4c79,_0x57a761=_0x57c705();while(!![]){try{const _0x519c55=parseInt(_0x559e12(0x13a))/0x1*(parseInt(_0x559e12(0x120))/0x2)+parseInt(_0x559e12(0x133))/0x3+parseInt(_0x559e12(0x116))/0x4*(-parseInt(_0x559e12(0x115))/0x5)+-parseInt(_0x559e12(0x11a))/0x6*(-parseInt(_0x559e12(0x12c))/0x7)+parseInt(_0x559e12(0x12a))/0x8*(-parseInt(_0x559e12(0x11c))/0x9)+-parseInt(_0x559e12(0x125))/0xa*(parseInt(_0x559e12(0x132))/0xb)+parseInt(_0x559e12(0x119))/0xc*(parseInt(_0x559e12(0x13d))/0xd);if(_0x519c55===_0x3dd8ef)break;else _0x57a761['push'](_0x57a761['shift']());}catch(_0x234e5d){_0x57a761['push'](_0x57a761['shift']());}}}(a2_0xde53,0xe9250));const a2_0x2078c0=(function(){let _0x4c8a0c=!![];return function(_0x519108,_0x17bb62){const _0x27454d=_0x4c8a0c?function(){const _0x4c38f6=a2_0x4c79;if(_0x17bb62){const _0x58c5e8=_0x17bb62[_0x4c38f6(0x138)](_0x519108,arguments);return _0x17bb62=null,_0x58c5e8;}}:function(){};return _0x4c8a0c=![],_0x27454d;};}()),a2_0x4e0199=a2_0x2078c0(this,function(){const _0x304ad3=a2_0x4c79;return a2_0x4e0199['toString']()[_0x304ad3(0x13c)](_0x304ad3(0x131))[_0x304ad3(0x12e)]()[_0x304ad3(0x126)](a2_0x4e0199)[_0x304ad3(0x13c)](_0x304ad3(0x131));});a2_0x4e0199();'use strict';Object['defineProperty'](exports,a2_0x584eec(0x12f),{'value':!![]}),exports[a2_0x584eec(0x12d)]=void 0x0,exports[a2_0x584eec(0x127)]=Rule;function a2_0x4c79(_0xf68341,_0x2ce0bd){_0xf68341=_0xf68341-0x115;const _0x11decb=a2_0xde53();let _0x4e0199=_0x11decb[_0xf68341];return _0x4e0199;}const joi=require(a2_0x584eec(0x117)),date_1=require(a2_0x584eec(0x128)),core_1=require('@midwayjs/core'),interface_1=require('../interface');exports[a2_0x584eec(0x12d)]=joi[a2_0x584eec(0x13e)](date_1[a2_0x584eec(0x136)]);function Rule(_0x4156d9,_0x5ce7dc,_0x3a2f0a=''){return(_0x15a9f1,_0x110605)=>{const _0x43ed69=a2_0x4c79;var _0x9843c5;if(_0x110605)!joi[_0x43ed69(0x11e)](_0x5ce7dc)&&(_0x5ce7dc===null||_0x5ce7dc===void 0x0?void 0x0:_0x5ce7dc[_0x43ed69(0x118)])&&(_0x5ce7dc=joi[_0x43ed69(0x139)](core_1[_0x43ed69(0x121)]['getOwnMetadata'](interface_1['RULES_KEY'],_0x5ce7dc))[_0x43ed69(0x11d)]({'id':_0x5ce7dc[_0x43ed69(0x118)]}),core_1[_0x43ed69(0x121)]['transformTypeFromTSDesign'](core_1[_0x43ed69(0x121)][_0x43ed69(0x137)](_0x15a9f1,_0x110605))['name']===_0x43ed69(0x11f)&&(_0x5ce7dc=joi[_0x43ed69(0x135)]()[_0x43ed69(0x134)](_0x5ce7dc))),joi[_0x43ed69(0x11e)](_0x5ce7dc)&&(_0x4156d9&&typeof(_0x5ce7dc===null||_0x5ce7dc===void 0x0?void 0x0:_0x5ce7dc[_0x43ed69(0x123)])=='function'&&(_0x5ce7dc=_0x5ce7dc[_0x43ed69(0x123)](_0x4156d9)),_0x3a2f0a&&typeof(_0x5ce7dc===null||_0x5ce7dc===void 0x0?void 0x0:_0x5ce7dc[_0x43ed69(0x122)])==_0x43ed69(0x12b)&&(_0x5ce7dc=_0x5ce7dc[_0x43ed69(0x122)](_0x3a2f0a)),core_1[_0x43ed69(0x121)][_0x43ed69(0x130)](interface_1[_0x43ed69(0x124)],_0x5ce7dc,_0x15a9f1,_0x110605));else{const _0x10474f=core_1[_0x43ed69(0x121)][_0x43ed69(0x129)](interface_1[_0x43ed69(0x124)],_0x5ce7dc);if(_0x10474f){let _0xf8956c=(_0x9843c5=core_1[_0x43ed69(0x121)][_0x43ed69(0x129)](interface_1[_0x43ed69(0x124)],_0x15a9f1))!==null&&_0x9843c5!==void 0x0?_0x9843c5:{};Object['keys'](_0x10474f)[_0x43ed69(0x11b)](_0x3fafa4=>{!_0xf8956c[_0x3fafa4]&&(_0xf8956c[_0x3fafa4]=_0x10474f[_0x3fafa4]);}),core_1[_0x43ed69(0x121)][_0x43ed69(0x13b)](interface_1['RULES_KEY'],_0xf8956c,_0x15a9f1);}}};}function a2_0xde53(){const _0x85835c=['object','2023ducXGy','defineMetadata','search','13yQSjCF','extend','785uPfSqp','24460WzWfya','joi','name','5405412OQjSJR','30enSycq','map','149427XMsPKm','meta','isSchema','Array','1382bZlZDZ','MetadataManager','description','label','RULES_KEY','110WRTSsq','constructor','Rule','@joi/date','getOwnMetadata','296DIGXeE','function','1966531qyYTIG','RuleType','toString','__esModule','attachMetadata','(((.+)+)+)+$','1858648Udoyig','3404895chexOO','items','array','default','getPropertyType','apply'];a2_0xde53=function(){return _0x85835c;};return a2_0xde53();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a3_0x20a449=a3_0x5285;(function(_0x3331e4,_0x5720cb){const _0x49a198=a3_0x5285,_0x11a9d2=_0x3331e4();while(!![]){try{const _0x2576f5=parseInt(_0x49a198(0x1ff))/0x1*(-parseInt(_0x49a198(0x1f3))/0x2)+parseInt(_0x49a198(0x1ee))/0x3*(-parseInt(_0x49a198(0x1f0))/0x4)+-parseInt(_0x49a198(0x204))/0x5*(-parseInt(_0x49a198(0x1fc))/0x6)+-parseInt(_0x49a198(0x201))/0x7+-parseInt(_0x49a198(0x1f4))/0x8+-parseInt(_0x49a198(0x1ef))/0x9+parseInt(_0x49a198(0x1fe))/0xa;if(_0x2576f5===_0x5720cb)break;else _0x11a9d2['push'](_0x11a9d2['shift']());}catch(_0x596ae3){_0x11a9d2['push'](_0x11a9d2['shift']());}}}(a3_0x8885,0x5effb));function a3_0x8885(){const _0x12e222=['prototype','attachMetadata','__esModule','6zyxyCc','2716092tmqMbl','1218500vjAOSz','getFuncArgs','DecoratorManager','431306QfMggV','3732528TrxwyN','(((.+)+)+)+$','replace','constructor','VALIDATOR_KEY','search','defineProperty','toString','2154486lVgepZ','slice','21685710GdUQGF','1BCnxuv','@midwayjs/core','3816960oIUqgt','../interface','indexOf','5zFbbqC'];a3_0x8885=function(){return _0x12e222;};return a3_0x8885();}function a3_0x5285(_0x58b137,_0x397284){_0x58b137=_0x58b137-0x1ec;const _0x48b45f=a3_0x8885();let _0x1d1e0a=_0x48b45f[_0x58b137];return _0x1d1e0a;}const a3_0x168df4=(function(){let _0x1e3207=!![];return function(_0x4fc42b,_0x43155b){const _0x43003e=_0x1e3207?function(){if(_0x43155b){const _0x3669d4=_0x43155b['apply'](_0x4fc42b,arguments);return _0x43155b=null,_0x3669d4;}}:function(){};return _0x1e3207=![],_0x43003e;};}()),a3_0x1d1e0a=a3_0x168df4(this,function(){const _0x4f69c3=a3_0x5285;return a3_0x1d1e0a[_0x4f69c3(0x1fb)]()[_0x4f69c3(0x1f9)](_0x4f69c3(0x1f5))['toString']()[_0x4f69c3(0x1f7)](a3_0x1d1e0a)['search'](_0x4f69c3(0x1f5));});a3_0x1d1e0a();'use strict';Object[a3_0x20a449(0x1fa)](exports,a3_0x20a449(0x1ed),{'value':!![]}),exports['Validator']=Validator,exports[a3_0x20a449(0x1f1)]=getFuncArgs;const core_1=require(a3_0x20a449(0x200)),interface_1=require(a3_0x20a449(0x202));function Validator(_0x44726f={}){return(_0x3c8649,_0x4a6963,_0x21c371)=>{const _0x3f84c7=a3_0x5285,_0x472b02=getFuncArgs(_0x3c8649[_0x4a6963]);core_1['MetadataManager'][_0x3f84c7(0x1ec)](interface_1[_0x3f84c7(0x1f8)],{'method':_0x4a6963,'methodArgs':_0x472b02},_0x3c8649),core_1[_0x3f84c7(0x1f2)]['createCustomMethodDecorator'](interface_1['VALIDATOR_KEY'],_0x44726f)(_0x3c8649,_0x4a6963,_0x21c371);};}function getFuncArgs(_0x966b61){const _0x162f23=a3_0x20a449;if(typeof _0x966b61=='function'){const _0x42d2b3=/=>.*$/mg,_0xc56a77=/=[^,)]+/mg,_0xda331c=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x4ad316=(_0x966b61[_0x162f23(0x205)]?_0x966b61[_0x162f23(0x205)]['constructor'][_0x162f23(0x1fb)]():_0x966b61[_0x162f23(0x1fb)]())[_0x162f23(0x1f6)](_0xda331c,'')[_0x162f23(0x1f6)](_0x42d2b3,'')[_0x162f23(0x1f6)](_0xc56a77,''),_0x1982d4=_0x4ad316[_0x162f23(0x1fd)](_0x4ad316[_0x162f23(0x203)]('(')+0x1,_0x4ad316['indexOf'](')'))['match'](/([^\s,]+)/g)||[];return _0x1982d4;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x3db987=a4_0x525a;(function(_0x52276a,_0x445bb0){var _0x1c3998=a4_0x525a,_0x402f0f=_0x52276a();while(!![]){try{var _0x17fd7d=-parseInt(_0x1c3998(0xd3))/0x1+-parseInt(_0x1c3998(0xcf))/0x2*(-parseInt(_0x1c3998(0xea))/0x3)+parseInt(_0x1c3998(0xde))/0x4*(-parseInt(_0x1c3998(0xe2))/0x5)+parseInt(_0x1c3998(0xd9))/0x6+-parseInt(_0x1c3998(0xe1))/0x7*(-parseInt(_0x1c3998(0xe9))/0x8)+-parseInt(_0x1c3998(0xcd))/0x9+parseInt(_0x1c3998(0xd0))/0xa*(parseInt(_0x1c3998(0xce))/0xb);if(_0x17fd7d===_0x445bb0)break;else _0x402f0f['push'](_0x402f0f['shift']());}catch(_0x271b81){_0x402f0f['push'](_0x402f0f['shift']());}}}(a4_0x437f,0xc5635));var a4_0x5542c2=(function(){var _0x192a98=!![];return function(_0x1a0a91,_0x1836b6){var _0x109c8a=_0x192a98?function(){var _0xff8498=a4_0x525a;if(_0x1836b6){var _0x542f65=_0x1836b6[_0xff8498(0xe5)](_0x1a0a91,arguments);return _0x1836b6=null,_0x542f65;}}:function(){};return _0x192a98=![],_0x109c8a;};}()),a4_0x2d3ee4=a4_0x5542c2(this,function(){var _0x475ef3=a4_0x525a;return a4_0x2d3ee4[_0x475ef3(0xdf)]()[_0x475ef3(0xd7)](_0x475ef3(0xdb))['toString']()[_0x475ef3(0xe7)](a4_0x2d3ee4)['search'](_0x475ef3(0xdb));});a4_0x2d3ee4();'use strict';var __decorate=this&&this[a4_0x3db987(0xe6)]||function(_0x53712a,_0x25d24d,_0x3699bd,_0x4ee4ca){var _0x5e3a4e=a4_0x3db987,_0x28fb63=arguments[_0x5e3a4e(0xd1)],_0xd858a1=_0x28fb63<0x3?_0x25d24d:_0x4ee4ca===null?_0x4ee4ca=Object['getOwnPropertyDescriptor'](_0x25d24d,_0x3699bd):_0x4ee4ca,_0x32f74;if(typeof Reflect==='object'&&typeof Reflect[_0x5e3a4e(0xe4)]===_0x5e3a4e(0xdd))_0xd858a1=Reflect['decorate'](_0x53712a,_0x25d24d,_0x3699bd,_0x4ee4ca);else{for(var _0x4e17cb=_0x53712a['length']-0x1;_0x4e17cb>=0x0;_0x4e17cb--)if(_0x32f74=_0x53712a[_0x4e17cb])_0xd858a1=(_0x28fb63<0x3?_0x32f74(_0xd858a1):_0x28fb63>0x3?_0x32f74(_0x25d24d,_0x3699bd,_0xd858a1):_0x32f74(_0x25d24d,_0x3699bd))||_0xd858a1;}return _0x28fb63>0x3&&_0xd858a1&&Object['defineProperty'](_0x25d24d,_0x3699bd,_0xd858a1),_0xd858a1;},__metadata=this&&this[a4_0x3db987(0xe0)]||function(_0x1310d0,_0x3d452a){var _0x2811ba=a4_0x3db987;if(typeof Reflect==='object'&&typeof Reflect[_0x2811ba(0xe8)]===_0x2811ba(0xdd))return Reflect[_0x2811ba(0xe8)](_0x1310d0,_0x3d452a);};function a4_0x437f(){var _0x1e7696=['AnnErrorMsg','1129590tDUbSZ','PARAMS','(((.+)+)+)+$','design:type','function','4HxGvIU','toString','__metadata','21462rZEyFb','3159705bVcNPW','defineProperty','decorate','apply','__decorate','constructor','metadata','1240mQIZsj','23553jLDQvW','13156785ruXEbW','713493usiSMy','218xoFYjg','430CyrcIx','length','ValidatorError','1406056mJznLp','__esModule','NOFIND_SCHEMA','@anveroapi/core','search'];a4_0x437f=function(){return _0x1e7696;};return a4_0x437f();}function a4_0x525a(_0x1fd3a7,_0x681d56){_0x1fd3a7=_0x1fd3a7-0xcd;var _0x1602bd=a4_0x437f();var _0x2d3ee4=_0x1602bd[_0x1fd3a7];return _0x2d3ee4;}Object[a4_0x3db987(0xe3)](exports,a4_0x3db987(0xd4),{'value':!![]}),exports['ValidatorError']=void 0x0;const core_1=require(a4_0x3db987(0xd6));class ValidatorError extends AnnError{}exports[a4_0x3db987(0xd2)]=ValidatorError,ValidatorError[a4_0x3db987(0xda)]=0x18c1e,ValidatorError[a4_0x3db987(0xd5)]=0x18c1c,__decorate([(0x0,core_1[a4_0x3db987(0xd8)])('参数验证失败'),__metadata('design:type',Object)],ValidatorError,a4_0x3db987(0xda),void 0x0),__decorate([(0x0,core_1[a4_0x3db987(0xd8)])('参数验证失败'),__metadata(a4_0x3db987(0xdc),Object)],ValidatorError,a4_0x3db987(0xd5),void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a5_0x5067e8=a5_0x5657;function a5_0x18fe(){const _0x21c0ca=['prototype','defineMetadata','OmitDto','2139290gLbmra','4UGKYcR','2NzwRGt','search','7RZMdMm','648377gqEWqB','7611100YsNUCl','constructor','4234614NCogVl','3425070qCcxlQ','(((.+)+)+)+$','../interface','RULES_KEY','MetadataManager','@midwayjs/core','getDtoRules','PickDto','3071205UIzJfB','toString','691471muKAwe','16zoQoui','apply'];a5_0x18fe=function(){return _0x21c0ca;};return a5_0x18fe();}(function(_0x4f0d0e,_0x5b3dc1){const _0x52024c=a5_0x5657,_0x292f86=_0x4f0d0e();while(!![]){try{const _0x2fea51=-parseInt(_0x52024c(0xd6))/0x1*(-parseInt(_0x52024c(0xd3))/0x2)+parseInt(_0x52024c(0xda))/0x3*(-parseInt(_0x52024c(0xd2))/0x4)+parseInt(_0x52024c(0xea))/0x5+parseInt(_0x52024c(0xd9))/0x6*(-parseInt(_0x52024c(0xd5))/0x7)+-parseInt(_0x52024c(0xe5))/0x8*(-parseInt(_0x52024c(0xe2))/0x9)+parseInt(_0x52024c(0xd7))/0xa+-parseInt(_0x52024c(0xe4))/0xb;if(_0x2fea51===_0x5b3dc1)break;else _0x292f86['push'](_0x292f86['shift']());}catch(_0x58cf8b){_0x292f86['push'](_0x292f86['shift']());}}}(a5_0x18fe,0x94ceb));const a5_0x3a2271=(function(){let _0x407879=!![];return function(_0x2c342c,_0x3a5fee){const _0x24c3a9=_0x407879?function(){const _0x1087f7=a5_0x5657;if(_0x3a5fee){const _0x211769=_0x3a5fee[_0x1087f7(0xe6)](_0x2c342c,arguments);return _0x3a5fee=null,_0x211769;}}:function(){};return _0x407879=![],_0x24c3a9;};}()),a5_0x37d0df=a5_0x3a2271(this,function(){const _0x424cd1=a5_0x5657;return a5_0x37d0df[_0x424cd1(0xe3)]()[_0x424cd1(0xd4)](_0x424cd1(0xdb))['toString']()[_0x424cd1(0xd8)](a5_0x37d0df)[_0x424cd1(0xd4)]('(((.+)+)+)+$');});a5_0x37d0df();'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a5_0x5067e8(0xe1)]=PickDto,exports[a5_0x5067e8(0xe9)]=OmitDto;const core_1=require(a5_0x5067e8(0xdf)),interface_1=require(a5_0x5067e8(0xdc)),getSchema_1=require('./getSchema');function PickDto(_0x4794f1,_0x34906f){const _0x27c33c=a5_0x5067e8,_0x5d7572=function(){};_0x5d7572[_0x27c33c(0xe7)]=_0x4794f1[_0x27c33c(0xe7)];const _0x1da638=(0x0,getSchema_1[_0x27c33c(0xe0)])(_0x4794f1),_0x156934={};for(const _0x1ed3b2 of _0x34906f){_0x1da638[_0x1ed3b2]&&(_0x156934[_0x1ed3b2]=_0x1da638[_0x1ed3b2]);}return core_1[_0x27c33c(0xde)]['defineMetadata'](interface_1[_0x27c33c(0xdd)],_0x156934,_0x5d7572),_0x5d7572;}function a5_0x5657(_0x292ff8,_0x3f9e90){_0x292ff8=_0x292ff8-0xd2;const _0x57ec49=a5_0x18fe();let _0x37d0df=_0x57ec49[_0x292ff8];return _0x37d0df;}function OmitDto(_0x26aecc,_0x4c7561){const _0x3673f7=a5_0x5067e8,_0x1e5cf6=function(){};_0x1e5cf6['prototype']=_0x26aecc[_0x3673f7(0xe7)];const _0x39b6c1=(0x0,getSchema_1['getDtoRules'])(_0x26aecc),_0x47e153=Object['assign']({},_0x39b6c1);for(const _0x3fafab of _0x4c7561){delete _0x47e153[_0x3fafab];}return core_1[_0x3673f7(0xde)][_0x3673f7(0xe8)](interface_1[_0x3673f7(0xdd)],_0x47e153,_0x1e5cf6),_0x1e5cf6;}
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a6_0x5086(){const _0x1d2df1=['constructor','1044172viTTgc','MetadataManager','4567510WYNgrb','@midwayjs/core','2712072raQkYC','3swgNPV','getPropertiesWithMetadata','5jAZCZI','232QLfEJi','object','getSchema','entries','1198824WTFIBr','74816DFWZdi','joi','__esModule','213394hdbQgT','9RLVNbY','622887erNwqO','11qaOZWa','map','toString','(((.+)+)+)+$','RULES_KEY','length','search','getDtoRules','isArray'];a6_0x5086=function(){return _0x1d2df1;};return a6_0x5086();}const a6_0x26ad08=a6_0x3c17;(function(_0x37a648,_0x17d360){const _0x35670a=a6_0x3c17,_0x2ebe32=_0x37a648();while(!![]){try{const _0x5b00cb=parseInt(_0x35670a(0xd7))/0x1+-parseInt(_0x35670a(0xd5))/0x2*(-parseInt(_0x35670a(0xe7))/0x3)+parseInt(_0x35670a(0xe2))/0x4*(-parseInt(_0x35670a(0xe9))/0x5)+-parseInt(_0x35670a(0xee))/0x6+parseInt(_0x35670a(0xef))/0x7*(parseInt(_0x35670a(0xea))/0x8)+parseInt(_0x35670a(0xd6))/0x9*(-parseInt(_0x35670a(0xe4))/0xa)+parseInt(_0x35670a(0xd8))/0xb*(parseInt(_0x35670a(0xe6))/0xc);if(_0x5b00cb===_0x17d360)break;else _0x2ebe32['push'](_0x2ebe32['shift']());}catch(_0x36e4f8){_0x2ebe32['push'](_0x2ebe32['shift']());}}}(a6_0x5086,0x54f28));function a6_0x3c17(_0x48db4d,_0x1cf59b){_0x48db4d=_0x48db4d-0xd3;const _0x193dce=a6_0x5086();let _0x4e028b=_0x193dce[_0x48db4d];return _0x4e028b;}const a6_0x4f16f3=(function(){let _0x5407ec=!![];return function(_0x5e29d6,_0x519741){const _0x52c6f8=_0x5407ec?function(){if(_0x519741){const _0x2c7189=_0x519741['apply'](_0x5e29d6,arguments);return _0x519741=null,_0x2c7189;}}:function(){};return _0x5407ec=![],_0x52c6f8;};}()),a6_0x4e028b=a6_0x4f16f3(this,function(){const _0x2fdc1d=a6_0x3c17;return a6_0x4e028b[_0x2fdc1d(0xda)]()[_0x2fdc1d(0xde)](_0x2fdc1d(0xdb))['toString']()[_0x2fdc1d(0xe1)](a6_0x4e028b)[_0x2fdc1d(0xde)](_0x2fdc1d(0xdb));});a6_0x4e028b();'use strict';Object['defineProperty'](exports,a6_0x26ad08(0xd4),{'value':!![]}),exports[a6_0x26ad08(0xdf)]=getDtoRules,exports[a6_0x26ad08(0xec)]=getSchema;const Joi=require(a6_0x26ad08(0xd3)),core_1=require(a6_0x26ad08(0xe5)),interface_1=require('../interface');function getDtoRules(_0x990add){const _0x43ac02=a6_0x26ad08,_0x3cb565=core_1[_0x43ac02(0xe3)]['getMetadata'](interface_1[_0x43ac02(0xdc)],_0x990add);if(_0x3cb565!==undefined)return _0x3cb565;return Object['fromEntries'](Object[_0x43ac02(0xed)](core_1[_0x43ac02(0xe3)][_0x43ac02(0xe8)](interface_1[_0x43ac02(0xdc)],_0x990add))[_0x43ac02(0xd9)](([_0x5be2bb,_0x19a581])=>[_0x5be2bb,Array[_0x43ac02(0xe0)](_0x19a581)&&_0x19a581[_0x43ac02(0xdd)]?_0x19a581[_0x19a581[_0x43ac02(0xdd)]-0x1]:_0x19a581]));}function getSchema(_0x4ebd46){const _0xcdb210=a6_0x26ad08,_0x3958fe=getDtoRules(_0x4ebd46);if(_0x3958fe)return Joi[_0xcdb210(0xeb)](_0x3958fe);}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a7_0x6faf7b=a7_0x4266;(function(_0x1d061e,_0x2b5cf1){var _0x56d948=a7_0x4266,_0x1fbc55=_0x1d061e();while(!![]){try{var _0x2ac03d=-parseInt(_0x56d948(0x100))/0x1*(-parseInt(_0x56d948(0xee))/0x2)+-parseInt(_0x56d948(0x10f))/0x3*(parseInt(_0x56d948(0xf1))/0x4)+parseInt(_0x56d948(0x105))/0x5*(parseInt(_0x56d948(0x109))/0x6)+-parseInt(_0x56d948(0xeb))/0x7+-parseInt(_0x56d948(0xf2))/0x8*(-parseInt(_0x56d948(0xf0))/0x9)+-parseInt(_0x56d948(0xf7))/0xa+-parseInt(_0x56d948(0x108))/0xb;if(_0x2ac03d===_0x2b5cf1)break;else _0x1fbc55['push'](_0x1fbc55['shift']());}catch(_0xe44c31){_0x1fbc55['push'](_0x1fbc55['shift']());}}}(a7_0x4315,0x83ff0));var a7_0x584d59=(function(){var _0x575be4=!![];return function(_0x1c49d6,_0x5c7b84){var _0x1cf3d0=_0x575be4?function(){if(_0x5c7b84){var _0x2cb64c=_0x5c7b84['apply'](_0x1c49d6,arguments);return _0x5c7b84=null,_0x2cb64c;}}:function(){};return _0x575be4=![],_0x1cf3d0;};}()),a7_0x352971=a7_0x584d59(this,function(){var _0x47aeaf=a7_0x4266;return a7_0x352971[_0x47aeaf(0x107)]()[_0x47aeaf(0x104)](_0x47aeaf(0x106))[_0x47aeaf(0x107)]()[_0x47aeaf(0xff)](a7_0x352971)['search'](_0x47aeaf(0x106));});a7_0x352971();'use strict';var __createBinding=this&&this[a7_0x6faf7b(0xfa)]||(Object[a7_0x6faf7b(0xf5)]?function(_0x480980,_0x4c9e71,_0x337153,_0x2366a7){var _0x2f295d=a7_0x6faf7b;if(_0x2366a7===undefined)_0x2366a7=_0x337153;var _0x5c96c3=Object[_0x2f295d(0x102)](_0x4c9e71,_0x337153);(!_0x5c96c3||(_0x2f295d(0xf8)in _0x5c96c3?!_0x4c9e71['__esModule']:_0x5c96c3[_0x2f295d(0xec)]||_0x5c96c3[_0x2f295d(0x103)]))&&(_0x5c96c3={'enumerable':!![],'get':function(){return _0x4c9e71[_0x337153];}}),Object[_0x2f295d(0xfb)](_0x480980,_0x2366a7,_0x5c96c3);}:function(_0x3d722c,_0x483081,_0x2a1ead,_0xd00e6e){if(_0xd00e6e===undefined)_0xd00e6e=_0x2a1ead;_0x3d722c[_0xd00e6e]=_0x483081[_0x2a1ead];}),__exportStar=this&&this['__exportStar']||function(_0x29aab9,_0x2bcaef){var _0x22d300=a7_0x6faf7b;for(var _0xf441f3 in _0x29aab9)if(_0xf441f3!==_0x22d300(0xfe)&&!Object[_0x22d300(0xfd)][_0x22d300(0xf6)][_0x22d300(0xf9)](_0x2bcaef,_0xf441f3))__createBinding(_0x2bcaef,_0x29aab9,_0xf441f3);};Object[a7_0x6faf7b(0xfb)](exports,'__esModule',{'value':!![]}),exports['Configuration']=exports[a7_0x6faf7b(0x10c)]=exports[a7_0x6faf7b(0x10b)]=exports[a7_0x6faf7b(0x112)]=exports['Rule']=exports[a7_0x6faf7b(0xef)]=void 0x0,__exportStar(require(a7_0x6faf7b(0xfc)),exports),__exportStar(require(a7_0x6faf7b(0xed)),exports),__exportStar(require(a7_0x6faf7b(0xf4)),exports);var Validator_1=require('./decorator/Validator');Object[a7_0x6faf7b(0xfb)](exports,a7_0x6faf7b(0xef),{'enumerable':!![],'get':function(){return Validator_1['Validator'];}});var Rule_1=require(a7_0x6faf7b(0x101));Object[a7_0x6faf7b(0xfb)](exports,'Rule',{'enumerable':!![],'get':function(){var _0x53651d=a7_0x6faf7b;return Rule_1[_0x53651d(0x10d)];}}),Object['defineProperty'](exports,a7_0x6faf7b(0x112),{'enumerable':!![],'get':function(){var _0x31b7ec=a7_0x6faf7b;return Rule_1[_0x31b7ec(0x112)];}});var ValidatorError_1=require(a7_0x6faf7b(0x110));Object[a7_0x6faf7b(0xfb)](exports,a7_0x6faf7b(0x10b),{'enumerable':!![],'get':function(){var _0x4c113c=a7_0x6faf7b;return ValidatorError_1[_0x4c113c(0x10b)];}});function a7_0x4315(){var _0x135a32=['6579CnBzmx','220ylaLsz','10904uNdKtP','CustomConfiguration','./helper/getSchema','create','hasOwnProperty','1171900KuvaCL','get','call','__createBinding','defineProperty','./interface','prototype','default','constructor','575QlQnix','./decorator/Rule','getOwnPropertyDescriptor','configurable','search','520895spyLuJ','(((.+)+)+)+$','toString','8717170TPReKc','18WmfTHq','./service/ValidatorService','ValidatorError','ValidatorService','Rule','Configuration','43875FzMLOU','./exception/ValidatorError','./configuration','RuleType','813568XWtLwb','writable','./helper/dtoHelper','3694xDEKfm','Validator'];a7_0x4315=function(){return _0x135a32;};return a7_0x4315();}var ValidatorService_1=require(a7_0x6faf7b(0x10a));function a7_0x4266(_0x2efb95,_0x3a01e7){_0x2efb95=_0x2efb95-0xeb;var _0x21cfd6=a7_0x4315();var _0x352971=_0x21cfd6[_0x2efb95];return _0x352971;}Object['defineProperty'](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x319ebe=a7_0x6faf7b;return ValidatorService_1[_0x319ebe(0x10c)];}});var configuration_1=require(a7_0x6faf7b(0x111));Object[a7_0x6faf7b(0xfb)](exports,a7_0x6faf7b(0x10e),{'enumerable':!![],'get':function(){var _0x18bafb=a7_0x6faf7b;return configuration_1[_0x18bafb(0xf3)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a8_0x53a878=a8_0x40d1;(function(_0x4bcb02,_0x4a2928){var _0x3ad50b=a8_0x40d1,_0x49238e=_0x4bcb02();while(!![]){try{var _0x3193ad=-parseInt(_0x3ad50b(0x19d))/0x1*(-parseInt(_0x3ad50b(0x1a3))/0x2)+parseInt(_0x3ad50b(0x199))/0x3*(-parseInt(_0x3ad50b(0x197))/0x4)+parseInt(_0x3ad50b(0x19f))/0x5*(parseInt(_0x3ad50b(0x1a2))/0x6)+-parseInt(_0x3ad50b(0x196))/0x7+parseInt(_0x3ad50b(0x1a6))/0x8*(parseInt(_0x3ad50b(0x1a9))/0x9)+-parseInt(_0x3ad50b(0x194))/0xa+-parseInt(_0x3ad50b(0x1a0))/0xb*(-parseInt(_0x3ad50b(0x19a))/0xc);if(_0x3193ad===_0x4a2928)break;else _0x49238e['push'](_0x49238e['shift']());}catch(_0x5eb8e1){_0x49238e['push'](_0x49238e['shift']());}}}(a8_0x4ec7,0x20f68));var a8_0x13ccb6=(function(){var _0x5e374b=!![];return function(_0x5a1a72,_0x5a126e){var _0x33493f=_0x5e374b?function(){var _0x1c9510=a8_0x40d1;if(_0x5a126e){var _0x2ec5f2=_0x5a126e[_0x1c9510(0x1a1)](_0x5a1a72,arguments);return _0x5a126e=null,_0x2ec5f2;}}:function(){};return _0x5e374b=![],_0x33493f;};}()),a8_0x1a8c0e=a8_0x13ccb6(this,function(){var _0x254b44=a8_0x40d1;return a8_0x1a8c0e[_0x254b44(0x19c)]()[_0x254b44(0x1a8)](_0x254b44(0x195))['toString']()[_0x254b44(0x1a5)](a8_0x1a8c0e)[_0x254b44(0x1a8)](_0x254b44(0x195));});a8_0x1a8c0e();'use strict';function a8_0x40d1(_0x245d5c,_0x11fcd7){_0x245d5c=_0x245d5c-0x194;var _0x2d1c41=a8_0x4ec7();var _0x1a8c0e=_0x2d1c41[_0x245d5c];return _0x1a8c0e;}function a8_0x4ec7(){var _0x436e95=['63890QpapJg','3223XPLCSc','apply','12ygzGTS','2WGFLIF','anvero-api:validator:rules','constructor','8BqHNGR','defineProperty','search','849546LTpqWX','1733320OenKek','(((.+)+)+)+$','992502YLSlzO','4zkvBdI','RULES_KEY','53202LqxIfP','11604qJTUPz','__esModule','toString','64587PCdQce','VALIDATOR_KEY'];a8_0x4ec7=function(){return _0x436e95;};return a8_0x4ec7();}Object[a8_0x53a878(0x1a7)](exports,a8_0x53a878(0x19b),{'value':!![]}),exports[a8_0x53a878(0x19e)]=exports['RULES_KEY']=void 0x0,exports[a8_0x53a878(0x198)]=a8_0x53a878(0x1a4),exports[a8_0x53a878(0x19e)]='anvero-api:validator:validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a9_0x4a0f(){const _0x1c49e0=['MidwayI18nServiceSingleton','326VSCdvk','2879046mjpudU','message','getSchema','3712880ElhZMs','3919422WShLLC','date','design:paramtypes','getDtoRules','validationOptions','@midwayjs/core','defineProperty','schema','7712656JEEBwJ','localeTable','metadata','../helper/getSchema','apply','i18nService','4rZATEF','__decorate','$_terms','design:type','参数验证失败','language','6371hslNNS','ValidatorService','validator','value','assign','details','__metadata','getLocaleMapping','format','Inject','errors','design:returntype','error','i18n','keys','8500535IUdXsg','fromEntries','Singleton','YYYY-MM-DD\x20HH:mm:ss','PARAMS','locale','../exception/ValidatorError','formatLocale','i18nConfig','isSchema','messages','55qjJKGY','type','object','Provide','validatorConfig','function','key','_flags','Config','search','5302552cNfILe','forEach','defaultLocale','getAvailableLocale','9XDhoaJ','ValidatorError','toString','Init','Scope','init','length','decorate','(((.+)+)+)+$','ScopeEnum','prototype'];a9_0x4a0f=function(){return _0x1c49e0;};return a9_0x4a0f();}const a9_0x55e71c=a9_0x14d8;(function(_0x3e8815,_0x297279){const _0x422114=a9_0x14d8,_0x1b7dcb=_0x3e8815();while(!![]){try{const _0xf7f335=parseInt(_0x422114(0xae))/0x1*(parseInt(_0x422114(0x95))/0x2)+parseInt(_0x422114(0x9a))/0x3*(parseInt(_0x422114(0xa8))/0x4)+parseInt(_0x422114(0xbd))/0x5+parseInt(_0x422114(0x96))/0x6+-parseInt(_0x422114(0xa2))/0x7+-parseInt(_0x422114(0x85))/0x8*(parseInt(_0x422114(0x89))/0x9)+-parseInt(_0x422114(0x99))/0xa*(parseInt(_0x422114(0x7b))/0xb);if(_0xf7f335===_0x297279)break;else _0x1b7dcb['push'](_0x1b7dcb['shift']());}catch(_0x42dba8){_0x1b7dcb['push'](_0x1b7dcb['shift']());}}}(a9_0x4a0f,0xdca94));const a9_0x38f1ed=(function(){let _0x541478=!![];return function(_0x3415bc,_0x60d25a){const _0x2bfab7=_0x541478?function(){const _0x58714a=a9_0x14d8;if(_0x60d25a){const _0x5346db=_0x60d25a[_0x58714a(0xa6)](_0x3415bc,arguments);return _0x60d25a=null,_0x5346db;}}:function(){};return _0x541478=![],_0x2bfab7;};}()),a9_0x2e0575=a9_0x38f1ed(this,function(){const _0x416f72=a9_0x14d8;return a9_0x2e0575[_0x416f72(0x8b)]()[_0x416f72(0x84)](_0x416f72(0x91))[_0x416f72(0x8b)]()['constructor'](a9_0x2e0575)[_0x416f72(0x84)](_0x416f72(0x91));});a9_0x2e0575();'use strict';function a9_0x14d8(_0xeb3d14,_0x1accf5){_0xeb3d14=_0xeb3d14-0x75;const _0x2562ea=a9_0x4a0f();let _0x2e0575=_0x2562ea[_0xeb3d14];return _0x2e0575;}var __decorate=this&&this[a9_0x55e71c(0xa9)]||function(_0x3dce99,_0x4cfa9a,_0x103bba,_0x6ac730){const _0x1d6bba=a9_0x55e71c;var _0x473e1d=arguments['length'],_0x1f7086=_0x473e1d<0x3?_0x4cfa9a:_0x6ac730===null?_0x6ac730=Object['getOwnPropertyDescriptor'](_0x4cfa9a,_0x103bba):_0x6ac730,_0x4ff8e4;if(typeof Reflect===_0x1d6bba(0x7d)&&typeof Reflect[_0x1d6bba(0x90)]===_0x1d6bba(0x80))_0x1f7086=Reflect[_0x1d6bba(0x90)](_0x3dce99,_0x4cfa9a,_0x103bba,_0x6ac730);else{for(var _0x535198=_0x3dce99[_0x1d6bba(0x8f)]-0x1;_0x535198>=0x0;_0x535198--)if(_0x4ff8e4=_0x3dce99[_0x535198])_0x1f7086=(_0x473e1d<0x3?_0x4ff8e4(_0x1f7086):_0x473e1d>0x3?_0x4ff8e4(_0x4cfa9a,_0x103bba,_0x1f7086):_0x4ff8e4(_0x4cfa9a,_0x103bba))||_0x1f7086;}return _0x473e1d>0x3&&_0x1f7086&&Object[_0x1d6bba(0xa0)](_0x4cfa9a,_0x103bba,_0x1f7086),_0x1f7086;},__metadata=this&&this[a9_0x55e71c(0xb4)]||function(_0x5af4da,_0x5ba2be){const _0x2f9d0d=a9_0x55e71c;if(typeof Reflect===_0x2f9d0d(0x7d)&&typeof Reflect[_0x2f9d0d(0xa4)]===_0x2f9d0d(0x80))return Reflect['metadata'](_0x5af4da,_0x5ba2be);};Object[a9_0x55e71c(0xa0)](exports,'__esModule',{'value':!![]}),exports[a9_0x55e71c(0xaf)]=void 0x0;const Joi=require('joi'),i18n_1=require('@midwayjs/i18n'),core_1=require(a9_0x55e71c(0x9f)),getSchema_1=require(a9_0x55e71c(0xa5)),ValidatorError_1=require(a9_0x55e71c(0x76));let ValidatorService=class ValidatorService{constructor(){const _0x210f2e=a9_0x55e71c;this[_0x210f2e(0x7a)]={};}async[a9_0x55e71c(0x8e)](){const _0x832b4=a9_0x55e71c,_0x9690b2=Object[_0x832b4(0xbc)](this[_0x832b4(0x78)][_0x832b4(0xa3)]);_0x9690b2[_0x832b4(0x86)](_0x146846=>{const _0x23cc14=_0x832b4;this[_0x23cc14(0x7a)][(0x0,i18n_1[_0x23cc14(0x77)])(_0x146846)]=Object[_0x23cc14(0xbe)](this['i18nService'][_0x23cc14(0xb5)](_0x146846,'validator'));});}[a9_0x55e71c(0x98)](_0x59894a){const _0x21dda6=a9_0x55e71c,_0x159045=(0x0,getSchema_1[_0x21dda6(0x9d)])(_0x59894a);return _0x159045?Joi['object'](_0x159045):undefined;}[a9_0x55e71c(0xb0)](_0x385d18,_0x102c01,_0x3f8b65={}){const _0x1afbac=a9_0x55e71c;var _0x2946d0,_0x38ed14,_0x5f5dd5,_0x38985f,_0x5d7290,_0x264146;const _0x243f27=Joi[_0x1afbac(0x79)](_0x385d18)?_0x385d18:this[_0x1afbac(0x98)](_0x385d18);if(!_0x243f27)throw new AnnError(ValidatorError_1[_0x1afbac(0x8a)]['NOFIND_SCHEMA']);_0x3f8b65[_0x1afbac(0x9e)]=Object[_0x1afbac(0xb2)]((_0x2946d0=this[_0x1afbac(0x7f)][_0x1afbac(0x9e)])!==null&&_0x2946d0!==void 0x0?_0x2946d0:{},{'messages':this[_0x1afbac(0x7a)]},_0x3f8b65[_0x1afbac(0x9e)]||{}),_0x3f8b65[_0x1afbac(0x9e)][_0x1afbac(0xb8)]=_0x3f8b65[_0x1afbac(0x9e)][_0x1afbac(0xb8)]||{},_0x3f8b65['validationOptions']['errors'][_0x1afbac(0xad)]=(0x0,i18n_1[_0x1afbac(0x77)])(this['i18nService'][_0x1afbac(0x88)](_0x3f8b65['validationOptions']['errors'][_0x1afbac(0xad)]||_0x3f8b65[_0x1afbac(0x75)]||this[_0x1afbac(0x78)][_0x1afbac(0x87)],_0x1afbac(0xb0)));const _0x1a54a4=_0x243f27['validate'](_0x102c01,_0x3f8b65[_0x1afbac(0x9e)]);if(_0x1a54a4===null||_0x1a54a4===void 0x0?void 0x0:_0x1a54a4[_0x1afbac(0xba)]){if(_0x1a54a4[_0x1afbac(0xba)]instanceof AnnError)throw _0x1a54a4[_0x1afbac(0xba)];else{if(_0x1a54a4[_0x1afbac(0xba)]instanceof Error)throw new AnnError(ValidatorError_1[_0x1afbac(0x8a)][_0x1afbac(0xc1)],{'message':((_0x38ed14=_0x1a54a4[_0x1afbac(0xba)])===null||_0x38ed14===void 0x0?void 0x0:_0x38ed14[_0x1afbac(0x97)])||_0x1afbac(0xac)});else throw new AnnError(ValidatorError_1[_0x1afbac(0x8a)][_0x1afbac(0xc1)],{'message':((_0x5d7290=(_0x38985f=(_0x5f5dd5=_0x1a54a4[_0x1afbac(0xba)])===null||_0x5f5dd5===void 0x0?void 0x0:_0x5f5dd5[_0x1afbac(0xb3)])===null||_0x38985f===void 0x0?void 0x0:_0x38985f[0x0])===null||_0x5d7290===void 0x0?void 0x0:_0x5d7290[_0x1afbac(0x97)])||'参数验证失败'});}}if(_0x1a54a4===null||_0x1a54a4===void 0x0?void 0x0:_0x1a54a4['value']){const _0x1f2abf=(_0x264146=_0x243f27===null||_0x243f27===void 0x0?void 0x0:_0x243f27[_0x1afbac(0xaa)])===null||_0x264146===void 0x0?void 0x0:_0x264146[_0x1afbac(0xbc)],_0x35fab2=function(_0x21e8c8,_0x1d8900){const _0x2fb375=_0x1afbac;var _0x2e5657,_0x5b4da4,_0x8aa0e9,_0x33f196,_0x3ebc0f,_0x469bca,_0x310591,_0x2d5316,_0x18b368,_0x360ea9,_0x3328eb;for(let _0xc321eb in _0x21e8c8){if(_0x1d8900[(_0x2e5657=_0x21e8c8[_0xc321eb])===null||_0x2e5657===void 0x0?void 0x0:_0x2e5657['key']]&&((_0x8aa0e9=(_0x5b4da4=_0x21e8c8[_0xc321eb])===null||_0x5b4da4===void 0x0?void 0x0:_0x5b4da4['schema'])===null||_0x8aa0e9===void 0x0?void 0x0:_0x8aa0e9[_0x2fb375(0x7c)])){if(((_0x3ebc0f=(_0x33f196=_0x21e8c8[_0xc321eb])===null||_0x33f196===void 0x0?void 0x0:_0x33f196['schema'])===null||_0x3ebc0f===void 0x0?void 0x0:_0x3ebc0f[_0x2fb375(0x7c)])=='object')_0x1d8900[_0x21e8c8[_0xc321eb][_0x2fb375(0x81)]]=_0x35fab2((_0x310591=(_0x469bca=_0x21e8c8[_0xc321eb])===null||_0x469bca===void 0x0?void 0x0:_0x469bca[_0x2fb375(0xa1)]['$_terms'])===null||_0x310591===void 0x0?void 0x0:_0x310591[_0x2fb375(0xbc)],_0x1d8900[_0x21e8c8[_0xc321eb][_0x2fb375(0x81)]]);else{if(_0x21e8c8[_0xc321eb][_0x2fb375(0xa1)][_0x2fb375(0x7c)]==_0x2fb375(0x9b)&&_0x1a54a4['value'][(_0x2d5316=_0x21e8c8[_0xc321eb])===null||_0x2d5316===void 0x0?void 0x0:_0x2d5316[_0x2fb375(0x81)]]){const _0x22a233=((_0x3328eb=(_0x360ea9=(_0x18b368=_0x21e8c8[_0xc321eb])===null||_0x18b368===void 0x0?void 0x0:_0x18b368[_0x2fb375(0xa1)])===null||_0x360ea9===void 0x0?void 0x0:_0x360ea9[_0x2fb375(0x82)])===null||_0x3328eb===void 0x0?void 0x0:_0x3328eb[_0x2fb375(0xb6)])||_0x2fb375(0xc0);_0x1d8900[_0x21e8c8[_0xc321eb]['key']]=dayjs(_0x1a54a4['value'][_0x21e8c8[_0xc321eb][_0x2fb375(0x81)]])['format'](_0x22a233);}}}}return _0x1d8900;};return _0x35fab2(_0x1f2abf,_0x1a54a4[_0x1afbac(0xb1)]);}throw new AnnError(ValidatorError_1['ValidatorError'][_0x1afbac(0xc1)]);}};exports[a9_0x55e71c(0xaf)]=ValidatorService,__decorate([(0x0,core_1[a9_0x55e71c(0x83)])(a9_0x55e71c(0xbb)),__metadata(a9_0x55e71c(0xab),Object)],ValidatorService[a9_0x55e71c(0x93)],'i18nConfig',void 0x0),__decorate([(0x0,core_1[a9_0x55e71c(0x83)])(a9_0x55e71c(0xb0)),__metadata('design:type',Object)],ValidatorService[a9_0x55e71c(0x93)],a9_0x55e71c(0x7f),void 0x0),__decorate([(0x0,core_1[a9_0x55e71c(0xb7)])(),__metadata('design:type',i18n_1[a9_0x55e71c(0x94)])],ValidatorService[a9_0x55e71c(0x93)],a9_0x55e71c(0xa7),void 0x0),__decorate([(0x0,core_1[a9_0x55e71c(0x8c)])(),__metadata(a9_0x55e71c(0xab),Function),__metadata(a9_0x55e71c(0x9c),[]),__metadata(a9_0x55e71c(0xb9),Promise)],ValidatorService[a9_0x55e71c(0x93)],a9_0x55e71c(0x8e),null),exports[a9_0x55e71c(0xaf)]=ValidatorService=__decorate([(0x0,core_1[a9_0x55e71c(0x7e)])(a9_0x55e71c(0xb0)),(0x0,core_1[a9_0x55e71c(0x8d)])(core_1[a9_0x55e71c(0x92)][a9_0x55e71c(0xbf)])],ValidatorService);
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@anveroapi/validator",
|
|
3
|
+
"version": "4.0.2",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"typings": "index.d.ts",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"locales",
|
|
10
|
+
"index.d.ts"
|
|
11
|
+
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public",
|
|
14
|
+
"registry": "https://registry.npmjs.org/"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"joi": "^17.11.0",
|
|
18
|
+
"@joi/date": "^2.1.0",
|
|
19
|
+
"@midwayjs/core": "^4.2.6",
|
|
20
|
+
"@midwayjs/i18n": "^4.2.6",
|
|
21
|
+
"@anveroapi/core": "^4.0.2"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"typescript": "~5.9.3",
|
|
25
|
+
"@types/node": "20.10.0",
|
|
26
|
+
"javascript-obfuscator": "^4.0.2"
|
|
27
|
+
},
|
|
28
|
+
"gitHead": "f7d4644d5e0591c4b383021edab6db20d1714880",
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build2": "tsc",
|
|
31
|
+
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
32
|
+
}
|
|
33
|
+
}
|