@anveroapi/validator 4.1.4 → 4.1.6
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 +32 -32
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x2d1db5=a0_0x4856;(function(_0x11d6a3,_0x37fe72){const _0x4b5f95=a0_0x4856,_0x1a5792=_0x11d6a3();while(!![]){try{const _0x19fb6f=parseInt(_0x4b5f95(0xfe))/0x1+parseInt(_0x4b5f95(0x103))/0x2*(parseInt(_0x4b5f95(0x100))/0x3)+-parseInt(_0x4b5f95(0xfa))/0x4*(parseInt(_0x4b5f95(0xf9))/0x5)+-parseInt(_0x4b5f95(0x104))/0x6*(-parseInt(_0x4b5f95(0xf2))/0x7)+parseInt(_0x4b5f95(0xfb))/0x8+parseInt(_0x4b5f95(0xff))/0x9*(-parseInt(_0x4b5f95(0xf7))/0xa)+parseInt(_0x4b5f95(0xf8))/0xb*(-parseInt(_0x4b5f95(0x102))/0xc);if(_0x19fb6f===_0x37fe72)break;else _0x1a5792['push'](_0x1a5792['shift']());}catch(_0x540f95){_0x1a5792['push'](_0x1a5792['shift']());}}}(a0_0xbeb3,0x6b84f));const a0_0x12a163=(function(){let _0x3e9a4b=!![];return function(_0x24383f,_0x282878){const _0x27cab0=_0x3e9a4b?function(){const _0x3f985f=a0_0x4856;if(_0x282878){const _0x300b24=_0x282878[_0x3f985f(0xf4)](_0x24383f,arguments);return _0x282878=null,_0x300b24;}}:function(){};return _0x3e9a4b=![],_0x27cab0;};}()),a0_0x2e27b5=a0_0x12a163(this,function(){const _0x178f6b=a0_0x4856;return a0_0x2e27b5[_0x178f6b(0xf3)]()[_0x178f6b(0xfc)](_0x178f6b(0xf6))[_0x178f6b(0xf3)]()['constructor'](a0_0x2e27b5)[_0x178f6b(0xfc)]('(((.+)+)+)+$');});a0_0x2e27b5();function a0_0xbeb3(){const _0x562418=['apply','../../locales/en_US.json','(((.+)+)+)+$','237370vDqeUD','5499758PJgxPT','122290vgXrvQ','4iTSYPa','5305904momYAA','search','../exception/ValidatorError','809507vFkoum','54CQapUL','93fBDJyk','defineProperty','24ZSshBg','3218aDvSrU','2406UzCWTi','PARAMS','default','1477biRPkC','toString'];a0_0xbeb3=function(){return _0x562418;};return a0_0xbeb3();}'use strict';Object[a0_0x2d1db5(0x101)](exports,'__esModule',{'value':!![]});function a0_0x4856(_0x52d033,_0x4d69d0){_0x52d033=_0x52d033-0xf2;const _0x12f7a4=a0_0xbeb3();let _0x2e27b5=_0x12f7a4[_0x52d033];return _0x2e27b5;}const ValidatorError_1=require(a0_0x2d1db5(0xfd));exports[a0_0x2d1db5(0x106)]={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x2d1db5(0x105)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x2d1db5(0xf5))},'zh_CN':{'validator':require('../../locales/zh_CN.json')}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x529bc3=a1_0x314d;(function(_0x270812,_0x49e42d){const _0x46099d=a1_0x314d,_0x9f447=_0x270812();while(!![]){try{const _0x4801be=-parseInt(_0x46099d(0x218))/0x1*(parseInt(_0x46099d(0x214))/0x2)+parseInt(_0x46099d(0x20d))/0x3+-parseInt(_0x46099d(0x1f1))/0x4+-parseInt(_0x46099d(0x205))/0x5+-parseInt(_0x46099d(0x1f7))/0x6+-parseInt(_0x46099d(0x1fb))/0x7+parseInt(_0x46099d(0x206))/0x8;if(_0x4801be===_0x49e42d)break;else _0x9f447['push'](_0x9f447['shift']());}catch(_0x2aaeb3){_0x9f447['push'](_0x9f447['shift']());}}}(a1_0x1f19,0x39969));function a1_0x1f19(){const _0x589d05=['prototype','toString','onReady','getOwnMetadata','__esModule','ValidatorService','constructor','anvero-api:validator','./config/config.default','@anveroapi/core','metadata','1139884fDvcug','getMethodParamTypes','getAttr','registerMethodHandler','MetadataManager','design:type','2366532xrqXhr','VALIDATOR_KEY','methodArgs','validator','1968624DDxzTR','./service/ValidatorService','getOwnPropertyDescriptor','function','decorate','Inject','./interface','@midwayjs/core','methodName','param','1534510wTubUo','11949520jMqKlx','body','@midwayjs/i18n','args','target','apply','res','1367049poIOHu','__decorate','(((.+)+)+)+$','CustomConfiguration','decorator','find','search','4574RSNaoL','params','__metadata','splice','195NFUKyY','REQUEST_OBJ_CTX_KEY','getSchema','Configuration','I18N_ATTR_KEY','length','object','request','query','propertyName','method'];a1_0x1f19=function(){return _0x589d05;};return a1_0x1f19();}const a1_0x575e32=(function(){let _0x10b80b=!![];return function(_0xd81de3,_0x1792e4){const _0x2c8423=_0x10b80b?function(){const _0x247580=a1_0x314d;if(_0x1792e4){const _0x3a2799=_0x1792e4[_0x247580(0x20b)](_0xd81de3,arguments);return _0x1792e4=null,_0x3a2799;}}:function(){};return _0x10b80b=![],_0x2c8423;};}()),a1_0x1f1188=a1_0x575e32(this,function(){const _0x5729c0=a1_0x314d;return a1_0x1f1188['toString']()[_0x5729c0(0x213)](_0x5729c0(0x20f))[_0x5729c0(0x1e7)]()[_0x5729c0(0x1ec)](a1_0x1f1188)[_0x5729c0(0x213)](_0x5729c0(0x20f));});a1_0x1f1188();'use strict';var __decorate=this&&this[a1_0x529bc3(0x20e)]||function(_0xf9e51a,_0x815b29,_0x4a0fda,_0x525486){const _0xeff735=a1_0x529bc3;var _0x5ba20e=arguments[_0xeff735(0x21d)],_0x1697d1=_0x5ba20e<0x3?_0x815b29:_0x525486===null?_0x525486=Object[_0xeff735(0x1fd)](_0x815b29,_0x4a0fda):_0x525486,_0x2d4496;if(typeof Reflect==='object'&&typeof Reflect[_0xeff735(0x1ff)]===_0xeff735(0x1fe))_0x1697d1=Reflect[_0xeff735(0x1ff)](_0xf9e51a,_0x815b29,_0x4a0fda,_0x525486);else{for(var _0x47cb33=_0xf9e51a[_0xeff735(0x21d)]-0x1;_0x47cb33>=0x0;_0x47cb33--)if(_0x2d4496=_0xf9e51a[_0x47cb33])_0x1697d1=(_0x5ba20e<0x3?_0x2d4496(_0x1697d1):_0x5ba20e>0x3?_0x2d4496(_0x815b29,_0x4a0fda,_0x1697d1):_0x2d4496(_0x815b29,_0x4a0fda))||_0x1697d1;}return _0x5ba20e>0x3&&_0x1697d1&&Object['defineProperty'](_0x815b29,_0x4a0fda,_0x1697d1),_0x1697d1;},__metadata=this&&this[a1_0x529bc3(0x216)]||function(_0x21efe1,_0x7d51d5){const _0x208718=a1_0x529bc3;if(typeof Reflect===_0x208718(0x21e)&&typeof Reflect[_0x208718(0x1f0)]==='function')return Reflect[_0x208718(0x1f0)](_0x21efe1,_0x7d51d5);};Object['defineProperty'](exports,a1_0x529bc3(0x1ea),{'value':!![]}),exports[a1_0x529bc3(0x210)]=void 0x0;const i18n_1=require(a1_0x529bc3(0x208)),core_1=require(a1_0x529bc3(0x202)),core_2=require(a1_0x529bc3(0x202)),interface_1=require(a1_0x529bc3(0x201)),ValidatorService_1=require(a1_0x529bc3(0x1fc)),i18n=require(a1_0x529bc3(0x208)),anvero=require(a1_0x529bc3(0x1ef)),ConfigDefault=require(a1_0x529bc3(0x1ee));function a1_0x314d(_0x2a0a3a,_0x4d6783){_0x2a0a3a=_0x2a0a3a-0x1e2;const _0x413ffd=a1_0x1f19();let _0x1f1188=_0x413ffd[_0x2a0a3a];return _0x1f1188;}let CustomConfiguration=class CustomConfiguration{async[a1_0x529bc3(0x1e8)](){const _0x17fe58=a1_0x529bc3;this[_0x17fe58(0x211)][_0x17fe58(0x1f4)](interface_1['VALIDATOR_KEY'],_0x1b548c=>{const _0x33c5ec=_0x17fe58,_0x4523da=_0x1b548c[_0x33c5ec(0x1f0)],_0x4562bb=core_2[_0x33c5ec(0x1f5)][_0x33c5ec(0x1f2)](_0x1b548c[_0x33c5ec(0x20a)],_0x1b548c[_0x33c5ec(0x1e4)]);return{'before':_0x349e73=>{const _0x2e1b21=_0x33c5ec;var _0x55285c,_0x3da389,_0x525de4,_0x427608,_0x53088e,_0x322bff,_0x12cb2c,_0x421ea0,_0x35c60d,_0x553edf,_0x4ffb03,_0x181ad5,_0x18481e;const _0xc83ec7=_0x349e73[_0x2e1b21(0x20a)][core_1[_0x2e1b21(0x219)]],_0x370b4f=Object['assign']({},((_0x55285c=_0xc83ec7===null||_0xc83ec7===void 0x0?void 0x0:_0xc83ec7['request'])===null||_0x55285c===void 0x0?void 0x0:_0x55285c[_0x2e1b21(0x1e3)])||{},((_0x3da389=_0xc83ec7===null||_0xc83ec7===void 0x0?void 0x0:_0xc83ec7[_0x2e1b21(0x1e2)])===null||_0x3da389===void 0x0?void 0x0:_0x3da389[_0x2e1b21(0x207)])||{}),_0x12fb68=(core_2['MetadataManager'][_0x2e1b21(0x1e9)](interface_1[_0x2e1b21(0x1f8)],_0x349e73[_0x2e1b21(0x20a)])||[])[_0x2e1b21(0x212)](_0x4ad335=>_0x4ad335[_0x2e1b21(0x1e5)]==_0x349e73[_0x2e1b21(0x203)]);!(_0x4523da===null||_0x4523da===void 0x0?void 0x0:_0x4523da['locale'])&&_0xc83ec7&&_0xc83ec7[_0x2e1b21(0x1f3)]&&(_0x4523da['locale']=_0xc83ec7[_0x2e1b21(0x1f3)](i18n_1[_0x2e1b21(0x21c)]));for(let _0x50bebe=0x0;_0x50bebe<_0x4562bb[_0x2e1b21(0x21d)];_0x50bebe++){const _0x2f30da=_0x4562bb[_0x50bebe],_0x47df20=this[_0x2e1b21(0x1eb)][_0x2e1b21(0x21a)](_0x2f30da);if(_0x47df20){if(typeof _0x349e73[_0x2e1b21(0x209)][_0x50bebe]=='undefined'||((_0x525de4=_0x349e73['args'][_0x50bebe])===null||_0x525de4===void 0x0?void 0x0:_0x525de4[_0x2e1b21(0x1e2)])&&((_0x427608=_0x349e73[_0x2e1b21(0x209)][_0x50bebe])===null||_0x427608===void 0x0?void 0x0:_0x427608[_0x2e1b21(0x20c)])&&((_0x53088e=_0x349e73[_0x2e1b21(0x209)][_0x50bebe])===null||_0x53088e===void 0x0?void 0x0:_0x53088e['req']))_0x349e73['args'][_0x50bebe]=_0x370b4f;else((_0x322bff=_0x349e73[_0x2e1b21(0x209)][_0x50bebe])===null||_0x322bff===void 0x0?void 0x0:_0x322bff['name'])=='bound\x20dispatch'&&_0x349e73[_0x2e1b21(0x209)][_0x2e1b21(0x217)](_0x50bebe,0x0,_0x370b4f);const _0x3e5a68=this['ValidatorService'][_0x2e1b21(0x1fa)](_0x47df20,_0x349e73['args'][_0x50bebe],_0x4523da);_0x3e5a68&&(_0x349e73[_0x2e1b21(0x209)][_0x50bebe]=_0x3e5a68);}else{if((_0x12fb68===null||_0x12fb68===void 0x0?void 0x0:_0x12fb68['methodArgs'][_0x50bebe])&&((_0x12cb2c=_0x349e73[_0x2e1b21(0x209)][_0x50bebe])===null||_0x12cb2c===void 0x0?void 0x0:_0x12cb2c[_0x2e1b21(0x215)])&&typeof _0x349e73['args'][_0x50bebe][_0x2e1b21(0x204)]=='function'&&((_0x421ea0=_0xc83ec7===null||_0xc83ec7===void 0x0?void 0x0:_0xc83ec7[_0x2e1b21(0x215)])===null||_0x421ea0===void 0x0?void 0x0:_0x421ea0[_0x12fb68[_0x2e1b21(0x1f9)][_0x50bebe]]))_0x349e73['args'][_0x50bebe]=_0x2f30da((_0x35c60d=_0xc83ec7===null||_0xc83ec7===void 0x0?void 0x0:_0xc83ec7['params'])===null||_0x35c60d===void 0x0?void 0x0:_0x35c60d[_0x12fb68['methodArgs'][_0x50bebe]]);else(_0x12fb68===null||_0x12fb68===void 0x0?void 0x0:_0x12fb68[_0x2e1b21(0x1f9)][_0x50bebe])&&((_0x4ffb03=(_0x553edf=_0x349e73['args'][_0x50bebe])===null||_0x553edf===void 0x0?void 0x0:_0x553edf[_0x2e1b21(0x215)])===null||_0x4ffb03===void 0x0?void 0x0:_0x4ffb03[_0x12fb68[_0x2e1b21(0x1f9)][_0x50bebe]])&&(_0x349e73[_0x2e1b21(0x209)][_0x50bebe]=(_0x18481e=(_0x181ad5=_0x349e73[_0x2e1b21(0x209)][_0x50bebe])===null||_0x181ad5===void 0x0?void 0x0:_0x181ad5['params'])===null||_0x18481e===void 0x0?void 0x0:_0x18481e[_0x12fb68[_0x2e1b21(0x1f9)][_0x50bebe]]);}}},'afterThrow':(_0x1b7a23,_0x5a4a9d)=>{throw _0x5a4a9d;}};});}};exports['CustomConfiguration']=CustomConfiguration,__decorate([(0x0,core_2[a1_0x529bc3(0x200)])(),__metadata(a1_0x529bc3(0x1f6),core_1['MidwayDecoratorService'])],CustomConfiguration[a1_0x529bc3(0x1e6)],a1_0x529bc3(0x211),void 0x0),__decorate([(0x0,core_2[a1_0x529bc3(0x200)])(),__metadata(a1_0x529bc3(0x1f6),ValidatorService_1['ValidatorService'])],CustomConfiguration[a1_0x529bc3(0x1e6)],a1_0x529bc3(0x1eb),void 0x0),exports[a1_0x529bc3(0x210)]=CustomConfiguration=__decorate([(0x0,core_2[a1_0x529bc3(0x21b)])({'imports':[i18n,anvero],'namespace':a1_0x529bc3(0x1ed),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a2_0x224e(){const _0x1a87dc=['__esModule','15205448xvazdI','defineMetadata','defineProperty','1050kqhzGX','apply','name','3662264LiiXtN','MetadataManager','constructor','887297nQEwxa','getOwnMetadata','49889FCImaL','RuleType','toString','function','(((.+)+)+)+$','115204kVfgyG','Rule','2192448cgKhhr','label','description','keys','1423835XdhRYA','RULES_KEY','transformTypeFromTSDesign','@joi/date','joi','items','map','isSchema','meta','search'];a2_0x224e=function(){return _0x1a87dc;};return a2_0x224e();}function a2_0x563f(_0x164c38,_0x2dba29){_0x164c38=_0x164c38-0x1ab;const _0x36aa8c=a2_0x224e();let _0x4faf0e=_0x36aa8c[_0x164c38];return _0x4faf0e;}const a2_0x2776e6=a2_0x563f;(function(_0x245432,_0xefaddd){const _0x45f821=a2_0x563f,_0x12c55d=_0x245432();while(!![]){try{const _0x1baec2=-parseInt(_0x45f821(0x1af))/0x1+-parseInt(_0x45f821(0x1b6))/0x2+-parseInt(_0x45f821(0x1b8))/0x3+-parseInt(_0x45f821(0x1ac))/0x4+parseInt(_0x45f821(0x1bc))/0x5+-parseInt(_0x45f821(0x1ca))/0x6*(-parseInt(_0x45f821(0x1b1))/0x7)+parseInt(_0x45f821(0x1c7))/0x8;if(_0x1baec2===_0xefaddd)break;else _0x12c55d['push'](_0x12c55d['shift']());}catch(_0x5d7f5a){_0x12c55d['push'](_0x12c55d['shift']());}}}(a2_0x224e,0xcd6b0));const a2_0x7a8dd4=(function(){let _0x13ecd2=!![];return function(_0x345097,_0x2781ad){const _0x7945c8=_0x13ecd2?function(){const _0x26126b=a2_0x563f;if(_0x2781ad){const _0x564c58=_0x2781ad[_0x26126b(0x1cb)](_0x345097,arguments);return _0x2781ad=null,_0x564c58;}}:function(){};return _0x13ecd2=![],_0x7945c8;};}()),a2_0x4faf0e=a2_0x7a8dd4(this,function(){const _0x46e6a3=a2_0x563f;return a2_0x4faf0e['toString']()[_0x46e6a3(0x1c5)](_0x46e6a3(0x1b5))[_0x46e6a3(0x1b3)]()[_0x46e6a3(0x1ae)](a2_0x4faf0e)[_0x46e6a3(0x1c5)](_0x46e6a3(0x1b5));});a2_0x4faf0e();'use strict';Object[a2_0x2776e6(0x1c9)](exports,a2_0x2776e6(0x1c6),{'value':!![]}),exports[a2_0x2776e6(0x1b2)]=void 0x0,exports[a2_0x2776e6(0x1b7)]=Rule;const joi=require(a2_0x2776e6(0x1c0)),date_1=require(a2_0x2776e6(0x1bf)),core_1=require('@midwayjs/core'),interface_1=require('../interface');exports[a2_0x2776e6(0x1b2)]=joi['extend'](date_1['default']);function Rule(_0x245734,_0x2ae191,_0x5ded2f=''){return(_0x44413e,_0x2afaae)=>{const _0x2c1c6c=a2_0x563f;var _0x2d3edf;if(_0x2afaae)!joi[_0x2c1c6c(0x1c3)](_0x2ae191)&&(_0x2ae191===null||_0x2ae191===void 0x0?void 0x0:_0x2ae191[_0x2c1c6c(0x1ab)])&&(_0x2ae191=joi['object'](core_1['MetadataManager'][_0x2c1c6c(0x1b0)](interface_1[_0x2c1c6c(0x1bd)],_0x2ae191))[_0x2c1c6c(0x1c4)]({'id':_0x2ae191[_0x2c1c6c(0x1ab)]}),core_1['MetadataManager'][_0x2c1c6c(0x1be)](core_1['MetadataManager']['getPropertyType'](_0x44413e,_0x2afaae))[_0x2c1c6c(0x1ab)]==='Array'&&(_0x2ae191=joi['array']()[_0x2c1c6c(0x1c1)](_0x2ae191))),joi[_0x2c1c6c(0x1c3)](_0x2ae191)&&(_0x245734&&typeof(_0x2ae191===null||_0x2ae191===void 0x0?void 0x0:_0x2ae191['label'])==_0x2c1c6c(0x1b4)&&(_0x2ae191=_0x2ae191[_0x2c1c6c(0x1b9)](_0x245734)),_0x5ded2f&&typeof(_0x2ae191===null||_0x2ae191===void 0x0?void 0x0:_0x2ae191[_0x2c1c6c(0x1ba)])==_0x2c1c6c(0x1b4)&&(_0x2ae191=_0x2ae191['description'](_0x5ded2f)),core_1['MetadataManager']['attachMetadata'](interface_1[_0x2c1c6c(0x1bd)],_0x2ae191,_0x44413e,_0x2afaae));else{const _0x26a4dd=core_1[_0x2c1c6c(0x1ad)]['getOwnMetadata'](interface_1['RULES_KEY'],_0x2ae191);if(_0x26a4dd){let _0x196386=(_0x2d3edf=core_1[_0x2c1c6c(0x1ad)][_0x2c1c6c(0x1b0)](interface_1[_0x2c1c6c(0x1bd)],_0x44413e))!==null&&_0x2d3edf!==void 0x0?_0x2d3edf:{};Object[_0x2c1c6c(0x1bb)](_0x26a4dd)[_0x2c1c6c(0x1c2)](_0x4b8840=>{!_0x196386[_0x4b8840]&&(_0x196386[_0x4b8840]=_0x26a4dd[_0x4b8840]);}),core_1[_0x2c1c6c(0x1ad)][_0x2c1c6c(0x1c8)](interface_1[_0x2c1c6c(0x1bd)],_0x196386,_0x44413e);}}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x5dda82=a3_0x391e;(function(_0x2c909b,_0x5b070c){const _0x212ce0=a3_0x391e,_0x5b0eb6=_0x2c909b();while(!![]){try{const _0x284123=parseInt(_0x212ce0(0x1ba))/0x1*(-parseInt(_0x212ce0(0x1bd))/0x2)+-parseInt(_0x212ce0(0x1b8))/0x3*(-parseInt(_0x212ce0(0x1b7))/0x4)+parseInt(_0x212ce0(0x1b6))/0x5+parseInt(_0x212ce0(0x1b3))/0x6*(parseInt(_0x212ce0(0x1c4))/0x7)+-parseInt(_0x212ce0(0x1aa))/0x8+-parseInt(_0x212ce0(0x1c3))/0x9*(-parseInt(_0x212ce0(0x1be))/0xa)+-parseInt(_0x212ce0(0x1bb))/0xb;if(_0x284123===_0x5b070c)break;else _0x5b0eb6['push'](_0x5b0eb6['shift']());}catch(_0x3b7d35){_0x5b0eb6['push'](_0x5b0eb6['shift']());}}}(a3_0x494c,0xeb155));function a3_0x494c(){const _0x3da6a9=['search','slice','MetadataManager','18030pUzJMN','match','../interface','5977790LamYBR','425772ZmrBFk','48NdYYla','function','1LMTJME','26069571qrkDcq','indexOf','467642JJbets','723460GfiLfY','replace','apply','getFuncArgs','toString','36ReFXlj','2121VpoDes','defineProperty','constructor','4254896VOjcaa','createCustomMethodDecorator','VALIDATOR_KEY','prototype','(((.+)+)+)+$','__esModule'];a3_0x494c=function(){return _0x3da6a9;};return a3_0x494c();}const a3_0x297c88=(function(){let _0x526c2c=!![];return function(_0x165f61,_0x5e12c8){const _0x130472=_0x526c2c?function(){const _0x270268=a3_0x391e;if(_0x5e12c8){const _0x41eff3=_0x5e12c8[_0x270268(0x1c0)](_0x165f61,arguments);return _0x5e12c8=null,_0x41eff3;}}:function(){};return _0x526c2c=![],_0x130472;};}()),a3_0x2edd32=a3_0x297c88(this,function(){const _0x1c28a9=a3_0x391e;return a3_0x2edd32[_0x1c28a9(0x1c2)]()[_0x1c28a9(0x1b0)]('(((.+)+)+)+$')[_0x1c28a9(0x1c2)]()[_0x1c28a9(0x1a9)](a3_0x2edd32)['search'](_0x1c28a9(0x1ae));});a3_0x2edd32();'use strict';Object[a3_0x5dda82(0x1c5)](exports,a3_0x5dda82(0x1af),{'value':!![]}),exports['Validator']=Validator,exports[a3_0x5dda82(0x1c1)]=getFuncArgs;function a3_0x391e(_0x27532b,_0x5cbe23){_0x27532b=_0x27532b-0x1a9;const _0x51612b=a3_0x494c();let _0x2edd32=_0x51612b[_0x27532b];return _0x2edd32;}const core_1=require('@midwayjs/core'),interface_1=require(a3_0x5dda82(0x1b5));function Validator(_0xfcccec={}){return(_0x469e7f,_0x2800b3,_0x548c2c)=>{const _0x5c6ead=a3_0x391e,_0x4345a3=getFuncArgs(_0x469e7f[_0x2800b3]);core_1[_0x5c6ead(0x1b2)]['attachMetadata'](interface_1[_0x5c6ead(0x1ac)],{'method':_0x2800b3,'methodArgs':_0x4345a3},_0x469e7f),core_1['DecoratorManager'][_0x5c6ead(0x1ab)](interface_1[_0x5c6ead(0x1ac)],_0xfcccec)(_0x469e7f,_0x2800b3,_0x548c2c);};}function getFuncArgs(_0x199993){const _0x57175f=a3_0x5dda82;if(typeof _0x199993==_0x57175f(0x1b9)){const _0x461c19=/=>.*$/mg,_0x4c4272=/=[^,)]+/mg,_0x179362=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x2c37ac=(_0x199993[_0x57175f(0x1ad)]?_0x199993[_0x57175f(0x1ad)][_0x57175f(0x1a9)][_0x57175f(0x1c2)]():_0x199993['toString']())[_0x57175f(0x1bf)](_0x179362,'')[_0x57175f(0x1bf)](_0x461c19,'')[_0x57175f(0x1bf)](_0x4c4272,''),_0x942c83=_0x2c37ac[_0x57175f(0x1b1)](_0x2c37ac[_0x57175f(0x1bc)]('(')+0x1,_0x2c37ac[_0x57175f(0x1bc)](')'))[_0x57175f(0x1b4)](/([^\s,]+)/g)||[];return _0x942c83;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x3a3b02=a4_0x3b68;(function(_0x1c8065,_0x48b4b6){var _0x4a973f=a4_0x3b68,_0x1d0f83=_0x1c8065();while(!![]){try{var _0x580ed4=parseInt(_0x4a973f(0x102))/0x1*(-parseInt(_0x4a973f(0xf8))/0x2)+parseInt(_0x4a973f(0xfa))/0x3*(-parseInt(_0x4a973f(0x100))/0x4)+parseInt(_0x4a973f(0xfc))/0x5*(-parseInt(_0x4a973f(0xe7))/0x6)+-parseInt(_0x4a973f(0xf1))/0x7*(parseInt(_0x4a973f(0xfe))/0x8)+parseInt(_0x4a973f(0xed))/0x9+parseInt(_0x4a973f(0xf7))/0xa*(-parseInt(_0x4a973f(0xeb))/0xb)+-parseInt(_0x4a973f(0xf4))/0xc*(-parseInt(_0x4a973f(0xe9))/0xd);if(_0x580ed4===_0x48b4b6)break;else _0x1d0f83['push'](_0x1d0f83['shift']());}catch(_0x10bd93){_0x1d0f83['push'](_0x1d0f83['shift']());}}}(a4_0x44ca,0xcd32b));var a4_0x28bc35=(function(){var _0x3b56df=!![];return function(_0x403faf,_0x15215c){var _0x1953b6=_0x3b56df?function(){if(_0x15215c){var _0x54dfc2=_0x15215c['apply'](_0x403faf,arguments);return _0x15215c=null,_0x54dfc2;}}:function(){};return _0x3b56df=![],_0x1953b6;};}()),a4_0x4a38cd=a4_0x28bc35(this,function(){var _0x2303f1=a4_0x3b68;return a4_0x4a38cd[_0x2303f1(0xe4)]()[_0x2303f1(0xf0)](_0x2303f1(0xee))[_0x2303f1(0xe4)]()[_0x2303f1(0xfd)](a4_0x4a38cd)[_0x2303f1(0xf0)](_0x2303f1(0xee));});a4_0x4a38cd();'use strict';var __decorate=this&&this[a4_0x3a3b02(0xff)]||function(_0x538a80,_0x4ac126,_0x1b76e0,_0x2fdd7b){var _0x3de204=a4_0x3a3b02,_0x540d38=arguments['length'],_0x19cdc2=_0x540d38<0x3?_0x4ac126:_0x2fdd7b===null?_0x2fdd7b=Object['getOwnPropertyDescriptor'](_0x4ac126,_0x1b76e0):_0x2fdd7b,_0x47060a;if(typeof Reflect===_0x3de204(0xec)&&typeof Reflect[_0x3de204(0xe8)]==='function')_0x19cdc2=Reflect['decorate'](_0x538a80,_0x4ac126,_0x1b76e0,_0x2fdd7b);else{for(var _0xd39a15=_0x538a80['length']-0x1;_0xd39a15>=0x0;_0xd39a15--)if(_0x47060a=_0x538a80[_0xd39a15])_0x19cdc2=(_0x540d38<0x3?_0x47060a(_0x19cdc2):_0x540d38>0x3?_0x47060a(_0x4ac126,_0x1b76e0,_0x19cdc2):_0x47060a(_0x4ac126,_0x1b76e0))||_0x19cdc2;}return _0x540d38>0x3&&_0x19cdc2&&Object[_0x3de204(0xf6)](_0x4ac126,_0x1b76e0,_0x19cdc2),_0x19cdc2;},__metadata=this&&this[a4_0x3a3b02(0xf3)]||function(_0x2193b4,_0x2d6bc2){var _0x20ff70=a4_0x3a3b02;if(typeof Reflect===_0x20ff70(0xec)&&typeof Reflect[_0x20ff70(0xe5)]===_0x20ff70(0xf2))return Reflect['metadata'](_0x2193b4,_0x2d6bc2);};Object[a4_0x3a3b02(0xf6)](exports,a4_0x3a3b02(0xf9),{'value':!![]}),exports[a4_0x3a3b02(0xef)]=void 0x0;const core_1=require('@anveroapi/core');function a4_0x3b68(_0x410788,_0x3c22de){_0x410788=_0x410788-0xe4;var _0x3dc88e=a4_0x44ca();var _0x4a38cd=_0x3dc88e[_0x410788];return _0x4a38cd;}function a4_0x44ca(){var _0x7c07da=['design:type','72JhWdmu','decorate','52871lxWxhQ','AnnErrorMsg','2453DJXxlx','object','4232394JPXbGb','(((.+)+)+)+$','ValidatorError','search','21ZJtTYM','function','__metadata','11892tTObDH','参数验证失败','defineProperty','10570RTKQAv','459152bbMEYx','__esModule','42HYZccN','NOFIND_SCHEMA','490335CwPpwv','constructor','2568696YZGpIe','__decorate','235784ByIZVI','PARAMS','2JdZitG','toString','metadata'];a4_0x44ca=function(){return _0x7c07da;};return a4_0x44ca();}class ValidatorError extends AnnError{}exports['ValidatorError']=ValidatorError,ValidatorError[a4_0x3a3b02(0x101)]=0x18c1e,ValidatorError[a4_0x3a3b02(0xfb)]=0x18c1c,__decorate([(0x0,core_1[a4_0x3a3b02(0xea)])('参数验证失败'),__metadata(a4_0x3a3b02(0xe6),Object)],ValidatorError,a4_0x3a3b02(0x101),void 0x0),__decorate([(0x0,core_1['AnnErrorMsg'])(a4_0x3a3b02(0xf5)),__metadata(a4_0x3a3b02(0xe6),Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0xb2c589=a5_0x17ed;function a5_0x7d5f(){const _0x9c4588=['27BWGSrL','72yICKuX','72510KbHTwJ','@midwayjs/core','MetadataManager','13664928BUFfSe','70752EdCJWM','toString','212049bCTJao','defineProperty','./getSchema','44uQvdmZ','getDtoRules','21kcfgPk','(((.+)+)+)+$','227118AMGFTk','__esModule','prototype','constructor','11DfaafU','385445KwkCiB','PickDto','7996790SDRRJs'];a5_0x7d5f=function(){return _0x9c4588;};return a5_0x7d5f();}(function(_0x148da7,_0x59c1ef){const _0x6cda08=a5_0x17ed,_0x533139=_0x148da7();while(!![]){try{const _0x33e5cd=parseInt(_0x6cda08(0x95))/0x1*(-parseInt(_0x6cda08(0x97))/0x2)+-parseInt(_0x6cda08(0x9b))/0x3*(parseInt(_0x6cda08(0xa0))/0x4)+parseInt(_0x6cda08(0x92))/0x5+-parseInt(_0x6cda08(0x8d))/0x6*(-parseInt(_0x6cda08(0x8b))/0x7)+parseInt(_0x6cda08(0x96))/0x8*(-parseInt(_0x6cda08(0x9d))/0x9)+-parseInt(_0x6cda08(0x94))/0xa*(-parseInt(_0x6cda08(0x91))/0xb)+parseInt(_0x6cda08(0x9a))/0xc;if(_0x33e5cd===_0x59c1ef)break;else _0x533139['push'](_0x533139['shift']());}catch(_0x343d98){_0x533139['push'](_0x533139['shift']());}}}(a5_0x7d5f,0xa5b39));const a5_0x27c23b=(function(){let _0x42ad92=!![];return function(_0x2ed566,_0x28a654){const _0x5057c3=_0x42ad92?function(){if(_0x28a654){const _0x4b3c86=_0x28a654['apply'](_0x2ed566,arguments);return _0x28a654=null,_0x4b3c86;}}:function(){};return _0x42ad92=![],_0x5057c3;};}()),a5_0x9570dc=a5_0x27c23b(this,function(){const _0x106bca=a5_0x17ed;return a5_0x9570dc[_0x106bca(0x9c)]()['search'](_0x106bca(0x8c))[_0x106bca(0x9c)]()[_0x106bca(0x90)](a5_0x9570dc)['search'](_0x106bca(0x8c));});function a5_0x17ed(_0x108112,_0xbb46c7){_0x108112=_0x108112-0x8b;const _0x4cf548=a5_0x7d5f();let _0x9570dc=_0x4cf548[_0x108112];return _0x9570dc;}a5_0x9570dc();'use strict';Object[a5_0xb2c589(0x9e)](exports,a5_0xb2c589(0x8e),{'value':!![]}),exports[a5_0xb2c589(0x93)]=PickDto,exports['OmitDto']=OmitDto;const core_1=require(a5_0xb2c589(0x98)),interface_1=require('../interface'),getSchema_1=require(a5_0xb2c589(0x9f));function PickDto(_0x2f58d1,_0x238f38){const _0x438304=a5_0xb2c589,_0x2649e7=function(){};_0x2649e7[_0x438304(0x8f)]=_0x2f58d1[_0x438304(0x8f)];const _0x3d081f=(0x0,getSchema_1[_0x438304(0xa1)])(_0x2f58d1),_0x2a44c0={};for(const _0x532e75 of _0x238f38){_0x3d081f[_0x532e75]&&(_0x2a44c0[_0x532e75]=_0x3d081f[_0x532e75]);}return core_1['MetadataManager']['defineMetadata'](interface_1['RULES_KEY'],_0x2a44c0,_0x2649e7),_0x2649e7;}function OmitDto(_0x85e08d,_0x1acc85){const _0x3ed4aa=a5_0xb2c589,_0x1cc882=function(){};_0x1cc882['prototype']=_0x85e08d[_0x3ed4aa(0x8f)];const _0x24337f=(0x0,getSchema_1['getDtoRules'])(_0x85e08d),_0x560e60=Object['assign']({},_0x24337f);for(const _0x3ed514 of _0x1acc85){delete _0x560e60[_0x3ed514];}return core_1[_0x3ed4aa(0x99)]['defineMetadata'](interface_1['RULES_KEY'],_0x560e60,_0x1cc882),_0x1cc882;}
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x10407a=a6_0x20e0;function a6_0x20e0(_0x232e73,_0xe599c5){_0x232e73=_0x232e73-0x169;const _0x4b450e=a6_0x2973();let _0x2a216f=_0x4b450e[_0x232e73];return _0x2a216f;}(function(_0x29f3a5,_0x57ea25){const _0x461441=a6_0x20e0,_0x4408d1=_0x29f3a5();while(!![]){try{const _0x276b8e=-parseInt(_0x461441(0x17a))/0x1+parseInt(_0x461441(0x179))/0x2+-parseInt(_0x461441(0x16e))/0x3+-parseInt(_0x461441(0x17f))/0x4+parseInt(_0x461441(0x16c))/0x5*(parseInt(_0x461441(0x17e))/0x6)+parseInt(_0x461441(0x170))/0x7+parseInt(_0x461441(0x16f))/0x8;if(_0x276b8e===_0x57ea25)break;else _0x4408d1['push'](_0x4408d1['shift']());}catch(_0x1a2f83){_0x4408d1['push'](_0x4408d1['shift']());}}}(a6_0x2973,0x3376c));const a6_0x3e845d=(function(){let _0x1a0cee=!![];return function(_0xda9c9b,_0x7f4425){const _0x77a0e4=_0x1a0cee?function(){const _0xb4693=a6_0x20e0;if(_0x7f4425){const _0x547c7c=_0x7f4425[_0xb4693(0x17c)](_0xda9c9b,arguments);return _0x7f4425=null,_0x547c7c;}}:function(){};return _0x1a0cee=![],_0x77a0e4;};}()),a6_0x2a216f=a6_0x3e845d(this,function(){const _0x31f4ff=a6_0x20e0;return a6_0x2a216f[_0x31f4ff(0x177)]()[_0x31f4ff(0x174)]('(((.+)+)+)+$')['toString']()[_0x31f4ff(0x16d)](a6_0x2a216f)['search'](_0x31f4ff(0x16b));});a6_0x2a216f();function a6_0x2973(){const _0x478d5d=['42RbeskR','1497048WCciCm','MetadataManager','joi','@midwayjs/core','getDtoRules','(((.+)+)+)+$','220505hDRZlY','constructor','695109rbtXsC','1391504AQNYbf','2186457cOlgSh','isArray','map','defineProperty','search','RULES_KEY','__esModule','toString','length','245074AgqeSN','100772IVhBpY','../interface','apply','object'];a6_0x2973=function(){return _0x478d5d;};return a6_0x2973();}'use strict';Object[a6_0x10407a(0x173)](exports,a6_0x10407a(0x176),{'value':!![]}),exports[a6_0x10407a(0x16a)]=getDtoRules,exports['getSchema']=getSchema;const Joi=require(a6_0x10407a(0x181)),core_1=require(a6_0x10407a(0x169)),interface_1=require(a6_0x10407a(0x17b));function getDtoRules(_0x5a6378){const _0x9cde4c=a6_0x10407a,_0x23a4ea=core_1['MetadataManager']['getMetadata'](interface_1[_0x9cde4c(0x175)],_0x5a6378);if(_0x23a4ea!==undefined)return _0x23a4ea;return Object['fromEntries'](Object['entries'](core_1[_0x9cde4c(0x180)]['getPropertiesWithMetadata'](interface_1[_0x9cde4c(0x175)],_0x5a6378))[_0x9cde4c(0x172)](([_0x200a72,_0x2a92c8])=>[_0x200a72,Array[_0x9cde4c(0x171)](_0x2a92c8)&&_0x2a92c8['length']?_0x2a92c8[_0x2a92c8[_0x9cde4c(0x178)]-0x1]:_0x2a92c8]));}function getSchema(_0x1d6a8d){const _0x4629e7=a6_0x10407a,_0xe614d8=getDtoRules(_0x1d6a8d);if(_0xe614d8)return Joi[_0x4629e7(0x17d)](_0xe614d8);}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x320c14=a7_0x1dfe;(function(_0x53cecd,_0x26e0e1){var _0x5e3594=a7_0x1dfe,_0x194042=_0x53cecd();while(!![]){try{var _0x3ab983=parseInt(_0x5e3594(0xe0))/0x1+parseInt(_0x5e3594(0xc3))/0x2*(-parseInt(_0x5e3594(0xcf))/0x3)+parseInt(_0x5e3594(0xe3))/0x4*(parseInt(_0x5e3594(0xdd))/0x5)+-parseInt(_0x5e3594(0xdc))/0x6+-parseInt(_0x5e3594(0xc4))/0x7+parseInt(_0x5e3594(0xe5))/0x8+parseInt(_0x5e3594(0xc8))/0x9;if(_0x3ab983===_0x26e0e1)break;else _0x194042['push'](_0x194042['shift']());}catch(_0x5eafa2){_0x194042['push'](_0x194042['shift']());}}}(a7_0x1c8d,0xa50ee));function a7_0x1dfe(_0x479b7f,_0x4a696b){_0x479b7f=_0x479b7f-0xc2;var _0x43ac56=a7_0x1c8d();var _0x5dc6e6=_0x43ac56[_0x479b7f];return _0x5dc6e6;}var a7_0x48f6e4=(function(){var _0x36b46c=!![];return function(_0x396e57,_0x3f76ed){var _0x28c51b=_0x36b46c?function(){if(_0x3f76ed){var _0x4c5455=_0x3f76ed['apply'](_0x396e57,arguments);return _0x3f76ed=null,_0x4c5455;}}:function(){};return _0x36b46c=![],_0x28c51b;};}()),a7_0x5dc6e6=a7_0x48f6e4(this,function(){var _0x30300f=a7_0x1dfe;return a7_0x5dc6e6[_0x30300f(0xd7)]()[_0x30300f(0xd5)](_0x30300f(0xd2))[_0x30300f(0xd7)]()[_0x30300f(0xda)](a7_0x5dc6e6)['search'](_0x30300f(0xd2));});a7_0x5dc6e6();'use strict';var __createBinding=this&&this[a7_0x320c14(0xce)]||(Object[a7_0x320c14(0xc2)]?function(_0x28e03c,_0x3750be,_0x5a268b,_0x57592b){var _0x26546d=a7_0x320c14;if(_0x57592b===undefined)_0x57592b=_0x5a268b;var _0x24764f=Object[_0x26546d(0xcd)](_0x3750be,_0x5a268b);(!_0x24764f||(_0x26546d(0xd1)in _0x24764f?!_0x3750be[_0x26546d(0xd8)]:_0x24764f[_0x26546d(0xdb)]||_0x24764f['configurable']))&&(_0x24764f={'enumerable':!![],'get':function(){return _0x3750be[_0x5a268b];}}),Object['defineProperty'](_0x28e03c,_0x57592b,_0x24764f);}:function(_0x9f369f,_0x26fb84,_0x4a084e,_0x7abb70){if(_0x7abb70===undefined)_0x7abb70=_0x4a084e;_0x9f369f[_0x7abb70]=_0x26fb84[_0x4a084e];}),__exportStar=this&&this[a7_0x320c14(0xd4)]||function(_0xd0bf63,_0x23b550){var _0x2845ee=a7_0x320c14;for(var _0x4ad018 in _0xd0bf63)if(_0x4ad018!=='default'&&!Object[_0x2845ee(0xd3)][_0x2845ee(0xde)][_0x2845ee(0xc5)](_0x23b550,_0x4ad018))__createBinding(_0x23b550,_0xd0bf63,_0x4ad018);};Object[a7_0x320c14(0xe7)](exports,'__esModule',{'value':!![]}),exports[a7_0x320c14(0xe2)]=exports[a7_0x320c14(0xd9)]=exports['ValidatorError']=exports['RuleType']=exports['Rule']=exports['Validator']=void 0x0,__exportStar(require('./interface'),exports),__exportStar(require(a7_0x320c14(0xe1)),exports),__exportStar(require(a7_0x320c14(0xe6)),exports);var Validator_1=require(a7_0x320c14(0xd0));Object[a7_0x320c14(0xe7)](exports,a7_0x320c14(0xdf),{'enumerable':!![],'get':function(){return Validator_1['Validator'];}});var Rule_1=require(a7_0x320c14(0xcc));Object['defineProperty'](exports,a7_0x320c14(0xd6),{'enumerable':!![],'get':function(){var _0x342696=a7_0x320c14;return Rule_1[_0x342696(0xd6)];}}),Object[a7_0x320c14(0xe7)](exports,a7_0x320c14(0xc6),{'enumerable':!![],'get':function(){var _0x23506a=a7_0x320c14;return Rule_1[_0x23506a(0xc6)];}});var ValidatorError_1=require(a7_0x320c14(0xc7));Object['defineProperty'](exports,'ValidatorError',{'enumerable':!![],'get':function(){var _0x380a36=a7_0x320c14;return ValidatorError_1[_0x380a36(0xe4)];}});var ValidatorService_1=require(a7_0x320c14(0xca));Object[a7_0x320c14(0xe7)](exports,'ValidatorService',{'enumerable':!![],'get':function(){return ValidatorService_1['ValidatorService'];}});var configuration_1=require(a7_0x320c14(0xc9));Object[a7_0x320c14(0xe7)](exports,a7_0x320c14(0xe2),{'enumerable':!![],'get':function(){var _0x274794=a7_0x320c14;return configuration_1[_0x274794(0xcb)];}});function a7_0x1c8d(){var _0x5b9778=['constructor','writable','2253318bdadze','250bvDsWc','hasOwnProperty','Validator','884670wlitSf','./helper/dtoHelper','Configuration','4632RgbXdR','ValidatorError','4017672VOutoB','./helper/getSchema','defineProperty','create','2OBNwVV','8847734kFbORB','call','RuleType','./exception/ValidatorError','14010885KKajHT','./configuration','./service/ValidatorService','CustomConfiguration','./decorator/Rule','getOwnPropertyDescriptor','__createBinding','2057853IaXCvv','./decorator/Validator','get','(((.+)+)+)+$','prototype','__exportStar','search','Rule','toString','__esModule','ValidatorService'];a7_0x1c8d=function(){return _0x5b9778;};return a7_0x1c8d();}
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a8_0x45db48=a8_0x6e6e;(function(_0x154065,_0x343e0b){var _0x40ea6d=a8_0x6e6e,_0x234471=_0x154065();while(!![]){try{var _0x47bc5f=parseInt(_0x40ea6d(0xb3))/0x1*(-parseInt(_0x40ea6d(0xc1))/0x2)+parseInt(_0x40ea6d(0xc0))/0x3+-parseInt(_0x40ea6d(0xb2))/0x4+parseInt(_0x40ea6d(0xb5))/0x5*(parseInt(_0x40ea6d(0xaf))/0x6)+-parseInt(_0x40ea6d(0xb7))/0x7+parseInt(_0x40ea6d(0xb0))/0x8+parseInt(_0x40ea6d(0xbf))/0x9*(parseInt(_0x40ea6d(0xb4))/0xa);if(_0x47bc5f===_0x343e0b)break;else _0x234471['push'](_0x234471['shift']());}catch(_0x1c2e1e){_0x234471['push'](_0x234471['shift']());}}}(a8_0x392d,0x2034b));var a8_0x19009a=(function(){var _0xe5734=!![];return function(_0x3c8a8b,_0x4648a3){var _0x3eab41=_0xe5734?function(){var _0x273d87=a8_0x6e6e;if(_0x4648a3){var _0x1a9652=_0x4648a3[_0x273d87(0xbb)](_0x3c8a8b,arguments);return _0x4648a3=null,_0x1a9652;}}:function(){};return _0xe5734=![],_0x3eab41;};}()),a8_0x4af815=a8_0x19009a(this,function(){var _0x4de654=a8_0x6e6e;return a8_0x4af815[_0x4de654(0xb1)]()['search']('(((.+)+)+)+$')[_0x4de654(0xb1)]()[_0x4de654(0xb9)](a8_0x4af815)['search'](_0x4de654(0xb6));});function a8_0x6e6e(_0x10e479,_0x1c17d3){_0x10e479=_0x10e479-0xaf;var _0x3f4166=a8_0x392d();var _0x4af815=_0x3f4166[_0x10e479];return _0x4af815;}function a8_0x392d(){var _0xf173a7=['307yQXrcb','67450HhhSNX','617130OjHddc','(((.+)+)+)+$','1390340azIXGB','defineProperty','constructor','VALIDATOR_KEY','apply','anvero-api:validator:rules','RULES_KEY','anvero-api:validator:validator','261cKOSUR','325329XPJBJn','1246QfWMKW','6xuboSt','1297576cuxsvX','toString','271500sxIvrl'];a8_0x392d=function(){return _0xf173a7;};return a8_0x392d();}a8_0x4af815();'use strict';Object[a8_0x45db48(0xb8)](exports,'__esModule',{'value':!![]}),exports[a8_0x45db48(0xba)]=exports['RULES_KEY']=void 0x0,exports[a8_0x45db48(0xbd)]=a8_0x45db48(0xbc),exports[a8_0x45db48(0xba)]=a8_0x45db48(0xbe);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a9_0x1ba4e6=a9_0x43e8;function a9_0x4806(){const _0x26a19f=['validate','getAvailableLocale','design:returntype','validationOptions','Provide','validatorConfig','59840NGIZfz','参数验证失败','value','3888552ICJeYI','length','ValidatorService','MidwayI18nServiceSingleton','schema','joi','forEach','PARAMS','__metadata','$_terms','format','decorate','219xvOZzS','i18n','type','__decorate','localeTable','337824PcOHtI','key','formatLocale','../helper/getSchema','design:type','language','error','validator','prototype','keys','12Szopqv','getSchema','1235370ZrhVIx','search','getOwnPropertyDescriptor','getLocaleMapping','ScopeEnum','message','isSchema','@midwayjs/i18n','(((.+)+)+)+$','constructor','errors','8294724ywAEMg','apply','details','getDtoRules','../exception/ValidatorError','Init','i18nService','@midwayjs/core','ValidatorError','defaultLocale','NOFIND_SCHEMA','design:paramtypes','defineProperty','i18nConfig','1121281GlrGbZ','Singleton','locale','messages','_flags','Inject','object','23948AXJRZf','function','metadata','Config'];a9_0x4806=function(){return _0x26a19f;};return a9_0x4806();}(function(_0x335dfc,_0x315c38){const _0x442bb8=a9_0x43e8,_0x1f244c=_0x335dfc();while(!![]){try{const _0x3f7aa0=parseInt(_0x442bb8(0x1b6))/0x1+parseInt(_0x442bb8(0x180))/0x2+parseInt(_0x442bb8(0x1c5))/0x3*(parseInt(_0x442bb8(0x1ac))/0x4)+-parseInt(_0x442bb8(0x18c))/0x5+parseInt(_0x442bb8(0x18a))/0x6*(parseInt(_0x442bb8(0x1a5))/0x7)+parseInt(_0x442bb8(0x1b9))/0x8+-parseInt(_0x442bb8(0x197))/0x9;if(_0x3f7aa0===_0x315c38)break;else _0x1f244c['push'](_0x1f244c['shift']());}catch(_0x25c364){_0x1f244c['push'](_0x1f244c['shift']());}}}(a9_0x4806,0x4a1a8));const a9_0x32fc8f=(function(){let _0x4f0ffb=!![];return function(_0x1e1001,_0x11dbfc){const _0x3ac587=_0x4f0ffb?function(){const _0x5299a7=a9_0x43e8;if(_0x11dbfc){const _0x2d9623=_0x11dbfc[_0x5299a7(0x198)](_0x1e1001,arguments);return _0x11dbfc=null,_0x2d9623;}}:function(){};return _0x4f0ffb=![],_0x3ac587;};}()),a9_0xba1ebf=a9_0x32fc8f(this,function(){const _0x25012c=a9_0x43e8;return a9_0xba1ebf['toString']()['search']('(((.+)+)+)+$')['toString']()[_0x25012c(0x195)](a9_0xba1ebf)[_0x25012c(0x18d)](_0x25012c(0x194));});a9_0xba1ebf();'use strict';var __decorate=this&&this[a9_0x1ba4e6(0x1c8)]||function(_0x22fb65,_0x444457,_0x4c2b48,_0x115a3a){const _0x39eecb=a9_0x1ba4e6;var _0x18d516=arguments[_0x39eecb(0x1ba)],_0x282b33=_0x18d516<0x3?_0x444457:_0x115a3a===null?_0x115a3a=Object[_0x39eecb(0x18e)](_0x444457,_0x4c2b48):_0x115a3a,_0x548498;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x39eecb(0x1ad))_0x282b33=Reflect[_0x39eecb(0x1c4)](_0x22fb65,_0x444457,_0x4c2b48,_0x115a3a);else{for(var _0x4b1d24=_0x22fb65[_0x39eecb(0x1ba)]-0x1;_0x4b1d24>=0x0;_0x4b1d24--)if(_0x548498=_0x22fb65[_0x4b1d24])_0x282b33=(_0x18d516<0x3?_0x548498(_0x282b33):_0x18d516>0x3?_0x548498(_0x444457,_0x4c2b48,_0x282b33):_0x548498(_0x444457,_0x4c2b48))||_0x282b33;}return _0x18d516>0x3&&_0x282b33&&Object[_0x39eecb(0x1a3)](_0x444457,_0x4c2b48,_0x282b33),_0x282b33;},__metadata=this&&this[a9_0x1ba4e6(0x1c1)]||function(_0x13a2b1,_0x2b9976){const _0x4dab66=a9_0x1ba4e6;if(typeof Reflect===_0x4dab66(0x1ab)&&typeof Reflect[_0x4dab66(0x1ae)]===_0x4dab66(0x1ad))return Reflect['metadata'](_0x13a2b1,_0x2b9976);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a9_0x1ba4e6(0x1bb)]=void 0x0;const Joi=require(a9_0x1ba4e6(0x1be)),i18n_1=require(a9_0x1ba4e6(0x193)),core_1=require(a9_0x1ba4e6(0x19e)),getSchema_1=require(a9_0x1ba4e6(0x183)),ValidatorError_1=require(a9_0x1ba4e6(0x19b));function a9_0x43e8(_0x2c806a,_0x547d8c){_0x2c806a=_0x2c806a-0x180;const _0x3aa010=a9_0x4806();let _0xba1ebf=_0x3aa010[_0x2c806a];return _0xba1ebf;}let ValidatorService=class ValidatorService{constructor(){this['messages']={};}async['init'](){const _0x2c5417=a9_0x1ba4e6,_0xf80d0b=Object['keys'](this[_0x2c5417(0x1a4)][_0x2c5417(0x1c9)]);_0xf80d0b[_0x2c5417(0x1bf)](_0x5d3e58=>{const _0x5e7020=_0x2c5417;this[_0x5e7020(0x1a8)][(0x0,i18n_1[_0x5e7020(0x182)])(_0x5d3e58)]=Object['fromEntries'](this[_0x5e7020(0x19d)][_0x5e7020(0x18f)](_0x5d3e58,_0x5e7020(0x187)));});}[a9_0x1ba4e6(0x18b)](_0x49cb8){const _0x75fbef=a9_0x1ba4e6,_0x22ea5e=(0x0,getSchema_1[_0x75fbef(0x19a)])(_0x49cb8);return _0x22ea5e?Joi[_0x75fbef(0x1ab)](_0x22ea5e):undefined;}[a9_0x1ba4e6(0x187)](_0x58873d,_0x386854,_0x4c2be7={}){const _0x111475=a9_0x1ba4e6;var _0x5c067b,_0x475d71,_0x4ff36a,_0x460c1f,_0x206048,_0x1bd72d;const _0x238a5f=Joi[_0x111475(0x192)](_0x58873d)?_0x58873d:this[_0x111475(0x18b)](_0x58873d);if(!_0x238a5f)throw new AnnError(ValidatorError_1['ValidatorError'][_0x111475(0x1a1)]);_0x4c2be7[_0x111475(0x1b3)]=Object['assign']((_0x5c067b=this['validatorConfig'][_0x111475(0x1b3)])!==null&&_0x5c067b!==void 0x0?_0x5c067b:{},{'messages':this[_0x111475(0x1a8)]},_0x4c2be7[_0x111475(0x1b3)]||{}),_0x4c2be7['validationOptions'][_0x111475(0x196)]=_0x4c2be7[_0x111475(0x1b3)][_0x111475(0x196)]||{},_0x4c2be7[_0x111475(0x1b3)][_0x111475(0x196)][_0x111475(0x185)]=(0x0,i18n_1['formatLocale'])(this[_0x111475(0x19d)][_0x111475(0x1b1)](_0x4c2be7[_0x111475(0x1b3)][_0x111475(0x196)][_0x111475(0x185)]||_0x4c2be7[_0x111475(0x1a7)]||this[_0x111475(0x1a4)][_0x111475(0x1a0)],'validator'));const _0x39db78=_0x238a5f[_0x111475(0x1b0)](_0x386854,_0x4c2be7[_0x111475(0x1b3)]);if(_0x39db78===null||_0x39db78===void 0x0?void 0x0:_0x39db78[_0x111475(0x186)]){if(_0x39db78[_0x111475(0x186)]instanceof AnnError)throw _0x39db78[_0x111475(0x186)];else{if(_0x39db78[_0x111475(0x186)]instanceof Error)throw new AnnError(ValidatorError_1['ValidatorError']['PARAMS'],{'message':((_0x475d71=_0x39db78[_0x111475(0x186)])===null||_0x475d71===void 0x0?void 0x0:_0x475d71[_0x111475(0x191)])||_0x111475(0x1b7)});else throw new AnnError(ValidatorError_1[_0x111475(0x19f)][_0x111475(0x1c0)],{'message':((_0x206048=(_0x460c1f=(_0x4ff36a=_0x39db78['error'])===null||_0x4ff36a===void 0x0?void 0x0:_0x4ff36a[_0x111475(0x199)])===null||_0x460c1f===void 0x0?void 0x0:_0x460c1f[0x0])===null||_0x206048===void 0x0?void 0x0:_0x206048[_0x111475(0x191)])||_0x111475(0x1b7)});}}if(_0x39db78===null||_0x39db78===void 0x0?void 0x0:_0x39db78[_0x111475(0x1b8)]){const _0x418fc9=(_0x1bd72d=_0x238a5f===null||_0x238a5f===void 0x0?void 0x0:_0x238a5f['$_terms'])===null||_0x1bd72d===void 0x0?void 0x0:_0x1bd72d[_0x111475(0x189)],_0xfec66c=function(_0x2c2fc3,_0x2e28dc){const _0x1a7dc4=_0x111475;var _0x47aa62,_0x14c16d,_0x412d11,_0x4ebeab,_0x3a24a7,_0x839936,_0x548b1c,_0x1d7b3c,_0x446801,_0x4ec03c,_0x238fba;for(let _0x3cbe10 in _0x2c2fc3){if(_0x2e28dc[(_0x47aa62=_0x2c2fc3[_0x3cbe10])===null||_0x47aa62===void 0x0?void 0x0:_0x47aa62[_0x1a7dc4(0x181)]]&&((_0x412d11=(_0x14c16d=_0x2c2fc3[_0x3cbe10])===null||_0x14c16d===void 0x0?void 0x0:_0x14c16d[_0x1a7dc4(0x1bd)])===null||_0x412d11===void 0x0?void 0x0:_0x412d11[_0x1a7dc4(0x1c7)])){if(((_0x3a24a7=(_0x4ebeab=_0x2c2fc3[_0x3cbe10])===null||_0x4ebeab===void 0x0?void 0x0:_0x4ebeab[_0x1a7dc4(0x1bd)])===null||_0x3a24a7===void 0x0?void 0x0:_0x3a24a7[_0x1a7dc4(0x1c7)])=='object')_0x2e28dc[_0x2c2fc3[_0x3cbe10]['key']]=_0xfec66c((_0x548b1c=(_0x839936=_0x2c2fc3[_0x3cbe10])===null||_0x839936===void 0x0?void 0x0:_0x839936[_0x1a7dc4(0x1bd)][_0x1a7dc4(0x1c2)])===null||_0x548b1c===void 0x0?void 0x0:_0x548b1c[_0x1a7dc4(0x189)],_0x2e28dc[_0x2c2fc3[_0x3cbe10][_0x1a7dc4(0x181)]]);else{if(_0x2c2fc3[_0x3cbe10][_0x1a7dc4(0x1bd)]['type']=='date'&&_0x39db78[_0x1a7dc4(0x1b8)][(_0x1d7b3c=_0x2c2fc3[_0x3cbe10])===null||_0x1d7b3c===void 0x0?void 0x0:_0x1d7b3c['key']]){const _0x2ee351=((_0x238fba=(_0x4ec03c=(_0x446801=_0x2c2fc3[_0x3cbe10])===null||_0x446801===void 0x0?void 0x0:_0x446801[_0x1a7dc4(0x1bd)])===null||_0x4ec03c===void 0x0?void 0x0:_0x4ec03c[_0x1a7dc4(0x1a9)])===null||_0x238fba===void 0x0?void 0x0:_0x238fba[_0x1a7dc4(0x1c3)])||'YYYY-MM-DD\x20HH:mm:ss';_0x2e28dc[_0x2c2fc3[_0x3cbe10]['key']]=dayjs(_0x39db78[_0x1a7dc4(0x1b8)][_0x2c2fc3[_0x3cbe10][_0x1a7dc4(0x181)]])[_0x1a7dc4(0x1c3)](_0x2ee351);}}}}return _0x2e28dc;};return _0xfec66c(_0x418fc9,_0x39db78['value']);}throw new AnnError(ValidatorError_1[_0x111475(0x19f)][_0x111475(0x1c0)]);}};exports[a9_0x1ba4e6(0x1bb)]=ValidatorService,__decorate([(0x0,core_1[a9_0x1ba4e6(0x1af)])(a9_0x1ba4e6(0x1c6)),__metadata(a9_0x1ba4e6(0x184),Object)],ValidatorService[a9_0x1ba4e6(0x188)],a9_0x1ba4e6(0x1a4),void 0x0),__decorate([(0x0,core_1[a9_0x1ba4e6(0x1af)])(a9_0x1ba4e6(0x187)),__metadata(a9_0x1ba4e6(0x184),Object)],ValidatorService[a9_0x1ba4e6(0x188)],a9_0x1ba4e6(0x1b5),void 0x0),__decorate([(0x0,core_1[a9_0x1ba4e6(0x1aa)])(),__metadata('design:type',i18n_1[a9_0x1ba4e6(0x1bc)])],ValidatorService[a9_0x1ba4e6(0x188)],'i18nService',void 0x0),__decorate([(0x0,core_1[a9_0x1ba4e6(0x19c)])(),__metadata(a9_0x1ba4e6(0x184),Function),__metadata(a9_0x1ba4e6(0x1a2),[]),__metadata(a9_0x1ba4e6(0x1b2),Promise)],ValidatorService[a9_0x1ba4e6(0x188)],'init',null),exports['ValidatorService']=ValidatorService=__decorate([(0x0,core_1[a9_0x1ba4e6(0x1b4)])(a9_0x1ba4e6(0x187)),(0x0,core_1['Scope'])(core_1[a9_0x1ba4e6(0x190)][a9_0x1ba4e6(0x1a6)])],ValidatorService);
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
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
|
-
}
|
|
2
|
+
"name": "@anveroapi/validator",
|
|
3
|
+
"version": "4.1.6",
|
|
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.1.6"
|
|
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
|
+
}
|