@anncic-api/validator 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.default.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Rule.js +1 -1
- package/dist/decorator/Validator.js +1 -1
- package/dist/exception/ValidatorError.js +1 -1
- package/dist/helper/dtoHelper.js +1 -1
- package/dist/index.js +1 -1
- package/dist/interface.js +1 -1
- package/dist/service/ValidatorService.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x1eca(){const _0x58bff7=['../../locales/en_US.json','238344vODsjD','631696ZERwCp','7295585qEVEEn','toString','887620MMMiGg','24GzQfkh','60230xnAdrS','148272BSucjU','string','825013ennowq','constructor','search','90NoXxCY','apply','PARAMS','../../locales/zh_CN.json','defineProperty','781OifMJL','(((.+)+)+)+$','3xJMssE','__esModule'];a0_0x1eca=function(){return _0x58bff7;};return a0_0x1eca();}const a0_0x3b002c=a0_0x55d7;(function(_0x50b3da,_0x1760e7){const _0x107dc8=a0_0x55d7,_0x406b2b=_0x50b3da();while(!![]){try{const _0x5bca78=parseInt(_0x107dc8(0x17c))/0x1+-parseInt(_0x107dc8(0x179))/0x2+-parseInt(_0x107dc8(0x175))/0x3*(-parseInt(_0x107dc8(0x17f))/0x4)+parseInt(_0x107dc8(0x17a))/0x5+parseInt(_0x107dc8(0x17d))/0x6*(-parseInt(_0x107dc8(0x16b))/0x7)+parseInt(_0x107dc8(0x178))/0x8*(-parseInt(_0x107dc8(0x16e))/0x9)+-parseInt(_0x107dc8(0x17e))/0xa*(parseInt(_0x107dc8(0x173))/0xb);if(_0x5bca78===_0x1760e7)break;else _0x406b2b['push'](_0x406b2b['shift']());}catch(_0xc504c3){_0x406b2b['push'](_0x406b2b['shift']());}}}(a0_0x1eca,0xd4a2e));const a0_0x364205=(function(){let _0x4e74c2=!![];return function(_0x47388b,_0x44778f){const _0x3267c2=_0x4e74c2?function(){const _0x451530=a0_0x55d7;if(_0x44778f){const _0x23b393=_0x44778f[_0x451530(0x16f)](_0x47388b,arguments);return _0x44778f=null,_0x23b393;}}:function(){};return _0x4e74c2=![],_0x3267c2;};}()),a0_0x2e70da=a0_0x364205(this,function(){const _0x1f007e=a0_0x55d7;return a0_0x2e70da[_0x1f007e(0x17b)]()[_0x1f007e(0x16d)](_0x1f007e(0x174))[_0x1f007e(0x17b)]()[_0x1f007e(0x16c)](a0_0x2e70da)['search'](_0x1f007e(0x174));});a0_0x2e70da();'use strict';function a0_0x55d7(_0x49af07,_0x337f5d){const _0x240e0d=a0_0x1eca();return a0_0x55d7=function(_0x2e70da,_0x364205){_0x2e70da=_0x2e70da-0x16a;let _0x1ecac8=_0x240e0d[_0x2e70da];return _0x1ecac8;},a0_0x55d7(_0x49af07,_0x337f5d);}Object[a0_0x3b002c(0x172)](exports,a0_0x3b002c(0x176),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');exports['default']={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x3b002c(0x170)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x3b002c(0x16a)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x3b002c(0x177))},'zh_CN':{'validator':require(a0_0x3b002c(0x171))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x3a790f=a1_0x37ae;(function(_0x4f3e37,_0x18b395){const _0x57dbd7=a1_0x37ae,_0x29ea63=_0x4f3e37();while(!![]){try{const _0xbe3c15=-parseInt(_0x57dbd7(0xea))/0x1+-parseInt(_0x57dbd7(0xc6))/0x2+-parseInt(_0x57dbd7(0xb5))/0x3*(-parseInt(_0x57dbd7(0xd7))/0x4)+parseInt(_0x57dbd7(0xda))/0x5*(parseInt(_0x57dbd7(0xbf))/0x6)+-parseInt(_0x57dbd7(0xd3))/0x7*(parseInt(_0x57dbd7(0xce))/0x8)+-parseInt(_0x57dbd7(0xb0))/0x9*(-parseInt(_0x57dbd7(0xec))/0xa)+parseInt(_0x57dbd7(0xb8))/0xb*(parseInt(_0x57dbd7(0xe6))/0xc);if(_0xbe3c15===_0x18b395)break;else _0x29ea63['push'](_0x29ea63['shift']());}catch(_0x41dc85){_0x29ea63['push'](_0x29ea63['shift']());}}}(a1_0x7350,0x7d4d3));function a1_0x37ae(_0x45dfe4,_0x5930ca){const _0x4c89d2=a1_0x7350();return a1_0x37ae=function(_0x17cafe,_0x3521a2){_0x17cafe=_0x17cafe-0xaa;let _0x7350df=_0x4c89d2[_0x17cafe];return _0x7350df;},a1_0x37ae(_0x45dfe4,_0x5930ca);}const a1_0x3521a2=(function(){let _0x20afaa=!![];return function(_0x4c0ade,_0x90e428){const _0x558471=_0x20afaa?function(){const _0x1e5f25=a1_0x37ae;if(_0x90e428){const _0x2647d2=_0x90e428[_0x1e5f25(0xc9)](_0x4c0ade,arguments);return _0x90e428=null,_0x2647d2;}}:function(){};return _0x20afaa=![],_0x558471;};}()),a1_0x17cafe=a1_0x3521a2(this,function(){const _0x39b02c=a1_0x37ae;return a1_0x17cafe[_0x39b02c(0xde)]()[_0x39b02c(0xe3)](_0x39b02c(0xcc))['toString']()[_0x39b02c(0xb1)](a1_0x17cafe)['search'](_0x39b02c(0xcc));});a1_0x17cafe();'use strict';var __decorate=this&&this[a1_0x3a790f(0xaf)]||function(_0x2d1414,_0x19c0dd,_0x4aebba,_0xcc3d6){const _0x45636e=a1_0x3a790f;var _0x22be84=arguments[_0x45636e(0xe2)],_0xc08fab=_0x22be84<0x3?_0x19c0dd:_0xcc3d6===null?_0xcc3d6=Object[_0x45636e(0xe7)](_0x19c0dd,_0x4aebba):_0xcc3d6,_0x2b7d38;if(typeof Reflect===_0x45636e(0xed)&&typeof Reflect[_0x45636e(0xba)]===_0x45636e(0xe0))_0xc08fab=Reflect[_0x45636e(0xba)](_0x2d1414,_0x19c0dd,_0x4aebba,_0xcc3d6);else{for(var _0x5bb882=_0x2d1414[_0x45636e(0xe2)]-0x1;_0x5bb882>=0x0;_0x5bb882--)if(_0x2b7d38=_0x2d1414[_0x5bb882])_0xc08fab=(_0x22be84<0x3?_0x2b7d38(_0xc08fab):_0x22be84>0x3?_0x2b7d38(_0x19c0dd,_0x4aebba,_0xc08fab):_0x2b7d38(_0x19c0dd,_0x4aebba))||_0xc08fab;}return _0x22be84>0x3&&_0xc08fab&&Object['defineProperty'](_0x19c0dd,_0x4aebba,_0xc08fab),_0xc08fab;},__metadata=this&&this[a1_0x3a790f(0xdf)]||function(_0x4b30f2,_0x22c83c){const _0x564a51=a1_0x3a790f;if(typeof Reflect===_0x564a51(0xed)&&typeof Reflect[_0x564a51(0xc8)]===_0x564a51(0xe0))return Reflect[_0x564a51(0xc8)](_0x4b30f2,_0x22c83c);};Object[a1_0x3a790f(0xb6)](exports,a1_0x3a790f(0xb7),{'value':!![]}),exports[a1_0x3a790f(0xb3)]=void 0x0;function a1_0x7350(){const _0xab58f2=['registerMethodHandler','3150430RCZxAM','propertyName','params','@midwayjs/core','toString','__metadata','function','bound\x20dispatch','length','search','Configuration','Inject','727680QtBeSb','getOwnPropertyDescriptor','target','design:type','108928cxrixQ','@anncic-api/core','503900zcWGNZ','object','req','@midwayjs/i18n','method','param','assign','__decorate','45EEIKap','constructor','MidwayDecoratorService','CustomConfiguration','locale','3YJshjZ','defineProperty','__esModule','154KHPNEq','REQUEST_OBJ_CTX_KEY','decorate','getMethodParamTypes','ValidatorService','prototype','name','6dqEuTP','splice','./service/ValidatorService','methodName','onReady','I18N_ATTR_KEY','getClassMetadata','1427014EdQUid','find','metadata','apply','getAttr','methodArgs','(((.+)+)+)+$','validator','584JOSiPe','query','getSchema','request','args','69251PxxnYh','decorator','VALIDATOR_KEY','res','1307452QyYAyA','body'];a1_0x7350=function(){return _0xab58f2;};return a1_0x7350();}const i18n_1=require(a1_0x3a790f(0xab)),core_1=require(a1_0x3a790f(0xdd)),core_2=require(a1_0x3a790f(0xdd)),interface_1=require('./interface'),ValidatorService_1=require(a1_0x3a790f(0xc1)),i18n=require(a1_0x3a790f(0xab)),anncic=require(a1_0x3a790f(0xeb)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{async[a1_0x3a790f(0xc3)](){const _0x34e3a1=a1_0x3a790f;this[_0x34e3a1(0xd4)][_0x34e3a1(0xd9)](interface_1['VALIDATOR_KEY'],_0x25ff90=>{const _0x1b582c=_0x34e3a1,_0x490422=_0x25ff90[_0x1b582c(0xc8)],_0x303ba0=(0x0,core_2[_0x1b582c(0xbb)])(_0x25ff90['target'],_0x25ff90[_0x1b582c(0xdb)]);return{'before':_0x403cbd=>{const _0x31e077=_0x1b582c;var _0x1d4d95,_0x5f4b97,_0x1425d0,_0x579916,_0x4f1fbe,_0x4633ed,_0x351600,_0x4c3998,_0x1aea10,_0x22da70,_0x5e5b05,_0x34faba,_0x3168af;const _0x52d24c=_0x403cbd[_0x31e077(0xe8)][core_1[_0x31e077(0xb9)]],_0x478800=Object[_0x31e077(0xae)]({},((_0x1d4d95=_0x52d24c===null||_0x52d24c===void 0x0?void 0x0:_0x52d24c[_0x31e077(0xd1)])===null||_0x1d4d95===void 0x0?void 0x0:_0x1d4d95[_0x31e077(0xcf)])||{},((_0x5f4b97=_0x52d24c===null||_0x52d24c===void 0x0?void 0x0:_0x52d24c[_0x31e077(0xd1)])===null||_0x5f4b97===void 0x0?void 0x0:_0x5f4b97[_0x31e077(0xd8)])||{}),_0x235cde=((0x0,core_2[_0x31e077(0xc5)])(interface_1[_0x31e077(0xd5)],_0x403cbd[_0x31e077(0xe8)])||[])[_0x31e077(0xc7)](_0x5ae5ee=>_0x5ae5ee[_0x31e077(0xac)]==_0x403cbd[_0x31e077(0xc2)]);!(_0x490422===null||_0x490422===void 0x0?void 0x0:_0x490422[_0x31e077(0xb4)])&&_0x52d24c&&_0x52d24c[_0x31e077(0xca)]&&(_0x490422['locale']=_0x52d24c[_0x31e077(0xca)](i18n_1[_0x31e077(0xc4)]));for(let _0x34a5b9=0x0;_0x34a5b9<_0x303ba0[_0x31e077(0xe2)];_0x34a5b9++){const _0x176c52=_0x303ba0[_0x34a5b9],_0x25ed2c=this['ValidatorService'][_0x31e077(0xd0)](_0x176c52);if(_0x25ed2c){if(typeof _0x403cbd[_0x31e077(0xd2)][_0x34a5b9]=='undefined'||((_0x1425d0=_0x403cbd['args'][_0x34a5b9])===null||_0x1425d0===void 0x0?void 0x0:_0x1425d0[_0x31e077(0xd1)])&&((_0x579916=_0x403cbd[_0x31e077(0xd2)][_0x34a5b9])===null||_0x579916===void 0x0?void 0x0:_0x579916[_0x31e077(0xd6)])&&((_0x4f1fbe=_0x403cbd[_0x31e077(0xd2)][_0x34a5b9])===null||_0x4f1fbe===void 0x0?void 0x0:_0x4f1fbe[_0x31e077(0xaa)]))_0x403cbd[_0x31e077(0xd2)][_0x34a5b9]=_0x478800;else((_0x4633ed=_0x403cbd[_0x31e077(0xd2)][_0x34a5b9])===null||_0x4633ed===void 0x0?void 0x0:_0x4633ed[_0x31e077(0xbe)])==_0x31e077(0xe1)&&_0x403cbd['args'][_0x31e077(0xc0)](_0x34a5b9,0x0,_0x478800);const _0x8b96d1=this['ValidatorService'][_0x31e077(0xcd)](_0x25ed2c,_0x403cbd['args'][_0x34a5b9],_0x490422);_0x8b96d1&&(_0x403cbd['args'][_0x34a5b9]=_0x8b96d1);}else{if((_0x235cde===null||_0x235cde===void 0x0?void 0x0:_0x235cde['methodArgs'][_0x34a5b9])&&((_0x351600=_0x403cbd[_0x31e077(0xd2)][_0x34a5b9])===null||_0x351600===void 0x0?void 0x0:_0x351600[_0x31e077(0xdc)])&&typeof _0x403cbd['args'][_0x34a5b9][_0x31e077(0xad)]=='function'&&((_0x4c3998=_0x52d24c===null||_0x52d24c===void 0x0?void 0x0:_0x52d24c[_0x31e077(0xdc)])===null||_0x4c3998===void 0x0?void 0x0:_0x4c3998[_0x235cde[_0x31e077(0xcb)][_0x34a5b9]]))_0x403cbd[_0x31e077(0xd2)][_0x34a5b9]=_0x176c52((_0x1aea10=_0x52d24c===null||_0x52d24c===void 0x0?void 0x0:_0x52d24c[_0x31e077(0xdc)])===null||_0x1aea10===void 0x0?void 0x0:_0x1aea10[_0x235cde[_0x31e077(0xcb)][_0x34a5b9]]);else(_0x235cde===null||_0x235cde===void 0x0?void 0x0:_0x235cde[_0x31e077(0xcb)][_0x34a5b9])&&((_0x5e5b05=(_0x22da70=_0x403cbd[_0x31e077(0xd2)][_0x34a5b9])===null||_0x22da70===void 0x0?void 0x0:_0x22da70[_0x31e077(0xdc)])===null||_0x5e5b05===void 0x0?void 0x0:_0x5e5b05[_0x235cde['methodArgs'][_0x34a5b9]])&&(_0x403cbd[_0x31e077(0xd2)][_0x34a5b9]=(_0x3168af=(_0x34faba=_0x403cbd[_0x31e077(0xd2)][_0x34a5b9])===null||_0x34faba===void 0x0?void 0x0:_0x34faba[_0x31e077(0xdc)])===null||_0x3168af===void 0x0?void 0x0:_0x3168af[_0x235cde['methodArgs'][_0x34a5b9]]);}}},'afterThrow':(_0x305354,_0x797bc5)=>{throw _0x797bc5;}};});}};__decorate([(0x0,core_2[a1_0x3a790f(0xe5)])(),__metadata(a1_0x3a790f(0xe9),core_1[a1_0x3a790f(0xb2)])],CustomConfiguration[a1_0x3a790f(0xbd)],a1_0x3a790f(0xd4),void 0x0),__decorate([(0x0,core_2[a1_0x3a790f(0xe5)])(),__metadata(a1_0x3a790f(0xe9),ValidatorService_1[a1_0x3a790f(0xbc)])],CustomConfiguration[a1_0x3a790f(0xbd)],'ValidatorService',void 0x0),CustomConfiguration=__decorate([(0x0,core_2[a1_0x3a790f(0xe4)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':'anncic-api:validator','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x3a790f(0xb3)]=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x1d836a=a2_0x5d9b;function a2_0x5d9b(_0x4bcf0f,_0x3e4897){const _0x3ec9f1=a2_0x4471();return a2_0x5d9b=function(_0x11c7c5,_0xf8bb12){_0x11c7c5=_0x11c7c5-0x1b5;let _0x447121=_0x3ec9f1[_0x11c7c5];return _0x447121;},a2_0x5d9b(_0x4bcf0f,_0x3e4897);}(function(_0x28163f,_0x3e9251){const _0xeaa4b3=a2_0x5d9b,_0x46e365=_0x28163f();while(!![]){try{const _0x2f9c99=parseInt(_0xeaa4b3(0x1ce))/0x1+-parseInt(_0xeaa4b3(0x1d0))/0x2*(parseInt(_0xeaa4b3(0x1d5))/0x3)+-parseInt(_0xeaa4b3(0x1bc))/0x4*(-parseInt(_0xeaa4b3(0x1cb))/0x5)+-parseInt(_0xeaa4b3(0x1bf))/0x6+-parseInt(_0xeaa4b3(0x1c5))/0x7*(parseInt(_0xeaa4b3(0x1c7))/0x8)+-parseInt(_0xeaa4b3(0x1ba))/0x9*(parseInt(_0xeaa4b3(0x1d2))/0xa)+-parseInt(_0xeaa4b3(0x1b8))/0xb*(-parseInt(_0xeaa4b3(0x1cf))/0xc);if(_0x2f9c99===_0x3e9251)break;else _0x46e365['push'](_0x46e365['shift']());}catch(_0x59a11d){_0x46e365['push'](_0x46e365['shift']());}}}(a2_0x4471,0x4ead0));const a2_0xf8bb12=(function(){let _0x4a5ab4=!![];return function(_0xa033f9,_0x3892bb){const _0x35b4b2=_0x4a5ab4?function(){if(_0x3892bb){const _0x4f3172=_0x3892bb['apply'](_0xa033f9,arguments);return _0x3892bb=null,_0x4f3172;}}:function(){};return _0x4a5ab4=![],_0x35b4b2;};}()),a2_0x11c7c5=a2_0xf8bb12(this,function(){const _0x54145a=a2_0x5d9b;return a2_0x11c7c5['toString']()[_0x54145a(0x1d1)](_0x54145a(0x1bb))['toString']()[_0x54145a(0x1ca)](a2_0x11c7c5)['search'](_0x54145a(0x1bb));});a2_0x11c7c5();'use strict';function a2_0x4471(){const _0x10d8f1=['1530LDukYV','attachClassMetadata','array','6JFFFAq','@midwayjs/core','meta','object','name','1761551NOheqh','items','31509SmJqKO','(((.+)+)+)+$','40Vrxjmo','RuleType','label','1112952eUZutw','function','isSchema','keys','Array','description','98slpIZp','RULES_KEY','26552GMlVix','@joi/date','getClassMetadata','constructor','114260VGNPYT','Rule','__esModule','503427WcqwhO','72rtgXoo','602926aSXSOt','search'];a2_0x4471=function(){return _0x10d8f1;};return a2_0x4471();}Object['defineProperty'](exports,a2_0x1d836a(0x1cd),{'value':!![]}),exports[a2_0x1d836a(0x1cc)]=exports[a2_0x1d836a(0x1bd)]=void 0x0;const joi=require('joi'),date_1=require(a2_0x1d836a(0x1c8)),core_1=require(a2_0x1d836a(0x1d6)),interface_1=require('../interface');exports[a2_0x1d836a(0x1bd)]=joi['extend'](date_1['default']);function Rule(_0x4475c8,_0x4326a9,_0x4e4c0c=''){return(_0x5742f5,_0x18e869)=>{const _0x258924=a2_0x5d9b;var _0x2ef612;if(_0x18e869)!joi[_0x258924(0x1c1)](_0x4326a9)&&(_0x4326a9===null||_0x4326a9===void 0x0?void 0x0:_0x4326a9[_0x258924(0x1b7)])&&(_0x4326a9=joi[_0x258924(0x1b6)]((0x0,core_1[_0x258924(0x1c9)])(interface_1['RULES_KEY'],_0x4326a9))[_0x258924(0x1b5)]({'id':_0x4326a9[_0x258924(0x1b7)]}),(0x0,core_1['getPropertyType'])(_0x5742f5,_0x18e869)[_0x258924(0x1b7)]===_0x258924(0x1c3)&&(_0x4326a9=joi[_0x258924(0x1d4)]()[_0x258924(0x1b9)](_0x4326a9))),joi[_0x258924(0x1c1)](_0x4326a9)&&(_0x4475c8&&typeof(_0x4326a9===null||_0x4326a9===void 0x0?void 0x0:_0x4326a9[_0x258924(0x1be)])==_0x258924(0x1c0)&&(_0x4326a9=_0x4326a9[_0x258924(0x1be)](_0x4475c8)),_0x4e4c0c&&typeof(_0x4326a9===null||_0x4326a9===void 0x0?void 0x0:_0x4326a9[_0x258924(0x1c4)])==_0x258924(0x1c0)&&(_0x4326a9=_0x4326a9['description'](_0x4e4c0c)),(0x0,core_1[_0x258924(0x1d3)])(interface_1[_0x258924(0x1c6)],_0x4326a9,_0x5742f5,_0x18e869));else{const _0x222d5c=(0x0,core_1[_0x258924(0x1c9)])(interface_1[_0x258924(0x1c6)],_0x4326a9);if(_0x222d5c){let _0x4dcad5=(_0x2ef612=(0x0,core_1[_0x258924(0x1c9)])(interface_1[_0x258924(0x1c6)],_0x5742f5))!==null&&_0x2ef612!==void 0x0?_0x2ef612:{};Object[_0x258924(0x1c2)](_0x222d5c)['map'](_0xc366e4=>{!_0x4dcad5[_0xc366e4]&&(_0x4dcad5[_0xc366e4]=_0x222d5c[_0xc366e4]);}),(0x0,core_1['saveClassMetadata'])(interface_1[_0x258924(0x1c6)],_0x4dcad5,_0x5742f5);}}};}exports[a2_0x1d836a(0x1cc)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x930805=a3_0x35e8;(function(_0x4e2108,_0x1f6f30){const _0x45d6f6=a3_0x35e8,_0xd08518=_0x4e2108();while(!![]){try{const _0x2856d8=parseInt(_0x45d6f6(0x105))/0x1+parseInt(_0x45d6f6(0x10a))/0x2+-parseInt(_0x45d6f6(0xfb))/0x3*(parseInt(_0x45d6f6(0xfd))/0x4)+-parseInt(_0x45d6f6(0x107))/0x5+-parseInt(_0x45d6f6(0xfc))/0x6+-parseInt(_0x45d6f6(0xf4))/0x7*(parseInt(_0x45d6f6(0x106))/0x8)+parseInt(_0x45d6f6(0x102))/0x9;if(_0x2856d8===_0x1f6f30)break;else _0xd08518['push'](_0xd08518['shift']());}catch(_0xd99808){_0xd08518['push'](_0xd08518['shift']());}}}(a3_0x594e,0x3d11c));function a3_0x35e8(_0x269151,_0x516f5b){const _0x175bc5=a3_0x594e();return a3_0x35e8=function(_0x4642e6,_0x1a99f9){_0x4642e6=_0x4642e6-0xf4;let _0x594e4b=_0x175bc5[_0x4642e6];return _0x594e4b;},a3_0x35e8(_0x269151,_0x516f5b);}const a3_0x1a99f9=(function(){let _0x4dd73a=!![];return function(_0x29576d,_0xbabb51){const _0x10f825=_0x4dd73a?function(){if(_0xbabb51){const _0x467dda=_0xbabb51['apply'](_0x29576d,arguments);return _0xbabb51=null,_0x467dda;}}:function(){};return _0x4dd73a=![],_0x10f825;};}()),a3_0x4642e6=a3_0x1a99f9(this,function(){const _0x38f254=a3_0x35e8;return a3_0x4642e6[_0x38f254(0x109)]()['search']('(((.+)+)+)+$')[_0x38f254(0x109)]()['constructor'](a3_0x4642e6)[_0x38f254(0xf8)](_0x38f254(0xf7));});a3_0x4642e6();'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a3_0x930805(0x108)]=exports[a3_0x930805(0x101)]=void 0x0;function a3_0x594e(){const _0x4c25c2=['Validator','8086383nhSpHw','VALIDATOR_KEY','../interface','56639kKHOhB','8SoUZFW','882790dJhaWH','getFuncArgs','toString','475040NMuxLo','function','1940701TXtsNl','constructor','match','(((.+)+)+)+$','search','@midwayjs/core','indexOf','3NWvGTB','112470UqVIDP','1879840rtxxqu','replace','slice','prototype'];a3_0x594e=function(){return _0x4c25c2;};return a3_0x594e();}const core_1=require(a3_0x930805(0xf9)),interface_1=require(a3_0x930805(0x104));function Validator(_0x558fb1={}){return(_0x3daf6a,_0x5d2bd6,_0x1b0526)=>{const _0x167896=a3_0x35e8,_0xe10273=getFuncArgs(_0x3daf6a[_0x5d2bd6]);(0x0,core_1['attachClassMetadata'])(interface_1['VALIDATOR_KEY'],{'method':_0x5d2bd6,'methodArgs':_0xe10273},_0x3daf6a),(0x0,core_1['createCustomMethodDecorator'])(interface_1[_0x167896(0x103)],_0x558fb1)(_0x3daf6a,_0x5d2bd6,_0x1b0526);};}exports[a3_0x930805(0x101)]=Validator;function getFuncArgs(_0x5a8865){const _0x1aa6db=a3_0x930805;if(typeof _0x5a8865==_0x1aa6db(0x10b)){const _0x1b4341=/=>.*$/mg,_0x36b371=/=[^,)]+/mg,_0x198844=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x43c215=(_0x5a8865[_0x1aa6db(0x100)]?_0x5a8865[_0x1aa6db(0x100)][_0x1aa6db(0xf5)]['toString']():_0x5a8865[_0x1aa6db(0x109)]())[_0x1aa6db(0xfe)](_0x198844,'')[_0x1aa6db(0xfe)](_0x1b4341,'')[_0x1aa6db(0xfe)](_0x36b371,''),_0x71cdb=_0x43c215[_0x1aa6db(0xff)](_0x43c215[_0x1aa6db(0xfa)]('(')+0x1,_0x43c215['indexOf'](')'))[_0x1aa6db(0xf6)](/([^\s,]+)/g)||[];return _0x71cdb;}}exports[a3_0x930805(0x108)]=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a4_0x3db8(_0x530454,_0x16e4ca){var _0x2423bc=a4_0x9df6();return a4_0x3db8=function(_0x3c301c,_0x2abef0){_0x3c301c=_0x3c301c-0x199;var _0x9df6a5=_0x2423bc[_0x3c301c];return _0x9df6a5;},a4_0x3db8(_0x530454,_0x16e4ca);}var a4_0x558561=a4_0x3db8;(function(_0xaf0a32,_0x5486e6){var _0x1b80d8=a4_0x3db8,_0x4aed99=_0xaf0a32();while(!![]){try{var _0x28dbed=parseInt(_0x1b80d8(0x1b5))/0x1+parseInt(_0x1b80d8(0x19f))/0x2*(parseInt(_0x1b80d8(0x19e))/0x3)+parseInt(_0x1b80d8(0x1ad))/0x4+parseInt(_0x1b80d8(0x1a4))/0x5*(-parseInt(_0x1b80d8(0x19a))/0x6)+parseInt(_0x1b80d8(0x1a5))/0x7+parseInt(_0x1b80d8(0x1a0))/0x8+-parseInt(_0x1b80d8(0x1a6))/0x9*(parseInt(_0x1b80d8(0x1a8))/0xa);if(_0x28dbed===_0x5486e6)break;else _0x4aed99['push'](_0x4aed99['shift']());}catch(_0x1686c5){_0x4aed99['push'](_0x4aed99['shift']());}}}(a4_0x9df6,0xb1b3b));var a4_0x2abef0=(function(){var _0x29807e=!![];return function(_0x9a375d,_0x3c7813){var _0xaaba76=_0x29807e?function(){var _0x36e5dd=a4_0x3db8;if(_0x3c7813){var _0x50411b=_0x3c7813[_0x36e5dd(0x1aa)](_0x9a375d,arguments);return _0x3c7813=null,_0x50411b;}}:function(){};return _0x29807e=![],_0xaaba76;};}()),a4_0x3c301c=a4_0x2abef0(this,function(){var _0x6ee8ee=a4_0x3db8;return a4_0x3c301c[_0x6ee8ee(0x19d)]()['search'](_0x6ee8ee(0x1ae))[_0x6ee8ee(0x19d)]()[_0x6ee8ee(0x1b1)](a4_0x3c301c)[_0x6ee8ee(0x199)](_0x6ee8ee(0x1ae));});a4_0x3c301c();'use strict';function a4_0x9df6(){var _0x1c3fc9=['__decorate','@anncic-api/core','140120ighRib','(((.+)+)+)+$','参数验证失败','PARAMS','constructor','length','ValidatorError','AnnErrorMsg','543503TaFtzi','getOwnPropertyDescriptor','search','510puQRKQ','function','__metadata','toString','111ywQCmW','2092bMpEoD','5561632szplLl','NOFIND_SCHEMA','decorate','__esModule','44155hrNEhb','5685379vxdmCR','2907603dMdvjG','defineProperty','20cLfiTE','object','apply'];a4_0x9df6=function(){return _0x1c3fc9;};return a4_0x9df6();}var __decorate=this&&this[a4_0x558561(0x1ab)]||function(_0x5511e9,_0x50f472,_0x59394d,_0x2d6dc0){var _0x2367c1=a4_0x558561,_0x8d0c93=arguments[_0x2367c1(0x1b2)],_0x1466fe=_0x8d0c93<0x3?_0x50f472:_0x2d6dc0===null?_0x2d6dc0=Object[_0x2367c1(0x1b6)](_0x50f472,_0x59394d):_0x2d6dc0,_0x10ad4e;if(typeof Reflect===_0x2367c1(0x1a9)&&typeof Reflect[_0x2367c1(0x1a2)]==='function')_0x1466fe=Reflect[_0x2367c1(0x1a2)](_0x5511e9,_0x50f472,_0x59394d,_0x2d6dc0);else{for(var _0x5e8c4e=_0x5511e9['length']-0x1;_0x5e8c4e>=0x0;_0x5e8c4e--)if(_0x10ad4e=_0x5511e9[_0x5e8c4e])_0x1466fe=(_0x8d0c93<0x3?_0x10ad4e(_0x1466fe):_0x8d0c93>0x3?_0x10ad4e(_0x50f472,_0x59394d,_0x1466fe):_0x10ad4e(_0x50f472,_0x59394d))||_0x1466fe;}return _0x8d0c93>0x3&&_0x1466fe&&Object[_0x2367c1(0x1a7)](_0x50f472,_0x59394d,_0x1466fe),_0x1466fe;},__metadata=this&&this[a4_0x558561(0x19c)]||function(_0x91efec,_0x3268a4){var _0xd70465=a4_0x558561;if(typeof Reflect===_0xd70465(0x1a9)&&typeof Reflect['metadata']===_0xd70465(0x19b))return Reflect['metadata'](_0x91efec,_0x3268a4);};Object['defineProperty'](exports,a4_0x558561(0x1a3),{'value':!![]}),exports[a4_0x558561(0x1b3)]=void 0x0;const core_1=require(a4_0x558561(0x1ac));class ValidatorError extends AnnError{}ValidatorError['PARAMS']=0x18c1e,ValidatorError[a4_0x558561(0x1a1)]=0x18c1c,__decorate([(0x0,core_1[a4_0x558561(0x1b4)])(a4_0x558561(0x1af)),__metadata('design:type',Object)],ValidatorError,a4_0x558561(0x1b0),void 0x0),__decorate([(0x0,core_1[a4_0x558561(0x1b4)])(a4_0x558561(0x1af)),__metadata('design:type',Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0),exports['ValidatorError']=ValidatorError;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x1b4ffe=a5_0x5d3f;(function(_0x2aa734,_0x8aff74){const _0x3175ba=a5_0x5d3f,_0x4e94fc=_0x2aa734();while(!![]){try{const _0x1dc73b=-parseInt(_0x3175ba(0x98))/0x1+parseInt(_0x3175ba(0x9e))/0x2+parseInt(_0x3175ba(0x90))/0x3+parseInt(_0x3175ba(0xa0))/0x4+-parseInt(_0x3175ba(0x9c))/0x5*(-parseInt(_0x3175ba(0x8c))/0x6)+parseInt(_0x3175ba(0x91))/0x7+-parseInt(_0x3175ba(0x94))/0x8;if(_0x1dc73b===_0x8aff74)break;else _0x4e94fc['push'](_0x4e94fc['shift']());}catch(_0x1b2802){_0x4e94fc['push'](_0x4e94fc['shift']());}}}(a5_0x4bdc,0x978c5));const a5_0x382d7d=(function(){let _0x1649ec=!![];return function(_0x103687,_0x34a6b9){const _0x29979e=_0x1649ec?function(){const _0x2e5166=a5_0x5d3f;if(_0x34a6b9){const _0xb32a6a=_0x34a6b9[_0x2e5166(0xa1)](_0x103687,arguments);return _0x34a6b9=null,_0xb32a6a;}}:function(){};return _0x1649ec=![],_0x29979e;};}()),a5_0x1b8592=a5_0x382d7d(this,function(){const _0x2415de=a5_0x5d3f;return a5_0x1b8592[_0x2415de(0x8a)]()[_0x2415de(0x9d)](_0x2415de(0x97))[_0x2415de(0x8a)]()[_0x2415de(0x8b)](a5_0x1b8592)[_0x2415de(0x9d)](_0x2415de(0x97));});function a5_0x5d3f(_0x13fa00,_0x46f98e){const _0x118ec1=a5_0x4bdc();return a5_0x5d3f=function(_0x1b8592,_0x382d7d){_0x1b8592=_0x1b8592-0x8a;let _0x4bdcd3=_0x118ec1[_0x1b8592];return _0x4bdcd3;},a5_0x5d3f(_0x13fa00,_0x46f98e);}a5_0x1b8592();'use strict';Object[a5_0x1b4ffe(0x9a)](exports,a5_0x1b4ffe(0x8f),{'value':!![]}),exports['OmitDto']=exports[a5_0x1b4ffe(0x95)]=void 0x0;const core_1=require(a5_0x1b4ffe(0x8d)),interface_1=require(a5_0x1b4ffe(0x93));function a5_0x4bdc(){const _0x2c560d=['2533316HWCubh','apply','toString','constructor','601590yXkXfw','@midwayjs/core','RULES_KEY','__esModule','2182377aSZpwc','5312860FZVKgr','OmitDto','../interface','22462144GAqYcw','PickDto','getClassExtendedMetadata','(((.+)+)+)+$','363310tWmLlo','assign','defineProperty','saveClassMetadata','25dkSQUx','search','2341452KeMEzo','prototype'];a5_0x4bdc=function(){return _0x2c560d;};return a5_0x4bdc();}function PickDto(_0x456f58,_0x2739b9){const _0x55cbe7=a5_0x1b4ffe,_0x11a1a2=function(){};_0x11a1a2[_0x55cbe7(0x9f)]=_0x456f58[_0x55cbe7(0x9f)];const _0x15746c=(0x0,core_1[_0x55cbe7(0x96)])(interface_1[_0x55cbe7(0x8e)],_0x456f58),_0x386b8f={};for(const _0x5c81d2 of _0x2739b9){_0x15746c[_0x5c81d2]&&(_0x386b8f[_0x5c81d2]=_0x15746c[_0x5c81d2]);}return(0x0,core_1[_0x55cbe7(0x9b)])(interface_1['RULES_KEY'],_0x386b8f,_0x11a1a2),_0x11a1a2;}exports[a5_0x1b4ffe(0x95)]=PickDto;function OmitDto(_0x5674b7,_0x106fa9){const _0x34e089=a5_0x1b4ffe,_0x5b4218=function(){};_0x5b4218['prototype']=_0x5674b7[_0x34e089(0x9f)];const _0x126563=(0x0,core_1[_0x34e089(0x96)])(interface_1[_0x34e089(0x8e)],_0x5674b7),_0x43f00d=Object[_0x34e089(0x99)]({},_0x126563);for(const _0x2fefc2 of _0x106fa9){delete _0x43f00d[_0x2fefc2];}return(0x0,core_1[_0x34e089(0x9b)])(interface_1[_0x34e089(0x8e)],_0x43f00d,_0x5b4218),_0x5b4218;}exports[a5_0x1b4ffe(0x92)]=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x432687=a6_0x562e;(function(_0x4fc108,_0xfb3ce6){var _0x427d37=a6_0x562e,_0x7c770c=_0x4fc108();while(!![]){try{var _0x4d0218=parseInt(_0x427d37(0x9a))/0x1+parseInt(_0x427d37(0x9b))/0x2+parseInt(_0x427d37(0xa4))/0x3+-parseInt(_0x427d37(0x9d))/0x4*(parseInt(_0x427d37(0x92))/0x5)+parseInt(_0x427d37(0x94))/0x6+parseInt(_0x427d37(0xa2))/0x7*(-parseInt(_0x427d37(0x91))/0x8)+parseInt(_0x427d37(0x9e))/0x9*(-parseInt(_0x427d37(0x9f))/0xa);if(_0x4d0218===_0xfb3ce6)break;else _0x7c770c['push'](_0x7c770c['shift']());}catch(_0x3439ae){_0x7c770c['push'](_0x7c770c['shift']());}}}(a6_0x220d,0x441bd));var a6_0x29edbe=(function(){var _0x1d9e16=!![];return function(_0x5402ac,_0x2d5033){var _0x3c9b42=_0x1d9e16?function(){var _0x2f28a3=a6_0x562e;if(_0x2d5033){var _0x1746cd=_0x2d5033[_0x2f28a3(0x8e)](_0x5402ac,arguments);return _0x2d5033=null,_0x1746cd;}}:function(){};return _0x1d9e16=![],_0x3c9b42;};}()),a6_0x4780d9=a6_0x29edbe(this,function(){var _0x300d7=a6_0x562e;return a6_0x4780d9[_0x300d7(0x8a)]()[_0x300d7(0x8c)](_0x300d7(0xa1))['toString']()[_0x300d7(0x99)](a6_0x4780d9)['search'](_0x300d7(0xa1));});a6_0x4780d9();'use strict';var __createBinding=this&&this[a6_0x432687(0x86)]||(Object[a6_0x432687(0xa3)]?function(_0x1c9787,_0x28a0f8,_0x35460b,_0x3e8ca9){var _0x33d728=a6_0x432687;if(_0x3e8ca9===undefined)_0x3e8ca9=_0x35460b;var _0x343591=Object[_0x33d728(0x95)](_0x28a0f8,_0x35460b);(!_0x343591||('get'in _0x343591?!_0x28a0f8[_0x33d728(0x98)]:_0x343591[_0x33d728(0x8f)]||_0x343591[_0x33d728(0x89)]))&&(_0x343591={'enumerable':!![],'get':function(){return _0x28a0f8[_0x35460b];}}),Object[_0x33d728(0x93)](_0x1c9787,_0x3e8ca9,_0x343591);}:function(_0x16e9b3,_0x5a0106,_0x8e3f6a,_0x1c87bf){if(_0x1c87bf===undefined)_0x1c87bf=_0x8e3f6a;_0x16e9b3[_0x1c87bf]=_0x5a0106[_0x8e3f6a];}),__exportStar=this&&this[a6_0x432687(0xa5)]||function(_0x472392,_0xbc19d0){var _0x2c18b5=a6_0x432687;for(var _0x5ac5c2 in _0x472392)if(_0x5ac5c2!=='default'&&!Object['prototype']['hasOwnProperty'][_0x2c18b5(0x87)](_0xbc19d0,_0x5ac5c2))__createBinding(_0xbc19d0,_0x472392,_0x5ac5c2);};Object['defineProperty'](exports,a6_0x432687(0x98),{'value':!![]}),exports[a6_0x432687(0x84)]=exports['ValidatorService']=exports['ValidatorError']=exports[a6_0x432687(0x90)]=exports[a6_0x432687(0x97)]=exports[a6_0x432687(0x88)]=void 0x0,__exportStar(require(a6_0x432687(0x85)),exports),__exportStar(require('./helper/dtoHelper'),exports);function a6_0x220d(){var _0x4a1d6d=['./decorator/Rule','Rule','__esModule','constructor','318538YSSDHD','166440WnOtWu','ValidatorError','12fbbZtj','9AUHHoN','2586250gkhMMI','./configuration','(((.+)+)+)+$','385yCghwH','create','804633WBKVhe','__exportStar','Configuration','./interface','__createBinding','call','Validator','configurable','toString','./exception/ValidatorError','search','ValidatorService','apply','writable','RuleType','55504AkguQf','199765FXtZpb','defineProperty','2214468WBpjUK','getOwnPropertyDescriptor'];a6_0x220d=function(){return _0x4a1d6d;};return a6_0x220d();}var Validator_1=require('./decorator/Validator');Object[a6_0x432687(0x93)](exports,a6_0x432687(0x88),{'enumerable':!![],'get':function(){var _0x2c6f36=a6_0x432687;return Validator_1[_0x2c6f36(0x88)];}});var Rule_1=require(a6_0x432687(0x96));Object[a6_0x432687(0x93)](exports,a6_0x432687(0x97),{'enumerable':!![],'get':function(){var _0x3f7625=a6_0x432687;return Rule_1[_0x3f7625(0x97)];}}),Object[a6_0x432687(0x93)](exports,a6_0x432687(0x90),{'enumerable':!![],'get':function(){var _0x7440ba=a6_0x432687;return Rule_1[_0x7440ba(0x90)];}});var ValidatorError_1=require(a6_0x432687(0x8b));Object[a6_0x432687(0x93)](exports,a6_0x432687(0x9c),{'enumerable':!![],'get':function(){return ValidatorError_1['ValidatorError'];}});var ValidatorService_1=require('./service/ValidatorService');Object[a6_0x432687(0x93)](exports,a6_0x432687(0x8d),{'enumerable':!![],'get':function(){return ValidatorService_1['ValidatorService'];}});function a6_0x562e(_0x32df4b,_0x5b8abf){var _0x197e06=a6_0x220d();return a6_0x562e=function(_0x4780d9,_0x29edbe){_0x4780d9=_0x4780d9-0x84;var _0x220d0a=_0x197e06[_0x4780d9];return _0x220d0a;},a6_0x562e(_0x32df4b,_0x5b8abf);}var configuration_1=require(a6_0x432687(0xa0));Object[a6_0x432687(0x93)](exports,a6_0x432687(0x84),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x41aa12=a7_0x5a81;(function(_0x16dbaa,_0x107161){var _0x3c5e48=a7_0x5a81,_0x1c742c=_0x16dbaa();while(!![]){try{var _0x1d0aa2=-parseInt(_0x3c5e48(0xe4))/0x1+parseInt(_0x3c5e48(0xdc))/0x2*(-parseInt(_0x3c5e48(0xed))/0x3)+-parseInt(_0x3c5e48(0xdf))/0x4*(parseInt(_0x3c5e48(0xde))/0x5)+parseInt(_0x3c5e48(0xe1))/0x6*(-parseInt(_0x3c5e48(0xe8))/0x7)+-parseInt(_0x3c5e48(0xe3))/0x8+-parseInt(_0x3c5e48(0xe2))/0x9+parseInt(_0x3c5e48(0xeb))/0xa*(parseInt(_0x3c5e48(0xe0))/0xb);if(_0x1d0aa2===_0x107161)break;else _0x1c742c['push'](_0x1c742c['shift']());}catch(_0x41872b){_0x1c742c['push'](_0x1c742c['shift']());}}}(a7_0xec64,0x744dc));var a7_0x3a832d=(function(){var _0x14081d=!![];return function(_0x2a3cff,_0x584ab0){var _0x29f2c7=_0x14081d?function(){if(_0x584ab0){var _0x416350=_0x584ab0['apply'](_0x2a3cff,arguments);return _0x584ab0=null,_0x416350;}}:function(){};return _0x14081d=![],_0x29f2c7;};}()),a7_0x1b0bd3=a7_0x3a832d(this,function(){var _0x4c11a9=a7_0x5a81;return a7_0x1b0bd3[_0x4c11a9(0xdb)]()[_0x4c11a9(0xe7)](_0x4c11a9(0xec))[_0x4c11a9(0xdb)]()['constructor'](a7_0x1b0bd3)[_0x4c11a9(0xe7)]('(((.+)+)+)+$');});a7_0x1b0bd3();function a7_0x5a81(_0x596725,_0x3c575a){var _0x55fda3=a7_0xec64();return a7_0x5a81=function(_0x1b0bd3,_0x3a832d){_0x1b0bd3=_0x1b0bd3-0xdb;var _0xec640d=_0x55fda3[_0x1b0bd3];return _0xec640d;},a7_0x5a81(_0x596725,_0x3c575a);}'use strict';function a7_0xec64(){var _0x28ffed=['VALIDATOR_KEY','anncic-api:validator:validator','325630KRioxK','(((.+)+)+)+$','609soVKXB','toString','2676BjzsAR','__esModule','1582795ZnAEvO','12OICeAQ','1474UWMYIU','164826VopXWQ','7354026HjFKoT','4080360WwdIuQ','899076xrCNHE','defineProperty','RULES_KEY','search','112SExsoV'];a7_0xec64=function(){return _0x28ffed;};return a7_0xec64();}Object[a7_0x41aa12(0xe5)](exports,a7_0x41aa12(0xdd),{'value':!![]}),exports[a7_0x41aa12(0xe9)]=exports['RULES_KEY']=void 0x0,exports[a7_0x41aa12(0xe6)]='anncic-api:validator:rules',exports[a7_0x41aa12(0xe9)]=a7_0x41aa12(0xea);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x151e77=a8_0x298f;(function(_0x4e8e97,_0x17c8d7){const _0xf2cdae=a8_0x298f,_0x392a83=_0x4e8e97();while(!![]){try{const _0x113ae5=-parseInt(_0xf2cdae(0x1ab))/0x1*(parseInt(_0xf2cdae(0x1b4))/0x2)+-parseInt(_0xf2cdae(0x1bb))/0x3*(parseInt(_0xf2cdae(0x1c4))/0x4)+-parseInt(_0xf2cdae(0x1da))/0x5*(-parseInt(_0xf2cdae(0x1bc))/0x6)+parseInt(_0xf2cdae(0x1a7))/0x7+parseInt(_0xf2cdae(0x19d))/0x8+-parseInt(_0xf2cdae(0x1d9))/0x9*(-parseInt(_0xf2cdae(0x1e1))/0xa)+-parseInt(_0xf2cdae(0x1dd))/0xb;if(_0x113ae5===_0x17c8d7)break;else _0x392a83['push'](_0x392a83['shift']());}catch(_0x10993d){_0x392a83['push'](_0x392a83['shift']());}}}(a8_0x46f4,0x5aca6));const a8_0x25e87a=(function(){let _0x4d19e3=!![];return function(_0x150e5c,_0x15a173){const _0x24ff25=_0x4d19e3?function(){if(_0x15a173){const _0x3608ab=_0x15a173['apply'](_0x150e5c,arguments);return _0x15a173=null,_0x3608ab;}}:function(){};return _0x4d19e3=![],_0x24ff25;};}()),a8_0xa80930=a8_0x25e87a(this,function(){const _0x1f9f7c=a8_0x298f;return a8_0xa80930[_0x1f9f7c(0x1c2)]()[_0x1f9f7c(0x1cb)](_0x1f9f7c(0x1be))[_0x1f9f7c(0x1c2)]()[_0x1f9f7c(0x1e0)](a8_0xa80930)['search'](_0x1f9f7c(0x1be));});a8_0xa80930();'use strict';var __decorate=this&&this[a8_0x151e77(0x1ca)]||function(_0x6b77d1,_0x24c287,_0xa1b612,_0x5b8fcb){const _0x1b4ffb=a8_0x151e77;var _0x39d362=arguments['length'],_0x422987=_0x39d362<0x3?_0x24c287:_0x5b8fcb===null?_0x5b8fcb=Object['getOwnPropertyDescriptor'](_0x24c287,_0xa1b612):_0x5b8fcb,_0x3d22f5;if(typeof Reflect==='object'&&typeof Reflect['decorate']==='function')_0x422987=Reflect[_0x1b4ffb(0x1af)](_0x6b77d1,_0x24c287,_0xa1b612,_0x5b8fcb);else{for(var _0xf991d3=_0x6b77d1[_0x1b4ffb(0x1c7)]-0x1;_0xf991d3>=0x0;_0xf991d3--)if(_0x3d22f5=_0x6b77d1[_0xf991d3])_0x422987=(_0x39d362<0x3?_0x3d22f5(_0x422987):_0x39d362>0x3?_0x3d22f5(_0x24c287,_0xa1b612,_0x422987):_0x3d22f5(_0x24c287,_0xa1b612))||_0x422987;}return _0x39d362>0x3&&_0x422987&&Object['defineProperty'](_0x24c287,_0xa1b612,_0x422987),_0x422987;},__metadata=this&&this[a8_0x151e77(0x1aa)]||function(_0x6263d7,_0x321500){const _0x17bade=a8_0x151e77;if(typeof Reflect===_0x17bade(0x1de)&&typeof Reflect[_0x17bade(0x1c6)]===_0x17bade(0x1d7))return Reflect['metadata'](_0x6263d7,_0x321500);};Object[a8_0x151e77(0x1b1)](exports,a8_0x151e77(0x1b7),{'value':!![]}),exports[a8_0x151e77(0x1b6)]=void 0x0;const Joi=require(a8_0x151e77(0x1e7)),i18n_1=require(a8_0x151e77(0x1d4)),core_1=require('@midwayjs/core'),interface_1=require(a8_0x151e77(0x1ac)),ValidatorError_1=require('../exception/ValidatorError');let ValidatorService=class ValidatorService{constructor(){const _0xe43f82=a8_0x151e77;this[_0xe43f82(0x1db)]={};}async[a8_0x151e77(0x19e)](){const _0x2eabd2=a8_0x151e77,_0x4b85ed=Object[_0x2eabd2(0x1a8)](this[_0x2eabd2(0x1b0)][_0x2eabd2(0x1a0)]);_0x4b85ed[_0x2eabd2(0x1d5)](_0x225b15=>{const _0x489395=_0x2eabd2;this['messages'][(0x0,i18n_1[_0x489395(0x1ce)])(_0x225b15)]=Object[_0x489395(0x1a5)](this[_0x489395(0x19b)][_0x489395(0x1c8)](_0x225b15,_0x489395(0x19f)));});}[a8_0x151e77(0x1cc)](_0x5043bb){const _0x294328=a8_0x151e77,_0x3a83b1=(0x0,core_1[_0x294328(0x1c1)])(interface_1[_0x294328(0x1a3)],_0x5043bb);return _0x3a83b1?Joi[_0x294328(0x1de)](_0x3a83b1):undefined;}[a8_0x151e77(0x19f)](_0x360b9e,_0x19e133,_0x2bc58d={}){const _0x291cd0=a8_0x151e77;var _0x16a734,_0x52dc7f,_0x22f325,_0xbee009,_0x5cf4be,_0x191270;const _0x5cfbd4=Joi[_0x291cd0(0x1e3)](_0x360b9e)?_0x360b9e:this['getSchema'](_0x360b9e);if(!_0x5cfbd4)throw new AnnError(ValidatorError_1[_0x291cd0(0x1a9)][_0x291cd0(0x1b8)]);_0x2bc58d[_0x291cd0(0x1c9)]=Object[_0x291cd0(0x1d1)]((_0x16a734=this['validatorConfig']['validationOptions'])!==null&&_0x16a734!==void 0x0?_0x16a734:{},{'messages':this['messages']},_0x2bc58d[_0x291cd0(0x1c9)]||{}),_0x2bc58d['validationOptions'][_0x291cd0(0x1a6)]=_0x2bc58d[_0x291cd0(0x1c9)][_0x291cd0(0x1a6)]||{},_0x2bc58d[_0x291cd0(0x1c9)]['errors'][_0x291cd0(0x1ad)]=(0x0,i18n_1[_0x291cd0(0x1ce)])(this[_0x291cd0(0x19b)][_0x291cd0(0x1b5)](_0x2bc58d['validationOptions'][_0x291cd0(0x1a6)][_0x291cd0(0x1ad)]||_0x2bc58d[_0x291cd0(0x1a4)]||this[_0x291cd0(0x1b0)]['defaultLocale'],_0x291cd0(0x19f)));const _0x59e3df=_0x5cfbd4[_0x291cd0(0x1ba)](_0x19e133,_0x2bc58d['validationOptions']);if(_0x59e3df===null||_0x59e3df===void 0x0?void 0x0:_0x59e3df['error']){if(_0x59e3df[_0x291cd0(0x1b9)]instanceof AnnError)throw _0x59e3df[_0x291cd0(0x1b9)];else{if(_0x59e3df[_0x291cd0(0x1b9)]instanceof Error)throw new AnnError(ValidatorError_1['ValidatorError']['PARAMS'],{'message':((_0x52dc7f=_0x59e3df[_0x291cd0(0x1b9)])===null||_0x52dc7f===void 0x0?void 0x0:_0x52dc7f['message'])||_0x291cd0(0x1d0)});else throw new AnnError(ValidatorError_1[_0x291cd0(0x1a9)][_0x291cd0(0x1e4)],{'message':((_0x5cf4be=(_0xbee009=(_0x22f325=_0x59e3df[_0x291cd0(0x1b9)])===null||_0x22f325===void 0x0?void 0x0:_0x22f325[_0x291cd0(0x1c3)])===null||_0xbee009===void 0x0?void 0x0:_0xbee009[0x0])===null||_0x5cf4be===void 0x0?void 0x0:_0x5cf4be[_0x291cd0(0x1d3)])||_0x291cd0(0x1d0)});}}if(_0x59e3df===null||_0x59e3df===void 0x0?void 0x0:_0x59e3df[_0x291cd0(0x1bd)]){const _0x4e45ed=(_0x191270=_0x5cfbd4===null||_0x5cfbd4===void 0x0?void 0x0:_0x5cfbd4[_0x291cd0(0x1a2)])===null||_0x191270===void 0x0?void 0x0:_0x191270[_0x291cd0(0x1a8)],_0x5cf98e=function(_0x464c5b,_0xce9042){const _0x47a5be=_0x291cd0;var _0x32f631,_0x559bd3,_0x232373,_0x135375,_0xe3d2cf,_0x3bc7fa,_0x21f233,_0x569e6d,_0x1fc412,_0x2bf914,_0x361c36;for(let _0x330013 in _0x464c5b){if(_0xce9042[(_0x32f631=_0x464c5b[_0x330013])===null||_0x32f631===void 0x0?void 0x0:_0x32f631[_0x47a5be(0x19c)]]&&((_0x232373=(_0x559bd3=_0x464c5b[_0x330013])===null||_0x559bd3===void 0x0?void 0x0:_0x559bd3[_0x47a5be(0x1c0)])===null||_0x232373===void 0x0?void 0x0:_0x232373[_0x47a5be(0x1cf)])){if(((_0xe3d2cf=(_0x135375=_0x464c5b[_0x330013])===null||_0x135375===void 0x0?void 0x0:_0x135375[_0x47a5be(0x1c0)])===null||_0xe3d2cf===void 0x0?void 0x0:_0xe3d2cf['type'])=='object')_0xce9042[_0x464c5b[_0x330013][_0x47a5be(0x19c)]]=_0x5cf98e((_0x21f233=(_0x3bc7fa=_0x464c5b[_0x330013])===null||_0x3bc7fa===void 0x0?void 0x0:_0x3bc7fa['schema']['$_terms'])===null||_0x21f233===void 0x0?void 0x0:_0x21f233[_0x47a5be(0x1a8)],_0xce9042[_0x464c5b[_0x330013]['key']]);else{if(_0x464c5b[_0x330013][_0x47a5be(0x1c0)]['type']==_0x47a5be(0x1e6)&&_0x59e3df['value'][(_0x569e6d=_0x464c5b[_0x330013])===null||_0x569e6d===void 0x0?void 0x0:_0x569e6d[_0x47a5be(0x19c)]]){const _0x29eca6=((_0x361c36=(_0x2bf914=(_0x1fc412=_0x464c5b[_0x330013])===null||_0x1fc412===void 0x0?void 0x0:_0x1fc412[_0x47a5be(0x1c0)])===null||_0x2bf914===void 0x0?void 0x0:_0x2bf914[_0x47a5be(0x1c5)])===null||_0x361c36===void 0x0?void 0x0:_0x361c36[_0x47a5be(0x1df)])||'YYYY-MM-DD\x20HH:mm:ss';_0xce9042[_0x464c5b[_0x330013][_0x47a5be(0x19c)]]=dayjs(_0x59e3df[_0x47a5be(0x1bd)][_0x464c5b[_0x330013][_0x47a5be(0x19c)]])[_0x47a5be(0x1df)](_0x29eca6);}}}}return _0xce9042;};return _0x5cf98e(_0x4e45ed,_0x59e3df[_0x291cd0(0x1bd)]);}throw new AnnError(ValidatorError_1['ValidatorError'][_0x291cd0(0x1e4)]);}};function a8_0x298f(_0x56a258,_0x4d3fce){const _0x47f7fd=a8_0x46f4();return a8_0x298f=function(_0xa80930,_0x25e87a){_0xa80930=_0xa80930-0x19b;let _0x46f483=_0x47f7fd[_0xa80930];return _0x46f483;},a8_0x298f(_0x56a258,_0x4d3fce);}function a8_0x46f4(){const _0x4c7ff6=['messages','MidwayI18nServiceSingleton','1235641AtmGrw','object','format','constructor','9530HkpTLG','design:type','isSchema','PARAMS','ScopeEnum','date','joi','i18nService','key','1365904CqmHdj','init','validator','localeTable','Init','$_terms','RULES_KEY','locale','fromEntries','errors','351806MeEVAk','keys','ValidatorError','__metadata','1tpIMLK','../interface','language','Scope','decorate','i18nConfig','defineProperty','validatorConfig','design:returntype','680126ZLhCyg','getAvailableLocale','ValidatorService','__esModule','NOFIND_SCHEMA','error','validate','306POXzIT','4345482QVPZSx','value','(((.+)+)+)+$','prototype','schema','getClassExtendedMetadata','toString','details','6052DYhacm','_flags','metadata','length','getLocaleMapping','validationOptions','__decorate','search','getSchema','Singleton','formatLocale','type','参数验证失败','assign','design:paramtypes','message','@midwayjs/i18n','forEach','Provide','function','Config','315BgGEwd','5ahPeSQ'];a8_0x46f4=function(){return _0x4c7ff6;};return a8_0x46f4();}__decorate([(0x0,core_1['Config'])('i18n'),__metadata(a8_0x151e77(0x1e2),Object)],ValidatorService[a8_0x151e77(0x1bf)],'i18nConfig',void 0x0),__decorate([(0x0,core_1[a8_0x151e77(0x1d8)])(a8_0x151e77(0x19f)),__metadata(a8_0x151e77(0x1e2),Object)],ValidatorService[a8_0x151e77(0x1bf)],a8_0x151e77(0x1b2),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a8_0x151e77(0x1e2),i18n_1[a8_0x151e77(0x1dc)])],ValidatorService[a8_0x151e77(0x1bf)],a8_0x151e77(0x19b),void 0x0),__decorate([(0x0,core_1[a8_0x151e77(0x1a1)])(),__metadata(a8_0x151e77(0x1e2),Function),__metadata(a8_0x151e77(0x1d2),[]),__metadata(a8_0x151e77(0x1b3),Promise)],ValidatorService[a8_0x151e77(0x1bf)],a8_0x151e77(0x19e),null),ValidatorService=__decorate([(0x0,core_1[a8_0x151e77(0x1d6)])('validator'),(0x0,core_1[a8_0x151e77(0x1ae)])(core_1[a8_0x151e77(0x1e5)][a8_0x151e77(0x1cd)])],ValidatorService),exports['ValidatorService']=ValidatorService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/core": "^2.0.
|
|
20
|
+
"@anncic-api/core": "^2.0.5",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.7.0"
|
|
23
23
|
},
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"javascript-obfuscator": "^4.0.0",
|
|
27
27
|
"typescript": "^4.7.4"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "dfc34320998496c4c14ba99dfb8dcd76abbc4eda"
|
|
30
30
|
}
|