@anveroapi/validator 4.1.6 → 4.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.default.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Rule.js +1 -1
- package/dist/decorator/Validator.js +1 -1
- package/dist/exception/ValidatorError.js +1 -1
- package/dist/helper/dtoHelper.js +1 -1
- package/dist/helper/getSchema.d.ts +1 -1
- package/dist/helper/getSchema.js +1 -1
- package/dist/index.js +1 -1
- package/dist/interface.js +1 -1
- package/dist/service/ValidatorService.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x3eac(){const _0x247fcb=['3671RrcxjL','28hCNOSM','473706PFoMjj','toString','4sErlWA','10IUXgoP','1574286emvPIL','1858685aeMCML','(((.+)+)+)+$','8591GqjpNA','7020hQzWXQ','default','ValidatorError','../../locales/zh_CN.json','constructor','search','50BPUuTF','2674356lrfTHg','27200KLPubg','defineProperty'];a0_0x3eac=function(){return _0x247fcb;};return a0_0x3eac();}const a0_0x45e785=a0_0x2098;(function(_0x51ff40,_0x5f09ec){const _0x479346=a0_0x2098,_0x3f462e=_0x51ff40();while(!![]){try{const _0x4ba027=-parseInt(_0x479346(0xda))/0x1*(-parseInt(_0x479346(0xd6))/0x2)+parseInt(_0x479346(0xe0))/0x3+parseInt(_0x479346(0xde))/0x4*(-parseInt(_0x479346(0xe1))/0x5)+-parseInt(_0x479346(0xd7))/0x6+-parseInt(_0x479346(0xdb))/0x7*(-parseInt(_0x479346(0xd8))/0x8)+parseInt(_0x479346(0xdc))/0x9*(parseInt(_0x479346(0xdf))/0xa)+-parseInt(_0x479346(0xe3))/0xb*(-parseInt(_0x479346(0xe4))/0xc);if(_0x4ba027===_0x5f09ec)break;else _0x3f462e['push'](_0x3f462e['shift']());}catch(_0x3c9ec3){_0x3f462e['push'](_0x3f462e['shift']());}}}(a0_0x3eac,0x4ea91));const a0_0x2b7e96=(function(){let _0x457919=!![];return function(_0x4253ff,_0xee58e2){const _0x432db6=_0x457919?function(){if(_0xee58e2){const _0x6af7fb=_0xee58e2['apply'](_0x4253ff,arguments);return _0xee58e2=null,_0x6af7fb;}}:function(){};return _0x457919=![],_0x432db6;};}()),a0_0x44b8dc=a0_0x2b7e96(this,function(){const _0x2c72ba=a0_0x2098;return a0_0x44b8dc[_0x2c72ba(0xdd)]()[_0x2c72ba(0xe9)](_0x2c72ba(0xe2))[_0x2c72ba(0xdd)]()[_0x2c72ba(0xe8)](a0_0x44b8dc)[_0x2c72ba(0xe9)](_0x2c72ba(0xe2));});a0_0x44b8dc();'use strict';Object[a0_0x45e785(0xd9)](exports,'__esModule',{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');function a0_0x2098(_0xd422aa,_0x231cac){_0xd422aa=_0xd422aa-0xd6;const _0x9b033e=a0_0x3eac();let _0x44b8dc=_0x9b033e[_0xd422aa];return _0x44b8dc;}exports[a0_0x45e785(0xe5)]={'validator':{'errorStatus':ValidatorError_1[a0_0x45e785(0xe6)]['PARAMS'],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}},'i18n':{'localeTable':{'en_US':{'validator':require('../../locales/en_US.json')},'zh_CN':{'validator':require(a0_0x45e785(0xe7))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x157c54=a1_0x4a66;function a1_0x4a66(_0x34d929,_0x13c357){_0x34d929=_0x34d929-0x6e;const _0x916750=a1_0x11b7();let _0x942ae1=_0x916750[_0x34d929];return _0x942ae1;}(function(_0x116e70,_0x5b83f1){const _0x3071ff=a1_0x4a66,_0x2b5186=_0x116e70();while(!![]){try{const _0x1146c6=parseInt(_0x3071ff(0x8a))/0x1*(parseInt(_0x3071ff(0x86))/0x2)+parseInt(_0x3071ff(0x77))/0x3*(parseInt(_0x3071ff(0xa7))/0x4)+parseInt(_0x3071ff(0xaa))/0x5*(-parseInt(_0x3071ff(0x71))/0x6)+-parseInt(_0x3071ff(0x6e))/0x7*(parseInt(_0x3071ff(0x83))/0x8)+parseInt(_0x3071ff(0x9a))/0x9+-parseInt(_0x3071ff(0xa2))/0xa*(-parseInt(_0x3071ff(0xa0))/0xb)+-parseInt(_0x3071ff(0x8b))/0xc*(parseInt(_0x3071ff(0x6f))/0xd);if(_0x1146c6===_0x5b83f1)break;else _0x2b5186['push'](_0x2b5186['shift']());}catch(_0x29ded0){_0x2b5186['push'](_0x2b5186['shift']());}}}(a1_0x11b7,0xb79aa));const a1_0x3570d9=(function(){let _0x56d25b=!![];return function(_0x1a5916,_0x2b9c59){const _0x29dc8c=_0x56d25b?function(){const _0x5e0132=a1_0x4a66;if(_0x2b9c59){const _0x8eda45=_0x2b9c59[_0x5e0132(0x9e)](_0x1a5916,arguments);return _0x2b9c59=null,_0x8eda45;}}:function(){};return _0x56d25b=![],_0x29dc8c;};}()),a1_0x942ae1=a1_0x3570d9(this,function(){const _0x4f7af6=a1_0x4a66;return a1_0x942ae1[_0x4f7af6(0x96)]()['search'](_0x4f7af6(0x7d))['toString']()[_0x4f7af6(0x82)](a1_0x942ae1)[_0x4f7af6(0x7c)]('(((.+)+)+)+$');});a1_0x942ae1();'use strict';var __decorate=this&&this[a1_0x157c54(0xac)]||function(_0x4175e9,_0xdfcff0,_0x3710af,_0x827c02){const _0x2e288f=a1_0x157c54;var _0xd09682=arguments[_0x2e288f(0x89)],_0x117599=_0xd09682<0x3?_0xdfcff0:_0x827c02===null?_0x827c02=Object[_0x2e288f(0x81)](_0xdfcff0,_0x3710af):_0x827c02,_0x17fbeb;if(typeof Reflect===_0x2e288f(0x7b)&&typeof Reflect[_0x2e288f(0x84)]===_0x2e288f(0x99))_0x117599=Reflect[_0x2e288f(0x84)](_0x4175e9,_0xdfcff0,_0x3710af,_0x827c02);else{for(var _0x1bd361=_0x4175e9[_0x2e288f(0x89)]-0x1;_0x1bd361>=0x0;_0x1bd361--)if(_0x17fbeb=_0x4175e9[_0x1bd361])_0x117599=(_0xd09682<0x3?_0x17fbeb(_0x117599):_0xd09682>0x3?_0x17fbeb(_0xdfcff0,_0x3710af,_0x117599):_0x17fbeb(_0xdfcff0,_0x3710af))||_0x117599;}return _0xd09682>0x3&&_0x117599&&Object[_0x2e288f(0x9c)](_0xdfcff0,_0x3710af,_0x117599),_0x117599;},__metadata=this&&this[a1_0x157c54(0xa6)]||function(_0x583156,_0x1c4e1b){const _0x1b0548=a1_0x157c54;if(typeof Reflect===_0x1b0548(0x7b)&&typeof Reflect[_0x1b0548(0x7e)]===_0x1b0548(0x99))return Reflect[_0x1b0548(0x7e)](_0x583156,_0x1c4e1b);};Object[a1_0x157c54(0x9c)](exports,a1_0x157c54(0x87),{'value':!![]}),exports['CustomConfiguration']=void 0x0;function a1_0x11b7(){const _0x3ec7b3=['296FMQCDx','decorate','Configuration','2WyKCxN','__esModule','methodArgs','length','1379333Yqkeio','5337396llPvKQ','getAttr','./service/ValidatorService','MetadataManager','validator','propertyName','ValidatorService','@midwayjs/core','design:type','request','getOwnMetadata','toString','query','CustomConfiguration','function','103707hgLeDZ','./config/config.default','defineProperty','param','apply','onReady','19052BJjgBb','@midwayjs/i18n','6330iIlncD','req','undefined','params','__metadata','5176egiFfJ','I18N_ATTR_KEY','res','3672835JvWYdE','prototype','__decorate','Inject','201691PTxlOf','13coAqCy','method','12hnNHas','locale','target','args','getSchema','REQUEST_OBJ_CTX_KEY','2886OfvvsH','@anveroapi/core','VALIDATOR_KEY','registerMethodHandler','object','search','(((.+)+)+)+$','metadata','methodName','decorator','getOwnPropertyDescriptor','constructor'];a1_0x11b7=function(){return _0x3ec7b3;};return a1_0x11b7();}const i18n_1=require(a1_0x157c54(0xa1)),core_1=require(a1_0x157c54(0x92)),core_2=require(a1_0x157c54(0x92)),interface_1=require('./interface'),ValidatorService_1=require(a1_0x157c54(0x8d)),i18n=require(a1_0x157c54(0xa1)),anvero=require(a1_0x157c54(0x78)),ConfigDefault=require(a1_0x157c54(0x9b));let CustomConfiguration=class CustomConfiguration{async[a1_0x157c54(0x9f)](){const _0x375b5f=a1_0x157c54;this[_0x375b5f(0x80)][_0x375b5f(0x7a)](interface_1[_0x375b5f(0x79)],_0x4b1a39=>{const _0x27ff18=_0x375b5f,_0x4cdec1=_0x4b1a39[_0x27ff18(0x7e)],_0x4dd298=core_2[_0x27ff18(0x8e)]['getMethodParamTypes'](_0x4b1a39[_0x27ff18(0x73)],_0x4b1a39[_0x27ff18(0x90)]);return{'before':_0x4c528e=>{const _0x45f0cb=_0x27ff18;var _0x18651e,_0x548d17,_0x4a6491,_0xd3e105,_0x3a4d8c,_0x13f419,_0x5eab15;const _0x5ddc63=_0x4c528e[_0x45f0cb(0x73)][core_1[_0x45f0cb(0x76)]],_0x2b7d37=Object['assign']({},((_0x18651e=_0x5ddc63===null||_0x5ddc63===void 0x0?void 0x0:_0x5ddc63[_0x45f0cb(0x94)])===null||_0x18651e===void 0x0?void 0x0:_0x18651e[_0x45f0cb(0x97)])||{},((_0x548d17=_0x5ddc63===null||_0x5ddc63===void 0x0?void 0x0:_0x5ddc63[_0x45f0cb(0x94)])===null||_0x548d17===void 0x0?void 0x0:_0x548d17['body'])||{}),_0x351b5a=(core_2[_0x45f0cb(0x8e)][_0x45f0cb(0x95)](interface_1[_0x45f0cb(0x79)],_0x4c528e[_0x45f0cb(0x73)])||[])['find'](_0x2ee3ee=>_0x2ee3ee[_0x45f0cb(0x70)]==_0x4c528e[_0x45f0cb(0x7f)]);!(_0x4cdec1===null||_0x4cdec1===void 0x0?void 0x0:_0x4cdec1['locale'])&&_0x5ddc63&&_0x5ddc63[_0x45f0cb(0x8c)]&&(_0x4cdec1[_0x45f0cb(0x72)]=_0x5ddc63[_0x45f0cb(0x8c)](i18n_1[_0x45f0cb(0xa8)]));for(let _0x51780b=0x0;_0x51780b<_0x4dd298[_0x45f0cb(0x89)];_0x51780b++){const _0x1ff87b=_0x4dd298[_0x51780b],_0xf63a96=this[_0x45f0cb(0x91)][_0x45f0cb(0x75)](_0x1ff87b);if(_0xf63a96){(typeof _0x4c528e[_0x45f0cb(0x74)][_0x51780b]==_0x45f0cb(0xa4)||typeof _0x4c528e[_0x45f0cb(0x74)][_0x51780b]==_0x45f0cb(0x99)||((_0x4a6491=_0x4c528e[_0x45f0cb(0x74)][_0x51780b])===null||_0x4a6491===void 0x0?void 0x0:_0x4a6491[_0x45f0cb(0x94)])&&((_0xd3e105=_0x4c528e['args'][_0x51780b])===null||_0xd3e105===void 0x0?void 0x0:_0xd3e105[_0x45f0cb(0xa9)])&&((_0x3a4d8c=_0x4c528e[_0x45f0cb(0x74)][_0x51780b])===null||_0x3a4d8c===void 0x0?void 0x0:_0x3a4d8c[_0x45f0cb(0xa3)]))&&(_0x4c528e[_0x45f0cb(0x74)][_0x51780b]=_0x2b7d37);const _0x43a6b4=this[_0x45f0cb(0x91)][_0x45f0cb(0x8f)](_0xf63a96,_0x4c528e[_0x45f0cb(0x74)][_0x51780b],_0x4cdec1);_0x43a6b4&&(_0x4c528e[_0x45f0cb(0x74)][_0x51780b]=_0x43a6b4);}else(_0x351b5a===null||_0x351b5a===void 0x0?void 0x0:_0x351b5a[_0x45f0cb(0x88)][_0x51780b])&&typeof((_0x13f419=_0x5ddc63===null||_0x5ddc63===void 0x0?void 0x0:_0x5ddc63[_0x45f0cb(0xa5)])===null||_0x13f419===void 0x0?void 0x0:_0x13f419[_0x351b5a['methodArgs'][_0x51780b]])!=_0x45f0cb(0xa4)&&(_0x4c528e[_0x45f0cb(0x74)][_0x51780b]=typeof((_0x5eab15=_0x4c528e[_0x45f0cb(0x74)][_0x51780b])===null||_0x5eab15===void 0x0?void 0x0:_0x5eab15[_0x45f0cb(0x9d)])==_0x45f0cb(0x99)?_0x1ff87b(_0x5ddc63[_0x45f0cb(0xa5)][_0x351b5a[_0x45f0cb(0x88)][_0x51780b]]):_0x5ddc63[_0x45f0cb(0xa5)][_0x351b5a[_0x45f0cb(0x88)][_0x51780b]]);}},'afterThrow':(_0x3217ba,_0x483cc2)=>{throw _0x483cc2;}};});}};exports[a1_0x157c54(0x98)]=CustomConfiguration,__decorate([(0x0,core_2[a1_0x157c54(0xad)])(),__metadata(a1_0x157c54(0x93),core_1['MidwayDecoratorService'])],CustomConfiguration['prototype'],a1_0x157c54(0x80),void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x157c54(0x93),ValidatorService_1['ValidatorService'])],CustomConfiguration[a1_0x157c54(0xab)],a1_0x157c54(0x91),void 0x0),exports[a1_0x157c54(0x98)]=CustomConfiguration=__decorate([(0x0,core_2[a1_0x157c54(0x85)])({'imports':[i18n,anvero],'namespace':'anvero-api:validator','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a2_0x5c331f=a2_0xdca3;(function(_0x2195b9,_0x429c8e){const _0x26d005=a2_0xdca3,_0x1a23fc=_0x2195b9();while(!![]){try{const _0x1ff0dc=-parseInt(_0x26d005(0x141))/0x1*(parseInt(_0x26d005(0x149))/0x2)+parseInt(_0x26d005(0x131))/0x3*(parseInt(_0x26d005(0x13b))/0x4)+-parseInt(_0x26d005(0x138))/0x5*(-parseInt(_0x26d005(0x132))/0x6)+-parseInt(_0x26d005(0x12c))/0x7+parseInt(_0x26d005(0x136))/0x8+-parseInt(_0x26d005(0x13a))/0x9*(-parseInt(_0x26d005(0x130))/0xa)+-parseInt(_0x26d005(0x127))/0xb;if(_0x1ff0dc===_0x429c8e)break;else _0x1a23fc['push'](_0x1a23fc['shift']());}catch(_0x12c200){_0x1a23fc['push'](_0x1a23fc['shift']());}}}(a2_0x2e97,0x774c6));const a2_0x278795=(function(){let _0x3c1dd3=!![];return function(_0x4dfe64,_0x435996){const _0x2e8b3a=_0x3c1dd3?function(){const _0x4ad796=a2_0xdca3;if(_0x435996){const _0xd70fd3=_0x435996[_0x4ad796(0x135)](_0x4dfe64,arguments);return _0x435996=null,_0xd70fd3;}}:function(){};return _0x3c1dd3=![],_0x2e8b3a;};}()),a2_0x20701b=a2_0x278795(this,function(){const _0xc15fb4=a2_0xdca3;return a2_0x20701b['toString']()['search']('(((.+)+)+)+$')[_0xc15fb4(0x129)]()[_0xc15fb4(0x134)](a2_0x20701b)[_0xc15fb4(0x145)]('(((.+)+)+)+$');});function a2_0x2e97(){const _0x3588ba=['2IikxGu','label','object','getOwnMetadata','RULES_KEY','Rule','default','974644rvKQns','name','toString','getPropertyType','keys','5028849Jgfnle','defineProperty','map','transformTypeFromTSDesign','20AZfUQX','3dguwNT','46788hOPveo','Array','constructor','apply','6262032aXOBMG','function','305cRgfbH','items','472311dbUvGS','2080552tYJiqU','array','attachMetadata','@joi/date','__esModule','meta','587871Bhbrmb','MetadataManager','isSchema','../interface','search','@midwayjs/core','RuleType','defineMetadata'];a2_0x2e97=function(){return _0x3588ba;};return a2_0x2e97();}a2_0x20701b();function a2_0xdca3(_0x19a96b,_0x4a2810){_0x19a96b=_0x19a96b-0x126;const _0x47a31a=a2_0x2e97();let _0x20701b=_0x47a31a[_0x19a96b];return _0x20701b;}'use strict';Object[a2_0x5c331f(0x12d)](exports,a2_0x5c331f(0x13f),{'value':!![]}),exports[a2_0x5c331f(0x147)]=void 0x0,exports[a2_0x5c331f(0x14e)]=Rule;const joi=require('joi'),date_1=require(a2_0x5c331f(0x13e)),core_1=require(a2_0x5c331f(0x146)),interface_1=require(a2_0x5c331f(0x144));exports[a2_0x5c331f(0x147)]=joi['extend'](date_1[a2_0x5c331f(0x126)]);function Rule(_0x3e0520,_0x2d34c0,_0x4b1002=''){return(_0x4f977b,_0x2fe810)=>{const _0xdbbc28=a2_0xdca3;var _0x4d35ee;if(_0x2fe810)!joi[_0xdbbc28(0x143)](_0x2d34c0)&&(_0x2d34c0===null||_0x2d34c0===void 0x0?void 0x0:_0x2d34c0[_0xdbbc28(0x128)])&&(_0x2d34c0=joi[_0xdbbc28(0x14b)](core_1[_0xdbbc28(0x142)][_0xdbbc28(0x14c)](interface_1[_0xdbbc28(0x14d)],_0x2d34c0))[_0xdbbc28(0x140)]({'id':_0x2d34c0[_0xdbbc28(0x128)]}),core_1[_0xdbbc28(0x142)][_0xdbbc28(0x12f)](core_1[_0xdbbc28(0x142)][_0xdbbc28(0x12a)](_0x4f977b,_0x2fe810))[_0xdbbc28(0x128)]===_0xdbbc28(0x133)&&(_0x2d34c0=joi[_0xdbbc28(0x13c)]()[_0xdbbc28(0x139)](_0x2d34c0))),joi[_0xdbbc28(0x143)](_0x2d34c0)&&(_0x3e0520&&typeof(_0x2d34c0===null||_0x2d34c0===void 0x0?void 0x0:_0x2d34c0[_0xdbbc28(0x14a)])=='function'&&(_0x2d34c0=_0x2d34c0['label'](_0x3e0520)),_0x4b1002&&typeof(_0x2d34c0===null||_0x2d34c0===void 0x0?void 0x0:_0x2d34c0['description'])==_0xdbbc28(0x137)&&(_0x2d34c0=_0x2d34c0['description'](_0x4b1002)),core_1['MetadataManager'][_0xdbbc28(0x13d)](interface_1['RULES_KEY'],_0x2d34c0,_0x4f977b,_0x2fe810));else{const _0x126c39=core_1[_0xdbbc28(0x142)][_0xdbbc28(0x14c)](interface_1[_0xdbbc28(0x14d)],_0x2d34c0);if(_0x126c39){let _0x5911b3=(_0x4d35ee=core_1[_0xdbbc28(0x142)]['getOwnMetadata'](interface_1[_0xdbbc28(0x14d)],_0x4f977b))!==null&&_0x4d35ee!==void 0x0?_0x4d35ee:{};Object[_0xdbbc28(0x12b)](_0x126c39)[_0xdbbc28(0x12e)](_0x345ad6=>{!_0x5911b3[_0x345ad6]&&(_0x5911b3[_0x345ad6]=_0x126c39[_0x345ad6]);}),core_1[_0xdbbc28(0x142)][_0xdbbc28(0x148)](interface_1[_0xdbbc28(0x14d)],_0x5911b3,_0x4f977b);}}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a3_0x1e95(){const _0x5580ce=['search','2693766HriMYD','(((.+)+)+)+$','constructor','indexOf','slice','1229870goRHfX','../interface','35463392cRBCjp','match','1692305IBDwHC','763302tlZlxl','VALIDATOR_KEY','DecoratorManager','Validator','prototype','toString','createCustomMethodDecorator','function','3256288ItCIAF','12PgBNrE','replace','5309220IpyYIQ','attachMetadata'];a3_0x1e95=function(){return _0x5580ce;};return a3_0x1e95();}const a3_0x3e80ec=a3_0x434e;(function(_0x3675ce,_0x297bd6){const _0x135081=a3_0x434e,_0x5e1007=_0x3675ce();while(!![]){try{const _0x3e9a9f=-parseInt(_0x135081(0xe9))/0x1+parseInt(_0x135081(0xe4))/0x2+-parseInt(_0x135081(0xdf))/0x3+-parseInt(_0x135081(0xdc))/0x4+-parseInt(_0x135081(0xe8))/0x5*(parseInt(_0x135081(0xda))/0x6)+-parseInt(_0x135081(0xd9))/0x7+parseInt(_0x135081(0xe6))/0x8;if(_0x3e9a9f===_0x297bd6)break;else _0x5e1007['push'](_0x5e1007['shift']());}catch(_0x31dc8d){_0x5e1007['push'](_0x5e1007['shift']());}}}(a3_0x1e95,0xdfee8));const a3_0x376517=(function(){let _0x46f654=!![];return function(_0x4431b1,_0x9764e9){const _0x215ffe=_0x46f654?function(){if(_0x9764e9){const _0x14ace6=_0x9764e9['apply'](_0x4431b1,arguments);return _0x9764e9=null,_0x14ace6;}}:function(){};return _0x46f654=![],_0x215ffe;};}()),a3_0x4dac2e=a3_0x376517(this,function(){const _0x2ede40=a3_0x434e;return a3_0x4dac2e[_0x2ede40(0xee)]()[_0x2ede40(0xde)](_0x2ede40(0xe0))[_0x2ede40(0xee)]()['constructor'](a3_0x4dac2e)['search'](_0x2ede40(0xe0));});a3_0x4dac2e();'use strict';function a3_0x434e(_0x264353,_0x402b8f){_0x264353=_0x264353-0xd7;const _0x26a890=a3_0x1e95();let _0x4dac2e=_0x26a890[_0x264353];return _0x4dac2e;}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a3_0x3e80ec(0xec)]=Validator,exports['getFuncArgs']=getFuncArgs;const core_1=require('@midwayjs/core'),interface_1=require(a3_0x3e80ec(0xe5));function Validator(_0x512821={}){return(_0x4c0183,_0x348cdd,_0x2265da)=>{const _0x5a425a=a3_0x434e,_0x562c44=getFuncArgs(_0x4c0183[_0x348cdd]);core_1['MetadataManager'][_0x5a425a(0xdd)](interface_1[_0x5a425a(0xea)],{'method':_0x348cdd,'methodArgs':_0x562c44},_0x4c0183),core_1[_0x5a425a(0xeb)][_0x5a425a(0xd7)](interface_1[_0x5a425a(0xea)],_0x512821)(_0x4c0183,_0x348cdd,_0x2265da);};}function getFuncArgs(_0x590586){const _0x4b40c2=a3_0x3e80ec;if(typeof _0x590586==_0x4b40c2(0xd8)){const _0x352d81=/=>.*$/mg,_0x2c0bf8=/=[^,)]+/mg,_0x2f3f2e=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x1db621=(_0x590586[_0x4b40c2(0xed)]?_0x590586[_0x4b40c2(0xed)][_0x4b40c2(0xe1)][_0x4b40c2(0xee)]():_0x590586[_0x4b40c2(0xee)]())[_0x4b40c2(0xdb)](_0x2f3f2e,'')[_0x4b40c2(0xdb)](_0x352d81,'')[_0x4b40c2(0xdb)](_0x2c0bf8,''),_0x2f6a6b=_0x1db621[_0x4b40c2(0xe3)](_0x1db621[_0x4b40c2(0xe2)]('(')+0x1,_0x1db621['indexOf'](')'))[_0x4b40c2(0xe7)](/([^\s,]+)/g)||[];return _0x2f6a6b;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x26c4ea=a4_0x8db5;(function(_0x4d2c60,_0x4e8e1e){var _0x2559cd=a4_0x8db5,_0x5961dc=_0x4d2c60();while(!![]){try{var _0x5231f1=-parseInt(_0x2559cd(0xfd))/0x1*(-parseInt(_0x2559cd(0xf3))/0x2)+-parseInt(_0x2559cd(0xf2))/0x3+-parseInt(_0x2559cd(0xf0))/0x4*(parseInt(_0x2559cd(0xe1))/0x5)+-parseInt(_0x2559cd(0xfa))/0x6*(parseInt(_0x2559cd(0xea))/0x7)+parseInt(_0x2559cd(0xe7))/0x8+parseInt(_0x2559cd(0xe0))/0x9*(-parseInt(_0x2559cd(0xed))/0xa)+parseInt(_0x2559cd(0xe2))/0xb;if(_0x5231f1===_0x4e8e1e)break;else _0x5961dc['push'](_0x5961dc['shift']());}catch(_0x53a116){_0x5961dc['push'](_0x5961dc['shift']());}}}(a4_0x5e80,0x38fb3));var a4_0x2ac6bd=(function(){var _0x26c334=!![];return function(_0x946409,_0x1ce273){var _0x3c2b18=_0x26c334?function(){var _0x32035e=a4_0x8db5;if(_0x1ce273){var _0x579275=_0x1ce273[_0x32035e(0xe8)](_0x946409,arguments);return _0x1ce273=null,_0x579275;}}:function(){};return _0x26c334=![],_0x3c2b18;};}()),a4_0x5537d3=a4_0x2ac6bd(this,function(){var _0xd26240=a4_0x8db5;return a4_0x5537d3[_0xd26240(0xe9)]()[_0xd26240(0xf9)](_0xd26240(0xe4))[_0xd26240(0xe9)]()[_0xd26240(0xfc)](a4_0x5537d3)[_0xd26240(0xf9)](_0xd26240(0xe4));});a4_0x5537d3();function a4_0x8db5(_0x589d52,_0x5509e0){_0x589d52=_0x589d52-0xe0;var _0x9d6bc5=a4_0x5e80();var _0x5537d3=_0x9d6bc5[_0x589d52];return _0x5537d3;}'use strict';var __decorate=this&&this['__decorate']||function(_0xe0f579,_0x89dc0f,_0x39be8c,_0x4a2683){var _0x2effba=a4_0x8db5,_0x491321=arguments[_0x2effba(0xfb)],_0x1dcaeb=_0x491321<0x3?_0x89dc0f:_0x4a2683===null?_0x4a2683=Object[_0x2effba(0xe5)](_0x89dc0f,_0x39be8c):_0x4a2683,_0x437364;if(typeof Reflect===_0x2effba(0xf8)&&typeof Reflect['decorate']==='function')_0x1dcaeb=Reflect[_0x2effba(0xf5)](_0xe0f579,_0x89dc0f,_0x39be8c,_0x4a2683);else{for(var _0x317195=_0xe0f579[_0x2effba(0xfb)]-0x1;_0x317195>=0x0;_0x317195--)if(_0x437364=_0xe0f579[_0x317195])_0x1dcaeb=(_0x491321<0x3?_0x437364(_0x1dcaeb):_0x491321>0x3?_0x437364(_0x89dc0f,_0x39be8c,_0x1dcaeb):_0x437364(_0x89dc0f,_0x39be8c))||_0x1dcaeb;}return _0x491321>0x3&&_0x1dcaeb&&Object[_0x2effba(0xeb)](_0x89dc0f,_0x39be8c,_0x1dcaeb),_0x1dcaeb;},__metadata=this&&this['__metadata']||function(_0x4a0f2a,_0x1fa4b0){var _0x131607=a4_0x8db5;if(typeof Reflect===_0x131607(0xf8)&&typeof Reflect[_0x131607(0xe3)]==='function')return Reflect[_0x131607(0xe3)](_0x4a0f2a,_0x1fa4b0);};Object['defineProperty'](exports,a4_0x26c4ea(0xee),{'value':!![]}),exports[a4_0x26c4ea(0xf7)]=void 0x0;function a4_0x5e80(){var _0x22021e=['20DZXOkU','PARAMS','decorate','参数验证失败','ValidatorError','object','search','1843662DgQXlO','length','constructor','23623WFLXey','3364371wlYcGD','5xbbtRF','6266337fgsJcg','metadata','(((.+)+)+)+$','getOwnPropertyDescriptor','@anveroapi/core','3486520gvzzNx','apply','toString','7qZdeMu','defineProperty','design:type','10PgFJDB','__esModule','AnnErrorMsg','965444hAMFYs','NOFIND_SCHEMA','257580QlWnan'];a4_0x5e80=function(){return _0x22021e;};return a4_0x5e80();}const core_1=require(a4_0x26c4ea(0xe6));class ValidatorError extends AnnError{}exports[a4_0x26c4ea(0xf7)]=ValidatorError,ValidatorError[a4_0x26c4ea(0xf4)]=0x18c1e,ValidatorError[a4_0x26c4ea(0xf1)]=0x18c1c,__decorate([(0x0,core_1[a4_0x26c4ea(0xef)])(a4_0x26c4ea(0xf6)),__metadata('design:type',Object)],ValidatorError,'PARAMS',void 0x0),__decorate([(0x0,core_1[a4_0x26c4ea(0xef)])(a4_0x26c4ea(0xf6)),__metadata(a4_0x26c4ea(0xec),Object)],ValidatorError,'NOFIND_SCHEMA',void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x32bdec=a5_0x4b24;(function(_0x3a087c,_0x30b436){const _0x34b33d=a5_0x4b24,_0x538495=_0x3a087c();while(!![]){try{const _0x42da3f=parseInt(_0x34b33d(0x1e1))/0x1*(-parseInt(_0x34b33d(0x1f2))/0x2)+-parseInt(_0x34b33d(0x1ed))/0x3*(-parseInt(_0x34b33d(0x1f9))/0x4)+parseInt(_0x34b33d(0x1f4))/0x5+parseInt(_0x34b33d(0x1e8))/0x6*(-parseInt(_0x34b33d(0x1f3))/0x7)+-parseInt(_0x34b33d(0x1eb))/0x8*(parseInt(_0x34b33d(0x1f8))/0x9)+-parseInt(_0x34b33d(0x1ea))/0xa+parseInt(_0x34b33d(0x1e6))/0xb;if(_0x42da3f===_0x30b436)break;else _0x538495['push'](_0x538495['shift']());}catch(_0x359d6e){_0x538495['push'](_0x538495['shift']());}}}(a5_0x3327,0x3d712));const a5_0x4b42e6=(function(){let _0x15144e=!![];return function(_0x53760c,_0x15e501){const _0x223c81=_0x15144e?function(){if(_0x15e501){const _0x351433=_0x15e501['apply'](_0x53760c,arguments);return _0x15e501=null,_0x351433;}}:function(){};return _0x15144e=![],_0x223c81;};}()),a5_0x4b4a39=a5_0x4b42e6(this,function(){const _0x4eb132=a5_0x4b24;return a5_0x4b4a39[_0x4eb132(0x1f5)]()[_0x4eb132(0x1ee)](_0x4eb132(0x1f7))[_0x4eb132(0x1f5)]()[_0x4eb132(0x1e3)](a5_0x4b4a39)[_0x4eb132(0x1ee)]('(((.+)+)+)+$');});a5_0x4b4a39();'use strict';Object[a5_0x32bdec(0x1e4)](exports,a5_0x32bdec(0x1e7),{'value':!![]}),exports[a5_0x32bdec(0x1ec)]=PickDto,exports['OmitDto']=OmitDto;function a5_0x4b24(_0x4631f3,_0x214892){_0x4631f3=_0x4631f3-0x1e1;const _0x326fe1=a5_0x3327();let _0x4b4a39=_0x326fe1[_0x4631f3];return _0x4b4a39;}const core_1=require('@midwayjs/core'),interface_1=require(a5_0x32bdec(0x1e5)),getSchema_1=require(a5_0x32bdec(0x1e2));function PickDto(_0x3aff69,_0x2dda32){const _0x45e469=a5_0x32bdec,_0x59de83=function(){};_0x59de83[_0x45e469(0x1e9)]=_0x3aff69[_0x45e469(0x1e9)];const _0x2bd9d4=(0x0,getSchema_1['getDtoRules'])(_0x3aff69),_0x30c72a={};for(const _0x22bd21 of _0x2dda32){_0x2bd9d4[_0x22bd21]&&(_0x30c72a[_0x22bd21]=_0x2bd9d4[_0x22bd21]);}return core_1[_0x45e469(0x1f6)]['defineMetadata'](interface_1[_0x45e469(0x1f1)],_0x30c72a,_0x59de83),_0x59de83;}function OmitDto(_0x3ad0ad,_0x4fefe6){const _0x1cf22a=a5_0x32bdec,_0x10cbc1=function(){};_0x10cbc1[_0x1cf22a(0x1e9)]=_0x3ad0ad['prototype'];const _0x3df28d=(0x0,getSchema_1['getDtoRules'])(_0x3ad0ad),_0x15dff1=Object[_0x1cf22a(0x1ef)]({},_0x3df28d);for(const _0x3f1b19 of _0x4fefe6){delete _0x15dff1[_0x3f1b19];}return core_1['MetadataManager'][_0x1cf22a(0x1f0)](interface_1[_0x1cf22a(0x1f1)],_0x15dff1,_0x10cbc1),_0x10cbc1;}function a5_0x3327(){const _0x1b65fa=['1291604ICLYzx','605JhvKQW','./getSchema','constructor','defineProperty','../interface','7943056KLjLlU','__esModule','2084364vUuLCD','prototype','2612350Gavuiy','8LZocox','PickDto','3nOfeph','search','assign','defineMetadata','RULES_KEY','928ZfkYob','7qkuQnV','1335845NQyElY','toString','MetadataManager','(((.+)+)+)+$','1540359fvwwor'];a5_0x3327=function(){return _0x1b65fa;};return a5_0x3327();}
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x2758ff=a6_0x2945;(function(_0x42a0dd,_0x358d3d){const _0x3c0005=a6_0x2945,_0x2dc3bc=_0x42a0dd();while(!![]){try{const _0x3623f4=-parseInt(_0x3c0005(0x11f))/0x1+-parseInt(_0x3c0005(0x128))/0x2*(-parseInt(_0x3c0005(0x10f))/0x3)+-parseInt(_0x3c0005(0x11a))/0x4*(parseInt(_0x3c0005(0x113))/0x5)+-parseInt(_0x3c0005(0x114))/0x6+parseInt(_0x3c0005(0x12a))/0x7+parseInt(_0x3c0005(0x119))/0x8*(parseInt(_0x3c0005(0x115))/0x9)+-parseInt(_0x3c0005(0x111))/0xa*(-parseInt(_0x3c0005(0x10d))/0xb);if(_0x3623f4===_0x358d3d)break;else _0x2dc3bc['push'](_0x2dc3bc['shift']());}catch(_0x30d061){_0x2dc3bc['push'](_0x2dc3bc['shift']());}}}(a6_0x140f,0x72af6));const a6_0x3233e8=(function(){let _0x3451d9=!![];return function(_0x15047b,_0x103147){const _0xf8302c=_0x3451d9?function(){const _0xe194b=a6_0x2945;if(_0x103147){const _0x1032cc=_0x103147[_0xe194b(0x124)](_0x15047b,arguments);return _0x103147=null,_0x1032cc;}}:function(){};return _0x3451d9=![],_0xf8302c;};}()),a6_0x5d706b=a6_0x3233e8(this,function(){const _0x275b96=a6_0x2945;return a6_0x5d706b[_0x275b96(0x129)]()['search']('(((.+)+)+)+$')[_0x275b96(0x129)]()[_0x275b96(0x12c)](a6_0x5d706b)[_0x275b96(0x11b)](_0x275b96(0x122));});function a6_0x2945(_0x59d3b9,_0x48b78a){_0x59d3b9=_0x59d3b9-0x10d;const _0x501a69=a6_0x140f();let _0x5d706b=_0x501a69[_0x59d3b9];return _0x5d706b;}a6_0x5d706b();'use strict';Object[a6_0x2758ff(0x117)](exports,a6_0x2758ff(0x127),{'value':!![]}),exports[a6_0x2758ff(0x110)]=getDtoRules,exports[a6_0x2758ff(0x123)]=getSchema;const Joi=require(a6_0x2758ff(0x10e)),core_1=require(a6_0x2758ff(0x120)),interface_1=require(a6_0x2758ff(0x12b));function getDtoRules(_0xc43e40){const _0x22ebf2=a6_0x2758ff,_0x2f6867=core_1[_0x22ebf2(0x11c)][_0x22ebf2(0x125)](interface_1[_0x22ebf2(0x126)],_0xc43e40),_0x23b952=_0x2f6867!==undefined?_0x2f6867:Object[_0x22ebf2(0x112)](Object['entries'](core_1[_0x22ebf2(0x11c)][_0x22ebf2(0x118)](interface_1[_0x22ebf2(0x126)],_0xc43e40))[_0x22ebf2(0x11d)](([_0x495446,_0x1d8050])=>[_0x495446,Array['isArray'](_0x1d8050)&&_0x1d8050[_0x22ebf2(0x121)]?_0x1d8050[_0x1d8050[_0x22ebf2(0x121)]-0x1]:_0x1d8050]));return Object[_0x22ebf2(0x11e)](_0x23b952)[_0x22ebf2(0x121)]?_0x23b952:undefined;}function a6_0x140f(){const _0x3fcf1c=['2082808ppypAK','../interface','constructor','8734LBOMbS','joi','3CIJdAr','getDtoRules','5230DFlVeT','fromEntries','5IytOEI','5410944uOKlmc','3185523dKYtAE','object','defineProperty','getPropertiesWithMetadata','16lpOPMN','88708amKqUA','search','MetadataManager','map','keys','172408JDSWhb','@midwayjs/core','length','(((.+)+)+)+$','getSchema','apply','getMetadata','RULES_KEY','__esModule','290918qvhgLY','toString'];a6_0x140f=function(){return _0x3fcf1c;};return a6_0x140f();}function getSchema(_0x561742){const _0x137865=a6_0x2758ff,_0x5863b3=getDtoRules(_0x561742);if(_0x5863b3&&Object[_0x137865(0x11e)](_0x5863b3)[_0x137865(0x121)])return Joi[_0x137865(0x116)](_0x5863b3);}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x318f28=a7_0x47a8;(function(_0x273443,_0x58a04c){var _0x45591b=a7_0x47a8,_0x273e89=_0x273443();while(!![]){try{var _0x87eff5=-parseInt(_0x45591b(0x10d))/0x1*(parseInt(_0x45591b(0x108))/0x2)+-parseInt(_0x45591b(0x101))/0x3+-parseInt(_0x45591b(0x124))/0x4*(-parseInt(_0x45591b(0x11e))/0x5)+-parseInt(_0x45591b(0x105))/0x6+parseInt(_0x45591b(0x11d))/0x7*(-parseInt(_0x45591b(0x125))/0x8)+-parseInt(_0x45591b(0x104))/0x9+parseInt(_0x45591b(0x10b))/0xa;if(_0x87eff5===_0x58a04c)break;else _0x273e89['push'](_0x273e89['shift']());}catch(_0x5f36a8){_0x273e89['push'](_0x273e89['shift']());}}}(a7_0x38a6,0x22915));var a7_0x14edd8=(function(){var _0x1e5fa6=!![];return function(_0x45f19a,_0x53179c){var _0xdec250=_0x1e5fa6?function(){var _0x4cf5ee=a7_0x47a8;if(_0x53179c){var _0x53e15c=_0x53179c[_0x4cf5ee(0x123)](_0x45f19a,arguments);return _0x53179c=null,_0x53e15c;}}:function(){};return _0x1e5fa6=![],_0xdec250;};}()),a7_0x547d31=a7_0x14edd8(this,function(){var _0x427502=a7_0x47a8;return a7_0x547d31[_0x427502(0x103)]()[_0x427502(0x107)]('(((.+)+)+)+$')[_0x427502(0x103)]()[_0x427502(0x10f)](a7_0x547d31)[_0x427502(0x107)]('(((.+)+)+)+$');});a7_0x547d31();function a7_0x38a6(){var _0xf43832=['__createBinding','./decorator/Rule','prototype','./exception/ValidatorError','ValidatorError','Rule','hasOwnProperty','getOwnPropertyDescriptor','configurable','defineProperty','./service/ValidatorService','default','516957tvZyXi','5zbaYhN','./helper/getSchema','Configuration','ValidatorService','./helper/dtoHelper','apply','886244YODGiW','16DXmVzG','541236VZotUn','CustomConfiguration','toString','376947akpSrF','859494eErqSq','./configuration','search','34viHsMW','__exportStar','./interface','5894530JJcnqr','Validator','9187UgWYhI','RuleType','constructor','__esModule'];a7_0x38a6=function(){return _0xf43832;};return a7_0x38a6();}'use strict';var __createBinding=this&&this[a7_0x318f28(0x111)]||(Object['create']?function(_0x8ff178,_0xb2f626,_0x427ebc,_0x1e6b9d){var _0x14bf1b=a7_0x318f28;if(_0x1e6b9d===undefined)_0x1e6b9d=_0x427ebc;var _0x8cc7a2=Object[_0x14bf1b(0x118)](_0xb2f626,_0x427ebc);(!_0x8cc7a2||('get'in _0x8cc7a2?!_0xb2f626[_0x14bf1b(0x110)]:_0x8cc7a2['writable']||_0x8cc7a2[_0x14bf1b(0x119)]))&&(_0x8cc7a2={'enumerable':!![],'get':function(){return _0xb2f626[_0x427ebc];}}),Object[_0x14bf1b(0x11a)](_0x8ff178,_0x1e6b9d,_0x8cc7a2);}:function(_0x30c1f7,_0x52b753,_0x19bb34,_0x1ed893){if(_0x1ed893===undefined)_0x1ed893=_0x19bb34;_0x30c1f7[_0x1ed893]=_0x52b753[_0x19bb34];}),__exportStar=this&&this[a7_0x318f28(0x109)]||function(_0x3f3316,_0x1a8bed){var _0x301782=a7_0x318f28;for(var _0x453f4c in _0x3f3316)if(_0x453f4c!==_0x301782(0x11c)&&!Object[_0x301782(0x113)][_0x301782(0x117)]['call'](_0x1a8bed,_0x453f4c))__createBinding(_0x1a8bed,_0x3f3316,_0x453f4c);};Object[a7_0x318f28(0x11a)](exports,a7_0x318f28(0x110),{'value':!![]}),exports[a7_0x318f28(0x120)]=exports[a7_0x318f28(0x121)]=exports[a7_0x318f28(0x115)]=exports[a7_0x318f28(0x10e)]=exports['Rule']=exports[a7_0x318f28(0x10c)]=void 0x0,__exportStar(require(a7_0x318f28(0x10a)),exports),__exportStar(require(a7_0x318f28(0x122)),exports),__exportStar(require(a7_0x318f28(0x11f)),exports);var Validator_1=require('./decorator/Validator');Object[a7_0x318f28(0x11a)](exports,a7_0x318f28(0x10c),{'enumerable':!![],'get':function(){var _0x223232=a7_0x318f28;return Validator_1[_0x223232(0x10c)];}});var Rule_1=require(a7_0x318f28(0x112));Object[a7_0x318f28(0x11a)](exports,a7_0x318f28(0x116),{'enumerable':!![],'get':function(){return Rule_1['Rule'];}}),Object[a7_0x318f28(0x11a)](exports,a7_0x318f28(0x10e),{'enumerable':!![],'get':function(){return Rule_1['RuleType'];}});var ValidatorError_1=require(a7_0x318f28(0x114));function a7_0x47a8(_0x487f71,_0x6c0479){_0x487f71=_0x487f71-0x101;var _0x235c42=a7_0x38a6();var _0x547d31=_0x235c42[_0x487f71];return _0x547d31;}Object[a7_0x318f28(0x11a)](exports,'ValidatorError',{'enumerable':!![],'get':function(){var _0x2ad00f=a7_0x318f28;return ValidatorError_1[_0x2ad00f(0x115)];}});var ValidatorService_1=require(a7_0x318f28(0x11b));Object[a7_0x318f28(0x11a)](exports,a7_0x318f28(0x121),{'enumerable':!![],'get':function(){var _0x1503e4=a7_0x318f28;return ValidatorService_1[_0x1503e4(0x121)];}});var configuration_1=require(a7_0x318f28(0x106));Object[a7_0x318f28(0x11a)](exports,a7_0x318f28(0x120),{'enumerable':!![],'get':function(){var _0x351bbc=a7_0x318f28;return configuration_1[_0x351bbc(0x102)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a8_0x25e322=a8_0xfac6;(function(_0x22c224,_0x1eb657){var _0x57f75f=a8_0xfac6,_0x2025d4=_0x22c224();while(!![]){try{var _0x3f6b51=-parseInt(_0x57f75f(0x1de))/0x1+parseInt(_0x57f75f(0x1df))/0x2*(-parseInt(_0x57f75f(0x1d6))/0x3)+parseInt(_0x57f75f(0x1cf))/0x4+parseInt(_0x57f75f(0x1d4))/0x5*(parseInt(_0x57f75f(0x1db))/0x6)+parseInt(_0x57f75f(0x1da))/0x7+parseInt(_0x57f75f(0x1dc))/0x8+-parseInt(_0x57f75f(0x1e0))/0x9*(parseInt(_0x57f75f(0x1d2))/0xa);if(_0x3f6b51===_0x1eb657)break;else _0x2025d4['push'](_0x2025d4['shift']());}catch(_0x2f6038){_0x2025d4['push'](_0x2025d4['shift']());}}}(a8_0x5a76,0x69468));var a8_0x2a1612=(function(){var _0x56e5cc=!![];return function(_0x41367e,_0x451376){var _0x4fb540=_0x56e5cc?function(){var _0x1c2f88=a8_0xfac6;if(_0x451376){var _0x5341df=_0x451376[_0x1c2f88(0x1d5)](_0x41367e,arguments);return _0x451376=null,_0x5341df;}}:function(){};return _0x56e5cc=![],_0x4fb540;};}()),a8_0x43f357=a8_0x2a1612(this,function(){var _0x2e2711=a8_0xfac6;return a8_0x43f357[_0x2e2711(0x1d8)]()['search'](_0x2e2711(0x1d9))[_0x2e2711(0x1d8)]()[_0x2e2711(0x1d3)](a8_0x43f357)[_0x2e2711(0x1dd)](_0x2e2711(0x1d9));});a8_0x43f357();function a8_0xfac6(_0x273125,_0x5393fa){_0x273125=_0x273125-0x1cf;var _0xc2843f=a8_0x5a76();var _0x43f357=_0xc2843f[_0x273125];return _0x43f357;}function a8_0x5a76(){var _0x280061=['354528AHPRMA','1338624XYbbZA','search','44430JBAJzX','324DuzxQZ','63yVfVwe','1242568ZZNaae','RULES_KEY','anvero-api:validator:rules','224270iVeRYM','constructor','55tKOkPU','apply','11751MGwbJS','VALIDATOR_KEY','toString','(((.+)+)+)+$','974701trTaHE'];a8_0x5a76=function(){return _0x280061;};return a8_0x5a76();}'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a8_0x25e322(0x1d7)]=exports['RULES_KEY']=void 0x0,exports[a8_0x25e322(0x1d0)]=a8_0x25e322(0x1d1),exports['VALIDATOR_KEY']='anvero-api:validator:validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a9_0x105b(_0x5b7e93,_0x1ebc8c){_0x5b7e93=_0x5b7e93-0xb8;const _0x2dc4f4=a9_0x2472();let _0x1c17a3=_0x2dc4f4[_0x5b7e93];return _0x1c17a3;}const a9_0x591891=a9_0x105b;(function(_0x471425,_0x2a0458){const _0x3f1ab3=a9_0x105b,_0x12168d=_0x471425();while(!![]){try{const _0x42ee9e=parseInt(_0x3f1ab3(0xe7))/0x1*(parseInt(_0x3f1ab3(0xb8))/0x2)+parseInt(_0x3f1ab3(0xcc))/0x3+parseInt(_0x3f1ab3(0xe4))/0x4+-parseInt(_0x3f1ab3(0xbe))/0x5*(parseInt(_0x3f1ab3(0xc8))/0x6)+-parseInt(_0x3f1ab3(0xe8))/0x7*(-parseInt(_0x3f1ab3(0xcb))/0x8)+parseInt(_0x3f1ab3(0xff))/0x9*(-parseInt(_0x3f1ab3(0xe3))/0xa)+-parseInt(_0x3f1ab3(0xcf))/0xb*(parseInt(_0x3f1ab3(0xea))/0xc);if(_0x42ee9e===_0x2a0458)break;else _0x12168d['push'](_0x12168d['shift']());}catch(_0x1e28ae){_0x12168d['push'](_0x12168d['shift']());}}}(a9_0x2472,0x19c11));const a9_0x286d7f=(function(){let _0x2556f0=!![];return function(_0x4a41a7,_0x52bf15){const _0x2bed05=_0x2556f0?function(){const _0x3a639d=a9_0x105b;if(_0x52bf15){const _0x506047=_0x52bf15[_0x3a639d(0xc3)](_0x4a41a7,arguments);return _0x52bf15=null,_0x506047;}}:function(){};return _0x2556f0=![],_0x2bed05;};}()),a9_0x1c17a3=a9_0x286d7f(this,function(){const _0x170e3a=a9_0x105b;return a9_0x1c17a3[_0x170e3a(0xc1)]()[_0x170e3a(0xd4)](_0x170e3a(0xd2))[_0x170e3a(0xc1)]()[_0x170e3a(0x101)](a9_0x1c17a3)[_0x170e3a(0xd4)](_0x170e3a(0xd2));});a9_0x1c17a3();'use strict';function a9_0x2472(){const _0x4ff56e=['700eKZbXd','290976Stvzpy','validationOptions','formatLocale','2000YDOBqF','7oCSToq','error','29592dEeUwD','length','i18nConfig','joi','ValidatorError','validate','localeTable','@midwayjs/core','forEach','init','getAvailableLocale','Init','ValidatorService','getLocaleMapping','value','metadata','fromEntries','YYYY-MM-DD\x20HH:mm:ss','getSchema','language','design:paramtypes','22185ATIYEL','format','constructor','Inject','getOwnPropertyDescriptor','i18nService','172KULeyJ','key','Config','errors','PARAMS','locale','8360aLlokr','getDtoRules','i18n','toString','details','apply','decorate','assign','defineProperty','type','348LcGzpj','validator','__metadata','333784YQlVGU','347022UTOaaq','../helper/getSchema','design:returntype','121EmDwQS','validatorConfig','Scope','(((.+)+)+)+$','function','search','messages','__decorate','object','NOFIND_SCHEMA','参数验证失败','keys','$_terms','@midwayjs/i18n','design:type','message','prototype','schema','defaultLocale','../exception/ValidatorError'];a9_0x2472=function(){return _0x4ff56e;};return a9_0x2472();}var __decorate=this&&this[a9_0x591891(0xd6)]||function(_0x2a095f,_0x10bd0a,_0x419705,_0x77161f){const _0x3f4688=a9_0x591891;var _0x154dce=arguments[_0x3f4688(0xeb)],_0x433d84=_0x154dce<0x3?_0x10bd0a:_0x77161f===null?_0x77161f=Object[_0x3f4688(0x103)](_0x10bd0a,_0x419705):_0x77161f,_0x32b982;if(typeof Reflect===_0x3f4688(0xd7)&&typeof Reflect[_0x3f4688(0xc4)]===_0x3f4688(0xd3))_0x433d84=Reflect[_0x3f4688(0xc4)](_0x2a095f,_0x10bd0a,_0x419705,_0x77161f);else{for(var _0x42d083=_0x2a095f['length']-0x1;_0x42d083>=0x0;_0x42d083--)if(_0x32b982=_0x2a095f[_0x42d083])_0x433d84=(_0x154dce<0x3?_0x32b982(_0x433d84):_0x154dce>0x3?_0x32b982(_0x10bd0a,_0x419705,_0x433d84):_0x32b982(_0x10bd0a,_0x419705))||_0x433d84;}return _0x154dce>0x3&&_0x433d84&&Object[_0x3f4688(0xc6)](_0x10bd0a,_0x419705,_0x433d84),_0x433d84;},__metadata=this&&this[a9_0x591891(0xca)]||function(_0x5b1f12,_0x12fe37){const _0x52ec85=a9_0x591891;if(typeof Reflect===_0x52ec85(0xd7)&&typeof Reflect[_0x52ec85(0xf9)]==='function')return Reflect[_0x52ec85(0xf9)](_0x5b1f12,_0x12fe37);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a9_0x591891(0xf6)]=void 0x0;const Joi=require(a9_0x591891(0xed)),i18n_1=require(a9_0x591891(0xdc)),core_1=require(a9_0x591891(0xf1)),getSchema_1=require(a9_0x591891(0xcd)),ValidatorError_1=require(a9_0x591891(0xe2));let ValidatorService=class ValidatorService{constructor(){const _0x2793d2=a9_0x591891;this[_0x2793d2(0xd5)]={};}async['init'](){const _0x4f6011=a9_0x591891,_0x27e478=Object['keys'](this['i18nConfig'][_0x4f6011(0xf0)]);_0x27e478[_0x4f6011(0xf2)](_0x484eb2=>{const _0x36feea=_0x4f6011;this[_0x36feea(0xd5)][(0x0,i18n_1['formatLocale'])(_0x484eb2)]=Object[_0x36feea(0xfa)](this['i18nService'][_0x36feea(0xf7)](_0x484eb2,_0x36feea(0xc9)));});}[a9_0x591891(0xfc)](_0x34136c){const _0xd8ff5d=a9_0x591891,_0x190f58=(0x0,getSchema_1[_0xd8ff5d(0xbf)])(_0x34136c);return _0x190f58?Joi['object'](_0x190f58):undefined;}[a9_0x591891(0xc9)](_0x386256,_0x16dd38,_0x29f084={}){const _0x249d0b=a9_0x591891;var _0xdad208,_0xadd479,_0x1d3bb2,_0x33d6a4,_0x4e9a1a,_0x2e4d46;const _0x2c96a5=Joi['isSchema'](_0x386256)?_0x386256:this['getSchema'](_0x386256);if(!_0x2c96a5)throw new AnnError(ValidatorError_1['ValidatorError'][_0x249d0b(0xd8)]);_0x29f084[_0x249d0b(0xe5)]=Object[_0x249d0b(0xc5)]((_0xdad208=this[_0x249d0b(0xd0)]['validationOptions'])!==null&&_0xdad208!==void 0x0?_0xdad208:{},{'messages':this[_0x249d0b(0xd5)]},_0x29f084[_0x249d0b(0xe5)]||{}),_0x29f084[_0x249d0b(0xe5)][_0x249d0b(0xbb)]=_0x29f084[_0x249d0b(0xe5)]['errors']||{},_0x29f084[_0x249d0b(0xe5)][_0x249d0b(0xbb)][_0x249d0b(0xfd)]=(0x0,i18n_1[_0x249d0b(0xe6)])(this['i18nService'][_0x249d0b(0xf4)](_0x29f084[_0x249d0b(0xe5)][_0x249d0b(0xbb)][_0x249d0b(0xfd)]||_0x29f084[_0x249d0b(0xbd)]||this[_0x249d0b(0xec)][_0x249d0b(0xe1)],_0x249d0b(0xc9)));const _0x47bdd1=_0x2c96a5[_0x249d0b(0xef)](_0x16dd38,_0x29f084[_0x249d0b(0xe5)]);if(_0x47bdd1===null||_0x47bdd1===void 0x0?void 0x0:_0x47bdd1['error']){if(_0x47bdd1['error']instanceof AnnError)throw _0x47bdd1[_0x249d0b(0xe9)];else{if(_0x47bdd1[_0x249d0b(0xe9)]instanceof Error)throw new AnnError(ValidatorError_1[_0x249d0b(0xee)][_0x249d0b(0xbc)],{'message':((_0xadd479=_0x47bdd1['error'])===null||_0xadd479===void 0x0?void 0x0:_0xadd479['message'])||_0x249d0b(0xd9)});else throw new AnnError(ValidatorError_1[_0x249d0b(0xee)]['PARAMS'],{'message':((_0x4e9a1a=(_0x33d6a4=(_0x1d3bb2=_0x47bdd1['error'])===null||_0x1d3bb2===void 0x0?void 0x0:_0x1d3bb2[_0x249d0b(0xc2)])===null||_0x33d6a4===void 0x0?void 0x0:_0x33d6a4[0x0])===null||_0x4e9a1a===void 0x0?void 0x0:_0x4e9a1a[_0x249d0b(0xde)])||_0x249d0b(0xd9)});}}if(_0x47bdd1===null||_0x47bdd1===void 0x0?void 0x0:_0x47bdd1['value']){const _0x2db168=(_0x2e4d46=_0x2c96a5===null||_0x2c96a5===void 0x0?void 0x0:_0x2c96a5[_0x249d0b(0xdb)])===null||_0x2e4d46===void 0x0?void 0x0:_0x2e4d46[_0x249d0b(0xda)],_0x11b1b0=function(_0x4afede,_0x2fcff){const _0x231fd5=_0x249d0b;var _0x309f04,_0x490dcc,_0x514542,_0x3c315a,_0x5d53a5,_0x49808b,_0x4b42bc,_0x43b5bd,_0x2bd8b4,_0x416fd2,_0x2cb99f;for(let _0x39e59e in _0x4afede){if(_0x2fcff[(_0x309f04=_0x4afede[_0x39e59e])===null||_0x309f04===void 0x0?void 0x0:_0x309f04[_0x231fd5(0xb9)]]&&((_0x514542=(_0x490dcc=_0x4afede[_0x39e59e])===null||_0x490dcc===void 0x0?void 0x0:_0x490dcc[_0x231fd5(0xe0)])===null||_0x514542===void 0x0?void 0x0:_0x514542[_0x231fd5(0xc7)])){if(((_0x5d53a5=(_0x3c315a=_0x4afede[_0x39e59e])===null||_0x3c315a===void 0x0?void 0x0:_0x3c315a[_0x231fd5(0xe0)])===null||_0x5d53a5===void 0x0?void 0x0:_0x5d53a5[_0x231fd5(0xc7)])==_0x231fd5(0xd7))_0x2fcff[_0x4afede[_0x39e59e][_0x231fd5(0xb9)]]=_0x11b1b0((_0x4b42bc=(_0x49808b=_0x4afede[_0x39e59e])===null||_0x49808b===void 0x0?void 0x0:_0x49808b['schema'][_0x231fd5(0xdb)])===null||_0x4b42bc===void 0x0?void 0x0:_0x4b42bc['keys'],_0x2fcff[_0x4afede[_0x39e59e]['key']]);else{if(_0x4afede[_0x39e59e][_0x231fd5(0xe0)][_0x231fd5(0xc7)]=='date'&&_0x47bdd1[_0x231fd5(0xf8)][(_0x43b5bd=_0x4afede[_0x39e59e])===null||_0x43b5bd===void 0x0?void 0x0:_0x43b5bd[_0x231fd5(0xb9)]]){const _0x354371=((_0x2cb99f=(_0x416fd2=(_0x2bd8b4=_0x4afede[_0x39e59e])===null||_0x2bd8b4===void 0x0?void 0x0:_0x2bd8b4['schema'])===null||_0x416fd2===void 0x0?void 0x0:_0x416fd2['_flags'])===null||_0x2cb99f===void 0x0?void 0x0:_0x2cb99f[_0x231fd5(0x100)])||_0x231fd5(0xfb);_0x2fcff[_0x4afede[_0x39e59e][_0x231fd5(0xb9)]]=dayjs(_0x47bdd1[_0x231fd5(0xf8)][_0x4afede[_0x39e59e]['key']])[_0x231fd5(0x100)](_0x354371);}}}}return _0x2fcff;};return _0x11b1b0(_0x2db168,_0x47bdd1[_0x249d0b(0xf8)]);}throw new AnnError(ValidatorError_1[_0x249d0b(0xee)][_0x249d0b(0xbc)]);}};exports[a9_0x591891(0xf6)]=ValidatorService,__decorate([(0x0,core_1[a9_0x591891(0xba)])(a9_0x591891(0xc0)),__metadata(a9_0x591891(0xdd),Object)],ValidatorService['prototype'],a9_0x591891(0xec),void 0x0),__decorate([(0x0,core_1[a9_0x591891(0xba)])(a9_0x591891(0xc9)),__metadata(a9_0x591891(0xdd),Object)],ValidatorService[a9_0x591891(0xdf)],a9_0x591891(0xd0),void 0x0),__decorate([(0x0,core_1[a9_0x591891(0x102)])(),__metadata(a9_0x591891(0xdd),i18n_1['MidwayI18nServiceSingleton'])],ValidatorService[a9_0x591891(0xdf)],a9_0x591891(0x104),void 0x0),__decorate([(0x0,core_1[a9_0x591891(0xf5)])(),__metadata('design:type',Function),__metadata(a9_0x591891(0xfe),[]),__metadata(a9_0x591891(0xce),Promise)],ValidatorService[a9_0x591891(0xdf)],a9_0x591891(0xf3),null),exports[a9_0x591891(0xf6)]=ValidatorService=__decorate([(0x0,core_1['Provide'])('validator'),(0x0,core_1[a9_0x591891(0xd1)])(core_1['ScopeEnum']['Singleton'])],ValidatorService);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anveroapi/validator",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.8",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@joi/date": "^2.1.0",
|
|
19
19
|
"@midwayjs/core": "^4.2.6",
|
|
20
20
|
"@midwayjs/i18n": "^4.2.6",
|
|
21
|
-
"@anveroapi/core": "4.1.
|
|
21
|
+
"@anveroapi/core": "4.1.8"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"typescript": "~5.9.3",
|