@shuvi/error-overlay 1.0.54 → 1.0.56
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/lib/client.js +6 -6
- package/lib/iframe-bundle.js +40 -50
- package/lib/middleware/helper/createOriginalStackFrame.d.ts +1 -1
- package/lib/middleware/helper/createOriginalStackFrame.js +7 -8
- package/lib/middleware/helper/findOriginalSourcePositionAndContent.js +2 -3
- package/lib/middleware/helper/getModuleById.js +1 -2
- package/lib/middleware/helper/getOriginalStackFrame.js +2 -3
- package/lib/middleware/helper/getSourceById.d.ts +1 -1
- package/lib/middleware/helper/getSourceById.js +2 -3
- package/lib/middleware/helper/getSourceMapUrl.js +1 -2
- package/lib/middleware/helper/getSourcePath.js +1 -2
- package/lib/middleware/launchEditorMiddleware.js +1 -2
- package/lib/middleware/stackFrameMiddleware.js +3 -4
- package/lib/view/ErrorOverlay.d.ts +1 -1
- package/lib/view/components/Dialog/Dialog.d.ts +1 -1
- package/lib/view/components/Dialog/Dialog.js +1 -1
- package/lib/view/components/Dialog/DialogBody.d.ts +1 -1
- package/lib/view/components/Dialog/DialogBody.js +1 -1
- package/lib/view/components/Dialog/DialogContent.d.ts +1 -1
- package/lib/view/components/Dialog/DialogContent.js +1 -1
- package/lib/view/components/Dialog/DialogHeader.d.ts +1 -1
- package/lib/view/components/Dialog/DialogHeader.js +1 -1
- package/lib/view/components/Errors/CallStackFrame/CallStackFrame.d.ts +1 -1
- package/lib/view/components/Errors/CallStackFrame/CallStackFrame.js +1 -1
- package/lib/view/components/Errors/CodeFrame/CodeFrame.d.ts +1 -1
- package/lib/view/components/Errors/CodeFrame/CodeFrame.js +2 -2
- package/lib/view/components/Errors/Errors.d.ts +1 -1
- package/lib/view/components/Errors/Errors.js +1 -1
- package/lib/view/components/Icons/ArrowLeftIcon.d.ts +0 -1
- package/lib/view/components/Icons/ArrowLeftIcon.js +1 -1
- package/lib/view/components/Icons/ArrowRightIcon.d.ts +0 -1
- package/lib/view/components/Icons/ArrowRightIcon.js +1 -1
- package/lib/view/components/Icons/CloseIcon.d.ts +0 -1
- package/lib/view/components/Icons/CloseIcon.js +1 -1
- package/lib/view/components/Icons/ExternalLinkIcon.d.ts +0 -1
- package/lib/view/components/Icons/ExternalLinkIcon.js +1 -1
- package/lib/view/components/Icons/WarningIcon.d.ts +0 -1
- package/lib/view/components/Icons/WarningIcon.js +1 -1
- package/lib/view/components/NavigationBar/NavigationBar.d.ts +1 -1
- package/lib/view/components/NavigationBar/NavigationBar.js +1 -1
- package/lib/view/components/Overlay/Overlay.d.ts +1 -1
- package/lib/view/components/Overlay/Overlay.js +1 -1
- package/lib/view/components/Overlay/body-locker.js +2 -3
- package/lib/view/components/ShadowPortal.d.ts +1 -1
- package/lib/view/components/Terminal/Terminal.d.ts +1 -1
- package/lib/view/components/Terminal/Terminal.js +2 -2
- package/lib/view/components/Toast/Toast.d.ts +1 -1
- package/lib/view/components/Toast/Toast.js +1 -1
- package/lib/view/container/BuildError.d.ts +1 -1
- package/lib/view/container/BuildError.js +1 -1
- package/lib/view/container/RuntimeError.d.ts +2 -2
- package/lib/view/container/RuntimeError.js +4 -4
- package/lib/view/errorTypeHandler.d.ts +7 -7
- package/lib/view/errorTypeHandler.js +3 -4
- package/lib/view/helpers/getErrorByType.d.ts +1 -1
- package/lib/view/helpers/getErrorByType.js +1 -2
- package/lib/view/helpers/nodeStackFrames.d.ts +1 -1
- package/lib/view/helpers/nodeStackFrames.js +4 -5
- package/lib/view/helpers/noop-template.js +1 -2
- package/lib/view/helpers/parseStack.js +2 -3
- package/lib/view/helpers/stack-frame.d.ts +1 -1
- package/lib/view/helpers/stack-frame.js +2 -3
- package/lib/view/hooks/use-on-click-outside.js +1 -2
- package/lib/view/styles/Base.d.ts +0 -1
- package/lib/view/styles/Base.js +1 -2
- package/lib/view/styles/ComponentStyles.d.ts +0 -1
- package/lib/view/styles/ComponentStyles.js +1 -2
- package/lib/view/styles/CssReset.d.ts +0 -1
- package/lib/view/styles/CssReset.js +1 -2
- package/package.json +5 -5
- package/umd/index.js +16 -20
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.parseError = parseError;
|
|
4
|
+
exports.parseStack = parseStack;
|
|
4
5
|
const stacktrace_parser_1 = require("stacktrace-parser");
|
|
5
6
|
const regexValidFrame_Chrome = /^\s*(at|in)\s.+(:\d+)/;
|
|
6
7
|
const regexValidFrame_FireFox = /(^|@)\S+:\d+|.+line\s+\d+\s+>\s+(eval|Function).+/;
|
|
@@ -13,7 +14,6 @@ function parseError(stack) {
|
|
|
13
14
|
}
|
|
14
15
|
return '';
|
|
15
16
|
}
|
|
16
|
-
exports.parseError = parseError;
|
|
17
17
|
function parseStack(stack) {
|
|
18
18
|
const frames = (0, stacktrace_parser_1.parse)(parseError(stack));
|
|
19
19
|
return frames.map(frame => {
|
|
@@ -28,4 +28,3 @@ function parseStack(stack) {
|
|
|
28
28
|
return frame;
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
exports.parseStack = parseStack;
|
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.getOriginalStackFrames = getOriginalStackFrames;
|
|
13
|
+
exports.getFrameSource = getFrameSource;
|
|
13
14
|
const constants_1 = require("@shuvi/shared/constants");
|
|
14
15
|
function getOriginalStackFrames(frames, type, errorMessage) {
|
|
15
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -21,7 +22,6 @@ function getOriginalStackFrames(frames, type, errorMessage) {
|
|
|
21
22
|
return yield res.json();
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
|
-
exports.getOriginalStackFrames = getOriginalStackFrames;
|
|
25
25
|
function getFrameSource(frame) {
|
|
26
26
|
var _a;
|
|
27
27
|
let str = '';
|
|
@@ -57,4 +57,3 @@ function getFrameSource(frame) {
|
|
|
57
57
|
}
|
|
58
58
|
return str.slice(0, -1);
|
|
59
59
|
}
|
|
60
|
-
exports.getFrameSource = getFrameSource;
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.useOnClickOutside =
|
|
26
|
+
exports.useOnClickOutside = useOnClickOutside;
|
|
27
27
|
const React = __importStar(require("react"));
|
|
28
28
|
function useOnClickOutside(el, handler) {
|
|
29
29
|
React.useEffect(() => {
|
|
@@ -46,4 +46,3 @@ function useOnClickOutside(el, handler) {
|
|
|
46
46
|
};
|
|
47
47
|
}, [handler, el]);
|
|
48
48
|
}
|
|
49
|
-
exports.useOnClickOutside = useOnClickOutside;
|
package/lib/view/styles/Base.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Base =
|
|
3
|
+
exports.Base = Base;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const noop_template_1 = require("../helpers/noop-template");
|
|
6
6
|
function Base() {
|
|
@@ -81,4 +81,3 @@ function Base() {
|
|
|
81
81
|
}
|
|
82
82
|
` }));
|
|
83
83
|
}
|
|
84
|
-
exports.Base = Base;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComponentStyles =
|
|
3
|
+
exports.ComponentStyles = ComponentStyles;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Dialog_1 = require("../components/Dialog");
|
|
6
6
|
const NavigationBar_1 = require("../components/NavigationBar");
|
|
@@ -24,4 +24,3 @@ function ComponentStyles() {
|
|
|
24
24
|
${RuntimeError_1.styles}
|
|
25
25
|
` }));
|
|
26
26
|
}
|
|
27
|
-
exports.ComponentStyles = ComponentStyles;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CssReset =
|
|
3
|
+
exports.CssReset = CssReset;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const noop_template_1 = require("../helpers/noop-template");
|
|
6
6
|
function CssReset() {
|
|
@@ -358,4 +358,3 @@ function CssReset() {
|
|
|
358
358
|
}
|
|
359
359
|
` }));
|
|
360
360
|
}
|
|
361
|
-
exports.CssReset = CssReset;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/error-overlay",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.56",
|
|
4
4
|
"main": "umd/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "run-p watch:*",
|
|
12
12
|
"watch:iframe": "cross-env NODE_ENV=development rollup -c rollup.config.iframe.js -w",
|
|
13
|
-
"watch:cjs": "tsc -p tsconfig.build.json -
|
|
13
|
+
"watch:cjs": "tsc -p tsconfig.build.cjs.json -w",
|
|
14
14
|
"watch:umd": "cross-env NODE_ENV=development rollup -c rollup.config.js -w",
|
|
15
15
|
"prebuild": "rimraf lib",
|
|
16
16
|
"build": "pnpm run iframe-prod && run-p build:*",
|
|
17
17
|
"iframe-prod": "cross-env NODE_ENV=production rollup -c rollup.config.iframe.js",
|
|
18
|
-
"build:cjs": "tsc -p tsconfig.build.json
|
|
18
|
+
"build:cjs": "tsc -p tsconfig.build.cjs.json",
|
|
19
19
|
"build:umd": "cross-env NODE_ENV=production rollup -c rollup.config.js"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/code-frame": "7.14.5",
|
|
26
|
-
"@shuvi/shared": "1.0.
|
|
27
|
-
"@shuvi/toolpack": "1.0.
|
|
26
|
+
"@shuvi/shared": "1.0.56",
|
|
27
|
+
"@shuvi/toolpack": "1.0.56",
|
|
28
28
|
"anser": "1.4.9",
|
|
29
29
|
"data-uri-to-buffer": "3.0.1",
|
|
30
30
|
"html-entities": "2.3.2",
|