create-better-t-stack 3.0.0 → 3.0.2

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-Dm6abm1a.js";
2
+ import { createBtsCli } from "./src-D7cz-mze.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-Dm6abm1a.js";
2
+ import { builder, createBtsCli, docs, init, router, sponsors } from "./src-D7cz-mze.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -3158,7 +3158,9 @@ async function setupDeploymentTemplates(projectDir, context) {
3158
3158
  const alchemyTemplateSrc = path.join(PKG_ROOT, "templates/deploy/alchemy");
3159
3159
  if (context.webDeploy === "alchemy" && (context.serverDeploy === "alchemy" || isBackendSelf)) {
3160
3160
  if (await fs.pathExists(alchemyTemplateSrc)) {
3161
- await processAndCopyFiles("alchemy.run.ts.hbs", alchemyTemplateSrc, projectDir, context);
3161
+ const webAppDir = path.join(projectDir, "apps/web");
3162
+ const destDir = isBackendSelf && await fs.pathExists(webAppDir) ? webAppDir : projectDir;
3163
+ await processAndCopyFiles("alchemy.run.ts.hbs", alchemyTemplateSrc, destDir, context);
3162
3164
  await addEnvDtsToPackages(projectDir, context, alchemyTemplateSrc);
3163
3165
  }
3164
3166
  } else {
@@ -5255,7 +5257,7 @@ const AVAILABLE_REGIONS = [
5255
5257
  ];
5256
5258
  async function setupWithCreateDb(serverDir, packageManager, orm) {
5257
5259
  try {
5258
- log.info("Starting Prisma Postgres setup with create-db. Please follow the instructions below:");
5260
+ log.info("Starting Prisma Postgres setup with create-db.");
5259
5261
  const selectedRegion = await select({
5260
5262
  message: "Select your preferred region:",
5261
5263
  options: AVAILABLE_REGIONS,
@@ -5843,13 +5845,11 @@ async function setupDatabase(config, cliInput) {
5843
5845
  devDependencies: ["prisma"],
5844
5846
  projectDir: dbPackageDir
5845
5847
  });
5846
- if (backend === "self") {
5847
- const webDir = path.join(projectDir, "apps/web");
5848
- if (await fs.pathExists(webDir)) await addPackageDependency({
5849
- dependencies: ["@prisma/client"],
5850
- projectDir: webDir
5851
- });
5852
- }
5848
+ const webDir = path.join(projectDir, "apps/web");
5849
+ if (await fs.pathExists(webDir)) await addPackageDependency({
5850
+ dependencies: ["@prisma/client"],
5851
+ projectDir: webDir
5852
+ });
5853
5853
  } else if (orm === "drizzle") {
5854
5854
  if (database === "sqlite") await addPackageDependency({
5855
5855
  dependencies: ["drizzle-orm", "@libsql/client"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
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,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}}