create-better-t-stack 3.0.0 → 3.0.1
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
package/dist/index.js
CHANGED
|
@@ -5255,7 +5255,7 @@ const AVAILABLE_REGIONS = [
|
|
|
5255
5255
|
];
|
|
5256
5256
|
async function setupWithCreateDb(serverDir, packageManager, orm) {
|
|
5257
5257
|
try {
|
|
5258
|
-
log.info("Starting Prisma Postgres setup with create-db.
|
|
5258
|
+
log.info("Starting Prisma Postgres setup with create-db.");
|
|
5259
5259
|
const selectedRegion = await select({
|
|
5260
5260
|
message: "Select your preferred region:",
|
|
5261
5261
|
options: AVAILABLE_REGIONS,
|
|
@@ -5843,13 +5843,11 @@ async function setupDatabase(config, cliInput) {
|
|
|
5843
5843
|
devDependencies: ["prisma"],
|
|
5844
5844
|
projectDir: dbPackageDir
|
|
5845
5845
|
});
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
});
|
|
5852
|
-
}
|
|
5846
|
+
const webDir = path.join(projectDir, "apps/web");
|
|
5847
|
+
if (await fs.pathExists(webDir)) await addPackageDependency({
|
|
5848
|
+
dependencies: ["@prisma/client"],
|
|
5849
|
+
projectDir: webDir
|
|
5850
|
+
});
|
|
5853
5851
|
} else if (orm === "drizzle") {
|
|
5854
5852
|
if (database === "sqlite") await addPackageDependency({
|
|
5855
5853
|
dependencies: ["drizzle-orm", "@libsql/client"],
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
{{#if (eq backend "self")}}
|
|
2
1
|
import { redirect } from "next/navigation";
|
|
3
2
|
import Dashboard from "./dashboard";
|
|
4
3
|
import { headers } from "next/headers";
|
|
@@ -27,42 +26,3 @@ export default async function DashboardPage() {
|
|
|
27
26
|
</div>
|
|
28
27
|
);
|
|
29
28
|
}
|
|
30
|
-
{{else}}
|
|
31
|
-
import { authClient } from "@/lib/auth-client";
|
|
32
|
-
import { redirect } from "next/navigation";
|
|
33
|
-
import Dashboard from "./dashboard";
|
|
34
|
-
import { headers } from "next/headers";
|
|
35
|
-
|
|
36
|
-
export default async function DashboardPage() {
|
|
37
|
-
const session = await authClient.getSession({
|
|
38
|
-
fetchOptions: {
|
|
39
|
-
headers: await headers()
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
if (!session.data) {
|
|
44
|
-
redirect("/login");
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
{{#if (eq payments "polar")}}
|
|
48
|
-
const { data: customerState, error } = await authClient.customer.state({
|
|
49
|
-
fetchOptions: {
|
|
50
|
-
headers: await headers()
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
{{/if}}
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<div>
|
|
57
|
-
<h1>Dashboard</h1>
|
|
58
|
-
<p>Welcome {session.data.user.name}</p>
|
|
59
|
-
<Dashboard
|
|
60
|
-
session={session.data}
|
|
61
|
-
{{#if (eq payments "polar")}}
|
|
62
|
-
customerState={customerState}
|
|
63
|
-
{{/if}}
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
{{/if}}
|