@lvce-editor/extension-host-helper-process 0.11.9 → 0.11.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-helper-process",
3
- "version": "0.11.9",
3
+ "version": "0.11.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,6 +1,10 @@
1
1
  import got from 'got'
2
2
 
3
3
  export const getJson = async (url) => {
4
- const json = await got(url).json()
4
+ const json = await got(url, {
5
+ retry: {
6
+ limit: 0,
7
+ },
8
+ }).json()
5
9
  return json
6
10
  }
@@ -11,12 +11,7 @@ export const getResponse = async (message) => {
11
11
  result,
12
12
  }
13
13
  } catch (error) {
14
- if (
15
- error &&
16
- error instanceof Error &&
17
- error.message &&
18
- error.message.startsWith('method not found')
19
- ) {
14
+ if (error && error instanceof Error && error.message && error.message.startsWith('method not found')) {
20
15
  return {
21
16
  jsonrpc: JsonRpc.Version,
22
17
  id: message.id,
@@ -37,6 +32,7 @@ export const getResponse = async (message) => {
37
32
  data: {
38
33
  stack: prettyError.stack,
39
34
  codeFrame: prettyError.codeFrame,
35
+ code: prettyError.code,
40
36
  },
41
37
  },
42
38
  }
@@ -49,5 +49,6 @@ export const prepare = (error) => {
49
49
  message,
50
50
  stack: relevantStack,
51
51
  codeFrame,
52
+ code: error.code,
52
53
  }
53
54
  }