diff --git a/ui/changelog.d/drop-unused-deployment-mode-env.removed.md b/ui/changelog.d/drop-unused-deployment-mode-env.removed.md new file mode 100644 index 0000000000..9261cd9523 --- /dev/null +++ b/ui/changelog.d/drop-unused-deployment-mode-env.removed.md @@ -0,0 +1 @@ +Removed the unused `NEXT_PUBLIC_PROWLER_DEPLOYMENT_MODE` variable and its `getDeploymentMode` helper; no build ever set it and nothing read the result, so Cloud versus self-hosted behavior is decided solely by the runtime `UI_CLOUD_ENABLED` flag diff --git a/ui/lib/deployment.ts b/ui/lib/deployment.ts index 4687ba4f3c..8fb5e16c56 100644 --- a/ui/lib/deployment.ts +++ b/ui/lib/deployment.ts @@ -1,23 +1,5 @@ import { isCloud } from "./shared/env"; -export const DEPLOYMENT_MODE = { - CLOUD: "cloud", - ON_PREMISE: "onpremise", -} as const; - export const PROWLER_CLOUD_ONLY_TOOLTIP = "Available only in Prowler Cloud"; -export type DeploymentMode = - (typeof DEPLOYMENT_MODE)[keyof typeof DEPLOYMENT_MODE]; - -export const getDeploymentMode = (): DeploymentMode | undefined => { - const mode = process.env.NEXT_PUBLIC_PROWLER_DEPLOYMENT_MODE; - - if (mode === DEPLOYMENT_MODE.CLOUD || mode === DEPLOYMENT_MODE.ON_PREMISE) { - return mode; - } - - return undefined; -}; - export const isGroupedJiraDispatchEnabled = (): boolean => isCloud();