@shuvi/error-overlay 1.0.63 → 2.0.0-dev.4
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/middleware/helper/createOriginalStackFrame.d.ts +2 -2
- package/lib/middleware/helper/createOriginalStackFrame.js +4 -0
- package/lib/middleware/helper/getModuleById.d.ts +2 -2
- package/lib/middleware/helper/getModuleById.js +8 -0
- package/lib/middleware/helper/getOriginalStackFrame.d.ts +2 -2
- package/lib/middleware/helper/getOriginalStackFrame.js +16 -7
- package/lib/middleware/helper/getSourceById.d.ts +2 -2
- package/lib/middleware/helper/getSourceById.js +12 -0
- package/lib/middleware/stackFrameMiddleware.js +5 -1
- package/package.json +3 -3
- package/umd/client.d.ts +0 -15
- package/umd/constants.d.ts +0 -7
- package/umd/iframeScript.d.ts +0 -1
- package/umd/index.d.ts +0 -2
- package/umd/middleware/helper/createOriginalStackFrame.d.ts +0 -15
- package/umd/middleware/helper/findOriginalSourcePositionAndContent.d.ts +0 -7
- package/umd/middleware/helper/getModuleById.d.ts +0 -2
- package/umd/middleware/helper/getOriginalStackFrame.d.ts +0 -6
- package/umd/middleware/helper/getSourceById.d.ts +0 -6
- package/umd/middleware/helper/getSourceMapUrl.d.ts +0 -1
- package/umd/middleware/helper/getSourcePath.d.ts +0 -1
- package/umd/middleware/index.d.ts +0 -2
- package/umd/middleware/launchEditorMiddleware.d.ts +0 -2
- package/umd/middleware/stackFrameMiddleware.d.ts +0 -2
- package/umd/view/ErrorOverlay.d.ts +0 -2
- package/umd/view/components/Dialog/Dialog.d.ts +0 -10
- package/umd/view/components/Dialog/DialogBody.d.ts +0 -7
- package/umd/view/components/Dialog/DialogContent.d.ts +0 -7
- package/umd/view/components/Dialog/DialogHeader.d.ts +0 -7
- package/umd/view/components/Dialog/index.d.ts +0 -5
- package/umd/view/components/Dialog/styles.d.ts +0 -2
- package/umd/view/components/Errors/CallStackFrame/CallStackFrame.d.ts +0 -10
- package/umd/view/components/Errors/CallStackFrame/index.d.ts +0 -1
- package/umd/view/components/Errors/CodeFrame/CodeFrame.d.ts +0 -7
- package/umd/view/components/Errors/CodeFrame/index.d.ts +0 -1
- package/umd/view/components/Errors/Errors.d.ts +0 -7
- package/umd/view/components/Errors/index.d.ts +0 -2
- package/umd/view/components/Errors/styles.d.ts +0 -1
- package/umd/view/components/Icons/ArrowLeftIcon.d.ts +0 -3
- package/umd/view/components/Icons/ArrowRightIcon.d.ts +0 -3
- package/umd/view/components/Icons/CloseIcon.d.ts +0 -3
- package/umd/view/components/Icons/ExternalLinkIcon.d.ts +0 -3
- package/umd/view/components/Icons/WarningIcon.d.ts +0 -3
- package/umd/view/components/Icons/index.d.ts +0 -5
- package/umd/view/components/NavigationBar/NavigationBar.d.ts +0 -10
- package/umd/view/components/NavigationBar/index.d.ts +0 -2
- package/umd/view/components/NavigationBar/styles.d.ts +0 -2
- package/umd/view/components/Overlay/Overlay.d.ts +0 -8
- package/umd/view/components/Overlay/body-locker.d.ts +0 -2
- package/umd/view/components/Overlay/index.d.ts +0 -2
- package/umd/view/components/Overlay/styles.d.ts +0 -2
- package/umd/view/components/ShadowPortal.d.ts +0 -5
- package/umd/view/components/Terminal/Terminal.d.ts +0 -5
- package/umd/view/components/Terminal/index.d.ts +0 -2
- package/umd/view/components/Terminal/styles.d.ts +0 -2
- package/umd/view/components/Toast/Toast.d.ts +0 -7
- package/umd/view/components/Toast/index.d.ts +0 -2
- package/umd/view/components/Toast/styles.d.ts +0 -2
- package/umd/view/container/BuildError.d.ts +0 -6
- package/umd/view/container/RuntimeError.d.ts +0 -11
- package/umd/view/container/index.d.ts +0 -2
- package/umd/view/errorTypeHandler.d.ts +0 -27
- package/umd/view/helpers/getErrorByType.d.ts +0 -9
- package/umd/view/helpers/nodeStackFrames.d.ts +0 -7
- package/umd/view/helpers/noop-template.d.ts +0 -1
- package/umd/view/helpers/parseStack.d.ts +0 -3
- package/umd/view/helpers/stack-frame.d.ts +0 -12
- package/umd/view/hooks/use-on-click-outside.d.ts +0 -1
- package/umd/view/styles/Base.d.ts +0 -2
- package/umd/view/styles/ComponentStyles.d.ts +0 -2
- package/umd/view/styles/CssReset.d.ts +0 -2
- package/umd/view/styles/index.d.ts +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StackFrame } from 'stacktrace-parser';
|
|
2
|
-
import
|
|
2
|
+
import * as Rspack from '@shuvi/toolpack/lib/webpack';
|
|
3
3
|
export type OriginalStackFrameResponse = {
|
|
4
4
|
originalStackFrame: StackFrame;
|
|
5
5
|
originalCodeFrame: string | null;
|
|
@@ -11,5 +11,5 @@ export declare function createOriginalStackFrame({ line, column, source, moduleP
|
|
|
11
11
|
modulePath?: string;
|
|
12
12
|
frame: any;
|
|
13
13
|
errorMessage?: string;
|
|
14
|
-
compilation?:
|
|
14
|
+
compilation?: Rspack.Compilation;
|
|
15
15
|
}): Promise<OriginalStackFrameResponse | null>;
|
|
@@ -19,6 +19,10 @@ function createOriginalStackFrame(_a) {
|
|
|
19
19
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
20
20
|
const match = errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.match(/'([^']+)' module/);
|
|
21
21
|
const moduleNotFound = match && match[1];
|
|
22
|
+
/**
|
|
23
|
+
* @unsupported Rspack does not support buildInfo.importLocByPath API in the same way as Webpack.
|
|
24
|
+
* TODO: Use Rspack's equivalent API when available or implement alternative import location lookup.
|
|
25
|
+
*/
|
|
22
26
|
const result = moduleNotFound && compilation
|
|
23
27
|
? (_e = (_d = (_c = (_b = (0, getModuleById_1.getModuleById)(modulePath, compilation)) === null || _b === void 0 ? void 0 : _b.buildInfo) === null || _c === void 0 ? void 0 : _c.importLocByPath) === null || _d === void 0 ? void 0 : _d.get(moduleNotFound)) !== null && _e !== void 0 ? _e : null
|
|
24
28
|
: yield (0, findOriginalSourcePositionAndContent_1.findOriginalSourcePositionAndContent)(source, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare function getModuleById(id: string | undefined, compilation:
|
|
1
|
+
import * as Rspack from '@shuvi/toolpack/lib/webpack';
|
|
2
|
+
export declare function getModuleById(id: string | undefined, compilation: Rspack.Compilation): Rspack.Module | undefined;
|
|
@@ -2,5 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getModuleById = getModuleById;
|
|
4
4
|
function getModuleById(id, compilation) {
|
|
5
|
+
/**
|
|
6
|
+
* @unsupported Rspack does not support ChunkGraph API in the same way as Webpack.
|
|
7
|
+
* TODO: Use Rspack's equivalent API when available or implement alternative module lookup.
|
|
8
|
+
*/
|
|
9
|
+
// return [...compilation.modules].find(
|
|
10
|
+
// searchModule => compilation.chunkGraph.getModuleId(searchModule) === id
|
|
11
|
+
// );
|
|
12
|
+
// Fallback implementation for Rspack
|
|
5
13
|
return [...compilation.modules].find(searchModule => compilation.chunkGraph.getModuleId(searchModule) === id);
|
|
6
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StackFrame } from 'stacktrace-parser';
|
|
2
|
-
import
|
|
2
|
+
import * as Rspack from '@shuvi/toolpack/lib/webpack';
|
|
3
3
|
import type { Source } from './getSourceById';
|
|
4
4
|
import type { OriginalStackFrame } from '../../view/helpers/stack-frame';
|
|
5
5
|
export { OriginalStackFrame };
|
|
6
|
-
export declare function getOriginalStackFrame(frame: StackFrame, cache: Map<string, Source | null>, resolveBuildFile: (...paths: string[]) => string, buildDir: string, errorMessage?: string, compilation?:
|
|
6
|
+
export declare function getOriginalStackFrame(frame: StackFrame, cache: Map<string, Source | null>, resolveBuildFile: (...paths: string[]) => string, buildDir: string, errorMessage?: string, compilation?: Rspack.Compilation): Promise<OriginalStackFrame>;
|
|
@@ -13,9 +13,14 @@ exports.getOriginalStackFrame = getOriginalStackFrame;
|
|
|
13
13
|
const createOriginalStackFrame_1 = require("./createOriginalStackFrame");
|
|
14
14
|
function getOriginalStackFrame(frame, cache, resolveBuildFile, buildDir, errorMessage, compilation) {
|
|
15
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
17
|
+
/**
|
|
18
|
+
* @unsupported Rspack may use different internal URL patterns than webpack-internal:.
|
|
19
|
+
* TODO: Update URL pattern detection to match Rspack's internal URL format when available.
|
|
20
|
+
*/
|
|
17
21
|
if (!(((_a = frame.file) === null || _a === void 0 ? void 0 : _a.startsWith('webpack-internal:')) ||
|
|
18
|
-
((_b = frame.file) === null || _b === void 0 ? void 0 : _b.startsWith('
|
|
22
|
+
((_b = frame.file) === null || _b === void 0 ? void 0 : _b.startsWith('rspack-internal:')) ||
|
|
23
|
+
((_c = frame.file) === null || _c === void 0 ? void 0 : _c.startsWith('file:')))) {
|
|
19
24
|
return {
|
|
20
25
|
error: false,
|
|
21
26
|
reason: null,
|
|
@@ -37,17 +42,21 @@ function getOriginalStackFrame(frame, cache, resolveBuildFile, buildDir, errorMe
|
|
|
37
42
|
originalCodeFrame: null
|
|
38
43
|
};
|
|
39
44
|
}
|
|
40
|
-
const frameLine = parseInt((
|
|
41
|
-
let frameColumn = parseInt((
|
|
45
|
+
const frameLine = parseInt((_e = (_d = frame.lineNumber) === null || _d === void 0 ? void 0 : _d.toString()) !== null && _e !== void 0 ? _e : '', 10);
|
|
46
|
+
let frameColumn = parseInt((_g = (_f = frame.column) === null || _f === void 0 ? void 0 : _f.toString()) !== null && _g !== void 0 ? _g : '', 10);
|
|
42
47
|
if (!frameColumn) {
|
|
43
48
|
frameColumn = null;
|
|
44
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* @unsupported Rspack may use different internal URL patterns than webpack-internal:.
|
|
52
|
+
* TODO: Update URL pattern replacement to match Rspack's internal URL format when available.
|
|
53
|
+
*/
|
|
45
54
|
const originalStackFrameResponse = yield (0, createOriginalStackFrame_1.createOriginalStackFrame)({
|
|
46
55
|
line: frameLine,
|
|
47
56
|
column: frameColumn,
|
|
48
57
|
source: cache.get(frame.file),
|
|
49
58
|
frame,
|
|
50
|
-
modulePath: resolveBuildFile(buildDir, frame.file.replace(/^(webpack-internal:\/\/\/|file:\/\/)/, '')),
|
|
59
|
+
modulePath: resolveBuildFile(buildDir, frame.file.replace(/^(webpack-internal:\/\/\/|rspack-internal:\/\/\/|file:\/\/)/, '')),
|
|
51
60
|
errorMessage,
|
|
52
61
|
compilation
|
|
53
62
|
});
|
|
@@ -68,8 +77,8 @@ function getOriginalStackFrame(frame, cache, resolveBuildFile, buildDir, errorMe
|
|
|
68
77
|
external: false,
|
|
69
78
|
expanded: !Boolean(
|
|
70
79
|
/* collapsed */
|
|
71
|
-
(
|
|
72
|
-
((
|
|
80
|
+
(_l = (((_h = frame.file) === null || _h === void 0 ? void 0 : _h.includes('node_modules')) ||
|
|
81
|
+
((_k = (_j = originalStackFrameResponse.originalStackFrame) === null || _j === void 0 ? void 0 : _j.file) === null || _k === void 0 ? void 0 : _k.includes('node_modules')))) !== null && _l !== void 0 ? _l : true),
|
|
73
82
|
sourceStackFrame: frame,
|
|
74
83
|
originalStackFrame: originalStackFrameResponse.originalStackFrame,
|
|
75
84
|
originalCodeFrame: originalStackFrameResponse.originalCodeFrame || null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RawSourceMap } from 'source-map';
|
|
2
|
-
import
|
|
2
|
+
import * as Rspack from '@shuvi/toolpack/lib/webpack';
|
|
3
3
|
export type Source = {
|
|
4
4
|
map: () => RawSourceMap;
|
|
5
5
|
} | null;
|
|
6
|
-
export declare function getSourceById(isFile: boolean, id: string, compiler:
|
|
6
|
+
export declare function getSourceById(isFile: boolean, id: string, compiler: Rspack.Compiler, resolveBuildFile: (...paths: string[]) => string, buildDir: string, compilation?: Rspack.Compilation): Promise<Source>;
|
|
@@ -42,6 +42,14 @@ const getSourceMapUrl_1 = require("./getSourceMapUrl");
|
|
|
42
42
|
const getModuleById_1 = require("./getModuleById");
|
|
43
43
|
const readFileWrapper = (url, compiler) => {
|
|
44
44
|
return new Promise(resolve => {
|
|
45
|
+
/**
|
|
46
|
+
* @unsupported Rspack may have different outputFileSystem API.
|
|
47
|
+
* TODO: Verify Rspack's outputFileSystem implementation and update accordingly.
|
|
48
|
+
*/
|
|
49
|
+
if (!compiler.outputFileSystem) {
|
|
50
|
+
resolve(null);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
45
53
|
compiler.outputFileSystem.readFile(url, (err, res) => {
|
|
46
54
|
if (err) {
|
|
47
55
|
resolve(null);
|
|
@@ -116,6 +124,10 @@ function getSourceById(isFile, id, compiler, resolveBuildFile, buildDir, compila
|
|
|
116
124
|
return null;
|
|
117
125
|
}
|
|
118
126
|
const module = (0, getModuleById_1.getModuleById)(id, compilation);
|
|
127
|
+
/**
|
|
128
|
+
* @unsupported Rspack does not support codeGenerationResults API in the same way as Webpack.
|
|
129
|
+
* TODO: Use Rspack's equivalent API when available or implement alternative source extraction.
|
|
130
|
+
*/
|
|
119
131
|
return ((_b = (module &&
|
|
120
132
|
((_a = compilation.codeGenerationResults
|
|
121
133
|
.get(module)) === null || _a === void 0 ? void 0 : _a.sources.get('javascript')))) !== null && _b !== void 0 ? _b : null);
|
|
@@ -32,7 +32,11 @@ function stackFrameMiddleware(originalStackFrameEndpoint, bundler, resolveBuildF
|
|
|
32
32
|
const collectSourceMaps = (files, compiler, compilation, cache, buildDir) => __awaiter(this, void 0, void 0, function* () {
|
|
33
33
|
yield Promise.all(files.map((fileName) => __awaiter(this, void 0, void 0, function* () {
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @unsupported Rspack may use different module resolution patterns than webpack-internal:///.
|
|
37
|
+
* TODO: Update module resolution pattern after confirming Rspack's internal module format.
|
|
38
|
+
*/
|
|
39
|
+
const moduleId = fileName.replace(/^(webpack-internal:\/\/\/|file:\/\/|rspack-internal:\/\/\/)/, '');
|
|
36
40
|
const source = yield (0, getSourceById_1.getSourceById)(fileName.startsWith('file:'), moduleId, compiler, resolveBuildFile, buildDir, compilation);
|
|
37
41
|
cache.set(fileName, source);
|
|
38
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shuvi/error-overlay",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-dev.4",
|
|
4
4
|
"main": "umd/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/code-frame": "7.14.5",
|
|
26
|
-
"@shuvi/shared": "
|
|
27
|
-
"@shuvi/toolpack": "
|
|
26
|
+
"@shuvi/shared": "2.0.0-dev.4",
|
|
27
|
+
"@shuvi/toolpack": "2.0.0-dev.4",
|
|
28
28
|
"anser": "1.4.9",
|
|
29
29
|
"data-uri-to-buffer": "3.0.1",
|
|
30
30
|
"html-entities": "2.3.2",
|
package/umd/client.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface Window {
|
|
3
|
-
__SHUVI_ERROR_OVERLAY_GLOBAL_HOOK__: string | {};
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
declare function startReportingRuntimeErrors({ onError }: {
|
|
7
|
-
onError: () => void;
|
|
8
|
-
}): void;
|
|
9
|
-
declare function stopReportingRuntimeErrors(): void;
|
|
10
|
-
declare function onBuildOk(): void;
|
|
11
|
-
declare function onBuildError(message: string): void;
|
|
12
|
-
declare function onRefresh(): void;
|
|
13
|
-
export { getErrorByType } from './view/helpers/getErrorByType';
|
|
14
|
-
export { getServerError } from './view/helpers/nodeStackFrames';
|
|
15
|
-
export { onBuildError, onBuildOk, onRefresh, startReportingRuntimeErrors, stopReportingRuntimeErrors };
|
package/umd/constants.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const SERVER_TYPE_ERROR = "server";
|
|
2
|
-
export declare const TYPE_BUILD_OK = "build-ok";
|
|
3
|
-
export declare const TYPE_REFRESH = "fast-refresh";
|
|
4
|
-
export declare const TYPE_BUILD_ERROR = "build-error";
|
|
5
|
-
export declare const TYPE_UNHANDLED_ERROR = "unhandled-error";
|
|
6
|
-
export declare const TYPE_UNHANDLED_REJECTION = "unhandled-rejection";
|
|
7
|
-
export declare const STACK_TRACE_LIMIT = 50;
|
package/umd/iframeScript.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/umd/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StackFrame } from 'stacktrace-parser';
|
|
2
|
-
import type webpack from '@shuvi/toolpack/lib/webpack';
|
|
3
|
-
export declare type OriginalStackFrameResponse = {
|
|
4
|
-
originalStackFrame: StackFrame;
|
|
5
|
-
originalCodeFrame: string | null;
|
|
6
|
-
};
|
|
7
|
-
export declare function createOriginalStackFrame({ line, column, source, modulePath, frame, errorMessage, compilation }: {
|
|
8
|
-
line: number;
|
|
9
|
-
column: number | null;
|
|
10
|
-
source: any;
|
|
11
|
-
modulePath?: string;
|
|
12
|
-
frame: any;
|
|
13
|
-
errorMessage?: string;
|
|
14
|
-
compilation?: webpack.Compilation;
|
|
15
|
-
}): Promise<OriginalStackFrameResponse | null>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { StackFrame } from 'stacktrace-parser';
|
|
2
|
-
import type webpack from '@shuvi/toolpack/lib/webpack';
|
|
3
|
-
import type { Source } from './getSourceById';
|
|
4
|
-
import type { OriginalStackFrame } from '../../view/helpers/stack-frame';
|
|
5
|
-
export { OriginalStackFrame };
|
|
6
|
-
export declare function getOriginalStackFrame(frame: StackFrame, cache: Map<string, Source | null>, resolveBuildFile: (...paths: string[]) => string, buildDir: string, errorMessage?: string, compilation?: webpack.Compilation): Promise<OriginalStackFrame>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { RawSourceMap } from 'source-map';
|
|
2
|
-
import type { webpack } from '@shuvi/toolpack/lib/webpack';
|
|
3
|
-
export declare type Source = {
|
|
4
|
-
map: () => RawSourceMap;
|
|
5
|
-
} | null;
|
|
6
|
-
export declare function getSourceById(isFile: boolean, id: string, compiler: webpack.Compiler, resolveBuildFile: (...paths: string[]) => string, buildDir: string, compilation?: webpack.Compilation): Promise<Source>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getSourceMapUrl(fileContents: string): string | null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getSourcePath(source: string): string;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
2
|
-
export declare function stackFrameMiddleware(originalStackFrameEndpoint: string, bundler: any, resolveBuildFile: (...paths: string[]) => string, buildDefaultDir: string, buildServerDir: string): (req: IncomingMessage, res: ServerResponse, next: Function) => Promise<any>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare type DialogProps = {
|
|
3
|
-
type: 'error' | 'warning';
|
|
4
|
-
'aria-labelledby': string;
|
|
5
|
-
'aria-describedby': string;
|
|
6
|
-
onClose?: (e: MouseEvent | TouchEvent) => void;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
declare const Dialog: React.FC<DialogProps>;
|
|
10
|
-
export { Dialog };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { StackFrame } from 'stacktrace-parser';
|
|
3
|
-
import { OriginalStackFrame } from '../../../helpers/stack-frame';
|
|
4
|
-
export declare type CallStackFrameProps = {
|
|
5
|
-
stackFrame: StackFrame;
|
|
6
|
-
codeFrame: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const CallStackFrame: React.FC<{
|
|
9
|
-
frame: OriginalStackFrame;
|
|
10
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CallStackFrame } from './CallStackFrame';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CodeFrame } from './CodeFrame';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const styles: string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare type NavigationBarProps = {
|
|
3
|
-
className?: string;
|
|
4
|
-
previous: (() => void) | null;
|
|
5
|
-
next: (() => void) | null;
|
|
6
|
-
close?: () => void;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
declare const NavigationBar: React.FC<NavigationBarProps>;
|
|
10
|
-
export { NavigationBar };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { UnhandledError, UnhandledRejection } from '../errorTypeHandler';
|
|
3
|
-
export declare type SupportedErrorEvent = {
|
|
4
|
-
id: number;
|
|
5
|
-
event: UnhandledError | UnhandledRejection;
|
|
6
|
-
};
|
|
7
|
-
export declare type RuntimeErrorProps = {
|
|
8
|
-
errors: SupportedErrorEvent[];
|
|
9
|
-
};
|
|
10
|
-
export declare const RuntimeError: React.FC<RuntimeErrorProps>;
|
|
11
|
-
export declare const styles: string;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { StackFrame } from 'stacktrace-parser';
|
|
2
|
-
import { TYPE_BUILD_OK, TYPE_REFRESH, TYPE_BUILD_ERROR, TYPE_UNHANDLED_ERROR, TYPE_UNHANDLED_REJECTION } from '../constants';
|
|
3
|
-
export declare type BuildOk = {
|
|
4
|
-
type: typeof TYPE_BUILD_OK;
|
|
5
|
-
};
|
|
6
|
-
export declare type FastRefresh = {
|
|
7
|
-
type: typeof TYPE_REFRESH;
|
|
8
|
-
};
|
|
9
|
-
export declare type BuildError = {
|
|
10
|
-
type: typeof TYPE_BUILD_ERROR;
|
|
11
|
-
message: string;
|
|
12
|
-
};
|
|
13
|
-
export declare type UnhandledError = {
|
|
14
|
-
type: typeof TYPE_UNHANDLED_ERROR;
|
|
15
|
-
reason: Error;
|
|
16
|
-
frames: StackFrame[];
|
|
17
|
-
};
|
|
18
|
-
export declare type UnhandledRejection = {
|
|
19
|
-
type: typeof TYPE_UNHANDLED_REJECTION;
|
|
20
|
-
reason: Error;
|
|
21
|
-
frames: StackFrame[];
|
|
22
|
-
};
|
|
23
|
-
export declare type ErrorTypeEvent = BuildOk | FastRefresh | BuildError | UnhandledError | UnhandledRejection;
|
|
24
|
-
export declare type ErrorTypeEventHandler = (ev: ErrorTypeEvent) => void;
|
|
25
|
-
export declare function emit(ev: ErrorTypeEvent): void;
|
|
26
|
-
export declare function on(fn: ErrorTypeEventHandler): boolean;
|
|
27
|
-
export declare function off(fn: ErrorTypeEventHandler): boolean;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SupportedErrorEvent } from '../container/RuntimeError';
|
|
2
|
-
import { OriginalStackFrame } from './stack-frame';
|
|
3
|
-
export declare type ReadyRuntimeError = {
|
|
4
|
-
id: number;
|
|
5
|
-
runtime: true;
|
|
6
|
-
error: Error;
|
|
7
|
-
frames: OriginalStackFrame[];
|
|
8
|
-
};
|
|
9
|
-
export declare function getErrorByType(ev: SupportedErrorEvent): Promise<ReadyRuntimeError>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StackFrame } from 'stacktrace-parser';
|
|
2
|
-
declare type ErrorType = 'server';
|
|
3
|
-
export declare function getFilesystemFrame(frame: StackFrame): StackFrame;
|
|
4
|
-
export declare function decorateServerError(error: Error): void;
|
|
5
|
-
export declare function getServerError(error: Error): Error;
|
|
6
|
-
export declare function getErrorSource(error: Error): ErrorType | null;
|
|
7
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function noop(strings: TemplateStringsArray, ...keys: readonly string[]): string;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StackFrame } from 'stacktrace-parser';
|
|
2
|
-
export declare type OriginalStackFrame = {
|
|
3
|
-
error: boolean;
|
|
4
|
-
reason: string | null;
|
|
5
|
-
external: boolean;
|
|
6
|
-
expanded: boolean;
|
|
7
|
-
sourceStackFrame: StackFrame;
|
|
8
|
-
originalStackFrame: StackFrame | null;
|
|
9
|
-
originalCodeFrame: string | null;
|
|
10
|
-
};
|
|
11
|
-
export declare function getOriginalStackFrames(frames: StackFrame[], type: 'server' | null, errorMessage: string): Promise<OriginalStackFrame[]>;
|
|
12
|
-
export declare function getFrameSource(frame: StackFrame): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useOnClickOutside(el: Node | null, handler: ((e: MouseEvent | TouchEvent) => void) | undefined): void;
|