create-better-t-stack 3.2.15 → 3.2.16
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-_Zzj4V0r.js → src-DJUohHTZ.js} +2 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
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-
|
|
2
|
+
import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-DJUohHTZ.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,
|
|
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.
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.16",
|
|
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",
|