UNPKG

@baseplate-dev/project-builder-web

Version:

Web interface for constructing project builder JSON

3 lines (2 loc) 1.81 kB
import{i as t}from"./_virtual___federation_fn_import-C4el_tlG.js";import{j as e}from"./jsx-runtime-D_zvdyIk.js";import{s as f}from"./index-BsqYBobW.js";const{infrastructureSettingsSchema:m}=await t("@baseplate-dev/project-builder-lib"),{useBlockUnsavedChangesNavigate:h,useProjectDefinition:p,useResettableForm:x}=await t("@baseplate-dev/project-builder-lib/web"),{FormActionBar:b,SectionList:g,SectionListSection:j,SectionListSectionContent:S,SectionListSectionHeader:v,SectionListSectionTitle:w,SwitchFieldController:C}=await t("@baseplate-dev/ui-components"),R=function(){const{definition:r,saveDefinitionWithFeedback:o}=p(),a=r.settings.infrastructure??{redis:{enabled:!1}},s=x({resolver:f(m),defaultValues:a}),{handleSubmit:c,control:i,reset:l}=s,n=c(d=>o(u=>{u.settings.infrastructure=d}));return h({control:i,reset:l,onSubmit:n}),e.jsxs("form",{className:"relative h-full max-h-full pb-(--action-bar-height)",onSubmit:n,children:[e.jsxs("div",{className:"flex h-full max-h-full flex-1 flex-col overflow-y-auto px-6",children:[e.jsxs("div",{className:"sticky top-0 border-b bg-background py-6",children:[e.jsx("h1",{children:"Infrastructure Configuration"}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Configure optional infrastructure services for your project. These services are shared across all backend applications. PostgreSQL is always enabled and requires no configuration."})]}),e.jsx(g,{children:e.jsxs(j,{children:[e.jsx(v,{children:e.jsx(w,{children:"Redis Cache"})}),e.jsx(S,{className:"flex max-w-md flex-col gap-4",children:e.jsx(C,{name:"redis.enabled",label:"Enable Redis",description:"Redis is used for caching, sessions, and queue management.",control:i})})]})})]}),e.jsx(b,{form:s})]})};export{R as component}; //# sourceMappingURL=infrastructure-JzLO2TM3.js.map