create-better-t-stack 3.2.21 → 3.2.23
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
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-
|
|
2
|
+
import { a as router, i as init, n as createBtsCli, o as sponsors, r as docs, t as builder } from "./src-Cx7HDf0b.js";
|
|
3
3
|
|
|
4
4
|
export { builder, createBtsCli, docs, init, router, sponsors };
|
|
@@ -2076,12 +2076,12 @@ async function setupFumadocs(config) {
|
|
|
2076
2076
|
const fumadocsInitCommand = getPackageExecutionCommand(packageManager, `create-fumadocs-app@latest fumadocs --template ${TEMPLATES[template].value} --src --pm ${packageManager} --no-git`);
|
|
2077
2077
|
const appsDir = path.join(projectDir, "apps");
|
|
2078
2078
|
await fs.ensureDir(appsDir);
|
|
2079
|
-
|
|
2079
|
+
const s = spinner();
|
|
2080
|
+
s.start("Running Fumadocs create command...");
|
|
2080
2081
|
await execa(fumadocsInitCommand, {
|
|
2081
2082
|
cwd: appsDir,
|
|
2082
2083
|
env: { CI: "true" },
|
|
2083
|
-
shell: true
|
|
2084
|
-
stdio: "inherit"
|
|
2084
|
+
shell: true
|
|
2085
2085
|
});
|
|
2086
2086
|
const fumadocsDir = path.join(projectDir, "apps", "fumadocs");
|
|
2087
2087
|
const packageJsonPath = path.join(fumadocsDir, "package.json");
|
|
@@ -2091,7 +2091,7 @@ async function setupFumadocs(config) {
|
|
|
2091
2091
|
if (packageJson.scripts?.dev) packageJson.scripts.dev = `${packageJson.scripts.dev} --port=4000`;
|
|
2092
2092
|
await fs.writeJson(packageJsonPath, packageJson, { spaces: 2 });
|
|
2093
2093
|
}
|
|
2094
|
-
|
|
2094
|
+
s.stop("Fumadocs setup complete!");
|
|
2095
2095
|
} catch (error) {
|
|
2096
2096
|
log.error(pc.red("Failed to set up Fumadocs"));
|
|
2097
2097
|
if (error instanceof Error) consola.error(pc.red(error.message));
|
|
@@ -2295,6 +2295,10 @@ const AGENTS = {
|
|
|
2295
2295
|
goose: { label: "Goose" },
|
|
2296
2296
|
"roo-code": { label: "Roo Code" }
|
|
2297
2297
|
};
|
|
2298
|
+
const HOOKS = {
|
|
2299
|
+
cursor: { label: "Cursor" },
|
|
2300
|
+
claude: { label: "Claude" }
|
|
2301
|
+
};
|
|
2298
2302
|
function getFrameworksFromFrontend(frontend) {
|
|
2299
2303
|
const frameworkMap = {
|
|
2300
2304
|
"tanstack-router": "react",
|
|
@@ -2332,12 +2336,20 @@ async function setupUltracite(config, hasHusky) {
|
|
|
2332
2336
|
label: agent.label
|
|
2333
2337
|
})),
|
|
2334
2338
|
required: true
|
|
2339
|
+
}),
|
|
2340
|
+
hooks: () => autocompleteMultiselect({
|
|
2341
|
+
message: "Choose hooks",
|
|
2342
|
+
options: Object.entries(HOOKS).map(([key, hook]) => ({
|
|
2343
|
+
value: key,
|
|
2344
|
+
label: hook.label
|
|
2345
|
+
}))
|
|
2335
2346
|
})
|
|
2336
2347
|
}, { onCancel: () => {
|
|
2337
2348
|
exitCancelled("Operation cancelled");
|
|
2338
2349
|
} });
|
|
2339
2350
|
const editors = result.editors;
|
|
2340
2351
|
const agents = result.agents;
|
|
2352
|
+
const hooks = result.hooks;
|
|
2341
2353
|
const frameworks = getFrameworksFromFrontend(frontend);
|
|
2342
2354
|
const ultraciteArgs = [
|
|
2343
2355
|
"init",
|
|
@@ -2347,21 +2359,21 @@ async function setupUltracite(config, hasHusky) {
|
|
|
2347
2359
|
if (frameworks.length > 0) ultraciteArgs.push("--frameworks", ...frameworks);
|
|
2348
2360
|
if (editors.length > 0) ultraciteArgs.push("--editors", ...editors);
|
|
2349
2361
|
if (agents.length > 0) ultraciteArgs.push("--agents", ...agents);
|
|
2362
|
+
if (hooks.length > 0) ultraciteArgs.push("--hooks", ...hooks);
|
|
2350
2363
|
if (hasHusky) ultraciteArgs.push("--integrations", "husky", "lint-staged");
|
|
2351
2364
|
const ultraciteInitCommand = getPackageExecutionCommand(packageManager, `ultracite@latest ${ultraciteArgs.join(" ")} --skip-install`);
|
|
2352
|
-
|
|
2365
|
+
const s = spinner();
|
|
2366
|
+
s.start("Running Ultracite init command...");
|
|
2353
2367
|
await execa(ultraciteInitCommand, {
|
|
2354
2368
|
cwd: projectDir,
|
|
2355
2369
|
env: { CI: "true" },
|
|
2356
|
-
shell: true
|
|
2357
|
-
stdio: "inherit"
|
|
2370
|
+
shell: true
|
|
2358
2371
|
});
|
|
2359
|
-
log.success("Ultracite setup complete!");
|
|
2360
2372
|
if (hasHusky) await addPackageDependency({
|
|
2361
2373
|
devDependencies: ["husky", "lint-staged"],
|
|
2362
2374
|
projectDir
|
|
2363
2375
|
});
|
|
2364
|
-
|
|
2376
|
+
s.stop("Ultracite setup successfully!");
|
|
2365
2377
|
} catch (error) {
|
|
2366
2378
|
log.error(pc.red("Failed to set up Ultracite"));
|
|
2367
2379
|
if (error instanceof Error) console.error(pc.red(error.message));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.23",
|
|
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,5 +1,4 @@
|
|
|
1
1
|
import Header from "@/components/header";
|
|
2
|
-
import Loader from "@/components/loader";
|
|
3
2
|
import { ThemeProvider } from "@/components/theme-provider";
|
|
4
3
|
import { Toaster } from "@/components/ui/sonner";
|
|
5
4
|
{{#if (eq api "orpc")}}
|
|
@@ -20,7 +19,6 @@ import {
|
|
|
20
19
|
HeadContent,
|
|
21
20
|
Outlet,
|
|
22
21
|
createRootRouteWithContext,
|
|
23
|
-
useRouterState,
|
|
24
22
|
} from "@tanstack/react-router";
|
|
25
23
|
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
|
26
24
|
import "../index.css";
|
|
@@ -61,10 +59,6 @@ export const Route = createRootRouteWithContext<RouterAppContext>()({
|
|
|
61
59
|
});
|
|
62
60
|
|
|
63
61
|
function RootComponent() {
|
|
64
|
-
const isFetching = useRouterState({
|
|
65
|
-
select: (s) => s.isLoading,
|
|
66
|
-
});
|
|
67
|
-
|
|
68
62
|
{{#if (eq api "orpc")}}
|
|
69
63
|
const [client] = useState<AppRouterClient>(() => createORPCClient(link));
|
|
70
64
|
const [orpcUtils] = useState(() => createTanstackQueryUtils(client));
|
|
@@ -82,7 +76,7 @@ function RootComponent() {
|
|
|
82
76
|
>
|
|
83
77
|
<div className="grid grid-rows-[auto_1fr] h-svh">
|
|
84
78
|
<Header />
|
|
85
|
-
|
|
79
|
+
<Outlet />
|
|
86
80
|
</div>
|
|
87
81
|
<Toaster richColors />
|
|
88
82
|
</ThemeProvider>
|
|
@@ -95,7 +89,7 @@ function RootComponent() {
|
|
|
95
89
|
>
|
|
96
90
|
<div className="grid grid-rows-[auto_1fr] h-svh">
|
|
97
91
|
<Header />
|
|
98
|
-
|
|
92
|
+
<Outlet />
|
|
99
93
|
</div>
|
|
100
94
|
<Toaster richColors />
|
|
101
95
|
</ThemeProvider>
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
Outlet,
|
|
8
8
|
Scripts,
|
|
9
9
|
createRootRouteWithContext,
|
|
10
|
-
useRouterState,
|
|
11
10
|
{{#if (and (eq backend "convex") (or (eq auth "clerk") (eq auth "better-auth")))}}
|
|
12
11
|
useRouteContext,
|
|
13
12
|
{{/if}}
|
|
@@ -24,7 +23,6 @@ import type { ConvexReactClient } from "convex/react";
|
|
|
24
23
|
import type { QueryClient } from "@tanstack/react-query";
|
|
25
24
|
{{/if}}
|
|
26
25
|
{{/if}}
|
|
27
|
-
import Loader from "@/components/loader";
|
|
28
26
|
|
|
29
27
|
{{#if (and (eq backend "convex") (eq auth "clerk"))}}
|
|
30
28
|
import { ClerkProvider, useAuth } from "@clerk/tanstack-react-start";
|
|
@@ -125,7 +123,6 @@ export const Route = createRootRouteWithContext<RouterAppContext>()({
|
|
|
125
123
|
});
|
|
126
124
|
|
|
127
125
|
function RootDocument() {
|
|
128
|
-
const isFetching = useRouterState({ select: (s) => s.isLoading });
|
|
129
126
|
{{#if (and (eq backend "convex") (eq auth "clerk"))}}
|
|
130
127
|
const context = useRouteContext({ from: Route.id });
|
|
131
128
|
return (
|
|
@@ -138,7 +135,7 @@ function RootDocument() {
|
|
|
138
135
|
<body>
|
|
139
136
|
<div className="grid h-svh grid-rows-[auto_1fr]">
|
|
140
137
|
<Header />
|
|
141
|
-
|
|
138
|
+
<Outlet />
|
|
142
139
|
</div>
|
|
143
140
|
<Toaster richColors />
|
|
144
141
|
<TanStackRouterDevtools position="bottom-left" />
|
|
@@ -159,7 +156,7 @@ function RootDocument() {
|
|
|
159
156
|
<body>
|
|
160
157
|
<div className="grid h-svh grid-rows-[auto_1fr]">
|
|
161
158
|
<Header />
|
|
162
|
-
|
|
159
|
+
<Outlet />
|
|
163
160
|
</div>
|
|
164
161
|
<Toaster richColors />
|
|
165
162
|
<TanStackRouterDevtools position="bottom-left" />
|
|
@@ -177,7 +174,7 @@ function RootDocument() {
|
|
|
177
174
|
<body>
|
|
178
175
|
<div className="grid h-svh grid-rows-[auto_1fr]">
|
|
179
176
|
<Header />
|
|
180
|
-
|
|
177
|
+
<Outlet />
|
|
181
178
|
</div>
|
|
182
179
|
<Toaster richColors />
|
|
183
180
|
<TanStackRouterDevtools position="bottom-left" />
|