remove the agent's live terminal page and the endpoints only it used
This commit is contained in:
parent
802151820c
commit
6289b8d64b
1 changed files with 127 additions and 4053 deletions
|
|
@ -1,18 +1,10 @@
|
|||
// esbuild build for @hive/agent. Output layout (`dist/`):
|
||||
//
|
||||
// dist/index.html served at GET / (the Preact rewrite —
|
||||
// the old vanilla-JS app.js is deleted)
|
||||
// dist/stats.html served at GET /stats
|
||||
// dist/screen.html served at GET /screen
|
||||
// dist/static/stats.js served at /static/stats.js (pulls in
|
||||
// chart.js/auto)
|
||||
// dist/static/stats.js.map source map sibling
|
||||
// dist/static/main.js served at /static/main.js (the Preact
|
||||
// bundle — see main.tsx)
|
||||
// dist/static/main.js.map source map sibling
|
||||
// dist/static/main.css served at /static/main.css (bundled
|
||||
// component CSS — see main.tsx's build
|
||||
// step below)
|
||||
// dist/static/agent.css served at /static/agent.css (@import
|
||||
// resolved from @hive/shared)
|
||||
//
|
||||
|
|
@ -50,31 +42,10 @@ await build({
|
|||
loader: { ".css": "text" },
|
||||
});
|
||||
|
||||
// The main agent page (the Preact rewrite — the old vanilla-JS app.js,
|
||||
// which used to share this build step, is deleted). A separate bundle
|
||||
// from stats.js above rather than folded in: different loader needs
|
||||
// (`.css: 'css'`, real stylesheets a component imports, vs. the raw-
|
||||
// text shadow-DOM CSS `stats.js` still needs for `@hive/shared/
|
||||
// modal.js`) and JSX transpilation, same split swarm-ui's own build
|
||||
// already makes.
|
||||
await build({
|
||||
entryPoints: [src("main.tsx")],
|
||||
outfile: staticDir("main.js"),
|
||||
bundle: true,
|
||||
format: "esm",
|
||||
platform: "browser",
|
||||
target: ["es2022"],
|
||||
sourcemap: true,
|
||||
logLevel: "info",
|
||||
jsx: "automatic",
|
||||
jsxImportSource: "preact",
|
||||
loader: { ".css": "css" },
|
||||
});
|
||||
|
||||
// Bundle the CSS. `colors.css` re-exports the standalone base16 palette
|
||||
// (the theme swap contract — its own output file so a swap replaces only
|
||||
// it, no bundle rebuild); `theme.css` is the semantic derivation layer;
|
||||
// `agent.css`'s @import lines pull in shared base.css + terminal.css from
|
||||
// `agent.css`'s @import lines pull in the shared base.css, chrome.css and pill.css from
|
||||
// the @hive/shared workspace dep.
|
||||
for (const entry of ["colors.css", "theme.css", "agent.css"]) {
|
||||
await build({
|
||||
|
|
@ -86,7 +57,7 @@ for (const entry of ["colors.css", "theme.css", "agent.css"]) {
|
|||
});
|
||||
}
|
||||
|
||||
for (const html of ["index.html", "stats.html", "screen.html"]) {
|
||||
for (const html of ["stats.html", "screen.html"]) {
|
||||
copyFileSync(src(html), dist(html));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue