@betterstart/cli 0.1.7 → 0.1.8
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 +19 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -13580,10 +13580,10 @@ var initCommand = new Command3("init").description("Scaffold CMS into a new or e
|
|
|
13580
13580
|
let cwd = process.cwd();
|
|
13581
13581
|
let project = detectProject(cwd);
|
|
13582
13582
|
let pm = detectPackageManager(cwd);
|
|
13583
|
-
p4.log.info(`Package manager: ${pc2.cyan(pm)}`);
|
|
13584
13583
|
let srcDir;
|
|
13585
13584
|
if (project.isExisting) {
|
|
13586
13585
|
p4.log.info(`Existing Next.js project detected`);
|
|
13586
|
+
p4.log.info(`Package manager: ${pc2.cyan(pm)}`);
|
|
13587
13587
|
srcDir = project.hasSrcDir;
|
|
13588
13588
|
if (!project.hasTypeScript) {
|
|
13589
13589
|
p4.log.error("TypeScript is required. Please add a tsconfig.json first.");
|
|
@@ -13609,6 +13609,22 @@ var initCommand = new Command3("init").description("Scaffold CMS into a new or e
|
|
|
13609
13609
|
p4.log.info("No Next.js project found \u2014 fresh project mode");
|
|
13610
13610
|
const projectPrompt = await promptProject(name);
|
|
13611
13611
|
srcDir = projectPrompt.useSrcDir;
|
|
13612
|
+
if (!options.yes) {
|
|
13613
|
+
const pmChoice = await p4.select({
|
|
13614
|
+
message: "Which package manager do you want to use?",
|
|
13615
|
+
options: [
|
|
13616
|
+
{ value: "pnpm", label: "pnpm", hint: "recommended" },
|
|
13617
|
+
{ value: "npm", label: "npm" },
|
|
13618
|
+
{ value: "yarn", label: "yarn" },
|
|
13619
|
+
{ value: "bun", label: "bun" }
|
|
13620
|
+
]
|
|
13621
|
+
});
|
|
13622
|
+
if (p4.isCancel(pmChoice)) {
|
|
13623
|
+
p4.cancel("Setup cancelled.");
|
|
13624
|
+
process.exit(0);
|
|
13625
|
+
}
|
|
13626
|
+
pm = pmChoice;
|
|
13627
|
+
}
|
|
13612
13628
|
const cnaSpinner = p4.spinner();
|
|
13613
13629
|
cnaSpinner.start(`Creating Next.js app: ${projectPrompt.projectName}...`);
|
|
13614
13630
|
try {
|
|
@@ -13620,7 +13636,8 @@ var initCommand = new Command3("init").description("Scaffold CMS into a new or e
|
|
|
13620
13636
|
"--app",
|
|
13621
13637
|
"--no-git",
|
|
13622
13638
|
"--no-import-alias",
|
|
13623
|
-
"--turbopack"
|
|
13639
|
+
"--turbopack",
|
|
13640
|
+
`--use-${pm}`
|
|
13624
13641
|
];
|
|
13625
13642
|
if (srcDir) cnaArgs.push("--src-dir");
|
|
13626
13643
|
else cnaArgs.push("--no-src-dir");
|
|
@@ -13642,7 +13659,6 @@ var initCommand = new Command3("init").description("Scaffold CMS into a new or e
|
|
|
13642
13659
|
}
|
|
13643
13660
|
cwd = path37.resolve(cwd, projectPrompt.projectName);
|
|
13644
13661
|
project = detectProject(cwd);
|
|
13645
|
-
pm = detectPackageManager(cwd);
|
|
13646
13662
|
}
|
|
13647
13663
|
const features = options.yes ? { includeEmail: true, preset: options.preset } : await promptFeatures(options.preset);
|
|
13648
13664
|
let databaseUrl;
|