create-better-t-stack 3.4.1 → 3.4.2-canary.2077910a

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.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +1 -1
  3. package/dist/index.d.ts +0 -6
  4. package/dist/index.js +1 -1
  5. package/dist/{src-_EdtPnBT.js → src-CFkY2F0Q.js} +97 -462
  6. package/package.json +1 -1
  7. package/templates/api/orpc/server/package.json.hbs +1 -5
  8. package/templates/api/orpc/server/tsconfig.json.hbs +1 -4
  9. package/templates/api/trpc/server/package.json.hbs +1 -5
  10. package/templates/api/trpc/server/tsconfig.json.hbs +1 -4
  11. package/templates/auth/better-auth/server/base/package.json.hbs +1 -5
  12. package/templates/auth/better-auth/server/base/tsconfig.json.hbs +1 -4
  13. package/templates/db/base/package.json.hbs +1 -5
  14. package/templates/db/base/tsconfig.json.hbs +1 -4
  15. package/templates/db/drizzle/sqlite/drizzle.config.ts.hbs +0 -7
  16. package/templates/db/prisma/mongodb/prisma/schema/schema.prisma.hbs +1 -1
  17. package/templates/db/prisma/mysql/prisma/schema/schema.prisma.hbs +8 -12
  18. package/templates/db/prisma/mysql/prisma.config.ts.hbs +17 -14
  19. package/templates/db/prisma/mysql/src/index.ts.hbs +16 -6
  20. package/templates/db/prisma/postgres/prisma/schema/schema.prisma.hbs +1 -5
  21. package/templates/db/prisma/postgres/prisma.config.ts.hbs +12 -9
  22. package/templates/db/prisma/postgres/src/index.ts.hbs +26 -4
  23. package/templates/db/prisma/sqlite/prisma/schema/schema.prisma.hbs +1 -12
  24. package/templates/db/prisma/sqlite/prisma.config.ts.hbs +12 -9
  25. package/templates/db/prisma/sqlite/src/index.ts.hbs +10 -14
  26. package/templates/deploy/alchemy/alchemy.run.ts.hbs +67 -5
  27. package/templates/examples/ai/web/react/next/src/app/ai/page.tsx.hbs +2 -2
  28. package/templates/extras/_npmrc.hbs +2 -2
  29. package/templates/frontend/native/uniwind/app/(drawer)/_layout.tsx.hbs +21 -13
  30. package/templates/frontend/react/next/next.config.ts.hbs +5 -2
  31. package/templates/frontend/react/next/tsconfig.json.hbs +0 -3
  32. package/templates/frontend/react/tanstack-start/package.json.hbs +4 -4
  33. package/templates/packages/config/tsconfig.base.json.hbs +1 -1
  34. package/templates/api/orpc/server/tsdown.config.ts.hbs +0 -7
  35. package/templates/api/trpc/server/tsdown.config.ts.hbs +0 -7
  36. package/templates/auth/better-auth/server/base/tsdown.config.ts.hbs +0 -7
  37. package/templates/db/base/tsdown.config.ts.hbs +0 -7
  38. package/templates/deploy/wrangler/server/wrangler.jsonc.hbs +0 -39
  39. package/templates/deploy/wrangler/web/nuxt/wrangler.jsonc.hbs +0 -51
  40. package/templates/deploy/wrangler/web/react/next/open-next.config.ts +0 -6
  41. package/templates/deploy/wrangler/web/react/next/wrangler.jsonc.hbs +0 -22
  42. package/templates/deploy/wrangler/web/react/react-router/wrangler.jsonc.hbs +0 -8
  43. package/templates/deploy/wrangler/web/react/tanstack-router/wrangler.jsonc.hbs +0 -8
  44. package/templates/deploy/wrangler/web/react/tanstack-start/wrangler.jsonc.hbs +0 -20
  45. package/templates/deploy/wrangler/web/solid/wrangler.jsonc.hbs +0 -8
  46. package/templates/deploy/wrangler/web/svelte/wrangler.jsonc.hbs +0 -51
@@ -1,4 +1,4 @@
1
- {{#if (or (eq webDeploy "alchemy") (eq webDeploy "wrangler"))}}
1
+ {{#if (eq webDeploy "alchemy")}}
2
2
  import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";
3
3
  {{/if}}
4
4
  import type { NextConfig } from "next";
@@ -9,10 +9,13 @@ const nextConfig: NextConfig = {
9
9
  {{#if (includes examples "ai")}}
10
10
  transpilePackages: ["shiki"],
11
11
  {{/if}}
12
+ {{#if (eq dbSetup "turso")}}
13
+ serverExternalPackages: ["libsql", "@libsql/client"],
14
+ {{/if}}
12
15
  };
13
16
 
14
17
  export default nextConfig;
15
18
 
16
- {{#if (or (eq webDeploy "alchemy") (eq webDeploy "wrangler"))}}
19
+ {{#if (eq webDeploy "alchemy")}}
17
20
  initOpenNextCloudflareForDev();
18
21
  {{/if}}
@@ -30,9 +30,6 @@
30
30
  {{#if (eq serverDeploy "alchemy")}}
31
31
  "../server/env.d.ts",
32
32
  {{/if}}
33
- {{#if (eq serverDeploy "wrangler")}}
34
- "../server/worker-configuration.d.ts",
35
- {{/if}}
36
33
  "./next-env.d.ts",
37
34
  "./**/*.ts",
38
35
  "./**/*.tsx",
@@ -12,10 +12,10 @@
12
12
  "@tanstack/react-form": "^1.23.5",
13
13
  "@tailwindcss/vite": "^4.1.8",
14
14
  "@tanstack/react-query": "^5.80.6",
15
- "@tanstack/react-router": "^1.132.31",
15
+ "@tanstack/react-router": {{#if (eq auth "clerk")}}"1.134.4"{{else}}"^1.132.31"{{/if}},
16
16
  "@tanstack/react-router-with-query": "^1.130.17",
17
- "@tanstack/react-start": "^1.132.31",
18
- "@tanstack/router-plugin": "^1.132.31",
17
+ "@tanstack/react-start": {{#if (eq auth "clerk")}}"1.134.6"{{else}}"^1.132.31"{{/if}},
18
+ "@tanstack/router-plugin": {{#if (eq auth "clerk")}}"1.134.4"{{else}}"^1.132.31"{{/if}},
19
19
  "class-variance-authority": "^0.7.1",
20
20
  "clsx": "^2.1.1",
21
21
  "lucide-react": "^0.525.0",
@@ -30,7 +30,7 @@
30
30
  "zod": "^4.0.2"
31
31
  },
32
32
  "devDependencies": {
33
- "@tanstack/react-router-devtools": "^1.132.31",
33
+ "@tanstack/react-router-devtools": {{#if (eq auth "clerk")}}"1.134.4"{{else}}"^1.132.31"{{/if}},
34
34
  "@testing-library/dom": "^10.4.0",
35
35
  "@testing-library/react": "^16.2.0",
36
36
  "@types/react": "~19.1.10",
@@ -26,7 +26,7 @@
26
26
  "node"
27
27
  {{else}}
28
28
  "node"
29
- {{/if}}{{#if (eq serverDeploy "alchemy")}},
29
+ {{/if}}{{#if (or (eq serverDeploy "alchemy") (eq webDeploy "alchemy"))}},
30
30
  "@cloudflare/workers-types"{{/if}}
31
31
  ]
32
32
  }
@@ -1,7 +0,0 @@
1
- import { defineConfig } from "tsdown";
2
-
3
- export default defineConfig({
4
- entry: 'src/**/*.ts',
5
- sourcemap: true,
6
- dts: true,
7
- });
@@ -1,7 +0,0 @@
1
- import { defineConfig } from "tsdown";
2
-
3
- export default defineConfig({
4
- entry: 'src/**/*.ts',
5
- sourcemap: true,
6
- dts: true,
7
- });
@@ -1,7 +0,0 @@
1
- import { defineConfig } from "tsdown";
2
-
3
- export default defineConfig({
4
- entry: 'src/**/*.ts',
5
- sourcemap: true,
6
- dts: true,
7
- });
@@ -1,7 +0,0 @@
1
- import { defineConfig } from "tsdown";
2
-
3
- export default defineConfig({
4
- entry: 'src/**/*.ts',
5
- sourcemap: true,
6
- dts: true,
7
- });
@@ -1,39 +0,0 @@
1
- {
2
- "name": "{{projectName}}-server",
3
- "main": "src/index.ts",
4
- "compatibility_date": "2025-06-15",
5
- "compatibility_flags": ["nodejs_compat"],
6
- "vars": {
7
- "NODE_ENV": "production"
8
- // Add public environment variables here
9
- // Example: "CORS_ORIGIN": "https://your-domain.com"
10
- }
11
- // For sensitive data, use:
12
- // wrangler secret put SECRET_NAME
13
- // Don't add secrets to "vars" - they're visible in the dashboard!
14
-
15
- {{#if (eq dbSetup "d1")}},
16
- // To set up D1 database:
17
- // 1. Run: wrangler login
18
- // 2. Run: wrangler d1 create your-database-name
19
- // 3. Copy the output and paste below
20
- // Then run migrations:
21
- // bun db:generate
22
- // To apply migrations locally, run:
23
- // wrangler d1 migrations apply YOUR_DB_NAME --local
24
- "d1_databases": [
25
- {
26
- "binding": "DB",
27
- "database_name": "YOUR_DB_NAME",
28
- "database_id": "YOUR_DB_ID",
29
- "preview_database_id": "local-test-db",
30
- {{#if (eq orm "drizzle")}}
31
- "migrations_dir": "./src/db/migrations"
32
- {{/if}}
33
- {{#if (eq orm "prisma")}}
34
- "migrations_dir": "./prisma/migrations"
35
- {{/if}}
36
- }
37
- ]
38
- {{/if}}
39
- }
@@ -1,51 +0,0 @@
1
- /**
2
- * For more details on how to configure Wrangler, refer to:
3
- * https://developers.cloudflare.com/workers/wrangler/configuration/
4
- */
5
- {
6
- "$schema": "./node_modules/wrangler/config-schema.json",
7
- "name": "{{projectName}}",
8
- "main": "./.output/server/index.mjs",
9
- "compatibility_date": "2025-07-01",
10
- "assets": {
11
- "binding": "ASSETS",
12
- "directory": "./.output/public/"
13
- },
14
- "observability": {
15
- "enabled": true
16
- }
17
- /**
18
- * Smart Placement
19
- * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
20
- */
21
- // "placement": { "mode": "smart" },
22
-
23
- /**
24
- * Bindings
25
- * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
26
- * databases, object storage, AI inference, real-time communication and more.
27
- * https://developers.cloudflare.com/workers/runtime-apis/bindings/
28
- */
29
-
30
- /**
31
- * Environment Variables
32
- * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
33
- */
34
- // "vars": { "MY_VARIABLE": "production_value" },
35
- /**
36
- * Note: Use secrets to store sensitive data.
37
- * https://developers.cloudflare.com/workers/configuration/secrets/
38
- */
39
-
40
- /**
41
- * Static Assets
42
- * https://developers.cloudflare.com/workers/static-assets/binding/
43
- */
44
- // "assets": { "directory": "./public/", "binding": "ASSETS" },
45
-
46
- /**
47
- * Service Bindings (communicate between multiple Workers)
48
- * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
49
- */
50
- // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
51
- }
@@ -1,6 +0,0 @@
1
- import { defineCloudflareConfig } from "@opennextjs/cloudflare/config";
2
- // import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";
3
-
4
- export default defineCloudflareConfig({
5
- // incrementalCache: r2IncrementalCache,
6
- });
@@ -1,22 +0,0 @@
1
- {
2
- "$schema": "./node_modules/wrangler/config-schema.json",
3
- "main": ".open-next/worker.js",
4
- "name": "{{projectName}}",
5
- "compatibility_date": "2025-07-05",
6
- "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
7
- "assets": {
8
- "directory": ".open-next/assets",
9
- "binding": "ASSETS"
10
- },
11
- // "r2_buckets": [
12
- // // Use R2 incremental cache
13
- // // See https://opennext.js.org/cloudflare/caching
14
- // {
15
- // "binding": "NEXT_INC_CACHE_R2_BUCKET",
16
- // // Create the bucket before deploying
17
- // // You can change the bucket name if you want
18
- // // See https://developers.cloudflare.com/workers/wrangler/commands/#r2-bucket-create
19
- // "bucket_name": "cache"
20
- // }
21
- // ]
22
- }
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "./node_modules/wrangler/config-schema.json",
3
- "name": "{{projectName}}",
4
- "compatibility_date": "2025-04-03",
5
- "assets": {
6
- "not_found_handling": "single-page-application"
7
- }
8
- }
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "./node_modules/wrangler/config-schema.json",
3
- "name": "{{projectName}}",
4
- "compatibility_date": "2025-04-03",
5
- "assets": {
6
- "not_found_handling": "single-page-application"
7
- }
8
- }
@@ -1,20 +0,0 @@
1
- {
2
- "$schema": "./node_modules/wrangler/config-schema.json",
3
- "name": "{{projectName}}",
4
- "main": "@tanstack/react-start/server-entry",
5
- "compatibility_date": "2025-09-15",
6
- "compatibility_flags": ["nodejs_compat"],
7
- "assets": {
8
- "directory": ".output/public",
9
- },
10
- "observability": {
11
- "enabled": true,
12
- },
13
- // "kv_namespaces": [
14
- // {
15
- // "binding": "CACHE",
16
- // "id": "<Your KV ID>",
17
- // },
18
- // ],
19
- }
20
-
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "./node_modules/wrangler/config-schema.json",
3
- "name": "{{projectName}}",
4
- "compatibility_date": "2025-04-03",
5
- "assets": {
6
- "not_found_handling": "single-page-application"
7
- }
8
- }
@@ -1,51 +0,0 @@
1
- /**
2
- * For more details on how to configure Wrangler, refer to:
3
- * https://developers.cloudflare.com/workers/wrangler/configuration/
4
- */
5
- {
6
- "$schema": "./node_modules/wrangler/config-schema.json",
7
- "name": "{{projectName}}",
8
- "main": ".svelte-kit/cloudflare/_worker.js",
9
- "compatibility_date": "2025-07-05",
10
- "assets": {
11
- "binding": "ASSETS",
12
- "directory": ".svelte-kit/cloudflare"
13
- },
14
- "observability": {
15
- "enabled": true
16
- }
17
- /**
18
- * Smart Placement
19
- * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
20
- */
21
- // "placement": { "mode": "smart" },
22
-
23
- /**
24
- * Bindings
25
- * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
26
- * databases, object storage, AI inference, real-time communication and more.
27
- * https://developers.cloudflare.com/workers/runtime-apis/bindings/
28
- */
29
-
30
- /**
31
- * Environment Variables
32
- * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
33
- */
34
- // "vars": { "MY_VARIABLE": "production_value" },
35
- /**
36
- * Note: Use secrets to store sensitive data.
37
- * https://developers.cloudflare.com/workers/configuration/secrets/
38
- */
39
-
40
- /**
41
- * Static Assets
42
- * https://developers.cloudflare.com/workers/static-assets/binding/
43
- */
44
- // "assets": { "directory": "./public/", "binding": "ASSETS" },
45
-
46
- /**
47
- * Service Bindings (communicate between multiple Workers)
48
- * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
49
- */
50
- // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
51
- }