@anveroapi/cache 4.0.1 → 4.1.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.
@@ -1 +1 @@
1
- const a0_0x5d2b49=a0_0x257b;(function(_0x7eeadd,_0x942bc3){const _0x259268=a0_0x257b,_0x1f519d=_0x7eeadd();while(!![]){try{const _0x2dd090=parseInt(_0x259268(0x127))/0x1+parseInt(_0x259268(0x11e))/0x2*(parseInt(_0x259268(0x121))/0x3)+parseInt(_0x259268(0x12e))/0x4*(-parseInt(_0x259268(0x12f))/0x5)+-parseInt(_0x259268(0x122))/0x6*(-parseInt(_0x259268(0x11c))/0x7)+-parseInt(_0x259268(0x11a))/0x8+-parseInt(_0x259268(0x12d))/0x9*(parseInt(_0x259268(0x11f))/0xa)+parseInt(_0x259268(0x11d))/0xb;if(_0x2dd090===_0x942bc3)break;else _0x1f519d['push'](_0x1f519d['shift']());}catch(_0x51afbe){_0x1f519d['push'](_0x1f519d['shift']());}}}(a0_0x5ef8,0xe403b));const a0_0x267626=(function(){let _0x4b90e5=!![];return function(_0x1b6c6d,_0x71f45e){const _0x24bfad=_0x4b90e5?function(){const _0x3a9c80=a0_0x257b;if(_0x71f45e){const _0x109032=_0x71f45e[_0x3a9c80(0x119)](_0x1b6c6d,arguments);return _0x71f45e=null,_0x109032;}}:function(){};return _0x4b90e5=![],_0x24bfad;};}()),a0_0x6f008c=a0_0x267626(this,function(){const _0x5ca525=a0_0x257b;return a0_0x6f008c[_0x5ca525(0x12b)]()[_0x5ca525(0x124)](_0x5ca525(0x123))[_0x5ca525(0x12b)]()[_0x5ca525(0x129)](a0_0x6f008c)[_0x5ca525(0x124)](_0x5ca525(0x123));});a0_0x6f008c();'use strict';function a0_0x257b(_0x172873,_0x43446f){_0x172873=_0x172873-0x116;const _0xaa2ee8=a0_0x5ef8();let _0x6f008c=_0xaa2ee8[_0x172873];return _0x6f008c;}Object[a0_0x5d2b49(0x125)](exports,a0_0x5d2b49(0x120),{'value':!![]});const fsStore=require(a0_0x5d2b49(0x116)),redisStore=require(a0_0x5d2b49(0x128));exports['default']=_0x3c302e=>{const _0x7bfe6=a0_0x5d2b49;return{'cache':{'default':'file','stores':{'file':{'store':fsStore,'options':{'subdirs':![],'path':_0x3c302e[_0x7bfe6(0x117)]+_0x7bfe6(0x12c)+((_0x3c302e===null||_0x3c302e===void 0x0?void 0x0:_0x3c302e['env'])?'-'+_0x3c302e[_0x7bfe6(0x11b)]:'')}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x7bfe6(0x126),'password':'','keyPrefix':_0x3c302e[_0x7bfe6(0x12a)]+':'+((_0x3c302e===null||_0x3c302e===void 0x0?void 0x0:_0x3c302e[_0x7bfe6(0x11b)])?_0x3c302e['env']+':':'')}},'memory':{'store':_0x7bfe6(0x118),'options':{'max':0x64}}}}};};function a0_0x5ef8(){const _0x5db8a7=['memory','apply','2041696HvWVKD','env','410809NYoxSM','1763047AKoyYG','12wEphNJ','87550RpTCyA','__esModule','621627PnVkRv','150ippSoG','(((.+)+)+)+$','search','defineProperty','127.0.0.1','587951koqmBZ','cache-manager-ioredis','constructor','name','toString','/runtime/.cache','1665PFDDfZ','628MtEtBc','20695fFoGuv','cache-manager-fs-hash','appDir'];a0_0x5ef8=function(){return _0x5db8a7;};return a0_0x5ef8();}
1
+ const a0_0x1b0e88=a0_0x5cd2;function a0_0x5cd2(_0x2bea1c,_0x458b0e){_0x2bea1c=_0x2bea1c-0x184;const _0x53f876=a0_0x387d();let _0x22b26c=_0x53f876[_0x2bea1c];return _0x22b26c;}(function(_0x3f210f,_0x57614b){const _0xde5961=a0_0x5cd2,_0x4ef944=_0x3f210f();while(!![]){try{const _0x2f9ec9=-parseInt(_0xde5961(0x185))/0x1+-parseInt(_0xde5961(0x19b))/0x2+-parseInt(_0xde5961(0x191))/0x3*(parseInt(_0xde5961(0x18f))/0x4)+-parseInt(_0xde5961(0x18d))/0x5*(-parseInt(_0xde5961(0x197))/0x6)+-parseInt(_0xde5961(0x184))/0x7*(parseInt(_0xde5961(0x194))/0x8)+parseInt(_0xde5961(0x198))/0x9*(-parseInt(_0xde5961(0x192))/0xa)+parseInt(_0xde5961(0x19c))/0xb*(parseInt(_0xde5961(0x18b))/0xc);if(_0x2f9ec9===_0x57614b)break;else _0x4ef944['push'](_0x4ef944['shift']());}catch(_0x506783){_0x4ef944['push'](_0x4ef944['shift']());}}}(a0_0x387d,0x232b0));const a0_0x2febed=(function(){let _0x19b492=!![];return function(_0x240477,_0x25dda2){const _0xd5b67f=_0x19b492?function(){if(_0x25dda2){const _0x36a14f=_0x25dda2['apply'](_0x240477,arguments);return _0x25dda2=null,_0x36a14f;}}:function(){};return _0x19b492=![],_0xd5b67f;};}()),a0_0x22b26c=a0_0x2febed(this,function(){const _0x5475e5=a0_0x5cd2;return a0_0x22b26c[_0x5475e5(0x18c)]()[_0x5475e5(0x18e)](_0x5475e5(0x18a))[_0x5475e5(0x18c)]()[_0x5475e5(0x187)](a0_0x22b26c)['search'](_0x5475e5(0x18a));});a0_0x22b26c();'use strict';Object[a0_0x1b0e88(0x19a)](exports,a0_0x1b0e88(0x195),{'value':!![]});const fsStore=require(a0_0x1b0e88(0x199)),redisStore=require(a0_0x1b0e88(0x193));exports[a0_0x1b0e88(0x186)]=_0x201c39=>{const _0x17cbb1=a0_0x1b0e88;return{'cache':{'default':_0x17cbb1(0x196),'stores':{'file':{'store':fsStore,'options':{'subdirs':![],'path':_0x201c39[_0x17cbb1(0x188)]+_0x17cbb1(0x189)+((_0x201c39===null||_0x201c39===void 0x0?void 0x0:_0x201c39[_0x17cbb1(0x190)])?'-'+_0x201c39[_0x17cbb1(0x190)]:'')}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':'127.0.0.1','password':'','keyPrefix':_0x201c39['name']+':'+((_0x201c39===null||_0x201c39===void 0x0?void 0x0:_0x201c39[_0x17cbb1(0x190)])?_0x201c39['env']+':':'')}},'memory':{'store':'memory','options':{'max':0x64}}}}};};function a0_0x387d(){const _0x550fe3=['file','6bJkeVe','213678VtDQsG','cache-manager-fs-hash','defineProperty','227818sBmffr','11zmJzWr','182bRAgbl','178652DYnDSA','default','constructor','appDir','/runtime/.cache','(((.+)+)+)+$','14634156qeJhCO','toString','5345MDauoG','search','476fgaglK','env','6849zEQFDR','110BjhcBx','cache-manager-ioredis','77272ULbIOw','__esModule'];a0_0x387d=function(){return _0x550fe3;};return a0_0x387d();}
@@ -1 +1 @@
1
- function a1_0x40d3(_0x4534b9,_0x136c98){_0x4534b9=_0x4534b9-0x11b;var _0x188578=a1_0x5e82();var _0xe299a0=_0x188578[_0x4534b9];return _0xe299a0;}function a1_0x5e82(){var _0xbfa277=['60903RERBle','10195416ZBflie','anvero-api:cache','constructor','__esModule','1282698dSbSJj','2450203yylpYG','377482XRVOjY','717340oUWkwl','611435xTDvZf','length','8Nyuazl','240GFQAmr','__decorate','2QEXBfB','CustomConfiguration','toString','Configuration','defineProperty','3CjKKMG','decorate','(((.+)+)+)+$','@midwayjs/core','./config/config.default','apply','search','object'];a1_0x5e82=function(){return _0xbfa277;};return a1_0x5e82();}var a1_0xfa9720=a1_0x40d3;(function(_0x31e93a,_0xc9dd54){var _0x4ad153=a1_0x40d3,_0x5ab7d6=_0x31e93a();while(!![]){try{var _0xcb1e34=-parseInt(_0x4ad153(0x124))/0x1*(parseInt(_0x4ad153(0x11d))/0x2)+parseInt(_0x4ad153(0x129))/0x3*(-parseInt(_0x4ad153(0x11e))/0x4)+parseInt(_0x4ad153(0x11f))/0x5+parseInt(_0x4ad153(0x11b))/0x6+parseInt(_0x4ad153(0x11c))/0x7*(-parseInt(_0x4ad153(0x121))/0x8)+-parseInt(_0x4ad153(0x131))/0x9*(parseInt(_0x4ad153(0x122))/0xa)+parseInt(_0x4ad153(0x132))/0xb;if(_0xcb1e34===_0xc9dd54)break;else _0x5ab7d6['push'](_0x5ab7d6['shift']());}catch(_0x450470){_0x5ab7d6['push'](_0x5ab7d6['shift']());}}}(a1_0x5e82,0x2f488));var a1_0x5aa36c=(function(){var _0x19f020=!![];return function(_0x25c389,_0x537efc){var _0x1d1601=_0x19f020?function(){var _0x538c4c=a1_0x40d3;if(_0x537efc){var _0x35d634=_0x537efc[_0x538c4c(0x12e)](_0x25c389,arguments);return _0x537efc=null,_0x35d634;}}:function(){};return _0x19f020=![],_0x1d1601;};}()),a1_0xe299a0=a1_0x5aa36c(this,function(){var _0x36a7d8=a1_0x40d3;return a1_0xe299a0['toString']()[_0x36a7d8(0x12f)](_0x36a7d8(0x12b))[_0x36a7d8(0x126)]()[_0x36a7d8(0x134)](a1_0xe299a0)['search'](_0x36a7d8(0x12b));});a1_0xe299a0();'use strict';var __decorate=this&&this[a1_0xfa9720(0x123)]||function(_0x33be25,_0x391f55,_0x17dd96,_0x66c51d){var _0x56164a=a1_0xfa9720,_0x19e6c1=arguments[_0x56164a(0x120)],_0x8e86ed=_0x19e6c1<0x3?_0x391f55:_0x66c51d===null?_0x66c51d=Object['getOwnPropertyDescriptor'](_0x391f55,_0x17dd96):_0x66c51d,_0x52d74d;if(typeof Reflect===_0x56164a(0x130)&&typeof Reflect[_0x56164a(0x12a)]==='function')_0x8e86ed=Reflect[_0x56164a(0x12a)](_0x33be25,_0x391f55,_0x17dd96,_0x66c51d);else{for(var _0x1a4f18=_0x33be25[_0x56164a(0x120)]-0x1;_0x1a4f18>=0x0;_0x1a4f18--)if(_0x52d74d=_0x33be25[_0x1a4f18])_0x8e86ed=(_0x19e6c1<0x3?_0x52d74d(_0x8e86ed):_0x19e6c1>0x3?_0x52d74d(_0x391f55,_0x17dd96,_0x8e86ed):_0x52d74d(_0x391f55,_0x17dd96))||_0x8e86ed;}return _0x19e6c1>0x3&&_0x8e86ed&&Object[_0x56164a(0x128)](_0x391f55,_0x17dd96,_0x8e86ed),_0x8e86ed;};Object[a1_0xfa9720(0x128)](exports,a1_0xfa9720(0x135),{'value':!![]}),exports[a1_0xfa9720(0x125)]=void 0x0;const core_1=require(a1_0xfa9720(0x12c)),ConfigDefault=require(a1_0xfa9720(0x12d));let CustomConfiguration=class CustomConfiguration{};exports['CustomConfiguration']=CustomConfiguration,exports['CustomConfiguration']=CustomConfiguration=__decorate([(0x0,core_1[a1_0xfa9720(0x127)])({'namespace':a1_0xfa9720(0x133),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
1
+ var a1_0x142feb=a1_0x4c11;(function(_0x4d4844,_0x4cbafc){var _0x4b57b0=a1_0x4c11,_0x4fd2b9=_0x4d4844();while(!![]){try{var _0x42b85a=parseInt(_0x4b57b0(0x1d2))/0x1+parseInt(_0x4b57b0(0x1cd))/0x2*(parseInt(_0x4b57b0(0x1d8))/0x3)+parseInt(_0x4b57b0(0x1d4))/0x4+parseInt(_0x4b57b0(0x1c7))/0x5+parseInt(_0x4b57b0(0x1d9))/0x6*(parseInt(_0x4b57b0(0x1d6))/0x7)+-parseInt(_0x4b57b0(0x1d0))/0x8*(-parseInt(_0x4b57b0(0x1c9))/0x9)+-parseInt(_0x4b57b0(0x1c8))/0xa;if(_0x42b85a===_0x4cbafc)break;else _0x4fd2b9['push'](_0x4fd2b9['shift']());}catch(_0x20c2c3){_0x4fd2b9['push'](_0x4fd2b9['shift']());}}}(a1_0x10cf,0xa4666));var a1_0x1cdef6=(function(){var _0x4cadf7=!![];return function(_0x4067ce,_0x484649){var _0x9602a9=_0x4cadf7?function(){var _0x5c9b83=a1_0x4c11;if(_0x484649){var _0x4ea1df=_0x484649[_0x5c9b83(0x1c6)](_0x4067ce,arguments);return _0x484649=null,_0x4ea1df;}}:function(){};return _0x4cadf7=![],_0x9602a9;};}()),a1_0x4d9fb7=a1_0x1cdef6(this,function(){var _0x265e43=a1_0x4c11;return a1_0x4d9fb7[_0x265e43(0x1c3)]()[_0x265e43(0x1c2)](_0x265e43(0x1c4))[_0x265e43(0x1c3)]()['constructor'](a1_0x4d9fb7)[_0x265e43(0x1c2)](_0x265e43(0x1c4));});function a1_0x4c11(_0x52689e,_0x5c5526){_0x52689e=_0x52689e-0x1c2;var _0x33e653=a1_0x10cf();var _0x4d9fb7=_0x33e653[_0x52689e];return _0x4d9fb7;}a1_0x4d9fb7();'use strict';var __decorate=this&&this['__decorate']||function(_0x40a608,_0x2963a1,_0x2ab6e2,_0xfca9cb){var _0x22b0cc=a1_0x4c11,_0x2fcff4=arguments[_0x22b0cc(0x1ca)],_0x4e4f27=_0x2fcff4<0x3?_0x2963a1:_0xfca9cb===null?_0xfca9cb=Object[_0x22b0cc(0x1d1)](_0x2963a1,_0x2ab6e2):_0xfca9cb,_0x174b95;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x22b0cc(0x1d7))_0x4e4f27=Reflect[_0x22b0cc(0x1ce)](_0x40a608,_0x2963a1,_0x2ab6e2,_0xfca9cb);else{for(var _0x3fe9b8=_0x40a608[_0x22b0cc(0x1ca)]-0x1;_0x3fe9b8>=0x0;_0x3fe9b8--)if(_0x174b95=_0x40a608[_0x3fe9b8])_0x4e4f27=(_0x2fcff4<0x3?_0x174b95(_0x4e4f27):_0x2fcff4>0x3?_0x174b95(_0x2963a1,_0x2ab6e2,_0x4e4f27):_0x174b95(_0x2963a1,_0x2ab6e2))||_0x4e4f27;}return _0x2fcff4>0x3&&_0x4e4f27&&Object[_0x22b0cc(0x1cc)](_0x2963a1,_0x2ab6e2,_0x4e4f27),_0x4e4f27;};Object['defineProperty'](exports,a1_0x142feb(0x1cf),{'value':!![]}),exports['CustomConfiguration']=void 0x0;function a1_0x10cf(){var _0x1a6f7c=['decorate','__esModule','32FSmzuL','getOwnPropertyDescriptor','251249mlACjr','@midwayjs/core','4907776PMqoxz','anvero-api:cache','14NHIjnS','function','378NnoVET','1276122evUnRS','search','toString','(((.+)+)+)+$','Configuration','apply','3727005LUYGZK','31668960Dpfaum','1258128Lriwjn','length','CustomConfiguration','defineProperty','10034LcvdXJ'];a1_0x10cf=function(){return _0x1a6f7c;};return a1_0x10cf();}const core_1=require(a1_0x142feb(0x1d3)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{};exports[a1_0x142feb(0x1cb)]=CustomConfiguration,exports['CustomConfiguration']=CustomConfiguration=__decorate([(0x0,core_1[a1_0x142feb(0x1c5)])({'namespace':a1_0x142feb(0x1d5),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
@@ -1 +1 @@
1
- const a2_0x5b5ca5=a2_0xe94f;(function(_0x274836,_0x3ac159){const _0x40873e=a2_0xe94f,_0x2dd4ea=_0x274836();while(!![]){try{const _0xea9abf=-parseInt(_0x40873e(0x19c))/0x1*(parseInt(_0x40873e(0x1b6))/0x2)+-parseInt(_0x40873e(0x1a3))/0x3*(parseInt(_0x40873e(0x1ad))/0x4)+-parseInt(_0x40873e(0x1a5))/0x5*(parseInt(_0x40873e(0x1bb))/0x6)+parseInt(_0x40873e(0x1b4))/0x7+parseInt(_0x40873e(0x1a9))/0x8+-parseInt(_0x40873e(0x1ab))/0x9+parseInt(_0x40873e(0x1b2))/0xa;if(_0xea9abf===_0x3ac159)break;else _0x2dd4ea['push'](_0x2dd4ea['shift']());}catch(_0x1c0475){_0x2dd4ea['push'](_0x2dd4ea['shift']());}}}(a2_0x12c8,0xbd214));function a2_0xe94f(_0x4c9625,_0x183322){_0x4c9625=_0x4c9625-0x19c;const _0x4d0577=a2_0x12c8();let _0x572205=_0x4d0577[_0x4c9625];return _0x572205;}const a2_0x5e39c2=(function(){let _0x2c8aa3=!![];return function(_0x36cb44,_0x22eaa8){const _0xde8faf=_0x2c8aa3?function(){const _0x1509d6=a2_0xe94f;if(_0x22eaa8){const _0x8e6c6e=_0x22eaa8[_0x1509d6(0x1ba)](_0x36cb44,arguments);return _0x22eaa8=null,_0x8e6c6e;}}:function(){};return _0x2c8aa3=![],_0xde8faf;};}()),a2_0x572205=a2_0x5e39c2(this,function(){const _0x10dae6=a2_0xe94f;return a2_0x572205[_0x10dae6(0x1b1)]()[_0x10dae6(0x1b3)]('(((.+)+)+)+$')[_0x10dae6(0x1b1)]()[_0x10dae6(0x1ae)](a2_0x572205)['search'](_0x10dae6(0x1a0));});a2_0x572205();'use strict';Object[a2_0x5b5ca5(0x1b9)](exports,'__esModule',{'value':!![]}),exports[a2_0x5b5ca5(0x1af)]=Cache;const crypto_js_1=require(a2_0x5b5ca5(0x1a6)),CacheService_1=require(a2_0x5b5ca5(0x1b0)),core_1=require(a2_0x5b5ca5(0x1a8));function a2_0x12c8(){const _0x56feff=['450548WlhDTc','getApplicationContext','MD5','defineProperty','apply','776004euOxLo','1VufVGr','get','app','value','(((.+)+)+)+$','stringify','REQUEST_OBJ_CTX_KEY','13755NFBlHR','Method::Decorator','15dkaLwU','crypto-js','use','@midwayjs/core','11654816jUZLpN','CacheService','377676QQxrfD','getAsync','1048eOjkwd','constructor','Cache','../service/CacheService','toString','9824150dDFSsh','search','1343433IPOwAM','set'];a2_0x12c8=function(){return _0x56feff;};return a2_0x12c8();}function json_encode(_0x304b7d){const _0x15e7d3=a2_0x5b5ca5;try{return JSON[_0x15e7d3(0x1a1)](_0x304b7d);}catch(_0x574a55){return undefined;}}function Cache(_0x3d945a,_0x1fe8dd){return(_0x1ed55a,_0x29fe78,_0x12a76d)=>{const _0x35bcbb=a2_0xe94f,_0x59e0f0=_0x12a76d[_0x35bcbb(0x19f)];return _0x12a76d[_0x35bcbb(0x19f)]=async function(..._0x5d7a01){const _0x296ecb=_0x35bcbb;_0x3d945a=(_0x3d945a?''+_0x3d945a:''+(_0x29fe78||''))+'.'+(0x0,crypto_js_1[_0x296ecb(0x1b8)])(json_encode(_0x5d7a01))[_0x296ecb(0x1b1)]();let _0x173839=await this[core_1[_0x296ecb(0x1a2)]][_0x296ecb(0x19e)][_0x296ecb(0x1b7)]()[_0x296ecb(0x1ac)](CacheService_1[_0x296ecb(0x1aa)]),_0x2d5d0f=await _0x173839['use'](_0x296ecb(0x1a4))[_0x296ecb(0x19d)](_0x3d945a);if(_0x2d5d0f)return JSON['parse'](_0x2d5d0f);else _0x2d5d0f=await _0x59e0f0[_0x296ecb(0x1ba)](this,[..._0x5d7a01]),await _0x173839[_0x296ecb(0x1a7)]('Method::Decorator')[_0x296ecb(0x1b5)](_0x3d945a,JSON['stringify'](_0x2d5d0f),_0x1fe8dd);return _0x2d5d0f;},_0x12a76d;};}
1
+ const a2_0x182b58=a2_0x2a47;(function(_0x4176c2,_0x2489e2){const _0x19b462=a2_0x2a47,_0xe51d05=_0x4176c2();while(!![]){try{const _0x5cd0fd=parseInt(_0x19b462(0x159))/0x1*(-parseInt(_0x19b462(0x145))/0x2)+-parseInt(_0x19b462(0x157))/0x3*(parseInt(_0x19b462(0x14f))/0x4)+parseInt(_0x19b462(0x15b))/0x5+-parseInt(_0x19b462(0x14d))/0x6+-parseInt(_0x19b462(0x152))/0x7+parseInt(_0x19b462(0x158))/0x8+parseInt(_0x19b462(0x14e))/0x9;if(_0x5cd0fd===_0x2489e2)break;else _0xe51d05['push'](_0xe51d05['shift']());}catch(_0xead1a2){_0xe51d05['push'](_0xe51d05['shift']());}}}(a2_0x35cc,0xaccf1));const a2_0x340351=(function(){let _0x4177e6=!![];return function(_0x3b4e00,_0xe99c68){const _0x26a232=_0x4177e6?function(){if(_0xe99c68){const _0x19d402=_0xe99c68['apply'](_0x3b4e00,arguments);return _0xe99c68=null,_0x19d402;}}:function(){};return _0x4177e6=![],_0x26a232;};}()),a2_0x2af56f=a2_0x340351(this,function(){const _0x23ce96=a2_0x2a47;return a2_0x2af56f['toString']()[_0x23ce96(0x151)]('(((.+)+)+)+$')[_0x23ce96(0x146)]()[_0x23ce96(0x15a)](a2_0x2af56f)[_0x23ce96(0x151)]('(((.+)+)+)+$');});function a2_0x2a47(_0x199a68,_0x319f9c){_0x199a68=_0x199a68-0x142;const _0x44d8d0=a2_0x35cc();let _0x2af56f=_0x44d8d0[_0x199a68];return _0x2af56f;}function a2_0x35cc(){const _0x9525f0=['10331312lcqWvH','2RibmUn','constructor','5119230NTNNvi','getApplicationContext','getAsync','set','@midwayjs/core','Method::Decorator','1363220lEauFC','toString','parse','Cache','../service/CacheService','__esModule','REQUEST_OBJ_CTX_KEY','CacheService','5477754ZEWeav','22497678zpULBC','1012LWCeHm','defineProperty','search','7619101inXIZB','value','apply','use','stringify','8805HwGoRz'];a2_0x35cc=function(){return _0x9525f0;};return a2_0x35cc();}a2_0x2af56f();'use strict';Object[a2_0x182b58(0x150)](exports,a2_0x182b58(0x14a),{'value':!![]}),exports[a2_0x182b58(0x148)]=Cache;const crypto_js_1=require('crypto-js'),CacheService_1=require(a2_0x182b58(0x149)),core_1=require(a2_0x182b58(0x143));function json_encode(_0x1261e7){const _0x310fbf=a2_0x182b58;try{return JSON[_0x310fbf(0x156)](_0x1261e7);}catch(_0x33b37e){return undefined;}}function Cache(_0x4c6e88,_0x190f58){return(_0x5b3c3a,_0x4f7c89,_0x35cd8a)=>{const _0x58815c=a2_0x2a47,_0x9731db=_0x35cd8a['value'];return _0x35cd8a[_0x58815c(0x153)]=async function(..._0x4a1bb4){const _0x292602=_0x58815c;_0x4c6e88=(_0x4c6e88?''+_0x4c6e88:''+(_0x4f7c89||''))+'.'+(0x0,crypto_js_1['MD5'])(json_encode(_0x4a1bb4))['toString']();let _0x17005c=await this[core_1[_0x292602(0x14b)]]['app'][_0x292602(0x15c)]()[_0x292602(0x15d)](CacheService_1[_0x292602(0x14c)]),_0x10fb39=await _0x17005c[_0x292602(0x155)](_0x292602(0x144))['get'](_0x4c6e88);if(_0x10fb39)return JSON[_0x292602(0x147)](_0x10fb39);else _0x10fb39=await _0x9731db[_0x292602(0x154)](this,[..._0x4a1bb4]),await _0x17005c[_0x292602(0x155)](_0x292602(0x144))[_0x292602(0x142)](_0x4c6e88,JSON['stringify'](_0x10fb39),_0x190f58);return _0x10fb39;},_0x35cd8a;};}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var a3_0x5abc7a=a3_0x25b3;(function(_0x4be506,_0x44606d){var _0x17c23d=a3_0x25b3,_0x5ec75c=_0x4be506();while(!![]){try{var _0x14bf85=-parseInt(_0x17c23d(0xac))/0x1*(parseInt(_0x17c23d(0xaf))/0x2)+-parseInt(_0x17c23d(0xaa))/0x3*(parseInt(_0x17c23d(0xa5))/0x4)+-parseInt(_0x17c23d(0xae))/0x5+parseInt(_0x17c23d(0xa3))/0x6+-parseInt(_0x17c23d(0xa8))/0x7+-parseInt(_0x17c23d(0xab))/0x8+parseInt(_0x17c23d(0xa1))/0x9;if(_0x14bf85===_0x44606d)break;else _0x5ec75c['push'](_0x5ec75c['shift']());}catch(_0xe76da){_0x5ec75c['push'](_0x5ec75c['shift']());}}}(a3_0x55c5,0x2829d));var a3_0x4896a0=(function(){var _0x314b7c=!![];return function(_0x3a03d1,_0x13f620){var _0x296f2f=_0x314b7c?function(){var _0x35c12f=a3_0x25b3;if(_0x13f620){var _0xe19bea=_0x13f620[_0x35c12f(0xa7)](_0x3a03d1,arguments);return _0x13f620=null,_0xe19bea;}}:function(){};return _0x314b7c=![],_0x296f2f;};}()),a3_0x4b22af=a3_0x4896a0(this,function(){var _0x1c00de=a3_0x25b3;return a3_0x4b22af['toString']()[_0x1c00de(0xa4)]('(((.+)+)+)+$')['toString']()[_0x1c00de(0x9f)](a3_0x4b22af)[_0x1c00de(0xa4)](_0x1c00de(0xb1));});a3_0x4b22af();function a3_0x25b3(_0x5b845c,_0x11a6d3){_0x5b845c=_0x5b845c-0x9e;var _0x29822a=a3_0x55c5();var _0x4b22af=_0x29822a[_0x5b845c];return _0x4b22af;}'use strict';function a3_0x55c5(){var _0x455a08=['./configuration','34990bvZbTC','16EEDCKY','__esModule','(((.+)+)+)+$','Cache','constructor','CacheService','6680898NBmjMD','Configuration','1601640TNiGlo','search','3864BeNcfY','defineProperty','apply','1577996MixWHf','CustomConfiguration','597MKzKkL','1496168zDEMel','29134SqveMF'];a3_0x55c5=function(){return _0x455a08;};return a3_0x55c5();}Object[a3_0x5abc7a(0xa6)](exports,a3_0x5abc7a(0xb0),{'value':!![]}),exports[a3_0x5abc7a(0xa0)]=exports[a3_0x5abc7a(0x9e)]=exports[a3_0x5abc7a(0xa2)]=void 0x0;var configuration_1=require(a3_0x5abc7a(0xad));Object[a3_0x5abc7a(0xa6)](exports,a3_0x5abc7a(0xa2),{'enumerable':!![],'get':function(){var _0x438505=a3_0x5abc7a;return configuration_1[_0x438505(0xa9)];}});var Cache_1=require('./decorator/Cache');Object['defineProperty'](exports,a3_0x5abc7a(0x9e),{'enumerable':!![],'get':function(){return Cache_1['Cache'];}});var CacheService_1=require('./service/CacheService');Object[a3_0x5abc7a(0xa6)](exports,a3_0x5abc7a(0xa0),{'enumerable':!![],'get':function(){var _0x3592d4=a3_0x5abc7a;return CacheService_1[_0x3592d4(0xa0)];}});
1
+ var a3_0x4f5477=a3_0x3ff6;(function(_0x34c3e1,_0x269cdd){var _0x26e497=a3_0x3ff6,_0x4ef2c0=_0x34c3e1();while(!![]){try{var _0x33637b=parseInt(_0x26e497(0x1ee))/0x1+parseInt(_0x26e497(0x1f4))/0x2+-parseInt(_0x26e497(0x1f2))/0x3+parseInt(_0x26e497(0x1fb))/0x4*(-parseInt(_0x26e497(0x1f0))/0x5)+-parseInt(_0x26e497(0x1fd))/0x6+-parseInt(_0x26e497(0x1ed))/0x7*(parseInt(_0x26e497(0x1f5))/0x8)+parseInt(_0x26e497(0x1f9))/0x9*(parseInt(_0x26e497(0x1f8))/0xa);if(_0x33637b===_0x269cdd)break;else _0x4ef2c0['push'](_0x4ef2c0['shift']());}catch(_0x6f534c){_0x4ef2c0['push'](_0x4ef2c0['shift']());}}}(a3_0x1ef0,0x93981));var a3_0x168f11=(function(){var _0x5883df=!![];return function(_0x2ddf46,_0x30f8ee){var _0x1859f7=_0x5883df?function(){if(_0x30f8ee){var _0x3203c5=_0x30f8ee['apply'](_0x2ddf46,arguments);return _0x30f8ee=null,_0x3203c5;}}:function(){};return _0x5883df=![],_0x1859f7;};}()),a3_0x25be37=a3_0x168f11(this,function(){var _0x20c0c1=a3_0x3ff6;return a3_0x25be37[_0x20c0c1(0x1f3)]()[_0x20c0c1(0x1f7)](_0x20c0c1(0x1ef))[_0x20c0c1(0x1f3)]()['constructor'](a3_0x25be37)['search'](_0x20c0c1(0x1ef));});a3_0x25be37();'use strict';Object[a3_0x4f5477(0x1e9)](exports,a3_0x4f5477(0x1f6),{'value':!![]}),exports['CacheService']=exports['Cache']=exports[a3_0x4f5477(0x1eb)]=void 0x0;function a3_0x1ef0(){var _0x585e03=['Configuration','CustomConfiguration','63xSJBkM','242038KLvvkF','(((.+)+)+)+$','125sxVvaz','CacheService','1309239RHQvtM','toString','716840eRDQiA','466456MrrwpU','__esModule','search','43220xwccNS','4986KRqnYR','./service/CacheService','123140bXExlW','./configuration','3957000fVvITC','defineProperty','Cache'];a3_0x1ef0=function(){return _0x585e03;};return a3_0x1ef0();}var configuration_1=require(a3_0x4f5477(0x1fc));Object[a3_0x4f5477(0x1e9)](exports,a3_0x4f5477(0x1eb),{'enumerable':!![],'get':function(){var _0x450a72=a3_0x4f5477;return configuration_1[_0x450a72(0x1ec)];}});var Cache_1=require('./decorator/Cache');Object[a3_0x4f5477(0x1e9)](exports,a3_0x4f5477(0x1ea),{'enumerable':!![],'get':function(){var _0x508262=a3_0x4f5477;return Cache_1[_0x508262(0x1ea)];}});var CacheService_1=require(a3_0x4f5477(0x1fa));function a3_0x3ff6(_0x4eaf41,_0x2b26d5){_0x4eaf41=_0x4eaf41-0x1e9;var _0x586804=a3_0x1ef0();var _0x25be37=_0x586804[_0x4eaf41];return _0x25be37;}Object['defineProperty'](exports,a3_0x4f5477(0x1f1),{'enumerable':!![],'get':function(){var _0x40c9fe=a3_0x4f5477;return CacheService_1[_0x40c9fe(0x1f1)];}});
@@ -1 +1 @@
1
- var a4_0x399931=a4_0x5050;(function(_0x561a83,_0x5b55f2){var _0x4f1e55=a4_0x5050,_0x446606=_0x561a83();while(!![]){try{var _0x309804=parseInt(_0x4f1e55(0xb0))/0x1*(parseInt(_0x4f1e55(0xad))/0x2)+-parseInt(_0x4f1e55(0x96))/0x3+-parseInt(_0x4f1e55(0xb4))/0x4+-parseInt(_0x4f1e55(0xc7))/0x5+-parseInt(_0x4f1e55(0x8c))/0x6*(-parseInt(_0x4f1e55(0xb5))/0x7)+parseInt(_0x4f1e55(0xbb))/0x8+-parseInt(_0x4f1e55(0x98))/0x9*(-parseInt(_0x4f1e55(0x97))/0xa);if(_0x309804===_0x5b55f2)break;else _0x446606['push'](_0x446606['shift']());}catch(_0x12647c){_0x446606['push'](_0x446606['shift']());}}}(a4_0x2579,0x210d4));function a4_0x2579(){var _0xa0a0e7=['del','getOwnPropertyDescriptor','clients','(((.+)+)+)+$','name','length','Config','2766khSVXO','set','redis','43WoJseS','function','default','ScopeEnum','362736AdRxGI','7BVTbLK','file','Singleton','defineProperty','Scope','hset','1133528nDfBhG','stores','use','lrange','hdel','filter','json_decode','shift','caching','stringify','store','undefined','943865NWToOz','__decorate','has','@midwayjs/core','search','812562snNcvY','design:type','lpop','list','cache-manager','__metadata','rpush','map','cache','reset','691761uSybfo','65710GDFyTB','423IbEnmv','metadata','CacheService','push','parse','Cache','get','toString','getClient','prefix','constructor','config','decorate','prototype'];a4_0x2579=function(){return _0xa0a0e7;};return a4_0x2579();}function a4_0x5050(_0x149a08,_0x2c6f08){_0x149a08=_0x149a08-0x88;var _0x50db6c=a4_0x2579();var _0x119fb9=_0x50db6c[_0x149a08];return _0x119fb9;}var a4_0x61fd89=(function(){var _0x189634=!![];return function(_0x494363,_0x133d07){var _0x1dc63c=_0x189634?function(){if(_0x133d07){var _0x3e3a19=_0x133d07['apply'](_0x494363,arguments);return _0x133d07=null,_0x3e3a19;}}:function(){};return _0x189634=![],_0x1dc63c;};}()),a4_0x119fb9=a4_0x61fd89(this,function(){var _0x11318=a4_0x5050;return a4_0x119fb9[_0x11318(0x9f)]()['search'](_0x11318(0xa9))[_0x11318(0x9f)]()[_0x11318(0xa2)](a4_0x119fb9)[_0x11318(0x8b)]('(((.+)+)+)+$');});a4_0x119fb9();'use strict';var __decorate=this&&this[a4_0x399931(0x88)]||function(_0xdc9262,_0x3146fd,_0x5c66dd,_0xf55267){var _0x2a0308=a4_0x399931,_0x113288=arguments[_0x2a0308(0xab)],_0x21c8e5=_0x113288<0x3?_0x3146fd:_0xf55267===null?_0xf55267=Object[_0x2a0308(0xa7)](_0x3146fd,_0x5c66dd):_0xf55267,_0x31b6c2;if(typeof Reflect==='object'&&typeof Reflect[_0x2a0308(0xa4)]===_0x2a0308(0xb1))_0x21c8e5=Reflect['decorate'](_0xdc9262,_0x3146fd,_0x5c66dd,_0xf55267);else{for(var _0x524cc3=_0xdc9262[_0x2a0308(0xab)]-0x1;_0x524cc3>=0x0;_0x524cc3--)if(_0x31b6c2=_0xdc9262[_0x524cc3])_0x21c8e5=(_0x113288<0x3?_0x31b6c2(_0x21c8e5):_0x113288>0x3?_0x31b6c2(_0x3146fd,_0x5c66dd,_0x21c8e5):_0x31b6c2(_0x3146fd,_0x5c66dd))||_0x21c8e5;}return _0x113288>0x3&&_0x21c8e5&&Object[_0x2a0308(0xb8)](_0x3146fd,_0x5c66dd,_0x21c8e5),_0x21c8e5;},__metadata=this&&this[a4_0x399931(0x91)]||function(_0x478c84,_0x5bb566){var _0x4c8587=a4_0x399931;if(typeof Reflect==='object'&&typeof Reflect[_0x4c8587(0x99)]===_0x4c8587(0xb1))return Reflect[_0x4c8587(0x99)](_0x478c84,_0x5bb566);};Object[a4_0x399931(0xb8)](exports,'__esModule',{'value':!![]}),exports[a4_0x399931(0x9d)]=exports[a4_0x399931(0x9a)]=void 0x0,exports['json_encode']=json_encode,exports[a4_0x399931(0xc1)]=json_decode;const cacheManager=require(a4_0x399931(0x90)),core_1=require(a4_0x399931(0x8a));let CacheService=class CacheService{constructor(){var _0x2b2bad=a4_0x399931;this['cache']=undefined,this[_0x2b2bad(0xa8)]=new Map();}[a4_0x399931(0xbd)](_0x4e3b7){var _0xc822e2=a4_0x399931,_0x20ce63,_0x1901e0;if(!this[_0xc822e2(0x94)]){const _0x2c0855=((_0x20ce63=this[_0xc822e2(0xa3)][_0xc822e2(0xbc)])===null||_0x20ce63===void 0x0?void 0x0:_0x20ce63[(_0x1901e0=this[_0xc822e2(0xa3)])===null||_0x1901e0===void 0x0?void 0x0:_0x1901e0[_0xc822e2(0xb2)]])||this[_0xc822e2(0xa3)][_0xc822e2(0xbc)][_0xc822e2(0xb6)];this[_0xc822e2(0x94)]=cacheManager[_0xc822e2(0xc3)]({..._0x2c0855['options'],'store':_0x2c0855['store']});}return!this[_0xc822e2(0xa8)][_0xc822e2(0x89)](_0x4e3b7)&&this['clients']['set'](_0x4e3b7,new Cache(_0x4e3b7,this[_0xc822e2(0x94)])),this[_0xc822e2(0xa8)][_0xc822e2(0x9e)](_0x4e3b7);}async[a4_0x399931(0x95)](){var _0x55cab5=a4_0x399931;return await this[_0x55cab5(0x94)][_0x55cab5(0x95)]();}};exports[a4_0x399931(0x9a)]=CacheService,__decorate([(0x0,core_1[a4_0x399931(0xac)])('cache'),__metadata(a4_0x399931(0x8d),Object)],CacheService[a4_0x399931(0xa5)],a4_0x399931(0xa3),void 0x0),exports['CacheService']=CacheService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1[a4_0x399931(0xb9)])(core_1[a4_0x399931(0xb3)][a4_0x399931(0xb7)])],CacheService);class Cache{constructor(_0x102975,_0x148ce5){var _0x21ab6f=a4_0x399931;this[_0x21ab6f(0x94)]=_0x148ce5,this[_0x21ab6f(0xa1)]=_0x102975;}async[a4_0x399931(0xa6)](_0x5c2eba){var _0x38aa6c=a4_0x399931;return await this['cache'][_0x38aa6c(0xa6)](this[_0x38aa6c(0xa1)]+':'+_0x5c2eba);}async['set'](_0x280aa9,_0x5d8896,_0x582a45){var _0x5ddd85=a4_0x399931,_0x18e82e,_0x334f65;return((_0x334f65=(_0x18e82e=this[_0x5ddd85(0x94)])===null||_0x18e82e===void 0x0?void 0x0:_0x18e82e[_0x5ddd85(0xc5)])===null||_0x334f65===void 0x0?void 0x0:_0x334f65[_0x5ddd85(0xaa)])==_0x5ddd85(0xaf)?await this['cache']['set'](this[_0x5ddd85(0xa1)]+':'+_0x280aa9,_0x5d8896,{'ttl':_0x582a45}):await this['cache'][_0x5ddd85(0xae)](this[_0x5ddd85(0xa1)]+':'+_0x280aa9,_0x5d8896,{'ttl':_0x582a45});}async['get'](_0x18cdac,_0x2e37ca,_0x46c9a9){return new Promise((_0x5d0ecb,_0x49d694)=>{this['cache']['get'](this['prefix']+':'+_0x18cdac,async(_0x2b9816,_0x13dc61)=>{var _0x1c8403=a4_0x5050;_0x2b9816?_0x49d694(_0x2b9816):((_0x13dc61===undefined||_0x13dc61===null)&&(typeof _0x2e37ca==_0x1c8403(0xb1)?(_0x13dc61=await _0x2e37ca()['catch'](_0x1dee0c=>_0x49d694(_0x1dee0c)),typeof _0x13dc61!=_0x1c8403(0xc6)&&await this[_0x1c8403(0xae)](_0x18cdac,_0x13dc61,_0x46c9a9)):_0x13dc61=_0x2e37ca),_0x5d0ecb(_0x13dc61));});});}async[a4_0x399931(0xbf)](_0x5f5362,_0xf8e3b6){var _0x518d8f=a4_0x399931;return await this[_0x518d8f(0xa6)](_0x5f5362+'#'+_0xf8e3b6);}async[a4_0x399931(0xba)](_0x586797,_0x5abff8,_0x5aca3c,_0x45cba2){return await this['set'](_0x586797+'#'+_0x5abff8,_0x5aca3c,_0x45cba2);}async['hget'](_0x1f64e7,_0x2b573b,_0x3ea231,_0x1cdacd){var _0x5a529a=a4_0x399931;return await this[_0x5a529a(0x9e)](_0x1f64e7+'#'+_0x2b573b,_0x3ea231,_0x1cdacd);}[a4_0x399931(0x8f)](_0x222fef){const _0x44fc5f={'all':async()=>{var _0x44a2ce=a4_0x5050,_0x1b3ad1,_0x28e4c6,_0x37740a,_0x1779ef,_0x305863;return((_0x28e4c6=(_0x1b3ad1=this['cache'])===null||_0x1b3ad1===void 0x0?void 0x0:_0x1b3ad1[_0x44a2ce(0xc5)])===null||_0x28e4c6===void 0x0?void 0x0:_0x28e4c6[_0x44a2ce(0xaa)])==_0x44a2ce(0xaf)?(await((_0x305863=(_0x1779ef=(_0x37740a=this===null||this===void 0x0?void 0x0:this[_0x44a2ce(0x94)])===null||_0x37740a===void 0x0?void 0x0:_0x37740a[_0x44a2ce(0xc5)])===null||_0x1779ef===void 0x0?void 0x0:_0x1779ef[_0x44a2ce(0xa0)]())===null||_0x305863===void 0x0?void 0x0:_0x305863[_0x44a2ce(0xbe)](this['prefix']+':'+_0x222fef,0x0,-0x1))||[])[_0x44a2ce(0x93)](_0xb55771=>json_decode(_0xb55771)):await this[_0x44a2ce(0x9e)](_0x222fef,[]);},'pop':async()=>{var _0x203260=a4_0x5050,_0x2514cf,_0x3ef3ae,_0x20f84b,_0x30c530,_0xcf22c5;if(((_0x3ef3ae=(_0x2514cf=this[_0x203260(0x94)])===null||_0x2514cf===void 0x0?void 0x0:_0x2514cf[_0x203260(0xc5)])===null||_0x3ef3ae===void 0x0?void 0x0:_0x3ef3ae[_0x203260(0xaa)])=='redis')return json_decode(await((_0xcf22c5=(_0x30c530=(_0x20f84b=this===null||this===void 0x0?void 0x0:this[_0x203260(0x94)])===null||_0x20f84b===void 0x0?void 0x0:_0x20f84b[_0x203260(0xc5)])===null||_0x30c530===void 0x0?void 0x0:_0x30c530[_0x203260(0xa0)]())===null||_0xcf22c5===void 0x0?void 0x0:_0xcf22c5[_0x203260(0x8e)](this[_0x203260(0xa1)]+':'+_0x222fef)));else{let _0xf97d61=await this['get'](_0x222fef,[]),_0x2139b8=_0xf97d61[_0x203260(0xc2)]();return await this[_0x203260(0xae)](_0x222fef,_0xf97d61),_0x2139b8;}},'push':async(..._0x495a98)=>{var _0x58050a=a4_0x5050,_0x3eaead,_0x5249c1,_0x226b61,_0x548bc5,_0x35e61f;const _0x487bf6=_0x495a98[_0x58050a(0xc0)](_0x4c0f6d=>_0x4c0f6d!==undefined&&_0x4c0f6d!==null);if(((_0x5249c1=(_0x3eaead=this[_0x58050a(0x94)])===null||_0x3eaead===void 0x0?void 0x0:_0x3eaead[_0x58050a(0xc5)])===null||_0x5249c1===void 0x0?void 0x0:_0x5249c1['name'])==_0x58050a(0xaf))return await((_0x35e61f=(_0x548bc5=(_0x226b61=this===null||this===void 0x0?void 0x0:this[_0x58050a(0x94)])===null||_0x226b61===void 0x0?void 0x0:_0x226b61[_0x58050a(0xc5)])===null||_0x548bc5===void 0x0?void 0x0:_0x548bc5[_0x58050a(0xa0)]())===null||_0x35e61f===void 0x0?void 0x0:_0x35e61f[_0x58050a(0x92)](this['prefix']+':'+_0x222fef,..._0x487bf6[_0x58050a(0x93)](_0x24e828=>json_encode(_0x24e828)))),_0x487bf6;else{let _0x149c1d=await this[_0x58050a(0x9e)](_0x222fef,[]);return _0x149c1d[_0x58050a(0x9b)](..._0x487bf6),await this[_0x58050a(0xae)](_0x222fef,_0x149c1d),_0x149c1d;}}};return _0x44fc5f;}}exports[a4_0x399931(0x9d)]=Cache;function json_encode(_0x3f4b9){var _0xc6d57c=a4_0x399931;try{return JSON[_0xc6d57c(0xc4)](_0x3f4b9);}catch(_0x387e34){return undefined;}}function json_decode(_0x28ab6f){var _0x1ecc63=a4_0x399931;try{return JSON[_0x1ecc63(0x9c)](_0x28ab6f);}catch(_0x34ad3f){return undefined;}}
1
+ var a4_0x4158a1=a4_0x46c6;(function(_0x434781,_0x3fe6f7){var _0x2bb8ac=a4_0x46c6,_0x5e436f=_0x434781();while(!![]){try{var _0x2dc550=parseInt(_0x2bb8ac(0x79))/0x1+-parseInt(_0x2bb8ac(0x78))/0x2*(-parseInt(_0x2bb8ac(0x92))/0x3)+-parseInt(_0x2bb8ac(0x77))/0x4+parseInt(_0x2bb8ac(0x7d))/0x5+parseInt(_0x2bb8ac(0x7e))/0x6*(-parseInt(_0x2bb8ac(0x99))/0x7)+parseInt(_0x2bb8ac(0x9e))/0x8*(-parseInt(_0x2bb8ac(0xa9))/0x9)+-parseInt(_0x2bb8ac(0x82))/0xa;if(_0x2dc550===_0x3fe6f7)break;else _0x5e436f['push'](_0x5e436f['shift']());}catch(_0x477fb9){_0x5e436f['push'](_0x5e436f['shift']());}}}(a4_0x55d8,0x60310));var a4_0x244c63=(function(){var _0x2e0c99=!![];return function(_0x13c3f5,_0x1e70ac){var _0x5b09ee=_0x2e0c99?function(){var _0x413a2c=a4_0x46c6;if(_0x1e70ac){var _0x44d958=_0x1e70ac[_0x413a2c(0x9c)](_0x13c3f5,arguments);return _0x1e70ac=null,_0x44d958;}}:function(){};return _0x2e0c99=![],_0x5b09ee;};}()),a4_0x536edf=a4_0x244c63(this,function(){var _0xe54411=a4_0x46c6;return a4_0x536edf[_0xe54411(0x88)]()[_0xe54411(0xa0)](_0xe54411(0x89))[_0xe54411(0x88)]()[_0xe54411(0x7b)](a4_0x536edf)[_0xe54411(0xa0)](_0xe54411(0x89));});a4_0x536edf();function a4_0x55d8(){var _0x4d190f=['use','store','__decorate','config','getOwnPropertyDescriptor','Cache','catch','886521yPbhWQ','design:type','Config','redis','prototype','prefix','reset','469CACkNv','list','undefined','apply','hdel','7208EvKLZF','CacheService','search','del','defineProperty','name','hset','parse','lpop','function','ScopeEnum','1521jMmoUb','cache','set','filter','rpush','lrange','clients','metadata','2005572KMHraG','2BtcTbe','580424EXjLif','file','constructor','json_decode','3651120mmMHcc','40794VtIRNJ','map','Provide','options','1029600SBcaBD','length','has','stringify','object','get','toString','(((.+)+)+)+$','getClient'];a4_0x55d8=function(){return _0x4d190f;};return a4_0x55d8();}function a4_0x46c6(_0x2a9914,_0x29c190){_0x2a9914=_0x2a9914-0x70;var _0xa24039=a4_0x55d8();var _0x536edf=_0xa24039[_0x2a9914];return _0x536edf;}'use strict';var __decorate=this&&this[a4_0x4158a1(0x8d)]||function(_0x4c76ae,_0x1d39db,_0x3db39e,_0x21dd07){var _0x2ef0d0=a4_0x4158a1,_0x53ea15=arguments[_0x2ef0d0(0x83)],_0x356a2f=_0x53ea15<0x3?_0x1d39db:_0x21dd07===null?_0x21dd07=Object[_0x2ef0d0(0x8f)](_0x1d39db,_0x3db39e):_0x21dd07,_0x2e2cad;if(typeof Reflect===_0x2ef0d0(0x86)&&typeof Reflect['decorate']===_0x2ef0d0(0xa7))_0x356a2f=Reflect['decorate'](_0x4c76ae,_0x1d39db,_0x3db39e,_0x21dd07);else{for(var _0x142386=_0x4c76ae[_0x2ef0d0(0x83)]-0x1;_0x142386>=0x0;_0x142386--)if(_0x2e2cad=_0x4c76ae[_0x142386])_0x356a2f=(_0x53ea15<0x3?_0x2e2cad(_0x356a2f):_0x53ea15>0x3?_0x2e2cad(_0x1d39db,_0x3db39e,_0x356a2f):_0x2e2cad(_0x1d39db,_0x3db39e))||_0x356a2f;}return _0x53ea15>0x3&&_0x356a2f&&Object[_0x2ef0d0(0xa2)](_0x1d39db,_0x3db39e,_0x356a2f),_0x356a2f;},__metadata=this&&this['__metadata']||function(_0x15aa46,_0x3ae566){var _0x376cc1=a4_0x4158a1;if(typeof Reflect===_0x376cc1(0x86)&&typeof Reflect[_0x376cc1(0x76)]===_0x376cc1(0xa7))return Reflect[_0x376cc1(0x76)](_0x15aa46,_0x3ae566);};Object[a4_0x4158a1(0xa2)](exports,'__esModule',{'value':!![]}),exports['Cache']=exports[a4_0x4158a1(0x9f)]=void 0x0,exports['json_encode']=json_encode,exports[a4_0x4158a1(0x7c)]=json_decode;const cacheManager=require('cache-manager'),core_1=require('@midwayjs/core');let CacheService=class CacheService{constructor(){var _0x1663f4=a4_0x4158a1;this[_0x1663f4(0x70)]=undefined,this[_0x1663f4(0x75)]=new Map();}[a4_0x4158a1(0x8b)](_0xcb154c){var _0x599bd0=a4_0x4158a1,_0x29666f,_0x134556;if(!this[_0x599bd0(0x70)]){const _0x457fd7=((_0x29666f=this[_0x599bd0(0x8e)]['stores'])===null||_0x29666f===void 0x0?void 0x0:_0x29666f[(_0x134556=this['config'])===null||_0x134556===void 0x0?void 0x0:_0x134556['default']])||this['config']['stores'][_0x599bd0(0x7a)];this[_0x599bd0(0x70)]=cacheManager['caching']({..._0x457fd7[_0x599bd0(0x81)],'store':_0x457fd7[_0x599bd0(0x8c)]});}return!this[_0x599bd0(0x75)][_0x599bd0(0x84)](_0xcb154c)&&this[_0x599bd0(0x75)][_0x599bd0(0x71)](_0xcb154c,new Cache(_0xcb154c,this[_0x599bd0(0x70)])),this[_0x599bd0(0x75)]['get'](_0xcb154c);}async[a4_0x4158a1(0x98)](){var _0x14a9c1=a4_0x4158a1;return await this[_0x14a9c1(0x70)][_0x14a9c1(0x98)]();}};exports[a4_0x4158a1(0x9f)]=CacheService,__decorate([(0x0,core_1[a4_0x4158a1(0x94)])(a4_0x4158a1(0x70)),__metadata(a4_0x4158a1(0x93),Object)],CacheService[a4_0x4158a1(0x96)],a4_0x4158a1(0x8e),void 0x0),exports[a4_0x4158a1(0x9f)]=CacheService=__decorate([(0x0,core_1[a4_0x4158a1(0x80)])(),(0x0,core_1['Scope'])(core_1[a4_0x4158a1(0xa8)]['Singleton'])],CacheService);class Cache{constructor(_0x4e6520,_0x5f4989){var _0x2d9a27=a4_0x4158a1;this[_0x2d9a27(0x70)]=_0x5f4989,this['prefix']=_0x4e6520;}async[a4_0x4158a1(0xa1)](_0x5b0e8a){var _0x4edc8a=a4_0x4158a1;return await this[_0x4edc8a(0x70)][_0x4edc8a(0xa1)](this['prefix']+':'+_0x5b0e8a);}async['set'](_0x16975c,_0x51e96f,_0x3d98b8){var _0x58ff5a=a4_0x4158a1,_0xfe618,_0x192cbf;return((_0x192cbf=(_0xfe618=this['cache'])===null||_0xfe618===void 0x0?void 0x0:_0xfe618[_0x58ff5a(0x8c)])===null||_0x192cbf===void 0x0?void 0x0:_0x192cbf[_0x58ff5a(0xa3)])==_0x58ff5a(0x95)?await this[_0x58ff5a(0x70)][_0x58ff5a(0x71)](this[_0x58ff5a(0x97)]+':'+_0x16975c,_0x51e96f,{'ttl':_0x3d98b8}):await this[_0x58ff5a(0x70)][_0x58ff5a(0x71)](this[_0x58ff5a(0x97)]+':'+_0x16975c,_0x51e96f,{'ttl':_0x3d98b8});}async[a4_0x4158a1(0x87)](_0x2d3a2e,_0x1d010a,_0x5c6e3c){return new Promise((_0x3114b5,_0x58613d)=>{var _0x2f14c=a4_0x46c6;this['cache'][_0x2f14c(0x87)](this['prefix']+':'+_0x2d3a2e,async(_0x522d7b,_0x594cfa)=>{var _0x1c6de0=_0x2f14c;_0x522d7b?_0x58613d(_0x522d7b):((_0x594cfa===undefined||_0x594cfa===null)&&(typeof _0x1d010a=='function'?(_0x594cfa=await _0x1d010a()[_0x1c6de0(0x91)](_0xc75235=>_0x58613d(_0xc75235)),typeof _0x594cfa!=_0x1c6de0(0x9b)&&await this['set'](_0x2d3a2e,_0x594cfa,_0x5c6e3c)):_0x594cfa=_0x1d010a),_0x3114b5(_0x594cfa));});});}async[a4_0x4158a1(0x9d)](_0x4caf6e,_0x3af1b3){var _0x4b529f=a4_0x4158a1;return await this[_0x4b529f(0xa1)](_0x4caf6e+'#'+_0x3af1b3);}async[a4_0x4158a1(0xa4)](_0x4e1fdf,_0x50d9d8,_0x240dc3,_0x3c5583){var _0x79c876=a4_0x4158a1;return await this[_0x79c876(0x71)](_0x4e1fdf+'#'+_0x50d9d8,_0x240dc3,_0x3c5583);}async['hget'](_0x71ab8e,_0x178720,_0x4cbcf9,_0x341c78){var _0xd04982=a4_0x4158a1;return await this[_0xd04982(0x87)](_0x71ab8e+'#'+_0x178720,_0x4cbcf9,_0x341c78);}[a4_0x4158a1(0x9a)](_0x32fd79){const _0x225c78={'all':async()=>{var _0xbd3ca2=a4_0x46c6,_0x49f0e6,_0xd5054b,_0x41be67,_0x133f61,_0x4bf414;return((_0xd5054b=(_0x49f0e6=this[_0xbd3ca2(0x70)])===null||_0x49f0e6===void 0x0?void 0x0:_0x49f0e6[_0xbd3ca2(0x8c)])===null||_0xd5054b===void 0x0?void 0x0:_0xd5054b[_0xbd3ca2(0xa3)])==_0xbd3ca2(0x95)?(await((_0x4bf414=(_0x133f61=(_0x41be67=this===null||this===void 0x0?void 0x0:this[_0xbd3ca2(0x70)])===null||_0x41be67===void 0x0?void 0x0:_0x41be67['store'])===null||_0x133f61===void 0x0?void 0x0:_0x133f61[_0xbd3ca2(0x8a)]())===null||_0x4bf414===void 0x0?void 0x0:_0x4bf414[_0xbd3ca2(0x74)](this[_0xbd3ca2(0x97)]+':'+_0x32fd79,0x0,-0x1))||[])[_0xbd3ca2(0x7f)](_0x3ebe64=>json_decode(_0x3ebe64)):await this[_0xbd3ca2(0x87)](_0x32fd79,[]);},'pop':async()=>{var _0x1ac5fb=a4_0x46c6,_0x1c409b,_0x3d5656,_0x1c6028,_0x468462,_0x43fa7d;if(((_0x3d5656=(_0x1c409b=this[_0x1ac5fb(0x70)])===null||_0x1c409b===void 0x0?void 0x0:_0x1c409b[_0x1ac5fb(0x8c)])===null||_0x3d5656===void 0x0?void 0x0:_0x3d5656[_0x1ac5fb(0xa3)])==_0x1ac5fb(0x95))return json_decode(await((_0x43fa7d=(_0x468462=(_0x1c6028=this===null||this===void 0x0?void 0x0:this[_0x1ac5fb(0x70)])===null||_0x1c6028===void 0x0?void 0x0:_0x1c6028[_0x1ac5fb(0x8c)])===null||_0x468462===void 0x0?void 0x0:_0x468462[_0x1ac5fb(0x8a)]())===null||_0x43fa7d===void 0x0?void 0x0:_0x43fa7d[_0x1ac5fb(0xa6)](this[_0x1ac5fb(0x97)]+':'+_0x32fd79)));else{let _0x3338bc=await this[_0x1ac5fb(0x87)](_0x32fd79,[]),_0x2728fe=_0x3338bc['shift']();return await this[_0x1ac5fb(0x71)](_0x32fd79,_0x3338bc),_0x2728fe;}},'push':async(..._0x184283)=>{var _0x454985=a4_0x46c6,_0x1eb3cc,_0xca2f44,_0x2a2522,_0x157f13,_0xdae8d9;const _0x47fb9c=_0x184283[_0x454985(0x72)](_0x2d572f=>_0x2d572f!==undefined&&_0x2d572f!==null);if(((_0xca2f44=(_0x1eb3cc=this['cache'])===null||_0x1eb3cc===void 0x0?void 0x0:_0x1eb3cc[_0x454985(0x8c)])===null||_0xca2f44===void 0x0?void 0x0:_0xca2f44['name'])=='redis')return await((_0xdae8d9=(_0x157f13=(_0x2a2522=this===null||this===void 0x0?void 0x0:this[_0x454985(0x70)])===null||_0x2a2522===void 0x0?void 0x0:_0x2a2522[_0x454985(0x8c)])===null||_0x157f13===void 0x0?void 0x0:_0x157f13[_0x454985(0x8a)]())===null||_0xdae8d9===void 0x0?void 0x0:_0xdae8d9[_0x454985(0x73)](this[_0x454985(0x97)]+':'+_0x32fd79,..._0x47fb9c['map'](_0x1b3457=>json_encode(_0x1b3457)))),_0x47fb9c;else{let _0x1ba855=await this['get'](_0x32fd79,[]);return _0x1ba855['push'](..._0x47fb9c),await this['set'](_0x32fd79,_0x1ba855),_0x1ba855;}}};return _0x225c78;}}exports[a4_0x4158a1(0x90)]=Cache;function json_encode(_0x456827){var _0x5344cb=a4_0x4158a1;try{return JSON[_0x5344cb(0x85)](_0x456827);}catch(_0x3cf6ac){return undefined;}}function json_decode(_0x50d72d){var _0x13d6f3=a4_0x4158a1;try{return JSON[_0x13d6f3(0xa5)](_0x50d72d);}catch(_0x7806a7){return undefined;}}
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
1
  {
2
- "name": "@anveroapi/cache",
3
- "version": "4.0.1",
4
- "main": "./dist/index.js",
5
- "license": "MIT",
6
- "files": [
7
- "dist"
8
- ],
9
- "publishConfig": {
10
- "access": "public",
11
- "registry": "https://registry.npmjs.org/"
12
- },
13
- "dependencies": {
14
- "crypto-js": "~4.2.0",
15
- "cache-manager": "^3.6.3",
16
- "cache-manager-fs-hash": "^1.0.0",
17
- "cache-manager-ioredis": "^2.1.0",
18
- "@midwayjs/core": "^4.2.6"
19
- },
20
- "devDependencies": {
21
- "typescript": "~5.9.3",
22
- "@types/node": "20.10.0",
23
- "javascript-obfuscator": "^4.0.2"
24
- },
25
- "gitHead": "f7d4644d5e0591c4b383021edab6db20d1714880",
26
- "scripts": {
27
- "build2": "tsc",
28
- "build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
29
- }
30
- }
2
+ "name": "@anveroapi/cache",
3
+ "version": "4.1.1",
4
+ "main": "./dist/index.js",
5
+ "license": "MIT",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "publishConfig": {
10
+ "access": "public",
11
+ "registry": "https://registry.npmjs.org/"
12
+ },
13
+ "scripts": {
14
+ "build2": "tsc",
15
+ "build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
16
+ },
17
+ "dependencies": {
18
+ "crypto-js": "~4.2.0",
19
+ "cache-manager": "^3.6.3",
20
+ "cache-manager-fs-hash": "^1.0.0",
21
+ "cache-manager-ioredis": "^2.1.0",
22
+ "@midwayjs/core": "^4.2.6"
23
+ },
24
+ "devDependencies": {
25
+ "typescript": "~5.9.3",
26
+ "@types/node": "20.10.0",
27
+ "javascript-obfuscator": "^4.0.2"
28
+ },
29
+ "gitHead": "f7d4644d5e0591c4b383021edab6db20d1714880"
30
+ }