create-100x-mobile 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -173,6 +173,13 @@ async function cmdNew(rawArgs) {
173
173
  const instant = backend === "instantdb"
174
174
  ? await (0, steps_1.promptInstantSetup)(options)
175
175
  : { appId: "", clerkPublishableKey: "", clerkClientName: "clerk" };
176
+ if (backend === "instantdb" && instant.appId && instant.clerkPublishableKey) {
177
+ prompts_1.log.info("");
178
+ prompts_1.log.info(picocolors_1.default.bold("Instant Auth setup required"));
179
+ prompts_1.log.info(picocolors_1.default.dim("In Instant Dashboard → Auth tab, add a Clerk auth client before running the app."));
180
+ prompts_1.log.info(picocolors_1.default.dim(`Client name: ${instant.clerkClientName}`));
181
+ prompts_1.log.info(picocolors_1.default.dim(`Clerk publishable key: ${instant.clerkPublishableKey}`));
182
+ }
176
183
  const totalSteps = 1 + // project generation
177
184
  (options.installDependencies ? 2 : 0) +
178
185
  (backend === "convex" ? 2 + (clerk.domain ? 1 : 0) : 1) +
@@ -300,6 +307,11 @@ async function cmdNew(rawArgs) {
300
307
  projectName));
301
308
  prompts_1.log.info(picocolors_1.default.dim(" In Instant Auth tab, add your Clerk app and set EXPO_PUBLIC_INSTANT_CLERK_CLIENT_NAME."));
302
309
  }
310
+ else {
311
+ prompts_1.log.info("");
312
+ prompts_1.log.info(picocolors_1.default.dim(" In Instant Dashboard → Auth tab, add a Clerk auth client using your publishable key."));
313
+ prompts_1.log.info(picocolors_1.default.dim(` Use client name "${instant.clerkClientName}" (EXPO_PUBLIC_INSTANT_CLERK_CLIENT_NAME).`));
314
+ }
303
315
  }
304
316
  else if (clerk.publishableKey && clerk.domain) {
305
317
  prompts_1.log.success(picocolors_1.default.bold(picocolors_1.default.green("Your app is ready!")));
@@ -44,7 +44,7 @@ export default function SignInScreen() {
44
44
 
45
45
  if (createdSessionId && setActive) {
46
46
  await setActive({ session: createdSessionId });
47
- router.replace("/(tabs)");
47
+ router.replace("/");
48
48
  }
49
49
  } catch (err: any) {
50
50
  console.error(\`\${provider} OAuth error:\`, err);
@@ -12,6 +12,11 @@ const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY;
12
12
  const clerkClientName =
13
13
  process.env.EXPO_PUBLIC_INSTANT_CLERK_CLIENT_NAME || "clerk";
14
14
 
15
+ function isSignedOutError(error: unknown): boolean {
16
+ const message = error instanceof Error ? error.message : String(error ?? "");
17
+ return message.toLowerCase().includes("signed out");
18
+ }
19
+
15
20
  const tokenCache = {
16
21
  async getToken(key: string) {
17
22
  try {
@@ -74,7 +79,9 @@ function InstantSessionBridge({ children }: { children: React.ReactNode }) {
74
79
  try {
75
80
  await instantDb.auth.signOut();
76
81
  } catch (error) {
77
- console.warn("Instant signOut warning:", error);
82
+ if (!isSignedOutError(error)) {
83
+ console.warn("Instant signOut warning:", error);
84
+ }
78
85
  }
79
86
  return;
80
87
  }
@@ -95,6 +102,12 @@ function InstantSessionBridge({ children }: { children: React.ReactNode }) {
95
102
  setSyncError(null);
96
103
  }
97
104
  } catch (error) {
105
+ if (isSignedOutError(error)) {
106
+ if (active) {
107
+ setSyncError(null);
108
+ }
109
+ return;
110
+ }
98
111
  console.error("Instant Clerk auth error:", error);
99
112
  if (active) {
100
113
  setSyncError(
@@ -20,6 +20,11 @@ import * as SecureStore from "expo-secure-store";
20
20
  import { useAuth, useUser } from "@clerk/clerk-expo";
21
21
  import { instantDb } from "@/lib/instant";
22
22
 
23
+ function isSignedOutError(error: unknown): boolean {
24
+ const message = error instanceof Error ? error.message : String(error ?? "");
25
+ return message.toLowerCase().includes("signed out");
26
+ }
27
+
23
28
  export default function SettingsScreen() {
24
29
  const { signOut } = useAuth();
25
30
  const { user, isLoaded } = useUser();
@@ -37,7 +42,9 @@ export default function SettingsScreen() {
37
42
  try {
38
43
  await instantDb?.auth.signOut();
39
44
  } catch (error) {
40
- console.warn("Instant signOut warning:", error);
45
+ if (!isSignedOutError(error)) {
46
+ console.warn("Instant signOut warning:", error);
47
+ }
41
48
  }
42
49
 
43
50
  try {
@@ -52,7 +59,9 @@ export default function SettingsScreen() {
52
59
 
53
60
  await signOut();
54
61
  } catch (error) {
55
- console.warn("Sign out flow warning:", error);
62
+ if (!isSignedOutError(error)) {
63
+ console.warn("Sign out flow warning:", error);
64
+ }
56
65
  } finally {
57
66
  setIsSigningOut(false);
58
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-100x-mobile",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Scaffold a full-stack mobile app with Expo + Convex + Clerk in seconds",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {