From 37763a03840847c1a3c7a054d8e8ca32ef667d1e Mon Sep 17 00:00:00 2001 From: Luka Siric Date: Fri, 26 Aug 2022 12:28:32 +0200 Subject: [PATCH] fixed comments from benjdlambert Signed-off-by: Luka Siric --- .changeset/fast-paws-press.md | 2 +- app-config.yaml | 6 +++--- packages/cli/src/lib/bundler/server.ts | 5 +++-- packages/core-app-api/config.d.ts | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.changeset/fast-paws-press.md b/.changeset/fast-paws-press.md index 353a2f422c..b9e1893963 100644 --- a/.changeset/fast-paws-press.md +++ b/.changeset/fast-paws-press.md @@ -1,6 +1,6 @@ --- '@backstage/cli': patch -'@backstage/core-app-api': patch +'@backstage/core-app-api': minor --- Added support for custom certificate for webpack dev server. diff --git a/app-config.yaml b/app-config.yaml index 4bbb272d00..fc7215ceb8 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -3,11 +3,11 @@ app: baseUrl: http://localhost:3000 googleAnalyticsTrackingId: # UA-000000-0 # https: - # credentials: + # certificate: # cert: - # $file '\path\to\the\certificate' + # $file: '\path\to\the\certificate' # key: - # $file '\path\to\the\private-key' + # $file: '\path\to\the\private-key' #datadogRum: # clientToken: '123456789' # applicationId: qwerty diff --git a/packages/cli/src/lib/bundler/server.ts b/packages/cli/src/lib/bundler/server.ts index 3057bcb70b..2e362cd050 100644 --- a/packages/cli/src/lib/bundler/server.ts +++ b/packages/cli/src/lib/bundler/server.ts @@ -40,6 +40,7 @@ export async function serveBundle(options: ServeOptions) { isDev: true, baseUrl: url, }); + const compiler = webpack(config); const server = new WebpackDevServer( @@ -64,10 +65,10 @@ export async function serveBundle(options: ServeOptions) { url.protocol === 'https:' ? { cert: options.frontendConfig.getOptionalString( - 'app.https.credentials.cert', + 'app.https.certificate.cert', ), key: options.frontendConfig.getOptionalString( - 'app.https.credentials.key', + 'app.https.certificate.key', ), } : false, diff --git a/packages/core-app-api/config.d.ts b/packages/core-app-api/config.d.ts index e5047709d8..42b1fd9245 100644 --- a/packages/core-app-api/config.d.ts +++ b/packages/core-app-api/config.d.ts @@ -72,14 +72,14 @@ export interface Config { /** * Parent object containing certificate and the private key */ - credentials?: { + certificate?: { /** - * Https Certificate private key. Can be loaded using $file + * Https Certificate private key. Use $file to load in a file * @visibility frontend */ key?: string; /** - * Https Certificate. Can be loaded using $file + * Https Certificate. Use $file to load in a file * @visibility frontend */ cert?: string;