From d76c88eae424840d5ef53b2ce7e8766b4713bbfa Mon Sep 17 00:00:00 2001 From: Anton Lantukh Date: Wed, 22 Jan 2025 15:26:30 +0100 Subject: [PATCH] Add preview env --- packages/common/src/services/ConfigService.ts | 1 - platforms/web/.env.preview | 32 +++++++++++++++++++ .../web/ini/templates/.webapp.preview.ini | 2 -- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 platforms/web/.env.preview diff --git a/packages/common/src/services/ConfigService.ts b/packages/common/src/services/ConfigService.ts index c4fe420d4..db1d7b8d2 100644 --- a/packages/common/src/services/ConfigService.ts +++ b/packages/common/src/services/ConfigService.ts @@ -13,7 +13,6 @@ import env from '../env'; @injectable() export default class ConfigService { - protected CONFIG_HOST = env.APP_API_BASE_URL; // Explicitly set default config here as a local variable, // otherwise if it's a module level const, the merge below causes changes to nested properties protected DEFAULT_CONFIG: Config = { diff --git a/platforms/web/.env.preview b/platforms/web/.env.preview new file mode 100644 index 000000000..3ae8a8855 --- /dev/null +++ b/platforms/web/.env.preview @@ -0,0 +1,32 @@ +APP_API_BASE_URL=https://cdn-dev.jwplayer.com +APP_PLAYER_ID=M4qoGvUk + +# page metadata (SEO) +#APP_NAME= +#APP_SHORT_NAME= +#APP_DESCRIPTION + +# UI configuration +APP_VERSION=$npm_package_version +APP_FOOTER_TEXT="\u00a9 JW Player | [jwplayer.com](https://www.jwplayer.com/) | v${APP_VERSION}" + +# config for Google Services +#APP_GTM_TAG_ID +#APP_GOOGLE_SITE_VERIFICATION_ID + +# app metadata, for smart app banner (iOS) and native app banner (Android) +# APP_APPLE_ITUNES_APP +# APP_GOOGLE_RELATED_APPLICATION_ID + +# override with custom fonts. supports Google Fonts (eg. APP_BODY_FONT_FAMILY=google:Roboto,system:Verdana - use Roboto and fallback to Verdana) +#APP_BODY_FONT_FAMILY +#APP_BODY_ALT_FONT_FAMILY + +# public URL must be set for standalone applications +#APP_PUBLIC_URL + +# the default language that the app should load when the language couldn't be detected +APP_DEFAULT_LANGUAGE=en + +# a comma separated list of languages that are enabled (this only works for languages that are enabled in the app) +APP_ENABLED_LANGUAGES=en,es diff --git a/platforms/web/ini/templates/.webapp.preview.ini b/platforms/web/ini/templates/.webapp.preview.ini index 8cec798a9..9bb31351b 100644 --- a/platforms/web/ini/templates/.webapp.preview.ini +++ b/platforms/web/ini/templates/.webapp.preview.ini @@ -2,5 +2,3 @@ defaultConfigSource = ; Allow any config UNSAFE_allowAnyConfigSource = true -; Use dev api -APP_API_BASE_URL= https://cdn-dev.jwplayer.com