@anveroapi/cache 4.0.2 → 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
- function a0_0x21cd(){const _0x3c5520=['368945vxKuPR','18inuGri','appDir','291051eVUCOW','name','env','defineProperty','constructor','__esModule','127.0.0.1','1584485YVtRjo','search','/runtime/.cache','default','4240164XPMFMp','8eRITBe','(((.+)+)+)+$','apply','cache-manager-ioredis','toString','cache-manager-fs-hash','22802679sZBycs','1351022iHZXhJ','10814307noenEE'];a0_0x21cd=function(){return _0x3c5520;};return a0_0x21cd();}const a0_0xb71db9=a0_0x3df0;function a0_0x3df0(_0x22f729,_0x2e6109){_0x22f729=_0x22f729-0x1cf;const _0x2f3930=a0_0x21cd();let _0x6b5cd5=_0x2f3930[_0x22f729];return _0x6b5cd5;}(function(_0x4a86c3,_0x4803ea){const _0x379836=a0_0x3df0,_0x111219=_0x4a86c3();while(!![]){try{const _0x3ccfb6=parseInt(_0x379836(0x1df))/0x1+-parseInt(_0x379836(0x1d3))/0x2+-parseInt(_0x379836(0x1d8))/0x3+-parseInt(_0x379836(0x1e3))/0x4+-parseInt(_0x379836(0x1d5))/0x5*(-parseInt(_0x379836(0x1d6))/0x6)+-parseInt(_0x379836(0x1d4))/0x7*(parseInt(_0x379836(0x1e4))/0x8)+parseInt(_0x379836(0x1d2))/0x9;if(_0x3ccfb6===_0x4803ea)break;else _0x111219['push'](_0x111219['shift']());}catch(_0x20c6c1){_0x111219['push'](_0x111219['shift']());}}}(a0_0x21cd,0xeaddd));const a0_0x49580e=(function(){let _0x6402b7=!![];return function(_0x450ba2,_0x1e4c4e){const _0x10a931=_0x6402b7?function(){const _0x3d8b2b=a0_0x3df0;if(_0x1e4c4e){const _0x28e39f=_0x1e4c4e[_0x3d8b2b(0x1e6)](_0x450ba2,arguments);return _0x1e4c4e=null,_0x28e39f;}}:function(){};return _0x6402b7=![],_0x10a931;};}()),a0_0x6b5cd5=a0_0x49580e(this,function(){const _0x3d6ad0=a0_0x3df0;return a0_0x6b5cd5[_0x3d6ad0(0x1d0)]()[_0x3d6ad0(0x1e0)](_0x3d6ad0(0x1e5))[_0x3d6ad0(0x1d0)]()[_0x3d6ad0(0x1dc)](a0_0x6b5cd5)[_0x3d6ad0(0x1e0)](_0x3d6ad0(0x1e5));});a0_0x6b5cd5();'use strict';Object[a0_0xb71db9(0x1db)](exports,a0_0xb71db9(0x1dd),{'value':!![]});const fsStore=require(a0_0xb71db9(0x1d1)),redisStore=require(a0_0xb71db9(0x1cf));exports[a0_0xb71db9(0x1e2)]=_0x152283=>{const _0x509908=a0_0xb71db9;return{'cache':{'default':'file','stores':{'file':{'store':fsStore,'options':{'subdirs':![],'path':_0x152283[_0x509908(0x1d7)]+_0x509908(0x1e1)+((_0x152283===null||_0x152283===void 0x0?void 0x0:_0x152283['env'])?'-'+_0x152283[_0x509908(0x1da)]:'')}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x509908(0x1de),'password':'','keyPrefix':_0x152283[_0x509908(0x1d9)]+':'+((_0x152283===null||_0x152283===void 0x0?void 0x0:_0x152283[_0x509908(0x1da)])?_0x152283[_0x509908(0x1da)]+':':'')}},'memory':{'store':'memory','options':{'max':0x64}}}}};};
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
- var a1_0x42a0d9=a1_0x2177;function a1_0x2177(_0x3403bf,_0x38ca2d){_0x3403bf=_0x3403bf-0x1e7;var _0x20db95=a1_0xac0f();var _0x16cebe=_0x20db95[_0x3403bf];return _0x16cebe;}(function(_0x390f3a,_0x30dad6){var _0x2410a3=a1_0x2177,_0x4b8ff3=_0x390f3a();while(!![]){try{var _0x3a5eab=parseInt(_0x2410a3(0x1f9))/0x1+-parseInt(_0x2410a3(0x1f3))/0x2+-parseInt(_0x2410a3(0x1fa))/0x3+-parseInt(_0x2410a3(0x1e8))/0x4+parseInt(_0x2410a3(0x1f2))/0x5*(parseInt(_0x2410a3(0x1f4))/0x6)+parseInt(_0x2410a3(0x1f8))/0x7+parseInt(_0x2410a3(0x1eb))/0x8;if(_0x3a5eab===_0x30dad6)break;else _0x4b8ff3['push'](_0x4b8ff3['shift']());}catch(_0x3a8700){_0x4b8ff3['push'](_0x4b8ff3['shift']());}}}(a1_0xac0f,0xdf7e1));var a1_0x89d950=(function(){var _0x46c3b9=!![];return function(_0x5817ef,_0x2cc838){var _0xb207e9=_0x46c3b9?function(){if(_0x2cc838){var _0x5b49ce=_0x2cc838['apply'](_0x5817ef,arguments);return _0x2cc838=null,_0x5b49ce;}}:function(){};return _0x46c3b9=![],_0xb207e9;};}()),a1_0x16cebe=a1_0x89d950(this,function(){var _0x10eb68=a1_0x2177;return a1_0x16cebe[_0x10eb68(0x1e9)]()[_0x10eb68(0x1ef)](_0x10eb68(0x1f7))[_0x10eb68(0x1e9)]()['constructor'](a1_0x16cebe)[_0x10eb68(0x1ef)](_0x10eb68(0x1f7));});a1_0x16cebe();'use strict';var __decorate=this&&this['__decorate']||function(_0x513820,_0x5eb0a0,_0x107438,_0x244a5e){var _0x1b66e7=a1_0x2177,_0x3375a1=arguments[_0x1b66e7(0x1f0)],_0x19fd1=_0x3375a1<0x3?_0x5eb0a0:_0x244a5e===null?_0x244a5e=Object['getOwnPropertyDescriptor'](_0x5eb0a0,_0x107438):_0x244a5e,_0x2a1ecd;if(typeof Reflect===_0x1b66e7(0x1ee)&&typeof Reflect[_0x1b66e7(0x1f5)]===_0x1b66e7(0x1f1))_0x19fd1=Reflect[_0x1b66e7(0x1f5)](_0x513820,_0x5eb0a0,_0x107438,_0x244a5e);else{for(var _0x2035b3=_0x513820[_0x1b66e7(0x1f0)]-0x1;_0x2035b3>=0x0;_0x2035b3--)if(_0x2a1ecd=_0x513820[_0x2035b3])_0x19fd1=(_0x3375a1<0x3?_0x2a1ecd(_0x19fd1):_0x3375a1>0x3?_0x2a1ecd(_0x5eb0a0,_0x107438,_0x19fd1):_0x2a1ecd(_0x5eb0a0,_0x107438))||_0x19fd1;}return _0x3375a1>0x3&&_0x19fd1&&Object[_0x1b66e7(0x1ec)](_0x5eb0a0,_0x107438,_0x19fd1),_0x19fd1;};Object[a1_0x42a0d9(0x1ec)](exports,a1_0x42a0d9(0x1ea),{'value':!![]}),exports[a1_0x42a0d9(0x1f6)]=void 0x0;const core_1=require(a1_0x42a0d9(0x1fb)),ConfigDefault=require(a1_0x42a0d9(0x1ed));function a1_0xac0f(){var _0xe9c069=['CustomConfiguration','(((.+)+)+)+$','2994054mjsfud','57641YKzooh','829695FNvDyR','@midwayjs/core','Configuration','98664wqBqEM','toString','__esModule','3754736cLblUj','defineProperty','./config/config.default','object','search','length','function','5eLYvDv','3063784TgSVJz','10763058DwXJKJ','decorate'];a1_0xac0f=function(){return _0xe9c069;};return a1_0xac0f();}let CustomConfiguration=class CustomConfiguration{};exports['CustomConfiguration']=CustomConfiguration,exports[a1_0x42a0d9(0x1f6)]=CustomConfiguration=__decorate([(0x0,core_1[a1_0x42a0d9(0x1e7)])({'namespace':'anvero-api:cache','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_0x4bfd63=a2_0x4f09;(function(_0x1b0259,_0x3d63d7){const _0xb7e723=a2_0x4f09,_0x2df864=_0x1b0259();while(!![]){try{const _0x37d4d0=-parseInt(_0xb7e723(0x151))/0x1*(parseInt(_0xb7e723(0x154))/0x2)+parseInt(_0xb7e723(0x14c))/0x3+-parseInt(_0xb7e723(0x14a))/0x4*(-parseInt(_0xb7e723(0x137))/0x5)+parseInt(_0xb7e723(0x13f))/0x6*(-parseInt(_0xb7e723(0x156))/0x7)+parseInt(_0xb7e723(0x143))/0x8+parseInt(_0xb7e723(0x13d))/0x9+-parseInt(_0xb7e723(0x150))/0xa*(-parseInt(_0xb7e723(0x140))/0xb);if(_0x37d4d0===_0x3d63d7)break;else _0x2df864['push'](_0x2df864['shift']());}catch(_0x14988e){_0x2df864['push'](_0x2df864['shift']());}}}(a2_0x470e,0x54c04));function a2_0x470e(){const _0x2d2406=['MD5','6JDazaW','55814NXoppY','get','__esModule','3856992IhiJsO','stringify','defineProperty','REQUEST_OBJ_CTX_KEY','Cache','apply','app','1396ybyQHN','getAsync','74121LNuKPN','search','parse','Method::Decorator','840WWoXFt','250605nTyGfd','toString','set','2GpHJLi','use','4599889AnTQZr','2165tWHZNm','../service/CacheService','value','crypto-js','getApplicationContext','(((.+)+)+)+$','1536372NidtDp'];a2_0x470e=function(){return _0x2d2406;};return a2_0x470e();}const a2_0x115ef5=(function(){let _0x410d7e=!![];return function(_0x92d37a,_0x410416){const _0x300394=_0x410d7e?function(){const _0xabe90c=a2_0x4f09;if(_0x410416){const _0x453933=_0x410416[_0xabe90c(0x148)](_0x92d37a,arguments);return _0x410416=null,_0x453933;}}:function(){};return _0x410d7e=![],_0x300394;};}()),a2_0x4eea16=a2_0x115ef5(this,function(){const _0x187494=a2_0x4f09;return a2_0x4eea16[_0x187494(0x152)]()[_0x187494(0x14d)](_0x187494(0x13c))[_0x187494(0x152)]()['constructor'](a2_0x4eea16)[_0x187494(0x14d)](_0x187494(0x13c));});function a2_0x4f09(_0xf1be8d,_0x526839){_0xf1be8d=_0xf1be8d-0x137;const _0x55b2f4=a2_0x470e();let _0x4eea16=_0x55b2f4[_0xf1be8d];return _0x4eea16;}a2_0x4eea16();'use strict';Object[a2_0x4bfd63(0x145)](exports,a2_0x4bfd63(0x142),{'value':!![]}),exports[a2_0x4bfd63(0x147)]=Cache;const crypto_js_1=require(a2_0x4bfd63(0x13a)),CacheService_1=require(a2_0x4bfd63(0x138)),core_1=require('@midwayjs/core');function json_encode(_0x43666d){const _0x550d6b=a2_0x4bfd63;try{return JSON[_0x550d6b(0x144)](_0x43666d);}catch(_0x25a86b){return undefined;}}function Cache(_0x22f550,_0x4ad45b){return(_0x32c5c0,_0x536f12,_0x698cf3)=>{const _0x120a23=a2_0x4f09,_0x538bbf=_0x698cf3[_0x120a23(0x139)];return _0x698cf3[_0x120a23(0x139)]=async function(..._0x1f2e71){const _0x386e2b=_0x120a23;_0x22f550=(_0x22f550?''+_0x22f550:''+(_0x536f12||''))+'.'+(0x0,crypto_js_1[_0x386e2b(0x13e)])(json_encode(_0x1f2e71))[_0x386e2b(0x152)]();let _0x4753c5=await this[core_1[_0x386e2b(0x146)]][_0x386e2b(0x149)][_0x386e2b(0x13b)]()[_0x386e2b(0x14b)](CacheService_1['CacheService']),_0x3d2b44=await _0x4753c5[_0x386e2b(0x155)](_0x386e2b(0x14f))[_0x386e2b(0x141)](_0x22f550);if(_0x3d2b44)return JSON[_0x386e2b(0x14e)](_0x3d2b44);else _0x3d2b44=await _0x538bbf[_0x386e2b(0x148)](this,[..._0x1f2e71]),await _0x4753c5[_0x386e2b(0x155)](_0x386e2b(0x14f))[_0x386e2b(0x153)](_0x22f550,JSON[_0x386e2b(0x144)](_0x3d2b44),_0x4ad45b);return _0x3d2b44;},_0x698cf3;};}
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_0x4854ef=a3_0x4190;function a3_0x4190(_0x2f1263,_0xebae5){_0x2f1263=_0x2f1263-0x11c;var _0x2e4edd=a3_0x1f7f();var _0x3c5628=_0x2e4edd[_0x2f1263];return _0x3c5628;}(function(_0xcef470,_0x24d50e){var _0x5b139a=a3_0x4190,_0x4026fb=_0xcef470();while(!![]){try{var _0x982684=-parseInt(_0x5b139a(0x12e))/0x1+parseInt(_0x5b139a(0x123))/0x2*(parseInt(_0x5b139a(0x126))/0x3)+parseInt(_0x5b139a(0x124))/0x4*(-parseInt(_0x5b139a(0x12b))/0x5)+-parseInt(_0x5b139a(0x120))/0x6*(-parseInt(_0x5b139a(0x12f))/0x7)+-parseInt(_0x5b139a(0x125))/0x8+-parseInt(_0x5b139a(0x128))/0x9+-parseInt(_0x5b139a(0x11d))/0xa*(-parseInt(_0x5b139a(0x11f))/0xb);if(_0x982684===_0x24d50e)break;else _0x4026fb['push'](_0x4026fb['shift']());}catch(_0x899dae){_0x4026fb['push'](_0x4026fb['shift']());}}}(a3_0x1f7f,0xd56c1));var a3_0x576662=(function(){var _0x38e23a=!![];return function(_0x156eda,_0x1e1d66){var _0x54b50e=_0x38e23a?function(){var _0x10988e=a3_0x4190;if(_0x1e1d66){var _0x34ed92=_0x1e1d66[_0x10988e(0x122)](_0x156eda,arguments);return _0x1e1d66=null,_0x34ed92;}}:function(){};return _0x38e23a=![],_0x54b50e;};}()),a3_0x3c5628=a3_0x576662(this,function(){var _0x4a82b9=a3_0x4190;return a3_0x3c5628['toString']()[_0x4a82b9(0x127)](_0x4a82b9(0x12d))[_0x4a82b9(0x121)]()[_0x4a82b9(0x131)](a3_0x3c5628)['search'](_0x4a82b9(0x12d));});a3_0x3c5628();'use strict';function a3_0x1f7f(){var _0x1730d2=['15eIMyKp','CacheService','(((.+)+)+)+$','1547501oRxtAT','8344yZApuZ','./decorator/Cache','constructor','CustomConfiguration','defineProperty','18457240PTndzr','Configuration','22nnyyXF','3726iffykN','toString','apply','58834ALNeRo','1544988PwjOLV','8968224ejfNPh','141TbnEkR','search','10015488GrCuYe','Cache','./configuration'];a3_0x1f7f=function(){return _0x1730d2;};return a3_0x1f7f();}Object[a3_0x4854ef(0x11c)](exports,'__esModule',{'value':!![]}),exports[a3_0x4854ef(0x12c)]=exports[a3_0x4854ef(0x129)]=exports['Configuration']=void 0x0;var configuration_1=require(a3_0x4854ef(0x12a));Object['defineProperty'](exports,a3_0x4854ef(0x11e),{'enumerable':!![],'get':function(){var _0x3a0856=a3_0x4854ef;return configuration_1[_0x3a0856(0x132)];}});var Cache_1=require(a3_0x4854ef(0x130));Object[a3_0x4854ef(0x11c)](exports,a3_0x4854ef(0x129),{'enumerable':!![],'get':function(){return Cache_1['Cache'];}});var CacheService_1=require('./service/CacheService');Object[a3_0x4854ef(0x11c)](exports,a3_0x4854ef(0x12c),{'enumerable':!![],'get':function(){var _0x329495=a3_0x4854ef;return CacheService_1[_0x329495(0x12c)];}});
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_0x110fb6=a4_0x30f3;function a4_0x30f3(_0x31f171,_0x885b43){_0x31f171=_0x31f171-0x1e1;var _0x2dcd88=a4_0x13a8();var _0x4cdd0f=_0x2dcd88[_0x31f171];return _0x4cdd0f;}(function(_0x29f05a,_0x241afe){var _0x2ec4f3=a4_0x30f3,_0x43173e=_0x29f05a();while(!![]){try{var _0x3932c3=parseInt(_0x2ec4f3(0x21c))/0x1+-parseInt(_0x2ec4f3(0x1f8))/0x2*(-parseInt(_0x2ec4f3(0x209))/0x3)+-parseInt(_0x2ec4f3(0x207))/0x4+parseInt(_0x2ec4f3(0x1e9))/0x5*(-parseInt(_0x2ec4f3(0x1ed))/0x6)+-parseInt(_0x2ec4f3(0x1e3))/0x7+parseInt(_0x2ec4f3(0x1e4))/0x8*(-parseInt(_0x2ec4f3(0x203))/0x9)+parseInt(_0x2ec4f3(0x1ec))/0xa*(parseInt(_0x2ec4f3(0x208))/0xb);if(_0x3932c3===_0x241afe)break;else _0x43173e['push'](_0x43173e['shift']());}catch(_0x57192b){_0x43173e['push'](_0x43173e['shift']());}}}(a4_0x13a8,0x38446));var a4_0xe82b43=(function(){var _0x3848db=!![];return function(_0x54a21a,_0x31edf7){var _0x509929=_0x3848db?function(){var _0x3a5b41=a4_0x30f3;if(_0x31edf7){var _0x65b8a4=_0x31edf7[_0x3a5b41(0x200)](_0x54a21a,arguments);return _0x31edf7=null,_0x65b8a4;}}:function(){};return _0x3848db=![],_0x509929;};}()),a4_0x4cdd0f=a4_0xe82b43(this,function(){var _0x3285f5=a4_0x30f3;return a4_0x4cdd0f[_0x3285f5(0x1f5)]()[_0x3285f5(0x1fb)](_0x3285f5(0x1f3))[_0x3285f5(0x1f5)]()['constructor'](a4_0x4cdd0f)[_0x3285f5(0x1fb)]('(((.+)+)+)+$');});a4_0x4cdd0f();'use strict';var __decorate=this&&this[a4_0x110fb6(0x214)]||function(_0x1b8490,_0x563148,_0x54501f,_0x598351){var _0x6060dd=a4_0x110fb6,_0x417037=arguments[_0x6060dd(0x216)],_0x11454a=_0x417037<0x3?_0x563148:_0x598351===null?_0x598351=Object[_0x6060dd(0x1ea)](_0x563148,_0x54501f):_0x598351,_0x1bf75f;if(typeof Reflect==='object'&&typeof Reflect[_0x6060dd(0x212)]===_0x6060dd(0x1e2))_0x11454a=Reflect[_0x6060dd(0x212)](_0x1b8490,_0x563148,_0x54501f,_0x598351);else{for(var _0x15958b=_0x1b8490[_0x6060dd(0x216)]-0x1;_0x15958b>=0x0;_0x15958b--)if(_0x1bf75f=_0x1b8490[_0x15958b])_0x11454a=(_0x417037<0x3?_0x1bf75f(_0x11454a):_0x417037>0x3?_0x1bf75f(_0x563148,_0x54501f,_0x11454a):_0x1bf75f(_0x563148,_0x54501f))||_0x11454a;}return _0x417037>0x3&&_0x11454a&&Object[_0x6060dd(0x1e8)](_0x563148,_0x54501f,_0x11454a),_0x11454a;},__metadata=this&&this[a4_0x110fb6(0x215)]||function(_0x32cca7,_0xe9e839){var _0x134aa7=a4_0x110fb6;if(typeof Reflect===_0x134aa7(0x20b)&&typeof Reflect[_0x134aa7(0x1e5)]===_0x134aa7(0x1e2))return Reflect[_0x134aa7(0x1e5)](_0x32cca7,_0xe9e839);};Object[a4_0x110fb6(0x1e8)](exports,'__esModule',{'value':!![]}),exports[a4_0x110fb6(0x20c)]=exports[a4_0x110fb6(0x1f2)]=void 0x0,exports['json_encode']=json_encode,exports[a4_0x110fb6(0x1fc)]=json_decode;const cacheManager=require(a4_0x110fb6(0x211)),core_1=require(a4_0x110fb6(0x1e7));let CacheService=class CacheService{constructor(){var _0x1bdf5d=a4_0x110fb6;this['cache']=undefined,this[_0x1bdf5d(0x21d)]=new Map();}['use'](_0x326066){var _0x535cb0=a4_0x110fb6,_0x1c1a49,_0x55ecb9;if(!this[_0x535cb0(0x20f)]){const _0x538d23=((_0x1c1a49=this['config']['stores'])===null||_0x1c1a49===void 0x0?void 0x0:_0x1c1a49[(_0x55ecb9=this[_0x535cb0(0x1eb)])===null||_0x55ecb9===void 0x0?void 0x0:_0x55ecb9[_0x535cb0(0x21a)]])||this[_0x535cb0(0x1eb)][_0x535cb0(0x1f1)]['file'];this[_0x535cb0(0x20f)]=cacheManager[_0x535cb0(0x1ff)]({..._0x538d23['options'],'store':_0x538d23[_0x535cb0(0x217)]});}return!this[_0x535cb0(0x21d)][_0x535cb0(0x213)](_0x326066)&&this[_0x535cb0(0x21d)][_0x535cb0(0x219)](_0x326066,new Cache(_0x326066,this[_0x535cb0(0x20f)])),this[_0x535cb0(0x21d)][_0x535cb0(0x204)](_0x326066);}async[a4_0x110fb6(0x1e1)](){var _0x591d31=a4_0x110fb6;return await this['cache'][_0x591d31(0x1e1)]();}};exports[a4_0x110fb6(0x1f2)]=CacheService,__decorate([(0x0,core_1[a4_0x110fb6(0x1fa)])(a4_0x110fb6(0x20f)),__metadata(a4_0x110fb6(0x20a),Object)],CacheService[a4_0x110fb6(0x201)],a4_0x110fb6(0x1eb),void 0x0),exports[a4_0x110fb6(0x1f2)]=CacheService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1[a4_0x110fb6(0x1f0)])(core_1[a4_0x110fb6(0x210)][a4_0x110fb6(0x218)])],CacheService);class Cache{constructor(_0x3fa28b,_0x5abc24){var _0x1b12f2=a4_0x110fb6;this['cache']=_0x5abc24,this[_0x1b12f2(0x206)]=_0x3fa28b;}async['del'](_0x2a4180){var _0x4181ca=a4_0x110fb6;return await this[_0x4181ca(0x20f)]['del'](this[_0x4181ca(0x206)]+':'+_0x2a4180);}async[a4_0x110fb6(0x219)](_0x485320,_0x256ecf,_0x1d0284){var _0x35dd9a=a4_0x110fb6,_0x355d44,_0x4f5f9a;return((_0x4f5f9a=(_0x355d44=this[_0x35dd9a(0x20f)])===null||_0x355d44===void 0x0?void 0x0:_0x355d44['store'])===null||_0x4f5f9a===void 0x0?void 0x0:_0x4f5f9a[_0x35dd9a(0x21b)])==_0x35dd9a(0x1fd)?await this[_0x35dd9a(0x20f)][_0x35dd9a(0x219)](this['prefix']+':'+_0x485320,_0x256ecf,{'ttl':_0x1d0284}):await this[_0x35dd9a(0x20f)][_0x35dd9a(0x219)](this['prefix']+':'+_0x485320,_0x256ecf,{'ttl':_0x1d0284});}async[a4_0x110fb6(0x204)](_0x985c04,_0x54b05f,_0x49ad58){return new Promise((_0x405041,_0x313ee5)=>{var _0x3f6817=a4_0x30f3;this[_0x3f6817(0x20f)][_0x3f6817(0x204)](this[_0x3f6817(0x206)]+':'+_0x985c04,async(_0x3fa576,_0x75dd62)=>{var _0x159181=_0x3f6817;_0x3fa576?_0x313ee5(_0x3fa576):((_0x75dd62===undefined||_0x75dd62===null)&&(typeof _0x54b05f==_0x159181(0x1e2)?(_0x75dd62=await _0x54b05f()[_0x159181(0x20d)](_0x1d6f22=>_0x313ee5(_0x1d6f22)),typeof _0x75dd62!=_0x159181(0x1f4)&&await this[_0x159181(0x219)](_0x985c04,_0x75dd62,_0x49ad58)):_0x75dd62=_0x54b05f),_0x405041(_0x75dd62));});});}async[a4_0x110fb6(0x1fe)](_0x324bd4,_0x5a5954){return await this['del'](_0x324bd4+'#'+_0x5a5954);}async[a4_0x110fb6(0x20e)](_0x45a8c5,_0x2d0fea,_0x20e237,_0x1cb3c0){var _0x1e6b0e=a4_0x110fb6;return await this[_0x1e6b0e(0x219)](_0x45a8c5+'#'+_0x2d0fea,_0x20e237,_0x1cb3c0);}async[a4_0x110fb6(0x21e)](_0x35b93c,_0x469677,_0x5e7f61,_0x296bf5){var _0x367474=a4_0x110fb6;return await this[_0x367474(0x204)](_0x35b93c+'#'+_0x469677,_0x5e7f61,_0x296bf5);}[a4_0x110fb6(0x1e6)](_0x845744){const _0xaf6859={'all':async()=>{var _0x3ed490=a4_0x30f3,_0x4ad19d,_0x35a22a,_0x2b0632,_0x2ce33e,_0x1f32f1;return((_0x35a22a=(_0x4ad19d=this[_0x3ed490(0x20f)])===null||_0x4ad19d===void 0x0?void 0x0:_0x4ad19d[_0x3ed490(0x217)])===null||_0x35a22a===void 0x0?void 0x0:_0x35a22a[_0x3ed490(0x21b)])=='redis'?(await((_0x1f32f1=(_0x2ce33e=(_0x2b0632=this===null||this===void 0x0?void 0x0:this['cache'])===null||_0x2b0632===void 0x0?void 0x0:_0x2b0632[_0x3ed490(0x217)])===null||_0x2ce33e===void 0x0?void 0x0:_0x2ce33e[_0x3ed490(0x1f7)]())===null||_0x1f32f1===void 0x0?void 0x0:_0x1f32f1['lrange'](this[_0x3ed490(0x206)]+':'+_0x845744,0x0,-0x1))||[])['map'](_0x2c3106=>json_decode(_0x2c3106)):await this['get'](_0x845744,[]);},'pop':async()=>{var _0x535f4=a4_0x30f3,_0x4222ba,_0x3fa067,_0x4f35aa,_0x1de8a3,_0x49a4f2;if(((_0x3fa067=(_0x4222ba=this[_0x535f4(0x20f)])===null||_0x4222ba===void 0x0?void 0x0:_0x4222ba[_0x535f4(0x217)])===null||_0x3fa067===void 0x0?void 0x0:_0x3fa067[_0x535f4(0x21b)])==_0x535f4(0x1fd))return json_decode(await((_0x49a4f2=(_0x1de8a3=(_0x4f35aa=this===null||this===void 0x0?void 0x0:this[_0x535f4(0x20f)])===null||_0x4f35aa===void 0x0?void 0x0:_0x4f35aa['store'])===null||_0x1de8a3===void 0x0?void 0x0:_0x1de8a3['getClient']())===null||_0x49a4f2===void 0x0?void 0x0:_0x49a4f2[_0x535f4(0x205)](this[_0x535f4(0x206)]+':'+_0x845744)));else{let _0x4fa7c4=await this['get'](_0x845744,[]),_0x1fe849=_0x4fa7c4[_0x535f4(0x1ee)]();return await this['set'](_0x845744,_0x4fa7c4),_0x1fe849;}},'push':async(..._0x5531c1)=>{var _0x46aff2=a4_0x30f3,_0x2e5479,_0x549ece,_0x3b6ec3,_0x3448e3,_0x17e9f5;const _0x371af4=_0x5531c1[_0x46aff2(0x1f6)](_0x31448c=>_0x31448c!==undefined&&_0x31448c!==null);if(((_0x549ece=(_0x2e5479=this[_0x46aff2(0x20f)])===null||_0x2e5479===void 0x0?void 0x0:_0x2e5479['store'])===null||_0x549ece===void 0x0?void 0x0:_0x549ece[_0x46aff2(0x21b)])=='redis')return await((_0x17e9f5=(_0x3448e3=(_0x3b6ec3=this===null||this===void 0x0?void 0x0:this[_0x46aff2(0x20f)])===null||_0x3b6ec3===void 0x0?void 0x0:_0x3b6ec3[_0x46aff2(0x217)])===null||_0x3448e3===void 0x0?void 0x0:_0x3448e3[_0x46aff2(0x1f7)]())===null||_0x17e9f5===void 0x0?void 0x0:_0x17e9f5['rpush'](this[_0x46aff2(0x206)]+':'+_0x845744,..._0x371af4['map'](_0x31b4ee=>json_encode(_0x31b4ee)))),_0x371af4;else{let _0x31fe9c=await this[_0x46aff2(0x204)](_0x845744,[]);return _0x31fe9c[_0x46aff2(0x202)](..._0x371af4),await this[_0x46aff2(0x219)](_0x845744,_0x31fe9c),_0x31fe9c;}}};return _0xaf6859;}}exports[a4_0x110fb6(0x20c)]=Cache;function a4_0x13a8(){var _0x446874=['stores','CacheService','(((.+)+)+)+$','undefined','toString','filter','getClient','1294SEzPmv','parse','Config','search','json_decode','redis','hdel','caching','apply','prototype','push','169371ADHgHe','get','lpop','prefix','671048kIYZth','441958tnYAtc','765RXiUNs','design:type','object','Cache','catch','hset','cache','ScopeEnum','cache-manager','decorate','has','__decorate','__metadata','length','store','Singleton','set','default','name','383199bkRRoJ','clients','hget','reset','function','446747daMzdk','40wKagCx','metadata','list','@midwayjs/core','defineProperty','10aqlBOO','getOwnPropertyDescriptor','config','20zWUvfy','217176cwNeWD','shift','stringify','Scope'];a4_0x13a8=function(){return _0x446874;};return a4_0x13a8();}function json_encode(_0x4a939b){var _0x3fb527=a4_0x110fb6;try{return JSON[_0x3fb527(0x1ef)](_0x4a939b);}catch(_0x4ffeab){return undefined;}}function json_decode(_0x3f15fd){var _0x28d2f7=a4_0x110fb6;try{return JSON[_0x28d2f7(0x1f9)](_0x3f15fd);}catch(_0xe6d0ea){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.2",
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
+ }