cli: avoid backend schema processing when loading config
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Avoid validating the backend configuration schema when loading static configuration for building the frontend.
|
||||
@@ -64,10 +64,8 @@ export async function serveBundle(options: ServeOptions) {
|
||||
https:
|
||||
url.protocol === 'https:'
|
||||
? {
|
||||
cert: options.backendConfig.getString(
|
||||
'app.https.certificate.cert',
|
||||
),
|
||||
key: options.backendConfig.getString('app.https.certificate.key'),
|
||||
cert: options.fullConfig.getString('app.https.certificate.cert'),
|
||||
key: options.fullConfig.getString('app.https.certificate.key'),
|
||||
}
|
||||
: false,
|
||||
host,
|
||||
|
||||
@@ -31,7 +31,7 @@ export type ServeOptions = BundlingPathsOptions & {
|
||||
checksEnabled: boolean;
|
||||
frontendConfig: Config;
|
||||
frontendAppConfigs: AppConfig[];
|
||||
backendConfig: Config;
|
||||
fullConfig: Config;
|
||||
};
|
||||
|
||||
export type BuildOptions = BundlingPathsOptions & {
|
||||
|
||||
@@ -96,15 +96,14 @@ export async function loadCliConfig(options: Options) {
|
||||
});
|
||||
const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs);
|
||||
|
||||
const backendAppConfigs = schema.process(appConfigs);
|
||||
const backendConfig = ConfigReader.fromConfigs(backendAppConfigs);
|
||||
const fullConfig = ConfigReader.fromConfigs(appConfigs);
|
||||
|
||||
return {
|
||||
schema,
|
||||
appConfigs,
|
||||
frontendConfig,
|
||||
frontendAppConfigs,
|
||||
backendConfig,
|
||||
fullConfig,
|
||||
};
|
||||
} catch (error) {
|
||||
const maybeSchemaError = error as Error & { messages?: string[] };
|
||||
|
||||
Reference in New Issue
Block a user