Skip to content

Commit

Permalink
chore: add flag for improved project creation (#6870)
Browse files Browse the repository at this point in the history
This PR adds the flag for the improved project creation flag to Unleash.
  • Loading branch information
thomasheartman committed Apr 16, 2024
1 parent 023e159 commit ef23cc0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export type UiFlags = {
featureLifecycle?: boolean;
scimApi?: boolean;
projectListFilterMyProjects?: boolean;
createProjectWithEnvironmentConfig?: boolean;
};

export interface IVersionInfo {
Expand Down
1 change: 1 addition & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ exports[`should create default config 1`] = `
"caseInsensitiveInOperators": false,
"celebrateUnleash": false,
"collectTrafficDataUsage": false,
"createProjectWithEnvironmentConfig": false,
"demo": false,
"disableBulkToggle": false,
"disableMetrics": false,
Expand Down
7 changes: 6 additions & 1 deletion src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export type IFlagKey =
| 'projectOverviewRefactorFeedback'
| 'featureLifecycle'
| 'projectListFilterMyProjects'
| 'parseProjectFromSession';
| 'parseProjectFromSession'
| 'createProjectWithEnvironmentConfig';

export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;

Expand Down Expand Up @@ -292,6 +293,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_PARSE_PROJECT_FROM_SESSION,
false,
),
createProjectWithEnvironmentConfig: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_CREATE_PROJECT_WITH_ENVIRONMENT_CONFIG,
false,
),
};

export const defaultExperimentalOptions: IExperimentalOptions = {
Expand Down
1 change: 1 addition & 0 deletions src/server-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ process.nextTick(async () => {
featureLifecycle: true,
projectListFilterMyProjects: true,
parseProjectFromSession: true,
createProjectWithEnvironmentConfig: true,
},
},
authentication: {
Expand Down

0 comments on commit ef23cc0

Please sign in to comment.