create-better-t-stack 3.43.2 → 3.43.4

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-BSgSoI0r.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-DgIDG3dg.mjs";
3
3
  import { lineByLineConsoleLogger } from "trpc-cli";
4
4
  import z from "zod";
5
5
  import { McpServer } from "@modelcontextprotocol/server";
package/dist/index.d.mts CHANGED
@@ -579,7 +579,7 @@ export declare const router: {
579
579
  "vercel-labs/agent-skills": "vercel-labs/agent-skills";
580
580
  "vercel/ai": "vercel/ai";
581
581
  "vercel/turborepo": "vercel/turborepo";
582
- "yusukebe/hono-skill": "yusukebe/hono-skill";
582
+ "honojs/skills": "honojs/skills";
583
583
  "vercel/next.js": "vercel/next.js";
584
584
  "nuxt/ui": "nuxt/ui";
585
585
  "heroui-inc/heroui": "heroui-inc/heroui";
@@ -606,7 +606,6 @@ export declare const router: {
606
606
  oxlint: "oxlint";
607
607
  }>>;
608
608
  editors: z.ZodOptional<z.ZodArray<z.ZodEnum<{
609
- void: "void";
610
609
  antigravity: "antigravity";
611
610
  cursor: "cursor";
612
611
  vscode: "vscode";
@@ -616,6 +615,7 @@ export declare const router: {
616
615
  bob: "bob";
617
616
  codebuddy: "codebuddy";
618
617
  trae: "trae";
618
+ void: "void";
619
619
  kiro: "kiro";
620
620
  }>>>;
621
621
  agents: z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -1094,7 +1094,7 @@ export declare const router: {
1094
1094
  "vercel-labs/agent-skills": "vercel-labs/agent-skills";
1095
1095
  "vercel/ai": "vercel/ai";
1096
1096
  "vercel/turborepo": "vercel/turborepo";
1097
- "yusukebe/hono-skill": "yusukebe/hono-skill";
1097
+ "honojs/skills": "honojs/skills";
1098
1098
  "vercel/next.js": "vercel/next.js";
1099
1099
  "nuxt/ui": "nuxt/ui";
1100
1100
  "heroui-inc/heroui": "heroui-inc/heroui";
@@ -1121,7 +1121,6 @@ export declare const router: {
1121
1121
  oxlint: "oxlint";
1122
1122
  }>>;
1123
1123
  editors: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1124
- void: "void";
1125
1124
  antigravity: "antigravity";
1126
1125
  cursor: "cursor";
1127
1126
  vscode: "vscode";
@@ -1131,6 +1130,7 @@ export declare const router: {
1131
1130
  bob: "bob";
1132
1131
  codebuddy: "codebuddy";
1133
1132
  trae: "trae";
1133
+ void: "void";
1134
1134
  kiro: "kiro";
1135
1135
  }>>>;
1136
1136
  agents: z.ZodOptional<z.ZodArray<z.ZodEnum<{
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-BSgSoI0r.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-DgIDG3dg.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 };
@@ -23,6 +23,7 @@ import * as fs$1 from "node:fs/promises";
23
23
  import { applyEdits, modify, parse } from "jsonc-parser";
24
24
  import os$1 from "node:os";
25
25
  import { clean, coerce, satisfies } from "semver";
26
+ import { ts } from "ts-morph";
26
27
  import { format } from "oxfmt";
27
28
  //#region src/utils/display-config.ts
28
29
  const VALUE_LABELS = {
@@ -1696,6 +1697,10 @@ function parseBtsConfig(content) {
1696
1697
  const errors = [];
1697
1698
  const value = parse(content, errors, { allowTrailingComma: true });
1698
1699
  if (errors.length > 0) throw new Error("Invalid JSONC in bts.jsonc");
1700
+ const selections = value?.addonOptions?.skills?.selections;
1701
+ if (Array.isArray(selections)) {
1702
+ for (const selection of selections) if (selection?.source === "yusukebe/hono-skill") selection.source = "honojs/skills";
1703
+ }
1699
1704
  return BetterTStackConfigSchema.parse(value);
1700
1705
  }
1701
1706
  async function readBtsConfig(projectDir) {
@@ -2381,10 +2386,18 @@ function addSvelteBetterAuthEvlogSetup(content, config) {
2381
2386
  if (!content.includes("authHandle") || content.includes("evlogAuthHandle")) return content;
2382
2387
  let nextContent = addNamedImport(content, "evlog/better-auth", ["createAuthMiddleware", "type BetterAuthInstance"]);
2383
2388
  if (!nextContent.includes("from \"./services\"")) nextContent = prependMissingImports(nextContent, [getAuthImportLine(config, "./services")]);
2384
- if (usesCreateAuthFactory(config) && config.webDeploy === "cloudflare" && !nextContent.includes("from \"./env.server\"")) nextContent = prependMissingImports(nextContent, ["import { env as localEnv } from \"./env.server\";"]);
2389
+ let environmentBinding = "ENV";
2390
+ if (usesCreateAuthFactory(config) && config.webDeploy === "cloudflare") {
2391
+ const environmentImport = ts.createSourceFile("hooks.server.ts", nextContent, ts.ScriptTarget.Latest).statements.filter(ts.isImportDeclaration).filter((statement) => ts.isStringLiteral(statement.moduleSpecifier) && statement.moduleSpecifier.text === "./env.server" && !statement.importClause?.isTypeOnly).flatMap((statement) => {
2392
+ const bindings = statement.importClause?.namedBindings;
2393
+ return bindings && ts.isNamedImports(bindings) ? [...bindings.elements] : [];
2394
+ }).find((specifier) => !specifier.isTypeOnly && ["ENV", "env"].includes((specifier.propertyName ?? specifier.name).text));
2395
+ if (environmentImport) environmentBinding = environmentImport.name.text;
2396
+ else nextContent = prependMissingImports(nextContent, ["import { ENV } from \"./env.server\";"]);
2397
+ }
2385
2398
  const authExpression = getAuthExpression(config);
2386
2399
  const authOptions = "{ exclude: [\"/api/auth/**\"], maskEmail: true }";
2387
- const authHandleSnippet = usesCreateAuthFactory(config) && config.webDeploy === "cloudflare" ? `const evlogAuthHandle: Handle = async ({ event, resolve }) => {\n\tif (building) {\n\t\treturn resolve(event);\n\t}\n\n\tconst authEnv = event.platform?.env ?? localEnv;\n\tconst identifyUser = createAuthMiddleware((await createAuth(authEnv)) as BetterAuthInstance, ${authOptions});\n\tawait identifyUser(event.locals.log, event.request.headers, event.url.pathname);\n\treturn resolve(event);\n};\n\n` : `const identifyUser = createAuthMiddleware(${authExpression} as BetterAuthInstance, ${authOptions});\n\nconst evlogAuthHandle: Handle = async ({ event, resolve }) => {\n\tawait identifyUser(event.locals.log, event.request.headers, event.url.pathname);\n\treturn resolve(event);\n};\n\n`;
2400
+ const authHandleSnippet = usesCreateAuthFactory(config) && config.webDeploy === "cloudflare" ? `const evlogAuthHandle: Handle = async ({ event, resolve }) => {\n\tif (building) {\n\t\treturn resolve(event);\n\t}\n\n\tconst authEnv = event.platform?.env ?? ${environmentBinding};\n\tconst identifyUser = createAuthMiddleware((await createAuth(authEnv)) as BetterAuthInstance, ${authOptions});\n\tawait identifyUser(event.locals.log, event.request.headers, event.url.pathname);\n\treturn resolve(event);\n};\n\n` : `const identifyUser = createAuthMiddleware(${authExpression} as BetterAuthInstance, ${authOptions});\n\nconst evlogAuthHandle: Handle = async ({ event, resolve }) => {\n\tawait identifyUser(event.locals.log, event.request.headers, event.url.pathname);\n\treturn resolve(event);\n};\n\n`;
2388
2401
  const evlogHandleDeclaration = nextContent.match(/const \{ handle: evlogHandle, handleError \} = createEvlogHooks\([\s\S]*?\);\n\n/)?.[0];
2389
2402
  if (evlogHandleDeclaration) nextContent = insertAfterOnce(nextContent, evlogHandleDeclaration, authHandleSnippet, "evlogAuthHandle");
2390
2403
  return nextContent.replace("sequence(evlogHandle as Handle, authHandle)", "sequence(evlogHandle as Handle, evlogAuthHandle, authHandle)").replace("sequence(evlogHandle, authHandle)", "sequence(evlogHandle as Handle, evlogAuthHandle, authHandle)");
@@ -3567,7 +3580,7 @@ const SKILL_SOURCES = {
3567
3580
  "vercel-labs/agent-skills": { label: "Vercel Agent Skills" },
3568
3581
  "vercel/ai": { label: "Vercel AI SDK" },
3569
3582
  "vercel/turborepo": { label: "Turborepo" },
3570
- "yusukebe/hono-skill": { label: "Hono Backend" },
3583
+ "honojs/skills": { label: "Hono Backend" },
3571
3584
  "vercel/next.js": { label: "Next.js" },
3572
3585
  "nuxt/ui": { label: "Nuxt UI" },
3573
3586
  "heroui-inc/heroui": { label: "HeroUI Native" },
@@ -3965,7 +3978,7 @@ function getRecommendedSourceKeys(config) {
3965
3978
  if (orm === "prisma" || dbSetup === "prisma-postgres") sources.push("prisma/skills");
3966
3979
  if (examples.includes("ai")) sources.push("vercel/ai");
3967
3980
  if (addons.includes("turborepo")) sources.push("vercel/turborepo");
3968
- if (backend === "hono") sources.push("yusukebe/hono-skill");
3981
+ if (backend === "hono") sources.push("honojs/skills");
3969
3982
  if (backend === "elysia") sources.push("elysiajs/skills");
3970
3983
  if (backend === "convex") sources.push("waynesutton/convexskills");
3971
3984
  if (addons.includes("opentui")) sources.push("msmps/opentui-skill");
@@ -3983,7 +3996,7 @@ const CURATED_SKILLS_BY_SOURCE = {
3983
3996
  },
3984
3997
  "vercel/ai": () => ["ai-sdk"],
3985
3998
  "vercel/turborepo": () => ["turborepo"],
3986
- "yusukebe/hono-skill": () => ["hono"],
3999
+ "honojs/skills": () => ["hono"],
3987
4000
  "vercel/next.js": () => [
3988
4001
  "next-dev-loop",
3989
4002
  "next-cache-components-adoption",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.43.2",
3
+ "version": "3.43.4",
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.43.2",
74
- "@better-t-stack/types": "^3.43.2",
73
+ "@better-t-stack/template-generator": "^3.43.4",
74
+ "@better-t-stack/types": "^3.43.4",
75
75
  "@clack/core": "^1.5.0",
76
76
  "@clack/prompts": "^1.8.0",
77
77
  "@modelcontextprotocol/server": "2.0.0",