-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIN-5931: added SH feature flag and whitelist (#1369)
- Loading branch information
1 parent
7ded6c9
commit 9fd0fe7
Showing
7 changed files
with
139 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { z } from "zod"; | ||
|
||
export const FeatureFlagsConfig = z | ||
.object({ | ||
FEATURE_FLAG_SIGNALHUB_WHITELIST: z | ||
.enum(["true", "false"]) | ||
.default("false") | ||
.transform((value) => value === "true"), | ||
SIGNALHUB_WHITELIST: z | ||
.string() | ||
.transform((value) => value.split(",")) | ||
.pipe(z.array(z.string().uuid())) | ||
.optional(), | ||
}) | ||
.transform((c) => ({ | ||
featureFlagSignalhubWhitelist: c.FEATURE_FLAG_SIGNALHUB_WHITELIST, | ||
signalhubWhitelist: c.SIGNALHUB_WHITELIST, | ||
})); | ||
|
||
export type FeatureFlagsConfig = z.infer<typeof FeatureFlagsConfig>; |
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