@vocoder/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/bin.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  detectLocalEcosystem,
6
6
  getPackagesToInstall,
7
7
  getSetupSnippets
8
- } from "./chunk-LHEEDIEX.mjs";
8
+ } from "./chunk-TFAPB25S.mjs";
9
9
 
10
10
  // src/bin.ts
11
11
  import { Command } from "commander";
@@ -2004,21 +2004,33 @@ function runScaffold(params) {
2004
2004
  const pmLabel = detection.packageManager;
2005
2005
  p5.log.info(`Detected: ${chalk6.bold(frameworkLabel)} (${pmLabel})`);
2006
2006
  }
2007
- const packagesToInstall = getPackagesToInstall(detection);
2008
- if (packagesToInstall.length > 0) {
2009
- const installCmd = buildInstallCommand(
2010
- detection.packageManager,
2011
- packagesToInstall
2012
- );
2007
+ const { devPackages, runtimePackages } = getPackagesToInstall(detection);
2008
+ const allPackages = [...devPackages, ...runtimePackages];
2009
+ if (allPackages.length > 0) {
2013
2010
  p5.log.info("");
2014
2011
  const installSpinner = p5.spinner();
2015
- installSpinner.start(`Installing ${packagesToInstall.join(", ")}...`);
2012
+ installSpinner.start(`Installing ${allPackages.join(", ")}...`);
2016
2013
  try {
2017
- execSync3(installCmd, { stdio: "pipe", cwd: process.cwd() });
2018
- installSpinner.stop(`Installed ${packagesToInstall.join(", ")}`);
2014
+ if (devPackages.length > 0) {
2015
+ execSync3(
2016
+ buildInstallCommand(detection.packageManager, devPackages, true),
2017
+ { stdio: "pipe", cwd: process.cwd() }
2018
+ );
2019
+ }
2020
+ if (runtimePackages.length > 0) {
2021
+ execSync3(
2022
+ buildInstallCommand(detection.packageManager, runtimePackages, false),
2023
+ { stdio: "pipe", cwd: process.cwd() }
2024
+ );
2025
+ }
2026
+ installSpinner.stop(`Installed ${allPackages.join(", ")}`);
2019
2027
  } catch {
2020
2028
  installSpinner.stop("Package installation failed");
2021
- p5.log.warn(`Run manually: ${chalk6.cyan(installCmd)}`);
2029
+ const cmds = [
2030
+ devPackages.length > 0 ? buildInstallCommand(detection.packageManager, devPackages, true) : null,
2031
+ runtimePackages.length > 0 ? buildInstallCommand(detection.packageManager, runtimePackages, false) : null
2032
+ ].filter(Boolean).join(" && ");
2033
+ p5.log.warn(`Run manually: ${chalk6.cyan(cmds)}`);
2022
2034
  }
2023
2035
  } else if (detection.ecosystem) {
2024
2036
  p5.log.info(`Packages: ${chalk6.green("already installed")}`);