Release Healer Man 0.1.29

This commit is contained in:
phenom committed 2026-09-11 14:26:15 -04:00
1 parent 8c9809d3e0
commit 544c1bee91
120 files changed
+4363 -1036

No files matched your search

+6
View File
@@ -7,6 +7,7 @@ import { createArenaService } from "./arena-service.mjs";
import { publicManastormAdminConfig } from "./manastorm-config.mjs";
import { createOnlineSessionManager } from "./online-session.mjs";
import { upgradeArenaWebSocket } from "./websocket.mjs";
import { createBundledContentHandler } from "./bundled-content.mjs";
const MIME_TYPES = new Map([
[".css", "text/css; charset=utf-8"], [".glb", "model/gltf-binary"],
@@ -148,6 +149,7 @@ function createAuthLimiter() {
export function createGameServer(options = {}) {
const staticDir = path.resolve(options.staticDir ?? process.env.STATIC_DIR ?? "dist");
const contentDir = path.resolve(options.contentDir ?? process.env.CONTENT_DIR ?? "content");
const serveBundledContent = createBundledContentHandler(staticDir);
const allowedOrigins = parseAllowedOrigins(options.corsOrigins ?? process.env.CORS_ORIGINS);
const bodyLimit = Math.max(1024, Number(options.bodyLimit ?? process.env.MAX_JSON_BODY_BYTES ?? 5 * 1024 * 1024));
const trustProxy = String(options.trustProxy ?? process.env.TRUST_PROXY ?? "").toLowerCase() === "true";
@@ -344,6 +346,10 @@ export function createGameServer(options = {}) {
json(response, 404, { error: "API route not found.", code: "not_found" });
return;
}
if (serveBundledContent(request, response, url.pathname)) return;
if (url.pathname === "/content/bootstrap-manifest.json" || url.pathname.startsWith("/content/bundled/")) {
if (serveStatic(request, response, staticDir, url.pathname, { spaFallback: false, noCache: true })) return;
}
if (url.pathname === "/content" || url.pathname.startsWith("/content/")) {
const contentPath = url.pathname.slice("/content".length) || "/manifest.json";
const served = serveStatic(request, response, contentDir, contentPath, {