mirror of https://github.com/Fabio286/antares.git
refactor: minor refactor
This commit is contained in:
parent
38b32bfb28
commit
879de91516
|
@ -1,4 +1,4 @@
|
||||||
import { ChildProcess, ChildProcessWithoutNullStreams, fork } from 'child_process';
|
import { ChildProcess, fork } from 'child_process';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as workers from 'common/interfaces/workers';
|
import * as workers from 'common/interfaces/workers';
|
||||||
import { dialog, ipcMain } from 'electron';
|
import { dialog, ipcMain } from 'electron';
|
||||||
|
@ -8,10 +8,10 @@ import * as path from 'path';
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
const isDevelopment = process.env.NODE_ENV !== 'production';
|
const isDevelopment = process.env.NODE_ENV !== 'production';
|
||||||
const isFlatpak = process.platform === 'linux' && process.env.FLATPAK_ID;
|
const isFlatpak = process.platform === 'linux' && process.env.DISTRIBUTION === 'flatpak';
|
||||||
|
|
||||||
export default (connections: {[key: string]: antares.Client}) => {
|
export default (connections: {[key: string]: antares.Client}) => {
|
||||||
let exporter: ChildProcessWithoutNullStreams = null;
|
let exporter: ChildProcess = null;
|
||||||
let importer: ChildProcess = null;
|
let importer: ChildProcess = null;
|
||||||
|
|
||||||
ipcMain.handle('create-schema', async (event, params) => {
|
ipcMain.handle('create-schema', async (event, params) => {
|
||||||
|
|
|
@ -43,7 +43,8 @@ module.exports = { // Main
|
||||||
new ProgressPlugin(true),
|
new ProgressPlugin(true),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env': {
|
||||||
PACKAGE_VERSION: `"${version}"`
|
PACKAGE_VERSION: `"${version}"`,
|
||||||
|
DISTRIBUTION: `"${process.env.DISTRIBUTION || 'none'}"`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
|
|
|
@ -62,7 +62,8 @@ const config = {
|
||||||
new ProgressPlugin(true),
|
new ProgressPlugin(true),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env': {
|
||||||
PACKAGE_VERSION: `"${version}"`
|
PACKAGE_VERSION: `"${version}"`,
|
||||||
|
DISTRIBUTION: `"${process.env.DISTRIBUTION || 'none'}"`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue