1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00

Electron: Removed unused package dependencies

This commit is contained in:
Michael Hollister 2025-06-13 11:50:24 -05:00
parent 2fbfac0a04
commit e7168b0a74
4 changed files with 15 additions and 26 deletions

View file

@ -12,7 +12,7 @@ export class DiscoveryService {
return;
}
const name = `FCast-${getComputerName()}`;
const name = getComputerName();
logger.info(`Discovery service started: ${name}`);
// Note that txt field must be populated, otherwise certain mdns stacks have undefined behavior/issues

View file

@ -15,8 +15,6 @@
"extract-zip": "^2.0.1",
"follow-redirects": "^1.15.9",
"hls.js": "^1.5.15",
"http": "^0.0.1-security",
"https": "^1.0.0",
"log4js": "^6.9.1",
"memfs": "^4.17.2",
"qrcode": "^1.5.3",
@ -6761,11 +6759,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/http": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/http/-/http-0.0.1-security.tgz",
"integrity": "sha512-RnDvP10Ty9FxqOtPZuxtebw1j4L/WiqNMDtuc1YMH1XQm5TgDRaR1G9u8upL6KD1bXHSp9eSXo/ED+8Q7FAr+g=="
},
"node_modules/http-cache-semantics": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
@ -6802,12 +6795,6 @@
"node": ">=10.19.0"
}
},
"node_modules/https": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz",
"integrity": "sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==",
"license": "ISC"
},
"node_modules/https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",

View file

@ -52,8 +52,6 @@
"extract-zip": "^2.0.1",
"follow-redirects": "^1.15.9",
"hls.js": "^1.5.15",
"http": "^0.0.1-security",
"https": "^1.0.0",
"log4js": "^6.9.1",
"memfs": "^4.17.2",
"qrcode": "^1.5.3",

View file

@ -448,9 +448,9 @@ export class Main {
'boolean-negation': false
})
.options({
'no-main-window': { type: 'boolean', default: false, desc: "Start minimized to tray" },
'fullscreen': { type: 'boolean', default: false, desc: "Start application in fullscreen" },
'log': { chocies: ['ALL', 'TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL', 'MARK', 'OFF'], alias: 'loglevel', default: 'INFO', desc: "Defines the verbosity level of the logger" },
'no-main-window': { type: 'boolean', desc: "Start minimized to tray" },
'fullscreen': { type: 'boolean', desc: "Start application in fullscreen" },
'log': { chocies: ['ALL', 'TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL', 'MARK', 'OFF'], alias: 'loglevel', desc: "Defines the verbosity level of the logger" },
})
.parseSync();
@ -463,7 +463,7 @@ export class Main {
log: { type: fileLogType, filename: path.join(app.getPath('logs'), 'fcast-receiver.log'), flags: 'a', maxLogSize: '5M' },
},
categories: {
default: { appenders: ['out', 'log'], level: argv.log },
default: { appenders: ['out', 'log'], level: argv.log === undefined ? Settings.json.log.level : argv.log },
},
});
logger = new Logger('Main', LoggerType.BACKEND);
@ -479,8 +479,8 @@ export class Main {
await Updater.processUpdate();
}
Main.startFullscreen = argv.fullscreen;
Main.shouldOpenMainWindow = !argv.noMainWindow;
Main.startFullscreen = argv.fullscreen === undefined ? Settings.json.ui.fullscreen : argv.fullscreen;
Main.shouldOpenMainWindow = argv.noMainWindow === undefined ? !Settings.json.ui.noMainWindow : !argv.noMainWindow;
const lock = Main.application.requestSingleInstanceLock()
if (!lock) {
@ -519,11 +519,15 @@ export function toast(message: string, icon: ToastIcon = ToastIcon.INFO, duratio
}
export function getComputerName() {
if (Settings.json.network.deviceName !== '') {
return Settings.json.network.deviceName;
}
switch (process.platform) {
case "win32":
return process.env.COMPUTERNAME;
return `FCast-${process.env.COMPUTERNAME}`;
case "darwin":
return cp.execSync("scutil --get ComputerName").toString().trim();
return `FCast-${cp.execSync("scutil --get ComputerName").toString().trim()}`;
case "linux": {
let hostname: string;
@ -546,11 +550,11 @@ export function getComputerName() {
}
}
return hostname;
return `FCast-${hostname}`;
}
default:
return os.hostname();
return `FCast-${os.hostname()}`;
}
}