refactor: clean architecture and remove unused code

This commit is contained in:
Tom Boullay
2026-04-30 13:33:28 +02:00
parent c698b9ef78
commit fda70bade2
30 changed files with 303 additions and 696 deletions
+3 -2
View File
@@ -5,17 +5,18 @@ import fs from "node:fs";
import { fileURLToPath } from "node:url";
import type { ServerResponse } from "node:http";
import type { Plugin } from "vite";
import { parseMapNodes } from "./src/utils/mapNodeValidation";
import { parseMapNodes } from "./src/utils/map/mapNodeValidation";
const __dirname = fileURLToPath(new URL(".", import.meta.url));
const MAX_MAP_PAYLOAD_BYTES = 1024 * 1024;
const JSON_HEADERS = { "Content-Type": "application/json" };
type JsonResponseBody = Readonly<Record<string, string | boolean>>;
function sendJson(
res: ServerResponse,
status: number,
body: unknown,
body: JsonResponseBody,
headers: Record<string, string> = {},
): void {
res