@anncic-api/cache 1.1.8 → 1.1.9
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';
|
|
1
|
+
'use strict';const a0_0x44c622=a0_0x1b1f;function a0_0x1b1f(_0xb76493,_0xfbe8db){const _0x208b9=a0_0x208b();return a0_0x1b1f=function(_0x1b1f41,_0x4717c5){_0x1b1f41=_0x1b1f41-0x16e;let _0xa94cf5=_0x208b9[_0x1b1f41];return _0xa94cf5;},a0_0x1b1f(_0xb76493,_0xfbe8db);}(function(_0x310d13,_0x1c2d56){const _0x4f5f4e=a0_0x1b1f,_0x9f37e1=_0x310d13();while(!![]){try{const _0x574acb=parseInt(_0x4f5f4e(0x177))/0x1*(parseInt(_0x4f5f4e(0x173))/0x2)+parseInt(_0x4f5f4e(0x172))/0x3*(-parseInt(_0x4f5f4e(0x175))/0x4)+parseInt(_0x4f5f4e(0x176))/0x5+-parseInt(_0x4f5f4e(0x17b))/0x6+-parseInt(_0x4f5f4e(0x16e))/0x7+parseInt(_0x4f5f4e(0x16f))/0x8*(-parseInt(_0x4f5f4e(0x17e))/0x9)+parseInt(_0x4f5f4e(0x17d))/0xa;if(_0x574acb===_0x1c2d56)break;else _0x9f37e1['push'](_0x9f37e1['shift']());}catch(_0x1204f7){_0x9f37e1['push'](_0x9f37e1['shift']());}}}(a0_0x208b,0x53d24));Object[a0_0x44c622(0x178)](exports,'__esModule',{'value':!![]});const fsStore=require('cache-manager-fs-hash'),redisStore=require(a0_0x44c622(0x171));function a0_0x208b(){const _0x2f99da=['2934MzkkLn','appDir','36724KopvUZ','2675430JQLtdJ','101iRXEOj','defineProperty','memory','file','3946494PTPJbQ','name','11606000pRmrin','414ehhhGp','3118941LWOMij','41936ugJTjF','default','cache-manager-ioredis','51XpjXHp'];a0_0x208b=function(){return _0x2f99da;};return a0_0x208b();}exports[a0_0x44c622(0x170)]=_0x36c6e8=>{const _0xbca0ce=a0_0x44c622;return{'cache':{'default':_0xbca0ce(0x17a),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x36c6e8[_0xbca0ce(0x174)]+'/runtime/.cache'}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':'127.0.0.1','password':'','ttl':0x1e13380,'keyPrefix':_0x36c6e8[_0xbca0ce(0x17c)]+':'}},'memory':{'store':_0xbca0ce(0x179),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a1_0x565e(){var _0x310787=['1080828GWynpH','anncic-api:cache','990846hvsbCr','2397669SGydZB','function','8056153XevLWk','3334218ByXJJw','@midwayjs/decorator','4207750FGrwWY','length','CustomConfiguration','./config/config.default','defineProperty','decorate','__esModule','Configuration','8huYfhh','31509040JQYiIl'];a1_0x565e=function(){return _0x310787;};return a1_0x565e();}function a1_0x1816(_0x57b4a0,_0x14cc77){var _0x565eba=a1_0x565e();return a1_0x1816=function(_0x181629,_0xeb4c30){_0x181629=_0x181629-0x1b5;var _0x154718=_0x565eba[_0x181629];return _0x154718;},a1_0x1816(_0x57b4a0,_0x14cc77);}var a1_0x103954=a1_0x1816;(function(_0x1b769a,_0x179a54){var _0x1faf06=a1_0x1816,_0x170b10=_0x1b769a();while(!![]){try{var _0x2ee720=parseInt(_0x1faf06(0x1ba))/0x1+parseInt(_0x1faf06(0x1be))/0x2+-parseInt(_0x1faf06(0x1bb))/0x3+-parseInt(_0x1faf06(0x1b6))/0x4*(-parseInt(_0x1faf06(0x1c0))/0x5)+parseInt(_0x1faf06(0x1b8))/0x6+parseInt(_0x1faf06(0x1bd))/0x7+-parseInt(_0x1faf06(0x1b7))/0x8;if(_0x2ee720===_0x179a54)break;else _0x170b10['push'](_0x170b10['shift']());}catch(_0x217fc3){_0x170b10['push'](_0x170b10['shift']());}}}(a1_0x565e,0xe414b));var __decorate=this&&this['__decorate']||function(_0x5dd453,_0xb83e97,_0x2a1d16,_0x4d2d67){var _0x41e75d=a1_0x1816,_0x3dfa36=arguments['length'],_0x3e58c9=_0x3dfa36<0x3?_0xb83e97:_0x4d2d67===null?_0x4d2d67=Object['getOwnPropertyDescriptor'](_0xb83e97,_0x2a1d16):_0x4d2d67,_0x698519;if(typeof Reflect==='object'&&typeof Reflect[_0x41e75d(0x1c5)]===_0x41e75d(0x1bc))_0x3e58c9=Reflect[_0x41e75d(0x1c5)](_0x5dd453,_0xb83e97,_0x2a1d16,_0x4d2d67);else{for(var _0x3ba59f=_0x5dd453[_0x41e75d(0x1c1)]-0x1;_0x3ba59f>=0x0;_0x3ba59f--)if(_0x698519=_0x5dd453[_0x3ba59f])_0x3e58c9=(_0x3dfa36<0x3?_0x698519(_0x3e58c9):_0x3dfa36>0x3?_0x698519(_0xb83e97,_0x2a1d16,_0x3e58c9):_0x698519(_0xb83e97,_0x2a1d16))||_0x3e58c9;}return _0x3dfa36>0x3&&_0x3e58c9&&Object[_0x41e75d(0x1c4)](_0xb83e97,_0x2a1d16,_0x3e58c9),_0x3e58c9;};Object['defineProperty'](exports,a1_0x103954(0x1c6),{'value':!![]}),exports[a1_0x103954(0x1c2)]=void 0x0;const decorator_1=require(a1_0x103954(0x1bf)),ConfigDefault=require(a1_0x103954(0x1c3));let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,decorator_1[a1_0x103954(0x1b5)])({'conflictCheck':![],'namespace':a1_0x103954(0x1b9),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x103954(0x1c2)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0xd31cff=a2_0x17f1;(function(_0x27b55e,_0x1e5244){const _0x459afb=a2_0x17f1,_0x2966ec=_0x27b55e();while(!![]){try{const _0x3d9584=parseInt(_0x459afb(0xcf))/0x1*(parseInt(_0x459afb(0xc1))/0x2)+-parseInt(_0x459afb(0xcb))/0x3*(-parseInt(_0x459afb(0xd0))/0x4)+-parseInt(_0x459afb(0xbc))/0x5*(parseInt(_0x459afb(0xc6))/0x6)+parseInt(_0x459afb(0xc2))/0x7+parseInt(_0x459afb(0xc5))/0x8+-parseInt(_0x459afb(0xc8))/0x9*(-parseInt(_0x459afb(0xb8))/0xa)+-parseInt(_0x459afb(0xb6))/0xb;if(_0x3d9584===_0x1e5244)break;else _0x2966ec['push'](_0x2966ec['shift']());}catch(_0x224235){_0x2966ec['push'](_0x2966ec['shift']());}}}(a2_0x4f35,0xf1662));Object[a2_0xd31cff(0xc7)](exports,a2_0xd31cff(0xba),{'value':!![]}),exports[a2_0xd31cff(0xbd)]=void 0x0;const crypto_js_1=require(a2_0xd31cff(0xcc)),CacheService_1=require(a2_0xd31cff(0xd1)),core_1=require('@midwayjs/core');function Cache(_0x4c80cd,_0x4ca631){return(_0x44be9e,_0x768e03,_0x4424c8)=>{const _0x733d43=a2_0x17f1,_0x29ec1f=_0x4424c8[_0x733d43(0xbe)];return _0x4424c8[_0x733d43(0xbe)]=async function(..._0x27e639){const _0x329b7b=_0x733d43;!_0x4c80cd&&(_0x4c80cd=(0x0,crypto_js_1[_0x329b7b(0xbb)])(JSON['stringify'](_0x27e639))[_0x329b7b(0xb7)]());let _0x53cbf0=await this[core_1[_0x329b7b(0xc9)]]['app']['getApplicationContext']()[_0x329b7b(0xc4)](CacheService_1['CacheService']),_0x28fb2b=await _0x53cbf0['use'](_0x329b7b(0xca))[_0x329b7b(0xce)](_0x4c80cd);if(_0x28fb2b)return JSON[_0x329b7b(0xc0)](_0x28fb2b);else _0x28fb2b=await _0x29ec1f[_0x329b7b(0xc3)](this,[..._0x27e639]),await _0x53cbf0[_0x329b7b(0xbf)]('MethodDecorator')[_0x329b7b(0xcd)](_0x4c80cd,JSON[_0x329b7b(0xb9)](_0x28fb2b),_0x4ca631);return _0x28fb2b;},_0x4424c8;};}exports['Cache']=Cache;function a2_0x17f1(_0x523897,_0x3628c5){const _0x4f35f6=a2_0x4f35();return a2_0x17f1=function(_0x17f101,_0x22fe61){_0x17f101=_0x17f101-0xb6;let _0xa2808e=_0x4f35f6[_0x17f101];return _0xa2808e;},a2_0x17f1(_0x523897,_0x3628c5);}function a2_0x4f35(){const _0x3caaaa=['use','parse','9216WxBnUI','3079496AulNgn','apply','getAsync','400680sXuTaf','209862kqvsNK','defineProperty','5720796lPkMoz','REQUEST_OBJ_CTX_KEY','MethodDecorator','3039279Awtqnn','crypto-js','set','get','397vBibAO','4XVuHNm','../service/CacheService','17767783pMrkJH','toString','10SFsXnF','stringify','__esModule','MD5','195VnUidy','Cache','value'];a2_0x4f35=function(){return _0x3caaaa;};return a2_0x4f35();}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a3_0x451d13=a3_0x2c7d;(function(_0x1e2477,_0x225737){var _0x26e274=a3_0x2c7d,_0x310f76=_0x1e2477();while(!![]){try{var _0x301ff6=parseInt(_0x26e274(0x99))/0x1+parseInt(_0x26e274(0x97))/0x2+parseInt(_0x26e274(0x94))/0x3+parseInt(_0x26e274(0x98))/0x4+parseInt(_0x26e274(0x9e))/0x5+parseInt(_0x26e274(0x96))/0x6*(parseInt(_0x26e274(0x9c))/0x7)+-parseInt(_0x26e274(0x91))/0x8*(parseInt(_0x26e274(0x93))/0x9);if(_0x301ff6===_0x225737)break;else _0x310f76['push'](_0x310f76['shift']());}catch(_0x246aa7){_0x310f76['push'](_0x310f76['shift']());}}}(a3_0x314f,0xd9a55));Object[a3_0x451d13(0x95)](exports,a3_0x451d13(0x92),{'value':!![]}),exports['CacheService']=exports[a3_0x451d13(0x9f)]=exports[a3_0x451d13(0x9a)]=void 0x0;var configuration_1=require(a3_0x451d13(0x9d));Object[a3_0x451d13(0x95)](exports,a3_0x451d13(0x9a),{'enumerable':!![],'get':function(){var _0x4fcf82=a3_0x451d13;return configuration_1[_0x4fcf82(0x90)];}});var Cache_1=require(a3_0x451d13(0x9b));Object[a3_0x451d13(0x95)](exports,a3_0x451d13(0x9f),{'enumerable':!![],'get':function(){var _0xa9f1bd=a3_0x451d13;return Cache_1[_0xa9f1bd(0x9f)];}});var CacheService_1=require('./service/CacheService');function a3_0x2c7d(_0x7f6a1,_0x49833c){var _0x314fe6=a3_0x314f();return a3_0x2c7d=function(_0x2c7d3b,_0x238e6c){_0x2c7d3b=_0x2c7d3b-0x90;var _0x20cc89=_0x314fe6[_0x2c7d3b];return _0x20cc89;},a3_0x2c7d(_0x7f6a1,_0x49833c);}function a3_0x314f(){var _0x1bc4fb=['./configuration','5674410bjOOqY','Cache','CacheService','CustomConfiguration','344jyiAFw','__esModule','1161441sVhRmA','374841lrxRBy','defineProperty','18gvpqIJ','2054618JctxkH','6680680TeKhPZ','1589087QcHtCn','Configuration','./decorator/Cache','2086441GZsNgF'];a3_0x314f=function(){return _0x1bc4fb;};return a3_0x314f();}Object['defineProperty'](exports,a3_0x451d13(0xa0),{'enumerable':!![],'get':function(){var _0x16a8bb=a3_0x451d13;return CacheService_1[_0x16a8bb(0xa0)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x4b763d=a4_0x13f8;(function(_0x12d948,_0x157bf7){var _0x4c5f85=a4_0x13f8,_0x3a7270=_0x12d948();while(!![]){try{var _0x3b82a1=-parseInt(_0x4c5f85(0x104))/0x1+-parseInt(_0x4c5f85(0x10f))/0x2+parseInt(_0x4c5f85(0x10e))/0x3+-parseInt(_0x4c5f85(0x11c))/0x4*(-parseInt(_0x4c5f85(0x118))/0x5)+parseInt(_0x4c5f85(0x114))/0x6+parseInt(_0x4c5f85(0x129))/0x7*(parseInt(_0x4c5f85(0x113))/0x8)+parseInt(_0x4c5f85(0x115))/0x9*(-parseInt(_0x4c5f85(0x127))/0xa);if(_0x3b82a1===_0x157bf7)break;else _0x3a7270['push'](_0x3a7270['shift']());}catch(_0x402ac7){_0x3a7270['push'](_0x3a7270['shift']());}}}(a4_0x46e8,0x470a8));var __decorate=this&&this[a4_0x4b763d(0x111)]||function(_0x554fbe,_0x5de3a0,_0x45cda7,_0x4f11e7){var _0x8e52d6=a4_0x4b763d,_0x2aff3e=arguments['length'],_0x89083f=_0x2aff3e<0x3?_0x5de3a0:_0x4f11e7===null?_0x4f11e7=Object[_0x8e52d6(0x123)](_0x5de3a0,_0x45cda7):_0x4f11e7,_0x103339;if(typeof Reflect==='object'&&typeof Reflect[_0x8e52d6(0x106)]===_0x8e52d6(0x11e))_0x89083f=Reflect[_0x8e52d6(0x106)](_0x554fbe,_0x5de3a0,_0x45cda7,_0x4f11e7);else{for(var _0x220475=_0x554fbe[_0x8e52d6(0x116)]-0x1;_0x220475>=0x0;_0x220475--)if(_0x103339=_0x554fbe[_0x220475])_0x89083f=(_0x2aff3e<0x3?_0x103339(_0x89083f):_0x2aff3e>0x3?_0x103339(_0x5de3a0,_0x45cda7,_0x89083f):_0x103339(_0x5de3a0,_0x45cda7))||_0x89083f;}return _0x2aff3e>0x3&&_0x89083f&&Object[_0x8e52d6(0x117)](_0x5de3a0,_0x45cda7,_0x89083f),_0x89083f;},__metadata=this&&this[a4_0x4b763d(0x128)]||function(_0x5f2b3c,_0x26e51c){var _0x15fb61=a4_0x4b763d;if(typeof Reflect===_0x15fb61(0x10c)&&typeof Reflect[_0x15fb61(0x11a)]===_0x15fb61(0x11e))return Reflect[_0x15fb61(0x11a)](_0x5f2b3c,_0x26e51c);};Object[a4_0x4b763d(0x117)](exports,'__esModule',{'value':!![]}),exports[a4_0x4b763d(0x124)]=void 0x0;function a4_0x13f8(_0x36f068,_0x1a713a){var _0x46e816=a4_0x46e8();return a4_0x13f8=function(_0x13f87f,_0x4c8482){_0x13f87f=_0x13f87f-0x103;var _0x3f65a0=_0x46e816[_0x13f87f];return _0x3f65a0;},a4_0x13f8(_0x36f068,_0x1a713a);}function a4_0x46e8(){var _0x31d88a=['has','193208cPiDWO','hdel','function','use','Provide','design:type','caching','getOwnPropertyDescriptor','CacheService','Singleton','options','100fxEpWB','__metadata','12439HkPxJx','stores','63866lgllAm','ScopeEnum','decorate','set','clients','Scope','prefix','del','object','get','250248Nnevhk','175452oRnPkv','cache','__decorate','prototype','2432CxfPdG','2022264ZwsLRI','857529nWqVSM','length','defineProperty','45QEDkcq','config','metadata'];a4_0x46e8=function(){return _0x31d88a;};return a4_0x46e8();}const cacheManager=require('cache-manager'),decorator_1=require('@midwayjs/decorator');let CacheService=class CacheService{constructor(){var _0x5b6814=a4_0x4b763d;this[_0x5b6814(0x110)]=undefined,this[_0x5b6814(0x108)]=new Map();}[a4_0x4b763d(0x11f)](_0x2f5a3e){var _0x3a039d=a4_0x4b763d,_0xf119d7,_0x59ba1e;if(!this[_0x3a039d(0x110)]){const _0x20c6db=((_0xf119d7=this[_0x3a039d(0x119)][_0x3a039d(0x103)])===null||_0xf119d7===void 0x0?void 0x0:_0xf119d7[(_0x59ba1e=this[_0x3a039d(0x119)][_0x3a039d(0x110)])===null||_0x59ba1e===void 0x0?void 0x0:_0x59ba1e['default']])||this[_0x3a039d(0x119)][_0x3a039d(0x103)]['file'];this[_0x3a039d(0x110)]=cacheManager[_0x3a039d(0x122)]({..._0x20c6db[_0x3a039d(0x126)],'store':_0x20c6db['store']});}return!this[_0x3a039d(0x108)][_0x3a039d(0x11b)](_0x2f5a3e)&&this[_0x3a039d(0x108)][_0x3a039d(0x107)](_0x2f5a3e,new CacheHandler(_0x2f5a3e,this[_0x3a039d(0x110)])),this[_0x3a039d(0x108)]['get'](_0x2f5a3e);}async['reset'](){var _0xc82c46=a4_0x4b763d;return await this[_0xc82c46(0x110)]['reset']();}};__decorate([(0x0,decorator_1['Config'])(a4_0x4b763d(0x110)),__metadata(a4_0x4b763d(0x121),Object)],CacheService[a4_0x4b763d(0x112)],a4_0x4b763d(0x119),void 0x0),CacheService=__decorate([(0x0,decorator_1[a4_0x4b763d(0x120)])(),(0x0,decorator_1[a4_0x4b763d(0x109)])(decorator_1[a4_0x4b763d(0x105)][a4_0x4b763d(0x125)])],CacheService),exports[a4_0x4b763d(0x124)]=CacheService;class CacheHandler{constructor(_0x3e4169,_0x582bd4){var _0x5c5328=a4_0x4b763d;this[_0x5c5328(0x110)]=_0x582bd4,this['prefix']=_0x3e4169;}async[a4_0x4b763d(0x10b)](_0x44f611){var _0x1f013c=a4_0x4b763d;return await this[_0x1f013c(0x110)][_0x1f013c(0x10b)](this['prefix']+':'+_0x44f611);}async[a4_0x4b763d(0x107)](_0x5502fd,_0x15fe1f,_0x5e35cd){var _0x20dfda=a4_0x4b763d;return await this['cache'][_0x20dfda(0x107)](this[_0x20dfda(0x10a)]+':'+_0x5502fd,_0x15fe1f,_0x5e35cd);}async['get'](_0x52e6a9,_0x450eac){return new Promise((_0x949f28,_0x4a9388)=>{var _0x24ee1c=a4_0x13f8;this[_0x24ee1c(0x110)][_0x24ee1c(0x10d)](this['prefix']+':'+_0x52e6a9,(_0x5dfc01,_0x24f012)=>{_0x5dfc01?_0x4a9388(_0x5dfc01):_0x949f28(_0x24f012||_0x450eac);});});}async[a4_0x4b763d(0x11d)](_0x34c86e,_0x48b7c7){var _0x200e85=a4_0x4b763d;return await this[_0x200e85(0x10b)](_0x34c86e+'-'+_0x48b7c7);}async['hset'](_0xa56567,_0x354b82,_0x37faa8,_0x5b5555){var _0x409661=a4_0x4b763d;return await this[_0x409661(0x107)](_0xa56567+'-'+_0x354b82,_0x37faa8,_0x5b5555);}async['hget'](_0x18f236,_0x1d76c7,_0x22f718){var _0x1c09ee=a4_0x4b763d;return await this[_0x1c09ee(0x10d)](_0x18f236+'-'+_0x1d76c7,_0x22f718);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
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": "a4a3bee3b2b8649986c595084c5efdf2cc263aa4"
|
|
27
27
|
}
|