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:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user