@anncic-api/validator 3.4.38 → 3.4.41
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 +4 -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 +4 -4
|
@@ -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_0x5ea79d=a0_0x7498;function a0_0x7498(_0x5656b4,_0x1cd361){const _0x4d1a6e=a0_0x2c0a();return a0_0x7498=function(_0x1aeb70,_0x162449){_0x1aeb70=_0x1aeb70-0xc2;let _0x2c0ab5=_0x4d1a6e[_0x1aeb70];return _0x2c0ab5;},a0_0x7498(_0x5656b4,_0x1cd361);}function a0_0x2c0a(){const _0x42748a=['search','972URDoaK','57765DQxEmQ','../exception/ValidatorError','(((.+)+)+)+$','apply','176018DNwtyx','__esModule','2904AQpMEw','string','26608sRyWKg','toString','927tKgIOo','93180yAXNfL','ValidatorError','default','1513545FaNMRi','2787912ylgxTE','constructor','../../locales/en_US.json','8227205TzOZxq','12VgyXzZ'];a0_0x2c0a=function(){return _0x42748a;};return a0_0x2c0a();}(function(_0x43494a,_0x18d2c0){const _0x53f503=a0_0x7498,_0x1be546=_0x43494a();while(!![]){try{const _0x583f0d=parseInt(_0x53f503(0xd2))/0x1+parseInt(_0x53f503(0xc7))/0x2+-parseInt(_0x53f503(0xc6))/0x3*(-parseInt(_0x53f503(0xcb))/0x4)+-parseInt(_0x53f503(0xce))/0x5*(-parseInt(_0x53f503(0xcd))/0x6)+-parseInt(_0x53f503(0xca))/0x7+parseInt(_0x53f503(0xd6))/0x8*(-parseInt(_0x53f503(0xc2))/0x9)+-parseInt(_0x53f503(0xc3))/0xa*(parseInt(_0x53f503(0xd4))/0xb);if(_0x583f0d===_0x18d2c0)break;else _0x1be546['push'](_0x1be546['shift']());}catch(_0x2d1fa4){_0x1be546['push'](_0x1be546['shift']());}}}(a0_0x2c0a,0xee96c));const a0_0x162449=(function(){let _0xd98171=!![];return function(_0x4c9084,_0x20a69a){const _0x7e3300=_0xd98171?function(){const _0x2ada4b=a0_0x7498;if(_0x20a69a){const _0x301d5b=_0x20a69a[_0x2ada4b(0xd1)](_0x4c9084,arguments);return _0x20a69a=null,_0x301d5b;}}:function(){};return _0xd98171=![],_0x7e3300;};}()),a0_0x1aeb70=a0_0x162449(this,function(){const _0x3e643f=a0_0x7498;return a0_0x1aeb70[_0x3e643f(0xd7)]()[_0x3e643f(0xcc)](_0x3e643f(0xd0))[_0x3e643f(0xd7)]()[_0x3e643f(0xc8)](a0_0x1aeb70)[_0x3e643f(0xcc)](_0x3e643f(0xd0));});a0_0x1aeb70();'use strict';Object['defineProperty'](exports,a0_0x5ea79d(0xd3),{'value':!![]});const ValidatorError_1=require(a0_0x5ea79d(0xcf));exports[a0_0x5ea79d(0xc5)]={'validator':{'errorStatus':ValidatorError_1[a0_0x5ea79d(0xc4)]['PARAMS'],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x5ea79d(0xd5)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x5ea79d(0xc9))},'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_0x43822d=a1_0x900c;(function(_0x36f56c,_0x4cd3d0){const _0x2f8553=a1_0x900c,_0x5d7bc1=_0x36f56c();while(!![]){try{const _0x4da0ed=parseInt(_0x2f8553(0x1a9))/0x1+-parseInt(_0x2f8553(0x199))/0x2*(-parseInt(_0x2f8553(0x1a4))/0x3)+parseInt(_0x2f8553(0x1ab))/0x4+-parseInt(_0x2f8553(0x1cb))/0x5+parseInt(_0x2f8553(0x19c))/0x6*(-parseInt(_0x2f8553(0x1b4))/0x7)+parseInt(_0x2f8553(0x1c2))/0x8*(parseInt(_0x2f8553(0x1c5))/0x9)+parseInt(_0x2f8553(0x1b8))/0xa;if(_0x4da0ed===_0x4cd3d0)break;else _0x5d7bc1['push'](_0x5d7bc1['shift']());}catch(_0x12c0a7){_0x5d7bc1['push'](_0x5d7bc1['shift']());}}}(a1_0x14bd,0xb76af));const a1_0x3a62d9=(function(){let _0x31fea0=!![];return function(_0x48a9cb,_0x5ee956){const _0x5b83c7=_0x31fea0?function(){const _0x21230b=a1_0x900c;if(_0x5ee956){const _0x55cfdc=_0x5ee956[_0x21230b(0x19d)](_0x48a9cb,arguments);return _0x5ee956=null,_0x55cfdc;}}:function(){};return _0x31fea0=![],_0x5b83c7;};}()),a1_0x66abf0=a1_0x3a62d9(this,function(){const _0x3eec31=a1_0x900c;return a1_0x66abf0[_0x3eec31(0x1ae)]()[_0x3eec31(0x190)](_0x3eec31(0x1aa))['toString']()[_0x3eec31(0x18f)](a1_0x66abf0)[_0x3eec31(0x190)](_0x3eec31(0x1aa));});a1_0x66abf0();function a1_0x14bd(){const _0x403746=['constructor','search','length','methodArgs','Inject','defineProperty','bound\x20dispatch','getMethodParamTypes','params','splice','3874RHggfm','metadata','getAttr','1560JIRYUc','apply','query','getOwnPropertyDescriptor','locale','VALIDATOR_KEY','req','request','447UQDPHY','getClassMetadata','find','MidwayDecoratorService','anncic-api:validator','239473NlplNp','(((.+)+)+)+$','5349500jMEOIx','registerMethodHandler','decorate','toString','undefined','Configuration','object','param','body','5040dEaqNU','@midwayjs/i18n','REQUEST_OBJ_CTX_KEY','res','3899920VkwhjV','validator','@midwayjs/core','function','design:type','CustomConfiguration','./interface','decorator','getSchema','onReady','8GbGYzG','args','__esModule','1422783AGJxpl','propertyName','ValidatorService','@anncic-api/core','methodName','target','7375305griuyR'];a1_0x14bd=function(){return _0x403746;};return a1_0x14bd();}function a1_0x900c(_0x277f3d,_0x1893d3){const _0x3244bf=a1_0x14bd();return a1_0x900c=function(_0x66abf0,_0x3a62d9){_0x66abf0=_0x66abf0-0x18f;let _0x14bd44=_0x3244bf[_0x66abf0];return _0x14bd44;},a1_0x900c(_0x277f3d,_0x1893d3);}'use strict';var __decorate=this&&this['__decorate']||function(_0x1073ad,_0x432e1f,_0x2d32bc,_0x1a428){const _0x1a53b5=a1_0x900c;var _0x25b003=arguments['length'],_0x974a55=_0x25b003<0x3?_0x432e1f:_0x1a428===null?_0x1a428=Object[_0x1a53b5(0x19f)](_0x432e1f,_0x2d32bc):_0x1a428,_0x53d81a;if(typeof Reflect==='object'&&typeof Reflect[_0x1a53b5(0x1ad)]===_0x1a53b5(0x1bb))_0x974a55=Reflect[_0x1a53b5(0x1ad)](_0x1073ad,_0x432e1f,_0x2d32bc,_0x1a428);else{for(var _0xfa29d=_0x1073ad[_0x1a53b5(0x191)]-0x1;_0xfa29d>=0x0;_0xfa29d--)if(_0x53d81a=_0x1073ad[_0xfa29d])_0x974a55=(_0x25b003<0x3?_0x53d81a(_0x974a55):_0x25b003>0x3?_0x53d81a(_0x432e1f,_0x2d32bc,_0x974a55):_0x53d81a(_0x432e1f,_0x2d32bc))||_0x974a55;}return _0x25b003>0x3&&_0x974a55&&Object[_0x1a53b5(0x194)](_0x432e1f,_0x2d32bc,_0x974a55),_0x974a55;},__metadata=this&&this['__metadata']||function(_0x5d8304,_0x367d4b){const _0x312bfd=a1_0x900c;if(typeof Reflect===_0x312bfd(0x1b1)&&typeof Reflect[_0x312bfd(0x19a)]===_0x312bfd(0x1bb))return Reflect[_0x312bfd(0x19a)](_0x5d8304,_0x367d4b);};Object[a1_0x43822d(0x194)](exports,a1_0x43822d(0x1c4),{'value':!![]}),exports['CustomConfiguration']=void 0x0;const i18n_1=require(a1_0x43822d(0x1b5)),core_1=require(a1_0x43822d(0x1ba)),core_2=require(a1_0x43822d(0x1ba)),interface_1=require(a1_0x43822d(0x1be)),ValidatorService_1=require('./service/ValidatorService'),i18n=require(a1_0x43822d(0x1b5)),anncic=require(a1_0x43822d(0x1c8)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{async[a1_0x43822d(0x1c1)](){const _0x3824df=a1_0x43822d;this[_0x3824df(0x1bf)][_0x3824df(0x1ac)](interface_1[_0x3824df(0x1a1)],_0x21524c=>{const _0x59f5cb=_0x3824df,_0x84efd7=_0x21524c[_0x59f5cb(0x19a)],_0x9c1cdb=(0x0,core_2[_0x59f5cb(0x196)])(_0x21524c['target'],_0x21524c[_0x59f5cb(0x1c6)]);return{'before':_0x91219e=>{const _0x38bcc2=_0x59f5cb;var _0x5c99e,_0x45fef5,_0xeaef80,_0x283c7b,_0x687762,_0x274d04,_0x4d3447,_0x16e40b,_0x4ed622,_0x4d1607,_0x4f6c76,_0x3ce4a8,_0x20ff04;const _0x3aeb5f=_0x91219e[_0x38bcc2(0x1ca)][core_1[_0x38bcc2(0x1b6)]],_0x21c9de=Object['assign']({},((_0x5c99e=_0x3aeb5f===null||_0x3aeb5f===void 0x0?void 0x0:_0x3aeb5f[_0x38bcc2(0x1a3)])===null||_0x5c99e===void 0x0?void 0x0:_0x5c99e[_0x38bcc2(0x19e)])||{},((_0x45fef5=_0x3aeb5f===null||_0x3aeb5f===void 0x0?void 0x0:_0x3aeb5f['request'])===null||_0x45fef5===void 0x0?void 0x0:_0x45fef5[_0x38bcc2(0x1b3)])||{}),_0x28b96e=((0x0,core_2[_0x38bcc2(0x1a5)])(interface_1[_0x38bcc2(0x1a1)],_0x91219e['target'])||[])[_0x38bcc2(0x1a6)](_0x4bf2ea=>_0x4bf2ea['method']==_0x91219e[_0x38bcc2(0x1c9)]);!(_0x84efd7===null||_0x84efd7===void 0x0?void 0x0:_0x84efd7[_0x38bcc2(0x1a0)])&&_0x3aeb5f&&_0x3aeb5f[_0x38bcc2(0x19b)]&&(_0x84efd7[_0x38bcc2(0x1a0)]=_0x3aeb5f[_0x38bcc2(0x19b)](i18n_1['I18N_ATTR_KEY']));for(let _0x58bd38=0x0;_0x58bd38<_0x9c1cdb['length'];_0x58bd38++){const _0x467def=_0x9c1cdb[_0x58bd38],_0x90bb56=this[_0x38bcc2(0x1c7)][_0x38bcc2(0x1c0)](_0x467def);if(_0x90bb56){if(typeof _0x91219e[_0x38bcc2(0x1c3)][_0x58bd38]==_0x38bcc2(0x1af)||((_0xeaef80=_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38])===null||_0xeaef80===void 0x0?void 0x0:_0xeaef80[_0x38bcc2(0x1a3)])&&((_0x283c7b=_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38])===null||_0x283c7b===void 0x0?void 0x0:_0x283c7b[_0x38bcc2(0x1b7)])&&((_0x687762=_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38])===null||_0x687762===void 0x0?void 0x0:_0x687762[_0x38bcc2(0x1a2)]))_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38]=_0x21c9de;else((_0x274d04=_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38])===null||_0x274d04===void 0x0?void 0x0:_0x274d04['name'])==_0x38bcc2(0x195)&&_0x91219e['args'][_0x38bcc2(0x198)](_0x58bd38,0x0,_0x21c9de);const _0x299ac1=this[_0x38bcc2(0x1c7)][_0x38bcc2(0x1b9)](_0x90bb56,_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38],_0x84efd7);_0x299ac1&&(_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38]=_0x299ac1);}else{if((_0x28b96e===null||_0x28b96e===void 0x0?void 0x0:_0x28b96e[_0x38bcc2(0x192)][_0x58bd38])&&((_0x4d3447=_0x91219e['args'][_0x58bd38])===null||_0x4d3447===void 0x0?void 0x0:_0x4d3447[_0x38bcc2(0x197)])&&typeof _0x91219e[_0x38bcc2(0x1c3)][_0x58bd38][_0x38bcc2(0x1b2)]==_0x38bcc2(0x1bb)&&((_0x16e40b=_0x3aeb5f===null||_0x3aeb5f===void 0x0?void 0x0:_0x3aeb5f[_0x38bcc2(0x197)])===null||_0x16e40b===void 0x0?void 0x0:_0x16e40b[_0x28b96e[_0x38bcc2(0x192)][_0x58bd38]]))_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38]=_0x467def((_0x4ed622=_0x3aeb5f===null||_0x3aeb5f===void 0x0?void 0x0:_0x3aeb5f[_0x38bcc2(0x197)])===null||_0x4ed622===void 0x0?void 0x0:_0x4ed622[_0x28b96e['methodArgs'][_0x58bd38]]);else(_0x28b96e===null||_0x28b96e===void 0x0?void 0x0:_0x28b96e[_0x38bcc2(0x192)][_0x58bd38])&&((_0x4f6c76=(_0x4d1607=_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38])===null||_0x4d1607===void 0x0?void 0x0:_0x4d1607[_0x38bcc2(0x197)])===null||_0x4f6c76===void 0x0?void 0x0:_0x4f6c76[_0x28b96e['methodArgs'][_0x58bd38]])&&(_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38]=(_0x20ff04=(_0x3ce4a8=_0x91219e[_0x38bcc2(0x1c3)][_0x58bd38])===null||_0x3ce4a8===void 0x0?void 0x0:_0x3ce4a8['params'])===null||_0x20ff04===void 0x0?void 0x0:_0x20ff04[_0x28b96e[_0x38bcc2(0x192)][_0x58bd38]]);}}},'afterThrow':(_0x15f2c8,_0x7006ce)=>{throw _0x7006ce;}};});}};exports[a1_0x43822d(0x1bd)]=CustomConfiguration,__decorate([(0x0,core_2[a1_0x43822d(0x193)])(),__metadata(a1_0x43822d(0x1bc),core_1[a1_0x43822d(0x1a7)])],CustomConfiguration['prototype'],'decorator',void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x43822d(0x1bc),ValidatorService_1['ValidatorService'])],CustomConfiguration['prototype'],'ValidatorService',void 0x0),exports['CustomConfiguration']=CustomConfiguration=__decorate([(0x0,core_2[a1_0x43822d(0x1b0)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x43822d(0x1a8),'importConfigs':[{'default':ConfigDefault}]})],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
|
-
const
|
|
1
|
+
const a2_0x207ef7=a2_0xf335;(function(_0x194d07,_0x4f04d6){const _0x1d79eb=a2_0xf335,_0x402d6c=_0x194d07();while(!![]){try{const _0x39c707=-parseInt(_0x1d79eb(0xa0))/0x1*(-parseInt(_0x1d79eb(0xb1))/0x2)+-parseInt(_0x1d79eb(0xbb))/0x3*(parseInt(_0x1d79eb(0xae))/0x4)+parseInt(_0x1d79eb(0xb6))/0x5*(-parseInt(_0x1d79eb(0x9e))/0x6)+-parseInt(_0x1d79eb(0xa6))/0x7*(parseInt(_0x1d79eb(0xb2))/0x8)+parseInt(_0x1d79eb(0xc1))/0x9+parseInt(_0x1d79eb(0xc2))/0xa+parseInt(_0x1d79eb(0xb5))/0xb;if(_0x39c707===_0x4f04d6)break;else _0x402d6c['push'](_0x402d6c['shift']());}catch(_0x15189d){_0x402d6c['push'](_0x402d6c['shift']());}}}(a2_0x4bde,0xbd27a));const a2_0x997b3b=(function(){let _0x2352cb=!![];return function(_0x2f6e46,_0x3471ab){const _0x4216b3=_0x2352cb?function(){const _0x1b0cd4=a2_0xf335;if(_0x3471ab){const _0x28dba4=_0x3471ab[_0x1b0cd4(0xa1)](_0x2f6e46,arguments);return _0x3471ab=null,_0x28dba4;}}:function(){};return _0x2352cb=![],_0x4216b3;};}()),a2_0x5a7ce0=a2_0x997b3b(this,function(){const _0xd1b7f3=a2_0xf335;return a2_0x5a7ce0[_0xd1b7f3(0xba)]()['search']('(((.+)+)+)+$')[_0xd1b7f3(0xba)]()[_0xd1b7f3(0xb3)](a2_0x5a7ce0)[_0xd1b7f3(0xb4)](_0xd1b7f3(0x9f));});a2_0x5a7ce0();'use strict';Object[a2_0x207ef7(0xb8)](exports,a2_0x207ef7(0xb9),{'value':!![]}),exports[a2_0x207ef7(0xac)]=void 0x0,exports['Rule']=Rule;const joi=require(a2_0x207ef7(0x9d)),date_1=require(a2_0x207ef7(0xc3)),core_1=require(a2_0x207ef7(0xa8)),interface_1=require(a2_0x207ef7(0xa5));function a2_0x4bde(){const _0x2c76c2=['RuleType','getClassMetadata','172ZFSUaN','RULES_KEY','Array','26xGvFey','10073392aujhyg','constructor','search','12642498HFQAaQ','10WizCQT','object','defineProperty','__esModule','toString','24369SkLzri','isSchema','function','map','getPropertyType','label','4800537xcixma','6655310vUZMyD','@joi/date','joi','1912980QUxASY','(((.+)+)+)+$','51743npNKfI','apply','description','meta','array','../interface','7UkgnBK','default','@midwayjs/core','keys','items','name'];a2_0x4bde=function(){return _0x2c76c2;};return a2_0x4bde();}exports[a2_0x207ef7(0xac)]=joi['extend'](date_1[a2_0x207ef7(0xa7)]);function a2_0xf335(_0x9cfb14,_0x5bde54){const _0x4b55a6=a2_0x4bde();return a2_0xf335=function(_0x5a7ce0,_0x997b3b){_0x5a7ce0=_0x5a7ce0-0x9d;let _0x4bde50=_0x4b55a6[_0x5a7ce0];return _0x4bde50;},a2_0xf335(_0x9cfb14,_0x5bde54);}function Rule(_0x1c5f93,_0x11561c,_0x4d1549=''){return(_0x2cb1a3,_0x4b77c0)=>{const _0x5a298f=a2_0xf335;var _0x5665a3;if(_0x4b77c0)!joi[_0x5a298f(0xbc)](_0x11561c)&&(_0x11561c===null||_0x11561c===void 0x0?void 0x0:_0x11561c[_0x5a298f(0xab)])&&(_0x11561c=joi[_0x5a298f(0xb7)]((0x0,core_1[_0x5a298f(0xad)])(interface_1[_0x5a298f(0xaf)],_0x11561c))[_0x5a298f(0xa3)]({'id':_0x11561c[_0x5a298f(0xab)]}),(0x0,core_1[_0x5a298f(0xbf)])(_0x2cb1a3,_0x4b77c0)[_0x5a298f(0xab)]===_0x5a298f(0xb0)&&(_0x11561c=joi[_0x5a298f(0xa4)]()[_0x5a298f(0xaa)](_0x11561c))),joi[_0x5a298f(0xbc)](_0x11561c)&&(_0x1c5f93&&typeof(_0x11561c===null||_0x11561c===void 0x0?void 0x0:_0x11561c[_0x5a298f(0xc0)])==_0x5a298f(0xbd)&&(_0x11561c=_0x11561c[_0x5a298f(0xc0)](_0x1c5f93)),_0x4d1549&&typeof(_0x11561c===null||_0x11561c===void 0x0?void 0x0:_0x11561c[_0x5a298f(0xa2)])=='function'&&(_0x11561c=_0x11561c[_0x5a298f(0xa2)](_0x4d1549)),(0x0,core_1['attachClassMetadata'])(interface_1[_0x5a298f(0xaf)],_0x11561c,_0x2cb1a3,_0x4b77c0));else{const _0x1b4f24=(0x0,core_1[_0x5a298f(0xad)])(interface_1[_0x5a298f(0xaf)],_0x11561c);if(_0x1b4f24){let _0x2013d3=(_0x5665a3=(0x0,core_1[_0x5a298f(0xad)])(interface_1[_0x5a298f(0xaf)],_0x2cb1a3))!==null&&_0x5665a3!==void 0x0?_0x5665a3:{};Object[_0x5a298f(0xa9)](_0x1b4f24)[_0x5a298f(0xbe)](_0x3c4fc9=>{!_0x2013d3[_0x3c4fc9]&&(_0x2013d3[_0x3c4fc9]=_0x1b4f24[_0x3c4fc9]);}),(0x0,core_1['saveClassMetadata'])(interface_1[_0x5a298f(0xaf)],_0x2013d3,_0x2cb1a3);}}};}
|
|
@@ -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
|
-
const
|
|
1
|
+
const a3_0x8ba46d=a3_0x45c5;(function(_0xd1419a,_0x949b98){const _0x21ee6a=a3_0x45c5,_0x342eb8=_0xd1419a();while(!![]){try{const _0xda2dbf=parseInt(_0x21ee6a(0x17b))/0x1+-parseInt(_0x21ee6a(0x18d))/0x2*(parseInt(_0x21ee6a(0x17a))/0x3)+parseInt(_0x21ee6a(0x184))/0x4*(-parseInt(_0x21ee6a(0x18f))/0x5)+-parseInt(_0x21ee6a(0x188))/0x6+parseInt(_0x21ee6a(0x182))/0x7*(-parseInt(_0x21ee6a(0x183))/0x8)+parseInt(_0x21ee6a(0x189))/0x9+-parseInt(_0x21ee6a(0x17d))/0xa*(-parseInt(_0x21ee6a(0x180))/0xb);if(_0xda2dbf===_0x949b98)break;else _0x342eb8['push'](_0x342eb8['shift']());}catch(_0x41791e){_0x342eb8['push'](_0x342eb8['shift']());}}}(a3_0x184d,0xda959));function a3_0x45c5(_0x55ed7c,_0x3e54ae){const _0x4e3eda=a3_0x184d();return a3_0x45c5=function(_0x156999,_0x1ee1b2){_0x156999=_0x156999-0x179;let _0x184d15=_0x4e3eda[_0x156999];return _0x184d15;},a3_0x45c5(_0x55ed7c,_0x3e54ae);}const a3_0x1ee1b2=(function(){let _0x418b85=!![];return function(_0x42dd06,_0x10d4f6){const _0x4b1fc5=_0x418b85?function(){const _0x5b9187=a3_0x45c5;if(_0x10d4f6){const _0x3740fa=_0x10d4f6[_0x5b9187(0x192)](_0x42dd06,arguments);return _0x10d4f6=null,_0x3740fa;}}:function(){};return _0x418b85=![],_0x4b1fc5;};}()),a3_0x156999=a3_0x1ee1b2(this,function(){const _0x50da8d=a3_0x45c5;return a3_0x156999[_0x50da8d(0x185)]()[_0x50da8d(0x191)](_0x50da8d(0x17e))['toString']()[_0x50da8d(0x186)](a3_0x156999)[_0x50da8d(0x191)](_0x50da8d(0x17e));});a3_0x156999();'use strict';Object[a3_0x8ba46d(0x17c)](exports,a3_0x8ba46d(0x187),{'value':!![]}),exports['Validator']=Validator,exports[a3_0x8ba46d(0x194)]=getFuncArgs;function a3_0x184d(){const _0x2b20ed=['3127014QbHMUN','createCustomMethodDecorator','indexOf','prototype','2YulExj','slice','849565KgrYIL','replace','search','apply','attachClassMetadata','getFuncArgs','match','3131091dYYPYB','1594288PzEUlK','defineProperty','10khwZkl','(((.+)+)+)+$','function','29301437FybIfq','../interface','74655NexsvX','8JDhHNQ','36ixVYGa','toString','constructor','__esModule','6759606pdmObi'];a3_0x184d=function(){return _0x2b20ed;};return a3_0x184d();}const core_1=require('@midwayjs/core'),interface_1=require(a3_0x8ba46d(0x181));function Validator(_0x177992={}){return(_0x18c1f1,_0x16d82b,_0x7bbc58)=>{const _0x53baeb=a3_0x45c5,_0x260482=getFuncArgs(_0x18c1f1[_0x16d82b]);(0x0,core_1[_0x53baeb(0x193)])(interface_1['VALIDATOR_KEY'],{'method':_0x16d82b,'methodArgs':_0x260482},_0x18c1f1),(0x0,core_1[_0x53baeb(0x18a)])(interface_1['VALIDATOR_KEY'],_0x177992)(_0x18c1f1,_0x16d82b,_0x7bbc58);};}function getFuncArgs(_0x122959){const _0x20d0d0=a3_0x8ba46d;if(typeof _0x122959==_0x20d0d0(0x17f)){const _0x2bbc84=/=>.*$/mg,_0x1a8161=/=[^,)]+/mg,_0x51890e=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x2403f5=(_0x122959[_0x20d0d0(0x18c)]?_0x122959[_0x20d0d0(0x18c)]['constructor'][_0x20d0d0(0x185)]():_0x122959[_0x20d0d0(0x185)]())['replace'](_0x51890e,'')[_0x20d0d0(0x190)](_0x2bbc84,'')['replace'](_0x1a8161,''),_0xbeac03=_0x2403f5[_0x20d0d0(0x18e)](_0x2403f5[_0x20d0d0(0x18b)]('(')+0x1,_0x2403f5[_0x20d0d0(0x18b)](')'))[_0x20d0d0(0x179)](/([^\s,]+)/g)||[];return _0xbeac03;}}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
static readonly
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
export declare class ValidatorError extends AnnError {
|
|
2
|
+
static readonly PARAMS = 101406;
|
|
3
|
+
static readonly NOFIND_SCHEMA = 101404;
|
|
4
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x4985a7=a4_0x1a85;function a4_0x1a85(_0x177b4d,_0xcb23c){var _0xec8f73=a4_0xa086();return a4_0x1a85=function(_0x1ce94e,_0x3af0c1){_0x1ce94e=_0x1ce94e-0xe2;var _0xa0862b=_0xec8f73[_0x1ce94e];return _0xa0862b;},a4_0x1a85(_0x177b4d,_0xcb23c);}(function(_0x214b52,_0x2e0cbb){var _0x35ffcd=a4_0x1a85,_0xa940e=_0x214b52();while(!![]){try{var _0x3a6ff6=parseInt(_0x35ffcd(0xe7))/0x1*(parseInt(_0x35ffcd(0x100))/0x2)+-parseInt(_0x35ffcd(0xe4))/0x3*(parseInt(_0x35ffcd(0xf2))/0x4)+-parseInt(_0x35ffcd(0xf3))/0x5*(parseInt(_0x35ffcd(0xfc))/0x6)+parseInt(_0x35ffcd(0xfa))/0x7*(-parseInt(_0x35ffcd(0xed))/0x8)+parseInt(_0x35ffcd(0xeb))/0x9+parseInt(_0x35ffcd(0xf1))/0xa*(-parseInt(_0x35ffcd(0x102))/0xb)+parseInt(_0x35ffcd(0x101))/0xc*(parseInt(_0x35ffcd(0xee))/0xd);if(_0x3a6ff6===_0x2e0cbb)break;else _0xa940e['push'](_0xa940e['shift']());}catch(_0x55cce2){_0xa940e['push'](_0xa940e['shift']());}}}(a4_0xa086,0xedc00));var a4_0x3af0c1=(function(){var _0x14f08e=!![];return function(_0x1f4904,_0x99fadc){var _0x175337=_0x14f08e?function(){var _0x7ac065=a4_0x1a85;if(_0x99fadc){var _0x146e93=_0x99fadc[_0x7ac065(0xfd)](_0x1f4904,arguments);return _0x99fadc=null,_0x146e93;}}:function(){};return _0x14f08e=![],_0x175337;};}()),a4_0x1ce94e=a4_0x3af0c1(this,function(){var _0x1ea11f=a4_0x1a85;return a4_0x1ce94e[_0x1ea11f(0xef)]()['search'](_0x1ea11f(0xfe))[_0x1ea11f(0xef)]()[_0x1ea11f(0xe6)](a4_0x1ce94e)[_0x1ea11f(0xe3)](_0x1ea11f(0xfe));});a4_0x1ce94e();'use strict';var __decorate=this&&this[a4_0x4985a7(0xe8)]||function(_0x3086c9,_0x49ba64,_0x1b0194,_0x414529){var _0x33161d=a4_0x4985a7,_0xd002e7=arguments[_0x33161d(0xff)],_0x3213a7=_0xd002e7<0x3?_0x49ba64:_0x414529===null?_0x414529=Object[_0x33161d(0xf6)](_0x49ba64,_0x1b0194):_0x414529,_0x2540c8;if(typeof Reflect===_0x33161d(0xf9)&&typeof Reflect['decorate']==='function')_0x3213a7=Reflect[_0x33161d(0xf7)](_0x3086c9,_0x49ba64,_0x1b0194,_0x414529);else{for(var _0x38bf3e=_0x3086c9[_0x33161d(0xff)]-0x1;_0x38bf3e>=0x0;_0x38bf3e--)if(_0x2540c8=_0x3086c9[_0x38bf3e])_0x3213a7=(_0xd002e7<0x3?_0x2540c8(_0x3213a7):_0xd002e7>0x3?_0x2540c8(_0x49ba64,_0x1b0194,_0x3213a7):_0x2540c8(_0x49ba64,_0x1b0194))||_0x3213a7;}return _0xd002e7>0x3&&_0x3213a7&&Object[_0x33161d(0xf0)](_0x49ba64,_0x1b0194,_0x3213a7),_0x3213a7;},__metadata=this&&this['__metadata']||function(_0xefa5a6,_0x364137){var _0x34c19f=a4_0x4985a7;if(typeof Reflect==='object'&&typeof Reflect[_0x34c19f(0xfb)]===_0x34c19f(0xe5))return Reflect['metadata'](_0xefa5a6,_0x364137);};function a4_0xa086(){var _0x47a458=['44NUcgem','ValidatorError','search','26865bOjFrD','function','constructor','1TPAAlE','__decorate','NOFIND_SCHEMA','@anncic-api/core','8777475VRdzjw','PARAMS','6536kBSQVx','62923003bLXRap','toString','defineProperty','3709450ZWGmry','624bzNIJd','60VoOUAy','参数验证失败','AnnErrorMsg','getOwnPropertyDescriptor','decorate','design:type','object','13741QaaIVu','metadata','328182iMAJlW','apply','(((.+)+)+)+$','length','598426cwPyUr','12qpYyzr'];a4_0xa086=function(){return _0x47a458;};return a4_0xa086();}Object[a4_0x4985a7(0xf0)](exports,'__esModule',{'value':!![]}),exports[a4_0x4985a7(0xe2)]=void 0x0;const core_1=require(a4_0x4985a7(0xea));class ValidatorError extends AnnError{}exports[a4_0x4985a7(0xe2)]=ValidatorError,ValidatorError[a4_0x4985a7(0xec)]=0x18c1e,ValidatorError[a4_0x4985a7(0xe9)]=0x18c1c,__decorate([(0x0,core_1[a4_0x4985a7(0xf5)])(a4_0x4985a7(0xf4)),__metadata(a4_0x4985a7(0xf8),Object)],ValidatorError,a4_0x4985a7(0xec),void 0x0),__decorate([(0x0,core_1[a4_0x4985a7(0xf5)])(a4_0x4985a7(0xf4)),__metadata(a4_0x4985a7(0xf8),Object)],ValidatorError,a4_0x4985a7(0xe9),void 0x0);
|
|
@@ -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
|
-
function
|
|
1
|
+
const a5_0x8f0a84=a5_0x1b40;function a5_0x2194(){const _0x5ca1b7=['3PdtPVx','770881CppKxL','RULES_KEY','72282sUsmRS','2WbSCGX','saveClassMetadata','@midwayjs/core','PickDto','prototype','370MKZDZU','../interface','1813890KxQQiG','search','2278096bgnEmQ','3472376xffLHE','apply','15752421nnCFFx','OmitDto','constructor','1892870GaZaMH','(((.+)+)+)+$','getClassExtendedMetadata','toString'];a5_0x2194=function(){return _0x5ca1b7;};return a5_0x2194();}(function(_0x2c36b3,_0x3f718f){const _0x473344=a5_0x1b40,_0x286f5a=_0x2c36b3();while(!![]){try{const _0x4e428d=-parseInt(_0x473344(0x1c4))/0x1*(-parseInt(_0x473344(0x1c7))/0x2)+parseInt(_0x473344(0x1c3))/0x3*(-parseInt(_0x473344(0x1ba))/0x4)+-parseInt(_0x473344(0x1b5))/0x5*(parseInt(_0x473344(0x1c6))/0x6)+parseInt(_0x473344(0x1bf))/0x7+-parseInt(_0x473344(0x1b9))/0x8+parseInt(_0x473344(0x1bc))/0x9+parseInt(_0x473344(0x1b7))/0xa;if(_0x4e428d===_0x3f718f)break;else _0x286f5a['push'](_0x286f5a['shift']());}catch(_0x5bca87){_0x286f5a['push'](_0x286f5a['shift']());}}}(a5_0x2194,0xe2b67));const a5_0x235384=(function(){let _0x4829e4=!![];return function(_0x3d56b6,_0xf577cd){const _0x26ae0c=_0x4829e4?function(){const _0x26e0b8=a5_0x1b40;if(_0xf577cd){const _0x530fe6=_0xf577cd[_0x26e0b8(0x1bb)](_0x3d56b6,arguments);return _0xf577cd=null,_0x530fe6;}}:function(){};return _0x4829e4=![],_0x26ae0c;};}()),a5_0x1ab6d3=a5_0x235384(this,function(){const _0x4562d0=a5_0x1b40;return a5_0x1ab6d3[_0x4562d0(0x1c2)]()[_0x4562d0(0x1b8)](_0x4562d0(0x1c0))[_0x4562d0(0x1c2)]()[_0x4562d0(0x1be)](a5_0x1ab6d3)[_0x4562d0(0x1b8)](_0x4562d0(0x1c0));});a5_0x1ab6d3();'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a5_0x8f0a84(0x1b3)]=PickDto,exports[a5_0x8f0a84(0x1bd)]=OmitDto;const core_1=require(a5_0x8f0a84(0x1c9)),interface_1=require(a5_0x8f0a84(0x1b6));function PickDto(_0x54e486,_0x272157){const _0x1adbad=a5_0x8f0a84,_0x43166d=function(){};_0x43166d[_0x1adbad(0x1b4)]=_0x54e486[_0x1adbad(0x1b4)];const _0x7e832f=(0x0,core_1[_0x1adbad(0x1c1)])(interface_1[_0x1adbad(0x1c5)],_0x54e486),_0x4892d9={};for(const _0x4a566e of _0x272157){_0x7e832f[_0x4a566e]&&(_0x4892d9[_0x4a566e]=_0x7e832f[_0x4a566e]);}return(0x0,core_1[_0x1adbad(0x1c8)])(interface_1[_0x1adbad(0x1c5)],_0x4892d9,_0x43166d),_0x43166d;}function a5_0x1b40(_0x3908ad,_0x541ddb){const _0x4eea69=a5_0x2194();return a5_0x1b40=function(_0x1ab6d3,_0x235384){_0x1ab6d3=_0x1ab6d3-0x1b3;let _0x219466=_0x4eea69[_0x1ab6d3];return _0x219466;},a5_0x1b40(_0x3908ad,_0x541ddb);}function OmitDto(_0x195a70,_0x3bf8b7){const _0x42f77b=a5_0x8f0a84,_0x544096=function(){};_0x544096[_0x42f77b(0x1b4)]=_0x195a70[_0x42f77b(0x1b4)];const _0x2af4b0=(0x0,core_1[_0x42f77b(0x1c1)])(interface_1[_0x42f77b(0x1c5)],_0x195a70),_0x3341df=Object['assign']({},_0x2af4b0);for(const _0x4d27ba of _0x3bf8b7){delete _0x3341df[_0x4d27ba];}return(0x0,core_1[_0x42f77b(0x1c8)])(interface_1[_0x42f77b(0x1c5)],_0x3341df,_0x544096),_0x544096;}
|
|
@@ -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_0x16514c=a6_0x38bc;(function(_0x29fc19,_0x1c00d9){const _0x202acb=a6_0x38bc,_0x5a5a9e=_0x29fc19();while(!![]){try{const _0xa380dc=parseInt(_0x202acb(0x20a))/0x1*(-parseInt(_0x202acb(0x20b))/0x2)+parseInt(_0x202acb(0x1fd))/0x3+-parseInt(_0x202acb(0x206))/0x4*(-parseInt(_0x202acb(0x209))/0x5)+-parseInt(_0x202acb(0x1f6))/0x6+-parseInt(_0x202acb(0x1ff))/0x7*(parseInt(_0x202acb(0x201))/0x8)+parseInt(_0x202acb(0x200))/0x9*(parseInt(_0x202acb(0x1fa))/0xa)+-parseInt(_0x202acb(0x1fe))/0xb*(-parseInt(_0x202acb(0x203))/0xc);if(_0xa380dc===_0x1c00d9)break;else _0x5a5a9e['push'](_0x5a5a9e['shift']());}catch(_0x99ef96){_0x5a5a9e['push'](_0x5a5a9e['shift']());}}}(a6_0x4fd6,0x55d7e));function a6_0x38bc(_0x55dfcf,_0x166665){const _0x1aebce=a6_0x4fd6();return a6_0x38bc=function(_0x36c498,_0x27b381){_0x36c498=_0x36c498-0x1f4;let _0x4fd6be=_0x1aebce[_0x36c498];return _0x4fd6be;},a6_0x38bc(_0x55dfcf,_0x166665);}const a6_0x27b381=(function(){let _0x404525=!![];return function(_0x2aa8d3,_0x115b66){const _0x5342c7=_0x404525?function(){if(_0x115b66){const _0x2c84a5=_0x115b66['apply'](_0x2aa8d3,arguments);return _0x115b66=null,_0x2c84a5;}}:function(){};return _0x404525=![],_0x5342c7;};}()),a6_0x36c498=a6_0x27b381(this,function(){const _0x4e10f6=a6_0x38bc;return a6_0x36c498['toString']()[_0x4e10f6(0x205)]('(((.+)+)+)+$')['toString']()[_0x4e10f6(0x1f5)](a6_0x36c498)[_0x4e10f6(0x205)](_0x4e10f6(0x208));});a6_0x36c498();'use strict';Object[a6_0x16514c(0x1f9)](exports,a6_0x16514c(0x1f8),{'value':!![]}),exports[a6_0x16514c(0x207)]=getSchema;function a6_0x4fd6(){const _0x50c42a=['1366600pOeVKE','RULES_KEY','24tQrktG','../interface','search','388424gyvTDA','getSchema','(((.+)+)+)+$','5amgVPX','122ETQzly','1206oiywTm','joi','constructor','3421974UfFRdT','@midwayjs/core','__esModule','defineProperty','86660XlCjKZ','object','getClassExtendedMetadata','834438LcwAgi','3036605jLdRBb','21SLfGlb','603jVcyKB'];a6_0x4fd6=function(){return _0x50c42a;};return a6_0x4fd6();}const Joi=require(a6_0x16514c(0x1f4)),core_1=require(a6_0x16514c(0x1f7)),interface_1=require(a6_0x16514c(0x204));function getSchema(_0x4411ff){const _0x19cbba=a6_0x16514c,_0x47816e=(0x0,core_1[_0x19cbba(0x1fc)])(interface_1[_0x19cbba(0x202)],_0x4411ff);if(_0x47816e)return Joi[_0x19cbba(0x1fb)](_0x47816e);}
|
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
|
+
var a7_0xbdaf7e=a7_0x185c;function a7_0x185c(_0x3afc58,_0x372a17){var _0x36ab22=a7_0x5d95();return a7_0x185c=function(_0x114378,_0x48e452){_0x114378=_0x114378-0x109;var _0x5d95aa=_0x36ab22[_0x114378];return _0x5d95aa;},a7_0x185c(_0x3afc58,_0x372a17);}(function(_0x56c840,_0x282f4a){var _0x256bae=a7_0x185c,_0x3e033d=_0x56c840();while(!![]){try{var _0xbc5dcf=-parseInt(_0x256bae(0x10e))/0x1+parseInt(_0x256bae(0x130))/0x2*(parseInt(_0x256bae(0x128))/0x3)+-parseInt(_0x256bae(0x11c))/0x4*(parseInt(_0x256bae(0x109))/0x5)+-parseInt(_0x256bae(0x110))/0x6*(parseInt(_0x256bae(0x11e))/0x7)+parseInt(_0x256bae(0x11a))/0x8*(parseInt(_0x256bae(0x124))/0x9)+parseInt(_0x256bae(0x12d))/0xa*(parseInt(_0x256bae(0x122))/0xb)+-parseInt(_0x256bae(0x10b))/0xc*(-parseInt(_0x256bae(0x123))/0xd);if(_0xbc5dcf===_0x282f4a)break;else _0x3e033d['push'](_0x3e033d['shift']());}catch(_0x49bd53){_0x3e033d['push'](_0x3e033d['shift']());}}}(a7_0x5d95,0x450fb));var a7_0x48e452=(function(){var _0x5b32ec=!![];return function(_0xd8bdc1,_0x5bcd27){var _0x52cc62=_0x5b32ec?function(){if(_0x5bcd27){var _0xfe0a87=_0x5bcd27['apply'](_0xd8bdc1,arguments);return _0x5bcd27=null,_0xfe0a87;}}:function(){};return _0x5b32ec=![],_0x52cc62;};}()),a7_0x114378=a7_0x48e452(this,function(){var _0x50d60d=a7_0x185c;return a7_0x114378[_0x50d60d(0x10d)]()[_0x50d60d(0x112)](_0x50d60d(0x114))[_0x50d60d(0x10d)]()['constructor'](a7_0x114378)[_0x50d60d(0x112)](_0x50d60d(0x114));});a7_0x114378();'use strict';var __createBinding=this&&this[a7_0xbdaf7e(0x119)]||(Object[a7_0xbdaf7e(0x10c)]?function(_0xc946a4,_0xd39998,_0x3bad7,_0x21c1af){var _0x2bd1c4=a7_0xbdaf7e;if(_0x21c1af===undefined)_0x21c1af=_0x3bad7;var _0x50be2d=Object[_0x2bd1c4(0x111)](_0xd39998,_0x3bad7);(!_0x50be2d||('get'in _0x50be2d?!_0xd39998[_0x2bd1c4(0x12b)]:_0x50be2d['writable']||_0x50be2d[_0x2bd1c4(0x129)]))&&(_0x50be2d={'enumerable':!![],'get':function(){return _0xd39998[_0x3bad7];}}),Object['defineProperty'](_0xc946a4,_0x21c1af,_0x50be2d);}:function(_0x52f3f7,_0x38c553,_0x4e23b4,_0x2771a9){if(_0x2771a9===undefined)_0x2771a9=_0x4e23b4;_0x52f3f7[_0x2771a9]=_0x38c553[_0x4e23b4];}),__exportStar=this&&this['__exportStar']||function(_0x8870d7,_0x1cd2d7){var _0x4c706a=a7_0xbdaf7e;for(var _0x119c07 in _0x8870d7)if(_0x119c07!==_0x4c706a(0x121)&&!Object[_0x4c706a(0x11b)]['hasOwnProperty'][_0x4c706a(0x117)](_0x1cd2d7,_0x119c07))__createBinding(_0x1cd2d7,_0x8870d7,_0x119c07);};Object[a7_0xbdaf7e(0x115)](exports,a7_0xbdaf7e(0x12b),{'value':!![]}),exports[a7_0xbdaf7e(0x10a)]=exports[a7_0xbdaf7e(0x11d)]=exports[a7_0xbdaf7e(0x12e)]=exports['RuleType']=exports[a7_0xbdaf7e(0x12f)]=exports[a7_0xbdaf7e(0x127)]=void 0x0,__exportStar(require(a7_0xbdaf7e(0x12c)),exports),__exportStar(require(a7_0xbdaf7e(0x113)),exports),__exportStar(require(a7_0xbdaf7e(0x116)),exports);var Validator_1=require(a7_0xbdaf7e(0x11f));Object[a7_0xbdaf7e(0x115)](exports,a7_0xbdaf7e(0x127),{'enumerable':!![],'get':function(){var _0xa62430=a7_0xbdaf7e;return Validator_1[_0xa62430(0x127)];}});var Rule_1=require(a7_0xbdaf7e(0x10f));Object[a7_0xbdaf7e(0x115)](exports,a7_0xbdaf7e(0x12f),{'enumerable':!![],'get':function(){var _0x59850d=a7_0xbdaf7e;return Rule_1[_0x59850d(0x12f)];}}),Object['defineProperty'](exports,a7_0xbdaf7e(0x118),{'enumerable':!![],'get':function(){var _0x128aee=a7_0xbdaf7e;return Rule_1[_0x128aee(0x118)];}});var ValidatorError_1=require(a7_0xbdaf7e(0x126));Object[a7_0xbdaf7e(0x115)](exports,a7_0xbdaf7e(0x12e),{'enumerable':!![],'get':function(){var _0x675946=a7_0xbdaf7e;return ValidatorError_1[_0x675946(0x12e)];}});var ValidatorService_1=require(a7_0xbdaf7e(0x12a));Object[a7_0xbdaf7e(0x115)](exports,a7_0xbdaf7e(0x11d),{'enumerable':!![],'get':function(){var _0x4dcf60=a7_0xbdaf7e;return ValidatorService_1[_0x4dcf60(0x11d)];}});var configuration_1=require(a7_0xbdaf7e(0x125));function a7_0x5d95(){var _0xa59735=['default','412313wHwKbS','5688397SFOMPJ','45bHDAQD','./configuration','./exception/ValidatorError','Validator','9KFWDZy','configurable','./service/ValidatorService','__esModule','./interface','70LTVgYk','ValidatorError','Rule','359994HLIYHm','5Sipsfw','Configuration','12rJTDsn','create','toString','346280gLuGFA','./decorator/Rule','514734BTPDfU','getOwnPropertyDescriptor','search','./helper/dtoHelper','(((.+)+)+)+$','defineProperty','./helper/getSchema','call','RuleType','__createBinding','204592kZLfbN','prototype','1925156vrJjVF','ValidatorService','21FEVPTi','./decorator/Validator','CustomConfiguration'];a7_0x5d95=function(){return _0xa59735;};return a7_0x5d95();}Object[a7_0xbdaf7e(0x115)](exports,a7_0xbdaf7e(0x10a),{'enumerable':!![],'get':function(){var _0x38c5e3=a7_0xbdaf7e;return configuration_1[_0x38c5e3(0x120)];}});
|
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
|
-
var
|
|
1
|
+
var a8_0x112b7d=a8_0x3c00;(function(_0xffeacd,_0x1c35be){var _0xf87538=a8_0x3c00,_0x5617b4=_0xffeacd();while(!![]){try{var _0x2520ab=parseInt(_0xf87538(0x1ed))/0x1*(-parseInt(_0xf87538(0x1e0))/0x2)+-parseInt(_0xf87538(0x1e1))/0x3*(parseInt(_0xf87538(0x1e3))/0x4)+-parseInt(_0xf87538(0x1df))/0x5*(-parseInt(_0xf87538(0x1e7))/0x6)+parseInt(_0xf87538(0x1dc))/0x7*(-parseInt(_0xf87538(0x1de))/0x8)+-parseInt(_0xf87538(0x1e2))/0x9+parseInt(_0xf87538(0x1e8))/0xa+parseInt(_0xf87538(0x1ea))/0xb*(parseInt(_0xf87538(0x1e6))/0xc);if(_0x2520ab===_0x1c35be)break;else _0x5617b4['push'](_0x5617b4['shift']());}catch(_0x11b911){_0x5617b4['push'](_0x5617b4['shift']());}}}(a8_0x59bf,0xbc6cc));function a8_0x3c00(_0x5220e5,_0x1d0c92){var _0x25c0a0=a8_0x59bf();return a8_0x3c00=function(_0x19e46d,_0x4f7b9c){_0x19e46d=_0x19e46d-0x1db;var _0x59bfcc=_0x25c0a0[_0x19e46d];return _0x59bfcc;},a8_0x3c00(_0x5220e5,_0x1d0c92);}function a8_0x59bf(){var _0x5c9ec1=['5JfMDQa','417078KVgAbY','612BtmPKl','884502orsMog','11448GVDCtm','defineProperty','search','36iwbNEW','2116824KPvRFo','6359660WDWgGU','RULES_KEY','9631963GcEKRp','VALIDATOR_KEY','toString','6sCdShW','apply','anncic-api:validator:rules','8743TjdSPn','anncic-api:validator:validator','5832NyvhhJ'];a8_0x59bf=function(){return _0x5c9ec1;};return a8_0x59bf();}var a8_0x4f7b9c=(function(){var _0x314aab=!![];return function(_0xa63d27,_0x32970c){var _0x50af3f=_0x314aab?function(){var _0x4bff88=a8_0x3c00;if(_0x32970c){var _0x222af5=_0x32970c[_0x4bff88(0x1ee)](_0xa63d27,arguments);return _0x32970c=null,_0x222af5;}}:function(){};return _0x314aab=![],_0x50af3f;};}()),a8_0x19e46d=a8_0x4f7b9c(this,function(){var _0x5e08a0=a8_0x3c00;return a8_0x19e46d[_0x5e08a0(0x1ec)]()[_0x5e08a0(0x1e5)]('(((.+)+)+)+$')[_0x5e08a0(0x1ec)]()['constructor'](a8_0x19e46d)['search']('(((.+)+)+)+$');});a8_0x19e46d();'use strict';Object[a8_0x112b7d(0x1e4)](exports,'__esModule',{'value':!![]}),exports[a8_0x112b7d(0x1eb)]=exports['RULES_KEY']=void 0x0,exports[a8_0x112b7d(0x1e9)]=a8_0x112b7d(0x1db),exports[a8_0x112b7d(0x1eb)]=a8_0x112b7d(0x1dd);
|
|
@@ -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
|
+
function a9_0x1e38(){const _0x3db582=['44cqWszG','11826036wTaUWr','65944anYUBN','getLocaleMapping','__decorate','__metadata','7pAJmXE','Singleton','(((.+)+)+)+$','keys','PARAMS','1958RInKMx','195864pZGhuu','NOFIND_SCHEMA','Init','messages','design:paramtypes','design:type','key','147865THIqEk','$_terms','Provide','validate','Scope','format','ScopeEnum','validatorConfig','__esModule','constructor','forEach','prototype','971dPKrAv','@midwayjs/core','getOwnPropertyDescriptor','../interface','formatLocale','getSchema','fromEntries','../exception/ValidatorError','2463684dkLFtg','errors','defineProperty','i18nService','19860ygyHzf','language','参数验证失败','toString','i18n','schema','ValidatorError','RULES_KEY','error','decorate','value','metadata','32HzCQGa','81tYdhrY','object','validator','ValidatorService','Inject','13wmTyHr','_flags','YYYY-MM-DD\x20HH:mm:ss','validationOptions','search','init','message','length','type','joi','i18nConfig','date','localeTable','function'];a9_0x1e38=function(){return _0x3db582;};return a9_0x1e38();}const a9_0x192730=a9_0x1c2b;(function(_0x4f227e,_0x3be11d){const _0x55e2e6=a9_0x1c2b,_0x1c5c63=_0x4f227e();while(!![]){try{const _0xce1c54=-parseInt(_0x55e2e6(0x92))/0x1*(-parseInt(_0x55e2e6(0xaa))/0x2)+-parseInt(_0x55e2e6(0x7f))/0x3+parseInt(_0x55e2e6(0x73))/0x4*(parseInt(_0x55e2e6(0x86))/0x5)+parseInt(_0x55e2e6(0x9a))/0x6*(-parseInt(_0x55e2e6(0x79))/0x7)+-parseInt(_0x55e2e6(0x75))/0x8*(-parseInt(_0x55e2e6(0xab))/0x9)+-parseInt(_0x55e2e6(0x9e))/0xa*(parseInt(_0x55e2e6(0x7e))/0xb)+parseInt(_0x55e2e6(0x74))/0xc*(parseInt(_0x55e2e6(0xb0))/0xd);if(_0xce1c54===_0x3be11d)break;else _0x1c5c63['push'](_0x1c5c63['shift']());}catch(_0x18fddf){_0x1c5c63['push'](_0x1c5c63['shift']());}}}(a9_0x1e38,0x8b6ef));const a9_0xfa9f77=(function(){let _0x27e977=!![];return function(_0x38e43d,_0x58d431){const _0x34f9e6=_0x27e977?function(){if(_0x58d431){const _0x84fb8e=_0x58d431['apply'](_0x38e43d,arguments);return _0x58d431=null,_0x84fb8e;}}:function(){};return _0x27e977=![],_0x34f9e6;};}()),a9_0x323d97=a9_0xfa9f77(this,function(){const _0x3175ee=a9_0x1c2b;return a9_0x323d97[_0x3175ee(0xa1)]()[_0x3175ee(0xb4)](_0x3175ee(0x7b))[_0x3175ee(0xa1)]()[_0x3175ee(0x8f)](a9_0x323d97)[_0x3175ee(0xb4)](_0x3175ee(0x7b));});function a9_0x1c2b(_0x495210,_0x24ff89){const _0x56d889=a9_0x1e38();return a9_0x1c2b=function(_0x323d97,_0xfa9f77){_0x323d97=_0x323d97-0x6b;let _0x1e3892=_0x56d889[_0x323d97];return _0x1e3892;},a9_0x1c2b(_0x495210,_0x24ff89);}a9_0x323d97();'use strict';var __decorate=this&&this[a9_0x192730(0x77)]||function(_0x2754b9,_0x585442,_0xe0b9c6,_0x2c9e5c){const _0x62d3e9=a9_0x192730;var _0x1b9864=arguments['length'],_0x829724=_0x1b9864<0x3?_0x585442:_0x2c9e5c===null?_0x2c9e5c=Object[_0x62d3e9(0x94)](_0x585442,_0xe0b9c6):_0x2c9e5c,_0x8112df;if(typeof Reflect===_0x62d3e9(0xac)&&typeof Reflect[_0x62d3e9(0xa7)]===_0x62d3e9(0x72))_0x829724=Reflect[_0x62d3e9(0xa7)](_0x2754b9,_0x585442,_0xe0b9c6,_0x2c9e5c);else{for(var _0x5b0308=_0x2754b9[_0x62d3e9(0x6c)]-0x1;_0x5b0308>=0x0;_0x5b0308--)if(_0x8112df=_0x2754b9[_0x5b0308])_0x829724=(_0x1b9864<0x3?_0x8112df(_0x829724):_0x1b9864>0x3?_0x8112df(_0x585442,_0xe0b9c6,_0x829724):_0x8112df(_0x585442,_0xe0b9c6))||_0x829724;}return _0x1b9864>0x3&&_0x829724&&Object[_0x62d3e9(0x9c)](_0x585442,_0xe0b9c6,_0x829724),_0x829724;},__metadata=this&&this[a9_0x192730(0x78)]||function(_0x95788e,_0x240826){const _0x24d480=a9_0x192730;if(typeof Reflect===_0x24d480(0xac)&&typeof Reflect[_0x24d480(0xa9)]===_0x24d480(0x72))return Reflect[_0x24d480(0xa9)](_0x95788e,_0x240826);};Object[a9_0x192730(0x9c)](exports,a9_0x192730(0x8e),{'value':!![]}),exports[a9_0x192730(0xae)]=void 0x0;const Joi=require(a9_0x192730(0x6e)),i18n_1=require('@midwayjs/i18n'),core_1=require(a9_0x192730(0x93)),interface_1=require(a9_0x192730(0x95)),ValidatorError_1=require(a9_0x192730(0x99));let ValidatorService=class ValidatorService{constructor(){const _0x4a6c8b=a9_0x192730;this[_0x4a6c8b(0x82)]={};}async[a9_0x192730(0xb5)](){const _0x36ca07=a9_0x192730,_0x1606e9=Object[_0x36ca07(0x7c)](this[_0x36ca07(0x6f)][_0x36ca07(0x71)]);_0x1606e9[_0x36ca07(0x90)](_0x45cbe8=>{const _0x1ebed3=_0x36ca07;this[_0x1ebed3(0x82)][(0x0,i18n_1[_0x1ebed3(0x96)])(_0x45cbe8)]=Object[_0x1ebed3(0x98)](this[_0x1ebed3(0x9d)][_0x1ebed3(0x76)](_0x45cbe8,_0x1ebed3(0xad)));});}[a9_0x192730(0x97)](_0x480bb4){const _0x365595=a9_0x192730,_0x227d7c=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x365595(0xa5)],_0x480bb4);return _0x227d7c?Joi[_0x365595(0xac)](_0x227d7c):undefined;}[a9_0x192730(0xad)](_0x50cc89,_0x3caf7c,_0x5254ce={}){const _0x2aad87=a9_0x192730;var _0x4649c6,_0x370e30,_0x275027,_0x272377,_0xc5fcd4,_0x3954e5;const _0x546c12=Joi['isSchema'](_0x50cc89)?_0x50cc89:this['getSchema'](_0x50cc89);if(!_0x546c12)throw new AnnError(ValidatorError_1[_0x2aad87(0xa4)][_0x2aad87(0x80)]);_0x5254ce['validationOptions']=Object['assign']((_0x4649c6=this[_0x2aad87(0x8d)][_0x2aad87(0xb3)])!==null&&_0x4649c6!==void 0x0?_0x4649c6:{},{'messages':this[_0x2aad87(0x82)]},_0x5254ce[_0x2aad87(0xb3)]||{}),_0x5254ce[_0x2aad87(0xb3)][_0x2aad87(0x9b)]=_0x5254ce['validationOptions'][_0x2aad87(0x9b)]||{},_0x5254ce[_0x2aad87(0xb3)][_0x2aad87(0x9b)][_0x2aad87(0x9f)]=(0x0,i18n_1['formatLocale'])(this[_0x2aad87(0x9d)]['getAvailableLocale'](_0x5254ce[_0x2aad87(0xb3)][_0x2aad87(0x9b)]['language']||_0x5254ce['locale']||this[_0x2aad87(0x6f)]['defaultLocale'],_0x2aad87(0xad)));const _0x527d95=_0x546c12[_0x2aad87(0x89)](_0x3caf7c,_0x5254ce['validationOptions']);if(_0x527d95===null||_0x527d95===void 0x0?void 0x0:_0x527d95['error']){if(_0x527d95['error']instanceof AnnError)throw _0x527d95[_0x2aad87(0xa6)];else{if(_0x527d95[_0x2aad87(0xa6)]instanceof Error)throw new AnnError(ValidatorError_1['ValidatorError'][_0x2aad87(0x7d)],{'message':((_0x370e30=_0x527d95[_0x2aad87(0xa6)])===null||_0x370e30===void 0x0?void 0x0:_0x370e30[_0x2aad87(0x6b)])||'参数验证失败'});else throw new AnnError(ValidatorError_1[_0x2aad87(0xa4)]['PARAMS'],{'message':((_0xc5fcd4=(_0x272377=(_0x275027=_0x527d95[_0x2aad87(0xa6)])===null||_0x275027===void 0x0?void 0x0:_0x275027['details'])===null||_0x272377===void 0x0?void 0x0:_0x272377[0x0])===null||_0xc5fcd4===void 0x0?void 0x0:_0xc5fcd4[_0x2aad87(0x6b)])||_0x2aad87(0xa0)});}}if(_0x527d95===null||_0x527d95===void 0x0?void 0x0:_0x527d95[_0x2aad87(0xa8)]){const _0x164201=(_0x3954e5=_0x546c12===null||_0x546c12===void 0x0?void 0x0:_0x546c12['$_terms'])===null||_0x3954e5===void 0x0?void 0x0:_0x3954e5[_0x2aad87(0x7c)],_0x3adccd=function(_0x3fcb6d,_0x10c300){const _0x220508=_0x2aad87;var _0x3dee76,_0x4e4b5d,_0x1cec78,_0x5940a1,_0x383af6,_0x26422a,_0x5bd50c,_0x46322b,_0x381f78,_0x1f1fcd,_0x51debd;for(let _0x2a60fc in _0x3fcb6d){if(_0x10c300[(_0x3dee76=_0x3fcb6d[_0x2a60fc])===null||_0x3dee76===void 0x0?void 0x0:_0x3dee76['key']]&&((_0x1cec78=(_0x4e4b5d=_0x3fcb6d[_0x2a60fc])===null||_0x4e4b5d===void 0x0?void 0x0:_0x4e4b5d['schema'])===null||_0x1cec78===void 0x0?void 0x0:_0x1cec78[_0x220508(0x6d)])){if(((_0x383af6=(_0x5940a1=_0x3fcb6d[_0x2a60fc])===null||_0x5940a1===void 0x0?void 0x0:_0x5940a1[_0x220508(0xa3)])===null||_0x383af6===void 0x0?void 0x0:_0x383af6[_0x220508(0x6d)])==_0x220508(0xac))_0x10c300[_0x3fcb6d[_0x2a60fc][_0x220508(0x85)]]=_0x3adccd((_0x5bd50c=(_0x26422a=_0x3fcb6d[_0x2a60fc])===null||_0x26422a===void 0x0?void 0x0:_0x26422a[_0x220508(0xa3)][_0x220508(0x87)])===null||_0x5bd50c===void 0x0?void 0x0:_0x5bd50c[_0x220508(0x7c)],_0x10c300[_0x3fcb6d[_0x2a60fc][_0x220508(0x85)]]);else{if(_0x3fcb6d[_0x2a60fc][_0x220508(0xa3)]['type']==_0x220508(0x70)&&_0x527d95[_0x220508(0xa8)][(_0x46322b=_0x3fcb6d[_0x2a60fc])===null||_0x46322b===void 0x0?void 0x0:_0x46322b[_0x220508(0x85)]]){const _0x5afcf7=((_0x51debd=(_0x1f1fcd=(_0x381f78=_0x3fcb6d[_0x2a60fc])===null||_0x381f78===void 0x0?void 0x0:_0x381f78[_0x220508(0xa3)])===null||_0x1f1fcd===void 0x0?void 0x0:_0x1f1fcd[_0x220508(0xb1)])===null||_0x51debd===void 0x0?void 0x0:_0x51debd[_0x220508(0x8b)])||_0x220508(0xb2);_0x10c300[_0x3fcb6d[_0x2a60fc][_0x220508(0x85)]]=dayjs(_0x527d95[_0x220508(0xa8)][_0x3fcb6d[_0x2a60fc][_0x220508(0x85)]])[_0x220508(0x8b)](_0x5afcf7);}}}}return _0x10c300;};return _0x3adccd(_0x164201,_0x527d95[_0x2aad87(0xa8)]);}throw new AnnError(ValidatorError_1[_0x2aad87(0xa4)][_0x2aad87(0x7d)]);}};exports[a9_0x192730(0xae)]=ValidatorService,__decorate([(0x0,core_1['Config'])(a9_0x192730(0xa2)),__metadata(a9_0x192730(0x84),Object)],ValidatorService['prototype'],a9_0x192730(0x6f),void 0x0),__decorate([(0x0,core_1['Config'])(a9_0x192730(0xad)),__metadata(a9_0x192730(0x84),Object)],ValidatorService[a9_0x192730(0x91)],a9_0x192730(0x8d),void 0x0),__decorate([(0x0,core_1[a9_0x192730(0xaf)])(),__metadata(a9_0x192730(0x84),i18n_1['MidwayI18nServiceSingleton'])],ValidatorService[a9_0x192730(0x91)],a9_0x192730(0x9d),void 0x0),__decorate([(0x0,core_1[a9_0x192730(0x81)])(),__metadata(a9_0x192730(0x84),Function),__metadata(a9_0x192730(0x83),[]),__metadata('design:returntype',Promise)],ValidatorService[a9_0x192730(0x91)],a9_0x192730(0xb5),null),exports[a9_0x192730(0xae)]=ValidatorService=__decorate([(0x0,core_1[a9_0x192730(0x88)])(a9_0x192730(0xad)),(0x0,core_1[a9_0x192730(0x8a)])(core_1[a9_0x192730(0x8c)][a9_0x192730(0x7a)])],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.41",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,14 +17,14 @@
|
|
|
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.41",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.11.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^20.3.2",
|
|
26
26
|
"javascript-obfuscator": "^4.0.2",
|
|
27
|
-
"typescript": "^5.
|
|
27
|
+
"typescript": "^5.5.4"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "18e255483bef8adbe70adc3feee1f35936c2e962"
|
|
30
30
|
}
|