From a0ba44d9f4e44f988b10659f27b06da452de6d73 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Fri, 19 Jul 2024 10:11:39 +0200 Subject: [PATCH] chore: feature collaborators flag (#7623) --- frontend/src/interfaces/uiConfig.ts | 1 + src/lib/__snapshots__/create-config.test.ts.snap | 1 + src/lib/types/experimental.ts | 7 ++++++- src/server-dev.ts | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index 0a7287509a..64cf61575b 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -92,6 +92,7 @@ export type UiFlags = { flagCreator?: boolean; resourceLimits?: boolean; insightsV2?: boolean; + featureCollaborators?: boolean; }; export interface IVersionInfo { diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index 52bac8e488..c4fbda17d0 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -104,6 +104,7 @@ exports[`should create default config 1`] = ` "estimateTrafficDataCost": false, "extendedMetrics": false, "extendedUsageMetrics": false, + "featureCollaborators": false, "featureLifecycle": false, "featureSearchFeedback": { "enabled": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 14e013af6d..09c5c630d0 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -68,7 +68,8 @@ export type IFlagKey = | 'allowOrphanedWildcardTokens' | 'removeUnsafeInlineStyleSrc' | 'insightsV2' - | 'integrationEvents'; + | 'integrationEvents' + | 'featureCollaborators'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -329,6 +330,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_INTEGRATION_EVENTS, false, ), + featureCollaborators: parseEnvVarBoolean( + process.env.UNEASH_EXPERIMENTAL_FEATURE_COLLABORATORS, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = { diff --git a/src/server-dev.ts b/src/server-dev.ts index 36f141ea20..215f7e839e 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -58,6 +58,7 @@ process.nextTick(async () => { extendedMetrics: true, insightsV2: true, integrationEvents: true, + featureCollaborators: true, }, }, authentication: {