create-better-t-stack 2.45.0 → 2.45.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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { createBtsCli } from "./src-Cve0nldx.js";
2
+ import { createBtsCli } from "./src-ErwDWsqZ.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-Cve0nldx.js";
2
+ import { builder, createBtsCli, docs, init, router, sponsors } from "./src-ErwDWsqZ.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -59,8 +59,8 @@ function getDefaultConfig() {
59
59
  }
60
60
  const DEFAULT_CONFIG = getDefaultConfig();
61
61
  const dependencyVersionMap = {
62
- "better-auth": "^1.3.7",
63
- "@better-auth/expo": "^1.3.7",
62
+ "better-auth": "^1.3.9",
63
+ "@better-auth/expo": "^1.3.9",
64
64
  "@clerk/nextjs": "^6.31.5",
65
65
  "@clerk/clerk-react": "^5.45.0",
66
66
  "@clerk/tanstack-react-start": "^0.23.1",
@@ -5008,25 +5008,6 @@ async function addPrismaAccelerateExtension(serverDir) {
5008
5008
  dependencies: ["@prisma/extension-accelerate"],
5009
5009
  projectDir: serverDir
5010
5010
  });
5011
- const prismaIndexPath = path.join(serverDir, "prisma/index.ts");
5012
- const prismaIndexContent = `
5013
- import { PrismaClient } from "./generated/client";
5014
- import { withAccelerate } from "@prisma/extension-accelerate";
5015
-
5016
- const prisma = new PrismaClient().$extends(withAccelerate());
5017
-
5018
- export default prisma;
5019
- `;
5020
- await fs.writeFile(prismaIndexPath, prismaIndexContent.trim());
5021
- const dbFilePath = path.join(serverDir, "src/db/index.ts");
5022
- if (await fs.pathExists(dbFilePath)) {
5023
- let dbFileContent = await fs.readFile(dbFilePath, "utf8");
5024
- if (!dbFileContent.includes("@prisma/extension-accelerate")) {
5025
- dbFileContent = `import { withAccelerate } from "@prisma/extension-accelerate";\n${dbFileContent}`;
5026
- dbFileContent = dbFileContent.replace("export const db = new PrismaClient();", "export const db = new PrismaClient().$extends(withAccelerate());");
5027
- await fs.writeFile(dbFilePath, dbFileContent);
5028
- }
5029
- }
5030
5011
  return true;
5031
5012
  } catch (_error) {
5032
5013
  log.warn(pc.yellow("Could not add Prisma Accelerate extension automatically"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "2.45.0",
3
+ "version": "2.45.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
  "type": "module",
6
6
  "license": "MIT",
@@ -91,7 +91,12 @@ export const auth = betterAuth({
91
91
  {{#if (eq database "mysql")}}provider: "mysql",{{/if}}
92
92
  schema: schema,
93
93
  }),
94
- trustedOrigins: [env.CORS_ORIGIN],
94
+ trustedOrigins: [
95
+ env.CORS_ORIGIN,
96
+ {{#if (or (includes frontend "native-nativewind") (includes frontend "native-unistyles"))}}
97
+ "mybettertapp://", "exp://"
98
+ {{/if}}
99
+ ],
95
100
  emailAndPassword: {
96
101
  enabled: true,
97
102
  },
@@ -1,5 +1,10 @@
1
1
  import { PrismaClient } from "../../prisma/generated/client";
2
+ {{#if (or (eq dbSetup "prisma-postgres") (eq orm "prisma"))}}
3
+ import { withAccelerate } from "@prisma/extension-accelerate";
2
4
 
5
+ const prisma = new PrismaClient().$extends(withAccelerate());
6
+ {{else}}
3
7
  const prisma = new PrismaClient();
8
+ {{/if}}
4
9
 
5
10
  export default prisma;