Skip to content

Commit 8cca749

Browse files
fix(cli): update all convex related deps
1 parent 3a51320 commit 8cca749

File tree

6 files changed

+61
-17
lines changed

6 files changed

+61
-17
lines changed

apps/cli/src/constants.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ export const dependencyVersionMap = {
132132

133133
next: "15.5.4",
134134

135-
convex: "^1.27.0",
136-
"@convex-dev/react-query": "^0.0.0-alpha.8",
137-
"convex-svelte": "^0.0.11",
135+
convex: "^1.29.3",
136+
"@convex-dev/react-query": "^0.1.0",
137+
"convex-svelte": "^0.0.12",
138138
"convex-nuxt": "0.1.5",
139139
"convex-vue": "^0.1.5",
140-
"@convex-dev/better-auth": "^0.9.1",
140+
"@convex-dev/better-auth": "^0.9.7",
141141

142142
"@tanstack/svelte-query": "^5.85.3",
143143
"@tanstack/svelte-query-devtools": "^5.85.3",

apps/cli/src/helpers/core/auth-setup.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ export async function setupAuth(config: ProjectConfig) {
5959
if (convexBackendDirExists) {
6060
await addPackageDependency({
6161
dependencies: ["better-auth", "@convex-dev/better-auth"],
62-
customDependencies: { "better-auth": "1.3.27" },
62+
customDependencies: { "better-auth": "1.3.34" },
6363
projectDir: convexBackendDir,
6464
});
6565
if (hasNativeForBA) {
6666
await addPackageDependency({
6767
dependencies: ["@better-auth/expo"],
68-
customDependencies: { "@better-auth/expo": "1.3.27" },
68+
customDependencies: { "@better-auth/expo": "1.3.34" },
6969
projectDir: convexBackendDir,
7070
});
7171
}
@@ -81,19 +81,19 @@ export async function setupAuth(config: ProjectConfig) {
8181
if (hasNextJs) {
8282
await addPackageDependency({
8383
dependencies: ["better-auth", "@convex-dev/better-auth"],
84-
customDependencies: { "better-auth": "1.3.27" },
84+
customDependencies: { "better-auth": "1.3.34" },
8585
projectDir: clientDir,
8686
});
8787
} else if (hasTanStackStart) {
8888
await addPackageDependency({
8989
dependencies: ["better-auth", "@convex-dev/better-auth"],
90-
customDependencies: { "better-auth": "1.3.27" },
90+
customDependencies: { "better-auth": "1.3.34" },
9191
projectDir: clientDir,
9292
});
9393
} else if (hasViteReactOther) {
9494
await addPackageDependency({
9595
dependencies: ["better-auth", "@convex-dev/better-auth"],
96-
customDependencies: { "better-auth": "1.3.27" },
96+
customDependencies: { "better-auth": "1.3.34" },
9797
projectDir: clientDir,
9898
});
9999
}
@@ -113,8 +113,8 @@ export async function setupAuth(config: ProjectConfig) {
113113
"@convex-dev/better-auth",
114114
],
115115
customDependencies: {
116-
"better-auth": "1.3.27",
117-
"@better-auth/expo": "1.3.27",
116+
"better-auth": "1.3.34",
117+
"@better-auth/expo": "1.3.34",
118118
},
119119
projectDir: nativeDir,
120120
});

apps/cli/src/helpers/core/backend-setup.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export async function setupBackendDependencies(config: ProjectConfig) {
77
const { backend, runtime, api, auth, examples, projectDir } = config;
88

99
if (backend === "convex") {
10+
const convexBackendDir = path.join(projectDir, "packages/backend");
11+
await addPackageDependency({
12+
dependencies: ["convex"],
13+
projectDir: convexBackendDir,
14+
});
1015
return;
1116
}
1217

apps/cli/src/helpers/core/create-project.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,12 @@ export async function createProject(
6767

6868
await setupApi(options);
6969

70+
if (isConvex || needsServerSetup) {
71+
await setupBackendDependencies(options);
72+
}
73+
7074
if (!isConvex) {
7175
if (needsServerSetup) {
72-
await setupBackendDependencies(options);
7376
await setupRuntime(options);
7477
}
7578
await setupDatabase(options, cliInput);

apps/cli/templates/backend/convex/packages/backend/package.json.hbs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@
1212
"@types/node": "^24.3.0",
1313
"typescript": "^5.9.2"
1414
},
15-
"dependencies": {
16-
"convex": "^1.25.4"
17-
}
15+
"dependencies": {}
1816
}

apps/cli/templates/frontend/native/uniwind/app/(drawer)/index.tsx.hbs

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Text, View } from "react-native";
1+
import { Text, View, TouchableOpacity } from "react-native";
22
import { Container } from "@/components/container";
33
{{#if (eq api "orpc")}}
44
import { useQuery } from "@tanstack/react-query";
@@ -24,7 +24,7 @@ import { SignUp } from "@/components/sign-up";
2424
import { useQuery } from "convex/react";
2525
import { api } from "@{{projectName}}/backend/convex/_generated/api";
2626
{{/if}}
27-
{{#unless (eq backend "none")}}
27+
{{#unless (or (eq backend "none") (and (eq backend "convex") (eq auth "better-auth")))}}
2828
import { Ionicons } from "@expo/vector-icons";
2929
{{/unless}}
3030
import { Card, Chip, useThemeColor } from "heroui-native";
@@ -142,6 +142,44 @@ return (
142142
<Text className="text-muted">Loading...</Text>
143143
</AuthLoading>
144144
{{/if}}
145+
146+
{{#if (and (eq backend "convex") (eq auth "better-auth"))}}
147+
{user ? (
148+
<Card variant="secondary" className="p-4 mb-4">
149+
<View className="mb-2">
150+
<Text className="text-foreground text-base">
151+
Welcome, <Text className="font-semibold">{user.name}</Text>
152+
</Text>
153+
</View>
154+
<Text className="text-muted text-sm mb-4">{user.email}</Text>
155+
<TouchableOpacity className="bg-danger px-4 py-2 rounded-md self-start" onPress={()=> {
156+
authClient.signOut();
157+
}}
158+
>
159+
<Text className="text-danger-foreground font-medium">Sign Out</Text>
160+
</TouchableOpacity>
161+
</Card>
162+
) : null}
163+
<Card variant="secondary" className="p-4 mb-4">
164+
<Text className="text-foreground font-medium mb-2">API Status</Text>
165+
<View className="flex-row items-center gap-2">
166+
<View className={`w-3 h-3 rounded-full ${healthCheck==="OK" ? "bg-success" : "bg-danger" }`} />
167+
<Text className="text-muted">
168+
{healthCheck === undefined
169+
? "Checking..."
170+
: healthCheck === "OK"
171+
? "Connected to API"
172+
: "API Disconnected"}
173+
</Text>
174+
</View>
175+
</Card>
176+
{!user && (
177+
<>
178+
<SignIn />
179+
<SignUp />
180+
</>
181+
)}
182+
{{/if}}
145183
</Container>
146184
);
147185
}

0 commit comments

Comments
 (0)