Reads configuration from a local JSON or YAML file.
The format is inferred from the extension (.yml/.yaml -> YAML, else JSON) unless given. A missing file throws, unless optional is set (then it yields {}).
.yml
.yaml
optional
{}
The source options.
Readonly
A human-readable name (e.g. env, file, ssm).
env
file
ssm
Static
Create a file source.
A new source.
Reads configuration from a local JSON or YAML file.
The format is inferred from the extension (
.yml/.yaml-> YAML, else JSON) unless given. A missing file throws, unlessoptionalis set (then it yields{}).