exframe-cache-manager 2.1.0 → 2.1.2
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.
- package/eslint.config.mjs +8 -0
- package/index.js +1 -1
- package/package.json +4 -4
- package/test/cacheManager.test.js +4 -4
- package/.eslintignore +0 -5
- package/.eslintrc.json +0 -3
- package/test/.eslintrc.json +0 -3
package/index.js
CHANGED
|
@@ -210,7 +210,7 @@ function cachemanager(options) {
|
|
|
210
210
|
|
|
211
211
|
controller.abort();
|
|
212
212
|
return { status: 200, message: 'OK' };
|
|
213
|
-
} catch (ex) {
|
|
213
|
+
} catch (ex) { // eslint-disable-line no-unused-vars
|
|
214
214
|
return { status: 503, message: 'Error connecting to Redis' };
|
|
215
215
|
}
|
|
216
216
|
}, { promotionTimeout: 60000 });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exframe-cache-manager",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Managing the cache",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"config": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"pretest": "npm-install-peers && npm run lint",
|
|
14
|
-
"lint": "eslint
|
|
14
|
+
"lint": "eslint .",
|
|
15
15
|
"peers": "npm-install-peers",
|
|
16
16
|
"test": "docker-compose -f docker-compose.yml up --build --abort-on-container-exit --exit-code-from exframe-cache-manager",
|
|
17
17
|
"unit-test": "./node_modules/.bin/nyc -r lcov --report-dir ./documentation/coverage -t ./documentation/coverage mocha --exit --reporter $npm_package_config_reporter \"./test/**/*.test.js\""
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"exframe-utilities": "^1.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"chai": "
|
|
34
|
+
"chai": "^4",
|
|
35
35
|
"eslint": "*",
|
|
36
36
|
"eslint-config-exzeo": "*",
|
|
37
37
|
"eslint-plugin-import": "*",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"url": "https://bitbucket.org/exzeo-usa/exframe",
|
|
47
47
|
"directory": "packages/exframe-cache-manager"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "8e1447625c9410c013a91372178dd8d0501776a1"
|
|
50
50
|
}
|
|
@@ -90,11 +90,11 @@ context('Test User Profile Middleware', () => {
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
it('validate the getItem function, including optional context and timeout delay value', async () => {
|
|
93
|
-
const fake = async function (
|
|
94
|
-
await waitTimeout(5000)
|
|
93
|
+
const fake = async function () {
|
|
94
|
+
await waitTimeout(5000);
|
|
95
95
|
return 'finished';
|
|
96
|
-
}
|
|
97
|
-
const stub = sinon.stub(app.redisCache,
|
|
96
|
+
};
|
|
97
|
+
const stub = sinon.stub(app.redisCache, 'get').callsFake(fake);
|
|
98
98
|
|
|
99
99
|
await app.setItem(cacheKey, 'someValue');
|
|
100
100
|
const context = { log: { info: (info) => { console.log(info); } } };
|
package/.eslintignore
DELETED
package/.eslintrc.json
DELETED
package/test/.eslintrc.json
DELETED