Add backstage-cli config:check --deprecated to list deprecated settings
Signed-off-by: Colton Padden <colton.padden@fastmail.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Introduce `--deprecated` option to `config:check` to log all deprecated app configuration properties
|
||||
|
||||
```sh
|
||||
$ yarn backstage-cli config:check --lax --deprecated
|
||||
config:check --lax --deprecated
|
||||
Loaded config from app-config.yaml
|
||||
The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead.
|
||||
```
|
||||
@@ -556,6 +556,7 @@ Options:
|
||||
--package <name> Only load config schema that applies to the given package
|
||||
--lax Do not require environment variables to be set
|
||||
--frontend Only validate the frontend configuration
|
||||
--deprecated List all deprecated configuration settings
|
||||
--config <path> Config files to load instead of app-config.yaml (default: [])
|
||||
-h, --help display help for command
|
||||
```
|
||||
|
||||
@@ -23,5 +23,6 @@ export default async (cmd: Command) => {
|
||||
fromPackage: cmd.package,
|
||||
mockEnv: cmd.lax,
|
||||
fullVisibility: !cmd.frontend,
|
||||
withDeprecatedKeys: cmd.deprecated,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -193,6 +193,7 @@ export function registerCommands(program: CommanderStatic) {
|
||||
)
|
||||
.option('--lax', 'Do not require environment variables to be set')
|
||||
.option('--frontend', 'Only validate the frontend configuration')
|
||||
.option('--deprecated', 'Output deprecated configuration settings')
|
||||
.option(...configOption)
|
||||
.description(
|
||||
'Validate that the given configuration loads and matches schema',
|
||||
|
||||
@@ -28,6 +28,7 @@ type Options = {
|
||||
fromPackage?: string;
|
||||
mockEnv?: boolean;
|
||||
withFilteredKeys?: boolean;
|
||||
withDeprecatedKeys?: boolean;
|
||||
fullVisibility?: boolean;
|
||||
};
|
||||
|
||||
@@ -82,6 +83,7 @@ export async function loadCliConfig(options: Options) {
|
||||
? ['frontend', 'backend', 'secret']
|
||||
: ['frontend'],
|
||||
withFilteredKeys: options.withFilteredKeys,
|
||||
withDeprecatedKeys: options.withDeprecatedKeys,
|
||||
});
|
||||
const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user