@lwrjs/diagnostics 0.17.2-alpha.16 → 0.17.2-alpha.18
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/build/cjs/logger.cjs +5 -2
- package/build/es/logger.js +5 -1
- package/package.json +3 -3
package/build/cjs/logger.cjs
CHANGED
|
@@ -108,10 +108,13 @@ var stringifyError = (error, count = 0) => {
|
|
|
108
108
|
diagnostics: error.diagnostics,
|
|
109
109
|
stack: error.stack
|
|
110
110
|
});
|
|
111
|
+
} else if (error instanceof AggregateError) {
|
|
112
|
+
const childErrors = error.errors.reduce((msg, e) => msg += `
|
|
113
|
+
${stringifyError(e)}`, "");
|
|
114
|
+
return (decodeMessage(error.message) || error.name) + childErrors;
|
|
111
115
|
} else if (error.message) {
|
|
112
116
|
const message = error.message;
|
|
113
|
-
const cause = error.cause && count < 1 ? `
|
|
114
|
-
Cause: ${stringifyError(error.cause, 1)}` : "";
|
|
117
|
+
const cause = error.cause && count < 1 ? ` Cause: ${stringifyError(error.cause, 1)}` : "";
|
|
115
118
|
return decodeMessage(message) + cause;
|
|
116
119
|
} else if (typeof error === "string" || error instanceof String) {
|
|
117
120
|
return decodeMessage(error);
|
package/build/es/logger.js
CHANGED
|
@@ -80,9 +80,13 @@ export const stringifyError = (error, count = 0) => {
|
|
|
80
80
|
stack: error.stack,
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
+
else if (error instanceof AggregateError) {
|
|
84
|
+
const childErrors = error.errors.reduce((msg, e) => (msg += `\n${stringifyError(e)}`), '');
|
|
85
|
+
return (decodeMessage(error.message) || error.name) + childErrors;
|
|
86
|
+
}
|
|
83
87
|
else if (error.message) {
|
|
84
88
|
const message = error.message;
|
|
85
|
-
const cause = error.cause && count < 1 ?
|
|
89
|
+
const cause = error.cause && count < 1 ? ` Cause: ${stringifyError(error.cause, 1)}` : '';
|
|
86
90
|
// Message may have been encoded to prevent XSS
|
|
87
91
|
return decodeMessage(message) + cause;
|
|
88
92
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.17.2-alpha.
|
|
7
|
+
"version": "0.17.2-alpha.18",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test": "jest"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lwrjs/types": "0.17.2-alpha.
|
|
38
|
+
"@lwrjs/types": "0.17.2-alpha.18",
|
|
39
39
|
"jest": "29.7.0",
|
|
40
40
|
"ts-jest": "^29.2.5",
|
|
41
41
|
"typescript": "^4.9.5"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"volta": {
|
|
47
47
|
"extends": "../../../package.json"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "94b7812858b33c0c27e7ae9554e1840d906706fa"
|
|
50
50
|
}
|