@robinmordasiewicz/f5xc-xcsh 6.42.0 → 6.43.0
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 +22 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45354,8 +45354,8 @@ function getLogoModeFromEnv(envPrefix) {
|
|
|
45354
45354
|
var CLI_NAME = "xcsh";
|
|
45355
45355
|
var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
|
|
45356
45356
|
function getVersion() {
|
|
45357
|
-
if ("6.
|
|
45358
|
-
return "6.
|
|
45357
|
+
if ("6.43.0") {
|
|
45358
|
+
return "6.43.0";
|
|
45359
45359
|
}
|
|
45360
45360
|
if (process.env.XCSH_VERSION) {
|
|
45361
45361
|
return process.env.XCSH_VERSION;
|
|
@@ -45830,21 +45830,35 @@ var APIClient = class {
|
|
|
45830
45830
|
this._validationError = null;
|
|
45831
45831
|
return { valid: true };
|
|
45832
45832
|
} catch (error) {
|
|
45833
|
-
this._isValidated = false;
|
|
45834
45833
|
if (error instanceof APIError) {
|
|
45835
45834
|
if (error.statusCode === 401) {
|
|
45835
|
+
this._isValidated = false;
|
|
45836
45836
|
this._validationError = "Invalid or expired API token";
|
|
45837
|
+
return { valid: false, error: this._validationError };
|
|
45837
45838
|
} else if (error.statusCode === 403) {
|
|
45839
|
+
this._isValidated = false;
|
|
45838
45840
|
this._validationError = "Token lacks required permissions";
|
|
45839
|
-
|
|
45840
|
-
this._validationError = "Network error - could not reach server";
|
|
45841
|
+
return { valid: false, error: this._validationError };
|
|
45841
45842
|
} else {
|
|
45842
|
-
this.
|
|
45843
|
+
if (this.debug) {
|
|
45844
|
+
console.error(
|
|
45845
|
+
`DEBUG: Validation endpoint returned ${error.statusCode}, assuming token is valid`
|
|
45846
|
+
);
|
|
45847
|
+
}
|
|
45848
|
+
this._isValidated = true;
|
|
45849
|
+
this._validationError = null;
|
|
45850
|
+
return { valid: true };
|
|
45843
45851
|
}
|
|
45844
45852
|
} else {
|
|
45845
|
-
this.
|
|
45853
|
+
if (this.debug) {
|
|
45854
|
+
console.error(
|
|
45855
|
+
`DEBUG: Validation error: ${error instanceof Error ? error.message : "Unknown"}, assuming token is valid`
|
|
45856
|
+
);
|
|
45857
|
+
}
|
|
45858
|
+
this._isValidated = true;
|
|
45859
|
+
this._validationError = null;
|
|
45860
|
+
return { valid: true };
|
|
45846
45861
|
}
|
|
45847
|
-
return { valid: false, error: this._validationError };
|
|
45848
45862
|
}
|
|
45849
45863
|
}
|
|
45850
45864
|
/**
|