@anveroapi/validator 4.0.1 → 4.1.1
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
|
-
function
|
|
1
|
+
const a0_0x35e34d=a0_0x32e9;function a0_0x32e9(_0x1b5674,_0x5c142e){_0x1b5674=_0x1b5674-0x1e6;const _0x296eae=a0_0x4bbf();let _0x23edb4=_0x296eae[_0x1b5674];return _0x23edb4;}function a0_0x4bbf(){const _0xefe193=['string','6272670ISxGVd','../../locales/zh_CN.json','622662DmVGIi','15zpKMGF','default','498985vcCKVp','toString','9JzHWML','__esModule','21KHRMqU','search','apply','PARAMS','42732KIGfXL','defineProperty','(((.+)+)+)+$','946032OuNyWv','4741LVhBIA','112616tOqzMb','constructor','48mavpjF','529492cMupZO','ValidatorError'];a0_0x4bbf=function(){return _0xefe193;};return a0_0x4bbf();}(function(_0x1b7acf,_0x2d1e78){const _0x56cef2=a0_0x32e9,_0x50f0f9=_0x1b7acf();while(!![]){try{const _0x2d2ce3=parseInt(_0x56cef2(0x1f5))/0x1+parseInt(_0x56cef2(0x1ed))/0x2*(-parseInt(_0x56cef2(0x1f6))/0x3)+-parseInt(_0x56cef2(0x1f0))/0x4+parseInt(_0x56cef2(0x1f8))/0x5*(parseInt(_0x56cef2(0x1ef))/0x6)+parseInt(_0x56cef2(0x1fc))/0x7*(parseInt(_0x56cef2(0x1eb))/0x8)+parseInt(_0x56cef2(0x1fa))/0x9*(parseInt(_0x56cef2(0x1f3))/0xa)+parseInt(_0x56cef2(0x1ec))/0xb*(-parseInt(_0x56cef2(0x1e8))/0xc);if(_0x2d2ce3===_0x2d1e78)break;else _0x50f0f9['push'](_0x50f0f9['shift']());}catch(_0x33c8b5){_0x50f0f9['push'](_0x50f0f9['shift']());}}}(a0_0x4bbf,0x6eedb));const a0_0x4a9cc5=(function(){let _0x53ec05=!![];return function(_0x534aeb,_0x1cd0ca){const _0x5ab1f0=_0x53ec05?function(){const _0x10dd64=a0_0x32e9;if(_0x1cd0ca){const _0x4203b1=_0x1cd0ca[_0x10dd64(0x1e6)](_0x534aeb,arguments);return _0x1cd0ca=null,_0x4203b1;}}:function(){};return _0x53ec05=![],_0x5ab1f0;};}()),a0_0x23edb4=a0_0x4a9cc5(this,function(){const _0x16a13a=a0_0x32e9;return a0_0x23edb4[_0x16a13a(0x1f9)]()[_0x16a13a(0x1fd)]('(((.+)+)+)+$')['toString']()[_0x16a13a(0x1ee)](a0_0x23edb4)[_0x16a13a(0x1fd)](_0x16a13a(0x1ea));});a0_0x23edb4();'use strict';Object[a0_0x35e34d(0x1e9)](exports,a0_0x35e34d(0x1fb),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');exports[a0_0x35e34d(0x1f7)]={'validator':{'errorStatus':ValidatorError_1[a0_0x35e34d(0x1f1)][a0_0x35e34d(0x1e7)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x35e34d(0x1f2)}},'i18n':{'localeTable':{'en_US':{'validator':require('../../locales/en_US.json')},'zh_CN':{'validator':require(a0_0x35e34d(0x1f4))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x480b17=a1_0x2080;function a1_0x3631(){const _0x20154a=['locale','query','decorator','defineProperty','Inject','ValidatorService','getMethodParamTypes','MidwayDecoratorService','(((.+)+)+)+$','__metadata','metadata','620756ovyZwj','name','MetadataManager','search','propertyName','function','./service/ValidatorService','getOwnMetadata','105290vUGAMb','VALIDATOR_KEY','3654NvukSm','param','prototype','__esModule','request','anvero-api:validator','object','assign','__decorate','methodName','@midwayjs/i18n','target','25398oDVbif','req','Configuration','getOwnPropertyDescriptor','776868kwMinL','toString','registerMethodHandler','getAttr','11580110nRKOjq','find','9544hGWvar','method','args','design:type','decorate','9vbGObh','CustomConfiguration','getSchema','150gTwULj','@anveroapi/core','body','validator','params','I18N_ATTR_KEY','@midwayjs/core','apply','1256416mKxXEY','length'];a1_0x3631=function(){return _0x20154a;};return a1_0x3631();}function a1_0x2080(_0x3849dd,_0x4210a4){_0x3849dd=_0x3849dd-0x93;const _0x59ca83=a1_0x3631();let _0x709185=_0x59ca83[_0x3849dd];return _0x709185;}(function(_0x36998d,_0x308d46){const _0xb998ed=a1_0x2080,_0x17981f=_0x36998d();while(!![]){try{const _0x164b0d=parseInt(_0xb998ed(0xbd))/0x1+-parseInt(_0xb998ed(0xc1))/0x2+parseInt(_0xb998ed(0xcc))/0x3*(-parseInt(_0xb998ed(0xa7))/0x4)+-parseInt(_0xb998ed(0xaf))/0x5*(parseInt(_0xb998ed(0xcf))/0x6)+parseInt(_0xb998ed(0x9a))/0x7+-parseInt(_0xb998ed(0xc7))/0x8*(-parseInt(_0xb998ed(0xb1))/0x9)+parseInt(_0xb998ed(0xc5))/0xa;if(_0x164b0d===_0x308d46)break;else _0x17981f['push'](_0x17981f['shift']());}catch(_0x5856a0){_0x17981f['push'](_0x17981f['shift']());}}}(a1_0x3631,0x71f74));const a1_0x47075c=(function(){let _0x4538cb=!![];return function(_0x150a3b,_0x271992){const _0x2c432b=_0x4538cb?function(){const _0x33ebe9=a1_0x2080;if(_0x271992){const _0x271c12=_0x271992[_0x33ebe9(0x99)](_0x150a3b,arguments);return _0x271992=null,_0x271c12;}}:function(){};return _0x4538cb=![],_0x2c432b;};}()),a1_0x709185=a1_0x47075c(this,function(){const _0x184931=a1_0x2080;return a1_0x709185[_0x184931(0xc2)]()[_0x184931(0xaa)]('(((.+)+)+)+$')[_0x184931(0xc2)]()['constructor'](a1_0x709185)[_0x184931(0xaa)](_0x184931(0xa4));});a1_0x709185();'use strict';var __decorate=this&&this[a1_0x480b17(0xb9)]||function(_0x185e94,_0x211717,_0x341159,_0x474e80){const _0x3c9c19=a1_0x480b17;var _0x3d9c41=arguments[_0x3c9c19(0x9b)],_0x55f9a9=_0x3d9c41<0x3?_0x211717:_0x474e80===null?_0x474e80=Object[_0x3c9c19(0xc0)](_0x211717,_0x341159):_0x474e80,_0x337669;if(typeof Reflect===_0x3c9c19(0xb7)&&typeof Reflect[_0x3c9c19(0xcb)]===_0x3c9c19(0xac))_0x55f9a9=Reflect[_0x3c9c19(0xcb)](_0x185e94,_0x211717,_0x341159,_0x474e80);else{for(var _0x2c4835=_0x185e94['length']-0x1;_0x2c4835>=0x0;_0x2c4835--)if(_0x337669=_0x185e94[_0x2c4835])_0x55f9a9=(_0x3d9c41<0x3?_0x337669(_0x55f9a9):_0x3d9c41>0x3?_0x337669(_0x211717,_0x341159,_0x55f9a9):_0x337669(_0x211717,_0x341159))||_0x55f9a9;}return _0x3d9c41>0x3&&_0x55f9a9&&Object[_0x3c9c19(0x9f)](_0x211717,_0x341159,_0x55f9a9),_0x55f9a9;},__metadata=this&&this[a1_0x480b17(0xa5)]||function(_0x329437,_0x501274){const _0xdf6599=a1_0x480b17;if(typeof Reflect==='object'&&typeof Reflect[_0xdf6599(0xa6)]===_0xdf6599(0xac))return Reflect[_0xdf6599(0xa6)](_0x329437,_0x501274);};Object['defineProperty'](exports,a1_0x480b17(0xb4),{'value':!![]}),exports[a1_0x480b17(0xcd)]=void 0x0;const i18n_1=require('@midwayjs/i18n'),core_1=require(a1_0x480b17(0x98)),core_2=require(a1_0x480b17(0x98)),interface_1=require('./interface'),ValidatorService_1=require(a1_0x480b17(0xad)),i18n=require(a1_0x480b17(0xbb)),anvero=require(a1_0x480b17(0x93)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x539aa6=a1_0x480b17;this[_0x539aa6(0x9e)][_0x539aa6(0xc3)](interface_1[_0x539aa6(0xb0)],_0x1475b4=>{const _0x243bfc=_0x539aa6,_0x1c2d6c=_0x1475b4[_0x243bfc(0xa6)],_0xb96c0e=core_2[_0x243bfc(0xa9)][_0x243bfc(0xa2)](_0x1475b4[_0x243bfc(0xbc)],_0x1475b4[_0x243bfc(0xab)]);return{'before':_0x3d47a9=>{const _0x271d69=_0x243bfc;var _0x53a4cb,_0x4ccc9c,_0x536166,_0x3583b2,_0x1422f4,_0x2898fe,_0x33220f,_0x278fc6,_0x19cb0b,_0x5a17cf,_0x16e383,_0x10db99,_0x33e1ff;const _0x9072e3=_0x3d47a9[_0x271d69(0xbc)][core_1['REQUEST_OBJ_CTX_KEY']],_0x456e22=Object[_0x271d69(0xb8)]({},((_0x53a4cb=_0x9072e3===null||_0x9072e3===void 0x0?void 0x0:_0x9072e3['request'])===null||_0x53a4cb===void 0x0?void 0x0:_0x53a4cb[_0x271d69(0x9d)])||{},((_0x4ccc9c=_0x9072e3===null||_0x9072e3===void 0x0?void 0x0:_0x9072e3[_0x271d69(0xb5)])===null||_0x4ccc9c===void 0x0?void 0x0:_0x4ccc9c[_0x271d69(0x94)])||{}),_0x10f826=(core_2[_0x271d69(0xa9)][_0x271d69(0xae)](interface_1['VALIDATOR_KEY'],_0x3d47a9[_0x271d69(0xbc)])||[])[_0x271d69(0xc6)](_0x5f346e=>_0x5f346e[_0x271d69(0xc8)]==_0x3d47a9[_0x271d69(0xba)]);!(_0x1c2d6c===null||_0x1c2d6c===void 0x0?void 0x0:_0x1c2d6c[_0x271d69(0x9c)])&&_0x9072e3&&_0x9072e3[_0x271d69(0xc4)]&&(_0x1c2d6c[_0x271d69(0x9c)]=_0x9072e3['getAttr'](i18n_1[_0x271d69(0x97)]));for(let _0x22101b=0x0;_0x22101b<_0xb96c0e[_0x271d69(0x9b)];_0x22101b++){const _0x276d90=_0xb96c0e[_0x22101b],_0x1fa756=this[_0x271d69(0xa1)][_0x271d69(0xce)](_0x276d90);if(_0x1fa756){if(typeof _0x3d47a9[_0x271d69(0xc9)][_0x22101b]=='undefined'||((_0x536166=_0x3d47a9[_0x271d69(0xc9)][_0x22101b])===null||_0x536166===void 0x0?void 0x0:_0x536166[_0x271d69(0xb5)])&&((_0x3583b2=_0x3d47a9[_0x271d69(0xc9)][_0x22101b])===null||_0x3583b2===void 0x0?void 0x0:_0x3583b2['res'])&&((_0x1422f4=_0x3d47a9['args'][_0x22101b])===null||_0x1422f4===void 0x0?void 0x0:_0x1422f4[_0x271d69(0xbe)]))_0x3d47a9[_0x271d69(0xc9)][_0x22101b]=_0x456e22;else((_0x2898fe=_0x3d47a9[_0x271d69(0xc9)][_0x22101b])===null||_0x2898fe===void 0x0?void 0x0:_0x2898fe[_0x271d69(0xa8)])=='bound\x20dispatch'&&_0x3d47a9[_0x271d69(0xc9)]['splice'](_0x22101b,0x0,_0x456e22);const _0x54ebcc=this[_0x271d69(0xa1)][_0x271d69(0x95)](_0x1fa756,_0x3d47a9[_0x271d69(0xc9)][_0x22101b],_0x1c2d6c);_0x54ebcc&&(_0x3d47a9[_0x271d69(0xc9)][_0x22101b]=_0x54ebcc);}else{if((_0x10f826===null||_0x10f826===void 0x0?void 0x0:_0x10f826['methodArgs'][_0x22101b])&&((_0x33220f=_0x3d47a9[_0x271d69(0xc9)][_0x22101b])===null||_0x33220f===void 0x0?void 0x0:_0x33220f[_0x271d69(0x96)])&&typeof _0x3d47a9['args'][_0x22101b][_0x271d69(0xb2)]==_0x271d69(0xac)&&((_0x278fc6=_0x9072e3===null||_0x9072e3===void 0x0?void 0x0:_0x9072e3[_0x271d69(0x96)])===null||_0x278fc6===void 0x0?void 0x0:_0x278fc6[_0x10f826['methodArgs'][_0x22101b]]))_0x3d47a9[_0x271d69(0xc9)][_0x22101b]=_0x276d90((_0x19cb0b=_0x9072e3===null||_0x9072e3===void 0x0?void 0x0:_0x9072e3[_0x271d69(0x96)])===null||_0x19cb0b===void 0x0?void 0x0:_0x19cb0b[_0x10f826['methodArgs'][_0x22101b]]);else(_0x10f826===null||_0x10f826===void 0x0?void 0x0:_0x10f826['methodArgs'][_0x22101b])&&((_0x16e383=(_0x5a17cf=_0x3d47a9['args'][_0x22101b])===null||_0x5a17cf===void 0x0?void 0x0:_0x5a17cf['params'])===null||_0x16e383===void 0x0?void 0x0:_0x16e383[_0x10f826['methodArgs'][_0x22101b]])&&(_0x3d47a9['args'][_0x22101b]=(_0x33e1ff=(_0x10db99=_0x3d47a9['args'][_0x22101b])===null||_0x10db99===void 0x0?void 0x0:_0x10db99[_0x271d69(0x96)])===null||_0x33e1ff===void 0x0?void 0x0:_0x33e1ff[_0x10f826['methodArgs'][_0x22101b]]);}}},'afterThrow':(_0x15f6e4,_0x52faa0)=>{throw _0x52faa0;}};});}};exports['CustomConfiguration']=CustomConfiguration,__decorate([(0x0,core_2[a1_0x480b17(0xa0)])(),__metadata(a1_0x480b17(0xca),core_1[a1_0x480b17(0xa3)])],CustomConfiguration[a1_0x480b17(0xb3)],a1_0x480b17(0x9e),void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x480b17(0xca),ValidatorService_1[a1_0x480b17(0xa1)])],CustomConfiguration['prototype'],a1_0x480b17(0xa1),void 0x0),exports[a1_0x480b17(0xcd)]=CustomConfiguration=__decorate([(0x0,core_2[a1_0x480b17(0xbf)])({'imports':[i18n,anvero],'namespace':a1_0x480b17(0xb6),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x500098=a2_0x38f2;(function(_0x1dba1b,_0x4087e4){const _0x99648f=a2_0x38f2,_0x55983b=_0x1dba1b();while(!![]){try{const _0x56e851=parseInt(_0x99648f(0x1de))/0x1*(-parseInt(_0x99648f(0x1cd))/0x2)+-parseInt(_0x99648f(0x1c2))/0x3*(-parseInt(_0x99648f(0x1c5))/0x4)+parseInt(_0x99648f(0x1db))/0x5+parseInt(_0x99648f(0x1ca))/0x6*(parseInt(_0x99648f(0x1d9))/0x7)+-parseInt(_0x99648f(0x1d0))/0x8*(parseInt(_0x99648f(0x1c6))/0x9)+-parseInt(_0x99648f(0x1d4))/0xa+-parseInt(_0x99648f(0x1ce))/0xb*(-parseInt(_0x99648f(0x1bf))/0xc);if(_0x56e851===_0x4087e4)break;else _0x55983b['push'](_0x55983b['shift']());}catch(_0x1baa14){_0x55983b['push'](_0x55983b['shift']());}}}(a2_0x2b71,0x28b37));const a2_0x3c6607=(function(){let _0x3b8e18=!![];return function(_0x2a4f06,_0x715694){const _0x3f1b3=_0x3b8e18?function(){const _0x10afa7=a2_0x38f2;if(_0x715694){const _0x187df7=_0x715694[_0x10afa7(0x1cc)](_0x2a4f06,arguments);return _0x715694=null,_0x187df7;}}:function(){};return _0x3b8e18=![],_0x3f1b3;};}()),a2_0x6079e6=a2_0x3c6607(this,function(){const _0x30814b=a2_0x38f2;return a2_0x6079e6[_0x30814b(0x1c8)]()[_0x30814b(0x1d3)](_0x30814b(0x1ba))[_0x30814b(0x1c8)]()['constructor'](a2_0x6079e6)['search'](_0x30814b(0x1ba));});a2_0x6079e6();'use strict';Object['defineProperty'](exports,a2_0x500098(0x1e0),{'value':!![]}),exports[a2_0x500098(0x1d8)]=void 0x0,exports[a2_0x500098(0x1df)]=Rule;function a2_0x38f2(_0x3d792f,_0x266cb1){_0x3d792f=_0x3d792f-0x1b9;const _0x57b998=a2_0x2b71();let _0x6079e6=_0x57b998[_0x3d792f];return _0x6079e6;}const joi=require(a2_0x500098(0x1c9)),date_1=require(a2_0x500098(0x1e1)),core_1=require(a2_0x500098(0x1c3)),interface_1=require('../interface');function a2_0x2b71(){const _0x9e2b=['search','1236440fYNtXe','transformTypeFromTSDesign','description','default','RuleType','7QeDCzZ','defineMetadata','608855YNuNfQ','RULES_KEY','isSchema','35939gycjTn','Rule','__esModule','@joi/date','array','(((.+)+)+)+$','attachMetadata','keys','object','meta','576RSkYVp','items','label','35838CjYhbn','@midwayjs/core','MetadataManager','48UNdSOY','18NZSqET','getPropertyType','toString','joi','1223730JxDoqC','getOwnMetadata','apply','6BQjZrz','33165QbcCJV','name','862504VqCuci','map','Array'];a2_0x2b71=function(){return _0x9e2b;};return a2_0x2b71();}exports[a2_0x500098(0x1d8)]=joi['extend'](date_1[a2_0x500098(0x1d7)]);function Rule(_0x12cec6,_0x1ca92a,_0x73af83=''){return(_0x5473b9,_0x5918b2)=>{const _0x13387b=a2_0x38f2;var _0x3d6254;if(_0x5918b2)!joi['isSchema'](_0x1ca92a)&&(_0x1ca92a===null||_0x1ca92a===void 0x0?void 0x0:_0x1ca92a[_0x13387b(0x1cf)])&&(_0x1ca92a=joi[_0x13387b(0x1bd)](core_1['MetadataManager']['getOwnMetadata'](interface_1['RULES_KEY'],_0x1ca92a))[_0x13387b(0x1be)]({'id':_0x1ca92a[_0x13387b(0x1cf)]}),core_1['MetadataManager'][_0x13387b(0x1d5)](core_1[_0x13387b(0x1c4)][_0x13387b(0x1c7)](_0x5473b9,_0x5918b2))[_0x13387b(0x1cf)]===_0x13387b(0x1d2)&&(_0x1ca92a=joi[_0x13387b(0x1b9)]()[_0x13387b(0x1c0)](_0x1ca92a))),joi[_0x13387b(0x1dd)](_0x1ca92a)&&(_0x12cec6&&typeof(_0x1ca92a===null||_0x1ca92a===void 0x0?void 0x0:_0x1ca92a[_0x13387b(0x1c1)])=='function'&&(_0x1ca92a=_0x1ca92a[_0x13387b(0x1c1)](_0x12cec6)),_0x73af83&&typeof(_0x1ca92a===null||_0x1ca92a===void 0x0?void 0x0:_0x1ca92a[_0x13387b(0x1d6)])=='function'&&(_0x1ca92a=_0x1ca92a['description'](_0x73af83)),core_1[_0x13387b(0x1c4)][_0x13387b(0x1bb)](interface_1[_0x13387b(0x1dc)],_0x1ca92a,_0x5473b9,_0x5918b2));else{const _0x4afd7e=core_1[_0x13387b(0x1c4)][_0x13387b(0x1cb)](interface_1[_0x13387b(0x1dc)],_0x1ca92a);if(_0x4afd7e){let _0xdae357=(_0x3d6254=core_1[_0x13387b(0x1c4)][_0x13387b(0x1cb)](interface_1[_0x13387b(0x1dc)],_0x5473b9))!==null&&_0x3d6254!==void 0x0?_0x3d6254:{};Object[_0x13387b(0x1bc)](_0x4afd7e)[_0x13387b(0x1d1)](_0x2609a3=>{!_0xdae357[_0x2609a3]&&(_0xdae357[_0x2609a3]=_0x4afd7e[_0x2609a3]);}),core_1['MetadataManager'][_0x13387b(0x1da)](interface_1[_0x13387b(0x1dc)],_0xdae357,_0x5473b9);}}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x5bf43c=a3_0x2206;(function(_0x41335d,_0x2950f7){const _0xc24fd7=a3_0x2206,_0x3de848=_0x41335d();while(!![]){try{const _0x36202d=-parseInt(_0xc24fd7(0x1c9))/0x1*(-parseInt(_0xc24fd7(0x1de))/0x2)+parseInt(_0xc24fd7(0x1dc))/0x3*(-parseInt(_0xc24fd7(0x1d4))/0x4)+parseInt(_0xc24fd7(0x1cc))/0x5+-parseInt(_0xc24fd7(0x1d5))/0x6+parseInt(_0xc24fd7(0x1dd))/0x7+parseInt(_0xc24fd7(0x1cd))/0x8*(-parseInt(_0xc24fd7(0x1c3))/0x9)+parseInt(_0xc24fd7(0x1d9))/0xa;if(_0x36202d===_0x2950f7)break;else _0x3de848['push'](_0x3de848['shift']());}catch(_0x3bc249){_0x3de848['push'](_0x3de848['shift']());}}}(a3_0x4931,0x5152f));const a3_0x34ad3d=(function(){let _0x4525b7=!![];return function(_0x5ceabe,_0x5abe55){const _0x2ad631=_0x4525b7?function(){const _0x4db7a6=a3_0x2206;if(_0x5abe55){const _0x111e24=_0x5abe55[_0x4db7a6(0x1d3)](_0x5ceabe,arguments);return _0x5abe55=null,_0x111e24;}}:function(){};return _0x4525b7=![],_0x2ad631;};}()),a3_0x2fe270=a3_0x34ad3d(this,function(){const _0x4aec2a=a3_0x2206;return a3_0x2fe270['toString']()['search'](_0x4aec2a(0x1ce))['toString']()[_0x4aec2a(0x1cf)](a3_0x2fe270)[_0x4aec2a(0x1c6)](_0x4aec2a(0x1ce));});a3_0x2fe270();function a3_0x4931(){const _0x31cc2e=['2VIVCcb','prototype','@midwayjs/core','2075540qpOPLb','3834840NXgvUe','(((.+)+)+)+$','constructor','getFuncArgs','toString','Validator','apply','1324FYvWXr','3684882RILNlF','slice','../interface','createCustomMethodDecorator','8111080KQcCtu','match','MetadataManager','4548QtKgVI','505183DgzsDX','630016USWiaF','9fseSLV','VALIDATOR_KEY','replace','search','function','indexOf'];a3_0x4931=function(){return _0x31cc2e;};return a3_0x4931();}'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a3_0x5bf43c(0x1d2)]=Validator,exports[a3_0x5bf43c(0x1d0)]=getFuncArgs;const core_1=require(a3_0x5bf43c(0x1cb)),interface_1=require(a3_0x5bf43c(0x1d7));function a3_0x2206(_0x21075f,_0x509e1c){_0x21075f=_0x21075f-0x1c3;const _0x33d494=a3_0x4931();let _0x2fe270=_0x33d494[_0x21075f];return _0x2fe270;}function Validator(_0x66005b={}){return(_0xd6722c,_0x1d0475,_0x386b1f)=>{const _0x7090fe=a3_0x2206,_0x5159b2=getFuncArgs(_0xd6722c[_0x1d0475]);core_1[_0x7090fe(0x1db)]['attachMetadata'](interface_1['VALIDATOR_KEY'],{'method':_0x1d0475,'methodArgs':_0x5159b2},_0xd6722c),core_1['DecoratorManager'][_0x7090fe(0x1d8)](interface_1[_0x7090fe(0x1c4)],_0x66005b)(_0xd6722c,_0x1d0475,_0x386b1f);};}function getFuncArgs(_0x4773e7){const _0x24d53f=a3_0x5bf43c;if(typeof _0x4773e7==_0x24d53f(0x1c7)){const _0x1d64ca=/=>.*$/mg,_0x3b898f=/=[^,)]+/mg,_0x14c79d=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0xa553bb=(_0x4773e7[_0x24d53f(0x1ca)]?_0x4773e7[_0x24d53f(0x1ca)][_0x24d53f(0x1cf)][_0x24d53f(0x1d1)]():_0x4773e7[_0x24d53f(0x1d1)]())['replace'](_0x14c79d,'')[_0x24d53f(0x1c5)](_0x1d64ca,'')[_0x24d53f(0x1c5)](_0x3b898f,''),_0x28367a=_0xa553bb[_0x24d53f(0x1d6)](_0xa553bb[_0x24d53f(0x1c8)]('(')+0x1,_0xa553bb[_0x24d53f(0x1c8)](')'))[_0x24d53f(0x1da)](/([^\s,]+)/g)||[];return _0x28367a;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x15f071=a4_0x440d;(function(_0x4c2ee8,_0x540a){var _0x4880f6=a4_0x440d,_0x2b1c07=_0x4c2ee8();while(!![]){try{var _0x1de929=-parseInt(_0x4880f6(0x18f))/0x1+parseInt(_0x4880f6(0x18e))/0x2*(parseInt(_0x4880f6(0x195))/0x3)+-parseInt(_0x4880f6(0x18a))/0x4+-parseInt(_0x4880f6(0x197))/0x5*(-parseInt(_0x4880f6(0x186))/0x6)+parseInt(_0x4880f6(0x188))/0x7*(-parseInt(_0x4880f6(0x185))/0x8)+parseInt(_0x4880f6(0x199))/0x9*(-parseInt(_0x4880f6(0x18b))/0xa)+parseInt(_0x4880f6(0x183))/0xb;if(_0x1de929===_0x540a)break;else _0x2b1c07['push'](_0x2b1c07['shift']());}catch(_0x2f1610){_0x2b1c07['push'](_0x2b1c07['shift']());}}}(a4_0x4f1f,0xbb835));var a4_0x19a9cc=(function(){var _0x62cace=!![];return function(_0x34a7f5,_0x3defa4){var _0x1e1cc4=_0x62cace?function(){var _0x6711d0=a4_0x440d;if(_0x3defa4){var _0x497153=_0x3defa4[_0x6711d0(0x187)](_0x34a7f5,arguments);return _0x3defa4=null,_0x497153;}}:function(){};return _0x62cace=![],_0x1e1cc4;};}()),a4_0x23895f=a4_0x19a9cc(this,function(){var _0x531908=a4_0x440d;return a4_0x23895f[_0x531908(0x196)]()[_0x531908(0x19a)](_0x531908(0x192))[_0x531908(0x196)]()[_0x531908(0x189)](a4_0x23895f)[_0x531908(0x19a)](_0x531908(0x192));});function a4_0x440d(_0x40dcfb,_0x4c9463){_0x40dcfb=_0x40dcfb-0x17c;var _0x49a2a7=a4_0x4f1f();var _0x23895f=_0x49a2a7[_0x40dcfb];return _0x23895f;}a4_0x23895f();'use strict';var __decorate=this&&this[a4_0x15f071(0x19b)]||function(_0x547aea,_0x3f2ba7,_0x47762a,_0x179b67){var _0x342ee4=a4_0x15f071,_0x4be890=arguments[_0x342ee4(0x180)],_0x4765fd=_0x4be890<0x3?_0x3f2ba7:_0x179b67===null?_0x179b67=Object[_0x342ee4(0x193)](_0x3f2ba7,_0x47762a):_0x179b67,_0x18ecb;if(typeof Reflect===_0x342ee4(0x17d)&&typeof Reflect[_0x342ee4(0x18c)]===_0x342ee4(0x190))_0x4765fd=Reflect['decorate'](_0x547aea,_0x3f2ba7,_0x47762a,_0x179b67);else{for(var _0x12aa35=_0x547aea[_0x342ee4(0x180)]-0x1;_0x12aa35>=0x0;_0x12aa35--)if(_0x18ecb=_0x547aea[_0x12aa35])_0x4765fd=(_0x4be890<0x3?_0x18ecb(_0x4765fd):_0x4be890>0x3?_0x18ecb(_0x3f2ba7,_0x47762a,_0x4765fd):_0x18ecb(_0x3f2ba7,_0x47762a))||_0x4765fd;}return _0x4be890>0x3&&_0x4765fd&&Object[_0x342ee4(0x18d)](_0x3f2ba7,_0x47762a,_0x4765fd),_0x4765fd;},__metadata=this&&this[a4_0x15f071(0x182)]||function(_0x3ec0af,_0x37278d){var _0x356fa9=a4_0x15f071;if(typeof Reflect===_0x356fa9(0x17d)&&typeof Reflect[_0x356fa9(0x17f)]===_0x356fa9(0x190))return Reflect[_0x356fa9(0x17f)](_0x3ec0af,_0x37278d);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a4_0x15f071(0x194)]=void 0x0;function a4_0x4f1f(){var _0x2ffca9=['AnnErrorMsg','object','@anveroapi/core','metadata','length','NOFIND_SCHEMA','__metadata','14345419UjQcOa','参数验证失败','8sNZjNP','918qikFRm','apply','816221hEDqbr','constructor','75928UJcVbK','40onSmrr','decorate','defineProperty','22UWUCIQ','521692dpkTTI','function','PARAMS','(((.+)+)+)+$','getOwnPropertyDescriptor','ValidatorError','102477UjnruS','toString','35060mzarkj','design:type','2986614MJyJfk','search','__decorate'];a4_0x4f1f=function(){return _0x2ffca9;};return a4_0x4f1f();}const core_1=require(a4_0x15f071(0x17e));class ValidatorError extends AnnError{}exports['ValidatorError']=ValidatorError,ValidatorError['PARAMS']=0x18c1e,ValidatorError[a4_0x15f071(0x181)]=0x18c1c,__decorate([(0x0,core_1[a4_0x15f071(0x17c)])('参数验证失败'),__metadata('design:type',Object)],ValidatorError,a4_0x15f071(0x191),void 0x0),__decorate([(0x0,core_1[a4_0x15f071(0x17c)])(a4_0x15f071(0x184)),__metadata(a4_0x15f071(0x198),Object)],ValidatorError,a4_0x15f071(0x181),void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a5_0x39cc(){const _0x4a5ba8=['(((.+)+)+)+$','8uljrqN','apply','OmitDto','RULES_KEY','62EErerA','12lDtIOx','894975KFpIBW','toString','MetadataManager','770787EgHECp','search','73104IcYpHT','./getSchema','getDtoRules','defineMetadata','assign','__esModule','3590JZboFz','9647abUHvr','prototype','419700etyvlw','546WASEaH','constructor','23320JWOmgI'];a5_0x39cc=function(){return _0x4a5ba8;};return a5_0x39cc();}const a5_0x44e1e6=a5_0x2416;(function(_0x110005,_0x3c99bb){const _0xfc649c=a5_0x2416,_0x31f2fa=_0x110005();while(!![]){try{const _0x69e788=parseInt(_0xfc649c(0x1c9))/0x1*(-parseInt(_0xfc649c(0x1c5))/0x2)+parseInt(_0xfc649c(0x1b7))/0x3*(-parseInt(_0xfc649c(0x1b1))/0x4)+parseInt(_0xfc649c(0x1b2))/0x5+parseInt(_0xfc649c(0x1c0))/0x6+-parseInt(_0xfc649c(0x1c1))/0x7*(parseInt(_0xfc649c(0x1c3))/0x8)+-parseInt(_0xfc649c(0x1b5))/0x9+parseInt(_0xfc649c(0x1bd))/0xa*(parseInt(_0xfc649c(0x1be))/0xb);if(_0x69e788===_0x3c99bb)break;else _0x31f2fa['push'](_0x31f2fa['shift']());}catch(_0x19fb33){_0x31f2fa['push'](_0x31f2fa['shift']());}}}(a5_0x39cc,0x2b50f));const a5_0x17e60d=(function(){let _0x64723c=!![];return function(_0x224fd5,_0x538b31){const _0x49370b=_0x64723c?function(){const _0x589940=a5_0x2416;if(_0x538b31){const _0xed7ca0=_0x538b31[_0x589940(0x1c6)](_0x224fd5,arguments);return _0x538b31=null,_0xed7ca0;}}:function(){};return _0x64723c=![],_0x49370b;};}()),a5_0x493c44=a5_0x17e60d(this,function(){const _0x5308d9=a5_0x2416;return a5_0x493c44['toString']()[_0x5308d9(0x1b6)](_0x5308d9(0x1c4))[_0x5308d9(0x1b3)]()[_0x5308d9(0x1c2)](a5_0x493c44)[_0x5308d9(0x1b6)](_0x5308d9(0x1c4));});a5_0x493c44();'use strict';Object['defineProperty'](exports,a5_0x44e1e6(0x1bc),{'value':!![]}),exports['PickDto']=PickDto,exports[a5_0x44e1e6(0x1c7)]=OmitDto;const core_1=require('@midwayjs/core'),interface_1=require('../interface'),getSchema_1=require(a5_0x44e1e6(0x1b8));function a5_0x2416(_0x21af9c,_0x148c47){_0x21af9c=_0x21af9c-0x1b1;const _0x27cb6c=a5_0x39cc();let _0x493c44=_0x27cb6c[_0x21af9c];return _0x493c44;}function PickDto(_0x21461a,_0x36f6e3){const _0x10eaad=a5_0x44e1e6,_0x49d1b5=function(){};_0x49d1b5[_0x10eaad(0x1bf)]=_0x21461a[_0x10eaad(0x1bf)];const _0x369d8b=(0x0,getSchema_1[_0x10eaad(0x1b9)])(_0x21461a),_0x2365fa={};for(const _0x13e6c5 of _0x36f6e3){_0x369d8b[_0x13e6c5]&&(_0x2365fa[_0x13e6c5]=_0x369d8b[_0x13e6c5]);}return core_1[_0x10eaad(0x1b4)][_0x10eaad(0x1ba)](interface_1[_0x10eaad(0x1c8)],_0x2365fa,_0x49d1b5),_0x49d1b5;}function OmitDto(_0x22122e,_0x5cdf13){const _0x3bdf21=a5_0x44e1e6,_0xca12bd=function(){};_0xca12bd['prototype']=_0x22122e[_0x3bdf21(0x1bf)];const _0x5413e1=(0x0,getSchema_1[_0x3bdf21(0x1b9)])(_0x22122e),_0x41cb8d=Object[_0x3bdf21(0x1bb)]({},_0x5413e1);for(const _0x42ac47 of _0x5cdf13){delete _0x41cb8d[_0x42ac47];}return core_1[_0x3bdf21(0x1b4)][_0x3bdf21(0x1ba)](interface_1['RULES_KEY'],_0x41cb8d,_0xca12bd),_0xca12bd;}
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x42d197=a6_0x4c88;(function(_0x2af7dc,_0x2d9cdc){const _0x521bb2=a6_0x4c88,_0x11a120=_0x2af7dc();while(!![]){try{const _0x52186c=-parseInt(_0x521bb2(0xbc))/0x1*(-parseInt(_0x521bb2(0xd2))/0x2)+parseInt(_0x521bb2(0xd6))/0x3*(-parseInt(_0x521bb2(0xcd))/0x4)+-parseInt(_0x521bb2(0xd4))/0x5*(-parseInt(_0x521bb2(0xc9))/0x6)+-parseInt(_0x521bb2(0xc0))/0x7*(-parseInt(_0x521bb2(0xcb))/0x8)+parseInt(_0x521bb2(0xbf))/0x9+parseInt(_0x521bb2(0xd1))/0xa*(parseInt(_0x521bb2(0xc5))/0xb)+-parseInt(_0x521bb2(0xc2))/0xc;if(_0x52186c===_0x2d9cdc)break;else _0x11a120['push'](_0x11a120['shift']());}catch(_0x1ea1a2){_0x11a120['push'](_0x11a120['shift']());}}}(a6_0x3edd,0x8d4a8));const a6_0x5d55ee=(function(){let _0x575e62=!![];return function(_0xb69146,_0x5f3d12){const _0x42ae11=_0x575e62?function(){const _0x3c1fa4=a6_0x4c88;if(_0x5f3d12){const _0x183c54=_0x5f3d12[_0x3c1fa4(0xbe)](_0xb69146,arguments);return _0x5f3d12=null,_0x183c54;}}:function(){};return _0x575e62=![],_0x42ae11;};}()),a6_0x51d1fa=a6_0x5d55ee(this,function(){const _0x36f334=a6_0x4c88;return a6_0x51d1fa[_0x36f334(0xd7)]()[_0x36f334(0xd0)](_0x36f334(0xbb))['toString']()[_0x36f334(0xd3)](a6_0x51d1fa)[_0x36f334(0xd0)]('(((.+)+)+)+$');});a6_0x51d1fa();function a6_0x4c88(_0xfd0cd2,_0x32ce41){_0xfd0cd2=_0xfd0cd2-0xbb;const _0x4119e8=a6_0x3edd();let _0x51d1fa=_0x4119e8[_0xfd0cd2];return _0x51d1fa;}'use strict';Object['defineProperty'](exports,a6_0x42d197(0xcf),{'value':!![]}),exports[a6_0x42d197(0xce)]=getDtoRules,exports[a6_0x42d197(0xca)]=getSchema;const Joi=require('joi'),core_1=require(a6_0x42d197(0xc3)),interface_1=require('../interface');function getDtoRules(_0x388fd7){const _0x323785=a6_0x42d197,_0x464421=core_1[_0x323785(0xc6)][_0x323785(0xd9)](interface_1[_0x323785(0xcc)],_0x388fd7);if(_0x464421!==undefined)return _0x464421;return Object[_0x323785(0xd8)](Object[_0x323785(0xc4)](core_1[_0x323785(0xc6)][_0x323785(0xbd)](interface_1[_0x323785(0xcc)],_0x388fd7))[_0x323785(0xc7)](([_0x246635,_0x2ccdad])=>[_0x246635,Array[_0x323785(0xc8)](_0x2ccdad)&&_0x2ccdad[_0x323785(0xd5)]?_0x2ccdad[_0x2ccdad[_0x323785(0xd5)]-0x1]:_0x2ccdad]));}function getSchema(_0x2ae645){const _0x3db5d0=a6_0x42d197,_0x441726=getDtoRules(_0x2ae645);if(_0x441726)return Joi[_0x3db5d0(0xc1)](_0x441726);}function a6_0x3edd(){const _0x52a298=['entries','197681wBxlsn','MetadataManager','map','isArray','2769630OusVuB','getSchema','8Ifbunt','RULES_KEY','14920LcAVZj','getDtoRules','__esModule','search','430QYppyx','4rdIMhq','constructor','5QiWcsM','length','9GNgHhR','toString','fromEntries','getMetadata','(((.+)+)+)+$','42305sMksKf','getPropertiesWithMetadata','apply','3490668jKtVXQ','6589051pptwSc','object','24698340JiKpWf','@midwayjs/core'];a6_0x3edd=function(){return _0x52a298;};return a6_0x3edd();}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x54026c=a7_0x5686;(function(_0x4fca79,_0x42c3c7){var _0x594119=a7_0x5686,_0x5d1728=_0x4fca79();while(!![]){try{var _0x4df76c=-parseInt(_0x594119(0x1cc))/0x1*(parseInt(_0x594119(0x1e5))/0x2)+-parseInt(_0x594119(0x1e4))/0x3*(parseInt(_0x594119(0x1ed))/0x4)+parseInt(_0x594119(0x1e7))/0x5+parseInt(_0x594119(0x1e0))/0x6+parseInt(_0x594119(0x1d3))/0x7+parseInt(_0x594119(0x1df))/0x8*(parseInt(_0x594119(0x1d7))/0x9)+parseInt(_0x594119(0x1d1))/0xa*(-parseInt(_0x594119(0x1db))/0xb);if(_0x4df76c===_0x42c3c7)break;else _0x5d1728['push'](_0x5d1728['shift']());}catch(_0x376b8c){_0x5d1728['push'](_0x5d1728['shift']());}}}(a7_0x41c3,0x4de94));var a7_0x17f45d=(function(){var _0x206e86=!![];return function(_0x507c2a,_0x263f8d){var _0x43999b=_0x206e86?function(){if(_0x263f8d){var _0x1ad29d=_0x263f8d['apply'](_0x507c2a,arguments);return _0x263f8d=null,_0x1ad29d;}}:function(){};return _0x206e86=![],_0x43999b;};}()),a7_0x331d56=a7_0x17f45d(this,function(){var _0x4ef3ab=a7_0x5686;return a7_0x331d56[_0x4ef3ab(0x1de)]()[_0x4ef3ab(0x1ee)]('(((.+)+)+)+$')[_0x4ef3ab(0x1de)]()[_0x4ef3ab(0x1ca)](a7_0x331d56)['search'](_0x4ef3ab(0x1d2));});a7_0x331d56();'use strict';var __createBinding=this&&this[a7_0x54026c(0x1dc)]||(Object['create']?function(_0x5dc19a,_0x5db4e1,_0x36e353,_0x286897){var _0x337e3e=a7_0x54026c;if(_0x286897===undefined)_0x286897=_0x36e353;var _0x244640=Object['getOwnPropertyDescriptor'](_0x5db4e1,_0x36e353);(!_0x244640||('get'in _0x244640?!_0x5db4e1[_0x337e3e(0x1e8)]:_0x244640[_0x337e3e(0x1dd)]||_0x244640[_0x337e3e(0x1eb)]))&&(_0x244640={'enumerable':!![],'get':function(){return _0x5db4e1[_0x36e353];}}),Object['defineProperty'](_0x5dc19a,_0x286897,_0x244640);}:function(_0x1179fb,_0x49e674,_0x469de0,_0x116e2e){if(_0x116e2e===undefined)_0x116e2e=_0x469de0;_0x1179fb[_0x116e2e]=_0x49e674[_0x469de0];}),__exportStar=this&&this[a7_0x54026c(0x1ef)]||function(_0x3776ce,_0x5c8d04){var _0x1df777=a7_0x54026c;for(var _0x4f90ca in _0x3776ce)if(_0x4f90ca!=='default'&&!Object[_0x1df777(0x1e9)][_0x1df777(0x1e6)][_0x1df777(0x1d5)](_0x5c8d04,_0x4f90ca))__createBinding(_0x5c8d04,_0x3776ce,_0x4f90ca);};Object[a7_0x54026c(0x1e1)](exports,'__esModule',{'value':!![]}),exports['Configuration']=exports[a7_0x54026c(0x1d9)]=exports['ValidatorError']=exports[a7_0x54026c(0x1d6)]=exports[a7_0x54026c(0x1cd)]=exports[a7_0x54026c(0x1da)]=void 0x0,__exportStar(require(a7_0x54026c(0x1d0)),exports),__exportStar(require(a7_0x54026c(0x1e2)),exports),__exportStar(require(a7_0x54026c(0x1cb)),exports);var Validator_1=require('./decorator/Validator');Object[a7_0x54026c(0x1e1)](exports,a7_0x54026c(0x1da),{'enumerable':!![],'get':function(){var _0x5e7e36=a7_0x54026c;return Validator_1[_0x5e7e36(0x1da)];}});var Rule_1=require(a7_0x54026c(0x1d4));Object[a7_0x54026c(0x1e1)](exports,a7_0x54026c(0x1cd),{'enumerable':!![],'get':function(){var _0x250dcb=a7_0x54026c;return Rule_1[_0x250dcb(0x1cd)];}}),Object['defineProperty'](exports,'RuleType',{'enumerable':!![],'get':function(){return Rule_1['RuleType'];}});var ValidatorError_1=require(a7_0x54026c(0x1e3));Object[a7_0x54026c(0x1e1)](exports,'ValidatorError',{'enumerable':!![],'get':function(){var _0x18bd5a=a7_0x54026c;return ValidatorError_1[_0x18bd5a(0x1ea)];}});var ValidatorService_1=require(a7_0x54026c(0x1ce));function a7_0x41c3(){var _0x3bb2e=['writable','toString','1133304PQRFYA','1753548YPWFaJ','defineProperty','./helper/dtoHelper','./exception/ValidatorError','3fUiMaN','3208vDAyxf','hasOwnProperty','307870okgFAD','__esModule','prototype','ValidatorError','configurable','Configuration','859244yukQLI','search','__exportStar','constructor','./helper/getSchema','113ZrFnmZ','Rule','./service/ValidatorService','CustomConfiguration','./interface','370OUkWYs','(((.+)+)+)+$','1567440OqNyRy','./decorator/Rule','call','RuleType','18zMvfqI','./configuration','ValidatorService','Validator','43373vvMRLS','__createBinding'];a7_0x41c3=function(){return _0x3bb2e;};return a7_0x41c3();}Object['defineProperty'](exports,a7_0x54026c(0x1d9),{'enumerable':!![],'get':function(){var _0x5516f7=a7_0x54026c;return ValidatorService_1[_0x5516f7(0x1d9)];}});function a7_0x5686(_0x4aa65b,_0x40bd0d){_0x4aa65b=_0x4aa65b-0x1ca;var _0x481be7=a7_0x41c3();var _0x331d56=_0x481be7[_0x4aa65b];return _0x331d56;}var configuration_1=require(a7_0x54026c(0x1d8));Object[a7_0x54026c(0x1e1)](exports,a7_0x54026c(0x1ec),{'enumerable':!![],'get':function(){var _0x1899bf=a7_0x54026c;return configuration_1[_0x1899bf(0x1cf)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a8_0x3e8c78=a8_0x2148;(function(_0x2e4279,_0x1bdf4c){var _0x46f06e=a8_0x2148,_0x3bd393=_0x2e4279();while(!![]){try{var _0x3e9f35=-parseInt(_0x46f06e(0xdf))/0x1*(parseInt(_0x46f06e(0xe2))/0x2)+-parseInt(_0x46f06e(0xe0))/0x3+-parseInt(_0x46f06e(0xea))/0x4+parseInt(_0x46f06e(0xdd))/0x5+parseInt(_0x46f06e(0xeb))/0x6+-parseInt(_0x46f06e(0xe7))/0x7+-parseInt(_0x46f06e(0xed))/0x8*(-parseInt(_0x46f06e(0xde))/0x9);if(_0x3e9f35===_0x1bdf4c)break;else _0x3bd393['push'](_0x3bd393['shift']());}catch(_0x235302){_0x3bd393['push'](_0x3bd393['shift']());}}}(a8_0x47d5,0xdd16d));function a8_0x47d5(){var _0xe10747=['17812orFvzH','anvero-api:validator:validator','constructor','apply','search','6357113NERcxh','VALIDATOR_KEY','(((.+)+)+)+$','6813604dDDLCU','2137746OshNwC','toString','8896456bLjTeo','3605405HVgXtz','27nkIQaK','93KORrpw','204432AaRDzu','RULES_KEY'];a8_0x47d5=function(){return _0xe10747;};return a8_0x47d5();}var a8_0x1e4776=(function(){var _0x4caa98=!![];return function(_0x39ef4e,_0x4553f2){var _0x1c09e4=_0x4caa98?function(){var _0x38b762=a8_0x2148;if(_0x4553f2){var _0x102e6b=_0x4553f2[_0x38b762(0xe5)](_0x39ef4e,arguments);return _0x4553f2=null,_0x102e6b;}}:function(){};return _0x4caa98=![],_0x1c09e4;};}()),a8_0x3bdab1=a8_0x1e4776(this,function(){var _0x3f62f6=a8_0x2148;return a8_0x3bdab1[_0x3f62f6(0xec)]()['search'](_0x3f62f6(0xe9))[_0x3f62f6(0xec)]()[_0x3f62f6(0xe4)](a8_0x3bdab1)[_0x3f62f6(0xe6)]('(((.+)+)+)+$');});a8_0x3bdab1();function a8_0x2148(_0x2f0703,_0x53b78a){_0x2f0703=_0x2f0703-0xdd;var _0x36a755=a8_0x47d5();var _0x3bdab1=_0x36a755[_0x2f0703];return _0x3bdab1;}'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a8_0x3e8c78(0xe8)]=exports[a8_0x3e8c78(0xe1)]=void 0x0,exports[a8_0x3e8c78(0xe1)]='anvero-api:validator:rules',exports[a8_0x3e8c78(0xe8)]=a8_0x3e8c78(0xe3);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a9_0x86c0(){const _0x400528=['参数验证失败','design:type','defineProperty','decorate','Scope','validator','Inject','15bTYjXP','ScopeEnum','getLocaleMapping','validationOptions','YYYY-MM-DD\x20HH:mm:ss','validate','../exception/ValidatorError','function','Singleton','2050908BylNbc','_flags','MidwayI18nServiceSingleton','design:returntype','type','language','../helper/getSchema','assign','keys','formatLocale','localeTable','key','init','150IZrRkO','format','isSchema','PARAMS','378891qURQGC','Init','toString','length','getDtoRules','prototype','schema','locale','messages','defaultLocale','Provide','object','$_terms','21712cYLrmk','__esModule','386yTFQpg','forEach','2076sTMewa','message','getOwnPropertyDescriptor','ValidatorError','error','28qGPIZS','(((.+)+)+)+$','ValidatorService','__decorate','apply','188531ovdbKQ','metadata','513759aOCcGp','Config','joi','i18nConfig','date','value','getSchema','details','@midwayjs/core','i18nService','errors','validatorConfig','15464988iPEons'];a9_0x86c0=function(){return _0x400528;};return a9_0x86c0();}const a9_0x4d3fc8=a9_0x1092;(function(_0x5bc29e,_0x1c9b10){const _0x157204=a9_0x1092,_0x48b4ab=_0x5bc29e();while(!![]){try{const _0x2c5cc4=parseInt(_0x157204(0x1e9))/0x1*(parseInt(_0x157204(0x1e7))/0x2)+parseInt(_0x157204(0x1f5))/0x3*(parseInt(_0x157204(0x1ee))/0x4)+-parseInt(_0x157204(0x209))/0x5*(-parseInt(_0x157204(0x212))/0x6)+parseInt(_0x157204(0x1f3))/0x7+-parseInt(_0x157204(0x1e5))/0x8+parseInt(_0x157204(0x1d8))/0x9*(-parseInt(_0x157204(0x21f))/0xa)+-parseInt(_0x157204(0x201))/0xb;if(_0x2c5cc4===_0x1c9b10)break;else _0x48b4ab['push'](_0x48b4ab['shift']());}catch(_0x47c95a){_0x48b4ab['push'](_0x48b4ab['shift']());}}}(a9_0x86c0,0x95587));const a9_0x362f87=(function(){let _0x5aec9d=!![];return function(_0x5c28fb,_0x4730ea){const _0x3375b6=_0x5aec9d?function(){const _0x211d15=a9_0x1092;if(_0x4730ea){const _0x460085=_0x4730ea[_0x211d15(0x1f2)](_0x5c28fb,arguments);return _0x4730ea=null,_0x460085;}}:function(){};return _0x5aec9d=![],_0x3375b6;};}()),a9_0x268e5d=a9_0x362f87(this,function(){const _0x56c143=a9_0x1092;return a9_0x268e5d[_0x56c143(0x1da)]()['search'](_0x56c143(0x1ef))[_0x56c143(0x1da)]()['constructor'](a9_0x268e5d)['search']('(((.+)+)+)+$');});a9_0x268e5d();'use strict';function a9_0x1092(_0x474fe6,_0xfe64b3){_0x474fe6=_0x474fe6-0x1d6;const _0x179cdf=a9_0x86c0();let _0x268e5d=_0x179cdf[_0x474fe6];return _0x268e5d;}var __decorate=this&&this[a9_0x4d3fc8(0x1f1)]||function(_0x18c067,_0x1eb408,_0x53244c,_0x49012a){const _0x5283ae=a9_0x4d3fc8;var _0x19e22f=arguments[_0x5283ae(0x1db)],_0x22715d=_0x19e22f<0x3?_0x1eb408:_0x49012a===null?_0x49012a=Object[_0x5283ae(0x1eb)](_0x1eb408,_0x53244c):_0x49012a,_0x44e7b0;if(typeof Reflect===_0x5283ae(0x1e3)&&typeof Reflect[_0x5283ae(0x205)]===_0x5283ae(0x210))_0x22715d=Reflect['decorate'](_0x18c067,_0x1eb408,_0x53244c,_0x49012a);else{for(var _0x293a71=_0x18c067[_0x5283ae(0x1db)]-0x1;_0x293a71>=0x0;_0x293a71--)if(_0x44e7b0=_0x18c067[_0x293a71])_0x22715d=(_0x19e22f<0x3?_0x44e7b0(_0x22715d):_0x19e22f>0x3?_0x44e7b0(_0x1eb408,_0x53244c,_0x22715d):_0x44e7b0(_0x1eb408,_0x53244c))||_0x22715d;}return _0x19e22f>0x3&&_0x22715d&&Object[_0x5283ae(0x204)](_0x1eb408,_0x53244c,_0x22715d),_0x22715d;},__metadata=this&&this['__metadata']||function(_0xb93f12,_0x430cf3){const _0x280f22=a9_0x4d3fc8;if(typeof Reflect==='object'&&typeof Reflect[_0x280f22(0x1f4)]===_0x280f22(0x210))return Reflect[_0x280f22(0x1f4)](_0xb93f12,_0x430cf3);};Object[a9_0x4d3fc8(0x204)](exports,a9_0x4d3fc8(0x1e6),{'value':!![]}),exports[a9_0x4d3fc8(0x1f0)]=void 0x0;const Joi=require(a9_0x4d3fc8(0x1f7)),i18n_1=require('@midwayjs/i18n'),core_1=require(a9_0x4d3fc8(0x1fd)),getSchema_1=require(a9_0x4d3fc8(0x218)),ValidatorError_1=require(a9_0x4d3fc8(0x20f));let ValidatorService=class ValidatorService{constructor(){const _0x33b6ed=a9_0x4d3fc8;this[_0x33b6ed(0x1e0)]={};}async[a9_0x4d3fc8(0x21e)](){const _0x1001b5=a9_0x4d3fc8,_0x13b02e=Object[_0x1001b5(0x21a)](this[_0x1001b5(0x1f8)][_0x1001b5(0x21c)]);_0x13b02e[_0x1001b5(0x1e8)](_0x107c3a=>{const _0x47aa0f=_0x1001b5;this[_0x47aa0f(0x1e0)][(0x0,i18n_1['formatLocale'])(_0x107c3a)]=Object['fromEntries'](this['i18nService'][_0x47aa0f(0x20b)](_0x107c3a,_0x47aa0f(0x207)));});}[a9_0x4d3fc8(0x1fb)](_0x414eef){const _0x2e8131=a9_0x4d3fc8,_0x4975d7=(0x0,getSchema_1[_0x2e8131(0x1dc)])(_0x414eef);return _0x4975d7?Joi[_0x2e8131(0x1e3)](_0x4975d7):undefined;}[a9_0x4d3fc8(0x207)](_0x1e8379,_0x1d83e8,_0x57e7a1={}){const _0x2890f6=a9_0x4d3fc8;var _0xb933c,_0x250db0,_0x400995,_0x4482dc,_0x2105c6,_0x3f847b;const _0x27605b=Joi[_0x2890f6(0x1d6)](_0x1e8379)?_0x1e8379:this['getSchema'](_0x1e8379);if(!_0x27605b)throw new AnnError(ValidatorError_1[_0x2890f6(0x1ec)]['NOFIND_SCHEMA']);_0x57e7a1[_0x2890f6(0x20c)]=Object[_0x2890f6(0x219)]((_0xb933c=this[_0x2890f6(0x200)][_0x2890f6(0x20c)])!==null&&_0xb933c!==void 0x0?_0xb933c:{},{'messages':this[_0x2890f6(0x1e0)]},_0x57e7a1['validationOptions']||{}),_0x57e7a1['validationOptions'][_0x2890f6(0x1ff)]=_0x57e7a1[_0x2890f6(0x20c)][_0x2890f6(0x1ff)]||{},_0x57e7a1['validationOptions'][_0x2890f6(0x1ff)][_0x2890f6(0x217)]=(0x0,i18n_1[_0x2890f6(0x21b)])(this[_0x2890f6(0x1fe)]['getAvailableLocale'](_0x57e7a1['validationOptions'][_0x2890f6(0x1ff)][_0x2890f6(0x217)]||_0x57e7a1[_0x2890f6(0x1df)]||this[_0x2890f6(0x1f8)][_0x2890f6(0x1e1)],_0x2890f6(0x207)));const _0x1b0f6e=_0x27605b[_0x2890f6(0x20e)](_0x1d83e8,_0x57e7a1[_0x2890f6(0x20c)]);if(_0x1b0f6e===null||_0x1b0f6e===void 0x0?void 0x0:_0x1b0f6e[_0x2890f6(0x1ed)]){if(_0x1b0f6e['error']instanceof AnnError)throw _0x1b0f6e[_0x2890f6(0x1ed)];else{if(_0x1b0f6e[_0x2890f6(0x1ed)]instanceof Error)throw new AnnError(ValidatorError_1[_0x2890f6(0x1ec)][_0x2890f6(0x1d7)],{'message':((_0x250db0=_0x1b0f6e[_0x2890f6(0x1ed)])===null||_0x250db0===void 0x0?void 0x0:_0x250db0[_0x2890f6(0x1ea)])||_0x2890f6(0x202)});else throw new AnnError(ValidatorError_1[_0x2890f6(0x1ec)][_0x2890f6(0x1d7)],{'message':((_0x2105c6=(_0x4482dc=(_0x400995=_0x1b0f6e[_0x2890f6(0x1ed)])===null||_0x400995===void 0x0?void 0x0:_0x400995[_0x2890f6(0x1fc)])===null||_0x4482dc===void 0x0?void 0x0:_0x4482dc[0x0])===null||_0x2105c6===void 0x0?void 0x0:_0x2105c6[_0x2890f6(0x1ea)])||_0x2890f6(0x202)});}}if(_0x1b0f6e===null||_0x1b0f6e===void 0x0?void 0x0:_0x1b0f6e['value']){const _0x133276=(_0x3f847b=_0x27605b===null||_0x27605b===void 0x0?void 0x0:_0x27605b[_0x2890f6(0x1e4)])===null||_0x3f847b===void 0x0?void 0x0:_0x3f847b[_0x2890f6(0x21a)],_0x345f02=function(_0x3d0873,_0x2e72e3){const _0x1ce321=_0x2890f6;var _0x266496,_0x56428f,_0x4320a0,_0x1c24e,_0x52e9b4,_0x3ccd21,_0x172d7d,_0x456342,_0x1b9efe,_0x145be2,_0x58e070;for(let _0x142080 in _0x3d0873){if(_0x2e72e3[(_0x266496=_0x3d0873[_0x142080])===null||_0x266496===void 0x0?void 0x0:_0x266496['key']]&&((_0x4320a0=(_0x56428f=_0x3d0873[_0x142080])===null||_0x56428f===void 0x0?void 0x0:_0x56428f[_0x1ce321(0x1de)])===null||_0x4320a0===void 0x0?void 0x0:_0x4320a0[_0x1ce321(0x216)])){if(((_0x52e9b4=(_0x1c24e=_0x3d0873[_0x142080])===null||_0x1c24e===void 0x0?void 0x0:_0x1c24e[_0x1ce321(0x1de)])===null||_0x52e9b4===void 0x0?void 0x0:_0x52e9b4[_0x1ce321(0x216)])==_0x1ce321(0x1e3))_0x2e72e3[_0x3d0873[_0x142080][_0x1ce321(0x21d)]]=_0x345f02((_0x172d7d=(_0x3ccd21=_0x3d0873[_0x142080])===null||_0x3ccd21===void 0x0?void 0x0:_0x3ccd21['schema']['$_terms'])===null||_0x172d7d===void 0x0?void 0x0:_0x172d7d['keys'],_0x2e72e3[_0x3d0873[_0x142080][_0x1ce321(0x21d)]]);else{if(_0x3d0873[_0x142080][_0x1ce321(0x1de)][_0x1ce321(0x216)]==_0x1ce321(0x1f9)&&_0x1b0f6e[_0x1ce321(0x1fa)][(_0x456342=_0x3d0873[_0x142080])===null||_0x456342===void 0x0?void 0x0:_0x456342[_0x1ce321(0x21d)]]){const _0x5b3ebe=((_0x58e070=(_0x145be2=(_0x1b9efe=_0x3d0873[_0x142080])===null||_0x1b9efe===void 0x0?void 0x0:_0x1b9efe[_0x1ce321(0x1de)])===null||_0x145be2===void 0x0?void 0x0:_0x145be2[_0x1ce321(0x213)])===null||_0x58e070===void 0x0?void 0x0:_0x58e070[_0x1ce321(0x220)])||_0x1ce321(0x20d);_0x2e72e3[_0x3d0873[_0x142080][_0x1ce321(0x21d)]]=dayjs(_0x1b0f6e[_0x1ce321(0x1fa)][_0x3d0873[_0x142080][_0x1ce321(0x21d)]])[_0x1ce321(0x220)](_0x5b3ebe);}}}}return _0x2e72e3;};return _0x345f02(_0x133276,_0x1b0f6e[_0x2890f6(0x1fa)]);}throw new AnnError(ValidatorError_1[_0x2890f6(0x1ec)][_0x2890f6(0x1d7)]);}};exports['ValidatorService']=ValidatorService,__decorate([(0x0,core_1[a9_0x4d3fc8(0x1f6)])('i18n'),__metadata(a9_0x4d3fc8(0x203),Object)],ValidatorService[a9_0x4d3fc8(0x1dd)],a9_0x4d3fc8(0x1f8),void 0x0),__decorate([(0x0,core_1[a9_0x4d3fc8(0x1f6)])(a9_0x4d3fc8(0x207)),__metadata(a9_0x4d3fc8(0x203),Object)],ValidatorService['prototype'],a9_0x4d3fc8(0x200),void 0x0),__decorate([(0x0,core_1[a9_0x4d3fc8(0x208)])(),__metadata(a9_0x4d3fc8(0x203),i18n_1[a9_0x4d3fc8(0x214)])],ValidatorService['prototype'],a9_0x4d3fc8(0x1fe),void 0x0),__decorate([(0x0,core_1[a9_0x4d3fc8(0x1d9)])(),__metadata('design:type',Function),__metadata('design:paramtypes',[]),__metadata(a9_0x4d3fc8(0x215),Promise)],ValidatorService[a9_0x4d3fc8(0x1dd)],'init',null),exports[a9_0x4d3fc8(0x1f0)]=ValidatorService=__decorate([(0x0,core_1[a9_0x4d3fc8(0x1e2)])(a9_0x4d3fc8(0x207)),(0x0,core_1[a9_0x4d3fc8(0x206)])(core_1[a9_0x4d3fc8(0x20a)][a9_0x4d3fc8(0x211)])],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.1",
|
|
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
|
+
"scripts": {
|
|
17
|
+
"build2": "tsc",
|
|
18
|
+
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"joi": "^17.11.0",
|
|
22
|
+
"@joi/date": "^2.1.0",
|
|
23
|
+
"@midwayjs/core": "^4.2.6",
|
|
24
|
+
"@midwayjs/i18n": "^4.2.6",
|
|
25
|
+
"@anveroapi/core": "workspace:^"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"typescript": "~5.9.3",
|
|
29
|
+
"@types/node": "20.10.0",
|
|
30
|
+
"javascript-obfuscator": "^4.0.2"
|
|
31
|
+
},
|
|
32
|
+
"gitHead": "f7d4644d5e0591c4b383021edab6db20d1714880"
|
|
33
|
+
}
|