@anncic-api/cache 1.3.4 → 1.3.6
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_0x1dff(){const _0x624ab4=['defineProperty','1819908BeFZaE','7642134uAMKOm','default','7427091AlbwXc','1237665Txedqg','memory','cache-manager-fs-hash','3680910brPzcq','appDir','name','5435975ECSdtK','793956tCacHk','cache-manager-ioredis','file'];a0_0x1dff=function(){return _0x624ab4;};return a0_0x1dff();}const a0_0x5f1e70=a0_0x1384;(function(_0x4a73e6,_0x345937){const _0xcdc2a9=a0_0x1384,_0x10f0c0=_0x4a73e6();while(!![]){try{const _0x4ea169=parseInt(_0xcdc2a9(0x149))/0x1+-parseInt(_0xcdc2a9(0x150))/0x2+parseInt(_0xcdc2a9(0x14c))/0x3+-parseInt(_0xcdc2a9(0x154))/0x4+-parseInt(_0xcdc2a9(0x14f))/0x5+parseInt(_0xcdc2a9(0x155))/0x6+-parseInt(_0xcdc2a9(0x157))/0x7;if(_0x4ea169===_0x345937)break;else _0x10f0c0['push'](_0x10f0c0['shift']());}catch(_0x12acfd){_0x10f0c0['push'](_0x10f0c0['shift']());}}}(a0_0x1dff,0xb4371));Object[a0_0x5f1e70(0x153)](exports,'__esModule',{'value':!![]});const fsStore=require(a0_0x5f1e70(0x14b)),redisStore=require(a0_0x5f1e70(0x151));function a0_0x1384(_0x2e6baf,_0x7236ed){const _0x1dffa3=a0_0x1dff();return a0_0x1384=function(_0x1384f0,_0x48e394){_0x1384f0=_0x1384f0-0x149;let _0x5686ed=_0x1dffa3[_0x1384f0];return _0x5686ed;},a0_0x1384(_0x2e6baf,_0x7236ed);}exports[a0_0x5f1e70(0x156)]=_0x18cb96=>{const _0x1fd559=a0_0x5f1e70;return{'cache':{'default':_0x1fd559(0x152),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x18cb96[_0x1fd559(0x14d)]+'/runtime/.cache'}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':'127.0.0.1','password':'','ttl':0x1e13380,'keyPrefix':_0x18cb96[_0x1fd559(0x14e)]+':'}},'memory':{'store':_0x1fd559(0x14a),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a1_0x1c9b(_0x5dd16d,_0x4df902){var _0x36c7be=a1_0x36c7();return a1_0x1c9b=function(_0x1c9b93,_0x1de1f0){_0x1c9b93=_0x1c9b93-0xa5;var _0x3cd3fd=_0x36c7be[_0x1c9b93];return _0x3cd3fd;},a1_0x1c9b(_0x5dd16d,_0x4df902);}var a1_0x1a241a=a1_0x1c9b;function a1_0x36c7(){var _0x50143b=['object','CustomConfiguration','anncic-api:cache','@midwayjs/core','245995vmKoqy','decorate','264672fmYKOn','length','function','391vdCjpJ','3590wDhHzq','2217699DkoAAj','5434781YlUwOE','defineProperty','./config/config.default','671328HquQpu','120magYXw','5374tbkhsU','873DMdpyg','12olJnAr','14kcijQR','getOwnPropertyDescriptor','__esModule'];a1_0x36c7=function(){return _0x50143b;};return a1_0x36c7();}(function(_0x19ca32,_0x541af4){var _0x8e6599=a1_0x1c9b,_0x470f6=_0x19ca32();while(!![]){try{var _0x5bfed2=-parseInt(_0x8e6599(0xb9))/0x1*(-parseInt(_0x8e6599(0xaa))/0x2)+parseInt(_0x8e6599(0xbb))/0x3+parseInt(_0x8e6599(0xa8))/0x4+-parseInt(_0x8e6599(0xb4))/0x5*(parseInt(_0x8e6599(0xa9))/0x6)+parseInt(_0x8e6599(0xad))/0x7*(parseInt(_0x8e6599(0xb6))/0x8)+-parseInt(_0x8e6599(0xab))/0x9*(-parseInt(_0x8e6599(0xba))/0xa)+parseInt(_0x8e6599(0xa5))/0xb*(-parseInt(_0x8e6599(0xac))/0xc);if(_0x5bfed2===_0x541af4)break;else _0x470f6['push'](_0x470f6['shift']());}catch(_0x54df6e){_0x470f6['push'](_0x470f6['shift']());}}}(a1_0x36c7,0x8dc0e));var __decorate=this&&this['__decorate']||function(_0x43dc8d,_0x20025d,_0x156866,_0x23b466){var _0x11a67b=a1_0x1c9b,_0x5c65ac=arguments[_0x11a67b(0xb7)],_0x22cfaf=_0x5c65ac<0x3?_0x20025d:_0x23b466===null?_0x23b466=Object[_0x11a67b(0xae)](_0x20025d,_0x156866):_0x23b466,_0xdad876;if(typeof Reflect===_0x11a67b(0xb0)&&typeof Reflect[_0x11a67b(0xb5)]===_0x11a67b(0xb8))_0x22cfaf=Reflect['decorate'](_0x43dc8d,_0x20025d,_0x156866,_0x23b466);else{for(var _0x367cd2=_0x43dc8d[_0x11a67b(0xb7)]-0x1;_0x367cd2>=0x0;_0x367cd2--)if(_0xdad876=_0x43dc8d[_0x367cd2])_0x22cfaf=(_0x5c65ac<0x3?_0xdad876(_0x22cfaf):_0x5c65ac>0x3?_0xdad876(_0x20025d,_0x156866,_0x22cfaf):_0xdad876(_0x20025d,_0x156866))||_0x22cfaf;}return _0x5c65ac>0x3&&_0x22cfaf&&Object['defineProperty'](_0x20025d,_0x156866,_0x22cfaf),_0x22cfaf;};Object[a1_0x1a241a(0xa6)](exports,a1_0x1a241a(0xaf),{'value':!![]}),exports[a1_0x1a241a(0xb1)]=void 0x0;const core_1=require(a1_0x1a241a(0xb3)),ConfigDefault=require(a1_0x1a241a(0xa7));let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'conflictCheck':![],'namespace':a1_0x1a241a(0xb2),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x1a241a(0xb1)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x3b4c8c=a2_0x2502;(function(_0x1108e8,_0x30fdef){const _0x25164c=a2_0x2502,_0x44e004=_0x1108e8();while(!![]){try{const _0x3401dd=-parseInt(_0x25164c(0xc7))/0x1*(parseInt(_0x25164c(0xd7))/0x2)+-parseInt(_0x25164c(0xc6))/0x3*(-parseInt(_0x25164c(0xde))/0x4)+-parseInt(_0x25164c(0xd0))/0x5+parseInt(_0x25164c(0xd1))/0x6+parseInt(_0x25164c(0xc5))/0x7*(-parseInt(_0x25164c(0xd2))/0x8)+parseInt(_0x25164c(0xdd))/0x9*(parseInt(_0x25164c(0xc4))/0xa)+parseInt(_0x25164c(0xdb))/0xb*(parseInt(_0x25164c(0xcf))/0xc);if(_0x3401dd===_0x30fdef)break;else _0x44e004['push'](_0x44e004['shift']());}catch(_0xb0a69a){_0x44e004['push'](_0x44e004['shift']());}}}(a2_0x147e,0xec41e));function a2_0x2502(_0x116c80,_0x408742){const _0x147ec0=a2_0x147e();return a2_0x2502=function(_0x250273,_0x44761f){_0x250273=_0x250273-0xc2;let _0x27e68c=_0x147ec0[_0x250273];return _0x27e68c;},a2_0x2502(_0x116c80,_0x408742);}Object[a2_0x3b4c8c(0xd4)](exports,a2_0x3b4c8c(0xce),{'value':!![]}),exports[a2_0x3b4c8c(0xc2)]=void 0x0;const crypto_js_1=require('crypto-js'),CacheService_1=require('../service/CacheService'),core_1=require(a2_0x3b4c8c(0xd9));function Cache(_0x1e4d4f,_0x41574e){return(_0x494404,_0xc3a14c,_0x23163b)=>{const _0x480524=a2_0x2502,_0x258b4a=_0x23163b[_0x480524(0xda)];return _0x23163b[_0x480524(0xda)]=async function(..._0x5cddc8){const _0x5bf720=_0x480524;!_0x1e4d4f&&(_0x1e4d4f=(0x0,crypto_js_1[_0x5bf720(0xcb)])(JSON[_0x5bf720(0xc3)](_0x5cddc8))[_0x5bf720(0xca)]());let _0x174b74=await this[core_1[_0x5bf720(0xdc)]][_0x5bf720(0xcc)][_0x5bf720(0xd8)]()['getAsync'](CacheService_1[_0x5bf720(0xcd)]),_0x581aa3=await _0x174b74[_0x5bf720(0xc9)](_0x5bf720(0xdf))[_0x5bf720(0xc8)](_0x1e4d4f);if(_0x581aa3)return JSON[_0x5bf720(0xd6)](_0x581aa3);else _0x581aa3=await _0x258b4a[_0x5bf720(0xd5)](this,[..._0x5cddc8]),await _0x174b74[_0x5bf720(0xc9)](_0x5bf720(0xdf))[_0x5bf720(0xd3)](_0x1e4d4f,JSON['stringify'](_0x581aa3),_0x41574e);return _0x581aa3;},_0x23163b;};}exports[a2_0x3b4c8c(0xc2)]=Cache;function a2_0x147e(){const _0x399923=['MD5','app','CacheService','__esModule','36zUeuxP','1164240iNRGjs','592722vbYuQs','198192RWCcEe','set','defineProperty','apply','parse','758jrkSsQ','getApplicationContext','@midwayjs/core','value','3778115KFSFMf','REQUEST_OBJ_CTX_KEY','8156799wEAYfb','4CZTHTK','Method::Decorator','Cache','stringify','20oyqMPn','91giDZwE','923757KYbqOa','4557jqNLhx','get','use','toString'];a2_0x147e=function(){return _0x399923;};return a2_0x147e();}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a3_0xa6db51=a3_0x5bfb;function a3_0x5bfb(_0x33b1a8,_0x50cb36){var _0x52cd25=a3_0x52cd();return a3_0x5bfb=function(_0x5bfbfc,_0x498179){_0x5bfbfc=_0x5bfbfc-0x1a4;var _0x289eab=_0x52cd25[_0x5bfbfc];return _0x289eab;},a3_0x5bfb(_0x33b1a8,_0x50cb36);}(function(_0x3e756d,_0x10a8d6){var _0x3338d3=a3_0x5bfb,_0x47a6b3=_0x3e756d();while(!![]){try{var _0x1dd435=-parseInt(_0x3338d3(0x1ae))/0x1+parseInt(_0x3338d3(0x1a9))/0x2+-parseInt(_0x3338d3(0x1b2))/0x3*(-parseInt(_0x3338d3(0x1a8))/0x4)+parseInt(_0x3338d3(0x1ac))/0x5*(parseInt(_0x3338d3(0x1b0))/0x6)+-parseInt(_0x3338d3(0x1ab))/0x7*(parseInt(_0x3338d3(0x1b3))/0x8)+-parseInt(_0x3338d3(0x1b1))/0x9*(parseInt(_0x3338d3(0x1b7))/0xa)+parseInt(_0x3338d3(0x1b5))/0xb*(parseInt(_0x3338d3(0x1aa))/0xc);if(_0x1dd435===_0x10a8d6)break;else _0x47a6b3['push'](_0x47a6b3['shift']());}catch(_0x22fd85){_0x47a6b3['push'](_0x47a6b3['shift']());}}}(a3_0x52cd,0xecabb));Object[a3_0xa6db51(0x1a7)](exports,a3_0xa6db51(0x1a4),{'value':!![]}),exports['CacheService']=exports['Cache']=exports[a3_0xa6db51(0x1a6)]=void 0x0;var configuration_1=require(a3_0xa6db51(0x1b8));Object[a3_0xa6db51(0x1a7)](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x452d56=a3_0xa6db51;return configuration_1[_0x452d56(0x1a5)];}});function a3_0x52cd(){var _0x2500f6=['12700985DNaNTK','./service/CacheService','1708990POGooe','./configuration','__esModule','CustomConfiguration','Configuration','defineProperty','49744LlLwgJ','1198124cJOPnm','12UyVfxM','126413pKpCsL','95XrsiII','CacheService','1233579hJhDce','./decorator/Cache','399690zoKMnE','63Nleopm','96KwhbGX','8wtJcSr','Cache'];a3_0x52cd=function(){return _0x2500f6;};return a3_0x52cd();}var Cache_1=require(a3_0xa6db51(0x1af));Object['defineProperty'](exports,a3_0xa6db51(0x1b4),{'enumerable':!![],'get':function(){return Cache_1['Cache'];}});var CacheService_1=require(a3_0xa6db51(0x1b6));Object[a3_0xa6db51(0x1a7)](exports,a3_0xa6db51(0x1ad),{'enumerable':!![],'get':function(){return CacheService_1['CacheService'];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x1cc9dd=a4_0x227e;(function(_0x3eeea1,_0x391f28){var _0x590856=a4_0x227e,_0x4b3fbf=_0x3eeea1();while(!![]){try{var _0x3cbb4b=parseInt(_0x590856(0x15b))/0x1*(-parseInt(_0x590856(0x157))/0x2)+-parseInt(_0x590856(0x16c))/0x3+parseInt(_0x590856(0x173))/0x4+-parseInt(_0x590856(0x164))/0x5*(parseInt(_0x590856(0x171))/0x6)+-parseInt(_0x590856(0x163))/0x7+-parseInt(_0x590856(0x15e))/0x8+parseInt(_0x590856(0x174))/0x9;if(_0x3cbb4b===_0x391f28)break;else _0x4b3fbf['push'](_0x4b3fbf['shift']());}catch(_0x586702){_0x4b3fbf['push'](_0x4b3fbf['shift']());}}}(a4_0xc18f,0xb1667));var __decorate=this&&this['__decorate']||function(_0x5c502d,_0x15da65,_0x1321ba,_0x1354a5){var _0x169c5e=a4_0x227e,_0x54c0ba=arguments['length'],_0x1a974f=_0x54c0ba<0x3?_0x15da65:_0x1354a5===null?_0x1354a5=Object['getOwnPropertyDescriptor'](_0x15da65,_0x1321ba):_0x1354a5,_0x51b17a;if(typeof Reflect==='object'&&typeof Reflect[_0x169c5e(0x156)]==='function')_0x1a974f=Reflect[_0x169c5e(0x156)](_0x5c502d,_0x15da65,_0x1321ba,_0x1354a5);else{for(var _0x1298e8=_0x5c502d['length']-0x1;_0x1298e8>=0x0;_0x1298e8--)if(_0x51b17a=_0x5c502d[_0x1298e8])_0x1a974f=(_0x54c0ba<0x3?_0x51b17a(_0x1a974f):_0x54c0ba>0x3?_0x51b17a(_0x15da65,_0x1321ba,_0x1a974f):_0x51b17a(_0x15da65,_0x1321ba))||_0x1a974f;}return _0x54c0ba>0x3&&_0x1a974f&&Object[_0x169c5e(0x158)](_0x15da65,_0x1321ba,_0x1a974f),_0x1a974f;},__metadata=this&&this[a4_0x1cc9dd(0x178)]||function(_0x441be0,_0xa23ed4){var _0x599483=a4_0x1cc9dd;if(typeof Reflect===_0x599483(0x15f)&&typeof Reflect[_0x599483(0x159)]===_0x599483(0x160))return Reflect[_0x599483(0x159)](_0x441be0,_0xa23ed4);};Object[a4_0x1cc9dd(0x158)](exports,a4_0x1cc9dd(0x161),{'value':!![]}),exports[a4_0x1cc9dd(0x170)]=void 0x0;function a4_0xc18f(){var _0x100a2a=['clients','7285838wMFOtd','1533650rhJxAB','use','store','set','Scope','ScopeEnum','Provide','del','3229833VXQLuF','prefix','design:type','prototype','CacheService','6evbjhZ','default','4533420JpeFtm','31382712sHIjiL','caching','reset','get','__metadata','config','decorate','614268GQMzlJ','defineProperty','metadata','hset','1vrebpf','cache-manager','cache','9299064smWkfT','object','function','__esModule'];a4_0xc18f=function(){return _0x100a2a;};return a4_0xc18f();}const cacheManager=require(a4_0x1cc9dd(0x15c)),core_1=require('@midwayjs/core');let CacheService=class CacheService{constructor(){var _0x4af57c=a4_0x1cc9dd;this[_0x4af57c(0x15d)]=undefined,this['clients']=new Map();}[a4_0x1cc9dd(0x165)](_0xb69c93){var _0x4ef04b=a4_0x1cc9dd,_0x3ca205,_0x38137b;if(!this[_0x4ef04b(0x15d)]){const _0x53f22d=((_0x3ca205=this[_0x4ef04b(0x155)]['stores'])===null||_0x3ca205===void 0x0?void 0x0:_0x3ca205[(_0x38137b=this[_0x4ef04b(0x155)][_0x4ef04b(0x15d)])===null||_0x38137b===void 0x0?void 0x0:_0x38137b[_0x4ef04b(0x172)]])||this[_0x4ef04b(0x155)]['stores']['file'];this[_0x4ef04b(0x15d)]=cacheManager[_0x4ef04b(0x175)]({..._0x53f22d['options'],'store':_0x53f22d[_0x4ef04b(0x166)]});}return!this['clients']['has'](_0xb69c93)&&this[_0x4ef04b(0x162)][_0x4ef04b(0x167)](_0xb69c93,new CacheHandler(_0xb69c93,this[_0x4ef04b(0x15d)])),this[_0x4ef04b(0x162)][_0x4ef04b(0x177)](_0xb69c93);}async[a4_0x1cc9dd(0x176)](){var _0x1a9714=a4_0x1cc9dd;return await this[_0x1a9714(0x15d)][_0x1a9714(0x176)]();}};__decorate([(0x0,core_1['Config'])(a4_0x1cc9dd(0x15d)),__metadata(a4_0x1cc9dd(0x16e),Object)],CacheService[a4_0x1cc9dd(0x16f)],a4_0x1cc9dd(0x155),void 0x0),CacheService=__decorate([(0x0,core_1[a4_0x1cc9dd(0x16a)])(),(0x0,core_1[a4_0x1cc9dd(0x168)])(core_1[a4_0x1cc9dd(0x169)]['Singleton'])],CacheService),exports[a4_0x1cc9dd(0x170)]=CacheService;function a4_0x227e(_0x4c7a6d,_0x51d4c9){var _0xc18f6f=a4_0xc18f();return a4_0x227e=function(_0x227edb,_0x2b1cbb){_0x227edb=_0x227edb-0x155;var _0x3409e8=_0xc18f6f[_0x227edb];return _0x3409e8;},a4_0x227e(_0x4c7a6d,_0x51d4c9);}class CacheHandler{constructor(_0xb53b16,_0x512de7){var _0x3c5d64=a4_0x1cc9dd;this[_0x3c5d64(0x15d)]=_0x512de7,this[_0x3c5d64(0x16d)]=_0xb53b16;}async[a4_0x1cc9dd(0x16b)](_0x3baae5){var _0x514672=a4_0x1cc9dd;return await this[_0x514672(0x15d)][_0x514672(0x16b)](this['prefix']+':'+_0x3baae5);}async[a4_0x1cc9dd(0x167)](_0x42bd1d,_0x1a440e,_0x1c9b53){var _0x1db1b0=a4_0x1cc9dd;return await this[_0x1db1b0(0x15d)][_0x1db1b0(0x167)](this[_0x1db1b0(0x16d)]+':'+_0x42bd1d,_0x1a440e,_0x1c9b53);}async['get'](_0x3a70f0,_0x496ab7){return new Promise((_0x52a8da,_0x9dc7a7)=>{var _0x4cff47=a4_0x227e;this[_0x4cff47(0x15d)][_0x4cff47(0x177)](this[_0x4cff47(0x16d)]+':'+_0x3a70f0,(_0x42132f,_0x4677cf)=>{_0x42132f?_0x9dc7a7(_0x42132f):_0x52a8da(_0x4677cf||_0x496ab7);});});}async['hdel'](_0x541b7f,_0x4017cd){return await this['del'](_0x541b7f+'#'+_0x4017cd);}async[a4_0x1cc9dd(0x15a)](_0x122073,_0x145b58,_0x16efed,_0x2fb58a){var _0xd02404=a4_0x1cc9dd;return await this[_0xd02404(0x167)](_0x122073+'#'+_0x145b58,_0x16efed,_0x2fb58a);}async['hget'](_0x55ed35,_0x284aac,_0x57b376){var _0x167710=a4_0x1cc9dd;return await this[_0x167710(0x177)](_0x55ed35+'#'+_0x284aac,_0x57b376);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"cache-manager": "^
|
|
17
|
+
"cache-manager": "^3.6.3",
|
|
18
18
|
"cache-manager-fs-hash": "^1.0.0",
|
|
19
19
|
"cache-manager-ioredis": "^2.1.0"
|
|
20
20
|
},
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"javascript-obfuscator": "2.19.0",
|
|
24
24
|
"typescript": "^4.7.4"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "92211a82ff3469ae11998c0af4e34ce499bd37e6"
|
|
27
27
|
}
|