create-better-t-stack 3.1.3 → 3.1.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.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-D7wibHPZ.js → src-DfqHfdEO.js} +4 -0
- package/package.json +1 -1
- package/templates/db/drizzle/mysql/src/index.ts.hbs +8 -0
- package/templates/db/drizzle/postgres/src/index.ts.hbs +8 -0
- package/templates/db/drizzle/sqlite/src/index.ts.hbs +8 -0
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -4396,6 +4396,10 @@ async function setupBetterAuthPlugins(projectDir, config) {
|
|
|
4396
4396
|
pluginsToAdd.push("reactStartCookies()");
|
|
4397
4397
|
importsToAdd.push("import { reactStartCookies } from \"better-auth/react-start\";");
|
|
4398
4398
|
}
|
|
4399
|
+
if (config.backend === "self" && config.frontend?.includes("next")) {
|
|
4400
|
+
pluginsToAdd.push("nextCookies()");
|
|
4401
|
+
importsToAdd.push("import { nextCookies } from \"better-auth/next-js\";");
|
|
4402
|
+
}
|
|
4399
4403
|
if (config.frontend?.includes("native-nativewind") || config.frontend?.includes("native-unistyles")) {
|
|
4400
4404
|
pluginsToAdd.push("expo()");
|
|
4401
4405
|
importsToAdd.push("import { expo } from \"@better-auth/expo\";");
|
package/package.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{{#if (or (eq runtime "bun") (eq runtime "node") (eq runtime "none"))}}
|
|
2
|
+
{{#if (and (ne backend "self") (includes frontend "next"))}}
|
|
3
|
+
import dotenv from "dotenv";
|
|
4
|
+
|
|
5
|
+
dotenv.config({
|
|
6
|
+
path: "../../apps/server/.env",
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
{{/if}}
|
|
2
10
|
{{#if (eq dbSetup "planetscale")}}
|
|
3
11
|
import { drizzle } from "drizzle-orm/planetscale-serverless";
|
|
4
12
|
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{{#if (or (eq runtime "bun") (eq runtime "node") (eq runtime "none"))}}
|
|
2
|
+
{{#if (and (ne backend "self") (includes frontend "next"))}}
|
|
3
|
+
import dotenv from "dotenv";
|
|
4
|
+
|
|
5
|
+
dotenv.config({
|
|
6
|
+
path: "../../apps/server/.env",
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
{{/if}}
|
|
2
10
|
{{#if (eq dbSetup "neon")}}
|
|
3
11
|
import { neon, neonConfig } from '@neondatabase/serverless';
|
|
4
12
|
import { drizzle } from 'drizzle-orm/neon-http';
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{{#if (or (eq runtime "bun") (eq runtime "node") (eq runtime "none"))}}
|
|
2
|
+
{{#if (and (ne backend "self") (includes frontend "next"))}}
|
|
3
|
+
import dotenv from "dotenv";
|
|
4
|
+
|
|
5
|
+
dotenv.config({
|
|
6
|
+
path: "../../apps/server/.env",
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
{{/if}}
|
|
2
10
|
import { drizzle } from "drizzle-orm/libsql";
|
|
3
11
|
import { createClient } from "@libsql/client";
|
|
4
12
|
|