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
Is your feature request related to a problem? Please describe.
I am using this libary as base for my own library.
My library restricts some what the available options of this one, as to enforce some standards.
My problem is the following: I would like to disable loading of all kinds of files which are loaded if present, as for example the local.{ext} ones.
Hosts and deployments files are also not desirable in my use case.
Describe the solution you'd like
I would create a second parameter for util.loadFileConfigs, an "options" parameter. This might be an object , default {}, which could allow an ignoreFiles = [] key.
This key would accept a list of pre determined values, to specify files to be ignored while loading:
"DEFAULT": if present, ignores default.EXT and default-{instance}.EXT
"DEPLOIMENT": if present, ignores deployment.EXT and deployment-{instance}.EXT
"SHORT_HOST": if present, ignores {short_hostname}.EXT, {short_hostname}-{instance}.EXT, {short_hostname}-{deployment}.EXT
and {short_hostname}-{deployment}-{instance}.EXT
"FULL_HOST": if present, ignores {full_hostname}.EXT {full_hostname}-{instance}.EXT, {full_hostname}-{deployment}.EXT, {full_hostname}-{deployment}-{instance}.EXT
"HOST": if present, ignores what is ignored by "SHORT_HOST" and "FULL_HOST"
"LOCAL": if present, ignores local.EXT, local-{instance}.EXT, local-{deployment}.EXT and local-{deployment}-{instance}.EXT
Describe alternatives you've considered
As it is, there is nothing I can do about it, at least not that I can think of. I am opemning this issue because an user of my library reported that they have a local.{ext} file which was accidentally loaded when they didn't want it.
Please tell us about your environment:
node-config version: 3.3.9
node-version: from 12 to 18
Other information
I am whiling to try a pr but only if such feature would be accepted. My understanding is that because we would create an empty by default options object this wouldn't break compatibility, yet it would add functionality for those who need it.
The text was updated successfully, but these errors were encountered:
We have more or less the same or an equivalent issue:
On one of our servers the hostname is the same as one of the NODE_ENV names.
As a consequence the "unwanted" hostname config file is loaded instead of the NODE_ENV config file (as documented in File load order).
An option (as descripted by @marlon-sousa) to e.g. exclude the hostname files from being loaded would help!
Is your feature request related to a problem? Please describe.
I am using this libary as base for my own library.
My library restricts some what the available options of this one, as to enforce some standards.
My problem is the following: I would like to disable loading of all kinds of files which are loaded if present, as for example the local.{ext} ones.
Hosts and deployments files are also not desirable in my use case.
Describe the solution you'd like
I would create a second parameter for util.loadFileConfigs, an "options" parameter. This might be an object , default {}, which could allow an ignoreFiles = [] key.
This key would accept a list of pre determined values, to specify files to be ignored while loading:
and {short_hostname}-{deployment}-{instance}.EXT
Describe alternatives you've considered
As it is, there is nothing I can do about it, at least not that I can think of. I am opemning this issue because an user of my library reported that they have a local.{ext} file which was accidentally loaded when they didn't want it.
Please tell us about your environment:
Other information
I am whiling to try a pr but only if such feature would be accepted. My understanding is that because we would create an empty by default options object this wouldn't break compatibility, yet it would add functionality for those who need it.
The text was updated successfully, but these errors were encountered: