create-better-t-stack 3.8.1 → 3.8.2
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.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-BDXa8gsB.mjs → src-CVJS4SKc.mjs} +21 -8
- package/package.json +2 -2
- package/templates/addons/biome/biome.json.hbs +2 -1
- package/templates/addons/ultracite/biome.json.hbs +2 -1
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/lib/auth-server.ts.hbs +3 -2
- package/templates/deploy/alchemy/alchemy.run.ts.hbs +75 -71
- package/templates/examples/todo/web/react/tanstack-start/src/routes/todos.tsx.hbs +4 -0
- package/templates/frontend/react/next/package.json.hbs +1 -1
- package/templates/frontend/react/tanstack-router/package.json.hbs +1 -1
- package/templates/frontend/react/tanstack-router/vite.config.ts.hbs +3 -0
- package/templates/frontend/react/tanstack-start/package.json.hbs +1 -1
- package/templates/frontend/react/tanstack-start/vite.config.ts.hbs +3 -0
- package/templates/frontend/solid/package.json.hbs +1 -1
- package/templates/frontend/solid/vite.config.ts.hbs +3 -0
- /package/templates/frontend/svelte/{vite.config.ts → vite.config.ts.hbs} +0 -0
package/dist/cli.mjs
CHANGED
package/dist/index.mjs
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-CVJS4SKc.mjs";
|
|
3
3
|
|
|
4
4
|
export { builder, createBtsCli, docs, init, router, sponsors };
|
|
@@ -114,7 +114,7 @@ const dependencyVersionMap = {
|
|
|
114
114
|
"@types/cors": "^2.8.17",
|
|
115
115
|
fastify: "^5.3.3",
|
|
116
116
|
"@fastify/cors": "^11.0.1",
|
|
117
|
-
turbo: "^2.
|
|
117
|
+
turbo: "^2.6.3",
|
|
118
118
|
ai: "^5.0.49",
|
|
119
119
|
"@ai-sdk/google": "^2.0.13",
|
|
120
120
|
"@ai-sdk/vue": "^2.0.49",
|
|
@@ -146,13 +146,13 @@ const dependencyVersionMap = {
|
|
|
146
146
|
"@tanstack/solid-query": "^5.87.4",
|
|
147
147
|
"@tanstack/solid-query-devtools": "^5.87.4",
|
|
148
148
|
"@tanstack/solid-router-devtools": "^1.131.44",
|
|
149
|
-
wrangler: "^4.
|
|
150
|
-
"@cloudflare/vite-plugin": "^1.
|
|
151
|
-
"@opennextjs/cloudflare": "^1.6
|
|
149
|
+
wrangler: "^4.54.0",
|
|
150
|
+
"@cloudflare/vite-plugin": "^1.17.1",
|
|
151
|
+
"@opennextjs/cloudflare": "^1.14.6",
|
|
152
152
|
"nitro-cloudflare-dev": "^0.2.2",
|
|
153
|
-
"@sveltejs/adapter-cloudflare": "^7.2.
|
|
154
|
-
"@cloudflare/workers-types": "^4.
|
|
155
|
-
alchemy: "^0.81.
|
|
153
|
+
"@sveltejs/adapter-cloudflare": "^7.2.4",
|
|
154
|
+
"@cloudflare/workers-types": "^4.20251213.0",
|
|
155
|
+
alchemy: "^0.81.2",
|
|
156
156
|
dotenv: "^17.2.2",
|
|
157
157
|
tsdown: "^0.16.5",
|
|
158
158
|
zod: "^4.1.13",
|
|
@@ -3363,6 +3363,7 @@ async function setupNextAlchemyDeploy(projectDir, _packageManager, options) {
|
|
|
3363
3363
|
const pkg = await fs.readJson(pkgPath);
|
|
3364
3364
|
if (!options?.skipAppScripts) pkg.scripts = {
|
|
3365
3365
|
...pkg.scripts,
|
|
3366
|
+
dev: "alchemy dev",
|
|
3366
3367
|
deploy: "alchemy deploy",
|
|
3367
3368
|
destroy: "alchemy destroy"
|
|
3368
3369
|
};
|
|
@@ -3397,6 +3398,7 @@ async function setupNuxtAlchemyDeploy(projectDir, _packageManager, options) {
|
|
|
3397
3398
|
const pkg = await fs.readJson(pkgPath);
|
|
3398
3399
|
if (!options?.skipAppScripts) pkg.scripts = {
|
|
3399
3400
|
...pkg.scripts,
|
|
3401
|
+
dev: "alchemy dev",
|
|
3400
3402
|
deploy: "alchemy deploy",
|
|
3401
3403
|
destroy: "alchemy destroy"
|
|
3402
3404
|
};
|
|
@@ -3458,6 +3460,7 @@ async function setupReactRouterAlchemyDeploy(projectDir, _packageManager, option
|
|
|
3458
3460
|
const pkg = await fs.readJson(pkgPath);
|
|
3459
3461
|
if (!options?.skipAppScripts) pkg.scripts = {
|
|
3460
3462
|
...pkg.scripts,
|
|
3463
|
+
dev: "alchemy dev",
|
|
3461
3464
|
deploy: "alchemy deploy",
|
|
3462
3465
|
destroy: "alchemy destroy"
|
|
3463
3466
|
};
|
|
@@ -3479,6 +3482,7 @@ async function setupSolidAlchemyDeploy(projectDir, _packageManager, options) {
|
|
|
3479
3482
|
const pkg = await fs.readJson(pkgPath);
|
|
3480
3483
|
if (!options?.skipAppScripts) pkg.scripts = {
|
|
3481
3484
|
...pkg.scripts,
|
|
3485
|
+
dev: "alchemy dev",
|
|
3482
3486
|
deploy: "alchemy deploy",
|
|
3483
3487
|
destroy: "alchemy destroy"
|
|
3484
3488
|
};
|
|
@@ -3500,6 +3504,7 @@ async function setupSvelteAlchemyDeploy(projectDir, _packageManager, options) {
|
|
|
3500
3504
|
const pkg = await fs.readJson(pkgPath);
|
|
3501
3505
|
if (!options?.skipAppScripts) pkg.scripts = {
|
|
3502
3506
|
...pkg.scripts,
|
|
3507
|
+
dev: "alchemy dev",
|
|
3503
3508
|
deploy: "alchemy deploy",
|
|
3504
3509
|
destroy: "alchemy destroy"
|
|
3505
3510
|
};
|
|
@@ -3565,6 +3570,7 @@ async function setupTanStackRouterAlchemyDeploy(projectDir, _packageManager, opt
|
|
|
3565
3570
|
const pkg = await fs.readJson(pkgPath);
|
|
3566
3571
|
if (!options?.skipAppScripts) pkg.scripts = {
|
|
3567
3572
|
...pkg.scripts,
|
|
3573
|
+
dev: "alchemy dev",
|
|
3568
3574
|
deploy: "alchemy deploy",
|
|
3569
3575
|
destroy: "alchemy destroy"
|
|
3570
3576
|
};
|
|
@@ -3586,6 +3592,7 @@ async function setupTanStackStartAlchemyDeploy(projectDir, _packageManager, opti
|
|
|
3586
3592
|
const pkg = await fs.readJson(pkgPath);
|
|
3587
3593
|
if (!options?.skipAppScripts) pkg.scripts = {
|
|
3588
3594
|
...pkg.scripts,
|
|
3595
|
+
dev: "alchemy dev",
|
|
3589
3596
|
deploy: "alchemy deploy",
|
|
3590
3597
|
destroy: "alchemy destroy"
|
|
3591
3598
|
};
|
|
@@ -4432,6 +4439,11 @@ async function setupEnvironmentVariables(config) {
|
|
|
4432
4439
|
value: backend === "convex" ? "https://<YOUR_CONVEX_URL>" : baseVar.value,
|
|
4433
4440
|
condition: backend === "convex" ? true : baseVar.write
|
|
4434
4441
|
}];
|
|
4442
|
+
if (hasNextJs) clientVars.push({
|
|
4443
|
+
key: "PORT",
|
|
4444
|
+
value: "3001",
|
|
4445
|
+
condition: true
|
|
4446
|
+
});
|
|
4435
4447
|
if (backend === "convex" && auth === "clerk") {
|
|
4436
4448
|
if (hasNextJs) clientVars.push({
|
|
4437
4449
|
key: "NEXT_PUBLIC_CLERK_FRONTEND_API_URL",
|
|
@@ -6473,6 +6485,7 @@ async function updateRootPackageJson(projectDir, options) {
|
|
|
6473
6485
|
if (!isD1Alchemy) scripts["db:migrate"] = pmConfig.filter(dbPackageName, "db:migrate");
|
|
6474
6486
|
}
|
|
6475
6487
|
}
|
|
6488
|
+
if (database === "sqlite" && dbSetup !== "d1" && orm !== "none") scripts["db:local"] = pmConfig.filter(dbPackageName, "db:local");
|
|
6476
6489
|
if (dbSetup === "docker") {
|
|
6477
6490
|
scripts["db:start"] = pmConfig.filter(dbPackageName, "db:start");
|
|
6478
6491
|
scripts["db:watch"] = pmConfig.filter(dbPackageName, "db:watch");
|
|
@@ -6539,7 +6552,7 @@ async function updateDbPackageJson(projectDir, options) {
|
|
|
6539
6552
|
const { database, orm, dbSetup, serverDeploy } = options;
|
|
6540
6553
|
const isD1Alchemy = dbSetup === "d1" && serverDeploy === "alchemy";
|
|
6541
6554
|
if (database !== "none") {
|
|
6542
|
-
if (database === "sqlite" &&
|
|
6555
|
+
if (database === "sqlite" && dbSetup !== "d1") scripts["db:local"] = "turso dev --db-file local.db";
|
|
6543
6556
|
if (orm === "prisma") {
|
|
6544
6557
|
scripts["db:push"] = "prisma db push";
|
|
6545
6558
|
scripts["db:generate"] = "prisma generate";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
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",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@better-t-stack/types": "^3.8.
|
|
68
|
+
"@better-t-stack/types": "^3.8.2",
|
|
69
69
|
"@biomejs/js-api": "^4.0.0",
|
|
70
70
|
"@biomejs/wasm-nodejs": "^2.3.8",
|
|
71
71
|
"@clack/prompts": "^1.0.0-alpha.8",
|
package/templates/auth/better-auth/convex/web/react/tanstack-start/src/lib/auth-server.ts.hbs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { createAuth } from "convex/auth";
|
|
1
|
+
import { createAuth } from "@{{projectName}}/backend/convex/auth";
|
|
2
2
|
import { setupFetchClient } from "@convex-dev/better-auth/react-start";
|
|
3
|
+
import { getCookie } from "@tanstack/react-start/server";
|
|
3
4
|
|
|
4
5
|
export const { fetchQuery, fetchMutation, fetchAction } =
|
|
5
|
-
|
|
6
|
+
await setupFetchClient(createAuth, getCookie);
|
|
@@ -50,43 +50,45 @@ export const web = await Nextjs("web", {
|
|
|
50
50
|
{{#if (eq serverDeploy "alchemy")}}cwd: "apps/web",{{/if}}
|
|
51
51
|
bindings: {
|
|
52
52
|
{{#if (eq backend "convex")}}
|
|
53
|
-
NEXT_PUBLIC_CONVEX_URL:
|
|
53
|
+
NEXT_PUBLIC_CONVEX_URL: alchemy.env.NEXT_PUBLIC_CONVEX_URL,
|
|
54
|
+
{{#if (eq auth "better-auth")}}
|
|
55
|
+
NEXT_PUBLIC_CONVEX_SITE_URL: alchemy.env.NEXT_PUBLIC_CONVEX_SITE_URL,
|
|
56
|
+
{{/if}}
|
|
54
57
|
{{else if (ne backend "self")}}
|
|
55
|
-
NEXT_PUBLIC_SERVER_URL:
|
|
58
|
+
NEXT_PUBLIC_SERVER_URL: alchemy.env.NEXT_PUBLIC_SERVER_URL,
|
|
56
59
|
{{/if}}
|
|
57
60
|
{{#if (eq dbSetup "d1")}}
|
|
58
61
|
DB: db,
|
|
59
62
|
{{else if (ne database "none")}}
|
|
60
|
-
DATABASE_URL: alchemy.secret
|
|
63
|
+
DATABASE_URL: alchemy.secret.env.DATABASE_URL,
|
|
61
64
|
{{/if}}
|
|
62
|
-
|
|
65
|
+
{{#if (ne backend "convex")}}
|
|
66
|
+
CORS_ORIGIN: alchemy.env.CORS_ORIGIN,
|
|
63
67
|
{{#if (eq auth "better-auth")}}
|
|
64
|
-
BETTER_AUTH_SECRET: alchemy.secret
|
|
65
|
-
BETTER_AUTH_URL:
|
|
68
|
+
BETTER_AUTH_SECRET: alchemy.secret.env.BETTER_AUTH_SECRET,
|
|
69
|
+
BETTER_AUTH_URL: alchemy.env.BETTER_AUTH_URL,
|
|
70
|
+
{{/if}}
|
|
66
71
|
{{/if}}
|
|
67
72
|
{{#if (eq auth "clerk")}}
|
|
68
|
-
CLERK_SECRET_KEY: alchemy.secret
|
|
73
|
+
CLERK_SECRET_KEY: alchemy.secret.env.CLERK_SECRET_KEY,
|
|
69
74
|
{{/if}}
|
|
70
75
|
{{#if (includes examples "ai")}}
|
|
71
|
-
GOOGLE_GENERATIVE_AI_API_KEY: alchemy.secret
|
|
76
|
+
GOOGLE_GENERATIVE_AI_API_KEY: alchemy.secret.env.GOOGLE_GENERATIVE_AI_API_KEY,
|
|
72
77
|
{{/if}}
|
|
73
78
|
{{#if (eq payments "polar")}}
|
|
74
|
-
POLAR_ACCESS_TOKEN: alchemy.secret
|
|
75
|
-
POLAR_SUCCESS_URL:
|
|
79
|
+
POLAR_ACCESS_TOKEN: alchemy.secret.env.POLAR_ACCESS_TOKEN,
|
|
80
|
+
POLAR_SUCCESS_URL: alchemy.env.POLAR_SUCCESS_URL,
|
|
76
81
|
{{/if}}
|
|
77
82
|
{{#if (eq dbSetup "turso")}}
|
|
78
|
-
DATABASE_AUTH_TOKEN: alchemy.secret
|
|
83
|
+
DATABASE_AUTH_TOKEN: alchemy.secret.env.DATABASE_AUTH_TOKEN,
|
|
79
84
|
{{/if}}
|
|
80
85
|
{{#if (eq database "mysql")}}
|
|
81
86
|
{{#if (eq orm "drizzle")}}
|
|
82
|
-
DATABASE_HOST:
|
|
83
|
-
DATABASE_USERNAME:
|
|
84
|
-
DATABASE_PASSWORD:
|
|
87
|
+
DATABASE_HOST: alchemy.env.DATABASE_HOST,
|
|
88
|
+
DATABASE_USERNAME: alchemy.env.DATABASE_USERNAME,
|
|
89
|
+
DATABASE_PASSWORD: alchemy.secret.env.DATABASE_PASSWORD,
|
|
85
90
|
{{/if}}
|
|
86
91
|
{{/if}}
|
|
87
|
-
},
|
|
88
|
-
dev: {
|
|
89
|
-
command: "{{packageManager}} run dev"
|
|
90
92
|
}
|
|
91
93
|
});
|
|
92
94
|
{{else if (includes frontend "nuxt")}}
|
|
@@ -94,13 +96,13 @@ export const web = await Nuxt("web", {
|
|
|
94
96
|
{{#if (eq serverDeploy "alchemy")}}cwd: "apps/web",{{/if}}
|
|
95
97
|
bindings: {
|
|
96
98
|
{{#if (eq backend "convex")}}
|
|
97
|
-
NUXT_PUBLIC_CONVEX_URL:
|
|
99
|
+
NUXT_PUBLIC_CONVEX_URL: alchemy.env.NUXT_PUBLIC_CONVEX_URL,
|
|
100
|
+
{{#if (eq auth "better-auth")}}
|
|
101
|
+
NUXT_PUBLIC_CONVEX_SITE_URL: alchemy.env.NUXT_PUBLIC_CONVEX_SITE_URL,
|
|
102
|
+
{{/if}}
|
|
98
103
|
{{else if (ne backend "self")}}
|
|
99
|
-
NUXT_PUBLIC_SERVER_URL:
|
|
104
|
+
NUXT_PUBLIC_SERVER_URL: alchemy.env.NUXT_PUBLIC_SERVER_URL,
|
|
100
105
|
{{/if}}
|
|
101
|
-
},
|
|
102
|
-
dev: {
|
|
103
|
-
command: "{{packageManager}} run dev"
|
|
104
106
|
}
|
|
105
107
|
});
|
|
106
108
|
{{else if (includes frontend "svelte")}}
|
|
@@ -108,13 +110,13 @@ export const web = await SvelteKit("web", {
|
|
|
108
110
|
{{#if (eq serverDeploy "alchemy")}}cwd: "apps/web",{{/if}}
|
|
109
111
|
bindings: {
|
|
110
112
|
{{#if (eq backend "convex")}}
|
|
111
|
-
PUBLIC_CONVEX_URL:
|
|
113
|
+
PUBLIC_CONVEX_URL: alchemy.env.PUBLIC_CONVEX_URL,
|
|
114
|
+
{{#if (eq auth "better-auth")}}
|
|
115
|
+
PUBLIC_CONVEX_SITE_URL: alchemy.env.PUBLIC_CONVEX_SITE_URL,
|
|
116
|
+
{{/if}}
|
|
112
117
|
{{else if (ne backend "self")}}
|
|
113
|
-
PUBLIC_SERVER_URL:
|
|
118
|
+
PUBLIC_SERVER_URL: alchemy.env.PUBLIC_SERVER_URL,
|
|
114
119
|
{{/if}}
|
|
115
|
-
},
|
|
116
|
-
dev: {
|
|
117
|
-
command: "{{packageManager}} run dev"
|
|
118
120
|
}
|
|
119
121
|
});
|
|
120
122
|
{{else if (includes frontend "tanstack-start")}}
|
|
@@ -122,43 +124,45 @@ export const web = await TanStackStart("web", {
|
|
|
122
124
|
{{#if (eq serverDeploy "alchemy")}}cwd: "apps/web",{{/if}}
|
|
123
125
|
bindings: {
|
|
124
126
|
{{#if (eq backend "convex")}}
|
|
125
|
-
VITE_CONVEX_URL:
|
|
127
|
+
VITE_CONVEX_URL: alchemy.env.VITE_CONVEX_URL,
|
|
128
|
+
{{#if (eq auth "better-auth")}}
|
|
129
|
+
VITE_CONVEX_SITE_URL: alchemy.env.VITE_CONVEX_SITE_URL,
|
|
130
|
+
{{/if}}
|
|
126
131
|
{{else if (ne backend "self")}}
|
|
127
|
-
VITE_SERVER_URL:
|
|
132
|
+
VITE_SERVER_URL: alchemy.env.VITE_SERVER_URL,
|
|
128
133
|
{{/if}}
|
|
129
134
|
{{#if (eq dbSetup "d1")}}
|
|
130
135
|
DB: db,
|
|
131
136
|
{{else if (ne database "none")}}
|
|
132
|
-
DATABASE_URL: alchemy.secret
|
|
137
|
+
DATABASE_URL: alchemy.secret.env.DATABASE_URL,
|
|
133
138
|
{{/if}}
|
|
134
|
-
|
|
139
|
+
{{#if (ne backend "convex")}}
|
|
140
|
+
CORS_ORIGIN: alchemy.env.CORS_ORIGIN,
|
|
135
141
|
{{#if (eq auth "better-auth")}}
|
|
136
|
-
BETTER_AUTH_SECRET: alchemy.secret
|
|
137
|
-
BETTER_AUTH_URL:
|
|
142
|
+
BETTER_AUTH_SECRET: alchemy.secret.env.BETTER_AUTH_SECRET,
|
|
143
|
+
BETTER_AUTH_URL: alchemy.env.BETTER_AUTH_URL,
|
|
144
|
+
{{/if}}
|
|
138
145
|
{{/if}}
|
|
139
146
|
{{#if (eq auth "clerk")}}
|
|
140
|
-
CLERK_SECRET_KEY: alchemy.secret
|
|
147
|
+
CLERK_SECRET_KEY: alchemy.secret.env.CLERK_SECRET_KEY,
|
|
141
148
|
{{/if}}
|
|
142
149
|
{{#if (includes examples "ai")}}
|
|
143
|
-
GOOGLE_GENERATIVE_AI_API_KEY: alchemy.secret
|
|
150
|
+
GOOGLE_GENERATIVE_AI_API_KEY: alchemy.secret.env.GOOGLE_GENERATIVE_AI_API_KEY,
|
|
144
151
|
{{/if}}
|
|
145
152
|
{{#if (eq payments "polar")}}
|
|
146
|
-
POLAR_ACCESS_TOKEN: alchemy.secret
|
|
147
|
-
POLAR_SUCCESS_URL:
|
|
153
|
+
POLAR_ACCESS_TOKEN: alchemy.secret.env.POLAR_ACCESS_TOKEN,
|
|
154
|
+
POLAR_SUCCESS_URL: alchemy.env.POLAR_SUCCESS_URL,
|
|
148
155
|
{{/if}}
|
|
149
156
|
{{#if (eq dbSetup "turso")}}
|
|
150
|
-
DATABASE_AUTH_TOKEN: alchemy.secret
|
|
157
|
+
DATABASE_AUTH_TOKEN: alchemy.secret.env.DATABASE_AUTH_TOKEN,
|
|
151
158
|
{{/if}}
|
|
152
159
|
{{#if (eq database "mysql")}}
|
|
153
160
|
{{#if (eq orm "drizzle")}}
|
|
154
|
-
DATABASE_HOST:
|
|
155
|
-
DATABASE_USERNAME:
|
|
156
|
-
DATABASE_PASSWORD:
|
|
161
|
+
DATABASE_HOST: alchemy.env.DATABASE_HOST,
|
|
162
|
+
DATABASE_USERNAME: alchemy.env.DATABASE_USERNAME,
|
|
163
|
+
DATABASE_PASSWORD: alchemy.secret.env.DATABASE_PASSWORD,
|
|
157
164
|
{{/if}}
|
|
158
165
|
{{/if}}
|
|
159
|
-
},
|
|
160
|
-
dev: {
|
|
161
|
-
command: "{{packageManager}} run dev"
|
|
162
166
|
}
|
|
163
167
|
});
|
|
164
168
|
{{else if (includes frontend "tanstack-router")}}
|
|
@@ -167,13 +171,13 @@ export const web = await Vite("web", {
|
|
|
167
171
|
assets: "dist",
|
|
168
172
|
bindings: {
|
|
169
173
|
{{#if (eq backend "convex")}}
|
|
170
|
-
VITE_CONVEX_URL:
|
|
174
|
+
VITE_CONVEX_URL: alchemy.env.VITE_CONVEX_URL,
|
|
175
|
+
{{#if (eq auth "better-auth")}}
|
|
176
|
+
VITE_CONVEX_SITE_URL: alchemy.env.VITE_CONVEX_SITE_URL,
|
|
177
|
+
{{/if}}
|
|
171
178
|
{{else if (ne backend "self")}}
|
|
172
|
-
VITE_SERVER_URL:
|
|
179
|
+
VITE_SERVER_URL: alchemy.env.VITE_SERVER_URL,
|
|
173
180
|
{{/if}}
|
|
174
|
-
},
|
|
175
|
-
dev: {
|
|
176
|
-
command: "{{packageManager}} run dev"
|
|
177
181
|
}
|
|
178
182
|
});
|
|
179
183
|
{{else if (includes frontend "react-router")}}
|
|
@@ -181,13 +185,13 @@ export const web = await ReactRouter("web", {
|
|
|
181
185
|
{{#if (eq serverDeploy "alchemy")}}cwd: "apps/web",{{/if}}
|
|
182
186
|
bindings: {
|
|
183
187
|
{{#if (eq backend "convex")}}
|
|
184
|
-
VITE_CONVEX_URL:
|
|
188
|
+
VITE_CONVEX_URL: alchemy.env.VITE_CONVEX_URL,
|
|
189
|
+
{{#if (eq auth "better-auth")}}
|
|
190
|
+
VITE_CONVEX_SITE_URL: alchemy.env.VITE_CONVEX_SITE_URL,
|
|
191
|
+
{{/if}}
|
|
185
192
|
{{else if (ne backend "self")}}
|
|
186
|
-
VITE_SERVER_URL:
|
|
193
|
+
VITE_SERVER_URL: alchemy.env.VITE_SERVER_URL,
|
|
187
194
|
{{/if}}
|
|
188
|
-
},
|
|
189
|
-
dev: {
|
|
190
|
-
command: "{{packageManager}} run dev"
|
|
191
195
|
}
|
|
192
196
|
});
|
|
193
197
|
{{else if (includes frontend "solid")}}
|
|
@@ -196,13 +200,13 @@ export const web = await Vite("web", {
|
|
|
196
200
|
assets: "dist",
|
|
197
201
|
bindings: {
|
|
198
202
|
{{#if (eq backend "convex")}}
|
|
199
|
-
VITE_CONVEX_URL:
|
|
203
|
+
VITE_CONVEX_URL: alchemy.env.VITE_CONVEX_URL,
|
|
204
|
+
{{#if (eq auth "better-auth")}}
|
|
205
|
+
VITE_CONVEX_SITE_URL: alchemy.env.VITE_CONVEX_SITE_URL,
|
|
206
|
+
{{/if}}
|
|
200
207
|
{{else if (ne backend "self")}}
|
|
201
|
-
VITE_SERVER_URL:
|
|
208
|
+
VITE_SERVER_URL: alchemy.env.VITE_SERVER_URL,
|
|
202
209
|
{{/if}}
|
|
203
|
-
},
|
|
204
|
-
dev: {
|
|
205
|
-
command: "{{packageManager}} run dev"
|
|
206
210
|
}
|
|
207
211
|
});
|
|
208
212
|
{{/if}}
|
|
@@ -217,31 +221,31 @@ export const server = await Worker("server", {
|
|
|
217
221
|
{{#if (eq dbSetup "d1")}}
|
|
218
222
|
DB: db,
|
|
219
223
|
{{else if (ne database "none")}}
|
|
220
|
-
DATABASE_URL: alchemy.secret
|
|
224
|
+
DATABASE_URL: alchemy.secret.env.DATABASE_URL,
|
|
221
225
|
{{/if}}
|
|
222
|
-
CORS_ORIGIN:
|
|
226
|
+
CORS_ORIGIN: alchemy.env.CORS_ORIGIN,
|
|
223
227
|
{{#if (eq auth "better-auth")}}
|
|
224
|
-
BETTER_AUTH_SECRET: alchemy.secret
|
|
225
|
-
BETTER_AUTH_URL:
|
|
228
|
+
BETTER_AUTH_SECRET: alchemy.secret.env.BETTER_AUTH_SECRET,
|
|
229
|
+
BETTER_AUTH_URL: alchemy.env.BETTER_AUTH_URL,
|
|
226
230
|
{{/if}}
|
|
227
231
|
{{#if (eq auth "clerk")}}
|
|
228
|
-
CLERK_SECRET_KEY: alchemy.secret
|
|
232
|
+
CLERK_SECRET_KEY: alchemy.secret.env.CLERK_SECRET_KEY,
|
|
229
233
|
{{/if}}
|
|
230
234
|
{{#if (includes examples "ai")}}
|
|
231
|
-
GOOGLE_GENERATIVE_AI_API_KEY: alchemy.secret
|
|
235
|
+
GOOGLE_GENERATIVE_AI_API_KEY: alchemy.secret.env.GOOGLE_GENERATIVE_AI_API_KEY,
|
|
232
236
|
{{/if}}
|
|
233
237
|
{{#if (eq payments "polar")}}
|
|
234
|
-
POLAR_ACCESS_TOKEN: alchemy.secret
|
|
235
|
-
POLAR_SUCCESS_URL:
|
|
238
|
+
POLAR_ACCESS_TOKEN: alchemy.secret.env.POLAR_ACCESS_TOKEN,
|
|
239
|
+
POLAR_SUCCESS_URL: alchemy.env.POLAR_SUCCESS_URL,
|
|
236
240
|
{{/if}}
|
|
237
241
|
{{#if (eq dbSetup "turso")}}
|
|
238
|
-
DATABASE_AUTH_TOKEN: alchemy.secret
|
|
242
|
+
DATABASE_AUTH_TOKEN: alchemy.secret.env.DATABASE_AUTH_TOKEN,
|
|
239
243
|
{{/if}}
|
|
240
244
|
{{#if (eq database "mysql")}}
|
|
241
245
|
{{#if (eq orm "drizzle")}}
|
|
242
|
-
DATABASE_HOST:
|
|
243
|
-
DATABASE_USERNAME:
|
|
244
|
-
DATABASE_PASSWORD:
|
|
246
|
+
DATABASE_HOST: alchemy.env.DATABASE_HOST,
|
|
247
|
+
DATABASE_USERNAME: alchemy.env.DATABASE_USERNAME,
|
|
248
|
+
DATABASE_PASSWORD: alchemy.secret.env.DATABASE_PASSWORD,
|
|
245
249
|
{{/if}}
|
|
246
250
|
{{/if}}
|
|
247
251
|
},
|
|
@@ -9,7 +9,11 @@ import {
|
|
|
9
9
|
import { Checkbox } from "@/components/ui/checkbox";
|
|
10
10
|
import { Input } from "@/components/ui/input";
|
|
11
11
|
import { createFileRoute } from "@tanstack/react-router";
|
|
12
|
+
{{#if (eq backend "convex")}}
|
|
13
|
+
import { Trash2 } from "lucide-react";
|
|
14
|
+
{{else}}
|
|
12
15
|
import { Loader2, Trash2 } from "lucide-react";
|
|
16
|
+
{{/if}}
|
|
13
17
|
import { useState } from "react";
|
|
14
18
|
|
|
15
19
|
{{#if (eq backend "convex")}}
|
|
File without changes
|