From 3a9828a1c11a392ba21b9104c93dfff175a6fdbb Mon Sep 17 00:00:00 2001 From: Sokratis Vidros Date: Thu, 26 Sep 2024 11:05:18 +0300 Subject: [PATCH] chore(root): Clean up self hosted env vars (#6570) --- .../app/testing/billing/quota-throttler.guard.e2e-ee.ts | 8 ++++---- apps/web/.env.sample | 2 +- apps/web/.example.env | 2 +- apps/web/public/env-config.js | 1 - apps/web/public/index.html | 2 +- apps/web/src/api/hooks/useGetLocalesFromContent.ts | 4 ++-- apps/web/src/api/hooks/useWebhookSupportStatus.ts | 4 ++-- .../web/src/components/layout/components/BridgeStatus.tsx | 6 +++--- .../src/components/layout/components/FreeTrialBanner.tsx | 4 ++-- .../layout/components/FreeTrialSidebarWidget.tsx | 4 ++-- .../src/components/layout/components/PolishingBanner.tsx | 2 +- .../components/layout/components/UpgradePlanBanner.tsx | 4 ++-- .../components/layout/components/v2/HeaderMenuItems.tsx | 4 +--- .../web/src/components/layout/components/v2/HeaderNav.tsx | 6 +++--- apps/web/src/components/nav/RootNavMenu.tsx | 2 +- apps/web/src/components/providers/EnvironmentProvider.tsx | 8 ++++---- apps/web/src/components/utils/ProductLead.tsx | 4 ++-- .../components/workflow/preview/common/LocaleSelect.tsx | 4 ++-- apps/web/src/config/index.ts | 4 ++-- apps/web/src/ee/clerk/components/QuestionnaireForm.tsx | 2 +- apps/web/src/hooks/integrations/useIntegrationLimit.ts | 4 ++-- apps/web/src/hooks/useOnboardingExperiment.ts | 4 ++-- apps/web/src/pages/BillingPages.tsx | 4 ++-- apps/web/src/pages/TranslationPages.tsx | 4 ++-- apps/web/src/pages/auth/components/HubspotSignupForm.tsx | 2 +- apps/web/src/pages/auth/components/OAuth.tsx | 4 ++-- apps/web/src/pages/auth/components/QuestionnaireForm.tsx | 2 +- .../src/pages/integrations/components/ChannelGroup.tsx | 6 +++--- .../pages/integrations/components/Modal/ChannelGroup.tsx | 6 +++--- apps/web/src/pages/integrations/useProviders.ts | 4 ++-- apps/web/src/pages/invites/MembersInvitePage.tsx | 2 +- apps/web/src/pages/invites/components/MembersTable.tsx | 2 +- apps/web/src/pages/invites/v2/MemberInviteForm.tsx | 6 +++--- apps/web/src/pages/invites/v2/MembersInvitePage.tsx | 4 ++-- .../src/pages/quick-start/components/SetupTimeline.tsx | 4 ++-- .../pages/templates/components/ControlVariablesForm.tsx | 4 ++-- .../pages/templates/components/createTranslationMarks.ts | 4 ++-- apps/web/src/utils/providers.ts | 4 ++-- docker/community/docker-compose.yml | 2 +- .../cache-in-memory-provider.service.ts | 2 +- .../web-sockets-in-memory-provider.service.ts | 2 +- .../workflow-in-memory-provider.service.ts | 2 +- packages/shared/src/types/feature-flags/feature-flags.ts | 3 +-- 43 files changed, 77 insertions(+), 81 deletions(-) diff --git a/apps/api/src/app/testing/billing/quota-throttler.guard.e2e-ee.ts b/apps/api/src/app/testing/billing/quota-throttler.guard.e2e-ee.ts index c337b4a93da..9cad166be09 100644 --- a/apps/api/src/app/testing/billing/quota-throttler.guard.e2e-ee.ts +++ b/apps/api/src/app/testing/billing/quota-throttler.guard.e2e-ee.ts @@ -15,9 +15,9 @@ describe('Resource Limiting', () => { authHeader?: string ) => Promise>>; - describe('IS_DOCKER_HOSTED is true', () => { + describe('IS_SELF_HOSTED is true', () => { beforeEach(async () => { - process.env.IS_DOCKER_HOSTED = 'true'; + process.env.IS_SELF_HOSTED = 'true'; session = new UserSession(); await session.initialize(); @@ -31,9 +31,9 @@ describe('Resource Limiting', () => { }); }); - describe('IS_DOCKER_HOSTED is false', () => { + describe('IS_SELF_HOSTED is false', () => { beforeEach(async () => { - process.env.IS_DOCKER_HOSTED = 'false'; + process.env.IS_SELF_HOSTED = 'false'; session = new UserSession(); await session.initialize(); diff --git a/apps/web/.env.sample b/apps/web/.env.sample index a19e178613d..16b617758b8 100644 --- a/apps/web/.env.sample +++ b/apps/web/.env.sample @@ -6,7 +6,7 @@ REACT_APP_WS_URL=http://localhost:3002 REACT_APP_WEBHOOK_URL=http://localhost:3003 REACT_APP_NOVU_APP_ID= REACT_APP_WIDGET_EMBED_PATH= -REACT_APP_DOCKER_HOSTED_ENV= +REACT_APP_IS_SELF_HOSTED= REACT_APP_INTERCOM_APP_ID= REACT_APP_SEGMENT_KEY= REACT_APP_SENTRY_DSN= diff --git a/apps/web/.example.env b/apps/web/.example.env index 8b747e6c88c..91614f6ed94 100644 --- a/apps/web/.example.env +++ b/apps/web/.example.env @@ -6,7 +6,7 @@ REACT_APP_WS_URL= REACT_APP_WEBHOOK_URL= REACT_APP_NOVU_APP_ID= REACT_APP_WIDGET_EMBED_PATH= -REACT_APP_DOCKER_HOSTED_ENV= +REACT_APP_IS_SELF_HOSTED= REACT_APP_INTERCOM_APP_ID= REACT_APP_SEGMENT_KEY= REACT_APP_SENTRY_DSN= diff --git a/apps/web/public/env-config.js b/apps/web/public/env-config.js index 4fd75fc7fd1..a41da2072e7 100644 --- a/apps/web/public/env-config.js +++ b/apps/web/public/env-config.js @@ -4,7 +4,6 @@ window._env_ = Object.assign( REACT_APP_ENVIRONMENT: 'dev', REACT_APP_VERSION: '$npm_package_version', IS_V2_ENABLED: 'true', - IS_V2_EXPERIENCE_ENABLED: 'true', }, // Allow overrides of the above defaults window._env_ diff --git a/apps/web/public/index.html b/apps/web/public/index.html index f5d822eaf22..0853c4758e6 100644 --- a/apps/web/public/index.html +++ b/apps/web/public/index.html @@ -126,7 +126,7 @@
- <% if ( process.env.REACT_APP_DOCKER_HOSTED_ENV === 'false' ) { %> + <% if ( process.env.REACT_APP_IS_SELF_HOSTED === 'false' ) { %>