etc

Declarative configuration spec for Haskell projects

https://github.com/roman/Haskell-etc

Version on this page:0.4.0.3
LTS Haskell 18.28:0.4.1.0
Stackage Nightly 2022-02-07:0.4.1.0
Latest on Hackage:0.4.1.0

See all snapshots etc appears in

MIT licensed by Roman Gonzalez
Maintained by [email protected]
This version can be pinned in stack with:etc-0.4.0.3@sha256:7a97a99bf115d2c30fa577432125affec4d4dcbfb6711bc4ebe6a41a9b7f7d17,3804

etc

etc gathers configuration values from multiple sources (cli options, OS environment variables, files) using a declarative spec file that defines where this values are to be found and located in a configuration map.

For more information about etc API and how to use it, see the etc homepage

Changes

0.4.0.3

  • Remove bug that stop configuration to be rendered when a default value was an empty array

0.4.0.2

  • Improvement around unhelpful error being thrown when CLI Config Map didn’t contain a value on a required (by code) field

0.4.0.1

  • Improve pretty printer for configuration values (closes #32)

0.4.0.0

BREAKING CHANGES

  • Add new type field to etc/spec with support for string, number, bool, [string], [number] and [bool], [object]
  • Remove type field in cli spec in favor of type on etc/spec
  • Allow ENV vars to accept supported types (only strings were allowed) (closes #30)
  • Allow CLI options to accept supported types (only strings and numbers were allowed)
  • Allow spec file to have array as default values
  • Return a warning and an empty config whenever configuration files contain entries not defined in the spec (closes #26)

0.3.2.0

  • Upgrade to rio to version 0.1.1.0

0.3.1.0

  • Add new etc/files entry to the spec file which allows to specify an environment variable to fetch a file

0.3.0.0

BREAKING CHANGES

  • Bump resolver to lts-11
  • Replace protolude in favor of rio
  • Update parseConfigSpec to no longer attempt to parse JSON when yaml cabal flag is set
  • Add sensitive setting to etc/spec entries
  • Add Value type to deal with sensitive values
  • Update examples with sensitive values
  • Add optional key context to the InvalidConfiguration error (issue #12)
  • Add config printer function that renders config map with/without colors (issue #15)
  • Give precedence to values that do not contain inner JSON.Null values (issue #16)

0.2.0.0

  • Move Config API to typeclass IConfig
  • Add a Setup.hs file to every hachage repo (issue #5)
  • Add example of a project with a config spec embedded in the binary

0.1.0.0

  • Add support for null values on Default (issue #3)
  • If cli cabal flag is false, have parseConfigSpec return ConfigSpec () instead of ambiguous FromJSON value (issue #3)
  • Bump aeson dependency to <1.3

0.0.0.2

  • Rename System.Etc.Internal.Util module to System.Etc.Internal.Extra
  • Rename cabal flag from printer to extra
  • Add feature for Environment Variable misspelling reports
  • Add misspelling reports to example projects
  • Improvements on README

0.0.0.1

  • Various changes to source code to comply with previous resolvers
    • Use Monoid instead of Semigroup
    • Remove unused imports/typeclasses
  • Bump upper limits for aeson and vector
  • Improve README.md typos
  • Add CHANGELOG