@anncic-api/validator 3.3.4 → 3.3.6
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.d.ts +3 -3
- package/dist/helper/dtoHelper.js +1 -1
- package/dist/helper/getSchema.d.ts +2 -0
- package/dist/helper/getSchema.js +1 -0
- package/dist/index.d.ts +1 -0
- 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_0x55eb14=a0_0x1ada;(function(_0x1d99c0,_0x47f400){const _0x2a9637=a0_0x1ada,_0x40c0e4=_0x1d99c0();while(!![]){try{const _0x120423=-parseInt(_0x2a9637(0x8a))/0x1*(parseInt(_0x2a9637(0x7b))/0x2)+-parseInt(_0x2a9637(0x86))/0x3+-parseInt(_0x2a9637(0x80))/0x4+-parseInt(_0x2a9637(0x8d))/0x5*(parseInt(_0x2a9637(0x87))/0x6)+-parseInt(_0x2a9637(0x7d))/0x7*(-parseInt(_0x2a9637(0x84))/0x8)+parseInt(_0x2a9637(0x88))/0x9+parseInt(_0x2a9637(0x89))/0xa*(parseInt(_0x2a9637(0x8c))/0xb);if(_0x120423===_0x47f400)break;else _0x40c0e4['push'](_0x40c0e4['shift']());}catch(_0x5ca3bc){_0x40c0e4['push'](_0x40c0e4['shift']());}}}(a0_0x3210,0x90a82));const a0_0x430d6c=(function(){let _0x7c9bbd=!![];return function(_0xb4cf3f,_0x937fe2){const _0x472130=_0x7c9bbd?function(){const _0x3089de=a0_0x1ada;if(_0x937fe2){const _0x1835ea=_0x937fe2[_0x3089de(0x78)](_0xb4cf3f,arguments);return _0x937fe2=null,_0x1835ea;}}:function(){};return _0x7c9bbd=![],_0x472130;};}()),a0_0xe955fa=a0_0x430d6c(this,function(){const _0x69803a=a0_0x1ada;return a0_0xe955fa[_0x69803a(0x8b)]()[_0x69803a(0x83)](_0x69803a(0x82))[_0x69803a(0x8b)]()[_0x69803a(0x7c)](a0_0xe955fa)['search'](_0x69803a(0x82));});function a0_0x3210(){const _0x22c10f=['ValidatorError','383616AxxmXG','2712kRgqss','7290495oiRvYA','1550LNgpei','3wdSBGy','toString','60676kKflob','5400BgWpPz','apply','defineProperty','string','213302ywqTyV','constructor','499170YqEBqb','../exception/ValidatorError','../../locales/en_US.json','4254264DStnHZ','default','(((.+)+)+)+$','search','104dXFGCB'];a0_0x3210=function(){return _0x22c10f;};return a0_0x3210();}a0_0xe955fa();'use strict';Object[a0_0x55eb14(0x79)](exports,'__esModule',{'value':!![]});const ValidatorError_1=require(a0_0x55eb14(0x7e));function a0_0x1ada(_0xb2a675,_0x275ae8){const _0x385997=a0_0x3210();return a0_0x1ada=function(_0xe955fa,_0x430d6c){_0xe955fa=_0xe955fa-0x78;let _0x3210b6=_0x385997[_0xe955fa];return _0x3210b6;},a0_0x1ada(_0xb2a675,_0x275ae8);}exports[a0_0x55eb14(0x81)]={'validator':{'errorStatus':ValidatorError_1[a0_0x55eb14(0x85)]['PARAMS'],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x55eb14(0x7a)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x55eb14(0x7f))},'zh_CN':{'validator':require('../../locales/zh_CN.json')}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a1_0x592ea4=a1_0x2521;function a1_0x251e(){const _0x54b502=['function','CustomConfiguration','prototype','VALIDATOR_KEY','decorator','decorate','__metadata','assign','params','271784hAElMI','apply','3832FCrgAB','find','ValidatorService','args','@anncic-api/core','getAttr','2854485ENMdtr','validator','MidwayDecoratorService','registerMethodHandler','517683cvvQcv','target','2824241mBkBfL','Inject','./config/config.default','12NIxlew','search','11871WgTHmv','__esModule','methodName','@midwayjs/core','object','1058068aIGkgi','locale','req','./service/ValidatorService','splice','method','@midwayjs/i18n','__decorate','methodArgs','140QReJWN','getMethodParamTypes','undefined','onReady','param','length','anncic-api:validator','toString','constructor','I18N_ATTR_KEY','./interface','metadata','4HScQvK','body','request','734286wpQTfO','(((.+)+)+)+$','bound\x20dispatch','defineProperty','getOwnPropertyDescriptor'];a1_0x251e=function(){return _0x54b502;};return a1_0x251e();}(function(_0x3d7528,_0x4c9564){const _0x477fd0=a1_0x2521,_0x5973ba=_0x3d7528();while(!![]){try{const _0x6d035e=-parseInt(_0x477fd0(0xa9))/0x1+parseInt(_0x477fd0(0x9d))/0x2+-parseInt(_0x477fd0(0x8f))/0x3*(-parseInt(_0x477fd0(0xca))/0x4)+-parseInt(_0x477fd0(0xa5))/0x5+-parseInt(_0x477fd0(0xae))/0x6*(parseInt(_0x477fd0(0xab))/0x7)+-parseInt(_0x477fd0(0x9f))/0x8*(-parseInt(_0x477fd0(0xb0))/0x9)+parseInt(_0x477fd0(0xbe))/0xa*(parseInt(_0x477fd0(0xb5))/0xb);if(_0x6d035e===_0x4c9564)break;else _0x5973ba['push'](_0x5973ba['shift']());}catch(_0x360264){_0x5973ba['push'](_0x5973ba['shift']());}}}(a1_0x251e,0x712dd));const a1_0x132c02=(function(){let _0x111c69=!![];return function(_0x28831c,_0x431f2e){const _0x431aae=_0x111c69?function(){const _0x4391e5=a1_0x2521;if(_0x431f2e){const _0x266904=_0x431f2e[_0x4391e5(0x9e)](_0x28831c,arguments);return _0x431f2e=null,_0x266904;}}:function(){};return _0x111c69=![],_0x431aae;};}()),a1_0x60296b=a1_0x132c02(this,function(){const _0x3213a6=a1_0x2521;return a1_0x60296b[_0x3213a6(0xc5)]()[_0x3213a6(0xaf)](_0x3213a6(0x90))[_0x3213a6(0xc5)]()[_0x3213a6(0xc6)](a1_0x60296b)[_0x3213a6(0xaf)](_0x3213a6(0x90));});a1_0x60296b();'use strict';function a1_0x2521(_0x28e34b,_0x570c1c){const _0xb5dbac=a1_0x251e();return a1_0x2521=function(_0x60296b,_0x132c02){_0x60296b=_0x60296b-0x8f;let _0x251e82=_0xb5dbac[_0x60296b];return _0x251e82;},a1_0x2521(_0x28e34b,_0x570c1c);}var __decorate=this&&this[a1_0x592ea4(0xbc)]||function(_0x638fea,_0x408d89,_0x5b4460,_0x1b3741){const _0x259fd6=a1_0x592ea4;var _0x331cc7=arguments[_0x259fd6(0xc3)],_0x1de019=_0x331cc7<0x3?_0x408d89:_0x1b3741===null?_0x1b3741=Object[_0x259fd6(0x93)](_0x408d89,_0x5b4460):_0x1b3741,_0x43bc48;if(typeof Reflect===_0x259fd6(0xb4)&&typeof Reflect[_0x259fd6(0x99)]===_0x259fd6(0x94))_0x1de019=Reflect[_0x259fd6(0x99)](_0x638fea,_0x408d89,_0x5b4460,_0x1b3741);else{for(var _0x30a0f4=_0x638fea[_0x259fd6(0xc3)]-0x1;_0x30a0f4>=0x0;_0x30a0f4--)if(_0x43bc48=_0x638fea[_0x30a0f4])_0x1de019=(_0x331cc7<0x3?_0x43bc48(_0x1de019):_0x331cc7>0x3?_0x43bc48(_0x408d89,_0x5b4460,_0x1de019):_0x43bc48(_0x408d89,_0x5b4460))||_0x1de019;}return _0x331cc7>0x3&&_0x1de019&&Object[_0x259fd6(0x92)](_0x408d89,_0x5b4460,_0x1de019),_0x1de019;},__metadata=this&&this[a1_0x592ea4(0x9a)]||function(_0x21abea,_0x46e9fe){const _0xbd3320=a1_0x592ea4;if(typeof Reflect===_0xbd3320(0xb4)&&typeof Reflect[_0xbd3320(0xc9)]==='function')return Reflect[_0xbd3320(0xc9)](_0x21abea,_0x46e9fe);};Object[a1_0x592ea4(0x92)](exports,a1_0x592ea4(0xb1),{'value':!![]}),exports[a1_0x592ea4(0x95)]=void 0x0;const i18n_1=require(a1_0x592ea4(0xbb)),core_1=require(a1_0x592ea4(0xb3)),core_2=require(a1_0x592ea4(0xb3)),interface_1=require(a1_0x592ea4(0xc8)),ValidatorService_1=require(a1_0x592ea4(0xb8)),i18n=require(a1_0x592ea4(0xbb)),anncic=require(a1_0x592ea4(0xa3)),ConfigDefault=require(a1_0x592ea4(0xad));let CustomConfiguration=exports[a1_0x592ea4(0x95)]=class CustomConfiguration{async[a1_0x592ea4(0xc1)](){const _0x398828=a1_0x592ea4;this[_0x398828(0x98)][_0x398828(0xa8)](interface_1[_0x398828(0x97)],_0x4a5e56=>{const _0xe215ac=_0x398828,_0x4c2593=_0x4a5e56[_0xe215ac(0xc9)],_0x1132a8=(0x0,core_2[_0xe215ac(0xbf)])(_0x4a5e56[_0xe215ac(0xaa)],_0x4a5e56['propertyName']);return{'before':_0x1e3bd8=>{const _0x15a446=_0xe215ac;var _0x16c2d5,_0x50982f,_0x4cc315,_0x2ad3d2,_0x1ea99e,_0xf4a064,_0x47a60a,_0x150405,_0x3c4d3d,_0x255761,_0xc412ec,_0x5ec965,_0x1eee0c;const _0xde810e=_0x1e3bd8[_0x15a446(0xaa)][core_1['REQUEST_OBJ_CTX_KEY']],_0x21cd4e=Object[_0x15a446(0x9b)]({},((_0x16c2d5=_0xde810e===null||_0xde810e===void 0x0?void 0x0:_0xde810e[_0x15a446(0xcc)])===null||_0x16c2d5===void 0x0?void 0x0:_0x16c2d5['query'])||{},((_0x50982f=_0xde810e===null||_0xde810e===void 0x0?void 0x0:_0xde810e[_0x15a446(0xcc)])===null||_0x50982f===void 0x0?void 0x0:_0x50982f[_0x15a446(0xcb)])||{}),_0x14f49b=((0x0,core_2['getClassMetadata'])(interface_1[_0x15a446(0x97)],_0x1e3bd8['target'])||[])[_0x15a446(0xa0)](_0x4698d3=>_0x4698d3[_0x15a446(0xba)]==_0x1e3bd8[_0x15a446(0xb2)]);!(_0x4c2593===null||_0x4c2593===void 0x0?void 0x0:_0x4c2593['locale'])&&_0xde810e&&_0xde810e['getAttr']&&(_0x4c2593[_0x15a446(0xb6)]=_0xde810e[_0x15a446(0xa4)](i18n_1[_0x15a446(0xc7)]));for(let _0x23bf62=0x0;_0x23bf62<_0x1132a8[_0x15a446(0xc3)];_0x23bf62++){const _0x31413e=_0x1132a8[_0x23bf62],_0x2edf17=this[_0x15a446(0xa1)]['getSchema'](_0x31413e);if(_0x2edf17){if(typeof _0x1e3bd8[_0x15a446(0xa2)][_0x23bf62]==_0x15a446(0xc0)||((_0x4cc315=_0x1e3bd8[_0x15a446(0xa2)][_0x23bf62])===null||_0x4cc315===void 0x0?void 0x0:_0x4cc315['request'])&&((_0x2ad3d2=_0x1e3bd8[_0x15a446(0xa2)][_0x23bf62])===null||_0x2ad3d2===void 0x0?void 0x0:_0x2ad3d2['res'])&&((_0x1ea99e=_0x1e3bd8['args'][_0x23bf62])===null||_0x1ea99e===void 0x0?void 0x0:_0x1ea99e[_0x15a446(0xb7)]))_0x1e3bd8['args'][_0x23bf62]=_0x21cd4e;else((_0xf4a064=_0x1e3bd8[_0x15a446(0xa2)][_0x23bf62])===null||_0xf4a064===void 0x0?void 0x0:_0xf4a064['name'])==_0x15a446(0x91)&&_0x1e3bd8[_0x15a446(0xa2)][_0x15a446(0xb9)](_0x23bf62,0x0,_0x21cd4e);const _0x2de0c4=this[_0x15a446(0xa1)][_0x15a446(0xa6)](_0x2edf17,_0x1e3bd8['args'][_0x23bf62],_0x4c2593);_0x2de0c4&&(_0x1e3bd8[_0x15a446(0xa2)][_0x23bf62]=_0x2de0c4);}else{if((_0x14f49b===null||_0x14f49b===void 0x0?void 0x0:_0x14f49b['methodArgs'][_0x23bf62])&&((_0x47a60a=_0x1e3bd8[_0x15a446(0xa2)][_0x23bf62])===null||_0x47a60a===void 0x0?void 0x0:_0x47a60a[_0x15a446(0x9c)])&&typeof _0x1e3bd8[_0x15a446(0xa2)][_0x23bf62][_0x15a446(0xc2)]==_0x15a446(0x94)&&((_0x150405=_0xde810e===null||_0xde810e===void 0x0?void 0x0:_0xde810e[_0x15a446(0x9c)])===null||_0x150405===void 0x0?void 0x0:_0x150405[_0x14f49b[_0x15a446(0xbd)][_0x23bf62]]))_0x1e3bd8['args'][_0x23bf62]=_0x31413e((_0x3c4d3d=_0xde810e===null||_0xde810e===void 0x0?void 0x0:_0xde810e[_0x15a446(0x9c)])===null||_0x3c4d3d===void 0x0?void 0x0:_0x3c4d3d[_0x14f49b[_0x15a446(0xbd)][_0x23bf62]]);else(_0x14f49b===null||_0x14f49b===void 0x0?void 0x0:_0x14f49b[_0x15a446(0xbd)][_0x23bf62])&&((_0xc412ec=(_0x255761=_0x1e3bd8[_0x15a446(0xa2)][_0x23bf62])===null||_0x255761===void 0x0?void 0x0:_0x255761[_0x15a446(0x9c)])===null||_0xc412ec===void 0x0?void 0x0:_0xc412ec[_0x14f49b[_0x15a446(0xbd)][_0x23bf62]])&&(_0x1e3bd8['args'][_0x23bf62]=(_0x1eee0c=(_0x5ec965=_0x1e3bd8[_0x15a446(0xa2)][_0x23bf62])===null||_0x5ec965===void 0x0?void 0x0:_0x5ec965[_0x15a446(0x9c)])===null||_0x1eee0c===void 0x0?void 0x0:_0x1eee0c[_0x14f49b['methodArgs'][_0x23bf62]]);}}},'afterThrow':(_0x24b1be,_0x4d3b4d)=>{throw _0x4d3b4d;}};});}};__decorate([(0x0,core_2[a1_0x592ea4(0xac)])(),__metadata('design:type',core_1[a1_0x592ea4(0xa7)])],CustomConfiguration[a1_0x592ea4(0x96)],a1_0x592ea4(0x98),void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata('design:type',ValidatorService_1[a1_0x592ea4(0xa1)])],CustomConfiguration[a1_0x592ea4(0x96)],a1_0x592ea4(0xa1),void 0x0),exports[a1_0x592ea4(0x95)]=CustomConfiguration=__decorate([(0x0,core_2['Configuration'])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x592ea4(0xc4),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a2_0x23b828=a2_0x5c74;function a2_0x5c74(_0x2edd42,_0x502b5d){const _0x31e754=a2_0x7ada();return a2_0x5c74=function(_0x1e02b1,_0x1f126c){_0x1e02b1=_0x1e02b1-0xf8;let _0x7ada36=_0x31e754[_0x1e02b1];return _0x7ada36;},a2_0x5c74(_0x2edd42,_0x502b5d);}(function(_0x138f12,_0x4e1857){const _0x4e5947=a2_0x5c74,_0xedff23=_0x138f12();while(!![]){try{const _0x38a526=-parseInt(_0x4e5947(0x104))/0x1*(-parseInt(_0x4e5947(0x110))/0x2)+-parseInt(_0x4e5947(0xfd))/0x3+-parseInt(_0x4e5947(0x119))/0x4+parseInt(_0x4e5947(0x107))/0x5*(-parseInt(_0x4e5947(0x111))/0x6)+parseInt(_0x4e5947(0x115))/0x7*(parseInt(_0x4e5947(0x10d))/0x8)+-parseInt(_0x4e5947(0x10b))/0x9*(parseInt(_0x4e5947(0x106))/0xa)+parseInt(_0x4e5947(0xf9))/0xb;if(_0x38a526===_0x4e1857)break;else _0xedff23['push'](_0xedff23['shift']());}catch(_0x3fc890){_0xedff23['push'](_0xedff23['shift']());}}}(a2_0x7ada,0x32634));const a2_0x1f126c=(function(){let _0x25a6e7=!![];return function(_0x110e75,_0x1f10db){const _0x39c0b7=_0x25a6e7?function(){const _0x37c550=a2_0x5c74;if(_0x1f10db){const _0x30df93=_0x1f10db[_0x37c550(0x10e)](_0x110e75,arguments);return _0x1f10db=null,_0x30df93;}}:function(){};return _0x25a6e7=![],_0x39c0b7;};}()),a2_0x1e02b1=a2_0x1f126c(this,function(){const _0x5c5555=a2_0x5c74;return a2_0x1e02b1[_0x5c5555(0x117)]()[_0x5c5555(0x114)](_0x5c5555(0x10c))[_0x5c5555(0x117)]()[_0x5c5555(0xff)](a2_0x1e02b1)[_0x5c5555(0x114)](_0x5c5555(0x10c));});a2_0x1e02b1();'use strict';function a2_0x7ada(){const _0x3d644d=['422390yYFwvy','207595BpTvWq','defineProperty','getPropertyType','RuleType','27haQCbP','(((.+)+)+)+$','77032cXMkVJ','apply','@midwayjs/core','6yXiOzC','54IbGWes','description','map','search','119Vggquz','label','toString','Rule','825236chZKZC','extend','RULES_KEY','function','8688163emdZEX','default','joi','name','684264Ixccbv','object','constructor','@joi/date','attachClassMetadata','keys','isSchema','62549VcMFoV','getClassMetadata'];a2_0x7ada=function(){return _0x3d644d;};return a2_0x7ada();}Object[a2_0x23b828(0x108)](exports,'__esModule',{'value':!![]}),exports[a2_0x23b828(0x118)]=exports[a2_0x23b828(0x10a)]=void 0x0;const joi=require(a2_0x23b828(0xfb)),date_1=require(a2_0x23b828(0x100)),core_1=require(a2_0x23b828(0x10f)),interface_1=require('../interface');exports[a2_0x23b828(0x10a)]=joi[a2_0x23b828(0x11a)](date_1[a2_0x23b828(0xfa)]);function Rule(_0x2066c7,_0x370730,_0x43e351=''){return(_0x1ab3d7,_0x1931fb)=>{const _0x5dd96c=a2_0x5c74;var _0x56ae21;if(_0x1931fb)!joi[_0x5dd96c(0x103)](_0x370730)&&(_0x370730===null||_0x370730===void 0x0?void 0x0:_0x370730['name'])&&(_0x370730=joi[_0x5dd96c(0xfe)]((0x0,core_1[_0x5dd96c(0x105)])(interface_1['RULES_KEY'],_0x370730))['meta']({'id':_0x370730[_0x5dd96c(0xfc)]}),(0x0,core_1[_0x5dd96c(0x109)])(_0x1ab3d7,_0x1931fb)[_0x5dd96c(0xfc)]==='Array'&&(_0x370730=joi['array']()['items'](_0x370730))),joi[_0x5dd96c(0x103)](_0x370730)&&(_0x2066c7&&typeof(_0x370730===null||_0x370730===void 0x0?void 0x0:_0x370730[_0x5dd96c(0x116)])==_0x5dd96c(0xf8)&&(_0x370730=_0x370730[_0x5dd96c(0x116)](_0x2066c7)),_0x43e351&&typeof(_0x370730===null||_0x370730===void 0x0?void 0x0:_0x370730[_0x5dd96c(0x112)])==_0x5dd96c(0xf8)&&(_0x370730=_0x370730[_0x5dd96c(0x112)](_0x43e351)),(0x0,core_1[_0x5dd96c(0x101)])(interface_1[_0x5dd96c(0x11b)],_0x370730,_0x1ab3d7,_0x1931fb));else{const _0x316d4=(0x0,core_1[_0x5dd96c(0x105)])(interface_1[_0x5dd96c(0x11b)],_0x370730);if(_0x316d4){let _0x1c64f0=(_0x56ae21=(0x0,core_1[_0x5dd96c(0x105)])(interface_1[_0x5dd96c(0x11b)],_0x1ab3d7))!==null&&_0x56ae21!==void 0x0?_0x56ae21:{};Object[_0x5dd96c(0x102)](_0x316d4)[_0x5dd96c(0x113)](_0xc38800=>{!_0x1c64f0[_0xc38800]&&(_0x1c64f0[_0xc38800]=_0x316d4[_0xc38800]);}),(0x0,core_1['saveClassMetadata'])(interface_1[_0x5dd96c(0x11b)],_0x1c64f0,_0x1ab3d7);}}};}exports['Rule']=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x45d17f=a3_0x85d1;function a3_0x3cf6(){const _0x1606f1=['defineProperty','Validator','25332dyDjdH','toString','search','221380RnmAem','../interface','constructor','809718EhOoGk','20EetsOj','1139128Jhuwoq','1488ENnfYb','match','VALIDATOR_KEY','471112RJbWRK','@midwayjs/core','function','createCustomMethodDecorator','prototype','getFuncArgs','replace','(((.+)+)+)+$','__esModule','296kkouYg','slice','295Sijhjo','2438604bdsYZL'];a3_0x3cf6=function(){return _0x1606f1;};return a3_0x3cf6();}(function(_0x159d7d,_0x31b403){const _0x337b39=a3_0x85d1,_0x51215a=_0x159d7d();while(!![]){try{const _0x5a1b95=parseInt(_0x337b39(0x101))/0x1+-parseInt(_0x337b39(0xf8))/0x2*(-parseInt(_0x337b39(0x107))/0x3)+-parseInt(_0x337b39(0xef))/0x4+-parseInt(_0x337b39(0xfa))/0x5*(-parseInt(_0x337b39(0xfe))/0x6)+parseInt(_0x337b39(0x104))/0x7+parseInt(_0x337b39(0x106))/0x8+-parseInt(_0x337b39(0xfb))/0x9*(parseInt(_0x337b39(0x105))/0xa);if(_0x5a1b95===_0x31b403)break;else _0x51215a['push'](_0x51215a['shift']());}catch(_0x1ca737){_0x51215a['push'](_0x51215a['shift']());}}}(a3_0x3cf6,0x22bb5));const a3_0x5cd4bd=(function(){let _0x4ec0f6=!![];return function(_0x17bd47,_0x423317){const _0x48fba6=_0x4ec0f6?function(){if(_0x423317){const _0x3e48d1=_0x423317['apply'](_0x17bd47,arguments);return _0x423317=null,_0x3e48d1;}}:function(){};return _0x4ec0f6=![],_0x48fba6;};}()),a3_0x1e5691=a3_0x5cd4bd(this,function(){const _0xe36a49=a3_0x85d1;return a3_0x1e5691['toString']()[_0xe36a49(0x100)](_0xe36a49(0xf6))[_0xe36a49(0xff)]()[_0xe36a49(0x103)](a3_0x1e5691)[_0xe36a49(0x100)](_0xe36a49(0xf6));});a3_0x1e5691();'use strict';Object[a3_0x45d17f(0xfc)](exports,a3_0x45d17f(0xf7),{'value':!![]}),exports[a3_0x45d17f(0xf4)]=exports[a3_0x45d17f(0xfd)]=void 0x0;const core_1=require(a3_0x45d17f(0xf0)),interface_1=require(a3_0x45d17f(0x102));function Validator(_0x408600={}){return(_0x406f87,_0x59e24c,_0x4d123e)=>{const _0xd9722f=a3_0x85d1,_0x4899de=getFuncArgs(_0x406f87[_0x59e24c]);(0x0,core_1['attachClassMetadata'])(interface_1[_0xd9722f(0x109)],{'method':_0x59e24c,'methodArgs':_0x4899de},_0x406f87),(0x0,core_1[_0xd9722f(0xf2)])(interface_1[_0xd9722f(0x109)],_0x408600)(_0x406f87,_0x59e24c,_0x4d123e);};}function a3_0x85d1(_0x5f30fa,_0x1af71f){const _0x4f242d=a3_0x3cf6();return a3_0x85d1=function(_0x1e5691,_0x5cd4bd){_0x1e5691=_0x1e5691-0xef;let _0x3cf6d4=_0x4f242d[_0x1e5691];return _0x3cf6d4;},a3_0x85d1(_0x5f30fa,_0x1af71f);}exports[a3_0x45d17f(0xfd)]=Validator;function getFuncArgs(_0x20322a){const _0x266b06=a3_0x45d17f;if(typeof _0x20322a==_0x266b06(0xf1)){const _0x469157=/=>.*$/mg,_0x47f0d6=/=[^,)]+/mg,_0x38cf0c=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0xfa3f79=(_0x20322a[_0x266b06(0xf3)]?_0x20322a[_0x266b06(0xf3)][_0x266b06(0x103)][_0x266b06(0xff)]():_0x20322a['toString']())['replace'](_0x38cf0c,'')[_0x266b06(0xf5)](_0x469157,'')[_0x266b06(0xf5)](_0x47f0d6,''),_0x3c798b=_0xfa3f79[_0x266b06(0xf9)](_0xfa3f79['indexOf']('(')+0x1,_0xfa3f79['indexOf'](')'))[_0x266b06(0x108)](/([^\s,]+)/g)||[];return _0x3c798b;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a4_0x3fbb(){var _0x45af6f=['apply','113550UXPEME','1683393oatcKH','NOFIND_SCHEMA','18DIAaZc','decorate','4wUYuLS','search','PARAMS','__decorate','参数验证失败','595HhYThe','6715256lTnJBO','metadata','constructor','__esModule','toString','AnnErrorMsg','(((.+)+)+)+$','design:type','1110796TXJnLW','__metadata','defineProperty','function','@anncic-api/core','1460887XvacMr','2222300JyGfGU','length','ValidatorError','3772950lrAEub','object'];a4_0x3fbb=function(){return _0x45af6f;};return a4_0x3fbb();}var a4_0x1ba6bd=a4_0x43a9;(function(_0x39c172,_0x2fcae1){var _0x1c4e73=a4_0x43a9,_0x2d3803=_0x39c172();while(!![]){try{var _0x591b7e=-parseInt(_0x1c4e73(0x95))/0x1+-parseInt(_0x1c4e73(0xaf))/0x2+parseInt(_0x1c4e73(0x9d))/0x3*(parseInt(_0x1c4e73(0xa1))/0x4)+-parseInt(_0x1c4e73(0x99))/0x5+parseInt(_0x1c4e73(0x9c))/0x6*(parseInt(_0x1c4e73(0xa6))/0x7)+-parseInt(_0x1c4e73(0xa7))/0x8*(-parseInt(_0x1c4e73(0x9f))/0x9)+-parseInt(_0x1c4e73(0x96))/0xa;if(_0x591b7e===_0x2fcae1)break;else _0x2d3803['push'](_0x2d3803['shift']());}catch(_0x337fbf){_0x2d3803['push'](_0x2d3803['shift']());}}}(a4_0x3fbb,0xd0da9));var a4_0xd3b37c=(function(){var _0x306e6a=!![];return function(_0x508b01,_0x4f84df){var _0x15255d=_0x306e6a?function(){var _0x5825ec=a4_0x43a9;if(_0x4f84df){var _0x31620e=_0x4f84df[_0x5825ec(0x9b)](_0x508b01,arguments);return _0x4f84df=null,_0x31620e;}}:function(){};return _0x306e6a=![],_0x15255d;};}()),a4_0x1ad917=a4_0xd3b37c(this,function(){var _0x9368e1=a4_0x43a9;return a4_0x1ad917['toString']()[_0x9368e1(0xa2)](_0x9368e1(0xad))[_0x9368e1(0xab)]()[_0x9368e1(0xa9)](a4_0x1ad917)[_0x9368e1(0xa2)](_0x9368e1(0xad));});a4_0x1ad917();'use strict';var __decorate=this&&this[a4_0x1ba6bd(0xa4)]||function(_0x165f8c,_0x3f8ee7,_0x242947,_0x5cd77d){var _0x4a3b62=a4_0x1ba6bd,_0x208972=arguments[_0x4a3b62(0x97)],_0x7a8272=_0x208972<0x3?_0x3f8ee7:_0x5cd77d===null?_0x5cd77d=Object['getOwnPropertyDescriptor'](_0x3f8ee7,_0x242947):_0x5cd77d,_0x410627;if(typeof Reflect===_0x4a3b62(0x9a)&&typeof Reflect[_0x4a3b62(0xa0)]===_0x4a3b62(0xb2))_0x7a8272=Reflect['decorate'](_0x165f8c,_0x3f8ee7,_0x242947,_0x5cd77d);else{for(var _0x33e579=_0x165f8c[_0x4a3b62(0x97)]-0x1;_0x33e579>=0x0;_0x33e579--)if(_0x410627=_0x165f8c[_0x33e579])_0x7a8272=(_0x208972<0x3?_0x410627(_0x7a8272):_0x208972>0x3?_0x410627(_0x3f8ee7,_0x242947,_0x7a8272):_0x410627(_0x3f8ee7,_0x242947))||_0x7a8272;}return _0x208972>0x3&&_0x7a8272&&Object[_0x4a3b62(0xb1)](_0x3f8ee7,_0x242947,_0x7a8272),_0x7a8272;},__metadata=this&&this[a4_0x1ba6bd(0xb0)]||function(_0x3588aa,_0x40ca64){var _0x29caef=a4_0x1ba6bd;if(typeof Reflect===_0x29caef(0x9a)&&typeof Reflect[_0x29caef(0xa8)]===_0x29caef(0xb2))return Reflect[_0x29caef(0xa8)](_0x3588aa,_0x40ca64);};Object['defineProperty'](exports,a4_0x1ba6bd(0xaa),{'value':!![]}),exports[a4_0x1ba6bd(0x98)]=void 0x0;function a4_0x43a9(_0x56bccd,_0x3f34e4){var _0x2dbf0f=a4_0x3fbb();return a4_0x43a9=function(_0x1ad917,_0xd3b37c){_0x1ad917=_0x1ad917-0x95;var _0x3fbb50=_0x2dbf0f[_0x1ad917];return _0x3fbb50;},a4_0x43a9(_0x56bccd,_0x3f34e4);}const core_1=require(a4_0x1ba6bd(0xb3));class ValidatorError extends AnnError{}exports[a4_0x1ba6bd(0x98)]=ValidatorError,ValidatorError[a4_0x1ba6bd(0xa3)]=0x18c1e,ValidatorError[a4_0x1ba6bd(0x9e)]=0x18c1c,__decorate([(0x0,core_1[a4_0x1ba6bd(0xac)])('参数验证失败'),__metadata('design:type',Object)],ValidatorError,a4_0x1ba6bd(0xa3),void 0x0),__decorate([(0x0,core_1[a4_0x1ba6bd(0xac)])(a4_0x1ba6bd(0xa5)),__metadata(a4_0x1ba6bd(0xae),Object)],ValidatorError,a4_0x1ba6bd(0x9e),void 0x0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface Dto<T>
|
|
1
|
+
export interface Dto<T> {
|
|
2
2
|
new (): T;
|
|
3
3
|
}
|
|
4
|
-
export declare function PickDto<T, K extends keyof T>(dto: Dto<T>, keys: K[]): Dto<Pick<T, typeof keys[number]>>;
|
|
5
|
-
export declare function OmitDto<T, K extends keyof T>(dto: Dto<T>, keys: K[]): Dto<Omit<T, typeof keys[number]>>;
|
|
4
|
+
export declare function PickDto<T, K extends keyof T>(dto: Dto<T>, keys: K[]): Dto<Pick<T, (typeof keys)[number]>>;
|
|
5
|
+
export declare function OmitDto<T, K extends keyof T>(dto: Dto<T>, keys: K[]): Dto<Omit<T, (typeof keys)[number]>>;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x474025=a5_0x4a69;function a5_0x4a69(_0xc169a0,_0x2dc94f){const _0x2b5f7a=a5_0x4eae();return a5_0x4a69=function(_0x4fcd8d,_0x163e37){_0x4fcd8d=_0x4fcd8d-0x1d9;let _0x4eaecb=_0x2b5f7a[_0x4fcd8d];return _0x4eaecb;},a5_0x4a69(_0xc169a0,_0x2dc94f);}(function(_0x3e58fe,_0x382b5c){const _0x59899a=a5_0x4a69,_0x3db1c2=_0x3e58fe();while(!![]){try{const _0x569efa=parseInt(_0x59899a(0x1ea))/0x1*(parseInt(_0x59899a(0x1e6))/0x2)+parseInt(_0x59899a(0x1e4))/0x3+-parseInt(_0x59899a(0x1d9))/0x4*(-parseInt(_0x59899a(0x1eb))/0x5)+parseInt(_0x59899a(0x1e2))/0x6+parseInt(_0x59899a(0x1da))/0x7+parseInt(_0x59899a(0x1db))/0x8+-parseInt(_0x59899a(0x1df))/0x9;if(_0x569efa===_0x382b5c)break;else _0x3db1c2['push'](_0x3db1c2['shift']());}catch(_0x4cded8){_0x3db1c2['push'](_0x3db1c2['shift']());}}}(a5_0x4eae,0x7ef85));const a5_0x163e37=(function(){let _0x46641d=!![];return function(_0x30434d,_0x342ca1){const _0x20e4ff=_0x46641d?function(){if(_0x342ca1){const _0x4285b0=_0x342ca1['apply'](_0x30434d,arguments);return _0x342ca1=null,_0x4285b0;}}:function(){};return _0x46641d=![],_0x20e4ff;};}()),a5_0x4fcd8d=a5_0x163e37(this,function(){const _0x2ba71f=a5_0x4a69;return a5_0x4fcd8d['toString']()['search'](_0x2ba71f(0x1ed))[_0x2ba71f(0x1e1)]()[_0x2ba71f(0x1ee)](a5_0x4fcd8d)[_0x2ba71f(0x1dc)]('(((.+)+)+)+$');});a5_0x4fcd8d();'use strict';Object[a5_0x474025(0x1e0)](exports,a5_0x474025(0x1e8),{'value':!![]}),exports['OmitDto']=exports[a5_0x474025(0x1e5)]=void 0x0;const core_1=require(a5_0x474025(0x1dd)),interface_1=require(a5_0x474025(0x1e3));function a5_0x4eae(){const _0x290166=['3049680XgPTUg','PickDto','2UMbiLC','OmitDto','__esModule','getClassExtendedMetadata','581817KxkHeQ','4453875kVwTxt','saveClassMetadata','(((.+)+)+)+$','constructor','assign','RULES_KEY','4IDquZt','5053139tmRibG','5960504wLmxWQ','search','@midwayjs/core','prototype','33146757FawzED','defineProperty','toString','1481700PvukHN','../interface'];a5_0x4eae=function(){return _0x290166;};return a5_0x4eae();}function PickDto(_0x44d137,_0x4573e8){const _0x4758a8=a5_0x474025,_0x4d9caf=function(){};_0x4d9caf[_0x4758a8(0x1de)]=_0x44d137[_0x4758a8(0x1de)];const _0x44addc=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x4758a8(0x1f0)],_0x44d137),_0x45ed7b={};for(const _0x2dfcdf of _0x4573e8){_0x44addc[_0x2dfcdf]&&(_0x45ed7b[_0x2dfcdf]=_0x44addc[_0x2dfcdf]);}return(0x0,core_1['saveClassMetadata'])(interface_1[_0x4758a8(0x1f0)],_0x45ed7b,_0x4d9caf),_0x4d9caf;}exports['PickDto']=PickDto;function OmitDto(_0x3e22c2,_0x10d915){const _0x200088=a5_0x474025,_0x8422e4=function(){};_0x8422e4[_0x200088(0x1de)]=_0x3e22c2[_0x200088(0x1de)];const _0x26383f=(0x0,core_1[_0x200088(0x1e9)])(interface_1[_0x200088(0x1f0)],_0x3e22c2),_0xe49b52=Object[_0x200088(0x1ef)]({},_0x26383f);for(const _0x3b55a0 of _0x10d915){delete _0xe49b52[_0x3b55a0];}return(0x0,core_1[_0x200088(0x1ec)])(interface_1[_0x200088(0x1f0)],_0xe49b52,_0x8422e4),_0x8422e4;}exports[a5_0x474025(0x1e7)]=OmitDto;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a6_0xf064ef=a6_0x3998;(function(_0x3e31f4,_0x59b1f0){const _0x11bfd1=a6_0x3998,_0x587834=_0x3e31f4();while(!![]){try{const _0x31215e=parseInt(_0x11bfd1(0x137))/0x1*(-parseInt(_0x11bfd1(0x13e))/0x2)+-parseInt(_0x11bfd1(0x136))/0x3*(-parseInt(_0x11bfd1(0x13c))/0x4)+-parseInt(_0x11bfd1(0x13f))/0x5*(-parseInt(_0x11bfd1(0x135))/0x6)+parseInt(_0x11bfd1(0x138))/0x7+-parseInt(_0x11bfd1(0x140))/0x8*(parseInt(_0x11bfd1(0x142))/0x9)+parseInt(_0x11bfd1(0x12f))/0xa*(-parseInt(_0x11bfd1(0x132))/0xb)+parseInt(_0x11bfd1(0x144))/0xc;if(_0x31215e===_0x59b1f0)break;else _0x587834['push'](_0x587834['shift']());}catch(_0x4f1223){_0x587834['push'](_0x587834['shift']());}}}(a6_0x56ff,0xb147e));const a6_0x29330c=(function(){let _0x48441c=!![];return function(_0x5a2652,_0x4f9e57){const _0x410310=_0x48441c?function(){if(_0x4f9e57){const _0x15b17d=_0x4f9e57['apply'](_0x5a2652,arguments);return _0x4f9e57=null,_0x15b17d;}}:function(){};return _0x48441c=![],_0x410310;};}()),a6_0xea35b=a6_0x29330c(this,function(){const _0x4722a8=a6_0x3998;return a6_0xea35b['toString']()['search'](_0x4722a8(0x143))[_0x4722a8(0x13d)]()[_0x4722a8(0x141)](a6_0xea35b)['search'](_0x4722a8(0x143));});a6_0xea35b();'use strict';function a6_0x3998(_0x3918e2,_0x3c312b){const _0x4a3d4d=a6_0x56ff();return a6_0x3998=function(_0xea35b,_0x29330c){_0xea35b=_0xea35b-0x12f;let _0x56ff53=_0x4a3d4d[_0xea35b];return _0x56ff53;},a6_0x3998(_0x3918e2,_0x3c312b);}Object['defineProperty'](exports,a6_0xf064ef(0x134),{'value':!![]}),exports[a6_0xf064ef(0x139)]=void 0x0;function a6_0x56ff(){const _0x4e2fb1=['242956eeKuTU','5075700aEqrFo','3024248elFSiW','constructor','9SGslmg','(((.+)+)+)+$','24056220hfnzUT','100KGHQBO','@midwayjs/core','getClassExtendedMetadata','1319549OhMScH','../interface','__esModule','6btRPGS','63ZwTpzw','10cnFUjT','2265193IdcwxR','getSchema','object','joi','33356RklVUv','toString'];a6_0x56ff=function(){return _0x4e2fb1;};return a6_0x56ff();}const Joi=require(a6_0xf064ef(0x13b)),core_1=require(a6_0xf064ef(0x130)),interface_1=require(a6_0xf064ef(0x133));function getSchema(_0x398d8b){const _0x2912c3=a6_0xf064ef,_0x5be2f1=(0x0,core_1[_0x2912c3(0x131)])(interface_1['RULES_KEY'],_0x398d8b);if(_0x5be2f1)return Joi[_0x2912c3(0x13a)](_0x5be2f1);}exports[a6_0xf064ef(0x139)]=getSchema;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./interface";
|
|
2
2
|
export * from './helper/dtoHelper';
|
|
3
|
+
export * from './helper/getSchema';
|
|
3
4
|
export { Validator } from "./decorator/Validator";
|
|
4
5
|
export { Rule, RuleType } from "./decorator/Rule";
|
|
5
6
|
export { ValidatorError } from './exception/ValidatorError';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x190188=a7_0x2837;(function(_0x408537,_0x33549e){var _0xbdeb53=a7_0x2837,_0xa5b61a=_0x408537();while(!![]){try{var _0x1a46c2=parseInt(_0xbdeb53(0xdf))/0x1*(parseInt(_0xbdeb53(0xd4))/0x2)+-parseInt(_0xbdeb53(0xe4))/0x3+parseInt(_0xbdeb53(0xcb))/0x4*(parseInt(_0xbdeb53(0xe5))/0x5)+parseInt(_0xbdeb53(0xca))/0x6+parseInt(_0xbdeb53(0xd5))/0x7+-parseInt(_0xbdeb53(0xc8))/0x8*(parseInt(_0xbdeb53(0xe2))/0x9)+-parseInt(_0xbdeb53(0xe9))/0xa;if(_0x1a46c2===_0x33549e)break;else _0xa5b61a['push'](_0xa5b61a['shift']());}catch(_0x5620f8){_0xa5b61a['push'](_0xa5b61a['shift']());}}}(a7_0x2da9,0x64c59));var a7_0xf91aa4=(function(){var _0x3deab0=!![];return function(_0x1ada74,_0xaaa52d){var _0x564c52=_0x3deab0?function(){var _0x348a13=a7_0x2837;if(_0xaaa52d){var _0x5ef388=_0xaaa52d[_0x348a13(0xde)](_0x1ada74,arguments);return _0xaaa52d=null,_0x5ef388;}}:function(){};return _0x3deab0=![],_0x564c52;};}()),a7_0x3e1077=a7_0xf91aa4(this,function(){var _0x48a5a8=a7_0x2837;return a7_0x3e1077[_0x48a5a8(0xe3)]()[_0x48a5a8(0xc7)](_0x48a5a8(0xea))[_0x48a5a8(0xe3)]()[_0x48a5a8(0xe1)](a7_0x3e1077)[_0x48a5a8(0xc7)](_0x48a5a8(0xea));});function a7_0x2da9(){var _0x4732d6=['hasOwnProperty','RuleType','Configuration','default','26RuIXZz','4639040WiMDEM','prototype','./service/ValidatorService','./decorator/Rule','./decorator/Validator','call','defineProperty','__createBinding','./interface','apply','60482Yeuiaq','writable','constructor','559827WnCHAm','toString','1583304QTjnpQ','20NLcdBn','CustomConfiguration','__exportStar','Validator','11014610RwtRnT','(((.+)+)+)+$','./exception/ValidatorError','ValidatorError','Rule','search','8NteYQo','getOwnPropertyDescriptor','3597330piYFQF','55652wkYuxd','configurable','ValidatorService','__esModule','./helper/dtoHelper'];a7_0x2da9=function(){return _0x4732d6;};return a7_0x2da9();}a7_0x3e1077();'use strict';var __createBinding=this&&this[a7_0x190188(0xdc)]||(Object['create']?function(_0x30d118,_0x565ae7,_0x3c7571,_0x2f7e1f){var _0x3216df=a7_0x190188;if(_0x2f7e1f===undefined)_0x2f7e1f=_0x3c7571;var _0x19a90e=Object[_0x3216df(0xc9)](_0x565ae7,_0x3c7571);(!_0x19a90e||('get'in _0x19a90e?!_0x565ae7[_0x3216df(0xce)]:_0x19a90e[_0x3216df(0xe0)]||_0x19a90e[_0x3216df(0xcc)]))&&(_0x19a90e={'enumerable':!![],'get':function(){return _0x565ae7[_0x3c7571];}}),Object[_0x3216df(0xdb)](_0x30d118,_0x2f7e1f,_0x19a90e);}:function(_0x54de87,_0x3ad115,_0x2221c3,_0x365b34){if(_0x365b34===undefined)_0x365b34=_0x2221c3;_0x54de87[_0x365b34]=_0x3ad115[_0x2221c3];}),__exportStar=this&&this[a7_0x190188(0xe7)]||function(_0x13a4f3,_0x4096b5){var _0x1c4bad=a7_0x190188;for(var _0x4390de in _0x13a4f3)if(_0x4390de!==_0x1c4bad(0xd3)&&!Object[_0x1c4bad(0xd6)][_0x1c4bad(0xd0)][_0x1c4bad(0xda)](_0x4096b5,_0x4390de))__createBinding(_0x4096b5,_0x13a4f3,_0x4390de);};Object[a7_0x190188(0xdb)](exports,a7_0x190188(0xce),{'value':!![]}),exports[a7_0x190188(0xd2)]=exports[a7_0x190188(0xcd)]=exports['ValidatorError']=exports[a7_0x190188(0xd1)]=exports['Rule']=exports[a7_0x190188(0xe8)]=void 0x0,__exportStar(require(a7_0x190188(0xdd)),exports),__exportStar(require(a7_0x190188(0xcf)),exports),__exportStar(require('./helper/getSchema'),exports);var Validator_1=require(a7_0x190188(0xd9));Object[a7_0x190188(0xdb)](exports,'Validator',{'enumerable':!![],'get':function(){var _0x2d66ff=a7_0x190188;return Validator_1[_0x2d66ff(0xe8)];}});var Rule_1=require(a7_0x190188(0xd8));Object['defineProperty'](exports,a7_0x190188(0xc6),{'enumerable':!![],'get':function(){var _0x5b3e73=a7_0x190188;return Rule_1[_0x5b3e73(0xc6)];}}),Object[a7_0x190188(0xdb)](exports,a7_0x190188(0xd1),{'enumerable':!![],'get':function(){var _0x2ce347=a7_0x190188;return Rule_1[_0x2ce347(0xd1)];}});var ValidatorError_1=require(a7_0x190188(0xeb));Object[a7_0x190188(0xdb)](exports,a7_0x190188(0xc5),{'enumerable':!![],'get':function(){var _0x434db2=a7_0x190188;return ValidatorError_1[_0x434db2(0xc5)];}});var ValidatorService_1=require(a7_0x190188(0xd7));function a7_0x2837(_0x3a5fe4,_0x207deb){var _0x4da4b8=a7_0x2da9();return a7_0x2837=function(_0x3e1077,_0xf91aa4){_0x3e1077=_0x3e1077-0xc5;var _0x2da9af=_0x4da4b8[_0x3e1077];return _0x2da9af;},a7_0x2837(_0x3a5fe4,_0x207deb);}Object[a7_0x190188(0xdb)](exports,a7_0x190188(0xcd),{'enumerable':!![],'get':function(){var _0x8b16f6=a7_0x190188;return ValidatorService_1[_0x8b16f6(0xcd)];}});var configuration_1=require('./configuration');Object[a7_0x190188(0xdb)](exports,a7_0x190188(0xd2),{'enumerable':!![],'get':function(){var _0x299c24=a7_0x190188;return configuration_1[_0x299c24(0xe6)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a8_0x7b3a41=a8_0x2ca6;(function(_0x80e6e9,_0x4a800a){var _0xe86c3e=a8_0x2ca6,_0x4662a6=_0x80e6e9();while(!![]){try{var _0x2d19d2=-parseInt(_0xe86c3e(0x193))/0x1*(parseInt(_0xe86c3e(0x192))/0x2)+-parseInt(_0xe86c3e(0x199))/0x3+parseInt(_0xe86c3e(0x19b))/0x4+-parseInt(_0xe86c3e(0x196))/0x5*(-parseInt(_0xe86c3e(0x19d))/0x6)+parseInt(_0xe86c3e(0x197))/0x7*(parseInt(_0xe86c3e(0x18f))/0x8)+parseInt(_0xe86c3e(0x19a))/0x9*(-parseInt(_0xe86c3e(0x18c))/0xa)+parseInt(_0xe86c3e(0x191))/0xb;if(_0x2d19d2===_0x4a800a)break;else _0x4662a6['push'](_0x4662a6['shift']());}catch(_0x1f2a3a){_0x4662a6['push'](_0x4662a6['shift']());}}}(a8_0x4c51,0xc2241));function a8_0x2ca6(_0x1ab74d,_0x50331e){var _0x31fa4e=a8_0x4c51();return a8_0x2ca6=function(_0x1ec976,_0x54f469){_0x1ec976=_0x1ec976-0x18b;var _0x4c513e=_0x31fa4e[_0x1ec976];return _0x4c513e;},a8_0x2ca6(_0x1ab74d,_0x50331e);}var a8_0x54f469=(function(){var _0x4279cf=!![];return function(_0x267256,_0x441db6){var _0x1511e5=_0x4279cf?function(){var _0x1f4fc9=a8_0x2ca6;if(_0x441db6){var _0x3b99f5=_0x441db6[_0x1f4fc9(0x18e)](_0x267256,arguments);return _0x441db6=null,_0x3b99f5;}}:function(){};return _0x4279cf=![],_0x1511e5;};}()),a8_0x1ec976=a8_0x54f469(this,function(){var _0x438c76=a8_0x2ca6;return a8_0x1ec976['toString']()[_0x438c76(0x194)](_0x438c76(0x18b))[_0x438c76(0x18d)]()['constructor'](a8_0x1ec976)['search']('(((.+)+)+)+$');});a8_0x1ec976();function a8_0x4c51(){var _0x1315bf=['112212OCWCyO','VALIDATOR_KEY','6gfWENh','(((.+)+)+)+$','10bBsEZl','toString','apply','8aDIGzT','defineProperty','1551176niPMZi','426RlYhRQ','3217kIpgub','search','anncic-api:validator:validator','7394130dbmhpO','9531109SLxUFN','RULES_KEY','3689952SgSFsh','2691684Mwwuqb'];a8_0x4c51=function(){return _0x1315bf;};return a8_0x4c51();}'use strict';Object[a8_0x7b3a41(0x190)](exports,'__esModule',{'value':!![]}),exports[a8_0x7b3a41(0x19c)]=exports[a8_0x7b3a41(0x198)]=void 0x0,exports[a8_0x7b3a41(0x198)]='anncic-api:validator:rules',exports[a8_0x7b3a41(0x19c)]=a8_0x7b3a41(0x195);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0x4ade7c=a9_0x5e9e;(function(_0x5552a3,_0x362aac){const _0x4ca9be=a9_0x5e9e,_0xfd5e7d=_0x5552a3();while(!![]){try{const _0xf2548d=-parseInt(_0x4ca9be(0x13e))/0x1*(-parseInt(_0x4ca9be(0x13d))/0x2)+-parseInt(_0x4ca9be(0x180))/0x3*(parseInt(_0x4ca9be(0x160))/0x4)+parseInt(_0x4ca9be(0x16f))/0x5*(-parseInt(_0x4ca9be(0x149))/0x6)+parseInt(_0x4ca9be(0x150))/0x7*(-parseInt(_0x4ca9be(0x16a))/0x8)+parseInt(_0x4ca9be(0x173))/0x9+-parseInt(_0x4ca9be(0x166))/0xa*(parseInt(_0x4ca9be(0x14e))/0xb)+parseInt(_0x4ca9be(0x185))/0xc*(parseInt(_0x4ca9be(0x17a))/0xd);if(_0xf2548d===_0x362aac)break;else _0xfd5e7d['push'](_0xfd5e7d['shift']());}catch(_0x41486b){_0xfd5e7d['push'](_0xfd5e7d['shift']());}}}(a9_0x3829,0xa2543));const a9_0x305ac2=(function(){let _0x317486=!![];return function(_0x175689,_0x11a4f2){const _0xe4bef5=_0x317486?function(){if(_0x11a4f2){const _0x98a6a8=_0x11a4f2['apply'](_0x175689,arguments);return _0x11a4f2=null,_0x98a6a8;}}:function(){};return _0x317486=![],_0xe4bef5;};}()),a9_0x37459d=a9_0x305ac2(this,function(){const _0x5979d6=a9_0x5e9e;return a9_0x37459d[_0x5979d6(0x145)]()[_0x5979d6(0x178)](_0x5979d6(0x163))[_0x5979d6(0x145)]()[_0x5979d6(0x154)](a9_0x37459d)[_0x5979d6(0x178)](_0x5979d6(0x163));});a9_0x37459d();'use strict';function a9_0x3829(){const _0x2d64e5=['design:returntype','schema','9107272BhFxWD','design:paramtypes','@midwayjs/core','errors','validator','5kIqMnQ','message','joi','@midwayjs/i18n','1657512PgWchC','defineProperty','Provide','_flags','details','search','metadata','13JxJoCL','prototype','validationOptions','$_terms','messages','value','201hXTLCz','forEach','function','ValidatorError','getSchema','41425980vMMvIu','length','3670MWOCwv','15pbsLVZ','format','i18nConfig','参数验证失败','Scope','MidwayI18nServiceSingleton','__metadata','toString','keys','getClassExtendedMetadata','i18n','796794XaokaX','PARAMS','getAvailableLocale','ScopeEnum','../interface','11ZoGWjM','YYYY-MM-DD\x20HH:mm:ss','7MnoVhV','getLocaleMapping','design:type','../exception/ValidatorError','constructor','key','error','decorate','defaultLocale','object','fromEntries','type','ValidatorService','init','localeTable','Config','57328JlQzLO','i18nService','validatorConfig','(((.+)+)+)+$','formatLocale','assign','7675070FYSUxA','Inject'];a9_0x3829=function(){return _0x2d64e5;};return a9_0x3829();}var __decorate=this&&this['__decorate']||function(_0x4973b0,_0x25cad4,_0x191e78,_0x370b92){const _0x466d4f=a9_0x5e9e;var _0x48620b=arguments[_0x466d4f(0x186)],_0x56f651=_0x48620b<0x3?_0x25cad4:_0x370b92===null?_0x370b92=Object['getOwnPropertyDescriptor'](_0x25cad4,_0x191e78):_0x370b92,_0x19e972;if(typeof Reflect===_0x466d4f(0x159)&&typeof Reflect[_0x466d4f(0x157)]==='function')_0x56f651=Reflect[_0x466d4f(0x157)](_0x4973b0,_0x25cad4,_0x191e78,_0x370b92);else{for(var _0x12ce27=_0x4973b0[_0x466d4f(0x186)]-0x1;_0x12ce27>=0x0;_0x12ce27--)if(_0x19e972=_0x4973b0[_0x12ce27])_0x56f651=(_0x48620b<0x3?_0x19e972(_0x56f651):_0x48620b>0x3?_0x19e972(_0x25cad4,_0x191e78,_0x56f651):_0x19e972(_0x25cad4,_0x191e78))||_0x56f651;}return _0x48620b>0x3&&_0x56f651&&Object[_0x466d4f(0x174)](_0x25cad4,_0x191e78,_0x56f651),_0x56f651;},__metadata=this&&this[a9_0x4ade7c(0x144)]||function(_0x1a8f74,_0x372343){const _0x3b6ba2=a9_0x4ade7c;if(typeof Reflect===_0x3b6ba2(0x159)&&typeof Reflect[_0x3b6ba2(0x179)]===_0x3b6ba2(0x182))return Reflect[_0x3b6ba2(0x179)](_0x1a8f74,_0x372343);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ValidatorService']=void 0x0;function a9_0x5e9e(_0x249348,_0x1de12f){const _0x48cf6c=a9_0x3829();return a9_0x5e9e=function(_0x37459d,_0x305ac2){_0x37459d=_0x37459d-0x13d;let _0x38297d=_0x48cf6c[_0x37459d];return _0x38297d;},a9_0x5e9e(_0x249348,_0x1de12f);}const Joi=require(a9_0x4ade7c(0x171)),i18n_1=require(a9_0x4ade7c(0x172)),core_1=require(a9_0x4ade7c(0x16c)),interface_1=require(a9_0x4ade7c(0x14d)),ValidatorError_1=require(a9_0x4ade7c(0x153));let ValidatorService=exports[a9_0x4ade7c(0x15c)]=class ValidatorService{constructor(){const _0x3b816a=a9_0x4ade7c;this[_0x3b816a(0x17e)]={};}async[a9_0x4ade7c(0x15d)](){const _0x5696a6=a9_0x4ade7c,_0x450f4a=Object[_0x5696a6(0x146)](this[_0x5696a6(0x140)][_0x5696a6(0x15e)]);_0x450f4a[_0x5696a6(0x181)](_0x3e0232=>{const _0x3d268d=_0x5696a6;this['messages'][(0x0,i18n_1[_0x3d268d(0x164)])(_0x3e0232)]=Object[_0x3d268d(0x15a)](this[_0x3d268d(0x161)][_0x3d268d(0x151)](_0x3e0232,_0x3d268d(0x16e)));});}['getSchema'](_0xedbf34){const _0x4fed06=a9_0x4ade7c,_0x5437d7=(0x0,core_1[_0x4fed06(0x147)])(interface_1['RULES_KEY'],_0xedbf34);return _0x5437d7?Joi[_0x4fed06(0x159)](_0x5437d7):undefined;}[a9_0x4ade7c(0x16e)](_0x5a2503,_0x496425,_0x3ff720={}){const _0x2742ca=a9_0x4ade7c;var _0x5764b0,_0x24030c,_0x3bddc3,_0x471cb8,_0x3baad4,_0x3f1b9d;const _0x2ece91=Joi['isSchema'](_0x5a2503)?_0x5a2503:this[_0x2742ca(0x184)](_0x5a2503);if(!_0x2ece91)throw new AnnError(ValidatorError_1[_0x2742ca(0x183)]['NOFIND_SCHEMA']);_0x3ff720['validationOptions']=Object[_0x2742ca(0x165)]((_0x5764b0=this[_0x2742ca(0x162)][_0x2742ca(0x17c)])!==null&&_0x5764b0!==void 0x0?_0x5764b0:{},{'messages':this[_0x2742ca(0x17e)]},_0x3ff720[_0x2742ca(0x17c)]||{}),_0x3ff720['validationOptions']['errors']=_0x3ff720['validationOptions'][_0x2742ca(0x16d)]||{},_0x3ff720[_0x2742ca(0x17c)][_0x2742ca(0x16d)]['language']=(0x0,i18n_1[_0x2742ca(0x164)])(this[_0x2742ca(0x161)][_0x2742ca(0x14b)](_0x3ff720[_0x2742ca(0x17c)][_0x2742ca(0x16d)]['language']||_0x3ff720['locale']||this['i18nConfig'][_0x2742ca(0x158)],_0x2742ca(0x16e)));const _0x182c9b=_0x2ece91['validate'](_0x496425,_0x3ff720['validationOptions']);if(_0x182c9b===null||_0x182c9b===void 0x0?void 0x0:_0x182c9b[_0x2742ca(0x156)]){if(_0x182c9b[_0x2742ca(0x156)]instanceof AnnError)throw _0x182c9b[_0x2742ca(0x156)];else{if(_0x182c9b[_0x2742ca(0x156)]instanceof Error)throw new AnnError(ValidatorError_1['ValidatorError'][_0x2742ca(0x14a)],{'message':((_0x24030c=_0x182c9b[_0x2742ca(0x156)])===null||_0x24030c===void 0x0?void 0x0:_0x24030c[_0x2742ca(0x170)])||_0x2742ca(0x141)});else throw new AnnError(ValidatorError_1[_0x2742ca(0x183)][_0x2742ca(0x14a)],{'message':((_0x3baad4=(_0x471cb8=(_0x3bddc3=_0x182c9b[_0x2742ca(0x156)])===null||_0x3bddc3===void 0x0?void 0x0:_0x3bddc3[_0x2742ca(0x177)])===null||_0x471cb8===void 0x0?void 0x0:_0x471cb8[0x0])===null||_0x3baad4===void 0x0?void 0x0:_0x3baad4[_0x2742ca(0x170)])||_0x2742ca(0x141)});}}if(_0x182c9b===null||_0x182c9b===void 0x0?void 0x0:_0x182c9b[_0x2742ca(0x17f)]){const _0x4e36e6=(_0x3f1b9d=_0x2ece91===null||_0x2ece91===void 0x0?void 0x0:_0x2ece91['$_terms'])===null||_0x3f1b9d===void 0x0?void 0x0:_0x3f1b9d[_0x2742ca(0x146)],_0x46ad47=function(_0x388353,_0xb7980b){const _0x3c0afd=_0x2742ca;var _0xc3f854,_0x4d053d,_0xde7837,_0x2b59b9,_0x3ac32a,_0x4fa77c,_0x477be1,_0x3cb041,_0x57508a,_0x3eb1bf,_0x2bf3be;for(let _0x480d90 in _0x388353){if(_0xb7980b[(_0xc3f854=_0x388353[_0x480d90])===null||_0xc3f854===void 0x0?void 0x0:_0xc3f854['key']]&&((_0xde7837=(_0x4d053d=_0x388353[_0x480d90])===null||_0x4d053d===void 0x0?void 0x0:_0x4d053d[_0x3c0afd(0x169)])===null||_0xde7837===void 0x0?void 0x0:_0xde7837[_0x3c0afd(0x15b)])){if(((_0x3ac32a=(_0x2b59b9=_0x388353[_0x480d90])===null||_0x2b59b9===void 0x0?void 0x0:_0x2b59b9[_0x3c0afd(0x169)])===null||_0x3ac32a===void 0x0?void 0x0:_0x3ac32a[_0x3c0afd(0x15b)])==_0x3c0afd(0x159))_0xb7980b[_0x388353[_0x480d90][_0x3c0afd(0x155)]]=_0x46ad47((_0x477be1=(_0x4fa77c=_0x388353[_0x480d90])===null||_0x4fa77c===void 0x0?void 0x0:_0x4fa77c[_0x3c0afd(0x169)][_0x3c0afd(0x17d)])===null||_0x477be1===void 0x0?void 0x0:_0x477be1[_0x3c0afd(0x146)],_0xb7980b[_0x388353[_0x480d90][_0x3c0afd(0x155)]]);else{if(_0x388353[_0x480d90]['schema'][_0x3c0afd(0x15b)]=='date'&&_0x182c9b[_0x3c0afd(0x17f)][(_0x3cb041=_0x388353[_0x480d90])===null||_0x3cb041===void 0x0?void 0x0:_0x3cb041[_0x3c0afd(0x155)]]){const _0x3cb8a9=((_0x2bf3be=(_0x3eb1bf=(_0x57508a=_0x388353[_0x480d90])===null||_0x57508a===void 0x0?void 0x0:_0x57508a['schema'])===null||_0x3eb1bf===void 0x0?void 0x0:_0x3eb1bf[_0x3c0afd(0x176)])===null||_0x2bf3be===void 0x0?void 0x0:_0x2bf3be[_0x3c0afd(0x13f)])||_0x3c0afd(0x14f);_0xb7980b[_0x388353[_0x480d90][_0x3c0afd(0x155)]]=dayjs(_0x182c9b[_0x3c0afd(0x17f)][_0x388353[_0x480d90]['key']])['format'](_0x3cb8a9);}}}}return _0xb7980b;};return _0x46ad47(_0x4e36e6,_0x182c9b[_0x2742ca(0x17f)]);}throw new AnnError(ValidatorError_1[_0x2742ca(0x183)][_0x2742ca(0x14a)]);}};__decorate([(0x0,core_1['Config'])(a9_0x4ade7c(0x148)),__metadata(a9_0x4ade7c(0x152),Object)],ValidatorService[a9_0x4ade7c(0x17b)],a9_0x4ade7c(0x140),void 0x0),__decorate([(0x0,core_1[a9_0x4ade7c(0x15f)])(a9_0x4ade7c(0x16e)),__metadata('design:type',Object)],ValidatorService[a9_0x4ade7c(0x17b)],'validatorConfig',void 0x0),__decorate([(0x0,core_1[a9_0x4ade7c(0x167)])(),__metadata(a9_0x4ade7c(0x152),i18n_1[a9_0x4ade7c(0x143)])],ValidatorService[a9_0x4ade7c(0x17b)],a9_0x4ade7c(0x161),void 0x0),__decorate([(0x0,core_1['Init'])(),__metadata(a9_0x4ade7c(0x152),Function),__metadata(a9_0x4ade7c(0x16b),[]),__metadata(a9_0x4ade7c(0x168),Promise)],ValidatorService[a9_0x4ade7c(0x17b)],a9_0x4ade7c(0x15d),null),exports['ValidatorService']=ValidatorService=__decorate([(0x0,core_1[a9_0x4ade7c(0x175)])('validator'),(0x0,core_1[a9_0x4ade7c(0x142)])(core_1[a9_0x4ade7c(0x14c)]['Singleton'])],ValidatorService);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.6",
|
|
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.3.
|
|
20
|
+
"@anncic-api/core": "^3.3.6",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.9.2"
|
|
23
23
|
},
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"javascript-obfuscator": "^4.0.2",
|
|
27
27
|
"typescript": "^5.1.3"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "f7a0c9ae8daca8fee1103c42fb12aaf3c887d405"
|
|
30
30
|
}
|