@anncic-api/cache 1.0.15 → 1.0.16
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_0x438380=a0_0x3113;(function(_0x2f060d,_0x85ec3e){const _0x1d7ca6=a0_0x3113,_0x4bba76=_0x2f060d();while(!![]){try{const _0x11c440=parseInt(_0x1d7ca6(0x13f))/0x1*(parseInt(_0x1d7ca6(0x142))/0x2)+-parseInt(_0x1d7ca6(0x156))/0x3*(-parseInt(_0x1d7ca6(0x151))/0x4)+-parseInt(_0x1d7ca6(0x140))/0x5*(-parseInt(_0x1d7ca6(0x143))/0x6)+-parseInt(_0x1d7ca6(0x155))/0x7*(parseInt(_0x1d7ca6(0x14e))/0x8)+parseInt(_0x1d7ca6(0x14b))/0x9*(-parseInt(_0x1d7ca6(0x150))/0xa)+parseInt(_0x1d7ca6(0x145))/0xb*(parseInt(_0x1d7ca6(0x152))/0xc)+parseInt(_0x1d7ca6(0x154))/0xd;if(_0x11c440===_0x85ec3e)break;else _0x4bba76['push'](_0x4bba76['shift']());}catch(_0x16a181){_0x4bba76['push'](_0x4bba76['shift']());}}}(a0_0x2de1,0x7501a));function a0_0x3113(_0xfcbdb7,_0x48c06c){const _0x2de119=a0_0x2de1();return a0_0x3113=function(_0x3113f7,_0x43f45e){_0x3113f7=_0x3113f7-0x13f;let _0x371c6c=_0x2de119[_0x3113f7];return _0x371c6c;},a0_0x3113(_0xfcbdb7,_0x48c06c);}Object[a0_0x438380(0x141)](exports,a0_0x438380(0x14a),{'value':!![]});const fsStore=require(a0_0x438380(0x14f)),redisStore=require(a0_0x438380(0x14c));exports[a0_0x438380(0x149)]=_0x2b1286=>{const _0x12c1d6=a0_0x438380;return{'cache':{'default':_0x12c1d6(0x144),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x2b1286[_0x12c1d6(0x147)]+_0x12c1d6(0x146)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x12c1d6(0x148),'password':'','ttl':0x1e13380,'keyPrefix':_0x2b1286[_0x12c1d6(0x14d)]+':'}},'memory':{'store':_0x12c1d6(0x153),'options':{'max':0x64,'ttl':0x1e13380}}}}};};function a0_0x2de1(){const _0x5d237f=['89uViNdK','52865aneHfW','defineProperty','3674PKivJB','42hZMClK','file','307219GylSSy','/runtime/.cache','appDir','127.0.0.1','default','__esModule','9Bdyfev','cache-manager-ioredis','name','233336cXNfsn','cache-manager-fs-hash','1091810diZcoo','1061252AjLisC','300OFpbsf','memory','1515436yNfRCi','175WbOleN','3hDuboa'];a0_0x2de1=function(){return _0x5d237f;};return a0_0x2de1();}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x3c0457=a1_0x36b6;(function(_0x2d29c4,_0x36fbf4){var _0x30e0c2=a1_0x36b6,_0x22621b=_0x2d29c4();while(!![]){try{var _0x3a717c=-parseInt(_0x30e0c2(0x1aa))/0x1*(-parseInt(_0x30e0c2(0x1b4))/0x2)+-parseInt(_0x30e0c2(0x1b0))/0x3+parseInt(_0x30e0c2(0x1a4))/0x4*(-parseInt(_0x30e0c2(0x1a2))/0x5)+parseInt(_0x30e0c2(0x1a8))/0x6*(-parseInt(_0x30e0c2(0x1ac))/0x7)+-parseInt(_0x30e0c2(0x1a0))/0x8+-parseInt(_0x30e0c2(0x1a9))/0x9*(parseInt(_0x30e0c2(0x1af))/0xa)+parseInt(_0x30e0c2(0x19f))/0xb*(parseInt(_0x30e0c2(0x1a6))/0xc);if(_0x3a717c===_0x36fbf4)break;else _0x22621b['push'](_0x22621b['shift']());}catch(_0x5555df){_0x22621b['push'](_0x22621b['shift']());}}}(a1_0x5d51,0x8df26));var __decorate=this&&this[a1_0x3c0457(0x1a1)]||function(_0x20512e,_0x1854c7,_0x10e3e0,_0x45fece){var _0x2d4c5b=a1_0x3c0457,_0x46f3fc=arguments[_0x2d4c5b(0x1a7)],_0x3a3c51=_0x46f3fc<0x3?_0x1854c7:_0x45fece===null?_0x45fece=Object[_0x2d4c5b(0x1ab)](_0x1854c7,_0x10e3e0):_0x45fece,_0x18365e;if(typeof Reflect==='object'&&typeof Reflect[_0x2d4c5b(0x1b3)]===_0x2d4c5b(0x1b1))_0x3a3c51=Reflect[_0x2d4c5b(0x1b3)](_0x20512e,_0x1854c7,_0x10e3e0,_0x45fece);else{for(var _0x38d504=_0x20512e[_0x2d4c5b(0x1a7)]-0x1;_0x38d504>=0x0;_0x38d504--)if(_0x18365e=_0x20512e[_0x38d504])_0x3a3c51=(_0x46f3fc<0x3?_0x18365e(_0x3a3c51):_0x46f3fc>0x3?_0x18365e(_0x1854c7,_0x10e3e0,_0x3a3c51):_0x18365e(_0x1854c7,_0x10e3e0))||_0x3a3c51;}return _0x46f3fc>0x3&&_0x3a3c51&&Object['defineProperty'](_0x1854c7,_0x10e3e0,_0x3a3c51),_0x3a3c51;};function a1_0x36b6(_0x2f8a78,_0x26aa84){var _0x5d5160=a1_0x5d51();return a1_0x36b6=function(_0x36b6ff,_0xc83cd0){_0x36b6ff=_0x36b6ff-0x19f;var _0x203d62=_0x5d5160[_0x36b6ff];return _0x203d62;},a1_0x36b6(_0x2f8a78,_0x26aa84);}Object[a1_0x3c0457(0x1b2)](exports,'__esModule',{'value':!![]}),exports[a1_0x3c0457(0x1a3)]=void 0x0;const decorator_1=require(a1_0x3c0457(0x1ad)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{};function a1_0x5d51(){var _0x3e1a5b=['2639OuKbgx','@midwayjs/decorator','anncic-api:cache','10yRCiKd','1669098aiMUwc','function','defineProperty','decorate','15492uXomhm','17763691LbnubL','3428664tkhegh','__decorate','25LwAdCI','CustomConfiguration','591292rJfCgA','Configuration','24CMBTQI','length','11682UcYqlI','3524949pSvtPu','26DqFozS','getOwnPropertyDescriptor'];a1_0x5d51=function(){return _0x3e1a5b;};return a1_0x5d51();}CustomConfiguration=__decorate([(0x0,decorator_1[a1_0x3c0457(0x1a5)])({'conflictCheck':![],'namespace':a1_0x3c0457(0x1ae),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a2_0x499d15=a2_0x4f36;function a2_0x4f36(_0x5986f5,_0x4eb726){const _0x26bec1=a2_0x26be();return a2_0x4f36=function(_0x4f3614,_0x50887a){_0x4f3614=_0x4f3614-0x1e0;let _0x2979f7=_0x26bec1[_0x4f3614];return _0x2979f7;},a2_0x4f36(_0x5986f5,_0x4eb726);}(function(_0x133f8a,_0xf5c350){const _0x29452d=a2_0x4f36,_0x810f19=_0x133f8a();while(!![]){try{const _0x2507ec=parseInt(_0x29452d(0x1e1))/0x1*(-parseInt(_0x29452d(0x1e9))/0x2)+parseInt(_0x29452d(0x1e0))/0x3*(-parseInt(_0x29452d(0x1eb))/0x4)+-parseInt(_0x29452d(0x1f7))/0x5*(parseInt(_0x29452d(0x1f0))/0x6)+parseInt(_0x29452d(0x1f8))/0x7+-parseInt(_0x29452d(0x1fb))/0x8*(-parseInt(_0x29452d(0x1e7))/0x9)+parseInt(_0x29452d(0x1f6))/0xa*(-parseInt(_0x29452d(0x1e5))/0xb)+parseInt(_0x29452d(0x1f5))/0xc;if(_0x2507ec===_0xf5c350)break;else _0x810f19['push'](_0x810f19['shift']());}catch(_0x42d156){_0x810f19['push'](_0x810f19['shift']());}}}(a2_0x26be,0xe2fbb));function a2_0x26be(){const _0x4ce07b=['814IqEoBV','crypto-js','9hNrrUn','use','2584874uYeFTS','app','4uIeTPt','getAsync','MethodDecorator','CacheService','apply','1854slKVcl','MD5','defineProperty','stringify','value','20747124fLVpqc','190340oEjriQ','6290ZpokKT','12960437TRcFel','set','REQUEST_OBJ_CTX_KEY','6175320WsVJjn','998805tfYiHr','1znBDmS','__esModule','@midwayjs/core','toString'];a2_0x26be=function(){return _0x4ce07b;};return a2_0x26be();}Object[a2_0x499d15(0x1f2)](exports,a2_0x499d15(0x1e2),{'value':!![]}),exports['Cache']=void 0x0;const crypto_js_1=require(a2_0x499d15(0x1e6)),CacheService_1=require('../service/CacheService'),core_1=require(a2_0x499d15(0x1e3));function Cache(_0x576c37,_0x1f120e){return(_0x2705e1,_0x14978c,_0x329d39)=>{const _0x45e881=a2_0x4f36,_0xe3abdc=_0x329d39[_0x45e881(0x1f4)];return _0x329d39[_0x45e881(0x1f4)]=async function(..._0x2b24cb){const _0x488028=_0x45e881;!_0x576c37&&(_0x576c37=(0x0,crypto_js_1[_0x488028(0x1f1)])(JSON[_0x488028(0x1f3)](_0x2b24cb))[_0x488028(0x1e4)]());let _0xd3288=await this[core_1[_0x488028(0x1fa)]][_0x488028(0x1ea)]['getApplicationContext']()[_0x488028(0x1ec)](CacheService_1[_0x488028(0x1ee)]),_0x431789=await _0xd3288['use'](_0x488028(0x1ed))['get'](_0x576c37);if(_0x431789)return JSON['parse'](_0x431789);else _0x431789=await _0xe3abdc[_0x488028(0x1ef)](this,[..._0x2b24cb]),await _0xd3288[_0x488028(0x1e8)](_0x488028(0x1ed))[_0x488028(0x1f9)](_0x576c37,JSON[_0x488028(0x1f3)](_0x431789),_0x1f120e);return _0x431789;},_0x329d39;};}exports['Cache']=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a3_0x5d18ba=a3_0x5175;(function(_0x40922b,_0x350426){var _0x240b45=a3_0x5175,_0x2bbb2b=_0x40922b();while(!![]){try{var _0x1aabe2=parseInt(_0x240b45(0x16b))/0x1+-parseInt(_0x240b45(0x16f))/0x2*(parseInt(_0x240b45(0x163))/0x3)+-parseInt(_0x240b45(0x171))/0x4*(-parseInt(_0x240b45(0x165))/0x5)+-parseInt(_0x240b45(0x162))/0x6+-parseInt(_0x240b45(0x164))/0x7+-parseInt(_0x240b45(0x166))/0x8+parseInt(_0x240b45(0x16a))/0x9*(parseInt(_0x240b45(0x170))/0xa);if(_0x1aabe2===_0x350426)break;else _0x2bbb2b['push'](_0x2bbb2b['shift']());}catch(_0x49a273){_0x2bbb2b['push'](_0x2bbb2b['shift']());}}}(a3_0x5095,0x1abb6));function a3_0x5175(_0x21433d,_0x422f10){var _0x509550=a3_0x5095();return a3_0x5175=function(_0x51750d,_0x134423){_0x51750d=_0x51750d-0x162;var _0x218efb=_0x509550[_0x51750d];return _0x218efb;},a3_0x5175(_0x21433d,_0x422f10);}Object[a3_0x5d18ba(0x172)](exports,'__esModule',{'value':!![]}),exports[a3_0x5d18ba(0x167)]=exports[a3_0x5d18ba(0x168)]=exports['Configuration']=void 0x0;var configuration_1=require(a3_0x5d18ba(0x169));Object['defineProperty'](exports,a3_0x5d18ba(0x16d),{'enumerable':!![],'get':function(){var _0x266f26=a3_0x5d18ba;return configuration_1[_0x266f26(0x16e)];}});var Cache_1=require('./decorator/Cache');Object[a3_0x5d18ba(0x172)](exports,a3_0x5d18ba(0x168),{'enumerable':!![],'get':function(){var _0x40a003=a3_0x5d18ba;return Cache_1[_0x40a003(0x168)];}});var CacheService_1=require(a3_0x5d18ba(0x16c));Object['defineProperty'](exports,a3_0x5d18ba(0x167),{'enumerable':!![],'get':function(){var _0x294f3a=a3_0x5d18ba;return CacheService_1[_0x294f3a(0x167)];}});function a3_0x5095(){var _0x2bf110=['672610fmqPZK','4AwHFNY','defineProperty','891468qTGSKe','3lOTFEI','776874KbKPGM','1061405QujGWq','531232riwkxV','CacheService','Cache','./configuration','45PqZdne','64729ozYlMh','./service/CacheService','Configuration','CustomConfiguration','355714xaDNAe'];a3_0x5095=function(){return _0x2bf110;};return a3_0x5095();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a4_0x5cbeb0=a4_0x227f;function a4_0x227f(_0x5e2263,_0x28df00){var _0x507b0c=a4_0x507b();return a4_0x227f=function(_0x227f4f,_0x1600c5){_0x227f4f=_0x227f4f-0xbd;var _0x36cdc1=_0x507b0c[_0x227f4f];return _0x36cdc1;},a4_0x227f(_0x5e2263,_0x28df00);}(function(_0x49a3ce,_0x41f070){var _0x356b99=a4_0x227f,_0x16c987=_0x49a3ce();while(!![]){try{var _0x12d474=parseInt(_0x356b99(0xc5))/0x1*(parseInt(_0x356b99(0xd0))/0x2)+parseInt(_0x356b99(0xdb))/0x3+parseInt(_0x356b99(0xc2))/0x4*(parseInt(_0x356b99(0xc8))/0x5)+parseInt(_0x356b99(0xc4))/0x6*(parseInt(_0x356b99(0xca))/0x7)+parseInt(_0x356b99(0xc6))/0x8+parseInt(_0x356b99(0xc0))/0x9*(-parseInt(_0x356b99(0xd8))/0xa)+parseInt(_0x356b99(0xd9))/0xb*(-parseInt(_0x356b99(0xce))/0xc);if(_0x12d474===_0x41f070)break;else _0x16c987['push'](_0x16c987['shift']());}catch(_0x5bf93b){_0x16c987['push'](_0x16c987['shift']());}}}(a4_0x507b,0x423de));var __decorate=this&&this[a4_0x5cbeb0(0xe4)]||function(_0x284089,_0x2521b8,_0x41c89d,_0x51d4bc){var _0x35df5f=a4_0x5cbeb0,_0x4de6a7=arguments[_0x35df5f(0xde)],_0x1d4e63=_0x4de6a7<0x3?_0x2521b8:_0x51d4bc===null?_0x51d4bc=Object[_0x35df5f(0xc7)](_0x2521b8,_0x41c89d):_0x51d4bc,_0x308870;if(typeof Reflect==='object'&&typeof Reflect[_0x35df5f(0xe2)]===_0x35df5f(0xe0))_0x1d4e63=Reflect[_0x35df5f(0xe2)](_0x284089,_0x2521b8,_0x41c89d,_0x51d4bc);else{for(var _0xb97d67=_0x284089[_0x35df5f(0xde)]-0x1;_0xb97d67>=0x0;_0xb97d67--)if(_0x308870=_0x284089[_0xb97d67])_0x1d4e63=(_0x4de6a7<0x3?_0x308870(_0x1d4e63):_0x4de6a7>0x3?_0x308870(_0x2521b8,_0x41c89d,_0x1d4e63):_0x308870(_0x2521b8,_0x41c89d))||_0x1d4e63;}return _0x4de6a7>0x3&&_0x1d4e63&&Object[_0x35df5f(0xd1)](_0x2521b8,_0x41c89d,_0x1d4e63),_0x1d4e63;},__metadata=this&&this[a4_0x5cbeb0(0xe5)]||function(_0x579965,_0x2e5017){var _0x2eaa49=a4_0x5cbeb0;if(typeof Reflect===_0x2eaa49(0xcd)&&typeof Reflect[_0x2eaa49(0xe6)]===_0x2eaa49(0xe0))return Reflect[_0x2eaa49(0xe6)](_0x579965,_0x2e5017);};Object['defineProperty'](exports,a4_0x5cbeb0(0xbe),{'value':!![]}),exports[a4_0x5cbeb0(0xe3)]=void 0x0;const cacheManager=require('cache-manager'),decorator_1=require(a4_0x5cbeb0(0xbd));let CacheService=class CacheService{constructor(){var _0x401f21=a4_0x5cbeb0;this[_0x401f21(0xd3)]=undefined,this[_0x401f21(0xd6)]=new Map();}[a4_0x5cbeb0(0xd5)](_0x5cb1ca){var _0x1ac0db=a4_0x5cbeb0,_0x27af98,_0x2273d0;if(!this[_0x1ac0db(0xd3)]){const _0x222f9a=((_0x27af98=this[_0x1ac0db(0xbf)]['stores'])===null||_0x27af98===void 0x0?void 0x0:_0x27af98[(_0x2273d0=this[_0x1ac0db(0xbf)]['cache'])===null||_0x2273d0===void 0x0?void 0x0:_0x2273d0['default']])||this[_0x1ac0db(0xbf)][_0x1ac0db(0xda)][_0x1ac0db(0xd7)];this[_0x1ac0db(0xd3)]=cacheManager['caching']({..._0x222f9a[_0x1ac0db(0xdf)],'store':_0x222f9a[_0x1ac0db(0xc3)]});}return!this[_0x1ac0db(0xd6)][_0x1ac0db(0xc9)](_0x5cb1ca)&&this[_0x1ac0db(0xd6)]['set'](_0x5cb1ca,new CacheHandler(_0x5cb1ca,this[_0x1ac0db(0xd3)])),this[_0x1ac0db(0xd6)]['get'](_0x5cb1ca);}async[a4_0x5cbeb0(0xdc)](){var _0x390332=a4_0x5cbeb0;return await this['cache'][_0x390332(0xdc)]();}};__decorate([(0x0,decorator_1[a4_0x5cbeb0(0xcc)])('cache'),__metadata(a4_0x5cbeb0(0xcb),Object)],CacheService['prototype'],a4_0x5cbeb0(0xbf),void 0x0),CacheService=__decorate([(0x0,decorator_1['Provide'])(),(0x0,decorator_1[a4_0x5cbeb0(0xc1)])(decorator_1['ScopeEnum'][a4_0x5cbeb0(0xdd)])],CacheService),exports[a4_0x5cbeb0(0xe3)]=CacheService;function a4_0x507b(){var _0x47f61c=['clients','file','268570gYRYNw','33seEQUS','stores','695964lVOALa','reset','Singleton','length','options','function','get','decorate','CacheService','__decorate','__metadata','metadata','@midwayjs/decorator','__esModule','config','171mCGAav','Scope','28wIEaJx','store','12thXQmH','154732XAWiEq','1341688seZdnr','getOwnPropertyDescriptor','320690sHLjBP','has','1377593eYZYQj','design:type','Config','object','3080472RwCkCm','prefix','4JGokmS','defineProperty','del','cache','set','use'];a4_0x507b=function(){return _0x47f61c;};return a4_0x507b();}class CacheHandler{constructor(_0x1e7feb,_0x561027){var _0x129507=a4_0x5cbeb0;this[_0x129507(0xd3)]=_0x561027,this[_0x129507(0xcf)]=_0x1e7feb;}async['del'](_0x596127){var _0x53432d=a4_0x5cbeb0;return await this[_0x53432d(0xd3)][_0x53432d(0xd2)](this[_0x53432d(0xcf)]+':'+_0x596127);}async[a4_0x5cbeb0(0xd4)](_0x28aa53,_0x130852,_0x11967c){var _0x2eb489=a4_0x5cbeb0;return await this['cache']['set'](this[_0x2eb489(0xcf)]+':'+_0x28aa53,_0x130852,_0x11967c);}async[a4_0x5cbeb0(0xe1)](_0x25ff64,_0x31273f){return new Promise((_0x480caa,_0x415f5b)=>{var _0x278864=a4_0x227f;this[_0x278864(0xd3)]['get'](this['prefix']+':'+_0x25ff64,(_0x48724c,_0x4f48e5)=>{_0x48724c?_0x415f5b(_0x48724c):_0x480caa(_0x4f48e5||_0x31273f);});});}async['hdel'](_0x230ec5,_0x5d0238){return await this['del'](_0x230ec5+'-'+_0x5d0238);}async['hset'](_0x39c4e6,_0x1b0841,_0x3a35a5,_0x22be13){var _0x4d1136=a4_0x5cbeb0;return await this[_0x4d1136(0xd4)](_0x39c4e6+'-'+_0x1b0841,_0x3a35a5,_0x22be13);}async['hget'](_0xbb2ea,_0x4531b4,_0x1f6492){var _0x46d28e=a4_0x5cbeb0;return await this[_0x46d28e(0xe1)](_0xbb2ea+'-'+_0x4531b4,_0x1f6492);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
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": "0ff6324a04283726d1e958f88999e4bbac666af5"
|
|
27
27
|
}
|