History

refactor(desktop): classify app exports (#10267)

Julius Marminge committed 2 months ago

Commit 89dd9ab1 parent 5a853a416 files · +18 −4Browse files

Unified · Split

16 files
  1. apps/desktop/src/app/DesktopAppActivation.ts +1 −0
  2. apps/desktop/src/app/DesktopAppIdentity.ts +1 −0
  3. apps/desktop/src/app/DesktopAssets.ts +1 −0
  4. apps/desktop/src/app/DesktopClerk.ts +1 −0
  5. apps/desktop/src/app/DesktopConnectionCatalogStore.ts +1 −0
  6. apps/desktop/src/app/DesktopLifecycle.ts +1 −0
  7. apps/desktop/src/app/DesktopLinuxUrlHandler.ts +2 −1
  8. apps/desktop/src/app/DesktopPreReadyPlatform.ts +1 −0
  9. apps/desktop/src/shell/DesktopShellEnvironment.ts +1 −0
  10. apps/desktop/src/ssh/DesktopSshEnvironment.ts +1 −0
  11. apps/desktop/src/ssh/DesktopSshPasswordPrompts.ts +1 −0
  12. apps/desktop/src/updates/DesktopUpdates.ts +1 −0
  13. apps/desktop/src/updates/remoteUpdateFlow.ts +1 −1
  14. apps/desktop/src/updates/updateMachine.ts +2 −2
  15. apps/desktop/src/window/DesktopApplicationMenu.ts +1 −0
  16. apps/desktop/src/window/DesktopWindow.ts +1 −0
apps/desktop/src/app/DesktopAppActivation.ts+1−0
@@ -213,6 +213,7 @@ export class DesktopAppActivation extends Context.Service< · 212 unmodified lines
213213
214214 const { logWarning } = makeComponentLogger("desktop-app-activation");
215215
216+/** @public Service construction is part of the canonical Effect module API. */
216217 export const make = Effect.gen(function* () {
217218 const desktopEnvironment = yield* DesktopEnvironment.DesktopEnvironment;
218219 const desktopWindow = yield* DesktopWindow.DesktopWindow;
apps/desktop/src/app/DesktopAppIdentity.ts+1−0
@@ -66,6 +66,7 @@ export const resolveUserDataPath = Effect.gen(function* () { · 65 unmodified lines
6666 : environment.path.join(environment.appDataDirectory, environment.userDataDirName);
6767 }).pipe(Effect.withSpan("desktop.appIdentity.resolveUserDataPath"));
6868
69+/** @public Service construction is part of the canonical Effect module API. */
6970 export const make = Effect.gen(function* () {
7071 const assets = yield* DesktopAssets.DesktopAssets;
7172 const electronApp = yield* ElectronApp.ElectronApp;
apps/desktop/src/app/DesktopAssets.ts+1−0
@@ -119,6 +119,7 @@ const resolveIconPath = Effect.fn("desktop.assets.resolveIconPath")(function* ( · 118 unmodified lines
119119 return yield* resolveResourcePath(`icon.${ext}`);
120120 });
121121
122+/** @public Service construction is part of the canonical Effect module API. */
122123 export const make = Effect.gen(function* () {
123124 const context = yield* Effect.context<
124125 FileSystem.FileSystem | DesktopEnvironment.DesktopEnvironment
apps/desktop/src/app/DesktopClerk.ts+1−0
@@ -83,6 +83,7 @@ function createDesktopClerkBridge(stateDir: string, isDevelopment: boolean) { · 82 unmodified lines
8383 });
8484 }
8585
86+/** @public Service construction is part of the canonical Effect module API. */
8687 export const make = Effect.gen(function* () {
8788 const environment = yield* DesktopEnvironment.DesktopEnvironment;
8889 const electronApp = yield* ElectronApp.ElectronApp;
apps/desktop/src/app/DesktopConnectionCatalogStore.ts+1−0
@@ -375,6 +375,7 @@ const migrateSavedEnvironmentRecords = Effect.fn( · 374 unmodified lines
375375 };
376376 });
377377
378+/** @public Service construction is part of the canonical Effect module API. */
378379 export const make = Effect.gen(function* () {
379380 const environment = yield* DesktopEnvironment.DesktopEnvironment;
380381 const fileSystem = yield* FileSystem.FileSystem;
apps/desktop/src/app/DesktopLifecycle.ts+1−0
@@ -159,6 +159,7 @@ function quitFromSignal( · 158 unmodified lines
159159 );
160160 }
161161
162+/** @public Service construction is part of the canonical Effect module API. */
162163 export const make = DesktopLifecycle.of({
163164 relaunch: Effect.fn("desktop.lifecycle.relaunch")(function* (reason) {
164165 const electronApp = yield* ElectronApp.ElectronApp;
apps/desktop/src/app/DesktopLinuxUrlHandler.ts+2−1
@@ -20,7 +20,7 @@ import { makeComponentLogger } from "./DesktopObservability.ts"; · 19 unmodified lines
2020 // our own handler entry pointing at the current AppImage and claim the
2121 // scheme default via xdg-mime, exactly what the file manager's "set as
2222 // default" checkbox would record in mimeapps.list.
23−export const URL_HANDLER_DESKTOP_ENTRY_NAME = "t3code-url-handler.desktop";
23+const URL_HANDLER_DESKTOP_ENTRY_NAME = "t3code-url-handler.desktop";
2424
2525 const { logInfo, logWarning } = makeComponentLogger("desktop-linux-url-handler");
2626
@@ -92,6 +92,7 @@ export class DesktopLinuxUrlHandler extends Context.Service< · 65 unmodified lines
9292 }
9393 >()("@t3tools/desktop/app/DesktopLinuxUrlHandler") {}
9494
95+/** @public Service construction is part of the canonical Effect module API. */
9596 export const make = Effect.gen(function* () {
9697 const environment = yield* DesktopEnvironment.DesktopEnvironment;
9798 const fileSystem = yield* FileSystem.FileSystem;
apps/desktop/src/app/DesktopPreReadyPlatform.ts+1−0
@@ -46,6 +46,7 @@ export class DesktopPreReadyElectronOptions extends Context.Service< · 45 unmodified lines
4646 }
4747 >()("@t3tools/desktop/app/DesktopPreReadyPlatform/DesktopPreReadyElectronOptions") {}
4848
49+/** @public Service construction is part of the canonical Effect module API. */
4950 export const make = Effect.gen(function* () {
5051 const platform = yield* HostProcessPlatform;
5152 return yield* Effect.sync((): DesktopPreReadyElectronOptions["Service"] => {
apps/desktop/src/shell/DesktopShellEnvironment.ts+1−0
@@ -533,6 +533,7 @@ const installShellEnvironment = ( · 532 unmodified lines
533533 return Effect.void;
534534 };
535535
536+/** @public Service construction is part of the canonical Effect module API. */
536537 export const make = Effect.gen(function* () {
537538 const environment = yield* DesktopEnvironment.DesktopEnvironment;
538539 const fileSystem = yield* FileSystem.FileSystem;
apps/desktop/src/ssh/DesktopSshEnvironment.ts+1−0
@@ -128,6 +128,7 @@ const makePasswordPrompt = ( · 127 unmodified lines
128128 prompts.request(request).pipe(Effect.mapError(toSshPasswordPromptError)),
129129 });
130130
131+/** @public Service construction is part of the canonical Effect module API. */
131132 export const make = Effect.gen(function* () {
132133 const manager = yield* SshTunnel.SshEnvironmentManager;
133134 const prompts = yield* DesktopSshPasswordPrompts.DesktopSshPasswordPrompts;
apps/desktop/src/ssh/DesktopSshPasswordPrompts.ts+1−0
@@ -222,6 +222,7 @@ const failPending = ( · 221 unmodified lines
222222 error: DesktopSshPasswordPromptRequestError,
223223 ) => Deferred.fail(pending.deferred, error).pipe(Effect.asVoid);
224224
225+/** @public Service construction is part of the canonical Effect module API. */
225226 export const make = Effect.fn("desktop.sshPasswordPrompts.make")(function* (
226227 options: DesktopSshPasswordPromptsOptions = {},
227228 ) {
apps/desktop/src/updates/DesktopUpdates.ts+1−0
@@ -271,6 +271,7 @@ function isArm64HostRunningIntelBuild(runtimeInfo: DesktopRuntimeInfo): boolean · 270 unmodified lines
271271 return runtimeInfo.hostArch === "arm64" && runtimeInfo.appArch === "x64";
272272 }
273273
274+/** @public Service construction is part of the canonical Effect module API. */
274275 export const make = Effect.gen(function* () {
275276 const config = yield* DesktopConfig.DesktopConfig;
276277 const pool = yield* DesktopBackendPool.DesktopBackendPool;
apps/desktop/src/updates/remoteUpdateFlow.ts+1−1
@@ -31,7 +31,7 @@ export const MAX_REMOTE_UPDATE_CHECKS = 2; · 30 unmodified lines
3131 export const MAX_REMOTE_UPDATE_DOWNLOADS = 3;
3232
3333 /** Same predicate DesktopUpdates.installDownloadedUpdate uses for admission. */
34−export function isInstallableDesktopUpdateState(state: DesktopUpdateState): boolean {
34+function isInstallableDesktopUpdateState(state: DesktopUpdateState): boolean {
3535 return (
3636 state.downloadedVersion !== null &&
3737 (state.status === "downloaded" ||
apps/desktop/src/updates/updateMachine.ts+2−2
@@ -5,13 +5,13 @@ import type { · 4 unmodified lines
55 DesktopUpdateState,
66 } from "@t3tools/contracts";
77
8−export function nextStatusAfterDownloadFailure(
8+function nextStatusAfterDownloadFailure(
99 currentState: DesktopUpdateState,
1010 ): DesktopUpdateState["status"] {
1111 return currentState.availableVersion ? "available" : "error";
1212 }
1313
14−export function getCanRetryAfterDownloadFailure(currentState: DesktopUpdateState): boolean {
14+function getCanRetryAfterDownloadFailure(currentState: DesktopUpdateState): boolean {
1515 return currentState.availableVersion !== null;
1616 }
1717
apps/desktop/src/window/DesktopApplicationMenu.ts+1−0
@@ -103,6 +103,7 @@ const handleCheckForUpdatesMenuClick = Effect.gen(function* () { · 102 unmodified lines
103103 yield* checkForUpdatesFromMenu;
104104 }).pipe(Effect.withSpan("desktop.menu.handleCheckForUpdatesClick"));
105105
106+/** @public Service construction is part of the canonical Effect module API. */
106107 export const make = Effect.gen(function* () {
107108 const electronApp = yield* ElectronApp.ElectronApp;
108109 const electronMenu = yield* ElectronMenu.ElectronMenu;
apps/desktop/src/window/DesktopWindow.ts+1−0
@@ -278,6 +278,7 @@ function bindFirstRevealTrigger( · 277 unmodified lines
278278 }
279279 }
280280
281+/** @public Service construction is part of the canonical Effect module API. */
281282 export const make = Effect.gen(function* () {
282283 const environment = yield* DesktopEnvironment.DesktopEnvironment;
283284 const assets = yield* DesktopAssets.DesktopAssets;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t