create-better-t-stack 2.33.4 → 2.33.5
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/LICENSE +21 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-BH7V4gQF.js → src-B-ppWkkE.js} +182 -182
- package/package.json +9 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Better T Stack
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -319,7 +319,7 @@ function getAddonDisplay(addon) {
|
|
|
319
319
|
break;
|
|
320
320
|
case "ruler":
|
|
321
321
|
label = "Ruler";
|
|
322
|
-
hint = "
|
|
322
|
+
hint = "Centralize your AI rules";
|
|
323
323
|
break;
|
|
324
324
|
case "husky":
|
|
325
325
|
label = "Husky";
|
|
@@ -1201,7 +1201,7 @@ const getLatestCLIVersion = () => {
|
|
|
1201
1201
|
*/
|
|
1202
1202
|
function isTelemetryEnabled() {
|
|
1203
1203
|
const BTS_TELEMETRY_DISABLED = process.env.BTS_TELEMETRY_DISABLED;
|
|
1204
|
-
const BTS_TELEMETRY = "
|
|
1204
|
+
const BTS_TELEMETRY = "0";
|
|
1205
1205
|
if (BTS_TELEMETRY_DISABLED !== void 0) return BTS_TELEMETRY_DISABLED !== "1";
|
|
1206
1206
|
if (BTS_TELEMETRY !== void 0) return BTS_TELEMETRY === "1";
|
|
1207
1207
|
return true;
|
|
@@ -1209,8 +1209,8 @@ function isTelemetryEnabled() {
|
|
|
1209
1209
|
|
|
1210
1210
|
//#endregion
|
|
1211
1211
|
//#region src/utils/analytics.ts
|
|
1212
|
-
const POSTHOG_API_KEY = "
|
|
1213
|
-
const POSTHOG_HOST = "
|
|
1212
|
+
const POSTHOG_API_KEY = "random";
|
|
1213
|
+
const POSTHOG_HOST = "random";
|
|
1214
1214
|
async function trackProjectCreation(config, disableAnalytics = false) {
|
|
1215
1215
|
if (!isTelemetryEnabled() || disableAnalytics) return;
|
|
1216
1216
|
const sessionId = `cli_${crypto.randomUUID().replace(/-/g, "")}`;
|
|
@@ -1732,184 +1732,6 @@ async function setupFumadocs(config) {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
|
|
1735
|
-
//#endregion
|
|
1736
|
-
//#region src/helpers/setup/starlight-setup.ts
|
|
1737
|
-
async function setupStarlight(config) {
|
|
1738
|
-
const { packageManager, projectDir } = config;
|
|
1739
|
-
const s = spinner();
|
|
1740
|
-
try {
|
|
1741
|
-
s.start("Setting up Starlight docs...");
|
|
1742
|
-
const starlightArgs = [
|
|
1743
|
-
"docs",
|
|
1744
|
-
"--template",
|
|
1745
|
-
"starlight",
|
|
1746
|
-
"--no-install",
|
|
1747
|
-
"--add",
|
|
1748
|
-
"tailwind",
|
|
1749
|
-
"--no-git",
|
|
1750
|
-
"--skip-houston"
|
|
1751
|
-
];
|
|
1752
|
-
const starlightArgsString = starlightArgs.join(" ");
|
|
1753
|
-
const commandWithArgs = `create-astro@latest ${starlightArgsString}`;
|
|
1754
|
-
const starlightInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
1755
|
-
await execa(starlightInitCommand, {
|
|
1756
|
-
cwd: path.join(projectDir, "apps"),
|
|
1757
|
-
env: { CI: "true" },
|
|
1758
|
-
shell: true
|
|
1759
|
-
});
|
|
1760
|
-
s.stop("Starlight docs setup successfully!");
|
|
1761
|
-
} catch (error) {
|
|
1762
|
-
s.stop(pc.red("Failed to set up Starlight docs"));
|
|
1763
|
-
if (error instanceof Error) consola.error(pc.red(error.message));
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
//#endregion
|
|
1768
|
-
//#region src/helpers/setup/tauri-setup.ts
|
|
1769
|
-
async function setupTauri(config) {
|
|
1770
|
-
const { packageManager, frontend, projectDir } = config;
|
|
1771
|
-
const s = spinner();
|
|
1772
|
-
const clientPackageDir = path.join(projectDir, "apps/web");
|
|
1773
|
-
if (!await fs.pathExists(clientPackageDir)) return;
|
|
1774
|
-
try {
|
|
1775
|
-
s.start("Setting up Tauri desktop app support...");
|
|
1776
|
-
await addPackageDependency({
|
|
1777
|
-
devDependencies: ["@tauri-apps/cli"],
|
|
1778
|
-
projectDir: clientPackageDir
|
|
1779
|
-
});
|
|
1780
|
-
const clientPackageJsonPath = path.join(clientPackageDir, "package.json");
|
|
1781
|
-
if (await fs.pathExists(clientPackageJsonPath)) {
|
|
1782
|
-
const packageJson = await fs.readJson(clientPackageJsonPath);
|
|
1783
|
-
packageJson.scripts = {
|
|
1784
|
-
...packageJson.scripts,
|
|
1785
|
-
tauri: "tauri",
|
|
1786
|
-
"desktop:dev": "tauri dev",
|
|
1787
|
-
"desktop:build": "tauri build"
|
|
1788
|
-
};
|
|
1789
|
-
await fs.writeJson(clientPackageJsonPath, packageJson, { spaces: 2 });
|
|
1790
|
-
}
|
|
1791
|
-
frontend.includes("tanstack-router");
|
|
1792
|
-
const hasReactRouter = frontend.includes("react-router");
|
|
1793
|
-
const hasNuxt = frontend.includes("nuxt");
|
|
1794
|
-
const hasSvelte = frontend.includes("svelte");
|
|
1795
|
-
frontend.includes("solid");
|
|
1796
|
-
const hasNext = frontend.includes("next");
|
|
1797
|
-
const devUrl = hasReactRouter || hasSvelte ? "http://localhost:5173" : hasNext ? "http://localhost:3001" : "http://localhost:3001";
|
|
1798
|
-
const frontendDist = hasNuxt ? "../.output/public" : hasSvelte ? "../build" : hasNext ? "../.next" : hasReactRouter ? "../build/client" : "../dist";
|
|
1799
|
-
const tauriArgs = [
|
|
1800
|
-
"init",
|
|
1801
|
-
`--app-name=${path.basename(projectDir)}`,
|
|
1802
|
-
`--window-title=${path.basename(projectDir)}`,
|
|
1803
|
-
`--frontend-dist=${frontendDist}`,
|
|
1804
|
-
`--dev-url=${devUrl}`,
|
|
1805
|
-
`--before-dev-command=\"${packageManager} run dev\"`,
|
|
1806
|
-
`--before-build-command=\"${packageManager} run build\"`
|
|
1807
|
-
];
|
|
1808
|
-
const tauriArgsString = tauriArgs.join(" ");
|
|
1809
|
-
const commandWithArgs = `@tauri-apps/cli@latest ${tauriArgsString}`;
|
|
1810
|
-
const tauriInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
1811
|
-
await execa(tauriInitCommand, {
|
|
1812
|
-
cwd: clientPackageDir,
|
|
1813
|
-
env: { CI: "true" },
|
|
1814
|
-
shell: true
|
|
1815
|
-
});
|
|
1816
|
-
s.stop("Tauri desktop app support configured successfully!");
|
|
1817
|
-
} catch (error) {
|
|
1818
|
-
s.stop(pc.red("Failed to set up Tauri"));
|
|
1819
|
-
if (error instanceof Error) consola$1.error(pc.red(error.message));
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
//#endregion
|
|
1824
|
-
//#region src/helpers/setup/ultracite-setup.ts
|
|
1825
|
-
const EDITORS = {
|
|
1826
|
-
vscode: {
|
|
1827
|
-
label: "VSCode / Cursor / Windsurf",
|
|
1828
|
-
hint: "Visual Studio Code editor configuration"
|
|
1829
|
-
},
|
|
1830
|
-
zed: {
|
|
1831
|
-
label: "Zed",
|
|
1832
|
-
hint: "Zed editor configuration"
|
|
1833
|
-
}
|
|
1834
|
-
};
|
|
1835
|
-
const RULES = {
|
|
1836
|
-
"vscode-copilot": {
|
|
1837
|
-
label: "VS Code Copilot",
|
|
1838
|
-
hint: "GitHub Copilot integration for VS Code"
|
|
1839
|
-
},
|
|
1840
|
-
cursor: {
|
|
1841
|
-
label: "Cursor",
|
|
1842
|
-
hint: "Cursor AI editor configuration"
|
|
1843
|
-
},
|
|
1844
|
-
windsurf: {
|
|
1845
|
-
label: "Windsurf",
|
|
1846
|
-
hint: "Windsurf editor configuration"
|
|
1847
|
-
},
|
|
1848
|
-
zed: {
|
|
1849
|
-
label: "Zed",
|
|
1850
|
-
hint: "Zed editor rules"
|
|
1851
|
-
},
|
|
1852
|
-
claude: {
|
|
1853
|
-
label: "Claude",
|
|
1854
|
-
hint: "Claude AI integration"
|
|
1855
|
-
},
|
|
1856
|
-
codex: {
|
|
1857
|
-
label: "Codex",
|
|
1858
|
-
hint: "Codex AI integration"
|
|
1859
|
-
}
|
|
1860
|
-
};
|
|
1861
|
-
async function setupUltracite(config, hasHusky) {
|
|
1862
|
-
const { packageManager, projectDir } = config;
|
|
1863
|
-
try {
|
|
1864
|
-
log.info("Setting up Ultracite...");
|
|
1865
|
-
await setupBiome(projectDir);
|
|
1866
|
-
const editors = await multiselect({
|
|
1867
|
-
message: "Choose editors",
|
|
1868
|
-
options: Object.entries(EDITORS).map(([key, editor]) => ({
|
|
1869
|
-
value: key,
|
|
1870
|
-
label: editor.label,
|
|
1871
|
-
hint: editor.hint
|
|
1872
|
-
})),
|
|
1873
|
-
required: false
|
|
1874
|
-
});
|
|
1875
|
-
if (isCancel(editors)) return exitCancelled("Operation cancelled");
|
|
1876
|
-
const rules = await multiselect({
|
|
1877
|
-
message: "Choose rules",
|
|
1878
|
-
options: Object.entries(RULES).map(([key, rule]) => ({
|
|
1879
|
-
value: key,
|
|
1880
|
-
label: rule.label,
|
|
1881
|
-
hint: rule.hint
|
|
1882
|
-
})),
|
|
1883
|
-
required: false
|
|
1884
|
-
});
|
|
1885
|
-
if (isCancel(rules)) return exitCancelled("Operation cancelled");
|
|
1886
|
-
const ultraciteArgs = [
|
|
1887
|
-
"init",
|
|
1888
|
-
"--pm",
|
|
1889
|
-
packageManager
|
|
1890
|
-
];
|
|
1891
|
-
if (editors.length > 0) ultraciteArgs.push("--editors", ...editors);
|
|
1892
|
-
if (rules.length > 0) ultraciteArgs.push("--rules", ...rules);
|
|
1893
|
-
if (hasHusky) ultraciteArgs.push("--features", "husky", "lint-staged");
|
|
1894
|
-
const ultraciteArgsString = ultraciteArgs.join(" ");
|
|
1895
|
-
const commandWithArgs = `ultracite@latest ${ultraciteArgsString} --skip-install`;
|
|
1896
|
-
const ultraciteInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
1897
|
-
await execa(ultraciteInitCommand, {
|
|
1898
|
-
cwd: projectDir,
|
|
1899
|
-
env: { CI: "true" },
|
|
1900
|
-
shell: true
|
|
1901
|
-
});
|
|
1902
|
-
if (hasHusky) await addPackageDependency({
|
|
1903
|
-
devDependencies: ["husky", "lint-staged"],
|
|
1904
|
-
projectDir
|
|
1905
|
-
});
|
|
1906
|
-
log.success("Ultracite setup successfully!");
|
|
1907
|
-
} catch (error) {
|
|
1908
|
-
log.error(pc.red("Failed to set up Ultracite"));
|
|
1909
|
-
if (error instanceof Error) console.error(pc.red(error.message));
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
1735
|
//#endregion
|
|
1914
1736
|
//#region src/utils/template-processor.ts
|
|
1915
1737
|
/**
|
|
@@ -2368,6 +2190,184 @@ async function addRulerScriptToPackageJson(projectDir, packageManager) {
|
|
|
2368
2190
|
await fs.writeJson(rootPackageJsonPath, packageJson, { spaces: 2 });
|
|
2369
2191
|
}
|
|
2370
2192
|
|
|
2193
|
+
//#endregion
|
|
2194
|
+
//#region src/helpers/setup/starlight-setup.ts
|
|
2195
|
+
async function setupStarlight(config) {
|
|
2196
|
+
const { packageManager, projectDir } = config;
|
|
2197
|
+
const s = spinner();
|
|
2198
|
+
try {
|
|
2199
|
+
s.start("Setting up Starlight docs...");
|
|
2200
|
+
const starlightArgs = [
|
|
2201
|
+
"docs",
|
|
2202
|
+
"--template",
|
|
2203
|
+
"starlight",
|
|
2204
|
+
"--no-install",
|
|
2205
|
+
"--add",
|
|
2206
|
+
"tailwind",
|
|
2207
|
+
"--no-git",
|
|
2208
|
+
"--skip-houston"
|
|
2209
|
+
];
|
|
2210
|
+
const starlightArgsString = starlightArgs.join(" ");
|
|
2211
|
+
const commandWithArgs = `create-astro@latest ${starlightArgsString}`;
|
|
2212
|
+
const starlightInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
2213
|
+
await execa(starlightInitCommand, {
|
|
2214
|
+
cwd: path.join(projectDir, "apps"),
|
|
2215
|
+
env: { CI: "true" },
|
|
2216
|
+
shell: true
|
|
2217
|
+
});
|
|
2218
|
+
s.stop("Starlight docs setup successfully!");
|
|
2219
|
+
} catch (error) {
|
|
2220
|
+
s.stop(pc.red("Failed to set up Starlight docs"));
|
|
2221
|
+
if (error instanceof Error) consola.error(pc.red(error.message));
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
//#endregion
|
|
2226
|
+
//#region src/helpers/setup/tauri-setup.ts
|
|
2227
|
+
async function setupTauri(config) {
|
|
2228
|
+
const { packageManager, frontend, projectDir } = config;
|
|
2229
|
+
const s = spinner();
|
|
2230
|
+
const clientPackageDir = path.join(projectDir, "apps/web");
|
|
2231
|
+
if (!await fs.pathExists(clientPackageDir)) return;
|
|
2232
|
+
try {
|
|
2233
|
+
s.start("Setting up Tauri desktop app support...");
|
|
2234
|
+
await addPackageDependency({
|
|
2235
|
+
devDependencies: ["@tauri-apps/cli"],
|
|
2236
|
+
projectDir: clientPackageDir
|
|
2237
|
+
});
|
|
2238
|
+
const clientPackageJsonPath = path.join(clientPackageDir, "package.json");
|
|
2239
|
+
if (await fs.pathExists(clientPackageJsonPath)) {
|
|
2240
|
+
const packageJson = await fs.readJson(clientPackageJsonPath);
|
|
2241
|
+
packageJson.scripts = {
|
|
2242
|
+
...packageJson.scripts,
|
|
2243
|
+
tauri: "tauri",
|
|
2244
|
+
"desktop:dev": "tauri dev",
|
|
2245
|
+
"desktop:build": "tauri build"
|
|
2246
|
+
};
|
|
2247
|
+
await fs.writeJson(clientPackageJsonPath, packageJson, { spaces: 2 });
|
|
2248
|
+
}
|
|
2249
|
+
frontend.includes("tanstack-router");
|
|
2250
|
+
const hasReactRouter = frontend.includes("react-router");
|
|
2251
|
+
const hasNuxt = frontend.includes("nuxt");
|
|
2252
|
+
const hasSvelte = frontend.includes("svelte");
|
|
2253
|
+
frontend.includes("solid");
|
|
2254
|
+
const hasNext = frontend.includes("next");
|
|
2255
|
+
const devUrl = hasReactRouter || hasSvelte ? "http://localhost:5173" : hasNext ? "http://localhost:3001" : "http://localhost:3001";
|
|
2256
|
+
const frontendDist = hasNuxt ? "../.output/public" : hasSvelte ? "../build" : hasNext ? "../.next" : hasReactRouter ? "../build/client" : "../dist";
|
|
2257
|
+
const tauriArgs = [
|
|
2258
|
+
"init",
|
|
2259
|
+
`--app-name=${path.basename(projectDir)}`,
|
|
2260
|
+
`--window-title=${path.basename(projectDir)}`,
|
|
2261
|
+
`--frontend-dist=${frontendDist}`,
|
|
2262
|
+
`--dev-url=${devUrl}`,
|
|
2263
|
+
`--before-dev-command=\"${packageManager} run dev\"`,
|
|
2264
|
+
`--before-build-command=\"${packageManager} run build\"`
|
|
2265
|
+
];
|
|
2266
|
+
const tauriArgsString = tauriArgs.join(" ");
|
|
2267
|
+
const commandWithArgs = `@tauri-apps/cli@latest ${tauriArgsString}`;
|
|
2268
|
+
const tauriInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
2269
|
+
await execa(tauriInitCommand, {
|
|
2270
|
+
cwd: clientPackageDir,
|
|
2271
|
+
env: { CI: "true" },
|
|
2272
|
+
shell: true
|
|
2273
|
+
});
|
|
2274
|
+
s.stop("Tauri desktop app support configured successfully!");
|
|
2275
|
+
} catch (error) {
|
|
2276
|
+
s.stop(pc.red("Failed to set up Tauri"));
|
|
2277
|
+
if (error instanceof Error) consola$1.error(pc.red(error.message));
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
//#endregion
|
|
2282
|
+
//#region src/helpers/setup/ultracite-setup.ts
|
|
2283
|
+
const EDITORS = {
|
|
2284
|
+
vscode: {
|
|
2285
|
+
label: "VSCode / Cursor / Windsurf",
|
|
2286
|
+
hint: "Visual Studio Code editor configuration"
|
|
2287
|
+
},
|
|
2288
|
+
zed: {
|
|
2289
|
+
label: "Zed",
|
|
2290
|
+
hint: "Zed editor configuration"
|
|
2291
|
+
}
|
|
2292
|
+
};
|
|
2293
|
+
const RULES = {
|
|
2294
|
+
"vscode-copilot": {
|
|
2295
|
+
label: "VS Code Copilot",
|
|
2296
|
+
hint: "GitHub Copilot integration for VS Code"
|
|
2297
|
+
},
|
|
2298
|
+
cursor: {
|
|
2299
|
+
label: "Cursor",
|
|
2300
|
+
hint: "Cursor AI editor configuration"
|
|
2301
|
+
},
|
|
2302
|
+
windsurf: {
|
|
2303
|
+
label: "Windsurf",
|
|
2304
|
+
hint: "Windsurf editor configuration"
|
|
2305
|
+
},
|
|
2306
|
+
zed: {
|
|
2307
|
+
label: "Zed",
|
|
2308
|
+
hint: "Zed editor rules"
|
|
2309
|
+
},
|
|
2310
|
+
claude: {
|
|
2311
|
+
label: "Claude",
|
|
2312
|
+
hint: "Claude AI integration"
|
|
2313
|
+
},
|
|
2314
|
+
codex: {
|
|
2315
|
+
label: "Codex",
|
|
2316
|
+
hint: "Codex AI integration"
|
|
2317
|
+
}
|
|
2318
|
+
};
|
|
2319
|
+
async function setupUltracite(config, hasHusky) {
|
|
2320
|
+
const { packageManager, projectDir } = config;
|
|
2321
|
+
try {
|
|
2322
|
+
log.info("Setting up Ultracite...");
|
|
2323
|
+
await setupBiome(projectDir);
|
|
2324
|
+
const editors = await multiselect({
|
|
2325
|
+
message: "Choose editors",
|
|
2326
|
+
options: Object.entries(EDITORS).map(([key, editor]) => ({
|
|
2327
|
+
value: key,
|
|
2328
|
+
label: editor.label,
|
|
2329
|
+
hint: editor.hint
|
|
2330
|
+
})),
|
|
2331
|
+
required: false
|
|
2332
|
+
});
|
|
2333
|
+
if (isCancel(editors)) return exitCancelled("Operation cancelled");
|
|
2334
|
+
const rules = await multiselect({
|
|
2335
|
+
message: "Choose rules",
|
|
2336
|
+
options: Object.entries(RULES).map(([key, rule]) => ({
|
|
2337
|
+
value: key,
|
|
2338
|
+
label: rule.label,
|
|
2339
|
+
hint: rule.hint
|
|
2340
|
+
})),
|
|
2341
|
+
required: false
|
|
2342
|
+
});
|
|
2343
|
+
if (isCancel(rules)) return exitCancelled("Operation cancelled");
|
|
2344
|
+
const ultraciteArgs = [
|
|
2345
|
+
"init",
|
|
2346
|
+
"--pm",
|
|
2347
|
+
packageManager
|
|
2348
|
+
];
|
|
2349
|
+
if (editors.length > 0) ultraciteArgs.push("--editors", ...editors);
|
|
2350
|
+
if (rules.length > 0) ultraciteArgs.push("--rules", ...rules);
|
|
2351
|
+
if (hasHusky) ultraciteArgs.push("--features", "husky", "lint-staged");
|
|
2352
|
+
const ultraciteArgsString = ultraciteArgs.join(" ");
|
|
2353
|
+
const commandWithArgs = `ultracite@latest ${ultraciteArgsString} --skip-install`;
|
|
2354
|
+
const ultraciteInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
2355
|
+
await execa(ultraciteInitCommand, {
|
|
2356
|
+
cwd: projectDir,
|
|
2357
|
+
env: { CI: "true" },
|
|
2358
|
+
shell: true
|
|
2359
|
+
});
|
|
2360
|
+
if (hasHusky) await addPackageDependency({
|
|
2361
|
+
devDependencies: ["husky", "lint-staged"],
|
|
2362
|
+
projectDir
|
|
2363
|
+
});
|
|
2364
|
+
log.success("Ultracite setup successfully!");
|
|
2365
|
+
} catch (error) {
|
|
2366
|
+
log.error(pc.red("Failed to set up Ultracite"));
|
|
2367
|
+
if (error instanceof Error) console.error(pc.red(error.message));
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
2371
|
//#endregion
|
|
2372
2372
|
//#region src/utils/ts-morph.ts
|
|
2373
2373
|
const tsProject = new Project({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.33.
|
|
3
|
+
"version": "2.33.5",
|
|
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",
|
|
@@ -43,15 +43,17 @@
|
|
|
43
43
|
"url": "git+https://github.com/AmanVarshney01/create-better-t-stack.git",
|
|
44
44
|
"directory": "apps/cli"
|
|
45
45
|
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
46
49
|
"homepage": "https://better-t-stack.dev/",
|
|
47
50
|
"scripts": {
|
|
48
51
|
"build": "tsdown",
|
|
49
52
|
"dev": "tsdown --watch",
|
|
50
53
|
"check-types": "tsc --noEmit",
|
|
51
54
|
"check": "biome check --write .",
|
|
52
|
-
"test": "bun run build && vitest
|
|
53
|
-
"test:with-build": "bun run build && WITH_BUILD=1 vitest
|
|
54
|
-
"prepublishOnly": "npm run build"
|
|
55
|
+
"test": "bun run build && vitest --ui",
|
|
56
|
+
"test:with-build": "bun run build && WITH_BUILD=1 vitest --ui"
|
|
55
57
|
},
|
|
56
58
|
"exports": {
|
|
57
59
|
".": {
|
|
@@ -76,8 +78,10 @@
|
|
|
76
78
|
"devDependencies": {
|
|
77
79
|
"@types/fs-extra": "^11.0.4",
|
|
78
80
|
"@types/node": "^24.2.1",
|
|
81
|
+
"@vitest/ui": "^3.2.4",
|
|
79
82
|
"tsdown": "^0.14.1",
|
|
80
83
|
"typescript": "^5.9.2",
|
|
81
84
|
"vitest": "^3.2.4"
|
|
82
|
-
}
|
|
85
|
+
},
|
|
86
|
+
"gitHead": "e7f893d76bbf05e7f0954418dd5ead15f8bf3146"
|
|
83
87
|
}
|