@vocoder/cli 0.2.0 → 0.2.2
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 +24 -12
- package/dist/bin.mjs.map +1 -1
- package/dist/{chunk-JTRTTGYF.mjs → chunk-TFAPB25S.mjs} +20 -13
- package/dist/chunk-TFAPB25S.mjs.map +1 -0
- package/dist/lib.d.mts +13 -4
- package/dist/lib.mjs +3 -5
- package/dist/lib.mjs.map +1 -1
- package/package.json +3 -2
- package/dist/chunk-JTRTTGYF.mjs.map +0 -1
package/dist/bin.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
detectLocalEcosystem,
|
|
6
6
|
getPackagesToInstall,
|
|
7
7
|
getSetupSnippets
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TFAPB25S.mjs";
|
|
9
9
|
|
|
10
10
|
// src/bin.ts
|
|
11
11
|
import { Command } from "commander";
|
|
@@ -747,7 +747,7 @@ function writeVocoderConfig(options) {
|
|
|
747
747
|
const configPath = join2(cwd, "vocoder.config.ts");
|
|
748
748
|
if (existsSync(configPath)) return false;
|
|
749
749
|
const branchesStr = targetBranches.map((b) => `'${b}'`).join(", ");
|
|
750
|
-
const content = `import { defineConfig } from '@vocoder/
|
|
750
|
+
const content = `import { defineConfig } from '@vocoder/config'
|
|
751
751
|
|
|
752
752
|
export default defineConfig({
|
|
753
753
|
targetBranches: [${branchesStr}],
|
|
@@ -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
|
|
2008
|
-
|
|
2009
|
-
|
|
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 ${
|
|
2012
|
+
installSpinner.start(`Installing ${allPackages.join(", ")}...`);
|
|
2016
2013
|
try {
|
|
2017
|
-
|
|
2018
|
-
|
|
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
|
-
|
|
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")}`);
|