@anncic-api/validator 3.4.32 → 3.4.33
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.d.ts +21 -21
- package/dist/config/config.default.js +1 -1
- package/dist/configuration.d.ts +7 -7
- package/dist/configuration.js +1 -1
- package/dist/decorator/Rule.d.ts +3 -3
- package/dist/decorator/Rule.js +1 -1
- package/dist/decorator/Validator.d.ts +3 -3
- package/dist/decorator/Validator.js +1 -1
- package/dist/exception/ValidatorError.d.ts +5 -5
- package/dist/exception/ValidatorError.js +1 -1
- package/dist/helper/dtoHelper.d.ts +5 -5
- package/dist/helper/dtoHelper.js +1 -1
- package/dist/helper/getSchema.d.ts +2 -2
- package/dist/helper/getSchema.js +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1 -1
- package/dist/interface.d.ts +9 -9
- package/dist/interface.js +1 -1
- package/dist/service/ValidatorService.d.ts +15 -15
- package/dist/service/ValidatorService.js +1 -1
- package/package.json +3 -3
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
validator: {
|
|
3
|
-
errorStatus: number;
|
|
4
|
-
validationOptions: {
|
|
5
|
-
allowUnknown: boolean;
|
|
6
|
-
stripUnknown: boolean;
|
|
7
|
-
dateFormat: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
i18n: {
|
|
11
|
-
localeTable: {
|
|
12
|
-
en_US: {
|
|
13
|
-
validator: any;
|
|
14
|
-
};
|
|
15
|
-
zh_CN: {
|
|
16
|
-
validator: any;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
validator: {
|
|
3
|
+
errorStatus: number;
|
|
4
|
+
validationOptions: {
|
|
5
|
+
allowUnknown: boolean;
|
|
6
|
+
stripUnknown: boolean;
|
|
7
|
+
dateFormat: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
i18n: {
|
|
11
|
+
localeTable: {
|
|
12
|
+
en_US: {
|
|
13
|
+
validator: any;
|
|
14
|
+
};
|
|
15
|
+
zh_CN: {
|
|
16
|
+
validator: any;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x475188=a0_0x14ee;(function(_0x20ee30,_0x253fcc){const _0x41eccb=a0_0x14ee,_0x5e9dad=_0x20ee30();while(!![]){try{const _0x45f919=-parseInt(_0x41eccb(0x1d6))/0x1*(-parseInt(_0x41eccb(0x1e1))/0x2)+-parseInt(_0x41eccb(0x1df))/0x3*(-parseInt(_0x41eccb(0x1ca))/0x4)+-parseInt(_0x41eccb(0x1d0))/0x5*(parseInt(_0x41eccb(0x1db))/0x6)+-parseInt(_0x41eccb(0x1ce))/0x7+parseInt(_0x41eccb(0x1d5))/0x8*(-parseInt(_0x41eccb(0x1d1))/0x9)+parseInt(_0x41eccb(0x1cd))/0xa+-parseInt(_0x41eccb(0x1d9))/0xb*(parseInt(_0x41eccb(0x1d7))/0xc);if(_0x45f919===_0x253fcc)break;else _0x5e9dad['push'](_0x5e9dad['shift']());}catch(_0x4f0988){_0x5e9dad['push'](_0x5e9dad['shift']());}}}(a0_0x3d64,0x1a980));const a0_0x57d084=(function(){let _0x37c74c=!![];return function(_0x43fa39,_0x5253e0){const _0x367b66=_0x37c74c?function(){const _0x4800b4=a0_0x14ee;if(_0x5253e0){const _0x27cef0=_0x5253e0[_0x4800b4(0x1d4)](_0x43fa39,arguments);return _0x5253e0=null,_0x27cef0;}}:function(){};return _0x37c74c=![],_0x367b66;};}()),a0_0x505248=a0_0x57d084(this,function(){const _0x1e243b=a0_0x14ee;return a0_0x505248[_0x1e243b(0x1d3)]()[_0x1e243b(0x1dd)](_0x1e243b(0x1da))[_0x1e243b(0x1d3)]()[_0x1e243b(0x1dc)](a0_0x505248)[_0x1e243b(0x1dd)](_0x1e243b(0x1da));});a0_0x505248();function a0_0x14ee(_0x35afac,_0xe77ee9){const _0x289828=a0_0x3d64();return a0_0x14ee=function(_0x505248,_0x57d084){_0x505248=_0x505248-0x1ca;let _0x3d643b=_0x289828[_0x505248];return _0x3d643b;},a0_0x14ee(_0x35afac,_0xe77ee9);}'use strict';function a0_0x3d64(){const _0x16fa96=['defineProperty','toString','apply','248GsNCSE','127067DNcbst','36ekZBUB','__esModule','588687Egrzoo','(((.+)+)+)+$','930PKGlKS','constructor','search','PARAMS','191409BcyJgf','default','2hABdMe','12LWoyeI','string','../../locales/en_US.json','1213480yZUEKp','220472nGgxlq','../exception/ValidatorError','1400PvlxYs','27711eqstJs'];a0_0x3d64=function(){return _0x16fa96;};return a0_0x3d64();}Object[a0_0x475188(0x1d2)](exports,a0_0x475188(0x1d8),{'value':!![]});const ValidatorError_1=require(a0_0x475188(0x1cf));exports[a0_0x475188(0x1e0)]={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x475188(0x1de)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x475188(0x1cb)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x475188(0x1cc))},'zh_CN':{'validator':require('../../locales/zh_CN.json')}}}};
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MidwayDecoratorService } from '@midwayjs/core';
|
|
2
|
-
import { ValidatorService } from './service/ValidatorService';
|
|
3
|
-
export declare class CustomConfiguration {
|
|
4
|
-
decorator: MidwayDecoratorService;
|
|
5
|
-
ValidatorService: ValidatorService;
|
|
6
|
-
onReady(): Promise<void>;
|
|
7
|
-
}
|
|
1
|
+
import { MidwayDecoratorService } from '@midwayjs/core';
|
|
2
|
+
import { ValidatorService } from './service/ValidatorService';
|
|
3
|
+
export declare class CustomConfiguration {
|
|
4
|
+
decorator: MidwayDecoratorService;
|
|
5
|
+
ValidatorService: ValidatorService;
|
|
6
|
+
onReady(): Promise<void>;
|
|
7
|
+
}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x268cae=a1_0x10d0;(function(_0x4901f8,_0x5a88f6){const _0x28c277=a1_0x10d0,_0x40514f=_0x4901f8();while(!![]){try{const _0x52647b=parseInt(_0x28c277(0xfd))/0x1+parseInt(_0x28c277(0x10d))/0x2*(-parseInt(_0x28c277(0x105))/0x3)+-parseInt(_0x28c277(0x113))/0x4+-parseInt(_0x28c277(0x121))/0x5*(-parseInt(_0x28c277(0x125))/0x6)+parseInt(_0x28c277(0x124))/0x7*(parseInt(_0x28c277(0x135))/0x8)+-parseInt(_0x28c277(0x100))/0x9*(-parseInt(_0x28c277(0x12b))/0xa)+-parseInt(_0x28c277(0x10a))/0xb;if(_0x52647b===_0x5a88f6)break;else _0x40514f['push'](_0x40514f['shift']());}catch(_0x5d4ac1){_0x40514f['push'](_0x40514f['shift']());}}}(a1_0x7af9,0xd6f14));function a1_0x7af9(){const _0x54ed92=['methodName','target','object','__esModule','18595XeUDeK','decorator','VALIDATOR_KEY','49IvXmCi','570lMYpWB','toString','./service/ValidatorService','metadata','request','defineProperty','220lolZSk','prototype','req','args','bound\x20dispatch','__metadata','ValidatorService','function','methodArgs','REQUEST_OBJ_CTX_KEY','1243688QoKgiV','params','getMethodParamTypes','@midwayjs/core','propertyName','1662994wsHrEc','splice','search','210420NEALvr','validator','locale','@anncic-api/core','apply','5190213vBJIBx','assign','res','getOwnPropertyDescriptor','getSchema','1249633NLObXH','constructor','./interface','2peoNzi','CustomConfiguration','decorate','body','anncic-api:validator','registerMethodHandler','3579232pOWmFl','__decorate','query','design:type','Inject','@midwayjs/i18n','./config/config.default','getAttr','method','(((.+)+)+)+$'];a1_0x7af9=function(){return _0x54ed92;};return a1_0x7af9();}const a1_0x32dc53=(function(){let _0x350c77=!![];return function(_0x4c4f92,_0x357d4e){const _0x40c7d1=_0x350c77?function(){const _0x5dac97=a1_0x10d0;if(_0x357d4e){const _0x4ac204=_0x357d4e[_0x5dac97(0x104)](_0x4c4f92,arguments);return _0x357d4e=null,_0x4ac204;}}:function(){};return _0x350c77=![],_0x40c7d1;};}()),a1_0x43e85c=a1_0x32dc53(this,function(){const _0x95a9ea=a1_0x10d0;return a1_0x43e85c['toString']()[_0x95a9ea(0xff)](_0x95a9ea(0x11c))[_0x95a9ea(0x126)]()[_0x95a9ea(0x10b)](a1_0x43e85c)[_0x95a9ea(0xff)](_0x95a9ea(0x11c));});a1_0x43e85c();'use strict';var __decorate=this&&this[a1_0x268cae(0x114)]||function(_0x548bab,_0x4285ee,_0x23c602,_0x1577a2){const _0x4fc104=a1_0x268cae;var _0x3958dc=arguments['length'],_0x516f82=_0x3958dc<0x3?_0x4285ee:_0x1577a2===null?_0x1577a2=Object[_0x4fc104(0x108)](_0x4285ee,_0x23c602):_0x1577a2,_0x5bc7a8;if(typeof Reflect===_0x4fc104(0x11f)&&typeof Reflect[_0x4fc104(0x10f)]===_0x4fc104(0x132))_0x516f82=Reflect[_0x4fc104(0x10f)](_0x548bab,_0x4285ee,_0x23c602,_0x1577a2);else{for(var _0x577df9=_0x548bab['length']-0x1;_0x577df9>=0x0;_0x577df9--)if(_0x5bc7a8=_0x548bab[_0x577df9])_0x516f82=(_0x3958dc<0x3?_0x5bc7a8(_0x516f82):_0x3958dc>0x3?_0x5bc7a8(_0x4285ee,_0x23c602,_0x516f82):_0x5bc7a8(_0x4285ee,_0x23c602))||_0x516f82;}return _0x3958dc>0x3&&_0x516f82&&Object['defineProperty'](_0x4285ee,_0x23c602,_0x516f82),_0x516f82;},__metadata=this&&this[a1_0x268cae(0x130)]||function(_0xe26ba2,_0x1325ef){const _0x30ca26=a1_0x268cae;if(typeof Reflect==='object'&&typeof Reflect[_0x30ca26(0x128)]===_0x30ca26(0x132))return Reflect['metadata'](_0xe26ba2,_0x1325ef);};Object[a1_0x268cae(0x12a)](exports,a1_0x268cae(0x120),{'value':!![]}),exports[a1_0x268cae(0x10e)]=void 0x0;const i18n_1=require(a1_0x268cae(0x118)),core_1=require('@midwayjs/core'),core_2=require(a1_0x268cae(0x138)),interface_1=require(a1_0x268cae(0x10c)),ValidatorService_1=require(a1_0x268cae(0x127)),i18n=require(a1_0x268cae(0x118)),anncic=require(a1_0x268cae(0x103)),ConfigDefault=require(a1_0x268cae(0x119));function a1_0x10d0(_0x5217fa,_0x57b03a){const _0x3d9f01=a1_0x7af9();return a1_0x10d0=function(_0x43e85c,_0x32dc53){_0x43e85c=_0x43e85c-0xfd;let _0x7af9f2=_0x3d9f01[_0x43e85c];return _0x7af9f2;},a1_0x10d0(_0x5217fa,_0x57b03a);}let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x49860e=a1_0x268cae;this[_0x49860e(0x122)][_0x49860e(0x112)](interface_1[_0x49860e(0x123)],_0x383ab5=>{const _0x110ff7=_0x49860e,_0x245399=_0x383ab5[_0x110ff7(0x128)],_0x4f233b=(0x0,core_2[_0x110ff7(0x137)])(_0x383ab5['target'],_0x383ab5[_0x110ff7(0x139)]);return{'before':_0x360dae=>{const _0x2fcbfb=_0x110ff7;var _0x7166a5,_0x57dd7d,_0x2c4bc1,_0x58cc53,_0x4e078d,_0x4a404f,_0x1ba450,_0x46736d,_0x385a6e,_0x2b004e,_0x4c2d2a,_0x1bc792,_0x11f998;const _0x30f50d=_0x360dae[_0x2fcbfb(0x11e)][core_1[_0x2fcbfb(0x134)]],_0x5dedaa=Object[_0x2fcbfb(0x106)]({},((_0x7166a5=_0x30f50d===null||_0x30f50d===void 0x0?void 0x0:_0x30f50d[_0x2fcbfb(0x129)])===null||_0x7166a5===void 0x0?void 0x0:_0x7166a5[_0x2fcbfb(0x115)])||{},((_0x57dd7d=_0x30f50d===null||_0x30f50d===void 0x0?void 0x0:_0x30f50d['request'])===null||_0x57dd7d===void 0x0?void 0x0:_0x57dd7d[_0x2fcbfb(0x110)])||{}),_0x1063b4=((0x0,core_2['getClassMetadata'])(interface_1['VALIDATOR_KEY'],_0x360dae[_0x2fcbfb(0x11e)])||[])['find'](_0x2709b3=>_0x2709b3[_0x2fcbfb(0x11b)]==_0x360dae[_0x2fcbfb(0x11d)]);!(_0x245399===null||_0x245399===void 0x0?void 0x0:_0x245399[_0x2fcbfb(0x102)])&&_0x30f50d&&_0x30f50d[_0x2fcbfb(0x11a)]&&(_0x245399[_0x2fcbfb(0x102)]=_0x30f50d[_0x2fcbfb(0x11a)](i18n_1['I18N_ATTR_KEY']));for(let _0x4d14e1=0x0;_0x4d14e1<_0x4f233b['length'];_0x4d14e1++){const _0x2faaee=_0x4f233b[_0x4d14e1],_0x11a411=this[_0x2fcbfb(0x131)][_0x2fcbfb(0x109)](_0x2faaee);if(_0x11a411){if(typeof _0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1]=='undefined'||((_0x2c4bc1=_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1])===null||_0x2c4bc1===void 0x0?void 0x0:_0x2c4bc1[_0x2fcbfb(0x129)])&&((_0x58cc53=_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1])===null||_0x58cc53===void 0x0?void 0x0:_0x58cc53[_0x2fcbfb(0x107)])&&((_0x4e078d=_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1])===null||_0x4e078d===void 0x0?void 0x0:_0x4e078d[_0x2fcbfb(0x12d)]))_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1]=_0x5dedaa;else((_0x4a404f=_0x360dae['args'][_0x4d14e1])===null||_0x4a404f===void 0x0?void 0x0:_0x4a404f['name'])==_0x2fcbfb(0x12f)&&_0x360dae[_0x2fcbfb(0x12e)][_0x2fcbfb(0xfe)](_0x4d14e1,0x0,_0x5dedaa);const _0xd1842=this['ValidatorService'][_0x2fcbfb(0x101)](_0x11a411,_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1],_0x245399);_0xd1842&&(_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1]=_0xd1842);}else{if((_0x1063b4===null||_0x1063b4===void 0x0?void 0x0:_0x1063b4[_0x2fcbfb(0x133)][_0x4d14e1])&&((_0x1ba450=_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1])===null||_0x1ba450===void 0x0?void 0x0:_0x1ba450['params'])&&typeof _0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1]['param']=='function'&&((_0x46736d=_0x30f50d===null||_0x30f50d===void 0x0?void 0x0:_0x30f50d[_0x2fcbfb(0x136)])===null||_0x46736d===void 0x0?void 0x0:_0x46736d[_0x1063b4['methodArgs'][_0x4d14e1]]))_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1]=_0x2faaee((_0x385a6e=_0x30f50d===null||_0x30f50d===void 0x0?void 0x0:_0x30f50d[_0x2fcbfb(0x136)])===null||_0x385a6e===void 0x0?void 0x0:_0x385a6e[_0x1063b4[_0x2fcbfb(0x133)][_0x4d14e1]]);else(_0x1063b4===null||_0x1063b4===void 0x0?void 0x0:_0x1063b4[_0x2fcbfb(0x133)][_0x4d14e1])&&((_0x4c2d2a=(_0x2b004e=_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1])===null||_0x2b004e===void 0x0?void 0x0:_0x2b004e[_0x2fcbfb(0x136)])===null||_0x4c2d2a===void 0x0?void 0x0:_0x4c2d2a[_0x1063b4[_0x2fcbfb(0x133)][_0x4d14e1]])&&(_0x360dae['args'][_0x4d14e1]=(_0x11f998=(_0x1bc792=_0x360dae[_0x2fcbfb(0x12e)][_0x4d14e1])===null||_0x1bc792===void 0x0?void 0x0:_0x1bc792[_0x2fcbfb(0x136)])===null||_0x11f998===void 0x0?void 0x0:_0x11f998[_0x1063b4[_0x2fcbfb(0x133)][_0x4d14e1]]);}}},'afterThrow':(_0x1eaa30,_0x54562c)=>{throw _0x54562c;}};});}};__decorate([(0x0,core_2[a1_0x268cae(0x117)])(),__metadata(a1_0x268cae(0x116),core_1['MidwayDecoratorService'])],CustomConfiguration[a1_0x268cae(0x12c)],'decorator',void 0x0),__decorate([(0x0,core_2[a1_0x268cae(0x117)])(),__metadata(a1_0x268cae(0x116),ValidatorService_1['ValidatorService'])],CustomConfiguration[a1_0x268cae(0x12c)],a1_0x268cae(0x131),void 0x0),CustomConfiguration=__decorate([(0x0,core_2['Configuration'])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x268cae(0x111),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x268cae(0x10e)]=CustomConfiguration;
|
package/dist/decorator/Rule.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as joi from 'joi';
|
|
2
|
-
export declare const RuleType: joi.Root;
|
|
3
|
-
export declare function Rule<Schema extends joi.SchemaInternals>(comment: string, schema?: Schema | any, description?: string): (target: any, propertyKey: string) => void;
|
|
1
|
+
import * as joi from 'joi';
|
|
2
|
+
export declare const RuleType: joi.Root;
|
|
3
|
+
export declare function Rule<Schema extends joi.SchemaInternals>(comment: string, schema?: Schema | any, description?: string): (target: any, propertyKey: string) => void;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a2_0x19764c=a2_0xc142;(function(_0x213fdb,_0x244b26){const _0x361993=a2_0xc142,_0x39eaf=_0x213fdb();while(!![]){try{const _0x4b50af=-parseInt(_0x361993(0x11d))/0x1+parseInt(_0x361993(0xfe))/0x2+parseInt(_0x361993(0x118))/0x3+-parseInt(_0x361993(0x104))/0x4+-parseInt(_0x361993(0x119))/0x5+-parseInt(_0x361993(0x11b))/0x6*(-parseInt(_0x361993(0x10d))/0x7)+-parseInt(_0x361993(0x109))/0x8*(parseInt(_0x361993(0x113))/0x9);if(_0x4b50af===_0x244b26)break;else _0x39eaf['push'](_0x39eaf['shift']());}catch(_0x53d6bd){_0x39eaf['push'](_0x39eaf['shift']());}}}(a2_0x3df0,0xab1fb));const a2_0x22f98e=(function(){let _0x9d70eb=!![];return function(_0x301721,_0x3f2b2e){const _0x30300b=_0x9d70eb?function(){const _0x343759=a2_0xc142;if(_0x3f2b2e){const _0xf921d6=_0x3f2b2e[_0x343759(0x106)](_0x301721,arguments);return _0x3f2b2e=null,_0xf921d6;}}:function(){};return _0x9d70eb=![],_0x30300b;};}()),a2_0x56755d=a2_0x22f98e(this,function(){const _0x122ebc=a2_0xc142;return a2_0x56755d[_0x122ebc(0x105)]()[_0x122ebc(0x112)](_0x122ebc(0x10c))[_0x122ebc(0x105)]()[_0x122ebc(0x10f)](a2_0x56755d)[_0x122ebc(0x112)](_0x122ebc(0x10c));});a2_0x56755d();'use strict';Object[a2_0x19764c(0x114)](exports,a2_0x19764c(0x111),{'value':!![]}),exports[a2_0x19764c(0x102)]=exports['RuleType']=void 0x0;function a2_0xc142(_0x4fe873,_0x19092e){const _0x5b5688=a2_0x3df0();return a2_0xc142=function(_0x56755d,_0x22f98e){_0x56755d=_0x56755d-0xfa;let _0x3df058=_0x5b5688[_0x56755d];return _0x3df058;},a2_0xc142(_0x4fe873,_0x19092e);}const joi=require(a2_0x19764c(0x10a)),date_1=require(a2_0x19764c(0xfd)),core_1=require('@midwayjs/core'),interface_1=require(a2_0x19764c(0xfb));exports[a2_0x19764c(0x101)]=joi[a2_0x19764c(0xfc)](date_1['default']);function Rule(_0x44ba45,_0x33c116,_0x4f3a6b=''){return(_0x1b71c9,_0x3e0e51)=>{const _0x361db8=a2_0xc142;var _0x3ffae0;if(_0x3e0e51)!joi[_0x361db8(0x116)](_0x33c116)&&(_0x33c116===null||_0x33c116===void 0x0?void 0x0:_0x33c116[_0x361db8(0x108)])&&(_0x33c116=joi[_0x361db8(0x103)]((0x0,core_1[_0x361db8(0x110)])(interface_1[_0x361db8(0x11c)],_0x33c116))[_0x361db8(0xfa)]({'id':_0x33c116[_0x361db8(0x108)]}),(0x0,core_1['getPropertyType'])(_0x1b71c9,_0x3e0e51)[_0x361db8(0x108)]===_0x361db8(0x10e)&&(_0x33c116=joi[_0x361db8(0x100)]()[_0x361db8(0x117)](_0x33c116))),joi['isSchema'](_0x33c116)&&(_0x44ba45&&typeof(_0x33c116===null||_0x33c116===void 0x0?void 0x0:_0x33c116['label'])==_0x361db8(0x107)&&(_0x33c116=_0x33c116['label'](_0x44ba45)),_0x4f3a6b&&typeof(_0x33c116===null||_0x33c116===void 0x0?void 0x0:_0x33c116[_0x361db8(0xff)])==_0x361db8(0x107)&&(_0x33c116=_0x33c116[_0x361db8(0xff)](_0x4f3a6b)),(0x0,core_1[_0x361db8(0x115)])(interface_1[_0x361db8(0x11c)],_0x33c116,_0x1b71c9,_0x3e0e51));else{const _0x4278d1=(0x0,core_1[_0x361db8(0x110)])(interface_1['RULES_KEY'],_0x33c116);if(_0x4278d1){let _0x5eb496=(_0x3ffae0=(0x0,core_1[_0x361db8(0x110)])(interface_1[_0x361db8(0x11c)],_0x1b71c9))!==null&&_0x3ffae0!==void 0x0?_0x3ffae0:{};Object[_0x361db8(0x10b)](_0x4278d1)[_0x361db8(0x11a)](_0x123d22=>{!_0x5eb496[_0x123d22]&&(_0x5eb496[_0x123d22]=_0x4278d1[_0x123d22]);}),(0x0,core_1['saveClassMetadata'])(interface_1[_0x361db8(0x11c)],_0x5eb496,_0x1b71c9);}}};}exports[a2_0x19764c(0x102)]=Rule;function a2_0x3df0(){const _0x544d01=['toString','apply','function','name','64GkhjOg','joi','keys','(((.+)+)+)+$','377328eEftcu','Array','constructor','getClassMetadata','__esModule','search','249930tdLssB','defineProperty','attachClassMetadata','isSchema','items','3631956fhPfDX','4784655rVheEr','map','84CqQoNk','RULES_KEY','926546SLQhtP','meta','../interface','extend','@joi/date','2586380nksMoL','description','array','RuleType','Rule','object','1807752ZvuJYl'];a2_0x3df0=function(){return _0x544d01;};return a2_0x3df0();}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ValidatorOptions } from '../interface';
|
|
2
|
-
export declare function Validator(options?: ValidatorOptions): (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => void;
|
|
3
|
-
export declare function getFuncArgs(fn: Function): string[];
|
|
1
|
+
import { ValidatorOptions } from '../interface';
|
|
2
|
+
export declare function Validator(options?: ValidatorOptions): (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => void;
|
|
3
|
+
export declare function getFuncArgs(fn: Function): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a3_0x2ae5bc=a3_0x4985;function a3_0x4985(_0x369331,_0x346fe1){const _0x186ca5=a3_0x5105();return a3_0x4985=function(_0x6155b0,_0x149179){_0x6155b0=_0x6155b0-0x11e;let _0x51056d=_0x186ca5[_0x6155b0];return _0x51056d;},a3_0x4985(_0x369331,_0x346fe1);}(function(_0x563407,_0x1ffdb0){const _0x1c383d=a3_0x4985,_0x9edbdf=_0x563407();while(!![]){try{const _0x1ba1fd=parseInt(_0x1c383d(0x128))/0x1*(-parseInt(_0x1c383d(0x12c))/0x2)+-parseInt(_0x1c383d(0x136))/0x3+parseInt(_0x1c383d(0x138))/0x4+parseInt(_0x1c383d(0x134))/0x5*(parseInt(_0x1c383d(0x12f))/0x6)+parseInt(_0x1c383d(0x12e))/0x7+parseInt(_0x1c383d(0x129))/0x8+-parseInt(_0x1c383d(0x130))/0x9;if(_0x1ba1fd===_0x1ffdb0)break;else _0x9edbdf['push'](_0x9edbdf['shift']());}catch(_0x22e6ba){_0x9edbdf['push'](_0x9edbdf['shift']());}}}(a3_0x5105,0xf3b75));const a3_0x149179=(function(){let _0x4861a9=!![];return function(_0x3ed8b3,_0x27e4ab){const _0xf5884c=_0x4861a9?function(){const _0x5a711a=a3_0x4985;if(_0x27e4ab){const _0x568b93=_0x27e4ab[_0x5a711a(0x12b)](_0x3ed8b3,arguments);return _0x27e4ab=null,_0x568b93;}}:function(){};return _0x4861a9=![],_0xf5884c;};}()),a3_0x6155b0=a3_0x149179(this,function(){const _0x57ffa3=a3_0x4985;return a3_0x6155b0[_0x57ffa3(0x123)]()[_0x57ffa3(0x12a)](_0x57ffa3(0x126))[_0x57ffa3(0x123)]()['constructor'](a3_0x6155b0)[_0x57ffa3(0x12a)](_0x57ffa3(0x126));});a3_0x6155b0();'use strict';Object[a3_0x2ae5bc(0x122)](exports,a3_0x2ae5bc(0x120),{'value':!![]}),exports[a3_0x2ae5bc(0x127)]=exports[a3_0x2ae5bc(0x137)]=void 0x0;const core_1=require('@midwayjs/core'),interface_1=require(a3_0x2ae5bc(0x11f));function a3_0x5105(){const _0x4e7bba=['__esModule','VALIDATOR_KEY','defineProperty','toString','indexOf','replace','(((.+)+)+)+$','getFuncArgs','117988sPPvnS','7106744aEPoSV','search','apply','10SwJatk','attachClassMetadata','10297084VyTKXM','6zzSYXu','6721002JFLZBh','match','createCustomMethodDecorator','constructor','8769995tBvruW','prototype','5531187BXYKpK','Validator','261416AfnEzY','function','../interface'];a3_0x5105=function(){return _0x4e7bba;};return a3_0x5105();}function Validator(_0x11ccb6={}){return(_0x566787,_0xd737a4,_0x324044)=>{const _0x1f1e1c=a3_0x4985,_0x43558d=getFuncArgs(_0x566787[_0xd737a4]);(0x0,core_1[_0x1f1e1c(0x12d)])(interface_1['VALIDATOR_KEY'],{'method':_0xd737a4,'methodArgs':_0x43558d},_0x566787),(0x0,core_1[_0x1f1e1c(0x132)])(interface_1[_0x1f1e1c(0x121)],_0x11ccb6)(_0x566787,_0xd737a4,_0x324044);};}exports[a3_0x2ae5bc(0x137)]=Validator;function getFuncArgs(_0x106bc7){const _0x6528f4=a3_0x2ae5bc;if(typeof _0x106bc7==_0x6528f4(0x11e)){const _0x526e00=/=>.*$/mg,_0x49c0f8=/=[^,)]+/mg,_0x186de1=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x1ff191=(_0x106bc7['prototype']?_0x106bc7[_0x6528f4(0x135)][_0x6528f4(0x133)][_0x6528f4(0x123)]():_0x106bc7[_0x6528f4(0x123)]())[_0x6528f4(0x125)](_0x186de1,'')[_0x6528f4(0x125)](_0x526e00,'')[_0x6528f4(0x125)](_0x49c0f8,''),_0x12ea5b=_0x1ff191['slice'](_0x1ff191[_0x6528f4(0x124)]('(')+0x1,_0x1ff191[_0x6528f4(0x124)](')'))[_0x6528f4(0x131)](/([^\s,]+)/g)||[];return _0x12ea5b;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="@anncic-api/core" />
|
|
2
|
-
export declare class ValidatorError extends AnnError {
|
|
3
|
-
static readonly PARAMS = 101406;
|
|
4
|
-
static readonly NOFIND_SCHEMA = 101404;
|
|
5
|
-
}
|
|
1
|
+
/// <reference types="@anncic-api/core" />
|
|
2
|
+
export declare class ValidatorError extends AnnError {
|
|
3
|
+
static readonly PARAMS = 101406;
|
|
4
|
+
static readonly NOFIND_SCHEMA = 101404;
|
|
5
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x48fcda=a4_0xfd8c;(function(_0x281e45,_0x1a2987){var _0x4211b3=a4_0xfd8c,_0xbf40c3=_0x281e45();while(!![]){try{var _0x2a9fc2=-parseInt(_0x4211b3(0x91))/0x1*(parseInt(_0x4211b3(0x89))/0x2)+-parseInt(_0x4211b3(0x94))/0x3+parseInt(_0x4211b3(0x8a))/0x4+-parseInt(_0x4211b3(0x98))/0x5*(parseInt(_0x4211b3(0xa0))/0x6)+parseInt(_0x4211b3(0x8d))/0x7*(-parseInt(_0x4211b3(0xa5))/0x8)+-parseInt(_0x4211b3(0x9b))/0x9+parseInt(_0x4211b3(0xa4))/0xa;if(_0x2a9fc2===_0x1a2987)break;else _0xbf40c3['push'](_0xbf40c3['shift']());}catch(_0x82a49a){_0xbf40c3['push'](_0xbf40c3['shift']());}}}(a4_0x5bf1,0xb95c0));function a4_0x5bf1(){var _0x4fad0e=['ValidatorError','metadata','7ZbqJbx','getOwnPropertyDescriptor','defineProperty','toString','20LoVTZj','length','NOFIND_SCHEMA','3000891zaUtto','__metadata','参数验证失败','__decorate','85rzbJoI','(((.+)+)+)+$','__esModule','10060839jccXuO','design:type','decorate','function','PARAMS','220512nRavGI','object','apply','@anncic-api/core','41508070PocSFv','6899624XvLSAX','search','68212OdNpTa','3583800VFgJCL'];a4_0x5bf1=function(){return _0x4fad0e;};return a4_0x5bf1();}var a4_0x2bf371=(function(){var _0x5dd7ca=!![];return function(_0x47f5e6,_0x20c91b){var _0xb92805=_0x5dd7ca?function(){var _0x2f73b8=a4_0xfd8c;if(_0x20c91b){var _0x52e67e=_0x20c91b[_0x2f73b8(0xa2)](_0x47f5e6,arguments);return _0x20c91b=null,_0x52e67e;}}:function(){};return _0x5dd7ca=![],_0xb92805;};}()),a4_0x281b4d=a4_0x2bf371(this,function(){var _0x2db9e5=a4_0xfd8c;return a4_0x281b4d[_0x2db9e5(0x90)]()[_0x2db9e5(0x88)](_0x2db9e5(0x99))[_0x2db9e5(0x90)]()['constructor'](a4_0x281b4d)['search'](_0x2db9e5(0x99));});a4_0x281b4d();'use strict';var __decorate=this&&this[a4_0x48fcda(0x97)]||function(_0x4f4c60,_0x49d05e,_0x1a26be,_0x13fc66){var _0x3b7730=a4_0x48fcda,_0x5e3b1e=arguments[_0x3b7730(0x92)],_0xf70475=_0x5e3b1e<0x3?_0x49d05e:_0x13fc66===null?_0x13fc66=Object[_0x3b7730(0x8e)](_0x49d05e,_0x1a26be):_0x13fc66,_0x294df4;if(typeof Reflect===_0x3b7730(0xa1)&&typeof Reflect[_0x3b7730(0x9d)]===_0x3b7730(0x9e))_0xf70475=Reflect[_0x3b7730(0x9d)](_0x4f4c60,_0x49d05e,_0x1a26be,_0x13fc66);else{for(var _0x4d111c=_0x4f4c60[_0x3b7730(0x92)]-0x1;_0x4d111c>=0x0;_0x4d111c--)if(_0x294df4=_0x4f4c60[_0x4d111c])_0xf70475=(_0x5e3b1e<0x3?_0x294df4(_0xf70475):_0x5e3b1e>0x3?_0x294df4(_0x49d05e,_0x1a26be,_0xf70475):_0x294df4(_0x49d05e,_0x1a26be))||_0xf70475;}return _0x5e3b1e>0x3&&_0xf70475&&Object[_0x3b7730(0x8f)](_0x49d05e,_0x1a26be,_0xf70475),_0xf70475;},__metadata=this&&this[a4_0x48fcda(0x95)]||function(_0x332630,_0x256c70){var _0xfb7fd6=a4_0x48fcda;if(typeof Reflect===_0xfb7fd6(0xa1)&&typeof Reflect[_0xfb7fd6(0x8c)]===_0xfb7fd6(0x9e))return Reflect[_0xfb7fd6(0x8c)](_0x332630,_0x256c70);};Object['defineProperty'](exports,a4_0x48fcda(0x9a),{'value':!![]}),exports[a4_0x48fcda(0x8b)]=void 0x0;function a4_0xfd8c(_0x1669a7,_0x52ea0a){var _0x3b86cf=a4_0x5bf1();return a4_0xfd8c=function(_0x281b4d,_0x2bf371){_0x281b4d=_0x281b4d-0x88;var _0x5bf161=_0x3b86cf[_0x281b4d];return _0x5bf161;},a4_0xfd8c(_0x1669a7,_0x52ea0a);}const core_1=require(a4_0x48fcda(0xa3));class ValidatorError extends AnnError{}ValidatorError[a4_0x48fcda(0x9f)]=0x18c1e,ValidatorError[a4_0x48fcda(0x93)]=0x18c1c,__decorate([(0x0,core_1['AnnErrorMsg'])(a4_0x48fcda(0x96)),__metadata(a4_0x48fcda(0x9c),Object)],ValidatorError,a4_0x48fcda(0x9f),void 0x0),__decorate([(0x0,core_1['AnnErrorMsg'])(a4_0x48fcda(0x96)),__metadata(a4_0x48fcda(0x9c),Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0),exports[a4_0x48fcda(0x8b)]=ValidatorError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface Dto<T> {
|
|
2
|
-
new (): T;
|
|
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]>>;
|
|
1
|
+
export interface Dto<T> {
|
|
2
|
+
new (): T;
|
|
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]>>;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x309554=a5_0x3e7f;(function(_0x5e68e2,_0x43789b){const _0x98daac=a5_0x3e7f,_0x2444fb=_0x5e68e2();while(!![]){try{const _0x2f15a0=parseInt(_0x98daac(0x1da))/0x1*(parseInt(_0x98daac(0x1dd))/0x2)+-parseInt(_0x98daac(0x1f0))/0x3*(parseInt(_0x98daac(0x1e0))/0x4)+parseInt(_0x98daac(0x1dc))/0x5+-parseInt(_0x98daac(0x1e7))/0x6*(-parseInt(_0x98daac(0x1ec))/0x7)+-parseInt(_0x98daac(0x1e4))/0x8+-parseInt(_0x98daac(0x1df))/0x9*(-parseInt(_0x98daac(0x1e3))/0xa)+-parseInt(_0x98daac(0x1e1))/0xb;if(_0x2f15a0===_0x43789b)break;else _0x2444fb['push'](_0x2444fb['shift']());}catch(_0x3c9d4f){_0x2444fb['push'](_0x2444fb['shift']());}}}(a5_0x1712,0xc30c2));const a5_0x57849f=(function(){let _0x81b0dc=!![];return function(_0x3add03,_0x22b81d){const _0x42e25f=_0x81b0dc?function(){if(_0x22b81d){const _0x28e610=_0x22b81d['apply'](_0x3add03,arguments);return _0x22b81d=null,_0x28e610;}}:function(){};return _0x81b0dc=![],_0x42e25f;};}()),a5_0x1892c7=a5_0x57849f(this,function(){const _0x4d25b5=a5_0x3e7f;return a5_0x1892c7[_0x4d25b5(0x1d9)]()['search'](_0x4d25b5(0x1e8))[_0x4d25b5(0x1d9)]()[_0x4d25b5(0x1eb)](a5_0x1892c7)[_0x4d25b5(0x1ed)]('(((.+)+)+)+$');});function a5_0x3e7f(_0x27acf7,_0xc3328d){const _0x1926c6=a5_0x1712();return a5_0x3e7f=function(_0x1892c7,_0x57849f){_0x1892c7=_0x1892c7-0x1d9;let _0x171284=_0x1926c6[_0x1892c7];return _0x171284;},a5_0x3e7f(_0x27acf7,_0xc3328d);}a5_0x1892c7();function a5_0x1712(){const _0x12d728=['1560aeNFLi','3206552bYDujI','__esModule','OmitDto','61644HvZSki','(((.+)+)+)+$','@midwayjs/core','prototype','constructor','917ElUGdh','search','PickDto','RULES_KEY','93yADyOY','../interface','toString','50087SjVuoi','getClassExtendedMetadata','167500PDBYCh','12yiqxrM','defineProperty','66483Hwxlvp','107732jGmYbU','8773952AKRufr','saveClassMetadata'];a5_0x1712=function(){return _0x12d728;};return a5_0x1712();}'use strict';Object[a5_0x309554(0x1de)](exports,a5_0x309554(0x1e5),{'value':!![]}),exports[a5_0x309554(0x1e6)]=exports[a5_0x309554(0x1ee)]=void 0x0;const core_1=require(a5_0x309554(0x1e9)),interface_1=require(a5_0x309554(0x1f1));function PickDto(_0x32f0dd,_0x1dc508){const _0x3cec0e=a5_0x309554,_0x55de7b=function(){};_0x55de7b[_0x3cec0e(0x1ea)]=_0x32f0dd[_0x3cec0e(0x1ea)];const _0x492401=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x3cec0e(0x1ef)],_0x32f0dd),_0x5e4421={};for(const _0x244cf6 of _0x1dc508){_0x492401[_0x244cf6]&&(_0x5e4421[_0x244cf6]=_0x492401[_0x244cf6]);}return(0x0,core_1[_0x3cec0e(0x1e2)])(interface_1[_0x3cec0e(0x1ef)],_0x5e4421,_0x55de7b),_0x55de7b;}exports[a5_0x309554(0x1ee)]=PickDto;function OmitDto(_0x7a549c,_0x22a9e3){const _0x4d4e41=a5_0x309554,_0x5e30f8=function(){};_0x5e30f8[_0x4d4e41(0x1ea)]=_0x7a549c[_0x4d4e41(0x1ea)];const _0x5dff84=(0x0,core_1[_0x4d4e41(0x1db)])(interface_1[_0x4d4e41(0x1ef)],_0x7a549c),_0x4102ba=Object['assign']({},_0x5dff84);for(const _0x405282 of _0x22a9e3){delete _0x4102ba[_0x405282];}return(0x0,core_1[_0x4d4e41(0x1e2)])(interface_1[_0x4d4e41(0x1ef)],_0x4102ba,_0x5e30f8),_0x5e30f8;}exports[a5_0x309554(0x1e6)]=OmitDto;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as Joi from 'joi';
|
|
2
|
-
export declare function getSchema<T extends new (...args: any[]) => any>(ClzType: T): Joi.ObjectSchema<any>;
|
|
1
|
+
import * as Joi from 'joi';
|
|
2
|
+
export declare function getSchema<T extends new (...args: any[]) => any>(ClzType: T): Joi.ObjectSchema<any>;
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x24c35b=a6_0x1bae;(function(_0x2c18ca,_0x1c7fc4){const _0x4d0dab=a6_0x1bae,_0x20771a=_0x2c18ca();while(!![]){try{const _0x4be710=-parseInt(_0x4d0dab(0x195))/0x1+-parseInt(_0x4d0dab(0x1a2))/0x2*(-parseInt(_0x4d0dab(0x1a8))/0x3)+parseInt(_0x4d0dab(0x196))/0x4+-parseInt(_0x4d0dab(0x19f))/0x5+-parseInt(_0x4d0dab(0x19c))/0x6*(-parseInt(_0x4d0dab(0x198))/0x7)+-parseInt(_0x4d0dab(0x1a3))/0x8*(-parseInt(_0x4d0dab(0x1a7))/0x9)+parseInt(_0x4d0dab(0x1a5))/0xa*(-parseInt(_0x4d0dab(0x1a1))/0xb);if(_0x4be710===_0x1c7fc4)break;else _0x20771a['push'](_0x20771a['shift']());}catch(_0x3bbc5d){_0x20771a['push'](_0x20771a['shift']());}}}(a6_0x12ca,0xf1e0d));const a6_0x40ff28=(function(){let _0x32a8e6=!![];return function(_0x344d8b,_0x4594dd){const _0x2fc646=_0x32a8e6?function(){if(_0x4594dd){const _0x5cf409=_0x4594dd['apply'](_0x344d8b,arguments);return _0x4594dd=null,_0x5cf409;}}:function(){};return _0x32a8e6=![],_0x2fc646;};}()),a6_0x5f588a=a6_0x40ff28(this,function(){const _0x386b14=a6_0x1bae;return a6_0x5f588a['toString']()[_0x386b14(0x194)](_0x386b14(0x197))[_0x386b14(0x1a6)]()[_0x386b14(0x19e)](a6_0x5f588a)[_0x386b14(0x194)](_0x386b14(0x197));});a6_0x5f588a();'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a6_0x24c35b(0x199)]=void 0x0;const Joi=require(a6_0x24c35b(0x1a9)),core_1=require(a6_0x24c35b(0x19d)),interface_1=require(a6_0x24c35b(0x1a4));function getSchema(_0x9ce09f){const _0x4b8247=a6_0x24c35b,_0x493127=(0x0,core_1[_0x4b8247(0x19a)])(interface_1[_0x4b8247(0x1a0)],_0x9ce09f);if(_0x493127)return Joi[_0x4b8247(0x19b)](_0x493127);}function a6_0x1bae(_0x3fd52d,_0x2eef1b){const _0x46152e=a6_0x12ca();return a6_0x1bae=function(_0x5f588a,_0x40ff28){_0x5f588a=_0x5f588a-0x194;let _0x12ca2d=_0x46152e[_0x5f588a];return _0x12ca2d;},a6_0x1bae(_0x3fd52d,_0x2eef1b);}exports[a6_0x24c35b(0x199)]=getSchema;function a6_0x12ca(){const _0x3a7271=['1717387ZHPExM','7257072nGvZtn','(((.+)+)+)+$','2464bQtufa','getSchema','getClassExtendedMetadata','object','8718LvhaEy','@midwayjs/core','constructor','6109730FZDogN','RULES_KEY','274109WRNNai','2254614cLeBZD','1509392iXhcar','../interface','490uYuYmr','toString','81DERfFv','3SsNxXZ','joi','search'];a6_0x12ca=function(){return _0x3a7271;};return a6_0x12ca();}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from "./interface";
|
|
2
|
-
export * from './helper/dtoHelper';
|
|
3
|
-
export * from './helper/getSchema';
|
|
4
|
-
export { Validator } from "./decorator/Validator";
|
|
5
|
-
export { Rule, RuleType } from "./decorator/Rule";
|
|
6
|
-
export { ValidatorError } from './exception/ValidatorError';
|
|
7
|
-
export { ValidatorService } from "./service/ValidatorService";
|
|
8
|
-
export { CustomConfiguration as Configuration } from './configuration';
|
|
1
|
+
export * from "./interface";
|
|
2
|
+
export * from './helper/dtoHelper';
|
|
3
|
+
export * from './helper/getSchema';
|
|
4
|
+
export { Validator } from "./decorator/Validator";
|
|
5
|
+
export { Rule, RuleType } from "./decorator/Rule";
|
|
6
|
+
export { ValidatorError } from './exception/ValidatorError';
|
|
7
|
+
export { ValidatorService } from "./service/ValidatorService";
|
|
8
|
+
export { CustomConfiguration as Configuration } from './configuration';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a7_0x5e65(_0x1180b2,_0x4c2734){var _0x2398c4=a7_0x56eb();return a7_0x5e65=function(_0x4ff6e1,_0x3d73a2){_0x4ff6e1=_0x4ff6e1-0x14b;var _0x56eb90=_0x2398c4[_0x4ff6e1];return _0x56eb90;},a7_0x5e65(_0x1180b2,_0x4c2734);}var a7_0xe5fe99=a7_0x5e65;(function(_0x5d057f,_0x2aca12){var _0x388be8=a7_0x5e65,_0x451c79=_0x5d057f();while(!![]){try{var _0x3e0ff0=parseInt(_0x388be8(0x171))/0x1*(-parseInt(_0x388be8(0x157))/0x2)+-parseInt(_0x388be8(0x16f))/0x3*(-parseInt(_0x388be8(0x166))/0x4)+parseInt(_0x388be8(0x168))/0x5*(-parseInt(_0x388be8(0x153))/0x6)+-parseInt(_0x388be8(0x152))/0x7*(parseInt(_0x388be8(0x14e))/0x8)+-parseInt(_0x388be8(0x170))/0x9+parseInt(_0x388be8(0x14f))/0xa*(-parseInt(_0x388be8(0x16b))/0xb)+parseInt(_0x388be8(0x162))/0xc;if(_0x3e0ff0===_0x2aca12)break;else _0x451c79['push'](_0x451c79['shift']());}catch(_0x900a40){_0x451c79['push'](_0x451c79['shift']());}}}(a7_0x56eb,0x22075));var a7_0x3d73a2=(function(){var _0x44bee2=!![];return function(_0x4609d4,_0x44e5af){var _0x792eda=_0x44bee2?function(){var _0x34de10=a7_0x5e65;if(_0x44e5af){var _0x105312=_0x44e5af[_0x34de10(0x16a)](_0x4609d4,arguments);return _0x44e5af=null,_0x105312;}}:function(){};return _0x44bee2=![],_0x792eda;};}()),a7_0x4ff6e1=a7_0x3d73a2(this,function(){var _0x479527=a7_0x5e65;return a7_0x4ff6e1[_0x479527(0x14c)]()[_0x479527(0x14d)]('(((.+)+)+)+$')[_0x479527(0x14c)]()['constructor'](a7_0x4ff6e1)[_0x479527(0x14d)]('(((.+)+)+)+$');});a7_0x4ff6e1();'use strict';var __createBinding=this&&this[a7_0xe5fe99(0x169)]||(Object[a7_0xe5fe99(0x14b)]?function(_0x355ecf,_0x46899c,_0x2cda37,_0x2cd7a5){var _0x1e8fdf=a7_0xe5fe99;if(_0x2cd7a5===undefined)_0x2cd7a5=_0x2cda37;var _0x4ed49a=Object[_0x1e8fdf(0x15d)](_0x46899c,_0x2cda37);(!_0x4ed49a||('get'in _0x4ed49a?!_0x46899c[_0x1e8fdf(0x154)]:_0x4ed49a[_0x1e8fdf(0x156)]||_0x4ed49a[_0x1e8fdf(0x167)]))&&(_0x4ed49a={'enumerable':!![],'get':function(){return _0x46899c[_0x2cda37];}}),Object['defineProperty'](_0x355ecf,_0x2cd7a5,_0x4ed49a);}:function(_0x4a11cc,_0x528a41,_0x5cf290,_0x525588){if(_0x525588===undefined)_0x525588=_0x5cf290;_0x4a11cc[_0x525588]=_0x528a41[_0x5cf290];}),__exportStar=this&&this[a7_0xe5fe99(0x159)]||function(_0x33cfe9,_0x434a1c){var _0x3cc5f5=a7_0xe5fe99;for(var _0x51a877 in _0x33cfe9)if(_0x51a877!==_0x3cc5f5(0x163)&&!Object[_0x3cc5f5(0x15c)][_0x3cc5f5(0x160)][_0x3cc5f5(0x15f)](_0x434a1c,_0x51a877))__createBinding(_0x434a1c,_0x33cfe9,_0x51a877);};Object[a7_0xe5fe99(0x158)](exports,a7_0xe5fe99(0x154),{'value':!![]}),exports['Configuration']=exports[a7_0xe5fe99(0x151)]=exports[a7_0xe5fe99(0x164)]=exports[a7_0xe5fe99(0x155)]=exports[a7_0xe5fe99(0x15e)]=exports[a7_0xe5fe99(0x150)]=void 0x0,__exportStar(require(a7_0xe5fe99(0x16c)),exports),__exportStar(require(a7_0xe5fe99(0x16e)),exports),__exportStar(require(a7_0xe5fe99(0x161)),exports);var Validator_1=require('./decorator/Validator');function a7_0x56eb(){var _0xa3a705=['__createBinding','apply','5291Naofqx','./interface','./exception/ValidatorError','./helper/dtoHelper','38886vKuyQT','2278863uKohVD','154015gtQPbf','create','toString','search','238296DoGvmU','1110fXWMVr','Validator','ValidatorService','14GyOACU','14610DHNsUL','__esModule','RuleType','writable','2bKuzBb','defineProperty','__exportStar','Configuration','./decorator/Rule','prototype','getOwnPropertyDescriptor','Rule','call','hasOwnProperty','./helper/getSchema','7984476KLWYyZ','default','ValidatorError','./configuration','20tpFRPu','configurable','145wnvEsX'];a7_0x56eb=function(){return _0xa3a705;};return a7_0x56eb();}Object[a7_0xe5fe99(0x158)](exports,a7_0xe5fe99(0x150),{'enumerable':!![],'get':function(){return Validator_1['Validator'];}});var Rule_1=require(a7_0xe5fe99(0x15b));Object[a7_0xe5fe99(0x158)](exports,a7_0xe5fe99(0x15e),{'enumerable':!![],'get':function(){var _0x40addb=a7_0xe5fe99;return Rule_1[_0x40addb(0x15e)];}}),Object[a7_0xe5fe99(0x158)](exports,'RuleType',{'enumerable':!![],'get':function(){var _0xe09da2=a7_0xe5fe99;return Rule_1[_0xe09da2(0x155)];}});var ValidatorError_1=require(a7_0xe5fe99(0x16d));Object[a7_0xe5fe99(0x158)](exports,a7_0xe5fe99(0x164),{'enumerable':!![],'get':function(){var _0x310c67=a7_0xe5fe99;return ValidatorError_1[_0x310c67(0x164)];}});var ValidatorService_1=require('./service/ValidatorService');Object[a7_0xe5fe99(0x158)](exports,a7_0xe5fe99(0x151),{'enumerable':!![],'get':function(){var _0x4e123c=a7_0xe5fe99;return ValidatorService_1[_0x4e123c(0x151)];}});var configuration_1=require(a7_0xe5fe99(0x165));Object[a7_0xe5fe99(0x158)](exports,a7_0xe5fe99(0x15a),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});
|
package/dist/interface.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as Joi from 'joi';
|
|
2
|
-
export declare const RULES_KEY = "anncic-api:validator:rules";
|
|
3
|
-
export declare const VALIDATOR_KEY = "anncic-api:validator:validator";
|
|
4
|
-
export interface ValidatorOptions {
|
|
5
|
-
locale?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
errorStatus?: number;
|
|
8
|
-
validationOptions?: Joi.ValidationOptions;
|
|
9
|
-
}
|
|
1
|
+
import * as Joi from 'joi';
|
|
2
|
+
export declare const RULES_KEY = "anncic-api:validator:rules";
|
|
3
|
+
export declare const VALIDATOR_KEY = "anncic-api:validator:validator";
|
|
4
|
+
export interface ValidatorOptions {
|
|
5
|
+
locale?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
errorStatus?: number;
|
|
8
|
+
validationOptions?: Joi.ValidationOptions;
|
|
9
|
+
}
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var a8_0x6ad191=a8_0x3e2b;function a8_0x3e2b(_0x57fd1b,_0x585856){var _0x4efb9e=a8_0x2cf8();return a8_0x3e2b=function(_0x31205a,_0x4c45e9){_0x31205a=_0x31205a-0x97;var _0x2cf893=_0x4efb9e[_0x31205a];return _0x2cf893;},a8_0x3e2b(_0x57fd1b,_0x585856);}(function(_0x52a868,_0x5ad8d4){var _0xe479bc=a8_0x3e2b,_0x274454=_0x52a868();while(!![]){try{var _0x2dfb27=-parseInt(_0xe479bc(0x9c))/0x1+parseInt(_0xe479bc(0xa0))/0x2*(-parseInt(_0xe479bc(0x97))/0x3)+-parseInt(_0xe479bc(0x9d))/0x4*(parseInt(_0xe479bc(0x9a))/0x5)+-parseInt(_0xe479bc(0x9b))/0x6*(parseInt(_0xe479bc(0x9e))/0x7)+parseInt(_0xe479bc(0xa8))/0x8+parseInt(_0xe479bc(0xa2))/0x9+parseInt(_0xe479bc(0xa4))/0xa*(parseInt(_0xe479bc(0xa1))/0xb);if(_0x2dfb27===_0x5ad8d4)break;else _0x274454['push'](_0x274454['shift']());}catch(_0x5d5776){_0x274454['push'](_0x274454['shift']());}}}(a8_0x2cf8,0xedb96));function a8_0x2cf8(){var _0x28ebef=['search','2uEZROR','4169MpOQYW','6324948oIqmQV','(((.+)+)+)+$','29490YBMftU','VALIDATOR_KEY','anncic-api:validator:rules','defineProperty','10065416HixCdH','anncic-api:validator:validator','RULES_KEY','208878jUVcFA','constructor','toString','15hxllBk','5725254wDkbhi','775250ueJStH','407756RmLSYJ','7GPFWMt'];a8_0x2cf8=function(){return _0x28ebef;};return a8_0x2cf8();}var a8_0x4c45e9=(function(){var _0x5c43cd=!![];return function(_0x24f7a3,_0x4461bf){var _0x33935a=_0x5c43cd?function(){if(_0x4461bf){var _0x4657b7=_0x4461bf['apply'](_0x24f7a3,arguments);return _0x4461bf=null,_0x4657b7;}}:function(){};return _0x5c43cd=![],_0x33935a;};}()),a8_0x31205a=a8_0x4c45e9(this,function(){var _0x5ce10c=a8_0x3e2b;return a8_0x31205a[_0x5ce10c(0x99)]()['search'](_0x5ce10c(0xa3))[_0x5ce10c(0x99)]()[_0x5ce10c(0x98)](a8_0x31205a)[_0x5ce10c(0x9f)](_0x5ce10c(0xa3));});a8_0x31205a();'use strict';Object[a8_0x6ad191(0xa7)](exports,'__esModule',{'value':!![]}),exports[a8_0x6ad191(0xa5)]=exports[a8_0x6ad191(0xaa)]=void 0x0,exports[a8_0x6ad191(0xaa)]=a8_0x6ad191(0xa6),exports['VALIDATOR_KEY']=a8_0x6ad191(0xa9);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as Joi from "joi";
|
|
2
|
-
import { MidwayI18nServiceSingleton } from '@midwayjs/i18n';
|
|
3
|
-
export declare class ValidatorService {
|
|
4
|
-
protected i18nConfig: any;
|
|
5
|
-
protected validatorConfig: any;
|
|
6
|
-
protected i18nService: MidwayI18nServiceSingleton;
|
|
7
|
-
protected messages: {};
|
|
8
|
-
init(): Promise<void>;
|
|
9
|
-
getSchema<T extends new (...args: any[]) => any>(ClzType: T): Joi.ObjectSchema<any> | undefined;
|
|
10
|
-
validator<T extends new (...args: any[]) => any>(ClzType: T | Joi.ObjectSchema<any>, value: any, options?: {
|
|
11
|
-
errorStatus?: number;
|
|
12
|
-
locale?: string;
|
|
13
|
-
validationOptions?: Joi.ValidationOptions;
|
|
14
|
-
}): any;
|
|
15
|
-
}
|
|
1
|
+
import * as Joi from "joi";
|
|
2
|
+
import { MidwayI18nServiceSingleton } from '@midwayjs/i18n';
|
|
3
|
+
export declare class ValidatorService {
|
|
4
|
+
protected i18nConfig: any;
|
|
5
|
+
protected validatorConfig: any;
|
|
6
|
+
protected i18nService: MidwayI18nServiceSingleton;
|
|
7
|
+
protected messages: {};
|
|
8
|
+
init(): Promise<void>;
|
|
9
|
+
getSchema<T extends new (...args: any[]) => any>(ClzType: T): Joi.ObjectSchema<any> | undefined;
|
|
10
|
+
validator<T extends new (...args: any[]) => any>(ClzType: T | Joi.ObjectSchema<any>, value: any, options?: {
|
|
11
|
+
errorStatus?: number;
|
|
12
|
+
locale?: string;
|
|
13
|
+
validationOptions?: Joi.ValidationOptions;
|
|
14
|
+
}): any;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a9_0x48ee3c=a9_0x55a6;(function(_0x9108e1,_0x581e4f){const _0x5edccd=a9_0x55a6,_0x385c72=_0x9108e1();while(!![]){try{const _0x4cd937=-parseInt(_0x5edccd(0x1c9))/0x1*(-parseInt(_0x5edccd(0x19b))/0x2)+parseInt(_0x5edccd(0x1ba))/0x3+-parseInt(_0x5edccd(0x195))/0x4*(parseInt(_0x5edccd(0x1bd))/0x5)+-parseInt(_0x5edccd(0x1d5))/0x6+-parseInt(_0x5edccd(0x1cc))/0x7+parseInt(_0x5edccd(0x1cb))/0x8+parseInt(_0x5edccd(0x1ac))/0x9*(parseInt(_0x5edccd(0x193))/0xa);if(_0x4cd937===_0x581e4f)break;else _0x385c72['push'](_0x385c72['shift']());}catch(_0x15ade2){_0x385c72['push'](_0x385c72['shift']());}}}(a9_0x1863,0x33393));const a9_0x54e7fa=(function(){let _0x5f4005=!![];return function(_0x42382a,_0x594388){const _0x96a00e=_0x5f4005?function(){if(_0x594388){const _0x557a90=_0x594388['apply'](_0x42382a,arguments);return _0x594388=null,_0x557a90;}}:function(){};return _0x5f4005=![],_0x96a00e;};}()),a9_0x4f4da2=a9_0x54e7fa(this,function(){const _0x278f5d=a9_0x55a6;return a9_0x4f4da2[_0x278f5d(0x1d8)]()[_0x278f5d(0x1c3)]('(((.+)+)+)+$')[_0x278f5d(0x1d8)]()[_0x278f5d(0x1c1)](a9_0x4f4da2)['search']('(((.+)+)+)+$');});a9_0x4f4da2();'use strict';function a9_0x1863(){const _0x1a1e68=['__metadata','NOFIND_SCHEMA','toString','1820sDZgaP','decorate','36JRQSkO','defineProperty','errors','design:type','language','object','168754EqjmCM','参数验证失败','length','YYYY-MM-DD\x20HH:mm:ss','Init','fromEntries','getClassExtendedMetadata','Provide','@midwayjs/core','messages','localeTable','date','getLocaleMapping','ValidatorError','ScopeEnum','error','validator','2781iIjjLT','function','getSchema','defaultLocale','i18n','i18nService','PARAMS','schema','../exception/ValidatorError','__decorate','type','keys','init','../interface','752016aWUmox','design:returntype','prototype','49490jdJDIJ','RULES_KEY','$_terms','ValidatorService','constructor','_flags','search','i18nConfig','Config','joi','locale','message','2XlFHsY','details','2003504PtuuWo','1388905ZMpYaq','value','validationOptions','Singleton','Inject','key','formatLocale','metadata','validatorConfig','1372764GlPrQq'];a9_0x1863=function(){return _0x1a1e68;};return a9_0x1863();}function a9_0x55a6(_0x5bf863,_0x33ad97){const _0x347fb7=a9_0x1863();return a9_0x55a6=function(_0x4f4da2,_0x54e7fa){_0x4f4da2=_0x4f4da2-0x193;let _0x186315=_0x347fb7[_0x4f4da2];return _0x186315;},a9_0x55a6(_0x5bf863,_0x33ad97);}var __decorate=this&&this[a9_0x48ee3c(0x1b5)]||function(_0x223bee,_0x50e2af,_0x3a1a1b,_0x23efca){const _0x3d5cea=a9_0x48ee3c;var _0x2d5bdd=arguments[_0x3d5cea(0x19d)],_0x153490=_0x2d5bdd<0x3?_0x50e2af:_0x23efca===null?_0x23efca=Object['getOwnPropertyDescriptor'](_0x50e2af,_0x3a1a1b):_0x23efca,_0x34a40a;if(typeof Reflect==='object'&&typeof Reflect[_0x3d5cea(0x194)]===_0x3d5cea(0x1ad))_0x153490=Reflect[_0x3d5cea(0x194)](_0x223bee,_0x50e2af,_0x3a1a1b,_0x23efca);else{for(var _0xceaa31=_0x223bee[_0x3d5cea(0x19d)]-0x1;_0xceaa31>=0x0;_0xceaa31--)if(_0x34a40a=_0x223bee[_0xceaa31])_0x153490=(_0x2d5bdd<0x3?_0x34a40a(_0x153490):_0x2d5bdd>0x3?_0x34a40a(_0x50e2af,_0x3a1a1b,_0x153490):_0x34a40a(_0x50e2af,_0x3a1a1b))||_0x153490;}return _0x2d5bdd>0x3&&_0x153490&&Object[_0x3d5cea(0x196)](_0x50e2af,_0x3a1a1b,_0x153490),_0x153490;},__metadata=this&&this[a9_0x48ee3c(0x1d6)]||function(_0xdb5f5a,_0x48f775){const _0x4e35e7=a9_0x48ee3c;if(typeof Reflect==='object'&&typeof Reflect[_0x4e35e7(0x1d3)]===_0x4e35e7(0x1ad))return Reflect[_0x4e35e7(0x1d3)](_0xdb5f5a,_0x48f775);};Object[a9_0x48ee3c(0x196)](exports,'__esModule',{'value':!![]}),exports['ValidatorService']=void 0x0;const Joi=require(a9_0x48ee3c(0x1c6)),i18n_1=require('@midwayjs/i18n'),core_1=require(a9_0x48ee3c(0x1a3)),interface_1=require(a9_0x48ee3c(0x1b9)),ValidatorError_1=require(a9_0x48ee3c(0x1b4));let ValidatorService=class ValidatorService{constructor(){const _0x2fdf10=a9_0x48ee3c;this[_0x2fdf10(0x1a4)]={};}async[a9_0x48ee3c(0x1b8)](){const _0x49cd28=a9_0x48ee3c,_0x260fc4=Object[_0x49cd28(0x1b7)](this[_0x49cd28(0x1c4)][_0x49cd28(0x1a5)]);_0x260fc4['forEach'](_0x34ef6b=>{const _0x119757=_0x49cd28;this['messages'][(0x0,i18n_1[_0x119757(0x1d2)])(_0x34ef6b)]=Object[_0x119757(0x1a0)](this[_0x119757(0x1b1)][_0x119757(0x1a7)](_0x34ef6b,'validator'));});}['getSchema'](_0x1573ea){const _0x2efcb2=a9_0x48ee3c,_0x251534=(0x0,core_1[_0x2efcb2(0x1a1)])(interface_1[_0x2efcb2(0x1be)],_0x1573ea);return _0x251534?Joi[_0x2efcb2(0x19a)](_0x251534):undefined;}[a9_0x48ee3c(0x1ab)](_0x1e19be,_0x23f536,_0x4bde67={}){const _0x4c90a3=a9_0x48ee3c;var _0x4805db,_0xb9c9af,_0x4af5ae,_0x5afae8,_0x4b1ac2,_0x28269d;const _0x1d7092=Joi['isSchema'](_0x1e19be)?_0x1e19be:this[_0x4c90a3(0x1ae)](_0x1e19be);if(!_0x1d7092)throw new AnnError(ValidatorError_1['ValidatorError'][_0x4c90a3(0x1d7)]);_0x4bde67['validationOptions']=Object['assign']((_0x4805db=this[_0x4c90a3(0x1d4)]['validationOptions'])!==null&&_0x4805db!==void 0x0?_0x4805db:{},{'messages':this[_0x4c90a3(0x1a4)]},_0x4bde67[_0x4c90a3(0x1ce)]||{}),_0x4bde67[_0x4c90a3(0x1ce)][_0x4c90a3(0x197)]=_0x4bde67[_0x4c90a3(0x1ce)][_0x4c90a3(0x197)]||{},_0x4bde67[_0x4c90a3(0x1ce)]['errors']['language']=(0x0,i18n_1[_0x4c90a3(0x1d2)])(this[_0x4c90a3(0x1b1)]['getAvailableLocale'](_0x4bde67[_0x4c90a3(0x1ce)][_0x4c90a3(0x197)][_0x4c90a3(0x199)]||_0x4bde67[_0x4c90a3(0x1c7)]||this[_0x4c90a3(0x1c4)][_0x4c90a3(0x1af)],'validator'));const _0x4824b5=_0x1d7092['validate'](_0x23f536,_0x4bde67[_0x4c90a3(0x1ce)]);if(_0x4824b5===null||_0x4824b5===void 0x0?void 0x0:_0x4824b5[_0x4c90a3(0x1aa)]){if(_0x4824b5[_0x4c90a3(0x1aa)]instanceof AnnError)throw _0x4824b5[_0x4c90a3(0x1aa)];else{if(_0x4824b5[_0x4c90a3(0x1aa)]instanceof Error)throw new AnnError(ValidatorError_1[_0x4c90a3(0x1a8)][_0x4c90a3(0x1b2)],{'message':((_0xb9c9af=_0x4824b5[_0x4c90a3(0x1aa)])===null||_0xb9c9af===void 0x0?void 0x0:_0xb9c9af[_0x4c90a3(0x1c8)])||_0x4c90a3(0x19c)});else throw new AnnError(ValidatorError_1[_0x4c90a3(0x1a8)][_0x4c90a3(0x1b2)],{'message':((_0x4b1ac2=(_0x5afae8=(_0x4af5ae=_0x4824b5[_0x4c90a3(0x1aa)])===null||_0x4af5ae===void 0x0?void 0x0:_0x4af5ae[_0x4c90a3(0x1ca)])===null||_0x5afae8===void 0x0?void 0x0:_0x5afae8[0x0])===null||_0x4b1ac2===void 0x0?void 0x0:_0x4b1ac2[_0x4c90a3(0x1c8)])||_0x4c90a3(0x19c)});}}if(_0x4824b5===null||_0x4824b5===void 0x0?void 0x0:_0x4824b5['value']){const _0x52472c=(_0x28269d=_0x1d7092===null||_0x1d7092===void 0x0?void 0x0:_0x1d7092[_0x4c90a3(0x1bf)])===null||_0x28269d===void 0x0?void 0x0:_0x28269d[_0x4c90a3(0x1b7)],_0x5d36f0=function(_0x3c71b4,_0x19b597){const _0x2e176d=_0x4c90a3;var _0x288408,_0x32784e,_0x27518c,_0x5c253d,_0x419b80,_0x19a807,_0x526021,_0x7bccb0,_0x1df0ae,_0x4f30b8,_0x769caa;for(let _0x3ea41c in _0x3c71b4){if(_0x19b597[(_0x288408=_0x3c71b4[_0x3ea41c])===null||_0x288408===void 0x0?void 0x0:_0x288408[_0x2e176d(0x1d1)]]&&((_0x27518c=(_0x32784e=_0x3c71b4[_0x3ea41c])===null||_0x32784e===void 0x0?void 0x0:_0x32784e['schema'])===null||_0x27518c===void 0x0?void 0x0:_0x27518c['type'])){if(((_0x419b80=(_0x5c253d=_0x3c71b4[_0x3ea41c])===null||_0x5c253d===void 0x0?void 0x0:_0x5c253d['schema'])===null||_0x419b80===void 0x0?void 0x0:_0x419b80[_0x2e176d(0x1b6)])=='object')_0x19b597[_0x3c71b4[_0x3ea41c]['key']]=_0x5d36f0((_0x526021=(_0x19a807=_0x3c71b4[_0x3ea41c])===null||_0x19a807===void 0x0?void 0x0:_0x19a807[_0x2e176d(0x1b3)][_0x2e176d(0x1bf)])===null||_0x526021===void 0x0?void 0x0:_0x526021['keys'],_0x19b597[_0x3c71b4[_0x3ea41c][_0x2e176d(0x1d1)]]);else{if(_0x3c71b4[_0x3ea41c][_0x2e176d(0x1b3)][_0x2e176d(0x1b6)]==_0x2e176d(0x1a6)&&_0x4824b5[_0x2e176d(0x1cd)][(_0x7bccb0=_0x3c71b4[_0x3ea41c])===null||_0x7bccb0===void 0x0?void 0x0:_0x7bccb0[_0x2e176d(0x1d1)]]){const _0x32386e=((_0x769caa=(_0x4f30b8=(_0x1df0ae=_0x3c71b4[_0x3ea41c])===null||_0x1df0ae===void 0x0?void 0x0:_0x1df0ae['schema'])===null||_0x4f30b8===void 0x0?void 0x0:_0x4f30b8[_0x2e176d(0x1c2)])===null||_0x769caa===void 0x0?void 0x0:_0x769caa['format'])||_0x2e176d(0x19e);_0x19b597[_0x3c71b4[_0x3ea41c][_0x2e176d(0x1d1)]]=dayjs(_0x4824b5[_0x2e176d(0x1cd)][_0x3c71b4[_0x3ea41c][_0x2e176d(0x1d1)]])['format'](_0x32386e);}}}}return _0x19b597;};return _0x5d36f0(_0x52472c,_0x4824b5[_0x4c90a3(0x1cd)]);}throw new AnnError(ValidatorError_1[_0x4c90a3(0x1a8)][_0x4c90a3(0x1b2)]);}};__decorate([(0x0,core_1['Config'])(a9_0x48ee3c(0x1b0)),__metadata('design:type',Object)],ValidatorService[a9_0x48ee3c(0x1bc)],'i18nConfig',void 0x0),__decorate([(0x0,core_1[a9_0x48ee3c(0x1c5)])('validator'),__metadata('design:type',Object)],ValidatorService[a9_0x48ee3c(0x1bc)],a9_0x48ee3c(0x1d4),void 0x0),__decorate([(0x0,core_1[a9_0x48ee3c(0x1d0)])(),__metadata(a9_0x48ee3c(0x198),i18n_1['MidwayI18nServiceSingleton'])],ValidatorService[a9_0x48ee3c(0x1bc)],'i18nService',void 0x0),__decorate([(0x0,core_1[a9_0x48ee3c(0x19f)])(),__metadata('design:type',Function),__metadata('design:paramtypes',[]),__metadata(a9_0x48ee3c(0x1bb),Promise)],ValidatorService[a9_0x48ee3c(0x1bc)],a9_0x48ee3c(0x1b8),null),ValidatorService=__decorate([(0x0,core_1[a9_0x48ee3c(0x1a2)])(a9_0x48ee3c(0x1ab)),(0x0,core_1['Scope'])(core_1[a9_0x48ee3c(0x1a9)][a9_0x48ee3c(0x1cf)])],ValidatorService),exports[a9_0x48ee3c(0x1c0)]=ValidatorService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.33",
|
|
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.4.
|
|
20
|
+
"@anncic-api/core": "^3.4.33",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.11.0"
|
|
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": "6e3dc4cc04c16c5f54d726b20f373b159310d1dc"
|
|
30
30
|
}
|