Skip to content

Commit f5e6abb

Browse files
committed
Consolidate src/ to 3 top-level directories and clean up path aliases
1 parent 6e89d84 commit f5e6abb

76 files changed

Lines changed: 91 additions & 106 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/twig/src/main/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { app } from "electron";
55
import log from "electron-log/main";
66
import "./lib/logger";
77
import "./services/index.js";
8-
import { ANALYTICS_EVENTS } from "../types/analytics.js";
8+
import { ANALYTICS_EVENTS } from "@shared/types/analytics.js";
99
import { initializeDeepLinks, registerDeepLinkHandlers } from "./deep-links.js";
1010
import { container } from "./di/container.js";
1111
import { MAIN_TOKENS } from "./di/tokens.js";

apps/twig/src/main/services/agent/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import {
2020
} from "@posthog/agent/gateway-models";
2121
import { getLlmGatewayUrl } from "@posthog/agent/posthog-api";
2222
import type { OnLogCallback } from "@posthog/agent/types";
23+
import type { AcpMessage } from "@shared/types/session-events.js";
2324
import { app } from "electron";
2425
import { inject, injectable, preDestroy } from "inversify";
25-
import type { AcpMessage } from "../../../shared/types/session-events.js";
2626
import { MAIN_TOKENS } from "../../di/tokens.js";
2727
import { logger } from "../../lib/logger.js";
2828
import { TypedEventEmitter } from "../../lib/typed-event-emitter.js";

apps/twig/src/main/services/app-lifecycle/service.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ vi.mock("../../di/container.js", () => ({
4343
container: mockContainer,
4444
}));
4545

46-
vi.mock("../../../types/analytics.js", () => ({
46+
vi.mock("../../../shared/types/analytics.js", () => ({
4747
ANALYTICS_EVENTS: {
4848
APP_QUIT: "app_quit",
4949
},

apps/twig/src/main/services/app-lifecycle/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { ANALYTICS_EVENTS } from "@shared/types/analytics.js";
12
import { app } from "electron";
23
import { injectable } from "inversify";
3-
import { ANALYTICS_EVENTS } from "../../../types/analytics.js";
44
import { container } from "../../di/container.js";
55
import { MAIN_TOKENS } from "../../di/tokens.js";
66
import { withTimeout } from "../../lib/async.js";

apps/twig/src/main/services/cloud-task/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import type { CloudTaskUpdatePayload, TaskRun } from "@shared/types.js";
12
import { z } from "zod";
2-
import type { CloudTaskUpdatePayload, TaskRun } from "../../../shared/types.js";
33

44
export type { CloudTaskUpdatePayload };
55

apps/twig/src/main/services/cloud-task/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { StoredLogEntry } from "@shared/types/session-events.js";
12
import { net } from "electron";
23
import { injectable, preDestroy } from "inversify";
3-
import type { StoredLogEntry } from "../../../shared/types/session-events.js";
44
import { logger } from "../../lib/logger.js";
55
import { TypedEventEmitter } from "../../lib/typed-event-emitter.js";
66
import {

apps/twig/src/main/services/connectivity/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { getBackoffDelay } from "@shared/utils/backoff.js";
12
import { net } from "electron";
23
import { injectable, postConstruct, preDestroy } from "inversify";
3-
import { getBackoffDelay } from "../../../shared/utils/backoff.js";
44
import { logger } from "../../lib/logger.js";
55
import { TypedEventEmitter } from "../../lib/typed-event-emitter.js";
66
import {

apps/twig/src/main/services/context-menu/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import type { DetectedApplication } from "@shared/types.js";
12
import {
23
dialog,
34
Menu,
45
type MenuItemConstructorOptions,
56
nativeImage,
67
} from "electron";
78
import { inject, injectable } from "inversify";
8-
import type { DetectedApplication } from "../../../shared/types.js";
99
import { MAIN_TOKENS } from "../../di/tokens.js";
1010
import { getMainWindow } from "../../trpc/context.js";
1111
import type { ExternalAppsService } from "../external-apps/service.js";

apps/twig/src/main/services/external-apps/service.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import { exec } from "node:child_process";
22
import fs from "node:fs/promises";
33
import { promisify } from "node:util";
4+
import type { DetectedApplication, ExternalAppType } from "@shared/types.js";
45
import { app, clipboard } from "electron";
56
import Store from "electron-store";
67
import { injectable } from "inversify";
7-
import type {
8-
DetectedApplication,
9-
ExternalAppType,
10-
} from "../../../shared/types.js";
118
import type { AppDefinition, ExternalAppsSchema } from "./types.js";
129

1310
const execAsync = promisify(exec);

apps/twig/src/main/services/external-apps/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ExternalAppType } from "../../../shared/types.js";
1+
import type { ExternalAppType } from "@shared/types.js";
22

33
export interface AppDefinition {
44
path: string;

0 commit comments

Comments
 (0)