@anncic-api/validator 1.4.41 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.default.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Rule.js +1 -1
- package/dist/decorator/Validator.js +1 -1
- package/dist/exception/ValidatorError.js +1 -1
- package/dist/helper/dtoHelper.js +1 -1
- package/dist/index.js +1 -1
- package/dist/interface.js +1 -1
- package/dist/service/ValidatorService.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x38ae6d=a0_0x28d4;(function(_0xbeafd6,_0x108830){const _0xbdc63c=a0_0x28d4,_0x413150=_0xbeafd6();while(!![]){try{const _0x2a6509=-parseInt(_0xbdc63c(0xb0))/0x1+-parseInt(_0xbdc63c(0xb1))/0x2+-parseInt(_0xbdc63c(0xac))/0x3*(parseInt(_0xbdc63c(0xa6))/0x4)+-parseInt(_0xbdc63c(0xb4))/0x5+-parseInt(_0xbdc63c(0xaa))/0x6+-parseInt(_0xbdc63c(0xb6))/0x7+-parseInt(_0xbdc63c(0xae))/0x8*(-parseInt(_0xbdc63c(0xa9))/0x9);if(_0x2a6509===_0x108830)break;else _0x413150['push'](_0x413150['shift']());}catch(_0x10dfae){_0x413150['push'](_0x413150['shift']());}}}(a0_0x3f2c,0x31c40));const a0_0x48e6eb=(function(){let _0xb8bfdc=!![];return function(_0x197304,_0x2c90e5){const _0x1b64a4=_0xb8bfdc?function(){const _0x5d2650=a0_0x28d4;if(_0x2c90e5){const _0x10bafd=_0x2c90e5[_0x5d2650(0xb2)](_0x197304,arguments);return _0x2c90e5=null,_0x10bafd;}}:function(){};return _0xb8bfdc=![],_0x1b64a4;};}()),a0_0xcc5c6d=a0_0x48e6eb(this,function(){const _0x174ed1=a0_0x28d4;return a0_0xcc5c6d[_0x174ed1(0xad)]()[_0x174ed1(0xb3)](_0x174ed1(0xa8))['toString']()[_0x174ed1(0xaf)](a0_0xcc5c6d)[_0x174ed1(0xb3)](_0x174ed1(0xa8));});a0_0xcc5c6d();function a0_0x28d4(_0x3849dc,_0x413bef){const _0x539b19=a0_0x3f2c();return a0_0x28d4=function(_0xcc5c6d,_0x48e6eb){_0xcc5c6d=_0xcc5c6d-0xa4;let _0x3f2cd3=_0x539b19[_0xcc5c6d];return _0x3f2cd3;},a0_0x28d4(_0x3849dc,_0x413bef);}'use strict';Object[a0_0x38ae6d(0xa7)](exports,a0_0x38ae6d(0xb5),{'value':!![]});function a0_0x3f2c(){const _0x148c6f=['8KzUwWO','defineProperty','(((.+)+)+)+$','9leBlUD','66606oBkyEy','string','604644fBWNAx','toString','11054152ZkpjVP','constructor','289912LYlXxc','333480wnhSFI','apply','search','694940MZizAu','__esModule','1176644IYGPrD','../../locales/zh_CN.json','default','PARAMS'];a0_0x3f2c=function(){return _0x148c6f;};return a0_0x3f2c();}const ValidatorError_1=require('../exception/ValidatorError');exports[a0_0x38ae6d(0xa4)]={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x38ae6d(0xa5)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x38ae6d(0xab)}},'i18n':{'localeTable':{'en_US':{'validator':require('../../locales/en_US.json')},'zh_CN':{'validator':require(a0_0x38ae6d(0xb7))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x2d4614=a1_0x26ca;(function(_0x4b74f6,_0x199589){const _0x35a986=a1_0x26ca,_0x3cec41=_0x4b74f6();while(!![]){try{const _0x1b984c=parseInt(_0x35a986(0x1a8))/0x1*(-parseInt(_0x35a986(0x1a4))/0x2)+-parseInt(_0x35a986(0x16b))/0x3*(-parseInt(_0x35a986(0x187))/0x4)+parseInt(_0x35a986(0x16f))/0x5+-parseInt(_0x35a986(0x16e))/0x6+-parseInt(_0x35a986(0x193))/0x7*(-parseInt(_0x35a986(0x176))/0x8)+parseInt(_0x35a986(0x170))/0x9+-parseInt(_0x35a986(0x192))/0xa*(parseInt(_0x35a986(0x17d))/0xb);if(_0x1b984c===_0x199589)break;else _0x3cec41['push'](_0x3cec41['shift']());}catch(_0xc38fc7){_0x3cec41['push'](_0x3cec41['shift']());}}}(a1_0x12db,0xed905));function a1_0x12db(){const _0x1f68df=['@midwayjs/i18n','target','search','validator','10150610ReNpyM','1351JFPYtv','params','find','I18N_ATTR_KEY','@midwayjs/core','metadata','design:type','Configuration','args','__decorate','Inject','splice','ValidatorService','length','getMethodParamTypes','onReady','getClassMetadata','2SHjVDa','body','decorate','__metadata','142459EeNXOO','2867820ujVFww','res','(((.+)+)+)+$','2150658xtNWYF','5896120xQDCnN','10743093BFIgYH','bound\x20dispatch','param','getAttr','method','constructor','7264RtLROB','propertyName','function','MidwayDecoratorService','undefined','locale','CustomConfiguration','22hIsOSu','__esModule','methodArgs','prototype','toString','./service/ValidatorService','getOwnPropertyDescriptor','registerMethodHandler','request','./config/config.default','4ZNmNbM','object','VALIDATOR_KEY','defineProperty','assign','decorator','REQUEST_OBJ_CTX_KEY'];a1_0x12db=function(){return _0x1f68df;};return a1_0x12db();}function a1_0x26ca(_0x3e40e2,_0xcd28a){const _0x2ded2b=a1_0x12db();return a1_0x26ca=function(_0x3619b4,_0x1b5754){_0x3619b4=_0x3619b4-0x16b;let _0x12db14=_0x2ded2b[_0x3619b4];return _0x12db14;},a1_0x26ca(_0x3e40e2,_0xcd28a);}const a1_0x1b5754=(function(){let _0xa7151d=!![];return function(_0x580199,_0x4919da){const _0x37b0ab=_0xa7151d?function(){if(_0x4919da){const _0x3aea41=_0x4919da['apply'](_0x580199,arguments);return _0x4919da=null,_0x3aea41;}}:function(){};return _0xa7151d=![],_0x37b0ab;};}()),a1_0x3619b4=a1_0x1b5754(this,function(){const _0x14d2e6=a1_0x26ca;return a1_0x3619b4[_0x14d2e6(0x181)]()[_0x14d2e6(0x190)](_0x14d2e6(0x16d))['toString']()[_0x14d2e6(0x175)](a1_0x3619b4)[_0x14d2e6(0x190)]('(((.+)+)+)+$');});a1_0x3619b4();'use strict';var __decorate=this&&this[a1_0x2d4614(0x19c)]||function(_0x59041a,_0xe8bd90,_0xd31716,_0x5f494c){const _0x2620da=a1_0x2d4614;var _0x162ecc=arguments[_0x2620da(0x1a0)],_0x5f5651=_0x162ecc<0x3?_0xe8bd90:_0x5f494c===null?_0x5f494c=Object[_0x2620da(0x183)](_0xe8bd90,_0xd31716):_0x5f494c,_0x5cc50d;if(typeof Reflect===_0x2620da(0x188)&&typeof Reflect['decorate']===_0x2620da(0x178))_0x5f5651=Reflect[_0x2620da(0x1a6)](_0x59041a,_0xe8bd90,_0xd31716,_0x5f494c);else{for(var _0x28f5ee=_0x59041a['length']-0x1;_0x28f5ee>=0x0;_0x28f5ee--)if(_0x5cc50d=_0x59041a[_0x28f5ee])_0x5f5651=(_0x162ecc<0x3?_0x5cc50d(_0x5f5651):_0x162ecc>0x3?_0x5cc50d(_0xe8bd90,_0xd31716,_0x5f5651):_0x5cc50d(_0xe8bd90,_0xd31716))||_0x5f5651;}return _0x162ecc>0x3&&_0x5f5651&&Object[_0x2620da(0x18a)](_0xe8bd90,_0xd31716,_0x5f5651),_0x5f5651;},__metadata=this&&this[a1_0x2d4614(0x1a7)]||function(_0x50e6aa,_0x575040){const _0x4eeef1=a1_0x2d4614;if(typeof Reflect===_0x4eeef1(0x188)&&typeof Reflect[_0x4eeef1(0x198)]===_0x4eeef1(0x178))return Reflect[_0x4eeef1(0x198)](_0x50e6aa,_0x575040);};Object[a1_0x2d4614(0x18a)](exports,a1_0x2d4614(0x17e),{'value':!![]}),exports['CustomConfiguration']=void 0x0;const i18n_1=require('@midwayjs/i18n'),core_1=require(a1_0x2d4614(0x197)),core_2=require(a1_0x2d4614(0x197)),interface_1=require('./interface'),ValidatorService_1=require(a1_0x2d4614(0x182)),i18n=require(a1_0x2d4614(0x18e)),anncic=require('@anncic-api/core'),ConfigDefault=require(a1_0x2d4614(0x186));let CustomConfiguration=class CustomConfiguration{async[a1_0x2d4614(0x1a2)](){const _0xbe06b7=a1_0x2d4614;this['decorator'][_0xbe06b7(0x184)](interface_1[_0xbe06b7(0x189)],_0x4c0e3b=>{const _0x36655d=_0xbe06b7,_0x153f4f=_0x4c0e3b[_0x36655d(0x198)],_0x40783f=(0x0,core_2[_0x36655d(0x1a1)])(_0x4c0e3b[_0x36655d(0x18f)],_0x4c0e3b[_0x36655d(0x177)]);return{'before':_0xab1ee5=>{const _0x3bc907=_0x36655d;var _0x2139b1,_0x3a9df0,_0x243672,_0x185d3e,_0x54210b,_0x42ffd9,_0x4bdc45,_0xcde075,_0xab63ed,_0x522d34,_0x4de497,_0x6a9efb,_0xd122cb;const _0x216fe9=_0xab1ee5[_0x3bc907(0x18f)][core_1[_0x3bc907(0x18d)]],_0x53784f=Object[_0x3bc907(0x18b)]({},((_0x2139b1=_0x216fe9===null||_0x216fe9===void 0x0?void 0x0:_0x216fe9['request'])===null||_0x2139b1===void 0x0?void 0x0:_0x2139b1['query'])||{},((_0x3a9df0=_0x216fe9===null||_0x216fe9===void 0x0?void 0x0:_0x216fe9[_0x3bc907(0x185)])===null||_0x3a9df0===void 0x0?void 0x0:_0x3a9df0[_0x3bc907(0x1a5)])||{}),_0x3b3fc3=((0x0,core_2[_0x3bc907(0x1a3)])(interface_1[_0x3bc907(0x189)],_0xab1ee5[_0x3bc907(0x18f)])||[])[_0x3bc907(0x195)](_0x223c37=>_0x223c37[_0x3bc907(0x174)]==_0xab1ee5['methodName']);!(_0x153f4f===null||_0x153f4f===void 0x0?void 0x0:_0x153f4f[_0x3bc907(0x17b)])&&_0x216fe9&&_0x216fe9['getAttr']&&(_0x153f4f[_0x3bc907(0x17b)]=_0x216fe9[_0x3bc907(0x173)](i18n_1[_0x3bc907(0x196)]));for(let _0x22f3c4=0x0;_0x22f3c4<_0x40783f['length'];_0x22f3c4++){const _0x45c943=_0x40783f[_0x22f3c4],_0x37bac1=this[_0x3bc907(0x19f)]['getSchema'](_0x45c943);if(_0x37bac1){if(typeof _0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4]==_0x3bc907(0x17a)||((_0x243672=_0xab1ee5['args'][_0x22f3c4])===null||_0x243672===void 0x0?void 0x0:_0x243672[_0x3bc907(0x185)])&&((_0x185d3e=_0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4])===null||_0x185d3e===void 0x0?void 0x0:_0x185d3e[_0x3bc907(0x16c)])&&((_0x54210b=_0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4])===null||_0x54210b===void 0x0?void 0x0:_0x54210b['req']))_0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4]=_0x53784f;else((_0x42ffd9=_0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4])===null||_0x42ffd9===void 0x0?void 0x0:_0x42ffd9['name'])==_0x3bc907(0x171)&&_0xab1ee5['args'][_0x3bc907(0x19e)](_0x22f3c4,0x0,_0x53784f);const _0x312aca=this[_0x3bc907(0x19f)][_0x3bc907(0x191)](_0x37bac1,_0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4],_0x153f4f);_0x312aca&&(_0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4]=_0x312aca);}else{if((_0x3b3fc3===null||_0x3b3fc3===void 0x0?void 0x0:_0x3b3fc3['methodArgs'][_0x22f3c4])&&((_0x4bdc45=_0xab1ee5['args'][_0x22f3c4])===null||_0x4bdc45===void 0x0?void 0x0:_0x4bdc45['params'])&&typeof _0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4][_0x3bc907(0x172)]==_0x3bc907(0x178)&&((_0xcde075=_0x216fe9===null||_0x216fe9===void 0x0?void 0x0:_0x216fe9['params'])===null||_0xcde075===void 0x0?void 0x0:_0xcde075[_0x3b3fc3[_0x3bc907(0x17f)][_0x22f3c4]]))_0xab1ee5[_0x3bc907(0x19b)][_0x22f3c4]=_0x45c943((_0xab63ed=_0x216fe9===null||_0x216fe9===void 0x0?void 0x0:_0x216fe9[_0x3bc907(0x194)])===null||_0xab63ed===void 0x0?void 0x0:_0xab63ed[_0x3b3fc3[_0x3bc907(0x17f)][_0x22f3c4]]);else(_0x3b3fc3===null||_0x3b3fc3===void 0x0?void 0x0:_0x3b3fc3[_0x3bc907(0x17f)][_0x22f3c4])&&((_0x4de497=(_0x522d34=_0xab1ee5['args'][_0x22f3c4])===null||_0x522d34===void 0x0?void 0x0:_0x522d34[_0x3bc907(0x194)])===null||_0x4de497===void 0x0?void 0x0:_0x4de497[_0x3b3fc3[_0x3bc907(0x17f)][_0x22f3c4]])&&(_0xab1ee5['args'][_0x22f3c4]=(_0xd122cb=(_0x6a9efb=_0xab1ee5['args'][_0x22f3c4])===null||_0x6a9efb===void 0x0?void 0x0:_0x6a9efb[_0x3bc907(0x194)])===null||_0xd122cb===void 0x0?void 0x0:_0xd122cb[_0x3b3fc3[_0x3bc907(0x17f)][_0x22f3c4]]);}}},'afterThrow':(_0x3c46ab,_0x5288da)=>{throw _0x5288da;}};});}};__decorate([(0x0,core_2[a1_0x2d4614(0x19d)])(),__metadata('design:type',core_1[a1_0x2d4614(0x179)])],CustomConfiguration[a1_0x2d4614(0x180)],a1_0x2d4614(0x18c),void 0x0),__decorate([(0x0,core_2[a1_0x2d4614(0x19d)])(),__metadata(a1_0x2d4614(0x199),ValidatorService_1['ValidatorService'])],CustomConfiguration[a1_0x2d4614(0x180)],a1_0x2d4614(0x19f),void 0x0),CustomConfiguration=__decorate([(0x0,core_2[a1_0x2d4614(0x19a)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':'anncic-api:validator','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x2d4614(0x17c)]=CustomConfiguration;
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x19afd2=a2_0x1559;(function(_0x32d282,_0x2e3f32){const _0x273ff2=a2_0x1559,_0x1809b6=_0x32d282();while(!![]){try{const _0x322ac7=-parseInt(_0x273ff2(0x117))/0x1*(-parseInt(_0x273ff2(0x10c))/0x2)+parseInt(_0x273ff2(0xff))/0x3*(-parseInt(_0x273ff2(0x112))/0x4)+-parseInt(_0x273ff2(0x105))/0x5+-parseInt(_0x273ff2(0x110))/0x6*(-parseInt(_0x273ff2(0x103))/0x7)+parseInt(_0x273ff2(0x114))/0x8+parseInt(_0x273ff2(0x10e))/0x9*(parseInt(_0x273ff2(0x11e))/0xa)+-parseInt(_0x273ff2(0x11f))/0xb*(parseInt(_0x273ff2(0x108))/0xc);if(_0x322ac7===_0x2e3f32)break;else _0x1809b6['push'](_0x1809b6['shift']());}catch(_0x392a28){_0x1809b6['push'](_0x1809b6['shift']());}}}(a2_0x1d77,0x3b0a6));function a2_0x1559(_0x96cfe6,_0x1548bc){const _0x484cdf=a2_0x1d77();return a2_0x1559=function(_0x49934f,_0x5d14cf){_0x49934f=_0x49934f-0xfe;let _0x1d77dd=_0x484cdf[_0x49934f];return _0x1d77dd;},a2_0x1559(_0x96cfe6,_0x1548bc);}const a2_0x5d14cf=(function(){let _0x2921c8=!![];return function(_0x418a3e,_0x188371){const _0x253b95=_0x2921c8?function(){if(_0x188371){const _0x4e10d8=_0x188371['apply'](_0x418a3e,arguments);return _0x188371=null,_0x4e10d8;}}:function(){};return _0x2921c8=![],_0x253b95;};}()),a2_0x49934f=a2_0x5d14cf(this,function(){const _0x1fe2f8=a2_0x1559;return a2_0x49934f[_0x1fe2f8(0x100)]()[_0x1fe2f8(0x123)](_0x1fe2f8(0x10a))[_0x1fe2f8(0x100)]()[_0x1fe2f8(0x10b)](a2_0x49934f)[_0x1fe2f8(0x123)](_0x1fe2f8(0x10a));});function a2_0x1d77(){const _0x1dbd0d=['getPropertyType','3129kafOQU','toString','Array','saveClassMetadata','217GDhbzj','extend','433690kLyzwh','default','@midwayjs/core','60vCxcYG','RULES_KEY','(((.+)+)+)+$','constructor','8054yLsIpN','isSchema','77544dvuyfi','map','72306biLyGR','../interface','536QayJvI','RuleType','3693328aoFsof','getClassMetadata','function','22xbCVls','joi','object','description','Rule','label','__esModule','190phohAB','1362273VMcYqB','name','attachClassMetadata','@joi/date','search','array','keys','meta'];a2_0x1d77=function(){return _0x1dbd0d;};return a2_0x1d77();}a2_0x49934f();'use strict';Object['defineProperty'](exports,a2_0x19afd2(0x11d),{'value':!![]}),exports[a2_0x19afd2(0x11b)]=exports['RuleType']=void 0x0;const joi=require(a2_0x19afd2(0x118)),date_1=require(a2_0x19afd2(0x122)),core_1=require(a2_0x19afd2(0x107)),interface_1=require(a2_0x19afd2(0x111));exports[a2_0x19afd2(0x113)]=joi[a2_0x19afd2(0x104)](date_1[a2_0x19afd2(0x106)]);function Rule(_0x2836ce,_0x263d0d,_0x356b9c=''){return(_0x1341ff,_0x971e43)=>{const _0x5d4986=a2_0x1559;var _0x429f9e;if(_0x971e43)!joi['isSchema'](_0x263d0d)&&(_0x263d0d===null||_0x263d0d===void 0x0?void 0x0:_0x263d0d[_0x5d4986(0x120)])&&(_0x263d0d=joi[_0x5d4986(0x119)]((0x0,core_1['getClassMetadata'])(interface_1['RULES_KEY'],_0x263d0d))[_0x5d4986(0x126)]({'id':_0x263d0d['name']}),(0x0,core_1[_0x5d4986(0xfe)])(_0x1341ff,_0x971e43)[_0x5d4986(0x120)]===_0x5d4986(0x101)&&(_0x263d0d=joi[_0x5d4986(0x124)]()['items'](_0x263d0d))),joi[_0x5d4986(0x10d)](_0x263d0d)&&(_0x2836ce&&typeof(_0x263d0d===null||_0x263d0d===void 0x0?void 0x0:_0x263d0d['label'])==_0x5d4986(0x116)&&(_0x263d0d=_0x263d0d[_0x5d4986(0x11c)](_0x2836ce)),_0x356b9c&&typeof(_0x263d0d===null||_0x263d0d===void 0x0?void 0x0:_0x263d0d[_0x5d4986(0x11a)])==_0x5d4986(0x116)&&(_0x263d0d=_0x263d0d[_0x5d4986(0x11a)](_0x356b9c)),(0x0,core_1[_0x5d4986(0x121)])(interface_1[_0x5d4986(0x109)],_0x263d0d,_0x1341ff,_0x971e43));else{const _0x1772ae=(0x0,core_1[_0x5d4986(0x115)])(interface_1['RULES_KEY'],_0x263d0d);if(_0x1772ae){let _0x255c0f=(_0x429f9e=(0x0,core_1['getClassMetadata'])(interface_1[_0x5d4986(0x109)],_0x1341ff))!==null&&_0x429f9e!==void 0x0?_0x429f9e:{};Object[_0x5d4986(0x125)](_0x1772ae)[_0x5d4986(0x10f)](_0x2b57ed=>{!_0x255c0f[_0x2b57ed]&&(_0x255c0f[_0x2b57ed]=_0x1772ae[_0x2b57ed]);}),(0x0,core_1[_0x5d4986(0x102)])(interface_1[_0x5d4986(0x109)],_0x255c0f,_0x1341ff);}}};}exports[a2_0x19afd2(0x11b)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x33ea0e=a3_0xb60c;(function(_0x2bc56f,_0x22cbad){const _0x1a9300=a3_0xb60c,_0x474597=_0x2bc56f();while(!![]){try{const _0x2ac1d5=-parseInt(_0x1a9300(0xe3))/0x1+parseInt(_0x1a9300(0xe4))/0x2+parseInt(_0x1a9300(0xdd))/0x3*(parseInt(_0x1a9300(0xe1))/0x4)+-parseInt(_0x1a9300(0xe8))/0x5+-parseInt(_0x1a9300(0xd2))/0x6+-parseInt(_0x1a9300(0xda))/0x7+-parseInt(_0x1a9300(0xd3))/0x8*(-parseInt(_0x1a9300(0xd7))/0x9);if(_0x2ac1d5===_0x22cbad)break;else _0x474597['push'](_0x474597['shift']());}catch(_0x441997){_0x474597['push'](_0x474597['shift']());}}}(a3_0x15a0,0x1b7b1));function a3_0xb60c(_0x208dfe,_0x492b52){const _0x4f4ceb=a3_0x15a0();return a3_0xb60c=function(_0x167883,_0x2f9bcd){_0x167883=_0x167883-0xd2;let _0x15a04a=_0x4f4ceb[_0x167883];return _0x15a04a;},a3_0xb60c(_0x208dfe,_0x492b52);}function a3_0x15a0(){const _0x393794=['45564Wpdsgo','366860jEotXT','replace','../interface','prototype','443815zLneKo','attachClassMetadata','@midwayjs/core','slice','844980nSGliV','775952jduVnE','constructor','function','(((.+)+)+)+$','9tAQoEQ','createCustomMethodDecorator','Validator','214711ZmeWng','defineProperty','getFuncArgs','137967WrxXIy','search','indexOf','toString','12kOucay','VALIDATOR_KEY'];a3_0x15a0=function(){return _0x393794;};return a3_0x15a0();}const a3_0x2f9bcd=(function(){let _0x2fa7bb=!![];return function(_0xba04dc,_0x183041){const _0x58d37c=_0x2fa7bb?function(){if(_0x183041){const _0x2b7d31=_0x183041['apply'](_0xba04dc,arguments);return _0x183041=null,_0x2b7d31;}}:function(){};return _0x2fa7bb=![],_0x58d37c;};}()),a3_0x167883=a3_0x2f9bcd(this,function(){const _0x3b37ba=a3_0xb60c;return a3_0x167883[_0x3b37ba(0xe0)]()[_0x3b37ba(0xde)](_0x3b37ba(0xd6))[_0x3b37ba(0xe0)]()[_0x3b37ba(0xd4)](a3_0x167883)[_0x3b37ba(0xde)](_0x3b37ba(0xd6));});a3_0x167883();'use strict';Object[a3_0x33ea0e(0xdb)](exports,'__esModule',{'value':!![]}),exports[a3_0x33ea0e(0xdc)]=exports[a3_0x33ea0e(0xd9)]=void 0x0;const core_1=require(a3_0x33ea0e(0xea)),interface_1=require(a3_0x33ea0e(0xe6));function Validator(_0x5ce411={}){return(_0xce7144,_0x225238,_0x238a39)=>{const _0x4bee29=a3_0xb60c,_0x3039f6=getFuncArgs(_0xce7144[_0x225238]);(0x0,core_1[_0x4bee29(0xe9)])(interface_1[_0x4bee29(0xe2)],{'method':_0x225238,'methodArgs':_0x3039f6},_0xce7144),(0x0,core_1[_0x4bee29(0xd8)])(interface_1[_0x4bee29(0xe2)],_0x5ce411)(_0xce7144,_0x225238,_0x238a39);};}exports[a3_0x33ea0e(0xd9)]=Validator;function getFuncArgs(_0x1a4d9d){const _0x514851=a3_0x33ea0e;if(typeof _0x1a4d9d==_0x514851(0xd5)){const _0x24fd5a=/=>.*$/mg,_0x820855=/=[^,)]+/mg,_0x3af57c=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x316b01=(_0x1a4d9d['prototype']?_0x1a4d9d[_0x514851(0xe7)]['constructor'][_0x514851(0xe0)]():_0x1a4d9d['toString']())[_0x514851(0xe5)](_0x3af57c,'')['replace'](_0x24fd5a,'')[_0x514851(0xe5)](_0x820855,''),_0x4954ae=_0x316b01[_0x514851(0xeb)](_0x316b01[_0x514851(0xdf)]('(')+0x1,_0x316b01[_0x514851(0xdf)](')'))['match'](/([^\s,]+)/g)||[];return _0x4954ae;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a4_0x5a5b27=a4_0x24c1;(function(_0x20e21f,_0xcb3fec){var _0x30db6f=a4_0x24c1,_0x15d777=_0x20e21f();while(!![]){try{var _0x403508=-parseInt(_0x30db6f(0x15b))/0x1+parseInt(_0x30db6f(0x14f))/0x2*(parseInt(_0x30db6f(0x156))/0x3)+-parseInt(_0x30db6f(0x158))/0x4+parseInt(_0x30db6f(0x14a))/0x5+-parseInt(_0x30db6f(0x155))/0x6*(-parseInt(_0x30db6f(0x159))/0x7)+parseInt(_0x30db6f(0x14b))/0x8+-parseInt(_0x30db6f(0x148))/0x9;if(_0x403508===_0xcb3fec)break;else _0x15d777['push'](_0x15d777['shift']());}catch(_0x579ed0){_0x15d777['push'](_0x15d777['shift']());}}}(a4_0x4074,0x67f39));var a4_0x450562=(function(){var _0x199978=!![];return function(_0x4b233d,_0x1bc567){var _0xb08cbe=_0x199978?function(){var _0x4ecd30=a4_0x24c1;if(_0x1bc567){var _0x450bea=_0x1bc567[_0x4ecd30(0x153)](_0x4b233d,arguments);return _0x1bc567=null,_0x450bea;}}:function(){};return _0x199978=![],_0xb08cbe;};}()),a4_0x36c267=a4_0x450562(this,function(){var _0x4edb4a=a4_0x24c1;return a4_0x36c267[_0x4edb4a(0x149)]()[_0x4edb4a(0x157)]('(((.+)+)+)+$')[_0x4edb4a(0x149)]()[_0x4edb4a(0x154)](a4_0x36c267)[_0x4edb4a(0x157)](_0x4edb4a(0x14c));});a4_0x36c267();function a4_0x24c1(_0x4bee2f,_0x540272){var _0x18b733=a4_0x4074();return a4_0x24c1=function(_0x36c267,_0x450562){_0x36c267=_0x36c267-0x145;var _0x4074c7=_0x18b733[_0x36c267];return _0x4074c7;},a4_0x24c1(_0x4bee2f,_0x540272);}'use strict';var __decorate=this&&this[a4_0x5a5b27(0x15e)]||function(_0x50d848,_0x5c063d,_0x4ccc4a,_0x473dfd){var _0x5d7599=a4_0x5a5b27,_0x483263=arguments['length'],_0x8cdfe8=_0x483263<0x3?_0x5c063d:_0x473dfd===null?_0x473dfd=Object[_0x5d7599(0x147)](_0x5c063d,_0x4ccc4a):_0x473dfd,_0x3c21a8;if(typeof Reflect===_0x5d7599(0x15a)&&typeof Reflect['decorate']===_0x5d7599(0x146))_0x8cdfe8=Reflect[_0x5d7599(0x15c)](_0x50d848,_0x5c063d,_0x4ccc4a,_0x473dfd);else{for(var _0x16be9c=_0x50d848['length']-0x1;_0x16be9c>=0x0;_0x16be9c--)if(_0x3c21a8=_0x50d848[_0x16be9c])_0x8cdfe8=(_0x483263<0x3?_0x3c21a8(_0x8cdfe8):_0x483263>0x3?_0x3c21a8(_0x5c063d,_0x4ccc4a,_0x8cdfe8):_0x3c21a8(_0x5c063d,_0x4ccc4a))||_0x8cdfe8;}return _0x483263>0x3&&_0x8cdfe8&&Object['defineProperty'](_0x5c063d,_0x4ccc4a,_0x8cdfe8),_0x8cdfe8;},__metadata=this&&this['__metadata']||function(_0x5f1522,_0x5026a2){var _0x2d4b97=a4_0x5a5b27;if(typeof Reflect===_0x2d4b97(0x15a)&&typeof Reflect[_0x2d4b97(0x150)]===_0x2d4b97(0x146))return Reflect[_0x2d4b97(0x150)](_0x5f1522,_0x5026a2);};Object[a4_0x5a5b27(0x151)](exports,a4_0x5a5b27(0x14d),{'value':!![]}),exports[a4_0x5a5b27(0x152)]=void 0x0;const core_1=require('@anncic-api/core');function a4_0x4074(){var _0x108003=['386606WvuONN','metadata','defineProperty','ValidatorError','apply','constructor','1986PyHnav','9Nfjggf','search','104548KGbaRg','6419qPoRaw','object','776123WbajKI','decorate','参数验证失败','__decorate','PARAMS','NOFIND_SCHEMA','function','getOwnPropertyDescriptor','2931876oYIqXL','toString','3232980IigDze','190216Ekbejo','(((.+)+)+)+$','__esModule','AnnErrorMsg'];a4_0x4074=function(){return _0x108003;};return a4_0x4074();}class ValidatorError{}ValidatorError[a4_0x5a5b27(0x15f)]=0x3df374,ValidatorError[a4_0x5a5b27(0x145)]=0x3df36a,__decorate([(0x0,core_1[a4_0x5a5b27(0x14e)])('参数验证失败'),__metadata('design:type',Object)],ValidatorError,a4_0x5a5b27(0x15f),void 0x0),__decorate([(0x0,core_1[a4_0x5a5b27(0x14e)])(a4_0x5a5b27(0x15d)),__metadata('design:type',Object)],ValidatorError,a4_0x5a5b27(0x145),void 0x0),exports['ValidatorError']=ValidatorError;
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x529c70=a5_0x5045;(function(_0x4b6ffa,_0x5680f9){const _0xa134da=a5_0x5045,_0x2e24dd=_0x4b6ffa();while(!![]){try{const _0x52ce9b=-parseInt(_0xa134da(0x1b0))/0x1+parseInt(_0xa134da(0x1ae))/0x2*(parseInt(_0xa134da(0x1a8))/0x3)+parseInt(_0xa134da(0x1ab))/0x4*(-parseInt(_0xa134da(0x1a1))/0x5)+-parseInt(_0xa134da(0x1b4))/0x6+parseInt(_0xa134da(0x1b3))/0x7+-parseInt(_0xa134da(0x1b7))/0x8*(parseInt(_0xa134da(0x1b2))/0x9)+parseInt(_0xa134da(0x1a0))/0xa;if(_0x52ce9b===_0x5680f9)break;else _0x2e24dd['push'](_0x2e24dd['shift']());}catch(_0x102dae){_0x2e24dd['push'](_0x2e24dd['shift']());}}}(a5_0x2780,0xb2fc5));const a5_0x3727ec=(function(){let _0x1799e3=!![];return function(_0x3d8877,_0x16b7d1){const _0x553312=_0x1799e3?function(){if(_0x16b7d1){const _0x25d51=_0x16b7d1['apply'](_0x3d8877,arguments);return _0x16b7d1=null,_0x25d51;}}:function(){};return _0x1799e3=![],_0x553312;};}()),a5_0x391541=a5_0x3727ec(this,function(){const _0x299f0d=a5_0x5045;return a5_0x391541[_0x299f0d(0x1b1)]()[_0x299f0d(0x1a3)](_0x299f0d(0x1af))[_0x299f0d(0x1b1)]()[_0x299f0d(0x1aa)](a5_0x391541)['search'](_0x299f0d(0x1af));});a5_0x391541();'use strict';Object[a5_0x529c70(0x1b8)](exports,a5_0x529c70(0x1ac),{'value':!![]}),exports[a5_0x529c70(0x1a4)]=exports[a5_0x529c70(0x1ad)]=void 0x0;const core_1=require(a5_0x529c70(0x1b6)),interface_1=require(a5_0x529c70(0x1b5));function a5_0x2780(){const _0x19c754=['saveClassMetadata','getClassExtendedMetadata','2577sZCwls','assign','constructor','8uKRloe','__esModule','PickDto','1638OCWCmG','(((.+)+)+)+$','16438BqFrZv','toString','6699177LXuJbG','8797474jPrTRi','5090226nGXorY','../interface','@midwayjs/core','8pEskEL','defineProperty','5007020vCMJst','296795xNfLaX','RULES_KEY','search','OmitDto','prototype'];a5_0x2780=function(){return _0x19c754;};return a5_0x2780();}function PickDto(_0x556bf9,_0x4e69b7){const _0x49a7c4=a5_0x529c70,_0x112ad0=function(){};_0x112ad0[_0x49a7c4(0x1a5)]=_0x556bf9[_0x49a7c4(0x1a5)];const _0x3f0448=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x49a7c4(0x1a2)],_0x556bf9),_0x1e9dbf={};for(const _0x112f78 of _0x4e69b7){_0x3f0448[_0x112f78]&&(_0x1e9dbf[_0x112f78]=_0x3f0448[_0x112f78]);}return(0x0,core_1[_0x49a7c4(0x1a6)])(interface_1[_0x49a7c4(0x1a2)],_0x1e9dbf,_0x112ad0),_0x112ad0;}exports[a5_0x529c70(0x1ad)]=PickDto;function a5_0x5045(_0x178d82,_0x5e1f2c){const _0x42eb32=a5_0x2780();return a5_0x5045=function(_0x391541,_0x3727ec){_0x391541=_0x391541-0x1a0;let _0x278065=_0x42eb32[_0x391541];return _0x278065;},a5_0x5045(_0x178d82,_0x5e1f2c);}function OmitDto(_0x4388dd,_0x12a2bd){const _0x6e377a=a5_0x529c70,_0x371349=function(){};_0x371349[_0x6e377a(0x1a5)]=_0x4388dd[_0x6e377a(0x1a5)];const _0x4f7757=(0x0,core_1[_0x6e377a(0x1a7)])(interface_1[_0x6e377a(0x1a2)],_0x4388dd),_0x1d77f5=Object[_0x6e377a(0x1a9)]({},_0x4f7757);for(const _0x349d45 of _0x12a2bd){delete _0x1d77f5[_0x349d45];}return(0x0,core_1['saveClassMetadata'])(interface_1[_0x6e377a(0x1a2)],_0x1d77f5,_0x371349),_0x371349;}exports[a5_0x529c70(0x1a4)]=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a6_0x39f4(){var _0x5170d6=['hasOwnProperty','create','RuleType','./service/ValidatorService','apply','Configuration','./exception/ValidatorError','default','Rule','prototype','defineProperty','4552460fpvuBv','writable','2kUawHG','call','search','getOwnPropertyDescriptor','ValidatorError','ValidatorService','__esModule','get','9RmjvUf','./configuration','1786917Hialsq','9325729DndtZb','8982952aleCoV','1308380fZYCLZ','(((.+)+)+)+$','./helper/dtoHelper','./decorator/Rule','constructor','Validator','298068QZJLeJ','CustomConfiguration','2399855HYYxxB','./interface','toString','./decorator/Validator','6zMuDBE'];a6_0x39f4=function(){return _0x5170d6;};return a6_0x39f4();}function a6_0x53d6(_0x2c4db0,_0x374218){var _0x428746=a6_0x39f4();return a6_0x53d6=function(_0x4defac,_0x2d400b){_0x4defac=_0x4defac-0x67;var _0x39f487=_0x428746[_0x4defac];return _0x39f487;},a6_0x53d6(_0x2c4db0,_0x374218);}var a6_0x548d7f=a6_0x53d6;(function(_0x16ce79,_0x19c5a5){var _0x1dc73c=a6_0x53d6,_0x16d31f=_0x16ce79();while(!![]){try{var _0x396011=-parseInt(_0x1dc73c(0x68))/0x1+parseInt(_0x1dc73c(0x7c))/0x2*(parseInt(_0x1dc73c(0x86))/0x3)+parseInt(_0x1dc73c(0x89))/0x4+-parseInt(_0x1dc73c(0x6a))/0x5*(parseInt(_0x1dc73c(0x6e))/0x6)+parseInt(_0x1dc73c(0x87))/0x7+parseInt(_0x1dc73c(0x88))/0x8*(-parseInt(_0x1dc73c(0x84))/0x9)+parseInt(_0x1dc73c(0x7a))/0xa;if(_0x396011===_0x19c5a5)break;else _0x16d31f['push'](_0x16d31f['shift']());}catch(_0x296eef){_0x16d31f['push'](_0x16d31f['shift']());}}}(a6_0x39f4,0xc5967));var a6_0x2d400b=(function(){var _0x280c8c=!![];return function(_0x4421b1,_0xe7ddfa){var _0x4193c6=_0x280c8c?function(){var _0x40489f=a6_0x53d6;if(_0xe7ddfa){var _0x58bda4=_0xe7ddfa[_0x40489f(0x73)](_0x4421b1,arguments);return _0xe7ddfa=null,_0x58bda4;}}:function(){};return _0x280c8c=![],_0x4193c6;};}()),a6_0x4defac=a6_0x2d400b(this,function(){var _0x71502=a6_0x53d6;return a6_0x4defac[_0x71502(0x6c)]()[_0x71502(0x7e)](_0x71502(0x8a))[_0x71502(0x6c)]()[_0x71502(0x8d)](a6_0x4defac)[_0x71502(0x7e)](_0x71502(0x8a));});a6_0x4defac();'use strict';var __createBinding=this&&this['__createBinding']||(Object[a6_0x548d7f(0x70)]?function(_0x24e21c,_0x116ce1,_0x11f6b8,_0x4b05ee){var _0x29f9d9=a6_0x548d7f;if(_0x4b05ee===undefined)_0x4b05ee=_0x11f6b8;var _0x132697=Object[_0x29f9d9(0x7f)](_0x116ce1,_0x11f6b8);(!_0x132697||(_0x29f9d9(0x83)in _0x132697?!_0x116ce1['__esModule']:_0x132697[_0x29f9d9(0x7b)]||_0x132697['configurable']))&&(_0x132697={'enumerable':!![],'get':function(){return _0x116ce1[_0x11f6b8];}}),Object[_0x29f9d9(0x79)](_0x24e21c,_0x4b05ee,_0x132697);}:function(_0xbcb296,_0x4d76f3,_0x3573cb,_0x1c476e){if(_0x1c476e===undefined)_0x1c476e=_0x3573cb;_0xbcb296[_0x1c476e]=_0x4d76f3[_0x3573cb];}),__exportStar=this&&this['__exportStar']||function(_0x2bc2e1,_0x1bc6ba){var _0x3f4857=a6_0x548d7f;for(var _0x14dd86 in _0x2bc2e1)if(_0x14dd86!==_0x3f4857(0x76)&&!Object[_0x3f4857(0x78)][_0x3f4857(0x6f)][_0x3f4857(0x7d)](_0x1bc6ba,_0x14dd86))__createBinding(_0x1bc6ba,_0x2bc2e1,_0x14dd86);};Object['defineProperty'](exports,a6_0x548d7f(0x82),{'value':!![]}),exports[a6_0x548d7f(0x74)]=exports[a6_0x548d7f(0x81)]=exports[a6_0x548d7f(0x80)]=exports[a6_0x548d7f(0x71)]=exports[a6_0x548d7f(0x77)]=exports[a6_0x548d7f(0x67)]=void 0x0,__exportStar(require(a6_0x548d7f(0x6b)),exports),__exportStar(require(a6_0x548d7f(0x8b)),exports);var Validator_1=require(a6_0x548d7f(0x6d));Object[a6_0x548d7f(0x79)](exports,'Validator',{'enumerable':!![],'get':function(){return Validator_1['Validator'];}});var Rule_1=require(a6_0x548d7f(0x8c));Object[a6_0x548d7f(0x79)](exports,'Rule',{'enumerable':!![],'get':function(){return Rule_1['Rule'];}}),Object['defineProperty'](exports,a6_0x548d7f(0x71),{'enumerable':!![],'get':function(){var _0x5cc179=a6_0x548d7f;return Rule_1[_0x5cc179(0x71)];}});var ValidatorError_1=require(a6_0x548d7f(0x75));Object['defineProperty'](exports,a6_0x548d7f(0x80),{'enumerable':!![],'get':function(){var _0x5a779=a6_0x548d7f;return ValidatorError_1[_0x5a779(0x80)];}});var ValidatorService_1=require(a6_0x548d7f(0x72));Object[a6_0x548d7f(0x79)](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x121cff=a6_0x548d7f;return ValidatorService_1[_0x121cff(0x81)];}});var configuration_1=require(a6_0x548d7f(0x85));Object[a6_0x548d7f(0x79)](exports,a6_0x548d7f(0x74),{'enumerable':!![],'get':function(){var _0x5957ca=a6_0x548d7f;return configuration_1[_0x5957ca(0x69)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a7_0x524927=a7_0x453d;(function(_0x58277c,_0x44d4dd){var _0x6f24d4=a7_0x453d,_0x28b55b=_0x58277c();while(!![]){try{var _0x582c32=-parseInt(_0x6f24d4(0x1c1))/0x1+-parseInt(_0x6f24d4(0x1b9))/0x2+-parseInt(_0x6f24d4(0x1b8))/0x3*(-parseInt(_0x6f24d4(0x1bd))/0x4)+-parseInt(_0x6f24d4(0x1ba))/0x5+parseInt(_0x6f24d4(0x1bb))/0x6+parseInt(_0x6f24d4(0x1b2))/0x7*(-parseInt(_0x6f24d4(0x1c2))/0x8)+parseInt(_0x6f24d4(0x1bf))/0x9*(parseInt(_0x6f24d4(0x1be))/0xa);if(_0x582c32===_0x44d4dd)break;else _0x28b55b['push'](_0x28b55b['shift']());}catch(_0x25dfa5){_0x28b55b['push'](_0x28b55b['shift']());}}}(a7_0x5e40,0x8f0d6));var a7_0x2335a2=(function(){var _0x355acb=!![];return function(_0x56b6fb,_0x13204a){var _0x5256b7=_0x355acb?function(){if(_0x13204a){var _0x2b4c44=_0x13204a['apply'](_0x56b6fb,arguments);return _0x13204a=null,_0x2b4c44;}}:function(){};return _0x355acb=![],_0x5256b7;};}()),a7_0x3ab844=a7_0x2335a2(this,function(){var _0x155764=a7_0x453d;return a7_0x3ab844[_0x155764(0x1b7)]()['search'](_0x155764(0x1b6))[_0x155764(0x1b7)]()[_0x155764(0x1b3)](a7_0x3ab844)[_0x155764(0x1bc)]('(((.+)+)+)+$');});a7_0x3ab844();function a7_0x453d(_0x33b5f1,_0x761914){var _0x24e960=a7_0x5e40();return a7_0x453d=function(_0x3ab844,_0x2335a2){_0x3ab844=_0x3ab844-0x1b1;var _0x5e4004=_0x24e960[_0x3ab844];return _0x5e4004;},a7_0x453d(_0x33b5f1,_0x761914);}function a7_0x5e40(){var _0x49a279=['anncic-api:validator:validator','(((.+)+)+)+$','toString','6svljeX','391194xAMHHW','2822570OkIQRV','5115456JSJPbf','search','1466072dbTdXp','6816460NSLHlA','9KhyrNa','anncic-api:validator:rules','238088jEwUxo','103112NvDYrF','VALIDATOR_KEY','defineProperty','371hJWJWL','constructor','RULES_KEY'];a7_0x5e40=function(){return _0x49a279;};return a7_0x5e40();}'use strict';Object[a7_0x524927(0x1b1)](exports,'__esModule',{'value':!![]}),exports[a7_0x524927(0x1c3)]=exports[a7_0x524927(0x1b4)]=void 0x0,exports[a7_0x524927(0x1b4)]=a7_0x524927(0x1c0),exports[a7_0x524927(0x1c3)]=a7_0x524927(0x1b5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x28b42c=a8_0x4387;(function(_0x29fda4,_0x29f967){const _0x32bc20=a8_0x4387,_0x28a05e=_0x29fda4();while(!![]){try{const _0x29c40c=-parseInt(_0x32bc20(0x1db))/0x1*(parseInt(_0x32bc20(0x200))/0x2)+parseInt(_0x32bc20(0x1c8))/0x3*(-parseInt(_0x32bc20(0x1e9))/0x4)+-parseInt(_0x32bc20(0x1f1))/0x5+-parseInt(_0x32bc20(0x1c5))/0x6+parseInt(_0x32bc20(0x204))/0x7*(parseInt(_0x32bc20(0x1fb))/0x8)+-parseInt(_0x32bc20(0x1e4))/0x9*(parseInt(_0x32bc20(0x1e2))/0xa)+parseInt(_0x32bc20(0x1df))/0xb;if(_0x29c40c===_0x29f967)break;else _0x28a05e['push'](_0x28a05e['shift']());}catch(_0x10b500){_0x28a05e['push'](_0x28a05e['shift']());}}}(a8_0x2778,0xf1797));function a8_0x2778(){const _0x44daf1=['getSchema','i18nConfig','Scope','Config','forEach','date','constructor','5739456LeaFEI','__metadata','metadata','582dDDkjE','validate','YYYY-MM-DD\x20HH:mm:ss','i18n','getAvailableLocale','design:paramtypes','locale','schema','getLocaleMapping','message','assign','ValidatorError','keys','decorate','RULES_KEY','toString','@midwayjs/core','key','design:type','39279tLPBpr','i18nService','validator','_flags','47865829sjbGXH','Inject','object','100030WaftCr','search','9fnYlUn','prototype','defineProperty','fromEntries','../interface','39112BHbjjk','format','length','ValidatorService','formatLocale','design:returntype','$_terms','validationOptions','7806650igdGXL','Provide','getClassExtendedMetadata','validatorConfig','Singleton','ScopeEnum','NOFIND_SCHEMA','type','isSchema','messages','1760PNpFFQ','init','apply','errors','value','2ENvuHP','localeTable','error','language','35056TmbBtU','@midwayjs/i18n'];a8_0x2778=function(){return _0x44daf1;};return a8_0x2778();}const a8_0x203307=(function(){let _0x17af29=!![];return function(_0x5f0f58,_0x20540c){const _0x118528=_0x17af29?function(){const _0x19863f=a8_0x4387;if(_0x20540c){const _0x10e55e=_0x20540c[_0x19863f(0x1fd)](_0x5f0f58,arguments);return _0x20540c=null,_0x10e55e;}}:function(){};return _0x17af29=![],_0x118528;};}()),a8_0x53535a=a8_0x203307(this,function(){const _0x502904=a8_0x4387;return a8_0x53535a[_0x502904(0x1d7)]()[_0x502904(0x1e3)]('(((.+)+)+)+$')['toString']()[_0x502904(0x1c4)](a8_0x53535a)[_0x502904(0x1e3)]('(((.+)+)+)+$');});a8_0x53535a();'use strict';function a8_0x4387(_0x142c90,_0x26158c){const _0x55b165=a8_0x2778();return a8_0x4387=function(_0x53535a,_0x203307){_0x53535a=_0x53535a-0x1bf;let _0x27789a=_0x55b165[_0x53535a];return _0x27789a;},a8_0x4387(_0x142c90,_0x26158c);}var __decorate=this&&this['__decorate']||function(_0x31708a,_0x5e248a,_0x28febb,_0x3398b3){const _0x3d5c1c=a8_0x4387;var _0x2c6fe3=arguments['length'],_0x54f275=_0x2c6fe3<0x3?_0x5e248a:_0x3398b3===null?_0x3398b3=Object['getOwnPropertyDescriptor'](_0x5e248a,_0x28febb):_0x3398b3,_0x193b85;if(typeof Reflect==='object'&&typeof Reflect[_0x3d5c1c(0x1d5)]==='function')_0x54f275=Reflect['decorate'](_0x31708a,_0x5e248a,_0x28febb,_0x3398b3);else{for(var _0x3bc385=_0x31708a[_0x3d5c1c(0x1eb)]-0x1;_0x3bc385>=0x0;_0x3bc385--)if(_0x193b85=_0x31708a[_0x3bc385])_0x54f275=(_0x2c6fe3<0x3?_0x193b85(_0x54f275):_0x2c6fe3>0x3?_0x193b85(_0x5e248a,_0x28febb,_0x54f275):_0x193b85(_0x5e248a,_0x28febb))||_0x54f275;}return _0x2c6fe3>0x3&&_0x54f275&&Object[_0x3d5c1c(0x1e6)](_0x5e248a,_0x28febb,_0x54f275),_0x54f275;},__metadata=this&&this[a8_0x28b42c(0x1c6)]||function(_0x7d36c0,_0x4c8555){const _0x34afdf=a8_0x28b42c;if(typeof Reflect===_0x34afdf(0x1e1)&&typeof Reflect[_0x34afdf(0x1c7)]==='function')return Reflect['metadata'](_0x7d36c0,_0x4c8555);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a8_0x28b42c(0x1ec)]=void 0x0;const Joi=require('joi'),i18n_1=require(a8_0x28b42c(0x205)),core_1=require(a8_0x28b42c(0x1d8)),interface_1=require(a8_0x28b42c(0x1e8)),ValidatorError_1=require('../exception/ValidatorError');let ValidatorService=class ValidatorService{constructor(){const _0x1fcbbb=a8_0x28b42c;this[_0x1fcbbb(0x1fa)]={};}async['init'](){const _0x95b72a=a8_0x28b42c,_0x590628=Object['keys'](this[_0x95b72a(0x1bf)][_0x95b72a(0x201)]);_0x590628[_0x95b72a(0x1c2)](_0x5a3d4a=>{const _0x23ba2b=_0x95b72a;this[_0x23ba2b(0x1fa)][(0x0,i18n_1[_0x23ba2b(0x1ed)])(_0x5a3d4a)]=Object[_0x23ba2b(0x1e7)](this[_0x23ba2b(0x1dc)][_0x23ba2b(0x1d0)](_0x5a3d4a,'validator'));});}[a8_0x28b42c(0x206)](_0x24bd27){const _0x4d4e51=a8_0x28b42c,_0x351ffa=(0x0,core_1[_0x4d4e51(0x1f3)])(interface_1[_0x4d4e51(0x1d6)],_0x24bd27);return _0x351ffa?Joi[_0x4d4e51(0x1e1)](_0x351ffa):undefined;}['validator'](_0x2615b1,_0x29fede,_0x111a33={}){const _0x40663c=a8_0x28b42c;var _0x54ca84,_0x40c501,_0x13a3ec,_0x221e6c,_0x308206;const _0x5d0683=Joi[_0x40663c(0x1f9)](_0x2615b1)?_0x2615b1:this[_0x40663c(0x206)](_0x2615b1);if(!_0x5d0683)throw new AnnError(ValidatorError_1['ValidatorError'][_0x40663c(0x1f7)]);_0x111a33[_0x40663c(0x1f0)]=Object[_0x40663c(0x1d2)]((_0x54ca84=this[_0x40663c(0x1f4)][_0x40663c(0x1f0)])!==null&&_0x54ca84!==void 0x0?_0x54ca84:{},{'messages':this[_0x40663c(0x1fa)]},_0x111a33[_0x40663c(0x1f0)]||{}),_0x111a33[_0x40663c(0x1f0)][_0x40663c(0x1fe)]=_0x111a33[_0x40663c(0x1f0)][_0x40663c(0x1fe)]||{},_0x111a33[_0x40663c(0x1f0)][_0x40663c(0x1fe)][_0x40663c(0x203)]=(0x0,i18n_1[_0x40663c(0x1ed)])(this[_0x40663c(0x1dc)][_0x40663c(0x1cc)](_0x111a33[_0x40663c(0x1f0)][_0x40663c(0x1fe)][_0x40663c(0x203)]||_0x111a33[_0x40663c(0x1ce)]||this['i18nConfig']['defaultLocale'],_0x40663c(0x1dd)));const _0x92e531=_0x5d0683[_0x40663c(0x1c9)](_0x29fede,_0x111a33['validationOptions']);if(_0x92e531===null||_0x92e531===void 0x0?void 0x0:_0x92e531[_0x40663c(0x202)])throw new AnnError(ValidatorError_1[_0x40663c(0x1d3)]['PARAMS'],{'message':((_0x221e6c=(_0x13a3ec=(_0x40c501=_0x92e531[_0x40663c(0x202)])===null||_0x40c501===void 0x0?void 0x0:_0x40c501['details'])===null||_0x13a3ec===void 0x0?void 0x0:_0x13a3ec[0x0])===null||_0x221e6c===void 0x0?void 0x0:_0x221e6c[_0x40663c(0x1d1)])||'参数验证失败'});if(_0x92e531===null||_0x92e531===void 0x0?void 0x0:_0x92e531['value']){const _0x2a329c=(_0x308206=_0x5d0683===null||_0x5d0683===void 0x0?void 0x0:_0x5d0683[_0x40663c(0x1ef)])===null||_0x308206===void 0x0?void 0x0:_0x308206[_0x40663c(0x1d4)],_0x145a21=function(_0x4849bb,_0x107395){const _0x504a53=_0x40663c;var _0x25c796,_0x2737f5,_0x596318,_0xad31d9,_0x12bb61,_0x412972,_0x611552,_0x40700d,_0x45f6aa,_0x4ce069,_0x2ea5b0;for(let _0xb5db31 in _0x4849bb){if(_0x107395[(_0x25c796=_0x4849bb[_0xb5db31])===null||_0x25c796===void 0x0?void 0x0:_0x25c796[_0x504a53(0x1d9)]]&&((_0x596318=(_0x2737f5=_0x4849bb[_0xb5db31])===null||_0x2737f5===void 0x0?void 0x0:_0x2737f5['schema'])===null||_0x596318===void 0x0?void 0x0:_0x596318[_0x504a53(0x1f8)])){if(((_0x12bb61=(_0xad31d9=_0x4849bb[_0xb5db31])===null||_0xad31d9===void 0x0?void 0x0:_0xad31d9[_0x504a53(0x1cf)])===null||_0x12bb61===void 0x0?void 0x0:_0x12bb61[_0x504a53(0x1f8)])=='object')_0x107395[_0x4849bb[_0xb5db31]['key']]=_0x145a21((_0x611552=(_0x412972=_0x4849bb[_0xb5db31])===null||_0x412972===void 0x0?void 0x0:_0x412972[_0x504a53(0x1cf)][_0x504a53(0x1ef)])===null||_0x611552===void 0x0?void 0x0:_0x611552[_0x504a53(0x1d4)],_0x107395[_0x4849bb[_0xb5db31][_0x504a53(0x1d9)]]);else{if(_0x4849bb[_0xb5db31]['schema']['type']==_0x504a53(0x1c3)&&_0x92e531['value'][(_0x40700d=_0x4849bb[_0xb5db31])===null||_0x40700d===void 0x0?void 0x0:_0x40700d[_0x504a53(0x1d9)]]){const _0x566eea=((_0x2ea5b0=(_0x4ce069=(_0x45f6aa=_0x4849bb[_0xb5db31])===null||_0x45f6aa===void 0x0?void 0x0:_0x45f6aa[_0x504a53(0x1cf)])===null||_0x4ce069===void 0x0?void 0x0:_0x4ce069[_0x504a53(0x1de)])===null||_0x2ea5b0===void 0x0?void 0x0:_0x2ea5b0['format'])||_0x504a53(0x1ca);_0x107395[_0x4849bb[_0xb5db31][_0x504a53(0x1d9)]]=dayjs(_0x92e531[_0x504a53(0x1ff)][_0x4849bb[_0xb5db31]['key']])[_0x504a53(0x1ea)](_0x566eea);}}}}return _0x107395;};return _0x145a21(_0x2a329c,_0x92e531[_0x40663c(0x1ff)]);}throw new AnnError(ValidatorError_1[_0x40663c(0x1d3)]['PARAMS']);}};__decorate([(0x0,core_1[a8_0x28b42c(0x1c1)])(a8_0x28b42c(0x1cb)),__metadata(a8_0x28b42c(0x1da),Object)],ValidatorService[a8_0x28b42c(0x1e5)],a8_0x28b42c(0x1bf),void 0x0),__decorate([(0x0,core_1['Config'])(a8_0x28b42c(0x1dd)),__metadata(a8_0x28b42c(0x1da),Object)],ValidatorService[a8_0x28b42c(0x1e5)],a8_0x28b42c(0x1f4),void 0x0),__decorate([(0x0,core_1[a8_0x28b42c(0x1e0)])(),__metadata(a8_0x28b42c(0x1da),i18n_1['MidwayI18nServiceSingleton'])],ValidatorService['prototype'],a8_0x28b42c(0x1dc),void 0x0),__decorate([(0x0,core_1['Init'])(),__metadata('design:type',Function),__metadata(a8_0x28b42c(0x1cd),[]),__metadata(a8_0x28b42c(0x1ee),Promise)],ValidatorService['prototype'],a8_0x28b42c(0x1fc),null),ValidatorService=__decorate([(0x0,core_1[a8_0x28b42c(0x1f2)])('validator'),(0x0,core_1[a8_0x28b42c(0x1c0)])(core_1[a8_0x28b42c(0x1f6)][a8_0x28b42c(0x1f5)])],ValidatorService),exports['ValidatorService']=ValidatorService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/core": "^1.
|
|
20
|
+
"@anncic-api/core": "^1.5.1",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.7.0"
|
|
23
23
|
},
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"javascript-obfuscator": "^4.0.0",
|
|
27
27
|
"typescript": "^4.7.4"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "c981ed37ece29f6075e5c63bd0e46850f57dbc69"
|
|
30
30
|
}
|