mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
Dependencies cleanup (#1736)
* Remove unused electron-builder-squirrel-windows * filesize upgrade
This commit is contained in:
parent
6130805e32
commit
6f9239e577
1041
package-lock.json
generated
1041
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -176,7 +176,6 @@
|
||||
"del": "3.0.0",
|
||||
"electron": "^23.1.0",
|
||||
"electron-builder": "24.0.0",
|
||||
"electron-builder-squirrel-windows": "20.44.0",
|
||||
"electron-icon-maker": "0.0.5",
|
||||
"electron-osx-sign": "^0.6.0",
|
||||
"enzyme": "^3.11.0",
|
||||
@ -216,7 +215,7 @@
|
||||
"electron-fetch": "1.9.1",
|
||||
"electron-log": "4.4.8",
|
||||
"electron-updater": "^5.0.1",
|
||||
"filesize": "6.4.0",
|
||||
"filesize": "^10.0.6",
|
||||
"lazy-brush": "^1.0.1",
|
||||
"react": "16.14.0",
|
||||
"react-dom": "16.14.0",
|
||||
@ -246,4 +245,4 @@
|
||||
"pre-commit": "pretty-quick --staged && npm run lint"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ import {
|
||||
} from 'electron';
|
||||
import electron = require('electron');
|
||||
import fetch from 'electron-fetch';
|
||||
import * as filesize from 'filesize';
|
||||
import { filesize } from 'filesize';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { format, parse } from 'url';
|
||||
@ -607,10 +607,13 @@ export const handleDownloadManager = (
|
||||
item.once('done', (_e, state) => {
|
||||
if (state === 'completed') {
|
||||
const savePathSplit = item.getSavePath()?.split(path.sep);
|
||||
const downloadedItemTotalBytes: number = item.getTotalBytes() || 0;
|
||||
const data: IDownloadItem = {
|
||||
_id: getGuid(),
|
||||
savedPath: item.getSavePath() || '',
|
||||
total: filesize(item.getTotalBytes() || 0),
|
||||
total: filesize(downloadedItemTotalBytes, {
|
||||
output: 'string',
|
||||
}) as string,
|
||||
fileName: savePathSplit[savePathSplit.length - 1] || 'No name',
|
||||
};
|
||||
logger.info(
|
||||
|
Loading…
Reference in New Issue
Block a user