@obsfx/trekker-dashboard 1.11.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/index.js +5 -3
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -1908,7 +1908,8 @@ var upgradeWebSocket = defineWebSocketHelper((c, events) => {
|
|
|
1908
1908
|
|
|
1909
1909
|
// src/server/index.ts
|
|
1910
1910
|
import { existsSync } from "fs";
|
|
1911
|
-
import { resolve, dirname as dirname2 } from "path";
|
|
1911
|
+
import { resolve, dirname as dirname2, relative } from "path";
|
|
1912
|
+
import { fileURLToPath } from "url";
|
|
1912
1913
|
|
|
1913
1914
|
// node_modules/zod/v4/classic/external.js
|
|
1914
1915
|
var exports_external = {};
|
|
@@ -20419,7 +20420,7 @@ app11.route("/api/list", list_default);
|
|
|
20419
20420
|
app11.route("/api/history", history_default);
|
|
20420
20421
|
app11.route("/api/bulk-archive-completed", archive_default);
|
|
20421
20422
|
app11.onError(errorHandler2);
|
|
20422
|
-
var scriptDir = dirname2(import.meta.url
|
|
20423
|
+
var scriptDir = dirname2(fileURLToPath(import.meta.url));
|
|
20423
20424
|
var distClientPath = resolve(scriptDir, "../../dist/client");
|
|
20424
20425
|
if (existsSync(distClientPath)) {
|
|
20425
20426
|
const indexPath = resolve(distClientPath, "index.html");
|
|
@@ -20435,8 +20436,9 @@ if (existsSync(distClientPath)) {
|
|
|
20435
20436
|
app11.get("/", async () => serveIndex());
|
|
20436
20437
|
app11.get("/list", async () => serveIndex());
|
|
20437
20438
|
app11.get("/history", async () => serveIndex());
|
|
20439
|
+
const staticRoot = relative(process.cwd(), distClientPath).split("\\").join("/");
|
|
20438
20440
|
app11.use("/*", serveStatic2({
|
|
20439
|
-
root:
|
|
20441
|
+
root: staticRoot
|
|
20440
20442
|
}));
|
|
20441
20443
|
}
|
|
20442
20444
|
var server_default = app11;
|