enable withDeprecatedKeys in schema process for backend-common and app-backend

Signed-off-by: Colton Padden <colton.padden@fastmail.com>
This commit is contained in:
Colton Padden
2022-01-05 14:17:11 -05:00
parent f9c5841c80
commit a505347140
3 changed files with 5 additions and 3 deletions
+4 -1
View File
@@ -38,7 +38,10 @@ const updateRedactionList = (
configs: AppConfig[],
logger: Logger,
) => {
const secretAppConfigs = schema.process(configs, { visibility: ['secret'] });
const secretAppConfigs = schema.process(configs, {
visibility: ['secret'],
withDeprecatedKeys: true,
});
const secretConfig = ConfigReader.fromConfigs(secretAppConfigs);
const values = new Set<string>();
const data = secretConfig.get();
-1
View File
@@ -87,7 +87,6 @@ export class ConfigReader implements Config {
const reader = new ConfigReader(data, context, previousReader);
reader.filteredKeys = filteredKeys;
// TODO(cmpadden) `withDeprecatedKeys` is defaulting to false on app start
if (deprecatedKeys) {
for (const { key, description } of deprecatedKeys) {
// eslint-disable-next-line no-console
+1 -1
View File
@@ -91,7 +91,7 @@ export async function readConfigs(options: ReadOptions): Promise<AppConfig[]> {
const frontendConfigs = await schema.process(
[{ data: config.get() as JsonObject, context: 'app' }],
{ visibility: ['frontend'] },
{ visibility: ['frontend'], withDeprecatedKeys: true },
);
appConfigs.push(...frontendConfigs);
} catch (error) {