@robinmordasiewicz/f5xc-xcsh 1.0.90-2601022220 → 1.0.90-2601022257

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 +14 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -46630,8 +46630,8 @@ function getLogoModeFromEnv(envPrefix) {
46630
46630
  var CLI_NAME = "xcsh";
46631
46631
  var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
46632
46632
  function getVersion() {
46633
- if ("v1.0.90-2601022220") {
46634
- return "v1.0.90-2601022220";
46633
+ if ("v1.0.90-2601022257") {
46634
+ return "v1.0.90-2601022257";
46635
46635
  }
46636
46636
  if (process.env.XCSH_VERSION) {
46637
46637
  return process.env.XCSH_VERSION;
@@ -47025,9 +47025,9 @@ var APIError = class extends Error {
47025
47025
 
47026
47026
  // src/api/client.ts
47027
47027
  var DEFAULT_RETRY_CONFIG = {
47028
- maxRetries: 3,
47029
- initialDelayMs: 1e3,
47030
- maxDelayMs: 1e4,
47028
+ maxRetries: 2,
47029
+ initialDelayMs: 500,
47030
+ maxDelayMs: 5e3,
47031
47031
  backoffMultiplier: 2,
47032
47032
  jitter: true
47033
47033
  };
@@ -47069,7 +47069,7 @@ var APIClient = class {
47069
47069
  constructor(config) {
47070
47070
  this.serverUrl = config.serverUrl.replace(/\/+$/, "");
47071
47071
  this.apiToken = config.apiToken ?? "";
47072
- this.timeout = config.timeout ?? 3e4;
47072
+ this.timeout = config.timeout ?? 15e3;
47073
47073
  this.debug = config.debug ?? false;
47074
47074
  this.retryConfig = {
47075
47075
  ...DEFAULT_RETRY_CONFIG,
@@ -47176,13 +47176,20 @@ var APIClient = class {
47176
47176
  }
47177
47177
  /**
47178
47178
  * Check if an error is retryable
47179
+ *
47180
+ * Permanent network errors (connection refused, DNS not found) are NOT retried
47181
+ * since retrying won't help if the server is unreachable.
47179
47182
  */
47180
47183
  isRetryableError(error) {
47181
47184
  if (error instanceof APIError) {
47182
47185
  return RETRYABLE_STATUS_CODES.has(error.statusCode);
47183
47186
  }
47184
47187
  if (error instanceof Error) {
47185
- return error.name === "AbortError" || error.message.includes("fetch failed") || error.message.includes("network") || error.message.includes("ECONNREFUSED") || error.message.includes("ENOTFOUND") || error.message.includes("ETIMEDOUT");
47188
+ const message = error.message.toLowerCase();
47189
+ if (message.includes("econnrefused") || message.includes("enotfound") || message.includes("ehostunreach") || message.includes("enetunreach")) {
47190
+ return false;
47191
+ }
47192
+ return error.name === "AbortError" || message.includes("etimedout") || message.includes("econnreset") || message.includes("socket hang up");
47186
47193
  }
47187
47194
  return false;
47188
47195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinmordasiewicz/f5xc-xcsh",
3
- "version": "1.0.90-2601022220",
3
+ "version": "1.0.90-2601022257",
4
4
  "description": "F5 Distributed Cloud Shell - Interactive CLI for F5 XC",
5
5
  "type": "module",
6
6
  "bin": {