Shared state between client and server

This commit is contained in:
2026-10-03 18:45:07 -03:00
parent 63e6248f9f
commit 7417bfd5f1
24 changed files with 656 additions and 193 deletions
+7 -2
View File
@@ -6,8 +6,13 @@ import { type Bmod, BMOD_EXTENSION, SCRIPT_SIDES, type ScriptSide, write_bmod }
import type { ManifestJson } from "$/common/mod_data.ts";
import { load_and_check, type LoadedMod } from "./check_mods.ts";
// what each script is bundled for: the server runs in deno, clients in browsers, worldgen in both
const PLATFORMS: Record<ScriptSide, "deno" | "browser"> = { server: "deno", client: "browser", worldgen: "browser" };
// what each script is bundled for: the server runs in deno, clients in browsers, worldgen and shared in both
const PLATFORMS: Record<ScriptSide, "deno" | "browser"> = {
server: "deno",
client: "browser",
worldgen: "browser",
shared: "browser",
};
// a mod that passed check-mods, as .bmod bytes
export async function pack_mod(mod: LoadedMod): Promise<Uint8Array<ArrayBuffer>> {