mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Update Next.js hint and simplify analytics code
This commit is contained in:
@@ -26,7 +26,7 @@ export async function getBackendFrameworkChoice(
|
||||
{
|
||||
value: "next" as const,
|
||||
label: "Next.js",
|
||||
hint: "Nextjs API routes",
|
||||
hint: "separate api routes only backend",
|
||||
},
|
||||
{
|
||||
value: "express" as const,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import consola from "consola";
|
||||
import { PostHog } from "posthog-node";
|
||||
import type { ProjectConfig } from "../types";
|
||||
import { getLatestCLIVersion } from "./get-latest-cli-version";
|
||||
@@ -18,9 +17,7 @@ export async function trackProjectCreation(
|
||||
});
|
||||
|
||||
try {
|
||||
const sessionId = `cli_${Date.now()}_${crypto
|
||||
.randomUUID()
|
||||
.replace(/-/g, "")}`;
|
||||
const sessionId = `cli_${crypto.randomUUID().replace(/-/g, "")}`;
|
||||
|
||||
const { projectName, projectDir, relativePath, ...safeConfig } = config;
|
||||
|
||||
@@ -35,8 +32,8 @@ export async function trackProjectCreation(
|
||||
$ip: null,
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
consola.debug("Analytics tracking failed:", error);
|
||||
} catch (_error) {
|
||||
// consola.debug("Analytics tracking failed:", error);
|
||||
} finally {
|
||||
await posthog.shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user