Copyright (c) 2025 Ben Tomlin Licensed under the MIT license
This api is simplified for end users and wraps an alternative API with more descriptive names and convenience overloads in cueconfig/config module
Templates
template clear()
- Remove all registered config from config, except for comitted config
template commit()
- Commit all earlier registrations made in a static context to binary
template configHash(): string
- Get a hash of the current config state
template deregister(path: string)
- Remove a registered config file at path
template deregister(searchpath: string; peg: string)
- Remove registered file matcher pattern
template deregisterEnv(prefix: string)
- Deregister environment variable prefix
template inspect(): string
- Dump config with useful diagnostic information such as ct/rt registrations
template register(path: string; fallback: bool = false; require: bool = true)
- Register a config file at path, with JSON fallback for unavailable cue files
template register(searchdir: string; peg: string; fallback: bool = false; require = true)
-
Register config files in searchdir matching peg
When fallback, json files will stand in for missing cue When require, at least one file must match the registration
template registerEnv(prefix: string; caseSensitive: bool = false)
- Register environment variable prefix to include env vars in config