Skip to content

Commit c5c3fa3

Browse files
Update Next.js hint and simplify analytics code
1 parent c3180b2 commit c5c3fa3

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.changeset/metal-eels-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-better-t-stack": patch
3+
---
4+
5+
update nextjs backend hint

apps/cli/src/prompts/backend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function getBackendFrameworkChoice(
2626
{
2727
value: "next" as const,
2828
label: "Next.js",
29-
hint: "Nextjs API routes",
29+
hint: "separate api routes only backend",
3030
},
3131
{
3232
value: "express" as const,

apps/cli/src/utils/analytics.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import consola from "consola";
21
import { PostHog } from "posthog-node";
32
import type { ProjectConfig } from "../types";
43
import { getLatestCLIVersion } from "./get-latest-cli-version";
@@ -18,9 +17,7 @@ export async function trackProjectCreation(
1817
});
1918

2019
try {
21-
const sessionId = `cli_${Date.now()}_${crypto
22-
.randomUUID()
23-
.replace(/-/g, "")}`;
20+
const sessionId = `cli_${crypto.randomUUID().replace(/-/g, "")}`;
2421

2522
const { projectName, projectDir, relativePath, ...safeConfig } = config;
2623

@@ -35,8 +32,8 @@ export async function trackProjectCreation(
3532
$ip: null,
3633
},
3734
});
38-
} catch (error) {
39-
consola.debug("Analytics tracking failed:", error);
35+
} catch (_error) {
36+
// consola.debug("Analytics tracking failed:", error);
4037
} finally {
4138
await posthog.shutdown();
4239
}

0 commit comments

Comments
 (0)