create-better-t-stack 2.47.3 → 2.47.5

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { createBtsCli } from "./src-BKSKHS0R.js";
2
+ import { createBtsCli } from "./src-B2EF7t6S.js";
3
3
 
4
4
  //#region src/cli.ts
5
5
  createBtsCli().run();
package/dist/index.d.ts CHANGED
@@ -21,10 +21,10 @@ declare const ORMSchema: z.ZodEnum<{
21
21
  type ORM = z.infer<typeof ORMSchema>;
22
22
  declare const BackendSchema: z.ZodEnum<{
23
23
  none: "none";
24
+ next: "next";
24
25
  hono: "hono";
25
26
  express: "express";
26
27
  fastify: "fastify";
27
- next: "next";
28
28
  elysia: "elysia";
29
29
  convex: "convex";
30
30
  }>;
@@ -38,10 +38,10 @@ declare const RuntimeSchema: z.ZodEnum<{
38
38
  type Runtime = z.infer<typeof RuntimeSchema>;
39
39
  declare const FrontendSchema: z.ZodEnum<{
40
40
  none: "none";
41
- next: "next";
42
41
  "tanstack-router": "tanstack-router";
43
42
  "react-router": "react-router";
44
43
  "tanstack-start": "tanstack-start";
44
+ next: "next";
45
45
  nuxt: "nuxt";
46
46
  "native-nativewind": "native-nativewind";
47
47
  "native-unistyles": "native-unistyles";
@@ -70,9 +70,9 @@ declare const ExamplesSchema: z.ZodEnum<{
70
70
  }>;
71
71
  type Examples = z.infer<typeof ExamplesSchema>;
72
72
  declare const PackageManagerSchema: z.ZodEnum<{
73
- bun: "bun";
74
73
  npm: "npm";
75
74
  pnpm: "pnpm";
75
+ bun: "bun";
76
76
  }>;
77
77
  type PackageManager = z.infer<typeof PackageManagerSchema>;
78
78
  declare const DatabaseSetupSchema: z.ZodEnum<{
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { builder, createBtsCli, docs, init, router, sponsors } from "./src-BKSKHS0R.js";
2
+ import { builder, createBtsCli, docs, init, router, sponsors } from "./src-B2EF7t6S.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -60,8 +60,8 @@ function getDefaultConfig() {
60
60
  }
61
61
  const DEFAULT_CONFIG = getDefaultConfig();
62
62
  const dependencyVersionMap = {
63
- "better-auth": "^1.3.10",
64
- "@better-auth/expo": "^1.3.10",
63
+ "better-auth": "^1.3.13",
64
+ "@better-auth/expo": "^1.3.13",
65
65
  "@clerk/nextjs": "^6.31.5",
66
66
  "@clerk/clerk-react": "^5.45.0",
67
67
  "@clerk/tanstack-react-start": "^0.23.1",
@@ -1386,7 +1386,7 @@ const getLatestCLIVersion = () => {
1386
1386
  */
1387
1387
  function isTelemetryEnabled() {
1388
1388
  const BTS_TELEMETRY_DISABLED = process.env.BTS_TELEMETRY_DISABLED;
1389
- const BTS_TELEMETRY = "1";
1389
+ const BTS_TELEMETRY = "0";
1390
1390
  if (BTS_TELEMETRY_DISABLED !== void 0) return BTS_TELEMETRY_DISABLED !== "1";
1391
1391
  if (BTS_TELEMETRY !== void 0) return BTS_TELEMETRY === "1";
1392
1392
  return true;
@@ -1394,8 +1394,8 @@ function isTelemetryEnabled() {
1394
1394
 
1395
1395
  //#endregion
1396
1396
  //#region src/utils/analytics.ts
1397
- const POSTHOG_API_KEY = "phc_8ZUxEwwfKMajJLvxz1daGd931dYbQrwKNficBmsdIrs";
1398
- const POSTHOG_HOST = "https://us.i.posthog.com";
1397
+ const POSTHOG_API_KEY = "random";
1398
+ const POSTHOG_HOST = "random";
1399
1399
  function generateSessionId() {
1400
1400
  const rand = Math.random().toString(36).slice(2);
1401
1401
  const now = Date.now().toString(36);
@@ -5886,6 +5886,8 @@ ${generateRunningInstructions(frontend, backend, webPort, hasNative, isConvex)}
5886
5886
 
5887
5887
  ${addons.includes("pwa") && hasReactRouter ? "\n## PWA Support with React Router v7\n\nThere is a known compatibility issue between VitePWA and React Router v7.\nSee: https://github.com/vite-pwa/vite-plugin-pwa/issues/809\n" : ""}
5888
5888
 
5889
+ ${generateWorkersRuntimeNotes(runtime)}
5890
+
5889
5891
  ${generateDeploymentCommands(packageManagerRunCmd, webDeploy, serverDeploy)}
5890
5892
 
5891
5893
  ## Project Structure
@@ -6111,6 +6113,25 @@ function generateScriptsList(packageManagerRunCmd, database, orm, _auth, hasNati
6111
6113
  - \`cd apps/docs && ${packageManagerRunCmd} build\`: Build documentation site`;
6112
6114
  return scripts;
6113
6115
  }
6116
+ function generateWorkersRuntimeNotes(runtime) {
6117
+ if (runtime !== "workers") return "";
6118
+ return `
6119
+ ## Before Deploying to Cloudflare
6120
+
6121
+ When you are ready to deploy your app to Cloudflare Workers, you'll have to make a couple changes.
6122
+ - Change your url environment variables to match your \`*.workers.dev\` domains generated by Cloudflare:
6123
+
6124
+ \`\`\`bash
6125
+ # apps/web/.env
6126
+ SERVER_URL={your-production-server-domain}
6127
+
6128
+ # apps/server/.env
6129
+ CORS_ORIGIN={your-production-web-domain}
6130
+ BETTER_AUTH_URL={your-production-server-domain}
6131
+ \`\`\`
6132
+ - In \`apps/server/lib/auth.ts\`, uncomment the \`session.cookieCache\` and \`advanced.crossSubDomainCookies\` sections and replace \`<your-workers-subdomain>\` with your actual workers subdomain. These settings are required to ensure cookies are transferred properly between your web and server domains.
6133
+ `;
6134
+ }
6114
6135
  function generateDeploymentCommands(packageManagerRunCmd, webDeploy, serverDeploy) {
6115
6136
  const lines = [];
6116
6137
  if (webDeploy === "alchemy" || serverDeploy === "alchemy") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "2.47.3",
3
+ "version": "2.47.5",
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",
@@ -164,6 +164,13 @@ export const auth = betterAuth<BetterAuthOptions>({
164
164
  emailAndPassword: {
165
165
  enabled: true,
166
166
  },
167
+ // uncomment cookieCache setting when ready to deploy to Cloudflare using *.workers.dev domains
168
+ // session: {
169
+ // cookieCache: {
170
+ // enabled: true,
171
+ // maxAge: 60,
172
+ // },
173
+ // },
167
174
  secret: env.BETTER_AUTH_SECRET,
168
175
  baseURL: env.BETTER_AUTH_URL,
169
176
  advanced: {
@@ -172,6 +179,12 @@ export const auth = betterAuth<BetterAuthOptions>({
172
179
  secure: true,
173
180
  httpOnly: true,
174
181
  },
182
+ // uncomment crossSubDomainCookies setting when ready to deploy and replace <your-workers-subdomain> with your actual workers subdomain
183
+ // https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
184
+ // crossSubDomainCookies: {
185
+ // enabled: true,
186
+ // domain: "<your-workers-subdomain>",
187
+ // },
175
188
  },
176
189
  {{#if (eq payments "polar")}}
177
190
  plugins: [