Skip to content

Commit 0948202

Browse files
feat(cli): upgrade to expo 54 (#574)
1 parent 0bfb3cf commit 0948202

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+491
-579
lines changed

apps/cli/package.json

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
11
{
2-
"name": "create-better-t-stack",
3-
"version": "2.44.0",
4-
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
5-
"type": "module",
6-
"license": "MIT",
7-
"author": "Aman Varshney",
8-
"bin": {
9-
"create-better-t-stack": "dist/cli.js"
10-
},
11-
"files": [
12-
"templates",
13-
"dist"
14-
],
15-
"keywords": [
16-
"better-t-stack",
17-
"typescript",
18-
"boilerplate",
19-
"starter",
20-
"cli",
21-
"turborepo",
22-
"trpc",
23-
"better-auth",
24-
"monorepo",
25-
"fullstack",
26-
"type-safety",
27-
"react",
28-
"react-native",
29-
"expo",
30-
"hono",
31-
"elysia",
32-
"drizzle",
33-
"prisma",
34-
"tanstack",
35-
"tailwind",
36-
"shadcn",
37-
"pwa",
38-
"tauri",
39-
"biome"
40-
],
41-
"repository": {
42-
"type": "git",
43-
"url": "git+https://github.com/AmanVarshney01/create-better-t-stack.git",
44-
"directory": "apps/cli"
45-
},
46-
"publishConfig": {
47-
"access": "public"
48-
},
49-
"homepage": "https://better-t-stack.dev/",
50-
"scripts": {
51-
"build": "tsdown",
52-
"dev": "tsdown --watch",
53-
"check-types": "tsc --noEmit",
54-
"check": "biome check --write .",
55-
"test": "bun run build && vitest run",
56-
"test:ui": "bun run build && vitest --ui",
57-
"test:with-build": "bun run build && WITH_BUILD=1 vitest --ui",
58-
"prepublishOnly": "npm run build"
59-
},
60-
"exports": {
61-
".": {
62-
"types": "./dist/index.d.ts",
63-
"import": "./dist/index.js"
64-
}
65-
},
66-
"dependencies": {
67-
"@biomejs/js-api": "^3.0.0",
68-
"@biomejs/wasm-nodejs": "^2.2.4",
69-
"@clack/prompts": "^1.0.0-alpha.4",
70-
"consola": "^3.4.2",
71-
"execa": "^9.6.0",
72-
"fs-extra": "^11.3.1",
73-
"gradient-string": "^3.0.0",
74-
"handlebars": "^4.7.8",
75-
"jsonc-parser": "^3.3.1",
76-
"picocolors": "^1.1.1",
77-
"tinyglobby": "^0.2.15",
78-
"trpc-cli": "^0.10.2",
79-
"ts-morph": "^27.0.0",
80-
"zod": "^4.1.5"
81-
},
82-
"devDependencies": {
83-
"@types/fs-extra": "^11.0.4",
84-
"@types/node": "^24.3.1",
85-
"@vitest/ui": "^3.2.4",
86-
"tsdown": "^0.14.2",
87-
"typescript": "^5.9.2",
88-
"vitest": "^3.2.4"
89-
}
2+
"name": "create-better-t-stack",
3+
"version": "2.44.0",
4+
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
5+
"type": "module",
6+
"license": "MIT",
7+
"author": "Aman Varshney",
8+
"bin": {
9+
"create-better-t-stack": "dist/cli.js"
10+
},
11+
"files": [
12+
"templates",
13+
"dist"
14+
],
15+
"keywords": [
16+
"better-t-stack",
17+
"typescript",
18+
"boilerplate",
19+
"starter",
20+
"cli",
21+
"turborepo",
22+
"trpc",
23+
"better-auth",
24+
"monorepo",
25+
"fullstack",
26+
"type-safety",
27+
"react",
28+
"react-native",
29+
"expo",
30+
"hono",
31+
"elysia",
32+
"drizzle",
33+
"prisma",
34+
"tanstack",
35+
"tailwind",
36+
"shadcn",
37+
"pwa",
38+
"tauri",
39+
"biome"
40+
],
41+
"repository": {
42+
"type": "git",
43+
"url": "git+https://github.com/AmanVarshney01/create-better-t-stack.git",
44+
"directory": "apps/cli"
45+
},
46+
"publishConfig": {
47+
"access": "public"
48+
},
49+
"homepage": "https://better-t-stack.dev/",
50+
"scripts": {
51+
"build": "tsdown",
52+
"dev": "tsdown --watch",
53+
"check-types": "tsc --noEmit",
54+
"check": "biome check --write .",
55+
"test": "bun run build && vitest run",
56+
"test:ui": "bun run build && vitest --ui",
57+
"test:with-build": "bun run build && WITH_BUILD=1 vitest --ui",
58+
"prepublishOnly": "npm run build"
59+
},
60+
"exports": {
61+
".": {
62+
"types": "./dist/index.d.ts",
63+
"import": "./dist/index.js"
64+
}
65+
},
66+
"dependencies": {
67+
"@biomejs/js-api": "^3.0.0",
68+
"@biomejs/wasm-nodejs": "^2.2.4",
69+
"@clack/prompts": "^1.0.0-alpha.4",
70+
"consola": "^3.4.2",
71+
"execa": "^9.6.0",
72+
"fs-extra": "^11.3.1",
73+
"gradient-string": "^3.0.0",
74+
"handlebars": "^4.7.8",
75+
"jsonc-parser": "^3.3.1",
76+
"picocolors": "^1.1.1",
77+
"tinyglobby": "^0.2.15",
78+
"trpc-cli": "^0.10.2",
79+
"ts-morph": "^27.0.0",
80+
"zod": "^4.1.5"
81+
},
82+
"devDependencies": {
83+
"@types/fs-extra": "^11.0.4",
84+
"@types/node": "^24.3.1",
85+
"@vitest/ui": "^3.2.4",
86+
"tsdown": "^0.14.2",
87+
"typescript": "^5.9.2",
88+
"vitest": "^3.2.4"
89+
}
9090
}

apps/cli/src/helpers/core/template-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ export async function handleExtras(projectDir: string, context: ProjectConfig) {
851851
const pnpmWorkspaceSrc = path.join(extrasDir, "pnpm-workspace.yaml");
852852
const pnpmWorkspaceDest = path.join(projectDir, "pnpm-workspace.yaml");
853853
if (await fs.pathExists(pnpmWorkspaceSrc)) {
854-
await fs.copy(pnpmWorkspaceSrc, pnpmWorkspaceDest);
854+
await processTemplate(pnpmWorkspaceSrc, pnpmWorkspaceDest, context);
855855
}
856856
}
857857

apps/cli/src/utils/template-processor.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ import handlebars from "handlebars";
55
import type { ProjectConfig } from "../types";
66
import { formatFileWithBiome } from "./biome-formatter";
77

8+
const BINARY_EXTENSIONS = new Set([
9+
".png", ".ico", ".svg",
10+
]);
11+
12+
function isBinaryFile(filePath: string): boolean {
13+
const ext = path.extname(filePath).toLowerCase();
14+
return BINARY_EXTENSIONS.has(ext);
15+
}
16+
817
export async function processTemplate(
918
srcPath: string,
1019
destPath: string,
@@ -13,6 +22,11 @@ export async function processTemplate(
1322
try {
1423
await fs.ensureDir(path.dirname(destPath));
1524

25+
if (isBinaryFile(srcPath) && !srcPath.endsWith(".hbs")) {
26+
await fs.copy(srcPath, destPath);
27+
return;
28+
}
29+
1630
let content: string;
1731

1832
if (srcPath.endsWith(".hbs")) {

apps/cli/templates/auth/better-auth/native/native-base/lib/auth-client.ts.hbs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { createAuthClient } from "better-auth/react";
21
import { expoClient } from "@better-auth/expo/client";
2+
import { createAuthClient } from "better-auth/react";
33
import * as SecureStore from "expo-secure-store";
44

55
export const authClient = createAuthClient({
66
baseURL: process.env.EXPO_PUBLIC_SERVER_URL,
77
plugins: [
88
expoClient({
9-
storagePrefix: "my-better-t-app",
9+
scheme: "mybettertapp",
10+
storagePrefix: "{{projectName}}",
1011
storage: SecureStore,
1112
}),
1213
],

apps/cli/templates/auth/better-auth/server/base/src/lib/auth.ts.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const auth = betterAuth({
1616
trustedOrigins: [
1717
process.env.CORS_ORIGIN || "",
1818
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
19-
"my-better-t-app://",
19+
"mybettertapp://", "exp://"
2020
{{/if}}
2121
],
2222
emailAndPassword: {
@@ -55,7 +55,7 @@ export const auth = betterAuth({
5555
trustedOrigins: [
5656
process.env.CORS_ORIGIN || "",
5757
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
58-
"my-better-t-app://",
58+
"mybettertapp://", "exp://"
5959
{{/if}}
6060
],
6161
emailAndPassword: {
@@ -124,7 +124,7 @@ export const auth = betterAuth({
124124
trustedOrigins: [
125125
process.env.CORS_ORIGIN || "",
126126
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
127-
"my-better-t-app://",
127+
"mybettertapp://", "exp://"
128128
{{/if}}
129129
],
130130
emailAndPassword: {
@@ -154,7 +154,7 @@ export const auth = betterAuth({
154154
trustedOrigins: [
155155
process.env.CORS_ORIGIN || "",
156156
{{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
157-
"my-better-t-app://",
157+
"mybettertapp://", "exp://"
158158
{{/if}}
159159
],
160160
emailAndPassword: {
@@ -171,4 +171,4 @@ export const auth = betterAuth({
171171
, plugins: [expo()]
172172
{{/if}}
173173
});
174-
{{/if}}
174+
{{/if}}

apps/cli/templates/backend/server/next/package.json.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
},
1010
"dependencies": {
1111
"next": "15.5.0",
12-
"react": "^19.0.0",
13-
"react-dom": "^19.0.0",
12+
"react": "19.1.0",
13+
"react-dom": "19.1.0",
1414
"dotenv": "^17.2.1"
1515
},
1616
{{#if (eq dbSetup 'supabase')}}
@@ -20,7 +20,7 @@
2020
{{/if}}
2121
"devDependencies": {
2222
"@types/node": "^20",
23-
"@types/react": "^19",
23+
"@types/react": "~19.1.10",
2424
"zod": "^4.0.13",
2525
"typescript": "^5"
2626
}
-1.38 KB
Binary file not shown.
-21.9 KB
Binary file not shown.
17.1 KB
Loading
76.9 KB
Loading

0 commit comments

Comments
 (0)