create-better-t-stack 2.47.4 → 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
package/dist/index.js
CHANGED
|
@@ -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 = "
|
|
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 = "
|
|
1398
|
-
const POSTHOG_HOST = "
|
|
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
|
+
"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: [
|