From aeb08a04872793f7dba8b920afc515648f43518d Mon Sep 17 00:00:00 2001 From: Joel von der Weid <joel.von-der-weid@hesge.ch> Date: Tue, 5 Mar 2024 14:32:10 +0100 Subject: [PATCH] Change sonar config --- config/SharedConfig.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/SharedConfig.ts b/config/SharedConfig.ts index f161a69..5e4121f 100644 --- a/config/SharedConfig.ts +++ b/config/SharedConfig.ts @@ -1,14 +1,20 @@ class SharedConfig { public readonly production: boolean; public debug: boolean = false; - public useSonar: boolean = false; public readonly logsFolder: string; + public sonar: { + enabled: boolean + url: string + } constructor() { this.production = process.env.NODE_ENV === 'production'; - this.useSonar = ['yes', 'true', '1', 'on'].includes(process.env.USE_SONAR?.trim()?.toLowerCase() ?? ''); + this.sonar = { + enabled: ['yes', 'true', '1', 'on'].includes(process.env.SONAR_ENABLED?.trim()?.toLowerCase() ?? ''), + url: process.env.SONAR_URL || '' + }; this.logsFolder = process.env.LOGS_FOLDER ?? ''; } -- GitLab