@anveroapi/validator 4.1.4 → 4.1.5
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
|
-
const
|
|
1
|
+
const a0_0x1c456a=a0_0x41ca;(function(_0x2bc19a,_0x3034ab){const _0x5c0639=a0_0x41ca,_0x3dea30=_0x2bc19a();while(!![]){try{const _0x131b01=-parseInt(_0x5c0639(0xa0))/0x1+-parseInt(_0x5c0639(0xa3))/0x2+-parseInt(_0x5c0639(0x97))/0x3*(-parseInt(_0x5c0639(0x9b))/0x4)+-parseInt(_0x5c0639(0x99))/0x5*(-parseInt(_0x5c0639(0xa1))/0x6)+-parseInt(_0x5c0639(0x95))/0x7+parseInt(_0x5c0639(0x93))/0x8+-parseInt(_0x5c0639(0x9a))/0x9*(-parseInt(_0x5c0639(0x94))/0xa);if(_0x131b01===_0x3034ab)break;else _0x3dea30['push'](_0x3dea30['shift']());}catch(_0x4cbe36){_0x3dea30['push'](_0x3dea30['shift']());}}}(a0_0x2b5c,0xdfab3));const a0_0x7106c1=(function(){let _0x5e69b5=!![];return function(_0x340f2c,_0x9bc12a){const _0x357023=_0x5e69b5?function(){const _0x5cda32=a0_0x41ca;if(_0x9bc12a){const _0xfdf37f=_0x9bc12a[_0x5cda32(0x9c)](_0x340f2c,arguments);return _0x9bc12a=null,_0xfdf37f;}}:function(){};return _0x5e69b5=![],_0x357023;};}()),a0_0x52ee88=a0_0x7106c1(this,function(){const _0x21ee47=a0_0x41ca;return a0_0x52ee88[_0x21ee47(0xa6)]()[_0x21ee47(0x9f)](_0x21ee47(0x98))[_0x21ee47(0xa6)]()[_0x21ee47(0x9d)](a0_0x52ee88)[_0x21ee47(0x9f)](_0x21ee47(0x98));});function a0_0x2b5c(){const _0x45b807=['../../locales/en_US.json','search','75526NCtKgJ','828csoTUF','../exception/ValidatorError','3062808WVawuj','defineProperty','string','toString','PARAMS','2216856vSkjkC','10IaHCSx','3067449yZFPua','../../locales/zh_CN.json','69564NfhNAn','(((.+)+)+)+$','46970fnfeha','11864169DsVLtx','12jZLxPA','apply','constructor'];a0_0x2b5c=function(){return _0x45b807;};return a0_0x2b5c();}a0_0x52ee88();'use strict';Object[a0_0x1c456a(0xa4)](exports,'__esModule',{'value':!![]});const ValidatorError_1=require(a0_0x1c456a(0xa2));function a0_0x41ca(_0x5e95d5,_0x3f7cd0){_0x5e95d5=_0x5e95d5-0x92;const _0x56d237=a0_0x2b5c();let _0x52ee88=_0x56d237[_0x5e95d5];return _0x52ee88;}exports['default']={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x1c456a(0x92)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x1c456a(0xa5)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x1c456a(0x9e))},'zh_CN':{'validator':require(a0_0x1c456a(0x96))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x3d3fb8=a1_0x2198;(function(_0x4030d1,_0x596551){const _0x519ee3=a1_0x2198,_0x326c87=_0x4030d1();while(!![]){try{const _0x2b33e8=parseInt(_0x519ee3(0x122))/0x1*(parseInt(_0x519ee3(0x117))/0x2)+parseInt(_0x519ee3(0x114))/0x3+parseInt(_0x519ee3(0x105))/0x4+parseInt(_0x519ee3(0x11c))/0x5+-parseInt(_0x519ee3(0xea))/0x6*(-parseInt(_0x519ee3(0x103))/0x7)+parseInt(_0x519ee3(0x10e))/0x8*(parseInt(_0x519ee3(0xfa))/0x9)+-parseInt(_0x519ee3(0xf8))/0xa*(parseInt(_0x519ee3(0xf2))/0xb);if(_0x2b33e8===_0x596551)break;else _0x326c87['push'](_0x326c87['shift']());}catch(_0x4cb7d6){_0x326c87['push'](_0x326c87['shift']());}}}(a1_0x111c,0x28232));const a1_0x28deb=(function(){let _0x77145e=!![];return function(_0x49bf27,_0x311e84){const _0xb46700=_0x77145e?function(){const _0x4e9469=a1_0x2198;if(_0x311e84){const _0x1325ba=_0x311e84[_0x4e9469(0x10a)](_0x49bf27,arguments);return _0x311e84=null,_0x1325ba;}}:function(){};return _0x77145e=![],_0xb46700;};}()),a1_0x3851c6=a1_0x28deb(this,function(){const _0x45cb8e=a1_0x2198;return a1_0x3851c6[_0x45cb8e(0xe8)]()[_0x45cb8e(0x11e)]('(((.+)+)+)+$')[_0x45cb8e(0xe8)]()['constructor'](a1_0x3851c6)[_0x45cb8e(0x11e)]('(((.+)+)+)+$');});a1_0x3851c6();'use strict';var __decorate=this&&this['__decorate']||function(_0x210f79,_0x83e24a,_0x16640c,_0xb823f7){const _0x2b7253=a1_0x2198;var _0x13f4ae=arguments['length'],_0x385e4e=_0x13f4ae<0x3?_0x83e24a:_0xb823f7===null?_0xb823f7=Object['getOwnPropertyDescriptor'](_0x83e24a,_0x16640c):_0xb823f7,_0x42f493;if(typeof Reflect==='object'&&typeof Reflect[_0x2b7253(0x108)]==='function')_0x385e4e=Reflect[_0x2b7253(0x108)](_0x210f79,_0x83e24a,_0x16640c,_0xb823f7);else{for(var _0x549144=_0x210f79['length']-0x1;_0x549144>=0x0;_0x549144--)if(_0x42f493=_0x210f79[_0x549144])_0x385e4e=(_0x13f4ae<0x3?_0x42f493(_0x385e4e):_0x13f4ae>0x3?_0x42f493(_0x83e24a,_0x16640c,_0x385e4e):_0x42f493(_0x83e24a,_0x16640c))||_0x385e4e;}return _0x13f4ae>0x3&&_0x385e4e&&Object[_0x2b7253(0x107)](_0x83e24a,_0x16640c,_0x385e4e),_0x385e4e;},__metadata=this&&this[a1_0x3d3fb8(0x110)]||function(_0x28dce1,_0x45d6f0){const _0x36cf5d=a1_0x3d3fb8;if(typeof Reflect===_0x36cf5d(0x115)&&typeof Reflect[_0x36cf5d(0x116)]===_0x36cf5d(0xfc))return Reflect[_0x36cf5d(0x116)](_0x28dce1,_0x45d6f0);};Object[a1_0x3d3fb8(0x107)](exports,a1_0x3d3fb8(0xf3),{'value':!![]}),exports[a1_0x3d3fb8(0xf0)]=void 0x0;function a1_0x111c(){const _0x129392=['query','name','length','CustomConfiguration','args','7156094etQAza','__esModule','body','./interface','decorator','undefined','10TEoJeI','./config/config.default','661833joIGDo','getAttr','function','propertyName','MetadataManager','Configuration','@midwayjs/core','target','bound\x20dispatch','2074079PYKQaq','VALIDATOR_KEY','45256fGsEKU','MidwayDecoratorService','defineProperty','decorate','method','apply','params','registerMethodHandler','ValidatorService','24zTbJcd','prototype','__metadata','locale','@midwayjs/i18n','methodArgs','660000VHAnEi','object','metadata','4ukVudm','splice','request','param','getOwnMetadata','292560TqguSM','onReady','search','Inject','I18N_ATTR_KEY','./service/ValidatorService','4111fXAaYX','toString','design:type','6PGcZre','find','req'];a1_0x111c=function(){return _0x129392;};return a1_0x111c();}const i18n_1=require(a1_0x3d3fb8(0x112)),core_1=require('@midwayjs/core'),core_2=require(a1_0x3d3fb8(0x100)),interface_1=require(a1_0x3d3fb8(0xf5)),ValidatorService_1=require(a1_0x3d3fb8(0x121)),i18n=require(a1_0x3d3fb8(0x112)),anvero=require('@anveroapi/core'),ConfigDefault=require(a1_0x3d3fb8(0xf9));function a1_0x2198(_0x5d44ff,_0x24df44){_0x5d44ff=_0x5d44ff-0xe8;const _0x45967c=a1_0x111c();let _0x3851c6=_0x45967c[_0x5d44ff];return _0x3851c6;}let CustomConfiguration=class CustomConfiguration{async[a1_0x3d3fb8(0x11d)](){const _0x43bce6=a1_0x3d3fb8;this['decorator'][_0x43bce6(0x10c)](interface_1[_0x43bce6(0x104)],_0xacbc86=>{const _0x767b51=_0x43bce6,_0x3b2dd5=_0xacbc86[_0x767b51(0x116)],_0x52223a=core_2[_0x767b51(0xfe)]['getMethodParamTypes'](_0xacbc86[_0x767b51(0x101)],_0xacbc86[_0x767b51(0xfd)]);return{'before':_0x302ad2=>{const _0x3eb594=_0x767b51;var _0x1d1a47,_0x588748,_0x20263a,_0x3a760e,_0x2855d8,_0x37a590,_0xf13f39,_0x4b9ec2,_0x3f56e1,_0x3a6403,_0x1cb2e0,_0x5df997,_0x366890;const _0x513ab7=_0x302ad2[_0x3eb594(0x101)][core_1['REQUEST_OBJ_CTX_KEY']],_0x16d399=Object['assign']({},((_0x1d1a47=_0x513ab7===null||_0x513ab7===void 0x0?void 0x0:_0x513ab7['request'])===null||_0x1d1a47===void 0x0?void 0x0:_0x1d1a47[_0x3eb594(0xed)])||{},((_0x588748=_0x513ab7===null||_0x513ab7===void 0x0?void 0x0:_0x513ab7['request'])===null||_0x588748===void 0x0?void 0x0:_0x588748[_0x3eb594(0xf4)])||{}),_0x145737=(core_2[_0x3eb594(0xfe)][_0x3eb594(0x11b)](interface_1[_0x3eb594(0x104)],_0x302ad2[_0x3eb594(0x101)])||[])[_0x3eb594(0xeb)](_0xa00d1a=>_0xa00d1a[_0x3eb594(0x109)]==_0x302ad2['methodName']);!(_0x3b2dd5===null||_0x3b2dd5===void 0x0?void 0x0:_0x3b2dd5['locale'])&&_0x513ab7&&_0x513ab7[_0x3eb594(0xfb)]&&(_0x3b2dd5[_0x3eb594(0x111)]=_0x513ab7['getAttr'](i18n_1[_0x3eb594(0x120)]));for(let _0x1962f1=0x0;_0x1962f1<_0x52223a[_0x3eb594(0xef)];_0x1962f1++){const _0x337075=_0x52223a[_0x1962f1],_0x25ae13=this[_0x3eb594(0x10d)]['getSchema'](_0x337075);if(_0x25ae13){if(typeof _0x302ad2[_0x3eb594(0xf1)][_0x1962f1]==_0x3eb594(0xf7)||((_0x20263a=_0x302ad2['args'][_0x1962f1])===null||_0x20263a===void 0x0?void 0x0:_0x20263a[_0x3eb594(0x119)])&&((_0x3a760e=_0x302ad2[_0x3eb594(0xf1)][_0x1962f1])===null||_0x3a760e===void 0x0?void 0x0:_0x3a760e['res'])&&((_0x2855d8=_0x302ad2[_0x3eb594(0xf1)][_0x1962f1])===null||_0x2855d8===void 0x0?void 0x0:_0x2855d8[_0x3eb594(0xec)]))_0x302ad2[_0x3eb594(0xf1)][_0x1962f1]=_0x16d399;else((_0x37a590=_0x302ad2[_0x3eb594(0xf1)][_0x1962f1])===null||_0x37a590===void 0x0?void 0x0:_0x37a590[_0x3eb594(0xee)])==_0x3eb594(0x102)&&_0x302ad2['args'][_0x3eb594(0x118)](_0x1962f1,0x0,_0x16d399);const _0x4662de=this['ValidatorService']['validator'](_0x25ae13,_0x302ad2[_0x3eb594(0xf1)][_0x1962f1],_0x3b2dd5);_0x4662de&&(_0x302ad2['args'][_0x1962f1]=_0x4662de);}else{if((_0x145737===null||_0x145737===void 0x0?void 0x0:_0x145737['methodArgs'][_0x1962f1])&&((_0xf13f39=_0x302ad2[_0x3eb594(0xf1)][_0x1962f1])===null||_0xf13f39===void 0x0?void 0x0:_0xf13f39[_0x3eb594(0x10b)])&&typeof _0x302ad2[_0x3eb594(0xf1)][_0x1962f1][_0x3eb594(0x11a)]=='function'&&((_0x4b9ec2=_0x513ab7===null||_0x513ab7===void 0x0?void 0x0:_0x513ab7['params'])===null||_0x4b9ec2===void 0x0?void 0x0:_0x4b9ec2[_0x145737['methodArgs'][_0x1962f1]]))_0x302ad2[_0x3eb594(0xf1)][_0x1962f1]=_0x337075((_0x3f56e1=_0x513ab7===null||_0x513ab7===void 0x0?void 0x0:_0x513ab7[_0x3eb594(0x10b)])===null||_0x3f56e1===void 0x0?void 0x0:_0x3f56e1[_0x145737[_0x3eb594(0x113)][_0x1962f1]]);else(_0x145737===null||_0x145737===void 0x0?void 0x0:_0x145737[_0x3eb594(0x113)][_0x1962f1])&&((_0x1cb2e0=(_0x3a6403=_0x302ad2[_0x3eb594(0xf1)][_0x1962f1])===null||_0x3a6403===void 0x0?void 0x0:_0x3a6403[_0x3eb594(0x10b)])===null||_0x1cb2e0===void 0x0?void 0x0:_0x1cb2e0[_0x145737[_0x3eb594(0x113)][_0x1962f1]])&&(_0x302ad2[_0x3eb594(0xf1)][_0x1962f1]=(_0x366890=(_0x5df997=_0x302ad2[_0x3eb594(0xf1)][_0x1962f1])===null||_0x5df997===void 0x0?void 0x0:_0x5df997[_0x3eb594(0x10b)])===null||_0x366890===void 0x0?void 0x0:_0x366890[_0x145737[_0x3eb594(0x113)][_0x1962f1]]);}}},'afterThrow':(_0x456cc9,_0x388f6f)=>{throw _0x388f6f;}};});}};exports[a1_0x3d3fb8(0xf0)]=CustomConfiguration,__decorate([(0x0,core_2[a1_0x3d3fb8(0x11f)])(),__metadata(a1_0x3d3fb8(0xe9),core_1[a1_0x3d3fb8(0x106)])],CustomConfiguration[a1_0x3d3fb8(0x10f)],a1_0x3d3fb8(0xf6),void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x3d3fb8(0xe9),ValidatorService_1[a1_0x3d3fb8(0x10d)])],CustomConfiguration['prototype'],a1_0x3d3fb8(0x10d),void 0x0),exports[a1_0x3d3fb8(0xf0)]=CustomConfiguration=__decorate([(0x0,core_2[a1_0x3d3fb8(0xff)])({'imports':[i18n,anvero],'namespace':'anvero-api:validator','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0xf561cf=a2_0x484a;(function(_0x9ff12,_0xab1451){const _0x52e649=a2_0x484a,_0x1b2c0b=_0x9ff12();while(!![]){try{const _0x52f599=parseInt(_0x52e649(0x174))/0x1*(parseInt(_0x52e649(0x165))/0x2)+parseInt(_0x52e649(0x170))/0x3+-parseInt(_0x52e649(0x168))/0x4+-parseInt(_0x52e649(0x15a))/0x5*(-parseInt(_0x52e649(0x178))/0x6)+-parseInt(_0x52e649(0x17a))/0x7+parseInt(_0x52e649(0x15f))/0x8+-parseInt(_0x52e649(0x163))/0x9*(-parseInt(_0x52e649(0x160))/0xa);if(_0x52f599===_0xab1451)break;else _0x1b2c0b['push'](_0x1b2c0b['shift']());}catch(_0x340012){_0x1b2c0b['push'](_0x1b2c0b['shift']());}}}(a2_0x3b72,0x18eee));function a2_0x484a(_0x3d38f2,_0x11839e){_0x3d38f2=_0x3d38f2-0x156;const _0x59f5e5=a2_0x3b72();let _0x374f5e=_0x59f5e5[_0x3d38f2];return _0x374f5e;}const a2_0x478dd6=(function(){let _0x3de6e3=!![];return function(_0x2e38a8,_0xf6e689){const _0x4073c5=_0x3de6e3?function(){const _0x2b173e=a2_0x484a;if(_0xf6e689){const _0x54b068=_0xf6e689[_0x2b173e(0x175)](_0x2e38a8,arguments);return _0xf6e689=null,_0x54b068;}}:function(){};return _0x3de6e3=![],_0x4073c5;};}()),a2_0x374f5e=a2_0x478dd6(this,function(){const _0x2b338b=a2_0x484a;return a2_0x374f5e[_0x2b338b(0x176)]()[_0x2b338b(0x15e)](_0x2b338b(0x166))['toString']()[_0x2b338b(0x179)](a2_0x374f5e)[_0x2b338b(0x15e)]('(((.+)+)+)+$');});function a2_0x3b72(){const _0x3b3744=['@midwayjs/core','30156LktBSR','constructor','1070069JZLWIF','isSchema','../interface','name','items','85JWLLvn','MetadataManager','RULES_KEY','description','search','193648fusosC','35930DAbNwE','Array','keys','243UfJRIR','map','4uxJxpQ','(((.+)+)+)+$','extend','735084DEXVgs','__esModule','getPropertyType','RuleType','object','transformTypeFromTSDesign','label','getOwnMetadata','374199jBXoPI','joi','default','Rule','53686BUbtLB','apply','toString'];a2_0x3b72=function(){return _0x3b3744;};return a2_0x3b72();}a2_0x374f5e();'use strict';Object['defineProperty'](exports,a2_0xf561cf(0x169),{'value':!![]}),exports[a2_0xf561cf(0x16b)]=void 0x0,exports[a2_0xf561cf(0x173)]=Rule;const joi=require(a2_0xf561cf(0x171)),date_1=require('@joi/date'),core_1=require(a2_0xf561cf(0x177)),interface_1=require(a2_0xf561cf(0x157));exports[a2_0xf561cf(0x16b)]=joi[a2_0xf561cf(0x167)](date_1[a2_0xf561cf(0x172)]);function Rule(_0x17ffc1,_0x168bdb,_0x413fcd=''){return(_0x2383db,_0x5949b2)=>{const _0x26f7a4=a2_0x484a;var _0x32304a;if(_0x5949b2)!joi[_0x26f7a4(0x156)](_0x168bdb)&&(_0x168bdb===null||_0x168bdb===void 0x0?void 0x0:_0x168bdb[_0x26f7a4(0x158)])&&(_0x168bdb=joi[_0x26f7a4(0x16c)](core_1['MetadataManager']['getOwnMetadata'](interface_1[_0x26f7a4(0x15c)],_0x168bdb))['meta']({'id':_0x168bdb['name']}),core_1[_0x26f7a4(0x15b)][_0x26f7a4(0x16d)](core_1[_0x26f7a4(0x15b)][_0x26f7a4(0x16a)](_0x2383db,_0x5949b2))[_0x26f7a4(0x158)]===_0x26f7a4(0x161)&&(_0x168bdb=joi['array']()[_0x26f7a4(0x159)](_0x168bdb))),joi[_0x26f7a4(0x156)](_0x168bdb)&&(_0x17ffc1&&typeof(_0x168bdb===null||_0x168bdb===void 0x0?void 0x0:_0x168bdb['label'])=='function'&&(_0x168bdb=_0x168bdb[_0x26f7a4(0x16e)](_0x17ffc1)),_0x413fcd&&typeof(_0x168bdb===null||_0x168bdb===void 0x0?void 0x0:_0x168bdb[_0x26f7a4(0x15d)])=='function'&&(_0x168bdb=_0x168bdb['description'](_0x413fcd)),core_1['MetadataManager']['attachMetadata'](interface_1[_0x26f7a4(0x15c)],_0x168bdb,_0x2383db,_0x5949b2));else{const _0x56bb22=core_1['MetadataManager'][_0x26f7a4(0x16f)](interface_1[_0x26f7a4(0x15c)],_0x168bdb);if(_0x56bb22){let _0x569932=(_0x32304a=core_1[_0x26f7a4(0x15b)]['getOwnMetadata'](interface_1[_0x26f7a4(0x15c)],_0x2383db))!==null&&_0x32304a!==void 0x0?_0x32304a:{};Object[_0x26f7a4(0x162)](_0x56bb22)[_0x26f7a4(0x164)](_0x1444f1=>{!_0x569932[_0x1444f1]&&(_0x569932[_0x1444f1]=_0x56bb22[_0x1444f1]);}),core_1['MetadataManager']['defineMetadata'](interface_1[_0x26f7a4(0x15c)],_0x569932,_0x2383db);}}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x41f095=a3_0x44b9;(function(_0x1be930,_0x1fb396){const _0x5cd7ff=a3_0x44b9,_0x502d9b=_0x1be930();while(!![]){try{const _0x11d54e=parseInt(_0x5cd7ff(0x19d))/0x1+parseInt(_0x5cd7ff(0x18d))/0x2+-parseInt(_0x5cd7ff(0x190))/0x3*(parseInt(_0x5cd7ff(0x1a3))/0x4)+-parseInt(_0x5cd7ff(0x197))/0x5+parseInt(_0x5cd7ff(0x192))/0x6+parseInt(_0x5cd7ff(0x19a))/0x7+parseInt(_0x5cd7ff(0x1a4))/0x8;if(_0x11d54e===_0x1fb396)break;else _0x502d9b['push'](_0x502d9b['shift']());}catch(_0x45e4b1){_0x502d9b['push'](_0x502d9b['shift']());}}}(a3_0x3296,0x52220));const a3_0x202be6=(function(){let _0x9a69e3=!![];return function(_0x5a17a9,_0x1fec29){const _0x29ba93=_0x9a69e3?function(){const _0x502e67=a3_0x44b9;if(_0x1fec29){const _0x2a2347=_0x1fec29[_0x502e67(0x191)](_0x5a17a9,arguments);return _0x1fec29=null,_0x2a2347;}}:function(){};return _0x9a69e3=![],_0x29ba93;};}()),a3_0x26798b=a3_0x202be6(this,function(){const _0x21ac39=a3_0x44b9;return a3_0x26798b[_0x21ac39(0x18f)]()[_0x21ac39(0x196)](_0x21ac39(0x19e))[_0x21ac39(0x18f)]()['constructor'](a3_0x26798b)[_0x21ac39(0x196)](_0x21ac39(0x19e));});a3_0x26798b();function a3_0x44b9(_0x105c8f,_0xb9a50f){_0x105c8f=_0x105c8f-0x18d;const _0x45f88f=a3_0x3296();let _0x26798b=_0x45f88f[_0x105c8f];return _0x26798b;}'use strict';Object['defineProperty'](exports,a3_0x41f095(0x195),{'value':!![]}),exports[a3_0x41f095(0x1a6)]=Validator,exports[a3_0x41f095(0x19c)]=getFuncArgs;const core_1=require('@midwayjs/core'),interface_1=require(a3_0x41f095(0x1a7));function Validator(_0x103e2b={}){return(_0x4eca85,_0x1145fe,_0xbf6851)=>{const _0xa9964e=a3_0x44b9,_0x2a2c61=getFuncArgs(_0x4eca85[_0x1145fe]);core_1[_0xa9964e(0x19b)][_0xa9964e(0x1a5)](interface_1[_0xa9964e(0x1a0)],{'method':_0x1145fe,'methodArgs':_0x2a2c61},_0x4eca85),core_1[_0xa9964e(0x194)][_0xa9964e(0x19f)](interface_1[_0xa9964e(0x1a0)],_0x103e2b)(_0x4eca85,_0x1145fe,_0xbf6851);};}function getFuncArgs(_0x17d96c){const _0x205bd4=a3_0x41f095;if(typeof _0x17d96c==_0x205bd4(0x199)){const _0x5652fd=/=>.*$/mg,_0x21c43f=/=[^,)]+/mg,_0x23e517=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x4964a4=(_0x17d96c['prototype']?_0x17d96c[_0x205bd4(0x1a1)]['constructor'][_0x205bd4(0x18f)]():_0x17d96c[_0x205bd4(0x18f)]())[_0x205bd4(0x193)](_0x23e517,'')[_0x205bd4(0x193)](_0x5652fd,'')['replace'](_0x21c43f,''),_0x52b354=_0x4964a4[_0x205bd4(0x18e)](_0x4964a4[_0x205bd4(0x198)]('(')+0x1,_0x4964a4[_0x205bd4(0x198)](')'))[_0x205bd4(0x1a2)](/([^\s,]+)/g)||[];return _0x52b354;}}function a3_0x3296(){const _0x2aa93a=['2502628rDyfGV','6471744BlEZVE','attachMetadata','Validator','../interface','1262896XIeNba','slice','toString','3vaNloU','apply','1016100YPLlVe','replace','DecoratorManager','__esModule','search','3360255VIgDvV','indexOf','function','24808LQEojf','MetadataManager','getFuncArgs','20814VRUZlH','(((.+)+)+)+$','createCustomMethodDecorator','VALIDATOR_KEY','prototype','match'];a3_0x3296=function(){return _0x2aa93a;};return a3_0x3296();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a4_0x1993(_0x5e4993,_0x192835){_0x5e4993=_0x5e4993-0x78;var _0x21f522=a4_0x120d();var _0x52cf33=_0x21f522[_0x5e4993];return _0x52cf33;}var a4_0x310c02=a4_0x1993;(function(_0x15c4ba,_0x3cc736){var _0x57c2ce=a4_0x1993,_0x3fe071=_0x15c4ba();while(!![]){try{var _0x34e433=-parseInt(_0x57c2ce(0x82))/0x1+parseInt(_0x57c2ce(0x7a))/0x2*(-parseInt(_0x57c2ce(0x83))/0x3)+parseInt(_0x57c2ce(0x8b))/0x4+-parseInt(_0x57c2ce(0x87))/0x5+-parseInt(_0x57c2ce(0x85))/0x6*(-parseInt(_0x57c2ce(0x8d))/0x7)+-parseInt(_0x57c2ce(0x7d))/0x8*(-parseInt(_0x57c2ce(0x7e))/0x9)+-parseInt(_0x57c2ce(0x89))/0xa;if(_0x34e433===_0x3cc736)break;else _0x3fe071['push'](_0x3fe071['shift']());}catch(_0x28dc34){_0x3fe071['push'](_0x3fe071['shift']());}}}(a4_0x120d,0xa8546));function a4_0x120d(){var _0x559e4e=['1870856rDjPyz','NOFIND_SCHEMA','14fGxbEh','__decorate','toString','length','1315610PPbxJK','(((.+)+)+)+$','参数验证失败','1004600pCVvxn','90NYvrMv','AnnErrorMsg','function','metadata','608623hKiUGF','3oparxD','ValidatorError','3743406EmpUlC','search','3604900CsvPqa','design:type','2943800yoybKg','object'];a4_0x120d=function(){return _0x559e4e;};return a4_0x120d();}var a4_0x4c2d56=(function(){var _0x4e1e92=!![];return function(_0x5255c3,_0xf2b464){var _0x4c9f70=_0x4e1e92?function(){if(_0xf2b464){var _0x3becc6=_0xf2b464['apply'](_0x5255c3,arguments);return _0xf2b464=null,_0x3becc6;}}:function(){};return _0x4e1e92=![],_0x4c9f70;};}()),a4_0x52cf33=a4_0x4c2d56(this,function(){var _0x5d6ef8=a4_0x1993;return a4_0x52cf33[_0x5d6ef8(0x78)]()[_0x5d6ef8(0x86)](_0x5d6ef8(0x7b))[_0x5d6ef8(0x78)]()['constructor'](a4_0x52cf33)[_0x5d6ef8(0x86)](_0x5d6ef8(0x7b));});a4_0x52cf33();'use strict';var __decorate=this&&this[a4_0x310c02(0x8e)]||function(_0x2640aa,_0x52158a,_0x362c87,_0x3f9394){var _0x46684a=a4_0x310c02,_0xe31bb9=arguments[_0x46684a(0x79)],_0x16dc48=_0xe31bb9<0x3?_0x52158a:_0x3f9394===null?_0x3f9394=Object['getOwnPropertyDescriptor'](_0x52158a,_0x362c87):_0x3f9394,_0x3312f9;if(typeof Reflect===_0x46684a(0x8a)&&typeof Reflect['decorate']===_0x46684a(0x80))_0x16dc48=Reflect['decorate'](_0x2640aa,_0x52158a,_0x362c87,_0x3f9394);else{for(var _0x11b421=_0x2640aa[_0x46684a(0x79)]-0x1;_0x11b421>=0x0;_0x11b421--)if(_0x3312f9=_0x2640aa[_0x11b421])_0x16dc48=(_0xe31bb9<0x3?_0x3312f9(_0x16dc48):_0xe31bb9>0x3?_0x3312f9(_0x52158a,_0x362c87,_0x16dc48):_0x3312f9(_0x52158a,_0x362c87))||_0x16dc48;}return _0xe31bb9>0x3&&_0x16dc48&&Object['defineProperty'](_0x52158a,_0x362c87,_0x16dc48),_0x16dc48;},__metadata=this&&this['__metadata']||function(_0x40e0f4,_0x109aa3){var _0x21cee0=a4_0x310c02;if(typeof Reflect===_0x21cee0(0x8a)&&typeof Reflect[_0x21cee0(0x81)]===_0x21cee0(0x80))return Reflect[_0x21cee0(0x81)](_0x40e0f4,_0x109aa3);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ValidatorError']=void 0x0;const core_1=require('@anveroapi/core');class ValidatorError extends AnnError{}exports[a4_0x310c02(0x84)]=ValidatorError,ValidatorError['PARAMS']=0x18c1e,ValidatorError[a4_0x310c02(0x8c)]=0x18c1c,__decorate([(0x0,core_1[a4_0x310c02(0x7f)])(a4_0x310c02(0x7c)),__metadata(a4_0x310c02(0x88),Object)],ValidatorError,'PARAMS',void 0x0),__decorate([(0x0,core_1[a4_0x310c02(0x7f)])('参数验证失败'),__metadata('design:type',Object)],ValidatorError,a4_0x310c02(0x8c),void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x3831c4=a5_0x64ea;(function(_0x443d1f,_0x3b6fba){const _0x463424=a5_0x64ea,_0x30992f=_0x443d1f();while(!![]){try{const _0x2b0bd0=-parseInt(_0x463424(0x122))/0x1*(parseInt(_0x463424(0x133))/0x2)+-parseInt(_0x463424(0x139))/0x3*(parseInt(_0x463424(0x126))/0x4)+-parseInt(_0x463424(0x132))/0x5*(parseInt(_0x463424(0x137))/0x6)+-parseInt(_0x463424(0x12e))/0x7+parseInt(_0x463424(0x12a))/0x8+parseInt(_0x463424(0x13a))/0x9*(parseInt(_0x463424(0x129))/0xa)+parseInt(_0x463424(0x135))/0xb;if(_0x2b0bd0===_0x3b6fba)break;else _0x30992f['push'](_0x30992f['shift']());}catch(_0x25c9d5){_0x30992f['push'](_0x30992f['shift']());}}}(a5_0x4f7c,0x19b1a));const a5_0xd4ac17=(function(){let _0x2e1f72=!![];return function(_0x4d4439,_0x128b0a){const _0x10325f=_0x2e1f72?function(){const _0x36a0ee=a5_0x64ea;if(_0x128b0a){const _0x5d7a83=_0x128b0a[_0x36a0ee(0x12f)](_0x4d4439,arguments);return _0x128b0a=null,_0x5d7a83;}}:function(){};return _0x2e1f72=![],_0x10325f;};}()),a5_0x1d9d62=a5_0xd4ac17(this,function(){const _0x586786=a5_0x64ea;return a5_0x1d9d62[_0x586786(0x127)]()['search']('(((.+)+)+)+$')[_0x586786(0x127)]()['constructor'](a5_0x1d9d62)[_0x586786(0x121)](_0x586786(0x138));});function a5_0x64ea(_0x4955f2,_0x3223c4){_0x4955f2=_0x4955f2-0x121;const _0x35812d=a5_0x4f7c();let _0x1d9d62=_0x35812d[_0x4955f2];return _0x1d9d62;}a5_0x1d9d62();'use strict';Object[a5_0x3831c4(0x128)](exports,a5_0x3831c4(0x12c),{'value':!![]}),exports[a5_0x3831c4(0x134)]=PickDto,exports[a5_0x3831c4(0x12b)]=OmitDto;function a5_0x4f7c(){const _0x3c96d8=['./getSchema','MetadataManager','1844BwXSJz','toString','defineProperty','450pwgviY','842936DPSuNi','OmitDto','__esModule','getDtoRules','109641hJTyWp','apply','defineMetadata','../interface','142465SdMCOa','2iRqYQD','PickDto','2836845xDzEZf','RULES_KEY','42LlFWOj','(((.+)+)+)+$','69qrmNUW','15345icOMNu','assign','search','109028znOrgb','prototype'];a5_0x4f7c=function(){return _0x3c96d8;};return a5_0x4f7c();}const core_1=require('@midwayjs/core'),interface_1=require(a5_0x3831c4(0x131)),getSchema_1=require(a5_0x3831c4(0x124));function PickDto(_0x516554,_0x3e031b){const _0x3ef5cb=a5_0x3831c4,_0x44ea09=function(){};_0x44ea09[_0x3ef5cb(0x123)]=_0x516554['prototype'];const _0x437da8=(0x0,getSchema_1[_0x3ef5cb(0x12d)])(_0x516554),_0x54bce2={};for(const _0x13878c of _0x3e031b){_0x437da8[_0x13878c]&&(_0x54bce2[_0x13878c]=_0x437da8[_0x13878c]);}return core_1[_0x3ef5cb(0x125)][_0x3ef5cb(0x130)](interface_1[_0x3ef5cb(0x136)],_0x54bce2,_0x44ea09),_0x44ea09;}function OmitDto(_0x42f9a6,_0x57985d){const _0x1b0f18=a5_0x3831c4,_0x1b4f42=function(){};_0x1b4f42[_0x1b0f18(0x123)]=_0x42f9a6[_0x1b0f18(0x123)];const _0x3847e6=(0x0,getSchema_1['getDtoRules'])(_0x42f9a6),_0x37328a=Object[_0x1b0f18(0x13b)]({},_0x3847e6);for(const _0x78027b of _0x57985d){delete _0x37328a[_0x78027b];}return core_1['MetadataManager']['defineMetadata'](interface_1[_0x1b0f18(0x136)],_0x37328a,_0x1b4f42),_0x1b4f42;}
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x5ecf0c=a6_0x4107;function a6_0x4107(_0x31808c,_0x1cf409){_0x31808c=_0x31808c-0x1b3;const _0x139882=a6_0x52db();let _0x28641b=_0x139882[_0x31808c];return _0x28641b;}(function(_0x3a03cc,_0x2fae13){const _0x465813=a6_0x4107,_0x57b200=_0x3a03cc();while(!![]){try{const _0x1f5a87=-parseInt(_0x465813(0x1ce))/0x1+parseInt(_0x465813(0x1b5))/0x2+-parseInt(_0x465813(0x1c2))/0x3*(-parseInt(_0x465813(0x1c9))/0x4)+parseInt(_0x465813(0x1b4))/0x5+-parseInt(_0x465813(0x1c6))/0x6*(parseInt(_0x465813(0x1ca))/0x7)+-parseInt(_0x465813(0x1c7))/0x8+parseInt(_0x465813(0x1c3))/0x9;if(_0x1f5a87===_0x2fae13)break;else _0x57b200['push'](_0x57b200['shift']());}catch(_0x3885d9){_0x57b200['push'](_0x57b200['shift']());}}}(a6_0x52db,0x3c470));const a6_0x40621e=(function(){let _0x216b2c=!![];return function(_0x3a3b9c,_0x548974){const _0x6f2da3=_0x216b2c?function(){const _0x45c342=a6_0x4107;if(_0x548974){const _0x2b9831=_0x548974[_0x45c342(0x1c0)](_0x3a3b9c,arguments);return _0x548974=null,_0x2b9831;}}:function(){};return _0x216b2c=![],_0x6f2da3;};}()),a6_0x28641b=a6_0x40621e(this,function(){const _0x5cc11a=a6_0x4107;return a6_0x28641b[_0x5cc11a(0x1c1)]()[_0x5cc11a(0x1be)]('(((.+)+)+)+$')[_0x5cc11a(0x1c1)]()[_0x5cc11a(0x1cd)](a6_0x28641b)[_0x5cc11a(0x1be)](_0x5cc11a(0x1b7));});a6_0x28641b();'use strict';Object[a6_0x5ecf0c(0x1b8)](exports,a6_0x5ecf0c(0x1bb),{'value':!![]}),exports['getDtoRules']=getDtoRules,exports[a6_0x5ecf0c(0x1b9)]=getSchema;const Joi=require(a6_0x5ecf0c(0x1c5)),core_1=require(a6_0x5ecf0c(0x1bd)),interface_1=require(a6_0x5ecf0c(0x1c8));function a6_0x52db(){const _0x255914=['3878896YMbmSR','../interface','15072PUKaWL','32529PJvSoM','getPropertiesWithMetadata','getMetadata','constructor','104316auVEVw','MetadataManager','845060XAzxHI','651054UkGcdo','RULES_KEY','(((.+)+)+)+$','defineProperty','getSchema','fromEntries','__esModule','entries','@midwayjs/core','search','map','apply','toString','273PCcMEs','4128300sfdKut','length','joi','594EXRjWU'];a6_0x52db=function(){return _0x255914;};return a6_0x52db();}function getDtoRules(_0xc12547){const _0x525320=a6_0x5ecf0c,_0x31d54f=core_1[_0x525320(0x1b3)][_0x525320(0x1cc)](interface_1[_0x525320(0x1b6)],_0xc12547);if(_0x31d54f!==undefined)return _0x31d54f;return Object[_0x525320(0x1ba)](Object[_0x525320(0x1bc)](core_1[_0x525320(0x1b3)][_0x525320(0x1cb)](interface_1[_0x525320(0x1b6)],_0xc12547))[_0x525320(0x1bf)](([_0x10db4d,_0x1b5bb0])=>[_0x10db4d,Array['isArray'](_0x1b5bb0)&&_0x1b5bb0[_0x525320(0x1c4)]?_0x1b5bb0[_0x1b5bb0[_0x525320(0x1c4)]-0x1]:_0x1b5bb0]));}function getSchema(_0x14f230){const _0xde1268=getDtoRules(_0x14f230);if(_0xde1268)return Joi['object'](_0xde1268);}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x46be1a=a7_0x27a7;(function(_0x18377e,_0x3ae4b9){var _0x4401b6=a7_0x27a7,_0x2be667=_0x18377e();while(!![]){try{var _0x20af48=parseInt(_0x4401b6(0x1f5))/0x1*(parseInt(_0x4401b6(0x1e0))/0x2)+parseInt(_0x4401b6(0x1f6))/0x3*(parseInt(_0x4401b6(0x203))/0x4)+-parseInt(_0x4401b6(0x1ed))/0x5+-parseInt(_0x4401b6(0x1fc))/0x6+-parseInt(_0x4401b6(0x1e8))/0x7*(-parseInt(_0x4401b6(0x1e1))/0x8)+parseInt(_0x4401b6(0x1eb))/0x9*(parseInt(_0x4401b6(0x1ee))/0xa)+-parseInt(_0x4401b6(0x1ea))/0xb;if(_0x20af48===_0x3ae4b9)break;else _0x2be667['push'](_0x2be667['shift']());}catch(_0x360aae){_0x2be667['push'](_0x2be667['shift']());}}}(a7_0x165f,0xe47ad));var a7_0x574726=(function(){var _0x5085c8=!![];return function(_0x268476,_0x54289c){var _0xd0af80=_0x5085c8?function(){var _0xdea5e2=a7_0x27a7;if(_0x54289c){var _0x2c077d=_0x54289c[_0xdea5e2(0x1ec)](_0x268476,arguments);return _0x54289c=null,_0x2c077d;}}:function(){};return _0x5085c8=![],_0xd0af80;};}()),a7_0xa8a3bc=a7_0x574726(this,function(){var _0x4cace3=a7_0x27a7;return a7_0xa8a3bc['toString']()[_0x4cace3(0x1f0)](_0x4cace3(0x1e2))[_0x4cace3(0x1fe)]()[_0x4cace3(0x1fb)](a7_0xa8a3bc)[_0x4cace3(0x1f0)]('(((.+)+)+)+$');});a7_0xa8a3bc();'use strict';var __createBinding=this&&this[a7_0x46be1a(0x1f4)]||(Object[a7_0x46be1a(0x1fa)]?function(_0x24503c,_0x908117,_0x32c5c9,_0x27acde){var _0x469701=a7_0x46be1a;if(_0x27acde===undefined)_0x27acde=_0x32c5c9;var _0x77bd4e=Object['getOwnPropertyDescriptor'](_0x908117,_0x32c5c9);(!_0x77bd4e||('get'in _0x77bd4e?!_0x908117[_0x469701(0x1e5)]:_0x77bd4e[_0x469701(0x1f2)]||_0x77bd4e[_0x469701(0x206)]))&&(_0x77bd4e={'enumerable':!![],'get':function(){return _0x908117[_0x32c5c9];}}),Object[_0x469701(0x1f8)](_0x24503c,_0x27acde,_0x77bd4e);}:function(_0x1eaaf5,_0x3074e3,_0x47361c,_0x54b7d7){if(_0x54b7d7===undefined)_0x54b7d7=_0x47361c;_0x1eaaf5[_0x54b7d7]=_0x3074e3[_0x47361c];}),__exportStar=this&&this[a7_0x46be1a(0x205)]||function(_0x313acd,_0x2ff10c){var _0x1a12e9=a7_0x46be1a;for(var _0x2e1fb1 in _0x313acd)if(_0x2e1fb1!==_0x1a12e9(0x1e6)&&!Object[_0x1a12e9(0x201)][_0x1a12e9(0x1f1)][_0x1a12e9(0x204)](_0x2ff10c,_0x2e1fb1))__createBinding(_0x2ff10c,_0x313acd,_0x2e1fb1);};Object['defineProperty'](exports,a7_0x46be1a(0x1e5),{'value':!![]}),exports[a7_0x46be1a(0x1e3)]=exports[a7_0x46be1a(0x1e7)]=exports[a7_0x46be1a(0x1f9)]=exports[a7_0x46be1a(0x1f3)]=exports[a7_0x46be1a(0x202)]=exports[a7_0x46be1a(0x1ff)]=void 0x0,__exportStar(require(a7_0x46be1a(0x1fd)),exports),__exportStar(require('./helper/dtoHelper'),exports),__exportStar(require(a7_0x46be1a(0x1e9)),exports);var Validator_1=require(a7_0x46be1a(0x1e4));Object[a7_0x46be1a(0x1f8)](exports,a7_0x46be1a(0x1ff),{'enumerable':!![],'get':function(){var _0x290f22=a7_0x46be1a;return Validator_1[_0x290f22(0x1ff)];}});var Rule_1=require(a7_0x46be1a(0x1f7));Object[a7_0x46be1a(0x1f8)](exports,a7_0x46be1a(0x202),{'enumerable':!![],'get':function(){var _0x58b17b=a7_0x46be1a;return Rule_1[_0x58b17b(0x202)];}}),Object['defineProperty'](exports,'RuleType',{'enumerable':!![],'get':function(){var _0x29f3cf=a7_0x46be1a;return Rule_1[_0x29f3cf(0x1f3)];}});function a7_0x27a7(_0x4baa45,_0x5f4c9f){_0x4baa45=_0x4baa45-0x1e0;var _0x375a03=a7_0x165f();var _0xa8a3bc=_0x375a03[_0x4baa45];return _0xa8a3bc;}var ValidatorError_1=require('./exception/ValidatorError');Object[a7_0x46be1a(0x1f8)](exports,a7_0x46be1a(0x1f9),{'enumerable':!![],'get':function(){return ValidatorError_1['ValidatorError'];}});var ValidatorService_1=require(a7_0x46be1a(0x200));Object['defineProperty'](exports,'ValidatorService',{'enumerable':!![],'get':function(){return ValidatorService_1['ValidatorService'];}});function a7_0x165f(){var _0x151a36=['7919124UbQQKo','./interface','toString','Validator','./service/ValidatorService','prototype','Rule','52132uUxmjc','call','__exportStar','configurable','778uJxwhZ','1296528loqvtG','(((.+)+)+)+$','Configuration','./decorator/Validator','__esModule','default','ValidatorService','7FdjtKY','./helper/getSchema','8736409rIlUZs','224010xVJeVH','apply','1505405raEKcF','270rUMhqb','CustomConfiguration','search','hasOwnProperty','writable','RuleType','__createBinding','4661eyKgDT','162KUTOQw','./decorator/Rule','defineProperty','ValidatorError','create','constructor'];a7_0x165f=function(){return _0x151a36;};return a7_0x165f();}var configuration_1=require('./configuration');Object['defineProperty'](exports,a7_0x46be1a(0x1e3),{'enumerable':!![],'get':function(){var _0x42fc9e=a7_0x46be1a;return configuration_1[_0x42fc9e(0x1ef)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a8_0x558e(_0x2e2fd5,_0x55b866){_0x2e2fd5=_0x2e2fd5-0x1e0;var _0x6e088=a8_0x4bfb();var _0x1d2ee8=_0x6e088[_0x2e2fd5];return _0x1d2ee8;}var a8_0x6a73b2=a8_0x558e;(function(_0x17e136,_0x1375bb){var _0x4896b3=a8_0x558e,_0x73cdb7=_0x17e136();while(!![]){try{var _0xe8f377=parseInt(_0x4896b3(0x1e7))/0x1+-parseInt(_0x4896b3(0x1e6))/0x2+parseInt(_0x4896b3(0x1ee))/0x3*(-parseInt(_0x4896b3(0x1eb))/0x4)+parseInt(_0x4896b3(0x1e0))/0x5+-parseInt(_0x4896b3(0x1e4))/0x6*(-parseInt(_0x4896b3(0x1e3))/0x7)+parseInt(_0x4896b3(0x1e2))/0x8*(-parseInt(_0x4896b3(0x1f0))/0x9)+-parseInt(_0x4896b3(0x1ec))/0xa*(-parseInt(_0x4896b3(0x1e1))/0xb);if(_0xe8f377===_0x1375bb)break;else _0x73cdb7['push'](_0x73cdb7['shift']());}catch(_0x2b189d){_0x73cdb7['push'](_0x73cdb7['shift']());}}}(a8_0x4bfb,0xdc95a));function a8_0x4bfb(){var _0x47c8f4=['8aaOLtV','21GkJKxx','3453186PraWjS','VALIDATOR_KEY','3024662EdKleU','1619396SpFyLQ','__esModule','defineProperty','anvero-api:validator:rules','3584940vsuUOq','618820mkugkX','apply','3EyzUCC','search','2354526xxDXAl','(((.+)+)+)+$','RULES_KEY','constructor','toString','829115rKEYfz','11qziEvY'];a8_0x4bfb=function(){return _0x47c8f4;};return a8_0x4bfb();}var a8_0x5e4147=(function(){var _0xac5631=!![];return function(_0x124c19,_0x21d63e){var _0x39b49d=_0xac5631?function(){var _0x501317=a8_0x558e;if(_0x21d63e){var _0x24a99c=_0x21d63e[_0x501317(0x1ed)](_0x124c19,arguments);return _0x21d63e=null,_0x24a99c;}}:function(){};return _0xac5631=![],_0x39b49d;};}()),a8_0x1d2ee8=a8_0x5e4147(this,function(){var _0x4fbcd2=a8_0x558e;return a8_0x1d2ee8['toString']()[_0x4fbcd2(0x1ef)](_0x4fbcd2(0x1f1))[_0x4fbcd2(0x1f4)]()[_0x4fbcd2(0x1f3)](a8_0x1d2ee8)[_0x4fbcd2(0x1ef)](_0x4fbcd2(0x1f1));});a8_0x1d2ee8();'use strict';Object[a8_0x6a73b2(0x1e9)](exports,a8_0x6a73b2(0x1e8),{'value':!![]}),exports[a8_0x6a73b2(0x1e5)]=exports['RULES_KEY']=void 0x0,exports[a8_0x6a73b2(0x1f2)]=a8_0x6a73b2(0x1ea),exports[a8_0x6a73b2(0x1e5)]='anvero-api:validator:validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a9_0x434df9=a9_0x2f03;(function(_0x45cae9,_0x177740){const _0x48079c=a9_0x2f03,_0x3421d8=_0x45cae9();while(!![]){try{const _0x6c884e=parseInt(_0x48079c(0x166))/0x1*(-parseInt(_0x48079c(0x149))/0x2)+-parseInt(_0x48079c(0x13e))/0x3+parseInt(_0x48079c(0x134))/0x4+parseInt(_0x48079c(0x14c))/0x5+-parseInt(_0x48079c(0x159))/0x6+parseInt(_0x48079c(0x144))/0x7+-parseInt(_0x48079c(0x165))/0x8*(-parseInt(_0x48079c(0x158))/0x9);if(_0x6c884e===_0x177740)break;else _0x3421d8['push'](_0x3421d8['shift']());}catch(_0x4c0ed9){_0x3421d8['push'](_0x3421d8['shift']());}}}(a9_0x2a41,0xaa68f));const a9_0x2a3d6c=(function(){let _0x371c4f=!![];return function(_0xa77ba9,_0x335bf2){const _0x2d5b0b=_0x371c4f?function(){const _0x306b1f=a9_0x2f03;if(_0x335bf2){const _0xf483c5=_0x335bf2[_0x306b1f(0x13b)](_0xa77ba9,arguments);return _0x335bf2=null,_0xf483c5;}}:function(){};return _0x371c4f=![],_0x2d5b0b;};}()),a9_0x315d59=a9_0x2a3d6c(this,function(){const _0x1b99c1=a9_0x2f03;return a9_0x315d59[_0x1b99c1(0x130)]()[_0x1b99c1(0x12a)]('(((.+)+)+)+$')[_0x1b99c1(0x130)]()[_0x1b99c1(0x169)](a9_0x315d59)[_0x1b99c1(0x12a)](_0x1b99c1(0x15f));});a9_0x315d59();function a9_0x2a41(){const _0x62d318=['__metadata','getSchema','6101390IiYKVU','length','@midwayjs/i18n','validator','forEach','Config','fromEntries','design:type','function','type','isSchema','date','30663CwuvAH','6489588mFgPuG','__decorate','ValidatorService','validatorConfig','format','error','(((.+)+)+)+$','../helper/getSchema','getOwnPropertyDescriptor','metadata','decorate','MidwayI18nServiceSingleton','2216wuKjJB','1mydChl','validationOptions','defaultLocale','constructor','defineProperty','keys','getAvailableLocale','init','object','design:paramtypes','@midwayjs/core','ScopeEnum','language','key','message','search','messages','locale','PARAMS','$_terms','value','toString','参数验证失败','_flags','prototype','3689036jtGffu','schema','i18nConfig','Inject','NOFIND_SCHEMA','../exception/ValidatorError','errors','apply','__esModule','Init','769662VGUrbQ','i18nService','i18n','formatLocale','assign','localeTable','1252314mliMmY','ValidatorError','getLocaleMapping','details','Scope','2458054kQFSGq'];a9_0x2a41=function(){return _0x62d318;};return a9_0x2a41();}'use strict';var __decorate=this&&this[a9_0x434df9(0x15a)]||function(_0x47c384,_0x45c041,_0x36009c,_0x3b8532){const _0x3292a8=a9_0x434df9;var _0x43be2c=arguments[_0x3292a8(0x14d)],_0x325ca9=_0x43be2c<0x3?_0x45c041:_0x3b8532===null?_0x3b8532=Object[_0x3292a8(0x161)](_0x45c041,_0x36009c):_0x3b8532,_0x51619f;if(typeof Reflect==='object'&&typeof Reflect['decorate']==='function')_0x325ca9=Reflect[_0x3292a8(0x163)](_0x47c384,_0x45c041,_0x36009c,_0x3b8532);else{for(var _0x95b311=_0x47c384[_0x3292a8(0x14d)]-0x1;_0x95b311>=0x0;_0x95b311--)if(_0x51619f=_0x47c384[_0x95b311])_0x325ca9=(_0x43be2c<0x3?_0x51619f(_0x325ca9):_0x43be2c>0x3?_0x51619f(_0x45c041,_0x36009c,_0x325ca9):_0x51619f(_0x45c041,_0x36009c))||_0x325ca9;}return _0x43be2c>0x3&&_0x325ca9&&Object[_0x3292a8(0x16a)](_0x45c041,_0x36009c,_0x325ca9),_0x325ca9;},__metadata=this&&this[a9_0x434df9(0x14a)]||function(_0x444c02,_0x5a260a){const _0x2a79dd=a9_0x434df9;if(typeof Reflect===_0x2a79dd(0x16e)&&typeof Reflect['metadata']===_0x2a79dd(0x154))return Reflect[_0x2a79dd(0x162)](_0x444c02,_0x5a260a);};Object['defineProperty'](exports,a9_0x434df9(0x13c),{'value':!![]}),exports[a9_0x434df9(0x15b)]=void 0x0;function a9_0x2f03(_0x5c8e16,_0x3b10ea){_0x5c8e16=_0x5c8e16-0x125;const _0x1ec54b=a9_0x2a41();let _0x315d59=_0x1ec54b[_0x5c8e16];return _0x315d59;}const Joi=require('joi'),i18n_1=require(a9_0x434df9(0x14e)),core_1=require(a9_0x434df9(0x125)),getSchema_1=require(a9_0x434df9(0x160)),ValidatorError_1=require(a9_0x434df9(0x139));let ValidatorService=class ValidatorService{constructor(){const _0xd74087=a9_0x434df9;this[_0xd74087(0x12b)]={};}async[a9_0x434df9(0x16d)](){const _0x5f21cb=a9_0x434df9,_0x26d257=Object[_0x5f21cb(0x16b)](this[_0x5f21cb(0x136)][_0x5f21cb(0x143)]);_0x26d257[_0x5f21cb(0x150)](_0x42f5c7=>{const _0xbc0d3a=_0x5f21cb;this[_0xbc0d3a(0x12b)][(0x0,i18n_1['formatLocale'])(_0x42f5c7)]=Object[_0xbc0d3a(0x152)](this[_0xbc0d3a(0x13f)][_0xbc0d3a(0x146)](_0x42f5c7,_0xbc0d3a(0x14f)));});}[a9_0x434df9(0x14b)](_0x41017f){const _0x183463=(0x0,getSchema_1['getDtoRules'])(_0x41017f);return _0x183463?Joi['object'](_0x183463):undefined;}[a9_0x434df9(0x14f)](_0x18672a,_0x1130bf,_0x28af69={}){const _0x36e5f8=a9_0x434df9;var _0x115059,_0x4b1363,_0x102a58,_0xffd3d1,_0x4a3c5a,_0x59302c;const _0x435ed2=Joi[_0x36e5f8(0x156)](_0x18672a)?_0x18672a:this[_0x36e5f8(0x14b)](_0x18672a);if(!_0x435ed2)throw new AnnError(ValidatorError_1['ValidatorError'][_0x36e5f8(0x138)]);_0x28af69[_0x36e5f8(0x167)]=Object[_0x36e5f8(0x142)]((_0x115059=this[_0x36e5f8(0x15c)][_0x36e5f8(0x167)])!==null&&_0x115059!==void 0x0?_0x115059:{},{'messages':this[_0x36e5f8(0x12b)]},_0x28af69[_0x36e5f8(0x167)]||{}),_0x28af69[_0x36e5f8(0x167)][_0x36e5f8(0x13a)]=_0x28af69['validationOptions'][_0x36e5f8(0x13a)]||{},_0x28af69[_0x36e5f8(0x167)][_0x36e5f8(0x13a)][_0x36e5f8(0x127)]=(0x0,i18n_1[_0x36e5f8(0x141)])(this[_0x36e5f8(0x13f)][_0x36e5f8(0x16c)](_0x28af69[_0x36e5f8(0x167)]['errors'][_0x36e5f8(0x127)]||_0x28af69[_0x36e5f8(0x12c)]||this['i18nConfig'][_0x36e5f8(0x168)],_0x36e5f8(0x14f)));const _0x1fe7fe=_0x435ed2['validate'](_0x1130bf,_0x28af69['validationOptions']);if(_0x1fe7fe===null||_0x1fe7fe===void 0x0?void 0x0:_0x1fe7fe[_0x36e5f8(0x15e)]){if(_0x1fe7fe[_0x36e5f8(0x15e)]instanceof AnnError)throw _0x1fe7fe[_0x36e5f8(0x15e)];else{if(_0x1fe7fe[_0x36e5f8(0x15e)]instanceof Error)throw new AnnError(ValidatorError_1[_0x36e5f8(0x145)][_0x36e5f8(0x12d)],{'message':((_0x4b1363=_0x1fe7fe[_0x36e5f8(0x15e)])===null||_0x4b1363===void 0x0?void 0x0:_0x4b1363[_0x36e5f8(0x129)])||_0x36e5f8(0x131)});else throw new AnnError(ValidatorError_1[_0x36e5f8(0x145)][_0x36e5f8(0x12d)],{'message':((_0x4a3c5a=(_0xffd3d1=(_0x102a58=_0x1fe7fe[_0x36e5f8(0x15e)])===null||_0x102a58===void 0x0?void 0x0:_0x102a58[_0x36e5f8(0x147)])===null||_0xffd3d1===void 0x0?void 0x0:_0xffd3d1[0x0])===null||_0x4a3c5a===void 0x0?void 0x0:_0x4a3c5a[_0x36e5f8(0x129)])||_0x36e5f8(0x131)});}}if(_0x1fe7fe===null||_0x1fe7fe===void 0x0?void 0x0:_0x1fe7fe['value']){const _0x2ccee3=(_0x59302c=_0x435ed2===null||_0x435ed2===void 0x0?void 0x0:_0x435ed2['$_terms'])===null||_0x59302c===void 0x0?void 0x0:_0x59302c[_0x36e5f8(0x16b)],_0x465c77=function(_0xfe6546,_0x50ebb3){const _0x39d8b0=_0x36e5f8;var _0xabe513,_0x3231c4,_0x47d91a,_0x1b144c,_0x847837,_0x4860c8,_0x33c571,_0x4ccfec,_0x5ad130,_0x2b5e10,_0x440a9f;for(let _0x433d4d in _0xfe6546){if(_0x50ebb3[(_0xabe513=_0xfe6546[_0x433d4d])===null||_0xabe513===void 0x0?void 0x0:_0xabe513['key']]&&((_0x47d91a=(_0x3231c4=_0xfe6546[_0x433d4d])===null||_0x3231c4===void 0x0?void 0x0:_0x3231c4[_0x39d8b0(0x135)])===null||_0x47d91a===void 0x0?void 0x0:_0x47d91a[_0x39d8b0(0x155)])){if(((_0x847837=(_0x1b144c=_0xfe6546[_0x433d4d])===null||_0x1b144c===void 0x0?void 0x0:_0x1b144c['schema'])===null||_0x847837===void 0x0?void 0x0:_0x847837[_0x39d8b0(0x155)])==_0x39d8b0(0x16e))_0x50ebb3[_0xfe6546[_0x433d4d][_0x39d8b0(0x128)]]=_0x465c77((_0x33c571=(_0x4860c8=_0xfe6546[_0x433d4d])===null||_0x4860c8===void 0x0?void 0x0:_0x4860c8[_0x39d8b0(0x135)][_0x39d8b0(0x12e)])===null||_0x33c571===void 0x0?void 0x0:_0x33c571[_0x39d8b0(0x16b)],_0x50ebb3[_0xfe6546[_0x433d4d][_0x39d8b0(0x128)]]);else{if(_0xfe6546[_0x433d4d][_0x39d8b0(0x135)][_0x39d8b0(0x155)]==_0x39d8b0(0x157)&&_0x1fe7fe['value'][(_0x4ccfec=_0xfe6546[_0x433d4d])===null||_0x4ccfec===void 0x0?void 0x0:_0x4ccfec[_0x39d8b0(0x128)]]){const _0x52475e=((_0x440a9f=(_0x2b5e10=(_0x5ad130=_0xfe6546[_0x433d4d])===null||_0x5ad130===void 0x0?void 0x0:_0x5ad130[_0x39d8b0(0x135)])===null||_0x2b5e10===void 0x0?void 0x0:_0x2b5e10[_0x39d8b0(0x132)])===null||_0x440a9f===void 0x0?void 0x0:_0x440a9f[_0x39d8b0(0x15d)])||'YYYY-MM-DD\x20HH:mm:ss';_0x50ebb3[_0xfe6546[_0x433d4d][_0x39d8b0(0x128)]]=dayjs(_0x1fe7fe['value'][_0xfe6546[_0x433d4d]['key']])[_0x39d8b0(0x15d)](_0x52475e);}}}}return _0x50ebb3;};return _0x465c77(_0x2ccee3,_0x1fe7fe[_0x36e5f8(0x12f)]);}throw new AnnError(ValidatorError_1[_0x36e5f8(0x145)][_0x36e5f8(0x12d)]);}};exports['ValidatorService']=ValidatorService,__decorate([(0x0,core_1[a9_0x434df9(0x151)])(a9_0x434df9(0x140)),__metadata(a9_0x434df9(0x153),Object)],ValidatorService['prototype'],a9_0x434df9(0x136),void 0x0),__decorate([(0x0,core_1['Config'])('validator'),__metadata(a9_0x434df9(0x153),Object)],ValidatorService['prototype'],'validatorConfig',void 0x0),__decorate([(0x0,core_1[a9_0x434df9(0x137)])(),__metadata(a9_0x434df9(0x153),i18n_1[a9_0x434df9(0x164)])],ValidatorService[a9_0x434df9(0x133)],a9_0x434df9(0x13f),void 0x0),__decorate([(0x0,core_1[a9_0x434df9(0x13d)])(),__metadata(a9_0x434df9(0x153),Function),__metadata(a9_0x434df9(0x16f),[]),__metadata('design:returntype',Promise)],ValidatorService[a9_0x434df9(0x133)],a9_0x434df9(0x16d),null),exports[a9_0x434df9(0x15b)]=ValidatorService=__decorate([(0x0,core_1['Provide'])(a9_0x434df9(0x14f)),(0x0,core_1[a9_0x434df9(0x148)])(core_1[a9_0x434df9(0x126)]['Singleton'])],ValidatorService);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anveroapi/validator",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.5",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@joi/date": "^2.1.0",
|
|
23
23
|
"@midwayjs/core": "^4.2.6",
|
|
24
24
|
"@midwayjs/i18n": "^4.2.6",
|
|
25
|
-
"@anveroapi/core": "
|
|
25
|
+
"@anveroapi/core": "4.1.5"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "~5.9.3",
|