@anncic-api/validator 2.1.12 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.default.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Rule.js +1 -1
- package/dist/decorator/Validator.js +1 -1
- package/dist/exception/ValidatorError.js +1 -1
- package/dist/helper/dtoHelper.js +1 -1
- package/dist/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
|
-
function
|
|
1
|
+
const a0_0x42711a=a0_0x306f;function a0_0x44a8(){const _0x19eb85=['../../locales/en_US.json','89333VkiZRi','(((.+)+)+)+$','982284RuWwXx','ValidatorError','string','../../locales/zh_CN.json','search','226194jBRYrn','10MXqaTN','constructor','903824piIqAq','18556866OmBtkQ','10141088YBmNOq','PARAMS','toString','defineProperty','__esModule','170jQGgnM','3ZCGLvF','2244669EvDdRs'];a0_0x44a8=function(){return _0x19eb85;};return a0_0x44a8();}(function(_0x25e5a7,_0x499918){const _0x3a22b9=a0_0x306f,_0x94116b=_0x25e5a7();while(!![]){try{const _0x4b100b=parseInt(_0x3a22b9(0x1c9))/0x1+-parseInt(_0x3a22b9(0x1be))/0x2+parseInt(_0x3a22b9(0x1c6))/0x3*(parseInt(_0x3a22b9(0x1cb))/0x4)+parseInt(_0x3a22b9(0x1c5))/0x5*(parseInt(_0x3a22b9(0x1d0))/0x6)+parseInt(_0x3a22b9(0x1c7))/0x7+parseInt(_0x3a22b9(0x1c0))/0x8+parseInt(_0x3a22b9(0x1bf))/0x9*(-parseInt(_0x3a22b9(0x1d1))/0xa);if(_0x4b100b===_0x499918)break;else _0x94116b['push'](_0x94116b['shift']());}catch(_0x2d3af2){_0x94116b['push'](_0x94116b['shift']());}}}(a0_0x44a8,0xa8bf3));function a0_0x306f(_0x16f460,_0x3ea04a){const _0x30665a=a0_0x44a8();return a0_0x306f=function(_0x3e8c1c,_0x4b095e){_0x3e8c1c=_0x3e8c1c-0x1be;let _0x44a86f=_0x30665a[_0x3e8c1c];return _0x44a86f;},a0_0x306f(_0x16f460,_0x3ea04a);}const a0_0x4b095e=(function(){let _0x55ddbf=!![];return function(_0x56c5fc,_0x36a574){const _0x3327f5=_0x55ddbf?function(){if(_0x36a574){const _0x1549a2=_0x36a574['apply'](_0x56c5fc,arguments);return _0x36a574=null,_0x1549a2;}}:function(){};return _0x55ddbf=![],_0x3327f5;};}()),a0_0x3e8c1c=a0_0x4b095e(this,function(){const _0x1ffbfb=a0_0x306f;return a0_0x3e8c1c[_0x1ffbfb(0x1c2)]()[_0x1ffbfb(0x1cf)](_0x1ffbfb(0x1ca))[_0x1ffbfb(0x1c2)]()[_0x1ffbfb(0x1d2)](a0_0x3e8c1c)[_0x1ffbfb(0x1cf)]('(((.+)+)+)+$');});a0_0x3e8c1c();'use strict';Object[a0_0x42711a(0x1c3)](exports,a0_0x42711a(0x1c4),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');exports['default']={'validator':{'errorStatus':ValidatorError_1[a0_0x42711a(0x1cc)][a0_0x42711a(0x1c1)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x42711a(0x1cd)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x42711a(0x1c8))},'zh_CN':{'validator':require(a0_0x42711a(0x1ce))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x274b4d=a1_0xbf43;(function(_0x377a55,_0xccebdd){const _0x5e4e74=a1_0xbf43,_0x42eeaa=_0x377a55();while(!![]){try{const _0x18045f=-parseInt(_0x5e4e74(0x128))/0x1+-parseInt(_0x5e4e74(0x106))/0x2*(-parseInt(_0x5e4e74(0xfc))/0x3)+parseInt(_0x5e4e74(0xf1))/0x4*(-parseInt(_0x5e4e74(0xfb))/0x5)+-parseInt(_0x5e4e74(0x11f))/0x6+-parseInt(_0x5e4e74(0xff))/0x7+parseInt(_0x5e4e74(0x11e))/0x8*(-parseInt(_0x5e4e74(0x104))/0x9)+-parseInt(_0x5e4e74(0x110))/0xa*(-parseInt(_0x5e4e74(0x107))/0xb);if(_0x18045f===_0xccebdd)break;else _0x42eeaa['push'](_0x42eeaa['shift']());}catch(_0x3119d6){_0x42eeaa['push'](_0x42eeaa['shift']());}}}(a1_0x4eb5,0xf3d46));const a1_0x54968e=(function(){let _0x423371=!![];return function(_0x2f6cd6,_0x32e04a){const _0x31af1b=_0x423371?function(){const _0x1613ec=a1_0xbf43;if(_0x32e04a){const _0xf89325=_0x32e04a[_0x1613ec(0x10b)](_0x2f6cd6,arguments);return _0x32e04a=null,_0xf89325;}}:function(){};return _0x423371=![],_0x31af1b;};}()),a1_0x4eaff7=a1_0x54968e(this,function(){const _0x4c0bee=a1_0xbf43;return a1_0x4eaff7[_0x4c0bee(0x122)]()[_0x4c0bee(0x127)](_0x4c0bee(0x10c))['toString']()[_0x4c0bee(0x126)](a1_0x4eaff7)[_0x4c0bee(0x127)](_0x4c0bee(0x10c));});a1_0x4eaff7();function a1_0xbf43(_0x30d4c6,_0x1cee40){const _0x3c7081=a1_0x4eb5();return a1_0xbf43=function(_0x4eaff7,_0x54968e){_0x4eaff7=_0x4eaff7-0xf0;let _0x4eb529=_0x3c7081[_0x4eaff7];return _0x4eb529;},a1_0xbf43(_0x30d4c6,_0x1cee40);}'use strict';var __decorate=this&&this[a1_0x274b4d(0x113)]||function(_0x2e4cf7,_0x2c2b1f,_0x52005f,_0x3c84a9){const _0xccd2a8=a1_0x274b4d;var _0x2d4022=arguments['length'],_0x76ef5f=_0x2d4022<0x3?_0x2c2b1f:_0x3c84a9===null?_0x3c84a9=Object[_0xccd2a8(0xf7)](_0x2c2b1f,_0x52005f):_0x3c84a9,_0x2980bf;if(typeof Reflect===_0xccd2a8(0x121)&&typeof Reflect[_0xccd2a8(0xf6)]===_0xccd2a8(0x12c))_0x76ef5f=Reflect[_0xccd2a8(0xf6)](_0x2e4cf7,_0x2c2b1f,_0x52005f,_0x3c84a9);else{for(var _0x334ecd=_0x2e4cf7[_0xccd2a8(0xfe)]-0x1;_0x334ecd>=0x0;_0x334ecd--)if(_0x2980bf=_0x2e4cf7[_0x334ecd])_0x76ef5f=(_0x2d4022<0x3?_0x2980bf(_0x76ef5f):_0x2d4022>0x3?_0x2980bf(_0x2c2b1f,_0x52005f,_0x76ef5f):_0x2980bf(_0x2c2b1f,_0x52005f))||_0x76ef5f;}return _0x2d4022>0x3&&_0x76ef5f&&Object[_0xccd2a8(0x111)](_0x2c2b1f,_0x52005f,_0x76ef5f),_0x76ef5f;},__metadata=this&&this[a1_0x274b4d(0x10e)]||function(_0xdbcc73,_0x2b6327){const _0x416a1c=a1_0x274b4d;if(typeof Reflect===_0x416a1c(0x121)&&typeof Reflect['metadata']===_0x416a1c(0x12c))return Reflect['metadata'](_0xdbcc73,_0x2b6327);};Object['defineProperty'](exports,a1_0x274b4d(0xf3),{'value':!![]}),exports[a1_0x274b4d(0x105)]=void 0x0;const i18n_1=require(a1_0x274b4d(0x112)),core_1=require(a1_0x274b4d(0x10a)),core_2=require(a1_0x274b4d(0x10a)),interface_1=require('./interface'),ValidatorService_1=require(a1_0x274b4d(0x11b)),i18n=require(a1_0x274b4d(0x112)),anncic=require(a1_0x274b4d(0x103)),ConfigDefault=require(a1_0x274b4d(0x115));let CustomConfiguration=class CustomConfiguration{async[a1_0x274b4d(0x108)](){const _0x3ab6b1=a1_0x274b4d;this['decorator'][_0x3ab6b1(0xf2)](interface_1['VALIDATOR_KEY'],_0x505715=>{const _0x19d294=_0x3ab6b1,_0x2afc87=_0x505715['metadata'],_0x3327af=(0x0,core_2[_0x19d294(0x120)])(_0x505715[_0x19d294(0xf8)],_0x505715[_0x19d294(0x10f)]);return{'before':_0x4ed371=>{const _0x84cf17=_0x19d294;var _0x3d9fc2,_0x3d8d64,_0xdafdd0,_0x220ef9,_0x336006,_0x12e27a,_0xc172d7,_0x229360,_0xe62b3b,_0x52f244,_0x4e3271,_0x25d0d6,_0x1a6f47;const _0x146a70=_0x4ed371[_0x84cf17(0xf8)][core_1[_0x84cf17(0x119)]],_0x213614=Object[_0x84cf17(0x129)]({},((_0x3d9fc2=_0x146a70===null||_0x146a70===void 0x0?void 0x0:_0x146a70[_0x84cf17(0x125)])===null||_0x3d9fc2===void 0x0?void 0x0:_0x3d9fc2['query'])||{},((_0x3d8d64=_0x146a70===null||_0x146a70===void 0x0?void 0x0:_0x146a70[_0x84cf17(0x125)])===null||_0x3d8d64===void 0x0?void 0x0:_0x3d8d64['body'])||{}),_0x57cb29=((0x0,core_2[_0x84cf17(0x100)])(interface_1['VALIDATOR_KEY'],_0x4ed371[_0x84cf17(0xf8)])||[])[_0x84cf17(0x116)](_0x29ac43=>_0x29ac43[_0x84cf17(0x11c)]==_0x4ed371[_0x84cf17(0x102)]);!(_0x2afc87===null||_0x2afc87===void 0x0?void 0x0:_0x2afc87[_0x84cf17(0x11a)])&&_0x146a70&&_0x146a70[_0x84cf17(0xfd)]&&(_0x2afc87[_0x84cf17(0x11a)]=_0x146a70[_0x84cf17(0xfd)](i18n_1[_0x84cf17(0x101)]));for(let _0x747f11=0x0;_0x747f11<_0x3327af['length'];_0x747f11++){const _0x10637f=_0x3327af[_0x747f11],_0x28bac4=this['ValidatorService'][_0x84cf17(0x117)](_0x10637f);if(_0x28bac4){if(typeof _0x4ed371['args'][_0x747f11]==_0x84cf17(0x10d)||((_0xdafdd0=_0x4ed371[_0x84cf17(0x114)][_0x747f11])===null||_0xdafdd0===void 0x0?void 0x0:_0xdafdd0[_0x84cf17(0x125)])&&((_0x220ef9=_0x4ed371[_0x84cf17(0x114)][_0x747f11])===null||_0x220ef9===void 0x0?void 0x0:_0x220ef9[_0x84cf17(0xf0)])&&((_0x336006=_0x4ed371[_0x84cf17(0x114)][_0x747f11])===null||_0x336006===void 0x0?void 0x0:_0x336006['req']))_0x4ed371['args'][_0x747f11]=_0x213614;else((_0x12e27a=_0x4ed371[_0x84cf17(0x114)][_0x747f11])===null||_0x12e27a===void 0x0?void 0x0:_0x12e27a['name'])==_0x84cf17(0x124)&&_0x4ed371[_0x84cf17(0x114)][_0x84cf17(0x12d)](_0x747f11,0x0,_0x213614);const _0x42ad16=this['ValidatorService'][_0x84cf17(0xf4)](_0x28bac4,_0x4ed371[_0x84cf17(0x114)][_0x747f11],_0x2afc87);_0x42ad16&&(_0x4ed371['args'][_0x747f11]=_0x42ad16);}else{if((_0x57cb29===null||_0x57cb29===void 0x0?void 0x0:_0x57cb29['methodArgs'][_0x747f11])&&((_0xc172d7=_0x4ed371[_0x84cf17(0x114)][_0x747f11])===null||_0xc172d7===void 0x0?void 0x0:_0xc172d7[_0x84cf17(0x11d)])&&typeof _0x4ed371[_0x84cf17(0x114)][_0x747f11][_0x84cf17(0xfa)]==_0x84cf17(0x12c)&&((_0x229360=_0x146a70===null||_0x146a70===void 0x0?void 0x0:_0x146a70[_0x84cf17(0x11d)])===null||_0x229360===void 0x0?void 0x0:_0x229360[_0x57cb29[_0x84cf17(0x12b)][_0x747f11]]))_0x4ed371[_0x84cf17(0x114)][_0x747f11]=_0x10637f((_0xe62b3b=_0x146a70===null||_0x146a70===void 0x0?void 0x0:_0x146a70[_0x84cf17(0x11d)])===null||_0xe62b3b===void 0x0?void 0x0:_0xe62b3b[_0x57cb29[_0x84cf17(0x12b)][_0x747f11]]);else(_0x57cb29===null||_0x57cb29===void 0x0?void 0x0:_0x57cb29['methodArgs'][_0x747f11])&&((_0x4e3271=(_0x52f244=_0x4ed371['args'][_0x747f11])===null||_0x52f244===void 0x0?void 0x0:_0x52f244[_0x84cf17(0x11d)])===null||_0x4e3271===void 0x0?void 0x0:_0x4e3271[_0x57cb29[_0x84cf17(0x12b)][_0x747f11]])&&(_0x4ed371['args'][_0x747f11]=(_0x1a6f47=(_0x25d0d6=_0x4ed371['args'][_0x747f11])===null||_0x25d0d6===void 0x0?void 0x0:_0x25d0d6[_0x84cf17(0x11d)])===null||_0x1a6f47===void 0x0?void 0x0:_0x1a6f47[_0x57cb29[_0x84cf17(0x12b)][_0x747f11]]);}}},'afterThrow':(_0x3dd218,_0x4332b0)=>{throw _0x4332b0;}};});}};function a1_0x4eb5(){const _0x294b8c=['63MZOZaL','CustomConfiguration','1636hSlKtF','11BAboMo','onReady','design:type','@midwayjs/core','apply','(((.+)+)+)+$','undefined','__metadata','propertyName','42143540PNCuIh','defineProperty','@midwayjs/i18n','__decorate','args','./config/config.default','find','getSchema','ValidatorService','REQUEST_OBJ_CTX_KEY','locale','./service/ValidatorService','method','params','88696wFUVwi','1222638MUUPHI','getMethodParamTypes','object','toString','MidwayDecoratorService','bound\x20dispatch','request','constructor','search','549144LDEgHI','assign','anncic-api:validator','methodArgs','function','splice','res','28bjatgd','registerMethodHandler','__esModule','validator','Configuration','decorate','getOwnPropertyDescriptor','target','Inject','param','1026335DPvcYK','3327awmVTU','getAttr','length','12987765EBfaNQ','getClassMetadata','I18N_ATTR_KEY','methodName','@anncic-api/core'];a1_0x4eb5=function(){return _0x294b8c;};return a1_0x4eb5();}__decorate([(0x0,core_2[a1_0x274b4d(0xf9)])(),__metadata('design:type',core_1[a1_0x274b4d(0x123)])],CustomConfiguration['prototype'],'decorator',void 0x0),__decorate([(0x0,core_2[a1_0x274b4d(0xf9)])(),__metadata(a1_0x274b4d(0x109),ValidatorService_1[a1_0x274b4d(0x118)])],CustomConfiguration['prototype'],a1_0x274b4d(0x118),void 0x0),CustomConfiguration=__decorate([(0x0,core_2[a1_0x274b4d(0xf5)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x274b4d(0x12a),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x274b4d(0x105)]=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a2_0x93f0(){const _0x3df339=['RuleType','isSchema','Rule','RULES_KEY','attachClassMetadata','835232osddns','1182JsCKdF','search','1264887EBSYpz','getClassMetadata','835iXqZZl','57546RRYLjE','getPropertyType','items','array','__esModule','joi','default','@joi/date','description','(((.+)+)+)+$','Array','function','apply','label','78910jyzjYw','name','toString','extend','16821gZvZXj','280FMvIxm','../interface','defineProperty','map','33848OLRjEU','saveClassMetadata','object'];a2_0x93f0=function(){return _0x3df339;};return a2_0x93f0();}const a2_0x2bbeda=a2_0x1a65;(function(_0x4b9ab5,_0x5c217d){const _0x13bf95=a2_0x1a65,_0x45ac50=_0x4b9ab5();while(!![]){try{const _0x3c6eff=parseInt(_0x13bf95(0x1b0))/0x1+-parseInt(_0x13bf95(0x1ac))/0x2+parseInt(_0x13bf95(0x1c3))/0x3+-parseInt(_0x13bf95(0x1bd))/0x4+-parseInt(_0x13bf95(0x1c2))/0x5*(-parseInt(_0x13bf95(0x1be))/0x6)+-parseInt(_0x13bf95(0x1b1))/0x7*(-parseInt(_0x13bf95(0x1b5))/0x8)+parseInt(_0x13bf95(0x1c0))/0x9;if(_0x3c6eff===_0x5c217d)break;else _0x45ac50['push'](_0x45ac50['shift']());}catch(_0x14d447){_0x45ac50['push'](_0x45ac50['shift']());}}}(a2_0x93f0,0x1fd76));const a2_0x3d38f5=(function(){let _0x3cc6cc=!![];return function(_0x56a6fa,_0x41d0c4){const _0x5d55ce=_0x3cc6cc?function(){const _0x470a07=a2_0x1a65;if(_0x41d0c4){const _0x497ce9=_0x41d0c4[_0x470a07(0x1aa)](_0x56a6fa,arguments);return _0x41d0c4=null,_0x497ce9;}}:function(){};return _0x3cc6cc=![],_0x5d55ce;};}()),a2_0x29211a=a2_0x3d38f5(this,function(){const _0x61b0f2=a2_0x1a65;return a2_0x29211a[_0x61b0f2(0x1ae)]()[_0x61b0f2(0x1bf)](_0x61b0f2(0x1a7))[_0x61b0f2(0x1ae)]()['constructor'](a2_0x29211a)[_0x61b0f2(0x1bf)](_0x61b0f2(0x1a7));});a2_0x29211a();'use strict';Object[a2_0x2bbeda(0x1b3)](exports,a2_0x2bbeda(0x1a2),{'value':!![]}),exports[a2_0x2bbeda(0x1ba)]=exports[a2_0x2bbeda(0x1b8)]=void 0x0;function a2_0x1a65(_0x412bc1,_0x239d70){const _0x33f9f2=a2_0x93f0();return a2_0x1a65=function(_0x29211a,_0x3d38f5){_0x29211a=_0x29211a-0x1a1;let _0x93f007=_0x33f9f2[_0x29211a];return _0x93f007;},a2_0x1a65(_0x412bc1,_0x239d70);}const joi=require(a2_0x2bbeda(0x1a3)),date_1=require(a2_0x2bbeda(0x1a5)),core_1=require('@midwayjs/core'),interface_1=require(a2_0x2bbeda(0x1b2));exports[a2_0x2bbeda(0x1b8)]=joi[a2_0x2bbeda(0x1af)](date_1[a2_0x2bbeda(0x1a4)]);function Rule(_0x58d52c,_0x2a0544,_0x449183=''){return(_0x164ed7,_0x430b85)=>{const _0x23a975=a2_0x1a65;var _0x7ec34;if(_0x430b85)!joi['isSchema'](_0x2a0544)&&(_0x2a0544===null||_0x2a0544===void 0x0?void 0x0:_0x2a0544[_0x23a975(0x1ad)])&&(_0x2a0544=joi[_0x23a975(0x1b7)]((0x0,core_1[_0x23a975(0x1c1)])(interface_1[_0x23a975(0x1bb)],_0x2a0544))['meta']({'id':_0x2a0544[_0x23a975(0x1ad)]}),(0x0,core_1[_0x23a975(0x1c4)])(_0x164ed7,_0x430b85)[_0x23a975(0x1ad)]===_0x23a975(0x1a8)&&(_0x2a0544=joi[_0x23a975(0x1a1)]()[_0x23a975(0x1c5)](_0x2a0544))),joi[_0x23a975(0x1b9)](_0x2a0544)&&(_0x58d52c&&typeof(_0x2a0544===null||_0x2a0544===void 0x0?void 0x0:_0x2a0544[_0x23a975(0x1ab)])==_0x23a975(0x1a9)&&(_0x2a0544=_0x2a0544['label'](_0x58d52c)),_0x449183&&typeof(_0x2a0544===null||_0x2a0544===void 0x0?void 0x0:_0x2a0544[_0x23a975(0x1a6)])==_0x23a975(0x1a9)&&(_0x2a0544=_0x2a0544[_0x23a975(0x1a6)](_0x449183)),(0x0,core_1[_0x23a975(0x1bc)])(interface_1[_0x23a975(0x1bb)],_0x2a0544,_0x164ed7,_0x430b85));else{const _0x12726c=(0x0,core_1[_0x23a975(0x1c1)])(interface_1[_0x23a975(0x1bb)],_0x2a0544);if(_0x12726c){let _0x30794e=(_0x7ec34=(0x0,core_1[_0x23a975(0x1c1)])(interface_1[_0x23a975(0x1bb)],_0x164ed7))!==null&&_0x7ec34!==void 0x0?_0x7ec34:{};Object['keys'](_0x12726c)[_0x23a975(0x1b4)](_0x237192=>{!_0x30794e[_0x237192]&&(_0x30794e[_0x237192]=_0x12726c[_0x237192]);}),(0x0,core_1[_0x23a975(0x1b6)])(interface_1['RULES_KEY'],_0x30794e,_0x164ed7);}}};}exports[a2_0x2bbeda(0x1ba)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x5a030a=a3_0x64d0;(function(_0x42e32d,_0x400c97){const _0x14e0ca=a3_0x64d0,_0x4a9752=_0x42e32d();while(!![]){try{const _0x187087=parseInt(_0x14e0ca(0xda))/0x1+-parseInt(_0x14e0ca(0xd1))/0x2+parseInt(_0x14e0ca(0xd9))/0x3+-parseInt(_0x14e0ca(0xc7))/0x4+-parseInt(_0x14e0ca(0xc9))/0x5*(-parseInt(_0x14e0ca(0xdb))/0x6)+parseInt(_0x14e0ca(0xc8))/0x7*(-parseInt(_0x14e0ca(0xd5))/0x8)+-parseInt(_0x14e0ca(0xc3))/0x9;if(_0x187087===_0x400c97)break;else _0x4a9752['push'](_0x4a9752['shift']());}catch(_0x446c06){_0x4a9752['push'](_0x4a9752['shift']());}}}(a3_0x1192,0xcd5b6));const a3_0x4595ae=(function(){let _0x19441e=!![];return function(_0x3d0d67,_0x172e50){const _0xa4d64d=_0x19441e?function(){const _0x2ba75b=a3_0x64d0;if(_0x172e50){const _0x5d7854=_0x172e50[_0x2ba75b(0xcf)](_0x3d0d67,arguments);return _0x172e50=null,_0x5d7854;}}:function(){};return _0x19441e=![],_0xa4d64d;};}()),a3_0x5c047e=a3_0x4595ae(this,function(){const _0x1f058d=a3_0x64d0;return a3_0x5c047e[_0x1f058d(0xdc)]()[_0x1f058d(0xc5)](_0x1f058d(0xcc))[_0x1f058d(0xdc)]()['constructor'](a3_0x5c047e)['search']('(((.+)+)+)+$');});a3_0x5c047e();'use strict';Object[a3_0x5a030a(0xd6)](exports,a3_0x5a030a(0xc6),{'value':!![]}),exports[a3_0x5a030a(0xde)]=exports['Validator']=void 0x0;const core_1=require('@midwayjs/core'),interface_1=require(a3_0x5a030a(0xd3));function Validator(_0x24e82e={}){return(_0x504afc,_0xeb2f5d,_0x1d5403)=>{const _0x3433cd=a3_0x64d0,_0x294a73=getFuncArgs(_0x504afc[_0xeb2f5d]);(0x0,core_1[_0x3433cd(0xd8)])(interface_1['VALIDATOR_KEY'],{'method':_0xeb2f5d,'methodArgs':_0x294a73},_0x504afc),(0x0,core_1[_0x3433cd(0xcd)])(interface_1[_0x3433cd(0xce)],_0x24e82e)(_0x504afc,_0xeb2f5d,_0x1d5403);};}exports[a3_0x5a030a(0xdd)]=Validator;function a3_0x64d0(_0x2f3685,_0x14dae8){const _0x9e1b2d=a3_0x1192();return a3_0x64d0=function(_0x5c047e,_0x4595ae){_0x5c047e=_0x5c047e-0xc3;let _0x1192d3=_0x9e1b2d[_0x5c047e];return _0x1192d3;},a3_0x64d0(_0x2f3685,_0x14dae8);}function a3_0x1192(){const _0x5a3311=['prototype','search','__esModule','4077000ybkeKg','1106OSZGgf','5JwBIoy','constructor','function','(((.+)+)+)+$','createCustomMethodDecorator','VALIDATOR_KEY','apply','slice','646810CqvQqM','indexOf','../interface','match','49768xhvLZW','defineProperty','replace','attachClassMetadata','4758279wvryvw','829969VNldid','7912218MeAyzx','toString','Validator','getFuncArgs','5112450aviIfD'];a3_0x1192=function(){return _0x5a3311;};return a3_0x1192();}function getFuncArgs(_0x354918){const _0x37a6b5=a3_0x5a030a;if(typeof _0x354918==_0x37a6b5(0xcb)){const _0x35c67a=/=>.*$/mg,_0x413496=/=[^,)]+/mg,_0x4832c5=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x39e0c8=(_0x354918[_0x37a6b5(0xc4)]?_0x354918[_0x37a6b5(0xc4)][_0x37a6b5(0xca)][_0x37a6b5(0xdc)]():_0x354918[_0x37a6b5(0xdc)]())[_0x37a6b5(0xd7)](_0x4832c5,'')[_0x37a6b5(0xd7)](_0x35c67a,'')['replace'](_0x413496,''),_0x1c06d9=_0x39e0c8[_0x37a6b5(0xd0)](_0x39e0c8[_0x37a6b5(0xd2)]('(')+0x1,_0x39e0c8['indexOf'](')'))[_0x37a6b5(0xd4)](/([^\s,]+)/g)||[];return _0x1c06d9;}}exports[a3_0x5a030a(0xde)]=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x305758=a4_0x2986;function a4_0x2986(_0x1adc30,_0x1b4bf0){var _0x2679af=a4_0x503a();return a4_0x2986=function(_0x48dd6e,_0x1de60a){_0x48dd6e=_0x48dd6e-0x9d;var _0x503a3b=_0x2679af[_0x48dd6e];return _0x503a3b;},a4_0x2986(_0x1adc30,_0x1b4bf0);}(function(_0x1d9c37,_0x2969de){var _0x2eca54=a4_0x2986,_0x382f59=_0x1d9c37();while(!![]){try{var _0x4d44ea=-parseInt(_0x2eca54(0xa0))/0x1+-parseInt(_0x2eca54(0xb0))/0x2*(parseInt(_0x2eca54(0xab))/0x3)+parseInt(_0x2eca54(0xa7))/0x4+-parseInt(_0x2eca54(0xa6))/0x5+-parseInt(_0x2eca54(0xa3))/0x6+-parseInt(_0x2eca54(0xb6))/0x7+parseInt(_0x2eca54(0xa9))/0x8;if(_0x4d44ea===_0x2969de)break;else _0x382f59['push'](_0x382f59['shift']());}catch(_0x4f6d53){_0x382f59['push'](_0x382f59['shift']());}}}(a4_0x503a,0x220a3));var a4_0x1de60a=(function(){var _0x4e93d4=!![];return function(_0x4142e3,_0x423a79){var _0x1bdd51=_0x4e93d4?function(){var _0x4008aa=a4_0x2986;if(_0x423a79){var _0x1336d4=_0x423a79[_0x4008aa(0xac)](_0x4142e3,arguments);return _0x423a79=null,_0x1336d4;}}:function(){};return _0x4e93d4=![],_0x1bdd51;};}()),a4_0x48dd6e=a4_0x1de60a(this,function(){var _0x4b700f=a4_0x2986;return a4_0x48dd6e[_0x4b700f(0x9e)]()[_0x4b700f(0xa4)](_0x4b700f(0x9d))[_0x4b700f(0x9e)]()[_0x4b700f(0xb4)](a4_0x48dd6e)[_0x4b700f(0xa4)](_0x4b700f(0x9d));});a4_0x48dd6e();'use strict';var __decorate=this&&this[a4_0x305758(0xaa)]||function(_0x3fc59e,_0x37dc5b,_0x3ed305,_0x48a795){var _0x1e177a=a4_0x305758,_0x25efe1=arguments[_0x1e177a(0xa5)],_0x5060bb=_0x25efe1<0x3?_0x37dc5b:_0x48a795===null?_0x48a795=Object[_0x1e177a(0xa1)](_0x37dc5b,_0x3ed305):_0x48a795,_0x31aaf2;if(typeof Reflect===_0x1e177a(0x9f)&&typeof Reflect[_0x1e177a(0xae)]===_0x1e177a(0xb3))_0x5060bb=Reflect[_0x1e177a(0xae)](_0x3fc59e,_0x37dc5b,_0x3ed305,_0x48a795);else{for(var _0x9d870e=_0x3fc59e['length']-0x1;_0x9d870e>=0x0;_0x9d870e--)if(_0x31aaf2=_0x3fc59e[_0x9d870e])_0x5060bb=(_0x25efe1<0x3?_0x31aaf2(_0x5060bb):_0x25efe1>0x3?_0x31aaf2(_0x37dc5b,_0x3ed305,_0x5060bb):_0x31aaf2(_0x37dc5b,_0x3ed305))||_0x5060bb;}return _0x25efe1>0x3&&_0x5060bb&&Object[_0x1e177a(0xb1)](_0x37dc5b,_0x3ed305,_0x5060bb),_0x5060bb;},__metadata=this&&this['__metadata']||function(_0x2dadf4,_0x28c94c){var _0x41a583=a4_0x305758;if(typeof Reflect==='object'&&typeof Reflect[_0x41a583(0xb2)]===_0x41a583(0xb3))return Reflect[_0x41a583(0xb2)](_0x2dadf4,_0x28c94c);};Object[a4_0x305758(0xb1)](exports,'__esModule',{'value':!![]}),exports[a4_0x305758(0xb5)]=void 0x0;const core_1=require(a4_0x305758(0xa8));class ValidatorError extends AnnError{}ValidatorError['PARAMS']=0x18c1e,ValidatorError['NOFIND_SCHEMA']=0x18c1c,__decorate([(0x0,core_1[a4_0x305758(0xa2)])('参数验证失败'),__metadata(a4_0x305758(0xad),Object)],ValidatorError,a4_0x305758(0xaf),void 0x0),__decorate([(0x0,core_1[a4_0x305758(0xa2)])('参数验证失败'),__metadata(a4_0x305758(0xad),Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0),exports[a4_0x305758(0xb5)]=ValidatorError;function a4_0x503a(){var _0x5f04bc=['__decorate','31107FoWhNT','apply','design:type','decorate','PARAMS','46ZNeanB','defineProperty','metadata','function','constructor','ValidatorError','591493CjfUEO','(((.+)+)+)+$','toString','object','259387IIoiHI','getOwnPropertyDescriptor','AnnErrorMsg','1630956CeMjKi','search','length','1107930ABITJV','1069484uHytVv','@anncic-api/core','7582728KBlTro'];a4_0x503a=function(){return _0x5f04bc;};return a4_0x503a();}
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a5_0x399c(_0xe834a6,_0x45ed0b){const _0x1ee71b=a5_0xcea7();return a5_0x399c=function(_0x349b11,_0x1e564e){_0x349b11=_0x349b11-0xf6;let _0xcea78c=_0x1ee71b[_0x349b11];return _0xcea78c;},a5_0x399c(_0xe834a6,_0x45ed0b);}const a5_0x2bb7e7=a5_0x399c;(function(_0x41b8cb,_0xd3a934){const _0x3b3353=a5_0x399c,_0x5ebd60=_0x41b8cb();while(!![]){try{const _0x1ae5c8=-parseInt(_0x3b3353(0x109))/0x1*(parseInt(_0x3b3353(0x101))/0x2)+-parseInt(_0x3b3353(0x100))/0x3*(-parseInt(_0x3b3353(0x10b))/0x4)+-parseInt(_0x3b3353(0x10d))/0x5*(-parseInt(_0x3b3353(0xf7))/0x6)+-parseInt(_0x3b3353(0x10a))/0x7*(parseInt(_0x3b3353(0xff))/0x8)+-parseInt(_0x3b3353(0xf8))/0x9*(-parseInt(_0x3b3353(0x10e))/0xa)+parseInt(_0x3b3353(0xfe))/0xb*(-parseInt(_0x3b3353(0xf9))/0xc)+parseInt(_0x3b3353(0x103))/0xd*(-parseInt(_0x3b3353(0x105))/0xe);if(_0x1ae5c8===_0xd3a934)break;else _0x5ebd60['push'](_0x5ebd60['shift']());}catch(_0x38a06b){_0x5ebd60['push'](_0x5ebd60['shift']());}}}(a5_0xcea7,0x2eabc));const a5_0x1e564e=(function(){let _0x3567a6=!![];return function(_0x373df1,_0x3488d4){const _0x3185f9=_0x3567a6?function(){const _0x414cb1=a5_0x399c;if(_0x3488d4){const _0x3cbabb=_0x3488d4[_0x414cb1(0xfa)](_0x373df1,arguments);return _0x3488d4=null,_0x3cbabb;}}:function(){};return _0x3567a6=![],_0x3185f9;};}()),a5_0x349b11=a5_0x1e564e(this,function(){const _0x4c811e=a5_0x399c;return a5_0x349b11[_0x4c811e(0x107)]()[_0x4c811e(0xfb)]('(((.+)+)+)+$')[_0x4c811e(0x107)]()['constructor'](a5_0x349b11)[_0x4c811e(0xfb)]('(((.+)+)+)+$');});a5_0x349b11();'use strict';Object[a5_0x2bb7e7(0xfd)](exports,'__esModule',{'value':!![]}),exports['OmitDto']=exports[a5_0x2bb7e7(0x108)]=void 0x0;const core_1=require(a5_0x2bb7e7(0x104)),interface_1=require(a5_0x2bb7e7(0x106));function PickDto(_0x525b90,_0x12160b){const _0x1465d7=a5_0x2bb7e7,_0x22a901=function(){};_0x22a901[_0x1465d7(0x10c)]=_0x525b90[_0x1465d7(0x10c)];const _0x1c09ab=(0x0,core_1[_0x1465d7(0x102)])(interface_1['RULES_KEY'],_0x525b90),_0x5ab69c={};for(const _0x46ef84 of _0x12160b){_0x1c09ab[_0x46ef84]&&(_0x5ab69c[_0x46ef84]=_0x1c09ab[_0x46ef84]);}return(0x0,core_1['saveClassMetadata'])(interface_1[_0x1465d7(0xfc)],_0x5ab69c,_0x22a901),_0x22a901;}function a5_0xcea7(){const _0x10a3eb=['952991sXmsAW','@midwayjs/core','14IfPSoe','../interface','toString','PickDto','356991UvhsxT','7hyxeOc','41508GlKaKu','prototype','1775965pWmLBY','724440JYaFKP','assign','6tFjTob','27RZdQlJ','180YbjVZI','apply','search','RULES_KEY','defineProperty','152669EapcEY','848584LtahTT','105XmNmBp','2POwyQS','getClassExtendedMetadata'];a5_0xcea7=function(){return _0x10a3eb;};return a5_0xcea7();}exports[a5_0x2bb7e7(0x108)]=PickDto;function OmitDto(_0x169f18,_0x2f3b32){const _0x107cf2=a5_0x2bb7e7,_0x3ce494=function(){};_0x3ce494[_0x107cf2(0x10c)]=_0x169f18[_0x107cf2(0x10c)];const _0x7b2336=(0x0,core_1[_0x107cf2(0x102)])(interface_1[_0x107cf2(0xfc)],_0x169f18),_0x5d640f=Object[_0x107cf2(0xf6)]({},_0x7b2336);for(const _0x5a0592 of _0x2f3b32){delete _0x5d640f[_0x5a0592];}return(0x0,core_1['saveClassMetadata'])(interface_1[_0x107cf2(0xfc)],_0x5d640f,_0x3ce494),_0x3ce494;}exports['OmitDto']=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x2c91f5=a6_0x28c7;function a6_0x1279(){var _0x4f3888=['apply','Configuration','598956zIvyCN','constructor','./service/ValidatorService','ValidatorError','ValidatorService','toString','./interface','962892ewGqMA','call','defineProperty','configurable','(((.+)+)+)+$','writable','661245mswVkU','CustomConfiguration','Validator','./exception/ValidatorError','RuleType','./helper/dtoHelper','1911972YWhevM','hasOwnProperty','prototype','get','Rule','__createBinding','831460omwPDE','./configuration','__exportStar','2714106cRQDIB','2410338lwFMKF','search'];a6_0x1279=function(){return _0x4f3888;};return a6_0x1279();}(function(_0x1ac29a,_0x22d0f0){var _0x5027cd=a6_0x28c7,_0x520e12=_0x1ac29a();while(!![]){try{var _0x2fa688=parseInt(_0x5027cd(0xaf))/0x1+-parseInt(_0x5027cd(0xb6))/0x2+-parseInt(_0x5027cd(0xbc))/0x3+parseInt(_0x5027cd(0xa1))/0x4+-parseInt(_0x5027cd(0xa7))/0x5+parseInt(_0x5027cd(0xaa))/0x6+-parseInt(_0x5027cd(0xab))/0x7;if(_0x2fa688===_0x22d0f0)break;else _0x520e12['push'](_0x520e12['shift']());}catch(_0x4b82ad){_0x520e12['push'](_0x520e12['shift']());}}}(a6_0x1279,0x4d58d));var a6_0x47f0ad=(function(){var _0x4c7c68=!![];return function(_0x1d25d3,_0x345971){var _0xf56838=_0x4c7c68?function(){var _0x52e2d6=a6_0x28c7;if(_0x345971){var _0x195b8d=_0x345971[_0x52e2d6(0xad)](_0x1d25d3,arguments);return _0x345971=null,_0x195b8d;}}:function(){};return _0x4c7c68=![],_0xf56838;};}()),a6_0x1f2f76=a6_0x47f0ad(this,function(){var _0x1d7c21=a6_0x28c7;return a6_0x1f2f76['toString']()['search'](_0x1d7c21(0xba))[_0x1d7c21(0xb4)]()[_0x1d7c21(0xb0)](a6_0x1f2f76)[_0x1d7c21(0xac)](_0x1d7c21(0xba));});a6_0x1f2f76();'use strict';var __createBinding=this&&this[a6_0x2c91f5(0xa6)]||(Object['create']?function(_0x5b016d,_0x3de8fb,_0x33bfc7,_0x3aae96){var _0x242ace=a6_0x2c91f5;if(_0x3aae96===undefined)_0x3aae96=_0x33bfc7;var _0x332574=Object['getOwnPropertyDescriptor'](_0x3de8fb,_0x33bfc7);(!_0x332574||(_0x242ace(0xa4)in _0x332574?!_0x3de8fb['__esModule']:_0x332574[_0x242ace(0xbb)]||_0x332574[_0x242ace(0xb9)]))&&(_0x332574={'enumerable':!![],'get':function(){return _0x3de8fb[_0x33bfc7];}}),Object[_0x242ace(0xb8)](_0x5b016d,_0x3aae96,_0x332574);}:function(_0x11a5c3,_0x9b828d,_0x2a6c35,_0x2c08de){if(_0x2c08de===undefined)_0x2c08de=_0x2a6c35;_0x11a5c3[_0x2c08de]=_0x9b828d[_0x2a6c35];}),__exportStar=this&&this[a6_0x2c91f5(0xa9)]||function(_0x38f0b4,_0x29fd43){var _0x6020b7=a6_0x2c91f5;for(var _0x17c684 in _0x38f0b4)if(_0x17c684!=='default'&&!Object[_0x6020b7(0xa3)][_0x6020b7(0xa2)][_0x6020b7(0xb7)](_0x29fd43,_0x17c684))__createBinding(_0x29fd43,_0x38f0b4,_0x17c684);};Object[a6_0x2c91f5(0xb8)](exports,'__esModule',{'value':!![]}),exports[a6_0x2c91f5(0xae)]=exports['ValidatorService']=exports['ValidatorError']=exports[a6_0x2c91f5(0x9f)]=exports['Rule']=exports[a6_0x2c91f5(0xbe)]=void 0x0,__exportStar(require(a6_0x2c91f5(0xb5)),exports),__exportStar(require(a6_0x2c91f5(0xa0)),exports);var Validator_1=require('./decorator/Validator');Object[a6_0x2c91f5(0xb8)](exports,a6_0x2c91f5(0xbe),{'enumerable':!![],'get':function(){var _0x4e13ff=a6_0x2c91f5;return Validator_1[_0x4e13ff(0xbe)];}});var Rule_1=require('./decorator/Rule');Object['defineProperty'](exports,'Rule',{'enumerable':!![],'get':function(){var _0x2302c1=a6_0x2c91f5;return Rule_1[_0x2302c1(0xa5)];}}),Object['defineProperty'](exports,a6_0x2c91f5(0x9f),{'enumerable':!![],'get':function(){return Rule_1['RuleType'];}});var ValidatorError_1=require(a6_0x2c91f5(0x9e));function a6_0x28c7(_0x16a3e1,_0x7e5493){var _0x222a64=a6_0x1279();return a6_0x28c7=function(_0x1f2f76,_0x47f0ad){_0x1f2f76=_0x1f2f76-0x9e;var _0x1279de=_0x222a64[_0x1f2f76];return _0x1279de;},a6_0x28c7(_0x16a3e1,_0x7e5493);}Object['defineProperty'](exports,a6_0x2c91f5(0xb2),{'enumerable':!![],'get':function(){var _0x4d6dab=a6_0x2c91f5;return ValidatorError_1[_0x4d6dab(0xb2)];}});var ValidatorService_1=require(a6_0x2c91f5(0xb1));Object[a6_0x2c91f5(0xb8)](exports,a6_0x2c91f5(0xb3),{'enumerable':!![],'get':function(){var _0x2cfe3d=a6_0x2c91f5;return ValidatorService_1[_0x2cfe3d(0xb3)];}});var configuration_1=require(a6_0x2c91f5(0xa8));Object['defineProperty'](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x2c16db=a6_0x2c91f5;return configuration_1[_0x2c16db(0xbd)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x454837=a7_0x32e7;(function(_0x140642,_0x270a31){var _0x46e6e=a7_0x32e7,_0x5c95c9=_0x140642();while(!![]){try{var _0x3df703=-parseInt(_0x46e6e(0x1a2))/0x1*(-parseInt(_0x46e6e(0x193))/0x2)+parseInt(_0x46e6e(0x19b))/0x3+parseInt(_0x46e6e(0x190))/0x4+parseInt(_0x46e6e(0x199))/0x5+parseInt(_0x46e6e(0x19c))/0x6*(-parseInt(_0x46e6e(0x19f))/0x7)+-parseInt(_0x46e6e(0x191))/0x8*(parseInt(_0x46e6e(0x195))/0x9)+-parseInt(_0x46e6e(0x19d))/0xa*(parseInt(_0x46e6e(0x197))/0xb);if(_0x3df703===_0x270a31)break;else _0x5c95c9['push'](_0x5c95c9['shift']());}catch(_0x4650bb){_0x5c95c9['push'](_0x5c95c9['shift']());}}}(a7_0x2cbb,0x257b1));var a7_0x4dedc4=(function(){var _0x242761=!![];return function(_0xcb453d,_0xfe5e5a){var _0x25b64e=_0x242761?function(){var _0x153bfb=a7_0x32e7;if(_0xfe5e5a){var _0x22f645=_0xfe5e5a[_0x153bfb(0x1a0)](_0xcb453d,arguments);return _0xfe5e5a=null,_0x22f645;}}:function(){};return _0x242761=![],_0x25b64e;};}()),a7_0x20539e=a7_0x4dedc4(this,function(){var _0x27ae1f=a7_0x32e7;return a7_0x20539e[_0x27ae1f(0x196)]()[_0x27ae1f(0x19a)]('(((.+)+)+)+$')[_0x27ae1f(0x196)]()[_0x27ae1f(0x1a1)](a7_0x20539e)[_0x27ae1f(0x19a)](_0x27ae1f(0x1a3));});a7_0x20539e();'use strict';Object['defineProperty'](exports,a7_0x454837(0x192),{'value':!![]}),exports[a7_0x454837(0x194)]=exports[a7_0x454837(0x19e)]=void 0x0,exports[a7_0x454837(0x19e)]='anncic-api:validator:rules',exports[a7_0x454837(0x194)]=a7_0x454837(0x198);function a7_0x32e7(_0x20304b,_0x24a19e){var _0x309095=a7_0x2cbb();return a7_0x32e7=function(_0x20539e,_0x4dedc4){_0x20539e=_0x20539e-0x190;var _0x2cbbb6=_0x309095[_0x20539e];return _0x2cbbb6;},a7_0x32e7(_0x20304b,_0x24a19e);}function a7_0x2cbb(){var _0x4f3afa=['search','609003bRscMc','8130wiOqwh','1110040yVfHTK','RULES_KEY','1463ZJlKsX','apply','constructor','1QiPazC','(((.+)+)+)+$','696848iMnxHn','234664BuFCPU','__esModule','372236NdGgCK','VALIDATOR_KEY','45IMKXbH','toString','22XerKIq','anncic-api:validator:validator','1210290numfHw'];a7_0x2cbb=function(){return _0x4f3afa;};return a7_0x2cbb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a8_0x2170(_0xbd8278,_0x1839b0){const _0x1eec53=a8_0x5c3b();return a8_0x2170=function(_0x54c369,_0x513e75){_0x54c369=_0x54c369-0x175;let _0x5c3ba5=_0x1eec53[_0x54c369];return _0x5c3ba5;},a8_0x2170(_0xbd8278,_0x1839b0);}const a8_0x5df0f3=a8_0x2170;(function(_0x1745b4,_0x5465ca){const _0x4ffd93=a8_0x2170,_0x2d9d55=_0x1745b4();while(!![]){try{const _0x18feac=parseInt(_0x4ffd93(0x198))/0x1*(-parseInt(_0x4ffd93(0x191))/0x2)+parseInt(_0x4ffd93(0x17e))/0x3+parseInt(_0x4ffd93(0x1a8))/0x4+-parseInt(_0x4ffd93(0x186))/0x5+parseInt(_0x4ffd93(0x185))/0x6+-parseInt(_0x4ffd93(0x1b2))/0x7+-parseInt(_0x4ffd93(0x18f))/0x8*(-parseInt(_0x4ffd93(0x19c))/0x9);if(_0x18feac===_0x5465ca)break;else _0x2d9d55['push'](_0x2d9d55['shift']());}catch(_0x330ed7){_0x2d9d55['push'](_0x2d9d55['shift']());}}}(a8_0x5c3b,0x73379));const a8_0x513e75=(function(){let _0x1ac0ba=!![];return function(_0x120be5,_0x543f03){const _0x81ccbe=_0x1ac0ba?function(){const _0xf85ea5=a8_0x2170;if(_0x543f03){const _0x559c6c=_0x543f03[_0xf85ea5(0x196)](_0x120be5,arguments);return _0x543f03=null,_0x559c6c;}}:function(){};return _0x1ac0ba=![],_0x81ccbe;};}()),a8_0x54c369=a8_0x513e75(this,function(){const _0x28e643=a8_0x2170;return a8_0x54c369[_0x28e643(0x1af)]()[_0x28e643(0x190)](_0x28e643(0x199))[_0x28e643(0x1af)]()[_0x28e643(0x19b)](a8_0x54c369)[_0x28e643(0x190)]('(((.+)+)+)+$');});a8_0x54c369();'use strict';var __decorate=this&&this[a8_0x5df0f3(0x17a)]||function(_0x5ee34,_0x3d4f1b,_0x4fdc08,_0x4b0fdd){const _0x3d0d61=a8_0x5df0f3;var _0x34627f=arguments[_0x3d0d61(0x19d)],_0x49f841=_0x34627f<0x3?_0x3d4f1b:_0x4b0fdd===null?_0x4b0fdd=Object['getOwnPropertyDescriptor'](_0x3d4f1b,_0x4fdc08):_0x4b0fdd,_0x5632d4;if(typeof Reflect===_0x3d0d61(0x1a4)&&typeof Reflect[_0x3d0d61(0x1b4)]==='function')_0x49f841=Reflect['decorate'](_0x5ee34,_0x3d4f1b,_0x4fdc08,_0x4b0fdd);else{for(var _0x338518=_0x5ee34[_0x3d0d61(0x19d)]-0x1;_0x338518>=0x0;_0x338518--)if(_0x5632d4=_0x5ee34[_0x338518])_0x49f841=(_0x34627f<0x3?_0x5632d4(_0x49f841):_0x34627f>0x3?_0x5632d4(_0x3d4f1b,_0x4fdc08,_0x49f841):_0x5632d4(_0x3d4f1b,_0x4fdc08))||_0x49f841;}return _0x34627f>0x3&&_0x49f841&&Object[_0x3d0d61(0x1aa)](_0x3d4f1b,_0x4fdc08,_0x49f841),_0x49f841;},__metadata=this&&this['__metadata']||function(_0x1c6296,_0x51f8c5){const _0x2d6d4e=a8_0x5df0f3;if(typeof Reflect===_0x2d6d4e(0x1a4)&&typeof Reflect['metadata']==='function')return Reflect[_0x2d6d4e(0x1ab)](_0x1c6296,_0x51f8c5);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ValidatorService']=void 0x0;const Joi=require('joi'),i18n_1=require(a8_0x5df0f3(0x181)),core_1=require(a8_0x5df0f3(0x197)),interface_1=require(a8_0x5df0f3(0x1ad)),ValidatorError_1=require('../exception/ValidatorError');let ValidatorService=class ValidatorService{constructor(){const _0x58b4d6=a8_0x5df0f3;this[_0x58b4d6(0x18b)]={};}async[a8_0x5df0f3(0x1a3)](){const _0x5d11c2=a8_0x5df0f3,_0x5f2ae9=Object[_0x5d11c2(0x187)](this[_0x5d11c2(0x1a2)]['localeTable']);_0x5f2ae9['forEach'](_0x250ef8=>{const _0x5ca28c=_0x5d11c2;this[_0x5ca28c(0x18b)][(0x0,i18n_1[_0x5ca28c(0x184)])(_0x250ef8)]=Object['fromEntries'](this[_0x5ca28c(0x1ac)][_0x5ca28c(0x179)](_0x250ef8,'validator'));});}['getSchema'](_0x275598){const _0x5935c2=a8_0x5df0f3,_0x57d6c1=(0x0,core_1[_0x5935c2(0x18d)])(interface_1[_0x5935c2(0x195)],_0x275598);return _0x57d6c1?Joi[_0x5935c2(0x1a4)](_0x57d6c1):undefined;}[a8_0x5df0f3(0x177)](_0x2dfeba,_0x21c6ee,_0x1250c0={}){const _0x1547d7=a8_0x5df0f3;var _0x3f8dd2,_0x5a67d1,_0x2eef27,_0x28b76e,_0xb651c3,_0x396b71;const _0x16e2c7=Joi[_0x1547d7(0x19e)](_0x2dfeba)?_0x2dfeba:this['getSchema'](_0x2dfeba);if(!_0x16e2c7)throw new AnnError(ValidatorError_1[_0x1547d7(0x18e)][_0x1547d7(0x1a7)]);_0x1250c0[_0x1547d7(0x192)]=Object[_0x1547d7(0x1b0)]((_0x3f8dd2=this['validatorConfig'][_0x1547d7(0x192)])!==null&&_0x3f8dd2!==void 0x0?_0x3f8dd2:{},{'messages':this[_0x1547d7(0x18b)]},_0x1250c0['validationOptions']||{}),_0x1250c0[_0x1547d7(0x192)]['errors']=_0x1250c0['validationOptions'][_0x1547d7(0x1a6)]||{},_0x1250c0[_0x1547d7(0x192)][_0x1547d7(0x1a6)][_0x1547d7(0x18a)]=(0x0,i18n_1[_0x1547d7(0x184)])(this[_0x1547d7(0x1ac)]['getAvailableLocale'](_0x1250c0[_0x1547d7(0x192)][_0x1547d7(0x1a6)]['language']||_0x1250c0[_0x1547d7(0x1a5)]||this[_0x1547d7(0x1a2)]['defaultLocale'],_0x1547d7(0x177)));const _0x2671f3=_0x16e2c7[_0x1547d7(0x175)](_0x21c6ee,_0x1250c0[_0x1547d7(0x192)]);if(_0x2671f3===null||_0x2671f3===void 0x0?void 0x0:_0x2671f3['error']){if(_0x2671f3[_0x1547d7(0x1a1)]instanceof AnnError)throw _0x2671f3['error'];else{if(_0x2671f3[_0x1547d7(0x1a1)]instanceof Error)throw new AnnError(ValidatorError_1[_0x1547d7(0x18e)][_0x1547d7(0x19a)],{'message':((_0x5a67d1=_0x2671f3['error'])===null||_0x5a67d1===void 0x0?void 0x0:_0x5a67d1[_0x1547d7(0x189)])||_0x1547d7(0x17f)});else throw new AnnError(ValidatorError_1['ValidatorError'][_0x1547d7(0x19a)],{'message':((_0xb651c3=(_0x28b76e=(_0x2eef27=_0x2671f3[_0x1547d7(0x1a1)])===null||_0x2eef27===void 0x0?void 0x0:_0x2eef27['details'])===null||_0x28b76e===void 0x0?void 0x0:_0x28b76e[0x0])===null||_0xb651c3===void 0x0?void 0x0:_0xb651c3[_0x1547d7(0x189)])||'参数验证失败'});}}if(_0x2671f3===null||_0x2671f3===void 0x0?void 0x0:_0x2671f3[_0x1547d7(0x17d)]){const _0x41decc=(_0x396b71=_0x16e2c7===null||_0x16e2c7===void 0x0?void 0x0:_0x16e2c7['$_terms'])===null||_0x396b71===void 0x0?void 0x0:_0x396b71[_0x1547d7(0x187)],_0xff556c=function(_0x1479aa,_0x3ae179){const _0x20bac=_0x1547d7;var _0x17e61b,_0x4323d7,_0x1b2b3e,_0x868df2,_0x334cf6,_0x3b5736,_0x1108e4,_0x1d8e19,_0x5b9570,_0x2f666a,_0xbdb052;for(let _0x3f6376 in _0x1479aa){if(_0x3ae179[(_0x17e61b=_0x1479aa[_0x3f6376])===null||_0x17e61b===void 0x0?void 0x0:_0x17e61b[_0x20bac(0x180)]]&&((_0x1b2b3e=(_0x4323d7=_0x1479aa[_0x3f6376])===null||_0x4323d7===void 0x0?void 0x0:_0x4323d7['schema'])===null||_0x1b2b3e===void 0x0?void 0x0:_0x1b2b3e[_0x20bac(0x176)])){if(((_0x334cf6=(_0x868df2=_0x1479aa[_0x3f6376])===null||_0x868df2===void 0x0?void 0x0:_0x868df2[_0x20bac(0x19f)])===null||_0x334cf6===void 0x0?void 0x0:_0x334cf6[_0x20bac(0x176)])==_0x20bac(0x1a4))_0x3ae179[_0x1479aa[_0x3f6376][_0x20bac(0x180)]]=_0xff556c((_0x1108e4=(_0x3b5736=_0x1479aa[_0x3f6376])===null||_0x3b5736===void 0x0?void 0x0:_0x3b5736['schema']['$_terms'])===null||_0x1108e4===void 0x0?void 0x0:_0x1108e4[_0x20bac(0x187)],_0x3ae179[_0x1479aa[_0x3f6376][_0x20bac(0x180)]]);else{if(_0x1479aa[_0x3f6376][_0x20bac(0x19f)]['type']==_0x20bac(0x178)&&_0x2671f3['value'][(_0x1d8e19=_0x1479aa[_0x3f6376])===null||_0x1d8e19===void 0x0?void 0x0:_0x1d8e19['key']]){const _0x71884c=((_0xbdb052=(_0x2f666a=(_0x5b9570=_0x1479aa[_0x3f6376])===null||_0x5b9570===void 0x0?void 0x0:_0x5b9570[_0x20bac(0x19f)])===null||_0x2f666a===void 0x0?void 0x0:_0x2f666a['_flags'])===null||_0xbdb052===void 0x0?void 0x0:_0xbdb052[_0x20bac(0x18c)])||_0x20bac(0x188);_0x3ae179[_0x1479aa[_0x3f6376][_0x20bac(0x180)]]=dayjs(_0x2671f3[_0x20bac(0x17d)][_0x1479aa[_0x3f6376]['key']])[_0x20bac(0x18c)](_0x71884c);}}}}return _0x3ae179;};return _0xff556c(_0x41decc,_0x2671f3[_0x1547d7(0x17d)]);}throw new AnnError(ValidatorError_1['ValidatorError'][_0x1547d7(0x19a)]);}};__decorate([(0x0,core_1[a8_0x5df0f3(0x17b)])(a8_0x5df0f3(0x1b1)),__metadata(a8_0x5df0f3(0x1a9),Object)],ValidatorService[a8_0x5df0f3(0x1b3)],a8_0x5df0f3(0x1a2),void 0x0),__decorate([(0x0,core_1[a8_0x5df0f3(0x17b)])('validator'),__metadata(a8_0x5df0f3(0x1a9),Object)],ValidatorService[a8_0x5df0f3(0x1b3)],a8_0x5df0f3(0x182),void 0x0),__decorate([(0x0,core_1[a8_0x5df0f3(0x17c)])(),__metadata(a8_0x5df0f3(0x1a9),i18n_1['MidwayI18nServiceSingleton'])],ValidatorService['prototype'],a8_0x5df0f3(0x1ac),void 0x0),__decorate([(0x0,core_1[a8_0x5df0f3(0x1a0)])(),__metadata('design:type',Function),__metadata('design:paramtypes',[]),__metadata(a8_0x5df0f3(0x194),Promise)],ValidatorService[a8_0x5df0f3(0x1b3)],a8_0x5df0f3(0x1a3),null),ValidatorService=__decorate([(0x0,core_1['Provide'])(a8_0x5df0f3(0x177)),(0x0,core_1['Scope'])(core_1[a8_0x5df0f3(0x1ae)][a8_0x5df0f3(0x193)])],ValidatorService),exports[a8_0x5df0f3(0x183)]=ValidatorService;function a8_0x5c3b(){const _0x127d19=['message','language','messages','format','getClassExtendedMetadata','ValidatorError','2344gNCPDZ','search','369832vuvEUN','validationOptions','Singleton','design:returntype','RULES_KEY','apply','@midwayjs/core','3vlDWJJ','(((.+)+)+)+$','PARAMS','constructor','33426JdIRgp','length','isSchema','schema','Init','error','i18nConfig','init','object','locale','errors','NOFIND_SCHEMA','1312044dXsiPc','design:type','defineProperty','metadata','i18nService','../interface','ScopeEnum','toString','assign','i18n','5437656CslyUX','prototype','decorate','validate','type','validator','date','getLocaleMapping','__decorate','Config','Inject','value','2807010EyhaeY','参数验证失败','key','@midwayjs/i18n','validatorConfig','ValidatorService','formatLocale','755184RtnGfd','3371310uCDmPb','keys','YYYY-MM-DD\x20HH:mm:ss'];a8_0x5c3b=function(){return _0x127d19;};return a8_0x5c3b();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.2",
|
|
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": "^
|
|
20
|
+
"@anncic-api/core": "^3.0.2",
|
|
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": "0b61905449e99fa08d7f245f00f86d4be90a7f12"
|
|
30
30
|
}
|