Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(deploy): catch missing critical static pages in check:dist
fudjiad93ee8f6cd69
diff --git a/scripts/check-dist.mjs b/scripts/check-dist.mjsindex d6ebde9f9..7646b9f87 100644--- a/scripts/check-dist.mjs+++ b/scripts/check-dist.mjs@@ -49,6 +49,49 @@ for (const { rel, min } of distLibChecks) {}}+// Known high-traffic static pages, checked directly against server/index.mjs's+// resolveStatic() resolution (directory → index.html fallback). A deploy with+// `npm run build` skipped (or run from a stale checkout) ships an incomplete+// dist/ with no error — that's exactly how /dashboard and /pump-dashboard+// 404'd in production on 2026-07-08 while check:dist reported green, because+// this check only ever looked at the agent-3d embed bundle. Not a full sweep+// of data/pages.json's 300 entries: most of those (docs/*, tutorials/*,+// .well-known/*, sitemap.xml) are server-rendered at request time by api/**+// handlers, not static build output, so a naive "every registered path must+// have a dist/ file" check false-flags them. This list is the pages actually+// known to be pure static Vite build output — extend it when another one+// breaks the same way, rather than trying to infer static-vs-dynamic from+// data/pages.json alone.+const criticalStaticPages = ['/', '/dashboard', '/pump-dashboard', '/dashboard-next', '/create', '/discover'];++function resolvesToFile(pagePath) {+ // vercel.json rewrites "/" -> "/home.html" (server/index.mjs's phase1Routes,+ // exact literal src, no /? suffix) rather than serving dist/index.html.+ const candidates =+ pagePath === '/'+ ? ['home.html']+ : [pagePath, `${pagePath}/index.html`, `${pagePath}.html`];+ for (const rel of candidates) {+ const abs = resolve(root, 'dist', rel.replace(/^\//, ''));+ try {+ const st = statSync(abs);+ if (st.isFile()) return true;+ if (st.isDirectory() && existsSync(resolve(abs, 'index.html'))) return true;+ } catch {+ // try next candidate+ }+ }+ return false;+}++const missingPages = criticalStaticPages.filter((p) => !resolvesToFile(p));+if (missingPages.length) {+ console.error(`[check-dist] ${missingPages.length} critical static page(s) missing from dist/ (did \`npm run build\` run?):`);+ for (const p of missingPages) console.error(`[check-dist] MISSING PAGE: ${p}`);+ ok = false;+}+if (!ok) process.exit(1);console.log('[check-dist] dist-lib mirror OK');+console.log(`[check-dist] all ${criticalStaticPages.length} critical static pages present`);console.log('[check-dist] OK — dist/agent-3d/latest/ ready for deploy');