create-better-t-stack 3.2.15 → 3.2.17

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 { n as createBtsCli } from "./src-_Zzj4V0r.js";
2
+ import { n as createBtsCli } from "./src-DZl9QEGL.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 { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-_Zzj4V0r.js";
2
+ import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-DZl9QEGL.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -363,7 +363,6 @@ function validateWorkersCompatibility(providedFlags, options, config) {
363
363
  if (providedFlags.has("runtime") && options.runtime === "workers" && config.database === "mongodb") exitWithError("Cloudflare Workers runtime (--runtime workers) is not compatible with MongoDB database. MongoDB requires Prisma or Mongoose ORM, but Workers runtime only supports Drizzle or Prisma ORM. Please use a different database or runtime.");
364
364
  if (providedFlags.has("runtime") && options.runtime === "workers" && config.dbSetup === "docker") exitWithError("Cloudflare Workers runtime (--runtime workers) is not compatible with Docker setup. Workers runtime uses serverless databases (D1) and doesn't support local Docker containers. Please use '--db-setup d1' for SQLite or choose a different runtime.");
365
365
  if (providedFlags.has("database") && config.database === "mongodb" && config.runtime === "workers") exitWithError("MongoDB database is not compatible with Cloudflare Workers runtime. MongoDB requires Prisma or Mongoose ORM, but Workers runtime only supports Drizzle or Prisma ORM. Please use a different database or runtime.");
366
- if (providedFlags.has("dbSetup") && options.dbSetup === "docker" && config.runtime === "workers") exitWithError("Docker setup (--db-setup docker) is not compatible with Cloudflare Workers runtime. Workers runtime uses serverless databases (D1) and doesn't support local Docker containers. Please use '--db-setup d1' for SQLite or choose a different runtime.");
367
366
  }
368
367
  function validateApiFrontendCompatibility(api, frontends = []) {
369
368
  const includesNuxt = frontends.includes("nuxt");
@@ -615,7 +614,7 @@ async function getApiChoice(Api, frontend, backend) {
615
614
 
616
615
  //#endregion
617
616
  //#region src/prompts/auth.ts
618
- async function getAuthChoice(auth, hasDatabase, backend, frontend) {
617
+ async function getAuthChoice(auth, backend, frontend) {
619
618
  if (auth !== void 0) return auth;
620
619
  if (backend === "convex") {
621
620
  const supportedBetterAuthFrontends = frontend?.some((f) => [
@@ -657,7 +656,6 @@ async function getAuthChoice(auth, hasDatabase, backend, frontend) {
657
656
  if (isCancel(response$1)) return exitCancelled("Operation cancelled");
658
657
  return response$1;
659
658
  }
660
- if (!hasDatabase) return "none";
661
659
  const response = await select({
662
660
  message: "Select authentication provider",
663
661
  options: [{
@@ -1275,7 +1273,7 @@ async function gatherConfig(flags, projectName, projectDir, relativePath) {
1275
1273
  database: ({ results }) => getDatabaseChoice(flags.database, results.backend, results.runtime),
1276
1274
  orm: ({ results }) => getORMChoice(flags.orm, results.database !== "none", results.database, results.backend, results.runtime),
1277
1275
  api: ({ results }) => getApiChoice(flags.api, results.frontend, results.backend),
1278
- auth: ({ results }) => getAuthChoice(flags.auth, results.database !== "none", results.backend, results.frontend),
1276
+ auth: ({ results }) => getAuthChoice(flags.auth, results.backend, results.frontend),
1279
1277
  payments: ({ results }) => getPaymentsChoice(flags.payments, results.auth, results.backend, results.frontend),
1280
1278
  addons: ({ results }) => getAddonsChoice(flags.addons, results.frontend, results.auth),
1281
1279
  examples: ({ results }) => getExamplesChoice(flags.examples, results.database, results.frontend, results.backend, results.api),
@@ -1672,9 +1670,6 @@ function validateDatabaseOrmAuth(cfg, flags) {
1672
1670
  if (has("database") && has("orm") && db === "mongodb" && orm && orm !== "mongoose" && orm !== "prisma" && orm !== "none") exitWithError("MongoDB database requires Mongoose or Prisma ORM. Please use '--orm mongoose' or '--orm prisma' or choose a different database.");
1673
1671
  if (has("database") && has("orm") && db && db !== "none" && orm === "none") exitWithError("Database selection requires an ORM. Please choose '--orm drizzle', '--orm prisma', or '--orm mongoose'.");
1674
1672
  if (has("orm") && has("database") && orm && orm !== "none" && db === "none") exitWithError("ORM selection requires a database. Please choose a database or set '--orm none'.");
1675
- if (has("auth") && has("database") && cfg.auth !== "none" && db === "none" && cfg.backend !== "convex") exitWithError("Authentication requires a database. Please choose a database or set '--auth none'.");
1676
- if (cfg.auth !== "none" && db === "none" && cfg.backend !== "convex") exitWithError("Authentication requires a database. Please choose a database or set '--auth none'.");
1677
- if (orm && orm !== "none" && db === "none") exitWithError("ORM selection requires a database. Please choose a database or set '--orm none'.");
1678
1673
  }
1679
1674
  function validateDatabaseSetup(config, providedFlags) {
1680
1675
  const { dbSetup, database, runtime } = config;
@@ -6072,7 +6067,7 @@ function generateReadmeContent(options) {
6072
6067
  const hasReactRouter = frontend.includes("react-router");
6073
6068
  const hasNative = frontend.includes("native-nativewind") || frontend.includes("native-unistyles");
6074
6069
  const hasSvelte = frontend.includes("svelte");
6075
- const packageManagerRunCmd = packageManager === "npm" ? "npm run" : packageManager;
6070
+ const packageManagerRunCmd = `${packageManager} run`;
6076
6071
  let webPort = "3001";
6077
6072
  if (hasReactRouter || hasSvelte) webPort = "5173";
6078
6073
  const stackDescription = generateStackDescription(frontend, backend, api, isConvex);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.2.15",
3
+ "version": "3.2.17",
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",