@warblerjs/config
v0.6.0
Published
`@warblerjs/config` discovers, loads, validates, normalizes, and freezes Warbler configuration for Bun.
Readme
@warblerjs/config
@warblerjs/config discovers, loads, validates, normalizes, and freezes Warbler configuration for Bun.
The loader follows the Warbler workspace convention:
playground/src/config/runtime.config.tsplayground/src/config/transports/http.config.tsplayground/src/config/transports/ws.config.tsplayground/src/config/transports/tcp.config.tsplayground/src/config/transports/udp.config.tsplayground/src/config/transports/mcp.config.tsplayground/src/config/transports/webrtc.config.ts
Transport modules are discovered and imported only when their runtime activation is enabled. Invalid and missing values fail immediately with ConfigError; values are never silently defaulted or discarded.
The main entry point exposes runtime loading and validation plus the core byte-size, duration, port, host, and boolean parsers. Discovery, parser, validator, normalization, type, and error subpath exports provide the package's focused APIs.
Byte sizes accept canonical lowercase integer values with b, kb, mb, or gb. Durations accept canonical lowercase integer values with ms, s, m, or h. Ports are restricted to safe integers from 1 through 65535.
