create-better-t-stack 3.0.6 → 3.0.8
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
|
@@ -6591,21 +6591,23 @@ async function setupWorkspaceDependencies(projectDir, options) {
|
|
|
6591
6591
|
projectDir: apiPackageDir
|
|
6592
6592
|
});
|
|
6593
6593
|
const serverPackageDir = path.join(projectDir, "apps/server");
|
|
6594
|
-
if (await fs.pathExists(serverPackageDir))
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6594
|
+
if (await fs.pathExists(serverPackageDir)) {
|
|
6595
|
+
const serverDeps = {};
|
|
6596
|
+
if (await fs.pathExists(apiPackageDir)) serverDeps[`@${projectName}/api`] = workspaceVersion;
|
|
6597
|
+
if (await fs.pathExists(authPackageDir)) serverDeps[`@${projectName}/auth`] = workspaceVersion;
|
|
6598
|
+
if (await fs.pathExists(dbPackageDir)) serverDeps[`@${projectName}/db`] = workspaceVersion;
|
|
6599
|
+
await addPackageDependency({
|
|
6600
|
+
dependencies: commonDeps,
|
|
6601
|
+
devDependencies: commonDevDeps,
|
|
6602
|
+
customDependencies: serverDeps,
|
|
6603
|
+
projectDir: serverPackageDir
|
|
6604
|
+
});
|
|
6605
|
+
}
|
|
6604
6606
|
const webPackageDir = path.join(projectDir, "apps/web");
|
|
6605
6607
|
if (await fs.pathExists(webPackageDir)) {
|
|
6606
6608
|
const webDeps = {};
|
|
6607
|
-
webDeps[`@${projectName}/api`] = workspaceVersion;
|
|
6608
|
-
webDeps[`@${projectName}/auth`] = workspaceVersion;
|
|
6609
|
+
if (await fs.pathExists(apiPackageDir)) webDeps[`@${projectName}/api`] = workspaceVersion;
|
|
6610
|
+
if (await fs.pathExists(authPackageDir)) webDeps[`@${projectName}/auth`] = workspaceVersion;
|
|
6609
6611
|
if (Object.keys(webDeps).length > 0) await addPackageDependency({
|
|
6610
6612
|
customDependencies: webDeps,
|
|
6611
6613
|
projectDir: webPackageDir
|
|
@@ -6614,7 +6616,7 @@ async function setupWorkspaceDependencies(projectDir, options) {
|
|
|
6614
6616
|
const nativePackageDir = path.join(projectDir, "apps/native");
|
|
6615
6617
|
if (await fs.pathExists(nativePackageDir)) {
|
|
6616
6618
|
const nativeDeps = {};
|
|
6617
|
-
nativeDeps[`@${projectName}/api`] = workspaceVersion;
|
|
6619
|
+
if (await fs.pathExists(apiPackageDir)) nativeDeps[`@${projectName}/api`] = workspaceVersion;
|
|
6618
6620
|
if (Object.keys(nativeDeps).length > 0) await addPackageDependency({
|
|
6619
6621
|
customDependencies: nativeDeps,
|
|
6620
6622
|
projectDir: nativePackageDir
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { redirect } from "next/navigation";
|
|
|
2
2
|
import Dashboard from "./dashboard";
|
|
3
3
|
import { headers } from "next/headers";
|
|
4
4
|
import { auth } from "@{{projectName}}/auth";
|
|
5
|
+
import { authClient } from "@/lib/auth-client";
|
|
5
6
|
|
|
6
7
|
export default async function DashboardPage() {
|
|
7
8
|
const session = await auth.api.getSession({
|
|
@@ -13,8 +14,10 @@ export default async function DashboardPage() {
|
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
{{#if (eq payments "polar")}}
|
|
16
|
-
const { data: customerState } = await
|
|
17
|
-
|
|
17
|
+
const { data: customerState } = await authClient.customer.state({
|
|
18
|
+
fetchOptions: {
|
|
19
|
+
headers: await headers(),
|
|
20
|
+
},
|
|
18
21
|
});
|
|
19
22
|
{{/if}}
|
|
20
23
|
|