@cannbot-ai/install-helper 0.0.2-beta.7 → 0.0.2-beta.8

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/index.js CHANGED
@@ -1926,10 +1926,13 @@ async function installPlugin(opts) {
1926
1926
  if (existsSync9(agentsFile)) {
1927
1927
  const currentPlugin = detectCurrentPlugin(configRoot, opts.tool);
1928
1928
  if (currentPlugin && currentPlugin.pluginId !== opts.pluginId) {
1929
- const choice = await showOverwriteWarning(
1930
- currentPlugin.pluginName,
1931
- plugin.displayName
1932
- );
1929
+ let choice = "overwrite";
1930
+ if (!opts.yes) {
1931
+ choice = await showOverwriteWarning(
1932
+ currentPlugin.pluginName,
1933
+ plugin.displayName
1934
+ );
1935
+ }
1933
1936
  if (choice === "cancel") {
1934
1937
  logger.info(t("backup_cancel"));
1935
1938
  return {
@@ -1953,11 +1956,13 @@ async function installPlugin(opts) {
1953
1956
  }
1954
1957
  }
1955
1958
  try {
1956
- await execa3("bash", [scriptPath, ...args], {
1959
+ const execOptions = {
1957
1960
  cwd,
1958
1961
  timeout: 3e5,
1959
- stdio: "pipe"
1960
- });
1962
+ stdio: "pipe",
1963
+ input: opts.yes ? "y\n" : void 0
1964
+ };
1965
+ await execa3("bash", [scriptPath, ...args], execOptions);
1961
1966
  const manifest = readManifest(configRoot);
1962
1967
  let skillsCount = 0;
1963
1968
  let agentsCount = 0;
@@ -2877,7 +2882,9 @@ async function installCommand(names, options) {
2877
2882
  pluginsToInstall,
2878
2883
  tool,
2879
2884
  level,
2880
- repoPath
2885
+ repoPath,
2886
+ void 0,
2887
+ options.yes
2881
2888
  );
2882
2889
  const summary = results.map((result) => {
2883
2890
  const plugin = allPlugins.find((p) => p.id === result.pluginId);
@@ -3231,7 +3238,7 @@ function createCLI() {
3231
3238
  setLanguage(config.language);
3232
3239
  }
3233
3240
  const program2 = new Command();
3234
- program2.name("install-helper").description("CANNBot Install Helper - Interactive installer for CANN operator development skills").version("0.0.2-beta.7");
3241
+ program2.name("install-helper").description("CANNBot Install Helper - Interactive installer for CANN operator development skills").version("0.0.2-beta.8");
3235
3242
  program2.command("init", { isDefault: false }).description("Run interactive installation wizard").action(async () => {
3236
3243
  await initCommand();
3237
3244
  });