config,config-loader: warn when trying to access invisible config values

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-07-30 16:31:44 +02:00
parent 8c6054a587
commit e9d3983eee
16 changed files with 283 additions and 48 deletions
+1
View File
@@ -59,6 +59,7 @@ export default async (cmd: Command) => {
...(await loadCliConfig({
args: cmd.config,
fromPackage: name,
withFilteredKeys: true,
})),
});
@@ -28,6 +28,7 @@ export default async (cmd: Command) => {
...(await loadCliConfig({
args: cmd.config,
fromPackage: name,
withFilteredKeys: true,
})),
});
+2
View File
@@ -22,6 +22,7 @@ type Options = {
args: string[];
fromPackage?: string;
mockEnv?: boolean;
withFilteredKeys?: boolean;
};
export async function loadCliConfig(options: Options) {
@@ -57,6 +58,7 @@ export async function loadCliConfig(options: Options) {
try {
const frontendAppConfigs = schema.process(appConfigs, {
visibility: ['frontend'],
withFilteredKeys: options.withFilteredKeys,
});
const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs);