create-better-t-stack 3.44.0 → 3.44.2

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { D as setProcessMode, i as SchemaNameSchema, l as create, m as getSchemaResult, s as add, u as createBtsCli, v as types_exports, y as getLatestCLIVersion } from "./src-DyelC0q-.mjs";
2
+ import { D as setProcessMode, i as SchemaNameSchema, l as create, m as getSchemaResult, s as add, u as createBtsCli, v as types_exports, y as getLatestCLIVersion } from "./src-DWTrkxVq.mjs";
3
3
  import { lineByLineConsoleLogger } from "trpc-cli";
4
4
  import z from "zod";
5
5
  import { McpServer } from "@modelcontextprotocol/server";
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { C as DirectoryConflictError, E as ValidationError, S as DatabaseSetupError, T as UserCancelledError, _ as ProjectLauncherSchema, a as TEMPLATE_COUNT, b as CLIError, c as builder, d as createVirtual, f as docs, g as sponsors, h as router, i as SchemaNameSchema, l as create, m as getSchemaResult, n as GeneratorError, o as VirtualFileSystem, p as generate, r as Result, s as add, t as EMBEDDED_TEMPLATES, u as createBtsCli, w as ProjectCreationError, x as CompatibilityError } from "./src-DyelC0q-.mjs";
2
+ import { C as DirectoryConflictError, E as ValidationError, S as DatabaseSetupError, T as UserCancelledError, _ as ProjectLauncherSchema, a as TEMPLATE_COUNT, b as CLIError, c as builder, d as createVirtual, f as docs, g as sponsors, h as router, i as SchemaNameSchema, l as create, m as getSchemaResult, n as GeneratorError, o as VirtualFileSystem, p as generate, r as Result, s as add, t as EMBEDDED_TEMPLATES, u as createBtsCli, w as ProjectCreationError, x as CompatibilityError } from "./src-DWTrkxVq.mjs";
3
3
  export { CLIError, CompatibilityError, DatabaseSetupError, DirectoryConflictError, EMBEDDED_TEMPLATES, GeneratorError, ProjectCreationError, ProjectLauncherSchema, Result, SchemaNameSchema, TEMPLATE_COUNT, UserCancelledError, ValidationError, VirtualFileSystem, add, builder, create, createBtsCli, createVirtual, docs, generate, getSchemaResult, router, sponsors };
@@ -11,7 +11,7 @@ import path from "node:path";
11
11
  import envPaths from "env-paths";
12
12
  import fs from "fs-extra";
13
13
  import { fileURLToPath } from "node:url";
14
- import { EMBEDDED_TEMPLATES, EMBEDDED_TEMPLATES as EMBEDDED_TEMPLATES$1, GeneratorError, GeneratorError as GeneratorError$1, TEMPLATE_COUNT, VirtualFileSystem, VirtualFileSystem as VirtualFileSystem$1, dependencyVersionMap, generate, generate as generate$1, generateReproducibleCommand, processAddonTemplates, processAddonsDeps, processNxConfig, processPackageConfigs, processPwaPlugins, processTemplateString, processTurboConfig, processVitePlusConfig } from "@better-t-stack/template-generator";
14
+ import { EMBEDDED_TEMPLATES, EMBEDDED_TEMPLATES as EMBEDDED_TEMPLATES$1, GeneratorError, GeneratorError as GeneratorError$1, TEMPLATE_COUNT, VirtualFileSystem, VirtualFileSystem as VirtualFileSystem$1, dependencyVersionMap, generate, generate as generate$1, generateReproducibleCommand, processAddonTemplates, processAddonsDeps, processNpmScriptApprovals, processNxConfig, processPackageConfigs, processPnpmWorkspaceConfig, processPwaPlugins, processTemplateString, processTurboConfig, processVitePlusConfig } from "@better-t-stack/template-generator";
15
15
  import { BetterTStackConfigSchema, CONVEX_AI_INCOMPATIBLE_FRONTENDS, CONVEX_BETTER_AUTH_INCOMPATIBLE_FRONTENDS, CONVEX_BETTER_AUTH_SUPPORTED_FRONTENDS, FULLSTACK_FRONTENDS, OBSERVABILITY_ADDONS, OBSERVABILITY_ADDONS as OBSERVABILITY_ADDONS$1, SERVER_BACKENDS, TASK_RUNNER_ADDONS, TASK_RUNNER_ADDONS as TASK_RUNNER_ADDONS$1, TRPC_INCOMPATIBLE_FRONTENDS, allowedApisForFrontends, allowedApisForFrontends as allowedApisForFrontends$1, getBackendDisabledOptions, getDesktopDeployConflict, hasCloudflareNextPostgresConflict, isExampleAIAllowed, isExampleAIAllowed as isExampleAIAllowed$1, isExampleTodoAllowed, isExampleTodoAllowed as isExampleTodoAllowed$1, isFrontendAllowedWithBackend, isFrontendAllowedWithBackend as isFrontendAllowedWithBackend$1, supportsClerkBackend, supportsClerkFrontend, supportsConvexBetterAuth, supportsDatabaseSetup, supportsDatabaseSetupRuntime, supportsOrmDatabase, supportsPaymentsAuth, supportsPrismaWebDeploy, supportsPrismaWebDeploy as supportsPrismaWebDeploy$1, supportsRuntimeBackend, supportsRuntimeDatabase, supportsServerDeployRuntime, usesAlchemyManagedDatabase, validateAddonCompatibility, validateAddonCompatibility as validateAddonCompatibility$1, webFrontends } from "@better-t-stack/types";
16
16
  import { ConfirmPrompt, GroupMultiSelectPrompt, MultiSelectPrompt, SelectPrompt, isCancel as isCancel$1, wrapTextWithPrefix } from "@clack/core";
17
17
  import { consola, createConsola } from "consola";
@@ -1108,7 +1108,7 @@ function validateDockerServerDeploy(serverDeploy, backend, runtime) {
1108
1108
  function validateVercelServerDeploy(serverDeploy, backend, runtime) {
1109
1109
  if (serverDeploy !== "vercel") return Result.ok(void 0);
1110
1110
  if (backend && backend !== "none" && !SERVER_BACKENDS.includes(backend)) return validationErr$1("'--server-deploy vercel' requires a separate server backend (hono, express, fastify, elysia). For a fullstack 'self' backend, use '--web-deploy vercel' instead.");
1111
- if (runtime && !supportsServerDeployRuntime(serverDeploy, runtime)) return validationErr$1("'--server-deploy vercel' is not compatible with '--runtime workers'. Use '--runtime bun' or '--runtime node', or choose '--server-deploy cloudflare'.");
1111
+ if (runtime && !supportsServerDeployRuntime(serverDeploy, runtime)) return validationErr$1(`'--server-deploy vercel' is not compatible with '--runtime ${runtime}'. Use '--runtime node'. Bun remains supported as a package manager.`);
1112
1112
  return Result.ok(void 0);
1113
1113
  }
1114
1114
  function validatePrismaServerDeploy(serverDeploy, backend, runtime) {
@@ -4952,6 +4952,7 @@ const ADD_PACKAGE_JSON_PATHS = [
4952
4952
  "packages/ui/package.json"
4953
4953
  ];
4954
4954
  const ADD_TEXT_FILE_PATHS = [
4955
+ "pnpm-workspace.yaml",
4955
4956
  "apps/web/vite.config.ts",
4956
4957
  "apps/web/next.config.ts",
4957
4958
  "apps/web/src/Document.tsx",
@@ -5236,6 +5237,8 @@ async function addHandlerInternal(input) {
5236
5237
  await processAddonTemplates(vfs, EMBEDDED_TEMPLATES, config);
5237
5238
  processAddonsDeps(vfs, config);
5238
5239
  processPwaPlugins(vfs, config);
5240
+ processPnpmWorkspaceConfig(vfs, updatedConfig);
5241
+ processNpmScriptApprovals(vfs, updatedConfig);
5239
5242
  if (addonsToAdd.includes("turborepo")) processTurboConfig(vfs, updatedConfig);
5240
5243
  if (addonsToAdd.includes("nx")) processNxConfig(vfs, updatedConfig);
5241
5244
  if (addonsToAdd.includes("vite-plus")) processVitePlusConfig(vfs, updatedConfig);
@@ -6193,7 +6196,7 @@ async function getServerDeploymentChoice(deployment, runtime, backend, _webDeplo
6193
6196
  "docker",
6194
6197
  "vercel",
6195
6198
  "none"
6196
- ].map((deploy) => {
6199
+ ].filter((deploy) => supportsServerDeployRuntime(deploy, runtime)).map((deploy) => {
6197
6200
  const { label, hint } = deploy === "none" ? {
6198
6201
  label: "None",
6199
6202
  hint: "Skip deployment setup"
@@ -7167,6 +7170,7 @@ function processFlags(options, projectName) {
7167
7170
  if (options.git !== void 0) config.git = options.git;
7168
7171
  if (options.install !== void 0) config.install = options.install;
7169
7172
  if (options.runtime) config.runtime = options.runtime;
7173
+ else if (options.serverDeploy === "vercel") config.runtime = "node";
7170
7174
  if (options.dbSetup) config.dbSetup = options.dbSetup;
7171
7175
  if (options.packageManager) config.packageManager = options.packageManager;
7172
7176
  if (options.webDeploy) config.webDeploy = options.webDeploy;
@@ -9831,7 +9835,7 @@ async function createVirtual(options) {
9831
9835
  database: virtualOptions.database || "none",
9832
9836
  orm: virtualOptions.orm || "none",
9833
9837
  backend: virtualOptions.backend || "hono",
9834
- runtime: virtualOptions.runtime || "bun",
9838
+ runtime: virtualOptions.runtime || (virtualOptions.serverDeploy === "vercel" ? "node" : "bun"),
9835
9839
  frontend: virtualOptions.frontend || ["tanstack-router"],
9836
9840
  addons: virtualOptions.addons || [],
9837
9841
  examples: virtualOptions.examples || [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.44.0",
3
+ "version": "3.44.2",
4
4
  "description": "A modern CLI tool for scaffolding end-to-end type-safe TypeScript projects with best practices and customizable configurations",
5
5
  "keywords": [
6
6
  "better-auth",
@@ -70,8 +70,8 @@
70
70
  "prepublishOnly": "npm run build"
71
71
  },
72
72
  "dependencies": {
73
- "@better-t-stack/template-generator": "^3.44.0",
74
- "@better-t-stack/types": "^3.44.0",
73
+ "@better-t-stack/template-generator": "^3.44.2",
74
+ "@better-t-stack/types": "^3.44.2",
75
75
  "@clack/core": "^1.5.0",
76
76
  "@clack/prompts": "^1.8.0",
77
77
  "@modelcontextprotocol/server": "2.0.0",