From 83181a7c2013ed404f25be5f37e2f7440cce9f2b Mon Sep 17 00:00:00 2001 From: Marc Littlemore Date: Wed, 17 Sep 2025 16:38:18 +0100 Subject: [PATCH] chore: Add NODE_ENV to debug info (#19666) --- packages/@n8n/api-types/src/frontend-settings.ts | 1 + packages/cli/src/services/frontend.service.ts | 1 + packages/frontend/editor-ui/src/__tests__/defaults.ts | 1 + .../src/composables/__snapshots__/useDebugInfo.test.ts.snap | 1 + .../frontend/editor-ui/src/composables/useDebugInfo.test.ts | 1 + packages/frontend/editor-ui/src/composables/useDebugInfo.ts | 2 ++ packages/frontend/editor-ui/src/stores/settings.store.ts | 3 +++ 7 files changed, 10 insertions(+) diff --git a/packages/@n8n/api-types/src/frontend-settings.ts b/packages/@n8n/api-types/src/frontend-settings.ts index 38b731678e..5a565ccec0 100644 --- a/packages/@n8n/api-types/src/frontend-settings.ts +++ b/packages/@n8n/api-types/src/frontend-settings.ts @@ -59,6 +59,7 @@ export interface FrontendSettings { urlBaseEditor: string; versionCli: string; nodeJsVersion: string; + nodeEnv: string | undefined; concurrency: number; isNativePythonRunnerEnabled: boolean; authCookie: { diff --git a/packages/cli/src/services/frontend.service.ts b/packages/cli/src/services/frontend.service.ts index 893ba80f00..66bbb95857 100644 --- a/packages/cli/src/services/frontend.service.ts +++ b/packages/cli/src/services/frontend.service.ts @@ -129,6 +129,7 @@ export class FrontendService { urlBaseEditor: instanceBaseUrl, binaryDataMode: this.binaryDataConfig.mode, nodeJsVersion: process.version.replace(/^v/, ''), + nodeEnv: process.env.NODE_ENV, versionCli: N8N_VERSION, concurrency: this.globalConfig.executions.concurrency.productionLimit, isNativePythonRunnerEnabled: diff --git a/packages/frontend/editor-ui/src/__tests__/defaults.ts b/packages/frontend/editor-ui/src/__tests__/defaults.ts index e4f8e4d7b9..3bc4f105d8 100644 --- a/packages/frontend/editor-ui/src/__tests__/defaults.ts +++ b/packages/frontend/editor-ui/src/__tests__/defaults.ts @@ -101,6 +101,7 @@ export const defaultSettings: FrontendSettings = { }, versionCli: '', nodeJsVersion: '', + nodeEnv: '', concurrency: -1, isNativePythonRunnerEnabled: false, versionNotifications: { diff --git a/packages/frontend/editor-ui/src/composables/__snapshots__/useDebugInfo.test.ts.snap b/packages/frontend/editor-ui/src/composables/__snapshots__/useDebugInfo.test.ts.snap index 3d41a2648e..63233f0960 100644 --- a/packages/frontend/editor-ui/src/composables/__snapshots__/useDebugInfo.test.ts.snap +++ b/packages/frontend/editor-ui/src/composables/__snapshots__/useDebugInfo.test.ts.snap @@ -8,6 +8,7 @@ exports[`useDebugInfo > should generate debug info 1`] = ` - n8nVersion: 0.123.0 - platform: docker (cloud) - nodeJsVersion: 14.17.0 +- nodeEnv: production - database: postgres - executionMode: regular - concurrency: 10 diff --git a/packages/frontend/editor-ui/src/composables/useDebugInfo.test.ts b/packages/frontend/editor-ui/src/composables/useDebugInfo.test.ts index 880a03e605..614d5c258e 100644 --- a/packages/frontend/editor-ui/src/composables/useDebugInfo.test.ts +++ b/packages/frontend/editor-ui/src/composables/useDebugInfo.test.ts @@ -14,6 +14,7 @@ const MOCK_BASE_SETTINGS: RecursivePartial { const nodeJsVersion = computed(() => settings.value.nodeJsVersion); + const nodeEnv = computed(() => settings.value.nodeEnv); + const concurrency = computed(() => settings.value.concurrency); const isNativePythonRunnerEnabled = computed(() => settings.value.isNativePythonRunnerEnabled); @@ -331,6 +333,7 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, () => { pruning, security, nodeJsVersion, + nodeEnv, concurrency, isNativePythonRunnerEnabled, isConcurrencyEnabled,