@robinmordasiewicz/f5xc-xcsh 2.0.21-2601091926 → 2.0.21-2601100223
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
|
@@ -48639,8 +48639,8 @@ function getLogoModeFromEnv(envPrefix) {
|
|
|
48639
48639
|
var CLI_NAME = "xcsh";
|
|
48640
48640
|
var CLI_FULL_NAME = "F5 Distributed Cloud Shell";
|
|
48641
48641
|
function getVersion() {
|
|
48642
|
-
if ("v2.0.21-
|
|
48643
|
-
return "v2.0.21-
|
|
48642
|
+
if ("v2.0.21-2601100223") {
|
|
48643
|
+
return "v2.0.21-2601100223";
|
|
48644
48644
|
}
|
|
48645
48645
|
if (process.env.XCSH_VERSION) {
|
|
48646
48646
|
return process.env.XCSH_VERSION;
|
|
@@ -49207,7 +49207,8 @@ var APIClient = class {
|
|
|
49207
49207
|
*/
|
|
49208
49208
|
async executeRequest(options, url, headers, body) {
|
|
49209
49209
|
const controller = new AbortController();
|
|
49210
|
-
const
|
|
49210
|
+
const requestTimeout = options.timeout ?? this.timeout;
|
|
49211
|
+
const timeoutId = setTimeout(() => controller.abort(), requestTimeout);
|
|
49211
49212
|
try {
|
|
49212
49213
|
const response = await fetch(url, {
|
|
49213
49214
|
method: options.method,
|
|
@@ -49253,7 +49254,7 @@ var APIClient = class {
|
|
|
49253
49254
|
}
|
|
49254
49255
|
if (error instanceof Error && error.name === "AbortError") {
|
|
49255
49256
|
throw new APIError(
|
|
49256
|
-
`Request timed out after ${
|
|
49257
|
+
`Request timed out after ${requestTimeout}ms`,
|
|
49257
49258
|
408,
|
|
49258
49259
|
void 0,
|
|
49259
49260
|
`${options.method} ${options.path}`
|
|
@@ -49338,7 +49339,7 @@ var APIClient = class {
|
|
|
49338
49339
|
/**
|
|
49339
49340
|
* POST request
|
|
49340
49341
|
*/
|
|
49341
|
-
async post(path, body) {
|
|
49342
|
+
async post(path, body, timeout) {
|
|
49342
49343
|
const options = {
|
|
49343
49344
|
method: "POST",
|
|
49344
49345
|
path
|
|
@@ -49346,6 +49347,9 @@ var APIClient = class {
|
|
|
49346
49347
|
if (body) {
|
|
49347
49348
|
options.body = body;
|
|
49348
49349
|
}
|
|
49350
|
+
if (timeout !== void 0) {
|
|
49351
|
+
options.timeout = timeout;
|
|
49352
|
+
}
|
|
49349
49353
|
return this.request(options);
|
|
49350
49354
|
}
|
|
49351
49355
|
/**
|
|
@@ -76159,6 +76163,7 @@ function Spinner({ type = "dots" }) {
|
|
|
76159
76163
|
var build_default2 = Spinner;
|
|
76160
76164
|
|
|
76161
76165
|
// src/domains/ai_services/client.ts
|
|
76166
|
+
var GENAI_QUERY_TIMEOUT = 6e4;
|
|
76162
76167
|
var GenAIClient = class {
|
|
76163
76168
|
constructor(apiClient) {
|
|
76164
76169
|
this.apiClient = apiClient;
|
|
@@ -76177,7 +76182,8 @@ var GenAIClient = class {
|
|
|
76177
76182
|
};
|
|
76178
76183
|
const response = await this.apiClient.post(
|
|
76179
76184
|
`/api/gen-ai/namespaces/${namespace}/query`,
|
|
76180
|
-
request
|
|
76185
|
+
request,
|
|
76186
|
+
GENAI_QUERY_TIMEOUT
|
|
76181
76187
|
);
|
|
76182
76188
|
if (!response.ok) {
|
|
76183
76189
|
throw new Error(
|
|
@@ -76216,7 +76222,8 @@ var GenAIClient = class {
|
|
|
76216
76222
|
};
|
|
76217
76223
|
const response = await this.apiClient.post(
|
|
76218
76224
|
`/api/gen-ai/namespaces/${namespace}/eval_query`,
|
|
76219
|
-
request
|
|
76225
|
+
request,
|
|
76226
|
+
GENAI_QUERY_TIMEOUT
|
|
76220
76227
|
);
|
|
76221
76228
|
if (!response.ok) {
|
|
76222
76229
|
throw new Error(
|