Massive refactor (#165)

This commit is contained in:
Oliver King
2022-02-02 09:07:53 -05:00
committed by GitHub
parent 5cbd4acaca
commit ca8d2604ac
139 changed files with 19176 additions and 17005 deletions
+19
View File
@@ -0,0 +1,19 @@
export enum DeploymentStrategy {
CANARY = "canary",
BLUE_GREEN = "blue-green",
}
/**
* Converts a string to the DeploymentStrategy enum
* @param str The deployment strategy (case insensitive)
* @returns The DeploymentStrategy enum or undefined if it can't be parsed
*/
export const parseDeploymentStrategy = (
str: string
): DeploymentStrategy | undefined =>
DeploymentStrategy[
Object.keys(DeploymentStrategy).filter(
(k) =>
DeploymentStrategy[k].toString().toLowerCase() === str.toLowerCase()
)[0] as keyof typeof DeploymentStrategy
];