@meet-im/lxcli 0.0.15 → 0.1.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.
@@ -23,7 +23,7 @@ export async function jsonRpcCall(gateway, method, params, pat) {
23
23
  if (!result.ok) {
24
24
  const details = {
25
25
  code: result.error.code,
26
- details: result.error.details,
26
+ data: result.error.details,
27
27
  requestId,
28
28
  httpStatus: result.status,
29
29
  };
package/dist/core/http.js CHANGED
@@ -96,7 +96,7 @@ export async function request(options) {
96
96
  logger.debug('Response', { status: response.status, data: responseData });
97
97
  if (!response.ok) {
98
98
  const errResp = responseData;
99
- return handleError(errorResult('http', response.status, errResp?.error?.code || response.status, errResp?.error?.message || 'Request failed', errResp?.error?.details));
99
+ return handleError(errorResult('http', response.status, errResp?.error?.code || response.status, errResp?.error?.message || 'Request failed', errResp?.error?.details ?? errResp?.error?.data));
100
100
  }
101
101
  if (!throwOnError) {
102
102
  return { ok: true, status: response.status, data: responseData };
@@ -51,6 +51,7 @@ export interface ErrorResponse {
51
51
  reason?: string;
52
52
  message: string;
53
53
  details?: Record<string, unknown>;
54
+ data?: Record<string, unknown>;
54
55
  };
55
56
  }
56
57
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meet-im/lxcli",
3
- "version": "0.0.15",
3
+ "version": "0.1.0",
4
4
  "description": "连续科技命令行工具",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",