mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 17:31:36 -06:00
ELECTRON-1482 - Update dependencies (#768)
This commit is contained in:
parent
36bc8cfc99
commit
ecd5253337
11
package.json
11
package.json
@ -114,19 +114,18 @@
|
||||
"typescript": "3.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"archiver": "3.0.0",
|
||||
"archiver": "3.1.1",
|
||||
"async.map": "0.5.2",
|
||||
"auto-launch": "5.0.5",
|
||||
"classnames": "2.2.6",
|
||||
"electron-dl": "1.14.0",
|
||||
"electron-fetch": "1.3.0",
|
||||
"electron-log": "2.2.17",
|
||||
"electron-log": "3.0.7",
|
||||
"electron-spellchecker": "git+https://github.com/symphonyoss/electron-spellchecker.git#v2.0.1",
|
||||
"ffi-napi": "2.4.5",
|
||||
"filesize": "3.6.1",
|
||||
"lodash.isequal": "4.5.0",
|
||||
"react": "16.6.3",
|
||||
"react-dom": "16.6.0",
|
||||
"filesize": "4.1.2",
|
||||
"react": "16.9.0",
|
||||
"react-dom": "16.9.0",
|
||||
"ref-napi": "1.4.1",
|
||||
"shell-path": "2.1.0"
|
||||
},
|
||||
|
@ -2,7 +2,6 @@ import { app, dialog } from 'electron';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
import { omit } from 'lodash';
|
||||
import * as util from 'util';
|
||||
import { buildNumber } from '../../package.json';
|
||||
import { isDevEnv, isMac } from '../common/env';
|
||||
@ -11,16 +10,6 @@ import { pick } from '../common/utils';
|
||||
|
||||
const writeFile = util.promisify(fs.writeFile);
|
||||
|
||||
const ignoreSettings = [
|
||||
'minimizeOnClose',
|
||||
'launchOnStartup',
|
||||
'alwaysOnTop',
|
||||
'url',
|
||||
'memoryRefresh',
|
||||
'bringToFront',
|
||||
'isCustomTitleBar',
|
||||
];
|
||||
|
||||
export interface IConfig {
|
||||
url: string;
|
||||
minimizeOnClose: boolean;
|
||||
@ -159,7 +148,15 @@ class Config {
|
||||
const execPath = path.dirname(this.appPath);
|
||||
const shouldUpdateUserConfig = execPath.indexOf('AppData\\Local\\Programs') !== -1 || isMac;
|
||||
if (shouldUpdateUserConfig) {
|
||||
const filteredFields: IConfig = omit(this.userConfig, ignoreSettings) as IConfig;
|
||||
const {
|
||||
minimizeOnClose,
|
||||
launchOnStartup,
|
||||
alwaysOnTop,
|
||||
url,
|
||||
memoryRefresh,
|
||||
bringToFront,
|
||||
isCustomTitleBar,
|
||||
...filteredFields }: IConfig = this.userConfig as IConfig;
|
||||
// update to the new build number
|
||||
filteredFields.buildNumber = buildNumber;
|
||||
logger.info(`config-handler: setting first time launch for build`, buildNumber);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { app, BrowserWindow } from 'electron';
|
||||
import electronLog, { LogLevel, transports } from 'electron-log';
|
||||
import electronLog, { ILogLevel as LogLevel, transports } from 'electron-log';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as util from 'util';
|
||||
|
@ -1,5 +1,3 @@
|
||||
import isEqual from 'lodash.isequal';
|
||||
|
||||
import { config } from '../app/config-handler';
|
||||
|
||||
const urlParts = /^(https?:\/\/)?([^/]*@)?(.+?)(:\d{2,5})?([/?].*)?$/;
|
||||
@ -99,7 +97,14 @@ export class WhitelistHandler {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
private matchDomains(parsedUrl: IURLObject, parsedWhitelist: IURLObject): boolean {
|
||||
if (isEqual(parsedUrl, parsedWhitelist)) {
|
||||
if (!parsedUrl || !parsedWhitelist) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
parsedUrl.subdomain === parsedWhitelist.subdomain
|
||||
&& parsedUrl.domain === parsedWhitelist.domain
|
||||
&& parsedUrl.tld === parsedWhitelist.tld
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user