refactor(core): More decouplings from internal hooks (no-changelog) (#10099)
This commit is contained in:
@@ -13,7 +13,7 @@ import { Logger } from '@/Logger';
|
||||
import { jsonParse, type IDataObject, ApplicationError } from 'n8n-workflow';
|
||||
import { EXTERNAL_SECRETS_INITIAL_BACKOFF, EXTERNAL_SECRETS_MAX_BACKOFF } from './constants';
|
||||
import { License } from '@/License';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { EventRelay } from '@/eventbus/event-relay.service';
|
||||
import { updateIntervalTime } from './externalSecretsHelper.ee';
|
||||
import { ExternalSecretsProviders } from './ExternalSecretsProviders.ee';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
@@ -38,6 +38,7 @@ export class ExternalSecretsManager {
|
||||
private readonly license: License,
|
||||
private readonly secretsProviders: ExternalSecretsProviders,
|
||||
private readonly cipher: Cipher,
|
||||
private readonly eventRelay: EventRelay,
|
||||
) {}
|
||||
|
||||
async init(): Promise<void> {
|
||||
@@ -308,12 +309,12 @@ export class ExternalSecretsManager {
|
||||
try {
|
||||
testResult = await this.getProvider(vaultType)?.test();
|
||||
} catch {}
|
||||
void Container.get(InternalHooks).onExternalSecretsProviderSettingsSaved({
|
||||
user_id: userId,
|
||||
vault_type: vaultType,
|
||||
is_new: isNew,
|
||||
is_valid: testResult?.[0] ?? false,
|
||||
error_message: testResult?.[1],
|
||||
this.eventRelay.emit('external-secrets-provider-settings-saved', {
|
||||
userId,
|
||||
vaultType,
|
||||
isNew,
|
||||
isValid: testResult?.[0] ?? false,
|
||||
errorMessage: testResult?.[1],
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user