@jsenv/plugin-supervisor 1.7.15 → 1.8.1
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
|
@@ -1209,9 +1209,9 @@ window.__supervisor__ = (() => {
|
|
|
1209
1209
|
lineno,
|
|
1210
1210
|
colno
|
|
1211
1211
|
} = errorEvent;
|
|
1212
|
-
if (error && error.
|
|
1212
|
+
if (error && error.__handled_by__) {
|
|
1213
1213
|
if (logs) {
|
|
1214
|
-
console.log("ignore error event because
|
|
1214
|
+
console.log("ignore error event because __handled_by__ is set");
|
|
1215
1215
|
}
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
@@ -1230,6 +1230,12 @@ window.__supervisor__ = (() => {
|
|
|
1230
1230
|
if (event.defaultPrevented) {
|
|
1231
1231
|
return;
|
|
1232
1232
|
}
|
|
1233
|
+
if (event.reason && event.reason.__handled_by__) {
|
|
1234
|
+
if (logs) {
|
|
1235
|
+
console.log("ignore unhandledrejection event because __handled_by__ is set");
|
|
1236
|
+
}
|
|
1237
|
+
return;
|
|
1238
|
+
}
|
|
1233
1239
|
const exception = supervisor.createException(event.reason, {
|
|
1234
1240
|
reportedBy: "window_unhandledrejection_event"
|
|
1235
1241
|
});
|
|
@@ -803,7 +803,7 @@ const jsenvPluginSupervisor = ({
|
|
|
803
803
|
return {
|
|
804
804
|
name: "jsenv:supervisor",
|
|
805
805
|
appliesDuring: "dev",
|
|
806
|
-
|
|
806
|
+
serverRoutes: [{
|
|
807
807
|
endpoint: "GET /.internal/get_cause_trace/*",
|
|
808
808
|
description: "Return source code around the place an error was thrown.",
|
|
809
809
|
declarationSource: import.meta.url,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/plugin-supervisor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/jsenv/core",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"prepublishOnly": "npm run build"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@jsenv/ast": "6.
|
|
34
|
+
"@jsenv/ast": "6.8.0",
|
|
35
35
|
"@jsenv/sourcemap": "1.3.17"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
package/src/client/supervisor.js
CHANGED
|
@@ -1312,9 +1312,9 @@ window.__supervisor__ = (() => {
|
|
|
1312
1312
|
console.log('window "error" event received', errorEvent);
|
|
1313
1313
|
}
|
|
1314
1314
|
const { error, message, filename, lineno, colno } = errorEvent;
|
|
1315
|
-
if (error && error.
|
|
1315
|
+
if (error && error.__handled_by__) {
|
|
1316
1316
|
if (logs) {
|
|
1317
|
-
console.log("ignore error event because
|
|
1317
|
+
console.log("ignore error event because __handled_by__ is set");
|
|
1318
1318
|
}
|
|
1319
1319
|
return;
|
|
1320
1320
|
}
|
|
@@ -1333,6 +1333,14 @@ window.__supervisor__ = (() => {
|
|
|
1333
1333
|
if (event.defaultPrevented) {
|
|
1334
1334
|
return;
|
|
1335
1335
|
}
|
|
1336
|
+
if (event.reason && event.reason.__handled_by__) {
|
|
1337
|
+
if (logs) {
|
|
1338
|
+
console.log(
|
|
1339
|
+
"ignore unhandledrejection event because __handled_by__ is set",
|
|
1340
|
+
);
|
|
1341
|
+
}
|
|
1342
|
+
return;
|
|
1343
|
+
}
|
|
1336
1344
|
const exception = supervisor.createException(event.reason, {
|
|
1337
1345
|
reportedBy: "window_unhandledrejection_event",
|
|
1338
1346
|
});
|
|
@@ -70,7 +70,7 @@ export const jsenvPluginSupervisor = ({
|
|
|
70
70
|
return {
|
|
71
71
|
name: "jsenv:supervisor",
|
|
72
72
|
appliesDuring: "dev",
|
|
73
|
-
|
|
73
|
+
serverRoutes: [
|
|
74
74
|
{
|
|
75
75
|
endpoint: "GET /.internal/get_cause_trace/*",
|
|
76
76
|
description: "Return source code around the place an error was thrown.",
|