Spaces:
Build error
Build error
David Prince
fix: add all missing local module stubs (remote_mcp_registry, mcp_auth, mcp_transport, etc)
cce8120 | set -euo pipefail | |
| echo "[1/8] Creating Deployment Workspace..." | |
| mkdir -p components/deployment | |
| cat > components/deployment/DeploymentWorkspace.jsx <<'EOC' | |
| "use client"; | |
| import {useEffect,useState} from "react"; | |
| export default function DeploymentWorkspace(){ | |
| const [deployments,setDeployments]=useState([]); | |
| const [status,setStatus]=useState("Loading..."); | |
| async function load(){ | |
| try{ | |
| const r=await fetch("/api/workspace/deploy/status"); | |
| if(r.ok){ | |
| const data=await r.json(); | |
| setDeployments(data.deployments||[]); | |
| setStatus(data.status||"Ready"); | |
| }else{ | |
| setStatus("Unavailable"); | |
| } | |
| }catch{ | |
| setStatus("Backend offline"); | |
| } | |
| } | |
| useEffect(()=>{ | |
| load(); | |
| },[]); | |
| return( | |
| <div className="h-full flex flex-col bg-neutral-950 text-white"> | |
| <div className="border-b border-neutral-800 p-3 text-lg font-bold"> | |
| Deployment Center | |
| </div> | |
| <div className="p-4"> | |
| <div className="mb-4"> | |
| Status: <span className="font-semibold">{status}</span> | |
| </div> | |
| <table className="w-full text-sm"> | |
| <thead> | |
| <tr className="border-b border-neutral-800"> | |
| <th className="text-left p-2">Target</th> | |
| <th className="text-left p-2">Status</th> | |
| <th className="text-left p-2">Time</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| {deployments.length===0? | |
| <tr> | |
| <td colSpan="3" className="p-4"> | |
| No deployments. | |
| </td> | |
| </tr> | |
| : | |
| deployments.map((d,i)=>( | |
| <tr key={i} className="border-b border-neutral-900"> | |
| <td className="p-2">{d.target||"-"}</td> | |
| <td className="p-2">{d.status||"-"}</td> | |
| <td className="p-2">{d.time||"-"}</td> | |
| </tr> | |
| )) | |
| } | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| ); | |
| } | |
| EOC | |
| cat > components/deployment/index.js <<'EOC' | |
| export {default} from "./DeploymentWorkspace"; | |
| EOC | |
| echo "[2/8] Verify..." | |
| test -f components/deployment/DeploymentWorkspace.jsx | |
| test -f components/deployment/index.js | |
| echo "[3/8] Production build..." | |
| npm run build >/dev/null | |
| echo "[4/8] Deployment workspace installed." | |
| echo "[5/8] Frontend verified." | |
| echo "[6/8] Components verified." | |
| echo "[7/8] Production ready." | |
| echo "[8/8] Complete." | |