Skip to content

Commit c609536

Browse files
committed
Move getCloudUrlFromRegion to shared/utils/urls
1 parent f2def82 commit c609536

12 files changed

Lines changed: 22 additions & 23 deletions

File tree

apps/code/src/main/services/github-integration/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getCloudUrlFromRegion } from "@shared/constants/oauth";
1+
import { getCloudUrlFromRegion } from "@shared/utils/urls";
22
import { shell } from "electron";
33
import { injectable } from "inversify";
44
import { logger } from "../../utils/logger";

apps/code/src/main/services/linear-integration/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getCloudUrlFromRegion } from "@shared/constants/oauth.js";
1+
import { getCloudUrlFromRegion } from "@shared/utils/urls.js";
22
import { shell } from "electron";
33
import { injectable } from "inversify";
44
import { logger } from "../../utils/logger.js";

apps/code/src/main/services/oauth/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import * as crypto from "node:crypto";
22
import * as http from "node:http";
33
import type { Socket } from "node:net";
44
import {
5-
getCloudUrlFromRegion,
65
getOauthClientIdFromRegion,
76
OAUTH_SCOPES,
87
} from "@shared/constants/oauth";
8+
import { getCloudUrlFromRegion } from "@shared/utils/urls";
99
import { shell } from "electron";
1010
import { inject, injectable } from "inversify";
1111
import { MAIN_TOKENS } from "../../di/tokens";

apps/code/src/renderer/features/auth/stores/authStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { useSeatStore } from "@features/billing/stores/seatStore";
22
import { PostHogAPIClient } from "@renderer/api/posthogClient";
33
import { trpcClient } from "@renderer/trpc/client";
44
import {
5-
getCloudUrlFromRegion,
65
OAUTH_SCOPE_VERSION,
76
OAUTH_SCOPES,
87
TOKEN_REFRESH_BUFFER_MS,
98
} from "@shared/constants/oauth";
9+
import { getCloudUrlFromRegion } from "@shared/utils/urls";
1010
import { ANALYTICS_EVENTS } from "@shared/types/analytics";
1111
import type { CloudRegion } from "@shared/types/oauth";
1212
import { sleepWithBackoff } from "@shared/utils/backoff";

apps/code/src/renderer/features/git-interaction/hooks/useGitInteraction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
import { invalidateGitBranchQueries } from "@features/git-interaction/utils/gitCacheKeys";
1818
import { updateGitCacheFromSnapshot } from "@features/git-interaction/utils/updateGitCache";
1919
import { trpc, trpcClient } from "@renderer/trpc";
20-
import { getCloudUrlFromRegion } from "@shared/constants/oauth";
20+
import { getCloudUrlFromRegion } from "@shared/utils/urls";
2121
import { ANALYTICS_EVENTS } from "@shared/types/analytics";
2222
import { useQueryClient } from "@tanstack/react-query";
2323
import { track } from "@utils/analytics";

apps/code/src/renderer/features/inbox/components/InboxSignalsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Select,
3535
Text,
3636
} from "@radix-ui/themes";
37-
import { getCloudUrlFromRegion } from "@shared/constants/oauth";
37+
import { getCloudUrlFromRegion } from "@shared/utils/urls";
3838
import type {
3939
SignalReportArtefactsResponse,
4040
SignalReportsQueryParams,

apps/code/src/renderer/features/sessions/service/service.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ vi.mock("@utils/notifications", () => ({
158158
vi.mock("@renderer/utils/toast", () => ({
159159
toast: { error: vi.fn() },
160160
}));
161-
vi.mock("@shared/constants/oauth", () => ({
161+
vi.mock("@shared/utils/urls", () => ({
162162
getCloudUrlFromRegion: () => "https://api.anthropic.com",
163163
}));
164164
vi.mock("@utils/session", async () => {

apps/code/src/renderer/features/sessions/service/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { DEFAULT_GATEWAY_MODEL } from "@posthog/agent/gateway-models";
2929
import { getIsOnline } from "@renderer/stores/connectivityStore";
3030
import { trpcClient } from "@renderer/trpc/client";
3131
import { toast } from "@renderer/utils/toast";
32-
import { getCloudUrlFromRegion } from "@shared/constants/oauth";
32+
import { getCloudUrlFromRegion } from "@shared/utils/urls";
3333
import {
3434
type CloudTaskUpdatePayload,
3535
type EffortLevel,

apps/code/src/renderer/features/sidebar/components/ProjectSwitcher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
Text,
2727
} from "@radix-ui/themes";
2828
import { trpcClient } from "@renderer/trpc/client";
29-
import { getCloudUrlFromRegion } from "@shared/constants/oauth";
29+
import { getCloudUrlFromRegion } from "@shared/utils/urls";
3030
import { isMac } from "@utils/platform";
3131
import { useCallback, useEffect, useRef, useState } from "react";
3232
import "./ProjectSwitcher.css";

apps/code/src/renderer/utils/generateTitle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useAuthStore } from "@features/auth/stores/authStore";
22
import { trpcClient } from "@renderer/trpc";
3-
import { getCloudUrlFromRegion } from "@shared/constants/oauth";
3+
import { getCloudUrlFromRegion } from "@shared/utils/urls";
44
import { logger } from "@utils/logger";
55

66
const log = logger.scope("title-generator");

0 commit comments

Comments
 (0)