@roxybrowser/openapi 1.0.5-beta.1 → 1.0.7
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/README.md +228 -228
- package/lib/index.js +93 -1670
- package/lib/index.js.map +1 -1
- package/lib/modules/account.d.ts +491 -0
- package/lib/modules/account.d.ts.map +1 -0
- package/lib/modules/account.js +442 -0
- package/lib/modules/account.js.map +1 -0
- package/lib/modules/browser.d.ts +3011 -0
- package/lib/modules/browser.d.ts.map +1 -0
- package/lib/modules/browser.js +1076 -0
- package/lib/modules/browser.js.map +1 -0
- package/lib/modules/other.d.ts +102 -0
- package/lib/modules/other.d.ts.map +1 -0
- package/lib/modules/other.js +194 -0
- package/lib/modules/other.js.map +1 -0
- package/lib/modules/proxy.d.ts +576 -0
- package/lib/modules/proxy.d.ts.map +1 -0
- package/lib/modules/proxy.js +713 -0
- package/lib/modules/proxy.js.map +1 -0
- package/lib/types.d.ts +860 -155
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +4 -4
- package/lib/types.js.map +1 -1
- package/lib/utils/error-analyzer.d.ts.map +1 -1
- package/lib/utils/error-analyzer.js +17 -15
- package/lib/utils/error-analyzer.js.map +1 -1
- package/lib/utils/index.d.ts +24 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +45 -0
- package/lib/utils/index.js.map +1 -0
- package/package.json +50 -50
- package/lib/browser/browser-creator.d.ts +0 -54
- package/lib/browser/browser-creator.d.ts.map +0 -1
- package/lib/browser/browser-creator.js +0 -263
- package/lib/browser/browser-creator.js.map +0 -1
- package/lib/proxy/proxy-manager.d.ts +0 -67
- package/lib/proxy/proxy-manager.d.ts.map +0 -1
- package/lib/proxy/proxy-manager.js +0 -278
- package/lib/proxy/proxy-manager.js.map +0 -1
- package/lib/proxy/proxy-validator.d.ts +0 -66
- package/lib/proxy/proxy-validator.d.ts.map +0 -1
- package/lib/proxy/proxy-validator.js +0 -273
- package/lib/proxy/proxy-validator.js.map +0 -1
- package/lib/roxy-client.d.ts +0 -117
- package/lib/roxy-client.d.ts.map +0 -1
- package/lib/roxy-client.js +0 -467
- package/lib/roxy-client.js.map +0 -1
package/lib/roxy-client.js
DELETED
|
@@ -1,467 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RoxyBrowser API Client
|
|
3
|
-
*
|
|
4
|
-
* HTTP client for RoxyBrowser REST API with authentication and error handling
|
|
5
|
-
*/
|
|
6
|
-
import { RoxyApiError, ConfigError, } from "./types.js";
|
|
7
|
-
export class RoxyClient {
|
|
8
|
-
config;
|
|
9
|
-
constructor(config) {
|
|
10
|
-
// Validate required configuration
|
|
11
|
-
if (!config.apiKey?.trim()) {
|
|
12
|
-
throw new ConfigError("API key is required");
|
|
13
|
-
}
|
|
14
|
-
if (!config.apiHost?.trim()) {
|
|
15
|
-
throw new ConfigError("API host is required");
|
|
16
|
-
}
|
|
17
|
-
this.config = {
|
|
18
|
-
apiHost: config.apiHost.replace(/\/$/, ""), // Remove trailing slash
|
|
19
|
-
apiKey: config.apiKey,
|
|
20
|
-
timeout: config.timeout ?? 30000,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Make authenticated HTTP request to RoxyBrowser API
|
|
25
|
-
*/
|
|
26
|
-
async makeRequest(endpoint, options = {}) {
|
|
27
|
-
const url = `${this.config.apiHost}${endpoint}`;
|
|
28
|
-
const controller = new AbortController();
|
|
29
|
-
const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);
|
|
30
|
-
try {
|
|
31
|
-
const response = await fetch(url, {
|
|
32
|
-
...options,
|
|
33
|
-
headers: {
|
|
34
|
-
"Content-Type": "application/json",
|
|
35
|
-
token: this.config.apiKey, // RoxyBrowser uses 'token' header
|
|
36
|
-
...options.headers,
|
|
37
|
-
},
|
|
38
|
-
signal: controller.signal,
|
|
39
|
-
});
|
|
40
|
-
clearTimeout(timeoutId);
|
|
41
|
-
if (!response.ok) {
|
|
42
|
-
const responseText = await response.text().catch(() => "Unknown error");
|
|
43
|
-
throw new RoxyApiError(`HTTP ${response.status}: ${response.statusText}`, response.status, responseText, undefined // originalError
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
const data = await response.json();
|
|
47
|
-
// Check API response code
|
|
48
|
-
if (data.code !== 0) {
|
|
49
|
-
// Enhanced error message with both Chinese and English
|
|
50
|
-
let errorMessage = data.msg || "API request failed";
|
|
51
|
-
// Special handling for code 409 with quota error
|
|
52
|
-
if (data.code === 409 && data.msg && data.msg.includes('额度不足')) {
|
|
53
|
-
const remainingQuota = typeof data.data === 'number' ? data.data : 0;
|
|
54
|
-
errorMessage = `窗口额度不足 / Insufficient profiles quota. 剩余额度 / Remaining: ${remainingQuota}. 请前往 RoxyBrowser 购买窗口套餐 / Please purchase more profiles in RoxyBrowser.`;
|
|
55
|
-
}
|
|
56
|
-
throw new RoxyApiError(errorMessage, data.code, data, undefined // originalError
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
return data.data;
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
clearTimeout(timeoutId);
|
|
63
|
-
if (error instanceof RoxyApiError) {
|
|
64
|
-
throw error;
|
|
65
|
-
}
|
|
66
|
-
if (error instanceof Error) {
|
|
67
|
-
if (error.name === "AbortError") {
|
|
68
|
-
throw new RoxyApiError(`Request timeout after ${this.config.timeout}ms`, 408, undefined, error // originalError
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
// Enhanced network error handling with pattern detection
|
|
72
|
-
throw new RoxyApiError(`Network error: ${error.message}`, 0, undefined, error // originalError for pattern analysis
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
throw new RoxyApiError("Unknown error occurred", 0, error, error instanceof Error ? error : undefined);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Get list of workspaces and projects
|
|
80
|
-
*/
|
|
81
|
-
async getWorkspaces(pageIndex = 1, pageSize = 15) {
|
|
82
|
-
const params = new URLSearchParams({
|
|
83
|
-
page_index: pageIndex.toString(),
|
|
84
|
-
page_size: pageSize.toString(),
|
|
85
|
-
});
|
|
86
|
-
return this.makeRequest(`/browser/workspace?${params}`, {
|
|
87
|
-
method: "GET",
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Get list of browsers in workspace/project
|
|
92
|
-
*/
|
|
93
|
-
async getBrowsers(params) {
|
|
94
|
-
const searchParams = new URLSearchParams();
|
|
95
|
-
searchParams.append("workspaceId", params.workspaceId.toString());
|
|
96
|
-
if (params.dirIds)
|
|
97
|
-
searchParams.append("dirIds", params.dirIds);
|
|
98
|
-
if (params.windowName)
|
|
99
|
-
searchParams.append("windowName", params.windowName);
|
|
100
|
-
if (params.sortNums)
|
|
101
|
-
searchParams.append("sortNums", params.sortNums);
|
|
102
|
-
if (params.os)
|
|
103
|
-
searchParams.append("os", params.os);
|
|
104
|
-
if (params.projectIds)
|
|
105
|
-
searchParams.append("projectIds", params.projectIds);
|
|
106
|
-
if (params.windowRemark)
|
|
107
|
-
searchParams.append("windowRemark", params.windowRemark);
|
|
108
|
-
if (params.page_index)
|
|
109
|
-
searchParams.append("page_index", params.page_index.toString());
|
|
110
|
-
if (params.page_size)
|
|
111
|
-
searchParams.append("page_size", params.page_size.toString());
|
|
112
|
-
return this.makeRequest(`/browser/list_v3?${searchParams}`, {
|
|
113
|
-
method: "GET",
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Open a single browser
|
|
118
|
-
*/
|
|
119
|
-
async openBrowser(params) {
|
|
120
|
-
return this.makeRequest("/browser/open", {
|
|
121
|
-
method: "POST",
|
|
122
|
-
body: JSON.stringify(params),
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Open multiple browsers in batch with enhanced error handling and retry logic
|
|
127
|
-
*/
|
|
128
|
-
async openBrowsers(workspaceId, dirIds, args, options = {}) {
|
|
129
|
-
const { maxRetries = 2, retryDelay = 1000 } = options;
|
|
130
|
-
const successes = [];
|
|
131
|
-
const failures = [];
|
|
132
|
-
// Open browsers in parallel with reasonable concurrency
|
|
133
|
-
const BATCH_SIZE = 5;
|
|
134
|
-
for (let i = 0; i < dirIds.length; i += BATCH_SIZE) {
|
|
135
|
-
const batch = dirIds.slice(i, i + BATCH_SIZE);
|
|
136
|
-
const batchPromises = batch.map(async (dirId) => {
|
|
137
|
-
let lastError = null;
|
|
138
|
-
let lastErrorCode = undefined;
|
|
139
|
-
// Retry logic for each browser
|
|
140
|
-
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
141
|
-
try {
|
|
142
|
-
const result = await this.openBrowser({ workspaceId, dirId, args });
|
|
143
|
-
return { dirId, result };
|
|
144
|
-
}
|
|
145
|
-
catch (error) {
|
|
146
|
-
lastError =
|
|
147
|
-
error instanceof Error ? error : new Error("Unknown error");
|
|
148
|
-
// Capture error code if available
|
|
149
|
-
if (error instanceof RoxyApiError) {
|
|
150
|
-
lastErrorCode = error.code;
|
|
151
|
-
// Don't retry non-retryable errors
|
|
152
|
-
if (!error.isRetryable()) {
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
// Don't wait after the last attempt
|
|
157
|
-
if (attempt < maxRetries) {
|
|
158
|
-
await new Promise((resolve) => setTimeout(resolve, retryDelay * (attempt + 1)));
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
// All attempts failed
|
|
163
|
-
const isRetryable = lastError instanceof RoxyApiError ? lastError.isRetryable() : true;
|
|
164
|
-
return {
|
|
165
|
-
dirId,
|
|
166
|
-
error: lastError?.message || "Unknown error",
|
|
167
|
-
errorCode: lastErrorCode,
|
|
168
|
-
retryable: isRetryable,
|
|
169
|
-
};
|
|
170
|
-
});
|
|
171
|
-
const batchResults = await Promise.all(batchPromises);
|
|
172
|
-
for (const item of batchResults) {
|
|
173
|
-
if ("result" in item && item.result) {
|
|
174
|
-
successes.push(item.result);
|
|
175
|
-
}
|
|
176
|
-
else if ("error" in item) {
|
|
177
|
-
failures.push({
|
|
178
|
-
dirId: item.dirId,
|
|
179
|
-
error: item.error,
|
|
180
|
-
errorCode: item.errorCode,
|
|
181
|
-
retryable: "retryable" in item ? item.retryable : true,
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
// Enhanced error reporting
|
|
187
|
-
if (failures.length > 0) {
|
|
188
|
-
const retryableErrors = failures.filter((e) => e.retryable);
|
|
189
|
-
const nonRetryableErrors = failures.filter((e) => !e.retryable);
|
|
190
|
-
console.warn(`Browser opening completed with ${failures.length} errors:`);
|
|
191
|
-
if (retryableErrors.length > 0) {
|
|
192
|
-
console.warn(` - ${retryableErrors.length} retryable errors (could retry later)`);
|
|
193
|
-
}
|
|
194
|
-
if (nonRetryableErrors.length > 0) {
|
|
195
|
-
console.warn(` - ${nonRetryableErrors.length} non-retryable errors (require intervention)`);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return { successes, failures };
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Close a single browser
|
|
202
|
-
*/
|
|
203
|
-
async closeBrowser(params) {
|
|
204
|
-
await this.makeRequest("/browser/close", {
|
|
205
|
-
method: "POST",
|
|
206
|
-
body: JSON.stringify(params),
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Close multiple browsers in batch
|
|
211
|
-
*/
|
|
212
|
-
async closeBrowsers(dirIds) {
|
|
213
|
-
const results = [];
|
|
214
|
-
// Close browsers in parallel
|
|
215
|
-
const closePromises = dirIds.map(async (dirId) => {
|
|
216
|
-
try {
|
|
217
|
-
await this.closeBrowser({ dirId });
|
|
218
|
-
return { dirId, success: true };
|
|
219
|
-
}
|
|
220
|
-
catch (error) {
|
|
221
|
-
const errorMsg = error instanceof Error ? error.message : "Unknown error";
|
|
222
|
-
return { dirId, success: false, error: errorMsg };
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
const closeResults = await Promise.all(closePromises);
|
|
226
|
-
results.push(...closeResults);
|
|
227
|
-
return results;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Create a single browser
|
|
231
|
-
*/
|
|
232
|
-
async createBrowser(config) {
|
|
233
|
-
return this.makeRequest("/browser/create", {
|
|
234
|
-
method: "POST",
|
|
235
|
-
body: JSON.stringify(config),
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Create multiple browsers in batch
|
|
240
|
-
*/
|
|
241
|
-
async createBrowsers(configs) {
|
|
242
|
-
const results = [];
|
|
243
|
-
const errors = [];
|
|
244
|
-
// Create browsers in parallel with reasonable concurrency
|
|
245
|
-
const BATCH_SIZE = 3;
|
|
246
|
-
for (let i = 0; i < configs.length; i += BATCH_SIZE) {
|
|
247
|
-
const batch = configs.slice(i, i + BATCH_SIZE);
|
|
248
|
-
const batchPromises = batch.map(async (config, batchIndex) => {
|
|
249
|
-
try {
|
|
250
|
-
const result = await this.createBrowser(config);
|
|
251
|
-
return {
|
|
252
|
-
dirId: result.dirId,
|
|
253
|
-
windowName: config.windowName || `Browser-${i + batchIndex + 1}`,
|
|
254
|
-
success: true,
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
catch (error) {
|
|
258
|
-
const errorMsg = error instanceof Error ? error.message : "Unknown error";
|
|
259
|
-
errors.push({ config, error: errorMsg });
|
|
260
|
-
return {
|
|
261
|
-
dirId: "",
|
|
262
|
-
windowName: config.windowName || `Browser-${i + batchIndex + 1}`,
|
|
263
|
-
success: false,
|
|
264
|
-
error: errorMsg,
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
const batchResults = await Promise.all(batchPromises);
|
|
269
|
-
results.push(...batchResults);
|
|
270
|
-
// Add small delay between batches to avoid overwhelming the API
|
|
271
|
-
if (i + BATCH_SIZE < configs.length) {
|
|
272
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
const successCount = results.filter((r) => r.success).length;
|
|
276
|
-
const failureCount = results.filter((r) => !r.success).length;
|
|
277
|
-
// If there were errors and some successes, log warnings
|
|
278
|
-
if (errors.length > 0) {
|
|
279
|
-
console.warn(`${errors.length} browser creation(s) failed:`, errors);
|
|
280
|
-
}
|
|
281
|
-
return {
|
|
282
|
-
results,
|
|
283
|
-
successCount,
|
|
284
|
-
failureCount,
|
|
285
|
-
total: configs.length,
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* Get browser details by ID
|
|
290
|
-
*/
|
|
291
|
-
async getBrowserDetail(workspaceId, dirId) {
|
|
292
|
-
const params = new URLSearchParams({
|
|
293
|
-
workspaceId: workspaceId.toString(),
|
|
294
|
-
dirId,
|
|
295
|
-
});
|
|
296
|
-
const response = await this.makeRequest(`/browser/detail?${params}`, {
|
|
297
|
-
method: "GET",
|
|
298
|
-
});
|
|
299
|
-
// API returns { rows: [browser object], total: 1 }, extract first browser
|
|
300
|
-
if (response.rows && response.rows.length > 0) {
|
|
301
|
-
return response.rows[0];
|
|
302
|
-
}
|
|
303
|
-
throw new Error('Browser not found or no data returned');
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Update/modify existing browser
|
|
307
|
-
*/
|
|
308
|
-
async updateBrowser(config) {
|
|
309
|
-
await this.makeRequest("/browser/mdf", {
|
|
310
|
-
method: "POST",
|
|
311
|
-
body: JSON.stringify(config),
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Delete browsers
|
|
316
|
-
*/
|
|
317
|
-
async deleteBrowsers(workspaceId, dirIds) {
|
|
318
|
-
await this.makeRequest("/browser/delete", {
|
|
319
|
-
method: "POST",
|
|
320
|
-
body: JSON.stringify({ workspaceId, dirIds }),
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Random fingerprint for browser
|
|
325
|
-
*/
|
|
326
|
-
async randomBrowserFingerprint(workspaceId, dirId) {
|
|
327
|
-
await this.makeRequest("/browser/random_env", {
|
|
328
|
-
method: "POST",
|
|
329
|
-
body: JSON.stringify({ workspaceId, dirId }),
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* Clear browser local cache
|
|
334
|
-
*/
|
|
335
|
-
async clearBrowserLocalCache(dirIds) {
|
|
336
|
-
await this.makeRequest("/browser/clear_local_cache", {
|
|
337
|
-
method: "POST",
|
|
338
|
-
body: JSON.stringify({ dirIds }),
|
|
339
|
-
});
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Clear browser server cache
|
|
343
|
-
*/
|
|
344
|
-
async clearBrowserServerCache(workspaceId, dirIds) {
|
|
345
|
-
await this.makeRequest("/browser/clear_server_cache", {
|
|
346
|
-
method: "POST",
|
|
347
|
-
body: JSON.stringify({ workspaceId, dirIds }),
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Get account list
|
|
352
|
-
*/
|
|
353
|
-
async getAccounts(params) {
|
|
354
|
-
const searchParams = new URLSearchParams();
|
|
355
|
-
searchParams.append("workspaceId", params.workspaceId.toString());
|
|
356
|
-
if (params.accountId)
|
|
357
|
-
searchParams.append("accountId", params.accountId.toString());
|
|
358
|
-
if (params.page_index)
|
|
359
|
-
searchParams.append("page_index", params.page_index.toString());
|
|
360
|
-
if (params.page_size)
|
|
361
|
-
searchParams.append("page_size", params.page_size.toString());
|
|
362
|
-
return this.makeRequest(`/browser/account?${searchParams}`, {
|
|
363
|
-
method: "GET",
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* Get label list
|
|
368
|
-
*/
|
|
369
|
-
async getLabels(workspaceId) {
|
|
370
|
-
const params = new URLSearchParams({
|
|
371
|
-
workspaceId: workspaceId.toString(),
|
|
372
|
-
});
|
|
373
|
-
return this.makeRequest(`/browser/label?${params}`, {
|
|
374
|
-
method: "GET",
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* Get connection info for opened browsers
|
|
379
|
-
*/
|
|
380
|
-
async getConnectionInfo(dirIds) {
|
|
381
|
-
const params = new URLSearchParams();
|
|
382
|
-
if (dirIds && dirIds.length > 0) {
|
|
383
|
-
params.append("dirIds", dirIds.join(","));
|
|
384
|
-
}
|
|
385
|
-
const queryString = params.toString();
|
|
386
|
-
const endpoint = queryString
|
|
387
|
-
? `/browser/connection_info?${queryString}`
|
|
388
|
-
: "/browser/connection_info";
|
|
389
|
-
return this.makeRequest(endpoint, {
|
|
390
|
-
method: "GET",
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* Test API connectivity with detailed diagnostics
|
|
395
|
-
*/
|
|
396
|
-
async testConnection() {
|
|
397
|
-
try {
|
|
398
|
-
await this.makeRequest("/health");
|
|
399
|
-
return true;
|
|
400
|
-
}
|
|
401
|
-
catch (error) {
|
|
402
|
-
console.error("Connection test failed:", error);
|
|
403
|
-
return false;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Perform comprehensive API diagnostics
|
|
408
|
-
*/
|
|
409
|
-
async performDiagnostics() {
|
|
410
|
-
const result = {
|
|
411
|
-
connected: false,
|
|
412
|
-
authentication: false,
|
|
413
|
-
workspaceAccess: false,
|
|
414
|
-
errors: [],
|
|
415
|
-
recommendations: [],
|
|
416
|
-
};
|
|
417
|
-
// Test 1: Basic connectivity
|
|
418
|
-
try {
|
|
419
|
-
await this.makeRequest("/health");
|
|
420
|
-
result.connected = true;
|
|
421
|
-
}
|
|
422
|
-
catch (error) {
|
|
423
|
-
result.connected = false;
|
|
424
|
-
if (error instanceof RoxyApiError) {
|
|
425
|
-
result.errors.push(`Connection failed: ${error.getExplanation()}`);
|
|
426
|
-
result.recommendations.push(...error.getTroubleshootingSteps());
|
|
427
|
-
}
|
|
428
|
-
else {
|
|
429
|
-
result.errors.push(`Network error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
430
|
-
result.recommendations.push("Check if RoxyBrowser is running", "Verify API host configuration", "Check network connectivity");
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
// Test 2: Authentication (if connected)
|
|
434
|
-
if (result.connected) {
|
|
435
|
-
try {
|
|
436
|
-
await this.getWorkspaces(1, 1);
|
|
437
|
-
result.authentication = true;
|
|
438
|
-
result.workspaceAccess = true;
|
|
439
|
-
}
|
|
440
|
-
catch (error) {
|
|
441
|
-
if (error instanceof RoxyApiError) {
|
|
442
|
-
if (error.code === 401) {
|
|
443
|
-
result.authentication = false;
|
|
444
|
-
result.errors.push("Authentication failed: Invalid API key");
|
|
445
|
-
result.recommendations.push("Check ROXY_API_KEY environment variable", "Verify API key in RoxyBrowser settings", "Ensure API is enabled in RoxyBrowser");
|
|
446
|
-
}
|
|
447
|
-
else if (error.code === 403) {
|
|
448
|
-
result.authentication = true;
|
|
449
|
-
result.workspaceAccess = false;
|
|
450
|
-
result.errors.push("Access denied: Insufficient permissions");
|
|
451
|
-
result.recommendations.push("Check API key permissions", "Verify workspace access rights");
|
|
452
|
-
}
|
|
453
|
-
else {
|
|
454
|
-
result.authentication = true;
|
|
455
|
-
result.errors.push(`API error: ${error.getExplanation()}`);
|
|
456
|
-
result.recommendations.push(...error.getTroubleshootingSteps());
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
else {
|
|
460
|
-
result.errors.push(`Unexpected error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
return result;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
//# sourceMappingURL=roxy-client.js.map
|
package/lib/roxy-client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"roxy-client.js","sourceRoot":"","sources":["../src/roxy-client.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