@anncic-api/cache 1.4.5 → 1.4.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';const a0_0xe3654a=a0_0x36c1;function a0_0x36c1(_0x4d2dbb,_0x1e28a7){const _0x26f1de=a0_0x26f1();return a0_0x36c1=function(_0x36c113,_0x5c4f5f){_0x36c113=_0x36c113-0xe7;let _0x14dfd4=_0x26f1de[_0x36c113];return _0x14dfd4;},a0_0x36c1(_0x4d2dbb,_0x1e28a7);}(function(_0x1634b3,_0x172151){const _0x2c5c43=a0_0x36c1,_0x362885=_0x1634b3();while(!![]){try{const _0x5b270f=-parseInt(_0x2c5c43(0xf2))/0x1*(parseInt(_0x2c5c43(0xf7))/0x2)+-parseInt(_0x2c5c43(0xf0))/0x3+parseInt(_0x2c5c43(0xf1))/0x4+-parseInt(_0x2c5c43(0xf8))/0x5*(-parseInt(_0x2c5c43(0xf6))/0x6)+parseInt(_0x2c5c43(0xef))/0x7*(-parseInt(_0x2c5c43(0xf5))/0x8)+-parseInt(_0x2c5c43(0xe7))/0x9+parseInt(_0x2c5c43(0xec))/0xa;if(_0x5b270f===_0x172151)break;else _0x362885['push'](_0x362885['shift']());}catch(_0x4394b1){_0x362885['push'](_0x362885['shift']());}}}(a0_0x26f1,0xe334b));Object[a0_0xe3654a(0xe9)](exports,a0_0xe3654a(0xeb),{'value':!![]});function a0_0x26f1(){const _0x5679f1=['16804zvUkvV','file','cache-manager-ioredis','3096CRjuJE','6swhcte','10hDRlbC','8296355nEJlwQ','13636035OOvyuj','default','defineProperty','127.0.0.1','__esModule','15405930cCrVah','name','/runtime/.cache','9737aiPfSF','3192897iKPIFo','3730088KFRlNX'];a0_0x26f1=function(){return _0x5679f1;};return a0_0x26f1();}const fsStore=require('cache-manager-fs-hash'),redisStore=require(a0_0xe3654a(0xf4));exports[a0_0xe3654a(0xe8)]=_0x81a9fc=>{const _0x642f0c=a0_0xe3654a;return{'cache':{'default':_0x642f0c(0xf3),'stores':{'file':{'store':fsStore,'options':{'ttl':0x1e13380,'subdirs':![],'path':_0x81a9fc['appDir']+_0x642f0c(0xee)}},'redis':{'store':redisStore,'options':{'port':0x18eb,'host':_0x642f0c(0xea),'password':'','ttl':0x1e13380,'keyPrefix':_0x81a9fc[_0x642f0c(0xed)]+':'}},'memory':{'store':'memory','options':{'max':0x64,'ttl':0x1e13380}}}}};};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x512d9d=a1_0x3fb0;(function(_0x5566b1,_0x1be6aa){var _0x2a714f=a1_0x3fb0,_0x8390f7=_0x5566b1();while(!![]){try{var _0xa28151=-parseInt(_0x2a714f(0x1dc))/0x1*(-parseInt(_0x2a714f(0x1e0))/0x2)+parseInt(_0x2a714f(0x1d9))/0x3+parseInt(_0x2a714f(0x1e3))/0x4*(-parseInt(_0x2a714f(0x1e7))/0x5)+-parseInt(_0x2a714f(0x1e6))/0x6+-parseInt(_0x2a714f(0x1eb))/0x7+parseInt(_0x2a714f(0x1da))/0x8+-parseInt(_0x2a714f(0x1df))/0x9;if(_0xa28151===_0x1be6aa)break;else _0x8390f7['push'](_0x8390f7['shift']());}catch(_0x3d6d36){_0x8390f7['push'](_0x8390f7['shift']());}}}(a1_0x26b8,0x70329));function a1_0x26b8(){var _0x488538=['767666HCJDkp','anncic-api:cache','Configuration','12irqelU','CustomConfiguration','length','3584868fJVwZA','676765DwetnY','__esModule','decorate','defineProperty','93044GbAJpK','375393MMxobN','6699848QWmfrx','./config/config.default','2YEpStg','object','getOwnPropertyDescriptor','2284992IfZrMW'];a1_0x26b8=function(){return _0x488538;};return a1_0x26b8();}var __decorate=this&&this['__decorate']||function(_0x6bfb86,_0x15820d,_0xa2933,_0x45ed92){var _0x34b901=a1_0x3fb0,_0x29548e=arguments[_0x34b901(0x1e5)],_0x414129=_0x29548e<0x3?_0x15820d:_0x45ed92===null?_0x45ed92=Object[_0x34b901(0x1de)](_0x15820d,_0xa2933):_0x45ed92,_0x5e0ad9;if(typeof Reflect===_0x34b901(0x1dd)&&typeof Reflect[_0x34b901(0x1e9)]==='function')_0x414129=Reflect['decorate'](_0x6bfb86,_0x15820d,_0xa2933,_0x45ed92);else{for(var _0x24cca8=_0x6bfb86[_0x34b901(0x1e5)]-0x1;_0x24cca8>=0x0;_0x24cca8--)if(_0x5e0ad9=_0x6bfb86[_0x24cca8])_0x414129=(_0x29548e<0x3?_0x5e0ad9(_0x414129):_0x29548e>0x3?_0x5e0ad9(_0x15820d,_0xa2933,_0x414129):_0x5e0ad9(_0x15820d,_0xa2933))||_0x414129;}return _0x29548e>0x3&&_0x414129&&Object[_0x34b901(0x1ea)](_0x15820d,_0xa2933,_0x414129),_0x414129;};function a1_0x3fb0(_0x3b353b,_0x398ba0){var _0x26b8e9=a1_0x26b8();return a1_0x3fb0=function(_0x3fb054,_0x303e9e){_0x3fb054=_0x3fb054-0x1d9;var _0x3304ef=_0x26b8e9[_0x3fb054];return _0x3304ef;},a1_0x3fb0(_0x3b353b,_0x398ba0);}Object['defineProperty'](exports,a1_0x512d9d(0x1e8),{'value':!![]}),exports['CustomConfiguration']=void 0x0;const core_1=require('@midwayjs/core'),ConfigDefault=require(a1_0x512d9d(0x1db));let CustomConfiguration=class CustomConfiguration{};CustomConfiguration=__decorate([(0x0,core_1[a1_0x512d9d(0x1e2)])({'conflictCheck':![],'namespace':a1_0x512d9d(0x1e1),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration),exports[a1_0x512d9d(0x1e4)]=CustomConfiguration;
|
package/dist/decorator/Cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a2_0x386e(){const _0x22bcd5=['1OTKwSl','4094299huVaMf','1102785RruvZZ','225hbLygk','apply','Cache','crypto-js','423BPOzkN','get','8ALBZRb','4353540fXwwhm','app','set','82504zpUGpB','MD5','use','REQUEST_OBJ_CTX_KEY','@midwayjs/core','toString','parse','42204waIawv','../service/CacheService','__esModule','stringify','defineProperty','120872KxkNrj','Method::Decorator','getApplicationContext','4526865XzZsdf'];a2_0x386e=function(){return _0x22bcd5;};return a2_0x386e();}function a2_0x46f6(_0x41ee60,_0x5f0ccf){const _0x386ed9=a2_0x386e();return a2_0x46f6=function(_0x46f660,_0x2bacb9){_0x46f660=_0x46f660-0x1bb;let _0x4061c4=_0x386ed9[_0x46f660];return _0x4061c4;},a2_0x46f6(_0x41ee60,_0x5f0ccf);}const a2_0x687fa7=a2_0x46f6;(function(_0x535b3e,_0x4e61bf){const _0xa8ccc7=a2_0x46f6,_0x14c0bb=_0x535b3e();while(!![]){try{const _0xef20fc=-parseInt(_0xa8ccc7(0x1c6))/0x1*(parseInt(_0xa8ccc7(0x1d3))/0x2)+-parseInt(_0xa8ccc7(0x1c8))/0x3*(-parseInt(_0xa8ccc7(0x1cf))/0x4)+parseInt(_0xa8ccc7(0x1c9))/0x5*(-parseInt(_0xa8ccc7(0x1bd))/0x6)+-parseInt(_0xa8ccc7(0x1c5))/0x7+-parseInt(_0xa8ccc7(0x1c2))/0x8*(-parseInt(_0xa8ccc7(0x1cd))/0x9)+-parseInt(_0xa8ccc7(0x1d0))/0xa+parseInt(_0xa8ccc7(0x1c7))/0xb;if(_0xef20fc===_0x4e61bf)break;else _0x14c0bb['push'](_0x14c0bb['shift']());}catch(_0x125241){_0x14c0bb['push'](_0x14c0bb['shift']());}}}(a2_0x386e,0x5c35b));Object[a2_0x687fa7(0x1c1)](exports,a2_0x687fa7(0x1bf),{'value':!![]}),exports['Cache']=void 0x0;const crypto_js_1=require(a2_0x687fa7(0x1cc)),CacheService_1=require(a2_0x687fa7(0x1be)),core_1=require(a2_0x687fa7(0x1d7));function Cache(_0x3c11e1,_0x1a2f75){return(_0x3c4fbe,_0x306bae,_0x50b294)=>{const _0xe810aa=_0x50b294['value'];return _0x50b294['value']=async function(..._0xf1a95d){const _0x4da0e2=a2_0x46f6;!_0x3c11e1&&(_0x3c11e1=(0x0,crypto_js_1[_0x4da0e2(0x1d4)])(JSON[_0x4da0e2(0x1c0)](_0xf1a95d))[_0x4da0e2(0x1bb)]());let _0x1615d1=await this[core_1[_0x4da0e2(0x1d6)]][_0x4da0e2(0x1d1)][_0x4da0e2(0x1c4)]()['getAsync'](CacheService_1['CacheService']),_0x3e3446=await _0x1615d1[_0x4da0e2(0x1d5)](_0x4da0e2(0x1c3))[_0x4da0e2(0x1ce)](_0x3c11e1);if(_0x3e3446)return JSON[_0x4da0e2(0x1bc)](_0x3e3446);else _0x3e3446=await _0xe810aa[_0x4da0e2(0x1ca)](this,[..._0xf1a95d]),await _0x1615d1['use'](_0x4da0e2(0x1c3))[_0x4da0e2(0x1d2)](_0x3c11e1,JSON[_0x4da0e2(0x1c0)](_0x3e3446),_0x1a2f75);return _0x3e3446;},_0x50b294;};}exports[a2_0x687fa7(0x1cb)]=Cache;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a3_0x13719f=a3_0x1793;(function(_0x58a6aa,_0x3e4ffb){var _0x4cc87a=a3_0x1793,_0x1cb9ea=_0x58a6aa();while(!![]){try{var _0x56f28d=parseInt(_0x4cc87a(0xd3))/0x1+-parseInt(_0x4cc87a(0xd5))/0x2+parseInt(_0x4cc87a(0xdc))/0x3*(-parseInt(_0x4cc87a(0xd6))/0x4)+parseInt(_0x4cc87a(0xda))/0x5*(-parseInt(_0x4cc87a(0xe2))/0x6)+-parseInt(_0x4cc87a(0xd4))/0x7*(-parseInt(_0x4cc87a(0xd8))/0x8)+-parseInt(_0x4cc87a(0xe3))/0x9+parseInt(_0x4cc87a(0xd7))/0xa*(parseInt(_0x4cc87a(0xd1))/0xb);if(_0x56f28d===_0x3e4ffb)break;else _0x1cb9ea['push'](_0x1cb9ea['shift']());}catch(_0x2d1b39){_0x1cb9ea['push'](_0x1cb9ea['shift']());}}}(a3_0xcc62,0x2c35f));Object[a3_0x13719f(0xd9)](exports,'__esModule',{'value':!![]}),exports[a3_0x13719f(0xdb)]=exports[a3_0x13719f(0xe0)]=exports[a3_0x13719f(0xe1)]=void 0x0;var configuration_1=require(a3_0x13719f(0xd2));function a3_0x1793(_0x510f79,_0x229c42){var _0xcc62ff=a3_0xcc62();return a3_0x1793=function(_0x179378,_0x48b97c){_0x179378=_0x179378-0xd1;var _0x3c4a2c=_0xcc62ff[_0x179378];return _0x3c4a2c;},a3_0x1793(_0x510f79,_0x229c42);}Object[a3_0x13719f(0xd9)](exports,a3_0x13719f(0xe1),{'enumerable':!![],'get':function(){var _0x48f0d2=a3_0x13719f;return configuration_1[_0x48f0d2(0xdd)];}});var Cache_1=require(a3_0x13719f(0xdf));Object[a3_0x13719f(0xd9)](exports,a3_0x13719f(0xe0),{'enumerable':!![],'get':function(){var _0x5875a6=a3_0x13719f;return Cache_1[_0x5875a6(0xe0)];}});function a3_0xcc62(){var _0x305773=['379962cjbrFG','20251hPzwkd','./configuration','257059dEHOTC','4277dMdHpq','43612IuRZmr','96fKlRRS','280MVfsgl','2968OYCJku','defineProperty','5pPgGwI','CacheService','14808fBSuBF','CustomConfiguration','./service/CacheService','./decorator/Cache','Cache','Configuration','1030278pBGazf'];a3_0xcc62=function(){return _0x305773;};return a3_0xcc62();}var CacheService_1=require(a3_0x13719f(0xde));Object[a3_0x13719f(0xd9)](exports,a3_0x13719f(0xdb),{'enumerable':!![],'get':function(){var _0x527da0=a3_0x13719f;return CacheService_1[_0x527da0(0xdb)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a4_0x4aae(_0xcc6a3d,_0x3aca5c){var _0x1e88f1=a4_0x1e88();return a4_0x4aae=function(_0x4aaef2,_0x40a2fb){_0x4aaef2=_0x4aaef2-0x10b;var _0x18f745=_0x1e88f1[_0x4aaef2];return _0x18f745;},a4_0x4aae(_0xcc6a3d,_0x3aca5c);}var a4_0x8d4b0f=a4_0x4aae;function a4_0x1e88(){var _0x2c743f=['getOwnPropertyDescriptor','default','prototype','2147724ITWBCY','del','Singleton','design:type','defineProperty','has','reset','set','hset','metadata','6IZblbo','__metadata','cache-manager','cache','14pycIbA','stores','config','57355pSkCET','6nLRHys','clients','prefix','2011096bvgRAk','__esModule','2438082JHGURM','store','Provide','hget','caching','object','length','@midwayjs/core','2123270aBBDAh','ScopeEnum','get','function','693270UtzHgK','268556ayyYUU','use','options'];a4_0x1e88=function(){return _0x2c743f;};return a4_0x1e88();}(function(_0x233aa5,_0x1d7b08){var _0x346278=a4_0x4aae,_0x361156=_0x233aa5();while(!![]){try{var _0xcb05f5=parseInt(_0x346278(0x130))/0x1*(-parseInt(_0x346278(0x131))/0x2)+parseInt(_0x346278(0x129))/0x3*(parseInt(_0x346278(0x119))/0x4)+-parseInt(_0x346278(0x118))/0x5+parseInt(_0x346278(0x10c))/0x6+parseInt(_0x346278(0x12d))/0x7*(parseInt(_0x346278(0x134))/0x8)+-parseInt(_0x346278(0x11f))/0x9+-parseInt(_0x346278(0x114))/0xa;if(_0xcb05f5===_0x1d7b08)break;else _0x361156['push'](_0x361156['shift']());}catch(_0x623cec){_0x361156['push'](_0x361156['shift']());}}}(a4_0x1e88,0x44c75));var __decorate=this&&this['__decorate']||function(_0x295067,_0x3e3910,_0x38ff9c,_0x10bb42){var _0x4403e7=a4_0x4aae,_0xb161c5=arguments[_0x4403e7(0x112)],_0xc3bdca=_0xb161c5<0x3?_0x3e3910:_0x10bb42===null?_0x10bb42=Object[_0x4403e7(0x11c)](_0x3e3910,_0x38ff9c):_0x10bb42,_0x39963f;if(typeof Reflect===_0x4403e7(0x111)&&typeof Reflect['decorate']===_0x4403e7(0x117))_0xc3bdca=Reflect['decorate'](_0x295067,_0x3e3910,_0x38ff9c,_0x10bb42);else{for(var _0x52b0f4=_0x295067[_0x4403e7(0x112)]-0x1;_0x52b0f4>=0x0;_0x52b0f4--)if(_0x39963f=_0x295067[_0x52b0f4])_0xc3bdca=(_0xb161c5<0x3?_0x39963f(_0xc3bdca):_0xb161c5>0x3?_0x39963f(_0x3e3910,_0x38ff9c,_0xc3bdca):_0x39963f(_0x3e3910,_0x38ff9c))||_0xc3bdca;}return _0xb161c5>0x3&&_0xc3bdca&&Object[_0x4403e7(0x123)](_0x3e3910,_0x38ff9c,_0xc3bdca),_0xc3bdca;},__metadata=this&&this[a4_0x8d4b0f(0x12a)]||function(_0x557e1c,_0x2e532b){var _0x3f9061=a4_0x8d4b0f;if(typeof Reflect==='object'&&typeof Reflect[_0x3f9061(0x128)]===_0x3f9061(0x117))return Reflect['metadata'](_0x557e1c,_0x2e532b);};Object['defineProperty'](exports,a4_0x8d4b0f(0x10b),{'value':!![]}),exports['CacheService']=void 0x0;const cacheManager=require(a4_0x8d4b0f(0x12b)),core_1=require(a4_0x8d4b0f(0x113));let CacheService=class CacheService{constructor(){var _0x2654b0=a4_0x8d4b0f;this[_0x2654b0(0x12c)]=undefined,this[_0x2654b0(0x132)]=new Map();}[a4_0x8d4b0f(0x11a)](_0x7b4bff){var _0x5d3515=a4_0x8d4b0f,_0x4c7577,_0x32d48a;if(!this['cache']){const _0x22fd4a=((_0x4c7577=this[_0x5d3515(0x12f)][_0x5d3515(0x12e)])===null||_0x4c7577===void 0x0?void 0x0:_0x4c7577[(_0x32d48a=this[_0x5d3515(0x12f)][_0x5d3515(0x12c)])===null||_0x32d48a===void 0x0?void 0x0:_0x32d48a[_0x5d3515(0x11d)]])||this[_0x5d3515(0x12f)][_0x5d3515(0x12e)]['file'];this['cache']=cacheManager[_0x5d3515(0x110)]({..._0x22fd4a[_0x5d3515(0x11b)],'store':_0x22fd4a[_0x5d3515(0x10d)]});}return!this['clients'][_0x5d3515(0x124)](_0x7b4bff)&&this[_0x5d3515(0x132)]['set'](_0x7b4bff,new CacheHandler(_0x7b4bff,this[_0x5d3515(0x12c)])),this[_0x5d3515(0x132)][_0x5d3515(0x116)](_0x7b4bff);}async[a4_0x8d4b0f(0x125)](){var _0x47f1ae=a4_0x8d4b0f;return await this[_0x47f1ae(0x12c)]['reset']();}};__decorate([(0x0,core_1['Config'])(a4_0x8d4b0f(0x12c)),__metadata(a4_0x8d4b0f(0x122),Object)],CacheService[a4_0x8d4b0f(0x11e)],a4_0x8d4b0f(0x12f),void 0x0),CacheService=__decorate([(0x0,core_1[a4_0x8d4b0f(0x10e)])(),(0x0,core_1['Scope'])(core_1[a4_0x8d4b0f(0x115)][a4_0x8d4b0f(0x121)])],CacheService),exports['CacheService']=CacheService;class CacheHandler{constructor(_0x248ebb,_0x41621e){this['cache']=_0x41621e,this['prefix']=_0x248ebb;}async[a4_0x8d4b0f(0x120)](_0x5873fe){var _0x2d5da5=a4_0x8d4b0f;return await this[_0x2d5da5(0x12c)][_0x2d5da5(0x120)](this['prefix']+':'+_0x5873fe);}async[a4_0x8d4b0f(0x126)](_0x44c052,_0x26baa5,_0x238af5){var _0x2cc582=a4_0x8d4b0f;return await this['cache'][_0x2cc582(0x126)](this[_0x2cc582(0x133)]+':'+_0x44c052,_0x26baa5,_0x238af5);}async['get'](_0xb97485,_0x322a6c){return new Promise((_0x2ac31d,_0x650647)=>{var _0x4a8a09=a4_0x4aae;this[_0x4a8a09(0x12c)]['get'](this[_0x4a8a09(0x133)]+':'+_0xb97485,(_0x16fa72,_0x1f6ec9)=>{_0x16fa72?_0x650647(_0x16fa72):_0x2ac31d(_0x1f6ec9||_0x322a6c);});});}async['hdel'](_0x5ba1b5,_0x2c10df){var _0x16d468=a4_0x8d4b0f;return await this[_0x16d468(0x120)](_0x5ba1b5+'#'+_0x2c10df);}async[a4_0x8d4b0f(0x127)](_0x518e81,_0x572cad,_0x5967e3,_0x40a701){var _0x3c835b=a4_0x8d4b0f;return await this[_0x3c835b(0x126)](_0x518e81+'#'+_0x572cad,_0x5967e3,_0x40a701);}async[a4_0x8d4b0f(0x10f)](_0x5c3629,_0xe5b184,_0x5f0c5f){return await this['get'](_0x5c3629+'#'+_0xe5b184,_0x5f0c5f);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/cache",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
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": "fe6da800b0c07b4f3a449ec09e8bc0c70ff029ff"
|
|
27
27
|
}
|