Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
import { parsePlansEnv } from "@webstudio-is/plans";
import env from "../app/env/env.server";
const plans = parsePlansEnv(env.PLANS);
const getE2ePaidPlanName = () => {
const planName = [...plans.values()].find(
({ features }) =>
features.allowAdditionalPermissions && features.allowContentMode
)?.name;
if (planName !== undefined) {
return planName;
}
throw new Error(
"Expected PLANS to include a plan with allowAdditionalPermissions and allowContentMode for e2e"
);
};
export const e2ePaidPlanName = getE2ePaidPlanName();
const getE2eEmailPlanName = () => {
const planName = [...plans.values()].find(
({ features }) =>
features.allowContentMode && features.maxContactEmailsPerProject >= 2
)?.name;
if (planName !== undefined) {
return planName;
}
throw new Error(
"Expected PLANS to include a plan with content mode and at least 2 contact emails for e2e"
);
};
export const e2eEmailPlanName = getE2eEmailPlanName();