create-better-t-stack 3.16.0 → 3.17.0

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 { o as createBtsCli } from "./src-eUnX0gIt.mjs";
2
+ import { o as createBtsCli } from "./src-D5L84uxt.mjs";
3
3
 
4
4
  //#region src/cli.ts
5
5
  createBtsCli().run();
package/dist/index.d.mts CHANGED
@@ -55,6 +55,7 @@ declare const router: {
55
55
  "native-unistyles": "native-unistyles";
56
56
  svelte: "svelte";
57
57
  solid: "solid";
58
+ astro: "astro";
58
59
  }>>>;
59
60
  addons: z.ZodOptional<z.ZodArray<z.ZodEnum<{
60
61
  none: "none";
@@ -142,7 +143,7 @@ declare const router: {
142
143
  orm: "none" | "drizzle" | "prisma" | "mongoose";
143
144
  backend: "none" | "hono" | "express" | "fastify" | "elysia" | "convex" | "self";
144
145
  runtime: "none" | "bun" | "node" | "workers";
145
- frontend: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-bare" | "native-uniwind" | "native-unistyles" | "svelte" | "solid")[];
146
+ frontend: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-bare" | "native-uniwind" | "native-unistyles" | "svelte" | "solid" | "astro")[];
146
147
  addons: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "lefthook" | "husky" | "ruler" | "turborepo" | "fumadocs" | "ultracite" | "oxlint" | "opentui" | "wxt")[];
147
148
  examples: ("none" | "todo" | "ai")[];
148
149
  auth: "none" | "better-auth" | "clerk";
@@ -180,7 +181,7 @@ declare const router: {
180
181
  orm: "none" | "drizzle" | "prisma" | "mongoose";
181
182
  backend: "none" | "hono" | "express" | "fastify" | "elysia" | "convex" | "self";
182
183
  runtime: "none" | "bun" | "node" | "workers";
183
- frontend: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-bare" | "native-uniwind" | "native-unistyles" | "svelte" | "solid")[];
184
+ frontend: ("none" | "tanstack-router" | "react-router" | "tanstack-start" | "next" | "nuxt" | "native-bare" | "native-uniwind" | "native-unistyles" | "svelte" | "solid" | "astro")[];
184
185
  addons: ("none" | "pwa" | "tauri" | "starlight" | "biome" | "lefthook" | "husky" | "ruler" | "turborepo" | "fumadocs" | "ultracite" | "oxlint" | "opentui" | "wxt")[];
185
186
  examples: ("none" | "todo" | "ai")[];
186
187
  auth: "none" | "better-auth" | "clerk";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { a as create, c as docs, d as sponsors, i as builder, l as generateVirtualProject, n as TEMPLATE_COUNT, o as createBtsCli, r as VirtualFileSystem, s as createVirtual, t as EMBEDDED_TEMPLATES, u as router } from "./src-eUnX0gIt.mjs";
2
+ import { a as create, c as docs, d as sponsors, i as builder, l as generateVirtualProject, n as TEMPLATE_COUNT, o as createBtsCli, r as VirtualFileSystem, s as createVirtual, t as EMBEDDED_TEMPLATES, u as router } from "./src-D5L84uxt.mjs";
3
3
 
4
4
  export { EMBEDDED_TEMPLATES, TEMPLATE_COUNT, VirtualFileSystem, builder, create, createBtsCli, createVirtual, docs, generateVirtualProject, router, sponsors };
@@ -190,7 +190,8 @@ const WEB_FRAMEWORKS = [
190
190
  "next",
191
191
  "nuxt",
192
192
  "svelte",
193
- "solid"
193
+ "solid",
194
+ "astro"
194
195
  ];
195
196
 
196
197
  //#endregion
@@ -212,18 +213,19 @@ function ensureSingleWebAndNative(frontends) {
212
213
  const FULLSTACK_FRONTENDS$1 = [
213
214
  "next",
214
215
  "tanstack-start",
215
- "nuxt"
216
+ "nuxt",
217
+ "astro"
216
218
  ];
217
219
  function validateSelfBackendCompatibility(providedFlags, options, config) {
218
220
  const backend = config.backend || options.backend;
219
221
  const frontends = config.frontend || options.frontend || [];
220
222
  if (backend === "self") {
221
223
  const { web, native } = splitFrontends(frontends);
222
- if (!(web.length === 1 && FULLSTACK_FRONTENDS$1.includes(web[0]))) exitWithError("Backend 'self' (fullstack) currently only supports Next.js, TanStack Start, and Nuxt frontends. Please use --frontend next, --frontend tanstack-start, or --frontend nuxt. Support for SvelteKit will be added in a future update.");
224
+ if (!(web.length === 1 && FULLSTACK_FRONTENDS$1.includes(web[0]))) exitWithError("Backend 'self' (fullstack) currently only supports Next.js, TanStack Start, Nuxt, and Astro frontends. Please use --frontend next, --frontend tanstack-start, --frontend nuxt, or --frontend astro. Support for SvelteKit will be added in a future update.");
223
225
  if (native.length > 1) exitWithError("Cannot select multiple native frameworks. Choose only one of: native-bare, native-uniwind, native-unistyles");
224
226
  }
225
227
  const hasFullstackFrontend = frontends.some((f) => FULLSTACK_FRONTENDS$1.includes(f));
226
- if (providedFlags.has("backend") && !hasFullstackFrontend && backend === "self") exitWithError("Backend 'self' (fullstack) currently only supports Next.js, TanStack Start, and Nuxt frontends. Please use --frontend next, --frontend tanstack-start, --frontend nuxt, or choose a different backend. Support for SvelteKit will be added in a future update.");
228
+ if (providedFlags.has("backend") && !hasFullstackFrontend && backend === "self") exitWithError("Backend 'self' (fullstack) currently only supports Next.js, TanStack Start, Nuxt, and Astro frontends. Please use --frontend next, --frontend tanstack-start, --frontend nuxt, --frontend astro, or choose a different backend. Support for SvelteKit will be added in a future update.");
227
229
  }
228
230
  function validateWorkersCompatibility(providedFlags, options, config) {
229
231
  if (providedFlags.has("runtime") && options.runtime === "workers" && config.backend && config.backend !== "hono") exitWithError(`Cloudflare Workers runtime (--runtime workers) is only supported with Hono backend (--backend hono). Current backend: ${config.backend}. Please use '--backend hono' or choose a different runtime.`);
@@ -236,15 +238,17 @@ function validateApiFrontendCompatibility(api, frontends = []) {
236
238
  const includesNuxt = frontends.includes("nuxt");
237
239
  const includesSvelte = frontends.includes("svelte");
238
240
  const includesSolid = frontends.includes("solid");
239
- if ((includesNuxt || includesSvelte || includesSolid) && api === "trpc") exitWithError(`tRPC API is not supported with '${includesNuxt ? "nuxt" : includesSvelte ? "svelte" : "solid"}' frontend. Please use --api orpc or --api none or remove '${includesNuxt ? "nuxt" : includesSvelte ? "svelte" : "solid"}' from --frontend.`);
241
+ const includesAstro = frontends.includes("astro");
242
+ if ((includesNuxt || includesSvelte || includesSolid || includesAstro) && api === "trpc") exitWithError(`tRPC API is not supported with '${includesNuxt ? "nuxt" : includesSvelte ? "svelte" : includesSolid ? "solid" : "astro"}' frontend. Please use --api orpc or --api none or remove '${includesNuxt ? "nuxt" : includesSvelte ? "svelte" : includesSolid ? "solid" : "astro"}' from --frontend.`);
240
243
  }
241
244
  function isFrontendAllowedWithBackend(frontend, backend, auth) {
242
- if (backend === "convex" && frontend === "solid") return false;
245
+ if (backend === "convex" && (frontend === "solid" || frontend === "astro")) return false;
243
246
  if (auth === "clerk" && backend === "convex") {
244
247
  if ([
245
248
  "nuxt",
246
249
  "svelte",
247
- "solid"
250
+ "solid",
251
+ "astro"
248
252
  ].includes(frontend)) return false;
249
253
  }
250
254
  return true;
@@ -253,12 +257,13 @@ function allowedApisForFrontends(frontends = []) {
253
257
  const includesNuxt = frontends.includes("nuxt");
254
258
  const includesSvelte = frontends.includes("svelte");
255
259
  const includesSolid = frontends.includes("solid");
260
+ const includesAstro = frontends.includes("astro");
256
261
  const base = [
257
262
  "trpc",
258
263
  "orpc",
259
264
  "none"
260
265
  ];
261
- if (includesNuxt || includesSvelte || includesSolid) return ["orpc", "none"];
266
+ if (includesNuxt || includesSvelte || includesSolid || includesAstro) return ["orpc", "none"];
262
267
  return base;
263
268
  }
264
269
  function isExampleTodoAllowed(backend, database, api) {
@@ -267,7 +272,9 @@ function isExampleTodoAllowed(backend, database, api) {
267
272
  return true;
268
273
  }
269
274
  function isExampleAIAllowed(backend, frontends = []) {
270
- if (frontends.includes("solid")) return false;
275
+ const includesSolid = frontends.includes("solid");
276
+ const includesAstro = frontends.includes("astro");
277
+ if (includesSolid || includesAstro) return false;
271
278
  if (backend === "convex") {
272
279
  const includesNuxt = frontends.includes("nuxt");
273
280
  const includesSvelte = frontends.includes("svelte");
@@ -778,11 +785,12 @@ async function getAuthChoice(auth, backend, frontend) {
778
785
  const FULLSTACK_FRONTENDS = [
779
786
  "next",
780
787
  "tanstack-start",
781
- "nuxt"
788
+ "nuxt",
789
+ "astro"
782
790
  ];
783
791
  async function getBackendFrameworkChoice(backendFramework, frontends) {
784
792
  if (backendFramework !== void 0) return backendFramework;
785
- const hasIncompatibleFrontend = frontends?.some((f) => f === "solid");
793
+ const hasIncompatibleFrontend = frontends?.some((f) => f === "solid" || f === "astro");
786
794
  const hasFullstackFrontend = frontends?.some((f) => FULLSTACK_FRONTENDS.includes(f));
787
795
  const backendOptions = [];
788
796
  if (hasFullstackFrontend) backendOptions.push({
@@ -1054,6 +1062,11 @@ async function getFrontendChoice(frontendOptions, backend, auth) {
1054
1062
  label: "Solid",
1055
1063
  hint: "Simple and performant reactivity for building user interfaces"
1056
1064
  },
1065
+ {
1066
+ value: "astro",
1067
+ label: "Astro",
1068
+ hint: "The web framework for content-driven websites"
1069
+ },
1057
1070
  {
1058
1071
  value: "tanstack-start",
1059
1072
  label: "TanStack Start",
@@ -1923,7 +1936,7 @@ function validateBackendConstraints(config, providedFlags, options) {
1923
1936
  if (providedFlags.has("runtime") && options.runtime === "none") exitWithError("'--runtime none' is only supported with '--backend convex', '--backend none', or '--backend self'. Please choose 'bun', 'node', or remove the --runtime flag.");
1924
1937
  }
1925
1938
  if (backend === "convex" && providedFlags.has("frontend") && options.frontend) {
1926
- const incompatibleFrontends = options.frontend.filter((f) => f === "solid");
1939
+ const incompatibleFrontends = options.frontend.filter((f) => f === "solid" || f === "astro");
1927
1940
  if (incompatibleFrontends.length > 0) exitWithError(`The following frontends are not compatible with '--backend convex': ${incompatibleFrontends.join(", ")}. Please choose a different frontend or backend.`);
1928
1941
  }
1929
1942
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.16.0",
3
+ "version": "3.17.0",
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.16.0",
74
- "@better-t-stack/types": "^3.16.0",
73
+ "@better-t-stack/template-generator": "^3.17.0",
74
+ "@better-t-stack/types": "^3.17.0",
75
75
  "@clack/core": "^0.5.0",
76
76
  "@clack/prompts": "^1.0.0-alpha.8",
77
77
  "@orpc/server": "^1.13.0",