@anncic-api/validator 1.4.33 → 1.4.35
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
|
-
|
|
1
|
+
const a0_0x22fb3f=a0_0x142e;(function(_0x2cb712,_0x592786){const _0x49a530=a0_0x142e,_0x285d46=_0x2cb712();while(!![]){try{const _0x46d331=-parseInt(_0x49a530(0x74))/0x1*(-parseInt(_0x49a530(0x75))/0x2)+-parseInt(_0x49a530(0x6b))/0x3*(parseInt(_0x49a530(0x6c))/0x4)+-parseInt(_0x49a530(0x76))/0x5*(parseInt(_0x49a530(0x6d))/0x6)+-parseInt(_0x49a530(0x71))/0x7+parseInt(_0x49a530(0x77))/0x8*(parseInt(_0x49a530(0x7b))/0x9)+parseInt(_0x49a530(0x70))/0xa+parseInt(_0x49a530(0x7c))/0xb;if(_0x46d331===_0x592786)break;else _0x285d46['push'](_0x285d46['shift']());}catch(_0x1bdf39){_0x285d46['push'](_0x285d46['shift']());}}}(a0_0x3472,0x22cda));const a0_0x3c0758=(function(){let _0xa26c4e=!![];return function(_0xcad021,_0xc563f9){const _0x3cf688=_0xa26c4e?function(){const _0x10e7fc=a0_0x142e;if(_0xc563f9){const _0x58b826=_0xc563f9[_0x10e7fc(0x6f)](_0xcad021,arguments);return _0xc563f9=null,_0x58b826;}}:function(){};return _0xa26c4e=![],_0x3cf688;};}()),a0_0x5810b3=a0_0x3c0758(this,function(){const _0x1dee2c=a0_0x142e;return a0_0x5810b3[_0x1dee2c(0x6e)]()[_0x1dee2c(0x7a)](_0x1dee2c(0x79))[_0x1dee2c(0x6e)]()[_0x1dee2c(0x72)](a0_0x5810b3)[_0x1dee2c(0x7a)](_0x1dee2c(0x79));});function a0_0x142e(_0x10535f,_0x17be5c){const _0x2271a3=a0_0x3472();return a0_0x142e=function(_0x5810b3,_0x3c0758){_0x5810b3=_0x5810b3-0x6b;let _0x3472c7=_0x2271a3[_0x5810b3];return _0x3472c7;},a0_0x142e(_0x10535f,_0x17be5c);}a0_0x5810b3();'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]});const ValidatorError_1=require(a0_0x22fb3f(0x78));exports['default']={'validator':{'errorStatus':ValidatorError_1[a0_0x22fb3f(0x73)][a0_0x22fb3f(0x7e)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x22fb3f(0x80)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x22fb3f(0x7f))},'zh_CN':{'validator':require(a0_0x22fb3f(0x7d))}}}};function a0_0x3472(){const _0x5de023=['search','328203znnVKZ','2676729eRFWcR','../../locales/zh_CN.json','PARAMS','../../locales/en_US.json','string','402231TJCtFO','4MUspEQ','12QxFMyc','toString','apply','142650xvrams','983668AuzfWk','constructor','ValidatorError','5vSKmmu','73426mrbVTf','607040PuWAIb','48zMWjKn','../exception/ValidatorError','(((.+)+)+)+$'];a0_0x3472=function(){return _0x5de023;};return a0_0x3472();}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x2aeaa7=a1_0x46bb;(function(_0x25a783,_0x43614d){const _0x3b82af=a1_0x46bb,_0x5ba0f2=_0x25a783();while(!![]){try{const _0x171c0c=-parseInt(_0x3b82af(0xe2))/0x1+-parseInt(_0x3b82af(0x118))/0x2+-parseInt(_0x3b82af(0x10e))/0x3+parseInt(_0x3b82af(0xe5))/0x4*(-parseInt(_0x3b82af(0x101))/0x5)+-parseInt(_0x3b82af(0xe7))/0x6*(parseInt(_0x3b82af(0xf6))/0x7)+parseInt(_0x3b82af(0x106))/0x8*(parseInt(_0x3b82af(0xf9))/0x9)+parseInt(_0x3b82af(0x107))/0xa;if(_0x171c0c===_0x43614d)break;else _0x5ba0f2['push'](_0x5ba0f2['shift']());}catch(_0x2c97c4){_0x5ba0f2['push'](_0x5ba0f2['shift']());}}}(a1_0x135c,0xb1705));const a1_0x5083f4=(function(){let _0x13e615=!![];return function(_0x38f827,_0x1ad27f){const _0x14e14e=_0x13e615?function(){const _0x49a69b=a1_0x46bb;if(_0x1ad27f){const _0x2ac30d=_0x1ad27f[_0x49a69b(0x116)](_0x38f827,arguments);return _0x1ad27f=null,_0x2ac30d;}}:function(){};return _0x13e615=![],_0x14e14e;};}()),a1_0x25fb90=a1_0x5083f4(this,function(){const _0x59bd73=a1_0x46bb;return a1_0x25fb90[_0x59bd73(0xe3)]()[_0x59bd73(0xe8)]('(((.+)+)+)+$')[_0x59bd73(0xe3)]()[_0x59bd73(0xf3)](a1_0x25fb90)[_0x59bd73(0xe8)](_0x59bd73(0xf8));});a1_0x25fb90();'use strict';var __decorate=this&&this[a1_0x2aeaa7(0xe1)]||function(_0x5d06de,_0x54cb49,_0x1bce6b,_0x5b59a1){const _0xcf6b27=a1_0x2aeaa7;var _0xe8b1a5=arguments[_0xcf6b27(0x117)],_0xe95d69=_0xe8b1a5<0x3?_0x54cb49:_0x5b59a1===null?_0x5b59a1=Object['getOwnPropertyDescriptor'](_0x54cb49,_0x1bce6b):_0x5b59a1,_0x4a9e6f;if(typeof Reflect===_0xcf6b27(0xf1)&&typeof Reflect[_0xcf6b27(0xe4)]===_0xcf6b27(0x100))_0xe95d69=Reflect[_0xcf6b27(0xe4)](_0x5d06de,_0x54cb49,_0x1bce6b,_0x5b59a1);else{for(var _0x23fe34=_0x5d06de[_0xcf6b27(0x117)]-0x1;_0x23fe34>=0x0;_0x23fe34--)if(_0x4a9e6f=_0x5d06de[_0x23fe34])_0xe95d69=(_0xe8b1a5<0x3?_0x4a9e6f(_0xe95d69):_0xe8b1a5>0x3?_0x4a9e6f(_0x54cb49,_0x1bce6b,_0xe95d69):_0x4a9e6f(_0x54cb49,_0x1bce6b))||_0xe95d69;}return _0xe8b1a5>0x3&&_0xe95d69&&Object[_0xcf6b27(0x10a)](_0x54cb49,_0x1bce6b,_0xe95d69),_0xe95d69;},__metadata=this&&this[a1_0x2aeaa7(0x10d)]||function(_0x2636d0,_0x488dd4){const _0x273407=a1_0x2aeaa7;if(typeof Reflect===_0x273407(0xf1)&&typeof Reflect[_0x273407(0xfe)]==='function')return Reflect['metadata'](_0x2636d0,_0x488dd4);};function a1_0x135c(){const _0x5ebdb6=['__metadata','922821zMBVMF','./interface','Configuration','query','./service/ValidatorService','getSchema','methodArgs','splice','apply','length','285240XKXjHm','getAttr','args','locale','propertyName','name','__decorate','1323350QCISnv','toString','decorate','12rCIFyj','param','42XPyWuI','search','CustomConfiguration','anncic-api:validator','@midwayjs/core','getClassMetadata','registerMethodHandler','decorator','find','REQUEST_OBJ_CTX_KEY','object','bound\x20dispatch','constructor','body','params','942291wLIcOv','methodName','(((.+)+)+)+$','603RtzSRj','__esModule','request','ValidatorService','VALIDATOR_KEY','metadata','Inject','function','1400705TUrldp','target','undefined','design:type','req','15536SssinG','41529660LsAEfk','@midwayjs/i18n','prototype','defineProperty','res','@anncic-api/core'];a1_0x135c=function(){return _0x5ebdb6;};return a1_0x135c();}Object['defineProperty'](exports,a1_0x2aeaa7(0xfa),{'value':!![]}),exports[a1_0x2aeaa7(0xe9)]=void 0x0;function a1_0x46bb(_0x169397,_0x445c00){const _0x5e5df7=a1_0x135c();return a1_0x46bb=function(_0x25fb90,_0x5083f4){_0x25fb90=_0x25fb90-0xdf;let _0x135c79=_0x5e5df7[_0x25fb90];return _0x135c79;},a1_0x46bb(_0x169397,_0x445c00);}const i18n_1=require(a1_0x2aeaa7(0x108)),core_1=require(a1_0x2aeaa7(0xeb)),core_2=require('@midwayjs/core'),interface_1=require(a1_0x2aeaa7(0x10f)),ValidatorService_1=require(a1_0x2aeaa7(0x112)),i18n=require('@midwayjs/i18n'),anncic=require(a1_0x2aeaa7(0x10c)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x402b9b=a1_0x2aeaa7;this[_0x402b9b(0xee)][_0x402b9b(0xed)](interface_1[_0x402b9b(0xfd)],_0x3eb60f=>{const _0x519d90=_0x402b9b,_0x4926ec=_0x3eb60f['metadata'],_0x51a39f=(0x0,core_2['getMethodParamTypes'])(_0x3eb60f['target'],_0x3eb60f[_0x519d90(0xdf)]);return{'before':_0x57f039=>{const _0x1ba6bc=_0x519d90;var _0xbc86dc,_0x580c1c,_0x51b0ca,_0x58bb81,_0x2126e2,_0x476ca7,_0x2cac15,_0x4c3b83,_0x554cf3,_0x4beaaa,_0x504a57,_0x5ca79e,_0x4367fb;const _0x23f00c=_0x57f039[_0x1ba6bc(0x102)][core_1[_0x1ba6bc(0xf0)]],_0x3157d0=Object['assign']({},((_0xbc86dc=_0x23f00c===null||_0x23f00c===void 0x0?void 0x0:_0x23f00c[_0x1ba6bc(0xfb)])===null||_0xbc86dc===void 0x0?void 0x0:_0xbc86dc[_0x1ba6bc(0x111)])||{},((_0x580c1c=_0x23f00c===null||_0x23f00c===void 0x0?void 0x0:_0x23f00c['request'])===null||_0x580c1c===void 0x0?void 0x0:_0x580c1c[_0x1ba6bc(0xf4)])||{}),_0x3d1a88=((0x0,core_2[_0x1ba6bc(0xec)])(interface_1['VALIDATOR_KEY'],_0x57f039[_0x1ba6bc(0x102)])||[])[_0x1ba6bc(0xef)](_0xb26eda=>_0xb26eda['method']==_0x57f039[_0x1ba6bc(0xf7)]);!(_0x4926ec===null||_0x4926ec===void 0x0?void 0x0:_0x4926ec[_0x1ba6bc(0x11b)])&&_0x23f00c&&_0x23f00c['getAttr']&&(_0x4926ec[_0x1ba6bc(0x11b)]=_0x23f00c[_0x1ba6bc(0x119)](i18n_1['I18N_ATTR_KEY']));for(let _0xb8a2b9=0x0;_0xb8a2b9<_0x51a39f[_0x1ba6bc(0x117)];_0xb8a2b9++){const _0x4a9498=_0x51a39f[_0xb8a2b9],_0x18903a=this[_0x1ba6bc(0xfc)][_0x1ba6bc(0x113)](_0x4a9498);if(_0x18903a){if(typeof _0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9]==_0x1ba6bc(0x103)||((_0x51b0ca=_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9])===null||_0x51b0ca===void 0x0?void 0x0:_0x51b0ca[_0x1ba6bc(0xfb)])&&((_0x58bb81=_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9])===null||_0x58bb81===void 0x0?void 0x0:_0x58bb81[_0x1ba6bc(0x10b)])&&((_0x2126e2=_0x57f039['args'][_0xb8a2b9])===null||_0x2126e2===void 0x0?void 0x0:_0x2126e2[_0x1ba6bc(0x105)]))_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9]=_0x3157d0;else((_0x476ca7=_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9])===null||_0x476ca7===void 0x0?void 0x0:_0x476ca7[_0x1ba6bc(0xe0)])==_0x1ba6bc(0xf2)&&_0x57f039['args'][_0x1ba6bc(0x115)](_0xb8a2b9,0x0,_0x3157d0);const _0x14543f=this[_0x1ba6bc(0xfc)]['validator'](_0x18903a,_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9],_0x4926ec);_0x14543f&&(_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9]=_0x14543f);}else{if((_0x3d1a88===null||_0x3d1a88===void 0x0?void 0x0:_0x3d1a88[_0x1ba6bc(0x114)][_0xb8a2b9])&&((_0x2cac15=_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9])===null||_0x2cac15===void 0x0?void 0x0:_0x2cac15[_0x1ba6bc(0xf5)])&&typeof _0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9][_0x1ba6bc(0xe6)]==_0x1ba6bc(0x100)&&((_0x4c3b83=_0x23f00c===null||_0x23f00c===void 0x0?void 0x0:_0x23f00c[_0x1ba6bc(0xf5)])===null||_0x4c3b83===void 0x0?void 0x0:_0x4c3b83[_0x3d1a88[_0x1ba6bc(0x114)][_0xb8a2b9]]))_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9]=_0x4a9498((_0x554cf3=_0x23f00c===null||_0x23f00c===void 0x0?void 0x0:_0x23f00c[_0x1ba6bc(0xf5)])===null||_0x554cf3===void 0x0?void 0x0:_0x554cf3[_0x3d1a88['methodArgs'][_0xb8a2b9]]);else(_0x3d1a88===null||_0x3d1a88===void 0x0?void 0x0:_0x3d1a88[_0x1ba6bc(0x114)][_0xb8a2b9])&&((_0x504a57=(_0x4beaaa=_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9])===null||_0x4beaaa===void 0x0?void 0x0:_0x4beaaa[_0x1ba6bc(0xf5)])===null||_0x504a57===void 0x0?void 0x0:_0x504a57[_0x3d1a88[_0x1ba6bc(0x114)][_0xb8a2b9]])&&(_0x57f039[_0x1ba6bc(0x11a)][_0xb8a2b9]=(_0x4367fb=(_0x5ca79e=_0x57f039['args'][_0xb8a2b9])===null||_0x5ca79e===void 0x0?void 0x0:_0x5ca79e[_0x1ba6bc(0xf5)])===null||_0x4367fb===void 0x0?void 0x0:_0x4367fb[_0x3d1a88[_0x1ba6bc(0x114)][_0xb8a2b9]]);}}},'afterThrow':(_0x37cf8b,_0x1b91af)=>{throw _0x1b91af;}};});}};__decorate([(0x0,core_2[a1_0x2aeaa7(0xff)])(),__metadata(a1_0x2aeaa7(0x104),core_1['MidwayDecoratorService'])],CustomConfiguration[a1_0x2aeaa7(0x109)],a1_0x2aeaa7(0xee),void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x2aeaa7(0x104),ValidatorService_1[a1_0x2aeaa7(0xfc)])],CustomConfiguration['prototype'],a1_0x2aeaa7(0xfc),void 0x0),CustomConfiguration=__decorate([(0x0,core_2[a1_0x2aeaa7(0x110)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x2aeaa7(0xea),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x2aeaa7(0xe9)]=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x3678f3=a2_0x4307;(function(_0x21f9ce,_0x1f2ac1){const _0x4445e8=a2_0x4307,_0x887bb5=_0x21f9ce();while(!![]){try{const _0x348ab3=-parseInt(_0x4445e8(0x9c))/0x1*(-parseInt(_0x4445e8(0xa8))/0x2)+-parseInt(_0x4445e8(0x97))/0x3+-parseInt(_0x4445e8(0xae))/0x4*(parseInt(_0x4445e8(0xad))/0x5)+-parseInt(_0x4445e8(0x92))/0x6+-parseInt(_0x4445e8(0xb2))/0x7+-parseInt(_0x4445e8(0x9f))/0x8*(-parseInt(_0x4445e8(0x98))/0x9)+-parseInt(_0x4445e8(0xa4))/0xa*(-parseInt(_0x4445e8(0x9b))/0xb);if(_0x348ab3===_0x1f2ac1)break;else _0x887bb5['push'](_0x887bb5['shift']());}catch(_0x52633c){_0x887bb5['push'](_0x887bb5['shift']());}}}(a2_0x5e84,0x76ee3));const a2_0x3dce18=(function(){let _0x310b84=!![];return function(_0x569fa9,_0x55e8ac){const _0x207708=_0x310b84?function(){if(_0x55e8ac){const _0x168123=_0x55e8ac['apply'](_0x569fa9,arguments);return _0x55e8ac=null,_0x168123;}}:function(){};return _0x310b84=![],_0x207708;};}()),a2_0x576b94=a2_0x3dce18(this,function(){const _0x3a9c0f=a2_0x4307;return a2_0x576b94[_0x3a9c0f(0x9a)]()[_0x3a9c0f(0xaa)](_0x3a9c0f(0xb0))[_0x3a9c0f(0x9a)]()[_0x3a9c0f(0xa1)](a2_0x576b94)[_0x3a9c0f(0xaa)]('(((.+)+)+)+$');});a2_0x576b94();'use strict';Object[a2_0x3678f3(0x96)](exports,a2_0x3678f3(0xac),{'value':!![]}),exports[a2_0x3678f3(0xab)]=exports[a2_0x3678f3(0xa0)]=void 0x0;const joi=require('joi'),date_1=require(a2_0x3678f3(0xb1)),core_1=require('@midwayjs/core'),interface_1=require('../interface');exports['RuleType']=joi[a2_0x3678f3(0xa7)](date_1[a2_0x3678f3(0xa9)]);function Rule(_0x2008c0,_0x31e73e,_0x5ff6f6=''){return(_0x13e2b0,_0x974704)=>{const _0x540add=a2_0x4307;var _0x145eaf;if(_0x974704)!joi[_0x540add(0x94)](_0x31e73e)&&(_0x31e73e===null||_0x31e73e===void 0x0?void 0x0:_0x31e73e['name'])&&(_0x31e73e=joi['object']((0x0,core_1[_0x540add(0xa2)])(interface_1['RULES_KEY'],_0x31e73e))[_0x540add(0x90)]({'id':_0x31e73e[_0x540add(0x95)]}),(0x0,core_1[_0x540add(0xa5)])(_0x13e2b0,_0x974704)['name']==='Array'&&(_0x31e73e=joi[_0x540add(0x9e)]()[_0x540add(0xa3)](_0x31e73e))),joi[_0x540add(0x94)](_0x31e73e)&&(_0x2008c0&&typeof(_0x31e73e===null||_0x31e73e===void 0x0?void 0x0:_0x31e73e['label'])==_0x540add(0xa6)&&(_0x31e73e=_0x31e73e[_0x540add(0x9d)](_0x2008c0)),_0x5ff6f6&&typeof(_0x31e73e===null||_0x31e73e===void 0x0?void 0x0:_0x31e73e[_0x540add(0xaf)])=='function'&&(_0x31e73e=_0x31e73e['description'](_0x5ff6f6)),(0x0,core_1[_0x540add(0x91)])(interface_1[_0x540add(0x93)],_0x31e73e,_0x13e2b0,_0x974704));else{const _0x1fca5f=(0x0,core_1[_0x540add(0xa2)])(interface_1[_0x540add(0x93)],_0x31e73e);if(_0x1fca5f){let _0x1afe65=(_0x145eaf=(0x0,core_1[_0x540add(0xa2)])(interface_1[_0x540add(0x93)],_0x13e2b0))!==null&&_0x145eaf!==void 0x0?_0x145eaf:{};Object[_0x540add(0x99)](_0x1fca5f)['map'](_0x690bb5=>{!_0x1afe65[_0x690bb5]&&(_0x1afe65[_0x690bb5]=_0x1fca5f[_0x690bb5]);}),(0x0,core_1['saveClassMetadata'])(interface_1['RULES_KEY'],_0x1afe65,_0x13e2b0);}}};}function a2_0x5e84(){const _0x66fbd2=['default','search','Rule','__esModule','35pWmytl','356428obvDeE','description','(((.+)+)+)+$','@joi/date','6500914oQybtG','meta','attachClassMetadata','4343280kPSPXb','RULES_KEY','isSchema','name','defineProperty','2892975otxlOs','399258fPypYQ','keys','toString','2167gHBXBM','16696MuZBqr','label','array','88DVWcos','RuleType','constructor','getClassMetadata','items','163610BWykon','getPropertyType','function','extend','2QYpWkx'];a2_0x5e84=function(){return _0x66fbd2;};return a2_0x5e84();}function a2_0x4307(_0x4342f7,_0x469e1a){const _0x306e56=a2_0x5e84();return a2_0x4307=function(_0x576b94,_0x3dce18){_0x576b94=_0x576b94-0x90;let _0x5e844f=_0x306e56[_0x576b94];return _0x5e844f;},a2_0x4307(_0x4342f7,_0x469e1a);}exports['Rule']=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x40591f=a3_0x164e;(function(_0xc59b99,_0x1874e2){const _0x5ee11a=a3_0x164e,_0x5d9572=_0xc59b99();while(!![]){try{const _0x231e10=parseInt(_0x5ee11a(0xcf))/0x1*(parseInt(_0x5ee11a(0xd4))/0x2)+-parseInt(_0x5ee11a(0xd0))/0x3*(-parseInt(_0x5ee11a(0xe5))/0x4)+parseInt(_0x5ee11a(0xe0))/0x5+-parseInt(_0x5ee11a(0xcc))/0x6*(parseInt(_0x5ee11a(0xdb))/0x7)+-parseInt(_0x5ee11a(0xdd))/0x8*(parseInt(_0x5ee11a(0xe1))/0x9)+parseInt(_0x5ee11a(0xd3))/0xa*(parseInt(_0x5ee11a(0xe3))/0xb)+parseInt(_0x5ee11a(0xcd))/0xc;if(_0x231e10===_0x1874e2)break;else _0x5d9572['push'](_0x5d9572['shift']());}catch(_0x300c71){_0x5d9572['push'](_0x5d9572['shift']());}}}(a3_0x21a4,0xe26ac));const a3_0x2a64d7=(function(){let _0x1f35bf=!![];return function(_0x77b700,_0x3a682f){const _0x3d8828=_0x1f35bf?function(){const _0x122deb=a3_0x164e;if(_0x3a682f){const _0x2088f6=_0x3a682f[_0x122deb(0xd7)](_0x77b700,arguments);return _0x3a682f=null,_0x2088f6;}}:function(){};return _0x1f35bf=![],_0x3d8828;};}()),a3_0xcc4fc2=a3_0x2a64d7(this,function(){const _0x1a01fd=a3_0x164e;return a3_0xcc4fc2[_0x1a01fd(0xd1)]()[_0x1a01fd(0xd9)](_0x1a01fd(0xd5))[_0x1a01fd(0xd1)]()['constructor'](a3_0xcc4fc2)[_0x1a01fd(0xd9)](_0x1a01fd(0xd5));});function a3_0x164e(_0x2b245f,_0x3da787){const _0x2eb8b8=a3_0x21a4();return a3_0x164e=function(_0xcc4fc2,_0x2a64d7){_0xcc4fc2=_0xcc4fc2-0xcc;let _0x21a487=_0x2eb8b8[_0xcc4fc2];return _0x21a487;},a3_0x164e(_0x2b245f,_0x3da787);}a3_0xcc4fc2();'use strict';Object[a3_0x40591f(0xdc)](exports,a3_0x40591f(0xd6),{'value':!![]}),exports['getFuncArgs']=exports['Validator']=void 0x0;const core_1=require(a3_0x40591f(0xce)),interface_1=require(a3_0x40591f(0xde));function a3_0x21a4(){const _0x488345=['119861Xzjdyj','925128SSZUJb','toString','VALIDATOR_KEY','9710cTFmDb','6FYNOUH','(((.+)+)+)+$','__esModule','apply','match','search','attachClassMetadata','2658124secTsB','defineProperty','72VYrBsq','../interface','indexOf','1238765sSoSRs','349551xbZrJM','Validator','1595jjrFOz','createCustomMethodDecorator','16ZnYaVa','replace','constructor','prototype','18cQjvcB','5214192dJzWgP','@midwayjs/core'];a3_0x21a4=function(){return _0x488345;};return a3_0x21a4();}function Validator(_0x3beedb={}){return(_0x53cb28,_0x2357da,_0x20b81b)=>{const _0x4ace27=a3_0x164e,_0x483936=getFuncArgs(_0x53cb28[_0x2357da]);(0x0,core_1[_0x4ace27(0xda)])(interface_1[_0x4ace27(0xd2)],{'method':_0x2357da,'methodArgs':_0x483936},_0x53cb28),(0x0,core_1[_0x4ace27(0xe4)])(interface_1[_0x4ace27(0xd2)],_0x3beedb)(_0x53cb28,_0x2357da,_0x20b81b);};}exports[a3_0x40591f(0xe2)]=Validator;function getFuncArgs(_0x425eb0){const _0x43695d=a3_0x40591f;if(typeof _0x425eb0=='function'){const _0x3473dc=/=>.*$/mg,_0x59c2c1=/=[^,)]+/mg,_0x3075b3=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x3b68b8=(_0x425eb0['prototype']?_0x425eb0[_0x43695d(0xe8)][_0x43695d(0xe7)][_0x43695d(0xd1)]():_0x425eb0['toString']())['replace'](_0x3075b3,'')[_0x43695d(0xe6)](_0x3473dc,'')['replace'](_0x59c2c1,''),_0x1255ef=_0x3b68b8['slice'](_0x3b68b8[_0x43695d(0xdf)]('(')+0x1,_0x3b68b8[_0x43695d(0xdf)](')'))[_0x43695d(0xd8)](/([^\s,]+)/g)||[];return _0x1255ef;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x35fd62=a4_0x359a;(function(_0x595afd,_0x593c70){var _0x3756f0=a4_0x359a,_0x49a342=_0x595afd();while(!![]){try{var _0x3bf9c5=parseInt(_0x3756f0(0x18b))/0x1+parseInt(_0x3756f0(0x196))/0x2*(parseInt(_0x3756f0(0x181))/0x3)+parseInt(_0x3756f0(0x189))/0x4+-parseInt(_0x3756f0(0x17f))/0x5*(-parseInt(_0x3756f0(0x187))/0x6)+parseInt(_0x3756f0(0x18c))/0x7+parseInt(_0x3756f0(0x195))/0x8+-parseInt(_0x3756f0(0x188))/0x9;if(_0x3bf9c5===_0x593c70)break;else _0x49a342['push'](_0x49a342['shift']());}catch(_0x284680){_0x49a342['push'](_0x49a342['shift']());}}}(a4_0xdcbe,0xcea57));var a4_0x4ac2b5=(function(){var _0x27c05a=!![];return function(_0x5c13a7,_0x2168ca){var _0x1db3b2=_0x27c05a?function(){if(_0x2168ca){var _0x5284d8=_0x2168ca['apply'](_0x5c13a7,arguments);return _0x2168ca=null,_0x5284d8;}}:function(){};return _0x27c05a=![],_0x1db3b2;};}()),a4_0x43fabf=a4_0x4ac2b5(this,function(){var _0x2455d1=a4_0x359a;return a4_0x43fabf[_0x2455d1(0x17e)]()[_0x2455d1(0x182)](_0x2455d1(0x197))['toString']()['constructor'](a4_0x43fabf)[_0x2455d1(0x182)](_0x2455d1(0x197));});a4_0x43fabf();'use strict';var __decorate=this&&this[a4_0x35fd62(0x191)]||function(_0x3f6872,_0x3fb073,_0x233df1,_0x4514f1){var _0x423445=a4_0x35fd62,_0xf967da=arguments[_0x423445(0x18a)],_0x13688d=_0xf967da<0x3?_0x3fb073:_0x4514f1===null?_0x4514f1=Object[_0x423445(0x190)](_0x3fb073,_0x233df1):_0x4514f1,_0x58f01c;if(typeof Reflect===_0x423445(0x18d)&&typeof Reflect[_0x423445(0x194)]===_0x423445(0x18f))_0x13688d=Reflect[_0x423445(0x194)](_0x3f6872,_0x3fb073,_0x233df1,_0x4514f1);else{for(var _0x586bbc=_0x3f6872[_0x423445(0x18a)]-0x1;_0x586bbc>=0x0;_0x586bbc--)if(_0x58f01c=_0x3f6872[_0x586bbc])_0x13688d=(_0xf967da<0x3?_0x58f01c(_0x13688d):_0xf967da>0x3?_0x58f01c(_0x3fb073,_0x233df1,_0x13688d):_0x58f01c(_0x3fb073,_0x233df1))||_0x13688d;}return _0xf967da>0x3&&_0x13688d&&Object['defineProperty'](_0x3fb073,_0x233df1,_0x13688d),_0x13688d;},__metadata=this&&this[a4_0x35fd62(0x198)]||function(_0x3aa3e1,_0x222fca){var _0x5034cb=a4_0x35fd62;if(typeof Reflect===_0x5034cb(0x18d)&&typeof Reflect[_0x5034cb(0x193)]==='function')return Reflect[_0x5034cb(0x193)](_0x3aa3e1,_0x222fca);};Object[a4_0x35fd62(0x185)](exports,a4_0x35fd62(0x18e),{'value':!![]}),exports[a4_0x35fd62(0x184)]=void 0x0;function a4_0x359a(_0x427e57,_0x24dfbd){var _0x1101b9=a4_0xdcbe();return a4_0x359a=function(_0x43fabf,_0x4ac2b5){_0x43fabf=_0x43fabf-0x17e;var _0xdcbef8=_0x1101b9[_0x43fabf];return _0xdcbef8;},a4_0x359a(_0x427e57,_0x24dfbd);}const core_1=require(a4_0x35fd62(0x183));class ValidatorError{}function a4_0xdcbe(){var _0x3616cf=['AnnErrorMsg','metadata','decorate','5094888bJkXOQ','2793294ZyydIv','(((.+)+)+)+$','__metadata','NOFIND_SCHEMA','参数验证失败','toString','125ZWcnny','PARAMS','3ULxXnd','search','@anncic-api/core','ValidatorError','defineProperty','design:type','49002PGqSeK','47825829anjVUb','6056264QEXgSE','length','844938yJQubX','10946019ZEqHxK','object','__esModule','function','getOwnPropertyDescriptor','__decorate'];a4_0xdcbe=function(){return _0x3616cf;};return a4_0xdcbe();}ValidatorError[a4_0x35fd62(0x180)]=0x3df374,ValidatorError[a4_0x35fd62(0x199)]=0x3df36a,__decorate([(0x0,core_1['AnnErrorMsg'])('参数验证失败'),__metadata(a4_0x35fd62(0x186),Object)],ValidatorError,a4_0x35fd62(0x180),void 0x0),__decorate([(0x0,core_1[a4_0x35fd62(0x192)])(a4_0x35fd62(0x19a)),__metadata(a4_0x35fd62(0x186),Object)],ValidatorError,a4_0x35fd62(0x199),void 0x0),exports[a4_0x35fd62(0x184)]=ValidatorError;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0xd01cf8=a5_0xb51c;(function(_0x1c2296,_0x2a3ca0){const _0x38e472=a5_0xb51c,_0x4fd7f6=_0x1c2296();while(!![]){try{const _0x14619d=parseInt(_0x38e472(0x1b8))/0x1+-parseInt(_0x38e472(0x1b6))/0x2+parseInt(_0x38e472(0x1b7))/0x3*(-parseInt(_0x38e472(0x1a8))/0x4)+parseInt(_0x38e472(0x1b3))/0x5*(parseInt(_0x38e472(0x1b2))/0x6)+-parseInt(_0x38e472(0x1ac))/0x7+-parseInt(_0x38e472(0x1a9))/0x8*(-parseInt(_0x38e472(0x1aa))/0x9)+-parseInt(_0x38e472(0x1a6))/0xa*(-parseInt(_0x38e472(0x1b5))/0xb);if(_0x14619d===_0x2a3ca0)break;else _0x4fd7f6['push'](_0x4fd7f6['shift']());}catch(_0x5bf771){_0x4fd7f6['push'](_0x4fd7f6['shift']());}}}(a5_0x295e,0x8d6a4));const a5_0x40b127=(function(){let _0x47f7a1=!![];return function(_0x105ef1,_0xe2bdd){const _0x47ea48=_0x47f7a1?function(){if(_0xe2bdd){const _0x473371=_0xe2bdd['apply'](_0x105ef1,arguments);return _0xe2bdd=null,_0x473371;}}:function(){};return _0x47f7a1=![],_0x47ea48;};}()),a5_0x3a7b73=a5_0x40b127(this,function(){const _0x1af627=a5_0xb51c;return a5_0x3a7b73['toString']()[_0x1af627(0x1ad)](_0x1af627(0x1a2))['toString']()['constructor'](a5_0x3a7b73)[_0x1af627(0x1ad)](_0x1af627(0x1a2));});a5_0x3a7b73();'use strict';function a5_0x295e(){const _0x5e07a2=['saveClassMetadata','2387xvgFds','2265926FkrJuF','27yHegWJ','1027906nTRGtZ','(((.+)+)+)+$','assign','RULES_KEY','prototype','84180RycbTZ','defineProperty','430156AHQOHt','8VoRDgl','3192075ceUehu','PickDto','4184971wDhWjv','search','OmitDto','@midwayjs/core','getClassExtendedMetadata','../interface','432iRBbAy','4765KjWDEz'];a5_0x295e=function(){return _0x5e07a2;};return a5_0x295e();}function a5_0xb51c(_0x5a830d,_0x74328f){const _0x3b5eb1=a5_0x295e();return a5_0xb51c=function(_0x3a7b73,_0x40b127){_0x3a7b73=_0x3a7b73-0x1a2;let _0x295e94=_0x3b5eb1[_0x3a7b73];return _0x295e94;},a5_0xb51c(_0x5a830d,_0x74328f);}Object[a5_0xd01cf8(0x1a7)](exports,'__esModule',{'value':!![]}),exports[a5_0xd01cf8(0x1ae)]=exports[a5_0xd01cf8(0x1ab)]=void 0x0;const core_1=require(a5_0xd01cf8(0x1af)),interface_1=require(a5_0xd01cf8(0x1b1));function PickDto(_0x54bea3,_0xee47ca){const _0x34a910=a5_0xd01cf8,_0x50da37=function(){};_0x50da37[_0x34a910(0x1a5)]=_0x54bea3[_0x34a910(0x1a5)];const _0x154420=(0x0,core_1['getClassExtendedMetadata'])(interface_1['RULES_KEY'],_0x54bea3),_0x2f2597={};for(const _0x2c4d94 of _0xee47ca){_0x154420[_0x2c4d94]&&(_0x2f2597[_0x2c4d94]=_0x154420[_0x2c4d94]);}return(0x0,core_1[_0x34a910(0x1b4)])(interface_1['RULES_KEY'],_0x2f2597,_0x50da37),_0x50da37;}exports[a5_0xd01cf8(0x1ab)]=PickDto;function OmitDto(_0x1f39b1,_0x55d123){const _0x527522=a5_0xd01cf8,_0x39b266=function(){};_0x39b266[_0x527522(0x1a5)]=_0x1f39b1[_0x527522(0x1a5)];const _0x421c8e=(0x0,core_1[_0x527522(0x1b0)])(interface_1[_0x527522(0x1a4)],_0x1f39b1),_0x8fbf67=Object[_0x527522(0x1a3)]({},_0x421c8e);for(const _0x226a96 of _0x55d123){delete _0x8fbf67[_0x226a96];}return(0x0,core_1[_0x527522(0x1b4)])(interface_1[_0x527522(0x1a4)],_0x8fbf67,_0x39b266),_0x39b266;}exports['OmitDto']=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x22ee40=a6_0x6eba;(function(_0xf457f4,_0x3f5b08){var _0x40533c=a6_0x6eba,_0xb68ea4=_0xf457f4();while(!![]){try{var _0x151846=parseInt(_0x40533c(0x1f3))/0x1*(-parseInt(_0x40533c(0x1f6))/0x2)+-parseInt(_0x40533c(0x1eb))/0x3*(parseInt(_0x40533c(0x201))/0x4)+-parseInt(_0x40533c(0x1f9))/0x5*(parseInt(_0x40533c(0x1ec))/0x6)+-parseInt(_0x40533c(0x208))/0x7*(parseInt(_0x40533c(0x1fe))/0x8)+parseInt(_0x40533c(0x1fa))/0x9*(-parseInt(_0x40533c(0x1f4))/0xa)+-parseInt(_0x40533c(0x1ff))/0xb+parseInt(_0x40533c(0x1f2))/0xc;if(_0x151846===_0x3f5b08)break;else _0xb68ea4['push'](_0xb68ea4['shift']());}catch(_0x46e385){_0xb68ea4['push'](_0xb68ea4['shift']());}}}(a6_0x361d,0x84965));var a6_0x374634=(function(){var _0x427db7=!![];return function(_0xbb935,_0x2f1df5){var _0x5a254e=_0x427db7?function(){if(_0x2f1df5){var _0x3952ac=_0x2f1df5['apply'](_0xbb935,arguments);return _0x2f1df5=null,_0x3952ac;}}:function(){};return _0x427db7=![],_0x5a254e;};}()),a6_0x348783=a6_0x374634(this,function(){var _0x444897=a6_0x6eba;return a6_0x348783['toString']()[_0x444897(0x1fb)](_0x444897(0x20a))[_0x444897(0x209)]()[_0x444897(0x203)](a6_0x348783)['search'](_0x444897(0x20a));});a6_0x348783();function a6_0x6eba(_0x8aac2b,_0x1a80dd){var _0x8bfe1a=a6_0x361d();return a6_0x6eba=function(_0x348783,_0x374634){_0x348783=_0x348783-0x1eb;var _0x361d1f=_0x8bfe1a[_0x348783];return _0x361d1f;},a6_0x6eba(_0x8aac2b,_0x1a80dd);}'use strict';var __createBinding=this&&this[a6_0x22ee40(0x20f)]||(Object[a6_0x22ee40(0x1ef)]?function(_0x9288c3,_0x23f306,_0x66cbb3,_0x4ea734){var _0x507448=a6_0x22ee40;if(_0x4ea734===undefined)_0x4ea734=_0x66cbb3;var _0x24ad01=Object['getOwnPropertyDescriptor'](_0x23f306,_0x66cbb3);(!_0x24ad01||(_0x507448(0x205)in _0x24ad01?!_0x23f306[_0x507448(0x1ee)]:_0x24ad01[_0x507448(0x202)]||_0x24ad01[_0x507448(0x1f7)]))&&(_0x24ad01={'enumerable':!![],'get':function(){return _0x23f306[_0x66cbb3];}}),Object[_0x507448(0x210)](_0x9288c3,_0x4ea734,_0x24ad01);}:function(_0x5d157d,_0x196bcd,_0x144ca5,_0x1ce976){if(_0x1ce976===undefined)_0x1ce976=_0x144ca5;_0x5d157d[_0x1ce976]=_0x196bcd[_0x144ca5];}),__exportStar=this&&this['__exportStar']||function(_0x5207c5,_0x2806c6){var _0xe39547=a6_0x22ee40;for(var _0xb65e50 in _0x5207c5)if(_0xb65e50!==_0xe39547(0x211)&&!Object[_0xe39547(0x20e)][_0xe39547(0x212)][_0xe39547(0x1fc)](_0x2806c6,_0xb65e50))__createBinding(_0x2806c6,_0x5207c5,_0xb65e50);};Object[a6_0x22ee40(0x210)](exports,a6_0x22ee40(0x1ee),{'value':!![]}),exports[a6_0x22ee40(0x206)]=exports[a6_0x22ee40(0x1ed)]=exports[a6_0x22ee40(0x20d)]=exports[a6_0x22ee40(0x1f8)]=exports['Rule']=exports[a6_0x22ee40(0x207)]=void 0x0,__exportStar(require(a6_0x22ee40(0x20c)),exports),__exportStar(require(a6_0x22ee40(0x20b)),exports);function a6_0x361d(){var _0x4f9392=['319944KEPnVD','8295111wlksKV','./exception/ValidatorError','268364AkxdHb','writable','constructor','CustomConfiguration','get','Configuration','Validator','112ekHGHT','toString','(((.+)+)+)+$','./helper/dtoHelper','./interface','ValidatorError','prototype','__createBinding','defineProperty','default','hasOwnProperty','12bwtnIP','558hyWTud','ValidatorService','__esModule','create','./decorator/Rule','./decorator/Validator','46197240AupOIG','130987onXweN','20BGGEHv','Rule','4lDjfPf','configurable','RuleType','50690SBejlN','1977894WBedwC','search','call','./service/ValidatorService'];a6_0x361d=function(){return _0x4f9392;};return a6_0x361d();}var Validator_1=require(a6_0x22ee40(0x1f1));Object[a6_0x22ee40(0x210)](exports,a6_0x22ee40(0x207),{'enumerable':!![],'get':function(){var _0x31727b=a6_0x22ee40;return Validator_1[_0x31727b(0x207)];}});var Rule_1=require(a6_0x22ee40(0x1f0));Object['defineProperty'](exports,a6_0x22ee40(0x1f5),{'enumerable':!![],'get':function(){return Rule_1['Rule'];}}),Object[a6_0x22ee40(0x210)](exports,a6_0x22ee40(0x1f8),{'enumerable':!![],'get':function(){var _0x2bf403=a6_0x22ee40;return Rule_1[_0x2bf403(0x1f8)];}});var ValidatorError_1=require(a6_0x22ee40(0x200));Object[a6_0x22ee40(0x210)](exports,a6_0x22ee40(0x20d),{'enumerable':!![],'get':function(){var _0x236edd=a6_0x22ee40;return ValidatorError_1[_0x236edd(0x20d)];}});var ValidatorService_1=require(a6_0x22ee40(0x1fd));Object[a6_0x22ee40(0x210)](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x183933=a6_0x22ee40;return ValidatorService_1[_0x183933(0x1ed)];}});var configuration_1=require('./configuration');Object[a6_0x22ee40(0x210)](exports,a6_0x22ee40(0x206),{'enumerable':!![],'get':function(){var _0x179f61=a6_0x22ee40;return configuration_1[_0x179f61(0x204)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a7_0x4eed(_0x5ee5d0,_0x1f39b7){var _0x4cec3c=a7_0x3016();return a7_0x4eed=function(_0xab64be,_0x256e9b){_0xab64be=_0xab64be-0x14b;var _0x3016ce=_0x4cec3c[_0xab64be];return _0x3016ce;},a7_0x4eed(_0x5ee5d0,_0x1f39b7);}var a7_0x2faf62=a7_0x4eed;(function(_0x21ccf4,_0x28c9c6){var _0x5501bc=a7_0x4eed,_0x1422e2=_0x21ccf4();while(!![]){try{var _0x38af7=parseInt(_0x5501bc(0x152))/0x1+parseInt(_0x5501bc(0x155))/0x2*(parseInt(_0x5501bc(0x153))/0x3)+-parseInt(_0x5501bc(0x156))/0x4+parseInt(_0x5501bc(0x150))/0x5+parseInt(_0x5501bc(0x158))/0x6*(-parseInt(_0x5501bc(0x14f))/0x7)+-parseInt(_0x5501bc(0x15b))/0x8*(-parseInt(_0x5501bc(0x15d))/0x9)+parseInt(_0x5501bc(0x15c))/0xa*(-parseInt(_0x5501bc(0x15e))/0xb);if(_0x38af7===_0x28c9c6)break;else _0x1422e2['push'](_0x1422e2['shift']());}catch(_0x3679a6){_0x1422e2['push'](_0x1422e2['shift']());}}}(a7_0x3016,0xafdae));var a7_0x256e9b=(function(){var _0x3ac1eb=!![];return function(_0xb684b4,_0x27526d){var _0x4ac69d=_0x3ac1eb?function(){var _0x41c184=a7_0x4eed;if(_0x27526d){var _0x2a819c=_0x27526d[_0x41c184(0x154)](_0xb684b4,arguments);return _0x27526d=null,_0x2a819c;}}:function(){};return _0x3ac1eb=![],_0x4ac69d;};}()),a7_0xab64be=a7_0x256e9b(this,function(){var _0x2dbf28=a7_0x4eed;return a7_0xab64be[_0x2dbf28(0x157)]()[_0x2dbf28(0x159)](_0x2dbf28(0x15f))[_0x2dbf28(0x157)]()[_0x2dbf28(0x14d)](a7_0xab64be)[_0x2dbf28(0x159)](_0x2dbf28(0x15f));});a7_0xab64be();function a7_0x3016(){var _0x45c2eb=['apply','32938rNCLpr','4729572WtWTnj','toString','222EdsDQc','search','RULES_KEY','16GZTtSZ','10kaVFbB','5966937akzanx','9720865lrukhf','(((.+)+)+)+$','anncic-api:validator:rules','defineProperty','constructor','VALIDATOR_KEY','85505QbWNNG','2334150UbqvIL','anncic-api:validator:validator','1429080fmpZGd','3TwpMnE'];a7_0x3016=function(){return _0x45c2eb;};return a7_0x3016();}'use strict';Object[a7_0x2faf62(0x14c)](exports,'__esModule',{'value':!![]}),exports[a7_0x2faf62(0x14e)]=exports[a7_0x2faf62(0x15a)]=void 0x0,exports[a7_0x2faf62(0x15a)]=a7_0x2faf62(0x14b),exports[a7_0x2faf62(0x14e)]=a7_0x2faf62(0x151);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x27d297=a8_0x1cb2;function a8_0x1cb2(_0x400639,_0x574921){const _0xdc5b6b=a8_0xfd6e();return a8_0x1cb2=function(_0x2a10d5,_0xbf1e6f){_0x2a10d5=_0x2a10d5-0xea;let _0xfd6e3b=_0xdc5b6b[_0x2a10d5];return _0xfd6e3b;},a8_0x1cb2(_0x400639,_0x574921);}function a8_0xfd6e(){const _0x2387c6=['../exception/ValidatorError','Provide','ScopeEnum','decorate','format','joi','defineProperty','PARAMS','design:type','getOwnPropertyDescriptor','apply','868743fFquEj','prototype','YYYY-MM-DD\x20HH:mm:ss','149886KebQGZ','validator','errors','defaultLocale','i18n','75173xnZClL','schema','init','design:paramtypes','RULES_KEY','locale','i18nService','@midwayjs/core','$_terms','forEach','14672MzNGZO','validationOptions','@midwayjs/i18n','error','Inject','isSchema','fromEntries','type','getClassExtendedMetadata','__metadata','Singleton','messages','20GzxhKs','length','ValidatorError','formatLocale','getSchema','metadata','validatorConfig','details','validate','keys','ValidatorService','constructor','MidwayI18nServiceSingleton','Config','Init','../interface','675VmujyY','getLocaleMapping','object','i18nConfig','Scope','2201448vIyKrO','6KSXmyE','11699215FAoBpV','value','getAvailableLocale','toString','111xHLWFX','language','key','search','_flags','8080UQHtWZ','design:returntype','__esModule'];a8_0xfd6e=function(){return _0x2387c6;};return a8_0xfd6e();}(function(_0xce826,_0x195b35){const _0x15951f=a8_0x1cb2,_0x5ed86a=_0xce826();while(!![]){try{const _0x54d865=parseInt(_0x15951f(0x100))/0x1+parseInt(_0x15951f(0x10f))/0x2*(-parseInt(_0x15951f(0xea))/0x3)+parseInt(_0x15951f(0xef))/0x4*(-parseInt(_0x15951f(0x12b))/0x5)+parseInt(_0x15951f(0x131))/0x6*(-parseInt(_0x15951f(0x105))/0x7)+-parseInt(_0x15951f(0x130))/0x8+-parseInt(_0x15951f(0xfd))/0x9*(parseInt(_0x15951f(0x11b))/0xa)+parseInt(_0x15951f(0x132))/0xb;if(_0x54d865===_0x195b35)break;else _0x5ed86a['push'](_0x5ed86a['shift']());}catch(_0x2b5ea7){_0x5ed86a['push'](_0x5ed86a['shift']());}}}(a8_0xfd6e,0x2e789));const a8_0xbf1e6f=(function(){let _0x2f31fb=!![];return function(_0x39a2c4,_0x4dd8af){const _0x8c08fb=_0x2f31fb?function(){const _0xd2e55f=a8_0x1cb2;if(_0x4dd8af){const _0x4cf7b8=_0x4dd8af[_0xd2e55f(0xfc)](_0x39a2c4,arguments);return _0x4dd8af=null,_0x4cf7b8;}}:function(){};return _0x2f31fb=![],_0x8c08fb;};}()),a8_0x2a10d5=a8_0xbf1e6f(this,function(){const _0x4e3fb5=a8_0x1cb2;return a8_0x2a10d5[_0x4e3fb5(0x135)]()[_0x4e3fb5(0xed)]('(((.+)+)+)+$')[_0x4e3fb5(0x135)]()[_0x4e3fb5(0x126)](a8_0x2a10d5)[_0x4e3fb5(0xed)]('(((.+)+)+)+$');});a8_0x2a10d5();'use strict';var __decorate=this&&this['__decorate']||function(_0x28991f,_0x483389,_0x309625,_0x52d8b5){const _0x2d8e77=a8_0x1cb2;var _0x3bd603=arguments[_0x2d8e77(0x11c)],_0x30635b=_0x3bd603<0x3?_0x483389:_0x52d8b5===null?_0x52d8b5=Object[_0x2d8e77(0xfb)](_0x483389,_0x309625):_0x52d8b5,_0x42042a;if(typeof Reflect===_0x2d8e77(0x12d)&&typeof Reflect[_0x2d8e77(0xf5)]==='function')_0x30635b=Reflect[_0x2d8e77(0xf5)](_0x28991f,_0x483389,_0x309625,_0x52d8b5);else{for(var _0x2ea704=_0x28991f[_0x2d8e77(0x11c)]-0x1;_0x2ea704>=0x0;_0x2ea704--)if(_0x42042a=_0x28991f[_0x2ea704])_0x30635b=(_0x3bd603<0x3?_0x42042a(_0x30635b):_0x3bd603>0x3?_0x42042a(_0x483389,_0x309625,_0x30635b):_0x42042a(_0x483389,_0x309625))||_0x30635b;}return _0x3bd603>0x3&&_0x30635b&&Object[_0x2d8e77(0xf8)](_0x483389,_0x309625,_0x30635b),_0x30635b;},__metadata=this&&this[a8_0x27d297(0x118)]||function(_0x1d6394,_0x31c797){const _0x44fbbc=a8_0x27d297;if(typeof Reflect===_0x44fbbc(0x12d)&&typeof Reflect[_0x44fbbc(0x120)]==='function')return Reflect[_0x44fbbc(0x120)](_0x1d6394,_0x31c797);};Object['defineProperty'](exports,a8_0x27d297(0xf1),{'value':!![]}),exports['ValidatorService']=void 0x0;const Joi=require(a8_0x27d297(0xf7)),i18n_1=require(a8_0x27d297(0x111)),core_1=require(a8_0x27d297(0x10c)),interface_1=require(a8_0x27d297(0x12a)),ValidatorError_1=require(a8_0x27d297(0xf2));let ValidatorService=class ValidatorService{constructor(){const _0x54170f=a8_0x27d297;this[_0x54170f(0x11a)]={};}async[a8_0x27d297(0x107)](){const _0x3844a2=a8_0x27d297,_0x29b3d6=Object[_0x3844a2(0x124)](this[_0x3844a2(0x12e)]['localeTable']);_0x29b3d6[_0x3844a2(0x10e)](_0x58ef28=>{const _0x456741=_0x3844a2;this[_0x456741(0x11a)][(0x0,i18n_1[_0x456741(0x11e)])(_0x58ef28)]=Object[_0x456741(0x115)](this['i18nService'][_0x456741(0x12c)](_0x58ef28,'validator'));});}[a8_0x27d297(0x11f)](_0x430820){const _0x4e46be=a8_0x27d297,_0x36a234=(0x0,core_1[_0x4e46be(0x117)])(interface_1[_0x4e46be(0x109)],_0x430820);return _0x36a234?Joi[_0x4e46be(0x12d)](_0x36a234):undefined;}[a8_0x27d297(0x101)](_0x479889,_0x2ea475,_0x2827d2={}){const _0x8fab2b=a8_0x27d297;var _0x12a4c2,_0x406b0b,_0x189ac4,_0x3787ec,_0x2e4436;const _0x2eb221=Joi[_0x8fab2b(0x114)](_0x479889)?_0x479889:this[_0x8fab2b(0x11f)](_0x479889);if(!_0x2eb221)throw new AnnError(ValidatorError_1[_0x8fab2b(0x11d)]['NOFIND_SCHEMA']);_0x2827d2[_0x8fab2b(0x110)]=Object['assign']((_0x12a4c2=this['validatorConfig'][_0x8fab2b(0x110)])!==null&&_0x12a4c2!==void 0x0?_0x12a4c2:{},{'messages':this[_0x8fab2b(0x11a)]},_0x2827d2[_0x8fab2b(0x110)]||{}),_0x2827d2[_0x8fab2b(0x110)][_0x8fab2b(0x102)]=_0x2827d2[_0x8fab2b(0x110)][_0x8fab2b(0x102)]||{},_0x2827d2[_0x8fab2b(0x110)][_0x8fab2b(0x102)][_0x8fab2b(0xeb)]=(0x0,i18n_1[_0x8fab2b(0x11e)])(this[_0x8fab2b(0x10b)][_0x8fab2b(0x134)](_0x2827d2['validationOptions'][_0x8fab2b(0x102)]['language']||_0x2827d2[_0x8fab2b(0x10a)]||this[_0x8fab2b(0x12e)][_0x8fab2b(0x103)],'validator'));const _0x97bdd3=_0x2eb221[_0x8fab2b(0x123)](_0x2ea475,_0x2827d2['validationOptions']);if(_0x97bdd3===null||_0x97bdd3===void 0x0?void 0x0:_0x97bdd3[_0x8fab2b(0x112)])throw new AnnError(ValidatorError_1[_0x8fab2b(0x11d)]['PARAMS'],{'message':((_0x3787ec=(_0x189ac4=(_0x406b0b=_0x97bdd3['error'])===null||_0x406b0b===void 0x0?void 0x0:_0x406b0b[_0x8fab2b(0x122)])===null||_0x189ac4===void 0x0?void 0x0:_0x189ac4[0x0])===null||_0x3787ec===void 0x0?void 0x0:_0x3787ec['message'])||'参数验证失败'});if(_0x97bdd3===null||_0x97bdd3===void 0x0?void 0x0:_0x97bdd3[_0x8fab2b(0x133)]){const _0x4eedc4=(_0x2e4436=_0x2eb221===null||_0x2eb221===void 0x0?void 0x0:_0x2eb221['$_terms'])===null||_0x2e4436===void 0x0?void 0x0:_0x2e4436[_0x8fab2b(0x124)],_0x37e00b=function(_0x51a09f,_0x339546){const _0x546fb8=_0x8fab2b;var _0x5cc3c7,_0x5e3940,_0x83818a,_0x17a420,_0x198912,_0x36b05f,_0x360c4d,_0x393f15,_0x331198,_0x53fafb,_0x554903;for(let _0x693ec8 in _0x51a09f){if(_0x339546[(_0x5cc3c7=_0x51a09f[_0x693ec8])===null||_0x5cc3c7===void 0x0?void 0x0:_0x5cc3c7[_0x546fb8(0xec)]]&&((_0x83818a=(_0x5e3940=_0x51a09f[_0x693ec8])===null||_0x5e3940===void 0x0?void 0x0:_0x5e3940[_0x546fb8(0x106)])===null||_0x83818a===void 0x0?void 0x0:_0x83818a[_0x546fb8(0x116)])){if(((_0x198912=(_0x17a420=_0x51a09f[_0x693ec8])===null||_0x17a420===void 0x0?void 0x0:_0x17a420['schema'])===null||_0x198912===void 0x0?void 0x0:_0x198912[_0x546fb8(0x116)])==_0x546fb8(0x12d))_0x339546[_0x51a09f[_0x693ec8][_0x546fb8(0xec)]]=_0x37e00b((_0x360c4d=(_0x36b05f=_0x51a09f[_0x693ec8])===null||_0x36b05f===void 0x0?void 0x0:_0x36b05f['schema'][_0x546fb8(0x10d)])===null||_0x360c4d===void 0x0?void 0x0:_0x360c4d[_0x546fb8(0x124)],_0x339546[_0x51a09f[_0x693ec8][_0x546fb8(0xec)]]);else{if(_0x51a09f[_0x693ec8][_0x546fb8(0x106)]['type']=='date'&&_0x97bdd3[_0x546fb8(0x133)][(_0x393f15=_0x51a09f[_0x693ec8])===null||_0x393f15===void 0x0?void 0x0:_0x393f15[_0x546fb8(0xec)]]){const _0x2ebb4e=((_0x554903=(_0x53fafb=(_0x331198=_0x51a09f[_0x693ec8])===null||_0x331198===void 0x0?void 0x0:_0x331198[_0x546fb8(0x106)])===null||_0x53fafb===void 0x0?void 0x0:_0x53fafb[_0x546fb8(0xee)])===null||_0x554903===void 0x0?void 0x0:_0x554903[_0x546fb8(0xf6)])||_0x546fb8(0xff);_0x339546[_0x51a09f[_0x693ec8][_0x546fb8(0xec)]]=dayjs(_0x97bdd3['value'][_0x51a09f[_0x693ec8][_0x546fb8(0xec)]])[_0x546fb8(0xf6)](_0x2ebb4e);}}}}return _0x339546;};return _0x37e00b(_0x4eedc4,_0x97bdd3['value']);}throw new AnnError(ValidatorError_1[_0x8fab2b(0x11d)][_0x8fab2b(0xf9)]);}};__decorate([(0x0,core_1[a8_0x27d297(0x128)])(a8_0x27d297(0x104)),__metadata(a8_0x27d297(0xfa),Object)],ValidatorService['prototype'],a8_0x27d297(0x12e),void 0x0),__decorate([(0x0,core_1[a8_0x27d297(0x128)])(a8_0x27d297(0x101)),__metadata('design:type',Object)],ValidatorService[a8_0x27d297(0xfe)],a8_0x27d297(0x121),void 0x0),__decorate([(0x0,core_1[a8_0x27d297(0x113)])(),__metadata(a8_0x27d297(0xfa),i18n_1[a8_0x27d297(0x127)])],ValidatorService[a8_0x27d297(0xfe)],a8_0x27d297(0x10b),void 0x0),__decorate([(0x0,core_1[a8_0x27d297(0x129)])(),__metadata(a8_0x27d297(0xfa),Function),__metadata(a8_0x27d297(0x108),[]),__metadata(a8_0x27d297(0xf0),Promise)],ValidatorService[a8_0x27d297(0xfe)],a8_0x27d297(0x107),null),ValidatorService=__decorate([(0x0,core_1[a8_0x27d297(0xf3)])(a8_0x27d297(0x101)),(0x0,core_1[a8_0x27d297(0x12f)])(core_1[a8_0x27d297(0xf4)][a8_0x27d297(0x119)])],ValidatorService),exports[a8_0x27d297(0x125)]=ValidatorService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.35",
|
|
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": "^1.4.
|
|
20
|
+
"@anncic-api/core": "^1.4.35",
|
|
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": "bca941c7c6e97e076cf150e89809b5e76fe4e7ff"
|
|
30
30
|
}
|