@remotion/bundler 2.6.2 → 2.6.6
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/error-overlay/entry-basic.js +13 -13
- package/dist/error-overlay/entry-basic.js.map +1 -1
- package/dist/error-overlay/react-overlay/effects/format-warning.d.ts +1 -2
- package/dist/error-overlay/react-overlay/effects/format-warning.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/effects/format-warning.js +3 -3
- package/dist/error-overlay/react-overlay/effects/format-warning.js.map +1 -1
- package/dist/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts +8 -0
- package/dist/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/effects/map-error-to-react-stack.js +47 -0
- package/dist/error-overlay/react-overlay/effects/map-error-to-react-stack.js.map +1 -0
- package/dist/error-overlay/react-overlay/effects/proxy-console.d.ts +10 -3
- package/dist/error-overlay/react-overlay/effects/proxy-console.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/effects/proxy-console.js +11 -1
- package/dist/error-overlay/react-overlay/effects/proxy-console.js.map +1 -1
- package/dist/error-overlay/react-overlay/effects/resolve-file-source.d.ts +4 -0
- package/dist/error-overlay/react-overlay/effects/resolve-file-source.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/effects/resolve-file-source.js +32 -0
- package/dist/error-overlay/react-overlay/effects/resolve-file-source.js.map +1 -0
- package/dist/error-overlay/react-overlay/index.d.ts +2 -7
- package/dist/error-overlay/react-overlay/index.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/index.js +10 -33
- package/dist/error-overlay/react-overlay/index.js.map +1 -1
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +4 -7
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js +41 -33
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js.map +1 -1
- package/dist/error-overlay/react-overlay/utils/get-file-source.d.ts +2 -0
- package/dist/error-overlay/react-overlay/utils/get-file-source.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/get-file-source.js +22 -0
- package/dist/error-overlay/react-overlay/utils/get-file-source.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/get-lines-around.d.ts +1 -1
- package/dist/error-overlay/react-overlay/utils/get-lines-around.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/utils/get-lines-around.js +5 -11
- package/dist/error-overlay/react-overlay/utils/get-lines-around.js.map +1 -1
- package/dist/error-overlay/react-overlay/utils/get-source-map.d.ts +2 -19
- package/dist/error-overlay/react-overlay/utils/get-source-map.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/utils/get-source-map.js +3 -30
- package/dist/error-overlay/react-overlay/utils/get-source-map.js.map +1 -1
- package/dist/error-overlay/react-overlay/utils/get-stack-frames.d.ts +2 -6
- package/dist/error-overlay/react-overlay/utils/get-stack-frames.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/utils/get-stack-frames.js +11 -21
- package/dist/error-overlay/react-overlay/utils/get-stack-frames.js.map +1 -1
- package/dist/error-overlay/react-overlay/utils/open-in-editor.d.ts +0 -2
- package/dist/error-overlay/react-overlay/utils/open-in-editor.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/utils/open-in-editor.js +2 -4
- package/dist/error-overlay/react-overlay/utils/open-in-editor.js.map +1 -1
- package/dist/error-overlay/react-overlay/utils/parser.d.ts +2 -14
- package/dist/error-overlay/react-overlay/utils/parser.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/utils/parser.js +47 -14
- package/dist/error-overlay/react-overlay/utils/parser.js.map +1 -1
- package/dist/error-overlay/react-overlay/utils/path.d.ts +1 -1
- package/dist/error-overlay/react-overlay/utils/path.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/utils/path.js +0 -18
- package/dist/error-overlay/react-overlay/utils/path.js.map +1 -1
- package/dist/error-overlay/react-overlay/utils/stack-frame.d.ts +27 -32
- package/dist/error-overlay/react-overlay/utils/stack-frame.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/utils/stack-frame.js +21 -74
- package/dist/error-overlay/react-overlay/utils/stack-frame.js.map +1 -1
- package/dist/error-overlay/react-overlay/utils/unmapper.d.ts +2 -13
- package/dist/error-overlay/react-overlay/utils/unmapper.d.ts.map +1 -1
- package/dist/error-overlay/react-overlay/utils/unmapper.js +37 -72
- package/dist/error-overlay/react-overlay/utils/unmapper.js.map +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.d.ts.map +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +19 -35
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js.map +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorLoader.d.ts +5 -0
- package/dist/error-overlay/remotion-overlay/ErrorLoader.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +62 -0
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/ErrorTitle.d.ts +7 -0
- package/dist/error-overlay/remotion-overlay/ErrorTitle.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/ErrorTitle.js +42 -0
- package/dist/error-overlay/remotion-overlay/ErrorTitle.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +2 -2
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts.map +1 -1
- package/dist/error-overlay/remotion-overlay/Overlay.d.ts +2 -4
- package/dist/error-overlay/remotion-overlay/Overlay.d.ts.map +1 -1
- package/dist/error-overlay/remotion-overlay/Overlay.js +24 -9
- package/dist/error-overlay/remotion-overlay/Overlay.js.map +1 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +3 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts.map +1 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +5 -3
- package/dist/error-overlay/remotion-overlay/StackFrame.js.map +1 -1
- package/dist/error-overlay/remotion-overlay/Symbolicating.d.ts +3 -0
- package/dist/error-overlay/remotion-overlay/Symbolicating.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +9 -0
- package/dist/error-overlay/remotion-overlay/Symbolicating.js.map +1 -0
- package/dist/get-latest-remotion-version.d.ts +2 -0
- package/dist/get-latest-remotion-version.d.ts.map +1 -0
- package/dist/get-latest-remotion-version.js +32 -0
- package/dist/get-latest-remotion-version.js.map +1 -0
- package/dist/get-package-manager.d.ts +9 -0
- package/dist/get-package-manager.d.ts.map +1 -0
- package/dist/get-package-manager.js +39 -0
- package/dist/get-package-manager.js.map +1 -0
- package/dist/hot-middleware/process-update.d.ts.map +1 -1
- package/dist/hot-middleware/process-update.js +6 -4
- package/dist/hot-middleware/process-update.js.map +1 -1
- package/dist/hot-middleware/strip-ansi.d.ts +0 -5
- package/dist/hot-middleware/strip-ansi.d.ts.map +1 -1
- package/dist/hot-middleware/strip-ansi.js +2 -3
- package/dist/hot-middleware/strip-ansi.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/start-server.d.ts.map +1 -1
- package/dist/start-server.js +20 -3
- package/dist/start-server.js.map +1 -1
- package/dist/test/expect-to-throw.d.ts +2 -0
- package/dist/test/expect-to-throw.d.ts.map +1 -0
- package/dist/test/expect-to-throw.js +15 -0
- package/dist/test/expect-to-throw.js.map +1 -0
- package/dist/test/latest-remotion-version.test.d.ts +2 -0
- package/dist/test/latest-remotion-version.test.d.ts.map +1 -0
- package/dist/test/latest-remotion-version.test.js +7 -0
- package/dist/test/latest-remotion-version.test.js.map +1 -0
- package/dist/test/parse-error-stack.test.d.ts +2 -0
- package/dist/test/parse-error-stack.test.d.ts.map +1 -0
- package/dist/test/parse-error-stack.test.js +18 -0
- package/dist/test/parse-error-stack.test.js.map +1 -0
- package/dist/test/parse-module-not-found.test.d.ts +2 -0
- package/dist/test/parse-module-not-found.test.d.ts.map +1 -0
- package/dist/test/parse-module-not-found.test.js +18 -0
- package/dist/test/parse-module-not-found.test.js.map +1 -0
- package/dist/test/secure-source-read.test.d.ts +2 -0
- package/dist/test/secure-source-read.test.d.ts.map +1 -0
- package/dist/test/secure-source-read.test.js +9 -0
- package/dist/test/secure-source-read.test.js.map +1 -0
- package/dist/update-available.d.ts +3 -3
- package/dist/update-available.d.ts.map +1 -1
- package/dist/update-available.js +5 -11
- package/dist/update-available.js.map +1 -1
- package/dist/webpack-cache.d.ts +0 -1
- package/dist/webpack-cache.d.ts.map +1 -1
- package/dist/webpack-cache.js +2 -3
- package/dist/webpack-cache.js.map +1 -1
- package/package.json +6 -5
- package/dist/dev-middleware/compatible.api.d.ts +0 -1
- package/dist/dev-middleware/compatible.api.d.ts.map +0 -1
- package/dist/dev-middleware/compatible.api.js +0 -2
- package/dist/dev-middleware/compatible.api.js.map +0 -1
- package/dist/dev-middleware/compatibleapi.d.ts +0 -1
- package/dist/dev-middleware/compatibleapi.d.ts.map +0 -1
- package/dist/dev-middleware/compatibleapi.js +0 -2
- package/dist/dev-middleware/compatibleapi.js.map +0 -1
- package/dist/error-overlay/entry-devserver.d.ts +0 -12
- package/dist/error-overlay/entry-devserver.d.ts.map +0 -1
- package/dist/error-overlay/entry-devserver.js +0 -36
- package/dist/error-overlay/entry-devserver.js.map +0 -1
- package/dist/error-overlay/index.d.ts +0 -5
- package/dist/error-overlay/index.d.ts.map +0 -1
- package/dist/error-overlay/index.js +0 -28
- package/dist/error-overlay/index.js.map +0 -1
- package/dist/error-overlay/react-overlay/stack-frame.d.ts +0 -47
- package/dist/error-overlay/react-overlay/stack-frame.d.ts.map +0 -1
- package/dist/error-overlay/react-overlay/stack-frame.js +0 -82
- package/dist/error-overlay/react-overlay/stack-frame.js.map +0 -1
- package/dist/setup-env-variables.d.ts +0 -2
- package/dist/setup-env-variables.d.ts.map +0 -1
- package/dist/setup-env-variables.js +0 -5
- package/dist/setup-env-variables.js.map +0 -1
|
@@ -3,83 +3,30 @@
|
|
|
3
3
|
Source code adapted from https://github.com/facebook/create-react-app/tree/main/packages/react-error-overlay and refactored in Typescript. This file is MIT-licensed.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
/**
|
|
8
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
/** A container holding a script line. */
|
|
14
|
-
class ScriptLine {
|
|
15
|
-
constructor(lineNumber, content, highlight = false) {
|
|
16
|
-
this.lineNumber = lineNumber;
|
|
17
|
-
this.content = content;
|
|
18
|
-
this.highlight = highlight;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.ScriptLine = ScriptLine;
|
|
6
|
+
exports.makeStackFrame = void 0;
|
|
22
7
|
/**
|
|
23
8
|
* A representation of a stack frame.
|
|
24
9
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (functionName && functionName.indexOf('Object.') === 0) {
|
|
29
|
-
functionName = functionName.slice('Object.'.length);
|
|
30
|
-
}
|
|
31
|
-
if (
|
|
32
|
-
// Chrome has a bug with inferring function.name:
|
|
33
|
-
// https://github.com/facebook/create-react-app/issues/2097
|
|
34
|
-
// Let's ignore a meaningless name we get for top-level modules.
|
|
35
|
-
functionName === 'friendlySyntaxErrorLabel' ||
|
|
36
|
-
functionName === 'exports.__esModule' ||
|
|
37
|
-
functionName === '<anonymous>' ||
|
|
38
|
-
!functionName) {
|
|
39
|
-
functionName = null;
|
|
40
|
-
}
|
|
41
|
-
this.functionName = functionName;
|
|
42
|
-
this.fileName = fileName;
|
|
43
|
-
this.lineNumber = lineNumber;
|
|
44
|
-
this.columnNumber = columnNumber;
|
|
45
|
-
this._originalFunctionName = sourceFunctionName;
|
|
46
|
-
this._originalFileName = sourceFileName;
|
|
47
|
-
this._originalLineNumber = sourceLineNumber;
|
|
48
|
-
this._originalColumnNumber = sourceColumnNumber;
|
|
49
|
-
this._scriptCode = scriptCode;
|
|
50
|
-
this._originalScriptCode = sourceScriptCode;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Returns the name of this function.
|
|
54
|
-
*/
|
|
55
|
-
getFunctionName() {
|
|
56
|
-
return this.functionName || '(anonymous function)';
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Returns the source of the frame.
|
|
60
|
-
* This contains the file name, line number, and column number when available.
|
|
61
|
-
*/
|
|
62
|
-
getSource() {
|
|
63
|
-
let str = '';
|
|
64
|
-
if (this.fileName !== null) {
|
|
65
|
-
str += this.fileName + ':';
|
|
66
|
-
}
|
|
67
|
-
if (this.lineNumber !== null) {
|
|
68
|
-
str += this.lineNumber + ':';
|
|
69
|
-
}
|
|
70
|
-
if (this.columnNumber !== null) {
|
|
71
|
-
str += this.columnNumber + ':';
|
|
72
|
-
}
|
|
73
|
-
return str.slice(0, -1);
|
|
10
|
+
const makeStackFrame = ({ functionName, fileName, lineNumber, columnNumber, }) => {
|
|
11
|
+
if (functionName && functionName.indexOf('Object.') === 0) {
|
|
12
|
+
functionName = functionName.slice('Object.'.length);
|
|
74
13
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
14
|
+
if (
|
|
15
|
+
// Chrome has a bug with inferring function.name:
|
|
16
|
+
// https://github.com/facebook/create-react-app/issues/2097
|
|
17
|
+
// Let's ignore a meaningless name we get for top-level modules.
|
|
18
|
+
functionName === 'friendlySyntaxErrorLabel' ||
|
|
19
|
+
functionName === 'exports.__esModule' ||
|
|
20
|
+
functionName === '<anonymous>' ||
|
|
21
|
+
!functionName) {
|
|
22
|
+
functionName = null;
|
|
82
23
|
}
|
|
83
|
-
|
|
84
|
-
|
|
24
|
+
return {
|
|
25
|
+
columnNumber,
|
|
26
|
+
fileName,
|
|
27
|
+
functionName,
|
|
28
|
+
lineNumber,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
exports.makeStackFrame = makeStackFrame;
|
|
85
32
|
//# sourceMappingURL=stack-frame.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-frame.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/stack-frame.ts"],"names":[],"mappings":";AAAA;;EAEE;;;
|
|
1
|
+
{"version":3,"file":"stack-frame.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/stack-frame.ts"],"names":[],"mappings":";AAAA;;EAEE;;;AAwCF;;GAEG;AAEI,MAAM,cAAc,GAAG,CAAC,EAC9B,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,YAAY,GAMZ,EAAc,EAAE;IAChB,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QAC1D,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;KACpD;IAED;IACC,iDAAiD;IACjD,2DAA2D;IAC3D,gEAAgE;IAChE,YAAY,KAAK,0BAA0B;QAC3C,YAAY,KAAK,oBAAoB;QACrC,YAAY,KAAK,aAAa;QAC9B,CAAC,YAAY,EACZ;QACD,YAAY,GAAG,IAAI,CAAC;KACpB;IAED,OAAO;QACN,YAAY;QACZ,QAAQ;QACR,YAAY;QACZ,UAAU;KACV,CAAC;AACH,CAAC,CAAC;AAjCW,QAAA,cAAc,kBAiCzB"}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
* Turns a set of mapped <code>StackFrame</code>s back into their generated code position and enhances them with code.
|
|
4
|
-
* @param {string} fileUri The URI of the <code>bundle.js</code> file.
|
|
5
|
-
* @param {StackFrame[]} frames A set of <code>StackFrame</code>s which are already mapped and missing their generated positions.
|
|
6
|
-
* @param {number} [fileContents=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.
|
|
7
|
-
*/
|
|
8
|
-
declare function unmap(_fileUri: string | {
|
|
9
|
-
uri: string;
|
|
10
|
-
contents: string;
|
|
11
|
-
}, frames: StackFrame[], contextLines?: number): Promise<StackFrame[]>;
|
|
12
|
-
export { unmap };
|
|
13
|
-
export default unmap;
|
|
1
|
+
import { SomeStackFrame, SymbolicatedStackFrame } from './stack-frame';
|
|
2
|
+
export declare const unmap: (frames: SomeStackFrame[], contextLines: number) => Promise<SymbolicatedStackFrame[]>;
|
|
14
3
|
//# sourceMappingURL=unmapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unmapper.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/unmapper.ts"],"names":[],"mappings":"AAgBA,OAAO,
|
|
1
|
+
{"version":3,"file":"unmapper.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/unmapper.ts"],"names":[],"mappings":"AAgBA,OAAO,EACN,cAAc,EAEd,sBAAsB,EACtB,MAAM,eAAe,CAAC;AASvB,eAAO,MAAM,KAAK,WACT,cAAc,EAAE,gBACV,MAAM,KAClB,QAAQ,sBAAsB,EAAE,CA2ClC,CAAC"}
|
|
@@ -12,83 +12,48 @@ exports.unmap = void 0;
|
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
14
|
*/
|
|
15
|
+
const remotion_1 = require("remotion");
|
|
15
16
|
const get_lines_around_1 = require("./get-lines-around");
|
|
16
17
|
const get_source_map_1 = require("./get-source-map");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* @param {number} [fileContents=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.
|
|
37
|
-
*/
|
|
38
|
-
async function unmap(_fileUri, frames, contextLines = 3) {
|
|
39
|
-
let fileContents = typeof _fileUri === 'object' ? _fileUri.contents : null;
|
|
40
|
-
const fileUri = typeof _fileUri === 'object' ? _fileUri.uri : _fileUri;
|
|
41
|
-
if (fileContents == null) {
|
|
42
|
-
fileContents = await fetch(fileUri).then((res) => res.text());
|
|
18
|
+
const getFileContents = async (fileName) => {
|
|
19
|
+
const res = await fetch(fileName);
|
|
20
|
+
const fileContents = await res.text();
|
|
21
|
+
return fileContents;
|
|
22
|
+
};
|
|
23
|
+
const unmap = async (frames, contextLines) => {
|
|
24
|
+
const transpiled = frames
|
|
25
|
+
.filter((s) => s.type === 'transpiled')
|
|
26
|
+
.map((s) => s.frame);
|
|
27
|
+
const uniqueFileNames = [
|
|
28
|
+
...new Set(transpiled.map((f) => f.fileName).filter(remotion_1.Internals.truthy)),
|
|
29
|
+
];
|
|
30
|
+
const maps = await Promise.all(uniqueFileNames.map(async (fileName) => {
|
|
31
|
+
const fileContents = await getFileContents(fileName);
|
|
32
|
+
return (0, get_source_map_1.getSourceMap)(fileName, fileContents);
|
|
33
|
+
}));
|
|
34
|
+
const mapValues = {};
|
|
35
|
+
for (let i = 0; i < uniqueFileNames.length; i++) {
|
|
36
|
+
mapValues[uniqueFileNames[i]] = maps[i];
|
|
43
37
|
}
|
|
44
|
-
const map = await (0, get_source_map_1.getSourceMap)(fileUri, fileContents);
|
|
45
38
|
return frames.map((frame) => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return frame;
|
|
49
|
-
}
|
|
50
|
-
let { fileName } = frame;
|
|
51
|
-
if (fileName) {
|
|
52
|
-
// The web version of this module only provides POSIX support, so Windows
|
|
53
|
-
// paths like C:\foo\\baz\..\\bar\ cannot be normalized.
|
|
54
|
-
// A simple solution to this is to replace all `\` with `/`, then
|
|
55
|
-
// normalize afterwards.
|
|
56
|
-
fileName = (0, path_1.pathNormalize)(fileName.replace(/[\\]+/g, '/'));
|
|
57
|
-
}
|
|
58
|
-
if (fileName == null) {
|
|
59
|
-
return frame;
|
|
60
|
-
}
|
|
61
|
-
const fN = fileName;
|
|
62
|
-
const source = map
|
|
63
|
-
.getSources()
|
|
64
|
-
// Prepare path for normalization; see comment above for reasoning.
|
|
65
|
-
.map((s) => s.replace(/[\\]+/g, '/'))
|
|
66
|
-
.filter((p) => {
|
|
67
|
-
p = (0, path_1.pathNormalize)(p);
|
|
68
|
-
const i = p.lastIndexOf(fN);
|
|
69
|
-
return i !== -1 && i === p.length - fN.length;
|
|
70
|
-
})
|
|
71
|
-
.map((p) => ({
|
|
72
|
-
token: p,
|
|
73
|
-
seps: count('/', (0, path_1.pathNormalize)(p)),
|
|
74
|
-
penalties: count('node_modules', p) + count('~', p),
|
|
75
|
-
}))
|
|
76
|
-
.sort((a, b) => {
|
|
77
|
-
const s = Math.sign(a.seps - b.seps);
|
|
78
|
-
if (s !== 0) {
|
|
79
|
-
return s;
|
|
80
|
-
}
|
|
81
|
-
return Math.sign(a.penalties - b.penalties);
|
|
82
|
-
});
|
|
83
|
-
if (source.length < 1 || lineNumber == null) {
|
|
84
|
-
return new stack_frame_1.StackFrame(null, null, null, null, null, functionName, fN, lineNumber, columnNumber, null);
|
|
39
|
+
if (frame.type === 'symbolicated') {
|
|
40
|
+
return frame.frame;
|
|
85
41
|
}
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
|
|
42
|
+
const map = mapValues[frame.frame.fileName];
|
|
43
|
+
const pos = map.getOriginalPosition(frame.frame.lineNumber, frame.frame.columnNumber);
|
|
44
|
+
const { functionName } = frame.frame;
|
|
45
|
+
const hasSource = map.getSource(pos.source);
|
|
46
|
+
const scriptCode = hasSource
|
|
47
|
+
? (0, get_lines_around_1.getLinesAround)(pos.line, contextLines, hasSource.split('\n'))
|
|
48
|
+
: null;
|
|
49
|
+
return {
|
|
50
|
+
originalColumnNumber: pos.column,
|
|
51
|
+
originalFileName: pos.source,
|
|
52
|
+
originalFunctionName: functionName,
|
|
53
|
+
originalLineNumber: pos.line,
|
|
54
|
+
originalScriptCode: scriptCode,
|
|
55
|
+
};
|
|
90
56
|
});
|
|
91
|
-
}
|
|
57
|
+
};
|
|
92
58
|
exports.unmap = unmap;
|
|
93
|
-
exports.default = unmap;
|
|
94
59
|
//# sourceMappingURL=unmapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unmapper.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/unmapper.ts"],"names":[],"mappings":";AAAA;;EAEE;;;AAEF,2BAA2B;AAC3B,+BAA+B;AAC/B;;;;;GAKG;AAEH,yDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"unmapper.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/unmapper.ts"],"names":[],"mappings":";AAAA;;EAEE;;;AAEF,2BAA2B;AAC3B,+BAA+B;AAC/B;;;;;GAKG;AAEH,uCAAmC;AACnC,yDAAkD;AAClD,qDAAyD;AAOzD,MAAM,eAAe,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE;IAClD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,QAAkB,CAAC,CAAC;IAC5C,MAAM,YAAY,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAEtC,OAAO,YAAY,CAAC;AACrB,CAAC,CAAC;AAEK,MAAM,KAAK,GAAG,KAAK,EACzB,MAAwB,EACxB,YAAoB,EACgB,EAAE;IACtC,MAAM,UAAU,GAAG,MAAM;SACvB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC;SACtC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,C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G,SAAS;YAC3B,CAAC,CAAC,IAAA,iCAAc,EAAC,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/D,CAAC,CAAC,IAAI,CAAC;QAER,OAAO;YACN,oBAAoB,EAAE,GAAG,CAAC,MAAM;YAChC,gBAAgB,EAAE,GAAG,CAAC,MAAM;YAC5B,oBAAoB,EAAE,YAAY;YAClC,kBAAkB,EAAE,GAAG,CAAC,IAAI;YAC5B,kBAAkB,EAAE,UAAU;SAC9B,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AA9CW,QAAA,KAAK,SA8ChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/ErrorDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/ErrorDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgB,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,2CAA2C,CAAC;AAmBtE,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IACnC,OAAO,EAAE,WAAW,CAAC;CACrB,CAwDA,CAAC"}
|
|
@@ -2,34 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ErrorDisplay = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
5
6
|
const AskOnDiscord_1 = require("./AskOnDiscord");
|
|
6
7
|
const OpenInEditor_1 = require("./OpenInEditor");
|
|
7
8
|
const SearchGitHubIssues_1 = require("./SearchGitHubIssues");
|
|
8
9
|
const StackFrame_1 = require("./StackFrame");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
width: '100%',
|
|
12
|
-
maxWidth: 1000,
|
|
13
|
-
paddingLeft: 14,
|
|
14
|
-
paddingRight: 14,
|
|
15
|
-
marginLeft: 'auto',
|
|
16
|
-
marginRight: 'auto',
|
|
17
|
-
fontFamily: 'SF Pro Text, sans-serif',
|
|
18
|
-
paddingTop: '5vh',
|
|
19
|
-
};
|
|
20
|
-
const title = {
|
|
21
|
-
marginBottom: 8,
|
|
22
|
-
display: 'flex',
|
|
23
|
-
flexDirection: 'row',
|
|
24
|
-
justifyContent: 'center',
|
|
25
|
-
};
|
|
26
|
-
const errName = {
|
|
27
|
-
fontSize: '0.8em',
|
|
28
|
-
background: 'linear-gradient(90deg,#4290f5,#42e9f5)',
|
|
29
|
-
WebkitBackgroundClip: 'text',
|
|
30
|
-
WebkitTextFillColor: 'transparent',
|
|
31
|
-
display: 'inline-block',
|
|
32
|
-
};
|
|
10
|
+
const map_error_to_react_stack_1 = require("../react-overlay/effects/map-error-to-react-stack");
|
|
11
|
+
const ErrorTitle_1 = require("./ErrorTitle");
|
|
33
12
|
const stack = {
|
|
34
13
|
marginTop: 17,
|
|
35
14
|
overflowX: 'scroll',
|
|
@@ -39,24 +18,29 @@ const spacer = {
|
|
|
39
18
|
width: 5,
|
|
40
19
|
display: 'inline-block',
|
|
41
20
|
};
|
|
42
|
-
const left = {
|
|
43
|
-
flex: 1,
|
|
44
|
-
paddingRight: 14,
|
|
45
|
-
lineHeight: 1.5,
|
|
46
|
-
fontSize: '1.5em',
|
|
47
|
-
fontWeight: 'bold',
|
|
48
|
-
};
|
|
49
21
|
const ErrorDisplay = ({ display }) => {
|
|
50
22
|
const highestLineNumber = Math.max(...display.stackFrames
|
|
51
|
-
.map((s) => s.
|
|
23
|
+
.map((s) => s.originalScriptCode)
|
|
52
24
|
.flat(1)
|
|
53
25
|
.map((s) => { var _a; return (_a = s === null || s === void 0 ? void 0 : s.lineNumber) !== null && _a !== void 0 ? _a : 0; }));
|
|
26
|
+
const message = (0, react_1.useMemo)(() => {
|
|
27
|
+
// Format compilation errors
|
|
28
|
+
const location = (0, map_error_to_react_stack_1.getLocationFromBuildError)(display.error);
|
|
29
|
+
if (!location) {
|
|
30
|
+
return display.error.message;
|
|
31
|
+
}
|
|
32
|
+
return location.message
|
|
33
|
+
.replace(/\\n/g, '\n')
|
|
34
|
+
.replace(/\\t/g, ' ')
|
|
35
|
+
.replace(/^error:/, '')
|
|
36
|
+
.trim();
|
|
37
|
+
}, [display.error]);
|
|
54
38
|
const lineNumberWidth = String(highestLineNumber).length;
|
|
55
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: display.error.name, message: message }, void 0), display.stackFrames.length > 0 && window.remotion_editorName ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OpenInEditor_1.OpenInEditor, { stack: display.stackFrames[0] }, void 0), (0, jsx_runtime_1.jsx)("div", { style: spacer }, void 0)] }, void 0)) : null, (0, jsx_runtime_1.jsx)(SearchGitHubIssues_1.SearchGithubIssues, { message: display.error.message }, void 0), (0, jsx_runtime_1.jsx)("div", { style: spacer }, void 0), (0, jsx_runtime_1.jsx)(AskOnDiscord_1.AskOnDiscord, {}, void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: stack }, { children: display.stackFrames.map((s, i) => {
|
|
56
40
|
return ((0, jsx_runtime_1.jsx)(StackFrame_1.StackElement
|
|
57
41
|
// eslint-disable-next-line react/no-array-index-key
|
|
58
|
-
, { isFirst: i === 0, s: s, lineNumberWidth: lineNumberWidth }, i));
|
|
59
|
-
}) }), void 0)] }
|
|
42
|
+
, { isFirst: i === 0, s: s, lineNumberWidth: lineNumberWidth, defaultFunctionName: '(anonymous function)' }, i));
|
|
43
|
+
}) }), void 0)] }, void 0));
|
|
60
44
|
};
|
|
61
45
|
exports.ErrorDisplay = ErrorDisplay;
|
|
62
46
|
//# sourceMappingURL=ErrorDisplay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/ErrorDisplay.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/ErrorDisplay.tsx"],"names":[],"mappings":";;;;AAAA,iCAAqC;AAErC,iDAA4C;AAC5C,iDAA4C;AAC5C,6DAAwD;AACxD,6CAA0C;AAC1C,gGAA4F;AAC5F,6CAAwC;AAExC,MAAM,KAAK,GAAwB;IAClC,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,QAAQ;IACnB,YAAY,EAAE,MAAM;CACpB,CAAC;AAEF,MAAM,MAAM,GAAwB;IACnC,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,cAAc;CACvB,CAAC;AAEK,MAAM,YAAY,GAEpB,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;IAClB,MAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CACjC,GAAG,OAAO,CAAC,WAAW;SACpB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC;SAChC,IAAI,CAAC,CAAC,CAAC;SACP,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,UAAU,mCAAI,CAAC,CAAA,EAAA,CAAC,CAChC,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC5B,4BAA4B;QAC5B,MAAM,QAAQ,GAAG,IAAA,oDAAyB,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,EAAE;YACd,OAAO,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;SAC7B;QAED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 -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorLoader.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/ErrorLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAyCjD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC,KAAK,EAAE,KAAK,CAAC;CACb,CAsEA,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorLoader = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const listen_to_runtime_errors_1 = require("../react-overlay/listen-to-runtime-errors");
|
|
7
|
+
const ErrorDisplay_1 = require("./ErrorDisplay");
|
|
8
|
+
const ErrorTitle_1 = require("./ErrorTitle");
|
|
9
|
+
const container = {
|
|
10
|
+
width: '100%',
|
|
11
|
+
maxWidth: 1000,
|
|
12
|
+
paddingLeft: 14,
|
|
13
|
+
paddingRight: 14,
|
|
14
|
+
marginLeft: 'auto',
|
|
15
|
+
marginRight: 'auto',
|
|
16
|
+
fontFamily: 'SF Pro Text, sans-serif',
|
|
17
|
+
paddingTop: '5vh',
|
|
18
|
+
};
|
|
19
|
+
const errorWhileErrorStyle = {
|
|
20
|
+
color: 'white',
|
|
21
|
+
lineHeight: 1.5,
|
|
22
|
+
whiteSpace: 'pre',
|
|
23
|
+
};
|
|
24
|
+
const ErrorLoader = ({ error }) => {
|
|
25
|
+
const [state, setState] = (0, react_1.useState)({
|
|
26
|
+
type: 'loading',
|
|
27
|
+
});
|
|
28
|
+
(0, react_1.useEffect)(() => {
|
|
29
|
+
(0, listen_to_runtime_errors_1.getErrorRecord)(error)
|
|
30
|
+
.then((record) => {
|
|
31
|
+
if (record) {
|
|
32
|
+
setState({
|
|
33
|
+
type: 'symbolicated',
|
|
34
|
+
record,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
setState({
|
|
39
|
+
type: 'no-record',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
.catch((err) => {
|
|
44
|
+
setState({
|
|
45
|
+
err,
|
|
46
|
+
type: 'error',
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}, [error]);
|
|
50
|
+
if (state.type === 'loading') {
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ style: container }, { children: (0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: true, name: error.name, message: error.message }, void 0) }), void 0));
|
|
52
|
+
}
|
|
53
|
+
if (state.type === 'error') {
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: container }, { children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: error.name, message: error.message }, void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: errorWhileErrorStyle }, { children: "Error while getting stack trace:" }), void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: errorWhileErrorStyle }, { children: state.err.stack }), void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: errorWhileErrorStyle }, { children: "Report this in the Remotion repo." }), void 0)] }), void 0));
|
|
55
|
+
}
|
|
56
|
+
if (state.type === 'no-record') {
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: container }, { children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: error.name, message: error.message }, void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ style: errorWhileErrorStyle }, { children: "Could not get a stack trace." }), void 0)] }), void 0));
|
|
58
|
+
}
|
|
59
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ style: container }, { children: (0, jsx_runtime_1.jsx)(ErrorDisplay_1.ErrorDisplay, { display: state.record }, void 0) }), void 0));
|
|
60
|
+
};
|
|
61
|
+
exports.ErrorLoader = ErrorLoader;
|
|
62
|
+
//# sourceMappingURL=ErrorLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorLoader.js","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/ErrorLoader.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,wFAGmD;AACnD,iDAA4C;AAC5C,6CAAwC;AAExC,MAAM,SAAS,GAAwB;IACtC,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,EAAE;IACf,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,yBAAyB;IACrC,UAAU,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,oBAAoB,GAAwB;IACjD,KAAK,EAAE,OAAO;IACd,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,KAAK;CACjB,CAAC;AAkBK,MAAM,WAAW,GAEnB,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE;IAChB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAQ;QACzC,IAAI,EAAE,SAAS;KACf,CAAC,CAAC;IAEH,IAAA,iBAAS,EAAC,GAAG,EAAE;QACd,IAAA,yCAAc,EAAC,KAAK,CAAC;aACnB,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YAChB,IAAI,MAAM,EAAE;gBACX,QAAQ,CAAC;oBACR,IAAI,EAAE,cAAc;oBACpB,MAAM;iBACN,CAAC,CAAC;aACH;iBAAM;gBACN,QAAQ,CAAC;oBACR,IAAI,EAAE,WAAW;iBACjB,CAAC,CAAC;aACH;QACF,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACd,QAAQ,CAAC;gBACR,GAAG;gBACH,IAAI,EAAE,OAAO;aACb,CAAC,CAAC;QACJ,CAA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orTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAwC1B,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CACvB,CAmBA,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorTitle = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_overlay_1 = require("../react-overlay");
|
|
6
|
+
const DismissButton_1 = require("./DismissButton");
|
|
7
|
+
const Symbolicating_1 = require("./Symbolicating");
|
|
8
|
+
const title = {
|
|
9
|
+
marginBottom: 8,
|
|
10
|
+
display: 'flex',
|
|
11
|
+
flexDirection: 'row',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
};
|
|
14
|
+
const left = {
|
|
15
|
+
flex: 1,
|
|
16
|
+
paddingRight: 14,
|
|
17
|
+
lineHeight: 1.5,
|
|
18
|
+
whiteSpace: 'pre',
|
|
19
|
+
fontSize: '1.5em',
|
|
20
|
+
fontWeight: 'bold',
|
|
21
|
+
overflowX: 'auto',
|
|
22
|
+
};
|
|
23
|
+
const errName = {
|
|
24
|
+
fontSize: '0.8em',
|
|
25
|
+
background: 'linear-gradient(90deg,#4290f5,#42e9f5)',
|
|
26
|
+
WebkitBackgroundClip: 'text',
|
|
27
|
+
WebkitTextFillColor: 'transparent',
|
|
28
|
+
display: 'inline-block',
|
|
29
|
+
};
|
|
30
|
+
const row = {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
flexDirection: 'row',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
};
|
|
35
|
+
const spacer = {
|
|
36
|
+
width: 5,
|
|
37
|
+
};
|
|
38
|
+
const ErrorTitle = ({ name, message, symbolicating }) => {
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: title }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ style: left }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ style: errName }, { children: name }), void 0), (0, jsx_runtime_1.jsx)("br", {}, void 0), (0, jsx_runtime_1.jsxs)("div", Object.assign({ style: row }, { children: [symbolicating ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Symbolicating_1.Symbolicating, {}, void 0), (0, jsx_runtime_1.jsx)("div", { style: spacer }, void 0)] }, void 0)) : null, (0, jsx_runtime_1.jsx)("div", { children: message }, void 0)] }), void 0)] }), void 0), (0, react_overlay_1.shouldReload)() ? null : (0, jsx_runtime_1.jsx)(DismissButton_1.DismissButton, {}, void 0)] }), void 0));
|
|
40
|
+
};
|
|
41
|
+
exports.ErrorTitle = ErrorTitle;
|
|
42
|
+
//# sourceMappingURL=ErrorTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorTitle.js","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/ErrorTitle.tsx"],"names":[],"mappings":";;;;AACA,oDAA8C;AAC9C,mDAA8C;AAC9C,mDAA8C;AAE9C,MAAM,KAAK,GAAwB;IAClC,YAAY,EAAE,CAAC;IACf,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,KAAK;IACpB,cAAc,EAAE,QAAQ;CACxB,CAAC;AAEF,MAAM,IAAI,GAAwB;IACjC,IAAI,EAAE,CAAC;IACP,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE,MAAM;CACjB,CAAC;AAEF,MAAM,OAAO,GAAwB;IACpC,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE,wCAAwC;IACpD,oBAAoB,EAAE,MAAM;IAC5B,mBAAmB,EAAE,aAAa;IAClC,OAAO,EAAE,cAAc;CACvB,CAAC;AAEF,MAAM,GAAG,GAAwB;IAChC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,KAAK;IACpB,UAAU,EAAE,QAAQ;CACpB,CAAC;AAEF,MAAM,MAAM,GAAwB;IACnC,KAAK,EAAE,CAAC;CACR,CAAC;AAEK,MAAM,UAAU,GAIlB,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,aAAa,EAAC,EAAE,EAAE;IACvC,OAAO,CACN,+CAAK,KAAK,EAAE,KAAK,iBAChB,+CAAK,KAAK,EAAE,IAAI,iBACf,+CAAM,KAAK,EAAE,OAAO,gBAAG,IAAI,YAAQ,EACnC,wCAAM,EACN,+CAAK,KAAK,EAAE,GAAG,iBACb,aAAa,CAAC,CAAC,CAAC,CAChB,6DACC,uBAAC,6BAAa,aAAG,EACjB,gCAAK,KAAK,EAAE,MAAM,WAAI,YACpB,CACH,CAAC,CAAC,CAAC,IAAI,EACR,0CAAM,OAAO,WAAO,aACf,aACD,EACL,IAAA,4BAAY,GAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,uBAAC,6BAAa,aAAG,aACrC,CACN,CAAC;AACH,CAAC,CAAC;AAvBW,QAAA,UAAU,cAuBrB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SymbolicatedStackFrame } from '../react-overlay/utils/stack-frame';
|
|
3
3
|
export declare const OpenInEditor: React.FC<{
|
|
4
|
-
stack:
|
|
4
|
+
stack: SymbolicatedStackFrame;
|
|
5
5
|
}>;
|
|
6
6
|
//# sourceMappingURL=OpenInEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenInEditor.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/OpenInEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"OpenInEditor.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/OpenInEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,sBAAsB,EAAC,MAAM,oCAAoC,CAAC;AA6D1E,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IACnC,KAAK,EAAE,sBAAsB,CAAC;CAC9B,CAkEA,CAAC"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ErrorRecord } from '../react-overlay/listen-to-runtime-errors';
|
|
3
2
|
declare type SetErrors = {
|
|
4
3
|
setErrors: (errs: State) => void;
|
|
4
|
+
addError: (err: Error) => void;
|
|
5
5
|
};
|
|
6
6
|
export declare const setErrorsRef: React.RefObject<SetErrors>;
|
|
7
7
|
declare type State = {
|
|
8
8
|
type: 'clear';
|
|
9
|
-
} | {
|
|
10
|
-
type: 'symbolicating';
|
|
11
9
|
} | {
|
|
12
10
|
type: 'errors';
|
|
13
|
-
errors:
|
|
11
|
+
errors: Error[];
|
|
14
12
|
};
|
|
15
13
|
export declare const Overlay: React.FC;
|
|
16
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/remotion-overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAIf,aAAK,SAAS,GAAG;IAChB,SAAS,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,YAAY,4BAAyB,CAAC;AAEnD,aAAK,KAAK,GACP;IACA,IAAI,EAAE,OAAO,CAAC;CACb,GACD;IACA,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,KAAK,EAAE,CAAC;CACf,CAAC;AAOL,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAoD3B,CAAC"}
|