@wolfstar/create-http-framework 2.1.3 → 2.1.4-next-20260827143053

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.
Files changed (2) hide show
  1. package/dist/index.js +47 -43
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -547,26 +547,28 @@ async function main() {
547
547
  packageManager = pmResult;
548
548
  }
549
549
  const targetDir = resolve(projectName);
550
- if (directoryExists(targetDir) && !isEmpty(targetDir)) if (flagOverwrite) emptyDir(targetDir);
551
- else if (nonInteractive) {
552
- cancel(`"${projectName}" already exists. Use --overwrite to overwrite it.`);
553
- process.exit(1);
554
- } else {
555
- const choice = await select({
556
- message: `"${projectName}" already exists. What would you like to do?`,
557
- options: [{
558
- value: "overwrite",
559
- label: "Overwrite the directory"
560
- }, {
561
- value: "cancel",
562
- label: "Cancel"
563
- }]
564
- });
565
- if (isCancel(choice) || choice === "cancel") {
566
- cancel("Operation cancelled.");
567
- process.exit(0);
550
+ if (directoryExists(targetDir) && !isEmpty(targetDir)) {
551
+ if (flagOverwrite) emptyDir(targetDir);
552
+ else if (nonInteractive) {
553
+ cancel(`"${projectName}" already exists. Use --overwrite to overwrite it.`);
554
+ process.exit(1);
555
+ } else {
556
+ const choice = await select({
557
+ message: `"${projectName}" already exists. What would you like to do?`,
558
+ options: [{
559
+ value: "overwrite",
560
+ label: "Overwrite the directory"
561
+ }, {
562
+ value: "cancel",
563
+ label: "Cancel"
564
+ }]
565
+ });
566
+ if (isCancel(choice) || choice === "cancel") {
567
+ cancel("Operation cancelled.");
568
+ process.exit(0);
569
+ }
570
+ emptyDir(targetDir);
568
571
  }
569
- emptyDir(targetDir);
570
572
  }
571
573
  let port;
572
574
  if (nonInteractive) {
@@ -613,31 +615,33 @@ async function main() {
613
615
  }
614
616
  let buildTool = "tsdown";
615
617
  if (cliBuild !== void 0 && language === "js") log.warn("--build only applies to TypeScript projects and will be ignored.");
616
- if (language === "ts") if (nonInteractive) buildTool = cliBuild ?? "tsdown";
617
- else {
618
- const buildResult = await select({
619
- message: "Which build tool would you like to use?",
620
- options: [
621
- {
622
- value: "tsdown",
623
- label: "tsdown (bundler)"
624
- },
625
- {
626
- value: "tsc6",
627
- label: "TypeScript 6.0 (tsc)"
628
- },
629
- {
630
- value: "tsc7",
631
- label: "TypeScript 7.0 rc (tsc)"
632
- }
633
- ],
634
- initialValue: "tsdown"
635
- });
636
- if (isCancel(buildResult)) {
637
- cancel("Operation cancelled.");
638
- process.exit(0);
618
+ if (language === "ts") {
619
+ if (nonInteractive) buildTool = cliBuild ?? "tsdown";
620
+ else {
621
+ const buildResult = await select({
622
+ message: "Which build tool would you like to use?",
623
+ options: [
624
+ {
625
+ value: "tsdown",
626
+ label: "tsdown (bundler)"
627
+ },
628
+ {
629
+ value: "tsc6",
630
+ label: "TypeScript 6.0 (tsc)"
631
+ },
632
+ {
633
+ value: "tsc7",
634
+ label: "TypeScript 7.0 rc (tsc)"
635
+ }
636
+ ],
637
+ initialValue: "tsdown"
638
+ });
639
+ if (isCancel(buildResult)) {
640
+ cancel("Operation cancelled.");
641
+ process.exit(0);
642
+ }
643
+ buildTool = buildResult;
639
644
  }
640
- buildTool = buildResult;
641
645
  }
642
646
  let linter;
643
647
  if (nonInteractive) linter = cliLint ?? "oxlint";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wolfstar/create-http-framework",
3
- "version": "2.1.3",
3
+ "version": "2.1.4-next-20260827143053",
4
4
  "description": "Create a new WolfStar HTTP Framework bot project",
5
5
  "keywords": [
6
6
  "cli",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@clack/prompts": "^1.7.0",
38
- "@vercel/detect-agent": "^1.2.3",
38
+ "@vercel/detect-agent": "^1.2.5",
39
39
  "cross-spawn": "^7.0.6",
40
40
  "handlebars": "^4.7.9",
41
41
  "mri": "^1.2.0",