diff --git a/packages/ee/lib/service.ts b/packages/ee/lib/service.ts index 9df36423d0..0381c73f95 100644 --- a/packages/ee/lib/service.ts +++ b/packages/ee/lib/service.ts @@ -1,10 +1,7 @@ import "server-only"; -import { env } from "../../../apps/web/env.mjs"; import { unstable_cache } from "next/cache"; - -// Enterprise License constant -export const ENTERPRISE_LICENSE_KEY = env.ENTERPRISE_LICENSE_KEY; +import { ENTERPRISE_LICENSE_KEY } from "@formbricks/lib/constants"; export const getIsEnterpriseEdition = () => unstable_cache( diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts index dce561ed90..4ab78d2d02 100644 --- a/packages/lib/constants.ts +++ b/packages/lib/constants.ts @@ -1,7 +1,5 @@ import "server-only"; import path from "path"; -import { env } from "@/env.mjs"; -import { unstable_cache } from "next/cache"; export const IS_FORMBRICKS_CLOUD = process.env.IS_FORMBRICKS_CLOUD === "1"; export const REVALIDATION_INTERVAL = 0; //TODO: find a good way to cache and revalidate data when it changes @@ -85,16 +83,4 @@ export const LOCAL_UPLOAD_URL = { export const PRICING_USERTARGETING_FREE_MTU = 2500; export const PRICING_APPSURVEYS_FREE_RESPONSES = 250; // Enterprise License constant -export const ENTERPRISE_LICENSE_KEY = env.ENTERPRISE_LICENSE_KEY; - -export const getIsEnterpriseEdition = () => - unstable_cache( - async () => { - if (ENTERPRISE_LICENSE_KEY) { - return ENTERPRISE_LICENSE_KEY?.length > 0; - } - return false; - }, - ["isEE"], - { revalidate: 60 * 60 * 24 } - )(); +export const ENTERPRISE_LICENSE_KEY = process.env.ENTERPRISE_LICENSE_KEY;