@anncic-api/cache 3.7.8 → 3.7.10
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
|
-
|
|
1
|
+
const a0_0x3f3415=a0_0xe5f9;(function(_0x1372de,_0x104120){const _0x4da792=a0_0xe5f9,_0x1c6234=_0x1372de();while(!![]){try{const _0x56992e=-parseInt(_0x4da792(0x1e1))/0x1+-parseInt(_0x4da792(0x1e0))/0x2+parseInt(_0x4da792(0x1d4))/0x3*(-parseInt(_0x4da792(0x1d9))/0x4)+parseInt(_0x4da792(0x1cc))/0x5+parseInt(_0x4da792(0x1dd))/0x6*(-parseInt(_0x4da792(0x1e2))/0x7)+-parseInt(_0x4da792(0x1cf))/0x8*(-parseInt(_0x4da792(0x1db))/0x9)+parseInt(_0x4da792(0x1cd))/0xa;if(_0x56992e===_0x104120)break;else _0x1c6234['push'](_0x1c6234['shift']());}catch(_0x3e8c91){_0x1c6234['push'](_0x1c6234['shift']());}}}(a0_0x17b2,0xb809f));function a0_0x17b2(){const _0x106d1d=['default','4142820ZLrBWe','__esModule','(((.+)+)+)+$','1658774MqCShr','27305tOWdCf','7npmsAl','appDir','1583555vsoHpB','26435890dMwDap','defineProperty','328024TuxrUq','file','127.0.0.1','apply','name','3573dmRvQx','constructor','toString','env','/runtime/.cache','3316vMXWkf','search','72sdxmAm'];a0_0x17b2=function(){return _0x106d1d;};return a0_0x17b2();}function a0_0xe5f9(_0x2f306e,_0x402eb9){const _0x50c889=a0_0x17b2();return a0_0xe5f9=function(_0x3ebcc5,_0x366d83){_0x3ebcc5=_0x3ebcc5-0x1cb;let _0x17b2da=_0x50c889[_0x3ebcc5];return _0x17b2da;},a0_0xe5f9(_0x2f306e,_0x402eb9);}const a0_0x366d83=(function(){let _0x2ce1be=!![];return function(_0x2f1842,_0x55aae7){const _0x46f66d=_0x2ce1be?function(){const _0x1e77ef=a0_0xe5f9;if(_0x55aae7){const _0x15f55d=_0x55aae7[_0x1e77ef(0x1d2)](_0x2f1842,arguments);return _0x55aae7=null,_0x15f55d;}}:function(){};return _0x2ce1be=![],_0x46f66d;};}()),a0_0x3ebcc5=a0_0x366d83(this,function(){const _0x3a51ef=a0_0xe5f9;return a0_0x3ebcc5[_0x3a51ef(0x1d6)]()['search'](_0x3a51ef(0x1df))[_0x3a51ef(0x1d6)]()[_0x3a51ef(0x1d5)](a0_0x3ebcc5)[_0x3a51ef(0x1da)](_0x3a51ef(0x1df));});a0_0x3ebcc5();'use strict';Object[a0_0x3f3415(0x1ce)](exports,a0_0x3f3415(0x1de),{'value':!![]});const fsStore=require('cache-manager-fs-hash'),redisStore=require('cache-manager-ioredis');exports[a0_0x3f3415(0x1dc)]=_0x8dbb48=>{const _0x3b84e2=a0_0x3f3415;return{'cache':{'default':_0x3b84e2(0x1d0),'stores':{'file':{'store':fsStore,'options':{'subdirs':![],'path':_0x8dbb48[_0x3b84e2(0x1cb)]+_0x3b84e2(0x1d8)+((_0x8dbb48===null||_0x8dbb48===void 0x0?void 0x0:_0x8dbb48[_0x3b84e2(0x1d7)])?'-'+_0x8dbb48[_0x3b84e2(0x1d7)]:'')}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x3b84e2(0x1d1),'password':'','keyPrefix':_0x8dbb48[_0x3b84e2(0x1d3)]+':'+((_0x8dbb48===null||_0x8dbb48===void 0x0?void 0x0:_0x8dbb48[_0x3b84e2(0x1d7)])?_0x8dbb48['env']+':':'')}},'memory':{'store':'memory','options':{'max':0x64}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a1_0x1f157c=a1_0x29df;(function(_0xead007,_0x49a091){var _0x1ebfa9=a1_0x29df,_0x11bb03=_0xead007();while(!![]){try{var _0x550cf1=-parseInt(_0x1ebfa9(0xf3))/0x1+-parseInt(_0x1ebfa9(0xf6))/0x2+-parseInt(_0x1ebfa9(0xec))/0x3*(parseInt(_0x1ebfa9(0xe7))/0x4)+-parseInt(_0x1ebfa9(0xf7))/0x5+-parseInt(_0x1ebfa9(0xe9))/0x6+parseInt(_0x1ebfa9(0xf2))/0x7+-parseInt(_0x1ebfa9(0xf4))/0x8*(-parseInt(_0x1ebfa9(0xe6))/0x9);if(_0x550cf1===_0x49a091)break;else _0x11bb03['push'](_0x11bb03['shift']());}catch(_0x59352c){_0x11bb03['push'](_0x11bb03['shift']());}}}(a1_0x4752,0x98493));var a1_0x417881=(function(){var _0x76cb79=!![];return function(_0xdad5c,_0x28b92d){var _0x18ffa8=_0x76cb79?function(){var _0xc2a08e=a1_0x29df;if(_0x28b92d){var _0x5167a3=_0x28b92d[_0xc2a08e(0xf0)](_0xdad5c,arguments);return _0x28b92d=null,_0x5167a3;}}:function(){};return _0x76cb79=![],_0x18ffa8;};}()),a1_0xf32921=a1_0x417881(this,function(){var _0x1e4e4e=a1_0x29df;return a1_0xf32921[_0x1e4e4e(0xed)]()['search'](_0x1e4e4e(0xea))[_0x1e4e4e(0xed)]()['constructor'](a1_0xf32921)[_0x1e4e4e(0xeb)](_0x1e4e4e(0xea));});a1_0xf32921();'use strict';var __decorate=this&&this[a1_0x1f157c(0xf5)]||function(_0x5c4beb,_0x1e6a5f,_0x120408,_0xfdf92a){var _0x254536=a1_0x1f157c,_0x4b2edd=arguments[_0x254536(0xe4)],_0x3f6379=_0x4b2edd<0x3?_0x1e6a5f:_0xfdf92a===null?_0xfdf92a=Object['getOwnPropertyDescriptor'](_0x1e6a5f,_0x120408):_0xfdf92a,_0x58f4fc;if(typeof Reflect===_0x254536(0xe3)&&typeof Reflect[_0x254536(0xe2)]===_0x254536(0xee))_0x3f6379=Reflect[_0x254536(0xe2)](_0x5c4beb,_0x1e6a5f,_0x120408,_0xfdf92a);else{for(var _0x456c0d=_0x5c4beb[_0x254536(0xe4)]-0x1;_0x456c0d>=0x0;_0x456c0d--)if(_0x58f4fc=_0x5c4beb[_0x456c0d])_0x3f6379=(_0x4b2edd<0x3?_0x58f4fc(_0x3f6379):_0x4b2edd>0x3?_0x58f4fc(_0x1e6a5f,_0x120408,_0x3f6379):_0x58f4fc(_0x1e6a5f,_0x120408))||_0x3f6379;}return _0x4b2edd>0x3&&_0x3f6379&&Object[_0x254536(0xe8)](_0x1e6a5f,_0x120408,_0x3f6379),_0x3f6379;};Object[a1_0x1f157c(0xe8)](exports,'__esModule',{'value':!![]}),exports['CustomConfiguration']=void 0x0;function a1_0x29df(_0x1cbe77,_0x5b1f06){var _0x190e0a=a1_0x4752();return a1_0x29df=function(_0xf32921,_0x417881){_0xf32921=_0xf32921-0xe1;var _0x47525c=_0x190e0a[_0xf32921];return _0x47525c;},a1_0x29df(_0x1cbe77,_0x5b1f06);}const core_1=require('@midwayjs/core'),ConfigDefault=require(a1_0x1f157c(0xe5));let CustomConfiguration=class CustomConfiguration{};exports[a1_0x1f157c(0xef)]=CustomConfiguration,exports[a1_0x1f157c(0xef)]=CustomConfiguration=__decorate([(0x0,core_1[a1_0x1f157c(0xf1)])({'conflictCheck':![],'namespace':a1_0x1f157c(0xe1),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);function a1_0x4752(){var _0x3bbb71=['__decorate','1558602aqazBB','5015095dgEDGK','anncic-api:cache','decorate','object','length','./config/config.default','3673773XIyJyS','64OpnrSQ','defineProperty','735702WVeiWk','(((.+)+)+)+$','search','98148UNVwiN','toString','function','CustomConfiguration','apply','Configuration','8283170cjaebP','988533OevVOI','56sfAOwO'];a1_0x4752=function(){return _0x3bbb71;};return a1_0x4752();}
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x25966b=a2_0x315a;(function(_0x7275f,_0x5ccb0a){const _0x1f3a8c=a2_0x315a,_0x852719=_0x7275f();while(!![]){try{const _0x50aedb=-parseInt(_0x1f3a8c(0x1ef))/0x1+-parseInt(_0x1f3a8c(0x1e2))/0x2+-parseInt(_0x1f3a8c(0x1e5))/0x3+parseInt(_0x1f3a8c(0x1f2))/0x4*(-parseInt(_0x1f3a8c(0x1f8))/0x5)+parseInt(_0x1f3a8c(0x1ee))/0x6*(parseInt(_0x1f3a8c(0x1e6))/0x7)+-parseInt(_0x1f3a8c(0x1f1))/0x8+parseInt(_0x1f3a8c(0x1e8))/0x9;if(_0x50aedb===_0x5ccb0a)break;else _0x852719['push'](_0x852719['shift']());}catch(_0x3013f0){_0x852719['push'](_0x852719['shift']());}}}(a2_0x1e07,0x723a2));const a2_0x5f5392=(function(){let _0x5171ce=!![];return function(_0x349132,_0x5f43d3){const _0x5d8d52=_0x5171ce?function(){const _0x2dc193=a2_0x315a;if(_0x5f43d3){const _0x576bc6=_0x5f43d3[_0x2dc193(0x1de)](_0x349132,arguments);return _0x5f43d3=null,_0x576bc6;}}:function(){};return _0x5171ce=![],_0x5d8d52;};}()),a2_0x10985d=a2_0x5f5392(this,function(){const _0x5eb0b2=a2_0x315a;return a2_0x10985d[_0x5eb0b2(0x1e9)]()[_0x5eb0b2(0x1f0)](_0x5eb0b2(0x1e3))['toString']()[_0x5eb0b2(0x1ec)](a2_0x10985d)[_0x5eb0b2(0x1f0)]('(((.+)+)+)+$');});a2_0x10985d();'use strict';Object['defineProperty'](exports,a2_0x25966b(0x1f5),{'value':!![]}),exports['Cache']=Cache;function a2_0x1e07(){const _0x1008f3=['236308lviCny','search','5396928FfQdHQ','954052DhgvVN','parse','getApplicationContext','__esModule','CacheService','MD5','15XKMOzF','../service/CacheService','apply','get','set','stringify','291278gaGsTs','(((.+)+)+)+$','@midwayjs/core','1493952zsbdey','1217027NbhNoX','use','23076891MUqdQK','toString','Method::Decorator','value','constructor','REQUEST_OBJ_CTX_KEY','6euipdQ'];a2_0x1e07=function(){return _0x1008f3;};return a2_0x1e07();}const crypto_js_1=require('crypto-js'),CacheService_1=require(a2_0x25966b(0x1f9)),core_1=require(a2_0x25966b(0x1e4));function a2_0x315a(_0x2ba08d,_0x478687){const _0x401589=a2_0x1e07();return a2_0x315a=function(_0x10985d,_0x5f5392){_0x10985d=_0x10985d-0x1de;let _0x1e074d=_0x401589[_0x10985d];return _0x1e074d;},a2_0x315a(_0x2ba08d,_0x478687);}function json_encode(_0x3def4e){const _0x59adfc=a2_0x25966b;try{return JSON[_0x59adfc(0x1e1)](_0x3def4e);}catch(_0x9fe33b){return undefined;}}function Cache(_0x24ba62,_0x336cb5){return(_0x1aefd7,_0x3b84,_0x3b0697)=>{const _0x55c598=a2_0x315a,_0x428379=_0x3b0697['value'];return _0x3b0697[_0x55c598(0x1eb)]=async function(..._0x50b515){const _0x398a20=_0x55c598;_0x24ba62=(_0x24ba62?''+_0x24ba62:''+(_0x3b84||''))+'.'+(0x0,crypto_js_1[_0x398a20(0x1f7)])(json_encode(_0x50b515))[_0x398a20(0x1e9)]();let _0xcb0aae=await this[core_1[_0x398a20(0x1ed)]]['app'][_0x398a20(0x1f4)]()['getAsync'](CacheService_1[_0x398a20(0x1f6)]),_0x590627=await _0xcb0aae[_0x398a20(0x1e7)]('Method::Decorator')[_0x398a20(0x1df)](_0x24ba62);if(_0x590627)return JSON[_0x398a20(0x1f3)](_0x590627);else _0x590627=await _0x428379[_0x398a20(0x1de)](this,[..._0x50b515]),await _0xcb0aae['use'](_0x398a20(0x1ea))[_0x398a20(0x1e0)](_0x24ba62,JSON[_0x398a20(0x1e1)](_0x590627),_0x336cb5);return _0x590627;},_0x3b0697;};}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a3_0x24ce25=a3_0xc810;function a3_0xc810(_0x537db5,_0x5e877a){var _0x2cb182=a3_0x1be2();return a3_0xc810=function(_0x4de543,_0x78e29){_0x4de543=_0x4de543-0x195;var _0x1be2e2=_0x2cb182[_0x4de543];return _0x1be2e2;},a3_0xc810(_0x537db5,_0x5e877a);}(function(_0x408356,_0x155cf3){var _0x5f5202=a3_0xc810,_0x1011d6=_0x408356();while(!![]){try{var _0x457e28=parseInt(_0x5f5202(0x1ab))/0x1+parseInt(_0x5f5202(0x1a8))/0x2*(-parseInt(_0x5f5202(0x1a0))/0x3)+-parseInt(_0x5f5202(0x195))/0x4+parseInt(_0x5f5202(0x19e))/0x5*(parseInt(_0x5f5202(0x1a5))/0x6)+-parseInt(_0x5f5202(0x1a4))/0x7+-parseInt(_0x5f5202(0x196))/0x8*(-parseInt(_0x5f5202(0x199))/0x9)+parseInt(_0x5f5202(0x197))/0xa*(parseInt(_0x5f5202(0x19d))/0xb);if(_0x457e28===_0x155cf3)break;else _0x1011d6['push'](_0x1011d6['shift']());}catch(_0x34e851){_0x1011d6['push'](_0x1011d6['shift']());}}}(a3_0x1be2,0xbbdca));var a3_0x78e29=(function(){var _0x4fb824=!![];return function(_0x1d8081,_0x49742f){var _0x3a4b79=_0x4fb824?function(){var _0x4e795d=a3_0xc810;if(_0x49742f){var _0x168743=_0x49742f[_0x4e795d(0x1a6)](_0x1d8081,arguments);return _0x49742f=null,_0x168743;}}:function(){};return _0x4fb824=![],_0x3a4b79;};}()),a3_0x4de543=a3_0x78e29(this,function(){var _0x556768=a3_0xc810;return a3_0x4de543['toString']()[_0x556768(0x19f)](_0x556768(0x19c))[_0x556768(0x1a9)]()[_0x556768(0x1a3)](a3_0x4de543)[_0x556768(0x19f)]('(((.+)+)+)+$');});a3_0x4de543();'use strict';Object[a3_0x24ce25(0x19b)](exports,a3_0x24ce25(0x198),{'value':!![]}),exports['CacheService']=exports[a3_0x24ce25(0x1a1)]=exports['Configuration']=void 0x0;var configuration_1=require(a3_0x24ce25(0x1aa));Object[a3_0x24ce25(0x19b)](exports,a3_0x24ce25(0x1a2),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});var Cache_1=require(a3_0x24ce25(0x19a));Object[a3_0x24ce25(0x19b)](exports,a3_0x24ce25(0x1a1),{'enumerable':!![],'get':function(){var _0x30e982=a3_0x24ce25;return Cache_1[_0x30e982(0x1a1)];}});var CacheService_1=require('./service/CacheService');function a3_0x1be2(){var _0x12a793=['apply','CacheService','44zZdgGB','toString','./configuration','924037zvgfqE','5588556TAxbEi','944NQpDkI','10QFzuSR','__esModule','34011AmKtcy','./decorator/Cache','defineProperty','(((.+)+)+)+$','8106527HeqDXI','1116385bqUdam','search','49143XxOVLe','Cache','Configuration','constructor','6437025LyZATE','36LEZOaa'];a3_0x1be2=function(){return _0x12a793;};return a3_0x1be2();}Object['defineProperty'](exports,a3_0x24ce25(0x1a7),{'enumerable':!![],'get':function(){var _0x43c078=a3_0x24ce25;return CacheService_1[_0x43c078(0x1a7)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0xe08f5d=a4_0x45a7;(function(_0x11f1db,_0x346a6c){var _0x5be445=a4_0x45a7,_0x3748b0=_0x11f1db();while(!![]){try{var _0x21c7cc=parseInt(_0x5be445(0x13e))/0x1*(parseInt(_0x5be445(0x114))/0x2)+-parseInt(_0x5be445(0x125))/0x3*(parseInt(_0x5be445(0x149))/0x4)+parseInt(_0x5be445(0x132))/0x5+parseInt(_0x5be445(0x133))/0x6*(-parseInt(_0x5be445(0x135))/0x7)+parseInt(_0x5be445(0x112))/0x8*(parseInt(_0x5be445(0x115))/0x9)+parseInt(_0x5be445(0x12a))/0xa*(parseInt(_0x5be445(0x119))/0xb)+-parseInt(_0x5be445(0x122))/0xc;if(_0x21c7cc===_0x346a6c)break;else _0x3748b0['push'](_0x3748b0['shift']());}catch(_0x1791fe){_0x3748b0['push'](_0x3748b0['shift']());}}}(a4_0x26e8,0x57fff));var a4_0x1116aa=(function(){var _0x247a21=!![];return function(_0x17a134,_0x101cdf){var _0x229324=_0x247a21?function(){var _0x1b18ce=a4_0x45a7;if(_0x101cdf){var _0x19f920=_0x101cdf[_0x1b18ce(0x147)](_0x17a134,arguments);return _0x101cdf=null,_0x19f920;}}:function(){};return _0x247a21=![],_0x229324;};}()),a4_0x192289=a4_0x1116aa(this,function(){var _0x4a62a3=a4_0x45a7;return a4_0x192289['toString']()['search'](_0x4a62a3(0x113))['toString']()['constructor'](a4_0x192289)[_0x4a62a3(0x136)](_0x4a62a3(0x113));});a4_0x192289();'use strict';var __decorate=this&&this['__decorate']||function(_0x97041e,_0x57e97d,_0xa03d86,_0x1fe707){var _0x3bfbea=a4_0x45a7,_0x3b4524=arguments['length'],_0x3d2634=_0x3b4524<0x3?_0x57e97d:_0x1fe707===null?_0x1fe707=Object[_0x3bfbea(0x143)](_0x57e97d,_0xa03d86):_0x1fe707,_0x1a05f2;if(typeof Reflect===_0x3bfbea(0x14b)&&typeof Reflect[_0x3bfbea(0x117)]===_0x3bfbea(0x14a))_0x3d2634=Reflect[_0x3bfbea(0x117)](_0x97041e,_0x57e97d,_0xa03d86,_0x1fe707);else{for(var _0x30bdb1=_0x97041e['length']-0x1;_0x30bdb1>=0x0;_0x30bdb1--)if(_0x1a05f2=_0x97041e[_0x30bdb1])_0x3d2634=(_0x3b4524<0x3?_0x1a05f2(_0x3d2634):_0x3b4524>0x3?_0x1a05f2(_0x57e97d,_0xa03d86,_0x3d2634):_0x1a05f2(_0x57e97d,_0xa03d86))||_0x3d2634;}return _0x3b4524>0x3&&_0x3d2634&&Object[_0x3bfbea(0x130)](_0x57e97d,_0xa03d86,_0x3d2634),_0x3d2634;},__metadata=this&&this[a4_0xe08f5d(0x12e)]||function(_0x80907b,_0x5d861f){var _0x410168=a4_0xe08f5d;if(typeof Reflect===_0x410168(0x14b)&&typeof Reflect[_0x410168(0x11d)]===_0x410168(0x14a))return Reflect[_0x410168(0x11d)](_0x80907b,_0x5d861f);};Object['defineProperty'](exports,a4_0xe08f5d(0x120),{'value':!![]}),exports[a4_0xe08f5d(0x116)]=exports['CacheService']=void 0x0,exports['json_encode']=json_encode,exports[a4_0xe08f5d(0x146)]=json_decode;function a4_0x26e8(){var _0x4c0d99=['redis','2627215FGJKEn','64428bndXIb','prefix','385aUtQuC','search','ScopeEnum','design:type','lpop','filter','cache','caching','Config','215gNVeEE','options','del','lrange','list','getOwnPropertyDescriptor','Singleton','clients','json_decode','apply','use','236824kDDsNA','function','object','undefined','set','reset','push','hset','4933808QrsSCA','(((.+)+)+)+$','4172tTGSsS','9fYKeYO','Cache','decorate','rpush','328988DnSUBj','hdel','cache-manager','Provide','metadata','config','name','__esModule','default','8444496TobaUM','CacheService','shift','21QSzJjC','stores','store','@midwayjs/core','get','160AmcBSb','hget','catch','map','__metadata','getClient','defineProperty'];a4_0x26e8=function(){return _0x4c0d99;};return a4_0x26e8();}const cacheManager=require(a4_0xe08f5d(0x11b)),core_1=require(a4_0xe08f5d(0x128));function a4_0x45a7(_0x238855,_0x129889){var _0x524fff=a4_0x26e8();return a4_0x45a7=function(_0x192289,_0x1116aa){_0x192289=_0x192289-0x112;var _0x26e819=_0x524fff[_0x192289];return _0x26e819;},a4_0x45a7(_0x238855,_0x129889);}let CacheService=class CacheService{constructor(){var _0x306add=a4_0xe08f5d;this[_0x306add(0x13b)]=undefined,this[_0x306add(0x145)]=new Map();}[a4_0xe08f5d(0x148)](_0x56d019){var _0x390b65=a4_0xe08f5d,_0x349fb4,_0xab3864;if(!this[_0x390b65(0x13b)]){const _0x501f64=((_0x349fb4=this[_0x390b65(0x11e)][_0x390b65(0x126)])===null||_0x349fb4===void 0x0?void 0x0:_0x349fb4[(_0xab3864=this[_0x390b65(0x11e)])===null||_0xab3864===void 0x0?void 0x0:_0xab3864[_0x390b65(0x121)]])||this[_0x390b65(0x11e)][_0x390b65(0x126)]['file'];this[_0x390b65(0x13b)]=cacheManager[_0x390b65(0x13c)]({..._0x501f64[_0x390b65(0x13f)],'store':_0x501f64['store']});}return!this[_0x390b65(0x145)]['has'](_0x56d019)&&this[_0x390b65(0x145)]['set'](_0x56d019,new Cache(_0x56d019,this[_0x390b65(0x13b)])),this[_0x390b65(0x145)][_0x390b65(0x129)](_0x56d019);}async[a4_0xe08f5d(0x14e)](){var _0x11c5d9=a4_0xe08f5d;return await this[_0x11c5d9(0x13b)]['reset']();}};exports[a4_0xe08f5d(0x123)]=CacheService,__decorate([(0x0,core_1[a4_0xe08f5d(0x13d)])(a4_0xe08f5d(0x13b)),__metadata(a4_0xe08f5d(0x138),Object)],CacheService['prototype'],a4_0xe08f5d(0x11e),void 0x0),exports['CacheService']=CacheService=__decorate([(0x0,core_1[a4_0xe08f5d(0x11c)])(),(0x0,core_1['Scope'])(core_1[a4_0xe08f5d(0x137)][a4_0xe08f5d(0x144)])],CacheService);class Cache{constructor(_0x213da8,_0x4bd4ff){var _0x25d072=a4_0xe08f5d;this[_0x25d072(0x13b)]=_0x4bd4ff,this[_0x25d072(0x134)]=_0x213da8;}async[a4_0xe08f5d(0x140)](_0x5bc07d){var _0x498ce0=a4_0xe08f5d;return await this[_0x498ce0(0x13b)][_0x498ce0(0x140)](this[_0x498ce0(0x134)]+':'+_0x5bc07d);}async[a4_0xe08f5d(0x14d)](_0x48032e,_0x4bd42a,_0x2d8c1e){var _0x655b0a=a4_0xe08f5d,_0x6715c2,_0x2ece48;return((_0x2ece48=(_0x6715c2=this[_0x655b0a(0x13b)])===null||_0x6715c2===void 0x0?void 0x0:_0x6715c2['store'])===null||_0x2ece48===void 0x0?void 0x0:_0x2ece48[_0x655b0a(0x11f)])=='redis'?await this[_0x655b0a(0x13b)][_0x655b0a(0x14d)](this[_0x655b0a(0x134)]+':'+_0x48032e,_0x4bd42a,{'ttl':_0x2d8c1e}):await this[_0x655b0a(0x13b)][_0x655b0a(0x14d)](this['prefix']+':'+_0x48032e,_0x4bd42a,{'ttl':_0x2d8c1e});}async[a4_0xe08f5d(0x129)](_0xcb1c56,_0xe9d995,_0x14d5b1){return new Promise((_0x2ed178,_0x861aae)=>{var _0x235a7e=a4_0x45a7;this[_0x235a7e(0x13b)][_0x235a7e(0x129)](this[_0x235a7e(0x134)]+':'+_0xcb1c56,async(_0x39cabd,_0x4cd901)=>{var _0x42ac4a=_0x235a7e;_0x39cabd?_0x861aae(_0x39cabd):((_0x4cd901===undefined||_0x4cd901===null)&&(typeof _0xe9d995=='function'?(_0x4cd901=await _0xe9d995()[_0x42ac4a(0x12c)](_0x818c5a=>_0x861aae(_0x818c5a)),typeof _0x4cd901!=_0x42ac4a(0x14c)&&await this[_0x42ac4a(0x14d)](_0xcb1c56,_0x4cd901,_0x14d5b1)):_0x4cd901=_0xe9d995),_0x2ed178(_0x4cd901));});});}async[a4_0xe08f5d(0x11a)](_0x577ffc,_0x2e1ed5){var _0x5689f5=a4_0xe08f5d;return await this[_0x5689f5(0x140)](_0x577ffc+'#'+_0x2e1ed5);}async[a4_0xe08f5d(0x150)](_0x390194,_0x471060,_0x4ceab3,_0x5ef803){return await this['set'](_0x390194+'#'+_0x471060,_0x4ceab3,_0x5ef803);}async[a4_0xe08f5d(0x12b)](_0x27eed6,_0x803788,_0x52c5a8,_0x3ba5cb){return await this['get'](_0x27eed6+'#'+_0x803788,_0x52c5a8,_0x3ba5cb);}[a4_0xe08f5d(0x142)](_0x303039){const _0x478a00={'all':async()=>{var _0x584945=a4_0x45a7,_0x4d6b48,_0x3f091f,_0x379996,_0x213526,_0x151ae2;return((_0x3f091f=(_0x4d6b48=this[_0x584945(0x13b)])===null||_0x4d6b48===void 0x0?void 0x0:_0x4d6b48[_0x584945(0x127)])===null||_0x3f091f===void 0x0?void 0x0:_0x3f091f['name'])==_0x584945(0x131)?(await((_0x151ae2=(_0x213526=(_0x379996=this===null||this===void 0x0?void 0x0:this['cache'])===null||_0x379996===void 0x0?void 0x0:_0x379996[_0x584945(0x127)])===null||_0x213526===void 0x0?void 0x0:_0x213526[_0x584945(0x12f)]())===null||_0x151ae2===void 0x0?void 0x0:_0x151ae2[_0x584945(0x141)](this[_0x584945(0x134)]+':'+_0x303039,0x0,-0x1))||[])[_0x584945(0x12d)](_0x2e8d6e=>json_decode(_0x2e8d6e)):await this['get'](_0x303039,[]);},'pop':async()=>{var _0x41af76=a4_0x45a7,_0x579c53,_0x18e3d6,_0x58619b,_0x5d08ef,_0x2d440c;if(((_0x18e3d6=(_0x579c53=this[_0x41af76(0x13b)])===null||_0x579c53===void 0x0?void 0x0:_0x579c53[_0x41af76(0x127)])===null||_0x18e3d6===void 0x0?void 0x0:_0x18e3d6[_0x41af76(0x11f)])==_0x41af76(0x131))return json_decode(await((_0x2d440c=(_0x5d08ef=(_0x58619b=this===null||this===void 0x0?void 0x0:this['cache'])===null||_0x58619b===void 0x0?void 0x0:_0x58619b[_0x41af76(0x127)])===null||_0x5d08ef===void 0x0?void 0x0:_0x5d08ef[_0x41af76(0x12f)]())===null||_0x2d440c===void 0x0?void 0x0:_0x2d440c[_0x41af76(0x139)](this[_0x41af76(0x134)]+':'+_0x303039)));else{let _0x2c5986=await this['get'](_0x303039,[]),_0x419092=_0x2c5986[_0x41af76(0x124)]();return await this['set'](_0x303039,_0x2c5986),_0x419092;}},'push':async(..._0xb000b9)=>{var _0x3417ca=a4_0x45a7,_0x1cc11a,_0x5c61e3,_0x471222,_0x5e01fd,_0xc60b06;const _0x42a1e2=_0xb000b9[_0x3417ca(0x13a)](_0x20251a=>_0x20251a!==undefined&&_0x20251a!==null);if(((_0x5c61e3=(_0x1cc11a=this[_0x3417ca(0x13b)])===null||_0x1cc11a===void 0x0?void 0x0:_0x1cc11a[_0x3417ca(0x127)])===null||_0x5c61e3===void 0x0?void 0x0:_0x5c61e3[_0x3417ca(0x11f)])=='redis')return await((_0xc60b06=(_0x5e01fd=(_0x471222=this===null||this===void 0x0?void 0x0:this[_0x3417ca(0x13b)])===null||_0x471222===void 0x0?void 0x0:_0x471222[_0x3417ca(0x127)])===null||_0x5e01fd===void 0x0?void 0x0:_0x5e01fd[_0x3417ca(0x12f)]())===null||_0xc60b06===void 0x0?void 0x0:_0xc60b06[_0x3417ca(0x118)](this[_0x3417ca(0x134)]+':'+_0x303039,..._0x42a1e2[_0x3417ca(0x12d)](_0x225b9d=>json_encode(_0x225b9d)))),_0x42a1e2;else{let _0x170538=await this[_0x3417ca(0x129)](_0x303039,[]);return _0x170538[_0x3417ca(0x14f)](..._0x42a1e2),await this['set'](_0x303039,_0x170538),_0x170538;}}};return _0x478a00;}}exports[a4_0xe08f5d(0x116)]=Cache;function json_encode(_0x1e6e7a){try{return JSON['stringify'](_0x1e6e7a);}catch(_0x17ae0a){return undefined;}}function json_decode(_0x1c44c3){try{return JSON['parse'](_0x1c44c3);}catch(_0x1ca9ab){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.10",
|
|
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": "b8dae3f92737b85f4f053f694d4ed019c30e3bdc"
|
|
28
28
|
}
|