@hubspot/cms-dev-server 0.18.26 → 0.18.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -151,4 +151,4 @@ Error generating stack: `+l.message+`
151
151
 
152
152
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
153
153
 
154
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},px="DialogDescriptionWarning",mx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gm(px).contentName}}.`;return y.useEffect(()=>{var l;const o=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},hx=rm,vx=lm,gx=sm,ym=am,xm=um,wm=dm,Cm=pm,Sm=hm;const yx=hx,xx=vx,wx=Sm,Cx=gx,km=y.forwardRef(({className:e,...t},n)=>m.jsx(ym,{className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));km.displayName=ym.displayName;const Sx=Bp("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Em=y.forwardRef(({side:e="right",className:t,children:n,...r},o)=>m.jsxs(Cx,{children:[m.jsx(km,{}),m.jsxs(xm,{ref:o,className:le(Sx({side:e}),t),...r,children:[n,m.jsxs(Sm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[m.jsx(ry,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Em.displayName=xm.displayName;const Nm=({className:e,...t})=>m.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});Nm.displayName="SheetHeader";const Pm=({className:e,...t})=>m.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Pm.displayName="SheetFooter";const Tm=y.forwardRef(({className:e,...t},n)=>m.jsx(wm,{ref:n,className:le("text-lg font-semibold text-foreground",e),...t}));Tm.displayName=wm.displayName;const jm=y.forwardRef(({className:e,...t},n)=>m.jsx(Cm,{ref:n,className:le("text-sm text-muted-foreground",e),...t}));jm.displayName=Cm.displayName;var hn=(e=>(e.REACT="react",e.HUBL="hubl",e))(hn||{});function Ai({className:e,...t}){return m.jsx("div",{className:le("animate-pulse rounded-md bg-muted",e),...t})}function kx(e,t){const[n,r]=y.useState({moduleDependencies:null,isLoading:!1,error:null});return y.useEffect(()=>{e&&(r(o=>({...o,isLoading:!0})),fetch(`/api/module-pages?path=${encodeURIComponent(e)}&portalId=${t}`).then(o=>o.ok?o.json():Promise.reject(new Error("Failed to fetch module pages"))).then(o=>r({moduleDependencies:o,isLoading:!1,error:null})).catch(o=>r({moduleDependencies:null,isLoading:!1,error:String(o)})))},[e]),n}const Ex=({pages:e,componentType:t})=>{if(e.length===0)return m.jsxs("div",{children:["No pages found using this ",t]});function n(r){return r?r.split("_").map(o=>o.charAt(0)+o.slice(1).toLowerCase()).join(" "):""}return m.jsxs(Va,{className:"border text-[16px]",containerClassName:"h-fit max-h-[770px] overflow-y-auto relative",children:[m.jsx(Ha,{children:m.jsxs(Yr,{children:[m.jsx(xl,{className:"border",children:"Page Name"}),m.jsx(xl,{className:"border",children:"Page Type"})]})}),m.jsx(Qa,{className:"overflow-y-auto",children:e.map((r,o)=>m.jsxs(Yr,{className:"odd:bg-white even:bg-gray-50",children:[m.jsx(Ot,{className:"border",children:r.label}),m.jsx(Ot,{className:"border",children:n(r.subType)})]},o))})]})},Nx=({componentType:e,authedPortalId:t,projectName:n,webRootProjectComponentFolder:r,isOpen:o,moduleData:l})=>{const i=l.type===hn.REACT?`@projects/${n}/${r}/components/modules/${l.nameWithExtension}`:l.subPath,{moduleDependencies:s,isLoading:a,error:u}=kx(o?i:null,t);return m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-between items-center mb-3 gap-8",children:[m.jsx("h2",{className:"text-2xl font-semibold leading-9 decoration-skip-ink",children:"Dependencies"}),a?m.jsx(Ai,{className:"h-[20px] flex-1"}):s&&m.jsx("span",{className:"text-lg font-bold leading-8",children:`${s.length} ${s.length===1?"page uses":"pages use"} this ${e}`})]}),a?m.jsxs("div",{className:"space-y-2",children:[m.jsx(Ai,{className:"h-[20px] w-full"}),m.jsx(Ai,{className:"h-[20px] w-full"})]}):u?m.jsxs("div",{className:"text-red-500",children:["Error loading dependencies: ",u]}):m.jsx(Ex,{pages:s||[],componentType:e})]})},Px=({moduleData:e,themeWebRoot:t})=>{var i;const n=JSON.stringify(e.fieldsJson,null,2),r=e.type===hn.REACT?e.subPath:`hubl/${(i=e.subPath)==null?void 0:i.split("/hubl/")[1]}`,o=e.type===hn.REACT?`${t}/${r}.${e.extension}`:`${t}/${r}.module/fields.json`,l=()=>{o&&fetch(`/api/open-file?path=${encodeURIComponent(o)}`).catch(s=>console.error("Failed to open file:",s))};return m.jsxs("div",{className:"flex flex-col",children:[m.jsx("h2",{className:"text-2xl font-semibold leading-8",children:"JSON Fields"}),n?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"relative mt-6 mb-3",children:[m.jsx(Ue,{variant:"outline",size:"icon",className:"w-6 h-6 text-xs rounded-md absolute top-1.5 right-1.5 z-10 opacity-90",onClick:()=>navigator.clipboard.writeText(n),children:m.jsx(Hp,{})}),m.jsx("div",{className:"rounded-xl overflow-hidden p-4 bg-[#0F172A]",children:m.jsx("pre",{className:"text-[14px] font-medium leading-6 text-[#9CDCFE] whitespace-pre-wrap",children:n})})]}),m.jsx("div",{children:m.jsx(Ue,{variant:"outline",onClick:l,children:"View Editor"})})]}):m.jsx("p",{children:"No fields found"})]})},Tx=({moduleData:e,componentType:t,themeWebRoot:n,authedPortalId:r,projectName:o,webRootProjectComponentFolder:l,children:i})=>{var c;const[s,a]=y.useState(!1),u=t.charAt(0).toUpperCase()+t.slice(1);return m.jsxs(yx,{onOpenChange:a,children:[m.jsx(xx,{asChild:!0,children:i}),m.jsxs(Em,{className:"sm:max-w-xl overflow-y-scroll","aria-describedby":"sheet-title",children:[m.jsxs(Nm,{children:[m.jsx(Tm,{className:"text-xl font-semibold leading-8 pb-8",children:m.jsx("span",{id:"sheet-title",children:m.jsxs(m.Fragment,{children:[e.name," - ",u," Details"]})})}),m.jsxs(jm,{className:"text-sm leading-5",children:[m.jsx("strong",{children:"Directory Path:"})," ",e.type===hn.REACT?e.subPath:`hubl/${((c=e.subPath)==null?void 0:c.split("/hubl/")[1])||e.subPath}`]})]}),m.jsx("div",{className:"grid gap-6 pb-6 my-6 border-b border-gray-300",children:m.jsx(Nx,{componentType:t,authedPortalId:r,projectName:o,webRootProjectComponentFolder:l,isOpen:s,moduleData:e})}),m.jsx("div",{className:"grid gap-6 my-6",children:m.jsx(Px,{moduleData:e,themeWebRoot:n})}),m.jsx(Pm,{className:"",children:m.jsx(wx,{asChild:!0,children:m.jsx(Ue,{variant:"outline",type:"submit",children:"Close"})})})]})]})},jx=(e,t,n,r,o)=>{if(!n.nameWithExtension)throw new Error(`Could not find component: ${n.name}`);const l=n.type===hn.REACT?`@projects/${e}/${t}/components/modules/${n.nameWithExtension}`:n.subPath;return`https://app.hubspot${o==="qa"?"qa":""}.com/design-previewer/${r}/modules/p/${l}`},_x=({component:e,componentType:t,onPreviewClick:n,onViewLocalClick:r})=>m.jsxs("div",{className:"flex gap-2",children:[t==="module"&&m.jsx(Ue,{variant:"outline",onClick:()=>n(e),children:"View in app"}),m.jsx(Ue,{variant:"outline",onClick:()=>r(e),children:"View local version"})]});function Rx({componentList:e,headers:t,webRootProjectComponentFolder:n,themeWebRoot:r,projectName:o,authedPortalId:l,componentType:i,authedEnv:s}){const a=c=>{try{const d=jx(o,n,c,l,s);window.open(d,"_blank")}catch(d){console.error("Failed to open preview:",d)}},u=c=>{try{let d;switch(i){case"module":d=c.type==="react"?`/preview/module/${c.name}`:`/hublmodule/${c.subPath}`;break;case"template":d=`/template/${c.subPath}`;break;case"partial":d=`/partial/${c.name}`;break;default:throw new Error(`Unknown component type: ${i}`)}window.open(d,"_blank")}catch(d){console.error("Failed to open preview:",d)}};return m.jsxs(Va,{className:"border text-[16px]",containerClassName:"h-fit max-h-[770px] overflow-y-auto relative",children:[m.jsx(Ha,{children:m.jsx(Yr,{className:"",children:t.map((c,d)=>m.jsx(xl,{className:"border",children:c},d))})}),m.jsx(Qa,{className:"overflow-y-auto",children:e.map((c,d)=>m.jsxs(Yr,{className:"odd:bg-white even:bg-gray-50",children:[c.name&&m.jsx(Ot,{className:"border",children:i==="module"?m.jsx(Tx,{moduleData:c,componentType:i,themeWebRoot:r,authedPortalId:l,projectName:o,webRootProjectComponentFolder:n,children:m.jsx("span",{className:"underline cursor-pointer",children:c.name})}):m.jsx("span",{children:c.name})}),c.type&&m.jsx(Ot,{className:"border",children:m.jsxs("div",{className:"flex items-center gap-2",children:[c.type==="react"?m.jsx(cy,{}):m.jsx(Z0,{}),m.jsx("span",{children:c.type==="react"?"React":"HubL"})]})}),c.dateCreated&&m.jsx(Ot,{className:"border",children:c.dateCreated}),c.status&&m.jsx(Ot,{className:"border",children:c.status}),m.jsx(Ot,{className:"border",children:m.jsx(_x,{component:c,componentType:i,onPreviewClick:a,onViewLocalClick:u})})]},d))})]})}const Li=({id:e,header:t,componentType:n,subtext:r,headers:o,data:l,webRootProjectComponentFolder:i,themeWebRoot:s,projectName:a,authedPortalId:u,authedEnv:c})=>m.jsxs("div",{id:e,className:"mb-16",children:[m.jsx("h2",{className:"font-inter text-2xl font-semibold leading-9 tracking-tight text-left mb-6",children:t}),r&&m.jsx("p",{className:"font-inter text-base font-normal leading-7 text-left mb-5",children:r}),m.jsx(Rx,{authedEnv:c,componentList:l,headers:o,webRootProjectComponentFolder:i,themeWebRoot:s,projectName:a,authedPortalId:u,componentType:n})]}),Ox=({modulesData:e,partialsData:t,hubLModules:n,hubLTemplates:r,webRootProjectComponentFolder:o,themeWebRoot:l,projectName:i,authedPortalId:s,authedEnv:a})=>{const u=(x,w)=>x.map(g=>({...g,type:w})),c=[...u(e,"react"),...n.map(x=>({...x,type:"hubl"}))],d=[...u(t,"react")],h=r.map(x=>({...x,type:hn.HUBL}));return m.jsxs("div",{className:"mt-12",children:[m.jsx(Li,{id:"modules-table",header:"Modules",componentType:"module",headers:["Name","Type","Actions"],data:c,webRootProjectComponentFolder:o,themeWebRoot:l,projectName:i,authedPortalId:s,authedEnv:a}),m.jsx(Li,{id:"partials-table",header:"Partials",componentType:"partial",headers:["Name","Type","Actions"],data:d}),m.jsx(Li,{id:"templates-table",header:"Templates",componentType:"template",headers:["Name","Type","Actions"],data:h})]})};var bx="Separator",Ic="horizontal",Ax=["horizontal","vertical"],_m=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ic,...o}=e,l=Lx(r)?r:Ic,s=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return m.jsx(we.div,{"data-orientation":l,...s,...o,ref:t})});_m.displayName=bx;function Lx(e){return Ax.includes(e)}var Rm=_m;const Om=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>m.jsx(Rm,{ref:o,decorative:n,orientation:t,className:le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Om.displayName=Rm.displayName;const Mx=()=>{const e=[{href:"https://www.youtube.com/playlist?list=PLjtLN8FCj4SljVFvkJbSk9J5hq4KTKYcB&jct=pci9oBKT6ttPIJIGKv-rVg",text:"CMS React Videos"},{href:"https://developers.hubspot.com/beta-docs/guides/cms/content/modules/build-modules-and-partials-with-react",text:"React Docs"},{href:"https://react.dev",text:"Learn React"},{href:"https://github.com/HubSpot/cms-react/tree/main/examples",text:"Github Examples"}];return m.jsx("footer",{className:"w-full py-16",children:m.jsx("nav",{className:"flex justify-center items-center gap-4 text-gray-900 text-sm font-normal",children:e.map((t,n)=>m.jsxs(Vo.Fragment,{children:[m.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",children:t.text}),n<e.length-1&&m.jsx(Om,{className:"bg-gray-200 h-4",orientation:"vertical"})]},n))})})};function Dx({size:e=24,...t}){return m.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("circle",{cx:"20",cy:"20",r:"20",fill:"url(#paint0_linear_6129_76863)"}),m.jsx("mask",{id:"mask0_6129_76863",maskUnits:"userSpaceOnUse",x:"8",y:"7",width:"24",height:"28",children:m.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.18164 7.27271H31.6885V34.3423H8.18164V7.27271Z",fill:"white"})}),m.jsx("g",{mask:"url(#mask0_6129_76863)",children:m.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.2583 26.7794C23.4375 26.7794 21.9612 25.1574 21.9612 23.1566C21.9612 21.1557 23.4375 19.5336 25.2583 19.5336C27.0789 19.5336 28.555 21.1557 28.555 23.1566C28.555 25.1574 27.0789 26.7794 25.2583 26.7794ZM26.2452 16.1818V12.9592C27.0106 12.5618 27.5471 11.7108 27.5471 10.7231V10.6487C27.5471 9.28578 26.532 8.17055 25.292 8.17055H25.2242C23.984 8.17055 22.969 9.28578 22.969 10.6487V10.7231C22.969 11.7108 23.5055 12.5618 24.2709 12.9592V16.182C23.1313 16.3754 22.0899 16.892 21.2306 17.6522L13.1786 10.7689C13.2315 10.5449 13.2687 10.314 13.269 10.0716C13.2708 8.52773 12.1334 7.27469 10.7285 7.27271C9.32372 7.27072 8.1833 8.52062 8.18164 10.0645C8.17984 11.6082 9.31724 12.8613 10.7222 12.8632C11.18 12.8639 11.6036 12.721 11.9752 12.4889L19.8959 19.26C19.2222 20.3773 18.8278 21.7158 18.8278 23.1566C18.8278 24.665 19.2614 26.0602 19.9943 27.2079L17.5855 29.8549C17.395 29.7922 17.1973 29.7482 16.9881 29.7482C15.8338 29.7482 14.8978 30.7767 14.8978 32.0453C14.8978 33.3139 15.8338 34.3423 16.9881 34.3423C18.1426 34.3423 19.0785 33.3139 19.0785 32.0453C19.0785 31.8155 19.0386 31.5981 18.9814 31.389L21.3641 28.7706C22.4457 29.678 23.7925 30.2228 25.2582 30.2228C28.8096 30.2228 31.6885 27.0591 31.6885 23.1566C31.6885 19.6236 29.3267 16.7049 26.2452 16.1818Z",fill:"white"})}),m.jsx("defs",{children:m.jsxs("linearGradient",{id:"paint0_linear_6129_76863",x1:"0",y1:"0",x2:"0",y2:"40",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#FF8F59"}),m.jsx("stop",{offset:"1",stopColor:"#FF7A59"})]})})]})}function zx({onClose:e}){const t=y.useCallback(()=>{navigator.clipboard.writeText("hs init"),window.open("terminal://open?path=.","_blank"),window.location.reload()},[]);return m.jsx("div",{className:"w-full max-w-2xl bg-background border rounded-lg shadow-lg p-8 mx-4",children:m.jsxs("div",{className:"flex flex-col items-center justify-center space-y-6 text-center",children:[m.jsx("div",{className:"bg-slate-900/90 rounded-lg p-6 w-full",children:m.jsxs("div",{className:"flex items-center justify-center gap-3",children:[m.jsx(ty,{className:"w-8 h-8 text-white"}),m.jsx(X0,{className:"w-8 h-8 text-slate-400"}),m.jsx(Dx,{size:32,className:"text-[#ff7a59]"})]})}),m.jsx("div",{className:"space-y-2",children:m.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Enjoy the full preview experience by connecting to HubSpot"})}),m.jsx("div",{className:"space-y-4 max-w-md",children:m.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[m.jsxs("p",{children:["Connect by using the"," ",m.jsx("code",{className:"bg-slate-100 px-1.5 py-0.5 rounded text-slate-900",children:"hs init"})," ","command to create a new config file. Ensure there's a"," ",m.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded-md",children:"hubspot.config.yaml"})," ","in the folder (or a parent)."]}),m.jsx("p",{children:"By connecting and authenticating you can use local proxy functionality and module preview routes."}),m.jsx("p",{className:"italic",children:`You can work on modules locally at "/module/[module_name]", but we won't have all your account data to display in this server.`})]})}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx(Ue,{variant:"outline",onClick:e,children:"Close"}),m.jsx(Ue,{onClick:t,children:"Connect Now"})]})]})})}function Ix({initialProps:e}){const{projectName:t,authedEnv:n,authedPortalId:r,modulesData:o,hubLModules:l,partialsData:i,hubLTemplates:s,webRootProjectComponentFolder:a,themeWebRoot:u}=e,[c,d]=y.useState(!r),h=()=>{d(!1)};return m.jsx(V0,{children:m.jsxs("div",{className:"container relative pt-8",children:[m.jsx(sy,{projectName:t,authedPortalId:r,modulesData:o,partialsData:i,hubLModules:l}),m.jsx(Ox,{modulesData:o,hubLModules:l,partialsData:i,hubLTemplates:s,webRootProjectComponentFolder:a,themeWebRoot:u,projectName:t,authedPortalId:r,authedEnv:n}),m.jsx(Mx,{}),c&&m.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm",children:m.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:m.jsx(zx,{onClose:h})})})]})})}const Fx=window==null?void 0:window.__hsInitialProps;qf(document.getElementById("root"),m.jsx(y.StrictMode,{children:m.jsx(Ix,{initialProps:Fx})}));
154
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},px="DialogDescriptionWarning",mx=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gm(px).contentName}}.`;return y.useEffect(()=>{var l;const o=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},hx=rm,vx=lm,gx=sm,ym=am,xm=um,wm=dm,Cm=pm,Sm=hm;const yx=hx,xx=vx,wx=Sm,Cx=gx,km=y.forwardRef(({className:e,...t},n)=>m.jsx(ym,{className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));km.displayName=ym.displayName;const Sx=Bp("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Em=y.forwardRef(({side:e="right",className:t,children:n,...r},o)=>m.jsxs(Cx,{children:[m.jsx(km,{}),m.jsxs(xm,{ref:o,className:le(Sx({side:e}),t),...r,children:[n,m.jsxs(Sm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[m.jsx(ry,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Em.displayName=xm.displayName;const Nm=({className:e,...t})=>m.jsx("div",{className:le("flex flex-col space-y-2 text-center sm:text-left",e),...t});Nm.displayName="SheetHeader";const Pm=({className:e,...t})=>m.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Pm.displayName="SheetFooter";const Tm=y.forwardRef(({className:e,...t},n)=>m.jsx(wm,{ref:n,className:le("text-lg font-semibold text-foreground",e),...t}));Tm.displayName=wm.displayName;const jm=y.forwardRef(({className:e,...t},n)=>m.jsx(Cm,{ref:n,className:le("text-sm text-muted-foreground",e),...t}));jm.displayName=Cm.displayName;var hn=(e=>(e.REACT="react",e.HUBL="hubl",e))(hn||{});function Ai({className:e,...t}){return m.jsx("div",{className:le("animate-pulse rounded-md bg-muted",e),...t})}function kx(e,t){const[n,r]=y.useState({moduleDependencies:null,isLoading:!1,error:null});return y.useEffect(()=>{e&&(r(o=>({...o,isLoading:!0})),fetch(`/api/module-pages?path=${encodeURIComponent(e)}&portalId=${t}`).then(o=>o.ok?o.json():Promise.reject(new Error("Failed to fetch module pages"))).then(o=>r({moduleDependencies:o,isLoading:!1,error:null})).catch(o=>r({moduleDependencies:null,isLoading:!1,error:String(o)})))},[e]),n}const Ex=({pages:e,componentType:t})=>{if(e.length===0)return m.jsxs("div",{children:["No pages found using this ",t]});function n(r){return r?r.split("_").map(o=>o.charAt(0)+o.slice(1).toLowerCase()).join(" "):""}return m.jsxs(Va,{className:"border text-[16px]",containerClassName:"h-fit max-h-[770px] overflow-y-auto relative",children:[m.jsx(Ha,{children:m.jsxs(Yr,{children:[m.jsx(xl,{className:"border",children:"Page Name"}),m.jsx(xl,{className:"border",children:"Page Type"})]})}),m.jsx(Qa,{className:"overflow-y-auto",children:e.map((r,o)=>m.jsxs(Yr,{className:"odd:bg-white even:bg-gray-50",children:[m.jsx(Ot,{className:"border",children:r.label}),m.jsx(Ot,{className:"border",children:n(r.subType)})]},o))})]})},Nx=({componentType:e,authedPortalId:t,projectName:n,webRootProjectComponentFolder:r,isOpen:o,moduleData:l})=>{const i=l.type===hn.REACT?`@projects/${n}/${r}/components/modules/${l.nameWithExtension}`:l.subPath,{moduleDependencies:s,isLoading:a,error:u}=kx(o?i:null,t);return m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-between items-center mb-3 gap-8",children:[m.jsx("h2",{className:"text-2xl font-semibold leading-9 decoration-skip-ink",children:"Dependencies"}),a?m.jsx(Ai,{className:"h-[20px] flex-1"}):s&&m.jsx("span",{className:"text-lg font-bold leading-8",children:`${s.length} ${s.length===1?"page uses":"pages use"} this ${e}`})]}),a?m.jsxs("div",{className:"space-y-2",children:[m.jsx(Ai,{className:"h-[20px] w-full"}),m.jsx(Ai,{className:"h-[20px] w-full"})]}):u?m.jsxs("div",{className:"text-red-500",children:["Error loading dependencies: ",u]}):m.jsx(Ex,{pages:s||[],componentType:e})]})},Px=({moduleData:e,themeWebRoot:t})=>{var i;const n=JSON.stringify(e.fieldsJson,null,2),r=e.type===hn.REACT?e.subPath:`hubl/${(i=e.subPath)==null?void 0:i.split("/hubl/")[1]}`,o=e.type===hn.REACT?`${t}/${r}.${e.extension}`:`${t}/${r}.module/fields.json`,l=()=>{o&&fetch(`/api/open-file?path=${encodeURIComponent(o)}`).catch(s=>console.error("Failed to open file:",s))};return m.jsxs("div",{className:"flex flex-col",children:[m.jsx("h2",{className:"text-2xl font-semibold leading-8",children:"JSON Fields"}),n?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"relative mt-6 mb-3",children:[m.jsx(Ue,{variant:"outline",size:"icon",className:"w-6 h-6 text-xs rounded-md absolute top-1.5 right-1.5 z-10 opacity-90",onClick:()=>navigator.clipboard.writeText(n),children:m.jsx(Hp,{})}),m.jsx("div",{className:"rounded-xl overflow-hidden p-4 bg-[#0F172A]",children:m.jsx("pre",{className:"text-[14px] font-medium leading-6 text-[#9CDCFE] whitespace-pre-wrap",children:n})})]}),m.jsx("div",{children:m.jsx(Ue,{variant:"outline",onClick:l,children:"View Editor"})})]}):m.jsx("p",{children:"No fields found"})]})},Tx=({moduleData:e,componentType:t,themeWebRoot:n,authedPortalId:r,projectName:o,webRootProjectComponentFolder:l,children:i})=>{var c;const[s,a]=y.useState(!1),u=t.charAt(0).toUpperCase()+t.slice(1);return m.jsxs(yx,{onOpenChange:a,children:[m.jsx(xx,{asChild:!0,children:i}),m.jsxs(Em,{className:"sm:max-w-xl overflow-y-scroll","aria-describedby":"sheet-title",children:[m.jsxs(Nm,{children:[m.jsx(Tm,{className:"text-xl font-semibold leading-8 pb-8",children:m.jsx("span",{id:"sheet-title",children:m.jsxs(m.Fragment,{children:[e.name," - ",u," Details"]})})}),m.jsxs(jm,{className:"text-sm leading-5",children:[m.jsx("strong",{children:"Directory Path:"})," ",e.type===hn.REACT?e.subPath:`hubl/${((c=e.subPath)==null?void 0:c.split("/hubl/")[1])||e.subPath}`]})]}),m.jsx("div",{className:"grid gap-6 pb-6 my-6 border-b border-gray-300",children:m.jsx(Nx,{componentType:t,authedPortalId:r,projectName:o,webRootProjectComponentFolder:l,isOpen:s,moduleData:e})}),m.jsx("div",{className:"grid gap-6 my-6",children:m.jsx(Px,{moduleData:e,themeWebRoot:n})}),m.jsx(Pm,{className:"",children:m.jsx(wx,{asChild:!0,children:m.jsx(Ue,{variant:"outline",type:"submit",children:"Close"})})})]})]})},jx=(e,t,n,r,o)=>{if(!n.nameWithExtension)throw new Error(`Could not find component: ${n.name}`);const l=n.type===hn.REACT?`@projects/${e}/${t}/components/modules/${n.nameWithExtension}`:n.subPath;return`https://app.hubspot${o==="qa"?"qa":""}.com/design-previewer/${r}/local-module-preview/${l}`},_x=({component:e,componentType:t,onPreviewClick:n,onViewLocalClick:r})=>m.jsxs("div",{className:"flex gap-2",children:[t==="module"&&m.jsx(Ue,{variant:"outline",onClick:()=>n(e),children:"View in app"}),m.jsx(Ue,{variant:"outline",onClick:()=>r(e),children:"View local version"})]});function Rx({componentList:e,headers:t,webRootProjectComponentFolder:n,themeWebRoot:r,projectName:o,authedPortalId:l,componentType:i,authedEnv:s}){const a=c=>{try{const d=jx(o,n,c,l,s);window.open(d,"_blank")}catch(d){console.error("Failed to open preview:",d)}},u=c=>{try{let d;switch(i){case"module":d=c.type==="react"?`/preview/module/${c.name}`:`/hublmodule/${c.subPath}`;break;case"template":d=`/template/${c.subPath}`;break;case"partial":d=`/partial/${c.name}`;break;default:throw new Error(`Unknown component type: ${i}`)}window.open(d,"_blank")}catch(d){console.error("Failed to open preview:",d)}};return m.jsxs(Va,{className:"border text-[16px]",containerClassName:"h-fit max-h-[770px] overflow-y-auto relative",children:[m.jsx(Ha,{children:m.jsx(Yr,{className:"",children:t.map((c,d)=>m.jsx(xl,{className:"border",children:c},d))})}),m.jsx(Qa,{className:"overflow-y-auto",children:e.map((c,d)=>m.jsxs(Yr,{className:"odd:bg-white even:bg-gray-50",children:[c.name&&m.jsx(Ot,{className:"border",children:i==="module"?m.jsx(Tx,{moduleData:c,componentType:i,themeWebRoot:r,authedPortalId:l,projectName:o,webRootProjectComponentFolder:n,children:m.jsx("span",{className:"underline cursor-pointer",children:c.name})}):m.jsx("span",{children:c.name})}),c.type&&m.jsx(Ot,{className:"border",children:m.jsxs("div",{className:"flex items-center gap-2",children:[c.type==="react"?m.jsx(cy,{}):m.jsx(Z0,{}),m.jsx("span",{children:c.type==="react"?"React":"HubL"})]})}),c.dateCreated&&m.jsx(Ot,{className:"border",children:c.dateCreated}),c.status&&m.jsx(Ot,{className:"border",children:c.status}),m.jsx(Ot,{className:"border",children:m.jsx(_x,{component:c,componentType:i,onPreviewClick:a,onViewLocalClick:u})})]},d))})]})}const Li=({id:e,header:t,componentType:n,subtext:r,headers:o,data:l,webRootProjectComponentFolder:i,themeWebRoot:s,projectName:a,authedPortalId:u,authedEnv:c})=>m.jsxs("div",{id:e,className:"mb-16",children:[m.jsx("h2",{className:"font-inter text-2xl font-semibold leading-9 tracking-tight text-left mb-6",children:t}),r&&m.jsx("p",{className:"font-inter text-base font-normal leading-7 text-left mb-5",children:r}),m.jsx(Rx,{authedEnv:c,componentList:l,headers:o,webRootProjectComponentFolder:i,themeWebRoot:s,projectName:a,authedPortalId:u,componentType:n})]}),Ox=({modulesData:e,partialsData:t,hubLModules:n,hubLTemplates:r,webRootProjectComponentFolder:o,themeWebRoot:l,projectName:i,authedPortalId:s,authedEnv:a})=>{const u=(x,w)=>x.map(g=>({...g,type:w})),c=[...u(e,"react"),...n.map(x=>({...x,type:"hubl"}))],d=[...u(t,"react")],h=r.map(x=>({...x,type:hn.HUBL}));return m.jsxs("div",{className:"mt-12",children:[m.jsx(Li,{id:"modules-table",header:"Modules",componentType:"module",headers:["Name","Type","Actions"],data:c,webRootProjectComponentFolder:o,themeWebRoot:l,projectName:i,authedPortalId:s,authedEnv:a}),m.jsx(Li,{id:"partials-table",header:"Partials",componentType:"partial",headers:["Name","Type","Actions"],data:d}),m.jsx(Li,{id:"templates-table",header:"Templates",componentType:"template",headers:["Name","Type","Actions"],data:h})]})};var bx="Separator",Ic="horizontal",Ax=["horizontal","vertical"],_m=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=Ic,...o}=e,l=Lx(r)?r:Ic,s=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return m.jsx(we.div,{"data-orientation":l,...s,...o,ref:t})});_m.displayName=bx;function Lx(e){return Ax.includes(e)}var Rm=_m;const Om=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>m.jsx(Rm,{ref:o,decorative:n,orientation:t,className:le("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Om.displayName=Rm.displayName;const Mx=()=>{const e=[{href:"https://www.youtube.com/playlist?list=PLjtLN8FCj4SljVFvkJbSk9J5hq4KTKYcB&jct=pci9oBKT6ttPIJIGKv-rVg",text:"CMS React Videos"},{href:"https://developers.hubspot.com/beta-docs/guides/cms/content/modules/build-modules-and-partials-with-react",text:"React Docs"},{href:"https://react.dev",text:"Learn React"},{href:"https://github.com/HubSpot/cms-react/tree/main/examples",text:"Github Examples"}];return m.jsx("footer",{className:"w-full py-16",children:m.jsx("nav",{className:"flex justify-center items-center gap-4 text-gray-900 text-sm font-normal",children:e.map((t,n)=>m.jsxs(Vo.Fragment,{children:[m.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",children:t.text}),n<e.length-1&&m.jsx(Om,{className:"bg-gray-200 h-4",orientation:"vertical"})]},n))})})};function Dx({size:e=24,...t}){return m.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("circle",{cx:"20",cy:"20",r:"20",fill:"url(#paint0_linear_6129_76863)"}),m.jsx("mask",{id:"mask0_6129_76863",maskUnits:"userSpaceOnUse",x:"8",y:"7",width:"24",height:"28",children:m.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.18164 7.27271H31.6885V34.3423H8.18164V7.27271Z",fill:"white"})}),m.jsx("g",{mask:"url(#mask0_6129_76863)",children:m.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.2583 26.7794C23.4375 26.7794 21.9612 25.1574 21.9612 23.1566C21.9612 21.1557 23.4375 19.5336 25.2583 19.5336C27.0789 19.5336 28.555 21.1557 28.555 23.1566C28.555 25.1574 27.0789 26.7794 25.2583 26.7794ZM26.2452 16.1818V12.9592C27.0106 12.5618 27.5471 11.7108 27.5471 10.7231V10.6487C27.5471 9.28578 26.532 8.17055 25.292 8.17055H25.2242C23.984 8.17055 22.969 9.28578 22.969 10.6487V10.7231C22.969 11.7108 23.5055 12.5618 24.2709 12.9592V16.182C23.1313 16.3754 22.0899 16.892 21.2306 17.6522L13.1786 10.7689C13.2315 10.5449 13.2687 10.314 13.269 10.0716C13.2708 8.52773 12.1334 7.27469 10.7285 7.27271C9.32372 7.27072 8.1833 8.52062 8.18164 10.0645C8.17984 11.6082 9.31724 12.8613 10.7222 12.8632C11.18 12.8639 11.6036 12.721 11.9752 12.4889L19.8959 19.26C19.2222 20.3773 18.8278 21.7158 18.8278 23.1566C18.8278 24.665 19.2614 26.0602 19.9943 27.2079L17.5855 29.8549C17.395 29.7922 17.1973 29.7482 16.9881 29.7482C15.8338 29.7482 14.8978 30.7767 14.8978 32.0453C14.8978 33.3139 15.8338 34.3423 16.9881 34.3423C18.1426 34.3423 19.0785 33.3139 19.0785 32.0453C19.0785 31.8155 19.0386 31.5981 18.9814 31.389L21.3641 28.7706C22.4457 29.678 23.7925 30.2228 25.2582 30.2228C28.8096 30.2228 31.6885 27.0591 31.6885 23.1566C31.6885 19.6236 29.3267 16.7049 26.2452 16.1818Z",fill:"white"})}),m.jsx("defs",{children:m.jsxs("linearGradient",{id:"paint0_linear_6129_76863",x1:"0",y1:"0",x2:"0",y2:"40",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#FF8F59"}),m.jsx("stop",{offset:"1",stopColor:"#FF7A59"})]})})]})}function zx({onClose:e}){const t=y.useCallback(()=>{navigator.clipboard.writeText("hs init"),window.open("terminal://open?path=.","_blank"),window.location.reload()},[]);return m.jsx("div",{className:"w-full max-w-2xl bg-background border rounded-lg shadow-lg p-8 mx-4",children:m.jsxs("div",{className:"flex flex-col items-center justify-center space-y-6 text-center",children:[m.jsx("div",{className:"bg-slate-900/90 rounded-lg p-6 w-full",children:m.jsxs("div",{className:"flex items-center justify-center gap-3",children:[m.jsx(ty,{className:"w-8 h-8 text-white"}),m.jsx(X0,{className:"w-8 h-8 text-slate-400"}),m.jsx(Dx,{size:32,className:"text-[#ff7a59]"})]})}),m.jsx("div",{className:"space-y-2",children:m.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:"Enjoy the full preview experience by connecting to HubSpot"})}),m.jsx("div",{className:"space-y-4 max-w-md",children:m.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[m.jsxs("p",{children:["Connect by using the"," ",m.jsx("code",{className:"bg-slate-100 px-1.5 py-0.5 rounded text-slate-900",children:"hs init"})," ","command to create a new config file. Ensure there's a"," ",m.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded-md",children:"hubspot.config.yaml"})," ","in the folder (or a parent)."]}),m.jsx("p",{children:"By connecting and authenticating you can use local proxy functionality and module preview routes."}),m.jsx("p",{className:"italic",children:`You can work on modules locally at "/module/[module_name]", but we won't have all your account data to display in this server.`})]})}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx(Ue,{variant:"outline",onClick:e,children:"Close"}),m.jsx(Ue,{onClick:t,children:"Connect Now"})]})]})})}function Ix({initialProps:e}){const{projectName:t,authedEnv:n,authedPortalId:r,modulesData:o,hubLModules:l,partialsData:i,hubLTemplates:s,webRootProjectComponentFolder:a,themeWebRoot:u}=e,[c,d]=y.useState(!r),h=()=>{d(!1)};return m.jsx(V0,{children:m.jsxs("div",{className:"container relative pt-8",children:[m.jsx(sy,{projectName:t,authedPortalId:r,modulesData:o,partialsData:i,hubLModules:l}),m.jsx(Ox,{modulesData:o,hubLModules:l,partialsData:i,hubLTemplates:s,webRootProjectComponentFolder:a,themeWebRoot:u,projectName:t,authedPortalId:r,authedEnv:n}),m.jsx(Mx,{}),c&&m.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm",children:m.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:m.jsx(zx,{onClose:h})})})]})})}const Fx=window==null?void 0:window.__hsInitialProps;qf(document.getElementById("root"),m.jsx(y.StrictMode,{children:m.jsx(Ix,{initialProps:Fx})}));
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>CMS React Dev Server Home</title>
7
7
  <!--app-head-->
8
- <script type="module" crossorigin src="/assets/index-B5NVSKM0.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-D-Xvc93s.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-vAx-PiEw.css">
10
10
  </head>
11
11
  <body>
@@ -3056,7 +3056,7 @@ const getModuleEditorPreviewUrl = (projectName, webRootProjectComponentFolder, c
3056
3056
  throw new Error(`Could not find component: ${component.name}`);
3057
3057
  }
3058
3058
  const previewPath = component.type === ModuleType.REACT ? `@projects/${projectName}/${webRootProjectComponentFolder}/components/modules/${component.nameWithExtension}` : component.subPath;
3059
- return `https://app.hubspot${authedEnv === "qa" ? "qa" : ""}.com/design-previewer/${portalId}/modules/p/${previewPath}`;
3059
+ return `https://app.hubspot${authedEnv === "qa" ? "qa" : ""}.com/design-previewer/${portalId}/local-module-preview/${previewPath}`;
3060
3060
  };
3061
3061
  const ActionButtons = ({
3062
3062
  component,
package/dist/index.js CHANGED
@@ -1465,7 +1465,7 @@ function trackUsage(action) {
1465
1465
  eventName: EVENT_NAME,
1466
1466
  action,
1467
1467
  nodeVersion: getNodeVersionData(),
1468
- version: "0.18.26",
1468
+ version: "0.18.27",
1469
1469
  os: getPlatform()
1470
1470
  };
1471
1471
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
package/dist/run.js CHANGED
@@ -2097,7 +2097,7 @@ function trackUsage(action) {
2097
2097
  eventName: EVENT_NAME,
2098
2098
  action,
2099
2099
  nodeVersion: getNodeVersionData(),
2100
- version: "0.18.26",
2100
+ version: "0.18.27",
2101
2101
  os: getPlatform()
2102
2102
  };
2103
2103
  const url3 = isAuthedWithPersonalAccessKey ? DEV_SERVER_USAGE_ENDPOINT_AUTHENTICATED : DEV_SERVER_USAGE_ENDPOINT;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cms-dev-server",
3
- "version": "0.18.26",
3
+ "version": "0.18.27",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
@@ -29,7 +29,7 @@
29
29
  "@babel/parser": "^7.25.3",
30
30
  "@babel/traverse": "^7.25.3",
31
31
  "@babel/types": "^7.25.2",
32
- "@hubspot/cms-components": "^0.18.26",
32
+ "@hubspot/cms-components": "^0.18.27",
33
33
  "@hubspot/local-dev-lib": "2.0.1",
34
34
  "@inquirer/select": "^2.0.0",
35
35
  "@originjs/vite-plugin-commonjs": "^1.0.3",
@@ -131,5 +131,5 @@
131
131
  "publishConfig": {
132
132
  "access": "public"
133
133
  },
134
- "gitHead": "df5912cfcc56ab227f0f2eeb725d25b95c70ecba"
134
+ "gitHead": "931e2d93455a28285c3f4a8fee83f5907196647c"
135
135
  }
@@ -0,0 +1,4 @@
1
+ import { ViteDevServer } from 'vite';
2
+ export declare const lookForModuleInFolder: (modulePath: string, viteServer: ViteDevServer) => Promise<[any, string]>;
3
+ declare function renderModuleJson(viteServer: ViteDevServer, requestedModulePath: string): Promise<any>;
4
+ export default renderModuleJson;
@@ -1,5 +0,0 @@
1
- export declare const API_ERRORS: {
2
- readonly MISSING_PARAMS: "MISSING_PARAMS";
3
- readonly FETCH_FAILED: "FETCH_FAILED";
4
- };
5
- export declare type ApiError = (typeof API_ERRORS)[keyof typeof API_ERRORS];
@@ -1,2 +0,0 @@
1
- import { InlineConfig } from 'vite';
2
- export declare function createAppViteConfig(webRoot: string, port: number): InlineConfig;
@@ -1,22 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- export declare function getDevServerCommandLineOptions(argv: NodeJS.Process['argv']): {
3
- hubspotCliConfigPathOption: string;
4
- hubspotCliAccountNameOption: string;
5
- sslEnabledOption: boolean;
6
- storybook: boolean;
7
- fieldGenEnabledOption: boolean;
8
- webRoot: string;
9
- resetSession: boolean;
10
- };
11
- export declare function buildThemePreviewOptions(webRoot: string): Promise<{
12
- filePaths: string[];
13
- startProgressBar: (numFiles: any) => {
14
- onAttemptCallback: () => void;
15
- onSuccessCallback: () => void;
16
- onFirstErrorCallback: () => void;
17
- onRetryCallback: () => void;
18
- onFinalErrorCallback: () => any;
19
- onFinishCallback: (results: any) => void;
20
- };
21
- dest: any;
22
- }>;
@@ -1,14 +0,0 @@
1
- export declare function determineSrcAndDest(): Promise<{
2
- absoluteSrc: any;
3
- dest: any;
4
- }>;
5
- export declare function getUploadableFileList(src: any, convertFields: any): Promise<any[]>;
6
- export declare function fieldsJsPrompt(filePath: any, projectDir: any, skipFiles?: any[]): Promise<any[]>;
7
- export declare function logError(error: any, context?: {}): void;
8
- export declare class ApiErrorContext {
9
- accountId: any;
10
- request: any;
11
- payload: any;
12
- projectName: any;
13
- constructor(props?: any);
14
- }
@@ -1,2 +0,0 @@
1
- declare const router: import("express-serve-static-core").Router;
2
- export default router;
@@ -1,5 +0,0 @@
1
- import { Request, Response, NextFunction } from 'express';
2
- export declare function handleGetModulePages(req: Request, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>>>;
3
- export declare function handleOpenFile(req: Request, res: Response, next: NextFunction): Promise<Response<any, Record<string, any>>>;
4
- export declare function appServerRoutes(): import("express-serve-static-core").Router;
5
- export default appServerRoutes;
@@ -1,9 +0,0 @@
1
- declare namespace _default {
2
- namespace parameters {
3
- namespace actions {
4
- const argTypesRegex: string;
5
- }
6
- }
7
- const decorators: ((Story: any) => JSX.Element)[];
8
- }
9
- export default _default;