-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(infra): translation manager feature flag
- Loading branch information
1 parent
4991111
commit b4c1c7f
Showing
10 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...tion-generic/src/usecases/get-feature-flag/get-is-translation-manager-enabled.use-case.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { FeatureFlagsKeysEnum } from '@novu/shared'; | ||
|
||
import { | ||
GetFeatureFlagCommand, | ||
FeatureFlagCommand, | ||
} from './get-feature-flag.command'; | ||
import { GetFeatureFlag } from './get-feature-flag.use-case'; | ||
|
||
@Injectable() | ||
export class GetIsTranslationManagerEnabled extends GetFeatureFlag { | ||
async execute(featureFlagCommand: FeatureFlagCommand): Promise<boolean> { | ||
const value = process.env.IS_TRANSLATION_MANAGER_ENABLED; | ||
const fallbackValue = false; | ||
const defaultValue = this.prepareBooleanStringFeatureFlag( | ||
value, | ||
fallbackValue | ||
); | ||
const key = FeatureFlagsKeysEnum.IS_TRANSLATION_MANAGER_ENABLED; | ||
|
||
const command = this.buildCommand(key, defaultValue, featureFlagCommand); | ||
|
||
return await this.featureFlagsService.getWithContext(command); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters