Skip to content

Commit

Permalink
CLI: Support new Expo env vars (#26530)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 80659eaed43d67ad53e8d17baf09025ac9570e95
  • Loading branch information
xixixao authored and Convex, Inc. committed Jun 3, 2024
1 parent 3d5beea commit ac4c9c5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/cli/lib/envvars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const FRAMEWORKS = [
"Vite",
"Remix",
"SvelteKit",
"Expo",
] as const;
type Framework = (typeof FRAMEWORKS)[number];

Expand Down Expand Up @@ -109,6 +110,14 @@ export async function suggestedEnvVarName(ctx: Context): Promise<{
};
}

const isExpo = "expo" in packages;
if (isExpo) {
return {
detectedFramework: "Expo",
envVar: "EXPO_PUBLIC_CONVEX_URL",
};
}

const isRemix = "@remix-run/dev" in packages;
if (isRemix) {
return {
Expand Down Expand Up @@ -221,6 +230,7 @@ const EXPECTED_NAMES = new Set([
"NEXT_PUBLIC_CONVEX_URL",
"VITE_CONVEX_URL",
"REACT_APP_CONVEX_URL",
"EXPO_PUBLIC_CONVEX_URL",
]);

export function buildEnvironment(): string | boolean {
Expand Down

0 comments on commit ac4c9c5

Please sign in to comment.