create-better-t-stack 3.1.3 → 3.1.4-canary.78f76984
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-Do-jrPff.js} +7 -3
- 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/templates/frontend/native/nativewind/metro.config.js.hbs +5 -24
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1388,7 +1388,7 @@ const getLatestCLIVersion = () => {
|
|
|
1388
1388
|
*/
|
|
1389
1389
|
function isTelemetryEnabled() {
|
|
1390
1390
|
const BTS_TELEMETRY_DISABLED = process.env.BTS_TELEMETRY_DISABLED;
|
|
1391
|
-
const BTS_TELEMETRY = "
|
|
1391
|
+
const BTS_TELEMETRY = "0";
|
|
1392
1392
|
if (BTS_TELEMETRY_DISABLED !== void 0) return BTS_TELEMETRY_DISABLED !== "1";
|
|
1393
1393
|
if (BTS_TELEMETRY !== void 0) return BTS_TELEMETRY === "1";
|
|
1394
1394
|
return true;
|
|
@@ -1396,8 +1396,8 @@ function isTelemetryEnabled() {
|
|
|
1396
1396
|
|
|
1397
1397
|
//#endregion
|
|
1398
1398
|
//#region src/utils/analytics.ts
|
|
1399
|
-
const POSTHOG_API_KEY = "
|
|
1400
|
-
const POSTHOG_HOST = "
|
|
1399
|
+
const POSTHOG_API_KEY = "random";
|
|
1400
|
+
const POSTHOG_HOST = "random";
|
|
1401
1401
|
function generateSessionId() {
|
|
1402
1402
|
const rand = Math.random().toString(36).slice(2);
|
|
1403
1403
|
return `cli_${Date.now().toString(36)}${rand}`;
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4-canary.78f76984",
|
|
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",
|
|
@@ -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
|
|
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
2
2
|
const { getDefaultConfig } = require("expo/metro-config");
|
|
3
|
-
const { FileStore } = require("metro-cache");
|
|
4
3
|
const { withNativeWind } = require("nativewind/metro");
|
|
5
|
-
const path = require("node:path");
|
|
6
4
|
|
|
7
|
-
const config =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}),
|
|
12
|
-
);
|
|
5
|
+
const config = withNativeWind(getDefaultConfig(__dirname), {
|
|
6
|
+
input: "./global.css",
|
|
7
|
+
configPath: "./tailwind.config.js",
|
|
8
|
+
});
|
|
13
9
|
|
|
14
10
|
config.resolver.unstable_enablePackageExports = true;
|
|
15
11
|
|
|
16
|
-
module.exports = config;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Move the Metro cache to the `.cache/metro` folder.
|
|
20
|
-
* If you have any environment variables, you can configure Turborepo to invalidate it when needed.
|
|
21
|
-
*
|
|
22
|
-
* @see https://turbo.build/repo/docs/reference/configuration#env
|
|
23
|
-
* @param {import('expo/metro-config').MetroConfig} config
|
|
24
|
-
* @returns {import('expo/metro-config').MetroConfig}
|
|
25
|
-
*/
|
|
26
|
-
function withTurborepoManagedCache(config) {
|
|
27
|
-
config.cacheStores = [
|
|
28
|
-
new FileStore({ root: path.join(__dirname, ".cache/metro") }),
|
|
29
|
-
];
|
|
30
|
-
return config;
|
|
31
|
-
}
|
|
12
|
+
module.exports = config;
|