create-better-t-stack 2.40.0 → 2.40.1

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-DO2f6nII.js";
2
+ import { createBtsCli } from "./src-DCgC3MR2.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-DO2f6nII.js";
2
+ import { builder, createBtsCli, docs, init, router, sponsors } from "./src-DCgC3MR2.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -1233,23 +1233,6 @@ async function gatherConfig(flags, projectName, projectDir, relativePath) {
1233
1233
  packageManager: () => getPackageManagerChoice(flags.packageManager),
1234
1234
  install: () => getinstallChoice(flags.install)
1235
1235
  }, { onCancel: () => exitCancelled("Operation cancelled") });
1236
- if (result.backend === "convex") {
1237
- result.runtime = "none";
1238
- result.database = "none";
1239
- result.orm = "none";
1240
- result.api = "none";
1241
- result.dbSetup = "none";
1242
- result.examples = ["todo"];
1243
- }
1244
- if (result.backend === "none") {
1245
- result.runtime = "none";
1246
- result.database = "none";
1247
- result.orm = "none";
1248
- result.api = "none";
1249
- result.auth = "none";
1250
- result.dbSetup = "none";
1251
- result.examples = [];
1252
- }
1253
1236
  return {
1254
1237
  projectName,
1255
1238
  projectDir,
@@ -1694,6 +1677,30 @@ function validateDatabaseSetup(config, providedFlags) {
1694
1677
  }
1695
1678
  }
1696
1679
  }
1680
+ function validateConvexConstraints(config, providedFlags) {
1681
+ const { backend } = config;
1682
+ if (backend !== "convex") return;
1683
+ const has = (k) => providedFlags.has(k);
1684
+ if (has("runtime") && config.runtime !== "none") exitWithError("Convex backend requires '--runtime none'. Please remove the --runtime flag or set it to 'none'.");
1685
+ if (has("database") && config.database !== "none") exitWithError("Convex backend requires '--database none'. Please remove the --database flag or set it to 'none'.");
1686
+ if (has("orm") && config.orm !== "none") exitWithError("Convex backend requires '--orm none'. Please remove the --orm flag or set it to 'none'.");
1687
+ if (has("api") && config.api !== "none") exitWithError("Convex backend requires '--api none'. Please remove the --api flag or set it to 'none'.");
1688
+ if (has("dbSetup") && config.dbSetup !== "none") exitWithError("Convex backend requires '--db-setup none'. Please remove the --db-setup flag or set it to 'none'.");
1689
+ if (has("serverDeploy") && config.serverDeploy !== "none") exitWithError("Convex backend requires '--server-deploy none'. Please remove the --server-deploy flag or set it to 'none'.");
1690
+ if (has("auth") && config.auth === "better-auth") exitWithError("Better-Auth is not compatible with Convex backend. Please use '--auth clerk' or '--auth none'.");
1691
+ }
1692
+ function validateBackendNoneConstraints(config, providedFlags) {
1693
+ const { backend } = config;
1694
+ if (backend !== "none") return;
1695
+ const has = (k) => providedFlags.has(k);
1696
+ if (has("runtime") && config.runtime !== "none") exitWithError("Backend 'none' requires '--runtime none'. Please remove the --runtime flag or set it to 'none'.");
1697
+ if (has("database") && config.database !== "none") exitWithError("Backend 'none' requires '--database none'. Please remove the --database flag or set it to 'none'.");
1698
+ if (has("orm") && config.orm !== "none") exitWithError("Backend 'none' requires '--orm none'. Please remove the --orm flag or set it to 'none'.");
1699
+ if (has("api") && config.api !== "none") exitWithError("Backend 'none' requires '--api none'. Please remove the --api flag or set it to 'none'.");
1700
+ if (has("auth") && config.auth !== "none") exitWithError("Backend 'none' requires '--auth none'. Please remove the --auth flag or set it to 'none'.");
1701
+ if (has("dbSetup") && config.dbSetup !== "none") exitWithError("Backend 'none' requires '--db-setup none'. Please remove the --db-setup flag or set it to 'none'.");
1702
+ if (has("serverDeploy") && config.serverDeploy !== "none") exitWithError("Backend 'none' requires '--server-deploy none'. Please remove the --server-deploy flag or set it to 'none'.");
1703
+ }
1697
1704
  function validateBackendConstraints(config, providedFlags, options) {
1698
1705
  const { backend } = config;
1699
1706
  if (config.auth === "clerk" && backend !== "convex") exitWithError("Clerk authentication is only supported with the Convex backend. Please use '--backend convex' or choose a different auth provider.");
@@ -1705,7 +1712,6 @@ function validateBackendConstraints(config, providedFlags, options) {
1705
1712
  ].includes(f));
1706
1713
  if (incompatibleFrontends.length > 0) exitWithError(`Clerk authentication is not compatible with the following frontends: ${incompatibleFrontends.join(", ")}. Please choose a different frontend or auth provider.`);
1707
1714
  }
1708
- if (backend === "convex" && config.auth === "better-auth" && providedFlags.has("auth")) exitWithError("Better-Auth is not compatible with the Convex backend. Please use '--auth clerk' or '--auth none'.");
1709
1715
  if (providedFlags.has("backend") && backend && backend !== "convex" && backend !== "none") {
1710
1716
  if (providedFlags.has("runtime") && options.runtime === "none") exitWithError("'--runtime none' is only supported with '--backend convex' or '--backend none'. Please choose 'bun', 'node', or remove the --runtime flag.");
1711
1717
  }
@@ -1731,6 +1737,8 @@ function validateApiConstraints(config, options) {
1731
1737
  function validateFullConfig(config, providedFlags, options) {
1732
1738
  validateDatabaseOrmAuth(config, providedFlags);
1733
1739
  validateDatabaseSetup(config, providedFlags);
1740
+ validateConvexConstraints(config, providedFlags);
1741
+ validateBackendNoneConstraints(config, providedFlags);
1734
1742
  validateBackendConstraints(config, providedFlags, options);
1735
1743
  validateFrontendConstraints(config, providedFlags);
1736
1744
  validateApiConstraints(config, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "2.40.0",
3
+ "version": "2.40.1",
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",