From f9d7f62ec251b613a33bb6a17fcfbb1fb19633c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Malfait?= Date: Sun, 9 Feb 2025 22:17:54 +0100 Subject: [PATCH] I18n CI and small type improvement (#10092) --- .github/workflows/i18n-force-pull.yml | 3 ++- .github/workflows/i18n-pull.yaml | 3 ++- .github/workflows/i18n-upload.yml | 3 ++- .../core-modules/client-config/client-config.resolver.ts | 3 ++- .../exception-handler/exception-handler.module-factory.ts | 5 ++++- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/i18n-force-pull.yml b/.github/workflows/i18n-force-pull.yml index 469b29595..457264194 100644 --- a/.github/workflows/i18n-force-pull.yml +++ b/.github/workflows/i18n-force-pull.yml @@ -26,7 +26,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: ./.github/actions/node-install + - name: Install dependencies + uses: ./.github/workflows/actions/yarn-install - name: Pull translations from Crowdin uses: crowdin/github-action@v2 diff --git a/.github/workflows/i18n-pull.yaml b/.github/workflows/i18n-pull.yaml index 8bf75820e..8a9eef4ea 100644 --- a/.github/workflows/i18n-pull.yaml +++ b/.github/workflows/i18n-pull.yaml @@ -24,7 +24,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: ./.github/actions/node-install + - name: Install dependencies + uses: ./.github/workflows/actions/yarn-install - name: Compile translations id: compile_translations diff --git a/.github/workflows/i18n-upload.yml b/.github/workflows/i18n-upload.yml index 9f3fbbb32..8e6ebfc3d 100644 --- a/.github/workflows/i18n-upload.yml +++ b/.github/workflows/i18n-upload.yml @@ -22,7 +22,8 @@ jobs: with: token: ${{ github.token }} - - uses: ./.github/actions/node-install + - name: Install dependencies + uses: ./.github/workflows/actions/yarn-install - name: Extract translations run: | diff --git a/packages/twenty-server/src/engine/core-modules/client-config/client-config.resolver.ts b/packages/twenty-server/src/engine/core-modules/client-config/client-config.resolver.ts index 2a195bbf8..4cd073fd0 100644 --- a/packages/twenty-server/src/engine/core-modules/client-config/client-config.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/client-config/client-config.resolver.ts @@ -52,7 +52,8 @@ export class ClientConfigResolver { ), defaultSubdomain: this.environmentService.get('DEFAULT_SUBDOMAIN'), frontDomain: this.domainManagerService.getFrontUrl().hostname, - debugMode: this.environmentService.get('NODE_ENV') === 'development', + debugMode: + this.environmentService.get('NODE_ENV') === NodeEnvironment.development, support: { supportDriver: this.environmentService.get('SUPPORT_DRIVER'), supportFrontChatId: this.environmentService.get( diff --git a/packages/twenty-server/src/engine/core-modules/exception-handler/exception-handler.module-factory.ts b/packages/twenty-server/src/engine/core-modules/exception-handler/exception-handler.module-factory.ts index 54fb228d1..75a2fadfd 100644 --- a/packages/twenty-server/src/engine/core-modules/exception-handler/exception-handler.module-factory.ts +++ b/packages/twenty-server/src/engine/core-modules/exception-handler/exception-handler.module-factory.ts @@ -1,5 +1,7 @@ import { HttpAdapterHost } from '@nestjs/core'; +import { NodeEnvironment } from 'src/engine/core-modules/environment/interfaces/node-environment.interface'; + import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service'; import { OPTIONS_TYPE } from 'src/engine/core-modules/exception-handler/exception-handler.module-definition'; import { ExceptionHandlerDriver } from 'src/engine/core-modules/exception-handler/interfaces'; @@ -30,7 +32,8 @@ export const exceptionHandlerModuleFactory = async ( release: environmentService.get('SENTRY_RELEASE'), dsn: environmentService.get('SENTRY_DSN') ?? '', serverInstance: adapterHost.httpAdapter?.getInstance(), - debug: environmentService.get('NODE_ENV') === 'development', + debug: + environmentService.get('NODE_ENV') === NodeEnvironment.development, }, }; }