Serve the web client from the daemon (#1635)
* Serve the web client from the daemon Keep the bundled browser UI opt-in and exclude it from desktop packaging so desktop builds do not ship a duplicate renderer. * Escape daemon web UI bootstrap hint * Fix bundled web UI dist path
This commit is contained in:
@@ -369,6 +369,7 @@ describe("daemon-manager commands", () => {
|
||||
expect.objectContaining({
|
||||
detached: true,
|
||||
stdio: ["ignore", "ignore", "ignore"],
|
||||
envOverlay: expect.objectContaining({ PASEO_WEB_UI_ENABLED: "false" }),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -350,7 +350,7 @@ async function startDaemon(): Promise<DesktopDaemonStatus> {
|
||||
detached: true,
|
||||
envMode: "internal",
|
||||
env: invocation.env,
|
||||
envOverlay: { PASEO_DESKTOP_MANAGED: "1" },
|
||||
envOverlay: { PASEO_DESKTOP_MANAGED: "1", PASEO_WEB_UI_ENABLED: "false" },
|
||||
stdio: ["ignore", "ignore", "ignore"],
|
||||
});
|
||||
|
||||
|
||||
@@ -26,6 +26,12 @@ describe("desktop packaging", () => {
|
||||
expect(config).toContain("!node_modules/@getpaseo/**/*.spec.*");
|
||||
});
|
||||
|
||||
it("excludes the bundled daemon web UI from the packaged app", () => {
|
||||
const config = readFileSync(join(packageRoot, "electron-builder.yml"), "utf8");
|
||||
|
||||
expect(config).toContain("!node_modules/@getpaseo/server/dist/server/web-ui/**");
|
||||
});
|
||||
|
||||
// electron-builder packs production dependencies declared in package.json into
|
||||
// app.asar. Runtime code in runtime-paths.ts and bin/paseo dynamically resolves
|
||||
// these workspace packages by string, so static analysis (TypeScript, Knip) cannot
|
||||
|
||||
Reference in New Issue
Block a user