Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(desktop): allow disabling the local environment #9194

Mergedjuliusmarmingemerged 6 commits intomain fromrefs/pull/9194/headmerged by juliusmarminge View on GitHub

Showing 41 changed files with 41 additions and 23 deletions (loading 38).

x
0 of 41 viewed, 41 left
34 additions and 23 deletionsapps/desktop/src/app/DesktopApp.tsModified
View file
@@ -158,18 +158,43 @@
​
const bootstrap = Effect.gen(function* () {
- const pool = yield* DesktopBackendPool.DesktopBackendPool;
- const primaryBackend = yield* pool.primary;
const state = yield* DesktopState.DesktopState;
const environment = yield* DesktopEnvironment.DesktopEnvironment;
const desktopSettings = yield* DesktopAppSettings.DesktopAppSettings;
- const serverExposure = yield* DesktopServerExposure.DesktopServerExposure;
- const wslBackend = yield* DesktopWslBackend.DesktopWslBackend;
const desktopWindow = yield* DesktopWindow.DesktopWindow;
const snapShot = yield* DesktopSnapShot.DesktopSnapShot;
const appActivation = yield* DesktopAppActivation.DesktopAppActivation;
yield* logBootstrapInfo("bootstrap start");
​
+ const settings = yield* desktopSettings.get;
+ // The renderer is served from the bundled client (or Vite in development)
+ // rather than through the local backend, so the window can open without one.
+ const electronProtocol = yield* ElectronProtocol.ElectronProtocol;
+ yield* electronProtocol.registerDesktopProtocol({
+ scheme: ElectronProtocol.getDesktopScheme(environment.isDevelopment),
+ ...(environment.isDevelopment
+ ? { targetOrigin: Option.getOrThrow(environment.devServerUrl) }
+ : { assetDirectory: environment.clientAssetsDir }),
+ clerkFrontendApiHostname: DesktopClerk.desktopClerkFrontendApiHostname,
+ });
+ yield* installDesktopIpcHandlers();
+ yield* logBootstrapInfo("bootstrap ipc handlers registered");
+​