mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
refactor(core): Abstract away InstanceSettings and encryptionKey into injectable services (no-changelog) (#7471)
This change ensures that things like `encryptionKey` and `instanceId` are always available directly where they are needed, instead of passing them around throughout the code.
This commit is contained in:
committed by
GitHub
parent
519680c2cf
commit
b6de910cbe
@@ -10,6 +10,7 @@ import type {
|
||||
INodeTypeBaseDescription,
|
||||
ITelemetrySettings,
|
||||
} from 'n8n-workflow';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
|
||||
import { GENERATED_STATIC_DIR, LICENSE_FEATURES } from '@/constants';
|
||||
import { CredentialsOverwrites } from '@/CredentialsOverwrites';
|
||||
@@ -40,6 +41,7 @@ export class FrontendService {
|
||||
private readonly credentialsOverwrites: CredentialsOverwrites,
|
||||
private readonly license: License,
|
||||
private readonly mailer: UserManagementMailer,
|
||||
private readonly instanceSettings: InstanceSettings,
|
||||
) {
|
||||
this.initSettings();
|
||||
}
|
||||
@@ -87,7 +89,7 @@ export class FrontendService {
|
||||
endpoint: config.getEnv('versionNotifications.endpoint'),
|
||||
infoUrl: config.getEnv('versionNotifications.infoUrl'),
|
||||
},
|
||||
instanceId: '',
|
||||
instanceId: this.instanceSettings.instanceId,
|
||||
telemetry: telemetrySettings,
|
||||
posthog: {
|
||||
enabled: config.getEnv('diagnostics.enabled'),
|
||||
|
||||
Reference in New Issue
Block a user