@jsenv/plugin-supervisor 1.4.5 → 1.4.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/dist/js/supervisor.js
CHANGED
|
@@ -530,7 +530,7 @@ window.__supervisor__ = (() => {
|
|
|
530
530
|
}
|
|
531
531
|
// isError can be false when reason is an ErrorEvent for instance
|
|
532
532
|
exception.isError = reason instanceof Error;
|
|
533
|
-
exception.name = reason.name || "Error";
|
|
533
|
+
exception.name = reason.constructor ? reason.constructor.name : reason.name || "Error";
|
|
534
534
|
exception.message = reason.message || message || "";
|
|
535
535
|
let stackFrames;
|
|
536
536
|
if (exception.isError && Error.captureStackTrace &&
|
|
@@ -599,7 +599,7 @@ window.__supervisor__ = (() => {
|
|
|
599
599
|
}
|
|
600
600
|
exception.stackTrace = stackTrace;
|
|
601
601
|
let stack = "";
|
|
602
|
-
const name = reason.name || "Error";
|
|
602
|
+
const name = reason.constructor ? reason.constructor.name : reason.name || "Error";
|
|
603
603
|
const message = reason.message || "";
|
|
604
604
|
stack += "".concat(name, ": ").concat(message);
|
|
605
605
|
if (stackTrace) {
|
|
@@ -777,7 +777,8 @@ window.__supervisor__ = (() => {
|
|
|
777
777
|
const getErrorStackTrace = error => {
|
|
778
778
|
let stack = error.stack;
|
|
779
779
|
if (!stack) return "";
|
|
780
|
-
const
|
|
780
|
+
const name = error.constructor ? error.constructor.name : error.name;
|
|
781
|
+
const messageInStack = "".concat(name, ": ").concat(error.message);
|
|
781
782
|
if (stack.startsWith(messageInStack)) {
|
|
782
783
|
stack = stack.slice(messageInStack.length);
|
|
783
784
|
}
|
|
@@ -931,7 +932,7 @@ window.__supervisor__ = (() => {
|
|
|
931
932
|
});
|
|
932
933
|
if (cause) {
|
|
933
934
|
const causeText = stringifyStack({
|
|
934
|
-
name: cause.name,
|
|
935
|
+
name: cause.constructor ? cause.constructor.name : cause.name,
|
|
935
936
|
message: cause.reason ? generateClickableText(cause.reason) : cause.stack ? generateClickableText(cause.stack) : ""
|
|
936
937
|
});
|
|
937
938
|
if (causeText) {
|
|
@@ -220,11 +220,7 @@ const ANSI = createAnsi({
|
|
|
220
220
|
supported: processSupportsBasicColor ||
|
|
221
221
|
// GitHub workflow does support ANSI but "supports-color" returns false
|
|
222
222
|
// because stream.isTTY returns false, see https://github.com/actions/runner/issues/241
|
|
223
|
-
process.env.GITHUB_WORKFLOW
|
|
224
|
-
// Check on FORCE_COLOR is to ensure it is prio over GitHub workflow check
|
|
225
|
-
// in unit test we use process.env.FORCE_COLOR = 'false' to fake
|
|
226
|
-
// that colors are not supported. Let it have priority
|
|
227
|
-
process.env.FORCE_COLOR !== "false"
|
|
223
|
+
process.env.GITHUB_WORKFLOW
|
|
228
224
|
});
|
|
229
225
|
function isUnicodeSupported() {
|
|
230
226
|
if (process$1.platform !== 'win32') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/plugin-supervisor",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"/dist/"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@jsenv/ast": "6.0.
|
|
30
|
-
"@jsenv/urls": "2.2.
|
|
31
|
-
"@jsenv/sourcemap": "1.2.
|
|
29
|
+
"@jsenv/ast": "6.0.6",
|
|
30
|
+
"@jsenv/urls": "2.2.6",
|
|
31
|
+
"@jsenv/sourcemap": "1.2.9",
|
|
32
32
|
"launch-editor": "2.8.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
package/src/client/supervisor.js
CHANGED
|
@@ -485,7 +485,9 @@ window.__supervisor__ = (() => {
|
|
|
485
485
|
}
|
|
486
486
|
// isError can be false when reason is an ErrorEvent for instance
|
|
487
487
|
exception.isError = reason instanceof Error;
|
|
488
|
-
exception.name = reason.
|
|
488
|
+
exception.name = reason.constructor
|
|
489
|
+
? reason.constructor.name
|
|
490
|
+
: reason.name || "Error";
|
|
489
491
|
exception.message = reason.message || message || "";
|
|
490
492
|
|
|
491
493
|
let stackFrames;
|
|
@@ -557,7 +559,9 @@ window.__supervisor__ = (() => {
|
|
|
557
559
|
exception.stackTrace = stackTrace;
|
|
558
560
|
|
|
559
561
|
let stack = "";
|
|
560
|
-
const name = reason.
|
|
562
|
+
const name = reason.constructor
|
|
563
|
+
? reason.constructor.name
|
|
564
|
+
: reason.name || "Error";
|
|
561
565
|
const message = reason.message || "";
|
|
562
566
|
stack += `${name}: ${message}`;
|
|
563
567
|
if (stackTrace) {
|
|
@@ -745,7 +749,8 @@ window.__supervisor__ = (() => {
|
|
|
745
749
|
const getErrorStackTrace = (error) => {
|
|
746
750
|
let stack = error.stack;
|
|
747
751
|
if (!stack) return "";
|
|
748
|
-
const
|
|
752
|
+
const name = error.constructor ? error.constructor.name : error.name;
|
|
753
|
+
const messageInStack = `${name}: ${error.message}`;
|
|
749
754
|
if (stack.startsWith(messageInStack)) {
|
|
750
755
|
stack = stack.slice(messageInStack.length);
|
|
751
756
|
}
|
|
@@ -923,7 +928,7 @@ window.__supervisor__ = (() => {
|
|
|
923
928
|
});
|
|
924
929
|
if (cause) {
|
|
925
930
|
const causeText = stringifyStack({
|
|
926
|
-
name: cause.name,
|
|
931
|
+
name: cause.constructor ? cause.constructor.name : cause.name,
|
|
927
932
|
message: cause.reason
|
|
928
933
|
? generateClickableText(cause.reason)
|
|
929
934
|
: cause.stack
|