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 #358

Merged
merged 9 commits into from
Mar 20, 2024
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: npm i
- name: Run tests
run: npm test -- --reporter=json --reporter-option output=test-report.json
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,22 @@ jobs:
name: Web Page Report
runs-on: ubuntu-22.04
steps:
- uses: dorny/test-reporter@v1
- name: Download test results
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
name: test-results
path: test-results
- uses: dorny/test-reporter@v1.8.0
id: test-results
with:
artifact: test-results
name: Mocha Tests
path: test-report.json
path: test-results/test-report.json
reporter: mocha-json
# Workaround for error 'fatal: not a git repository' caused by a call to 'git ls-files'
# See: https://github.com/dorny/test-reporter/issues/169#issuecomment-1583560458
max-annotations: 0
- name: Test Report Summary
run: |
echo "### Test Report page is ready! :rocket:" >> $GITHUB_STEP_SUMMARY
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-report",
"version": "4.9.0",
"version": "4.10.0",
"description": "Reporting tool",
"main": "worker.js",
"license": "Apache-2.0",
Expand Down
8 changes: 8 additions & 0 deletions workers/api.service.report.wrk.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ const TYPES = require('./loc.api/di/types')
const {
setLoggerDeps
} = require('./loc.api/logger/logger-deps')
const {
PDFBufferUnderElectronCreationError
} = require('./loc.api/errors')

class WrkReportServiceApi extends WrkApi {
constructor (conf, ctx) {
Expand Down Expand Up @@ -209,6 +212,11 @@ class WrkReportServiceApi extends WrkApi {
aggregatorQueue.on('job', aggregator)

processorQueue.on('error:base', (err) => {
// This error is intercepted and processed in the framework mode
if (err instanceof PDFBufferUnderElectronCreationError) {
return
}

this.logger.error(`PROCESSOR:QUEUE: ${err.stack || err}`)
})
aggregatorQueue.on('error:base', (err) => {
Expand Down
14 changes: 13 additions & 1 deletion workers/loc.api/errors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,17 @@ class WeightedAveragesTimeframeError extends UnprocessableEntityError {
}
}

class PDFBufferUnderElectronCreationError extends BaseError {
constructor (electronErrStr) {
const _args = getErrorArgs(
{ data: { electronErrStr } },
'ERR_PDF_BUFFER_UNDER_ELECTRON_HAS_NOT_BEEN_CREATED'
)

super(_args)
}
}

module.exports = {
BaseError,
BadRequestError,
Expand All @@ -201,5 +212,6 @@ module.exports = {
GrcSlackAvailabilityError,
GrcPDFAvailabilityError,
ImplementationError,
WeightedAveragesTimeframeError
WeightedAveragesTimeframeError,
PDFBufferUnderElectronCreationError
}
75 changes: 75 additions & 0 deletions workers/loc.api/generate-report-file/pdf-writer/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,78 @@ ru:
copyright: Авторское право © 2013-2024 iFinex Inc. Все права защищены.
page: Стр.
from: из

zh-CN:
template:
title: 报告
statementDetails: 结算明细
statementDate: 结算日期
snapshotAt: 快照时间
period: 期间
username: 用户名
email: 电子邮箱
errorMessage: 无法建立档案,请重试
reportGenAt: 报告创建时间
copyright: Copyright © 2013-2024 iFinex Inc. All rights reserved.
page: 页数
from: 从

zh-TW:
template:
title: 報告
statementDetails: 結算明細
statementDate: 結算日期
snapshotAt: 快照時間:
period: 期間
username: 用戶名
email: 電子郵箱
errorMessage: 無法建立檔案,請重試
reportGenAt: 報告建立時間:
copyright: Copyright © 2013-2024 iFinex Inc. All rights reserved.
page: 頁數
from: 從

es-EM:
template:
title: Reporte
statementDetails: Detalles del Estado
statementDate: Fecha del Estado
snapshotAt: Captura al
period: Periodo
username: Nombre de Usuario
email: Correo
errorMessage: Tu archivo no pudo ser completado, por favor inténtalo de nuevo
reportGenAt: Reporte generado al
copyright: Copyright © 2013-2024 iFinex Inc. Todos los derechos reservados.
page: Página
from: de

tr:
template:
title: Rapor
statementDetails: Beyanname Detayları
statementDate: Beyanname Tarihi
snapshotAt: 'Anlık Görüntü:'
period: Dönem
username: Kullanıcı Adı
email: Email
errorMessage: Dosyanız tamamlanamadı, lütfen tekrar deneyin
reportGenAt: 'Rapor şu tarihte oluşturuldu:'
copyright: Telif Hakkı © 2013-2024 iFinex Inc. Tüm hakları saklıdır.
page: Sayfa
from: İtibaren

pt-BR:
template:
title: Informes
statementDetails: Detalhes da declaração
statementDate: Data da declaração
snapshotAt: Captura de
period: Período
username: Nome de Usuário
email: e-mail
errorMessage: Seu arquivo não pode ser completado, por favor tente novamente
reportGenAt: 'Informe gerado em '
copyright: Copyright © 2013-2024 iFinex Inc. Todos os direitos reservados.
page: Página
from: de
Loading