create-better-t-stack 2.33.5 → 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-B-ppWkkE.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-B-ppWkkE.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 };
@@ -1093,7 +1093,6 @@ async function gatherConfig(flags, projectName, projectDir, relativePath) {
1093
1093
  result.auth = false;
1094
1094
  result.dbSetup = "none";
1095
1095
  result.examples = ["todo"];
1096
- result.webDeploy = "none";
1097
1096
  }
1098
1097
  if (result.backend === "none") {
1099
1098
  result.runtime = "none";
@@ -1103,7 +1102,6 @@ async function gatherConfig(flags, projectName, projectDir, relativePath) {
1103
1102
  result.auth = false;
1104
1103
  result.dbSetup = "none";
1105
1104
  result.examples = [];
1106
- result.webDeploy = "none";
1107
1105
  }
1108
1106
  return {
1109
1107
  projectName,
@@ -1201,7 +1199,7 @@ const getLatestCLIVersion = () => {
1201
1199
  */
1202
1200
  function isTelemetryEnabled() {
1203
1201
  const BTS_TELEMETRY_DISABLED = process.env.BTS_TELEMETRY_DISABLED;
1204
- const BTS_TELEMETRY = "0";
1202
+ const BTS_TELEMETRY = "1";
1205
1203
  if (BTS_TELEMETRY_DISABLED !== void 0) return BTS_TELEMETRY_DISABLED !== "1";
1206
1204
  if (BTS_TELEMETRY !== void 0) return BTS_TELEMETRY === "1";
1207
1205
  return true;
@@ -1209,8 +1207,8 @@ function isTelemetryEnabled() {
1209
1207
 
1210
1208
  //#endregion
1211
1209
  //#region src/utils/analytics.ts
1212
- const POSTHOG_API_KEY = "random";
1213
- const POSTHOG_HOST = "random";
1210
+ const POSTHOG_API_KEY = "phc_8ZUxEwwfKMajJLvxz1daGd931dYbQrwKNficBmsdIrs";
1211
+ const POSTHOG_HOST = "https://us.i.posthog.com";
1214
1212
  async function trackProjectCreation(config, disableAnalytics = false) {
1215
1213
  if (!isTelemetryEnabled() || disableAnalytics) return;
1216
1214
  const sessionId = `cli_${crypto.randomUUID().replace(/-/g, "")}`;
@@ -4771,20 +4769,20 @@ async function displayPostInstallInstructions(config) {
4771
4769
  let stepCounter = 2;
4772
4770
  if (!depsInstalled) output += `${pc.cyan(`${stepCounter++}.`)} ${packageManager} install\n`;
4773
4771
  if (isConvex) {
4774
- output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev:setup ${pc.dim("(this will guide you through Convex project setup)")}\n`;
4775
- 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`;
4776
4774
  output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev\n\n`;
4777
4775
  } else {
4778
4776
  if (runtime !== "workers") output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev\n`;
4779
4777
  if (runtime === "workers") {
4780
- 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`;
4781
4779
  output += `${pc.cyan(`${stepCounter++}.`)} ${runCmd} dev\n`;
4782
4780
  output += `${pc.cyan(`${stepCounter++}.`)} cd apps/server && ${runCmd} run cf-typegen\n\n`;
4783
4781
  } else output += "\n";
4784
4782
  }
4785
4783
  output += `${pc.bold("Your project will be available at:")}\n`;
4786
4784
  if (hasWeb) output += `${pc.cyan("•")} Frontend: http://localhost:${webPort}\n`;
4787
- 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`;
4788
4786
  if (!isConvex) output += `${pc.cyan("•")} Backend API: http://localhost:3000\n`;
4789
4787
  if (addons?.includes("starlight")) output += `${pc.cyan("•")} Docs: http://localhost:4321\n`;
4790
4788
  if (addons?.includes("fumadocs")) output += `${pc.cyan("•")} Fumadocs: http://localhost:4000\n`;
@@ -4798,7 +4796,7 @@ async function displayPostInstallInstructions(config) {
4798
4796
  if (noOrmWarning) output += `\n${noOrmWarning.trim()}\n`;
4799
4797
  if (bunWebNativeWarning) output += `\n${bunWebNativeWarning.trim()}\n`;
4800
4798
  output += `\n${pc.bold("Update all dependencies:\n")}${pc.cyan(tazeCommand)}\n\n`;
4801
- 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`;
4802
4800
  output += pc.cyan("https://github.com/AmanVarshney01/create-better-t-stack");
4803
4801
  consola$1.box(output);
4804
4802
  }
@@ -4807,8 +4805,8 @@ function getNativeInstructions(isConvex) {
4807
4805
  const exampleUrl = isConvex ? "https://<YOUR_CONVEX_URL>" : "http://<YOUR_LOCAL_IP>:3000";
4808
4806
  const envFileName = ".env";
4809
4807
  const ipNote = isConvex ? "your Convex deployment URL (find after running 'dev:setup')" : "your local IP address";
4810
- let instructions = `${pc.yellow("NOTE:")} For Expo connectivity issues, update apps/native/${envFileName} \nwith ${ipNote}:\n${`${envVar}=${exampleUrl}`}\n`;
4811
- 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`;
4812
4810
  return instructions;
4813
4811
  }
4814
4812
  function getLintingInstructions(runCmd) {
@@ -4834,8 +4832,8 @@ async function getDatabaseInstructions(database, orm, runCmd, runtime, dbSetup)
4834
4832
  instructions.push("");
4835
4833
  }
4836
4834
  if (orm === "prisma") {
4837
- 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`);
4838
- 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.`);
4839
4837
  if (dbSetup === "docker") instructions.push(`${pc.cyan("•")} Start docker container: ${`${runCmd} db:start`}`);
4840
4838
  instructions.push(`${pc.cyan("•")} Apply schema: ${`${runCmd} db:push`}`);
4841
4839
  instructions.push(`${pc.cyan("•")} Database UI: ${`${runCmd} db:studio`}`);
@@ -4846,23 +4844,23 @@ async function getDatabaseInstructions(database, orm, runCmd, runtime, dbSetup)
4846
4844
  if (database === "sqlite" && dbSetup !== "d1") instructions.push(`${pc.cyan("•")} Start local DB (if needed): ${`cd apps/server && ${runCmd} db:local`}`);
4847
4845
  } else if (orm === "mongoose") {
4848
4846
  if (dbSetup === "docker") instructions.push(`${pc.cyan("•")} Start docker container: ${`${runCmd} db:start`}`);
4849
- } 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.`);
4850
4848
  return instructions.length ? `${pc.bold("Database commands:")}\n${instructions.join("\n")}` : "";
4851
4849
  }
4852
4850
  function getTauriInstructions(runCmd) {
4853
- 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/`;
4854
4852
  }
4855
4853
  function getPwaInstructions() {
4856
- 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`;
4857
4855
  }
4858
4856
  function getStarlightInstructions(runCmd) {
4859
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`}`;
4860
4858
  }
4861
4859
  function getNoOrmWarning() {
4862
- 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.`;
4863
4861
  }
4864
4862
  function getBunWebNativeWarning() {
4865
- 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.`;
4866
4864
  }
4867
4865
  function getWorkersDeployInstructions(runCmd) {
4868
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.5",
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": "e7f893d76bbf05e7f0954418dd5ead15f8bf3146"
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.