feat(core): Debug in Editor flag (no-changelog) (#6888)

* feat(cli): Debug in Editor flag (no-changelog)

* fix: Lint issue

* chore: Use correct lock version

* fix: Remove dependency cycle
This commit is contained in:
Omar Ajoue
2023-08-09 16:38:17 +02:00
committed by GitHub
parent d396935281
commit 3d2f4406d7
6 changed files with 15 additions and 0 deletions

View File

@@ -128,6 +128,10 @@ export class License {
return this.isFeatureEnabled(LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS); return this.isFeatureEnabled(LICENSE_FEATURES.ADVANCED_EXECUTION_FILTERS);
} }
isDebugInEditorLicensed() {
return this.isFeatureEnabled(LICENSE_FEATURES.DEBUG_IN_EDITOR);
}
isVariablesEnabled() { isVariablesEnabled() {
return this.isFeatureEnabled(LICENSE_FEATURES.VARIABLES); return this.isFeatureEnabled(LICENSE_FEATURES.VARIABLES);
} }

View File

@@ -148,6 +148,7 @@ import { License } from './License';
import { import {
getStatusUsingPreviousExecutionStatusMethod, getStatusUsingPreviousExecutionStatusMethod,
isAdvancedExecutionFiltersEnabled, isAdvancedExecutionFiltersEnabled,
isDebugInEditorLicensed,
} from './executions/executionHelpers'; } from './executions/executionHelpers';
import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers'; import { getSamlLoginLabel, isSamlLoginEnabled, isSamlLicensed } from './sso/saml/samlHelpers';
import { SamlController } from './sso/saml/routes/saml.controller.ee'; import { SamlController } from './sso/saml/routes/saml.controller.ee';
@@ -310,6 +311,7 @@ export class Server extends AbstractServer {
variables: false, variables: false,
sourceControl: false, sourceControl: false,
auditLogs: false, auditLogs: false,
debugInEditor: false,
}, },
hideUsagePage: config.getEnv('hideUsagePage'), hideUsagePage: config.getEnv('hideUsagePage'),
license: { license: {
@@ -430,6 +432,7 @@ export class Server extends AbstractServer {
advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(), advancedExecutionFilters: isAdvancedExecutionFiltersEnabled(),
variables: isVariablesEnabled(), variables: isVariablesEnabled(),
sourceControl: isSourceControlLicensed(), sourceControl: isSourceControlLicensed(),
debugInEditor: isDebugInEditorLicensed(),
}); });
if (isLdapEnabled()) { if (isLdapEnabled()) {

View File

@@ -76,6 +76,7 @@ export const LICENSE_FEATURES = {
SOURCE_CONTROL: 'feat:sourceControl', SOURCE_CONTROL: 'feat:sourceControl',
API_DISABLED: 'feat:apiDisabled', API_DISABLED: 'feat:apiDisabled',
WORKFLOW_HISTORY: 'feat:workflowHistory', WORKFLOW_HISTORY: 'feat:workflowHistory',
DEBUG_IN_EDITOR: 'feat:debugInEditor',
} as const; } as const;
export const LICENSE_QUOTAS = { export const LICENSE_QUOTAS = {

View File

@@ -62,6 +62,7 @@ export class E2EController {
[LICENSE_FEATURES.VARIABLES]: false, [LICENSE_FEATURES.VARIABLES]: false,
[LICENSE_FEATURES.API_DISABLED]: false, [LICENSE_FEATURES.API_DISABLED]: false,
[LICENSE_FEATURES.WORKFLOW_HISTORY]: false, [LICENSE_FEATURES.WORKFLOW_HISTORY]: false,
[LICENSE_FEATURES.DEBUG_IN_EDITOR]: false,
}; };
constructor( constructor(

View File

@@ -23,3 +23,8 @@ export function isAdvancedExecutionFiltersEnabled(): boolean {
const license = Container.get(License); const license = Container.get(License);
return license.isAdvancedExecutionFiltersEnabled(); return license.isAdvancedExecutionFiltersEnabled();
} }
export function isDebugInEditorLicensed(): boolean {
const license = Container.get(License);
return license.isDebugInEditorLicensed();
}

View File

@@ -2185,6 +2185,7 @@ export interface IN8nUISettings {
variables: boolean; variables: boolean;
sourceControl: boolean; sourceControl: boolean;
auditLogs: boolean; auditLogs: boolean;
debugInEditor: boolean;
}; };
hideUsagePage: boolean; hideUsagePage: boolean;
license: { license: {