@cannbot-ai/install-helper 0.0.2-beta.24 → 0.0.2-beta.26

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
@@ -552,6 +552,25 @@ import chalk2 from "chalk";
552
552
  var selectTheme = {
553
553
  helpMode: "never"
554
554
  };
555
+ function wrapDescription(text) {
556
+ const prefix = " \u{1F4A1} ";
557
+ const indent = " ";
558
+ const cols = process.stdout.columns || 120;
559
+ const maxLen = Math.max(20, cols - prefix.length - 1);
560
+ const words = text.split(/(\s+)/);
561
+ const lines = [];
562
+ let line = "";
563
+ for (const word of words) {
564
+ if ((line + word).length > maxLen && line) {
565
+ lines.push(line.trimEnd());
566
+ line = word.trimStart();
567
+ } else {
568
+ line += word;
569
+ }
570
+ }
571
+ if (line) lines.push(line.trimEnd());
572
+ return lines.map((l, i) => chalk2.cyan(i === 0 ? prefix + l : indent + l)).join("\n");
573
+ }
555
574
  var checkboxTheme = {
556
575
  icon: {
557
576
  checked: "\x1B[32m\u2611\x1B[22m",
@@ -560,7 +579,7 @@ var checkboxTheme = {
560
579
  },
561
580
  helpMode: "never",
562
581
  style: {
563
- description: (text) => chalk2.dim(text)
582
+ description: (text) => wrapDescription(text)
564
583
  }
565
584
  };
566
585
 
@@ -3170,7 +3189,7 @@ function createCLI() {
3170
3189
  setLanguage(config.language);
3171
3190
  }
3172
3191
  const program2 = new Command();
3173
- program2.name("install-helper").description("CANNBot Install Helper - Interactive installer for CANN operator development skills").version("0.0.2-beta.24");
3192
+ program2.name("install-helper").description("CANNBot Install Helper - Interactive installer for CANN operator development skills").version("0.0.2-beta.26");
3174
3193
  program2.command("init", { isDefault: false }).description("Run interactive installation wizard").action(async () => {
3175
3194
  await initCommand();
3176
3195
  });