create-croissant 0.1.43 → 0.1.44

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.
package/dist/add.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ import i from"path";import{fileURLToPath as E}from"url";import s from"chalk";import{Command as P}from"commander";import{execa as j}from"execa";import e from"fs-extra";import k from"inquirer";import g from"ora";var A=E(import.meta.url),x=i.dirname(A),y=new P;y.name("croissant-add").description("Add a mobile or desktop app to an existing Croissant Stack project").action(async()=>{console.log(s.bold.yellow(`
3
+ \u{1F950} Croissant Stack: Add App
4
+ `));let p=i.join(process.cwd(),"package.json");await e.pathExists(p)||(console.error(s.red(`
5
+ Error: package.json not found. Are you in the root of your project?
6
+ `)),process.exit(1));let t=await e.readJson(p);(!t.scripts||!t.scripts.dev&&!t.scripts.build)&&(console.error(s.red(`
7
+ Error: This doesn't look like a Croissant Stack project.
8
+ `)),process.exit(1));let u=i.join(process.cwd(),"apps/mobile"),h=i.join(process.cwd(),"apps/desktop"),f=await e.pathExists(u),b=await e.pathExists(h);if(f&&b){console.log(s.blue(`Both mobile and desktop apps are already present. Nothing to add!
9
+ `));return}let l=[];f||l.push({name:"Mobile App (Expo)",value:"mobile"}),b||l.push({name:"Desktop App (Electron)",value:"desktop"});let{type:a}=await k.prompt([{type:"list",name:"type",message:"Which app would you like to add?",choices:l}]),c=process.cwd(),w=g(`Adding ${a} app...`).start();try{let n=i.join(x,"..","template");if(await e.pathExists(n)||(n=i.resolve(x,"../../..")),a==="mobile"){let r=i.join(n,"apps/mobile");await e.copy(r,u),t.scripts=t.scripts||{},t.scripts["dev:mobile"]="turbo run dev --filter=mobile",t.scripts["build:mobile"]="turbo run build --filter=mobile",await e.writeJson(p,t,{spaces:2});let d=i.join(c,"packages/auth/src/lib/auth.ts");if(await e.pathExists(d)){let o=await e.readFile(d,"utf8");o.includes("@better-auth/expo")||(o=`import { expo } from "@better-auth/expo";
10
+ ${o}`),o.includes("plugins: [expo()]")||(o=o.replace("emailAndPassword: { enabled: true },",`emailAndPassword: { enabled: true },
11
+ plugins: [expo()],
12
+ trustedOrigins: [
13
+ "mobile://",
14
+ ...(process.env.NODE_ENV === "development"
15
+ ? [
16
+ "exp://",
17
+ "exp://**",
18
+ "exp://192.168.*.*:*/**",
19
+ "http://localhost:8081",
20
+ ]
21
+ : []),
22
+ ],`)),await e.writeFile(d,o)}let m=i.join(c,"packages/auth/package.json");if(await e.pathExists(m)){let o=await e.readJson(m);o.dependencies=o.dependencies||{},o.dependencies["@better-auth/expo"]||(o.dependencies["@better-auth/expo"]="latest",await e.writeJson(m,o,{spaces:2}))}}else if(a==="desktop"){let r=i.join(n,"apps/desktop");await e.copy(r,h),t.scripts=t.scripts||{},t.scripts["dev:desktop"]="turbo run dev --filter=desktop",t.scripts["build:desktop"]="turbo run build --filter=desktop",await e.writeJson(p,t,{spaces:2})}w.succeed(s.green(`${a==="mobile"?"Mobile":"Desktop"} app added successfully!`));let{install:v}=await k.prompt([{type:"confirm",name:"install",message:"Would you like to install dependencies now?",default:!0}]);if(v){let r=g("Installing dependencies...").start();try{await j("npm",["install"],{cwd:c}),r.succeed(s.green("Dependencies installed!"))}catch{r.fail(s.red("Failed to install dependencies. Run npm install manually."))}}console.log(s.bold.cyan(`
23
+ Next steps:`)),console.log(a==="mobile"?" npm run dev:mobile # Start Expo development server":" npm run dev:desktop # Start Electron development server"),console.log(s.yellow(`
24
+ Happy hacking! \u{1F950}
25
+ `))}catch(n){w.fail(s.red(`An error occurred while adding the ${a} app.`)),console.error(n),process.exit(1)}});y.parse(process.argv);
package/dist/index.js CHANGED
@@ -1,9 +1,22 @@
1
1
  #!/usr/bin/env node
2
- import s from"path";import{fileURLToPath as k}from"url";import i from"chalk";import{Command as y}from"commander";import{execa as j}from"execa";import e from"fs-extra";import P from"inquirer";import u from"ora";var b=k(import.meta.url),g=s.dirname(b),h=new y;h.name("create-croissant").description("Scaffold a new project using the Croissant Stack").argument("[project-name]","Name of the project").action(async m=>{console.log(i.bold.yellow(`
2
+ import i from"path";import{fileURLToPath as x}from"url";import c from"chalk";import{Command as b}from"commander";import{execa as P}from"execa";import e from"fs-extra";import y from"inquirer";import g from"ora";var j=x(import.meta.url),w=i.dirname(j),k=new b;k.name("create-croissant").description("Scaffold a new project using the Croissant Stack").argument("[project-name]","Name of the project").action(async m=>{console.log(c.bold.yellow(`
3
3
  \u{1F950} Welcome to the Croissant Stack!
4
- `));let l=await P.prompt([{type:"input",name:"name",message:"What is your project named?",default:m||"my-croissant-app",when:!m},{type:"confirm",name:"install",message:"Would you like to install dependencies?",default:!0},{type:"confirm",name:"mobile",message:"Would you like to include the mobile app (Expo)?",default:!0},{type:"confirm",name:"desktop",message:"Would you like to include the desktop app (Electron)?",default:!0}]),c=m||l.name,o=s.resolve(process.cwd(),c);e.existsSync(o)&&(console.error(i.red(`
5
- Error: Directory ${c} already exists.
6
- `)),process.exit(1));let f=u("Scaffolding your project...").start();try{await e.ensureDir(o);let p=s.join(g,"..","template");if(await e.pathExists(p))await e.copy(p,o);else{let t=s.resolve(g,"../../.."),n=["node_modules","dist",".git","packages/create-croissant",".turbo","package-lock.json"];await e.copy(t,o,{filter:a=>{let r=s.relative(t,a);return!n.some(w=>r.startsWith(w))}})}if(!l.mobile){let t=s.join(o,"apps/mobile");if(await e.pathExists(t)){await e.remove(t);let n=s.join(o,"package.json");if(await e.pathExists(n)){let a=await e.readJson(n);a.scripts&&Object.keys(a.scripts).forEach(r=>{r.includes("mobile")&&delete a.scripts[r]}),await e.writeJson(n,a,{spaces:2})}}}if(!l.desktop){let t=s.join(o,"apps/desktop");if(await e.pathExists(t)){await e.remove(t);let n=s.join(o,"package.json");if(await e.pathExists(n)){let a=await e.readJson(n);a.scripts&&Object.keys(a.scripts).forEach(r=>{r.includes("desktop")&&delete a.scripts[r]}),await e.writeJson(n,a,{spaces:2})}}}let d=s.join(o,"package.json");if(await e.pathExists(d)){let t=await e.readJson(d);t.name=c,t.version="0.1.0",delete t.private,await e.writeJson(d,t,{spaces:2})}if(f.succeed(i.green(`Project ${c} created at ${o}`)),l.install){let t=u("Installing dependencies...").start();try{await j("npm",["install"],{cwd:o}),t.succeed(i.green("Dependencies installed!"))}catch{t.fail(i.red("Failed to install dependencies. You may need to run npm install manually."))}}console.log(i.bold.cyan(`
7
- Next steps:`)),console.log(` cd ${c}`),console.log(" npm run db:up # Start your PostgreSQL database"),console.log(` npm run dev # Start development server
8
- `),console.log(i.yellow(`Happy hacking! \u{1F950}
9
- `))}catch(p){f.fail(i.red("An error occurred during scaffolding.")),console.error(p),process.exit(1)}});h.parse(process.argv);
4
+ `));let l=await y.prompt([{type:"input",name:"name",message:"What is your project named?",default:m||"my-croissant-app",when:!m},{type:"confirm",name:"install",message:"Would you like to install dependencies?",default:!0},{type:"confirm",name:"mobile",message:"Would you like to include the mobile app (Expo)?",default:!0},{type:"confirm",name:"desktop",message:"Would you like to include the desktop app (Electron)?",default:!0}]),p=m||l.name,s=i.resolve(process.cwd(),p);e.existsSync(s)&&(console.error(c.red(`
5
+ Error: Directory ${p} already exists.
6
+ `)),process.exit(1));let h=g("Scaffolding your project...").start();try{await e.ensureDir(s);let d=i.join(w,"..","template");if(await e.pathExists(d))await e.copy(d,s);else{let a=i.resolve(w,"../../.."),n=["node_modules","dist",".git","packages/create-croissant",".turbo","package-lock.json"];await e.copy(a,s,{filter:t=>{let r=i.relative(a,t);return!n.some(o=>r.startsWith(o))}})}if(l.mobile){let a=i.join(s,"packages/auth/src/lib/auth.ts");if(await e.pathExists(a)){let t=await e.readFile(a,"utf8");t.includes("@better-auth/expo")||(t=`import { expo } from "@better-auth/expo";
7
+ ${t}`),t.includes("plugins: [expo()]")||(t=t.replace("emailAndPassword: { enabled: true },",`emailAndPassword: { enabled: true },
8
+ plugins: [expo()],
9
+ trustedOrigins: [
10
+ "mobile://",
11
+ ...(process.env.NODE_ENV === "development"
12
+ ? [
13
+ "exp://",
14
+ "exp://**",
15
+ "exp://192.168.*.*:*/**",
16
+ "http://localhost:8081",
17
+ ]
18
+ : []),
19
+ ],`)),await e.writeFile(a,t)}let n=i.join(s,"packages/auth/package.json");if(await e.pathExists(n)){let t=await e.readJson(n);t.dependencies=t.dependencies||{},t.dependencies["@better-auth/expo"]||(t.dependencies["@better-auth/expo"]="latest",await e.writeJson(n,t,{spaces:2}))}}else{let a=i.join(s,"apps/mobile");if(await e.pathExists(a)){await e.remove(a);let n=i.join(s,"package.json");if(await e.pathExists(n)){let o=await e.readJson(n);o.scripts&&Object.keys(o.scripts).forEach(f=>{f.includes("mobile")&&delete o.scripts[f]}),await e.writeJson(n,o,{spaces:2})}let t=i.join(s,"packages/auth/src/lib/auth.ts");if(await e.pathExists(t)){let o=await e.readFile(t,"utf8");o=o.replace(/import \{ expo \} from "@better-auth\/expo";\n/,""),o=o.replace(/\s+plugins: \[expo\(\)\],/,""),o=o.replace(/\s+trustedOrigins: \[[\s\S]*?\],/,""),await e.writeFile(t,o)}let r=i.join(s,"packages/auth/package.json");if(await e.pathExists(r)){let o=await e.readJson(r);o.dependencies&&o.dependencies["@better-auth/expo"]&&(delete o.dependencies["@better-auth/expo"],await e.writeJson(r,o,{spaces:2}))}}}if(!l.desktop){let a=i.join(s,"apps/desktop");if(await e.pathExists(a)){await e.remove(a);let n=i.join(s,"package.json");if(await e.pathExists(n)){let t=await e.readJson(n);t.scripts&&Object.keys(t.scripts).forEach(r=>{r.includes("desktop")&&delete t.scripts[r]}),await e.writeJson(n,t,{spaces:2})}}}let u=i.join(s,"package.json");if(await e.pathExists(u)){let a=await e.readJson(u);a.name=p,a.version="0.1.0",delete a.private,await e.writeJson(u,a,{spaces:2})}if(h.succeed(c.green(`Project ${p} created at ${s}`)),l.install){let a=g("Installing dependencies...").start();try{await P("npm",["install"],{cwd:s}),a.succeed(c.green("Dependencies installed!"))}catch{a.fail(c.red("Failed to install dependencies. You may need to run npm install manually."))}}console.log(c.bold.cyan(`
20
+ Next steps:`)),console.log(` cd ${p}`),console.log(" npm run db:up # Start your PostgreSQL database"),console.log(` npm run dev # Start development server
21
+ `),console.log(c.yellow(`Happy hacking! \u{1F950}
22
+ `))}catch(d){h.fail(c.red("An error occurred during scaffolding.")),console.error(d),process.exit(1)}});k.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-croissant",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "description": "Scaffold a new project using the Croissant Stack",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,7 +8,8 @@
8
8
  "directory": "packages/create-croissant"
9
9
  },
10
10
  "bin": {
11
- "create-croissant": "./dist/index.js"
11
+ "create-croissant": "./dist/index.js",
12
+ "croissant-add": "./dist/add.js"
12
13
  },
13
14
  "files": [
14
15
  "dist",
@@ -20,8 +21,8 @@
20
21
  "access": "public"
21
22
  },
22
23
  "scripts": {
23
- "build": "npm run prepare-template && tsup src/index.ts --format esm --clean --minify",
24
- "dev": "tsup src/index.ts --format esm --watch",
24
+ "build": "npm run prepare-template && tsup src/index.ts src/add.ts --format esm --clean --minify",
25
+ "dev": "tsup src/index.ts src/add.ts --format esm --watch",
25
26
  "typecheck": "tsc --noEmit",
26
27
  "prepare-template": "node scripts/prepare-template.js"
27
28
  },
@@ -6,8 +6,11 @@ import ParallaxScrollView from "@/components/parallax-scroll-view";
6
6
  import { ThemedText } from "@/components/themed-text";
7
7
  import { ThemedView } from "@/components/themed-view";
8
8
  import { Link } from "expo-router";
9
+ import { authClient } from "@/lib/auth-client";
9
10
 
10
11
  export default function HomeScreen() {
12
+ const { data: session, isPending } = authClient.useSession();
13
+
11
14
  return (
12
15
  <ParallaxScrollView
13
16
  headerBackgroundColor={{ light: "#A1CEDC", dark: "#1D3D47" }}
@@ -22,6 +25,18 @@ export default function HomeScreen() {
22
25
  <ThemedText type="title">Welcome!</ThemedText>
23
26
  <HelloWave />
24
27
  </ThemedView>
28
+
29
+ <ThemedView style={styles.stepContainer}>
30
+ <ThemedText type="subtitle">Auth Status</ThemedText>
31
+ {isPending ? (
32
+ <ThemedText>Checking session...</ThemedText>
33
+ ) : session ? (
34
+ <ThemedText>Logged in as: {session.user.email}</ThemedText>
35
+ ) : (
36
+ <ThemedText>Not logged in</ThemedText>
37
+ )}
38
+ </ThemedView>
39
+
25
40
  <ThemedView style={styles.stepContainer}>
26
41
  <ThemedText type="subtitle">Step 1: Try it</ThemedText>
27
42
  <ThemedText>
@@ -0,0 +1,14 @@
1
+ import { createAuthClient } from "better-auth/react";
2
+ import { expoClient } from "@better-auth/expo/client";
3
+ import * as SecureStore from "expo-secure-store";
4
+
5
+ export const authClient = createAuthClient({
6
+ baseURL: process.env.EXPO_PUBLIC_BETTER_AUTH_URL || "http://localhost:3000",
7
+ plugins: [
8
+ expoClient({
9
+ scheme: "mobile",
10
+ storagePrefix: "mobile",
11
+ storage: SecureStore,
12
+ }),
13
+ ],
14
+ });
@@ -13,17 +13,21 @@
13
13
  "build": "expo export --output-dir .output"
14
14
  },
15
15
  "dependencies": {
16
+ "@better-auth/expo": "^1.6.9",
16
17
  "@expo/vector-icons": "^15.0.3",
17
18
  "@react-navigation/bottom-tabs": "^7.4.0",
18
19
  "@react-navigation/elements": "^2.6.3",
19
20
  "@react-navigation/native": "^7.1.8",
21
+ "better-auth": "^1.6.9",
20
22
  "expo": "^55.0.17",
21
23
  "expo-constants": "~55.0.15",
22
24
  "expo-font": "~55.0.6",
23
25
  "expo-haptics": "~55.0.14",
24
26
  "expo-image": "~55.0.9",
25
27
  "expo-linking": "~55.0.14",
28
+ "expo-network": "^55.0.13",
26
29
  "expo-router": "~55.0.13",
30
+ "expo-secure-store": "^55.0.13",
27
31
  "expo-splash-screen": "~55.0.19",
28
32
  "expo-status-bar": "~55.0.5",
29
33
  "expo-symbols": "~55.0.7",
@@ -36,6 +40,5 @@
36
40
  "react-native-screens": "~4.23.0",
37
41
  "react-native-web": "~0.21.0",
38
42
  "react-native-worklets": "0.7.4"
39
- },
40
- "devDependencies": {}
43
+ }
41
44
  }
@@ -8,298 +8,300 @@
8
8
  // You should NOT make any changes in this file as it will be overwritten.
9
9
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10
10
 
11
- import { Route as rootRouteImport } from "./routes/__root";
12
- import { Route as PublicRouteImport } from "./routes/_public";
13
- import { Route as AuthRouteImport } from "./routes/_auth";
14
- import { Route as PublicIndexRouteImport } from "./routes/_public/index";
15
- import { Route as PublicSignupRouteImport } from "./routes/_public/signup";
16
- import { Route as PublicLoginRouteImport } from "./routes/_public/login";
17
- import { Route as AuthDashboardRouteImport } from "./routes/_auth/dashboard";
18
- import { Route as AuthAccountRouteImport } from "./routes/_auth/account";
19
- import { Route as ApiRpcSplatRouteImport } from "./routes/api/rpc.$";
20
- import { Route as ApiAuthSplatRouteImport } from "./routes/api/auth/$";
21
- import { Route as PublicExamplesSsrOrpcRouteImport } from "./routes/_public/examples/ssr-orpc";
22
- import { Route as PublicExamplesIsrRouteImport } from "./routes/_public/examples/isr";
23
- import { Route as PublicExamplesClientOrpcRouteImport } from "./routes/_public/examples/client-orpc";
24
- import { Route as AuthExamplesSsrOrpcAuthRouteImport } from "./routes/_auth/examples/ssr-orpc-auth";
25
- import { Route as AuthExamplesClientOrpcAuthRouteImport } from "./routes/_auth/examples/client-orpc-auth";
11
+ import { Route as rootRouteImport } from './routes/__root'
12
+ import { Route as PublicRouteImport } from './routes/_public'
13
+ import { Route as AuthRouteImport } from './routes/_auth'
14
+ import { Route as PublicIndexRouteImport } from './routes/_public/index'
15
+ import { Route as PublicSignupRouteImport } from './routes/_public/signup'
16
+ import { Route as PublicLoginRouteImport } from './routes/_public/login'
17
+ import { Route as AuthDashboardRouteImport } from './routes/_auth/dashboard'
18
+ import { Route as AuthAccountRouteImport } from './routes/_auth/account'
19
+ import { Route as ApiRpcSplatRouteImport } from './routes/api/rpc.$'
20
+ import { Route as ApiAuthSplatRouteImport } from './routes/api/auth/$'
21
+ import { Route as PublicExamplesSsrOrpcRouteImport } from './routes/_public/examples/ssr-orpc'
22
+ import { Route as PublicExamplesIsrRouteImport } from './routes/_public/examples/isr'
23
+ import { Route as PublicExamplesClientOrpcRouteImport } from './routes/_public/examples/client-orpc'
24
+ import { Route as AuthExamplesSsrOrpcAuthRouteImport } from './routes/_auth/examples/ssr-orpc-auth'
25
+ import { Route as AuthExamplesClientOrpcAuthRouteImport } from './routes/_auth/examples/client-orpc-auth'
26
26
 
27
27
  const PublicRoute = PublicRouteImport.update({
28
- id: "/_public",
28
+ id: '/_public',
29
29
  getParentRoute: () => rootRouteImport,
30
- } as any);
30
+ } as any)
31
31
  const AuthRoute = AuthRouteImport.update({
32
- id: "/_auth",
32
+ id: '/_auth',
33
33
  getParentRoute: () => rootRouteImport,
34
- } as any);
34
+ } as any)
35
35
  const PublicIndexRoute = PublicIndexRouteImport.update({
36
- id: "/",
37
- path: "/",
36
+ id: '/',
37
+ path: '/',
38
38
  getParentRoute: () => PublicRoute,
39
- } as any);
39
+ } as any)
40
40
  const PublicSignupRoute = PublicSignupRouteImport.update({
41
- id: "/signup",
42
- path: "/signup",
41
+ id: '/signup',
42
+ path: '/signup',
43
43
  getParentRoute: () => PublicRoute,
44
- } as any);
44
+ } as any)
45
45
  const PublicLoginRoute = PublicLoginRouteImport.update({
46
- id: "/login",
47
- path: "/login",
46
+ id: '/login',
47
+ path: '/login',
48
48
  getParentRoute: () => PublicRoute,
49
- } as any);
49
+ } as any)
50
50
  const AuthDashboardRoute = AuthDashboardRouteImport.update({
51
- id: "/dashboard",
52
- path: "/dashboard",
51
+ id: '/dashboard',
52
+ path: '/dashboard',
53
53
  getParentRoute: () => AuthRoute,
54
- } as any);
54
+ } as any)
55
55
  const AuthAccountRoute = AuthAccountRouteImport.update({
56
- id: "/account",
57
- path: "/account",
56
+ id: '/account',
57
+ path: '/account',
58
58
  getParentRoute: () => AuthRoute,
59
- } as any);
59
+ } as any)
60
60
  const ApiRpcSplatRoute = ApiRpcSplatRouteImport.update({
61
- id: "/api/rpc/$",
62
- path: "/api/rpc/$",
61
+ id: '/api/rpc/$',
62
+ path: '/api/rpc/$',
63
63
  getParentRoute: () => rootRouteImport,
64
- } as any);
64
+ } as any)
65
65
  const ApiAuthSplatRoute = ApiAuthSplatRouteImport.update({
66
- id: "/api/auth/$",
67
- path: "/api/auth/$",
66
+ id: '/api/auth/$',
67
+ path: '/api/auth/$',
68
68
  getParentRoute: () => rootRouteImport,
69
- } as any);
69
+ } as any)
70
70
  const PublicExamplesSsrOrpcRoute = PublicExamplesSsrOrpcRouteImport.update({
71
- id: "/examples/ssr-orpc",
72
- path: "/examples/ssr-orpc",
71
+ id: '/examples/ssr-orpc',
72
+ path: '/examples/ssr-orpc',
73
73
  getParentRoute: () => PublicRoute,
74
- } as any);
74
+ } as any)
75
75
  const PublicExamplesIsrRoute = PublicExamplesIsrRouteImport.update({
76
- id: "/examples/isr",
77
- path: "/examples/isr",
76
+ id: '/examples/isr',
77
+ path: '/examples/isr',
78
78
  getParentRoute: () => PublicRoute,
79
- } as any);
80
- const PublicExamplesClientOrpcRoute = PublicExamplesClientOrpcRouteImport.update({
81
- id: "/examples/client-orpc",
82
- path: "/examples/client-orpc",
83
- getParentRoute: () => PublicRoute,
84
- } as any);
79
+ } as any)
80
+ const PublicExamplesClientOrpcRoute =
81
+ PublicExamplesClientOrpcRouteImport.update({
82
+ id: '/examples/client-orpc',
83
+ path: '/examples/client-orpc',
84
+ getParentRoute: () => PublicRoute,
85
+ } as any)
85
86
  const AuthExamplesSsrOrpcAuthRoute = AuthExamplesSsrOrpcAuthRouteImport.update({
86
- id: "/examples/ssr-orpc-auth",
87
- path: "/examples/ssr-orpc-auth",
88
- getParentRoute: () => AuthRoute,
89
- } as any);
90
- const AuthExamplesClientOrpcAuthRoute = AuthExamplesClientOrpcAuthRouteImport.update({
91
- id: "/examples/client-orpc-auth",
92
- path: "/examples/client-orpc-auth",
87
+ id: '/examples/ssr-orpc-auth',
88
+ path: '/examples/ssr-orpc-auth',
93
89
  getParentRoute: () => AuthRoute,
94
- } as any);
90
+ } as any)
91
+ const AuthExamplesClientOrpcAuthRoute =
92
+ AuthExamplesClientOrpcAuthRouteImport.update({
93
+ id: '/examples/client-orpc-auth',
94
+ path: '/examples/client-orpc-auth',
95
+ getParentRoute: () => AuthRoute,
96
+ } as any)
95
97
 
96
98
  export interface FileRoutesByFullPath {
97
- "/": typeof PublicIndexRoute;
98
- "/account": typeof AuthAccountRoute;
99
- "/dashboard": typeof AuthDashboardRoute;
100
- "/login": typeof PublicLoginRoute;
101
- "/signup": typeof PublicSignupRoute;
102
- "/examples/client-orpc-auth": typeof AuthExamplesClientOrpcAuthRoute;
103
- "/examples/ssr-orpc-auth": typeof AuthExamplesSsrOrpcAuthRoute;
104
- "/examples/client-orpc": typeof PublicExamplesClientOrpcRoute;
105
- "/examples/isr": typeof PublicExamplesIsrRoute;
106
- "/examples/ssr-orpc": typeof PublicExamplesSsrOrpcRoute;
107
- "/api/auth/$": typeof ApiAuthSplatRoute;
108
- "/api/rpc/$": typeof ApiRpcSplatRoute;
99
+ '/': typeof PublicIndexRoute
100
+ '/account': typeof AuthAccountRoute
101
+ '/dashboard': typeof AuthDashboardRoute
102
+ '/login': typeof PublicLoginRoute
103
+ '/signup': typeof PublicSignupRoute
104
+ '/examples/client-orpc-auth': typeof AuthExamplesClientOrpcAuthRoute
105
+ '/examples/ssr-orpc-auth': typeof AuthExamplesSsrOrpcAuthRoute
106
+ '/examples/client-orpc': typeof PublicExamplesClientOrpcRoute
107
+ '/examples/isr': typeof PublicExamplesIsrRoute
108
+ '/examples/ssr-orpc': typeof PublicExamplesSsrOrpcRoute
109
+ '/api/auth/$': typeof ApiAuthSplatRoute
110
+ '/api/rpc/$': typeof ApiRpcSplatRoute
109
111
  }
110
112
  export interface FileRoutesByTo {
111
- "/": typeof PublicIndexRoute;
112
- "/account": typeof AuthAccountRoute;
113
- "/dashboard": typeof AuthDashboardRoute;
114
- "/login": typeof PublicLoginRoute;
115
- "/signup": typeof PublicSignupRoute;
116
- "/examples/client-orpc-auth": typeof AuthExamplesClientOrpcAuthRoute;
117
- "/examples/ssr-orpc-auth": typeof AuthExamplesSsrOrpcAuthRoute;
118
- "/examples/client-orpc": typeof PublicExamplesClientOrpcRoute;
119
- "/examples/isr": typeof PublicExamplesIsrRoute;
120
- "/examples/ssr-orpc": typeof PublicExamplesSsrOrpcRoute;
121
- "/api/auth/$": typeof ApiAuthSplatRoute;
122
- "/api/rpc/$": typeof ApiRpcSplatRoute;
113
+ '/': typeof PublicIndexRoute
114
+ '/account': typeof AuthAccountRoute
115
+ '/dashboard': typeof AuthDashboardRoute
116
+ '/login': typeof PublicLoginRoute
117
+ '/signup': typeof PublicSignupRoute
118
+ '/examples/client-orpc-auth': typeof AuthExamplesClientOrpcAuthRoute
119
+ '/examples/ssr-orpc-auth': typeof AuthExamplesSsrOrpcAuthRoute
120
+ '/examples/client-orpc': typeof PublicExamplesClientOrpcRoute
121
+ '/examples/isr': typeof PublicExamplesIsrRoute
122
+ '/examples/ssr-orpc': typeof PublicExamplesSsrOrpcRoute
123
+ '/api/auth/$': typeof ApiAuthSplatRoute
124
+ '/api/rpc/$': typeof ApiRpcSplatRoute
123
125
  }
124
126
  export interface FileRoutesById {
125
- __root__: typeof rootRouteImport;
126
- "/_auth": typeof AuthRouteWithChildren;
127
- "/_public": typeof PublicRouteWithChildren;
128
- "/_auth/account": typeof AuthAccountRoute;
129
- "/_auth/dashboard": typeof AuthDashboardRoute;
130
- "/_public/login": typeof PublicLoginRoute;
131
- "/_public/signup": typeof PublicSignupRoute;
132
- "/_public/": typeof PublicIndexRoute;
133
- "/_auth/examples/client-orpc-auth": typeof AuthExamplesClientOrpcAuthRoute;
134
- "/_auth/examples/ssr-orpc-auth": typeof AuthExamplesSsrOrpcAuthRoute;
135
- "/_public/examples/client-orpc": typeof PublicExamplesClientOrpcRoute;
136
- "/_public/examples/isr": typeof PublicExamplesIsrRoute;
137
- "/_public/examples/ssr-orpc": typeof PublicExamplesSsrOrpcRoute;
138
- "/api/auth/$": typeof ApiAuthSplatRoute;
139
- "/api/rpc/$": typeof ApiRpcSplatRoute;
127
+ __root__: typeof rootRouteImport
128
+ '/_auth': typeof AuthRouteWithChildren
129
+ '/_public': typeof PublicRouteWithChildren
130
+ '/_auth/account': typeof AuthAccountRoute
131
+ '/_auth/dashboard': typeof AuthDashboardRoute
132
+ '/_public/login': typeof PublicLoginRoute
133
+ '/_public/signup': typeof PublicSignupRoute
134
+ '/_public/': typeof PublicIndexRoute
135
+ '/_auth/examples/client-orpc-auth': typeof AuthExamplesClientOrpcAuthRoute
136
+ '/_auth/examples/ssr-orpc-auth': typeof AuthExamplesSsrOrpcAuthRoute
137
+ '/_public/examples/client-orpc': typeof PublicExamplesClientOrpcRoute
138
+ '/_public/examples/isr': typeof PublicExamplesIsrRoute
139
+ '/_public/examples/ssr-orpc': typeof PublicExamplesSsrOrpcRoute
140
+ '/api/auth/$': typeof ApiAuthSplatRoute
141
+ '/api/rpc/$': typeof ApiRpcSplatRoute
140
142
  }
141
143
  export interface FileRouteTypes {
142
- fileRoutesByFullPath: FileRoutesByFullPath;
144
+ fileRoutesByFullPath: FileRoutesByFullPath
143
145
  fullPaths:
144
- | "/"
145
- | "/account"
146
- | "/dashboard"
147
- | "/login"
148
- | "/signup"
149
- | "/examples/client-orpc-auth"
150
- | "/examples/ssr-orpc-auth"
151
- | "/examples/client-orpc"
152
- | "/examples/isr"
153
- | "/examples/ssr-orpc"
154
- | "/api/auth/$"
155
- | "/api/rpc/$";
156
- fileRoutesByTo: FileRoutesByTo;
146
+ | '/'
147
+ | '/account'
148
+ | '/dashboard'
149
+ | '/login'
150
+ | '/signup'
151
+ | '/examples/client-orpc-auth'
152
+ | '/examples/ssr-orpc-auth'
153
+ | '/examples/client-orpc'
154
+ | '/examples/isr'
155
+ | '/examples/ssr-orpc'
156
+ | '/api/auth/$'
157
+ | '/api/rpc/$'
158
+ fileRoutesByTo: FileRoutesByTo
157
159
  to:
158
- | "/"
159
- | "/account"
160
- | "/dashboard"
161
- | "/login"
162
- | "/signup"
163
- | "/examples/client-orpc-auth"
164
- | "/examples/ssr-orpc-auth"
165
- | "/examples/client-orpc"
166
- | "/examples/isr"
167
- | "/examples/ssr-orpc"
168
- | "/api/auth/$"
169
- | "/api/rpc/$";
160
+ | '/'
161
+ | '/account'
162
+ | '/dashboard'
163
+ | '/login'
164
+ | '/signup'
165
+ | '/examples/client-orpc-auth'
166
+ | '/examples/ssr-orpc-auth'
167
+ | '/examples/client-orpc'
168
+ | '/examples/isr'
169
+ | '/examples/ssr-orpc'
170
+ | '/api/auth/$'
171
+ | '/api/rpc/$'
170
172
  id:
171
- | "__root__"
172
- | "/_auth"
173
- | "/_public"
174
- | "/_auth/account"
175
- | "/_auth/dashboard"
176
- | "/_public/login"
177
- | "/_public/signup"
178
- | "/_public/"
179
- | "/_auth/examples/client-orpc-auth"
180
- | "/_auth/examples/ssr-orpc-auth"
181
- | "/_public/examples/client-orpc"
182
- | "/_public/examples/isr"
183
- | "/_public/examples/ssr-orpc"
184
- | "/api/auth/$"
185
- | "/api/rpc/$";
186
- fileRoutesById: FileRoutesById;
173
+ | '__root__'
174
+ | '/_auth'
175
+ | '/_public'
176
+ | '/_auth/account'
177
+ | '/_auth/dashboard'
178
+ | '/_public/login'
179
+ | '/_public/signup'
180
+ | '/_public/'
181
+ | '/_auth/examples/client-orpc-auth'
182
+ | '/_auth/examples/ssr-orpc-auth'
183
+ | '/_public/examples/client-orpc'
184
+ | '/_public/examples/isr'
185
+ | '/_public/examples/ssr-orpc'
186
+ | '/api/auth/$'
187
+ | '/api/rpc/$'
188
+ fileRoutesById: FileRoutesById
187
189
  }
188
190
  export interface RootRouteChildren {
189
- AuthRoute: typeof AuthRouteWithChildren;
190
- PublicRoute: typeof PublicRouteWithChildren;
191
- ApiAuthSplatRoute: typeof ApiAuthSplatRoute;
192
- ApiRpcSplatRoute: typeof ApiRpcSplatRoute;
191
+ AuthRoute: typeof AuthRouteWithChildren
192
+ PublicRoute: typeof PublicRouteWithChildren
193
+ ApiAuthSplatRoute: typeof ApiAuthSplatRoute
194
+ ApiRpcSplatRoute: typeof ApiRpcSplatRoute
193
195
  }
194
196
 
195
- declare module "@tanstack/react-router" {
197
+ declare module '@tanstack/react-router' {
196
198
  interface FileRoutesByPath {
197
- "/_public": {
198
- id: "/_public";
199
- path: "";
200
- fullPath: "/";
201
- preLoaderRoute: typeof PublicRouteImport;
202
- parentRoute: typeof rootRouteImport;
203
- };
204
- "/_auth": {
205
- id: "/_auth";
206
- path: "";
207
- fullPath: "/";
208
- preLoaderRoute: typeof AuthRouteImport;
209
- parentRoute: typeof rootRouteImport;
210
- };
211
- "/_public/": {
212
- id: "/_public/";
213
- path: "/";
214
- fullPath: "/";
215
- preLoaderRoute: typeof PublicIndexRouteImport;
216
- parentRoute: typeof PublicRoute;
217
- };
218
- "/_public/signup": {
219
- id: "/_public/signup";
220
- path: "/signup";
221
- fullPath: "/signup";
222
- preLoaderRoute: typeof PublicSignupRouteImport;
223
- parentRoute: typeof PublicRoute;
224
- };
225
- "/_public/login": {
226
- id: "/_public/login";
227
- path: "/login";
228
- fullPath: "/login";
229
- preLoaderRoute: typeof PublicLoginRouteImport;
230
- parentRoute: typeof PublicRoute;
231
- };
232
- "/_auth/dashboard": {
233
- id: "/_auth/dashboard";
234
- path: "/dashboard";
235
- fullPath: "/dashboard";
236
- preLoaderRoute: typeof AuthDashboardRouteImport;
237
- parentRoute: typeof AuthRoute;
238
- };
239
- "/_auth/account": {
240
- id: "/_auth/account";
241
- path: "/account";
242
- fullPath: "/account";
243
- preLoaderRoute: typeof AuthAccountRouteImport;
244
- parentRoute: typeof AuthRoute;
245
- };
246
- "/api/rpc/$": {
247
- id: "/api/rpc/$";
248
- path: "/api/rpc/$";
249
- fullPath: "/api/rpc/$";
250
- preLoaderRoute: typeof ApiRpcSplatRouteImport;
251
- parentRoute: typeof rootRouteImport;
252
- };
253
- "/api/auth/$": {
254
- id: "/api/auth/$";
255
- path: "/api/auth/$";
256
- fullPath: "/api/auth/$";
257
- preLoaderRoute: typeof ApiAuthSplatRouteImport;
258
- parentRoute: typeof rootRouteImport;
259
- };
260
- "/_public/examples/ssr-orpc": {
261
- id: "/_public/examples/ssr-orpc";
262
- path: "/examples/ssr-orpc";
263
- fullPath: "/examples/ssr-orpc";
264
- preLoaderRoute: typeof PublicExamplesSsrOrpcRouteImport;
265
- parentRoute: typeof PublicRoute;
266
- };
267
- "/_public/examples/isr": {
268
- id: "/_public/examples/isr";
269
- path: "/examples/isr";
270
- fullPath: "/examples/isr";
271
- preLoaderRoute: typeof PublicExamplesIsrRouteImport;
272
- parentRoute: typeof PublicRoute;
273
- };
274
- "/_public/examples/client-orpc": {
275
- id: "/_public/examples/client-orpc";
276
- path: "/examples/client-orpc";
277
- fullPath: "/examples/client-orpc";
278
- preLoaderRoute: typeof PublicExamplesClientOrpcRouteImport;
279
- parentRoute: typeof PublicRoute;
280
- };
281
- "/_auth/examples/ssr-orpc-auth": {
282
- id: "/_auth/examples/ssr-orpc-auth";
283
- path: "/examples/ssr-orpc-auth";
284
- fullPath: "/examples/ssr-orpc-auth";
285
- preLoaderRoute: typeof AuthExamplesSsrOrpcAuthRouteImport;
286
- parentRoute: typeof AuthRoute;
287
- };
288
- "/_auth/examples/client-orpc-auth": {
289
- id: "/_auth/examples/client-orpc-auth";
290
- path: "/examples/client-orpc-auth";
291
- fullPath: "/examples/client-orpc-auth";
292
- preLoaderRoute: typeof AuthExamplesClientOrpcAuthRouteImport;
293
- parentRoute: typeof AuthRoute;
294
- };
199
+ '/_public': {
200
+ id: '/_public'
201
+ path: ''
202
+ fullPath: '/'
203
+ preLoaderRoute: typeof PublicRouteImport
204
+ parentRoute: typeof rootRouteImport
205
+ }
206
+ '/_auth': {
207
+ id: '/_auth'
208
+ path: ''
209
+ fullPath: '/'
210
+ preLoaderRoute: typeof AuthRouteImport
211
+ parentRoute: typeof rootRouteImport
212
+ }
213
+ '/_public/': {
214
+ id: '/_public/'
215
+ path: '/'
216
+ fullPath: '/'
217
+ preLoaderRoute: typeof PublicIndexRouteImport
218
+ parentRoute: typeof PublicRoute
219
+ }
220
+ '/_public/signup': {
221
+ id: '/_public/signup'
222
+ path: '/signup'
223
+ fullPath: '/signup'
224
+ preLoaderRoute: typeof PublicSignupRouteImport
225
+ parentRoute: typeof PublicRoute
226
+ }
227
+ '/_public/login': {
228
+ id: '/_public/login'
229
+ path: '/login'
230
+ fullPath: '/login'
231
+ preLoaderRoute: typeof PublicLoginRouteImport
232
+ parentRoute: typeof PublicRoute
233
+ }
234
+ '/_auth/dashboard': {
235
+ id: '/_auth/dashboard'
236
+ path: '/dashboard'
237
+ fullPath: '/dashboard'
238
+ preLoaderRoute: typeof AuthDashboardRouteImport
239
+ parentRoute: typeof AuthRoute
240
+ }
241
+ '/_auth/account': {
242
+ id: '/_auth/account'
243
+ path: '/account'
244
+ fullPath: '/account'
245
+ preLoaderRoute: typeof AuthAccountRouteImport
246
+ parentRoute: typeof AuthRoute
247
+ }
248
+ '/api/rpc/$': {
249
+ id: '/api/rpc/$'
250
+ path: '/api/rpc/$'
251
+ fullPath: '/api/rpc/$'
252
+ preLoaderRoute: typeof ApiRpcSplatRouteImport
253
+ parentRoute: typeof rootRouteImport
254
+ }
255
+ '/api/auth/$': {
256
+ id: '/api/auth/$'
257
+ path: '/api/auth/$'
258
+ fullPath: '/api/auth/$'
259
+ preLoaderRoute: typeof ApiAuthSplatRouteImport
260
+ parentRoute: typeof rootRouteImport
261
+ }
262
+ '/_public/examples/ssr-orpc': {
263
+ id: '/_public/examples/ssr-orpc'
264
+ path: '/examples/ssr-orpc'
265
+ fullPath: '/examples/ssr-orpc'
266
+ preLoaderRoute: typeof PublicExamplesSsrOrpcRouteImport
267
+ parentRoute: typeof PublicRoute
268
+ }
269
+ '/_public/examples/isr': {
270
+ id: '/_public/examples/isr'
271
+ path: '/examples/isr'
272
+ fullPath: '/examples/isr'
273
+ preLoaderRoute: typeof PublicExamplesIsrRouteImport
274
+ parentRoute: typeof PublicRoute
275
+ }
276
+ '/_public/examples/client-orpc': {
277
+ id: '/_public/examples/client-orpc'
278
+ path: '/examples/client-orpc'
279
+ fullPath: '/examples/client-orpc'
280
+ preLoaderRoute: typeof PublicExamplesClientOrpcRouteImport
281
+ parentRoute: typeof PublicRoute
282
+ }
283
+ '/_auth/examples/ssr-orpc-auth': {
284
+ id: '/_auth/examples/ssr-orpc-auth'
285
+ path: '/examples/ssr-orpc-auth'
286
+ fullPath: '/examples/ssr-orpc-auth'
287
+ preLoaderRoute: typeof AuthExamplesSsrOrpcAuthRouteImport
288
+ parentRoute: typeof AuthRoute
289
+ }
290
+ '/_auth/examples/client-orpc-auth': {
291
+ id: '/_auth/examples/client-orpc-auth'
292
+ path: '/examples/client-orpc-auth'
293
+ fullPath: '/examples/client-orpc-auth'
294
+ preLoaderRoute: typeof AuthExamplesClientOrpcAuthRouteImport
295
+ parentRoute: typeof AuthRoute
296
+ }
295
297
  }
296
298
  }
297
299
 
298
300
  interface AuthRouteChildren {
299
- AuthAccountRoute: typeof AuthAccountRoute;
300
- AuthDashboardRoute: typeof AuthDashboardRoute;
301
- AuthExamplesClientOrpcAuthRoute: typeof AuthExamplesClientOrpcAuthRoute;
302
- AuthExamplesSsrOrpcAuthRoute: typeof AuthExamplesSsrOrpcAuthRoute;
301
+ AuthAccountRoute: typeof AuthAccountRoute
302
+ AuthDashboardRoute: typeof AuthDashboardRoute
303
+ AuthExamplesClientOrpcAuthRoute: typeof AuthExamplesClientOrpcAuthRoute
304
+ AuthExamplesSsrOrpcAuthRoute: typeof AuthExamplesSsrOrpcAuthRoute
303
305
  }
304
306
 
305
307
  const AuthRouteChildren: AuthRouteChildren = {
@@ -307,17 +309,17 @@ const AuthRouteChildren: AuthRouteChildren = {
307
309
  AuthDashboardRoute: AuthDashboardRoute,
308
310
  AuthExamplesClientOrpcAuthRoute: AuthExamplesClientOrpcAuthRoute,
309
311
  AuthExamplesSsrOrpcAuthRoute: AuthExamplesSsrOrpcAuthRoute,
310
- };
312
+ }
311
313
 
312
- const AuthRouteWithChildren = AuthRoute._addFileChildren(AuthRouteChildren);
314
+ const AuthRouteWithChildren = AuthRoute._addFileChildren(AuthRouteChildren)
313
315
 
314
316
  interface PublicRouteChildren {
315
- PublicLoginRoute: typeof PublicLoginRoute;
316
- PublicSignupRoute: typeof PublicSignupRoute;
317
- PublicIndexRoute: typeof PublicIndexRoute;
318
- PublicExamplesClientOrpcRoute: typeof PublicExamplesClientOrpcRoute;
319
- PublicExamplesIsrRoute: typeof PublicExamplesIsrRoute;
320
- PublicExamplesSsrOrpcRoute: typeof PublicExamplesSsrOrpcRoute;
317
+ PublicLoginRoute: typeof PublicLoginRoute
318
+ PublicSignupRoute: typeof PublicSignupRoute
319
+ PublicIndexRoute: typeof PublicIndexRoute
320
+ PublicExamplesClientOrpcRoute: typeof PublicExamplesClientOrpcRoute
321
+ PublicExamplesIsrRoute: typeof PublicExamplesIsrRoute
322
+ PublicExamplesSsrOrpcRoute: typeof PublicExamplesSsrOrpcRoute
321
323
  }
322
324
 
323
325
  const PublicRouteChildren: PublicRouteChildren = {
@@ -327,25 +329,26 @@ const PublicRouteChildren: PublicRouteChildren = {
327
329
  PublicExamplesClientOrpcRoute: PublicExamplesClientOrpcRoute,
328
330
  PublicExamplesIsrRoute: PublicExamplesIsrRoute,
329
331
  PublicExamplesSsrOrpcRoute: PublicExamplesSsrOrpcRoute,
330
- };
332
+ }
331
333
 
332
- const PublicRouteWithChildren = PublicRoute._addFileChildren(PublicRouteChildren);
334
+ const PublicRouteWithChildren =
335
+ PublicRoute._addFileChildren(PublicRouteChildren)
333
336
 
334
337
  const rootRouteChildren: RootRouteChildren = {
335
338
  AuthRoute: AuthRouteWithChildren,
336
339
  PublicRoute: PublicRouteWithChildren,
337
340
  ApiAuthSplatRoute: ApiAuthSplatRoute,
338
341
  ApiRpcSplatRoute: ApiRpcSplatRoute,
339
- };
342
+ }
340
343
  export const routeTree = rootRouteImport
341
344
  ._addFileChildren(rootRouteChildren)
342
- ._addFileTypes<FileRouteTypes>();
345
+ ._addFileTypes<FileRouteTypes>()
343
346
 
344
- import type { getRouter } from "./router.tsx";
345
- import type { createStart } from "@tanstack/react-start";
346
- declare module "@tanstack/react-start" {
347
+ import type { getRouter } from './router.tsx'
348
+ import type { createStart } from '@tanstack/react-start'
349
+ declare module '@tanstack/react-start' {
347
350
  interface Register {
348
- ssr: true;
349
- router: Awaited<ReturnType<typeof getRouter>>;
351
+ ssr: true
352
+ router: Awaited<ReturnType<typeof getRouter>>
350
353
  }
351
354
  }
@@ -32,8 +32,6 @@
32
32
  "@types/react": "^19.2.7",
33
33
  "@types/react-dom": "^19.2.3",
34
34
  "arktype": "^2.2.0",
35
- "expo": "^55.0.17",
36
- "expo-router": "~55.0.13",
37
35
  "husky": "^9.1.7",
38
36
  "oxfmt": "^0.46.0",
39
37
  "oxlint": "^1.61.0",