Skip to content

Commit

Permalink
Merge pull request #87 from bitfinexcom/beta
Browse files Browse the repository at this point in the history
Release v 3.4.0
  • Loading branch information
ezewer authored Jun 3, 2021
2 parents 7395c8a + 56d8b95 commit 640ea44
Show file tree
Hide file tree
Showing 48 changed files with 1,804 additions and 276 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Dockerfile.mac-builder
dist
.env.example
lastCommit.json
.vscode
3 changes: 2 additions & 1 deletion Dockerfile.linux-builder
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM electronuserland/builder

ENV NODE_VERSION 12.13.0
ENV NODE_VERSION 12.18.3

COPY ./scripts/install-nodejs.sh ./scripts/install-nodejs.sh

RUN ./scripts/install-nodejs.sh $NODE_VERSION \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
p7zip-full \
bc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.mac-builder
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM electronuserland/builder

ENV NODE_VERSION 12.13.0
ENV NODE_VERSION 12.18.3

COPY ./scripts/install-nodejs.sh ./scripts/install-nodejs.sh

RUN ./scripts/install-nodejs.sh $NODE_VERSION \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
p7zip-full \
bc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ui-builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder

ENV NODE_VERSION 12.13.0
ENV NODE_VERSION 12.18.3

COPY ./scripts/install-nodejs.sh ./scripts/install-nodejs.sh

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.win-builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM electronuserland/builder:wine

ENV NODE_VERSION 12.13.0
ENV NODE_VERSION 12.18.3

COPY ./scripts/install-nodejs.sh ./scripts/install-nodejs.sh

Expand All @@ -10,6 +10,7 @@ RUN ./scripts/install-nodejs.sh $NODE_VERSION \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
p7zip-full \
bc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion bfx-report-ui
Submodule bfx-report-ui updated 45 files
+7,006 −4,029 package-lock.json
+2 −2 package.json
+9 −2 public/locales/en-US/translations.json
+500 −0 public/locales/es-EM/translations.json
+ public/report-thumbnail-1.png
+ public/report-thumbnail-2.png
+ scripts/template/bitfinex-favicon.ico
+11 −4 scripts/template/bitfinex-logo-dark.svg
+7 −5 scripts/template/bitfinex-logo-light.svg
+75 −0 src/components/AccountSummary/AccountSummary.derivFees.js
+57 −13 src/components/AccountSummary/AccountSummary.fees.js
+5 −5 src/components/AccountSummary/AccountSummary.js
+8 −8 src/components/AccountSummary/AccountSummary.leo.js
+1 −1 src/components/AccountSummary/AccountSummary.paidFees.js
+16 −0 src/components/AccountSummary/_AccountSummary.scss
+9 −0 src/components/ConcentrationRisk/_ConcentrationRisk.scss
+1 −1 src/components/Header/TopNavigation/_TopNavigation.scss
+1 −1 src/components/Logins/Logins.props.js
+14 −0 src/components/Movements/Movements.columns.js
+3 −1 src/components/OrderTrades/OrderTrades.NoData.js
+1 −1 src/components/Orders/Orders.props.js
+3 −1 src/components/PositionsAudit/PositionsAudit.NoId.js
+5 −5 src/components/Status/Status.js
+1 −1 src/components/Status/_Status.scss
+4 −4 src/components/TaxReport/Snapshot/Snapshots.props.js
+3 −0 src/locales/i18n.js
+2 −0 src/state/movements/reducer.js
+4 −4 src/styles/button.scss
+1 −1 src/styles/index.scss
+6 −5 src/styles/themes/_dark.scss
+1 −0 src/styles/themes/_light.scss
+1 −1 src/ui/Charts/PieChart.js
+1 −1 src/ui/CollapsedTable/_CollapsedTable.scss
+1 −0 src/ui/ColumnsFilter/ColumnSelector/ColumnSelector.columns.js
+12 −3 src/ui/DateRangePicker/_DateRangePicker.scss
+1 −1 src/ui/Loading/_Loading.scss
+1 −1 src/ui/MultiSelect/_MultiSelect.scss
+1 −1 src/ui/NavMenu/NavMenu.js
+4 −1 src/ui/NavMenu/NavMenu.props.js
+1 −1 src/ui/NavMenu/_NavMenu.scss
+1 −1 src/ui/NoData/_NoData.scss
+1 −1 src/ui/Pagination/_Pagination.scss
+4 −4 src/ui/SectionHeader/SectionHeader.props.js
+1 −1 src/ui/SectionHeader/_SectionHeader.scss
+1 −1 src/ui/Select/_Select.scss
2 changes: 1 addition & 1 deletion bfx-reports-framework
Submodule bfx-reports-framework updated 54 files
+1 −1 package.json
+2 −1 test/3-api-filter-sync-mode-sqlite.spec.js
+5 −5 test/helpers/mock-data.js
+6 −3 test/test-cases/api-sync-mode-sqlite-test-cases.js
+19 −1 workers/loc.api/di/app.deps.js
+4 −1 workers/loc.api/di/types.js
+17 −0 workers/loc.api/di/utils/decorate-injectable.js
+7 −0 workers/loc.api/di/utils/index.js
+15 −1 workers/loc.api/errors/index.js
+10 −10 workers/loc.api/generate-csv/csv.job.data.js
+19 −29 workers/loc.api/service.report.framework.js
+10 −12 workers/loc.api/sync/authenticator/index.js
+11 −13 workers/loc.api/sync/balance.history/index.js
+8 −10 workers/loc.api/sync/colls.accessors/public.colls.conf.accessors.js
+6 −9 workers/loc.api/sync/crypto/index.js
+11 −13 workers/loc.api/sync/currency.converter/index.js
+10 −12 workers/loc.api/sync/dao/dao.better.sqlite.js
+3 −6 workers/loc.api/sync/dao/dao.js
+3 −6 workers/loc.api/sync/dao/db-migrations/db.migrator.js
+74 −0 workers/loc.api/sync/dao/db-migrations/sqlite-migrations/migration.v23.js
+9 −13 workers/loc.api/sync/dao/db-migrations/sqlite.db.migrator.js
+8 −1 workers/loc.api/sync/dao/helpers/find-in-coll-by/get-filter-params.js
+13 −0 workers/loc.api/sync/data.consistency.checker/checker.names.js
+167 −0 workers/loc.api/sync/data.consistency.checker/checkers.js
+46 −0 workers/loc.api/sync/data.consistency.checker/index.js
+6 −9 workers/loc.api/sync/data.inserter/api.middleware/api.middleware.handler.after.js
+6 −9 workers/loc.api/sync/data.inserter/api.middleware/index.js
+75 −27 workers/loc.api/sync/data.inserter/data.checker/index.js
+23 −13 workers/loc.api/sync/data.inserter/hooks/convert.currency.hook.js
+3 −6 workers/loc.api/sync/data.inserter/hooks/data.inserter.hook.js
+7 −10 workers/loc.api/sync/data.inserter/hooks/recalc.sub.account.ledgers.balances.hook.js
+96 −22 workers/loc.api/sync/data.inserter/index.js
+5 −9 workers/loc.api/sync/fees.report/index.js
+6 −10 workers/loc.api/sync/full.snapshot.report/index.js
+10 −13 workers/loc.api/sync/full.tax.report/index.js
+11 −14 workers/loc.api/sync/index.js
+9 −13 workers/loc.api/sync/order.trades/index.js
+16 −15 workers/loc.api/sync/performing.loan/index.js
+7 −11 workers/loc.api/sync/positions.audit/index.js
+11 −14 workers/loc.api/sync/positions.snapshot/index.js
+9 −11 workers/loc.api/sync/progress/index.js
+2 −1 workers/loc.api/sync/schema/models.js
+1 −0 workers/loc.api/sync/schema/sync-schema.js
+3 −5 workers/loc.api/sync/sub.account.api.data/index.js
+9 −11 workers/loc.api/sync/sub.account/index.js
+123 −12 workers/loc.api/sync/sync.colls.manager/index.js
+3 −6 workers/loc.api/sync/sync.interrupter/index.js
+12 −14 workers/loc.api/sync/sync.queue/index.js
+5 −9 workers/loc.api/sync/traded.volume/index.js
+12 −14 workers/loc.api/sync/trades/index.js
+10 −14 workers/loc.api/sync/wallets/index.js
+14 −16 workers/loc.api/sync/win.loss/index.js
+20 −15 workers/loc.api/ws-transport/index.js
+6 −10 workers/loc.api/ws-transport/ws.event.emitter.js
Binary file modified build/better-sqlite3-prebuild-bin-win/better_sqlite3.zip
Binary file not shown.
26 changes: 26 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.executable</key>
<true/>
<key>com.apple.security.device.audio-video-bridging</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
28 changes: 28 additions & 0 deletions build/entitlements.mas.inherit.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.executable</key>
<true/>
<key>com.apple.security.device.audio-video-bridging</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
Binary file added build/icon.icns
Binary file not shown.
Binary file modified build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/24x24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/installer.nsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
!macro customInit
nsExec::Exec '"$LOCALAPPDATA\bfx-report-electron\Update.exe" --uninstall -s'
!macroend
2 changes: 1 addition & 1 deletion build/linux-launcher/launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ appFilePath="$ROOT/app"
logFilePath="$ROOT/error.log"

output=$("$appFilePath" 2>&1)
mess=$(echo "$output" | grep -v WARNING)
mess=$(echo "$output" | grep -v WARNING | grep -v electron\/issues\/23506 | grep -v Cannot\ download\ differentially)

if [ "$mess" != "" ]; then
echo $mess>>"$logFilePath"
Expand Down
Binary file modified build/loader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ const shouldQuit = makeSingleInstance()
if (shouldQuit) {
app.quit()
} else {
initializeApp()
.catch((err) => {
;(async () => {
try {
await initializeApp()
} catch (err) {
console.error(err)
})
}
})()
}
70 changes: 59 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-report-electron",
"version": "3.3.1",
"version": "3.4.0",
"repository": "https://github.com/bitfinexcom/bfx-report-electron",
"description": "Reporting tool",
"author": "bitfinex.com",
Expand All @@ -14,15 +14,21 @@
"cron-validate": "^1.4.2",
"ed25519-supercop": "^2.0.1",
"electron-alert": "^0.1.11",
"electron-log": "^4.3.2",
"electron-root-path": "^1.0.16",
"electron-serve": "^1.0.0",
"electron-updater": "^4.3.8",
"extract-zip": "^2.0.1",
"find-free-port": "^2.0.0",
"grenache-grape": "^0.9.8",
"lodash": "^4.17.15",
"yauzl": "^2.10.0"
},
"devDependencies": {
"electron": "8.5.5",
"electron-builder": "22.9.1",
"app-builder-bin": "^3.5.13",
"electron": "11.4.5",
"electron-builder": "22.11.1",
"js-yaml": "^4.0.0",
"node-gyp": "7.1.2",
"node-pre-gyp": "^0.11.0",
"standard": "^14.3.1"
Expand All @@ -47,12 +53,20 @@
"test": "standard"
},
"build": {
"publish": {
"provider": "github",
"repo": "bfx-report-electron",
"owner": "bitfinexcom",
"channel": "latest",
"useMultipleRangeRequest": false,
"updaterCacheDirName": "bfx-report-electron-updater"
},
"npmRebuild": false,
"extends": null,
"asar": false,
"productName": "Bitfinex Report",
"artifactName": "${productName}-${version}-${arch}-${os}.${ext}",
"appId": "com.report.bitfinex",
"artifactName": "BitfinexReport-${version}-x64-${os}.${ext}",
"appId": "com.bitfinex.report",
"files": [
"**/*",
"build/icons",
Expand Down Expand Up @@ -137,6 +151,32 @@
"!**/test"
]
},
{
"from": "bfx-reports-framework/node_modules/request/node_modules",
"to": "bfx-reports-framework/node_modules/request/node_modules",
"filter": [
"**/*",
"!.bin",
"!**/node_modules/.bin",
"!**/*.md",
"!**/LICENSE",
"!**/CHANGELOG",
"!**/test"
]
},
{
"from": "bfx-reports-framework/node_modules/lokue/node_modules",
"to": "bfx-reports-framework/node_modules/lokue/node_modules",
"filter": [
"**/*",
"!.bin",
"!**/node_modules/.bin",
"!**/*.md",
"!**/LICENSE",
"!**/CHANGELOG",
"!**/test"
]
},
{
"from": "bfx-report-ui/bfx-report-express/node_modules",
"to": "bfx-report-ui/bfx-report-express/node_modules",
Expand All @@ -153,24 +193,32 @@
],
"linux": {
"executableName": "app",
"description": "Reporting tool",
"description": "Bitfinex Report",
"maintainer": "<bitfinex.com>",
"category": "Network",
"target": [
"dir"
"dir",
"AppImage"
]
},
"win": {
"target": [
"dir"
"dir",
"nsis"
],
"publisherName": "Reporting tool"
"publisherName": "Bitfinex Report",
"verifyUpdateCodeSignature": false
},
"mac": {
"type": "development",
"hardenedRuntime": true,
"category": "public.app-category.productivity",
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist",
"category": "public.app-category.finance",
"target": [
"dir"
"dir",
"zip"
]
}
}
Expand Down
2 changes: 2 additions & 0 deletions scripts/build-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export CI_ENVIRONMENT_NAME=production
ROOT="$PWD"
frontendFolder="$ROOT/bfx-report-ui"
pathToTriggerElectronLoad="$frontendFolder/src/utils/triggerElectronLoad.js"
pathToFonts="$frontendFolder/src/styles/fonts"
uiBuildFolder=/ui-build
uiReadyFile="$uiBuildFolder/READY"
branch=master
Expand Down Expand Up @@ -99,4 +100,5 @@ fi

mv -f $frontendFolder/build/* $uiBuildFolder
cp $pathToTriggerElectronLoad $uiBuildFolder/triggerElectronLoad.js
cp -avrf $pathToFonts $uiBuildFolder
touch $uiReadyFile
56 changes: 56 additions & 0 deletions scripts/generate-zipand-blockmap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env node

'use strict'

const path = require('path')
const {
execSync
} = require('child_process')
const fs = require('fs')
const yaml = require('js-yaml')
const {
appBuilderPath
} = require('app-builder-bin')

const cwd = process.cwd()
const packageJsonPath = path.join(cwd, 'package.json')

const {
version: APP_VERSION,
build: { productName }
} = require(packageJsonPath)

const ARCH = 'x64'
const APP_NAME = productName.replace(/\s/g, '')
const APP_DIST_PATH = path.join(cwd, 'dist')
const appReleaseFileName = `${APP_NAME}-${APP_VERSION}-${ARCH}-mac.zip`
const APP_GENERATED_BINARY_PATH = path.join(
APP_DIST_PATH,
appReleaseFileName
)
const ymlPath = path.join(APP_DIST_PATH, 'latest-mac.yml')

try {
const output = execSync(`${appBuilderPath} blockmap --input=${APP_GENERATED_BINARY_PATH} --output=${APP_GENERATED_BINARY_PATH}.blockmap --compression=gzip`)
const { sha512, size } = JSON.parse(output)
const ymlData = yaml.load(fs.readFileSync(ymlPath, 'utf8'))

console.log(ymlData)

ymlData.version = APP_VERSION
ymlData.path = appReleaseFileName
ymlData.sha512 = sha512
ymlData.releaseDate = new Date().toISOString()
ymlData.files[0].url = appReleaseFileName
ymlData.files[0].sha512 = sha512
ymlData.files[0].size = size

const yamlStr = yaml.dump(ymlData)

console.log(yamlStr)

fs.writeFileSync(ymlPath, yamlStr, 'utf8')
console.log('Successfully updated YAML file and configurations with blockmap')
} catch (e) {
console.log('Error in updating YAML file and configurations with blockmap', e)
}
Loading

0 comments on commit 640ea44

Please sign in to comment.