From e4d823b0426c26ac38161603e4b4b6e958b5eed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Tue, 16 Jul 2024 14:08:01 +0100 Subject: [PATCH] chore: add integrationEvents feature flag --- src/lib/__snapshots__/create-config.test.ts.snap | 1 + src/lib/types/experimental.ts | 7 ++++++- src/server-dev.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index ec18e916e79b..52bac8e4881e 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -127,6 +127,7 @@ exports[`should create default config 1`] = ` "flagCreator": false, "googleAuthEnabled": false, "insightsV2": false, + "integrationEvents": false, "killInsightsUI": false, "killScheduledChangeRequestCache": false, "maintenanceMode": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 2cc86ea82a97..14e013af6de8 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -67,7 +67,8 @@ export type IFlagKey = | 'cleanApiTokenWhenOrphaned' | 'allowOrphanedWildcardTokens' | 'removeUnsafeInlineStyleSrc' - | 'insightsV2'; + | 'insightsV2' + | 'integrationEvents'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -324,6 +325,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_INSIGHTS_V2, false, ), + integrationEvents: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_INTEGRATION_EVENTS, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = { diff --git a/src/server-dev.ts b/src/server-dev.ts index 877ed1065c8b..36f141ea2047 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -57,6 +57,7 @@ process.nextTick(async () => { resourceLimits: true, extendedMetrics: true, insightsV2: true, + integrationEvents: true, }, }, authentication: {