You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use-case where I'm wrapping with my own library that integrates ts-convict and NestJS together to provide the foundation of config management for the rest of my NestJS libraries. So far we've been able to do this quite well with the existing implementation of ts-convict, but we are running into some interesting scenarios with exposing multiple configs based off the same config file but distributed independently in each library.
Let me explain a bit further with this example. Imagine our app is broken up into several modules (possibly in different, independently published NPM packages):
app.config.ts # Root app config
/logging
- logging.config.ts # Expects to be configured under a "logging" sub-key
/auth
- auth.config.ts # Expects to be configured under an "auth" sub-key
/metrics
- metrics.config.ts # Expects to be configured under a "metrics" sub-key
We'd like to be able to have each of these libraries load its own subkey from the main config yml file which may look something like this:
This works for us right now as long as we use the validationMethod: 'warn' option, but of course we get a bunch of warnings in our logs about the config file having fields out of sync with the config class since each sub config gets initialized independently. What are your thoughts on introducing a value to validationMethod that will allow it to skip validation altogether?
The text was updated successfully, but these errors were encountered:
I have a use-case where I'm wrapping with my own library that integrates
ts-convict
and NestJS together to provide the foundation of config management for the rest of my NestJS libraries. So far we've been able to do this quite well with the existing implementation ofts-convict
, but we are running into some interesting scenarios with exposing multiple configs based off the same config file but distributed independently in each library.Let me explain a bit further with this example. Imagine our app is broken up into several modules (possibly in different, independently published NPM packages):
We'd like to be able to have each of these libraries load its own subkey from the main config yml file which may look something like this:
This works for us right now as long as we use the
validationMethod: 'warn'
option, but of course we get a bunch of warnings in our logs about the config file having fields out of sync with the config class since each sub config gets initialized independently. What are your thoughts on introducing a value tovalidationMethod
that will allow it to skip validation altogether?The text was updated successfully, but these errors were encountered: