@anncic-api/cache 1.3.3 → 1.3.4
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';const a0_0x2089f8=a0_0xa942;(function(_0x2f680,_0x432be1){const _0x5350bc=a0_0xa942,_0x15229e=_0x2f680();while(!![]){try{const _0x24c734=parseInt(_0x5350bc(0xac))/0x1+parseInt(_0x5350bc(0xa3))/0x2+parseInt(_0x5350bc(0xa2))/0x3+-parseInt(_0x5350bc(0xab))/0x4+-parseInt(_0x5350bc(0x9d))/0x5*(-parseInt(_0x5350bc(0x9a))/0x6)+parseInt(_0x5350bc(0xa0))/0x7+parseInt(_0x5350bc(0x9f))/0x8*(-parseInt(_0x5350bc(0xa5))/0x9);if(_0x24c734===_0x432be1)break;else _0x15229e['push'](_0x15229e['shift']());}catch(_0x1496fe){_0x15229e['push'](_0x15229e['shift']());}}}(a0_0x1ad1,0xce699));function a0_0x1ad1(){const _0x482423=['file','memory','defineProperty','default','5035256xZkWgo','1342961QxXWWE','646122wzEZlV','__esModule','127.0.0.1','55URoQXo','cache-manager-ioredis','8kSYpaA','11210353rNyeBU','name','3203850IZJLms','1006470DNPifi','cache-manager-fs-hash','32363127vDJimW','appDir'];a0_0x1ad1=function(){return _0x482423;};return a0_0x1ad1();}Object[a0_0x2089f8(0xa9)](exports,a0_0x2089f8(0x9b),{'value':!![]});function a0_0xa942(_0x3125de,_0x4c0b60){const _0x1ad106=a0_0x1ad1();return a0_0xa942=function(_0xa9422f,_0x5afba1){_0xa9422f=_0xa9422f-0x9a;let _0x333b8d=_0x1ad106[_0xa9422f];return _0x333b8d;},a0_0xa942(_0x3125de,_0x4c0b60);}const fsStore=require(a0_0x2089f8(0xa4)),redisStore=require(a0_0x2089f8(0x9e));exports[a0_0x2089f8(0xaa)]=_0x4b678f=>{const _0x4a5b7e=a0_0x2089f8;return{'cache':{'default':_0x4a5b7e(0xa7),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x4b678f[_0x4a5b7e(0xa6)]+'/runtime/.cache'}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x4a5b7e(0x9c),'password':'','ttl':0x1e13380,'keyPrefix':_0x4b678f[_0x4a5b7e(0xa1)]+':'}},'memory':{'store':_0x4a5b7e(0xa8),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a1_0x3de3(){var _0x498f56=['object','9739160pYchlh','@midwayjs/core','getOwnPropertyDescriptor','decorate','385PQbZKj','3826889yZvhPR','CustomConfiguration','552nWmLGp','8832312qewWAQ','36QXVlKb','29780oAkTtC','73024CDvOfS','length','462JbpNXG','80464QsZbNG','Configuration','./config/config.default','defineProperty','function','__decorate','9uFfNgS','3678yoUByO'];a1_0x3de3=function(){return _0x498f56;};return a1_0x3de3();}var a1_0x1f6fc8=a1_0x5f6c;(function(_0x226e09,_0x36725a){var _0x2e0072=a1_0x5f6c,_0x3f3e82=_0x226e09();while(!![]){try{var _0x5852c7=parseInt(_0x2e0072(0x108))/0x1+-parseInt(_0x2e0072(0x107))/0x2*(parseInt(_0x2e0072(0x10f))/0x3)+-parseInt(_0x2e0072(0x104))/0x4*(-parseInt(_0x2e0072(0xfe))/0x5)+parseInt(_0x2e0072(0x101))/0x6*(-parseInt(_0x2e0072(0x105))/0x7)+-parseInt(_0x2e0072(0x102))/0x8*(-parseInt(_0x2e0072(0x10e))/0x9)+-parseInt(_0x2e0072(0xfa))/0xa+-parseInt(_0x2e0072(0xff))/0xb*(-parseInt(_0x2e0072(0x103))/0xc);if(_0x5852c7===_0x36725a)break;else _0x3f3e82['push'](_0x3f3e82['shift']());}catch(_0xfde512){_0x3f3e82['push'](_0x3f3e82['shift']());}}}(a1_0x3de3,0x8eb97));function a1_0x5f6c(_0x12e83d,_0x17eb6c){var _0x3de398=a1_0x3de3();return a1_0x5f6c=function(_0x5f6cbb,_0x1a245d){_0x5f6cbb=_0x5f6cbb-0xfa;var _0x32f5f5=_0x3de398[_0x5f6cbb];return _0x32f5f5;},a1_0x5f6c(_0x12e83d,_0x17eb6c);}var __decorate=this&&this[a1_0x1f6fc8(0x10d)]||function(_0x2e6f10,_0x4af550,_0x239a45,_0x44bd4a){var _0x1f6819=a1_0x1f6fc8,_0x2f63d4=arguments[_0x1f6819(0x106)],_0x3c30ee=_0x2f63d4<0x3?_0x4af550:_0x44bd4a===null?_0x44bd4a=Object[_0x1f6819(0xfc)](_0x4af550,_0x239a45):_0x44bd4a,_0x2e565d;if(typeof Reflect===_0x1f6819(0x110)&&typeof Reflect[_0x1f6819(0xfd)]===_0x1f6819(0x10c))_0x3c30ee=Reflect['decorate'](_0x2e6f10,_0x4af550,_0x239a45,_0x44bd4a);else{for(var _0xeda3f9=_0x2e6f10[_0x1f6819(0x106)]-0x1;_0xeda3f9>=0x0;_0xeda3f9--)if(_0x2e565d=_0x2e6f10[_0xeda3f9])_0x3c30ee=(_0x2f63d4<0x3?_0x2e565d(_0x3c30ee):_0x2f63d4>0x3?_0x2e565d(_0x4af550,_0x239a45,_0x3c30ee):_0x2e565d(_0x4af550,_0x239a45))||_0x3c30ee;}return _0x2f63d4>0x3&&_0x3c30ee&&Object[_0x1f6819(0x10b)](_0x4af550,_0x239a45,_0x3c30ee),_0x3c30ee;};Object[a1_0x1f6fc8(0x10b)](exports,'__esModule',{'value':!![]}),exports[a1_0x1f6fc8(0x100)]=void 0x0;const core_1=require(a1_0x1f6fc8(0xfb)),ConfigDefault=require(a1_0x1f6fc8(0x10a));let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,core_1[a1_0x1f6fc8(0x109)])({'conflictCheck':![],'namespace':'anncic-api:cache','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x1f6fc8(0x100)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x5dd0f1=a2_0x2470;(function(_0xd6eb3f,_0x1c535f){const _0x404c2a=a2_0x2470,_0x4ff28f=_0xd6eb3f();while(!![]){try{const _0x3390e9=-parseInt(_0x404c2a(0x94))/0x1*(-parseInt(_0x404c2a(0x99))/0x2)+-parseInt(_0x404c2a(0x95))/0x3*(-parseInt(_0x404c2a(0xa7))/0x4)+parseInt(_0x404c2a(0x9b))/0x5*(parseInt(_0x404c2a(0xa2))/0x6)+-parseInt(_0x404c2a(0x98))/0x7*(-parseInt(_0x404c2a(0x9a))/0x8)+parseInt(_0x404c2a(0xa6))/0x9+parseInt(_0x404c2a(0x9f))/0xa+parseInt(_0x404c2a(0xa1))/0xb*(-parseInt(_0x404c2a(0xa5))/0xc);if(_0x3390e9===_0x1c535f)break;else _0x4ff28f['push'](_0x4ff28f['shift']());}catch(_0x13d026){_0x4ff28f['push'](_0x4ff28f['shift']());}}}(a2_0x3fa5,0x6132e));Object[a2_0x5dd0f1(0x91)](exports,a2_0x5dd0f1(0x9e),{'value':!![]}),exports['Cache']=void 0x0;const crypto_js_1=require(a2_0x5dd0f1(0xa0)),CacheService_1=require('../service/CacheService'),core_1=require(a2_0x5dd0f1(0xa8));function Cache(_0x1bd451,_0x59a6d5){return(_0x553db9,_0x25510f,_0xbf0cde)=>{const _0x49a081=a2_0x2470,_0x5c99da=_0xbf0cde['value'];return _0xbf0cde[_0x49a081(0x93)]=async function(..._0x54b9ef){const _0x147ba4=_0x49a081;!_0x1bd451&&(_0x1bd451=(0x0,crypto_js_1[_0x147ba4(0xa3)])(JSON[_0x147ba4(0x8d)](_0x54b9ef))[_0x147ba4(0x92)]());let _0xdac13a=await this[core_1[_0x147ba4(0x96)]]['app'][_0x147ba4(0x8f)]()['getAsync'](CacheService_1[_0x147ba4(0xa4)]),_0xb39148=await _0xdac13a[_0x147ba4(0x8e)]('MethodDecorator')['get'](_0x1bd451);if(_0xb39148)return JSON[_0x147ba4(0x97)](_0xb39148);else _0xb39148=await _0x5c99da[_0x147ba4(0x9c)](this,[..._0x54b9ef]),await _0xdac13a['use'](_0x147ba4(0x9d))[_0x147ba4(0x90)](_0x1bd451,JSON[_0x147ba4(0x8d)](_0xb39148),_0x59a6d5);return _0xb39148;},_0xbf0cde;};}function a2_0x2470(_0x1e9378,_0x45e569){const _0x3fa558=a2_0x3fa5();return a2_0x2470=function(_0x24700e,_0x5ea61a){_0x24700e=_0x24700e-0x8d;let _0x47b5cf=_0x3fa558[_0x24700e];return _0x47b5cf;},a2_0x2470(_0x1e9378,_0x45e569);}function a2_0x3fa5(){const _0x7a21e=['apply','MethodDecorator','__esModule','2546970ZLByKa','crypto-js','84381bIcGeT','484602veZAKY','MD5','CacheService','2628vMDvPZ','6722325MNxrry','1794916XWmSLo','@midwayjs/core','stringify','use','getApplicationContext','set','defineProperty','toString','value','171dedHif','3vyijJC','REQUEST_OBJ_CTX_KEY','parse','2597LIcxNH','124kYbLip','9824SkUQMu','10TefRGG'];a2_0x3fa5=function(){return _0x7a21e;};return a2_0x3fa5();}exports['Cache']=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a3_0x10a5e0=a3_0x5585;(function(_0x2e63eb,_0xbabb05){var _0xb34414=a3_0x5585,_0x59ed8a=_0x2e63eb();while(!![]){try{var _0x50f268=parseInt(_0xb34414(0xfe))/0x1+-parseInt(_0xb34414(0x10c))/0x2*(parseInt(_0xb34414(0x110))/0x3)+parseInt(_0xb34414(0x108))/0x4*(parseInt(_0xb34414(0xff))/0x5)+parseInt(_0xb34414(0x10b))/0x6+parseInt(_0xb34414(0x103))/0x7*(-parseInt(_0xb34414(0x100))/0x8)+parseInt(_0xb34414(0x107))/0x9+parseInt(_0xb34414(0x104))/0xa*(-parseInt(_0xb34414(0x101))/0xb);if(_0x50f268===_0xbabb05)break;else _0x59ed8a['push'](_0x59ed8a['shift']());}catch(_0x318801){_0x59ed8a['push'](_0x59ed8a['shift']());}}}(a3_0x3d71,0xafc34));Object[a3_0x10a5e0(0x109)](exports,a3_0x10a5e0(0x102),{'value':!![]}),exports[a3_0x10a5e0(0x106)]=exports[a3_0x10a5e0(0x10e)]=exports[a3_0x10a5e0(0x10d)]=void 0x0;function a3_0x3d71(){var _0x47ee24=['236489UqeCIW','__esModule','3534629IeuyhP','290JOvCXm','./configuration','CacheService','8506737ldeLLD','8dmOKoU','defineProperty','./decorator/Cache','3656904ogluvH','2228942CoJbvs','Configuration','Cache','CustomConfiguration','3PeWesk','813646EVRvhv','1486225CAQmlW','8lOdLLK'];a3_0x3d71=function(){return _0x47ee24;};return a3_0x3d71();}var configuration_1=require(a3_0x10a5e0(0x105));Object[a3_0x10a5e0(0x109)](exports,a3_0x10a5e0(0x10d),{'enumerable':!![],'get':function(){var _0x2f5f3a=a3_0x10a5e0;return configuration_1[_0x2f5f3a(0x10f)];}});function a3_0x5585(_0x36748c,_0x1bfb9a){var _0x3d7192=a3_0x3d71();return a3_0x5585=function(_0x558525,_0x153c6e){_0x558525=_0x558525-0xfe;var _0xc2dd1f=_0x3d7192[_0x558525];return _0xc2dd1f;},a3_0x5585(_0x36748c,_0x1bfb9a);}var Cache_1=require(a3_0x10a5e0(0x10a));Object[a3_0x10a5e0(0x109)](exports,'Cache',{'enumerable':!![],'get':function(){var _0x3ea9d1=a3_0x10a5e0;return Cache_1[_0x3ea9d1(0x10e)];}});var CacheService_1=require('./service/CacheService');Object['defineProperty'](exports,'CacheService',{'enumerable':!![],'get':function(){var _0xf59966=a3_0x10a5e0;return CacheService_1[_0xf59966(0x106)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x42e068=a4_0x3cb6;(function(_0x482e9f,_0x238fd1){var _0x2478cd=a4_0x3cb6,_0x1a5c04=_0x482e9f();while(!![]){try{var _0x4662d5=-parseInt(_0x2478cd(0xaa))/0x1*(parseInt(_0x2478cd(0xb9))/0x2)+parseInt(_0x2478cd(0xad))/0x3*(-parseInt(_0x2478cd(0xb7))/0x4)+parseInt(_0x2478cd(0x9f))/0x5+-parseInt(_0x2478cd(0x9e))/0x6*(parseInt(_0x2478cd(0xc0))/0x7)+parseInt(_0x2478cd(0xb2))/0x8+parseInt(_0x2478cd(0xc1))/0x9+parseInt(_0x2478cd(0xab))/0xa*(parseInt(_0x2478cd(0xb1))/0xb);if(_0x4662d5===_0x238fd1)break;else _0x1a5c04['push'](_0x1a5c04['shift']());}catch(_0x4ab16a){_0x1a5c04['push'](_0x1a5c04['shift']());}}}(a4_0x54c5,0x41d2b));function a4_0x3cb6(_0x6e4762,_0x34d699){var _0x54c565=a4_0x54c5();return a4_0x3cb6=function(_0x3cb6c3,_0x2e2ce7){_0x3cb6c3=_0x3cb6c3-0x9a;var _0x3d0e23=_0x54c565[_0x3cb6c3];return _0x3d0e23;},a4_0x3cb6(_0x6e4762,_0x34d699);}function a4_0x54c5(){var _0x3d32b2=['hdel','stores','del','caching','set','@midwayjs/core','default','1jMJOZg','80710jyuPKF','prototype','1075839aJgBaa','file','Singleton','use','231olTcFR','345976WnRBpE','getOwnPropertyDescriptor','clients','metadata','function','4ayyojR','prefix','757838MJKHYW','Provide','__metadata','Scope','cache','get','hget','56126bEOVPs','4057110VhhLLk','CacheService','design:type','store','defineProperty','hset','cache-manager','132oVqYZe','2600055CLvcUl','has','config','object'];a4_0x54c5=function(){return _0x3d32b2;};return a4_0x54c5();}var __decorate=this&&this['__decorate']||function(_0xa59905,_0x23f989,_0x353fd2,_0x35ce90){var _0x214663=a4_0x3cb6,_0x18e6b1=arguments['length'],_0x4d0ad3=_0x18e6b1<0x3?_0x23f989:_0x35ce90===null?_0x35ce90=Object[_0x214663(0xb3)](_0x23f989,_0x353fd2):_0x35ce90,_0x31c9fb;if(typeof Reflect===_0x214663(0xa2)&&typeof Reflect['decorate']===_0x214663(0xb6))_0x4d0ad3=Reflect['decorate'](_0xa59905,_0x23f989,_0x353fd2,_0x35ce90);else{for(var _0x117301=_0xa59905['length']-0x1;_0x117301>=0x0;_0x117301--)if(_0x31c9fb=_0xa59905[_0x117301])_0x4d0ad3=(_0x18e6b1<0x3?_0x31c9fb(_0x4d0ad3):_0x18e6b1>0x3?_0x31c9fb(_0x23f989,_0x353fd2,_0x4d0ad3):_0x31c9fb(_0x23f989,_0x353fd2))||_0x4d0ad3;}return _0x18e6b1>0x3&&_0x4d0ad3&&Object[_0x214663(0x9b)](_0x23f989,_0x353fd2,_0x4d0ad3),_0x4d0ad3;},__metadata=this&&this[a4_0x42e068(0xbb)]||function(_0x55ab35,_0x586fe3){var _0x3754d1=a4_0x42e068;if(typeof Reflect==='object'&&typeof Reflect[_0x3754d1(0xb5)]===_0x3754d1(0xb6))return Reflect[_0x3754d1(0xb5)](_0x55ab35,_0x586fe3);};Object[a4_0x42e068(0x9b)](exports,'__esModule',{'value':!![]}),exports[a4_0x42e068(0xc2)]=void 0x0;const cacheManager=require(a4_0x42e068(0x9d)),core_1=require(a4_0x42e068(0xa8));let CacheService=class CacheService{constructor(){var _0x1f20b2=a4_0x42e068;this['cache']=undefined,this[_0x1f20b2(0xb4)]=new Map();}[a4_0x42e068(0xb0)](_0x24b4dd){var _0x26c602=a4_0x42e068,_0x2eed0b,_0x50a52b;if(!this[_0x26c602(0xbd)]){const _0x9013ab=((_0x2eed0b=this[_0x26c602(0xa1)][_0x26c602(0xa4)])===null||_0x2eed0b===void 0x0?void 0x0:_0x2eed0b[(_0x50a52b=this[_0x26c602(0xa1)][_0x26c602(0xbd)])===null||_0x50a52b===void 0x0?void 0x0:_0x50a52b[_0x26c602(0xa9)]])||this[_0x26c602(0xa1)][_0x26c602(0xa4)][_0x26c602(0xae)];this[_0x26c602(0xbd)]=cacheManager[_0x26c602(0xa6)]({..._0x9013ab['options'],'store':_0x9013ab[_0x26c602(0x9a)]});}return!this[_0x26c602(0xb4)][_0x26c602(0xa0)](_0x24b4dd)&&this[_0x26c602(0xb4)][_0x26c602(0xa7)](_0x24b4dd,new CacheHandler(_0x24b4dd,this[_0x26c602(0xbd)])),this[_0x26c602(0xb4)][_0x26c602(0xbe)](_0x24b4dd);}async['reset'](){var _0x53d2db=a4_0x42e068;return await this[_0x53d2db(0xbd)]['reset']();}};__decorate([(0x0,core_1['Config'])('cache'),__metadata(a4_0x42e068(0xc3),Object)],CacheService[a4_0x42e068(0xac)],a4_0x42e068(0xa1),void 0x0),CacheService=__decorate([(0x0,core_1[a4_0x42e068(0xba)])(),(0x0,core_1[a4_0x42e068(0xbc)])(core_1['ScopeEnum'][a4_0x42e068(0xaf)])],CacheService),exports[a4_0x42e068(0xc2)]=CacheService;class CacheHandler{constructor(_0x41babd,_0x3edb9b){var _0x3dc010=a4_0x42e068;this[_0x3dc010(0xbd)]=_0x3edb9b,this[_0x3dc010(0xb8)]=_0x41babd;}async[a4_0x42e068(0xa5)](_0x5796c3){var _0x18c211=a4_0x42e068;return await this[_0x18c211(0xbd)][_0x18c211(0xa5)](this[_0x18c211(0xb8)]+':'+_0x5796c3);}async[a4_0x42e068(0xa7)](_0x4ba1cf,_0x25efa3,_0x489885){var _0x2a1ea5=a4_0x42e068;return await this['cache'][_0x2a1ea5(0xa7)](this['prefix']+':'+_0x4ba1cf,_0x25efa3,_0x489885);}async[a4_0x42e068(0xbe)](_0x21f6c3,_0x31eef8){return new Promise((_0x1c5c1f,_0x2dfc50)=>{var _0x45f086=a4_0x3cb6;this['cache']['get'](this[_0x45f086(0xb8)]+':'+_0x21f6c3,(_0x502c9e,_0x560baa)=>{_0x502c9e?_0x2dfc50(_0x502c9e):_0x1c5c1f(_0x560baa||_0x31eef8);});});}async[a4_0x42e068(0xa3)](_0x26f513,_0x2cb563){return await this['del'](_0x26f513+'-'+_0x2cb563);}async[a4_0x42e068(0x9c)](_0x17b032,_0x200b5c,_0x5b8966,_0x49a1ea){var _0x416051=a4_0x42e068;return await this[_0x416051(0xa7)](_0x17b032+'-'+_0x200b5c,_0x5b8966,_0x49a1ea);}async[a4_0x42e068(0xbf)](_0x463514,_0x49bc40,_0x5ac966){var _0x5863c7=a4_0x42e068;return await this[_0x5863c7(0xbe)](_0x463514+'-'+_0x49bc40,_0x5ac966);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
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": "612827d5d03f34f9a9339a6e8646070d74ad3c22"
|
|
27
27
|
}
|