diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..1a9eb6fd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +version: 2 +updates: + - package-ecosystem: "npm" + target-branch: "staging" + directory: "/" + schedule: + interval: "weekly" + day: "thursday" + time: "00:00" + timezone: "Etc/UTC" + commit-message: + prefix: "[npm] " + labels: + - "npm" + - "dependencies" diff --git a/package.json b/package.json index 62f9603e..476f7aa4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bfx-report", - "version": "4.10.5", + "version": "4.10.6", "description": "Reporting tool", "main": "worker.js", "license": "Apache-2.0", @@ -29,7 +29,7 @@ "lru": "3.1.0", "moment": "2.29.4", "moment-timezone": "0.5.39", - "pug": "3.0.2", + "pug": "3.0.3", "reflect-metadata": "0.1.13", "triple-beam": "1.3.0", "uuid": "9.0.0", diff --git a/workers/loc.api/queue/write-data-to-stream/helpers.js b/workers/loc.api/queue/write-data-to-stream/helpers.js index 431b3cf3..26fdb643 100644 --- a/workers/loc.api/queue/write-data-to-stream/helpers.js +++ b/workers/loc.api/queue/write-data-to-stream/helpers.js @@ -80,6 +80,22 @@ const _formatters = { } return msg + }, + lowerCaseWithUpperFirst: (str) => { + if ( + !str || + typeof str !== 'string' || + str.length < 2 + ) { + return str + } + + const lower = str.toLowerCase() + const normalized = lower.replace(/_/g, ' ') + const head = normalized[0].toUpperCase() + const tail = normalized.slice(1) + + return `${head}${tail}` } }