@robinmordasiewicz/f5xc-xcsh 1.0.91-2601041630 → 1.0.91-2601041645

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.
Files changed (2) hide show
  1. package/dist/index.js +31 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -47052,8 +47052,8 @@ function getLogoModeFromEnv(envPrefix) {
47052
47052
  var CLI_NAME = "xcsh";
47053
47053
  var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
47054
47054
  function getVersion() {
47055
- if ("v1.0.91-2601041630") {
47056
- return "v1.0.91-2601041630";
47055
+ if ("v1.0.91-2601041645") {
47056
+ return "v1.0.91-2601041645";
47057
47057
  }
47058
47058
  if (process.env.XCSH_VERSION) {
47059
47059
  return process.env.XCSH_VERSION;
@@ -143631,23 +143631,46 @@ var DomainRegistry = class {
143631
143631
  contextChanged: false
143632
143632
  };
143633
143633
  }
143634
+ /**
143635
+ * Filter out global flags from command arguments.
143636
+ * Returns args without global flags like --output/-o.
143637
+ */
143638
+ filterGlobalFlags(args) {
143639
+ const filtered = [];
143640
+ let i = 0;
143641
+ while (i < args.length) {
143642
+ const arg = args[i] ?? "";
143643
+ if (arg === "--output" || arg === "-o") {
143644
+ i += 2;
143645
+ continue;
143646
+ }
143647
+ if (arg.startsWith("--output=") || arg.startsWith("-o=")) {
143648
+ i++;
143649
+ continue;
143650
+ }
143651
+ filtered.push(arg);
143652
+ i++;
143653
+ }
143654
+ return filtered;
143655
+ }
143634
143656
  /**
143635
143657
  * Validate command arguments and check for conflicts with sibling commands.
143636
143658
  * Returns an error result if validation fails, undefined if OK to proceed.
143637
143659
  */
143638
143660
  validateCommandArgs(cmd, cmdArgs, siblingCommands, commandPath) {
143639
- if (cmdArgs.length === 0) {
143661
+ const filteredArgs = this.filterGlobalFlags(cmdArgs);
143662
+ if (filteredArgs.length === 0) {
143640
143663
  return void 0;
143641
143664
  }
143642
143665
  if (cmd.usage && cmd.usage.trim().length > 0) {
143643
143666
  return void 0;
143644
143667
  }
143645
- const firstExtraArg = cmdArgs[0]?.toLowerCase() ?? "";
143668
+ const firstExtraArg = filteredArgs[0]?.toLowerCase() ?? "";
143646
143669
  const siblingCmd = siblingCommands.get(firstExtraArg);
143647
143670
  if (siblingCmd) {
143648
143671
  const pathParts = commandPath.split(" ");
143649
143672
  pathParts.pop();
143650
- const suggestedPath = [...pathParts, ...cmdArgs].join(" ");
143673
+ const suggestedPath = [...pathParts, ...filteredArgs].join(" ");
143651
143674
  return {
143652
143675
  output: [
143653
143676
  `Error: Cannot combine '${cmd.name}' with '${firstExtraArg}'.`,
@@ -143664,7 +143687,7 @@ var DomainRegistry = class {
143664
143687
  if (sibling.aliases?.includes(firstExtraArg)) {
143665
143688
  const pathParts = commandPath.split(" ");
143666
143689
  pathParts.pop();
143667
- const suggestedPath = [...pathParts, ...cmdArgs].join(" ");
143690
+ const suggestedPath = [...pathParts, ...filteredArgs].join(" ");
143668
143691
  return {
143669
143692
  output: [
143670
143693
  `Error: Cannot combine '${cmd.name}' with '${firstExtraArg}' (alias for '${siblingName}').`,
@@ -143680,7 +143703,7 @@ var DomainRegistry = class {
143680
143703
  }
143681
143704
  return {
143682
143705
  output: [
143683
- `Error: Unexpected arguments for '${cmd.name}': ${cmdArgs.join(" ")}`,
143706
+ `Error: Unexpected arguments for '${cmd.name}': ${filteredArgs.join(" ")}`,
143684
143707
  ``,
143685
143708
  `Usage: ${commandPath}`,
143686
143709
  ``,
@@ -143689,7 +143712,7 @@ var DomainRegistry = class {
143689
143712
  shouldExit: false,
143690
143713
  shouldClear: false,
143691
143714
  contextChanged: false,
143692
- error: `Unexpected arguments: ${cmdArgs.join(" ")}`
143715
+ error: `Unexpected arguments: ${filteredArgs.join(" ")}`
143693
143716
  };
143694
143717
  }
143695
143718
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-xcsh",
3
- "version": "1.0.91-2601041630",
3
+ "version": "1.0.91-2601041645",
4
4
  "description": "F5 Distributed Cloud Shell - Interactive CLI for F5 XC",
5
5
  "type": "module",
6
6
  "bin": {