@uipath/cli 1.197.0-preview.70 → 1.197.0-preview.72

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
@@ -45866,7 +45866,7 @@ var init_package = __esm(() => {
45866
45866
  package_default = {
45867
45867
  name: "@uipath/cli",
45868
45868
  license: "MIT",
45869
- version: "1.197.0-preview.70",
45869
+ version: "1.197.0-preview.72",
45870
45870
  description: "Cross platform CLI for UiPath",
45871
45871
  repository: {
45872
45872
  type: "git",
@@ -82430,11 +82430,26 @@ function renderTableHelp(cmd, helper) {
82430
82430
  `)}
82431
82431
  `;
82432
82432
  }
82433
+ function rendersTableHelp() {
82434
+ return getOutputFormat() === "table" || !getOutputFormatExplicit() && getOutputSink().capabilities.isInteractive;
82435
+ }
82436
+ function stripHelpTextEventsForStructuredHelp(root) {
82437
+ if (rendersTableHelp()) {
82438
+ return;
82439
+ }
82440
+ const stack = [root];
82441
+ while (stack.length > 0) {
82442
+ const cmd = stack.pop();
82443
+ for (const event of HELP_TEXT_EVENTS) {
82444
+ cmd.removeAllListeners(event);
82445
+ }
82446
+ stack.push(...cmd.commands);
82447
+ }
82448
+ }
82433
82449
  function createHelpConfiguration(isBrowser3) {
82434
82450
  const config2 = {
82435
82451
  formatHelp(cmd, helper) {
82436
- const format2 = getOutputFormat();
82437
- if (format2 === "table" || !getOutputFormatExplicit() && getOutputSink().capabilities.isInteractive) {
82452
+ if (rendersTableHelp()) {
82438
82453
  return renderTableHelp(cmd, helper);
82439
82454
  }
82440
82455
  const baseHelp = extractCommandHelp(cmd, helper);
@@ -82478,7 +82493,7 @@ function createHelpConfiguration(isBrowser3) {
82478
82493
  }
82479
82494
  return config2;
82480
82495
  }
82481
- var GLOBAL_OPTIONS, BUILT_IN_ROOT_COMMANDS, GETTING_STARTED_ROWS;
82496
+ var GLOBAL_OPTIONS, BUILT_IN_ROOT_COMMANDS, GETTING_STARTED_ROWS, HELP_TEXT_EVENTS;
82482
82497
  var init_helpFormatter = __esm(() => {
82483
82498
  init_src2();
82484
82499
  GLOBAL_OPTIONS = [
@@ -82527,6 +82542,12 @@ var init_helpFormatter = __esm(() => {
82527
82542
  Description: "Install AI-agent skills for this CLI"
82528
82543
  }
82529
82544
  ];
82545
+ HELP_TEXT_EVENTS = [
82546
+ "beforeAllHelp",
82547
+ "beforeHelp",
82548
+ "afterHelp",
82549
+ "afterAllHelp"
82550
+ ];
82530
82551
  });
82531
82552
 
82532
82553
  // src/utils/parseError.ts
@@ -107932,15 +107953,17 @@ async function pmResolveTarball(pm, version2) {
107932
107953
  return typeof value === "string" && value.length > 0 ? value : undefined;
107933
107954
  }
107934
107955
  function normalizeVersionList(value) {
107935
- if (Array.isArray(value)) {
107936
- return value.filter((version2) => {
107937
- return typeof version2 === "string";
107938
- });
107939
- }
107940
- if (typeof value === "string") {
107941
- return [value];
107942
- }
107943
- return [];
107956
+ const collected = new Set;
107957
+ const walk = (node2) => {
107958
+ if (typeof node2 === "string") {
107959
+ collected.add(node2);
107960
+ } else if (Array.isArray(node2)) {
107961
+ for (const child of node2)
107962
+ walk(child);
107963
+ }
107964
+ };
107965
+ walk(value);
107966
+ return [...collected];
107944
107967
  }
107945
107968
  function requireString(value, message) {
107946
107969
  if (typeof value !== "string" || value.length === 0) {
@@ -115104,6 +115127,7 @@ function registerToolCommands(program2, discovered, context) {
115104
115127
  });
115105
115128
  return;
115106
115129
  }
115130
+ stripHelpTextEventsForStructuredHelp(realCommand);
115107
115131
  const toolArgs = context.args.slice(2);
115108
115132
  const candidates = [entry.commandPrefix, ...aliases];
115109
115133
  const prefixIdx = toolArgs.findIndex((a) => candidates.includes(a));
@@ -115127,6 +115151,7 @@ function registerToolCommands(program2, discovered, context) {
115127
115151
  var init_registerToolCommands = __esm(() => {
115128
115152
  init_src2();
115129
115153
  init_tools_whitelist();
115154
+ init_helpFormatter();
115130
115155
  init_toolLoader();
115131
115156
  });
115132
115157
 
@@ -115415,4 +115440,4 @@ export {
115415
115440
  ready
115416
115441
  };
115417
115442
 
115418
- //# debugId=C75D6DF22C043EE264756E2164756E21
115443
+ //# debugId=03E7583ECD8A4DC364756E2164756E21
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/cli",
3
3
  "license": "MIT",
4
- "version": "1.197.0-preview.70",
4
+ "version": "1.197.0-preview.72",
5
5
  "description": "Cross platform CLI for UiPath",
6
6
  "repository": {
7
7
  "type": "git",
@@ -34,5 +34,5 @@
34
34
  "mihaigirleanu",
35
35
  "vlad-uipath"
36
36
  ],
37
- "gitHead": "d681f04331bf787e58d1ed16c1ff0561283d7515"
37
+ "gitHead": "48fffca43e14c79d4dc2845db7d56f315c1bbfc5"
38
38
  }