Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version to master #342

Merged
merged 7 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-report",
"version": "4.8.0",
"version": "4.8.1",
"description": "Reporting tool",
"main": "worker.js",
"license": "Apache-2.0",
Expand All @@ -26,7 +26,6 @@
"inversify": "6.0.1",
"js-yaml": "4.1.0",
"lib-js-util-base": "git+https://github.com/bitfinexcom/lib-js-util-base.git",
"lodash": "4.17.21",
"lru": "3.1.0",
"moment": "2.29.4",
"moment-timezone": "0.5.39",
Expand Down
10 changes: 3 additions & 7 deletions workers/loc.api/generate-csv/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
'use strict'

const {
upperFirst,
lowerFirst
} = require('lodash')

const {
checkFilterParams,
FILTER_MODELS_NAMES,
Expand Down Expand Up @@ -58,7 +53,8 @@ const _getCsvStoreStatus = async ({

const _filterModelNameMap = Object.values(FILTER_MODELS_NAMES)
.reduce((map, name) => {
const key = `get${upperFirst(name)}CsvJobData`
const baseName = `${name[0].toUpperCase()}${name.slice(1)}`
const key = `get${baseName}CsvJobData`

map.set(key, name)

Expand All @@ -74,7 +70,7 @@ const _truncateCsvNameEnding = (name) => {
.replace(/^get/i, '')
.replace(/csv$/i, '')

return lowerFirst(cleanedName)
return `${cleanedName[0].toLowerCase()}${cleanedName.slice(1)}`
}

const _getFilterModelNamesAndArgs = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { isEmpty } = require('lodash')
const { isEmpty } = require('lib-js-util-base')

const {
LedgerPaymentFilteringParamsError
Expand Down
12 changes: 8 additions & 4 deletions workers/loc.api/queue/helpers/get-complete-file-name.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict'

const { snakeCase } = require('lodash')
const { v4: uuidv4 } = require('uuid')

const _fileNamesMap = new Map([
Expand Down Expand Up @@ -67,10 +66,15 @@ const _getBaseName = (
if (isMultiExport) {
return 'multiple-exports'
}
if (namesMap.has(queueName)) {
return namesMap.get(queueName)
}

return namesMap.has(queueName)
? namesMap.get(queueName)
: snakeCase(queueName.replace(/^get/, ''))
return queueName
.replace(/^get/, '')
.replace(/[A-Z]/g, (match, offset) => (
`${offset > 0 ? '_' : ''}${match.toLowerCase()}`
))
}

const _getDateString = mc => {
Expand Down