@anncic-api/cache 3.4.80 → 3.4.82
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
|
|
1
|
+
const a0_0x281d28=a0_0x1eea;(function(_0xd979c,_0x1ede08){const _0x224a79=a0_0x1eea,_0x4f40fe=_0xd979c();while(!![]){try{const _0x1e1b4e=-parseInt(_0x224a79(0x198))/0x1+parseInt(_0x224a79(0x195))/0x2*(-parseInt(_0x224a79(0x1a4))/0x3)+parseInt(_0x224a79(0x19f))/0x4+parseInt(_0x224a79(0x1aa))/0x5+-parseInt(_0x224a79(0x19c))/0x6+parseInt(_0x224a79(0x196))/0x7+-parseInt(_0x224a79(0x19b))/0x8*(-parseInt(_0x224a79(0x1a5))/0x9);if(_0x1e1b4e===_0x1ede08)break;else _0x4f40fe['push'](_0x4f40fe['shift']());}catch(_0x20544d){_0x4f40fe['push'](_0x4f40fe['shift']());}}}(a0_0x1ff7,0x3f3e1));const a0_0xa01e02=(function(){let _0x2e78f8=!![];return function(_0x2086dd,_0x49816b){const _0x1c6fff=_0x2e78f8?function(){const _0x5eb808=a0_0x1eea;if(_0x49816b){const _0x43eeea=_0x49816b[_0x5eb808(0x19e)](_0x2086dd,arguments);return _0x49816b=null,_0x43eeea;}}:function(){};return _0x2e78f8=![],_0x1c6fff;};}()),a0_0x338525=a0_0xa01e02(this,function(){const _0x514f4c=a0_0x1eea;return a0_0x338525[_0x514f4c(0x1a9)]()['search']('(((.+)+)+)+$')[_0x514f4c(0x1a9)]()[_0x514f4c(0x1a1)](a0_0x338525)[_0x514f4c(0x199)]('(((.+)+)+)+$');});a0_0x338525();function a0_0x1eea(_0xec64f5,_0xcaa56b){const _0x16d88f=a0_0x1ff7();return a0_0x1eea=function(_0x338525,_0xa01e02){_0x338525=_0x338525-0x195;let _0x1ff71c=_0x16d88f[_0x338525];return _0x1ff71c;},a0_0x1eea(_0xec64f5,_0xcaa56b);}'use strict';Object['defineProperty'](exports,a0_0x281d28(0x19a),{'value':!![]});const fsStore=require(a0_0x281d28(0x1a8)),redisStore=require(a0_0x281d28(0x197));function a0_0x1ff7(){const _0x28e470=['434482DnMSDB','1410038DUywvd','cache-manager-ioredis','332030tQkALS','search','__esModule','362888knSaeg','975372qihnXA','/runtime/.cache','apply','1988096AXpaNH','appDir','constructor','file','memory','3ZUWdyO','27TZgiff','name','env','cache-manager-fs-hash','toString','681665srxSTn'];a0_0x1ff7=function(){return _0x28e470;};return a0_0x1ff7();}exports['default']=_0x2e18a0=>{const _0x5c4551=a0_0x281d28;return{'cache':{'default':_0x5c4551(0x1a2),'stores':{'file':{'store':fsStore,'options':{'subdirs':![],'path':_0x2e18a0[_0x5c4551(0x1a0)]+_0x5c4551(0x19d)+((_0x2e18a0===null||_0x2e18a0===void 0x0?void 0x0:_0x2e18a0[_0x5c4551(0x1a7)])?'-'+_0x2e18a0[_0x5c4551(0x1a7)]:'')}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':'127.0.0.1','password':'','keyPrefix':_0x2e18a0[_0x5c4551(0x1a6)]+':'+((_0x2e18a0===null||_0x2e18a0===void 0x0?void 0x0:_0x2e18a0[_0x5c4551(0x1a7)])?_0x2e18a0[_0x5c4551(0x1a7)]+':':'')}},'memory':{'store':_0x5c4551(0x1a3),'options':{'max':0x64}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a1_0x43db8e=a1_0x3626;(function(_0x4c5de6,_0x505dc5){var _0x2c3694=a1_0x3626,_0x220285=_0x4c5de6();while(!![]){try{var _0x40e2e3=parseInt(_0x2c3694(0x102))/0x1+-parseInt(_0x2c3694(0x117))/0x2+parseInt(_0x2c3694(0x110))/0x3*(-parseInt(_0x2c3694(0x118))/0x4)+parseInt(_0x2c3694(0x10b))/0x5*(-parseInt(_0x2c3694(0x103))/0x6)+parseInt(_0x2c3694(0x119))/0x7+parseInt(_0x2c3694(0x100))/0x8*(parseInt(_0x2c3694(0x10c))/0x9)+-parseInt(_0x2c3694(0x115))/0xa;if(_0x40e2e3===_0x505dc5)break;else _0x220285['push'](_0x220285['shift']());}catch(_0x937ca3){_0x220285['push'](_0x220285['shift']());}}}(a1_0x1967,0x57d04));var a1_0x2b107a=(function(){var _0x156221=!![];return function(_0x537a8e,_0x465ee0){var _0x3ecfc6=_0x156221?function(){var _0x5f567e=a1_0x3626;if(_0x465ee0){var _0x56611c=_0x465ee0[_0x5f567e(0x10d)](_0x537a8e,arguments);return _0x465ee0=null,_0x56611c;}}:function(){};return _0x156221=![],_0x3ecfc6;};}()),a1_0x2b0dcb=a1_0x2b107a(this,function(){var _0x97343=a1_0x3626;return a1_0x2b0dcb[_0x97343(0x10e)]()['search'](_0x97343(0x109))[_0x97343(0x10e)]()[_0x97343(0x104)](a1_0x2b0dcb)[_0x97343(0x107)](_0x97343(0x109));});a1_0x2b0dcb();function a1_0x1967(){var _0x2e952d=['defineProperty','decorate','6059650pnFyrI','object','1382100ehGhkE','8PPkYBj','3731028VEbQtF','__esModule','8WLVaib','anncic-api:cache','595390psiNDQ','174630SLjrZO','constructor','CustomConfiguration','@midwayjs/core','search','length','(((.+)+)+)+$','Configuration','10YtQfEI','5689053nHBQUs','apply','toString','function','68403hoJSfQ','getOwnPropertyDescriptor','./config/config.default'];a1_0x1967=function(){return _0x2e952d;};return a1_0x1967();}function a1_0x3626(_0xc0ff33,_0x5b2c5a){var _0x2eda59=a1_0x1967();return a1_0x3626=function(_0x2b0dcb,_0x2b107a){_0x2b0dcb=_0x2b0dcb-0xff;var _0x196762=_0x2eda59[_0x2b0dcb];return _0x196762;},a1_0x3626(_0xc0ff33,_0x5b2c5a);}'use strict';var __decorate=this&&this['__decorate']||function(_0x52cb1f,_0x2eae4a,_0x5936a9,_0x1bef55){var _0x78952f=a1_0x3626,_0x5ac6bf=arguments[_0x78952f(0x108)],_0x11ced0=_0x5ac6bf<0x3?_0x2eae4a:_0x1bef55===null?_0x1bef55=Object[_0x78952f(0x111)](_0x2eae4a,_0x5936a9):_0x1bef55,_0x4f648e;if(typeof Reflect===_0x78952f(0x116)&&typeof Reflect['decorate']===_0x78952f(0x10f))_0x11ced0=Reflect[_0x78952f(0x114)](_0x52cb1f,_0x2eae4a,_0x5936a9,_0x1bef55);else{for(var _0x4c117e=_0x52cb1f[_0x78952f(0x108)]-0x1;_0x4c117e>=0x0;_0x4c117e--)if(_0x4f648e=_0x52cb1f[_0x4c117e])_0x11ced0=(_0x5ac6bf<0x3?_0x4f648e(_0x11ced0):_0x5ac6bf>0x3?_0x4f648e(_0x2eae4a,_0x5936a9,_0x11ced0):_0x4f648e(_0x2eae4a,_0x5936a9))||_0x11ced0;}return _0x5ac6bf>0x3&&_0x11ced0&&Object[_0x78952f(0x113)](_0x2eae4a,_0x5936a9,_0x11ced0),_0x11ced0;};Object[a1_0x43db8e(0x113)](exports,a1_0x43db8e(0xff),{'value':!![]}),exports[a1_0x43db8e(0x105)]=void 0x0;const core_1=require(a1_0x43db8e(0x106)),ConfigDefault=require(a1_0x43db8e(0x112));let CustomConfiguration=class CustomConfiguration{};exports[a1_0x43db8e(0x105)]=CustomConfiguration,exports[a1_0x43db8e(0x105)]=CustomConfiguration=__decorate([(0x0,core_1[a1_0x43db8e(0x10a)])({'conflictCheck':![],'namespace':a1_0x43db8e(0x101),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x23dbfc=a2_0x4f59;(function(_0x54235f,_0x457539){const _0x27dfb7=a2_0x4f59,_0x3a6caa=_0x54235f();while(!![]){try{const _0x55dd62=-parseInt(_0x27dfb7(0x7d))/0x1+-parseInt(_0x27dfb7(0x7c))/0x2+-parseInt(_0x27dfb7(0x80))/0x3*(-parseInt(_0x27dfb7(0x6c))/0x4)+parseInt(_0x27dfb7(0x76))/0x5+-parseInt(_0x27dfb7(0x78))/0x6+-parseInt(_0x27dfb7(0x69))/0x7+parseInt(_0x27dfb7(0x6b))/0x8*(parseInt(_0x27dfb7(0x85))/0x9);if(_0x55dd62===_0x457539)break;else _0x3a6caa['push'](_0x3a6caa['shift']());}catch(_0x4d31ec){_0x3a6caa['push'](_0x3a6caa['shift']());}}}(a2_0x1c26,0x9f373));const a2_0x160536=(function(){let _0x16891b=!![];return function(_0x59c151,_0x526f52){const _0x503ef7=_0x16891b?function(){if(_0x526f52){const _0x453828=_0x526f52['apply'](_0x59c151,arguments);return _0x526f52=null,_0x453828;}}:function(){};return _0x16891b=![],_0x503ef7;};}()),a2_0x9a0625=a2_0x160536(this,function(){const _0x5b4269=a2_0x4f59;return a2_0x9a0625['toString']()[_0x5b4269(0x7a)](_0x5b4269(0x81))[_0x5b4269(0x6a)]()['constructor'](a2_0x9a0625)[_0x5b4269(0x7a)](_0x5b4269(0x81));});a2_0x9a0625();'use strict';Object[a2_0x23dbfc(0x71)](exports,a2_0x23dbfc(0x6d),{'value':!![]}),exports[a2_0x23dbfc(0x6f)]=Cache;const crypto_js_1=require(a2_0x23dbfc(0x6e)),CacheService_1=require(a2_0x23dbfc(0x84)),core_1=require(a2_0x23dbfc(0x87));function json_encode(_0x1aa406){try{return JSON['stringify'](_0x1aa406);}catch(_0xe252af){return undefined;}}function a2_0x4f59(_0x1d1c54,_0x47bb67){const _0x5b3de7=a2_0x1c26();return a2_0x4f59=function(_0x9a0625,_0x160536){_0x9a0625=_0x9a0625-0x69;let _0x1c26fa=_0x5b3de7[_0x9a0625];return _0x1c26fa;},a2_0x4f59(_0x1d1c54,_0x47bb67);}function a2_0x1c26(){const _0x3c7eaa=['CacheService','Method::Decorator','5706955ilcHtl','REQUEST_OBJ_CTX_KEY','1055964EpumVv','MD5','search','getApplicationContext','311134gzyMEN','1168633AczMXU','value','stringify','6CuBPVo','(((.+)+)+)+$','parse','get','../service/CacheService','1848114gmIExB','app','@midwayjs/core','3173856GYdmXf','toString','8EwWGMm','2518024VHFMaK','__esModule','crypto-js','Cache','apply','defineProperty','getAsync','use'];a2_0x1c26=function(){return _0x3c7eaa;};return a2_0x1c26();}function Cache(_0x56af6a,_0x265961){return(_0x5a4bfa,_0x2004ac,_0xe692c9)=>{const _0x20a00b=a2_0x4f59,_0x58c975=_0xe692c9[_0x20a00b(0x7e)];return _0xe692c9[_0x20a00b(0x7e)]=async function(..._0x397346){const _0x5f04a1=_0x20a00b;_0x56af6a=(_0x56af6a?''+_0x56af6a:''+(_0x2004ac||''))+'.'+(0x0,crypto_js_1[_0x5f04a1(0x79)])(json_encode(_0x397346))[_0x5f04a1(0x6a)]();let _0x87c6ef=await this[core_1[_0x5f04a1(0x77)]][_0x5f04a1(0x86)][_0x5f04a1(0x7b)]()[_0x5f04a1(0x72)](CacheService_1[_0x5f04a1(0x74)]),_0x5a445e=await _0x87c6ef[_0x5f04a1(0x73)](_0x5f04a1(0x75))[_0x5f04a1(0x83)](_0x56af6a);if(_0x5a445e)return JSON[_0x5f04a1(0x82)](_0x5a445e);else _0x5a445e=await _0x58c975[_0x5f04a1(0x70)](this,[..._0x397346]),await _0x87c6ef[_0x5f04a1(0x73)](_0x5f04a1(0x75))['set'](_0x56af6a,JSON[_0x5f04a1(0x7f)](_0x5a445e),_0x265961);return _0x5a445e;},_0xe692c9;};}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a3_0x926af7=a3_0x3b7c;(function(_0x322c27,_0x591473){var _0x3532a6=a3_0x3b7c,_0x550fe4=_0x322c27();while(!![]){try{var _0x9cb75c=parseInt(_0x3532a6(0xd8))/0x1*(parseInt(_0x3532a6(0xd4))/0x2)+-parseInt(_0x3532a6(0xe6))/0x3+parseInt(_0x3532a6(0xda))/0x4*(-parseInt(_0x3532a6(0xd7))/0x5)+parseInt(_0x3532a6(0xde))/0x6*(-parseInt(_0x3532a6(0xdd))/0x7)+parseInt(_0x3532a6(0xe0))/0x8*(-parseInt(_0x3532a6(0xe9))/0x9)+-parseInt(_0x3532a6(0xe4))/0xa+-parseInt(_0x3532a6(0xd3))/0xb*(-parseInt(_0x3532a6(0xe2))/0xc);if(_0x9cb75c===_0x591473)break;else _0x550fe4['push'](_0x550fe4['shift']());}catch(_0x31c35a){_0x550fe4['push'](_0x550fe4['shift']());}}}(a3_0x3350,0xab508));var a3_0x1b6ade=(function(){var _0x9dffbe=!![];return function(_0x2ac501,_0xc5dc87){var _0x46f406=_0x9dffbe?function(){var _0x1d3c85=a3_0x3b7c;if(_0xc5dc87){var _0x1672f4=_0xc5dc87[_0x1d3c85(0xdc)](_0x2ac501,arguments);return _0xc5dc87=null,_0x1672f4;}}:function(){};return _0x9dffbe=![],_0x46f406;};}()),a3_0x33d497=a3_0x1b6ade(this,function(){var _0x2c1ce4=a3_0x3b7c;return a3_0x33d497[_0x2c1ce4(0xe1)]()['search'](_0x2c1ce4(0xd9))[_0x2c1ce4(0xe1)]()[_0x2c1ce4(0xea)](a3_0x33d497)[_0x2c1ce4(0xe8)](_0x2c1ce4(0xd9));});a3_0x33d497();'use strict';Object['defineProperty'](exports,a3_0x926af7(0xd6),{'value':!![]}),exports[a3_0x926af7(0xd5)]=exports['Cache']=exports[a3_0x926af7(0xe3)]=void 0x0;var configuration_1=require(a3_0x926af7(0xdf));Object[a3_0x926af7(0xe5)](exports,a3_0x926af7(0xe3),{'enumerable':!![],'get':function(){var _0x5dc9e5=a3_0x926af7;return configuration_1[_0x5dc9e5(0xe7)];}});var Cache_1=require(a3_0x926af7(0xdb));function a3_0x3b7c(_0x2d497e,_0x58daf2){var _0x5abaa0=a3_0x3350();return a3_0x3b7c=function(_0x33d497,_0x1b6ade){_0x33d497=_0x33d497-0xd3;var _0x335050=_0x5abaa0[_0x33d497];return _0x335050;},a3_0x3b7c(_0x2d497e,_0x58daf2);}Object[a3_0x926af7(0xe5)](exports,'Cache',{'enumerable':!![],'get':function(){return Cache_1['Cache'];}});var CacheService_1=require('./service/CacheService');Object[a3_0x926af7(0xe5)](exports,a3_0x926af7(0xd5),{'enumerable':!![],'get':function(){var _0x1f74d1=a3_0x926af7;return CacheService_1[_0x1f74d1(0xd5)];}});function a3_0x3350(){var _0x26af30=['./decorator/Cache','apply','35EEXxNA','197004qGklvb','./configuration','688mbQMYA','toString','1524YLIEfi','Configuration','925870qxAgmd','defineProperty','1959033UUWPte','CustomConfiguration','search','28908lybbKA','constructor','185119WHSBJB','78896mapccq','CacheService','__esModule','2825815hKDkrd','8ZEGfLN','(((.+)+)+)+$','4cmDuox'];a3_0x3350=function(){return _0x26af30;};return a3_0x3350();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x1e3134=a4_0x45bd;(function(_0x35e1bd,_0x4255aa){var _0x31faa6=a4_0x45bd,_0x5ad04d=_0x35e1bd();while(!![]){try{var _0x47018d=-parseInt(_0x31faa6(0x126))/0x1*(-parseInt(_0x31faa6(0x140))/0x2)+-parseInt(_0x31faa6(0x133))/0x3+-parseInt(_0x31faa6(0x131))/0x4+parseInt(_0x31faa6(0x14d))/0x5+-parseInt(_0x31faa6(0x13e))/0x6*(parseInt(_0x31faa6(0x157))/0x7)+parseInt(_0x31faa6(0x15b))/0x8*(-parseInt(_0x31faa6(0x134))/0x9)+parseInt(_0x31faa6(0x125))/0xa;if(_0x47018d===_0x4255aa)break;else _0x5ad04d['push'](_0x5ad04d['shift']());}catch(_0x39c9f9){_0x5ad04d['push'](_0x5ad04d['shift']());}}}(a4_0x312d,0x7a837));var a4_0x2f4ef1=(function(){var _0x2186de=!![];return function(_0x477788,_0x266861){var _0x5c632b=_0x2186de?function(){var _0x478916=a4_0x45bd;if(_0x266861){var _0xe2d3c0=_0x266861[_0x478916(0x14a)](_0x477788,arguments);return _0x266861=null,_0xe2d3c0;}}:function(){};return _0x2186de=![],_0x5c632b;};}()),a4_0x4e13ee=a4_0x2f4ef1(this,function(){var _0x5e51f9=a4_0x45bd;return a4_0x4e13ee[_0x5e51f9(0x158)]()[_0x5e51f9(0x14b)](_0x5e51f9(0x15e))[_0x5e51f9(0x158)]()['constructor'](a4_0x4e13ee)[_0x5e51f9(0x14b)]('(((.+)+)+)+$');});a4_0x4e13ee();'use strict';var __decorate=this&&this[a4_0x1e3134(0x142)]||function(_0x380412,_0x378276,_0xb749f4,_0x4f11f5){var _0x3e7e99=a4_0x1e3134,_0x2e6d24=arguments[_0x3e7e99(0x14f)],_0x336384=_0x2e6d24<0x3?_0x378276:_0x4f11f5===null?_0x4f11f5=Object[_0x3e7e99(0x141)](_0x378276,_0xb749f4):_0x4f11f5,_0x417204;if(typeof Reflect===_0x3e7e99(0x15f)&&typeof Reflect[_0x3e7e99(0x15d)]==='function')_0x336384=Reflect[_0x3e7e99(0x15d)](_0x380412,_0x378276,_0xb749f4,_0x4f11f5);else{for(var _0x299d3a=_0x380412[_0x3e7e99(0x14f)]-0x1;_0x299d3a>=0x0;_0x299d3a--)if(_0x417204=_0x380412[_0x299d3a])_0x336384=(_0x2e6d24<0x3?_0x417204(_0x336384):_0x2e6d24>0x3?_0x417204(_0x378276,_0xb749f4,_0x336384):_0x417204(_0x378276,_0xb749f4))||_0x336384;}return _0x2e6d24>0x3&&_0x336384&&Object[_0x3e7e99(0x143)](_0x378276,_0xb749f4,_0x336384),_0x336384;},__metadata=this&&this['__metadata']||function(_0x886d9b,_0x30226d){var _0x4604cc=a4_0x1e3134;if(typeof Reflect===_0x4604cc(0x15f)&&typeof Reflect[_0x4604cc(0x139)]===_0x4604cc(0x159))return Reflect['metadata'](_0x886d9b,_0x30226d);};Object[a4_0x1e3134(0x143)](exports,'__esModule',{'value':!![]}),exports['Cache']=exports[a4_0x1e3134(0x149)]=void 0x0,exports[a4_0x1e3134(0x128)]=json_encode,exports[a4_0x1e3134(0x14e)]=json_decode;function a4_0x312d(){var _0x3d2501=['hdel','Config','map','stores','has','set','cache-manager','3183524yKkGPP','clients','2933649PnBxAS','1251hdoLnV','use','rpush','store','stringify','metadata','del','Singleton','Scope','reset','15408hobfHD','default','13130jShVgV','getOwnPropertyDescriptor','__decorate','defineProperty','prefix','Provide','get','name','file','CacheService','apply','search','lpop','2332870mSCLbs','json_decode','length','cache','undefined','list','parse','redis','@midwayjs/core','push','2520yEmMOV','toString','function','lrange','3856lGXsxL','getClient','decorate','(((.+)+)+)+$','object','shift','27742230FpYhwy','4cfApAc','prototype','json_encode','config'];a4_0x312d=function(){return _0x3d2501;};return a4_0x312d();}function a4_0x45bd(_0xa8e02b,_0x2eeaab){var _0xc1b766=a4_0x312d();return a4_0x45bd=function(_0x4e13ee,_0x2f4ef1){_0x4e13ee=_0x4e13ee-0x124;var _0x312d2c=_0xc1b766[_0x4e13ee];return _0x312d2c;},a4_0x45bd(_0xa8e02b,_0x2eeaab);}const cacheManager=require(a4_0x1e3134(0x130)),core_1=require(a4_0x1e3134(0x155));let CacheService=class CacheService{constructor(){var _0x334f0d=a4_0x1e3134;this[_0x334f0d(0x150)]=undefined,this[_0x334f0d(0x132)]=new Map();}[a4_0x1e3134(0x135)](_0x4821c0){var _0x32209b=a4_0x1e3134,_0x242d4f,_0x1ee5fd;if(!this[_0x32209b(0x150)]){const _0x385b7f=((_0x242d4f=this[_0x32209b(0x129)][_0x32209b(0x12d)])===null||_0x242d4f===void 0x0?void 0x0:_0x242d4f[(_0x1ee5fd=this[_0x32209b(0x129)])===null||_0x1ee5fd===void 0x0?void 0x0:_0x1ee5fd[_0x32209b(0x13f)]])||this['config'][_0x32209b(0x12d)][_0x32209b(0x148)];this[_0x32209b(0x150)]=cacheManager['caching']({..._0x385b7f['options'],'store':_0x385b7f[_0x32209b(0x137)]});}return!this[_0x32209b(0x132)][_0x32209b(0x12e)](_0x4821c0)&&this[_0x32209b(0x132)][_0x32209b(0x12f)](_0x4821c0,new Cache(_0x4821c0,this[_0x32209b(0x150)])),this[_0x32209b(0x132)][_0x32209b(0x146)](_0x4821c0);}async[a4_0x1e3134(0x13d)](){var _0x1bb381=a4_0x1e3134;return await this[_0x1bb381(0x150)][_0x1bb381(0x13d)]();}};exports[a4_0x1e3134(0x149)]=CacheService,__decorate([(0x0,core_1[a4_0x1e3134(0x12b)])('cache'),__metadata('design:type',Object)],CacheService[a4_0x1e3134(0x127)],a4_0x1e3134(0x129),void 0x0),exports[a4_0x1e3134(0x149)]=CacheService=__decorate([(0x0,core_1[a4_0x1e3134(0x145)])(),(0x0,core_1[a4_0x1e3134(0x13c)])(core_1['ScopeEnum'][a4_0x1e3134(0x13b)])],CacheService);class Cache{constructor(_0x3fd409,_0x229a58){var _0x91e3be=a4_0x1e3134;this['cache']=_0x229a58,this[_0x91e3be(0x144)]=_0x3fd409;}async['del'](_0x51072b){var _0x4620e2=a4_0x1e3134;return await this[_0x4620e2(0x150)][_0x4620e2(0x13a)](this[_0x4620e2(0x144)]+':'+_0x51072b);}async['set'](_0xed6854,_0x443a94,_0x156856){var _0xa5d7f7=a4_0x1e3134,_0x325acb,_0x51a980;return((_0x51a980=(_0x325acb=this['cache'])===null||_0x325acb===void 0x0?void 0x0:_0x325acb[_0xa5d7f7(0x137)])===null||_0x51a980===void 0x0?void 0x0:_0x51a980[_0xa5d7f7(0x147)])==_0xa5d7f7(0x154)?await this[_0xa5d7f7(0x150)][_0xa5d7f7(0x12f)](this[_0xa5d7f7(0x144)]+':'+_0xed6854,_0x443a94,{'ttl':_0x156856}):await this[_0xa5d7f7(0x150)][_0xa5d7f7(0x12f)](this['prefix']+':'+_0xed6854,_0x443a94,{'ttl':_0x156856});}async[a4_0x1e3134(0x146)](_0x343a17,_0x2c2533,_0x5ea0fb){return new Promise((_0x5bc222,_0x28a64e)=>{var _0x7aaab7=a4_0x45bd;this['cache'][_0x7aaab7(0x146)](this[_0x7aaab7(0x144)]+':'+_0x343a17,async(_0xe57df8,_0x2b9b29)=>{var _0x24fa2e=_0x7aaab7;_0xe57df8?_0x28a64e(_0xe57df8):((_0x2b9b29===undefined||_0x2b9b29===null)&&(typeof _0x2c2533==_0x24fa2e(0x159)?(_0x2b9b29=await _0x2c2533()['catch'](_0x3f008c=>_0x28a64e(_0x3f008c)),typeof _0x2b9b29!=_0x24fa2e(0x151)&&await this[_0x24fa2e(0x12f)](_0x343a17,_0x2b9b29,_0x5ea0fb)):_0x2b9b29=_0x2c2533),_0x5bc222(_0x2b9b29));});});}async[a4_0x1e3134(0x12a)](_0x244bfa,_0x5a299b){var _0x1ed40f=a4_0x1e3134;return await this[_0x1ed40f(0x13a)](_0x244bfa+'#'+_0x5a299b);}async['hset'](_0x26049a,_0x156bc1,_0x10dad1,_0x83f76f){var _0x20b183=a4_0x1e3134;return await this[_0x20b183(0x12f)](_0x26049a+'#'+_0x156bc1,_0x10dad1,_0x83f76f);}async['hget'](_0xaa2abf,_0x51110a,_0x42fbd1,_0x57e48f){var _0x38cace=a4_0x1e3134;return await this[_0x38cace(0x146)](_0xaa2abf+'#'+_0x51110a,_0x42fbd1,_0x57e48f);}[a4_0x1e3134(0x152)](_0x241623){const _0x6afd3a={'all':async()=>{var _0x51c504=a4_0x45bd,_0xeb83e1,_0x212ef4,_0x2c1147,_0x32c138,_0x37a9ed;return((_0x212ef4=(_0xeb83e1=this['cache'])===null||_0xeb83e1===void 0x0?void 0x0:_0xeb83e1[_0x51c504(0x137)])===null||_0x212ef4===void 0x0?void 0x0:_0x212ef4[_0x51c504(0x147)])==_0x51c504(0x154)?(await((_0x37a9ed=(_0x32c138=(_0x2c1147=this===null||this===void 0x0?void 0x0:this[_0x51c504(0x150)])===null||_0x2c1147===void 0x0?void 0x0:_0x2c1147[_0x51c504(0x137)])===null||_0x32c138===void 0x0?void 0x0:_0x32c138[_0x51c504(0x15c)]())===null||_0x37a9ed===void 0x0?void 0x0:_0x37a9ed[_0x51c504(0x15a)](this['prefix']+':'+_0x241623,0x0,-0x1))||[])[_0x51c504(0x12c)](_0x342a24=>json_decode(_0x342a24)):await this[_0x51c504(0x146)](_0x241623,[]);},'pop':async()=>{var _0x352532=a4_0x45bd,_0x3ac8a4,_0x4e5803,_0x4af2cd,_0x4af301,_0x1a789b;if(((_0x4e5803=(_0x3ac8a4=this[_0x352532(0x150)])===null||_0x3ac8a4===void 0x0?void 0x0:_0x3ac8a4[_0x352532(0x137)])===null||_0x4e5803===void 0x0?void 0x0:_0x4e5803[_0x352532(0x147)])==_0x352532(0x154))return json_decode(await((_0x1a789b=(_0x4af301=(_0x4af2cd=this===null||this===void 0x0?void 0x0:this['cache'])===null||_0x4af2cd===void 0x0?void 0x0:_0x4af2cd['store'])===null||_0x4af301===void 0x0?void 0x0:_0x4af301[_0x352532(0x15c)]())===null||_0x1a789b===void 0x0?void 0x0:_0x1a789b[_0x352532(0x14c)](this[_0x352532(0x144)]+':'+_0x241623)));else{let _0x2a903b=await this[_0x352532(0x146)](_0x241623,[]),_0x1d20b1=_0x2a903b[_0x352532(0x124)]();return await this[_0x352532(0x12f)](_0x241623,_0x2a903b),_0x1d20b1;}},'push':async(..._0x54d01d)=>{var _0x337484=a4_0x45bd,_0x2ec00f,_0x18b5af,_0x1b03d9,_0x264476,_0x27eac4;const _0x5d9134=_0x54d01d['filter'](_0x42519a=>_0x42519a!==undefined&&_0x42519a!==null);if(((_0x18b5af=(_0x2ec00f=this[_0x337484(0x150)])===null||_0x2ec00f===void 0x0?void 0x0:_0x2ec00f[_0x337484(0x137)])===null||_0x18b5af===void 0x0?void 0x0:_0x18b5af[_0x337484(0x147)])=='redis')return await((_0x27eac4=(_0x264476=(_0x1b03d9=this===null||this===void 0x0?void 0x0:this['cache'])===null||_0x1b03d9===void 0x0?void 0x0:_0x1b03d9[_0x337484(0x137)])===null||_0x264476===void 0x0?void 0x0:_0x264476[_0x337484(0x15c)]())===null||_0x27eac4===void 0x0?void 0x0:_0x27eac4[_0x337484(0x136)](this[_0x337484(0x144)]+':'+_0x241623,..._0x5d9134[_0x337484(0x12c)](_0x34e92c=>json_encode(_0x34e92c)))),_0x5d9134;else{let _0xb60913=await this[_0x337484(0x146)](_0x241623,[]);return _0xb60913[_0x337484(0x156)](..._0x5d9134),await this[_0x337484(0x12f)](_0x241623,_0xb60913),_0xb60913;}}};return _0x6afd3a;}}exports['Cache']=Cache;function json_encode(_0xd9d89d){var _0x333ae=a4_0x1e3134;try{return JSON[_0x333ae(0x138)](_0xd9d89d);}catch(_0x414b57){return undefined;}}function json_decode(_0xb2bc7f){var _0x3a98f1=a4_0x1e3134;try{return JSON[_0x3a98f1(0x153)](_0xb2bc7f);}catch(_0x5c5366){return undefined;}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.82",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"javascript-obfuscator": "^4.0.2",
|
|
24
24
|
"typescript": "^5.5.4"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "debe00dc13507e7dba6c7f28a31fa8562715c946"
|
|
27
27
|
}
|