From 63ffe67dad831bdb3a87bacdbca43bea6a9afd0e Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Fri, 4 Aug 2023 12:27:06 +0200 Subject: [PATCH] feat(core): Add workflow history initial setup (no-changelog) (#6852) * feat: Add workflow history initial setup * fix: Add feature to missing controller --- packages/cli/src/License.ts | 4 ++++ packages/cli/src/constants.ts | 1 + packages/cli/src/controllers/e2e.controller.ts | 1 + .../workflows/workflowHistory/workflowHistoryHelper.ee.ts | 7 +++++++ 4 files changed, 13 insertions(+) create mode 100644 packages/cli/src/workflows/workflowHistory/workflowHistoryHelper.ee.ts diff --git a/packages/cli/src/License.ts b/packages/cli/src/License.ts index ed27e8d6b9..f624920abb 100644 --- a/packages/cli/src/License.ts +++ b/packages/cli/src/License.ts @@ -136,6 +136,10 @@ export class License { return this.isFeatureEnabled(LICENSE_FEATURES.SOURCE_CONTROL); } + isWorkflowHistoryLicensed() { + return this.isFeatureEnabled(LICENSE_FEATURES.WORKFLOW_HISTORY); + } + isAPIDisabled() { return this.isFeatureEnabled(LICENSE_FEATURES.API_DISABLED); } diff --git a/packages/cli/src/constants.ts b/packages/cli/src/constants.ts index 699d0def3b..d150054b98 100644 --- a/packages/cli/src/constants.ts +++ b/packages/cli/src/constants.ts @@ -75,6 +75,7 @@ export const LICENSE_FEATURES = { VARIABLES: 'feat:variables', SOURCE_CONTROL: 'feat:sourceControl', API_DISABLED: 'feat:apiDisabled', + WORKFLOW_HISTORY: 'feat:workflowHistory', } as const; export const LICENSE_QUOTAS = { diff --git a/packages/cli/src/controllers/e2e.controller.ts b/packages/cli/src/controllers/e2e.controller.ts index 1160c3f948..7b20d613f9 100644 --- a/packages/cli/src/controllers/e2e.controller.ts +++ b/packages/cli/src/controllers/e2e.controller.ts @@ -61,6 +61,7 @@ export class E2EController { [LICENSE_FEATURES.SOURCE_CONTROL]: false, [LICENSE_FEATURES.VARIABLES]: false, [LICENSE_FEATURES.API_DISABLED]: false, + [LICENSE_FEATURES.WORKFLOW_HISTORY]: false, }; constructor( diff --git a/packages/cli/src/workflows/workflowHistory/workflowHistoryHelper.ee.ts b/packages/cli/src/workflows/workflowHistory/workflowHistoryHelper.ee.ts new file mode 100644 index 0000000000..74e399ab71 --- /dev/null +++ b/packages/cli/src/workflows/workflowHistory/workflowHistoryHelper.ee.ts @@ -0,0 +1,7 @@ +import { License } from '@/License'; +import Container from 'typedi'; + +export function isWorkflowHistoryLicensed() { + const license = Container.get(License); + return license.isWorkflowHistoryLicensed(); +}