create-better-t-stack 3.2.6-canary.46b928a7 → 3.2.7
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/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-D60cASJW.js → src-c3LG0aVB.js} +10 -10
- package/package.json +1 -1
- package/templates/addons/ruler/.ruler/ruler.toml.hbs +6 -0
- package/templates/auth/better-auth/server/base/src/index.ts.hbs +15 -15
- package/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbs +3 -6
- package/templates/examples/ai/web/react/next/src/app/ai/page.tsx.hbs +1 -1
- package/templates/frontend/react/next/next.config.ts.hbs +1 -0
- package/templates/frontend/react/next/package.json.hbs +9 -8
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-
|
|
2
|
+
import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-c3LG0aVB.js";
|
|
3
3
|
|
|
4
4
|
export { builder, createBtsCli, docs, init, router, sponsors };
|
|
@@ -62,8 +62,8 @@ function getDefaultConfig() {
|
|
|
62
62
|
}
|
|
63
63
|
const DEFAULT_CONFIG = getDefaultConfig();
|
|
64
64
|
const dependencyVersionMap = {
|
|
65
|
-
"better-auth": "^1.3.
|
|
66
|
-
"@better-auth/expo": "^1.3.
|
|
65
|
+
"better-auth": "^1.3.28",
|
|
66
|
+
"@better-auth/expo": "^1.3.28",
|
|
67
67
|
"@clerk/nextjs": "^6.31.5",
|
|
68
68
|
"@clerk/clerk-react": "^5.45.0",
|
|
69
69
|
"@clerk/tanstack-react-start": "^0.26.3",
|
|
@@ -116,11 +116,11 @@ const dependencyVersionMap = {
|
|
|
116
116
|
"@ai-sdk/react": "^2.0.39",
|
|
117
117
|
streamdown: "^1.3.0",
|
|
118
118
|
shiki: "^3.12.2",
|
|
119
|
-
"@orpc/server": "^1.
|
|
120
|
-
"@orpc/client": "^1.
|
|
121
|
-
"@orpc/openapi": "^1.
|
|
122
|
-
"@orpc/zod": "^1.
|
|
123
|
-
"@orpc/tanstack-query": "^1.
|
|
119
|
+
"@orpc/server": "^1.10.0",
|
|
120
|
+
"@orpc/client": "^1.10.0",
|
|
121
|
+
"@orpc/openapi": "^1.10.0",
|
|
122
|
+
"@orpc/zod": "^1.10.0",
|
|
123
|
+
"@orpc/tanstack-query": "^1.10.0",
|
|
124
124
|
"@trpc/tanstack-react-query": "^11.5.0",
|
|
125
125
|
"@trpc/server": "^11.5.0",
|
|
126
126
|
"@trpc/client": "^11.5.0",
|
|
@@ -1375,7 +1375,7 @@ const getLatestCLIVersion = () => {
|
|
|
1375
1375
|
*/
|
|
1376
1376
|
function isTelemetryEnabled() {
|
|
1377
1377
|
const BTS_TELEMETRY_DISABLED = process.env.BTS_TELEMETRY_DISABLED;
|
|
1378
|
-
const BTS_TELEMETRY = "
|
|
1378
|
+
const BTS_TELEMETRY = "1";
|
|
1379
1379
|
if (BTS_TELEMETRY_DISABLED !== void 0) return BTS_TELEMETRY_DISABLED !== "1";
|
|
1380
1380
|
if (BTS_TELEMETRY !== void 0) return BTS_TELEMETRY === "1";
|
|
1381
1381
|
return true;
|
|
@@ -1383,8 +1383,8 @@ function isTelemetryEnabled() {
|
|
|
1383
1383
|
|
|
1384
1384
|
//#endregion
|
|
1385
1385
|
//#region src/utils/analytics.ts
|
|
1386
|
-
const POSTHOG_API_KEY = "
|
|
1387
|
-
const POSTHOG_HOST = "
|
|
1386
|
+
const POSTHOG_API_KEY = "phc_8ZUxEwwfKMajJLvxz1daGd931dYbQrwKNficBmsdIrs";
|
|
1387
|
+
const POSTHOG_HOST = "https://us.i.posthog.com";
|
|
1388
1388
|
function generateSessionId() {
|
|
1389
1389
|
const rand = Math.random().toString(36).slice(2);
|
|
1390
1390
|
return `cli_${Date.now().toString(36)}${rand}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.7",
|
|
4
4
|
"description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -68,6 +68,12 @@ url = "https://mcp.chonkie.ai/better-auth/better-auth-builder/mcp"
|
|
|
68
68
|
url = "https://ui.nuxt.com/mcp"
|
|
69
69
|
{{/if}}
|
|
70
70
|
|
|
71
|
+
{{#if (includes frontend "next")}}
|
|
72
|
+
[mcp_servers.next-devtools]
|
|
73
|
+
command = "npx"
|
|
74
|
+
args = ["-y", "next-devtools-mcp@latest"]
|
|
75
|
+
{{/if}}
|
|
76
|
+
|
|
71
77
|
# --- Global .gitignore Configuration ---
|
|
72
78
|
[gitignore]
|
|
73
79
|
# Enable/disable automatic .gitignore updates (default: true)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{{#if (eq orm "prisma")}}
|
|
2
|
-
import { betterAuth } from "better-auth";
|
|
2
|
+
import { betterAuth, type BetterAuthOptions } from "better-auth";
|
|
3
3
|
import { prismaAdapter } from "better-auth/adapters/prisma";
|
|
4
4
|
{{#if (eq payments "polar")}}
|
|
5
5
|
import { polar, checkout, portal } from "@polar-sh/better-auth";
|
|
@@ -7,12 +7,12 @@ import { polarClient } from "./lib/payments";
|
|
|
7
7
|
{{/if}}
|
|
8
8
|
import prisma from "@{{projectName}}/db";
|
|
9
9
|
|
|
10
|
-
export const auth = betterAuth({
|
|
10
|
+
export const auth = betterAuth<BetterAuthOptions>({
|
|
11
11
|
database: prismaAdapter(prisma, {
|
|
12
|
-
{{#if (eq database "postgres")}}provider: "postgresql"{{/if}}
|
|
13
|
-
{{#if (eq database "sqlite")}}provider: "sqlite"{{/if}}
|
|
14
|
-
{{#if (eq database "mysql")}}provider: "mysql"{{/if}}
|
|
15
|
-
{{#if (eq database "mongodb")}}provider: "mongodb"{{/if}}
|
|
12
|
+
{{#if (eq database "postgres")}}provider: "postgresql",{{/if}}
|
|
13
|
+
{{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
|
|
14
|
+
{{#if (eq database "mysql")}}provider: "mysql",{{/if}}
|
|
15
|
+
{{#if (eq database "mongodb")}}provider: "mongodb",{{/if}}
|
|
16
16
|
}),
|
|
17
17
|
trustedOrigins: [
|
|
18
18
|
process.env.CORS_ORIGIN || "",
|
|
@@ -59,7 +59,7 @@ export const auth = betterAuth({
|
|
|
59
59
|
|
|
60
60
|
{{#if (eq orm "drizzle")}}
|
|
61
61
|
{{#if (or (eq runtime "bun") (eq runtime "node") (eq runtime "none"))}}
|
|
62
|
-
import { betterAuth } from "better-auth";
|
|
62
|
+
import { betterAuth, type BetterAuthOptions } from "better-auth";
|
|
63
63
|
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
64
64
|
{{#if (eq payments "polar")}}
|
|
65
65
|
import { polar, checkout, portal } from "@polar-sh/better-auth";
|
|
@@ -68,7 +68,7 @@ import { polarClient } from "./lib/payments";
|
|
|
68
68
|
import { db } from "@{{projectName}}/db";
|
|
69
69
|
import * as schema from "@{{projectName}}/db/schema/auth";
|
|
70
70
|
|
|
71
|
-
export const auth = betterAuth({
|
|
71
|
+
export const auth = betterAuth<BetterAuthOptions>({
|
|
72
72
|
database: drizzleAdapter(db, {
|
|
73
73
|
{{#if (eq database "postgres")}}provider: "pg",{{/if}}
|
|
74
74
|
{{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
|
|
@@ -119,7 +119,7 @@ export const auth = betterAuth({
|
|
|
119
119
|
{{/if}}
|
|
120
120
|
|
|
121
121
|
{{#if (eq runtime "workers")}}
|
|
122
|
-
import { betterAuth } from "better-auth";
|
|
122
|
+
import { betterAuth, type BetterAuthOptions } from "better-auth";
|
|
123
123
|
import { drizzleAdapter } from "better-auth/adapters/drizzle";
|
|
124
124
|
{{#if (eq payments "polar")}}
|
|
125
125
|
import { polar, checkout, portal } from "@polar-sh/better-auth";
|
|
@@ -129,7 +129,7 @@ import { db } from "@{{projectName}}/db";
|
|
|
129
129
|
import * as schema from "@{{projectName}}/db/schema/auth";
|
|
130
130
|
import { env } from "cloudflare:workers";
|
|
131
131
|
|
|
132
|
-
export const auth = betterAuth({
|
|
132
|
+
export const auth = betterAuth<BetterAuthOptions>({
|
|
133
133
|
database: drizzleAdapter(db, {
|
|
134
134
|
{{#if (eq database "postgres")}}provider: "pg",{{/if}}
|
|
135
135
|
{{#if (eq database "sqlite")}}provider: "sqlite",{{/if}}
|
|
@@ -190,11 +190,11 @@ export const auth = betterAuth({
|
|
|
190
190
|
],
|
|
191
191
|
{{/if}}
|
|
192
192
|
});
|
|
193
|
-
{{/if}}
|
|
193
|
+
{{/if}}
|
|
194
194
|
{{/if}}
|
|
195
195
|
|
|
196
196
|
{{#if (eq orm "mongoose")}}
|
|
197
|
-
import { betterAuth } from "better-auth";
|
|
197
|
+
import { betterAuth, type BetterAuthOptions } from "better-auth";
|
|
198
198
|
import { mongodbAdapter } from "better-auth/adapters/mongodb";
|
|
199
199
|
{{#if (eq payments "polar")}}
|
|
200
200
|
import { polar, checkout, portal } from "@polar-sh/better-auth";
|
|
@@ -202,7 +202,7 @@ import { polarClient } from "./lib/payments";
|
|
|
202
202
|
{{/if}}
|
|
203
203
|
import { client } from "@{{projectName}}/db";
|
|
204
204
|
|
|
205
|
-
export const auth = betterAuth({
|
|
205
|
+
export const auth = betterAuth<BetterAuthOptions>({
|
|
206
206
|
database: mongodbAdapter(client),
|
|
207
207
|
trustedOrigins: [
|
|
208
208
|
process.env.CORS_ORIGIN || "",
|
|
@@ -248,13 +248,13 @@ export const auth = betterAuth({
|
|
|
248
248
|
{{/if}}
|
|
249
249
|
|
|
250
250
|
{{#if (eq orm "none")}}
|
|
251
|
-
import { betterAuth } from "better-auth";
|
|
251
|
+
import { betterAuth, type BetterAuthOptions } from "better-auth";
|
|
252
252
|
{{#if (eq payments "polar")}}
|
|
253
253
|
import { polar, checkout, portal } from "@polar-sh/better-auth";
|
|
254
254
|
import { polarClient } from "./lib/payments";
|
|
255
255
|
{{/if}}
|
|
256
256
|
|
|
257
|
-
export const auth = betterAuth({
|
|
257
|
+
export const auth = betterAuth<BetterAuthOptions>({
|
|
258
258
|
database: "", // Invalid configuration
|
|
259
259
|
trustedOrigins: [
|
|
260
260
|
process.env.CORS_ORIGIN || "",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type { auth } from "@{{projectName}}/auth";
|
|
1
2
|
import { createAuthClient } from "better-auth/react";
|
|
2
|
-
{
|
|
3
|
-
import { polarClient } from "@polar-sh/better-auth";
|
|
4
|
-
{{/if}}
|
|
3
|
+
import { inferAdditionalFields } from "better-auth/client/plugins";
|
|
5
4
|
|
|
6
5
|
export const authClient = createAuthClient({
|
|
7
6
|
{{#unless (eq backend "self")}}
|
|
@@ -12,7 +11,5 @@ export const authClient = createAuthClient({
|
|
|
12
11
|
import.meta.env.VITE_SERVER_URL,
|
|
13
12
|
{{/if}}
|
|
14
13
|
{{/unless}}
|
|
15
|
-
|
|
16
|
-
plugins: [polarClient()]
|
|
17
|
-
{{/if}}
|
|
14
|
+
plugins: [inferAdditionalFields<typeof auth>()],
|
|
18
15
|
});
|
|
@@ -31,7 +31,7 @@ export default function AIPage() {
|
|
|
31
31
|
const [input, setInput] = useState("");
|
|
32
32
|
const { messages, sendMessage } = useChat({
|
|
33
33
|
transport: new DefaultChatTransport({
|
|
34
|
-
api: `${process.env.NEXT_PUBLIC_SERVER_URL}/ai
|
|
34
|
+
api: {{#if (eq backend "self")}}"/api/ai"{{else}}`${process.env.NEXT_PUBLIC_SERVER_URL}/ai`{{/if}},
|
|
35
35
|
}),
|
|
36
36
|
});
|
|
37
37
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"dev": "next dev --
|
|
6
|
+
"dev": "next dev --port=3001",
|
|
7
7
|
"build": "next build",
|
|
8
8
|
"start": "next start"
|
|
9
9
|
},
|
|
@@ -12,21 +12,22 @@
|
|
|
12
12
|
"@tanstack/react-form": "^1.12.3",
|
|
13
13
|
"class-variance-authority": "^0.7.1",
|
|
14
14
|
"clsx": "^2.1.1",
|
|
15
|
-
"lucide-react": "^0.
|
|
16
|
-
"next": "
|
|
15
|
+
"lucide-react": "^0.546.0",
|
|
16
|
+
"next": "16.0.0",
|
|
17
17
|
"next-themes": "^0.4.6",
|
|
18
|
-
"react": "19.
|
|
19
|
-
"react-dom": "19.
|
|
18
|
+
"react": "19.2.0",
|
|
19
|
+
"react-dom": "19.2.0",
|
|
20
20
|
"sonner": "^2.0.5",
|
|
21
21
|
"tailwind-merge": "^3.3.1",
|
|
22
22
|
"tw-animate-css": "^1.3.4",
|
|
23
|
-
"zod": "^4.
|
|
23
|
+
"zod": "^4.1.12",
|
|
24
|
+
"babel-plugin-react-compiler": "^1.0.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@tailwindcss/postcss": "^4.1.10",
|
|
27
28
|
"@types/node": "^20",
|
|
28
|
-
"@types/react": "
|
|
29
|
-
"@types/react-dom": "
|
|
29
|
+
"@types/react": "19.2.2",
|
|
30
|
+
"@types/react-dom": "19.2.2",
|
|
30
31
|
"tailwindcss": "^4.1.10",
|
|
31
32
|
"typescript": "^5"
|
|
32
33
|
}
|