mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-06 05:32:06 +00:00
prettier fix
This commit is contained in:
@@ -60,7 +60,9 @@ export function parseEnvIntInRange(name: string, fallback: number, min: number,
|
||||
|
||||
const parsedValue = Number.parseInt(rawValue, 10);
|
||||
if (!Number.isFinite(parsedValue) || parsedValue < min || parsedValue > max) {
|
||||
throw new Error(`The ${name} variable must be an integer between ${min} and ${max}. Received value: '${rawValue}'.`);
|
||||
throw new Error(
|
||||
`The ${name} variable must be an integer between ${min} and ${max}. Received value: '${rawValue}'.`,
|
||||
);
|
||||
}
|
||||
|
||||
return parsedValue;
|
||||
|
||||
@@ -52,7 +52,12 @@ export function createNodecgProcessManager({
|
||||
let lastStderrLine: string | null = null;
|
||||
|
||||
const startNodecgProcess = async (): Promise<ChildProcess> => {
|
||||
validateNodecgInstall(nodecgRootPath, resolvedDeps.platform, resolvedDeps.pathExists, resolvedDeps.hasReadWriteAccess);
|
||||
validateNodecgInstall(
|
||||
nodecgRootPath,
|
||||
resolvedDeps.platform,
|
||||
resolvedDeps.pathExists,
|
||||
resolvedDeps.hasReadWriteAccess,
|
||||
);
|
||||
|
||||
const portAsNumber = Number.parseInt(appConfig.nodecgPort, 10);
|
||||
const isPortAvailable = await resolvedDeps.probePortAvailable(portAsNumber);
|
||||
@@ -212,7 +217,12 @@ function validateNodecgInstall(
|
||||
): void {
|
||||
const packageJsonPath = path.join(nodecgRootPath, "package.json");
|
||||
const nodecgDependencyPath = path.join(nodecgRootPath, "node_modules", "nodecg", "package.json");
|
||||
const nodecgCliPath = path.join(nodecgRootPath, "node_modules", ".bin", platform === "win32" ? "nodecg.cmd" : "nodecg");
|
||||
const nodecgCliPath = path.join(
|
||||
nodecgRootPath,
|
||||
"node_modules",
|
||||
".bin",
|
||||
platform === "win32" ? "nodecg.cmd" : "nodecg",
|
||||
);
|
||||
const bundleAssetDirs = ["dashboard", "graphics", "extension", "extensions"].map((dir) =>
|
||||
path.join(nodecgRootPath, dir),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user