create-better-t-stack 2.35.1 → 2.35.3
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/{src-3Y_nBZWe.js → src-dID--AYy.js} +14 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1078,6 +1078,7 @@ function getDeploymentDisplay$1(deployment) {
|
|
|
1078
1078
|
async function getServerDeploymentChoice(deployment, runtime, backend, webDeploy) {
|
|
1079
1079
|
if (deployment !== void 0) return deployment;
|
|
1080
1080
|
if (backend === "none" || backend === "convex") return "none";
|
|
1081
|
+
if (backend !== "hono") return "none";
|
|
1081
1082
|
const options = [];
|
|
1082
1083
|
if (runtime === "workers") ["alchemy", "wrangler"].forEach((deploy) => {
|
|
1083
1084
|
const { label, hint } = getDeploymentDisplay$1(deploy);
|
|
@@ -1100,7 +1101,8 @@ async function getServerDeploymentChoice(deployment, runtime, backend, webDeploy
|
|
|
1100
1101
|
if (isCancel(response)) return exitCancelled("Operation cancelled");
|
|
1101
1102
|
return response;
|
|
1102
1103
|
}
|
|
1103
|
-
async function getServerDeploymentToAdd(runtime, existingDeployment) {
|
|
1104
|
+
async function getServerDeploymentToAdd(runtime, existingDeployment, backend) {
|
|
1105
|
+
if (backend !== "hono") return "none";
|
|
1104
1106
|
const options = [];
|
|
1105
1107
|
if (runtime === "workers") {
|
|
1106
1108
|
if (existingDeployment !== "wrangler") {
|
|
@@ -1158,11 +1160,13 @@ function getDeploymentDisplay(deployment) {
|
|
|
1158
1160
|
async function getDeploymentChoice(deployment, _runtime, _backend, frontend = []) {
|
|
1159
1161
|
if (deployment !== void 0) return deployment;
|
|
1160
1162
|
if (!hasWebFrontend(frontend)) return "none";
|
|
1161
|
-
const
|
|
1163
|
+
const hasIncompatibleFrontend = frontend.some((f) => f === "next" || f === "react-router");
|
|
1164
|
+
const availableDeployments = hasIncompatibleFrontend ? ["wrangler", "none"] : [
|
|
1162
1165
|
"wrangler",
|
|
1163
1166
|
"alchemy",
|
|
1164
1167
|
"none"
|
|
1165
|
-
]
|
|
1168
|
+
];
|
|
1169
|
+
const options = availableDeployments.map((deploy) => {
|
|
1166
1170
|
const { label, hint } = getDeploymentDisplay(deploy);
|
|
1167
1171
|
return {
|
|
1168
1172
|
value: deploy,
|
|
@@ -1173,13 +1177,14 @@ async function getDeploymentChoice(deployment, _runtime, _backend, frontend = []
|
|
|
1173
1177
|
const response = await select({
|
|
1174
1178
|
message: "Select web deployment",
|
|
1175
1179
|
options,
|
|
1176
|
-
initialValue: DEFAULT_CONFIG.webDeploy
|
|
1180
|
+
initialValue: hasIncompatibleFrontend ? "wrangler" : DEFAULT_CONFIG.webDeploy
|
|
1177
1181
|
});
|
|
1178
1182
|
if (isCancel(response)) return exitCancelled("Operation cancelled");
|
|
1179
1183
|
return response;
|
|
1180
1184
|
}
|
|
1181
1185
|
async function getDeploymentToAdd(frontend, existingDeployment) {
|
|
1182
1186
|
if (!hasWebFrontend(frontend)) return "none";
|
|
1187
|
+
const hasIncompatibleFrontend = frontend.some((f) => f === "next" || f === "react-router");
|
|
1183
1188
|
const options = [];
|
|
1184
1189
|
if (existingDeployment !== "wrangler") {
|
|
1185
1190
|
const { label, hint } = getDeploymentDisplay("wrangler");
|
|
@@ -1189,7 +1194,7 @@ async function getDeploymentToAdd(frontend, existingDeployment) {
|
|
|
1189
1194
|
hint
|
|
1190
1195
|
});
|
|
1191
1196
|
}
|
|
1192
|
-
if (existingDeployment !== "alchemy") {
|
|
1197
|
+
if (existingDeployment !== "alchemy" && !hasIncompatibleFrontend) {
|
|
1193
1198
|
const { label, hint } = getDeploymentDisplay("alchemy");
|
|
1194
1199
|
options.push({
|
|
1195
1200
|
value: "alchemy",
|
|
@@ -1207,7 +1212,7 @@ async function getDeploymentToAdd(frontend, existingDeployment) {
|
|
|
1207
1212
|
const response = await select({
|
|
1208
1213
|
message: "Select web deployment",
|
|
1209
1214
|
options,
|
|
1210
|
-
initialValue: DEFAULT_CONFIG.webDeploy
|
|
1215
|
+
initialValue: hasIncompatibleFrontend ? "wrangler" : DEFAULT_CONFIG.webDeploy
|
|
1211
1216
|
});
|
|
1212
1217
|
if (isCancel(response)) return exitCancelled("Operation cancelled");
|
|
1213
1218
|
return response;
|
|
@@ -2621,7 +2626,7 @@ async function setupUltracite(config, hasHusky) {
|
|
|
2621
2626
|
label: editor.label,
|
|
2622
2627
|
hint: editor.hint
|
|
2623
2628
|
})),
|
|
2624
|
-
required:
|
|
2629
|
+
required: true
|
|
2625
2630
|
});
|
|
2626
2631
|
if (isCancel(editors)) return exitCancelled("Operation cancelled");
|
|
2627
2632
|
const rules = await multiselect({
|
|
@@ -2631,7 +2636,7 @@ async function setupUltracite(config, hasHusky) {
|
|
|
2631
2636
|
label: rule.label,
|
|
2632
2637
|
hint: rule.hint
|
|
2633
2638
|
})),
|
|
2634
|
-
required:
|
|
2639
|
+
required: true
|
|
2635
2640
|
});
|
|
2636
2641
|
if (isCancel(rules)) return exitCancelled("Operation cancelled");
|
|
2637
2642
|
const ultraciteArgs = [
|
|
@@ -6154,7 +6159,7 @@ async function addAddonsHandler(input) {
|
|
|
6154
6159
|
if (deploymentPrompt !== "none") input.webDeploy = deploymentPrompt;
|
|
6155
6160
|
}
|
|
6156
6161
|
if (!input.serverDeploy) {
|
|
6157
|
-
const serverDeploymentPrompt = await getServerDeploymentToAdd(detectedConfig.runtime, detectedConfig.serverDeploy);
|
|
6162
|
+
const serverDeploymentPrompt = await getServerDeploymentToAdd(detectedConfig.runtime, detectedConfig.serverDeploy, detectedConfig.backend);
|
|
6158
6163
|
if (serverDeploymentPrompt !== "none") input.serverDeploy = serverDeploymentPrompt;
|
|
6159
6164
|
}
|
|
6160
6165
|
const packageManager = input.packageManager || detectedConfig.packageManager || "npm";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-better-t-stack",
|
|
3
|
-
"version": "2.35.
|
|
3
|
+
"version": "2.35.3",
|
|
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",
|