@anncic-api/cache 1.0.17 → 1.0.20
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
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x15a1(){const _0x2e9cfe=['defineProperty','appDir','1910354MMPvNz','4114847XEPtRg','file','memory','name','90CfdqHf','default','14UAzgvZ','1678764GYiFZM','110DNwGeA','__esModule','2280720TXZXsf','2364215CRMuXH','2spyTuH','cache-manager-fs-hash','4917078IGWEww','977048adwQoS','127.0.0.1'];a0_0x15a1=function(){return _0x2e9cfe;};return a0_0x15a1();}const a0_0x2f8d7c=a0_0x1327;(function(_0x208e2a,_0x435369){const _0x37d270=a0_0x1327,_0x9b0ca5=_0x208e2a();while(!![]){try{const _0x40dbbc=parseInt(_0x37d270(0xa6))/0x1*(-parseInt(_0x37d270(0xad))/0x2)+-parseInt(_0x37d270(0xa8))/0x3+parseInt(_0x37d270(0xa1))/0x4+parseInt(_0x37d270(0xa5))/0x5+parseInt(_0x37d270(0xa4))/0x6*(parseInt(_0x37d270(0xa0))/0x7)+-parseInt(_0x37d270(0xa9))/0x8*(parseInt(_0x37d270(0x9e))/0x9)+parseInt(_0x37d270(0xa2))/0xa*(parseInt(_0x37d270(0x9a))/0xb);if(_0x40dbbc===_0x435369)break;else _0x9b0ca5['push'](_0x9b0ca5['shift']());}catch(_0x4c7f9d){_0x9b0ca5['push'](_0x9b0ca5['shift']());}}}(a0_0x15a1,0xf3643));Object[a0_0x2f8d7c(0xab)](exports,a0_0x2f8d7c(0xa3),{'value':!![]});const fsStore=require(a0_0x2f8d7c(0xa7)),redisStore=require('cache-manager-ioredis');function a0_0x1327(_0x25f416,_0x44ac47){const _0x15a1bb=a0_0x15a1();return a0_0x1327=function(_0x1327eb,_0x2e8b75){_0x1327eb=_0x1327eb-0x9a;let _0x1e371a=_0x15a1bb[_0x1327eb];return _0x1e371a;},a0_0x1327(_0x25f416,_0x44ac47);}exports[a0_0x2f8d7c(0x9f)]=_0x91d933=>{const _0x2972e3=a0_0x2f8d7c;return{'cache':{'default':_0x2972e3(0x9b),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x91d933[_0x2972e3(0xac)]+'/runtime/.cache'}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x2972e3(0xaa),'password':'','ttl':0x1e13380,'keyPrefix':_0x91d933[_0x2972e3(0x9d)]+':'}},'memory':{'store':_0x2972e3(0x9c),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0xe8e6a8=a1_0x2fd6;(function(_0x477280,_0x482790){var _0x59feb9=a1_0x2fd6,_0x1c7716=_0x477280();while(!![]){try{var _0x5110c2=parseInt(_0x59feb9(0x1d9))/0x1+-parseInt(_0x59feb9(0x1e0))/0x2*(parseInt(_0x59feb9(0x1e5))/0x3)+-parseInt(_0x59feb9(0x1eb))/0x4*(parseInt(_0x59feb9(0x1e2))/0x5)+-parseInt(_0x59feb9(0x1e3))/0x6+-parseInt(_0x59feb9(0x1e7))/0x7*(parseInt(_0x59feb9(0x1e8))/0x8)+-parseInt(_0x59feb9(0x1ee))/0x9*(-parseInt(_0x59feb9(0x1da))/0xa)+-parseInt(_0x59feb9(0x1df))/0xb*(-parseInt(_0x59feb9(0x1e4))/0xc);if(_0x5110c2===_0x482790)break;else _0x1c7716['push'](_0x1c7716['shift']());}catch(_0x12dc96){_0x1c7716['push'](_0x1c7716['shift']());}}}(a1_0x36c9,0x709a3));var __decorate=this&&this['__decorate']||function(_0x198fb9,_0x1999c6,_0x4d57b4,_0x43f7a2){var _0x1d6119=a1_0x2fd6,_0x3e7935=arguments[_0x1d6119(0x1e6)],_0x4bf9cb=_0x3e7935<0x3?_0x1999c6:_0x43f7a2===null?_0x43f7a2=Object['getOwnPropertyDescriptor'](_0x1999c6,_0x4d57b4):_0x43f7a2,_0x2fa6c8;if(typeof Reflect===_0x1d6119(0x1ea)&&typeof Reflect[_0x1d6119(0x1e1)]===_0x1d6119(0x1ec))_0x4bf9cb=Reflect[_0x1d6119(0x1e1)](_0x198fb9,_0x1999c6,_0x4d57b4,_0x43f7a2);else{for(var _0x255700=_0x198fb9[_0x1d6119(0x1e6)]-0x1;_0x255700>=0x0;_0x255700--)if(_0x2fa6c8=_0x198fb9[_0x255700])_0x4bf9cb=(_0x3e7935<0x3?_0x2fa6c8(_0x4bf9cb):_0x3e7935>0x3?_0x2fa6c8(_0x1999c6,_0x4d57b4,_0x4bf9cb):_0x2fa6c8(_0x1999c6,_0x4d57b4))||_0x4bf9cb;}return _0x3e7935>0x3&&_0x4bf9cb&&Object['defineProperty'](_0x1999c6,_0x4d57b4,_0x4bf9cb),_0x4bf9cb;};function a1_0x2fd6(_0x3deaa0,_0x1da3b0){var _0x36c962=a1_0x36c9();return a1_0x2fd6=function(_0x2fd6d5,_0x157f4e){_0x2fd6d5=_0x2fd6d5-0x1d9;var _0x76c1e0=_0x36c962[_0x2fd6d5];return _0x76c1e0;},a1_0x2fd6(_0x3deaa0,_0x1da3b0);}Object[a1_0xe8e6a8(0x1db)](exports,a1_0xe8e6a8(0x1dd),{'value':!![]}),exports[a1_0xe8e6a8(0x1de)]=void 0x0;const decorator_1=require(a1_0xe8e6a8(0x1ed)),ConfigDefault=require(a1_0xe8e6a8(0x1e9));function a1_0x36c9(){var _0x37738e=['5921223jtdqpy','8ZKUhyM','./config/config.default','object','608364joAfWv','function','@midwayjs/decorator','288459hNPjHW','431158kdrZHg','150gwQdkZ','defineProperty','anncic-api:cache','__esModule','CustomConfiguration','11gOfJgR','2QXsjsM','decorate','5ZceXNF','2285064QkvcBm','12162972Nduibl','256383AcZZsV','length'];a1_0x36c9=function(){return _0x37738e;};return a1_0x36c9();}let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,decorator_1['Configuration'])({'conflictCheck':![],'namespace':a1_0xe8e6a8(0x1dc),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0xe8e6a8(0x1de)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x377f58=a2_0x58f8;(function(_0x555a73,_0x184c1f){const _0x35c35f=a2_0x58f8,_0x492375=_0x555a73();while(!![]){try{const _0x43b9d5=parseInt(_0x35c35f(0x1b6))/0x1*(parseInt(_0x35c35f(0x1bd))/0x2)+parseInt(_0x35c35f(0x1b8))/0x3+-parseInt(_0x35c35f(0x1a2))/0x4*(-parseInt(_0x35c35f(0x1a5))/0x5)+parseInt(_0x35c35f(0x1ac))/0x6*(parseInt(_0x35c35f(0x1ae))/0x7)+parseInt(_0x35c35f(0x1a9))/0x8*(-parseInt(_0x35c35f(0x1a3))/0x9)+parseInt(_0x35c35f(0x1bf))/0xa*(-parseInt(_0x35c35f(0x1be))/0xb)+-parseInt(_0x35c35f(0x1b9))/0xc;if(_0x43b9d5===_0x184c1f)break;else _0x492375['push'](_0x492375['shift']());}catch(_0x39e676){_0x492375['push'](_0x492375['shift']());}}}(a2_0x1f51,0x7d49d));function a2_0x1f51(){const _0x44b89a=['value','1RhOKDJ','stringify','985044XGzEWK','4658904Kjkihh','CacheService','app','toString','1046074iHQNpW','11SDQdCo','385130okHzSq','get','12bZkDtZ','9GamIIj','@midwayjs/core','103555WeuWOC','__esModule','defineProperty','Cache','1119208zgwMor','REQUEST_OBJ_CTX_KEY','crypto-js','6lCLJiF','use','1164233EHynDQ','set','apply','MethodDecorator','MD5','../service/CacheService','getAsync'];a2_0x1f51=function(){return _0x44b89a;};return a2_0x1f51();}Object[a2_0x377f58(0x1a7)](exports,a2_0x377f58(0x1a6),{'value':!![]}),exports[a2_0x377f58(0x1a8)]=void 0x0;const crypto_js_1=require(a2_0x377f58(0x1ab)),CacheService_1=require(a2_0x377f58(0x1b3)),core_1=require(a2_0x377f58(0x1a4));function a2_0x58f8(_0x1d7350,_0x143156){const _0x1f5132=a2_0x1f51();return a2_0x58f8=function(_0x58f896,_0x4df0f9){_0x58f896=_0x58f896-0x1a2;let _0x2449cd=_0x1f5132[_0x58f896];return _0x2449cd;},a2_0x58f8(_0x1d7350,_0x143156);}function Cache(_0x4c1c25,_0x2c7c65){return(_0x12f7d7,_0xa9e717,_0x262f35)=>{const _0x1439df=a2_0x58f8,_0x525494=_0x262f35[_0x1439df(0x1b5)];return _0x262f35[_0x1439df(0x1b5)]=async function(..._0x5a7c8b){const _0x45753e=_0x1439df;!_0x4c1c25&&(_0x4c1c25=(0x0,crypto_js_1[_0x45753e(0x1b2)])(JSON[_0x45753e(0x1b7)](_0x5a7c8b))[_0x45753e(0x1bc)]());let _0x32b239=await this[core_1[_0x45753e(0x1aa)]][_0x45753e(0x1bb)]['getApplicationContext']()[_0x45753e(0x1b4)](CacheService_1[_0x45753e(0x1ba)]),_0x58e60f=await _0x32b239[_0x45753e(0x1ad)](_0x45753e(0x1b1))[_0x45753e(0x1c0)](_0x4c1c25);if(_0x58e60f)return JSON['parse'](_0x58e60f);else _0x58e60f=await _0x525494[_0x45753e(0x1b0)](this,[..._0x5a7c8b]),await _0x32b239['use'](_0x45753e(0x1b1))[_0x45753e(0x1af)](_0x4c1c25,JSON[_0x45753e(0x1b7)](_0x58e60f),_0x2c7c65);return _0x58e60f;},_0x262f35;};}exports['Cache']=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';var a3_0x118238=a3_0x3c64;function a3_0xc1fd(){var _0x4fcd60=['./service/CacheService','5554760iVuPUO','48nQxvpu','./configuration','11887733QDzKqv','CustomConfiguration','369aOXVeN','1325060ZPsFxe','180022ciIOoh','568834XfNxWy','Configuration','15DGhZeY','5iqdFBi','Cache','9SEniDs','711192CakFAJ','40mISzea','CacheService','defineProperty','628EWgabR','./decorator/Cache'];a3_0xc1fd=function(){return _0x4fcd60;};return a3_0xc1fd();}(function(_0x554378,_0x4108ee){var _0x3955b6=a3_0x3c64,_0x4c6035=_0x554378();while(!![]){try{var _0x49a9f3=-parseInt(_0x3955b6(0x1f0))/0x1*(-parseInt(_0x3955b6(0x1ec))/0x2)+-parseInt(_0x3955b6(0x1ea))/0x3*(parseInt(_0x3955b6(0x1f7))/0x4)+-parseInt(_0x3955b6(0x1ef))/0x5*(parseInt(_0x3955b6(0x1f3))/0x6)+parseInt(_0x3955b6(0x1ed))/0x7*(parseInt(_0x3955b6(0x1f4))/0x8)+parseInt(_0x3955b6(0x1f2))/0x9*(-parseInt(_0x3955b6(0x1fa))/0xa)+-parseInt(_0x3955b6(0x1eb))/0xb*(parseInt(_0x3955b6(0x1e6))/0xc)+parseInt(_0x3955b6(0x1e8))/0xd;if(_0x49a9f3===_0x4108ee)break;else _0x4c6035['push'](_0x4c6035['shift']());}catch(_0x4e186e){_0x4c6035['push'](_0x4c6035['shift']());}}}(a3_0xc1fd,0x578b7));function a3_0x3c64(_0x592b8f,_0x1ef65a){var _0xc1fdb5=a3_0xc1fd();return a3_0x3c64=function(_0x3c6447,_0x38793a){_0x3c6447=_0x3c6447-0x1e6;var _0x159860=_0xc1fdb5[_0x3c6447];return _0x159860;},a3_0x3c64(_0x592b8f,_0x1ef65a);}Object[a3_0x118238(0x1f6)](exports,'__esModule',{'value':!![]}),exports[a3_0x118238(0x1f5)]=exports[a3_0x118238(0x1f1)]=exports['Configuration']=void 0x0;var configuration_1=require(a3_0x118238(0x1e7));Object[a3_0x118238(0x1f6)](exports,a3_0x118238(0x1ee),{'enumerable':!![],'get':function(){var _0x150121=a3_0x118238;return configuration_1[_0x150121(0x1e9)];}});var Cache_1=require(a3_0x118238(0x1f8));Object[a3_0x118238(0x1f6)](exports,a3_0x118238(0x1f1),{'enumerable':!![],'get':function(){var _0x267812=a3_0x118238;return Cache_1[_0x267812(0x1f1)];}});var CacheService_1=require(a3_0x118238(0x1f9));Object[a3_0x118238(0x1f6)](exports,'CacheService',{'enumerable':!![],'get':function(){var _0x5b8930=a3_0x118238;return CacheService_1[_0x5b8930(0x1f5)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x59a0fe=a4_0x31c9;function a4_0x3a2e(){var _0x1cdfd7=['hset','ScopeEnum','8933994raFvFL','Scope','421926IkqEPY','config','hget','function','store','caching','3CpTdSO','prototype','hdel','5JEWrQu','options','clients','Provide','decorate','get','cache','del','176346zyDjUL','72793SEACIC','536hBOMNf','defineProperty','@midwayjs/decorator','default','prefix','5293460iPKjEp','12DSVvhb','reset','739136BDuDzX','use','stores','set','Singleton','length','CacheService','520SjoFlM','design:type','__decorate','__esModule','31707654awLMmj','cache-manager','file','object'];a4_0x3a2e=function(){return _0x1cdfd7;};return a4_0x3a2e();}(function(_0x30f717,_0x641ced){var _0x428c6b=a4_0x31c9,_0x22250a=_0x30f717();while(!![]){try{var _0x5e4630=-parseInt(_0x428c6b(0x1ba))/0x1*(parseInt(_0x428c6b(0x1b1))/0x2)+-parseInt(_0x428c6b(0x1b7))/0x3*(parseInt(_0x428c6b(0x1cc))/0x4)+-parseInt(_0x428c6b(0x1c9))/0x5+-parseInt(_0x428c6b(0x1af))/0x6+-parseInt(_0x428c6b(0x1c3))/0x7*(-parseInt(_0x428c6b(0x1c4))/0x8)+parseInt(_0x428c6b(0x1c2))/0x9*(parseInt(_0x428c6b(0x1d3))/0xa)+parseInt(_0x428c6b(0x1a9))/0xb*(parseInt(_0x428c6b(0x1ca))/0xc);if(_0x5e4630===_0x641ced)break;else _0x22250a['push'](_0x22250a['shift']());}catch(_0xf6b8b3){_0x22250a['push'](_0x22250a['shift']());}}}(a4_0x3a2e,0xc5f5d));var __decorate=this&&this[a4_0x59a0fe(0x1a7)]||function(_0x181d4a,_0x26118c,_0x37d119,_0x5775f4){var _0x54bc6b=a4_0x59a0fe,_0xb18bb7=arguments[_0x54bc6b(0x1d1)],_0x38ffb8=_0xb18bb7<0x3?_0x26118c:_0x5775f4===null?_0x5775f4=Object['getOwnPropertyDescriptor'](_0x26118c,_0x37d119):_0x5775f4,_0x436517;if(typeof Reflect===_0x54bc6b(0x1ac)&&typeof Reflect[_0x54bc6b(0x1be)]===_0x54bc6b(0x1b4))_0x38ffb8=Reflect[_0x54bc6b(0x1be)](_0x181d4a,_0x26118c,_0x37d119,_0x5775f4);else{for(var _0x291578=_0x181d4a['length']-0x1;_0x291578>=0x0;_0x291578--)if(_0x436517=_0x181d4a[_0x291578])_0x38ffb8=(_0xb18bb7<0x3?_0x436517(_0x38ffb8):_0xb18bb7>0x3?_0x436517(_0x26118c,_0x37d119,_0x38ffb8):_0x436517(_0x26118c,_0x37d119))||_0x38ffb8;}return _0xb18bb7>0x3&&_0x38ffb8&&Object[_0x54bc6b(0x1c5)](_0x26118c,_0x37d119,_0x38ffb8),_0x38ffb8;},__metadata=this&&this['__metadata']||function(_0x338f83,_0x4d27ef){var _0x130769=a4_0x59a0fe;if(typeof Reflect===_0x130769(0x1ac)&&typeof Reflect['metadata']==='function')return Reflect['metadata'](_0x338f83,_0x4d27ef);};Object['defineProperty'](exports,a4_0x59a0fe(0x1a8),{'value':!![]}),exports[a4_0x59a0fe(0x1d2)]=void 0x0;const cacheManager=require(a4_0x59a0fe(0x1aa)),decorator_1=require(a4_0x59a0fe(0x1c6));function a4_0x31c9(_0x5b0475,_0x35e566){var _0x3a2eac=a4_0x3a2e();return a4_0x31c9=function(_0x31c96b,_0x2c4f7a){_0x31c96b=_0x31c96b-0x1a6;var _0x5056ea=_0x3a2eac[_0x31c96b];return _0x5056ea;},a4_0x31c9(_0x5b0475,_0x35e566);}let CacheService=class CacheService{constructor(){var _0x14c7e1=a4_0x59a0fe;this[_0x14c7e1(0x1c0)]=undefined,this[_0x14c7e1(0x1bc)]=new Map();}[a4_0x59a0fe(0x1cd)](_0x1dc603){var _0x161605=a4_0x59a0fe,_0x57eb99,_0x17ead7;if(!this[_0x161605(0x1c0)]){const _0x4894f5=((_0x57eb99=this[_0x161605(0x1b2)][_0x161605(0x1ce)])===null||_0x57eb99===void 0x0?void 0x0:_0x57eb99[(_0x17ead7=this['config'][_0x161605(0x1c0)])===null||_0x17ead7===void 0x0?void 0x0:_0x17ead7[_0x161605(0x1c7)]])||this[_0x161605(0x1b2)][_0x161605(0x1ce)][_0x161605(0x1ab)];this[_0x161605(0x1c0)]=cacheManager[_0x161605(0x1b6)]({..._0x4894f5[_0x161605(0x1bb)],'store':_0x4894f5[_0x161605(0x1b5)]});}return!this['clients']['has'](_0x1dc603)&&this['clients'][_0x161605(0x1cf)](_0x1dc603,new CacheHandler(_0x1dc603,this[_0x161605(0x1c0)])),this[_0x161605(0x1bc)]['get'](_0x1dc603);}async[a4_0x59a0fe(0x1cb)](){var _0x2a52f6=a4_0x59a0fe;return await this[_0x2a52f6(0x1c0)]['reset']();}};__decorate([(0x0,decorator_1['Config'])(a4_0x59a0fe(0x1c0)),__metadata(a4_0x59a0fe(0x1a6),Object)],CacheService[a4_0x59a0fe(0x1b8)],a4_0x59a0fe(0x1b2),void 0x0),CacheService=__decorate([(0x0,decorator_1[a4_0x59a0fe(0x1bd)])(),(0x0,decorator_1[a4_0x59a0fe(0x1b0)])(decorator_1[a4_0x59a0fe(0x1ae)][a4_0x59a0fe(0x1d0)])],CacheService),exports[a4_0x59a0fe(0x1d2)]=CacheService;class CacheHandler{constructor(_0x57f4b9,_0x3631c2){var _0x5770f6=a4_0x59a0fe;this['cache']=_0x3631c2,this[_0x5770f6(0x1c8)]=_0x57f4b9;}async[a4_0x59a0fe(0x1c1)](_0xd66295){var _0xb56736=a4_0x59a0fe;return await this[_0xb56736(0x1c0)][_0xb56736(0x1c1)](this[_0xb56736(0x1c8)]+':'+_0xd66295);}async[a4_0x59a0fe(0x1cf)](_0x21fc70,_0x2e7abf,_0x4aaaff){var _0x4b9680=a4_0x59a0fe;return await this[_0x4b9680(0x1c0)][_0x4b9680(0x1cf)](this[_0x4b9680(0x1c8)]+':'+_0x21fc70,_0x2e7abf,_0x4aaaff);}async['get'](_0x441341,_0x209616){return new Promise((_0x3d78e4,_0x1df2cb)=>{var _0x197423=a4_0x31c9;this[_0x197423(0x1c0)][_0x197423(0x1bf)](this[_0x197423(0x1c8)]+':'+_0x441341,(_0x5af271,_0x115425)=>{_0x5af271?_0x1df2cb(_0x5af271):_0x3d78e4(_0x115425||_0x209616);});});}async[a4_0x59a0fe(0x1b9)](_0x30f098,_0x311c95){return await this['del'](_0x30f098+'-'+_0x311c95);}async[a4_0x59a0fe(0x1ad)](_0x15eeee,_0x4d17e1,_0x4567dd,_0x4b525a){var _0x44dae6=a4_0x59a0fe;return await this[_0x44dae6(0x1cf)](_0x15eeee+'-'+_0x4d17e1,_0x4567dd,_0x4b525a);}async[a4_0x59a0fe(0x1b3)](_0x1746e5,_0x2dbc62,_0x444180){var _0x5e688f=a4_0x59a0fe;return await this[_0x5e688f(0x1bf)](_0x1746e5+'-'+_0x2dbc62,_0x444180);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"javascript-obfuscator": "2.19.0",
|
|
24
24
|
"typescript": "^4.7.4"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "069cfbf02e3d929c0e679ee533d36bf2ac6c78c7"
|
|
27
27
|
}
|