@forge/cli-shared 9.3.1-next.1-experimental-0b00ed8 → 9.3.1-next.2

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.
@@ -11,40 +11,14 @@ const assistant_cli_1 = require("./assistant-cli");
11
11
  function isErrorWithAnalytics(e) {
12
12
  return e.getAttributes !== undefined;
13
13
  }
14
- const NETWORK_CONNECTIVITY_ERROR_CODES = new Set([
15
- 'ENOTFOUND',
16
- 'ECONNRESET',
17
- 'ECONNREFUSED',
18
- 'ECONNABORTED',
19
- 'ENETUNREACH',
20
- 'EHOSTUNREACH',
21
- 'EAI_AGAIN',
22
- 'ETIMEDOUT',
23
- 'UND_ERR_CONNECT_TIMEOUT',
24
- 'UND_ERR_HEADERS_TIMEOUT',
25
- 'UND_ERR_SOCKET'
26
- ]);
27
- function isLikelyNetworkError(e) {
28
- if (!(e instanceof Error)) {
29
- return false;
30
- }
31
- if (e instanceof TypeError && e.message === 'fetch failed') {
32
- const causeCode = e.cause && typeof e.cause === 'object' && typeof e.cause.code === 'string'
33
- ? e.cause.code
34
- : undefined;
35
- return causeCode ? NETWORK_CONNECTIVITY_ERROR_CODES.has(causeCode) : false;
36
- }
37
- if (e.constructor?.name === 'FetchError' && e.type === 'system') {
38
- return true;
39
- }
40
- return false;
41
- }
42
14
  function isUserError(e) {
43
15
  if (isErrorWithAnalytics(e)) {
44
16
  return e.getAttributes().isUserError ?? false;
45
17
  }
46
- if (isLikelyNetworkError(e)) {
47
- return true;
18
+ if (e.constructor?.name === 'FetchError') {
19
+ if (e.type === 'system') {
20
+ return true;
21
+ }
48
22
  }
49
23
  return false;
50
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli-shared",
3
- "version": "9.3.1-next.1-experimental-0b00ed8",
3
+ "version": "9.3.1-next.2",
4
4
  "description": "Common functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -12,7 +12,7 @@
12
12
  "generate-graphql-types": "graphql-codegen --config src/graphql/codegen.yml"
13
13
  },
14
14
  "dependencies": {
15
- "@forge/manifest": "13.3.0-experimental-0b00ed8",
15
+ "@forge/manifest": "13.3.1-next.0",
16
16
  "@forge/util": "3.0.0",
17
17
  "@forge/i18n": "1.0.0",
18
18
  "@sentry/node": "7.106.0",