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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { createBtsCli } from "./src-D1Mtpx_b.js";
2
+ import { createBtsCli } from "./src-ql9M1DvL.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-D1Mtpx_b.js";
2
+ import { builder, createBtsCli, docs, init, router, sponsors } from "./src-ql9M1DvL.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -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)) await addPackageDependency({
6595
- dependencies: commonDeps,
6596
- devDependencies: commonDevDeps,
6597
- customDependencies: {
6598
- [`@${projectName}/api`]: workspaceVersion,
6599
- [`@${projectName}/auth`]: workspaceVersion,
6600
- [`@${projectName}/db`]: workspaceVersion
6601
- },
6602
- projectDir: serverPackageDir
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
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",
@@ -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 auth.api.customer.state({
17
- headers: await headers(),
17
+ const { data: customerState } = await authClient.customer.state({
18
+ fetchOptions: {
19
+ headers: await headers(),
20
+ },
18
21
  });
19
22
  {{/if}}
20
23