refactor: remove loading dashboard route references from configuration and tests

This commit is contained in:
2026-06-04 14:51:21 +02:00
parent 2496f13055
commit 934500a1db
10 changed files with 1 additions and 19 deletions
-1
View File
@@ -11,7 +11,6 @@ SCOREKO_APP_ICON_PATH=static/icons/icon.ico
NODECG_BUNDLE_NAME=scoreko-dev NODECG_BUNDLE_NAME=scoreko-dev
NODECG_PORT=9090 NODECG_PORT=9090
SCOREKO_DASHBOARD_ROUTE=dashboard/scoreko-dev/main.html?standalone=true SCOREKO_DASHBOARD_ROUTE=dashboard/scoreko-dev/main.html?standalone=true
SCOREKO_LOADING_ROUTE=dashboard/loading/main.html?standalone=true
# Timing & Lifecycles (Required) # Timing & Lifecycles (Required)
ELECTRON_LOAD_DELAY_MS=10000 ELECTRON_LOAD_DELAY_MS=10000
-1
View File
@@ -59,7 +59,6 @@ The app ships with sensible defaults that match our development bundle:
- `NODECG_BUNDLE_NAME=scoreko-dev` - `NODECG_BUNDLE_NAME=scoreko-dev`
- `NODECG_PORT=9090` - `NODECG_PORT=9090`
- `SCOREKO_DASHBOARD_ROUTE=dashboard/scoreko-dev/main.html?standalone=true` - `SCOREKO_DASHBOARD_ROUTE=dashboard/scoreko-dev/main.html?standalone=true`
- `SCOREKO_LOADING_ROUTE=dashboard/loading/main.html?standalone=true`
- `SCOREKO_UPDATES_ENABLED=true` - `SCOREKO_UPDATES_ENABLED=true`
- `SCOREKO_UPDATE_ASSET_PATTERN=Scoreko-setup-.*\.exe$` - `SCOREKO_UPDATE_ASSET_PATTERN=Scoreko-setup-.*\.exe$`
+1 -3
View File
@@ -8,7 +8,6 @@ export type ApplicationPaths = {
userDataPath: string; userDataPath: string;
nodecgBaseUrl: string; nodecgBaseUrl: string;
mainDashboardUrl: string; mainDashboardUrl: string;
loadingDashboardUrl: string;
staticLoadingHtmlPath: string; staticLoadingHtmlPath: string;
staticErrorHtmlPath: string; staticErrorHtmlPath: string;
}; };
@@ -64,7 +63,7 @@ export function getApplicationPaths({
}: { }: {
appConfig: Pick< appConfig: Pick<
AppRuntimeConfig, AppRuntimeConfig,
"bundleName" | "loadingDashboardRoute" | "mainDashboardRoute" | "nodecgPort" | "userDataDirectoryName" "bundleName" | "mainDashboardRoute" | "nodecgPort" | "userDataDirectoryName"
>; >;
appDataPath: string; appDataPath: string;
compiledMainDir: string; compiledMainDir: string;
@@ -79,7 +78,6 @@ export function getApplicationPaths({
userDataPath: getUserDataPath(appDataPath, appConfig.userDataDirectoryName), userDataPath: getUserDataPath(appDataPath, appConfig.userDataDirectoryName),
nodecgBaseUrl: getNodecgBaseUrl(appConfig.nodecgPort), nodecgBaseUrl: getNodecgBaseUrl(appConfig.nodecgPort),
mainDashboardUrl: getDashboardUrl(appConfig.nodecgPort, appConfig.bundleName, appConfig.mainDashboardRoute), mainDashboardUrl: getDashboardUrl(appConfig.nodecgPort, appConfig.bundleName, appConfig.mainDashboardRoute),
loadingDashboardUrl: getDashboardUrl(appConfig.nodecgPort, appConfig.bundleName, appConfig.loadingDashboardRoute),
staticLoadingHtmlPath: path.join(rootPath, "static", "loading.html"), staticLoadingHtmlPath: path.join(rootPath, "static", "loading.html"),
staticErrorHtmlPath: path.join(rootPath, "static", "error.html"), staticErrorHtmlPath: path.join(rootPath, "static", "error.html"),
}; };
-2
View File
@@ -9,7 +9,6 @@ export type AppRuntimeConfig = {
nodecgPort: string; nodecgPort: string;
bundleName: string; bundleName: string;
mainDashboardRoute: string; mainDashboardRoute: string;
loadingDashboardRoute: string;
loadDelayMs: number; loadDelayMs: number;
startupTimeoutMs: number; startupTimeoutMs: number;
nodecgKillTimeoutMs: number; nodecgKillTimeoutMs: number;
@@ -59,7 +58,6 @@ export function getRuntimeConfig(): AppRuntimeConfig {
nodecgPort: parseRequiredEnvPort("NODECG_PORT"), nodecgPort: parseRequiredEnvPort("NODECG_PORT"),
bundleName: getRequiredEnv("NODECG_BUNDLE_NAME"), bundleName: getRequiredEnv("NODECG_BUNDLE_NAME"),
mainDashboardRoute: getRequiredEnv("SCOREKO_DASHBOARD_ROUTE"), mainDashboardRoute: getRequiredEnv("SCOREKO_DASHBOARD_ROUTE"),
loadingDashboardRoute: getRequiredEnv("SCOREKO_LOADING_ROUTE"),
loadDelayMs: parseRequiredEnvIntInRange("ELECTRON_LOAD_DELAY_MS", 0, 600000), loadDelayMs: parseRequiredEnvIntInRange("ELECTRON_LOAD_DELAY_MS", 0, 600000),
startupTimeoutMs: parseRequiredEnvIntInRange("NODECG_STARTUP_TIMEOUT_MS", 1000, 600000), startupTimeoutMs: parseRequiredEnvIntInRange("NODECG_STARTUP_TIMEOUT_MS", 1000, 600000),
nodecgKillTimeoutMs: parseRequiredEnvIntInRange("NODECG_KILL_TIMEOUT_MS", 0, 120000), nodecgKillTimeoutMs: parseRequiredEnvIntInRange("NODECG_KILL_TIMEOUT_MS", 0, 120000),
-1
View File
@@ -37,7 +37,6 @@ test("getApplicationPaths keeps packaged root under Electron resources", () => {
nodecgPort: "9090", nodecgPort: "9090",
bundleName: "scoreko-dev", bundleName: "scoreko-dev",
mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true", mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true",
loadingDashboardRoute: "dashboard/loading/main.html?standalone=true",
}, },
appDataPath: "/users/test/AppData/Roaming", appDataPath: "/users/test/AppData/Roaming",
compiledMainDir: "/app/dist/main", compiledMainDir: "/app/dist/main",
-5
View File
@@ -57,7 +57,6 @@ function getBaseConfig(): AppRuntimeConfig {
nodecgPort: "9090", nodecgPort: "9090",
bundleName: "scoreko-dev", bundleName: "scoreko-dev",
mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true", mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true",
loadingDashboardRoute: "dashboard/loading/main.html?standalone=true",
loadDelayMs: 0, loadDelayMs: 0,
startupTimeoutMs: 100, startupTimeoutMs: 100,
nodecgKillTimeoutMs: 10, nodecgKillTimeoutMs: 10,
@@ -90,7 +89,6 @@ test("ApplicationController preserves startup ordering and schedules updates aft
userDataPath: "/user-data/scoreko", userDataPath: "/user-data/scoreko",
nodecgBaseUrl: "http://127.0.0.1:9090", nodecgBaseUrl: "http://127.0.0.1:9090",
mainDashboardUrl: "http://localhost:9090/bundles/scoreko-dev/dashboard/main.html?standalone=true", mainDashboardUrl: "http://localhost:9090/bundles/scoreko-dev/dashboard/main.html?standalone=true",
loadingDashboardUrl: "http://localhost:9090/bundles/scoreko-dev/dashboard/loading/main.html?standalone=true",
staticLoadingHtmlPath: "/app/static/loading.html", staticLoadingHtmlPath: "/app/static/loading.html",
staticErrorHtmlPath: "/app/static/error.html", staticErrorHtmlPath: "/app/static/error.html",
}; };
@@ -164,7 +162,6 @@ test("ApplicationController directly launches packaged app after runtime install
userDataPath: "/user-data/scoreko", userDataPath: "/user-data/scoreko",
nodecgBaseUrl: "http://127.0.0.1:9090", nodecgBaseUrl: "http://127.0.0.1:9090",
mainDashboardUrl: "http://localhost:9090/main", mainDashboardUrl: "http://localhost:9090/main",
loadingDashboardUrl: "http://localhost:9090/loading",
staticLoadingHtmlPath: "/app/static/loading.html", staticLoadingHtmlPath: "/app/static/loading.html",
staticErrorHtmlPath: "/app/static/error.html", staticErrorHtmlPath: "/app/static/error.html",
}, },
@@ -226,7 +223,6 @@ test("ApplicationController activation before readiness routes through launch",
userDataPath: "/user-data/scoreko", userDataPath: "/user-data/scoreko",
nodecgBaseUrl: "http://127.0.0.1:9090", nodecgBaseUrl: "http://127.0.0.1:9090",
mainDashboardUrl: "http://localhost:9090/main", mainDashboardUrl: "http://localhost:9090/main",
loadingDashboardUrl: "http://localhost:9090/loading",
staticLoadingHtmlPath: "/app/static/loading.html", staticLoadingHtmlPath: "/app/static/loading.html",
staticErrorHtmlPath: "/app/static/error.html", staticErrorHtmlPath: "/app/static/error.html",
}, },
@@ -268,7 +264,6 @@ test("ApplicationController shutdown is idempotent", async () => {
userDataPath: "/user-data/scoreko", userDataPath: "/user-data/scoreko",
nodecgBaseUrl: "http://127.0.0.1:9090", nodecgBaseUrl: "http://127.0.0.1:9090",
mainDashboardUrl: "http://localhost:9090/main", mainDashboardUrl: "http://localhost:9090/main",
loadingDashboardUrl: "http://localhost:9090/loading",
staticLoadingHtmlPath: "/app/static/loading.html", staticLoadingHtmlPath: "/app/static/loading.html",
staticErrorHtmlPath: "/app/static/error.html", staticErrorHtmlPath: "/app/static/error.html",
}, },
-1
View File
@@ -13,7 +13,6 @@ function getBaseConfig(): AppRuntimeConfig {
nodecgPort: "9090", nodecgPort: "9090",
bundleName: "scoreko-dev", bundleName: "scoreko-dev",
mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true", mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true",
loadingDashboardRoute: "dashboard/loading/main.html?standalone=true",
loadDelayMs: 10000, loadDelayMs: 10000,
startupTimeoutMs: 30000, startupTimeoutMs: 30000,
nodecgKillTimeoutMs: 2500, nodecgKillTimeoutMs: 2500,
-1
View File
@@ -26,7 +26,6 @@ function getBaseConfig(): AppRuntimeConfig {
nodecgPort: "9090", nodecgPort: "9090",
bundleName: "scoreko-dev", bundleName: "scoreko-dev",
mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true", mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true",
loadingDashboardRoute: "dashboard/loading/main.html?standalone=true",
loadDelayMs: 10000, loadDelayMs: 10000,
startupTimeoutMs: 100, startupTimeoutMs: 100,
nodecgKillTimeoutMs: 10, nodecgKillTimeoutMs: 10,
-3
View File
@@ -214,7 +214,6 @@ test("getRuntimeConfig throws if required variables are missing", () => {
NODECG_PORT: "9090", NODECG_PORT: "9090",
NODECG_BUNDLE_NAME: "scoreko-dev", NODECG_BUNDLE_NAME: "scoreko-dev",
SCOREKO_DASHBOARD_ROUTE: "dashboard/scoreko-dev/main.html?standalone=true", SCOREKO_DASHBOARD_ROUTE: "dashboard/scoreko-dev/main.html?standalone=true",
SCOREKO_LOADING_ROUTE: "dashboard/loading/main.html?standalone=true",
ELECTRON_LOAD_DELAY_MS: "10000", ELECTRON_LOAD_DELAY_MS: "10000",
NODECG_STARTUP_TIMEOUT_MS: "120000", NODECG_STARTUP_TIMEOUT_MS: "120000",
NODECG_KILL_TIMEOUT_MS: "2500", NODECG_KILL_TIMEOUT_MS: "2500",
@@ -236,7 +235,6 @@ test("getRuntimeConfig parses successfully when all required variables are set",
NODECG_PORT: "9191", NODECG_PORT: "9191",
NODECG_BUNDLE_NAME: "scoreko-dev-test", NODECG_BUNDLE_NAME: "scoreko-dev-test",
SCOREKO_DASHBOARD_ROUTE: "dashboard/scoreko-dev/test.html", SCOREKO_DASHBOARD_ROUTE: "dashboard/scoreko-dev/test.html",
SCOREKO_LOADING_ROUTE: "dashboard/loading/test.html",
ELECTRON_LOAD_DELAY_MS: "5000", ELECTRON_LOAD_DELAY_MS: "5000",
NODECG_STARTUP_TIMEOUT_MS: "60000", NODECG_STARTUP_TIMEOUT_MS: "60000",
NODECG_KILL_TIMEOUT_MS: "1500", NODECG_KILL_TIMEOUT_MS: "1500",
@@ -251,7 +249,6 @@ test("getRuntimeConfig parses successfully when all required variables are set",
assert.equal(config.nodecgPort, "9191"); assert.equal(config.nodecgPort, "9191");
assert.equal(config.bundleName, "scoreko-dev-test"); assert.equal(config.bundleName, "scoreko-dev-test");
assert.equal(config.mainDashboardRoute, "dashboard/scoreko-dev/test.html"); assert.equal(config.mainDashboardRoute, "dashboard/scoreko-dev/test.html");
assert.equal(config.loadingDashboardRoute, "dashboard/loading/test.html");
assert.equal(config.loadDelayMs, 5000); assert.equal(config.loadDelayMs, 5000);
assert.equal(config.startupTimeoutMs, 60000); assert.equal(config.startupTimeoutMs, 60000);
assert.equal(config.nodecgKillTimeoutMs, 1500); assert.equal(config.nodecgKillTimeoutMs, 1500);
-1
View File
@@ -11,7 +11,6 @@ const baseConfig: AppRuntimeConfig = {
nodecgPort: "9090", nodecgPort: "9090",
bundleName: "scoreko-dev", bundleName: "scoreko-dev",
mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true", mainDashboardRoute: "dashboard/scoreko-dev/main.html?standalone=true",
loadingDashboardRoute: "dashboard/loading/main.html?standalone=true",
loadDelayMs: 0, loadDelayMs: 0,
startupTimeoutMs: 30000, startupTimeoutMs: 30000,
nodecgKillTimeoutMs: 2500, nodecgKillTimeoutMs: 2500,