From f27b467bc0790e6cd9a22eb4a8f1d4ad17b5d348 Mon Sep 17 00:00:00 2001 From: Zita Szupera Date: Thu, 13 Jun 2024 11:28:31 +0200 Subject: [PATCH] chore: fix set-env script --- set-env.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/set-env.ts b/set-env.ts index 2e232904..95a5431a 100644 --- a/set-env.ts +++ b/set-env.ts @@ -19,13 +19,17 @@ const prodEnvConfig = { const envConfig: { [key: string]: any } = process.env.ANGULAR_ENV === 'production' ? prodEnvConfig : devEnvConfig; +const tokenUrl = process.env.STREAM_TOKEN_URL + ? `'${process.env.STREAM_TOKEN_URL}'` + : `''`; + // `environment.ts` file structure const envConfigFile = `export const environment = { ${Object.keys(envConfig).map((k) => `${k}: ${envConfig[k]},`)} apiKey: '${process.env.STREAM_API_KEY}', userId: '${process.env.STREAM_USER_ID}', userToken: '${process.env.STREAM_USER_TOKEN}', - tokenUrl: '${process.env.STREAM_TOKEN_URL}', + tokenUrl: ${tokenUrl}, channelsFilter: ${process.env.STREAM_CHANNELS_FILTER} }; // I am a generated file, do not modify me directly, see set-env script