Showing the changes to apps/cli/src (4 of 9 files). Show all
Unified · Split
| @@ -121,6 +121,8 @@ const createEmbeddedWebUISource = async () => { · 120 unmodified lines | ||
| 121 | 121 | // Build platform binaries |
| 122 | 122 | // --------------------------------------------------------------------------- |
| 123 | 123 | |
| 124 | +const EMBEDDED_WEB_UI_STUB = `const files: Record<string, string> | null = null;\n\nexport default files;\n`; | |
| 125 | + | |
| 124 | 126 | const buildBinaries = async (targets: Target[]) => { |
| 125 | 127 | const meta = await readMetadata(); |
| 126 | 128 | const binaries: Record<string, string> = {}; |
| @@ -143,7 +145,7 @@ const buildBinaries = async (targets: Target[]) => { · 16 unmodified lines | ||
| 143 | 145 | console.log(`Building ${name}...`); |
| 144 | 146 | |
| 145 | 147 | await Bun.build({ |
| 146 | − entrypoints: [join(cliRoot, "src/main.ts"), embeddedWebUIPath], | |
| 148 | + entrypoints: [join(cliRoot, "src/main.ts")], | |
| 147 | 149 | minify: true, |
| 148 | 150 | compile: { |
| 149 | 151 | target: bunTarget(target) as any, |
| @@ -183,7 +185,7 @@ const buildBinaries = async (targets: Target[]) => { · 33 unmodified lines | ||
| 183 | 185 | |
| 184 | 186 | return binaries; |
| 185 | 187 | } finally { |
| 186 | − await rm(embeddedWebUIPath, { force: true }); | |
| 188 | + await writeFile(embeddedWebUIPath, EMBEDDED_WEB_UI_STUB); | |
| 187 | 189 | } |
| 188 | 190 | }; |
| 189 | 191 | |
| @@ -1,2 +1,2 @@ | ||
| 1 | −declare const files: Record<string, string>; | |
| 1 | +declare const files: Record<string, string> | null; | |
| 2 | 2 | export default files; |
| @@ -0,0 +1,3 @@ | ||
| 1 | +const files: Record<string, string> | null = null; | |
| 2 | + | |
| 3 | +export default files; | |
| @@ -40,10 +40,7 @@ const DEFAULT_PORT = 8788; · 39 unmodified lines | ||
| 40 | 40 | const DEFAULT_BASE_URL = `http://localhost:${DEFAULT_PORT}`; |
| 41 | 41 | |
| 42 | 42 | // Embedded web UI — baked into compiled binaries via `with { type: "file" }` |
| 43 | −const embeddedWebUI: Record<string, string> | null = | |
| 44 | − await import("./embedded-web-ui.gen") | |
| 45 | − .then((m) => m.default as Record<string, string>) | |
| 46 | − .catch(() => null); | |
| 43 | +import embeddedWebUI from "./embedded-web-ui.gen"; | |
| 47 | 44 | |
| 48 | 45 | // --------------------------------------------------------------------------- |
| 49 | 46 | // Helpers |