@anncic-api/cache 1.1.49 → 1.2.0
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_0x46a7(_0x321e51,_0xe4fb27){const _0xd4dd2d=a0_0xd4dd();return a0_0x46a7=function(_0x46a73c,_0x107efa){_0x46a73c=_0x46a73c-0x15b;let _0x173b0d=_0xd4dd2d[_0x46a73c];return _0x173b0d;},a0_0x46a7(_0x321e51,_0xe4fb27);}const a0_0x403175=a0_0x46a7;(function(_0x2962a7,_0x1d9502){const _0x44c068=a0_0x46a7,_0x92f830=_0x2962a7();while(!![]){try{const _0x149145=parseInt(_0x44c068(0x165))/0x1*(-parseInt(_0x44c068(0x166))/0x2)+-parseInt(_0x44c068(0x167))/0x3+parseInt(_0x44c068(0x160))/0x4*(-parseInt(_0x44c068(0x169))/0x5)+-parseInt(_0x44c068(0x164))/0x6+parseInt(_0x44c068(0x168))/0x7+parseInt(_0x44c068(0x15e))/0x8*(-parseInt(_0x44c068(0x15d))/0x9)+parseInt(_0x44c068(0x161))/0xa;if(_0x149145===_0x1d9502)break;else _0x92f830['push'](_0x92f830['shift']());}catch(_0x5e99c2){_0x92f830['push'](_0x92f830['shift']());}}}(a0_0xd4dd,0x19d92));function a0_0xd4dd(){const _0x483718=['127.0.0.1','832548paVNDa','3dgxGsL','56686tMrtNj','197793EPHtRB','369208kvKTSY','5cfGsWh','__esModule','cache-manager-fs-hash','default','name','/runtime/.cache','9900DIscdQ','440NPENTA','memory','741308SEaTGJ','5886750hjtImW','defineProperty'];a0_0xd4dd=function(){return _0x483718;};return a0_0xd4dd();}Object[a0_0x403175(0x162)](exports,a0_0x403175(0x16a),{'value':!![]});const fsStore=require(a0_0x403175(0x16b)),redisStore=require('cache-manager-ioredis');exports[a0_0x403175(0x16c)]=_0x2f9a30=>{const _0x34ea1d=a0_0x403175;return{'cache':{'default':'file','stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x2f9a30['appDir']+_0x34ea1d(0x15c)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x34ea1d(0x163),'password':'','ttl':0x1e13380,'keyPrefix':_0x2f9a30[_0x34ea1d(0x15b)]+':'}},'memory':{'store':_0x34ea1d(0x15f),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x372312=a1_0x3450;(function(_0xe3ed57,_0x4d5fb2){var _0x53203f=a1_0x3450,_0xfef0a0=_0xe3ed57();while(!![]){try{var _0x420118=parseInt(_0x53203f(0x1c7))/0x1+-parseInt(_0x53203f(0x1c0))/0x2+parseInt(_0x53203f(0x1cb))/0x3+parseInt(_0x53203f(0x1bc))/0x4*(parseInt(_0x53203f(0x1c4))/0x5)+parseInt(_0x53203f(0x1c9))/0x6*(-parseInt(_0x53203f(0x1c2))/0x7)+-parseInt(_0x53203f(0x1cc))/0x8*(parseInt(_0x53203f(0x1cd))/0x9)+-parseInt(_0x53203f(0x1ba))/0xa*(-parseInt(_0x53203f(0x1c5))/0xb);if(_0x420118===_0x4d5fb2)break;else _0xfef0a0['push'](_0xfef0a0['shift']());}catch(_0x3e574e){_0xfef0a0['push'](_0xfef0a0['shift']());}}}(a1_0xc788,0x42bbc));var __decorate=this&&this['__decorate']||function(_0x58047b,_0x430065,_0x2eb7fe,_0x59e67d){var _0x48258c=a1_0x3450,_0x15f0ce=arguments[_0x48258c(0x1bb)],_0x12c180=_0x15f0ce<0x3?_0x430065:_0x59e67d===null?_0x59e67d=Object[_0x48258c(0x1c6)](_0x430065,_0x2eb7fe):_0x59e67d,_0x534c00;if(typeof Reflect===_0x48258c(0x1ca)&&typeof Reflect['decorate']==='function')_0x12c180=Reflect[_0x48258c(0x1bf)](_0x58047b,_0x430065,_0x2eb7fe,_0x59e67d);else{for(var _0x59cc65=_0x58047b[_0x48258c(0x1bb)]-0x1;_0x59cc65>=0x0;_0x59cc65--)if(_0x534c00=_0x58047b[_0x59cc65])_0x12c180=(_0x15f0ce<0x3?_0x534c00(_0x12c180):_0x15f0ce>0x3?_0x534c00(_0x430065,_0x2eb7fe,_0x12c180):_0x534c00(_0x430065,_0x2eb7fe))||_0x12c180;}return _0x15f0ce>0x3&&_0x12c180&&Object[_0x48258c(0x1bd)](_0x430065,_0x2eb7fe,_0x12c180),_0x12c180;};function a1_0xc788(){var _0x54251e=['object','819576kqfqrt','137744VBUHhD','279jGBHUA','Configuration','230FngBGy','length','212HPXsCR','defineProperty','@midwayjs/decorator','decorate','851760zlOdis','./config/config.default','2009Iewkbn','CustomConfiguration','50895BDgjoM','92147kicpCu','getOwnPropertyDescriptor','330087emvTLd','__esModule','2142fPVApc'];a1_0xc788=function(){return _0x54251e;};return a1_0xc788();}Object[a1_0x372312(0x1bd)](exports,a1_0x372312(0x1c8),{'value':!![]}),exports['CustomConfiguration']=void 0x0;function a1_0x3450(_0x166c60,_0x4c45e5){var _0xc78853=a1_0xc788();return a1_0x3450=function(_0x345038,_0x17cebf){_0x345038=_0x345038-0x1b9;var _0x11f177=_0xc78853[_0x345038];return _0x11f177;},a1_0x3450(_0x166c60,_0x4c45e5);}const decorator_1=require(a1_0x372312(0x1be)),ConfigDefault=require(a1_0x372312(0x1c1));let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,decorator_1[a1_0x372312(0x1b9)])({'conflictCheck':![],'namespace':'anncic-api:cache','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x372312(0x1c3)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a2_0x15724e=a2_0xd54e;function a2_0xd54e(_0x51bf3a,_0x234f56){const _0x593337=a2_0x5933();return a2_0xd54e=function(_0xd54eb5,_0x47bc8a){_0xd54eb5=_0xd54eb5-0xa6;let _0x266a3e=_0x593337[_0xd54eb5];return _0x266a3e;},a2_0xd54e(_0x51bf3a,_0x234f56);}(function(_0x27e7d0,_0x53ddd9){const _0x1f67ed=a2_0xd54e,_0x15fa8a=_0x27e7d0();while(!![]){try{const _0x2b4878=-parseInt(_0x1f67ed(0xaa))/0x1*(parseInt(_0x1f67ed(0xb4))/0x2)+-parseInt(_0x1f67ed(0xa8))/0x3*(parseInt(_0x1f67ed(0xa9))/0x4)+-parseInt(_0x1f67ed(0xb0))/0x5*(-parseInt(_0x1f67ed(0xba))/0x6)+parseInt(_0x1f67ed(0xbc))/0x7+parseInt(_0x1f67ed(0xae))/0x8+parseInt(_0x1f67ed(0xaf))/0x9+-parseInt(_0x1f67ed(0xb3))/0xa;if(_0x2b4878===_0x53ddd9)break;else _0x15fa8a['push'](_0x15fa8a['shift']());}catch(_0x149eef){_0x15fa8a['push'](_0x15fa8a['shift']());}}}(a2_0x5933,0x39862));Object[a2_0x15724e(0xb9)](exports,'__esModule',{'value':!![]}),exports['Cache']=void 0x0;const crypto_js_1=require(a2_0x15724e(0xa7)),CacheService_1=require(a2_0x15724e(0xad)),core_1=require(a2_0x15724e(0xb6));function a2_0x5933(){const _0xa47d60=['5wrplyn','Cache','set','2592520VMUrzY','241412BDKZtD','toString','@midwayjs/core','stringify','getApplicationContext','defineProperty','2268186CMKXKL','app','981092cvWqnt','MD5','CacheService','get','use','crypto-js','15RJmHzx','362968jSrjLk','3EoTzGf','value','MethodDecorator','../service/CacheService','3241312ZhEvfJ','3486123PNNONb'];a2_0x5933=function(){return _0xa47d60;};return a2_0x5933();}function Cache(_0x40e381,_0x3c81b9){return(_0x4c88d4,_0x11ea8d,_0x419991)=>{const _0x4c2950=a2_0xd54e,_0x39073f=_0x419991[_0x4c2950(0xab)];return _0x419991[_0x4c2950(0xab)]=async function(..._0xc9d54a){const _0x9a3320=_0x4c2950;!_0x40e381&&(_0x40e381=(0x0,crypto_js_1[_0x9a3320(0xbd)])(JSON['stringify'](_0xc9d54a))[_0x9a3320(0xb5)]());let _0x1d8bcc=await this[core_1['REQUEST_OBJ_CTX_KEY']][_0x9a3320(0xbb)][_0x9a3320(0xb8)]()['getAsync'](CacheService_1[_0x9a3320(0xbe)]),_0x3f15cc=await _0x1d8bcc['use'](_0x9a3320(0xac))[_0x9a3320(0xbf)](_0x40e381);if(_0x3f15cc)return JSON['parse'](_0x3f15cc);else _0x3f15cc=await _0x39073f['apply'](this,[..._0xc9d54a]),await _0x1d8bcc[_0x9a3320(0xa6)](_0x9a3320(0xac))[_0x9a3320(0xb2)](_0x40e381,JSON[_0x9a3320(0xb7)](_0x3f15cc),_0x3c81b9);return _0x3f15cc;},_0x419991;};}exports[a2_0x15724e(0xb1)]=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a3_0x55a793=a3_0xaa64;(function(_0x2c827,_0x4e6266){var _0x1eaac6=a3_0xaa64,_0x64cc17=_0x2c827();while(!![]){try{var _0x1d9326=parseInt(_0x1eaac6(0x19f))/0x1+-parseInt(_0x1eaac6(0x1a3))/0x2*(parseInt(_0x1eaac6(0x1a6))/0x3)+parseInt(_0x1eaac6(0x197))/0x4*(parseInt(_0x1eaac6(0x196))/0x5)+parseInt(_0x1eaac6(0x194))/0x6+-parseInt(_0x1eaac6(0x19e))/0x7*(parseInt(_0x1eaac6(0x1a4))/0x8)+-parseInt(_0x1eaac6(0x1a2))/0x9+-parseInt(_0x1eaac6(0x19c))/0xa;if(_0x1d9326===_0x4e6266)break;else _0x64cc17['push'](_0x64cc17['shift']());}catch(_0x17f84a){_0x64cc17['push'](_0x64cc17['shift']());}}}(a3_0x468e,0x309ba));Object[a3_0x55a793(0x1a0)](exports,a3_0x55a793(0x195),{'value':!![]}),exports[a3_0x55a793(0x198)]=exports[a3_0x55a793(0x19d)]=exports[a3_0x55a793(0x199)]=void 0x0;var configuration_1=require(a3_0x55a793(0x19a));function a3_0xaa64(_0x44b7da,_0x357982){var _0x468e2c=a3_0x468e();return a3_0xaa64=function(_0xaa64ce,_0x33594e){_0xaa64ce=_0xaa64ce-0x194;var _0x2bd1ab=_0x468e2c[_0xaa64ce];return _0x2bd1ab;},a3_0xaa64(_0x44b7da,_0x357982);}Object[a3_0x55a793(0x1a0)](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x2d9d25=a3_0x55a793;return configuration_1[_0x2d9d25(0x1a5)];}});function a3_0x468e(){var _0x381695=['166739IUzeMf','defineProperty','./decorator/Cache','509409DESSRn','71290TWSgav','824mBGfFV','CustomConfiguration','6JEGEsz','602700AfpLaP','__esModule','323420hymleA','12WSuQBr','CacheService','Configuration','./configuration','./service/CacheService','430ceOSMC','Cache','9121rwXTlc'];a3_0x468e=function(){return _0x381695;};return a3_0x468e();}var Cache_1=require(a3_0x55a793(0x1a1));Object[a3_0x55a793(0x1a0)](exports,a3_0x55a793(0x19d),{'enumerable':!![],'get':function(){var _0x1ea48e=a3_0x55a793;return Cache_1[_0x1ea48e(0x19d)];}});var CacheService_1=require(a3_0x55a793(0x19b));Object[a3_0x55a793(0x1a0)](exports,a3_0x55a793(0x198),{'enumerable':!![],'get':function(){var _0x429b1c=a3_0x55a793;return CacheService_1[_0x429b1c(0x198)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x3ca97d=a4_0x191f;(function(_0x145927,_0x469ec9){var _0x4661bb=a4_0x191f,_0x32e14d=_0x145927();while(!![]){try{var _0x3f9932=-parseInt(_0x4661bb(0xba))/0x1*(-parseInt(_0x4661bb(0xc6))/0x2)+-parseInt(_0x4661bb(0xbb))/0x3+parseInt(_0x4661bb(0xa9))/0x4*(parseInt(_0x4661bb(0xc9))/0x5)+parseInt(_0x4661bb(0xce))/0x6+parseInt(_0x4661bb(0xae))/0x7*(parseInt(_0x4661bb(0xab))/0x8)+parseInt(_0x4661bb(0xb1))/0x9*(-parseInt(_0x4661bb(0xcf))/0xa)+-parseInt(_0x4661bb(0xc4))/0xb*(parseInt(_0x4661bb(0xc8))/0xc);if(_0x3f9932===_0x469ec9)break;else _0x32e14d['push'](_0x32e14d['shift']());}catch(_0x4ddbad){_0x32e14d['push'](_0x32e14d['shift']());}}}(a4_0x5ceb,0xaba07));function a4_0x5ceb(){var _0x46305b=['clients','__esModule','CacheService','prefix','1OCDaVF','306441TvujPE','config','design:type','options','default','use','reset','__metadata','function','6116GCIPHv','has','2377118EkBAvp','__decorate','56748UkaDNg','87050CrhImb','Config','set','object','cache-manager','4883016jvtkZV','30ETBYAO','Provide','file','del','280ktzGrQ','defineProperty','896AVlEGQ','cache','metadata','32543zFGJHL','store','caching','921987yPEFoP','prototype','ScopeEnum','get','getOwnPropertyDescriptor'];a4_0x5ceb=function(){return _0x46305b;};return a4_0x5ceb();}var __decorate=this&&this[a4_0x3ca97d(0xc7)]||function(_0x511b5a,_0x39f563,_0x462d87,_0x32962a){var _0x1b0c25=a4_0x3ca97d,_0x5088fa=arguments['length'],_0x440b6e=_0x5088fa<0x3?_0x39f563:_0x32962a===null?_0x32962a=Object[_0x1b0c25(0xb5)](_0x39f563,_0x462d87):_0x32962a,_0x22a780;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x1b0c25(0xc3))_0x440b6e=Reflect['decorate'](_0x511b5a,_0x39f563,_0x462d87,_0x32962a);else{for(var _0x436aee=_0x511b5a['length']-0x1;_0x436aee>=0x0;_0x436aee--)if(_0x22a780=_0x511b5a[_0x436aee])_0x440b6e=(_0x5088fa<0x3?_0x22a780(_0x440b6e):_0x5088fa>0x3?_0x22a780(_0x39f563,_0x462d87,_0x440b6e):_0x22a780(_0x39f563,_0x462d87))||_0x440b6e;}return _0x5088fa>0x3&&_0x440b6e&&Object[_0x1b0c25(0xaa)](_0x39f563,_0x462d87,_0x440b6e),_0x440b6e;},__metadata=this&&this[a4_0x3ca97d(0xc2)]||function(_0xa56da6,_0x5b5fb7){var _0x1cc350=a4_0x3ca97d;if(typeof Reflect===_0x1cc350(0xcc)&&typeof Reflect[_0x1cc350(0xad)]===_0x1cc350(0xc3))return Reflect['metadata'](_0xa56da6,_0x5b5fb7);};Object[a4_0x3ca97d(0xaa)](exports,a4_0x3ca97d(0xb7),{'value':!![]}),exports['CacheService']=void 0x0;const cacheManager=require(a4_0x3ca97d(0xcd)),decorator_1=require('@midwayjs/decorator');function a4_0x191f(_0x2c543b,_0x5eb6d4){var _0x5ceb88=a4_0x5ceb();return a4_0x191f=function(_0x191f2f,_0x49017b){_0x191f2f=_0x191f2f-0xa7;var _0x3d3016=_0x5ceb88[_0x191f2f];return _0x3d3016;},a4_0x191f(_0x2c543b,_0x5eb6d4);}let CacheService=class CacheService{constructor(){var _0x4c94be=a4_0x3ca97d;this[_0x4c94be(0xac)]=undefined,this[_0x4c94be(0xb6)]=new Map();}[a4_0x3ca97d(0xc0)](_0x25c400){var _0x232b43=a4_0x3ca97d,_0x403be9,_0x413a83;if(!this['cache']){const _0x2efdce=((_0x403be9=this[_0x232b43(0xbc)]['stores'])===null||_0x403be9===void 0x0?void 0x0:_0x403be9[(_0x413a83=this['config'][_0x232b43(0xac)])===null||_0x413a83===void 0x0?void 0x0:_0x413a83[_0x232b43(0xbf)]])||this[_0x232b43(0xbc)]['stores'][_0x232b43(0xa7)];this[_0x232b43(0xac)]=cacheManager[_0x232b43(0xb0)]({..._0x2efdce[_0x232b43(0xbe)],'store':_0x2efdce[_0x232b43(0xaf)]});}return!this[_0x232b43(0xb6)][_0x232b43(0xc5)](_0x25c400)&&this[_0x232b43(0xb6)][_0x232b43(0xcb)](_0x25c400,new CacheHandler(_0x25c400,this[_0x232b43(0xac)])),this['clients']['get'](_0x25c400);}async[a4_0x3ca97d(0xc1)](){var _0x246f12=a4_0x3ca97d;return await this['cache'][_0x246f12(0xc1)]();}};__decorate([(0x0,decorator_1[a4_0x3ca97d(0xca)])(a4_0x3ca97d(0xac)),__metadata(a4_0x3ca97d(0xbd),Object)],CacheService[a4_0x3ca97d(0xb2)],a4_0x3ca97d(0xbc),void 0x0),CacheService=__decorate([(0x0,decorator_1[a4_0x3ca97d(0xd0)])(),(0x0,decorator_1['Scope'])(decorator_1[a4_0x3ca97d(0xb3)]['Singleton'])],CacheService),exports[a4_0x3ca97d(0xb8)]=CacheService;class CacheHandler{constructor(_0x2517bf,_0x39a0f5){var _0x57b5e2=a4_0x3ca97d;this[_0x57b5e2(0xac)]=_0x39a0f5,this[_0x57b5e2(0xb9)]=_0x2517bf;}async[a4_0x3ca97d(0xa8)](_0x3c425d){var _0x5e1a5b=a4_0x3ca97d;return await this[_0x5e1a5b(0xac)][_0x5e1a5b(0xa8)](this['prefix']+':'+_0x3c425d);}async[a4_0x3ca97d(0xcb)](_0x454570,_0x410d65,_0x349c89){var _0x724019=a4_0x3ca97d;return await this[_0x724019(0xac)][_0x724019(0xcb)](this[_0x724019(0xb9)]+':'+_0x454570,_0x410d65,_0x349c89);}async[a4_0x3ca97d(0xb4)](_0x2992a9,_0x2fb753){return new Promise((_0x5540c8,_0x3d83df)=>{var _0x47e417=a4_0x191f;this[_0x47e417(0xac)][_0x47e417(0xb4)](this[_0x47e417(0xb9)]+':'+_0x2992a9,(_0x1fb4e1,_0x126946)=>{_0x1fb4e1?_0x3d83df(_0x1fb4e1):_0x5540c8(_0x126946||_0x2fb753);});});}async['hdel'](_0x240b51,_0x49b2ba){var _0x554438=a4_0x3ca97d;return await this[_0x554438(0xa8)](_0x240b51+'-'+_0x49b2ba);}async['hset'](_0x1a2133,_0x2cb7cd,_0xbc9a70,_0x3b187b){var _0x2a0014=a4_0x3ca97d;return await this[_0x2a0014(0xcb)](_0x1a2133+'-'+_0x2cb7cd,_0xbc9a70,_0x3b187b);}async['hget'](_0x261385,_0x3552a1,_0xe1f443){var _0x733066=a4_0x3ca97d;return await this[_0x733066(0xb4)](_0x261385+'-'+_0x3552a1,_0xe1f443);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
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": "df8a56632f1499078db546232c694e3e0bc11290"
|
|
27
27
|
}
|