@robinmordasiewicz/f5xc-xcsh 1.0.91-2601040346 → 1.0.91-2601040443

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 +22 -2
  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-2601040346") {
47056
- return "v1.0.91-2601040346";
47055
+ if ("v1.0.91-2601040443") {
47056
+ return "v1.0.91-2601040443";
47057
47057
  }
47058
47058
  if (process.env.XCSH_VERSION) {
47059
47059
  return process.env.XCSH_VERSION;
@@ -152956,6 +152956,7 @@ function parseCommandArgs(args, domainResourceTypes) {
152956
152956
  let spec = false;
152957
152957
  let noColor = false;
152958
152958
  let positionalIndex = 0;
152959
+ const consumedAsValue = /* @__PURE__ */ new Set();
152959
152960
  for (let i = 0; i < args.length; i++) {
152960
152961
  const arg = args[i] ?? "";
152961
152962
  if (arg.startsWith("--")) {
@@ -152965,15 +152966,18 @@ function parseCommandArgs(args, domainResourceTypes) {
152965
152966
  case "namespace":
152966
152967
  case "ns":
152967
152968
  namespace = nextArg;
152969
+ consumedAsValue.add(i + 1);
152968
152970
  i++;
152969
152971
  break;
152970
152972
  case "name":
152971
152973
  name = nextArg;
152974
+ consumedAsValue.add(i + 1);
152972
152975
  i++;
152973
152976
  break;
152974
152977
  case "output":
152975
152978
  if (nextArg) {
152976
152979
  outputFormat = parseOutputFormat(nextArg);
152980
+ consumedAsValue.add(i + 1);
152977
152981
  i++;
152978
152982
  }
152979
152983
  break;
@@ -152985,6 +152989,7 @@ function parseCommandArgs(args, domainResourceTypes) {
152985
152989
  break;
152986
152990
  default:
152987
152991
  if (nextArg && !nextArg.startsWith("--")) {
152992
+ consumedAsValue.add(i + 1);
152988
152993
  i++;
152989
152994
  }
152990
152995
  }
@@ -152995,16 +153000,19 @@ function parseCommandArgs(args, domainResourceTypes) {
152995
153000
  case "n":
152996
153001
  case "ns":
152997
153002
  namespace = nextArg;
153003
+ consumedAsValue.add(i + 1);
152998
153004
  i++;
152999
153005
  break;
153000
153006
  case "o":
153001
153007
  if (nextArg) {
153002
153008
  outputFormat = parseOutputFormat(nextArg);
153009
+ consumedAsValue.add(i + 1);
153003
153010
  i++;
153004
153011
  }
153005
153012
  break;
153006
153013
  default:
153007
153014
  if (nextArg && !nextArg.startsWith("-")) {
153015
+ consumedAsValue.add(i + 1);
153008
153016
  i++;
153009
153017
  }
153010
153018
  }
@@ -153021,6 +153029,18 @@ function parseCommandArgs(args, domainResourceTypes) {
153021
153029
  positionalIndex++;
153022
153030
  }
153023
153031
  }
153032
+ if (!name && resourceType) {
153033
+ const remainingPositionals = [];
153034
+ for (let i = 0; i < args.length; i++) {
153035
+ const arg = args[i] ?? "";
153036
+ if (!arg.startsWith("-") && !consumedAsValue.has(i) && arg.toLowerCase() !== resourceType) {
153037
+ remainingPositionals.push(arg);
153038
+ }
153039
+ }
153040
+ if (remainingPositionals.length > 0) {
153041
+ name = remainingPositionals[remainingPositionals.length - 1];
153042
+ }
153043
+ }
153024
153044
  return { resourceType, name, namespace, outputFormat, spec, noColor };
153025
153045
  }
153026
153046
  async function executeAPICommand(session, ctx, cmd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-xcsh",
3
- "version": "1.0.91-2601040346",
3
+ "version": "1.0.91-2601040443",
4
4
  "description": "F5 Distributed Cloud Shell - Interactive CLI for F5 XC",
5
5
  "type": "module",
6
6
  "bin": {