@configjs/cli 1.0.6 → 1.0.7

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
@@ -5,7 +5,7 @@ import "./chunk-QGM4M3NI.js";
5
5
  import { Command } from "commander";
6
6
 
7
7
  // package.json
8
- var version = "1.0.6";
8
+ var version = "1.0.7";
9
9
 
10
10
  // src/cli.ts
11
11
  var program = new Command();
@@ -13,7 +13,7 @@ program.name("confjs").description("Configure your frontend stack, instantly").v
13
13
  program.command("react").description("Configure a React project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
14
14
  async (options) => {
15
15
  try {
16
- const { installReact } = await import("./install-GBC5BFJA.js");
16
+ const { installReact } = await import("./install-MRYZACCX.js");
17
17
  await installReact(options);
18
18
  } catch (error) {
19
19
  console.error("Error:", error);
@@ -558,15 +558,16 @@ var Installer = class {
558
558
  */
559
559
  async installPackages(plugins) {
560
560
  const results = [];
561
- const installPromises = plugins.map(async (plugin) => {
561
+ for (const plugin of plugins) {
562
562
  try {
563
563
  if (plugin.detect && await plugin.detect(this.ctx)) {
564
564
  logger.debug(`${plugin.displayName} is already installed`);
565
- return {
565
+ results.push({
566
566
  packages: {},
567
567
  success: true,
568
568
  message: "Already installed"
569
- };
569
+ });
570
+ continue;
570
571
  }
571
572
  if (plugin.preInstall) {
572
573
  await plugin.preInstall(this.ctx);
@@ -575,22 +576,20 @@ var Installer = class {
575
576
  if (plugin.postInstall) {
576
577
  await plugin.postInstall(this.ctx);
577
578
  }
578
- return result;
579
+ results.push(result);
579
580
  } catch (error) {
580
581
  const errorMessage = error instanceof Error ? error.message : String(error);
581
582
  logger.error(`Failed to install ${plugin.displayName}: ${errorMessage}`);
582
- return {
583
+ results.push({
583
584
  packages: {},
584
585
  success: false,
585
586
  message: errorMessage
586
- };
587
+ });
587
588
  }
588
- });
589
- const installResults = await Promise.all(installPromises);
590
- results.push(...installResults);
589
+ }
591
590
  const allDependencies = [];
592
591
  const allDevDependencies = [];
593
- for (const result of installResults) {
592
+ for (const result of results) {
594
593
  if (result.success && result.packages) {
595
594
  if (result.packages.dependencies) {
596
595
  allDependencies.push(...result.packages.dependencies);
@@ -611,7 +610,6 @@ var Installer = class {
611
610
  dev: false,
612
611
  silent: false
613
612
  });
614
- await new Promise((resolve) => setTimeout(resolve, 500));
615
613
  }
616
614
  if (devDepsToInstall.length > 0) {
617
615
  await installPackages(devDepsToInstall, {
@@ -620,7 +618,6 @@ var Installer = class {
620
618
  dev: true,
621
619
  silent: false
622
620
  });
623
- await new Promise((resolve) => setTimeout(resolve, 500));
624
621
  }
625
622
  }
626
623
  return results;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@configjs/cli",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "type": "module",
5
5
  "description": "Configure your frontend stack, instantly - Utilitaire CLI d'installation modulaire de bibliothèques frontend",
6
6
  "keywords": [