@cubejs-backend/shared
Advanced tools
Comparing version 0.29.12 to 0.29.15
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.29.15](https://github.com/cube-js/cube.js/compare/v0.29.14...v0.29.15) (2021-12-30) | ||
### Features | ||
* Introduce single unified CUBEJS_DB_QUERY_TIMEOUT env variable to set all various variables that control database query timeouts ([#3864](https://github.com/cube-js/cube.js/issues/3864)) ([33c6292](https://github.com/cube-js/cube.js/commit/33c6292059e65e293a7e3d61e1f1e0c1413eeece)) | ||
## [0.29.12](https://github.com/cube-js/cube.js/compare/v0.29.11...v0.29.12) (2021-12-29) | ||
@@ -8,0 +19,0 @@ |
@@ -13,3 +13,3 @@ "use strict"; | ||
exports.InvalidConfiguration = InvalidConfiguration; | ||
function convertTimeStrToMs(input, envName, description = 'Must be number (in seconds) or string in time format (1s, 1m, 1h).') { | ||
function convertTimeStrToMs(input, envName, description = 'Must be a number in seconds or duration string (1s, 1m, 1h).') { | ||
if (/^\d+$/.test(input)) { | ||
@@ -109,5 +109,14 @@ return parseInt(input, 10); | ||
dbPollTimeout: () => { | ||
const value = process.env.CUBEJS_DB_POLL_TIMEOUT || '15m'; | ||
return convertTimeStrToMs(value, 'CUBEJS_DB_POLL_TIMEOUT'); | ||
const value = process.env.CUBEJS_DB_POLL_TIMEOUT; | ||
if (value) { | ||
return convertTimeStrToMs(value, 'CUBEJS_DB_POLL_TIMEOUT'); | ||
} | ||
else { | ||
return null; | ||
} | ||
}, | ||
dbQueryTimeout: () => { | ||
const value = process.env.CUBEJS_DB_QUERY_TIMEOUT || '10m'; | ||
return convertTimeStrToMs(value, 'CUBEJS_DB_QUERY_TIMEOUT'); | ||
}, | ||
dbPollMaxInterval: () => { | ||
@@ -114,0 +123,0 @@ const value = process.env.CUBEJS_DB_POLL_MAX_INTERVAL || '5s'; |
{ | ||
"name": "@cubejs-backend/shared", | ||
"version": "0.29.12", | ||
"version": "0.29.15", | ||
"description": "Shared code for Cube.js backend packages", | ||
@@ -68,3 +68,3 @@ "main": "dist/src/index.js", | ||
}, | ||
"gitHead": "4b7c9154c9533a7a4ae17164742060a34a040515" | ||
"gitHead": "e16fd68d785eff5bcf6e0846fabcb7b47b7a6f3b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
141825
1450
23