@anncic-api/cache 1.1.9 → 1.1.12
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_0x51f3fb=a0_0x4bca;function a0_0x89bf(){const _0x18d394=['file','50yrnIFN','memory','2738744VGkbVJ','__esModule','385564DABWUH','/runtime/.cache','60dcDNed','5011122HNvpxy','495PGkSuS','appDir','926eNmBCC','321910DjhPZS','name','478742tuEwRa','327FcbVIg','35XgZDDQ','default','cache-manager-ioredis','1594812RdwEYT'];a0_0x89bf=function(){return _0x18d394;};return a0_0x89bf();}(function(_0xa3b28e,_0x3d68b9){const _0x7a9e39=a0_0x4bca,_0x23b2b8=_0xa3b28e();while(!![]){try{const _0x3cf115=parseInt(_0x7a9e39(0x164))/0x1*(-parseInt(_0x7a9e39(0x160))/0x2)+parseInt(_0x7a9e39(0x15d))/0x3+parseInt(_0x7a9e39(0x15a))/0x4*(-parseInt(_0x7a9e39(0x156))/0x5)+parseInt(_0x7a9e39(0x154))/0x6+parseInt(_0x7a9e39(0x165))/0x7*(parseInt(_0x7a9e39(0x158))/0x8)+-parseInt(_0x7a9e39(0x15e))/0x9*(parseInt(_0x7a9e39(0x161))/0xa)+-parseInt(_0x7a9e39(0x163))/0xb*(-parseInt(_0x7a9e39(0x15c))/0xc);if(_0x3cf115===_0x3d68b9)break;else _0x23b2b8['push'](_0x23b2b8['shift']());}catch(_0x464f54){_0x23b2b8['push'](_0x23b2b8['shift']());}}}(a0_0x89bf,0xef2e5));function a0_0x4bca(_0x1398c5,_0x34151d){const _0x89bf1b=a0_0x89bf();return a0_0x4bca=function(_0x4bcaf5,_0x3cbc56){_0x4bcaf5=_0x4bcaf5-0x153;let _0x37ff85=_0x89bf1b[_0x4bcaf5];return _0x37ff85;},a0_0x4bca(_0x1398c5,_0x34151d);}Object['defineProperty'](exports,a0_0x51f3fb(0x159),{'value':!![]});const fsStore=require('cache-manager-fs-hash'),redisStore=require(a0_0x51f3fb(0x153));exports[a0_0x51f3fb(0x166)]=_0x1cf15f=>{const _0x1563b7=a0_0x51f3fb;return{'cache':{'default':_0x1563b7(0x155),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x1cf15f[_0x1563b7(0x15f)]+_0x1563b7(0x15b)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':'127.0.0.1','password':'','ttl':0x1e13380,'keyPrefix':_0x1cf15f[_0x1563b7(0x162)]+':'}},'memory':{'store':_0x1563b7(0x157),'options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a1_0x19acdd=a1_0x2249;function a1_0x2249(_0x3d56a6,_0x3a4fbf){var _0x5b59bc=a1_0x5b59();return a1_0x2249=function(_0x224966,_0x4af563){_0x224966=_0x224966-0x14e;var _0x44e825=_0x5b59bc[_0x224966];return _0x44e825;},a1_0x2249(_0x3d56a6,_0x3a4fbf);}(function(_0x1a30cf,_0x4d117e){var _0x3a7ee7=a1_0x2249,_0x4f9a92=_0x1a30cf();while(!![]){try{var _0x3e6d2e=parseInt(_0x3a7ee7(0x157))/0x1*(parseInt(_0x3a7ee7(0x152))/0x2)+parseInt(_0x3a7ee7(0x14f))/0x3*(-parseInt(_0x3a7ee7(0x151))/0x4)+parseInt(_0x3a7ee7(0x162))/0x5+parseInt(_0x3a7ee7(0x155))/0x6*(-parseInt(_0x3a7ee7(0x161))/0x7)+-parseInt(_0x3a7ee7(0x15a))/0x8+-parseInt(_0x3a7ee7(0x14e))/0x9+-parseInt(_0x3a7ee7(0x15c))/0xa*(-parseInt(_0x3a7ee7(0x158))/0xb);if(_0x3e6d2e===_0x4d117e)break;else _0x4f9a92['push'](_0x4f9a92['shift']());}catch(_0x2e3608){_0x4f9a92['push'](_0x4f9a92['shift']());}}}(a1_0x5b59,0xa9cad));var __decorate=this&&this['__decorate']||function(_0x1c4e0e,_0x1c7ae0,_0x4aeac,_0x49a769){var _0x1bd045=a1_0x2249,_0x450c10=arguments[_0x1bd045(0x15f)],_0x11e34c=_0x450c10<0x3?_0x1c7ae0:_0x49a769===null?_0x49a769=Object[_0x1bd045(0x15e)](_0x1c7ae0,_0x4aeac):_0x49a769,_0x5d6a67;if(typeof Reflect===_0x1bd045(0x153)&&typeof Reflect['decorate']==='function')_0x11e34c=Reflect[_0x1bd045(0x160)](_0x1c4e0e,_0x1c7ae0,_0x4aeac,_0x49a769);else{for(var _0x298e41=_0x1c4e0e[_0x1bd045(0x15f)]-0x1;_0x298e41>=0x0;_0x298e41--)if(_0x5d6a67=_0x1c4e0e[_0x298e41])_0x11e34c=(_0x450c10<0x3?_0x5d6a67(_0x11e34c):_0x450c10>0x3?_0x5d6a67(_0x1c7ae0,_0x4aeac,_0x11e34c):_0x5d6a67(_0x1c7ae0,_0x4aeac))||_0x11e34c;}return _0x450c10>0x3&&_0x11e34c&&Object['defineProperty'](_0x1c7ae0,_0x4aeac,_0x11e34c),_0x11e34c;};Object[a1_0x19acdd(0x159)](exports,a1_0x19acdd(0x15b),{'value':!![]}),exports[a1_0x19acdd(0x150)]=void 0x0;function a1_0x5b59(){var _0x47542c=['4kenfqi','object','anncic-api:cache','2066682poXsic','@midwayjs/decorator','674633fGPysh','1518uFiuEI','defineProperty','6423288wYSFgm','__esModule','106870AAnwiq','Configuration','getOwnPropertyDescriptor','length','decorate','7CtfMJf','1448115yRUVsv','7680222qMaLck','30rylqpp','CustomConfiguration','167004EGTTQR'];a1_0x5b59=function(){return _0x47542c;};return a1_0x5b59();}const decorator_1=require(a1_0x19acdd(0x156)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,decorator_1[a1_0x19acdd(0x15d)])({'conflictCheck':![],'namespace':a1_0x19acdd(0x154),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x19acdd(0x150)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x477879=a2_0x3ad4;function a2_0x3ad4(_0x2949d0,_0x5ba907){const _0x559dda=a2_0x559d();return a2_0x3ad4=function(_0x3ad471,_0x45a1b0){_0x3ad471=_0x3ad471-0x18d;let _0x5a3dbf=_0x559dda[_0x3ad471];return _0x5a3dbf;},a2_0x3ad4(_0x2949d0,_0x5ba907);}(function(_0x5a1434,_0x2b15d9){const _0x4bf1a0=a2_0x3ad4,_0x19f0b4=_0x5a1434();while(!![]){try{const _0x3cb73b=parseInt(_0x4bf1a0(0x191))/0x1*(parseInt(_0x4bf1a0(0x1a2))/0x2)+-parseInt(_0x4bf1a0(0x1a0))/0x3*(parseInt(_0x4bf1a0(0x1a3))/0x4)+parseInt(_0x4bf1a0(0x18d))/0x5+parseInt(_0x4bf1a0(0x19a))/0x6+-parseInt(_0x4bf1a0(0x192))/0x7*(parseInt(_0x4bf1a0(0x19e))/0x8)+-parseInt(_0x4bf1a0(0x1a8))/0x9*(parseInt(_0x4bf1a0(0x198))/0xa)+parseInt(_0x4bf1a0(0x197))/0xb*(parseInt(_0x4bf1a0(0x199))/0xc);if(_0x3cb73b===_0x2b15d9)break;else _0x19f0b4['push'](_0x19f0b4['shift']());}catch(_0x453627){_0x19f0b4['push'](_0x19f0b4['shift']());}}}(a2_0x559d,0x84c8a));function a2_0x559d(){const _0x3d2643=['7SmUAaI','7xzUGSf','stringify','getAsync','@midwayjs/core','Cache','121nPGnew','10UWRoEi','1157616RcXcGh','166656HIOOZr','crypto-js','app','get','372952EfAfxy','getApplicationContext','49215EhmnGv','value','75332HhIJTG','200anASrB','use','CacheService','set','MD5','2182959jHqGNy','apply','1503580LcFoQN','MethodDecorator','../service/CacheService','toString'];a2_0x559d=function(){return _0x3d2643;};return a2_0x559d();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cache']=void 0x0;const crypto_js_1=require(a2_0x477879(0x19b)),CacheService_1=require(a2_0x477879(0x18f)),core_1=require(a2_0x477879(0x195));function Cache(_0x5bb031,_0x423bae){return(_0x108229,_0x158f7f,_0x3ad503)=>{const _0x2d5014=a2_0x3ad4,_0x4b5192=_0x3ad503[_0x2d5014(0x1a1)];return _0x3ad503[_0x2d5014(0x1a1)]=async function(..._0x289548){const _0x4442d6=_0x2d5014;!_0x5bb031&&(_0x5bb031=(0x0,crypto_js_1[_0x4442d6(0x1a7)])(JSON['stringify'](_0x289548))[_0x4442d6(0x190)]());let _0x5002bb=await this[core_1['REQUEST_OBJ_CTX_KEY']][_0x4442d6(0x19c)][_0x4442d6(0x19f)]()[_0x4442d6(0x194)](CacheService_1[_0x4442d6(0x1a5)]),_0x49f819=await _0x5002bb[_0x4442d6(0x1a4)](_0x4442d6(0x18e))[_0x4442d6(0x19d)](_0x5bb031);if(_0x49f819)return JSON['parse'](_0x49f819);else _0x49f819=await _0x4b5192[_0x4442d6(0x1a9)](this,[..._0x289548]),await _0x5002bb[_0x4442d6(0x1a4)]('MethodDecorator')[_0x4442d6(0x1a6)](_0x5bb031,JSON[_0x4442d6(0x193)](_0x49f819),_0x423bae);return _0x49f819;},_0x3ad503;};}exports[a2_0x477879(0x196)]=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a3_0x541a(){var _0x57d72e=['1289555DpUbMh','./configuration','Cache','158428ooecBJ','3606940OiAwVJ','20920770VLHqgX','472VhDYXJ','CustomConfiguration','CacheService','6QFCYXH','./service/CacheService','97514gZMXxs','755574SmUBAT','defineProperty','./decorator/Cache','80269RkHvDN','Configuration'];a3_0x541a=function(){return _0x57d72e;};return a3_0x541a();}var a3_0x19121f=a3_0x1f1a;function a3_0x1f1a(_0x756674,_0x1f2ed7){var _0x541a32=a3_0x541a();return a3_0x1f1a=function(_0x1f1ac3,_0x3c22a3){_0x1f1ac3=_0x1f1ac3-0x84;var _0x4bb33f=_0x541a32[_0x1f1ac3];return _0x4bb33f;},a3_0x1f1a(_0x756674,_0x1f2ed7);}(function(_0x55c531,_0xbb7488){var _0x1d7192=a3_0x1f1a,_0xe149c1=_0x55c531();while(!![]){try{var _0x3e08d1=parseInt(_0x1d7192(0x87))/0x1+parseInt(_0x1d7192(0x90))/0x2*(-parseInt(_0x1d7192(0x85))/0x3)+-parseInt(_0x1d7192(0x91))/0x4+-parseInt(_0x1d7192(0x8d))/0x5+parseInt(_0x1d7192(0x88))/0x6+-parseInt(_0x1d7192(0x8b))/0x7*(parseInt(_0x1d7192(0x93))/0x8)+parseInt(_0x1d7192(0x92))/0x9;if(_0x3e08d1===_0xbb7488)break;else _0xe149c1['push'](_0xe149c1['shift']());}catch(_0x53d0ac){_0xe149c1['push'](_0xe149c1['shift']());}}}(a3_0x541a,0x87182));Object[a3_0x19121f(0x89)](exports,'__esModule',{'value':!![]}),exports[a3_0x19121f(0x84)]=exports['Cache']=exports[a3_0x19121f(0x8c)]=void 0x0;var configuration_1=require(a3_0x19121f(0x8e));Object['defineProperty'](exports,a3_0x19121f(0x8c),{'enumerable':!![],'get':function(){var _0x22fcb5=a3_0x19121f;return configuration_1[_0x22fcb5(0x94)];}});var Cache_1=require(a3_0x19121f(0x8a));Object['defineProperty'](exports,a3_0x19121f(0x8f),{'enumerable':!![],'get':function(){var _0x4afd15=a3_0x19121f;return Cache_1[_0x4afd15(0x8f)];}});var CacheService_1=require(a3_0x19121f(0x86));Object['defineProperty'](exports,a3_0x19121f(0x84),{'enumerable':!![],'get':function(){var _0xbbaf8a=a3_0x19121f;return CacheService_1[_0xbbaf8a(0x84)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x1cc7ec=a4_0x1901;(function(_0x5f3e3f,_0x368c69){var _0x5ed4c2=a4_0x1901,_0x23ccc6=_0x5f3e3f();while(!![]){try{var _0x25a672=-parseInt(_0x5ed4c2(0x1f4))/0x1*(parseInt(_0x5ed4c2(0x1fd))/0x2)+-parseInt(_0x5ed4c2(0x1f6))/0x3*(-parseInt(_0x5ed4c2(0x1f0))/0x4)+parseInt(_0x5ed4c2(0x1f7))/0x5+parseInt(_0x5ed4c2(0x206))/0x6+-parseInt(_0x5ed4c2(0x200))/0x7*(-parseInt(_0x5ed4c2(0x216))/0x8)+-parseInt(_0x5ed4c2(0x214))/0x9*(-parseInt(_0x5ed4c2(0x1eb))/0xa)+-parseInt(_0x5ed4c2(0x1f1))/0xb*(parseInt(_0x5ed4c2(0x215))/0xc);if(_0x25a672===_0x368c69)break;else _0x23ccc6['push'](_0x23ccc6['shift']());}catch(_0x595fb2){_0x23ccc6['push'](_0x23ccc6['shift']());}}}(a4_0x2413,0x275df));function a4_0x1901(_0x448f15,_0x47345b){var _0x2413d3=a4_0x2413();return a4_0x1901=function(_0x190137,_0x21a86b){_0x190137=_0x190137-0x1ea;var _0x4f4ad3=_0x2413d3[_0x190137];return _0x4f4ad3;},a4_0x1901(_0x448f15,_0x47345b);}var __decorate=this&&this[a4_0x1cc7ec(0x209)]||function(_0x38728a,_0x46708c,_0x14ac75,_0x320306){var _0x167b8f=a4_0x1cc7ec,_0x12108a=arguments[_0x167b8f(0x1fa)],_0x363124=_0x12108a<0x3?_0x46708c:_0x320306===null?_0x320306=Object[_0x167b8f(0x1f5)](_0x46708c,_0x14ac75):_0x320306,_0x50e726;if(typeof Reflect==='object'&&typeof Reflect[_0x167b8f(0x1f3)]===_0x167b8f(0x1f9))_0x363124=Reflect['decorate'](_0x38728a,_0x46708c,_0x14ac75,_0x320306);else{for(var _0x29552a=_0x38728a[_0x167b8f(0x1fa)]-0x1;_0x29552a>=0x0;_0x29552a--)if(_0x50e726=_0x38728a[_0x29552a])_0x363124=(_0x12108a<0x3?_0x50e726(_0x363124):_0x12108a>0x3?_0x50e726(_0x46708c,_0x14ac75,_0x363124):_0x50e726(_0x46708c,_0x14ac75))||_0x363124;}return _0x12108a>0x3&&_0x363124&&Object[_0x167b8f(0x1fc)](_0x46708c,_0x14ac75,_0x363124),_0x363124;},__metadata=this&&this['__metadata']||function(_0x4f8dd7,_0x23cf18){var _0x12cc27=a4_0x1cc7ec;if(typeof Reflect===_0x12cc27(0x20e)&&typeof Reflect[_0x12cc27(0x1f2)]===_0x12cc27(0x1f9))return Reflect[_0x12cc27(0x1f2)](_0x4f8dd7,_0x23cf18);};Object[a4_0x1cc7ec(0x1fc)](exports,a4_0x1cc7ec(0x204),{'value':!![]}),exports[a4_0x1cc7ec(0x20a)]=void 0x0;const cacheManager=require(a4_0x1cc7ec(0x20d)),decorator_1=require(a4_0x1cc7ec(0x1f8));let CacheService=class CacheService{constructor(){var _0x54094b=a4_0x1cc7ec;this[_0x54094b(0x205)]=undefined,this[_0x54094b(0x1ec)]=new Map();}[a4_0x1cc7ec(0x1ed)](_0x53b762){var _0x4e9097=a4_0x1cc7ec,_0x5a991a,_0xd90c9a;if(!this[_0x4e9097(0x205)]){const _0x12abdd=((_0x5a991a=this[_0x4e9097(0x211)][_0x4e9097(0x20b)])===null||_0x5a991a===void 0x0?void 0x0:_0x5a991a[(_0xd90c9a=this[_0x4e9097(0x211)]['cache'])===null||_0xd90c9a===void 0x0?void 0x0:_0xd90c9a[_0x4e9097(0x1ee)]])||this[_0x4e9097(0x211)]['stores'][_0x4e9097(0x1ea)];this[_0x4e9097(0x205)]=cacheManager[_0x4e9097(0x1fe)]({..._0x12abdd['options'],'store':_0x12abdd[_0x4e9097(0x202)]});}return!this['clients'][_0x4e9097(0x1fb)](_0x53b762)&&this['clients'][_0x4e9097(0x20c)](_0x53b762,new CacheHandler(_0x53b762,this['cache'])),this[_0x4e9097(0x1ec)]['get'](_0x53b762);}async['reset'](){var _0x57c53e=a4_0x1cc7ec;return await this[_0x57c53e(0x205)]['reset']();}};function a4_0x2413(){var _0x561e92=['956qGPxqK','11PkTDkJ','metadata','decorate','1qIbojm','getOwnPropertyDescriptor','1371SeAfWq','1525985aPXBne','@midwayjs/decorator','function','length','has','defineProperty','611772rzpVGC','caching','design:type','1680287WIuFST','get','store','Provide','__esModule','cache','187854LRFnrE','del','hdel','__decorate','CacheService','stores','set','cache-manager','object','ScopeEnum','Scope','config','Singleton','hget','4086KgmkgI','5472948XNWYXR','8tEZspV','file','5230mPVWPR','clients','use','default','prefix'];a4_0x2413=function(){return _0x561e92;};return a4_0x2413();}__decorate([(0x0,decorator_1['Config'])(a4_0x1cc7ec(0x205)),__metadata(a4_0x1cc7ec(0x1ff),Object)],CacheService['prototype'],a4_0x1cc7ec(0x211),void 0x0),CacheService=__decorate([(0x0,decorator_1[a4_0x1cc7ec(0x203)])(),(0x0,decorator_1[a4_0x1cc7ec(0x210)])(decorator_1[a4_0x1cc7ec(0x20f)][a4_0x1cc7ec(0x212)])],CacheService),exports['CacheService']=CacheService;class CacheHandler{constructor(_0xd25ebf,_0x4994c6){var _0x3884e8=a4_0x1cc7ec;this[_0x3884e8(0x205)]=_0x4994c6,this[_0x3884e8(0x1ef)]=_0xd25ebf;}async[a4_0x1cc7ec(0x207)](_0x991c7d){var _0x24ff26=a4_0x1cc7ec;return await this[_0x24ff26(0x205)]['del'](this[_0x24ff26(0x1ef)]+':'+_0x991c7d);}async[a4_0x1cc7ec(0x20c)](_0x10e32e,_0x12cfb1,_0x467ed3){var _0x1e04d7=a4_0x1cc7ec;return await this[_0x1e04d7(0x205)][_0x1e04d7(0x20c)](this[_0x1e04d7(0x1ef)]+':'+_0x10e32e,_0x12cfb1,_0x467ed3);}async[a4_0x1cc7ec(0x201)](_0x4c580c,_0x3e64c9){return new Promise((_0xbe5ab6,_0x5db982)=>{var _0x469ee1=a4_0x1901;this['cache']['get'](this[_0x469ee1(0x1ef)]+':'+_0x4c580c,(_0x2de8a3,_0x56e92f)=>{_0x2de8a3?_0x5db982(_0x2de8a3):_0xbe5ab6(_0x56e92f||_0x3e64c9);});});}async[a4_0x1cc7ec(0x208)](_0x5ab450,_0x45f303){var _0x1777fd=a4_0x1cc7ec;return await this[_0x1777fd(0x207)](_0x5ab450+'-'+_0x45f303);}async['hset'](_0xc0e8e6,_0x534d74,_0x56d579,_0x2fda6b){var _0xdf9bac=a4_0x1cc7ec;return await this[_0xdf9bac(0x20c)](_0xc0e8e6+'-'+_0x534d74,_0x56d579,_0x2fda6b);}async[a4_0x1cc7ec(0x213)](_0x4b7e86,_0x5433c4,_0x45a26c){var _0x5a5c58=a4_0x1cc7ec;return await this[_0x5a5c58(0x201)](_0x4b7e86+'-'+_0x5433c4,_0x45a26c);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
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": "28c0a11ed53b8b71939f001917aceb983736a1fe"
|
|
27
27
|
}
|