# Files changed · PR \#10266 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/10266/diffs)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

[refactor\(desktop\): classify electron exports](https://git.cafe/pingdotgg/t3code/pull/10266.md)

Version: 4

Head commit: bf20c623db759b3d1f960d3250dacadb6cf348cf

Base commit: fe8fffac36e33a6872351f261b8d21745b409df2

Comparison base: fe8fffac36e33a6872351f261b8d21745b409df2

Showing up to 20 entries from this revision. If the pull request changes, reopen the first page before continuing.

## apps/desktop/src/electron/ElectronApp.ts

Status: modified; +1; −0

```diff
@@ -98,6 +98,7 @@
       }),
   ).pipe(Effect.asVoid);
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = ElectronApp.of({
   metadata: Effect.gen(function* () {
     const appVersion = yield* Effect.try({
```

## apps/desktop/src/electron/ElectronDialog.ts

Status: modified; +1; −0

```diff
@@ -102,6 +102,7 @@
   }
 >()("@t3tools/desktop/electron/ElectronDialog") {}
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = ElectronDialog.of({
   pickFolder: Effect.fn("desktop.electron.dialog.pickFolder")(function* (input) {
     const ownerWindowId = Option.match(input.owner, {
```

## apps/desktop/src/electron/ElectronMenu.ts

Status: modified; +1; −0

```diff
@@ -110,6 +110,7 @@
     Option.map(({ x, y }) => ({ x: Math.floor(x * zoomFactor), y: Math.floor(y * zoomFactor) })),
   );
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.gen(function* () {
   const platform = yield* HostProcessPlatform;
   let destructiveMenuIconCache: Option.Option<Electron.NativeImage> | undefined;
```

## apps/desktop/src/electron/ElectronPowerMonitor.ts

Status: modified; +1; −0

```diff
@@ -75,6 +75,7 @@
   ).pipe(Effect.asVoid);
 };
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = ElectronPowerMonitor.of({
   isOnBatteryPower: Effect.sync(() => Electron.powerMonitor.isOnBatteryPower()),
   getSystemIdleTime: Effect.sync(() => Electron.powerMonitor.getSystemIdleTime()),
```

## apps/desktop/src/electron/ElectronProtocol.ts

Status: modified; +5; −4

```diff
@@ -9,14 +9,14 @@
 import * as Electron from "electron";
 
 export const DESKTOP_HOST = "app";
+const DESKTOP_PRODUCTION_SCHEME = "t3code";
+const DESKTOP_DEVELOPMENT_SCHEME = "t3code-dev";
-export const DESKTOP_PRODUCTION_SCHEME = "t3code";
-export const DESKTOP_DEVELOPMENT_SCHEME = "t3code-dev";
 
 export function getDesktopScheme(isDevelopment: boolean): string {
   return isDevelopment ? DESKTOP_DEVELOPMENT_SCHEME : DESKTOP_PRODUCTION_SCHEME;
 }
 
+function getDesktopOrigin(isDevelopment: boolean): string {
-export function getDesktopOrigin(isDevelopment: boolean): string {
   return `${getDesktopScheme(isDevelopment)}://${DESKTOP_HOST}`;
 }
 
@@ -109,7 +109,7 @@
 /**
  * Must run synchronously during process bootstrap, before Electron emits `ready`.
  */
-export function registerDesktopSchemePrivilegesSync(): void {
+function registerDesktopSchemePrivilegesSync(): void {
   Electron.protocol.registerSchemesAsPrivileged([
     {
       scheme: DESKTOP_PRODUCTION_SCHEME,
@@ -205,6 +205,7 @@
   throw lastError;
 }
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.gen(function* () {
   const registered = yield* Ref.make(false);
 
```

## apps/desktop/src/electron/ElectronSafeStorage.ts

Status: modified; +1; −1

```diff
@@ -50,7 +50,6 @@
   ElectronSafeStorageDecryptError,
 ]);
 export type ElectronSafeStorageError = typeof ElectronSafeStorageError.Type;
-export const isElectronSafeStorageError = Schema.is(ElectronSafeStorageError);
 
 export class ElectronSafeStorage extends Context.Service<
   ElectronSafeStorage,
@@ -66,6 +65,7 @@
   }
 >()("@t3tools/desktop/electron/ElectronSafeStorage") {}
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.gen(function* () {
   const platform = yield* HostProcessPlatform;
 
```

## apps/desktop/src/electron/ElectronShell.ts

Status: modified; +1; −0

```diff
@@ -67,6 +67,7 @@
   }
 >()("@t3tools/desktop/electron/ElectronShell") {}
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = ElectronShell.of({
   openExternal: (rawUrl) =>
     Option.match(parseSafeExternalUrl(rawUrl), {
```

## apps/desktop/src/electron/ElectronTheme.ts

Status: modified; +1; −0

```diff
@@ -28,6 +28,7 @@
   }
 >()("@t3tools/desktop/electron/ElectronTheme") {}
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = ElectronTheme.of({
   shouldUseDarkColors: Effect.sync(() => Electron.nativeTheme.shouldUseDarkColors),
   setSource: (theme) =>
```

## apps/desktop/src/electron/ElectronUpdater.ts

Status: modified; +1; −0

```diff
@@ -80,6 +80,7 @@
   }
 >()("@t3tools/desktop/electron/ElectronUpdater") {}
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = ElectronUpdater.of({
   setFeedURL: (options) =>
     Effect.suspend(() => {
```

## apps/desktop/src/electron/ElectronWindow.ts

Status: modified; +1; −0

```diff
@@ -95,6 +95,7 @@
   }
 >()("@t3tools/desktop/electron/ElectronWindow") {}
 
+/** @public Service construction is part of the canonical Effect module API. */
 export const make = Effect.gen(function* () {
   const platform = yield* HostProcessPlatform;
   const mainWindowRef = yield* Ref.make<Option.Option<Electron.BrowserWindow>>(Option.none());
```
