@betterstart/cli 0.1.14 → 0.1.16

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 CHANGED
@@ -13599,6 +13599,7 @@ var initCommand = new Command3("init").description("Scaffold CMS into a new or e
13599
13599
  let cwd = process.cwd();
13600
13600
  let project = detectProject(cwd);
13601
13601
  let pm = detectPackageManager(cwd);
13602
+ let isFreshProject = false;
13602
13603
  let srcDir;
13603
13604
  if (project.isExisting) {
13604
13605
  p4.log.info(`Existing Next.js project detected`);
@@ -13655,6 +13656,7 @@ var initCommand = new Command3("init").description("Scaffold CMS into a new or e
13655
13656
  "--app",
13656
13657
  "--turbopack",
13657
13658
  "--biome",
13659
+ "--react-compiler",
13658
13660
  `--use-${pm}`
13659
13661
  ];
13660
13662
  if (srcDir) cnaArgs.push("--src-dir");
@@ -13694,6 +13696,7 @@ var initCommand = new Command3("init").description("Scaffold CMS into a new or e
13694
13696
  }
13695
13697
  p4.log.success(`Created ${displayName} Next.js project`);
13696
13698
  project = detectProject(cwd);
13699
+ isFreshProject = true;
13697
13700
  }
13698
13701
  const features = options.yes ? { includeEmail: true, preset: options.preset } : await promptFeatures(options.preset);
13699
13702
  let databaseUrl;
@@ -13876,6 +13879,18 @@ var initCommand = new Command3("init").description("Scaffold CMS into a new or e
13876
13879
  forms: formNames
13877
13880
  });
13878
13881
  }
13882
+ if (isFreshProject) {
13883
+ try {
13884
+ execFileSync4("git", ["init"], { cwd, stdio: "pipe" });
13885
+ execFileSync4("git", ["add", "."], { cwd, stdio: "pipe" });
13886
+ execFileSync4("git", ["commit", "-m", "Initial commit from BetterStart"], {
13887
+ cwd,
13888
+ stdio: "pipe"
13889
+ });
13890
+ p4.log.success("Created initial git commit");
13891
+ } catch {
13892
+ }
13893
+ }
13879
13894
  const totalFiles = baseFiles.length + dbFiles.length + authFiles.length + compFiles.length + layoutFiles.length + apiFiles.length;
13880
13895
  const summaryLines = [
13881
13896
  `Preset: ${pc2.cyan(features.preset)}`,