create-better-t-stack 2.33.6 → 2.33.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { createBtsCli } from "./src-CcycH-Mi.js";
2
+ import { createBtsCli } from "./src-v-T6MhJ_.js";
3
3
 
4
4
  //#region src/cli.ts
5
5
  createBtsCli().run();
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-CcycH-Mi.js";
2
+ import { builder, createBtsCli, docs, init, router, sponsors } from "./src-v-T6MhJ_.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -1199,7 +1199,7 @@ const getLatestCLIVersion = () => {
1199
1199
  */
1200
1200
  function isTelemetryEnabled() {
1201
1201
  const BTS_TELEMETRY_DISABLED = process.env.BTS_TELEMETRY_DISABLED;
1202
- const BTS_TELEMETRY = "0";
1202
+ const BTS_TELEMETRY = "1";
1203
1203
  if (BTS_TELEMETRY_DISABLED !== void 0) return BTS_TELEMETRY_DISABLED !== "1";
1204
1204
  if (BTS_TELEMETRY !== void 0) return BTS_TELEMETRY === "1";
1205
1205
  return true;
@@ -1207,8 +1207,8 @@ function isTelemetryEnabled() {
1207
1207
 
1208
1208
  //#endregion
1209
1209
  //#region src/utils/analytics.ts
1210
- const POSTHOG_API_KEY = "random";
1211
- const POSTHOG_HOST = "random";
1210
+ const POSTHOG_API_KEY = "phc_8ZUxEwwfKMajJLvxz1daGd931dYbQrwKNficBmsdIrs";
1211
+ const POSTHOG_HOST = "https://us.i.posthog.com";
1212
1212
  async function trackProjectCreation(config, disableAnalytics = false) {
1213
1213
  if (!isTelemetryEnabled() || disableAnalytics) return;
1214
1214
  const sessionId = `cli_${crypto.randomUUID().replace(/-/g, "")}`;
@@ -4769,20 +4769,20 @@ async function displayPostInstallInstructions(config) {
4769
4769
  let stepCounter = 2;
4770
4770
  if (!depsInstalled) output += `${pc.cyan(`${stepCounter++}.`)} ${packageManager} install\n`;
4771
4771
  if (isConvex) {
4772
- output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev:setup ${pc.dim("(this will guide you through Convex project setup)")}\n`;
4773
- output += `${pc.cyan(`${stepCounter++}.`)} Copy environment variables from ${pc.white("packages/backend/.env.local")} \nto ${pc.white("apps/*/.env")}\n`;
4772
+ output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev:setup\n${pc.dim(" (this will guide you through Convex project setup)")}\n`;
4773
+ output += `${pc.cyan(`${stepCounter++}.`)} Copy environment variables from\n${pc.white(" packages/backend/.env.local")} to ${pc.white("apps/*/.env")}\n`;
4774
4774
  output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev\n\n`;
4775
4775
  } else {
4776
4776
  if (runtime !== "workers") output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev\n`;
4777
4777
  if (runtime === "workers") {
4778
- if (dbSetup === "d1") output += `${pc.yellow("IMPORTANT:")} Complete D1 database setup first (see Database commands below)\n`;
4778
+ if (dbSetup === "d1") output += `${pc.yellow("IMPORTANT:")} Complete D1 database setup first\n (see Database commands below)\n`;
4779
4779
  output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev\n`;
4780
4780
  output += `${pc.cyan(`${stepCounter++}.`)} cd apps/server && ${runCmd} run cf-typegen\n\n`;
4781
4781
  } else output += "\n";
4782
4782
  }
4783
4783
  output += `${pc.bold("Your project will be available at:")}\n`;
4784
4784
  if (hasWeb) output += `${pc.cyan("•")} Frontend: http://localhost:${webPort}\n`;
4785
- else if (!hasNative && !addons?.includes("starlight")) output += `${pc.yellow("NOTE:")} You are creating a backend-only app (no frontend selected)\n`;
4785
+ else if (!hasNative && !addons?.includes("starlight")) output += `${pc.yellow("NOTE:")} You are creating a backend-only app\n (no frontend selected)\n`;
4786
4786
  if (!isConvex) output += `${pc.cyan("•")} Backend API: http://localhost:3000\n`;
4787
4787
  if (addons?.includes("starlight")) output += `${pc.cyan("•")} Docs: http://localhost:4321\n`;
4788
4788
  if (addons?.includes("fumadocs")) output += `${pc.cyan("•")} Fumadocs: http://localhost:4000\n`;
@@ -4796,7 +4796,7 @@ async function displayPostInstallInstructions(config) {
4796
4796
  if (noOrmWarning) output += `\n${noOrmWarning.trim()}\n`;
4797
4797
  if (bunWebNativeWarning) output += `\n${bunWebNativeWarning.trim()}\n`;
4798
4798
  output += `\n${pc.bold("Update all dependencies:\n")}${pc.cyan(tazeCommand)}\n\n`;
4799
- output += `${pc.bold("Like Better-T Stack?")} Please consider giving us a star on GitHub:\n`;
4799
+ output += `${pc.bold("Like Better-T Stack?")} Please consider giving us a star\n on GitHub:\n`;
4800
4800
  output += pc.cyan("https://github.com/AmanVarshney01/create-better-t-stack");
4801
4801
  consola$1.box(output);
4802
4802
  }
@@ -4805,8 +4805,8 @@ function getNativeInstructions(isConvex) {
4805
4805
  const exampleUrl = isConvex ? "https://<YOUR_CONVEX_URL>" : "http://<YOUR_LOCAL_IP>:3000";
4806
4806
  const envFileName = ".env";
4807
4807
  const ipNote = isConvex ? "your Convex deployment URL (find after running 'dev:setup')" : "your local IP address";
4808
- let instructions = `${pc.yellow("NOTE:")} For Expo connectivity issues, update apps/native/${envFileName} \nwith ${ipNote}:\n${`${envVar}=${exampleUrl}`}\n`;
4809
- if (isConvex) instructions += `\n${pc.yellow("IMPORTANT:")} When using local development with Convex and native apps, ensure you use your local IP address \ninstead of localhost or 127.0.0.1 for proper connectivity.\n`;
4808
+ let instructions = `${pc.yellow("NOTE:")} For Expo connectivity issues, update\n apps/native/${envFileName} with ${ipNote}:\n ${`${envVar}=${exampleUrl}`}\n`;
4809
+ if (isConvex) instructions += `\n${pc.yellow("IMPORTANT:")} When using local development with Convex and native apps,\n ensure you use your local IP address instead of localhost or 127.0.0.1\n for proper connectivity.\n`;
4810
4810
  return instructions;
4811
4811
  }
4812
4812
  function getLintingInstructions(runCmd) {
@@ -4832,8 +4832,8 @@ async function getDatabaseInstructions(database, orm, runCmd, runtime, dbSetup)
4832
4832
  instructions.push("");
4833
4833
  }
4834
4834
  if (orm === "prisma") {
4835
- if (dbSetup === "turso") instructions.push(`${pc.yellow("NOTE:")} Turso support with Prisma is in Early Access and requires additional setup.`, `Learn more at: https://www.prisma.io/docs/orm/overview/databases/turso`);
4836
- if (database === "mongodb" && dbSetup === "docker") instructions.push(`${pc.yellow("WARNING:")} Prisma + MongoDB + Docker combination may not work.`);
4835
+ if (dbSetup === "turso") instructions.push(`${pc.yellow("NOTE:")} Turso support with Prisma is in Early Access and requires\n additional setup. Learn more at:\n https://www.prisma.io/docs/orm/overview/databases/turso`);
4836
+ if (database === "mongodb" && dbSetup === "docker") instructions.push(`${pc.yellow("WARNING:")} Prisma + MongoDB + Docker combination\n may not work.`);
4837
4837
  if (dbSetup === "docker") instructions.push(`${pc.cyan("•")} Start docker container: ${`${runCmd} db:start`}`);
4838
4838
  instructions.push(`${pc.cyan("•")} Apply schema: ${`${runCmd} db:push`}`);
4839
4839
  instructions.push(`${pc.cyan("•")} Database UI: ${`${runCmd} db:studio`}`);
@@ -4844,23 +4844,23 @@ async function getDatabaseInstructions(database, orm, runCmd, runtime, dbSetup)
4844
4844
  if (database === "sqlite" && dbSetup !== "d1") instructions.push(`${pc.cyan("•")} Start local DB (if needed): ${`cd apps/server && ${runCmd} db:local`}`);
4845
4845
  } else if (orm === "mongoose") {
4846
4846
  if (dbSetup === "docker") instructions.push(`${pc.cyan("•")} Start docker container: ${`${runCmd} db:start`}`);
4847
- } else if (orm === "none") instructions.push(`${pc.yellow("NOTE:")} Manual database schema setup required.`);
4847
+ } else if (orm === "none") instructions.push(`${pc.yellow("NOTE:")} Manual database schema setup\n required.`);
4848
4848
  return instructions.length ? `${pc.bold("Database commands:")}\n${instructions.join("\n")}` : "";
4849
4849
  }
4850
4850
  function getTauriInstructions(runCmd) {
4851
- return `\n${pc.bold("Desktop app with Tauri:")}\n${pc.cyan("•")} Start desktop app: ${`cd apps/web && ${runCmd} desktop:dev`}\n${pc.cyan("•")} Build desktop app: ${`cd apps/web && ${runCmd} desktop:build`}\n${pc.yellow("NOTE:")} Tauri requires Rust and platform-specific dependencies.\nSee: https://v2.tauri.app/start/prerequisites/`;
4851
+ return `\n${pc.bold("Desktop app with Tauri:")}\n${pc.cyan("•")} Start desktop app: ${`cd apps/web && ${runCmd} desktop:dev`}\n${pc.cyan("•")} Build desktop app: ${`cd apps/web && ${runCmd} desktop:build`}\n${pc.yellow("NOTE:")} Tauri requires Rust and platform-specific dependencies.\n See: https://v2.tauri.app/start/prerequisites/`;
4852
4852
  }
4853
4853
  function getPwaInstructions() {
4854
- return `\n${pc.bold("PWA with React Router v7:")}\n${pc.yellow("NOTE:")} There is a known compatibility issue between VitePWA \nand React Router v7.See: https://github.com/vite-pwa/vite-plugin-pwa/issues/809`;
4854
+ return `\n${pc.bold("PWA with React Router v7:")}\n${pc.yellow("NOTE:")} There is a known compatibility issue between VitePWA\n and React Router v7. See:\n https://github.com/vite-pwa/vite-plugin-pwa/issues/809`;
4855
4855
  }
4856
4856
  function getStarlightInstructions(runCmd) {
4857
4857
  return `\n${pc.bold("Documentation with Starlight:")}\n${pc.cyan("•")} Start docs site: ${`cd apps/docs && ${runCmd} dev`}\n${pc.cyan("•")} Build docs site: ${`cd apps/docs && ${runCmd} build`}`;
4858
4858
  }
4859
4859
  function getNoOrmWarning() {
4860
- return `\n${pc.yellow("WARNING:")} Database selected without an ORM. Features requiring database access (e.g., examples, auth) need manual setup.`;
4860
+ return `\n${pc.yellow("WARNING:")} Database selected without an ORM. Features requiring\n database access (e.g., examples, auth) need manual setup.`;
4861
4861
  }
4862
4862
  function getBunWebNativeWarning() {
4863
- return `\n${pc.yellow("WARNING:")} 'bun' might cause issues with web + native apps in a monorepo. Use 'pnpm' if problems arise.`;
4863
+ return `\n${pc.yellow("WARNING:")} 'bun' might cause issues with web + native apps in a monorepo.\n Use 'pnpm' if problems arise.`;
4864
4864
  }
4865
4865
  function getWorkersDeployInstructions(runCmd) {
4866
4866
  return `\n${pc.bold("Deploy frontend to Cloudflare Workers:")}\n${pc.cyan("•")} Deploy: ${`cd apps/web && ${runCmd} run deploy`}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "2.33.6",
3
+ "version": "2.33.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",
@@ -53,7 +53,8 @@
53
53
  "check-types": "tsc --noEmit",
54
54
  "check": "biome check --write .",
55
55
  "test": "bun run build && vitest --ui",
56
- "test:with-build": "bun run build && WITH_BUILD=1 vitest --ui"
56
+ "test:with-build": "bun run build && WITH_BUILD=1 vitest --ui",
57
+ "prepublishOnly": "npm run build"
57
58
  },
58
59
  "exports": {
59
60
  ".": {
@@ -82,6 +83,5 @@
82
83
  "tsdown": "^0.14.1",
83
84
  "typescript": "^5.9.2",
84
85
  "vitest": "^3.2.4"
85
- },
86
- "gitHead": "22773232ae864b0b38bb72f5bf12d433ee74803c"
86
+ }
87
87
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Better T Stack
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.