create-better-t-stack 2.33.4 → 2.33.6
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-CcycH-Mi.js} +182 -184
- 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";
|
|
@@ -1093,7 +1093,6 @@ async function gatherConfig(flags, projectName, projectDir, relativePath) {
|
|
|
1093
1093
|
result.auth = false;
|
|
1094
1094
|
result.dbSetup = "none";
|
|
1095
1095
|
result.examples = ["todo"];
|
|
1096
|
-
result.webDeploy = "none";
|
|
1097
1096
|
}
|
|
1098
1097
|
if (result.backend === "none") {
|
|
1099
1098
|
result.runtime = "none";
|
|
@@ -1103,7 +1102,6 @@ async function gatherConfig(flags, projectName, projectDir, relativePath) {
|
|
|
1103
1102
|
result.auth = false;
|
|
1104
1103
|
result.dbSetup = "none";
|
|
1105
1104
|
result.examples = [];
|
|
1106
|
-
result.webDeploy = "none";
|
|
1107
1105
|
}
|
|
1108
1106
|
return {
|
|
1109
1107
|
projectName,
|
|
@@ -1201,7 +1199,7 @@ const getLatestCLIVersion = () => {
|
|
|
1201
1199
|
*/
|
|
1202
1200
|
function isTelemetryEnabled() {
|
|
1203
1201
|
const BTS_TELEMETRY_DISABLED = process.env.BTS_TELEMETRY_DISABLED;
|
|
1204
|
-
const BTS_TELEMETRY = "
|
|
1202
|
+
const BTS_TELEMETRY = "0";
|
|
1205
1203
|
if (BTS_TELEMETRY_DISABLED !== void 0) return BTS_TELEMETRY_DISABLED !== "1";
|
|
1206
1204
|
if (BTS_TELEMETRY !== void 0) return BTS_TELEMETRY === "1";
|
|
1207
1205
|
return true;
|
|
@@ -1209,8 +1207,8 @@ function isTelemetryEnabled() {
|
|
|
1209
1207
|
|
|
1210
1208
|
//#endregion
|
|
1211
1209
|
//#region src/utils/analytics.ts
|
|
1212
|
-
const POSTHOG_API_KEY = "
|
|
1213
|
-
const POSTHOG_HOST = "
|
|
1210
|
+
const POSTHOG_API_KEY = "random";
|
|
1211
|
+
const POSTHOG_HOST = "random";
|
|
1214
1212
|
async function trackProjectCreation(config, disableAnalytics = false) {
|
|
1215
1213
|
if (!isTelemetryEnabled() || disableAnalytics) return;
|
|
1216
1214
|
const sessionId = `cli_${crypto.randomUUID().replace(/-/g, "")}`;
|
|
@@ -1732,184 +1730,6 @@ async function setupFumadocs(config) {
|
|
|
1732
1730
|
}
|
|
1733
1731
|
}
|
|
1734
1732
|
|
|
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
1733
|
//#endregion
|
|
1914
1734
|
//#region src/utils/template-processor.ts
|
|
1915
1735
|
/**
|
|
@@ -2368,6 +2188,184 @@ async function addRulerScriptToPackageJson(projectDir, packageManager) {
|
|
|
2368
2188
|
await fs.writeJson(rootPackageJsonPath, packageJson, { spaces: 2 });
|
|
2369
2189
|
}
|
|
2370
2190
|
|
|
2191
|
+
//#endregion
|
|
2192
|
+
//#region src/helpers/setup/starlight-setup.ts
|
|
2193
|
+
async function setupStarlight(config) {
|
|
2194
|
+
const { packageManager, projectDir } = config;
|
|
2195
|
+
const s = spinner();
|
|
2196
|
+
try {
|
|
2197
|
+
s.start("Setting up Starlight docs...");
|
|
2198
|
+
const starlightArgs = [
|
|
2199
|
+
"docs",
|
|
2200
|
+
"--template",
|
|
2201
|
+
"starlight",
|
|
2202
|
+
"--no-install",
|
|
2203
|
+
"--add",
|
|
2204
|
+
"tailwind",
|
|
2205
|
+
"--no-git",
|
|
2206
|
+
"--skip-houston"
|
|
2207
|
+
];
|
|
2208
|
+
const starlightArgsString = starlightArgs.join(" ");
|
|
2209
|
+
const commandWithArgs = `create-astro@latest ${starlightArgsString}`;
|
|
2210
|
+
const starlightInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
2211
|
+
await execa(starlightInitCommand, {
|
|
2212
|
+
cwd: path.join(projectDir, "apps"),
|
|
2213
|
+
env: { CI: "true" },
|
|
2214
|
+
shell: true
|
|
2215
|
+
});
|
|
2216
|
+
s.stop("Starlight docs setup successfully!");
|
|
2217
|
+
} catch (error) {
|
|
2218
|
+
s.stop(pc.red("Failed to set up Starlight docs"));
|
|
2219
|
+
if (error instanceof Error) consola.error(pc.red(error.message));
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
//#endregion
|
|
2224
|
+
//#region src/helpers/setup/tauri-setup.ts
|
|
2225
|
+
async function setupTauri(config) {
|
|
2226
|
+
const { packageManager, frontend, projectDir } = config;
|
|
2227
|
+
const s = spinner();
|
|
2228
|
+
const clientPackageDir = path.join(projectDir, "apps/web");
|
|
2229
|
+
if (!await fs.pathExists(clientPackageDir)) return;
|
|
2230
|
+
try {
|
|
2231
|
+
s.start("Setting up Tauri desktop app support...");
|
|
2232
|
+
await addPackageDependency({
|
|
2233
|
+
devDependencies: ["@tauri-apps/cli"],
|
|
2234
|
+
projectDir: clientPackageDir
|
|
2235
|
+
});
|
|
2236
|
+
const clientPackageJsonPath = path.join(clientPackageDir, "package.json");
|
|
2237
|
+
if (await fs.pathExists(clientPackageJsonPath)) {
|
|
2238
|
+
const packageJson = await fs.readJson(clientPackageJsonPath);
|
|
2239
|
+
packageJson.scripts = {
|
|
2240
|
+
...packageJson.scripts,
|
|
2241
|
+
tauri: "tauri",
|
|
2242
|
+
"desktop:dev": "tauri dev",
|
|
2243
|
+
"desktop:build": "tauri build"
|
|
2244
|
+
};
|
|
2245
|
+
await fs.writeJson(clientPackageJsonPath, packageJson, { spaces: 2 });
|
|
2246
|
+
}
|
|
2247
|
+
frontend.includes("tanstack-router");
|
|
2248
|
+
const hasReactRouter = frontend.includes("react-router");
|
|
2249
|
+
const hasNuxt = frontend.includes("nuxt");
|
|
2250
|
+
const hasSvelte = frontend.includes("svelte");
|
|
2251
|
+
frontend.includes("solid");
|
|
2252
|
+
const hasNext = frontend.includes("next");
|
|
2253
|
+
const devUrl = hasReactRouter || hasSvelte ? "http://localhost:5173" : hasNext ? "http://localhost:3001" : "http://localhost:3001";
|
|
2254
|
+
const frontendDist = hasNuxt ? "../.output/public" : hasSvelte ? "../build" : hasNext ? "../.next" : hasReactRouter ? "../build/client" : "../dist";
|
|
2255
|
+
const tauriArgs = [
|
|
2256
|
+
"init",
|
|
2257
|
+
`--app-name=${path.basename(projectDir)}`,
|
|
2258
|
+
`--window-title=${path.basename(projectDir)}`,
|
|
2259
|
+
`--frontend-dist=${frontendDist}`,
|
|
2260
|
+
`--dev-url=${devUrl}`,
|
|
2261
|
+
`--before-dev-command=\"${packageManager} run dev\"`,
|
|
2262
|
+
`--before-build-command=\"${packageManager} run build\"`
|
|
2263
|
+
];
|
|
2264
|
+
const tauriArgsString = tauriArgs.join(" ");
|
|
2265
|
+
const commandWithArgs = `@tauri-apps/cli@latest ${tauriArgsString}`;
|
|
2266
|
+
const tauriInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
2267
|
+
await execa(tauriInitCommand, {
|
|
2268
|
+
cwd: clientPackageDir,
|
|
2269
|
+
env: { CI: "true" },
|
|
2270
|
+
shell: true
|
|
2271
|
+
});
|
|
2272
|
+
s.stop("Tauri desktop app support configured successfully!");
|
|
2273
|
+
} catch (error) {
|
|
2274
|
+
s.stop(pc.red("Failed to set up Tauri"));
|
|
2275
|
+
if (error instanceof Error) consola$1.error(pc.red(error.message));
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
//#endregion
|
|
2280
|
+
//#region src/helpers/setup/ultracite-setup.ts
|
|
2281
|
+
const EDITORS = {
|
|
2282
|
+
vscode: {
|
|
2283
|
+
label: "VSCode / Cursor / Windsurf",
|
|
2284
|
+
hint: "Visual Studio Code editor configuration"
|
|
2285
|
+
},
|
|
2286
|
+
zed: {
|
|
2287
|
+
label: "Zed",
|
|
2288
|
+
hint: "Zed editor configuration"
|
|
2289
|
+
}
|
|
2290
|
+
};
|
|
2291
|
+
const RULES = {
|
|
2292
|
+
"vscode-copilot": {
|
|
2293
|
+
label: "VS Code Copilot",
|
|
2294
|
+
hint: "GitHub Copilot integration for VS Code"
|
|
2295
|
+
},
|
|
2296
|
+
cursor: {
|
|
2297
|
+
label: "Cursor",
|
|
2298
|
+
hint: "Cursor AI editor configuration"
|
|
2299
|
+
},
|
|
2300
|
+
windsurf: {
|
|
2301
|
+
label: "Windsurf",
|
|
2302
|
+
hint: "Windsurf editor configuration"
|
|
2303
|
+
},
|
|
2304
|
+
zed: {
|
|
2305
|
+
label: "Zed",
|
|
2306
|
+
hint: "Zed editor rules"
|
|
2307
|
+
},
|
|
2308
|
+
claude: {
|
|
2309
|
+
label: "Claude",
|
|
2310
|
+
hint: "Claude AI integration"
|
|
2311
|
+
},
|
|
2312
|
+
codex: {
|
|
2313
|
+
label: "Codex",
|
|
2314
|
+
hint: "Codex AI integration"
|
|
2315
|
+
}
|
|
2316
|
+
};
|
|
2317
|
+
async function setupUltracite(config, hasHusky) {
|
|
2318
|
+
const { packageManager, projectDir } = config;
|
|
2319
|
+
try {
|
|
2320
|
+
log.info("Setting up Ultracite...");
|
|
2321
|
+
await setupBiome(projectDir);
|
|
2322
|
+
const editors = await multiselect({
|
|
2323
|
+
message: "Choose editors",
|
|
2324
|
+
options: Object.entries(EDITORS).map(([key, editor]) => ({
|
|
2325
|
+
value: key,
|
|
2326
|
+
label: editor.label,
|
|
2327
|
+
hint: editor.hint
|
|
2328
|
+
})),
|
|
2329
|
+
required: false
|
|
2330
|
+
});
|
|
2331
|
+
if (isCancel(editors)) return exitCancelled("Operation cancelled");
|
|
2332
|
+
const rules = await multiselect({
|
|
2333
|
+
message: "Choose rules",
|
|
2334
|
+
options: Object.entries(RULES).map(([key, rule]) => ({
|
|
2335
|
+
value: key,
|
|
2336
|
+
label: rule.label,
|
|
2337
|
+
hint: rule.hint
|
|
2338
|
+
})),
|
|
2339
|
+
required: false
|
|
2340
|
+
});
|
|
2341
|
+
if (isCancel(rules)) return exitCancelled("Operation cancelled");
|
|
2342
|
+
const ultraciteArgs = [
|
|
2343
|
+
"init",
|
|
2344
|
+
"--pm",
|
|
2345
|
+
packageManager
|
|
2346
|
+
];
|
|
2347
|
+
if (editors.length > 0) ultraciteArgs.push("--editors", ...editors);
|
|
2348
|
+
if (rules.length > 0) ultraciteArgs.push("--rules", ...rules);
|
|
2349
|
+
if (hasHusky) ultraciteArgs.push("--features", "husky", "lint-staged");
|
|
2350
|
+
const ultraciteArgsString = ultraciteArgs.join(" ");
|
|
2351
|
+
const commandWithArgs = `ultracite@latest ${ultraciteArgsString} --skip-install`;
|
|
2352
|
+
const ultraciteInitCommand = getPackageExecutionCommand(packageManager, commandWithArgs);
|
|
2353
|
+
await execa(ultraciteInitCommand, {
|
|
2354
|
+
cwd: projectDir,
|
|
2355
|
+
env: { CI: "true" },
|
|
2356
|
+
shell: true
|
|
2357
|
+
});
|
|
2358
|
+
if (hasHusky) await addPackageDependency({
|
|
2359
|
+
devDependencies: ["husky", "lint-staged"],
|
|
2360
|
+
projectDir
|
|
2361
|
+
});
|
|
2362
|
+
log.success("Ultracite setup successfully!");
|
|
2363
|
+
} catch (error) {
|
|
2364
|
+
log.error(pc.red("Failed to set up Ultracite"));
|
|
2365
|
+
if (error instanceof Error) console.error(pc.red(error.message));
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2371
2369
|
//#endregion
|
|
2372
2370
|
//#region src/utils/ts-morph.ts
|
|
2373
2371
|
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.6",
|
|
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": "22773232ae864b0b38bb72f5bf12d433ee74803c"
|
|
83
87
|
}
|