refactor: minor refactor

This commit is contained in:
Fabio286 2023-11-27 18:35:56 +01:00
parent 38b32bfb28
commit 879de91516
3 changed files with 7 additions and 5 deletions

View File

@ -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 workers from 'common/interfaces/workers';
import { dialog, ipcMain } from 'electron';
@ -8,10 +8,10 @@ import * as path from 'path';
import { validateSender } from '../libs/misc/validateSender';
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}) => {
let exporter: ChildProcessWithoutNullStreams = null;
let exporter: ChildProcess = null;
let importer: ChildProcess = null;
ipcMain.handle('create-schema', async (event, params) => {

View File

@ -43,7 +43,8 @@ module.exports = { // Main
new ProgressPlugin(true),
new webpack.DefinePlugin({
'process.env': {
PACKAGE_VERSION: `"${version}"`
PACKAGE_VERSION: `"${version}"`,
DISTRIBUTION: `"${process.env.DISTRIBUTION || 'none'}"`
}
})
],

View File

@ -62,7 +62,8 @@ const config = {
new ProgressPlugin(true),
new webpack.DefinePlugin({
'process.env': {
PACKAGE_VERSION: `"${version}"`
PACKAGE_VERSION: `"${version}"`,
DISTRIBUTION: `"${process.env.DISTRIBUTION || 'none'}"`
}
})
]