@anncic-api/validator 3.0.3 → 3.0.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/index.js +1 -1
- package/dist/interface.js +1 -1
- package/dist/service/ValidatorService.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x5566(){const _0x308743=['1164bxPPuc','toString','28895vMrFwI','ValidatorError','4633456tHlkps','default','apply','326125CNXjot','9SpVGMn','constructor','defineProperty','250ryDuQA','537985ZIrIop','../../locales/zh_CN.json','34259330gpjzFC','8877mEuFMi','8666592pEQPWe','__esModule','search'];a0_0x5566=function(){return _0x308743;};return a0_0x5566();}const a0_0xb98d85=a0_0xf394;(function(_0x4834b8,_0x31e6a7){const _0x26da99=a0_0xf394,_0x380bdb=_0x4834b8();while(!![]){try{const _0x1ac070=parseInt(_0x26da99(0x160))/0x1+parseInt(_0x26da99(0x164))/0x2*(parseInt(_0x26da99(0x155))/0x3)+parseInt(_0x26da99(0x15d))/0x4+parseInt(_0x26da99(0x15b))/0x5*(parseInt(_0x26da99(0x159))/0x6)+parseInt(_0x26da99(0x165))/0x7+parseInt(_0x26da99(0x156))/0x8+parseInt(_0x26da99(0x161))/0x9*(-parseInt(_0x26da99(0x154))/0xa);if(_0x1ac070===_0x31e6a7)break;else _0x380bdb['push'](_0x380bdb['shift']());}catch(_0x29bb01){_0x380bdb['push'](_0x380bdb['shift']());}}}(a0_0x5566,0xad468));function a0_0xf394(_0x29178d,_0x44c1b5){const _0x512187=a0_0x5566();return a0_0xf394=function(_0x39b514,_0x5f0b19){_0x39b514=_0x39b514-0x154;let _0x556673=_0x512187[_0x39b514];return _0x556673;},a0_0xf394(_0x29178d,_0x44c1b5);}const a0_0x5f0b19=(function(){let _0x4370ef=!![];return function(_0x10b213,_0x5a6deb){const _0x4f7c81=_0x4370ef?function(){const _0x20cacd=a0_0xf394;if(_0x5a6deb){const _0x107376=_0x5a6deb[_0x20cacd(0x15f)](_0x10b213,arguments);return _0x5a6deb=null,_0x107376;}}:function(){};return _0x4370ef=![],_0x4f7c81;};}()),a0_0x39b514=a0_0x5f0b19(this,function(){const _0x933c67=a0_0xf394;return a0_0x39b514[_0x933c67(0x15a)]()[_0x933c67(0x158)]('(((.+)+)+)+$')[_0x933c67(0x15a)]()[_0x933c67(0x162)](a0_0x39b514)[_0x933c67(0x158)]('(((.+)+)+)+$');});a0_0x39b514();'use strict';Object[a0_0xb98d85(0x163)](exports,a0_0xb98d85(0x157),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');exports[a0_0xb98d85(0x15e)]={'validator':{'errorStatus':ValidatorError_1[a0_0xb98d85(0x15c)]['PARAMS'],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}},'i18n':{'localeTable':{'en_US':{'validator':require('../../locales/en_US.json')},'zh_CN':{'validator':require(a0_0xb98d85(0x166))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x30f6e0=a1_0x5488;function a1_0x1382(){const _0x5704b2=['search','1700330yNvGyp','./service/ValidatorService','__esModule','getClassMetadata','__decorate','15360510tmwkYg','query','constructor','onReady','Inject','object','res','./config/config.default','Configuration','registerMethodHandler','function','args','param','validator','prototype','target','31128uDxCuo','length','getMethodParamTypes','method','metadata','methodArgs','3FpiQsr','8126320amXUVe','11388951uDvTXt','defineProperty','decorator','CustomConfiguration','bound\x20dispatch','assign','propertyName','MidwayDecoratorService','__metadata','REQUEST_OBJ_CTX_KEY','locale','@anncic-api/core','body','I18N_ATTR_KEY','(((.+)+)+)+$','anncic-api:validator','181831wxdbpo','find','getAttr','973BqEwKj','apply','2SvSWWd','toString','req','1864348GMxWxK','@midwayjs/i18n','splice','params','ValidatorService','./interface','VALIDATOR_KEY','request'];a1_0x1382=function(){return _0x5704b2;};return a1_0x1382();}function a1_0x5488(_0x211553,_0x383988){const _0x465f6e=a1_0x1382();return a1_0x5488=function(_0x47a4ef,_0x356c38){_0x47a4ef=_0x47a4ef-0xb7;let _0x138247=_0x465f6e[_0x47a4ef];return _0x138247;},a1_0x5488(_0x211553,_0x383988);}(function(_0x5d5080,_0xc0738f){const _0x5e9628=a1_0x5488,_0x6c3147=_0x5d5080();while(!![]){try{const _0x332b32=-parseInt(_0x5e9628(0xbe))/0x1*(parseInt(_0x5e9628(0xc3))/0x2)+-parseInt(_0x5e9628(0xea))/0x3*(-parseInt(_0x5e9628(0xc6))/0x4)+parseInt(_0x5e9628(0xcf))/0x5+parseInt(_0x5e9628(0xe4))/0x6*(-parseInt(_0x5e9628(0xc1))/0x7)+parseInt(_0x5e9628(0xeb))/0x8+parseInt(_0x5e9628(0xec))/0x9+-parseInt(_0x5e9628(0xd4))/0xa;if(_0x332b32===_0xc0738f)break;else _0x6c3147['push'](_0x6c3147['shift']());}catch(_0x47f73f){_0x6c3147['push'](_0x6c3147['shift']());}}}(a1_0x1382,0x9e4b0));const a1_0x356c38=(function(){let _0x778c25=!![];return function(_0x592793,_0x184873){const _0x19c251=_0x778c25?function(){const _0x183b28=a1_0x5488;if(_0x184873){const _0x5c13eb=_0x184873[_0x183b28(0xc2)](_0x592793,arguments);return _0x184873=null,_0x5c13eb;}}:function(){};return _0x778c25=![],_0x19c251;};}()),a1_0x47a4ef=a1_0x356c38(this,function(){const _0x2a828c=a1_0x5488;return a1_0x47a4ef[_0x2a828c(0xc4)]()[_0x2a828c(0xce)]('(((.+)+)+)+$')['toString']()[_0x2a828c(0xd6)](a1_0x47a4ef)['search'](_0x2a828c(0xbc));});a1_0x47a4ef();'use strict';var __decorate=this&&this[a1_0x30f6e0(0xd3)]||function(_0x22fac0,_0x2c6da0,_0x120d14,_0x3f424d){const _0x2c6683=a1_0x30f6e0;var _0x64f95a=arguments[_0x2c6683(0xe5)],_0xe61326=_0x64f95a<0x3?_0x2c6da0:_0x3f424d===null?_0x3f424d=Object['getOwnPropertyDescriptor'](_0x2c6da0,_0x120d14):_0x3f424d,_0x48b100;if(typeof Reflect===_0x2c6683(0xd9)&&typeof Reflect['decorate']===_0x2c6683(0xde))_0xe61326=Reflect['decorate'](_0x22fac0,_0x2c6da0,_0x120d14,_0x3f424d);else{for(var _0x23b006=_0x22fac0[_0x2c6683(0xe5)]-0x1;_0x23b006>=0x0;_0x23b006--)if(_0x48b100=_0x22fac0[_0x23b006])_0xe61326=(_0x64f95a<0x3?_0x48b100(_0xe61326):_0x64f95a>0x3?_0x48b100(_0x2c6da0,_0x120d14,_0xe61326):_0x48b100(_0x2c6da0,_0x120d14))||_0xe61326;}return _0x64f95a>0x3&&_0xe61326&&Object[_0x2c6683(0xed)](_0x2c6da0,_0x120d14,_0xe61326),_0xe61326;},__metadata=this&&this[a1_0x30f6e0(0xf4)]||function(_0x26a7bc,_0x5af3cf){const _0x1a91bd=a1_0x30f6e0;if(typeof Reflect===_0x1a91bd(0xd9)&&typeof Reflect[_0x1a91bd(0xe8)]===_0x1a91bd(0xde))return Reflect[_0x1a91bd(0xe8)](_0x26a7bc,_0x5af3cf);};Object[a1_0x30f6e0(0xed)](exports,a1_0x30f6e0(0xd1),{'value':!![]}),exports[a1_0x30f6e0(0xef)]=void 0x0;const i18n_1=require('@midwayjs/i18n'),core_1=require('@midwayjs/core'),core_2=require('@midwayjs/core'),interface_1=require(a1_0x30f6e0(0xcb)),ValidatorService_1=require(a1_0x30f6e0(0xd0)),i18n=require(a1_0x30f6e0(0xc7)),anncic=require(a1_0x30f6e0(0xb9)),ConfigDefault=require(a1_0x30f6e0(0xdb));let CustomConfiguration=class CustomConfiguration{async[a1_0x30f6e0(0xd7)](){const _0x3bc76f=a1_0x30f6e0;this[_0x3bc76f(0xee)][_0x3bc76f(0xdd)](interface_1[_0x3bc76f(0xcc)],_0x33f4cc=>{const _0x2c15f0=_0x3bc76f,_0x1dbe28=_0x33f4cc['metadata'],_0x17ba6f=(0x0,core_2[_0x2c15f0(0xe6)])(_0x33f4cc[_0x2c15f0(0xe3)],_0x33f4cc[_0x2c15f0(0xf2)]);return{'before':_0x1ae2f8=>{const _0x65e28=_0x2c15f0;var _0x11492e,_0x487f8f,_0x43fda3,_0xd8b48,_0x1035f6,_0x7e5568,_0xb81631,_0x3fc376,_0x2b59ed,_0x4013a2,_0x32aefd,_0x156988,_0x21117b;const _0x3cec8b=_0x1ae2f8[_0x65e28(0xe3)][core_1[_0x65e28(0xb7)]],_0x100fb6=Object[_0x65e28(0xf1)]({},((_0x11492e=_0x3cec8b===null||_0x3cec8b===void 0x0?void 0x0:_0x3cec8b[_0x65e28(0xcd)])===null||_0x11492e===void 0x0?void 0x0:_0x11492e[_0x65e28(0xd5)])||{},((_0x487f8f=_0x3cec8b===null||_0x3cec8b===void 0x0?void 0x0:_0x3cec8b[_0x65e28(0xcd)])===null||_0x487f8f===void 0x0?void 0x0:_0x487f8f[_0x65e28(0xba)])||{}),_0x337276=((0x0,core_2[_0x65e28(0xd2)])(interface_1['VALIDATOR_KEY'],_0x1ae2f8['target'])||[])[_0x65e28(0xbf)](_0x34f634=>_0x34f634[_0x65e28(0xe7)]==_0x1ae2f8['methodName']);!(_0x1dbe28===null||_0x1dbe28===void 0x0?void 0x0:_0x1dbe28['locale'])&&_0x3cec8b&&_0x3cec8b['getAttr']&&(_0x1dbe28[_0x65e28(0xb8)]=_0x3cec8b[_0x65e28(0xc0)](i18n_1[_0x65e28(0xbb)]));for(let _0x474613=0x0;_0x474613<_0x17ba6f[_0x65e28(0xe5)];_0x474613++){const _0x474e8c=_0x17ba6f[_0x474613],_0x102d46=this[_0x65e28(0xca)]['getSchema'](_0x474e8c);if(_0x102d46){if(typeof _0x1ae2f8[_0x65e28(0xdf)][_0x474613]=='undefined'||((_0x43fda3=_0x1ae2f8[_0x65e28(0xdf)][_0x474613])===null||_0x43fda3===void 0x0?void 0x0:_0x43fda3[_0x65e28(0xcd)])&&((_0xd8b48=_0x1ae2f8[_0x65e28(0xdf)][_0x474613])===null||_0xd8b48===void 0x0?void 0x0:_0xd8b48[_0x65e28(0xda)])&&((_0x1035f6=_0x1ae2f8[_0x65e28(0xdf)][_0x474613])===null||_0x1035f6===void 0x0?void 0x0:_0x1035f6[_0x65e28(0xc5)]))_0x1ae2f8[_0x65e28(0xdf)][_0x474613]=_0x100fb6;else((_0x7e5568=_0x1ae2f8['args'][_0x474613])===null||_0x7e5568===void 0x0?void 0x0:_0x7e5568['name'])==_0x65e28(0xf0)&&_0x1ae2f8[_0x65e28(0xdf)][_0x65e28(0xc8)](_0x474613,0x0,_0x100fb6);const _0x30120a=this[_0x65e28(0xca)][_0x65e28(0xe1)](_0x102d46,_0x1ae2f8[_0x65e28(0xdf)][_0x474613],_0x1dbe28);_0x30120a&&(_0x1ae2f8[_0x65e28(0xdf)][_0x474613]=_0x30120a);}else{if((_0x337276===null||_0x337276===void 0x0?void 0x0:_0x337276[_0x65e28(0xe9)][_0x474613])&&((_0xb81631=_0x1ae2f8[_0x65e28(0xdf)][_0x474613])===null||_0xb81631===void 0x0?void 0x0:_0xb81631['params'])&&typeof _0x1ae2f8[_0x65e28(0xdf)][_0x474613][_0x65e28(0xe0)]==_0x65e28(0xde)&&((_0x3fc376=_0x3cec8b===null||_0x3cec8b===void 0x0?void 0x0:_0x3cec8b['params'])===null||_0x3fc376===void 0x0?void 0x0:_0x3fc376[_0x337276[_0x65e28(0xe9)][_0x474613]]))_0x1ae2f8['args'][_0x474613]=_0x474e8c((_0x2b59ed=_0x3cec8b===null||_0x3cec8b===void 0x0?void 0x0:_0x3cec8b['params'])===null||_0x2b59ed===void 0x0?void 0x0:_0x2b59ed[_0x337276[_0x65e28(0xe9)][_0x474613]]);else(_0x337276===null||_0x337276===void 0x0?void 0x0:_0x337276[_0x65e28(0xe9)][_0x474613])&&((_0x32aefd=(_0x4013a2=_0x1ae2f8['args'][_0x474613])===null||_0x4013a2===void 0x0?void 0x0:_0x4013a2[_0x65e28(0xc9)])===null||_0x32aefd===void 0x0?void 0x0:_0x32aefd[_0x337276[_0x65e28(0xe9)][_0x474613]])&&(_0x1ae2f8[_0x65e28(0xdf)][_0x474613]=(_0x21117b=(_0x156988=_0x1ae2f8['args'][_0x474613])===null||_0x156988===void 0x0?void 0x0:_0x156988['params'])===null||_0x21117b===void 0x0?void 0x0:_0x21117b[_0x337276['methodArgs'][_0x474613]]);}}},'afterThrow':(_0x3c1381,_0x376d8b)=>{throw _0x376d8b;}};});}};__decorate([(0x0,core_2[a1_0x30f6e0(0xd8)])(),__metadata('design:type',core_1[a1_0x30f6e0(0xf3)])],CustomConfiguration[a1_0x30f6e0(0xe2)],a1_0x30f6e0(0xee),void 0x0),__decorate([(0x0,core_2[a1_0x30f6e0(0xd8)])(),__metadata('design:type',ValidatorService_1[a1_0x30f6e0(0xca)])],CustomConfiguration['prototype'],a1_0x30f6e0(0xca),void 0x0),CustomConfiguration=__decorate([(0x0,core_2[a1_0x30f6e0(0xdc)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x30f6e0(0xbd),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x30f6e0(0xef)]=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x3e539c=a2_0x3a0e;(function(_0x30d24c,_0x37eea6){const _0xe4d93d=a2_0x3a0e,_0xfff98=_0x30d24c();while(!![]){try{const _0x4d4bf4=parseInt(_0xe4d93d(0x1b0))/0x1*(-parseInt(_0xe4d93d(0x1af))/0x2)+-parseInt(_0xe4d93d(0x1ad))/0x3+parseInt(_0xe4d93d(0x197))/0x4+-parseInt(_0xe4d93d(0x19c))/0x5+-parseInt(_0xe4d93d(0x19b))/0x6*(-parseInt(_0xe4d93d(0x1a6))/0x7)+parseInt(_0xe4d93d(0x1b2))/0x8*(-parseInt(_0xe4d93d(0x1a1))/0x9)+parseInt(_0xe4d93d(0x1b8))/0xa;if(_0x4d4bf4===_0x37eea6)break;else _0xfff98['push'](_0xfff98['shift']());}catch(_0x1ff648){_0xfff98['push'](_0xfff98['shift']());}}}(a2_0x2ed8,0xec961));const a2_0x5c34de=(function(){let _0xd712ce=!![];return function(_0x1da349,_0x33a84b){const _0x2e9902=_0xd712ce?function(){const _0x39f33c=a2_0x3a0e;if(_0x33a84b){const _0x53fc9d=_0x33a84b[_0x39f33c(0x199)](_0x1da349,arguments);return _0x33a84b=null,_0x53fc9d;}}:function(){};return _0xd712ce=![],_0x2e9902;};}()),a2_0x39cd76=a2_0x5c34de(this,function(){const _0x5883a6=a2_0x3a0e;return a2_0x39cd76[_0x5883a6(0x1ab)]()[_0x5883a6(0x1b4)]('(((.+)+)+)+$')['toString']()[_0x5883a6(0x1a7)](a2_0x39cd76)['search'](_0x5883a6(0x1a2));});a2_0x39cd76();'use strict';Object[a2_0x3e539c(0x1a5)](exports,a2_0x3e539c(0x1b6),{'value':!![]}),exports[a2_0x3e539c(0x196)]=exports[a2_0x3e539c(0x1a4)]=void 0x0;function a2_0x3a0e(_0x28cfb4,_0x1dd834){const _0x2656c3=a2_0x2ed8();return a2_0x3a0e=function(_0x39cd76,_0x5c34de){_0x39cd76=_0x39cd76-0x196;let _0x2ed8ac=_0x2656c3[_0x39cd76];return _0x2ed8ac;},a2_0x3a0e(_0x28cfb4,_0x1dd834);}const joi=require('joi'),date_1=require('@joi/date'),core_1=require(a2_0x3e539c(0x19a)),interface_1=require(a2_0x3e539c(0x1a8));exports[a2_0x3e539c(0x1a4)]=joi[a2_0x3e539c(0x19d)](date_1[a2_0x3e539c(0x1b3)]);function a2_0x2ed8(){const _0x275ab9=['attachClassMetadata','Array','meta','234KxtXUD','(((.+)+)+)+$','function','RuleType','defineProperty','301791LyIIKb','constructor','../interface','saveClassMetadata','getClassMetadata','toString','items','4671141fCeGpf','name','58FhQNDO','66502Vkzhvk','RULES_KEY','290096nuEfOC','default','search','description','__esModule','map','50701720QXOlHN','isSchema','keys','label','Rule','7320332shjnQO','array','apply','@midwayjs/core','42QwabjY','9022860kSDeMD','extend'];a2_0x2ed8=function(){return _0x275ab9;};return a2_0x2ed8();}function Rule(_0x34c336,_0x1a537d,_0x11654a=''){return(_0x25ec16,_0x1c05d0)=>{const _0x2eacef=a2_0x3a0e;var _0x38da21;if(_0x1c05d0)!joi[_0x2eacef(0x1b9)](_0x1a537d)&&(_0x1a537d===null||_0x1a537d===void 0x0?void 0x0:_0x1a537d['name'])&&(_0x1a537d=joi['object']((0x0,core_1[_0x2eacef(0x1aa)])(interface_1[_0x2eacef(0x1b1)],_0x1a537d))[_0x2eacef(0x1a0)]({'id':_0x1a537d[_0x2eacef(0x1ae)]}),(0x0,core_1['getPropertyType'])(_0x25ec16,_0x1c05d0)[_0x2eacef(0x1ae)]===_0x2eacef(0x19f)&&(_0x1a537d=joi[_0x2eacef(0x198)]()[_0x2eacef(0x1ac)](_0x1a537d))),joi[_0x2eacef(0x1b9)](_0x1a537d)&&(_0x34c336&&typeof(_0x1a537d===null||_0x1a537d===void 0x0?void 0x0:_0x1a537d[_0x2eacef(0x1bb)])==_0x2eacef(0x1a3)&&(_0x1a537d=_0x1a537d[_0x2eacef(0x1bb)](_0x34c336)),_0x11654a&&typeof(_0x1a537d===null||_0x1a537d===void 0x0?void 0x0:_0x1a537d[_0x2eacef(0x1b5)])==_0x2eacef(0x1a3)&&(_0x1a537d=_0x1a537d['description'](_0x11654a)),(0x0,core_1[_0x2eacef(0x19e)])(interface_1[_0x2eacef(0x1b1)],_0x1a537d,_0x25ec16,_0x1c05d0));else{const _0x2dd7e7=(0x0,core_1[_0x2eacef(0x1aa)])(interface_1[_0x2eacef(0x1b1)],_0x1a537d);if(_0x2dd7e7){let _0x3be5e2=(_0x38da21=(0x0,core_1[_0x2eacef(0x1aa)])(interface_1[_0x2eacef(0x1b1)],_0x25ec16))!==null&&_0x38da21!==void 0x0?_0x38da21:{};Object[_0x2eacef(0x1ba)](_0x2dd7e7)[_0x2eacef(0x1b7)](_0x3289cf=>{!_0x3be5e2[_0x3289cf]&&(_0x3be5e2[_0x3289cf]=_0x2dd7e7[_0x3289cf]);}),(0x0,core_1[_0x2eacef(0x1a9)])(interface_1['RULES_KEY'],_0x3be5e2,_0x25ec16);}}};}exports[a2_0x3e539c(0x196)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x5e31b8=a3_0x53f0;(function(_0x5938ca,_0x3225bd){const _0xea4461=a3_0x53f0,_0x5f3a8e=_0x5938ca();while(!![]){try{const _0x438ee8=-parseInt(_0xea4461(0xc9))/0x1*(-parseInt(_0xea4461(0xb5))/0x2)+-parseInt(_0xea4461(0xc4))/0x3*(parseInt(_0xea4461(0xbc))/0x4)+-parseInt(_0xea4461(0xc3))/0x5+parseInt(_0xea4461(0xce))/0x6+-parseInt(_0xea4461(0xc2))/0x7+-parseInt(_0xea4461(0xc5))/0x8*(parseInt(_0xea4461(0xca))/0x9)+parseInt(_0xea4461(0xc7))/0xa;if(_0x438ee8===_0x3225bd)break;else _0x5f3a8e['push'](_0x5f3a8e['shift']());}catch(_0x452671){_0x5f3a8e['push'](_0x5f3a8e['shift']());}}}(a3_0x2d65,0x3072f));function a3_0x2d65(){const _0x3e7f07=['112509mrRyOV','VALIDATOR_KEY','function','Validator','1545030fRJUWz','prototype','toString','defineProperty','apply','2nJIZpu','(((.+)+)+)+$','slice','getFuncArgs','replace','createCustomMethodDecorator','match','4MirhZs','constructor','__esModule','../interface','@midwayjs/core','indexOf','2700873pWEwxv','141950lgYZyG','395088amqEgo','32xGkNFZ','search','2697260KambKm','attachClassMetadata','267145ILOZmt'];a3_0x2d65=function(){return _0x3e7f07;};return a3_0x2d65();}const a3_0x32941a=(function(){let _0x1e34e7=!![];return function(_0x39901e,_0x39826c){const _0x21f701=_0x1e34e7?function(){const _0x8e2d88=a3_0x53f0;if(_0x39826c){const _0x3226a9=_0x39826c[_0x8e2d88(0xb4)](_0x39901e,arguments);return _0x39826c=null,_0x3226a9;}}:function(){};return _0x1e34e7=![],_0x21f701;};}()),a3_0x5cbda5=a3_0x32941a(this,function(){const _0x4a68e0=a3_0x53f0;return a3_0x5cbda5[_0x4a68e0(0xb2)]()[_0x4a68e0(0xc6)](_0x4a68e0(0xb6))[_0x4a68e0(0xb2)]()[_0x4a68e0(0xbd)](a3_0x5cbda5)['search'](_0x4a68e0(0xb6));});a3_0x5cbda5();'use strict';Object[a3_0x5e31b8(0xb3)](exports,a3_0x5e31b8(0xbe),{'value':!![]}),exports[a3_0x5e31b8(0xb8)]=exports[a3_0x5e31b8(0xcd)]=void 0x0;const core_1=require(a3_0x5e31b8(0xc0)),interface_1=require(a3_0x5e31b8(0xbf));function a3_0x53f0(_0x1af118,_0x58bfd8){const _0x40b920=a3_0x2d65();return a3_0x53f0=function(_0x5cbda5,_0x32941a){_0x5cbda5=_0x5cbda5-0xb2;let _0x2d652e=_0x40b920[_0x5cbda5];return _0x2d652e;},a3_0x53f0(_0x1af118,_0x58bfd8);}function Validator(_0x5cceeb={}){return(_0x49768f,_0x181311,_0x4adf63)=>{const _0x5bbc58=a3_0x53f0,_0x42114f=getFuncArgs(_0x49768f[_0x181311]);(0x0,core_1[_0x5bbc58(0xc8)])(interface_1[_0x5bbc58(0xcb)],{'method':_0x181311,'methodArgs':_0x42114f},_0x49768f),(0x0,core_1[_0x5bbc58(0xba)])(interface_1[_0x5bbc58(0xcb)],_0x5cceeb)(_0x49768f,_0x181311,_0x4adf63);};}exports[a3_0x5e31b8(0xcd)]=Validator;function getFuncArgs(_0x2b53e4){const _0x5370bb=a3_0x5e31b8;if(typeof _0x2b53e4==_0x5370bb(0xcc)){const _0x25c26f=/=>.*$/mg,_0x2c8592=/=[^,)]+/mg,_0xabad60=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x2c0adc=(_0x2b53e4[_0x5370bb(0xcf)]?_0x2b53e4[_0x5370bb(0xcf)][_0x5370bb(0xbd)]['toString']():_0x2b53e4[_0x5370bb(0xb2)]())[_0x5370bb(0xb9)](_0xabad60,'')[_0x5370bb(0xb9)](_0x25c26f,'')[_0x5370bb(0xb9)](_0x2c8592,''),_0x5a5939=_0x2c0adc[_0x5370bb(0xb7)](_0x2c0adc[_0x5370bb(0xc1)]('(')+0x1,_0x2c0adc[_0x5370bb(0xc1)](')'))[_0x5370bb(0xbb)](/([^\s,]+)/g)||[];return _0x5a5939;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a4_0xe92f(_0x25fdfc,_0x5798e7){var _0x25a669=a4_0xea5a();return a4_0xe92f=function(_0x130040,_0x35423e){_0x130040=_0x130040-0x7c;var _0xea5a38=_0x25a669[_0x130040];return _0xea5a38;},a4_0xe92f(_0x25fdfc,_0x5798e7);}function a4_0xea5a(){var _0x174396=['AnnErrorMsg','5224296IWVhVc','5KXGyqn','object','constructor','33850vzMGvb','1420HPKyAE','design:type','ValidatorError','7368700NTQWtq','function','decorate','search','3953726TsdciE','PARAMS','apply','__esModule','getOwnPropertyDescriptor','NOFIND_SCHEMA','toString','1399704UDnAQk','309984hQNzsS','__metadata','8YrDPNe','metadata','(((.+)+)+)+$','参数验证失败','43209vLmHmE','defineProperty','length'];a4_0xea5a=function(){return _0x174396;};return a4_0xea5a();}var a4_0x586c53=a4_0xe92f;(function(_0xabbe0c,_0x9d8541){var _0x449707=a4_0xe92f,_0x43c50a=_0xabbe0c();while(!![]){try{var _0x241080=-parseInt(_0x449707(0x97))/0x1*(-parseInt(_0x449707(0x7c))/0x2)+parseInt(_0x449707(0x8b))/0x3+-parseInt(_0x449707(0x96))/0x4+parseInt(_0x449707(0x80))/0x5+parseInt(_0x449707(0x8c))/0x6+parseInt(_0x449707(0x84))/0x7*(-parseInt(_0x449707(0x8e))/0x8)+-parseInt(_0x449707(0x92))/0x9*(-parseInt(_0x449707(0x7d))/0xa);if(_0x241080===_0x9d8541)break;else _0x43c50a['push'](_0x43c50a['shift']());}catch(_0x4f7edb){_0x43c50a['push'](_0x43c50a['shift']());}}}(a4_0xea5a,0xd8a97));var a4_0x35423e=(function(){var _0x140cca=!![];return function(_0x41f57a,_0x53a966){var _0x314871=_0x140cca?function(){var _0x3fdd57=a4_0xe92f;if(_0x53a966){var _0x899fe8=_0x53a966[_0x3fdd57(0x86)](_0x41f57a,arguments);return _0x53a966=null,_0x899fe8;}}:function(){};return _0x140cca=![],_0x314871;};}()),a4_0x130040=a4_0x35423e(this,function(){var _0x54c3dd=a4_0xe92f;return a4_0x130040[_0x54c3dd(0x8a)]()[_0x54c3dd(0x83)](_0x54c3dd(0x90))[_0x54c3dd(0x8a)]()[_0x54c3dd(0x99)](a4_0x130040)[_0x54c3dd(0x83)](_0x54c3dd(0x90));});a4_0x130040();'use strict';var __decorate=this&&this['__decorate']||function(_0x5cd1ac,_0x396396,_0x1d4b70,_0xafcfe7){var _0x7bc84f=a4_0xe92f,_0x32b800=arguments[_0x7bc84f(0x94)],_0x1fa014=_0x32b800<0x3?_0x396396:_0xafcfe7===null?_0xafcfe7=Object[_0x7bc84f(0x88)](_0x396396,_0x1d4b70):_0xafcfe7,_0x526cea;if(typeof Reflect===_0x7bc84f(0x98)&&typeof Reflect[_0x7bc84f(0x82)]===_0x7bc84f(0x81))_0x1fa014=Reflect[_0x7bc84f(0x82)](_0x5cd1ac,_0x396396,_0x1d4b70,_0xafcfe7);else{for(var _0x3c1dbc=_0x5cd1ac['length']-0x1;_0x3c1dbc>=0x0;_0x3c1dbc--)if(_0x526cea=_0x5cd1ac[_0x3c1dbc])_0x1fa014=(_0x32b800<0x3?_0x526cea(_0x1fa014):_0x32b800>0x3?_0x526cea(_0x396396,_0x1d4b70,_0x1fa014):_0x526cea(_0x396396,_0x1d4b70))||_0x1fa014;}return _0x32b800>0x3&&_0x1fa014&&Object['defineProperty'](_0x396396,_0x1d4b70,_0x1fa014),_0x1fa014;},__metadata=this&&this[a4_0x586c53(0x8d)]||function(_0x4c507f,_0x361dfe){var _0x5b0d1d=a4_0x586c53;if(typeof Reflect===_0x5b0d1d(0x98)&&typeof Reflect[_0x5b0d1d(0x8f)]===_0x5b0d1d(0x81))return Reflect['metadata'](_0x4c507f,_0x361dfe);};Object[a4_0x586c53(0x93)](exports,a4_0x586c53(0x87),{'value':!![]}),exports[a4_0x586c53(0x7f)]=void 0x0;const core_1=require('@anncic-api/core');class ValidatorError extends AnnError{}ValidatorError[a4_0x586c53(0x85)]=0x18c1e,ValidatorError[a4_0x586c53(0x89)]=0x18c1c,__decorate([(0x0,core_1[a4_0x586c53(0x95)])(a4_0x586c53(0x91)),__metadata(a4_0x586c53(0x7e),Object)],ValidatorError,'PARAMS',void 0x0),__decorate([(0x0,core_1['AnnErrorMsg'])('参数验证失败'),__metadata(a4_0x586c53(0x7e),Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0),exports['ValidatorError']=ValidatorError;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x203af7=a5_0x808b;(function(_0x55f55a,_0x46aa24){const _0x5bdb0=a5_0x808b,_0x1ac3f3=_0x55f55a();while(!![]){try{const _0x4a54c8=parseInt(_0x5bdb0(0x1e4))/0x1+-parseInt(_0x5bdb0(0x1e2))/0x2*(parseInt(_0x5bdb0(0x1e8))/0x3)+-parseInt(_0x5bdb0(0x1e5))/0x4*(parseInt(_0x5bdb0(0x1e3))/0x5)+parseInt(_0x5bdb0(0x1d0))/0x6*(-parseInt(_0x5bdb0(0x1d5))/0x7)+-parseInt(_0x5bdb0(0x1df))/0x8*(-parseInt(_0x5bdb0(0x1d3))/0x9)+-parseInt(_0x5bdb0(0x1da))/0xa+-parseInt(_0x5bdb0(0x1d2))/0xb*(-parseInt(_0x5bdb0(0x1d1))/0xc);if(_0x4a54c8===_0x46aa24)break;else _0x1ac3f3['push'](_0x1ac3f3['shift']());}catch(_0x5eb544){_0x1ac3f3['push'](_0x1ac3f3['shift']());}}}(a5_0x4d5c,0x42a37));const a5_0x4540aa=(function(){let _0x4e0c0c=!![];return function(_0x3a98b3,_0x1b0228){const _0x1b8352=_0x4e0c0c?function(){if(_0x1b0228){const _0x4f1d69=_0x1b0228['apply'](_0x3a98b3,arguments);return _0x1b0228=null,_0x4f1d69;}}:function(){};return _0x4e0c0c=![],_0x1b8352;};}()),a5_0x9e3c54=a5_0x4540aa(this,function(){const _0x435f1e=a5_0x808b;return a5_0x9e3c54['toString']()[_0x435f1e(0x1e0)]('(((.+)+)+)+$')['toString']()[_0x435f1e(0x1e7)](a5_0x9e3c54)[_0x435f1e(0x1e0)](_0x435f1e(0x1db));});a5_0x9e3c54();'use strict';Object[a5_0x203af7(0x1d4)](exports,a5_0x203af7(0x1d8),{'value':!![]}),exports[a5_0x203af7(0x1dd)]=exports[a5_0x203af7(0x1e1)]=void 0x0;function a5_0x808b(_0x3902cf,_0x483c82){const _0x47e859=a5_0x4d5c();return a5_0x808b=function(_0x9e3c54,_0x4540aa){_0x9e3c54=_0x9e3c54-0x1d0;let _0x4d5c6d=_0x47e859[_0x9e3c54];return _0x4d5c6d;},a5_0x808b(_0x3902cf,_0x483c82);}const core_1=require(a5_0x203af7(0x1d7)),interface_1=require('../interface');function PickDto(_0x3a0381,_0x1612f8){const _0x5c18a6=a5_0x203af7,_0x3a5373=function(){};_0x3a5373[_0x5c18a6(0x1de)]=_0x3a0381[_0x5c18a6(0x1de)];const _0x5ce350=(0x0,core_1[_0x5c18a6(0x1d9)])(interface_1['RULES_KEY'],_0x3a0381),_0x3d9104={};for(const _0x39a19a of _0x1612f8){_0x5ce350[_0x39a19a]&&(_0x3d9104[_0x39a19a]=_0x5ce350[_0x39a19a]);}return(0x0,core_1[_0x5c18a6(0x1e6)])(interface_1[_0x5c18a6(0x1d6)],_0x3d9104,_0x3a5373),_0x3a5373;}exports[a5_0x203af7(0x1e1)]=PickDto;function a5_0x4d5c(){const _0x1c226b=['PickDto','2yjxOUT','95ZJFIOw','256758ndegXl','103304VUhjPU','saveClassMetadata','constructor','1279452YdwHqb','12YhCOfG','84eNcOTt','1751464xkhJfr','287982WeOQIl','defineProperty','377293IpaTlh','RULES_KEY','@midwayjs/core','__esModule','getClassExtendedMetadata','1053970UrUTtu','(((.+)+)+)+$','assign','OmitDto','prototype','8wlsUFj','search'];a5_0x4d5c=function(){return _0x1c226b;};return a5_0x4d5c();}function OmitDto(_0x2f9374,_0x5b658a){const _0x3f73a0=a5_0x203af7,_0x18e424=function(){};_0x18e424[_0x3f73a0(0x1de)]=_0x2f9374[_0x3f73a0(0x1de)];const _0x166042=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x3f73a0(0x1d6)],_0x2f9374),_0x53d9a2=Object[_0x3f73a0(0x1dc)]({},_0x166042);for(const _0x3b73d3 of _0x5b658a){delete _0x53d9a2[_0x3b73d3];}return(0x0,core_1[_0x3f73a0(0x1e6)])(interface_1[_0x3f73a0(0x1d6)],_0x53d9a2,_0x18e424),_0x18e424;}exports['OmitDto']=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x1851ee=a6_0x2bfe;(function(_0x38f2fd,_0x5d016c){var _0x385cd2=a6_0x2bfe,_0x2ddced=_0x38f2fd();while(!![]){try{var _0x14cf28=parseInt(_0x385cd2(0x159))/0x1*(parseInt(_0x385cd2(0x165))/0x2)+-parseInt(_0x385cd2(0x149))/0x3*(-parseInt(_0x385cd2(0x166))/0x4)+-parseInt(_0x385cd2(0x14d))/0x5+-parseInt(_0x385cd2(0x16a))/0x6*(parseInt(_0x385cd2(0x15b))/0x7)+-parseInt(_0x385cd2(0x162))/0x8*(parseInt(_0x385cd2(0x160))/0x9)+-parseInt(_0x385cd2(0x147))/0xa+parseInt(_0x385cd2(0x14b))/0xb*(parseInt(_0x385cd2(0x161))/0xc);if(_0x14cf28===_0x5d016c)break;else _0x2ddced['push'](_0x2ddced['shift']());}catch(_0x3e4d10){_0x2ddced['push'](_0x2ddced['shift']());}}}(a6_0x2a65,0xae04e));var a6_0x26e95b=(function(){var _0x81553d=!![];return function(_0x329a55,_0x46d124){var _0x5a6802=_0x81553d?function(){if(_0x46d124){var _0x2bf337=_0x46d124['apply'](_0x329a55,arguments);return _0x46d124=null,_0x2bf337;}}:function(){};return _0x81553d=![],_0x5a6802;};}()),a6_0x562c38=a6_0x26e95b(this,function(){var _0x113209=a6_0x2bfe;return a6_0x562c38[_0x113209(0x14f)]()[_0x113209(0x152)](_0x113209(0x157))[_0x113209(0x14f)]()[_0x113209(0x163)](a6_0x562c38)[_0x113209(0x152)](_0x113209(0x157));});a6_0x562c38();'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0xf983af,_0x4daab3,_0x34368b,_0x1b78ea){var _0x453a2c=a6_0x2bfe;if(_0x1b78ea===undefined)_0x1b78ea=_0x34368b;var _0x2ffcfc=Object[_0x453a2c(0x14c)](_0x4daab3,_0x34368b);(!_0x2ffcfc||(_0x453a2c(0x146)in _0x2ffcfc?!_0x4daab3[_0x453a2c(0x14a)]:_0x2ffcfc['writable']||_0x2ffcfc[_0x453a2c(0x153)]))&&(_0x2ffcfc={'enumerable':!![],'get':function(){return _0x4daab3[_0x34368b];}}),Object['defineProperty'](_0xf983af,_0x1b78ea,_0x2ffcfc);}:function(_0x559bf0,_0x2f0013,_0x21e6df,_0x125dc7){if(_0x125dc7===undefined)_0x125dc7=_0x21e6df;_0x559bf0[_0x125dc7]=_0x2f0013[_0x21e6df];}),__exportStar=this&&this[a6_0x1851ee(0x15f)]||function(_0x2e9e05,_0x4ef0e6){var _0x2fbb1c=a6_0x1851ee;for(var _0x5c741d in _0x2e9e05)if(_0x5c741d!==_0x2fbb1c(0x168)&&!Object['prototype'][_0x2fbb1c(0x154)][_0x2fbb1c(0x15e)](_0x4ef0e6,_0x5c741d))__createBinding(_0x4ef0e6,_0x2e9e05,_0x5c741d);};function a6_0x2a65(){var _0x3d2931=['18pWjscD','132JTiIno','2505976KbURAb','constructor','./configuration','2OmqfGd','3407632ghJaan','./exception/ValidatorError','default','./helper/dtoHelper','390846QjTptC','ValidatorService','get','4924070wNHWzf','./service/ValidatorService','3PPOMTX','__esModule','1636756BAeUEy','getOwnPropertyDescriptor','5565005bxttqx','Configuration','toString','./decorator/Rule','./interface','search','configurable','hasOwnProperty','Validator','defineProperty','(((.+)+)+)+$','ValidatorError','1302853BcpeaC','RuleType','91sFnHqG','CustomConfiguration','./decorator/Validator','call','__exportStar'];a6_0x2a65=function(){return _0x3d2931;};return a6_0x2a65();}Object['defineProperty'](exports,a6_0x1851ee(0x14a),{'value':!![]}),exports[a6_0x1851ee(0x14e)]=exports[a6_0x1851ee(0x145)]=exports[a6_0x1851ee(0x158)]=exports[a6_0x1851ee(0x15a)]=exports['Rule']=exports[a6_0x1851ee(0x155)]=void 0x0,__exportStar(require(a6_0x1851ee(0x151)),exports),__exportStar(require(a6_0x1851ee(0x169)),exports);var Validator_1=require(a6_0x1851ee(0x15d));Object[a6_0x1851ee(0x156)](exports,a6_0x1851ee(0x155),{'enumerable':!![],'get':function(){var _0xaca0db=a6_0x1851ee;return Validator_1[_0xaca0db(0x155)];}});var Rule_1=require(a6_0x1851ee(0x150));Object[a6_0x1851ee(0x156)](exports,'Rule',{'enumerable':!![],'get':function(){return Rule_1['Rule'];}}),Object[a6_0x1851ee(0x156)](exports,a6_0x1851ee(0x15a),{'enumerable':!![],'get':function(){var _0xbfead6=a6_0x1851ee;return Rule_1[_0xbfead6(0x15a)];}});var ValidatorError_1=require(a6_0x1851ee(0x167));function a6_0x2bfe(_0x17cdc9,_0x26960a){var _0x47f0fd=a6_0x2a65();return a6_0x2bfe=function(_0x562c38,_0x26e95b){_0x562c38=_0x562c38-0x145;var _0x2a6512=_0x47f0fd[_0x562c38];return _0x2a6512;},a6_0x2bfe(_0x17cdc9,_0x26960a);}Object[a6_0x1851ee(0x156)](exports,a6_0x1851ee(0x158),{'enumerable':!![],'get':function(){var _0x1010fb=a6_0x1851ee;return ValidatorError_1[_0x1010fb(0x158)];}});var ValidatorService_1=require(a6_0x1851ee(0x148));Object['defineProperty'](exports,a6_0x1851ee(0x145),{'enumerable':!![],'get':function(){var _0x15107f=a6_0x1851ee;return ValidatorService_1[_0x15107f(0x145)];}});var configuration_1=require(a6_0x1851ee(0x164));Object[a6_0x1851ee(0x156)](exports,a6_0x1851ee(0x14e),{'enumerable':!![],'get':function(){var _0x529914=a6_0x1851ee;return configuration_1[_0x529914(0x15c)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x71a88b=a7_0x3c84;function a7_0x3c84(_0x278679,_0x4d5a43){var _0x538199=a7_0x25ad();return a7_0x3c84=function(_0x5dc565,_0x53ec44){_0x5dc565=_0x5dc565-0xcc;var _0x25ad8c=_0x538199[_0x5dc565];return _0x25ad8c;},a7_0x3c84(_0x278679,_0x4d5a43);}(function(_0xdac426,_0x4b5bbc){var _0x164e93=a7_0x3c84,_0x1b835e=_0xdac426();while(!![]){try{var _0x3bb18c=parseInt(_0x164e93(0xd1))/0x1+-parseInt(_0x164e93(0xd0))/0x2*(parseInt(_0x164e93(0xe0))/0x3)+-parseInt(_0x164e93(0xd8))/0x4+-parseInt(_0x164e93(0xcf))/0x5+-parseInt(_0x164e93(0xda))/0x6*(-parseInt(_0x164e93(0xd4))/0x7)+parseInt(_0x164e93(0xdd))/0x8*(-parseInt(_0x164e93(0xd9))/0x9)+parseInt(_0x164e93(0xd6))/0xa*(parseInt(_0x164e93(0xdc))/0xb);if(_0x3bb18c===_0x4b5bbc)break;else _0x1b835e['push'](_0x1b835e['shift']());}catch(_0x377ea2){_0x1b835e['push'](_0x1b835e['shift']());}}}(a7_0x25ad,0x40b11));function a7_0x25ad(){var _0x7a07fc=['28TXbRlZ','search','20qPissQ','RULES_KEY','582848edPIbn','1917711szEMDc','542580FDTSAd','anncic-api:validator:validator','2089604EVucaK','8VmXnEm','(((.+)+)+)+$','__esModule','2265agpgjH','constructor','defineProperty','apply','411630LcUaVQ','116VKwRDt','8236NLjkYb','VALIDATOR_KEY','toString'];a7_0x25ad=function(){return _0x7a07fc;};return a7_0x25ad();}var a7_0x53ec44=(function(){var _0x2cecdf=!![];return function(_0x235ef4,_0x3238e8){var _0x23f5f1=_0x2cecdf?function(){var _0x39ed23=a7_0x3c84;if(_0x3238e8){var _0x5dc1d0=_0x3238e8[_0x39ed23(0xce)](_0x235ef4,arguments);return _0x3238e8=null,_0x5dc1d0;}}:function(){};return _0x2cecdf=![],_0x23f5f1;};}()),a7_0x5dc565=a7_0x53ec44(this,function(){var _0x500e10=a7_0x3c84;return a7_0x5dc565[_0x500e10(0xd3)]()[_0x500e10(0xd5)](_0x500e10(0xde))[_0x500e10(0xd3)]()[_0x500e10(0xcc)](a7_0x5dc565)[_0x500e10(0xd5)]('(((.+)+)+)+$');});a7_0x5dc565();'use strict';Object[a7_0x71a88b(0xcd)](exports,a7_0x71a88b(0xdf),{'value':!![]}),exports[a7_0x71a88b(0xd2)]=exports[a7_0x71a88b(0xd7)]=void 0x0,exports[a7_0x71a88b(0xd7)]='anncic-api:validator:rules',exports[a7_0x71a88b(0xd2)]=a7_0x71a88b(0xdb);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x6a2c2c=a8_0x530b;(function(_0x10f246,_0x21d1cc){const _0x14ebdf=a8_0x530b,_0x3a83a2=_0x10f246();while(!![]){try{const _0x3ce38c=-parseInt(_0x14ebdf(0x218))/0x1+parseInt(_0x14ebdf(0x234))/0x2+parseInt(_0x14ebdf(0x211))/0x3+parseInt(_0x14ebdf(0x232))/0x4+-parseInt(_0x14ebdf(0x223))/0x5*(-parseInt(_0x14ebdf(0x22e))/0x6)+-parseInt(_0x14ebdf(0x1fc))/0x7+-parseInt(_0x14ebdf(0x236))/0x8;if(_0x3ce38c===_0x21d1cc)break;else _0x3a83a2['push'](_0x3a83a2['shift']());}catch(_0x2ab060){_0x3a83a2['push'](_0x3a83a2['shift']());}}}(a8_0x4a06,0x6d37f));const a8_0x3a3307=(function(){let _0x273128=!![];return function(_0x299956,_0x23dcc4){const _0x161d93=_0x273128?function(){const _0x6d61cb=a8_0x530b;if(_0x23dcc4){const _0x45749e=_0x23dcc4[_0x6d61cb(0x20b)](_0x299956,arguments);return _0x23dcc4=null,_0x45749e;}}:function(){};return _0x273128=![],_0x161d93;};}()),a8_0x5a595a=a8_0x3a3307(this,function(){const _0x2586be=a8_0x530b;return a8_0x5a595a[_0x2586be(0x1f6)]()[_0x2586be(0x22c)](_0x2586be(0x204))[_0x2586be(0x1f6)]()[_0x2586be(0x1f9)](a8_0x5a595a)[_0x2586be(0x22c)](_0x2586be(0x204));});a8_0x5a595a();'use strict';function a8_0x4a06(){const _0xb93432=['Provide','errors','PARAMS','validate','RULES_KEY','type','search','date','24EdIBbx','design:returntype','@midwayjs/i18n','getSchema','2568256MaVAfd','locale','1123686ybqtJG','YYYY-MM-DD\x20HH:mm:ss','1379712ilahWz','validatorConfig','assign','defaultLocale','message','_flags','keys','error','toString','forEach','schema','constructor','design:type','Inject','4500370fkcoZo','function','ValidatorError','language','NOFIND_SCHEMA','i18n','i18nConfig','messages','(((.+)+)+)+$','ScopeEnum','object','length','ValidatorService','../exception/ValidatorError','prototype','apply','$_terms','MidwayI18nServiceSingleton','Config','Init','details','1584825xStrhP','validator','validationOptions','isSchema','__esModule','init','metadata','483417GXAYsm','localeTable','__decorate','decorate','defineProperty','../interface','i18nService','design:paramtypes','value','formatLocale','getClassExtendedMetadata','17460AMhFMw','key','Scope'];a8_0x4a06=function(){return _0xb93432;};return a8_0x4a06();}var __decorate=this&&this[a8_0x6a2c2c(0x21a)]||function(_0x12df79,_0x1ca10d,_0x4e5c0d,_0x20e621){const _0xa34a9a=a8_0x6a2c2c;var _0x296058=arguments[_0xa34a9a(0x207)],_0x2bdee3=_0x296058<0x3?_0x1ca10d:_0x20e621===null?_0x20e621=Object['getOwnPropertyDescriptor'](_0x1ca10d,_0x4e5c0d):_0x20e621,_0x159765;if(typeof Reflect==='object'&&typeof Reflect[_0xa34a9a(0x21b)]===_0xa34a9a(0x1fd))_0x2bdee3=Reflect['decorate'](_0x12df79,_0x1ca10d,_0x4e5c0d,_0x20e621);else{for(var _0x51f4d0=_0x12df79[_0xa34a9a(0x207)]-0x1;_0x51f4d0>=0x0;_0x51f4d0--)if(_0x159765=_0x12df79[_0x51f4d0])_0x2bdee3=(_0x296058<0x3?_0x159765(_0x2bdee3):_0x296058>0x3?_0x159765(_0x1ca10d,_0x4e5c0d,_0x2bdee3):_0x159765(_0x1ca10d,_0x4e5c0d))||_0x2bdee3;}return _0x296058>0x3&&_0x2bdee3&&Object['defineProperty'](_0x1ca10d,_0x4e5c0d,_0x2bdee3),_0x2bdee3;},__metadata=this&&this['__metadata']||function(_0x1cf0ac,_0x3b9dc2){const _0x292f01=a8_0x6a2c2c;if(typeof Reflect===_0x292f01(0x206)&&typeof Reflect[_0x292f01(0x217)]===_0x292f01(0x1fd))return Reflect[_0x292f01(0x217)](_0x1cf0ac,_0x3b9dc2);};Object[a8_0x6a2c2c(0x21c)](exports,a8_0x6a2c2c(0x215),{'value':!![]}),exports['ValidatorService']=void 0x0;const Joi=require('joi'),i18n_1=require(a8_0x6a2c2c(0x230)),core_1=require('@midwayjs/core'),interface_1=require(a8_0x6a2c2c(0x21d)),ValidatorError_1=require(a8_0x6a2c2c(0x209));let ValidatorService=class ValidatorService{constructor(){const _0x44f57c=a8_0x6a2c2c;this[_0x44f57c(0x203)]={};}async[a8_0x6a2c2c(0x216)](){const _0x2a8ea8=a8_0x6a2c2c,_0x103cad=Object[_0x2a8ea8(0x1f4)](this[_0x2a8ea8(0x202)][_0x2a8ea8(0x219)]);_0x103cad[_0x2a8ea8(0x1f7)](_0x1a75f1=>{const _0x56f0ba=_0x2a8ea8;this[_0x56f0ba(0x203)][(0x0,i18n_1[_0x56f0ba(0x221)])(_0x1a75f1)]=Object['fromEntries'](this[_0x56f0ba(0x21e)]['getLocaleMapping'](_0x1a75f1,_0x56f0ba(0x212)));});}['getSchema'](_0x3f44ac){const _0x361dd4=a8_0x6a2c2c,_0x253e3a=(0x0,core_1[_0x361dd4(0x222)])(interface_1[_0x361dd4(0x22a)],_0x3f44ac);return _0x253e3a?Joi['object'](_0x253e3a):undefined;}[a8_0x6a2c2c(0x212)](_0x6e9952,_0x517e54,_0x2ba4d5={}){const _0x1d9761=a8_0x6a2c2c;var _0x22df43,_0x51fc5f,_0x5421ad,_0x252951,_0x544472,_0x4d4693;const _0x431a4c=Joi[_0x1d9761(0x214)](_0x6e9952)?_0x6e9952:this[_0x1d9761(0x231)](_0x6e9952);if(!_0x431a4c)throw new AnnError(ValidatorError_1[_0x1d9761(0x1fe)][_0x1d9761(0x200)]);_0x2ba4d5[_0x1d9761(0x213)]=Object[_0x1d9761(0x238)]((_0x22df43=this[_0x1d9761(0x237)]['validationOptions'])!==null&&_0x22df43!==void 0x0?_0x22df43:{},{'messages':this['messages']},_0x2ba4d5[_0x1d9761(0x213)]||{}),_0x2ba4d5['validationOptions']['errors']=_0x2ba4d5[_0x1d9761(0x213)][_0x1d9761(0x227)]||{},_0x2ba4d5['validationOptions'][_0x1d9761(0x227)][_0x1d9761(0x1ff)]=(0x0,i18n_1['formatLocale'])(this[_0x1d9761(0x21e)]['getAvailableLocale'](_0x2ba4d5[_0x1d9761(0x213)]['errors'][_0x1d9761(0x1ff)]||_0x2ba4d5[_0x1d9761(0x233)]||this[_0x1d9761(0x202)][_0x1d9761(0x239)],_0x1d9761(0x212)));const _0x2fe1b0=_0x431a4c[_0x1d9761(0x229)](_0x517e54,_0x2ba4d5[_0x1d9761(0x213)]);if(_0x2fe1b0===null||_0x2fe1b0===void 0x0?void 0x0:_0x2fe1b0[_0x1d9761(0x1f5)]){if(_0x2fe1b0[_0x1d9761(0x1f5)]instanceof AnnError)throw _0x2fe1b0[_0x1d9761(0x1f5)];else{if(_0x2fe1b0[_0x1d9761(0x1f5)]instanceof Error)throw new AnnError(ValidatorError_1[_0x1d9761(0x1fe)][_0x1d9761(0x228)],{'message':((_0x51fc5f=_0x2fe1b0[_0x1d9761(0x1f5)])===null||_0x51fc5f===void 0x0?void 0x0:_0x51fc5f[_0x1d9761(0x1f2)])||'参数验证失败'});else throw new AnnError(ValidatorError_1[_0x1d9761(0x1fe)][_0x1d9761(0x228)],{'message':((_0x544472=(_0x252951=(_0x5421ad=_0x2fe1b0[_0x1d9761(0x1f5)])===null||_0x5421ad===void 0x0?void 0x0:_0x5421ad[_0x1d9761(0x210)])===null||_0x252951===void 0x0?void 0x0:_0x252951[0x0])===null||_0x544472===void 0x0?void 0x0:_0x544472[_0x1d9761(0x1f2)])||'参数验证失败'});}}if(_0x2fe1b0===null||_0x2fe1b0===void 0x0?void 0x0:_0x2fe1b0[_0x1d9761(0x220)]){const _0x370399=(_0x4d4693=_0x431a4c===null||_0x431a4c===void 0x0?void 0x0:_0x431a4c[_0x1d9761(0x20c)])===null||_0x4d4693===void 0x0?void 0x0:_0x4d4693[_0x1d9761(0x1f4)],_0x234ce6=function(_0x532634,_0x2367a7){const _0x273ff4=_0x1d9761;var _0x1ed8b,_0x3564f5,_0x3f31f7,_0x21d889,_0x10b743,_0x464969,_0x4b8106,_0x51f0cc,_0x58526d,_0x10971b,_0x380433;for(let _0x197bac in _0x532634){if(_0x2367a7[(_0x1ed8b=_0x532634[_0x197bac])===null||_0x1ed8b===void 0x0?void 0x0:_0x1ed8b['key']]&&((_0x3f31f7=(_0x3564f5=_0x532634[_0x197bac])===null||_0x3564f5===void 0x0?void 0x0:_0x3564f5[_0x273ff4(0x1f8)])===null||_0x3f31f7===void 0x0?void 0x0:_0x3f31f7[_0x273ff4(0x22b)])){if(((_0x10b743=(_0x21d889=_0x532634[_0x197bac])===null||_0x21d889===void 0x0?void 0x0:_0x21d889[_0x273ff4(0x1f8)])===null||_0x10b743===void 0x0?void 0x0:_0x10b743[_0x273ff4(0x22b)])==_0x273ff4(0x206))_0x2367a7[_0x532634[_0x197bac][_0x273ff4(0x224)]]=_0x234ce6((_0x4b8106=(_0x464969=_0x532634[_0x197bac])===null||_0x464969===void 0x0?void 0x0:_0x464969[_0x273ff4(0x1f8)][_0x273ff4(0x20c)])===null||_0x4b8106===void 0x0?void 0x0:_0x4b8106[_0x273ff4(0x1f4)],_0x2367a7[_0x532634[_0x197bac][_0x273ff4(0x224)]]);else{if(_0x532634[_0x197bac][_0x273ff4(0x1f8)][_0x273ff4(0x22b)]==_0x273ff4(0x22d)&&_0x2fe1b0[_0x273ff4(0x220)][(_0x51f0cc=_0x532634[_0x197bac])===null||_0x51f0cc===void 0x0?void 0x0:_0x51f0cc['key']]){const _0x44f567=((_0x380433=(_0x10971b=(_0x58526d=_0x532634[_0x197bac])===null||_0x58526d===void 0x0?void 0x0:_0x58526d[_0x273ff4(0x1f8)])===null||_0x10971b===void 0x0?void 0x0:_0x10971b[_0x273ff4(0x1f3)])===null||_0x380433===void 0x0?void 0x0:_0x380433['format'])||_0x273ff4(0x235);_0x2367a7[_0x532634[_0x197bac][_0x273ff4(0x224)]]=dayjs(_0x2fe1b0[_0x273ff4(0x220)][_0x532634[_0x197bac][_0x273ff4(0x224)]])['format'](_0x44f567);}}}}return _0x2367a7;};return _0x234ce6(_0x370399,_0x2fe1b0[_0x1d9761(0x220)]);}throw new AnnError(ValidatorError_1['ValidatorError'][_0x1d9761(0x228)]);}};function a8_0x530b(_0x34bbee,_0x2c1a4d){const _0x3f6297=a8_0x4a06();return a8_0x530b=function(_0x5a595a,_0x3a3307){_0x5a595a=_0x5a595a-0x1f2;let _0x4a06eb=_0x3f6297[_0x5a595a];return _0x4a06eb;},a8_0x530b(_0x34bbee,_0x2c1a4d);}__decorate([(0x0,core_1[a8_0x6a2c2c(0x20e)])(a8_0x6a2c2c(0x201)),__metadata(a8_0x6a2c2c(0x1fa),Object)],ValidatorService[a8_0x6a2c2c(0x20a)],a8_0x6a2c2c(0x202),void 0x0),__decorate([(0x0,core_1[a8_0x6a2c2c(0x20e)])('validator'),__metadata(a8_0x6a2c2c(0x1fa),Object)],ValidatorService['prototype'],'validatorConfig',void 0x0),__decorate([(0x0,core_1[a8_0x6a2c2c(0x1fb)])(),__metadata(a8_0x6a2c2c(0x1fa),i18n_1[a8_0x6a2c2c(0x20d)])],ValidatorService[a8_0x6a2c2c(0x20a)],a8_0x6a2c2c(0x21e),void 0x0),__decorate([(0x0,core_1[a8_0x6a2c2c(0x20f)])(),__metadata(a8_0x6a2c2c(0x1fa),Function),__metadata(a8_0x6a2c2c(0x21f),[]),__metadata(a8_0x6a2c2c(0x22f),Promise)],ValidatorService['prototype'],a8_0x6a2c2c(0x216),null),ValidatorService=__decorate([(0x0,core_1[a8_0x6a2c2c(0x226)])(a8_0x6a2c2c(0x212)),(0x0,core_1[a8_0x6a2c2c(0x225)])(core_1[a8_0x6a2c2c(0x205)]['Singleton'])],ValidatorService),exports[a8_0x6a2c2c(0x208)]=ValidatorService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/core": "^3.0.
|
|
20
|
+
"@anncic-api/core": "^3.0.5",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.7.0"
|
|
23
23
|
},
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"javascript-obfuscator": "^4.0.0",
|
|
27
27
|
"typescript": "^4.7.4"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a79013b7012300a9948fc7ecf2934a20e3e453e0"
|
|
30
30
|
}
|