create-better-t-stack 2.50.0 → 2.50.1

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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { createBtsCli } from "./src-BFx0Xu3C.js";
2
+ import { createBtsCli } from "./src-B8TD9m4n.js";
3
3
 
4
4
  //#region src/cli.ts
5
5
  createBtsCli().run();
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { builder, createBtsCli, docs, init, router, sponsors } from "./src-BFx0Xu3C.js";
2
+ import { builder, createBtsCli, docs, init, router, sponsors } from "./src-B8TD9m4n.js";
3
3
 
4
4
  export { builder, createBtsCli, docs, init, router, sponsors };
@@ -4606,14 +4606,13 @@ async function commandExists(command) {
4606
4606
  //#endregion
4607
4607
  //#region src/helpers/database-providers/mongodb-atlas-setup.ts
4608
4608
  async function checkAtlasCLI() {
4609
- const s = spinner();
4610
- s.start("Checking for MongoDB Atlas CLI...");
4611
4609
  try {
4612
4610
  const exists = await commandExists("atlas");
4613
- s.stop(exists ? "MongoDB Atlas CLI found" : pc.yellow("MongoDB Atlas CLI not found"));
4611
+ if (exists) log.info("MongoDB Atlas CLI found");
4612
+ else log.warn(pc.yellow("MongoDB Atlas CLI not found"));
4614
4613
  return exists;
4615
4614
  } catch (_error) {
4616
- s.stop(pc.red("Error checking MongoDB Atlas CLI"));
4615
+ log.error(pc.red("Error checking MongoDB Atlas CLI"));
4617
4616
  return false;
4618
4617
  }
4619
4618
  }
@@ -4624,12 +4623,13 @@ async function initMongoDBAtlas(serverDir) {
4624
4623
  log.info(pc.yellow("Please install it from: https://www.mongodb.com/docs/atlas/cli/current/install-atlas-cli/"));
4625
4624
  return null;
4626
4625
  }
4627
- log.info(pc.blue("Running MongoDB Atlas setup..."));
4626
+ log.info("Running MongoDB Atlas setup...");
4628
4627
  await execa("atlas", ["deployments", "setup"], {
4629
4628
  cwd: serverDir,
4629
+ shell: true,
4630
4630
  stdio: "inherit"
4631
4631
  });
4632
- log.info(pc.green("MongoDB Atlas deployment ready"));
4632
+ log.success("MongoDB Atlas deployment ready");
4633
4633
  const connectionString = await text({
4634
4634
  message: "Enter your MongoDB connection string:",
4635
4635
  placeholder: "mongodb+srv://username:password@cluster.mongodb.net/database",
@@ -4681,13 +4681,11 @@ ${pc.green("MongoDB Atlas Manual Setup Instructions:")}
4681
4681
  async function setupMongoDBAtlas(config, cliInput) {
4682
4682
  const { projectDir } = config;
4683
4683
  const manualDb = cliInput?.manualDb ?? false;
4684
- const mainSpinner = spinner();
4685
- mainSpinner.start("Setting up MongoDB Atlas...");
4686
4684
  const serverDir = path.join(projectDir, "apps/server");
4687
4685
  try {
4688
4686
  await fs.ensureDir(serverDir);
4689
4687
  if (manualDb) {
4690
- mainSpinner.stop("MongoDB Atlas manual setup selected");
4688
+ log.info("MongoDB Atlas manual setup selected");
4691
4689
  await writeEnvFile$3(projectDir);
4692
4690
  displayManualSetupInstructions$3();
4693
4691
  return;
@@ -4707,15 +4705,14 @@ async function setupMongoDBAtlas(config, cliInput) {
4707
4705
  });
4708
4706
  if (isCancel(mode)) return exitCancelled("Operation cancelled");
4709
4707
  if (mode === "manual") {
4710
- mainSpinner.stop("MongoDB Atlas manual setup selected");
4708
+ log.info("MongoDB Atlas manual setup selected");
4711
4709
  await writeEnvFile$3(projectDir);
4712
4710
  displayManualSetupInstructions$3();
4713
4711
  return;
4714
4712
  }
4715
- mainSpinner.stop("MongoDB Atlas setup ready");
4716
- const config$1 = await initMongoDBAtlas(serverDir);
4717
- if (config$1) {
4718
- await writeEnvFile$3(projectDir, config$1);
4713
+ const atlasConfig = await initMongoDBAtlas(serverDir);
4714
+ if (atlasConfig) {
4715
+ await writeEnvFile$3(projectDir, atlasConfig);
4719
4716
  log.success(pc.green("MongoDB Atlas setup complete! Connection saved to .env file."));
4720
4717
  } else {
4721
4718
  log.warn(pc.yellow("Falling back to local MongoDB configuration"));
@@ -4723,7 +4720,6 @@ async function setupMongoDBAtlas(config, cliInput) {
4723
4720
  displayManualSetupInstructions$3();
4724
4721
  }
4725
4722
  } catch (error) {
4726
- mainSpinner.stop(pc.red("MongoDB Atlas setup failed"));
4727
4723
  consola.error(pc.red(`Error during MongoDB Atlas setup: ${error instanceof Error ? error.message : String(error)}`));
4728
4724
  try {
4729
4725
  await writeEnvFile$3(projectDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-better-t-stack",
3
- "version": "2.50.0",
3
+ "version": "2.50.1",
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",