@anncic-api/validator 3.0.2 → 3.0.3
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
|
+
const a0_0x2c7987=a0_0x399b;(function(_0x73089a,_0x425cb4){const _0x261364=a0_0x399b,_0x3faa2c=_0x73089a();while(!![]){try{const _0x566430=-parseInt(_0x261364(0x169))/0x1+-parseInt(_0x261364(0x177))/0x2+parseInt(_0x261364(0x171))/0x3*(-parseInt(_0x261364(0x167))/0x4)+-parseInt(_0x261364(0x16f))/0x5+parseInt(_0x261364(0x178))/0x6*(-parseInt(_0x261364(0x16d))/0x7)+parseInt(_0x261364(0x176))/0x8*(-parseInt(_0x261364(0x168))/0x9)+parseInt(_0x261364(0x16c))/0xa;if(_0x566430===_0x425cb4)break;else _0x3faa2c['push'](_0x3faa2c['shift']());}catch(_0x1b135c){_0x3faa2c['push'](_0x3faa2c['shift']());}}}(a0_0xe86c,0x61d3d));const a0_0x529b19=(function(){let _0x447682=!![];return function(_0x30433e,_0x453d42){const _0x46c93d=_0x447682?function(){const _0x53ec4f=a0_0x399b;if(_0x453d42){const _0x15bf5e=_0x453d42[_0x53ec4f(0x16e)](_0x30433e,arguments);return _0x453d42=null,_0x15bf5e;}}:function(){};return _0x447682=![],_0x46c93d;};}()),a0_0x155853=a0_0x529b19(this,function(){const _0x3d05d3=a0_0x399b;return a0_0x155853[_0x3d05d3(0x175)]()[_0x3d05d3(0x16a)](_0x3d05d3(0x16b))[_0x3d05d3(0x175)]()[_0x3d05d3(0x165)](a0_0x155853)[_0x3d05d3(0x16a)]('(((.+)+)+)+$');});function a0_0xe86c(){const _0xf7219f=['../../locales/en_US.json','PARAMS','toString','3550088VoRiaN','493608gehqkk','12NrokAR','constructor','ValidatorError','286924QfRZxG','9tonIAs','491383UhiKCI','search','(((.+)+)+)+$','37374750PYFfvU','2780029ZujYDJ','apply','3216110rKhFjA','__esModule','30dSGSTC','string'];a0_0xe86c=function(){return _0xf7219f;};return a0_0xe86c();}a0_0x155853();function a0_0x399b(_0x56ec37,_0x3cbc35){const _0x77cd91=a0_0xe86c();return a0_0x399b=function(_0x155853,_0x529b19){_0x155853=_0x155853-0x165;let _0xe86ccd=_0x77cd91[_0x155853];return _0xe86ccd;},a0_0x399b(_0x56ec37,_0x3cbc35);}'use strict';Object['defineProperty'](exports,a0_0x2c7987(0x170),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');exports['default']={'validator':{'errorStatus':ValidatorError_1[a0_0x2c7987(0x166)][a0_0x2c7987(0x174)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x2c7987(0x172)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x2c7987(0x173))},'zh_CN':{'validator':require('../../locales/zh_CN.json')}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x439e27=a1_0x2536;(function(_0x1acc95,_0xd99e17){const _0x1f14f3=a1_0x2536,_0x525cf4=_0x1acc95();while(!![]){try{const _0x487f53=parseInt(_0x1f14f3(0x155))/0x1*(parseInt(_0x1f14f3(0x13b))/0x2)+parseInt(_0x1f14f3(0x150))/0x3*(-parseInt(_0x1f14f3(0x145))/0x4)+parseInt(_0x1f14f3(0x133))/0x5+parseInt(_0x1f14f3(0x165))/0x6+parseInt(_0x1f14f3(0x160))/0x7+parseInt(_0x1f14f3(0x14d))/0x8*(parseInt(_0x1f14f3(0x14b))/0x9)+parseInt(_0x1f14f3(0x168))/0xa*(-parseInt(_0x1f14f3(0x135))/0xb);if(_0x487f53===_0xd99e17)break;else _0x525cf4['push'](_0x525cf4['shift']());}catch(_0xad5f97){_0x525cf4['push'](_0x525cf4['shift']());}}}(a1_0x2453,0x1b94c));function a1_0x2453(){const _0x6bdb97=['MidwayDecoratorService','./interface','methodArgs','req','method','(((.+)+)+)+$','decorate','426209hWrFaQ','constructor','methodName','defineProperty','getMethodParamTypes','93258IlkvYR','prototype','object','2287470fIRjBi','__metadata','target','registerMethodHandler','./service/ValidatorService','getAttr','metadata','request','ValidatorService','1087605ZJcYQc','params','11aghUWL','@anncic-api/core','apply','query','getOwnPropertyDescriptor','@midwayjs/i18n','4BYXHHm','@midwayjs/core','getSchema','__esModule','locale','VALIDATOR_KEY','decorator','function','splice','param','64QbeBji','CustomConfiguration','I18N_ATTR_KEY','./config/config.default','propertyName','args','1683AFWzsi','anncic-api:validator','912fnKsOe','bound\x20dispatch','body','30489iqyBZt','search','Inject','undefined','length','94529gQysBy','name','res','toString'];a1_0x2453=function(){return _0x6bdb97;};return a1_0x2453();}const a1_0x55b8ee=(function(){let _0x5797fb=!![];return function(_0x491c85,_0x2e80a0){const _0x3d72ff=_0x5797fb?function(){const _0x14a5d4=a1_0x2536;if(_0x2e80a0){const _0x53774b=_0x2e80a0[_0x14a5d4(0x137)](_0x491c85,arguments);return _0x2e80a0=null,_0x53774b;}}:function(){};return _0x5797fb=![],_0x3d72ff;};}()),a1_0x194d96=a1_0x55b8ee(this,function(){const _0x82040d=a1_0x2536;return a1_0x194d96[_0x82040d(0x158)]()[_0x82040d(0x151)](_0x82040d(0x15e))[_0x82040d(0x158)]()[_0x82040d(0x161)](a1_0x194d96)[_0x82040d(0x151)](_0x82040d(0x15e));});a1_0x194d96();'use strict';function a1_0x2536(_0x903165,_0x284bca){const _0x51ac53=a1_0x2453();return a1_0x2536=function(_0x194d96,_0x55b8ee){_0x194d96=_0x194d96-0x12d;let _0x2453d4=_0x51ac53[_0x194d96];return _0x2453d4;},a1_0x2536(_0x903165,_0x284bca);}var __decorate=this&&this['__decorate']||function(_0x44799c,_0x43eda7,_0x1822d0,_0x5e14e7){const _0x4f9da5=a1_0x2536;var _0x1a3dd6=arguments[_0x4f9da5(0x154)],_0xf5ab67=_0x1a3dd6<0x3?_0x43eda7:_0x5e14e7===null?_0x5e14e7=Object[_0x4f9da5(0x139)](_0x43eda7,_0x1822d0):_0x5e14e7,_0x23e635;if(typeof Reflect===_0x4f9da5(0x167)&&typeof Reflect[_0x4f9da5(0x15f)]===_0x4f9da5(0x142))_0xf5ab67=Reflect[_0x4f9da5(0x15f)](_0x44799c,_0x43eda7,_0x1822d0,_0x5e14e7);else{for(var _0xd7488=_0x44799c[_0x4f9da5(0x154)]-0x1;_0xd7488>=0x0;_0xd7488--)if(_0x23e635=_0x44799c[_0xd7488])_0xf5ab67=(_0x1a3dd6<0x3?_0x23e635(_0xf5ab67):_0x1a3dd6>0x3?_0x23e635(_0x43eda7,_0x1822d0,_0xf5ab67):_0x23e635(_0x43eda7,_0x1822d0))||_0xf5ab67;}return _0x1a3dd6>0x3&&_0xf5ab67&&Object[_0x4f9da5(0x163)](_0x43eda7,_0x1822d0,_0xf5ab67),_0xf5ab67;},__metadata=this&&this[a1_0x439e27(0x169)]||function(_0x160efa,_0x51249b){const _0x5dac8b=a1_0x439e27;if(typeof Reflect===_0x5dac8b(0x167)&&typeof Reflect[_0x5dac8b(0x130)]===_0x5dac8b(0x142))return Reflect[_0x5dac8b(0x130)](_0x160efa,_0x51249b);};Object[a1_0x439e27(0x163)](exports,a1_0x439e27(0x13e),{'value':!![]}),exports[a1_0x439e27(0x146)]=void 0x0;const i18n_1=require(a1_0x439e27(0x13a)),core_1=require(a1_0x439e27(0x13c)),core_2=require(a1_0x439e27(0x13c)),interface_1=require(a1_0x439e27(0x15a)),ValidatorService_1=require(a1_0x439e27(0x12e)),i18n=require(a1_0x439e27(0x13a)),anncic=require(a1_0x439e27(0x136)),ConfigDefault=require(a1_0x439e27(0x148));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x32e5e4=a1_0x439e27;this[_0x32e5e4(0x141)][_0x32e5e4(0x12d)](interface_1[_0x32e5e4(0x140)],_0x1ef66b=>{const _0x1f6891=_0x32e5e4,_0x5f36c9=_0x1ef66b[_0x1f6891(0x130)],_0x314638=(0x0,core_2[_0x1f6891(0x164)])(_0x1ef66b['target'],_0x1ef66b[_0x1f6891(0x149)]);return{'before':_0x645083=>{const _0x2ae751=_0x1f6891;var _0x23613a,_0x435125,_0x1040f3,_0x2b38aa,_0x5d2e82,_0xe6ca7d,_0x2023b0,_0x52d1fe,_0x4a1c45,_0x1464ce,_0x5bad5c,_0x38a5d4,_0x1807a1;const _0x245166=_0x645083[_0x2ae751(0x16a)][core_1['REQUEST_OBJ_CTX_KEY']],_0x4b14a5=Object['assign']({},((_0x23613a=_0x245166===null||_0x245166===void 0x0?void 0x0:_0x245166[_0x2ae751(0x131)])===null||_0x23613a===void 0x0?void 0x0:_0x23613a[_0x2ae751(0x138)])||{},((_0x435125=_0x245166===null||_0x245166===void 0x0?void 0x0:_0x245166['request'])===null||_0x435125===void 0x0?void 0x0:_0x435125[_0x2ae751(0x14f)])||{}),_0x82cb1=((0x0,core_2['getClassMetadata'])(interface_1[_0x2ae751(0x140)],_0x645083[_0x2ae751(0x16a)])||[])['find'](_0x1242a8=>_0x1242a8[_0x2ae751(0x15d)]==_0x645083[_0x2ae751(0x162)]);!(_0x5f36c9===null||_0x5f36c9===void 0x0?void 0x0:_0x5f36c9[_0x2ae751(0x13f)])&&_0x245166&&_0x245166[_0x2ae751(0x12f)]&&(_0x5f36c9['locale']=_0x245166[_0x2ae751(0x12f)](i18n_1[_0x2ae751(0x147)]));for(let _0x580a12=0x0;_0x580a12<_0x314638['length'];_0x580a12++){const _0x33282c=_0x314638[_0x580a12],_0x4504b7=this[_0x2ae751(0x132)][_0x2ae751(0x13d)](_0x33282c);if(_0x4504b7){if(typeof _0x645083[_0x2ae751(0x14a)][_0x580a12]==_0x2ae751(0x153)||((_0x1040f3=_0x645083['args'][_0x580a12])===null||_0x1040f3===void 0x0?void 0x0:_0x1040f3[_0x2ae751(0x131)])&&((_0x2b38aa=_0x645083['args'][_0x580a12])===null||_0x2b38aa===void 0x0?void 0x0:_0x2b38aa[_0x2ae751(0x157)])&&((_0x5d2e82=_0x645083[_0x2ae751(0x14a)][_0x580a12])===null||_0x5d2e82===void 0x0?void 0x0:_0x5d2e82[_0x2ae751(0x15c)]))_0x645083['args'][_0x580a12]=_0x4b14a5;else((_0xe6ca7d=_0x645083[_0x2ae751(0x14a)][_0x580a12])===null||_0xe6ca7d===void 0x0?void 0x0:_0xe6ca7d[_0x2ae751(0x156)])==_0x2ae751(0x14e)&&_0x645083[_0x2ae751(0x14a)][_0x2ae751(0x143)](_0x580a12,0x0,_0x4b14a5);const _0x5309e0=this[_0x2ae751(0x132)]['validator'](_0x4504b7,_0x645083[_0x2ae751(0x14a)][_0x580a12],_0x5f36c9);_0x5309e0&&(_0x645083[_0x2ae751(0x14a)][_0x580a12]=_0x5309e0);}else{if((_0x82cb1===null||_0x82cb1===void 0x0?void 0x0:_0x82cb1[_0x2ae751(0x15b)][_0x580a12])&&((_0x2023b0=_0x645083[_0x2ae751(0x14a)][_0x580a12])===null||_0x2023b0===void 0x0?void 0x0:_0x2023b0[_0x2ae751(0x134)])&&typeof _0x645083['args'][_0x580a12][_0x2ae751(0x144)]==_0x2ae751(0x142)&&((_0x52d1fe=_0x245166===null||_0x245166===void 0x0?void 0x0:_0x245166[_0x2ae751(0x134)])===null||_0x52d1fe===void 0x0?void 0x0:_0x52d1fe[_0x82cb1[_0x2ae751(0x15b)][_0x580a12]]))_0x645083[_0x2ae751(0x14a)][_0x580a12]=_0x33282c((_0x4a1c45=_0x245166===null||_0x245166===void 0x0?void 0x0:_0x245166[_0x2ae751(0x134)])===null||_0x4a1c45===void 0x0?void 0x0:_0x4a1c45[_0x82cb1[_0x2ae751(0x15b)][_0x580a12]]);else(_0x82cb1===null||_0x82cb1===void 0x0?void 0x0:_0x82cb1['methodArgs'][_0x580a12])&&((_0x5bad5c=(_0x1464ce=_0x645083[_0x2ae751(0x14a)][_0x580a12])===null||_0x1464ce===void 0x0?void 0x0:_0x1464ce['params'])===null||_0x5bad5c===void 0x0?void 0x0:_0x5bad5c[_0x82cb1['methodArgs'][_0x580a12]])&&(_0x645083[_0x2ae751(0x14a)][_0x580a12]=(_0x1807a1=(_0x38a5d4=_0x645083[_0x2ae751(0x14a)][_0x580a12])===null||_0x38a5d4===void 0x0?void 0x0:_0x38a5d4[_0x2ae751(0x134)])===null||_0x1807a1===void 0x0?void 0x0:_0x1807a1[_0x82cb1[_0x2ae751(0x15b)][_0x580a12]]);}}},'afterThrow':(_0x175714,_0x594024)=>{throw _0x594024;}};});}};__decorate([(0x0,core_2[a1_0x439e27(0x152)])(),__metadata('design:type',core_1[a1_0x439e27(0x159)])],CustomConfiguration['prototype'],a1_0x439e27(0x141),void 0x0),__decorate([(0x0,core_2[a1_0x439e27(0x152)])(),__metadata('design:type',ValidatorService_1['ValidatorService'])],CustomConfiguration[a1_0x439e27(0x166)],a1_0x439e27(0x132),void 0x0),CustomConfiguration=__decorate([(0x0,core_2['Configuration'])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x439e27(0x14c),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x439e27(0x146)]=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a2_0x4e3e8c=a2_0x49c7;function a2_0x49c7(_0x1c826d,_0x1cd04f){const _0x47894e=a2_0x9660();return a2_0x49c7=function(_0x5c3e2b,_0x4850d1){_0x5c3e2b=_0x5c3e2b-0xbf;let _0x9660ea=_0x47894e[_0x5c3e2b];return _0x9660ea;},a2_0x49c7(_0x1c826d,_0x1cd04f);}(function(_0x44a95d,_0x4f3838){const _0x2ec7fe=a2_0x49c7,_0x2bef5c=_0x44a95d();while(!![]){try{const _0x610d2a=parseInt(_0x2ec7fe(0xcc))/0x1+-parseInt(_0x2ec7fe(0xca))/0x2+-parseInt(_0x2ec7fe(0xd1))/0x3*(parseInt(_0x2ec7fe(0xc1))/0x4)+parseInt(_0x2ec7fe(0xc5))/0x5*(-parseInt(_0x2ec7fe(0xbf))/0x6)+parseInt(_0x2ec7fe(0xd5))/0x7*(parseInt(_0x2ec7fe(0xd4))/0x8)+parseInt(_0x2ec7fe(0xdc))/0x9+-parseInt(_0x2ec7fe(0xda))/0xa*(parseInt(_0x2ec7fe(0xcb))/0xb);if(_0x610d2a===_0x4f3838)break;else _0x2bef5c['push'](_0x2bef5c['shift']());}catch(_0x3efbe1){_0x2bef5c['push'](_0x2bef5c['shift']());}}}(a2_0x9660,0x72bad));const a2_0x4850d1=(function(){let _0x2a759a=!![];return function(_0x13cc64,_0x427760){const _0xe0db40=_0x2a759a?function(){const _0x263fd0=a2_0x49c7;if(_0x427760){const _0x37a34d=_0x427760[_0x263fd0(0xc0)](_0x13cc64,arguments);return _0x427760=null,_0x37a34d;}}:function(){};return _0x2a759a=![],_0xe0db40;};}()),a2_0x5c3e2b=a2_0x4850d1(this,function(){const _0x304ae6=a2_0x49c7;return a2_0x5c3e2b[_0x304ae6(0xc7)]()['search'](_0x304ae6(0xdd))[_0x304ae6(0xc7)]()[_0x304ae6(0xc4)](a2_0x5c3e2b)[_0x304ae6(0xc8)]('(((.+)+)+)+$');});a2_0x5c3e2b();'use strict';Object['defineProperty'](exports,a2_0x4e3e8c(0xc2),{'value':!![]}),exports['Rule']=exports[a2_0x4e3e8c(0xcf)]=void 0x0;const joi=require(a2_0x4e3e8c(0xc6)),date_1=require('@joi/date'),core_1=require(a2_0x4e3e8c(0xd3)),interface_1=require(a2_0x4e3e8c(0xd0));function a2_0x9660(){const _0x283539=['joi','toString','search','Rule','732732kUyDyO','530024Fkhepa','897052NcCJKl','description','meta','RuleType','../interface','88080MaYMDp','RULES_KEY','@midwayjs/core','4830072zBvKgn','7WPyZJV','Array','keys','array','function','20ibBArH','getPropertyType','6891075xHDOwG','(((.+)+)+)+$','getClassMetadata','extend','default','isSchema','label','116094nSlgoT','apply','100NlFkJj','__esModule','name','constructor','155KQRlKc'];a2_0x9660=function(){return _0x283539;};return a2_0x9660();}exports[a2_0x4e3e8c(0xcf)]=joi[a2_0x4e3e8c(0xdf)](date_1[a2_0x4e3e8c(0xe0)]);function Rule(_0x1d306f,_0x5f0ab7,_0x543649=''){return(_0x408cbc,_0x5be263)=>{const _0x3ae8e7=a2_0x49c7;var _0x203a04;if(_0x5be263)!joi['isSchema'](_0x5f0ab7)&&(_0x5f0ab7===null||_0x5f0ab7===void 0x0?void 0x0:_0x5f0ab7[_0x3ae8e7(0xc3)])&&(_0x5f0ab7=joi['object']((0x0,core_1[_0x3ae8e7(0xde)])(interface_1[_0x3ae8e7(0xd2)],_0x5f0ab7))[_0x3ae8e7(0xce)]({'id':_0x5f0ab7[_0x3ae8e7(0xc3)]}),(0x0,core_1[_0x3ae8e7(0xdb)])(_0x408cbc,_0x5be263)[_0x3ae8e7(0xc3)]===_0x3ae8e7(0xd6)&&(_0x5f0ab7=joi[_0x3ae8e7(0xd8)]()['items'](_0x5f0ab7))),joi[_0x3ae8e7(0xe1)](_0x5f0ab7)&&(_0x1d306f&&typeof(_0x5f0ab7===null||_0x5f0ab7===void 0x0?void 0x0:_0x5f0ab7[_0x3ae8e7(0xe2)])==_0x3ae8e7(0xd9)&&(_0x5f0ab7=_0x5f0ab7[_0x3ae8e7(0xe2)](_0x1d306f)),_0x543649&&typeof(_0x5f0ab7===null||_0x5f0ab7===void 0x0?void 0x0:_0x5f0ab7[_0x3ae8e7(0xcd)])==_0x3ae8e7(0xd9)&&(_0x5f0ab7=_0x5f0ab7[_0x3ae8e7(0xcd)](_0x543649)),(0x0,core_1['attachClassMetadata'])(interface_1[_0x3ae8e7(0xd2)],_0x5f0ab7,_0x408cbc,_0x5be263));else{const _0x23c101=(0x0,core_1[_0x3ae8e7(0xde)])(interface_1[_0x3ae8e7(0xd2)],_0x5f0ab7);if(_0x23c101){let _0x2a313e=(_0x203a04=(0x0,core_1['getClassMetadata'])(interface_1[_0x3ae8e7(0xd2)],_0x408cbc))!==null&&_0x203a04!==void 0x0?_0x203a04:{};Object[_0x3ae8e7(0xd7)](_0x23c101)['map'](_0x4ea2e3=>{!_0x2a313e[_0x4ea2e3]&&(_0x2a313e[_0x4ea2e3]=_0x23c101[_0x4ea2e3]);}),(0x0,core_1['saveClassMetadata'])(interface_1[_0x3ae8e7(0xd2)],_0x2a313e,_0x408cbc);}}};}exports[a2_0x4e3e8c(0xc9)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x301c92=a3_0xbbb9;function a3_0x542d(){const _0x3452af=['constructor','toString','function','5230400DmIbcx','860AWGTdg','search','replace','VALIDATOR_KEY','Validator','(((.+)+)+)+$','56KPTVMg','1003689cnyFXX','242406Wzwnab','698676lmzpGW','738645IiYGgJ','indexOf','18tRxYSC','__esModule','2164cXrAbl','getFuncArgs','2576440Ishtrw','prototype','apply'];a3_0x542d=function(){return _0x3452af;};return a3_0x542d();}(function(_0x2f7ed5,_0x5868f7){const _0x37ff84=a3_0xbbb9,_0x126a47=_0x2f7ed5();while(!![]){try{const _0x3f4b29=-parseInt(_0x37ff84(0x6c))/0x1*(parseInt(_0x37ff84(0x7b))/0x2)+-parseInt(_0x37ff84(0x7c))/0x3+parseInt(_0x37ff84(0x7e))/0x4+parseInt(_0x37ff84(0x7f))/0x5*(-parseInt(_0x37ff84(0x81))/0x6)+-parseInt(_0x37ff84(0x74))/0x7+-parseInt(_0x37ff84(0x6e))/0x8+-parseInt(_0x37ff84(0x7d))/0x9*(-parseInt(_0x37ff84(0x75))/0xa);if(_0x3f4b29===_0x5868f7)break;else _0x126a47['push'](_0x126a47['shift']());}catch(_0x405254){_0x126a47['push'](_0x126a47['shift']());}}}(a3_0x542d,0x8e6e4));const a3_0x21cedd=(function(){let _0x550335=!![];return function(_0xba384a,_0x4040c3){const _0x2b3411=_0x550335?function(){const _0x2fa3cb=a3_0xbbb9;if(_0x4040c3){const _0x188c59=_0x4040c3[_0x2fa3cb(0x70)](_0xba384a,arguments);return _0x4040c3=null,_0x188c59;}}:function(){};return _0x550335=![],_0x2b3411;};}()),a3_0x5a7f2d=a3_0x21cedd(this,function(){const _0x100971=a3_0xbbb9;return a3_0x5a7f2d[_0x100971(0x72)]()[_0x100971(0x76)](_0x100971(0x7a))['toString']()[_0x100971(0x71)](a3_0x5a7f2d)[_0x100971(0x76)](_0x100971(0x7a));});a3_0x5a7f2d();'use strict';function a3_0xbbb9(_0x22047b,_0x1dd15b){const _0x76fba9=a3_0x542d();return a3_0xbbb9=function(_0x5a7f2d,_0x21cedd){_0x5a7f2d=_0x5a7f2d-0x6c;let _0x542d46=_0x76fba9[_0x5a7f2d];return _0x542d46;},a3_0xbbb9(_0x22047b,_0x1dd15b);}Object['defineProperty'](exports,a3_0x301c92(0x82),{'value':!![]}),exports[a3_0x301c92(0x6d)]=exports[a3_0x301c92(0x79)]=void 0x0;const core_1=require('@midwayjs/core'),interface_1=require('../interface');function Validator(_0xab3b4e={}){return(_0x9ba0b0,_0x497ad3,_0x477b14)=>{const _0x374618=a3_0xbbb9,_0x4da80f=getFuncArgs(_0x9ba0b0[_0x497ad3]);(0x0,core_1['attachClassMetadata'])(interface_1[_0x374618(0x78)],{'method':_0x497ad3,'methodArgs':_0x4da80f},_0x9ba0b0),(0x0,core_1['createCustomMethodDecorator'])(interface_1[_0x374618(0x78)],_0xab3b4e)(_0x9ba0b0,_0x497ad3,_0x477b14);};}exports[a3_0x301c92(0x79)]=Validator;function getFuncArgs(_0x2a0e4c){const _0x334ef6=a3_0x301c92;if(typeof _0x2a0e4c==_0x334ef6(0x73)){const _0x1a9eca=/=>.*$/mg,_0x42c1ed=/=[^,)]+/mg,_0x126582=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x46cd2e=(_0x2a0e4c[_0x334ef6(0x6f)]?_0x2a0e4c[_0x334ef6(0x6f)]['constructor'][_0x334ef6(0x72)]():_0x2a0e4c[_0x334ef6(0x72)]())[_0x334ef6(0x77)](_0x126582,'')[_0x334ef6(0x77)](_0x1a9eca,'')[_0x334ef6(0x77)](_0x42c1ed,''),_0x475af0=_0x46cd2e['slice'](_0x46cd2e[_0x334ef6(0x80)]('(')+0x1,_0x46cd2e['indexOf'](')'))['match'](/([^\s,]+)/g)||[];return _0x475af0;}}exports[a3_0x301c92(0x6d)]=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x2371c0=a4_0x3eff;function a4_0x3eff(_0x56da3f,_0x40207d){var _0x56facb=a4_0x3bd1();return a4_0x3eff=function(_0x31ce5c,_0x280acc){_0x31ce5c=_0x31ce5c-0xb1;var _0x3bd161=_0x56facb[_0x31ce5c];return _0x3bd161;},a4_0x3eff(_0x56da3f,_0x40207d);}(function(_0x40a9c1,_0x532b79){var _0x1fd6cd=a4_0x3eff,_0x1daed7=_0x40a9c1();while(!![]){try{var _0x23c49a=-parseInt(_0x1fd6cd(0xb5))/0x1*(-parseInt(_0x1fd6cd(0xba))/0x2)+-parseInt(_0x1fd6cd(0xcb))/0x3*(parseInt(_0x1fd6cd(0xce))/0x4)+-parseInt(_0x1fd6cd(0xb1))/0x5*(-parseInt(_0x1fd6cd(0xb6))/0x6)+parseInt(_0x1fd6cd(0xc9))/0x7+-parseInt(_0x1fd6cd(0xb9))/0x8+-parseInt(_0x1fd6cd(0xc8))/0x9+-parseInt(_0x1fd6cd(0xbd))/0xa*(-parseInt(_0x1fd6cd(0xb8))/0xb);if(_0x23c49a===_0x532b79)break;else _0x1daed7['push'](_0x1daed7['shift']());}catch(_0x2a1202){_0x1daed7['push'](_0x1daed7['shift']());}}}(a4_0x3bd1,0x740ff));var a4_0x280acc=(function(){var _0x79cd46=!![];return function(_0x360519,_0x5bd794){var _0x24826a=_0x79cd46?function(){var _0x2d5d8b=a4_0x3eff;if(_0x5bd794){var _0x1d01eb=_0x5bd794[_0x2d5d8b(0xb3)](_0x360519,arguments);return _0x5bd794=null,_0x1d01eb;}}:function(){};return _0x79cd46=![],_0x24826a;};}()),a4_0x31ce5c=a4_0x280acc(this,function(){var _0xd9fdaf=a4_0x3eff;return a4_0x31ce5c[_0xd9fdaf(0xbb)]()[_0xd9fdaf(0xc3)](_0xd9fdaf(0xcd))[_0xd9fdaf(0xbb)]()[_0xd9fdaf(0xb4)](a4_0x31ce5c)[_0xd9fdaf(0xc3)]('(((.+)+)+)+$');});a4_0x31ce5c();function a4_0x3bd1(){var _0x361cd9=['PARAMS','5253255flzCJv','6279105spFeJr','getOwnPropertyDescriptor','79830cjQqfU','__metadata','(((.+)+)+)+$','140oRbKuq','decorate','object','3310nFuHkj','design:type','apply','constructor','28759UYCuGN','5808rCAkjU','参数验证失败','407tZKiQd','2372664jeEGJM','32CjNwQh','toString','@anncic-api/core','78120FqTGJa','function','length','__decorate','ValidatorError','__esModule','search','defineProperty','NOFIND_SCHEMA','metadata'];a4_0x3bd1=function(){return _0x361cd9;};return a4_0x3bd1();}'use strict';var __decorate=this&&this[a4_0x2371c0(0xc0)]||function(_0xbe969e,_0x925d3f,_0x3f158a,_0x3eab5b){var _0x295b1f=a4_0x2371c0,_0x391939=arguments[_0x295b1f(0xbf)],_0x53e7c7=_0x391939<0x3?_0x925d3f:_0x3eab5b===null?_0x3eab5b=Object[_0x295b1f(0xca)](_0x925d3f,_0x3f158a):_0x3eab5b,_0x228d4d;if(typeof Reflect===_0x295b1f(0xd0)&&typeof Reflect['decorate']===_0x295b1f(0xbe))_0x53e7c7=Reflect[_0x295b1f(0xcf)](_0xbe969e,_0x925d3f,_0x3f158a,_0x3eab5b);else{for(var _0xc1879e=_0xbe969e['length']-0x1;_0xc1879e>=0x0;_0xc1879e--)if(_0x228d4d=_0xbe969e[_0xc1879e])_0x53e7c7=(_0x391939<0x3?_0x228d4d(_0x53e7c7):_0x391939>0x3?_0x228d4d(_0x925d3f,_0x3f158a,_0x53e7c7):_0x228d4d(_0x925d3f,_0x3f158a))||_0x53e7c7;}return _0x391939>0x3&&_0x53e7c7&&Object['defineProperty'](_0x925d3f,_0x3f158a,_0x53e7c7),_0x53e7c7;},__metadata=this&&this[a4_0x2371c0(0xcc)]||function(_0x3b01ce,_0x4d3778){var _0x11dc9e=a4_0x2371c0;if(typeof Reflect===_0x11dc9e(0xd0)&&typeof Reflect[_0x11dc9e(0xc6)]===_0x11dc9e(0xbe))return Reflect[_0x11dc9e(0xc6)](_0x3b01ce,_0x4d3778);};Object[a4_0x2371c0(0xc4)](exports,a4_0x2371c0(0xc2),{'value':!![]}),exports[a4_0x2371c0(0xc1)]=void 0x0;const core_1=require(a4_0x2371c0(0xbc));class ValidatorError extends AnnError{}ValidatorError[a4_0x2371c0(0xc7)]=0x18c1e,ValidatorError[a4_0x2371c0(0xc5)]=0x18c1c,__decorate([(0x0,core_1['AnnErrorMsg'])('参数验证失败'),__metadata(a4_0x2371c0(0xb2),Object)],ValidatorError,a4_0x2371c0(0xc7),void 0x0),__decorate([(0x0,core_1['AnnErrorMsg'])(a4_0x2371c0(0xb7)),__metadata(a4_0x2371c0(0xb2),Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0),exports[a4_0x2371c0(0xc1)]=ValidatorError;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x5ca26f=a5_0x39b0;(function(_0x4f76ae,_0x57c892){const _0x21552e=a5_0x39b0,_0x216295=_0x4f76ae();while(!![]){try{const _0x3c4156=-parseInt(_0x21552e(0x7a))/0x1*(-parseInt(_0x21552e(0x7c))/0x2)+parseInt(_0x21552e(0x7e))/0x3*(parseInt(_0x21552e(0x81))/0x4)+parseInt(_0x21552e(0x78))/0x5+parseInt(_0x21552e(0x87))/0x6+parseInt(_0x21552e(0x83))/0x7+parseInt(_0x21552e(0x70))/0x8*(parseInt(_0x21552e(0x77))/0x9)+parseInt(_0x21552e(0x85))/0xa*(-parseInt(_0x21552e(0x7d))/0xb);if(_0x3c4156===_0x57c892)break;else _0x216295['push'](_0x216295['shift']());}catch(_0x3a9943){_0x216295['push'](_0x216295['shift']());}}}(a5_0x5313,0x529d2));const a5_0x29487c=(function(){let _0x325395=!![];return function(_0x3efcfb,_0x56a1b9){const _0x607e8a=_0x325395?function(){if(_0x56a1b9){const _0x2167b8=_0x56a1b9['apply'](_0x3efcfb,arguments);return _0x56a1b9=null,_0x2167b8;}}:function(){};return _0x325395=![],_0x607e8a;};}()),a5_0x2674a3=a5_0x29487c(this,function(){const _0x5c961f=a5_0x39b0;return a5_0x2674a3[_0x5c961f(0x79)]()[_0x5c961f(0x7f)]('(((.+)+)+)+$')['toString']()['constructor'](a5_0x2674a3)['search'](_0x5c961f(0x80));});a5_0x2674a3();'use strict';Object[a5_0x5ca26f(0x73)](exports,'__esModule',{'value':!![]}),exports[a5_0x5ca26f(0x71)]=exports[a5_0x5ca26f(0x7b)]=void 0x0;const core_1=require(a5_0x5ca26f(0x82)),interface_1=require(a5_0x5ca26f(0x84));function PickDto(_0x2b9dcc,_0x498275){const _0x2d4ee9=a5_0x5ca26f,_0x51146f=function(){};_0x51146f[_0x2d4ee9(0x75)]=_0x2b9dcc[_0x2d4ee9(0x75)];const _0x36bae8=(0x0,core_1['getClassExtendedMetadata'])(interface_1['RULES_KEY'],_0x2b9dcc),_0x32fb75={};for(const _0x32f7a7 of _0x498275){_0x36bae8[_0x32f7a7]&&(_0x32fb75[_0x32f7a7]=_0x36bae8[_0x32f7a7]);}return(0x0,core_1[_0x2d4ee9(0x86)])(interface_1['RULES_KEY'],_0x32fb75,_0x51146f),_0x51146f;}exports['PickDto']=PickDto;function a5_0x39b0(_0x257c63,_0x19bf63){const _0x16600c=a5_0x5313();return a5_0x39b0=function(_0x2674a3,_0x29487c){_0x2674a3=_0x2674a3-0x70;let _0x5313a3=_0x16600c[_0x2674a3];return _0x5313a3;},a5_0x39b0(_0x257c63,_0x19bf63);}function a5_0x5313(){const _0x607dcd=['toString','1ECwLgF','PickDto','623398GtuPXN','3146YTuUxm','3faWyCt','search','(((.+)+)+)+$','1194428lAPsar','@midwayjs/core','4450866pFrUoc','../interface','73070OYGZxq','saveClassMetadata','631710KKESuf','728tatQqa','OmitDto','getClassExtendedMetadata','defineProperty','assign','prototype','RULES_KEY','59346ppGbmf','2383525kijGbE'];a5_0x5313=function(){return _0x607dcd;};return a5_0x5313();}function OmitDto(_0x92e8af,_0x39135c){const _0x257f8a=a5_0x5ca26f,_0x332f6e=function(){};_0x332f6e['prototype']=_0x92e8af[_0x257f8a(0x75)];const _0x42dedc=(0x0,core_1[_0x257f8a(0x72)])(interface_1['RULES_KEY'],_0x92e8af),_0x210e95=Object[_0x257f8a(0x74)]({},_0x42dedc);for(const _0x64031e of _0x39135c){delete _0x210e95[_0x64031e];}return(0x0,core_1[_0x257f8a(0x86)])(interface_1[_0x257f8a(0x76)],_0x210e95,_0x332f6e),_0x332f6e;}exports[a5_0x5ca26f(0x71)]=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x3e320b=a6_0x5912;function a6_0x5912(_0x1afaaa,_0x4ddf8d){var _0xc64a0f=a6_0x2665();return a6_0x5912=function(_0x1ee1f0,_0x358310){_0x1ee1f0=_0x1ee1f0-0x1bc;var _0x2665b2=_0xc64a0f[_0x1ee1f0];return _0x2665b2;},a6_0x5912(_0x1afaaa,_0x4ddf8d);}function a6_0x2665(){var _0x580dd9=['search','1816eduXOM','792835kBDJBE','defineProperty','2vitFVd','2247000ciwPty','492848nuomGe','__createBinding','4267712qMUNNg','RuleType','__exportStar','49462ibZqCW','prototype','configurable','apply','default','./exception/ValidatorError','constructor','3027384UmytzZ','Configuration','getOwnPropertyDescriptor','call','66sjwulF','Rule','get','(((.+)+)+)+$','hasOwnProperty','./decorator/Validator','CustomConfiguration','Validator','__esModule','120033Vlnknf','ValidatorError','ValidatorService'];a6_0x2665=function(){return _0x580dd9;};return a6_0x2665();}(function(_0x332dfb,_0xd6ceca){var _0x3103cf=a6_0x5912,_0xaff706=_0x332dfb();while(!![]){try{var _0x593c7b=parseInt(_0x3103cf(0x1d4))/0x1+-parseInt(_0x3103cf(0x1d2))/0x2*(parseInt(_0x3103cf(0x1be))/0x3)+parseInt(_0x3103cf(0x1d6))/0x4+-parseInt(_0x3103cf(0x1d0))/0x5*(-parseInt(_0x3103cf(0x1c2))/0x6)+-parseInt(_0x3103cf(0x1d9))/0x7*(parseInt(_0x3103cf(0x1cf))/0x8)+parseInt(_0x3103cf(0x1cb))/0x9+parseInt(_0x3103cf(0x1d3))/0xa;if(_0x593c7b===_0xd6ceca)break;else _0xaff706['push'](_0xaff706['shift']());}catch(_0x2366e9){_0xaff706['push'](_0xaff706['shift']());}}}(a6_0x2665,0xe2cac));var a6_0x358310=(function(){var _0x2d2db1=!![];return function(_0xd037bf,_0x3e11f3){var _0x46354d=_0x2d2db1?function(){var _0x3e641f=a6_0x5912;if(_0x3e11f3){var _0x47bd7b=_0x3e11f3[_0x3e641f(0x1dc)](_0xd037bf,arguments);return _0x3e11f3=null,_0x47bd7b;}}:function(){};return _0x2d2db1=![],_0x46354d;};}()),a6_0x1ee1f0=a6_0x358310(this,function(){var _0x11057f=a6_0x5912;return a6_0x1ee1f0['toString']()[_0x11057f(0x1ce)]('(((.+)+)+)+$')['toString']()[_0x11057f(0x1bd)](a6_0x1ee1f0)[_0x11057f(0x1ce)](_0x11057f(0x1c5));});a6_0x1ee1f0();'use strict';var __createBinding=this&&this[a6_0x3e320b(0x1d5)]||(Object['create']?function(_0x3d9a14,_0x4cb720,_0x4ae84d,_0x53e4cd){var _0x2d339d=a6_0x3e320b;if(_0x53e4cd===undefined)_0x53e4cd=_0x4ae84d;var _0x10db92=Object[_0x2d339d(0x1c0)](_0x4cb720,_0x4ae84d);(!_0x10db92||(_0x2d339d(0x1c4)in _0x10db92?!_0x4cb720[_0x2d339d(0x1ca)]:_0x10db92['writable']||_0x10db92[_0x2d339d(0x1db)]))&&(_0x10db92={'enumerable':!![],'get':function(){return _0x4cb720[_0x4ae84d];}}),Object[_0x2d339d(0x1d1)](_0x3d9a14,_0x53e4cd,_0x10db92);}:function(_0x417df6,_0x3fa657,_0x5caeac,_0x22a46b){if(_0x22a46b===undefined)_0x22a46b=_0x5caeac;_0x417df6[_0x22a46b]=_0x3fa657[_0x5caeac];}),__exportStar=this&&this[a6_0x3e320b(0x1d8)]||function(_0x5038a1,_0x774cd1){var _0xa788a6=a6_0x3e320b;for(var _0x1b5797 in _0x5038a1)if(_0x1b5797!==_0xa788a6(0x1dd)&&!Object[_0xa788a6(0x1da)][_0xa788a6(0x1c6)][_0xa788a6(0x1c1)](_0x774cd1,_0x1b5797))__createBinding(_0x774cd1,_0x5038a1,_0x1b5797);};Object[a6_0x3e320b(0x1d1)](exports,a6_0x3e320b(0x1ca),{'value':!![]}),exports[a6_0x3e320b(0x1bf)]=exports[a6_0x3e320b(0x1cd)]=exports[a6_0x3e320b(0x1cc)]=exports[a6_0x3e320b(0x1d7)]=exports[a6_0x3e320b(0x1c3)]=exports['Validator']=void 0x0,__exportStar(require('./interface'),exports),__exportStar(require('./helper/dtoHelper'),exports);var Validator_1=require(a6_0x3e320b(0x1c7));Object['defineProperty'](exports,a6_0x3e320b(0x1c9),{'enumerable':!![],'get':function(){var _0x5390cb=a6_0x3e320b;return Validator_1[_0x5390cb(0x1c9)];}});var Rule_1=require('./decorator/Rule');Object[a6_0x3e320b(0x1d1)](exports,'Rule',{'enumerable':!![],'get':function(){var _0x40ebd8=a6_0x3e320b;return Rule_1[_0x40ebd8(0x1c3)];}}),Object[a6_0x3e320b(0x1d1)](exports,a6_0x3e320b(0x1d7),{'enumerable':!![],'get':function(){var _0x32f5aa=a6_0x3e320b;return Rule_1[_0x32f5aa(0x1d7)];}});var ValidatorError_1=require(a6_0x3e320b(0x1bc));Object[a6_0x3e320b(0x1d1)](exports,'ValidatorError',{'enumerable':!![],'get':function(){return ValidatorError_1['ValidatorError'];}});var ValidatorService_1=require('./service/ValidatorService');Object[a6_0x3e320b(0x1d1)](exports,a6_0x3e320b(0x1cd),{'enumerable':!![],'get':function(){var _0x447f6e=a6_0x3e320b;return ValidatorService_1[_0x447f6e(0x1cd)];}});var configuration_1=require('./configuration');Object[a6_0x3e320b(0x1d1)](exports,a6_0x3e320b(0x1bf),{'enumerable':!![],'get':function(){var _0x5195e0=a6_0x3e320b;return configuration_1[_0x5195e0(0x1c8)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x460451=a7_0x778b;(function(_0x4fc5f9,_0x29dc86){var _0x2e6136=a7_0x778b,_0x48835b=_0x4fc5f9();while(!![]){try{var _0x3050e8=-parseInt(_0x2e6136(0xdd))/0x1+parseInt(_0x2e6136(0xe0))/0x2*(-parseInt(_0x2e6136(0xd7))/0x3)+parseInt(_0x2e6136(0xdb))/0x4*(-parseInt(_0x2e6136(0xe4))/0x5)+-parseInt(_0x2e6136(0xd9))/0x6+-parseInt(_0x2e6136(0xd2))/0x7*(parseInt(_0x2e6136(0xd5))/0x8)+parseInt(_0x2e6136(0xdf))/0x9+parseInt(_0x2e6136(0xe2))/0xa;if(_0x3050e8===_0x29dc86)break;else _0x48835b['push'](_0x48835b['shift']());}catch(_0x509b34){_0x48835b['push'](_0x48835b['shift']());}}}(a7_0x4698,0xe48dd));function a7_0x4698(){var _0x4b37f4=['5505498StTBHS','2ZZZgSq','apply','46059430fcYELs','VALIDATOR_KEY','10bWjpEe','50092flSItJ','RULES_KEY','search','728WbgZvm','toString','5105355TRTCRz','(((.+)+)+)+$','5486784pXeXaW','constructor','199164sIrDKx','__esModule','914481EbbfCc','anncic-api:validator:rules'];a7_0x4698=function(){return _0x4b37f4;};return a7_0x4698();}var a7_0x1dc1b7=(function(){var _0x274a6f=!![];return function(_0x53d44b,_0x310f52){var _0x552084=_0x274a6f?function(){var _0x1e2ac7=a7_0x778b;if(_0x310f52){var _0x3f99b9=_0x310f52[_0x1e2ac7(0xe1)](_0x53d44b,arguments);return _0x310f52=null,_0x3f99b9;}}:function(){};return _0x274a6f=![],_0x552084;};}()),a7_0x1ea9c3=a7_0x1dc1b7(this,function(){var _0x24fbc5=a7_0x778b;return a7_0x1ea9c3[_0x24fbc5(0xd6)]()[_0x24fbc5(0xd4)](_0x24fbc5(0xd8))[_0x24fbc5(0xd6)]()[_0x24fbc5(0xda)](a7_0x1ea9c3)[_0x24fbc5(0xd4)](_0x24fbc5(0xd8));});function a7_0x778b(_0x13936c,_0x113a7e){var _0x1ed490=a7_0x4698();return a7_0x778b=function(_0x1ea9c3,_0x1dc1b7){_0x1ea9c3=_0x1ea9c3-0xd2;var _0x46989d=_0x1ed490[_0x1ea9c3];return _0x46989d;},a7_0x778b(_0x13936c,_0x113a7e);}a7_0x1ea9c3();'use strict';Object['defineProperty'](exports,a7_0x460451(0xdc),{'value':!![]}),exports[a7_0x460451(0xe3)]=exports['RULES_KEY']=void 0x0,exports[a7_0x460451(0xd3)]=a7_0x460451(0xde),exports['VALIDATOR_KEY']='anncic-api:validator:validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a8_0x5059af=a8_0x4521;(function(_0x3b3871,_0x5384e3){const _0x2c0e57=a8_0x4521,_0x39f82d=_0x3b3871();while(!![]){try{const _0x5a15ac=-parseInt(_0x2c0e57(0xf0))/0x1*(-parseInt(_0x2c0e57(0x103))/0x2)+parseInt(_0x2c0e57(0xee))/0x3*(parseInt(_0x2c0e57(0x114))/0x4)+-parseInt(_0x2c0e57(0x110))/0x5+parseInt(_0x2c0e57(0xdb))/0x6+parseInt(_0x2c0e57(0xda))/0x7+-parseInt(_0x2c0e57(0x107))/0x8*(-parseInt(_0x2c0e57(0x101))/0x9)+parseInt(_0x2c0e57(0xf6))/0xa*(-parseInt(_0x2c0e57(0xeb))/0xb);if(_0x5a15ac===_0x5384e3)break;else _0x39f82d['push'](_0x39f82d['shift']());}catch(_0x86723e){_0x39f82d['push'](_0x39f82d['shift']());}}}(a8_0x4a3f,0xb0f88));const a8_0x1d96e2=(function(){let _0x7e7c7c=!![];return function(_0x1c802b,_0x2f4880){const _0x3d4318=_0x7e7c7c?function(){if(_0x2f4880){const _0x2b747f=_0x2f4880['apply'](_0x1c802b,arguments);return _0x2f4880=null,_0x2b747f;}}:function(){};return _0x7e7c7c=![],_0x3d4318;};}()),a8_0x28b63b=a8_0x1d96e2(this,function(){const _0x3b8016=a8_0x4521;return a8_0x28b63b['toString']()[_0x3b8016(0x119)](_0x3b8016(0x11b))[_0x3b8016(0xd6)]()[_0x3b8016(0xd9)](a8_0x28b63b)[_0x3b8016(0x119)]('(((.+)+)+)+$');});a8_0x28b63b();'use strict';var __decorate=this&&this['__decorate']||function(_0x42bf8f,_0x1071cc,_0x4091f0,_0x4e17da){const _0x2e73d5=a8_0x4521;var _0x2f1b29=arguments[_0x2e73d5(0x10c)],_0x12316e=_0x2f1b29<0x3?_0x1071cc:_0x4e17da===null?_0x4e17da=Object['getOwnPropertyDescriptor'](_0x1071cc,_0x4091f0):_0x4e17da,_0x3cec5d;if(typeof Reflect===_0x2e73d5(0x105)&&typeof Reflect[_0x2e73d5(0x116)]===_0x2e73d5(0x100))_0x12316e=Reflect[_0x2e73d5(0x116)](_0x42bf8f,_0x1071cc,_0x4091f0,_0x4e17da);else{for(var _0x556abc=_0x42bf8f[_0x2e73d5(0x10c)]-0x1;_0x556abc>=0x0;_0x556abc--)if(_0x3cec5d=_0x42bf8f[_0x556abc])_0x12316e=(_0x2f1b29<0x3?_0x3cec5d(_0x12316e):_0x2f1b29>0x3?_0x3cec5d(_0x1071cc,_0x4091f0,_0x12316e):_0x3cec5d(_0x1071cc,_0x4091f0))||_0x12316e;}return _0x2f1b29>0x3&&_0x12316e&&Object['defineProperty'](_0x1071cc,_0x4091f0,_0x12316e),_0x12316e;},__metadata=this&&this[a8_0x5059af(0x10a)]||function(_0x188000,_0x1a04e3){const _0x337879=a8_0x5059af;if(typeof Reflect===_0x337879(0x105)&&typeof Reflect['metadata']===_0x337879(0x100))return Reflect['metadata'](_0x188000,_0x1a04e3);};function a8_0x4521(_0x3dc824,_0x12ff17){const _0x31e041=a8_0x4a3f();return a8_0x4521=function(_0x28b63b,_0x1d96e2){_0x28b63b=_0x28b63b-0xd2;let _0x4a3fa8=_0x31e041[_0x28b63b];return _0x4a3fa8;},a8_0x4521(_0x3dc824,_0x12ff17);}Object[a8_0x5059af(0xf2)](exports,a8_0x5059af(0xf7),{'value':!![]}),exports[a8_0x5059af(0xef)]=void 0x0;const Joi=require(a8_0x5059af(0x111)),i18n_1=require(a8_0x5059af(0xe3)),core_1=require(a8_0x5059af(0xf9)),interface_1=require(a8_0x5059af(0xdd)),ValidatorError_1=require(a8_0x5059af(0xe9));let ValidatorService=class ValidatorService{constructor(){const _0x497515=a8_0x5059af;this[_0x497515(0xed)]={};}async[a8_0x5059af(0xd7)](){const _0x20fa37=a8_0x5059af,_0x27822f=Object['keys'](this[_0x20fa37(0xd5)]['localeTable']);_0x27822f[_0x20fa37(0x112)](_0x1cc9c7=>{const _0x1fb081=_0x20fa37;this['messages'][(0x0,i18n_1[_0x1fb081(0xe7)])(_0x1cc9c7)]=Object['fromEntries'](this[_0x1fb081(0xfd)][_0x1fb081(0xd8)](_0x1cc9c7,_0x1fb081(0xf5)));});}['getSchema'](_0x4a3306){const _0x4927e7=a8_0x5059af,_0x1d5635=(0x0,core_1[_0x4927e7(0xec)])(interface_1[_0x4927e7(0xff)],_0x4a3306);return _0x1d5635?Joi[_0x4927e7(0x105)](_0x1d5635):undefined;}[a8_0x5059af(0xf5)](_0xe1f62c,_0x43154a,_0x196823={}){const _0x5e9641=a8_0x5059af;var _0x5e0990,_0x53796b,_0xe2da53,_0x34f45c,_0x38ebea,_0x4976ee;const _0x19f40e=Joi[_0x5e9641(0xd3)](_0xe1f62c)?_0xe1f62c:this[_0x5e9641(0x113)](_0xe1f62c);if(!_0x19f40e)throw new AnnError(ValidatorError_1['ValidatorError'][_0x5e9641(0xf1)]);_0x196823[_0x5e9641(0xe6)]=Object[_0x5e9641(0xfa)]((_0x5e0990=this[_0x5e9641(0x108)]['validationOptions'])!==null&&_0x5e0990!==void 0x0?_0x5e0990:{},{'messages':this[_0x5e9641(0xed)]},_0x196823[_0x5e9641(0xe6)]||{}),_0x196823[_0x5e9641(0xe6)]['errors']=_0x196823['validationOptions'][_0x5e9641(0xe1)]||{},_0x196823['validationOptions']['errors']['language']=(0x0,i18n_1[_0x5e9641(0xe7)])(this[_0x5e9641(0xfd)][_0x5e9641(0xf4)](_0x196823[_0x5e9641(0xe6)][_0x5e9641(0xe1)][_0x5e9641(0xf8)]||_0x196823[_0x5e9641(0x118)]||this[_0x5e9641(0xd5)][_0x5e9641(0xdc)],_0x5e9641(0xf5)));const _0x17836a=_0x19f40e['validate'](_0x43154a,_0x196823[_0x5e9641(0xe6)]);if(_0x17836a===null||_0x17836a===void 0x0?void 0x0:_0x17836a[_0x5e9641(0xd4)]){if(_0x17836a[_0x5e9641(0xd4)]instanceof AnnError)throw _0x17836a[_0x5e9641(0xd4)];else{if(_0x17836a[_0x5e9641(0xd4)]instanceof Error)throw new AnnError(ValidatorError_1[_0x5e9641(0x106)]['PARAMS'],{'message':((_0x53796b=_0x17836a[_0x5e9641(0xd4)])===null||_0x53796b===void 0x0?void 0x0:_0x53796b[_0x5e9641(0xf3)])||_0x5e9641(0xe2)});else throw new AnnError(ValidatorError_1[_0x5e9641(0x106)][_0x5e9641(0xdf)],{'message':((_0x38ebea=(_0x34f45c=(_0xe2da53=_0x17836a[_0x5e9641(0xd4)])===null||_0xe2da53===void 0x0?void 0x0:_0xe2da53[_0x5e9641(0xfe)])===null||_0x34f45c===void 0x0?void 0x0:_0x34f45c[0x0])===null||_0x38ebea===void 0x0?void 0x0:_0x38ebea[_0x5e9641(0xf3)])||_0x5e9641(0xe2)});}}if(_0x17836a===null||_0x17836a===void 0x0?void 0x0:_0x17836a[_0x5e9641(0x10e)]){const _0x3b3bae=(_0x4976ee=_0x19f40e===null||_0x19f40e===void 0x0?void 0x0:_0x19f40e['$_terms'])===null||_0x4976ee===void 0x0?void 0x0:_0x4976ee[_0x5e9641(0xd2)],_0x2224dc=function(_0x61fe90,_0x8bf6bb){const _0x28f8ed=_0x5e9641;var _0x54646e,_0x13aa56,_0x5b8920,_0x6e995c,_0x483e9a,_0x299f8d,_0x24a998,_0x144045,_0xf6ef3c,_0x232acb,_0xdbc8c5;for(let _0xca6205 in _0x61fe90){if(_0x8bf6bb[(_0x54646e=_0x61fe90[_0xca6205])===null||_0x54646e===void 0x0?void 0x0:_0x54646e[_0x28f8ed(0x109)]]&&((_0x5b8920=(_0x13aa56=_0x61fe90[_0xca6205])===null||_0x13aa56===void 0x0?void 0x0:_0x13aa56[_0x28f8ed(0x10d)])===null||_0x5b8920===void 0x0?void 0x0:_0x5b8920[_0x28f8ed(0x11c)])){if(((_0x483e9a=(_0x6e995c=_0x61fe90[_0xca6205])===null||_0x6e995c===void 0x0?void 0x0:_0x6e995c[_0x28f8ed(0x10d)])===null||_0x483e9a===void 0x0?void 0x0:_0x483e9a[_0x28f8ed(0x11c)])==_0x28f8ed(0x105))_0x8bf6bb[_0x61fe90[_0xca6205]['key']]=_0x2224dc((_0x24a998=(_0x299f8d=_0x61fe90[_0xca6205])===null||_0x299f8d===void 0x0?void 0x0:_0x299f8d['schema'][_0x28f8ed(0xea)])===null||_0x24a998===void 0x0?void 0x0:_0x24a998[_0x28f8ed(0xd2)],_0x8bf6bb[_0x61fe90[_0xca6205][_0x28f8ed(0x109)]]);else{if(_0x61fe90[_0xca6205][_0x28f8ed(0x10d)]['type']==_0x28f8ed(0x10b)&&_0x17836a[_0x28f8ed(0x10e)][(_0x144045=_0x61fe90[_0xca6205])===null||_0x144045===void 0x0?void 0x0:_0x144045[_0x28f8ed(0x109)]]){const _0x10c1f1=((_0xdbc8c5=(_0x232acb=(_0xf6ef3c=_0x61fe90[_0xca6205])===null||_0xf6ef3c===void 0x0?void 0x0:_0xf6ef3c['schema'])===null||_0x232acb===void 0x0?void 0x0:_0x232acb[_0x28f8ed(0x115)])===null||_0xdbc8c5===void 0x0?void 0x0:_0xdbc8c5[_0x28f8ed(0xe5)])||_0x28f8ed(0xfb);_0x8bf6bb[_0x61fe90[_0xca6205][_0x28f8ed(0x109)]]=dayjs(_0x17836a[_0x28f8ed(0x10e)][_0x61fe90[_0xca6205][_0x28f8ed(0x109)]])[_0x28f8ed(0xe5)](_0x10c1f1);}}}}return _0x8bf6bb;};return _0x2224dc(_0x3b3bae,_0x17836a[_0x5e9641(0x10e)]);}throw new AnnError(ValidatorError_1[_0x5e9641(0x106)][_0x5e9641(0xdf)]);}};function a8_0x4a3f(){const _0x166daf=['assign','YYYY-MM-DD\x20HH:mm:ss','i18n','i18nService','details','RULES_KEY','function','963NkzeEB','design:returntype','319972AyMFUD','MidwayI18nServiceSingleton','object','ValidatorError','58544rbovhR','validatorConfig','key','__metadata','date','length','schema','value','Scope','2078350kqUrfP','joi','forEach','getSchema','3430492lpHjoT','_flags','decorate','prototype','locale','search','design:paramtypes','(((.+)+)+)+$','type','keys','isSchema','error','i18nConfig','toString','init','getLocaleMapping','constructor','397537vhDzpo','5156766swEhUQ','defaultLocale','../interface','Config','PARAMS','design:type','errors','参数验证失败','@midwayjs/i18n','Provide','format','validationOptions','formatLocale','Singleton','../exception/ValidatorError','$_terms','11VZTwEE','getClassExtendedMetadata','messages','3kcNgeS','ValidatorService','3MmQLwT','NOFIND_SCHEMA','defineProperty','message','getAvailableLocale','validator','18963170qRDvrb','__esModule','language','@midwayjs/core'];a8_0x4a3f=function(){return _0x166daf;};return a8_0x4a3f();}__decorate([(0x0,core_1[a8_0x5059af(0xde)])(a8_0x5059af(0xfc)),__metadata(a8_0x5059af(0xe0),Object)],ValidatorService[a8_0x5059af(0x117)],a8_0x5059af(0xd5),void 0x0),__decorate([(0x0,core_1[a8_0x5059af(0xde)])(a8_0x5059af(0xf5)),__metadata(a8_0x5059af(0xe0),Object)],ValidatorService[a8_0x5059af(0x117)],a8_0x5059af(0x108),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a8_0x5059af(0xe0),i18n_1[a8_0x5059af(0x104)])],ValidatorService['prototype'],'i18nService',void 0x0),__decorate([(0x0,core_1['Init'])(),__metadata(a8_0x5059af(0xe0),Function),__metadata(a8_0x5059af(0x11a),[]),__metadata(a8_0x5059af(0x102),Promise)],ValidatorService[a8_0x5059af(0x117)],a8_0x5059af(0xd7),null),ValidatorService=__decorate([(0x0,core_1[a8_0x5059af(0xe4)])(a8_0x5059af(0xf5)),(0x0,core_1[a8_0x5059af(0x10f)])(core_1['ScopeEnum'][a8_0x5059af(0xe8)])],ValidatorService),exports[a8_0x5059af(0xef)]=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.3",
|
|
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.3",
|
|
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": "53f742f4cf233511ce18594e564d31ec55133299"
|
|
30
30
|
}
|