Validators using zod

This commit is contained in:
2026-10-25 12:41:46 -03:00
parent 31ae2973d7
commit 4fad43d9cc
24 changed files with 1242 additions and 1788 deletions
+2 -9
View File
@@ -5,15 +5,8 @@
// bottom instead of up and down, ids lose their folders, a parent keeps being a parent (bworld merges them when it
// loads, see resolve_models), and what bworld has no use for (blockbench's names, display transforms for places bworld
// doesn't show items, like third person) is left out
import {
DISPLAY_CONTEXTS,
type ModelDisplay,
type ModelElementJson,
type ModelFace,
type ModelFaceJson,
type ModelFileJson,
} from "$/common/block_models.ts";
import { FORMAT_VERSION } from "$/common/mod_data.ts";
import type { ModelDisplay, ModelElementJson, ModelFaceJson, ModelFileJson } from "$/common/block_models.ts";
import { DISPLAY_CONTEXTS, FORMAT_VERSION, type ModelFace } from "$/common/mod_data.ts";
import { join } from "@std/path";
import {
DEFAULT_REMAPS,
+2 -1
View File
@@ -4,7 +4,8 @@
// where things are in a java mod's resources, and what they're called in bworld. a resource location like
// "create:block/cogwheel" (or "block/stone", which is minecraft's) becomes the id "create:block_cogwheel": bworld ids
// have no folders, so the path's folders are joined with _, the same way check_mods names textures in subfolders
import { ID_PATTERN, type TagRegistry } from "$/common/mod_data.ts";
import type { TagRegistry } from "$/common/mod_data.ts";
import { ID_PATTERN } from "$/common/schema.ts";
import { registered_ids } from "$/common/mod_check.ts";
import { load_and_check } from "$/tools/check_mods.ts";
import { dirname, relative, resolve, SEPARATOR } from "@std/path";
+2 -1
View File
@@ -5,7 +5,8 @@
// format is the same: values, replace and remove, with { id, required: false } for entries that can be missing. tag ids
// keep their folders, since bworld's can have them too
import { join } from "@std/path";
import { FORMAT_VERSION, TAG_ID_PATTERN, type TagRegistry } from "$/common/mod_data.ts";
import { FORMAT_VERSION, type TagRegistry } from "$/common/mod_data.ts";
import { TAG_ID_PATTERN } from "$/common/schema.ts";
import {
DEFAULT_REMAPS,
empty_report,