feat(editor): Setup Sentry integration (#10945)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-09-24 17:49:22 +02:00
committed by GitHub
parent c75990e063
commit 6de4dfff87
19 changed files with 307 additions and 121 deletions

View File

@@ -10,11 +10,10 @@ import path from 'path';
import { Container, Service } from 'typedi';
import config from '@/config';
import { LICENSE_FEATURES } from '@/constants';
import { LICENSE_FEATURES, N8N_VERSION } from '@/constants';
import { CredentialTypes } from '@/credential-types';
import { CredentialsOverwrites } from '@/credentials-overwrites';
import { getVariablesLimit } from '@/environments/variables/environment-helpers';
import { EventService } from '@/events/event.service';
import { getLdapLoginLabel } from '@/ldap/helpers.ee';
import { License } from '@/license';
import { LoadNodesAndCredentials } from '@/load-nodes-and-credentials';
@@ -47,7 +46,6 @@ export class FrontendService {
private readonly mailer: UserManagementMailer,
private readonly instanceSettings: InstanceSettings,
private readonly urlService: UrlService,
private readonly eventService: EventService,
) {
loadNodesAndCredentials.addPostProcessor(async () => await this.generateTypes());
void this.generateTypes();
@@ -102,7 +100,7 @@ export class FrontendService {
urlBaseEditor: instanceBaseUrl,
binaryDataMode: config.getEnv('binaryDataManager.mode'),
nodeJsVersion: process.version.replace(/^v/, ''),
versionCli: '',
versionCli: N8N_VERSION,
concurrency: config.getEnv('executions.concurrency.productionLimit'),
authCookie: {
secure: config.getEnv('secure_cookie'),
@@ -242,9 +240,7 @@ export class FrontendService {
this.writeStaticJSON('credentials', credentials);
}
getSettings(pushRef?: string): FrontendSettings {
this.eventService.emit('session-started', { pushRef });
getSettings(): FrontendSettings {
const restEndpoint = this.globalConfig.endpoints.rest;
// Update all urls, in case `WEBHOOK_URL` was updated by `--tunnel`
@@ -344,10 +340,6 @@ export class FrontendService {
return this.settings;
}
addToSettings(newSettings: Record<string, unknown>) {
this.settings = { ...this.settings, ...newSettings };
}
private writeStaticJSON(name: string, data: INodeTypeBaseDescription[] | ICredentialType[]) {
const { staticCacheDir } = this.instanceSettings;
const filePath = path.join(staticCacheDir, `types/${name}.json`);