/** * World (LEVEL) name rule: the single source for the CLI, API and console. A world name is a * directory under worlds/, so only characters safe in paths and commands. */ export declare const WORLD_NAME_PATTERN: RegExp; /** * A LEVEL that already exists in a config.env (legacy names such as * `My World` predate WORLD_NAME_PATTERN, #649). It is read, never written: * any value that names exactly one directory under worlds/ is accepted, and * only values that cannot be interpreted safely are rejected (path * separators, `.`/`..`, quotes, control characters). Writing a LEVEL still * requires WORLD_NAME_PATTERN. */ export declare const EXISTING_WORLD_NAME_PATTERN: RegExp; /** * WorldName Value Object * A validated world directory name, used as a server's LEVEL */ export declare class WorldName { private readonly _value; private constructor(); get value(): string; /** * Why a world name is invalid, or undefined when it is valid. * Checks the exact string; create() trims first. */ static validate(value: string): string | undefined; static create(value: string): WorldName; toString(): string; } type ConfigEnv = Readonly>; /** * The world set in a server's config.env: LEVEL, then the legacy WORLD_NAME * alias. Not validated, so existing configs keep working. */ export declare function configuredWorldName(env: ConfigEnv): string | undefined; /** * The world a server uses: its configured world, else itzg's runtime default * 'world' (with `--universe /worlds/`, that is worlds/world). */ export declare function resolveWorldName(env: ConfigEnv): string; export {}; //# sourceMappingURL=WorldName.d.ts.map