hore(review): tighten pre-merge audit cleanup
🔍 Lint / 🪄 Check lint (pull_request) Has been cancelled
🔍 Lint / 🎨 Check format (pull_request) Has been cancelled
🔍 Lint / 🔎 Typecheck (pull_request) Has been cancelled
📊 Quality / 🔒 Security Audit (pull_request) Has been cancelled
📊 Quality / 📋 Dependency Freshness (pull_request) Has been cancelled
📊 Quality / 📦 Bundle Size (pull_request) Has been cancelled
🔍 Lint / 🏗 Build (pull_request) Has been cancelled

This commit is contained in:
Tom Boullay
2026-05-29 01:34:10 +02:00
parent 093ffd726d
commit 95ca1bbfde
12 changed files with 69 additions and 29 deletions
+7 -1
View File
@@ -1,3 +1,5 @@
import { logger } from "@/utils/core/Logger";
const DEBUG_GAME_STATE_COOKIE_NAME = "la-fabrik-debug-game-state";
const DEBUG_GAME_STATE_COOKIE_MAX_AGE = 60 * 60 * 24 * 30;
@@ -18,7 +20,11 @@ export function readDebugGameStateCookie(): unknown {
try {
return JSON.parse(decodeURIComponent(value));
} catch {
} catch (error) {
logger.warn("DebugGameState", "Invalid debug game state cookie cleared", {
error: error instanceof Error ? error : String(error),
});
clearDebugGameStateCookie();
return null;
}
}
+2 -10
View File
@@ -1,16 +1,8 @@
import type { MapNode } from "@/types/map/mapScene";
import { VEGETATION_MAP_NODE_NAMES } from "@/data/world/vegetationConfig";
import { isInstancedMapNodeName } from "@/utils/map/isInstancedMapNodeName";
const MAP_STRUCTURE_NODE_NAMES = new Set(["Scene", "blocking", "terrain"]);
const RUNTIME_VEGETATION_NODE_NAMES = new Set([
"arbre",
"buisson",
"champdeble",
"champdesoja",
"champsdetournesol",
"potager",
"sapin",
]);
function isRuntimeStructureMapNode(name: string): boolean {
return MAP_STRUCTURE_NODE_NAMES.has(name);
@@ -26,7 +18,7 @@ export function isRuntimeSingleMapNode(node: MapNode): boolean {
}
return (
!RUNTIME_VEGETATION_NODE_NAMES.has(node.name) &&
!VEGETATION_MAP_NODE_NAMES.has(node.name) &&
!isInstancedMapNodeName(node.name)
);
}