fix(desktop): expose development providers in dev builds

Desktop-managed daemons inherited no Paseo runtime mode, so dev builds constructed the production provider registry. Mark unpackaged internal launches as development while continuing to force packaged launches to production.
This commit is contained in:
Mohamed Boudra
2026-07-29 16:55:50 +02:00
parent 6b13587943
commit 60c53973d8
3 changed files with 7 additions and 2 deletions
+4
View File
@@ -19,6 +19,10 @@ Root checkout dev is intentionally split across terminals:
- `npm run dev:app` runs Expo on `http://localhost:8081` and connects to the dev daemon.
- `npm run dev:desktop` runs its own Electron-flavored Expo server on the first free port from `8082` through `8089`. It never claims port `8081`.
Desktop dev launches its desktop-managed daemon with `PASEO_NODE_ENV=development`,
so development-only providers such as Mock Load Test are available. Packaged
desktop launches always force the daemon to production mode.
`npm run dev` is only a shorthand for `npm run dev:server`. Keep `127.0.0.1:6767` for the packaged app and production-style `~/.paseo` state.
### PASEO_HOME
@@ -50,7 +50,7 @@ describe("node-entrypoint-launcher", () => {
entrypoint: CLI_ENTRYPOINT,
argvMode: "node-script",
args: ["ls"],
baseEnv: { PATH: "/usr/bin" },
baseEnv: { PATH: "/usr/bin", PASEO_NODE_ENV: "production" },
}),
).toEqual({
command: "/opt/homebrew/bin/electron",
@@ -58,6 +58,7 @@ describe("node-entrypoint-launcher", () => {
env: {
PATH: "/usr/bin",
ELECTRON_RUN_AS_NODE: "1",
PASEO_NODE_ENV: "development",
},
});
});
@@ -30,7 +30,7 @@ export function createElectronNodeEnv(
return {
...baseEnv,
ELECTRON_RUN_AS_NODE: "1",
...(options?.isPackaged === true ? { [PASEO_NODE_ENV]: "production" } : {}),
[PASEO_NODE_ENV]: options?.isPackaged === true ? "production" : "development",
};
}