@ekingdom/express-utils
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -26,2 +26,2 @@ const redis = require('redis') | ||
module.exports = { getRedlock } | ||
module.exports = { getRedlock, getRedisClient } |
@@ -7,3 +7,3 @@ const HttpStatus = require('http-status-codes') | ||
const REQUEST_LOCK_TIMEOUT = parseInt(get(process.env, 'REQUEST_LOCK_TIMEOUT', 0), 10) | ||
const REQUEST_LOCK_TIMEOUT = parseInt(get(process.env, 'REQUEST_LOCK_TIMEOUT', 10 * 1000), 10) | ||
const { getRedlock } = require('./getRedlock') | ||
@@ -29,7 +29,7 @@ | ||
toJSON() { | ||
toJSON() { | ||
return { | ||
code: HttpStatus.TOO_MANY_REQUESTS, | ||
...pick(this, ['message', 'retryAfter', 'statusCode']), | ||
} | ||
} | ||
} | ||
@@ -36,0 +36,0 @@ } |
{ | ||
"name": "@ekingdom/express-utils", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Common utils for Express.js", | ||
@@ -26,3 +26,5 @@ "keywords": [ | ||
"scripts": { | ||
"test": "echo \"Error: run tests from root\" && exit 1" | ||
"test": "jest", | ||
"cov": "jest --coverage", | ||
"watch": "jest --watchAll" | ||
}, | ||
@@ -32,2 +34,5 @@ "bugs": { | ||
}, | ||
"jest": { | ||
"testEnvironment": "node" | ||
}, | ||
"dependencies": { | ||
@@ -39,3 +44,8 @@ "assert-plus": "^1.0.0", | ||
"redlock": "^3.1.2" | ||
}, | ||
"devDependencies": { | ||
"body-parser": "^1.18.3", | ||
"jest": "^23.6.0", | ||
"supertest": "^3.3.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4982
117
3
2