@igniter-js/cli 0.2.1 → 0.2.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/index.js +18 -34
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -2
package/dist/index.mjs
CHANGED
|
@@ -12513,48 +12513,36 @@ async function runSetupPrompts(targetDir, isExistingProject = false) {
|
|
|
12513
12513
|
format: (value) => value.trim().toLowerCase().replace(/\s+/g, "-")
|
|
12514
12514
|
},
|
|
12515
12515
|
{
|
|
12516
|
-
type: "select",
|
|
12516
|
+
type: !(isExistingProject && detectedFramework) ? "select" : null,
|
|
12517
|
+
// Show if not existing project OR if existing but no framework detected
|
|
12517
12518
|
name: "framework",
|
|
12518
|
-
message:
|
|
12519
|
+
message: "\u2022 Which starter would you like to use?",
|
|
12519
12520
|
choices: [
|
|
12520
12521
|
{
|
|
12521
|
-
title: `${chalk2.green("Next.js")} ${
|
|
12522
|
-
value: "nextjs"
|
|
12523
|
-
},
|
|
12524
|
-
{
|
|
12525
|
-
title: `${chalk2.yellow("Vite")} ${detectedFramework === "vite" ? chalk2.dim("(detected)") : ""}`,
|
|
12526
|
-
value: "vite"
|
|
12527
|
-
},
|
|
12528
|
-
{
|
|
12529
|
-
title: `${chalk2.cyan("Nuxt")} ${detectedFramework === "nuxt" ? chalk2.dim("(detected)") : ""}`,
|
|
12530
|
-
value: "nuxt"
|
|
12522
|
+
title: `${chalk2.green("Next.js")} ${chalk2.dim("(Fullstack)")}`,
|
|
12523
|
+
value: "starter-nextjs"
|
|
12531
12524
|
},
|
|
12532
12525
|
{
|
|
12533
|
-
title: `${chalk2.
|
|
12534
|
-
value: "
|
|
12526
|
+
title: `${chalk2.yellow("Express.js")} ${chalk2.dim("(REST API)")}`,
|
|
12527
|
+
value: "starter-express-rest-api"
|
|
12535
12528
|
},
|
|
12536
12529
|
{
|
|
12537
|
-
title: `${chalk2.
|
|
12538
|
-
value: "
|
|
12530
|
+
title: `${chalk2.cyan("Deno")} ${chalk2.dim("(REST API)")}`,
|
|
12531
|
+
value: "starter-deno-rest-api"
|
|
12539
12532
|
},
|
|
12540
12533
|
{
|
|
12541
|
-
title: `${chalk2.
|
|
12542
|
-
value: "
|
|
12534
|
+
title: `${chalk2.magenta("Bun")} ${chalk2.dim("(REST API)")}`,
|
|
12535
|
+
value: "starter-bun-rest-api"
|
|
12543
12536
|
},
|
|
12544
12537
|
{
|
|
12545
|
-
title: `${chalk2.
|
|
12546
|
-
value: "
|
|
12538
|
+
title: `${chalk2.red("Bun + React (Vite)")} ${chalk2.dim("(Fullstack)")}`,
|
|
12539
|
+
value: "starter-bun-react-app"
|
|
12547
12540
|
},
|
|
12548
12541
|
{
|
|
12549
|
-
title: `${chalk2.magenta("TanStack Start")} ${
|
|
12550
|
-
value: "tanstack-start"
|
|
12551
|
-
},
|
|
12552
|
-
{
|
|
12553
|
-
title: chalk2.gray("Generic/Other"),
|
|
12554
|
-
value: "generic"
|
|
12542
|
+
title: `${chalk2.magenta("TanStack Start")} ${chalk2.dim("(Fullstack)")}`,
|
|
12543
|
+
value: "starter-tanstack-start"
|
|
12555
12544
|
}
|
|
12556
|
-
]
|
|
12557
|
-
initial: getFrameworkChoiceIndex(detectedFramework)
|
|
12545
|
+
]
|
|
12558
12546
|
},
|
|
12559
12547
|
{
|
|
12560
12548
|
type: "multiselect",
|
|
@@ -12714,10 +12702,6 @@ function showConfigSummary(config) {
|
|
|
12714
12702
|
}
|
|
12715
12703
|
console.log();
|
|
12716
12704
|
}
|
|
12717
|
-
function getFrameworkChoiceIndex(detected) {
|
|
12718
|
-
const frameworks = ["nextjs", "vite", "nuxt", "sveltekit", "remix", "astro", "express", "tanstack-start", "generic"];
|
|
12719
|
-
return Math.max(0, frameworks.indexOf(detected));
|
|
12720
|
-
}
|
|
12721
12705
|
function getPackageManagerChoiceIndex(detected) {
|
|
12722
12706
|
const managers = ["npm", "yarn", "pnpm", "bun"];
|
|
12723
12707
|
return Math.max(0, managers.indexOf(detected));
|
|
@@ -13600,9 +13584,9 @@ var ProjectGenerator = class {
|
|
|
13600
13584
|
async downloadTemplate() {
|
|
13601
13585
|
const { framework } = this.config;
|
|
13602
13586
|
const templateUrl = `https://github.com/felipebarcelospro/igniter-js.git`;
|
|
13603
|
-
const branch = "
|
|
13587
|
+
const branch = "main";
|
|
13604
13588
|
const tempDir = path4.join(this.targetDir, "__igniter_tmp__");
|
|
13605
|
-
const starterDir = path4.join(tempDir, "apps",
|
|
13589
|
+
const starterDir = path4.join(tempDir, "apps", framework);
|
|
13606
13590
|
const destDir = this.targetDir;
|
|
13607
13591
|
let isValidStarter = false;
|
|
13608
13592
|
this.spinner.start(`Baixando apenas o conte\xFAdo da pasta starter (${framework}) do branch ${branch}...`);
|