@remotion/bundler 3.0.0-lambda.236 → 3.0.0-lambda.237
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/bundler.d.ts.map +1 -1
- package/dist/bundler.js +18 -9
- package/dist/bundler.js.map +1 -1
- package/dist/copy-dir.d.ts +2 -0
- package/dist/copy-dir.d.ts.map +1 -0
- package/dist/copy-dir.js +24 -0
- package/dist/copy-dir.js.map +1 -0
- package/dist/dev-middleware/compatible-api.d.ts +10 -0
- package/dist/dev-middleware/compatible-api.d.ts.map +1 -0
- package/dist/dev-middleware/compatible-api.js +45 -0
- package/dist/dev-middleware/compatible-api.js.map +1 -0
- package/dist/dev-middleware/get-filename-from-url.d.ts +3 -0
- package/dist/dev-middleware/get-filename-from-url.d.ts.map +1 -0
- package/dist/dev-middleware/get-filename-from-url.js +93 -0
- package/dist/dev-middleware/get-filename-from-url.js.map +1 -0
- package/dist/dev-middleware/get-paths.d.ts +8 -0
- package/dist/dev-middleware/get-paths.d.ts.map +1 -0
- package/dist/dev-middleware/get-paths.js +20 -0
- package/dist/dev-middleware/get-paths.js.map +1 -0
- package/dist/dev-middleware/index.d.ts +5 -0
- package/dist/dev-middleware/index.d.ts.map +1 -0
- package/dist/dev-middleware/index.js +58 -0
- package/dist/dev-middleware/index.js.map +1 -0
- package/dist/dev-middleware/is-color-supported.d.ts +2 -0
- package/dist/dev-middleware/is-color-supported.d.ts.map +1 -0
- package/dist/dev-middleware/is-color-supported.js +34 -0
- package/dist/dev-middleware/is-color-supported.js.map +1 -0
- package/dist/dev-middleware/middleware.d.ts +4 -0
- package/dist/dev-middleware/middleware.d.ts.map +1 -0
- package/dist/dev-middleware/middleware.js +142 -0
- package/dist/dev-middleware/middleware.js.map +1 -0
- package/dist/dev-middleware/range-parser.d.ts +16 -0
- package/dist/dev-middleware/range-parser.d.ts.map +1 -0
- package/dist/dev-middleware/range-parser.js +97 -0
- package/dist/dev-middleware/range-parser.js.map +1 -0
- package/dist/dev-middleware/ready.d.ts +6 -0
- package/dist/dev-middleware/ready.d.ts.map +1 -0
- package/dist/dev-middleware/ready.js +14 -0
- package/dist/dev-middleware/ready.js.map +1 -0
- package/dist/dev-middleware/setup-hooks.d.ts +3 -0
- package/dist/dev-middleware/setup-hooks.d.ts.map +1 -0
- package/dist/dev-middleware/setup-hooks.js +45 -0
- package/dist/dev-middleware/setup-hooks.js.map +1 -0
- package/dist/dev-middleware/setup-output-filesystem.d.ts +3 -0
- package/dist/dev-middleware/setup-output-filesystem.d.ts.map +1 -0
- package/dist/dev-middleware/setup-output-filesystem.js +14 -0
- package/dist/dev-middleware/setup-output-filesystem.js.map +1 -0
- package/dist/dev-middleware/types.d.ts +12 -0
- package/dist/dev-middleware/types.d.ts.map +1 -0
- package/dist/dev-middleware/types.js +3 -0
- package/dist/dev-middleware/types.js.map +1 -0
- package/dist/error-overlay/entry-basic.d.ts +2 -0
- package/dist/error-overlay/entry-basic.d.ts.map +1 -0
- package/dist/error-overlay/entry-basic.js +22 -0
- package/dist/error-overlay/entry-basic.js.map +1 -0
- package/dist/error-overlay/react-overlay/effects/format-warning.d.ts +13 -0
- package/dist/error-overlay/react-overlay/effects/format-warning.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/effects/format-warning.js +42 -0
- package/dist/error-overlay/react-overlay/effects/format-warning.js.map +1 -0
- package/dist/error-overlay/react-overlay/effects/proxy-console.d.ts +18 -0
- package/dist/error-overlay/react-overlay/effects/proxy-console.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/effects/proxy-console.js +55 -0
- package/dist/error-overlay/react-overlay/effects/proxy-console.js.map +1 -0
- package/dist/error-overlay/react-overlay/effects/stack-trace-limit.d.ts +4 -0
- package/dist/error-overlay/react-overlay/effects/stack-trace-limit.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/effects/stack-trace-limit.js +44 -0
- package/dist/error-overlay/react-overlay/effects/stack-trace-limit.js.map +1 -0
- package/dist/error-overlay/react-overlay/effects/unhandled-error.d.ts +5 -0
- package/dist/error-overlay/react-overlay/effects/unhandled-error.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/effects/unhandled-error.js +46 -0
- package/dist/error-overlay/react-overlay/effects/unhandled-error.js.map +1 -0
- package/dist/error-overlay/react-overlay/effects/unhandled-rejection.d.ts +5 -0
- package/dist/error-overlay/react-overlay/effects/unhandled-rejection.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/effects/unhandled-rejection.js +42 -0
- package/dist/error-overlay/react-overlay/effects/unhandled-rejection.js.map +1 -0
- package/dist/error-overlay/react-overlay/index.d.ts +8 -0
- package/dist/error-overlay/react-overlay/index.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/index.js +45 -0
- package/dist/error-overlay/react-overlay/index.js.map +1 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +12 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js +63 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/get-lines-around.d.ts +15 -0
- package/dist/error-overlay/react-overlay/utils/get-lines-around.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/get-lines-around.js +31 -0
- package/dist/error-overlay/react-overlay/utils/get-lines-around.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/get-source-map.d.ts +52 -0
- package/dist/error-overlay/react-overlay/utils/get-source-map.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/get-source-map.js +108 -0
- package/dist/error-overlay/react-overlay/utils/get-source-map.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/get-stack-frames.d.ts +13 -0
- package/dist/error-overlay/react-overlay/utils/get-stack-frames.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/get-stack-frames.js +32 -0
- package/dist/error-overlay/react-overlay/utils/get-stack-frames.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/mapper.d.ts +16 -0
- package/dist/error-overlay/react-overlay/utils/mapper.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/mapper.js +61 -0
- package/dist/error-overlay/react-overlay/utils/mapper.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/open-in-editor.d.ts +7 -0
- package/dist/error-overlay/react-overlay/utils/open-in-editor.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/open-in-editor.js +436 -0
- package/dist/error-overlay/react-overlay/utils/open-in-editor.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/parser.d.ts +15 -0
- package/dist/error-overlay/react-overlay/utils/parser.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/parser.js +85 -0
- package/dist/error-overlay/react-overlay/utils/parser.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/path.d.ts +2 -0
- package/dist/error-overlay/react-overlay/utils/path.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/path.js +98 -0
- package/dist/error-overlay/react-overlay/utils/path.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/settle-promise.d.ts +3 -0
- package/dist/error-overlay/react-overlay/utils/settle-promise.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/settle-promise.js +20 -0
- package/dist/error-overlay/react-overlay/utils/settle-promise.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/stack-frame.d.ts +46 -0
- package/dist/error-overlay/react-overlay/utils/stack-frame.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/stack-frame.js +85 -0
- package/dist/error-overlay/react-overlay/utils/stack-frame.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/unmapper.d.ts +14 -0
- package/dist/error-overlay/react-overlay/utils/unmapper.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/unmapper.js +94 -0
- package/dist/error-overlay/react-overlay/utils/unmapper.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/AskOnDiscord.d.ts +3 -0
- package/dist/error-overlay/remotion-overlay/AskOnDiscord.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/AskOnDiscord.js +15 -0
- package/dist/error-overlay/remotion-overlay/AskOnDiscord.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/Button.d.ts +6 -0
- package/dist/error-overlay/remotion-overlay/Button.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/Button.js +25 -0
- package/dist/error-overlay/remotion-overlay/Button.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.d.ts +7 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/DismissButton.d.ts +3 -0
- package/dist/error-overlay/remotion-overlay/DismissButton.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/DismissButton.js +24 -0
- package/dist/error-overlay/remotion-overlay/DismissButton.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.d.ts +6 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +62 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +6 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +92 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/Overlay.d.ts +17 -0
- package/dist/error-overlay/remotion-overlay/Overlay.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/Overlay.js +35 -0
- package/dist/error-overlay/remotion-overlay/Overlay.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts +5 -0
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +14 -0
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +8 -0
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/StackFrame.js +42 -0
- package/dist/error-overlay/remotion-overlay/StackFrame.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/carets.d.ts +3 -0
- package/dist/error-overlay/remotion-overlay/carets.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/carets.js +13 -0
- package/dist/error-overlay/remotion-overlay/carets.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/format-location.d.ts +2 -0
- package/dist/error-overlay/remotion-overlay/format-location.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/format-location.js +11 -0
- package/dist/error-overlay/remotion-overlay/format-location.js.map +1 -0
- package/dist/error-overlay/remotion-overlay/index.d.ts +2 -0
- package/dist/error-overlay/remotion-overlay/index.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/index.js +14 -0
- package/dist/error-overlay/remotion-overlay/index.js.map +1 -0
- package/dist/fast-refresh/helpers.d.ts +15 -7
- package/dist/fast-refresh/helpers.d.ts.map +1 -1
- package/dist/fast-refresh/helpers.js +33 -25
- package/dist/fast-refresh/helpers.js.map +1 -1
- package/dist/fast-refresh/{fast-refresh.d.ts → index.d.ts} +4 -1
- package/dist/fast-refresh/index.d.ts.map +1 -0
- package/dist/fast-refresh/index.js +60 -0
- package/dist/fast-refresh/index.js.map +1 -0
- package/dist/fast-refresh/loader.d.ts +6 -2
- package/dist/fast-refresh/loader.d.ts.map +1 -1
- package/dist/fast-refresh/loader.js +13 -40
- package/dist/fast-refresh/loader.js.map +1 -1
- package/dist/fast-refresh/runtime.d.ts +12 -2
- package/dist/fast-refresh/runtime.d.ts.map +1 -1
- package/dist/fast-refresh/runtime.js +8 -27
- package/dist/fast-refresh/runtime.js.map +1 -1
- package/dist/homepage/homepage.d.ts +4 -0
- package/dist/homepage/homepage.d.ts.map +1 -0
- package/dist/homepage/homepage.js +63 -0
- package/dist/homepage/homepage.js.map +1 -0
- package/dist/hot-middleware/client.d.ts +20 -0
- package/dist/hot-middleware/client.d.ts.map +1 -0
- package/dist/hot-middleware/client.js +208 -0
- package/dist/hot-middleware/client.js.map +1 -0
- package/dist/hot-middleware/index.d.ts +14 -0
- package/dist/hot-middleware/index.d.ts.map +1 -0
- package/dist/hot-middleware/index.js +181 -0
- package/dist/hot-middleware/index.js.map +1 -0
- package/dist/hot-middleware/process-update.d.ts +13 -0
- package/dist/hot-middleware/process-update.d.ts.map +1 -0
- package/dist/hot-middleware/process-update.js +147 -0
- package/dist/hot-middleware/process-update.js.map +1 -0
- package/dist/hot-middleware/strip-ansi.d.ts +7 -0
- package/dist/hot-middleware/strip-ansi.d.ts.map +1 -0
- package/dist/hot-middleware/strip-ansi.js +23 -0
- package/dist/hot-middleware/strip-ansi.js.map +1 -0
- package/dist/hot-middleware/types.d.ts +39 -0
- package/dist/hot-middleware/types.d.ts.map +1 -0
- package/dist/hot-middleware/types.js +18 -0
- package/dist/hot-middleware/types.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/renderEntry.js +6 -2
- package/dist/renderEntry.js.map +1 -1
- package/dist/start-server.d.ts +0 -1
- package/dist/start-server.d.ts.map +1 -1
- package/dist/start-server.js +35 -14
- package/dist/start-server.js.map +1 -1
- package/dist/static-preview.d.ts +2 -0
- package/dist/static-preview.d.ts.map +1 -0
- package/dist/static-preview.js +34 -0
- package/dist/static-preview.js.map +1 -0
- package/dist/webpack-config.d.ts +1 -2
- package/dist/webpack-config.d.ts.map +1 -1
- package/dist/webpack-config.js +14 -11
- package/dist/webpack-config.js.map +1 -1
- package/package.json +9 -7
- package/dist/env-variables.d.ts +0 -2
- package/dist/env-variables.d.ts.map +0 -1
- package/dist/env-variables.js +0 -5
- package/dist/env-variables.js.map +0 -1
- package/dist/fast-refresh/error-overlay/entry-basic.d.ts +0 -3
- package/dist/fast-refresh/error-overlay/entry-basic.d.ts.map +0 -1
- package/dist/fast-refresh/error-overlay/entry-basic.js +0 -27
- package/dist/fast-refresh/error-overlay/entry-basic.js.map +0 -1
- package/dist/fast-refresh/error-overlay/entry-devserver.d.ts +0 -8
- package/dist/fast-refresh/error-overlay/entry-devserver.d.ts.map +0 -1
- package/dist/fast-refresh/error-overlay/entry-devserver.js +0 -36
- package/dist/fast-refresh/error-overlay/entry-devserver.js.map +0 -1
- package/dist/fast-refresh/error-overlay/index.d.ts +0 -7
- package/dist/fast-refresh/error-overlay/index.d.ts.map +0 -1
- package/dist/fast-refresh/error-overlay/index.js +0 -92
- package/dist/fast-refresh/error-overlay/index.js.map +0 -1
- package/dist/fast-refresh/fast-refresh.d.ts.map +0 -1
- package/dist/fast-refresh/fast-refresh.js +0 -98
- package/dist/fast-refresh/fast-refresh.js.map +0 -1
- package/dist/hot-middleware.d.ts +0 -28
- package/dist/hot-middleware.d.ts.map +0 -1
- package/dist/hot-middleware.js +0 -119
- package/dist/hot-middleware.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
- package/web/index.html +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/react-overlay/index.ts"],"names":[],"mappings":"AAIA,aAAK,uBAAuB,GAAG;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF,eAAO,MAAM,aAAa,YAEzB,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,uBAAuB,QAuC3E"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startReportingRuntimeErrors = exports.dismissErrors = void 0;
|
|
4
|
+
const Overlay_1 = require("../remotion-overlay/Overlay");
|
|
5
|
+
const listen_to_runtime_errors_1 = require("./listen-to-runtime-errors");
|
|
6
|
+
let stopListeningToRuntimeErrors = null;
|
|
7
|
+
let currentRuntimeErrorRecords = [];
|
|
8
|
+
const dismissErrors = () => {
|
|
9
|
+
currentRuntimeErrorRecords = [];
|
|
10
|
+
};
|
|
11
|
+
exports.dismissErrors = dismissErrors;
|
|
12
|
+
function startReportingRuntimeErrors(options) {
|
|
13
|
+
if (stopListeningToRuntimeErrors !== null) {
|
|
14
|
+
throw new Error('Already listening');
|
|
15
|
+
}
|
|
16
|
+
const handleRuntimeError = (opts) => (errorRecord) => {
|
|
17
|
+
try {
|
|
18
|
+
if (typeof opts.onError === 'function') {
|
|
19
|
+
opts.onError.call(null);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
finally {
|
|
23
|
+
if (currentRuntimeErrorRecords.some(({ error }) => error === errorRecord.error)) {
|
|
24
|
+
// Deduplicate identical errors.
|
|
25
|
+
// This fixes https://github.com/facebook/create-react-app/issues/3011.
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
currentRuntimeErrorRecords = currentRuntimeErrorRecords.concat([
|
|
29
|
+
errorRecord,
|
|
30
|
+
]);
|
|
31
|
+
update();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
function update() {
|
|
36
|
+
var _a;
|
|
37
|
+
(_a = Overlay_1.setErrorsRef.current) === null || _a === void 0 ? void 0 : _a.setErrors({
|
|
38
|
+
type: 'errors',
|
|
39
|
+
errors: currentRuntimeErrorRecords,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
stopListeningToRuntimeErrors = (0, listen_to_runtime_errors_1.listenToRuntimeErrors)(handleRuntimeError(options), options.filename);
|
|
43
|
+
}
|
|
44
|
+
exports.startReportingRuntimeErrors = startReportingRuntimeErrors;
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/error-overlay/react-overlay/index.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AACzD,yEAA8E;AAE9E,IAAI,4BAA4B,GAAwB,IAAI,CAAC;AAM7D,IAAI,0BAA0B,GAAkB,EAAE,CAAC;AAE5C,MAAM,aAAa,GAAG,GAAG,EAAE;IACjC,0BAA0B,GAAG,EAAE,CAAC;AACjC,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB;AAEF,SAAgB,2BAA2B,CAAC,OAAgC;IAC3E,IAAI,4BAA4B,KAAK,IAAI,EAAE;QAC1C,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;KACrC;IAED,MAAM,kBAAkB,GACvB,CAAC,IAA6B,EAAE,EAAE,CAAC,CAAC,WAAwB,EAAE,EAAE;QAC/D,IAAI;YACH,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,UAAU,EAAE;gBACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACxB;SACD;gBAAS;YACT,IACC,0BAA0B,CAAC,IAAI,CAC9B,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,KAAK,KAAK,WAAW,CAAC,KAAK,CACxC,EACA;gBACD,gCAAgC;gBAChC,uEAAuE;aACvE;iBAAM;gBACN,0BAA0B,GAAG,0BAA0B,CAAC,MAAM,CAAC;oBAC9D,WAAW;iBACX,CAAC,CAAC;gBACH,MAAM,EAAE,CAAC;aACT;SACD;IACF,CAAC,CAAC;IAEH,SAAS,MAAM;;QACd,MAAA,sBAAY,CAAC,OAAO,0CAAE,SAAS,CAAC;YAC/B,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,0BAA0B;SAClC,CAAC,CAAC;IACJ,CAAC;IAED,4BAA4B,GAAG,IAAA,gDAAqB,EACnD,kBAAkB,CAAC,OAAO,CAAC,EAC3B,OAAO,CAAC,QAAkB,CAC1B,CAAC;AACH,CAAC;AAvCD,kEAuCC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StackFrame } from './utils/stack-frame';
|
|
2
|
+
export declare type ErrorRecord = {
|
|
3
|
+
error: Error;
|
|
4
|
+
unhandledRejection: boolean;
|
|
5
|
+
contextSize: number;
|
|
6
|
+
stackFrames: StackFrame[];
|
|
7
|
+
};
|
|
8
|
+
export declare const crashWithFrames: (crash: (rec: ErrorRecord) => void) => (error: Error & {
|
|
9
|
+
__unmap_source?: string;
|
|
10
|
+
}, unhandledRejection?: boolean) => Promise<void>;
|
|
11
|
+
export declare function listenToRuntimeErrors(crash: (rec: ErrorRecord) => void, filename: string): () => void;
|
|
12
|
+
//# sourceMappingURL=listen-to-runtime-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listen-to-runtime-errors.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/react-overlay/listen-to-runtime-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAE/C,oBAAY,WAAW,GAAG;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,kBAAkB,EAAE,OAAO,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC1B,CAAC;AAgCF,eAAO,MAAM,eAAe,gBACb,WAAW,KAAK,IAAI,aAE1B,KAAK,GAAG;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,gDAuBD,CAAC;AAEH,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,EACjC,QAAQ,EAAE,MAAM,cA2BhB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listenToRuntimeErrors = exports.crashWithFrames = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
const unhandled_error_1 = require("./effects/unhandled-error");
|
|
11
|
+
const unhandled_rejection_1 = require("./effects/unhandled-rejection");
|
|
12
|
+
const stack_trace_limit_1 = require("./effects/stack-trace-limit");
|
|
13
|
+
const proxy_console_1 = require("./effects/proxy-console");
|
|
14
|
+
const format_warning_1 = require("./effects/format-warning");
|
|
15
|
+
const get_stack_frames_1 = require("./utils/get-stack-frames");
|
|
16
|
+
const Overlay_1 = require("../remotion-overlay/Overlay");
|
|
17
|
+
const CONTEXT_SIZE = 3;
|
|
18
|
+
const crashWithFrames = (crash) => async (error, unhandledRejection = false) => {
|
|
19
|
+
var _a;
|
|
20
|
+
try {
|
|
21
|
+
(_a = Overlay_1.setErrorsRef.current) === null || _a === void 0 ? void 0 : _a.setErrors({
|
|
22
|
+
type: 'symbolicating',
|
|
23
|
+
});
|
|
24
|
+
const stackFrames = await (0, get_stack_frames_1.getStackFrames)(error, CONTEXT_SIZE);
|
|
25
|
+
if (stackFrames === null || stackFrames === undefined) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
crash({
|
|
29
|
+
error,
|
|
30
|
+
unhandledRejection,
|
|
31
|
+
contextSize: CONTEXT_SIZE,
|
|
32
|
+
stackFrames,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
console.log('Could not get the stack frames of error:', e);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
exports.crashWithFrames = crashWithFrames;
|
|
40
|
+
function listenToRuntimeErrors(crash, filename) {
|
|
41
|
+
const crashWithFramesRunTime = (0, exports.crashWithFrames)(crash);
|
|
42
|
+
(0, unhandled_error_1.register)(window, (error) => crashWithFramesRunTime(error, false));
|
|
43
|
+
(0, unhandled_rejection_1.register)(window, (error) => crashWithFramesRunTime(error, true));
|
|
44
|
+
(0, stack_trace_limit_1.register)();
|
|
45
|
+
(0, proxy_console_1.registerReactStack)();
|
|
46
|
+
(0, proxy_console_1.permanentRegister)('error', (warning, stack) => {
|
|
47
|
+
const data = (0, format_warning_1.massage)(warning, stack);
|
|
48
|
+
crashWithFramesRunTime({
|
|
49
|
+
message: data.message,
|
|
50
|
+
stack: data.stack,
|
|
51
|
+
__unmap_source: filename,
|
|
52
|
+
name: '',
|
|
53
|
+
}, false);
|
|
54
|
+
});
|
|
55
|
+
return function () {
|
|
56
|
+
(0, stack_trace_limit_1.unregister)();
|
|
57
|
+
(0, unhandled_rejection_1.unregister)(window);
|
|
58
|
+
(0, unhandled_error_1.unregister)(window);
|
|
59
|
+
(0, proxy_console_1.unregisterReactStack)();
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
exports.listenToRuntimeErrors = listenToRuntimeErrors;
|
|
63
|
+
//# sourceMappingURL=listen-to-runtime-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listen-to-runtime-errors.js","sourceRoot":"","sources":["../../../src/error-overlay/react-overlay/listen-to-runtime-errors.ts"],"names":[],"mappings":";;;AASA;;;;;GAKG;AAEH,+DAGmC;AACnC,uEAGuC;AACvC,mEAGqC;AACrC,2DAIiC;AACjC,6DAAmE;AACnE,+DAAwD;AACxD,yDAAyD;AAEzD,MAAM,YAAY,GAAG,CAAC,CAAC;AAEhB,MAAM,eAAe,GAC3B,CAAC,KAAiC,EAAE,EAAE,CACtC,KAAK,EACJ,KAEC,EACD,kBAAkB,GAAG,KAAK,EACzB,EAAE;;IACH,IAAI;QACH,MAAA,sBAAY,CAAC,OAAO,0CAAE,SAAS,CAAC;YAC/B,IAAI,EAAE,eAAe;SACrB,CAAC,CAAC;Q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CAAC;QAC1B,IAAA,4BAAe,EAAC,MAAM,CAAC,CAAC;QACxB,IAAA,oCAAoB,GAAE,CAAC;IACxB,CAAC,CAAC;AACH,CAAC;AA7BD,sDA6BC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { ScriptLine } from './stack-frame';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {number} line The line number to provide context around.
|
|
11
|
+
* @param {number} count The number of lines you'd like for context.
|
|
12
|
+
* @param {string[] | string} lines The source code.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getLinesAround(line: number, count: number, lines: string[] | string): ScriptLine[];
|
|
15
|
+
//# sourceMappingURL=get-lines-around.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-lines-around.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/get-lines-around.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC7B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,GACtB,UAAU,EAAE,CAed"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
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
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getLinesAround = void 0;
|
|
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
|
+
const stack_frame_1 = require("./stack-frame");
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param {number} line The line number to provide context around.
|
|
17
|
+
* @param {number} count The number of lines you'd like for context.
|
|
18
|
+
* @param {string[] | string} lines The source code.
|
|
19
|
+
*/
|
|
20
|
+
function getLinesAround(line, count, lines) {
|
|
21
|
+
if (typeof lines === 'string') {
|
|
22
|
+
lines = lines.split('\n');
|
|
23
|
+
}
|
|
24
|
+
const result = [];
|
|
25
|
+
for (let index = Math.max(0, line - 1 - count); index <= Math.min(lines.length - 1, line - 1 + count); ++index) {
|
|
26
|
+
result.push(new stack_frame_1.ScriptLine(index + 1, lines[index], index === line - 1));
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
exports.getLinesAround = getLinesAround;
|
|
31
|
+
//# sourceMappingURL=get-lines-around.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-lines-around.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/get-lines-around.ts"],"names":[],"mappings":";AAAA;;EAEE;;;AAEF;;;;;GAKG;AAEH,+CAAyC;AAEzC;;;;;GAKG;AACH,SAAgB,cAAc,CAC7B,IAAY,EACZ,KAAa,EACb,KAAwB;IAExB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC9B,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KAC1B;IAED,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,KACC,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,EACzC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,EACrD,EAAE,KAAK,EACN;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,wBAAU,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;KACzE;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAnBD,wCAmBC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { SourceMapConsumer } from 'source-map';
|
|
8
|
+
/**
|
|
9
|
+
* A wrapped instance of a <code>{@link https://github.com/mozilla/source-map SourceMapConsumer}</code>.
|
|
10
|
+
*
|
|
11
|
+
* This exposes methods which will be indifferent to changes made in <code>{@link https://github.com/mozilla/source-map source-map}</code>.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SourceMap {
|
|
14
|
+
__source_map: SourceMapConsumer;
|
|
15
|
+
constructor(sourceMap: SourceMapConsumer);
|
|
16
|
+
/**
|
|
17
|
+
* Returns the original code position for a generated code position.
|
|
18
|
+
* @param {number} line The line of the generated code position.
|
|
19
|
+
* @param {number} column The column of the generated code position.
|
|
20
|
+
*/
|
|
21
|
+
getOriginalPosition(line: number, column: number): {
|
|
22
|
+
source: string;
|
|
23
|
+
line: number;
|
|
24
|
+
column: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Returns the generated code position for an original position.
|
|
28
|
+
* @param {string} source The source file of the original code position.
|
|
29
|
+
* @param {number} line The line of the original code position.
|
|
30
|
+
* @param {number} column The column of the original code position.
|
|
31
|
+
*/
|
|
32
|
+
getGeneratedPosition(source: string, line: number, column: number): {
|
|
33
|
+
line: number;
|
|
34
|
+
column: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Returns the code for a given source file name.
|
|
38
|
+
* @param {string} sourceName The name of the source file.
|
|
39
|
+
*/
|
|
40
|
+
getSource(sourceName: string): string;
|
|
41
|
+
getSources(): string[];
|
|
42
|
+
}
|
|
43
|
+
declare function extractSourceMapUrl(fileUri: string, fileContents: string): Promise<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Returns an instance of <code>{@link SourceMap}</code> for a given fileUri and fileContents.
|
|
46
|
+
* @param {string} fileUri The URI of the source file.
|
|
47
|
+
* @param {string} fileContents The contents of the source file.
|
|
48
|
+
*/
|
|
49
|
+
declare function getSourceMap(fileUri: string, fileContents: string): Promise<SourceMap>;
|
|
50
|
+
export { extractSourceMapUrl, getSourceMap };
|
|
51
|
+
export default getSourceMap;
|
|
52
|
+
//# sourceMappingURL=get-source-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-source-map.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/get-source-map.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,YAAY,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,SAAS;IACrB,YAAY,EAAE,iBAAiB,CAAC;gBAEpB,SAAS,EAAE,iBAAiB;IAIxC;;;;OAIG;IACH,mBAAmB,CAClB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACZ;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC;IAYjD;;;;;OAKG;IACH,oBAAoB,CACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACZ;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC;IAYjC;;;OAGG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAIrC,UAAU,IAAI,MAAM,EAAE;CAItB;AAED,iBAAS,mBAAmB,CAC3B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAmBjB;AAED;;;;GAIG;AACH,iBAAe,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,CAAC,CAqBpB;AAED,OAAO,EAAC,mBAAmB,EAAE,YAAY,EAAC,CAAC;AAC3C,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
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
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getSourceMap = exports.extractSourceMapUrl = exports.SourceMap = void 0;
|
|
7
|
+
/* eslint-disable no-eq-null */
|
|
8
|
+
/* eslint-disable eqeqeq */
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const source_map_1 = require("source-map");
|
|
16
|
+
/**
|
|
17
|
+
* A wrapped instance of a <code>{@link https://github.com/mozilla/source-map SourceMapConsumer}</code>.
|
|
18
|
+
*
|
|
19
|
+
* This exposes methods which will be indifferent to changes made in <code>{@link https://github.com/mozilla/source-map source-map}</code>.
|
|
20
|
+
*/
|
|
21
|
+
class SourceMap {
|
|
22
|
+
constructor(sourceMap) {
|
|
23
|
+
this.__source_map = sourceMap;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Returns the original code position for a generated code position.
|
|
27
|
+
* @param {number} line The line of the generated code position.
|
|
28
|
+
* @param {number} column The column of the generated code position.
|
|
29
|
+
*/
|
|
30
|
+
getOriginalPosition(line, column) {
|
|
31
|
+
const { line: l, column: c, source: s, } = this.__source_map.originalPositionFor({
|
|
32
|
+
line,
|
|
33
|
+
column,
|
|
34
|
+
});
|
|
35
|
+
return { line: l, column: c, source: s };
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Returns the generated code position for an original position.
|
|
39
|
+
* @param {string} source The source file of the original code position.
|
|
40
|
+
* @param {number} line The line of the original code position.
|
|
41
|
+
* @param {number} column The column of the original code position.
|
|
42
|
+
*/
|
|
43
|
+
getGeneratedPosition(source, line, column) {
|
|
44
|
+
const { line: l, column: c } = this.__source_map.generatedPositionFor({
|
|
45
|
+
source,
|
|
46
|
+
line,
|
|
47
|
+
column,
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
line: l,
|
|
51
|
+
column: c,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns the code for a given source file name.
|
|
56
|
+
* @param {string} sourceName The name of the source file.
|
|
57
|
+
*/
|
|
58
|
+
getSource(sourceName) {
|
|
59
|
+
return this.__source_map.sourceContentFor(sourceName);
|
|
60
|
+
}
|
|
61
|
+
getSources() {
|
|
62
|
+
// @ts-expect-error
|
|
63
|
+
return this.__source_map.sources;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.SourceMap = SourceMap;
|
|
67
|
+
function extractSourceMapUrl(fileUri, fileContents) {
|
|
68
|
+
const regex = /\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/gm;
|
|
69
|
+
let match = null;
|
|
70
|
+
for (;;) {
|
|
71
|
+
const next = regex.exec(fileContents);
|
|
72
|
+
if (next == null) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
match = next;
|
|
76
|
+
}
|
|
77
|
+
if (!(match === null || match === void 0 ? void 0 : match[1])) {
|
|
78
|
+
return Promise.reject(new Error(`Cannot find a source map directive for ${fileUri}.`));
|
|
79
|
+
}
|
|
80
|
+
return Promise.resolve(match[1].toString());
|
|
81
|
+
}
|
|
82
|
+
exports.extractSourceMapUrl = extractSourceMapUrl;
|
|
83
|
+
/**
|
|
84
|
+
* Returns an instance of <code>{@link SourceMap}</code> for a given fileUri and fileContents.
|
|
85
|
+
* @param {string} fileUri The URI of the source file.
|
|
86
|
+
* @param {string} fileContents The contents of the source file.
|
|
87
|
+
*/
|
|
88
|
+
async function getSourceMap(fileUri, fileContents) {
|
|
89
|
+
let sm = await extractSourceMapUrl(fileUri, fileContents);
|
|
90
|
+
if (sm.indexOf('data:') === 0) {
|
|
91
|
+
const base64 = /^data:application\/json;([\w=:"-]+;)*base64,/;
|
|
92
|
+
const match2 = sm.match(base64);
|
|
93
|
+
if (!match2) {
|
|
94
|
+
throw new Error('Sorry, non-base64 inline source-map encoding is not supported.');
|
|
95
|
+
}
|
|
96
|
+
sm = sm.substring(match2[0].length);
|
|
97
|
+
sm = window.atob(sm);
|
|
98
|
+
sm = JSON.parse(sm);
|
|
99
|
+
return new SourceMap(await new source_map_1.SourceMapConsumer(sm));
|
|
100
|
+
}
|
|
101
|
+
const index = fileUri.lastIndexOf('/');
|
|
102
|
+
const url = fileUri.substring(0, index + 1) + sm;
|
|
103
|
+
const obj = await fetch(url).then((res) => res.json());
|
|
104
|
+
return new SourceMap(await new source_map_1.SourceMapConsumer(obj));
|
|
105
|
+
}
|
|
106
|
+
exports.getSourceMap = getSourceMap;
|
|
107
|
+
exports.default = getSourceMap;
|
|
108
|
+
//# sourceMappingURL=get-source-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-source-map.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/get-source-map.ts"],"names":[],"mappings":";AAAA;;EAEE;;;AAEF,+BAA+B;AAC/B,2BAA2B;AAC3B;;;;;GAKG;AAEH,2CAA6C;AAE7C;;;;GAIG;AACH,MAAa,SAAS;IAGrB,YAAY,SAA4B;QACvC,IAAI,CA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C,IAAI,EAAE,CAAC,CAAC;IACvD,OAAO,IAAI,SAAS,CAAC,MAAM,IAAI,8BAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;AACxD,CAAC;AAE4B,oCAAY;AACzC,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import type { StackFrame } from './stack-frame';
|
|
8
|
+
declare function getStackFrames(error: Error & {
|
|
9
|
+
__unmap_source?: string;
|
|
10
|
+
}, contextSize?: number): Promise<StackFrame[] | null>;
|
|
11
|
+
export default getStackFrames;
|
|
12
|
+
export { getStackFrames };
|
|
13
|
+
//# sourceMappingURL=get-stack-frames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-stack-frames.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/get-stack-frames.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAK9C,iBAAS,cAAc,CACtB,KAAK,EAAE,KAAK,GAAG;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAC,EACxC,WAAW,SAAI,GACb,OAAO,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAgC9B;AAED,eAAe,cAAc,CAAC;AAC9B,OAAO,EAAC,cAAc,EAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
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
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getStackFrames = void 0;
|
|
7
|
+
const parser_1 = require("./parser");
|
|
8
|
+
const mapper_1 = require("./mapper");
|
|
9
|
+
const unmapper_1 = require("./unmapper");
|
|
10
|
+
function getStackFrames(error, contextSize = 3) {
|
|
11
|
+
const parsedFrames = (0, parser_1.parse)(error);
|
|
12
|
+
let enhancedFramesPromise;
|
|
13
|
+
if (error.__unmap_source) {
|
|
14
|
+
enhancedFramesPromise = (0, unmapper_1.unmap)(error.__unmap_source, parsedFrames, contextSize);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
enhancedFramesPromise = (0, mapper_1.map)(parsedFrames, contextSize);
|
|
18
|
+
}
|
|
19
|
+
return enhancedFramesPromise.then((enhancedFrames) => {
|
|
20
|
+
if (enhancedFrames
|
|
21
|
+
.map((f) => f._originalFileName)
|
|
22
|
+
.filter((f) => f !== null && f !== undefined && f.indexOf('node_modules') === -1).length === 0) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
return enhancedFrames.filter(({ functionName }) => functionName === null ||
|
|
26
|
+
functionName === undefined ||
|
|
27
|
+
functionName.indexOf('__stack_frame_overlay_proxy_console__') === -1);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
exports.getStackFrames = getStackFrames;
|
|
31
|
+
exports.default = getStackFrames;
|
|
32
|
+
//# sourceMappingURL=get-stack-frames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-stack-frames.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/get-stack-frames.ts"],"names":[],"mappings":";AAAA;;EAEE;;;AAUF,qCAA+B;AAC/B,qCAA6B;AAC7B,yCAAiC;AAEjC,SAAS,cAAc,CACtB,KAAwC,EACxC,WAAW,GAAG,CAAC;IAEf,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,KAAK,CAAC,CAAC;IAClC,IAAI,qBAAqB,CAAC;IAC1B,IAAI,KAAK,CAAC,cAAc,EAAE;QACzB,qBAAqB,GAAG,IAAA,gBAAK,EAC5B,KAAK,CAAC,cAAc,EACpB,YAAY,EACZ,WAAW,CACX,CAAC;KACF;SAAM;QACN,qBAAqB,GAAG,IAAA,YAAG,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC;KACvD;IAED,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE;QACpD,IACC,cAAc;aACZ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC;aAC/B,MAAM,CACN,CAAC,CAAC,EAAE,EAAE,CACL,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAClE,CAAC,MAAM,KAAK,CAAC,EACd;YACD,OAAO,IAAI,CAAC;SACZ;QAED,OAAO,cAAc,CAAC,MAAM,CAC3B,CAAC,EAAC,YAAY,EAAC,EAAE,EAAE,CAClB,YAAY,KAAK,IAAI;YACrB,YAAY,KAAK,SAAS;YAC1B,YAAY,CAAC,OAAO,CAAC,uCAAuC,CAAC,KAAK,CAAC,CAAC,CACrE,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC;AAGO,wCAAc;AADtB,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { StackFrame } from './stack-frame';
|
|
8
|
+
/**
|
|
9
|
+
* Enhances a set of <code>StackFrame</code>s with their original positions and code (when available).
|
|
10
|
+
* @param {StackFrame[]} frames A set of <code>StackFrame</code>s which contain (generated) code positions.
|
|
11
|
+
* @param {number} [contextLines=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.
|
|
12
|
+
*/
|
|
13
|
+
declare function map(frames: StackFrame[], contextLines?: number): Promise<StackFrame[]>;
|
|
14
|
+
export { map };
|
|
15
|
+
export default map;
|
|
16
|
+
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/mapper.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAKzC;;;;GAIG;AACH,iBAAe,GAAG,CACjB,MAAM,EAAE,UAAU,EAAE,EACpB,YAAY,SAAI,GACd,OAAO,CAAC,UAAU,EAAE,CAAC,CA4DvB;AAED,OAAO,EAAC,GAAG,EAAC,CAAC;AACb,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
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
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.map = void 0;
|
|
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
|
+
const stack_frame_1 = require("./stack-frame");
|
|
14
|
+
const get_source_map_1 = require("./get-source-map");
|
|
15
|
+
const get_lines_around_1 = require("./get-lines-around");
|
|
16
|
+
const settle_promise_1 = require("./settle-promise");
|
|
17
|
+
/**
|
|
18
|
+
* Enhances a set of <code>StackFrame</code>s with their original positions and code (when available).
|
|
19
|
+
* @param {StackFrame[]} frames A set of <code>StackFrame</code>s which contain (generated) code positions.
|
|
20
|
+
* @param {number} [contextLines=3] The number of lines to provide before and after the line specified in the <code>StackFrame</code>.
|
|
21
|
+
*/
|
|
22
|
+
async function map(frames, contextLines = 3) {
|
|
23
|
+
const cache = {};
|
|
24
|
+
const files = [];
|
|
25
|
+
frames.forEach((frame) => {
|
|
26
|
+
const { fileName } = frame;
|
|
27
|
+
if (fileName === null || fileName === undefined) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (files.indexOf(fileName) !== -1) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
files.push(fileName);
|
|
34
|
+
});
|
|
35
|
+
await (0, settle_promise_1.settle)(files.map(async (fileName) => {
|
|
36
|
+
const fetchUrl = fileName.indexOf('webpack-internal:') === 0
|
|
37
|
+
? `/__get-internal-source?fileName=${encodeURIComponent(fileName)}`
|
|
38
|
+
: fileName;
|
|
39
|
+
const fileSource = await fetch(fetchUrl).then((r) => r.text());
|
|
40
|
+
const _map = await (0, get_source_map_1.getSourceMap)(fileName, fileSource);
|
|
41
|
+
cache[fileName] = { fileSource, map: _map };
|
|
42
|
+
}));
|
|
43
|
+
return frames.map((frame) => {
|
|
44
|
+
const { functionName, fileName, lineNumber, columnNumber } = frame;
|
|
45
|
+
const { map: _map, fileSource } = cache[fileName] || {};
|
|
46
|
+
if (_map === null ||
|
|
47
|
+
_map === undefined ||
|
|
48
|
+
columnNumber === null ||
|
|
49
|
+
columnNumber === undefined ||
|
|
50
|
+
lineNumber === null ||
|
|
51
|
+
lineNumber === undefined) {
|
|
52
|
+
return frame;
|
|
53
|
+
}
|
|
54
|
+
const { source, line, column } = _map.getOriginalPosition(lineNumber, columnNumber);
|
|
55
|
+
const originalSource = source === null || source === undefined ? [] : _map.getSource(source);
|
|
56
|
+
return new stack_frame_1.StackFrame(functionName, fileName, lineNumber, columnNumber, (0, get_lines_around_1.getLinesAround)(lineNumber, contextLines, fileSource), functionName, source, line, column, (0, get_lines_around_1.getLinesAround)(line, contextLines, originalSource));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
exports.map = map;
|
|
60
|
+
exports.default = map;
|
|
61
|
+
//# sourceMapp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EAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAC,CAAC;IAC3C,CAAC,CAAC,CACF,CAAC;IACF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAC3B,MAAM,EAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAC,GAAG,KAAK,CAAC;QACjE,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAC,GAAG,KAAK,CAAC,QAAkB,CAAC,IAAI,EAAE,CAAC;QAChE,IACC,IAAI,KAAK,IAAI;YACb,IAAI,KAAK,SAAS;YAClB,YAAY,KAAK,IAAI;YACrB,YAAY,KAAK,SAAS;YAC1B,UAAU,KAAK,IAAI;YACnB,UAAU,KAAK,SAAS,EACvB;YACD,OAAO,KAAK,CAAC;SACb;QAED,MAAM,EAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAC,GAAG,IAAI,CAAC,mBAAmB,CACtD,UAAU,EACV,YAAY,CACZ,CAAC;QACF,MAAM,cAAc,GACnB,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACvE,OAAO,IAAI,wBAAU,CACpB,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,IAAA,iCAAc,EAAC,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,EACpD,YAAY,EACZ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,IAAA,iCAAc,EAAC,IAAI,EAAE,YAAY,EAAE,cAAc,CAAC,CAClD,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC;AAEO,kBAAG;AACX,kBAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const editorNames: readonly ["atom", "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta", "brackets", "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl", "/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl", "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl", "code", "code-insiders", "vscodium", "/Applications/AppCode.app/Contents/MacOS/appcode", "/Applications/CLion.app/Contents/MacOS/clion", "/Applications/IntelliJ IDEA.app/Contents/MacOS/idea", "/Applications/PhpStorm.app/Contents/MacOS/phpstorm", "/Applications/PyCharm.app/Contents/MacOS/pycharm", "/Applications/PyCharm CE.app/Contents/MacOS/pycharm", "/Applications/RubyMine.app/Contents/MacOS/rubymine", "/Applications/WebStorm.app/Contents/MacOS/webstorm", "/Applications/GoLand.app/Contents/MacOS/goland", "/Applications/Rider.app/Contents/MacOS/rider", "mvim", "emacs", "gvim", "idea", "phpstorm", "pycharm", "rubymine", "sublime_text", "vim", "webstorm", "goland", "rider", "Brackets.exe", "Code.exe", "Code - Insiders.exe", "VSCodium.exe", "atom.exe", "sublime_text.exe", "notepad++.exe", "clion.exe", "clion64.exe", "idea.exe", "idea64.exe", "phpstorm.exe", "phpstorm64.exe", "pycharm.exe", "pycharm64.exe", "rubymine.exe", "rubymine64.exe", "webstorm.exe", "webstorm64.exe", "goland.exe", "goland64.exe", "rider.exe", "rider64.exe"];
|
|
2
|
+
export declare const getDisplayNameForEditor: (editor: Editor | undefined) => string | null;
|
|
3
|
+
declare type Editor = typeof editorNames[number];
|
|
4
|
+
export declare function guessEditor(): Promise<Editor[]>;
|
|
5
|
+
export declare function launchEditor(fileName: string, lineNumber: number, colNumber: number, editor: Editor): Promise<boolean>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=open-in-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-editor.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/open-in-editor.ts"],"names":[],"mappings":"AA8BA,QAAA,MAAM,WAAW,szCAuDP,CAAC;AA8DX,eAAO,MAAM,uBAAuB,WAC3B,MAAM,GAAG,SAAS,KACxB,MAAM,GAAG,IAMX,CAAC;AAEF,aAAK,MAAM,GAAG,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;AA+JzC,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAsErD;AAGD,wBAAsB,YAAY,CACjC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC,CA8FlB"}
|