@anncic-api/cache 3.7.3 → 3.7.4
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_0x30f78d=a0_0x5bfe;(function(_0x10c0f4,_0x418df4){const _0x44415e=a0_0x5bfe,_0x2e2420=_0x10c0f4();while(!![]){try{const _0x46645f=-parseInt(_0x44415e(0x141))/0x1+-parseInt(_0x44415e(0x137))/0x2*(-parseInt(_0x44415e(0x140))/0x3)+-parseInt(_0x44415e(0x13c))/0x4+-parseInt(_0x44415e(0x144))/0x5+parseInt(_0x44415e(0x133))/0x6+parseInt(_0x44415e(0x134))/0x7*(parseInt(_0x44415e(0x13e))/0x8)+-parseInt(_0x44415e(0x13b))/0x9;if(_0x46645f===_0x418df4)break;else _0x2e2420['push'](_0x2e2420['shift']());}catch(_0x3db0c7){_0x2e2420['push'](_0x2e2420['shift']());}}}(a0_0x21f2,0xa7d16));const a0_0x2b1df9=(function(){let _0x1dc38f=!![];return function(_0x4d4cc6,_0x46b302){const _0x56760c=_0x1dc38f?function(){if(_0x46b302){const _0x5048a5=_0x46b302['apply'](_0x4d4cc6,arguments);return _0x46b302=null,_0x5048a5;}}:function(){};return _0x1dc38f=![],_0x56760c;};}()),a0_0x1f35ea=a0_0x2b1df9(this,function(){const _0x16c75c=a0_0x5bfe;return a0_0x1f35ea[_0x16c75c(0x131)]()['search'](_0x16c75c(0x13f))[_0x16c75c(0x131)]()[_0x16c75c(0x145)](a0_0x1f35ea)[_0x16c75c(0x142)](_0x16c75c(0x13f));});function a0_0x5bfe(_0x340622,_0x577a15){const _0x554897=a0_0x21f2();return a0_0x5bfe=function(_0x1f35ea,_0x2b1df9){_0x1f35ea=_0x1f35ea-0x131;let _0x21f24e=_0x554897[_0x1f35ea];return _0x21f24e;},a0_0x5bfe(_0x340622,_0x577a15);}a0_0x1f35ea();function a0_0x21f2(){const _0x53ed89=['/runtime/.cache','59192sEMxNv','(((.+)+)+)+$','292101ZORMea','512599mscwug','search','cache-manager-fs-hash','3690425MjGZaA','constructor','name','env','memory','toString','cache-manager-ioredis','6098526YVRAGy','1043VUaHph','__esModule','default','2gXyUTL','appDir','127.0.0.1','file','1519398NYectR','437404bLLnaE'];a0_0x21f2=function(){return _0x53ed89;};return a0_0x21f2();}'use strict';Object['defineProperty'](exports,a0_0x30f78d(0x135),{'value':!![]});const fsStore=require(a0_0x30f78d(0x143)),redisStore=require(a0_0x30f78d(0x132));exports[a0_0x30f78d(0x136)]=_0x3f03ff=>{const _0x3daa53=a0_0x30f78d;return{'cache':{'default':_0x3daa53(0x13a),'stores':{'file':{'store':fsStore,'options':{'subdirs':![],'path':_0x3f03ff[_0x3daa53(0x138)]+_0x3daa53(0x13d)+((_0x3f03ff===null||_0x3f03ff===void 0x0?void 0x0:_0x3f03ff[_0x3daa53(0x147)])?'-'+_0x3f03ff[_0x3daa53(0x147)]:'')}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x3daa53(0x139),'password':'','keyPrefix':_0x3f03ff[_0x3daa53(0x146)]+':'+((_0x3f03ff===null||_0x3f03ff===void 0x0?void 0x0:_0x3f03ff['env'])?_0x3f03ff['env']+':':'')}},'memory':{'store':_0x3daa53(0x148),'options':{'max':0x64}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var a1_0x2e8c42=a1_0x6ade;function a1_0x3ec1(){var _0x5e067a=['decorate','object','function','defineProperty','toString','61514840PKvzrB','(((.+)+)+)+$','length','72FaIqtL','__esModule','6094098TMQbRi','7899016tngZCO','constructor','@midwayjs/core','3819566BjwSkh','search','CustomConfiguration','__decorate','374575IDfPCI','3818664ZRcjsP','anncic-api:cache','1dXHdUE','4259283KONAbd','Configuration','9pWWbEM'];a1_0x3ec1=function(){return _0x5e067a;};return a1_0x3ec1();}(function(_0x4f0665,_0x5e94a1){var _0x143aac=a1_0x6ade,_0x4ff476=_0x4f0665();while(!![]){try{var _0x33cb36=parseInt(_0x143aac(0x1e9))/0x1*(parseInt(_0x143aac(0x1fb))/0x2)+parseInt(_0x143aac(0x1e7))/0x3+-parseInt(_0x143aac(0x1f5))/0x4*(-parseInt(_0x143aac(0x1e6))/0x5)+parseInt(_0x143aac(0x1f7))/0x6+parseInt(_0x143aac(0x1ea))/0x7+parseInt(_0x143aac(0x1f8))/0x8*(parseInt(_0x143aac(0x1ec))/0x9)+-parseInt(_0x143aac(0x1f2))/0xa;if(_0x33cb36===_0x5e94a1)break;else _0x4ff476['push'](_0x4ff476['shift']());}catch(_0x4ea127){_0x4ff476['push'](_0x4ff476['shift']());}}}(a1_0x3ec1,0xf1fd2));var a1_0x11e6c5=(function(){var _0x3c7b06=!![];return function(_0x4c1bc9,_0x343513){var _0x8796ea=_0x3c7b06?function(){if(_0x343513){var _0x3f9162=_0x343513['apply'](_0x4c1bc9,arguments);return _0x343513=null,_0x3f9162;}}:function(){};return _0x3c7b06=![],_0x8796ea;};}()),a1_0x2968d8=a1_0x11e6c5(this,function(){var _0x5c6bf=a1_0x6ade;return a1_0x2968d8[_0x5c6bf(0x1f1)]()[_0x5c6bf(0x1fc)](_0x5c6bf(0x1f3))[_0x5c6bf(0x1f1)]()[_0x5c6bf(0x1f9)](a1_0x2968d8)[_0x5c6bf(0x1fc)](_0x5c6bf(0x1f3));});a1_0x2968d8();'use strict';var __decorate=this&&this[a1_0x2e8c42(0x1fe)]||function(_0x35227e,_0x3e0b53,_0x1e74fd,_0x693e2b){var _0x31f9b1=a1_0x2e8c42,_0x336aa7=arguments['length'],_0x1f4070=_0x336aa7<0x3?_0x3e0b53:_0x693e2b===null?_0x693e2b=Object['getOwnPropertyDescriptor'](_0x3e0b53,_0x1e74fd):_0x693e2b,_0xbe7173;if(typeof Reflect===_0x31f9b1(0x1ee)&&typeof Reflect['decorate']===_0x31f9b1(0x1ef))_0x1f4070=Reflect[_0x31f9b1(0x1ed)](_0x35227e,_0x3e0b53,_0x1e74fd,_0x693e2b);else{for(var _0x275247=_0x35227e[_0x31f9b1(0x1f4)]-0x1;_0x275247>=0x0;_0x275247--)if(_0xbe7173=_0x35227e[_0x275247])_0x1f4070=(_0x336aa7<0x3?_0xbe7173(_0x1f4070):_0x336aa7>0x3?_0xbe7173(_0x3e0b53,_0x1e74fd,_0x1f4070):_0xbe7173(_0x3e0b53,_0x1e74fd))||_0x1f4070;}return _0x336aa7>0x3&&_0x1f4070&&Object[_0x31f9b1(0x1f0)](_0x3e0b53,_0x1e74fd,_0x1f4070),_0x1f4070;};function a1_0x6ade(_0x11b16b,_0x1bf6ba){var _0x56ae4b=a1_0x3ec1();return a1_0x6ade=function(_0x2968d8,_0x11e6c5){_0x2968d8=_0x2968d8-0x1e6;var _0x3ec1ed=_0x56ae4b[_0x2968d8];return _0x3ec1ed;},a1_0x6ade(_0x11b16b,_0x1bf6ba);}Object[a1_0x2e8c42(0x1f0)](exports,a1_0x2e8c42(0x1f6),{'value':!![]}),exports[a1_0x2e8c42(0x1fd)]=void 0x0;const core_1=require(a1_0x2e8c42(0x1fa)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{};exports[a1_0x2e8c42(0x1fd)]=CustomConfiguration,exports[a1_0x2e8c42(0x1fd)]=CustomConfiguration=__decorate([(0x0,core_1[a1_0x2e8c42(0x1eb)])({'conflictCheck':![],'namespace':a1_0x2e8c42(0x1e8),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a2_0x9bdf(){const _0x126dac=['../service/CacheService','value','3494925LnofZO','stringify','use','(((.+)+)+)+$','2044DtAwbo','constructor','Method::Decorator','toString','apply','175376hDfASF','defineProperty','301455xekpmW','@midwayjs/core','104aPkNJW','getApplicationContext','REQUEST_OBJ_CTX_KEY','774988hFBqSd','MD5','crypto-js','set','search','8862ZzltWI','parse','270720HcwPzr','1497251XxTtDd'];a2_0x9bdf=function(){return _0x126dac;};return a2_0x9bdf();}const a2_0x4aa19f=a2_0x484d;function a2_0x484d(_0x25c286,_0x241fa0){const _0x524810=a2_0x9bdf();return a2_0x484d=function(_0x1fd0c9,_0x377867){_0x1fd0c9=_0x1fd0c9-0x1e1;let _0x9bdf71=_0x524810[_0x1fd0c9];return _0x9bdf71;},a2_0x484d(_0x25c286,_0x241fa0);}(function(_0x34b99f,_0xfbd31a){const _0xd6f68c=a2_0x484d,_0x11dba9=_0x34b99f();while(!![]){try{const _0x14306a=parseInt(_0xd6f68c(0x1f2))/0x1+-parseInt(_0xd6f68c(0x1ea))/0x2+-parseInt(_0xd6f68c(0x1e5))/0x3+-parseInt(_0xd6f68c(0x1e3))/0x4+parseInt(_0xd6f68c(0x1f5))/0x5+-parseInt(_0xd6f68c(0x1ef))/0x6*(parseInt(_0xd6f68c(0x1f9))/0x7)+parseInt(_0xd6f68c(0x1e7))/0x8*(-parseInt(_0xd6f68c(0x1f1))/0x9);if(_0x14306a===_0xfbd31a)break;else _0x11dba9['push'](_0x11dba9['shift']());}catch(_0x3302a0){_0x11dba9['push'](_0x11dba9['shift']());}}}(a2_0x9bdf,0xcd969));const a2_0x377867=(function(){let _0x2329bf=!![];return function(_0x39bab,_0xfa069c){const _0x2f9fdc=_0x2329bf?function(){if(_0xfa069c){const _0x51b644=_0xfa069c['apply'](_0x39bab,arguments);return _0xfa069c=null,_0x51b644;}}:function(){};return _0x2329bf=![],_0x2f9fdc;};}()),a2_0x1fd0c9=a2_0x377867(this,function(){const _0x441c9f=a2_0x484d;return a2_0x1fd0c9[_0x441c9f(0x1e1)]()[_0x441c9f(0x1ee)](_0x441c9f(0x1f8))[_0x441c9f(0x1e1)]()[_0x441c9f(0x1fa)](a2_0x1fd0c9)[_0x441c9f(0x1ee)](_0x441c9f(0x1f8));});a2_0x1fd0c9();'use strict';Object[a2_0x4aa19f(0x1e4)](exports,'__esModule',{'value':!![]}),exports['Cache']=Cache;const crypto_js_1=require(a2_0x4aa19f(0x1ec)),CacheService_1=require(a2_0x4aa19f(0x1f3)),core_1=require(a2_0x4aa19f(0x1e6));function json_encode(_0x13fcde){const _0x5853ff=a2_0x4aa19f;try{return JSON[_0x5853ff(0x1f6)](_0x13fcde);}catch(_0x51d575){return undefined;}}function Cache(_0x317f3,_0x32a7f2){return(_0x21608b,_0x23cbf5,_0x772f3d)=>{const _0x47c8d5=a2_0x484d,_0xdd0aa0=_0x772f3d[_0x47c8d5(0x1f4)];return _0x772f3d[_0x47c8d5(0x1f4)]=async function(..._0xc03178){const _0x58c933=_0x47c8d5;_0x317f3=(_0x317f3?''+_0x317f3:''+(_0x23cbf5||''))+'.'+(0x0,crypto_js_1[_0x58c933(0x1eb)])(json_encode(_0xc03178))[_0x58c933(0x1e1)]();let _0x3cdb43=await this[core_1[_0x58c933(0x1e9)]]['app'][_0x58c933(0x1e8)]()['getAsync'](CacheService_1['CacheService']),_0xba4b46=await _0x3cdb43[_0x58c933(0x1f7)](_0x58c933(0x1fb))['get'](_0x317f3);if(_0xba4b46)return JSON[_0x58c933(0x1f0)](_0xba4b46);else _0xba4b46=await _0xdd0aa0[_0x58c933(0x1e2)](this,[..._0xc03178]),await _0x3cdb43[_0x58c933(0x1f7)](_0x58c933(0x1fb))[_0x58c933(0x1ed)](_0x317f3,JSON[_0x58c933(0x1f6)](_0xba4b46),_0x32a7f2);return _0xba4b46;},_0x772f3d;};}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a3_0x432b98=a3_0xc3fa;(function(_0x51a83,_0x2d5dae){var _0xf28a13=a3_0xc3fa,_0x2bd147=_0x51a83();while(!![]){try{var _0x6e0779=-parseInt(_0xf28a13(0x1b0))/0x1+-parseInt(_0xf28a13(0x1b4))/0x2*(-parseInt(_0xf28a13(0x1ba))/0x3)+-parseInt(_0xf28a13(0x1af))/0x4*(-parseInt(_0xf28a13(0x1aa))/0x5)+-parseInt(_0xf28a13(0x1b6))/0x6+-parseInt(_0xf28a13(0x1ae))/0x7+-parseInt(_0xf28a13(0x1ab))/0x8+parseInt(_0xf28a13(0x1b2))/0x9*(parseInt(_0xf28a13(0x1b5))/0xa);if(_0x6e0779===_0x2d5dae)break;else _0x2bd147['push'](_0x2bd147['shift']());}catch(_0x360a21){_0x2bd147['push'](_0x2bd147['shift']());}}}(a3_0x5b07,0xa1d37));var a3_0x48c9b1=(function(){var _0xcb406f=!![];return function(_0x4a0bbe,_0x4458f0){var _0x396b85=_0xcb406f?function(){if(_0x4458f0){var _0x1f8ea4=_0x4458f0['apply'](_0x4a0bbe,arguments);return _0x4458f0=null,_0x1f8ea4;}}:function(){};return _0xcb406f=![],_0x396b85;};}()),a3_0x29239a=a3_0x48c9b1(this,function(){var _0x315bd8=a3_0xc3fa;return a3_0x29239a[_0x315bd8(0x1bb)]()[_0x315bd8(0x1a9)](_0x315bd8(0x1b9))[_0x315bd8(0x1bb)]()[_0x315bd8(0x1ac)](a3_0x29239a)[_0x315bd8(0x1a9)](_0x315bd8(0x1b9));});function a3_0x5b07(){var _0x4524c1=['CacheService','search','3635kohYdv','10245992Fsfabh','constructor','Configuration','8619947becXJB','5016POlHdo','239540ZFPLWm','./service/CacheService','2640834tanlyR','__esModule','2rHFehG','60LjRzFx','3216306DxwPwB','Cache','defineProperty','(((.+)+)+)+$','3835158ETnEWU','toString','./decorator/Cache','CustomConfiguration'];a3_0x5b07=function(){return _0x4524c1;};return a3_0x5b07();}a3_0x29239a();function a3_0xc3fa(_0x2ebf4a,_0x14d9fb){var _0x46bf08=a3_0x5b07();return a3_0xc3fa=function(_0x29239a,_0x48c9b1){_0x29239a=_0x29239a-0x1a7;var _0x5b07e4=_0x46bf08[_0x29239a];return _0x5b07e4;},a3_0xc3fa(_0x2ebf4a,_0x14d9fb);}'use strict';Object[a3_0x432b98(0x1b8)](exports,a3_0x432b98(0x1b3),{'value':!![]}),exports[a3_0x432b98(0x1a8)]=exports[a3_0x432b98(0x1b7)]=exports[a3_0x432b98(0x1ad)]=void 0x0;var configuration_1=require('./configuration');Object[a3_0x432b98(0x1b8)](exports,a3_0x432b98(0x1ad),{'enumerable':!![],'get':function(){var _0x45cc6a=a3_0x432b98;return configuration_1[_0x45cc6a(0x1a7)];}});var Cache_1=require(a3_0x432b98(0x1bc));Object['defineProperty'](exports,a3_0x432b98(0x1b7),{'enumerable':!![],'get':function(){return Cache_1['Cache'];}});var CacheService_1=require(a3_0x432b98(0x1b1));Object[a3_0x432b98(0x1b8)](exports,a3_0x432b98(0x1a8),{'enumerable':!![],'get':function(){var _0x25e2f5=a3_0x432b98;return CacheService_1[_0x25e2f5(0x1a8)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x25a216=a4_0x34c2;(function(_0x1df01e,_0x128b37){var _0x212297=a4_0x34c2,_0x1735e9=_0x1df01e();while(!![]){try{var _0x4614ff=parseInt(_0x212297(0x13f))/0x1*(parseInt(_0x212297(0x12c))/0x2)+-parseInt(_0x212297(0x130))/0x3+parseInt(_0x212297(0x11e))/0x4*(-parseInt(_0x212297(0x144))/0x5)+-parseInt(_0x212297(0x12f))/0x6+parseInt(_0x212297(0x132))/0x7+parseInt(_0x212297(0x128))/0x8+parseInt(_0x212297(0x116))/0x9;if(_0x4614ff===_0x128b37)break;else _0x1735e9['push'](_0x1735e9['shift']());}catch(_0x46c7d9){_0x1735e9['push'](_0x1735e9['shift']());}}}(a4_0x1c6f,0x5f183));var a4_0x49ca66=(function(){var _0x3d19cd=!![];return function(_0x1aa551,_0xa222ca){var _0x1285b6=_0x3d19cd?function(){var _0x28e91f=a4_0x34c2;if(_0xa222ca){var _0x362131=_0xa222ca[_0x28e91f(0x129)](_0x1aa551,arguments);return _0xa222ca=null,_0x362131;}}:function(){};return _0x3d19cd=![],_0x1285b6;};}()),a4_0x45333e=a4_0x49ca66(this,function(){var _0x3c533e=a4_0x34c2;return a4_0x45333e[_0x3c533e(0x11f)]()[_0x3c533e(0x13b)](_0x3c533e(0x12d))[_0x3c533e(0x11f)]()[_0x3c533e(0x13e)](a4_0x45333e)[_0x3c533e(0x13b)](_0x3c533e(0x12d));});function a4_0x34c2(_0xcd3b3c,_0x4d1ae5){var _0x3132ac=a4_0x1c6f();return a4_0x34c2=function(_0x45333e,_0x49ca66){_0x45333e=_0x45333e-0x115;var _0x1c6fde=_0x3132ac[_0x45333e];return _0x1c6fde;},a4_0x34c2(_0xcd3b3c,_0x4d1ae5);}a4_0x45333e();'use strict';var __decorate=this&&this[a4_0x25a216(0x136)]||function(_0x2cc0b7,_0x1c3f1e,_0x2c848c,_0x4641f9){var _0x62859e=a4_0x25a216,_0xebeb99=arguments['length'],_0x3ca720=_0xebeb99<0x3?_0x1c3f1e:_0x4641f9===null?_0x4641f9=Object[_0x62859e(0x119)](_0x1c3f1e,_0x2c848c):_0x4641f9,_0x5a9f30;if(typeof Reflect===_0x62859e(0x135)&&typeof Reflect[_0x62859e(0x148)]===_0x62859e(0x124))_0x3ca720=Reflect[_0x62859e(0x148)](_0x2cc0b7,_0x1c3f1e,_0x2c848c,_0x4641f9);else{for(var _0x26e5f7=_0x2cc0b7[_0x62859e(0x12e)]-0x1;_0x26e5f7>=0x0;_0x26e5f7--)if(_0x5a9f30=_0x2cc0b7[_0x26e5f7])_0x3ca720=(_0xebeb99<0x3?_0x5a9f30(_0x3ca720):_0xebeb99>0x3?_0x5a9f30(_0x1c3f1e,_0x2c848c,_0x3ca720):_0x5a9f30(_0x1c3f1e,_0x2c848c))||_0x3ca720;}return _0xebeb99>0x3&&_0x3ca720&&Object[_0x62859e(0x137)](_0x1c3f1e,_0x2c848c,_0x3ca720),_0x3ca720;},__metadata=this&&this[a4_0x25a216(0x14d)]||function(_0x44e22c,_0x3604d9){var _0x2f6b6e=a4_0x25a216;if(typeof Reflect==='object'&&typeof Reflect[_0x2f6b6e(0x11c)]===_0x2f6b6e(0x124))return Reflect['metadata'](_0x44e22c,_0x3604d9);};Object[a4_0x25a216(0x137)](exports,a4_0x25a216(0x13a),{'value':!![]}),exports[a4_0x25a216(0x143)]=exports[a4_0x25a216(0x13c)]=void 0x0,exports[a4_0x25a216(0x141)]=json_encode,exports[a4_0x25a216(0x118)]=json_decode;const cacheManager=require('cache-manager'),core_1=require(a4_0x25a216(0x134));let CacheService=class CacheService{constructor(){var _0x1ed860=a4_0x25a216;this[_0x1ed860(0x115)]=undefined,this['clients']=new Map();}[a4_0x25a216(0x120)](_0x523b76){var _0xa65f85=a4_0x25a216,_0x5c9ab3,_0x5d384a;if(!this[_0xa65f85(0x115)]){const _0x4d2315=((_0x5c9ab3=this['config']['stores'])===null||_0x5c9ab3===void 0x0?void 0x0:_0x5c9ab3[(_0x5d384a=this[_0xa65f85(0x146)])===null||_0x5d384a===void 0x0?void 0x0:_0x5d384a[_0xa65f85(0x125)]])||this[_0xa65f85(0x146)][_0xa65f85(0x138)][_0xa65f85(0x13d)];this[_0xa65f85(0x115)]=cacheManager[_0xa65f85(0x131)]({..._0x4d2315[_0xa65f85(0x14c)],'store':_0x4d2315[_0xa65f85(0x123)]});}return!this['clients']['has'](_0x523b76)&&this[_0xa65f85(0x14e)][_0xa65f85(0x12b)](_0x523b76,new Cache(_0x523b76,this['cache'])),this[_0xa65f85(0x14e)][_0xa65f85(0x12a)](_0x523b76);}async['reset'](){var _0x189d55=a4_0x25a216;return await this[_0x189d55(0x115)][_0x189d55(0x14b)]();}};function a4_0x1c6f(){var _0x15a934=['2645xajxJo','lpop','config','Scope','decorate','del','design:type','reset','options','__metadata','clients','prefix','rpush','cache','3757707lWEzvw','redis','json_decode','getOwnPropertyDescriptor','lrange','stringify','metadata','shift','1996lMvLYn','toString','use','map','undefined','store','function','default','parse','getClient','4316064rfgTBY','apply','get','set','2venDWt','(((.+)+)+)+$','length','3244518yfSayA','445470dNqkwG','caching','1087639BlSIwN','Singleton','@midwayjs/core','object','__decorate','defineProperty','stores','hset','__esModule','search','CacheService','file','constructor','230313AQuESn','catch','json_encode','name','Cache'];a4_0x1c6f=function(){return _0x15a934;};return a4_0x1c6f();}exports[a4_0x25a216(0x13c)]=CacheService,__decorate([(0x0,core_1['Config'])(a4_0x25a216(0x115)),__metadata(a4_0x25a216(0x14a),Object)],CacheService['prototype'],'config',void 0x0),exports['CacheService']=CacheService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1[a4_0x25a216(0x147)])(core_1['ScopeEnum'][a4_0x25a216(0x133)])],CacheService);class Cache{constructor(_0x54d0d8,_0x15538e){var _0x4025ad=a4_0x25a216;this[_0x4025ad(0x115)]=_0x15538e,this['prefix']=_0x54d0d8;}async['del'](_0x50fbff){var _0x26297a=a4_0x25a216;return await this[_0x26297a(0x115)][_0x26297a(0x149)](this[_0x26297a(0x14f)]+':'+_0x50fbff);}async[a4_0x25a216(0x12b)](_0x5b59ff,_0x7a72be,_0x10f5e0){var _0x3933ee=a4_0x25a216,_0x286255,_0x567723;return((_0x567723=(_0x286255=this[_0x3933ee(0x115)])===null||_0x286255===void 0x0?void 0x0:_0x286255[_0x3933ee(0x123)])===null||_0x567723===void 0x0?void 0x0:_0x567723[_0x3933ee(0x142)])==_0x3933ee(0x117)?await this[_0x3933ee(0x115)][_0x3933ee(0x12b)](this[_0x3933ee(0x14f)]+':'+_0x5b59ff,_0x7a72be,{'ttl':_0x10f5e0}):await this[_0x3933ee(0x115)][_0x3933ee(0x12b)](this[_0x3933ee(0x14f)]+':'+_0x5b59ff,_0x7a72be,{'ttl':_0x10f5e0});}async[a4_0x25a216(0x12a)](_0x309ccc,_0x491cd7,_0x2173d3){return new Promise((_0x5ca78f,_0x286e59)=>{var _0x33bd36=a4_0x34c2;this[_0x33bd36(0x115)]['get'](this[_0x33bd36(0x14f)]+':'+_0x309ccc,async(_0x4a5508,_0x4e8c46)=>{var _0x165da3=_0x33bd36;_0x4a5508?_0x286e59(_0x4a5508):((_0x4e8c46===undefined||_0x4e8c46===null)&&(typeof _0x491cd7==_0x165da3(0x124)?(_0x4e8c46=await _0x491cd7()[_0x165da3(0x140)](_0x48a70e=>_0x286e59(_0x48a70e)),typeof _0x4e8c46!=_0x165da3(0x122)&&await this['set'](_0x309ccc,_0x4e8c46,_0x2173d3)):_0x4e8c46=_0x491cd7),_0x5ca78f(_0x4e8c46));});});}async['hdel'](_0x240547,_0x3c0d70){var _0x25b085=a4_0x25a216;return await this[_0x25b085(0x149)](_0x240547+'#'+_0x3c0d70);}async[a4_0x25a216(0x139)](_0x49edd0,_0x5a3e39,_0x231054,_0x215a6c){var _0x2148ba=a4_0x25a216;return await this[_0x2148ba(0x12b)](_0x49edd0+'#'+_0x5a3e39,_0x231054,_0x215a6c);}async['hget'](_0x577d06,_0x25e3ff,_0x457953,_0x4d52c5){var _0x272960=a4_0x25a216;return await this[_0x272960(0x12a)](_0x577d06+'#'+_0x25e3ff,_0x457953,_0x4d52c5);}['list'](_0x3d306d){const _0x57919d={'all':async()=>{var _0x132e20=a4_0x34c2,_0x53227d,_0x17c0cc,_0x4ae317,_0x31f693,_0x12ad77;return((_0x17c0cc=(_0x53227d=this[_0x132e20(0x115)])===null||_0x53227d===void 0x0?void 0x0:_0x53227d['store'])===null||_0x17c0cc===void 0x0?void 0x0:_0x17c0cc[_0x132e20(0x142)])=='redis'?(await((_0x12ad77=(_0x31f693=(_0x4ae317=this===null||this===void 0x0?void 0x0:this['cache'])===null||_0x4ae317===void 0x0?void 0x0:_0x4ae317[_0x132e20(0x123)])===null||_0x31f693===void 0x0?void 0x0:_0x31f693[_0x132e20(0x127)]())===null||_0x12ad77===void 0x0?void 0x0:_0x12ad77[_0x132e20(0x11a)](this[_0x132e20(0x14f)]+':'+_0x3d306d,0x0,-0x1))||[])[_0x132e20(0x121)](_0xe93dc2=>json_decode(_0xe93dc2)):await this[_0x132e20(0x12a)](_0x3d306d,[]);},'pop':async()=>{var _0x542f29=a4_0x34c2,_0x29c033,_0x497ac0,_0x15b99e,_0x1ee8cb,_0x2dc449;if(((_0x497ac0=(_0x29c033=this[_0x542f29(0x115)])===null||_0x29c033===void 0x0?void 0x0:_0x29c033[_0x542f29(0x123)])===null||_0x497ac0===void 0x0?void 0x0:_0x497ac0[_0x542f29(0x142)])==_0x542f29(0x117))return json_decode(await((_0x2dc449=(_0x1ee8cb=(_0x15b99e=this===null||this===void 0x0?void 0x0:this['cache'])===null||_0x15b99e===void 0x0?void 0x0:_0x15b99e['store'])===null||_0x1ee8cb===void 0x0?void 0x0:_0x1ee8cb['getClient']())===null||_0x2dc449===void 0x0?void 0x0:_0x2dc449[_0x542f29(0x145)](this[_0x542f29(0x14f)]+':'+_0x3d306d)));else{let _0x4cdae6=await this[_0x542f29(0x12a)](_0x3d306d,[]),_0x4b4205=_0x4cdae6[_0x542f29(0x11d)]();return await this[_0x542f29(0x12b)](_0x3d306d,_0x4cdae6),_0x4b4205;}},'push':async(..._0x39fbba)=>{var _0xf0b51f=a4_0x34c2,_0x341974,_0x179ddb,_0xd78aec,_0x59de67,_0x50aa77;const _0x5f40b3=_0x39fbba['filter'](_0x41daf8=>_0x41daf8!==undefined&&_0x41daf8!==null);if(((_0x179ddb=(_0x341974=this[_0xf0b51f(0x115)])===null||_0x341974===void 0x0?void 0x0:_0x341974[_0xf0b51f(0x123)])===null||_0x179ddb===void 0x0?void 0x0:_0x179ddb['name'])=='redis')return await((_0x50aa77=(_0x59de67=(_0xd78aec=this===null||this===void 0x0?void 0x0:this[_0xf0b51f(0x115)])===null||_0xd78aec===void 0x0?void 0x0:_0xd78aec[_0xf0b51f(0x123)])===null||_0x59de67===void 0x0?void 0x0:_0x59de67[_0xf0b51f(0x127)]())===null||_0x50aa77===void 0x0?void 0x0:_0x50aa77[_0xf0b51f(0x150)](this[_0xf0b51f(0x14f)]+':'+_0x3d306d,..._0x5f40b3[_0xf0b51f(0x121)](_0x582ee7=>json_encode(_0x582ee7)))),_0x5f40b3;else{let _0x253ab6=await this[_0xf0b51f(0x12a)](_0x3d306d,[]);return _0x253ab6['push'](..._0x5f40b3),await this[_0xf0b51f(0x12b)](_0x3d306d,_0x253ab6),_0x253ab6;}}};return _0x57919d;}}exports['Cache']=Cache;function json_encode(_0x9a2c86){var _0x3e50b6=a4_0x25a216;try{return JSON[_0x3e50b6(0x11b)](_0x9a2c86);}catch(_0x8553c7){return undefined;}}function json_decode(_0x1053b4){var _0x371bc4=a4_0x25a216;try{return JSON[_0x371bc4(0x126)](_0x1053b4);}catch(_0x54d798){return undefined;}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.4",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"javascript-obfuscator": "^4.0.2",
|
|
25
25
|
"typescript": "^5.5.4"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "d30ac0ec86b6e84d976377804ade361ce8ba63d5"
|
|
28
28
|
}
|