@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.
- package/dist/index.js +14 -7
- 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-
|
|
46634
|
-
return "v1.0.90-
|
|
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:
|
|
47029
|
-
initialDelayMs:
|
|
47030
|
-
maxDelayMs:
|
|
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 ??
|
|
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
|
-
|
|
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
|
}
|