@remotion/bundler 3.0.0-lambda.99 → 3.0.0-pnpm.18
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 +0 -1
- package/dist/bundler.d.ts.map +1 -1
- package/dist/bundler.js +12 -10
- 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/compatible.api.d.ts +1 -0
- package/dist/dev-middleware/compatible.api.d.ts.map +1 -0
- package/dist/dev-middleware/compatible.api.js +2 -0
- package/dist/dev-middleware/compatible.api.js.map +1 -0
- package/dist/dev-middleware/compatibleapi.d.ts +1 -0
- package/dist/dev-middleware/compatibleapi.d.ts.map +1 -0
- package/dist/dev-middleware/compatibleapi.js +2 -0
- package/dist/dev-middleware/compatibleapi.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 +3 -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/entry-devserver.d.ts +12 -0
- package/dist/error-overlay/entry-devserver.d.ts.map +1 -0
- package/dist/error-overlay/entry-devserver.js +36 -0
- package/dist/error-overlay/entry-devserver.js.map +1 -0
- package/dist/error-overlay/index.d.ts +5 -0
- package/dist/error-overlay/index.d.ts.map +1 -0
- package/dist/error-overlay/index.js +28 -0
- package/dist/error-overlay/index.js.map +1 -0
- package/dist/error-overlay/react-overlay/effects/format-warning.d.ts +12 -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/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 +25 -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 +65 -0
- package/dist/error-overlay/react-overlay/effects/proxy-console.js.map +1 -0
- 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/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 +3 -0
- package/dist/error-overlay/react-overlay/index.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/index.js +22 -0
- package/dist/error-overlay/react-overlay/index.js.map +1 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +9 -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 +71 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js.map +1 -0
- package/dist/error-overlay/react-overlay/stack-frame.d.ts +47 -0
- package/dist/error-overlay/react-overlay/stack-frame.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/stack-frame.js +82 -0
- package/dist/error-overlay/react-overlay/stack-frame.js.map +1 -0
- 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 +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 +25 -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 +35 -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 +81 -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 +9 -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 +22 -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 +13 -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 +450 -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 +3 -0
- package/dist/error-overlay/react-overlay/utils/parser.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/parser.js +118 -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 +41 -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 +32 -0
- package/dist/error-overlay/react-overlay/utils/stack-frame.js.map +1 -0
- package/dist/error-overlay/react-overlay/utils/unmapper.d.ts +3 -0
- package/dist/error-overlay/react-overlay/utils/unmapper.d.ts.map +1 -0
- package/dist/error-overlay/react-overlay/utils/unmapper.js +56 -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 +46 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js.map +1 -0
- 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 +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 +15 -0
- package/dist/error-overlay/remotion-overlay/Overlay.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/Overlay.js +50 -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 +9 -0
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts.map +1 -0
- package/dist/error-overlay/remotion-overlay/StackFrame.js +44 -0
- package/dist/error-overlay/remotion-overlay/StackFrame.js.map +1 -0
- 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/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 +40 -0
- package/dist/fast-refresh/helpers.d.ts.map +1 -0
- package/dist/fast-refresh/helpers.js +146 -0
- package/dist/fast-refresh/helpers.js.map +1 -0
- package/dist/fast-refresh/index.d.ts +31 -0
- 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 +36 -0
- package/dist/fast-refresh/loader.d.ts.map +1 -0
- package/dist/fast-refresh/loader.js +82 -0
- package/dist/fast-refresh/loader.js.map +1 -0
- package/dist/fast-refresh/runtime.d.ts +36 -0
- package/dist/fast-refresh/runtime.d.ts.map +1 -0
- package/dist/fast-refresh/runtime.js +33 -0
- package/dist/fast-refresh/runtime.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 +3 -0
- package/dist/get-package-manager.d.ts.map +1 -0
- package/dist/get-package-manager.js +41 -0
- package/dist/get-package-manager.js.map +1 -0
- 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 +149 -0
- package/dist/hot-middleware/process-update.js.map +1 -0
- package/dist/hot-middleware/strip-ansi.d.ts +2 -0
- package/dist/hot-middleware/strip-ansi.d.ts.map +1 -0
- package/dist/hot-middleware/strip-ansi.js +22 -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 +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/renderEntry.js +1 -1
- package/dist/renderEntry.js.map +1 -1
- package/dist/setup-environment.js +1 -0
- package/dist/setup-environment.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 +58 -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/{web/index.html → dist/static-preview.js} +13 -1
- package/dist/static-preview.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/test/latest-remotion-version.d.ts.map +1 -0
- package/dist/test/latest-remotion-version.js +7 -0
- package/dist/test/latest-remotion-version.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 +2 -2
- 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/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 +12 -9
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2015-present, Facebook, Inc.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.StackFrame = void 0;
|
|
10
|
+
/* @flow */
|
|
11
|
+
/** A container holding a script line. */
|
|
12
|
+
class ScriptLine {
|
|
13
|
+
constructor(lineNumber, content, highlight = false) {
|
|
14
|
+
this.lineNumber = lineNumber;
|
|
15
|
+
this.content = content;
|
|
16
|
+
this.highlight = highlight;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A representation of a stack frame.
|
|
21
|
+
*/
|
|
22
|
+
class StackFrame {
|
|
23
|
+
// eslint-disable-next-line max-params
|
|
24
|
+
constructor(functionName = null, fileName = null, lineNumber = null, columnNumber = null, scriptCode = null, sourceFunctionName = null, sourceFileName = null, sourceLineNumber = null, sourceColumnNumber = null, sourceScriptCode = null) {
|
|
25
|
+
if (functionName && functionName.indexOf('Object.') === 0) {
|
|
26
|
+
functionName = functionName.slice('Object.'.length);
|
|
27
|
+
}
|
|
28
|
+
if (
|
|
29
|
+
// Chrome has a bug with inferring function.name:
|
|
30
|
+
// https://github.com/facebook/create-react-app/issues/2097
|
|
31
|
+
// Let's ignore a meaningless name we get for top-level modules.
|
|
32
|
+
functionName === 'friendlySyntaxErrorLabel' ||
|
|
33
|
+
functionName === 'exports.__esModule' ||
|
|
34
|
+
functionName === '<anonymous>' ||
|
|
35
|
+
!functionName) {
|
|
36
|
+
functionName = null;
|
|
37
|
+
}
|
|
38
|
+
this.functionName = functionName;
|
|
39
|
+
this.fileName = fileName;
|
|
40
|
+
this.lineNumber = lineNumber;
|
|
41
|
+
this.columnNumber = columnNumber;
|
|
42
|
+
this._originalFunctionName = sourceFunctionName;
|
|
43
|
+
this._originalFileName = sourceFileName;
|
|
44
|
+
this._originalLineNumber = sourceLineNumber;
|
|
45
|
+
this._originalColumnNumber = sourceColumnNumber;
|
|
46
|
+
this._scriptCode = scriptCode;
|
|
47
|
+
this._originalScriptCode = sourceScriptCode;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Returns the name of this function.
|
|
51
|
+
*/
|
|
52
|
+
getFunctionName() {
|
|
53
|
+
return this.functionName || '(anonymous function)';
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns the source of the frame.
|
|
57
|
+
* This contains the file name, line number, and column number when available.
|
|
58
|
+
*/
|
|
59
|
+
getSource() {
|
|
60
|
+
let str = '';
|
|
61
|
+
if (this.fileName !== null) {
|
|
62
|
+
str += this.fileName + ':';
|
|
63
|
+
}
|
|
64
|
+
if (this.lineNumber !== null) {
|
|
65
|
+
str += this.lineNumber + ':';
|
|
66
|
+
}
|
|
67
|
+
if (this.columnNumber !== null) {
|
|
68
|
+
str += this.columnNumber + ':';
|
|
69
|
+
}
|
|
70
|
+
return str.slice(0, -1);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns a pretty version of this stack frame.
|
|
74
|
+
*/
|
|
75
|
+
toString() {
|
|
76
|
+
const functionName = this.getFunctionName();
|
|
77
|
+
const source = this.getSource();
|
|
78
|
+
return `${functionName}${source ? ` (${source})` : ``}`;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.StackFrame = StackFrame;
|
|
82
|
+
//# sourceMappingURL=stack-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-frame.js","sourceRoot":"","sources":["../../../src/error-overlay/react-overlay/stack-frame.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,WAAW;AAEX,yCAAyC;AACzC,MAAM,UAAU;IAQf,YAAY,UAAkB,EAAE,OAAe,EAAE,SAAS,GAAG,KAAK;QACjE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC5B,CAAC;CACD;AAED;;GAEG;AACH,MAAa,UAAU;IActB,sCAAsC;IACtC,YACC,eAA8B,IAAI,EAClC,WAA0B,IAAI,EAC9B,aAA4B,IAAI,EAChC,eAA8B,IAAI,EAClC,aAAkC,IAAI,EACtC,qBAAoC,IAAI,EACxC,iBAAgC,IAAI,EACpC,mBAAkC,IAAI,EACtC,qBAAoC,IAAI,EACxC,mBAAwC,IAAI;QAE5C,IAAI,YAAY,IAAI,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;YAC1D,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SACpD;QAED;QACC,iDAAiD;QACjD,2DAA2D;QAC3D,gEAAgE;QAChE,YAAY,KAAK,0BAA0B;YAC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IAAI,CAAC,SAAS,EAAE,CAAC;QAChC,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACzD,CAAC;CACD;AA9FD,gCA8FC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-file-source.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/get-file-source.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,MAAO,MAAM,KAAG,QAAQ,MAAM,CAYvD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getFileSource = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const allowedFileExtensions = ['js', 'ts', 'tsx', 'jsx', 'map', 'mjs'];
|
|
10
|
+
const getFileSource = (p) => {
|
|
11
|
+
if (!allowedFileExtensions.find((extension) => p.endsWith(extension))) {
|
|
12
|
+
throw new Error(`Not allowed to open ${p}`);
|
|
13
|
+
}
|
|
14
|
+
const resolved = path_1.default.resolve(process.cwd(), p);
|
|
15
|
+
const relativeToProcessCwd = path_1.default.relative(process.cwd(), resolved);
|
|
16
|
+
if (relativeToProcessCwd.startsWith('..')) {
|
|
17
|
+
throw new Error(`Not allowed to open ${relativeToProcessCwd}`);
|
|
18
|
+
}
|
|
19
|
+
return fs_1.default.promises.readFile(p, 'utf-8');
|
|
20
|
+
};
|
|
21
|
+
exports.getFileSource = getFileSource;
|
|
22
|
+
//# sourceMappingURL=get-file-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-file-source.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/get-file-source.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,4CAAoB;AAEpB,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAEhE,MAAM,aAAa,GAAG,CAAC,CAAS,EAAmB,EAAE;IAC3D,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE;QACtE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;KAC5C;IAED,MAAM,QAAQ,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAChD,MAAM,oBAAoB,GAAG,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;IACpE,IAAI,oBAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;QAC1C,MAAM,IAAI,KAAK,CAAC,uBAAuB,oBAAoB,EAAE,CAAC,CAAC;KAC/D;IAED,OAAO,YAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC,CAAC;AAZW,QAAA,aAAa,iBAYxB"}
|
|
@@ -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[]): 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,GACb,UAAU,EAAE,CAed"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
*
|
|
9
|
+
* @param {number} line The line number to provide context around.
|
|
10
|
+
* @param {number} count The number of lines you'd like for context.
|
|
11
|
+
* @param {string[] | string} lines The source code.
|
|
12
|
+
*/
|
|
13
|
+
function getLinesAround(line, count, lines) {
|
|
14
|
+
const result = [];
|
|
15
|
+
for (let index = Math.max(0, line - 1 - count); index <= Math.min(lines.length - 1, line - 1 + count); ++index) {
|
|
16
|
+
result.push({
|
|
17
|
+
lineNumber: index + 1,
|
|
18
|
+
content: lines[index],
|
|
19
|
+
highlight: index === line - 1,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
exports.getLinesAround = getLinesAround;
|
|
25
|
+
//# 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;;;AAWF;;;;;GAKG;AACH,SAAgB,cAAc,CAC7B,IAAY,EACZ,KAAa,EACb,KAAe;IAEf,MAAM,MAAM,GAAiB,EAAE,CAAC;IAChC,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;YACX,UAAU,EAAE,KAAK,GAAG,CAAC;YACrB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC;YACrB,SAAS,EAAE,KAAK,KAAK,IAAI,GAAG,CAAC;SAC7B,CAAC,CAAC;KACH;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAnBD,wCAmBC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
getSource(sourceName: string): string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns an instance of <code>{@link SourceMap}</code> for a given fileUri and fileContents.
|
|
30
|
+
* @param {string} fileUri The URI of the source file.
|
|
31
|
+
* @param {string} fileContents The contents of the source file.
|
|
32
|
+
*/
|
|
33
|
+
declare function getSourceMap(fileUri: string, fileContents: string): Promise<SourceMap>;
|
|
34
|
+
export { getSourceMap };
|
|
35
|
+
//# 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,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;CAGrC;AA0BD;;;;GAIG;AACH,iBAAe,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GAClB,OAAO,CAAC,SAAS,CAAC,CAqBpB;AAED,OAAO,EAAC,YAAY,EAAC,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.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
|
+
getSource(sourceName) {
|
|
38
|
+
return this.__source_map.sourceContentFor(sourceName);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.SourceMap = SourceMap;
|
|
42
|
+
function extractSourceMapUrl(fileUri, fileContents) {
|
|
43
|
+
const regex = /\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/gm;
|
|
44
|
+
let match = null;
|
|
45
|
+
for (;;) {
|
|
46
|
+
const next = regex.exec(fileContents);
|
|
47
|
+
if (next == null) {
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
match = next;
|
|
51
|
+
}
|
|
52
|
+
if (!(match === null || match === void 0 ? void 0 : match[1])) {
|
|
53
|
+
return Promise.reject(new Error(`Cannot find a source map directive for ${fileUri}.`));
|
|
54
|
+
}
|
|
55
|
+
return Promise.resolve(match[1].toString());
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Returns an instance of <code>{@link SourceMap}</code> for a given fileUri and fileContents.
|
|
59
|
+
* @param {string} fileUri The URI of the source file.
|
|
60
|
+
* @param {string} fileContents The contents of the source file.
|
|
61
|
+
*/
|
|
62
|
+
async function getSourceMap(fileUri, fileContents) {
|
|
63
|
+
let sm = await extractSourceMapUrl(fileUri, fileContents);
|
|
64
|
+
if (sm.indexOf('data:') === 0) {
|
|
65
|
+
const base64 = /^data:application\/json;([\w=:"-]+;)*base64,/;
|
|
66
|
+
const match2 = sm.match(base64);
|
|
67
|
+
if (!match2) {
|
|
68
|
+
throw new Error('Sorry, non-base64 inline source-map encoding is not supported.');
|
|
69
|
+
}
|
|
70
|
+
sm = sm.substring(match2[0].length);
|
|
71
|
+
sm = window.atob(sm);
|
|
72
|
+
sm = JSON.parse(sm);
|
|
73
|
+
return new SourceMap(new source_map_1.SourceMapConsumer(sm));
|
|
74
|
+
}
|
|
75
|
+
const index = fileUri.lastIndexOf('/');
|
|
76
|
+
const url = fileUri.substring(0, index + 1) + sm;
|
|
77
|
+
const obj = await fetch(url).then((res) => res.json());
|
|
78
|
+
return new SourceMap(new source_map_1.SourceMapConsumer(obj));
|
|
79
|
+
}
|
|
80
|
+
exports.getSourceMap = getSourceMap;
|
|
81
|
+
//# sourceMappingURL=get-source-map.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-source-map.js","sourceRoot":"","sources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
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 { SymbolicatedStackFrame } from './stack-frame';
|
|
8
|
+
export declare const getStackFrames: (error: Error, contextSize: number) => Promise<SymbolicatedStackFrame[] | null>;
|
|
9
|
+
//# 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,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAI1D,eAAO,MAAM,cAAc,UACnB,KAAK,eACC,MAAM,KACjB,QAAQ,sBAAsB,EAAE,GAAG,IAAI,CAiBzC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 unmapper_1 = require("./unmapper");
|
|
9
|
+
const getStackFrames = async (error, contextSize) => {
|
|
10
|
+
const parsedFrames = await (0, parser_1.parseError)(error, contextSize);
|
|
11
|
+
const enhancedFrames = await (0, unmapper_1.unmap)(parsedFrames, contextSize);
|
|
12
|
+
if (enhancedFrames
|
|
13
|
+
.map((f) => f.originalFileName)
|
|
14
|
+
.filter((f_1) => f_1 !== null &&
|
|
15
|
+
f_1 !== undefined &&
|
|
16
|
+
f_1.indexOf('node_modules') === -1).length === 0) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return enhancedFrames;
|
|
20
|
+
};
|
|
21
|
+
exports.getStackFrames = getStackFrames;
|
|
22
|
+
//# 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,qCAAoC;AACpC,yCAAiC;AAE1B,MAAM,cAAc,GAAG,KAAK,EAClC,KAAY,EACZ,WAAmB,EACwB,EAAE;IAC7C,MAAM,YAAY,GAAG,MAAM,IAAA,mBAAU,EAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC1D,MAAM,cAAc,GAAG,MAAM,IAAA,gBAAK,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IAC9D,IACC,cAAc;SACZ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC;SAC9B,MAAM,CACN,CAAC,GAAG,EAAE,EAAE,CACP,GAAG,KAAK,IAAI;QACZ,GAAG,KAAK,SAAS;QACjB,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CACnC,CAAC,MAAM,KAAK,CAAC,EACd;QACD,OAAO,IAAI,CAAC;KACZ;IAED,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AApBW,QAAA,cAAc,kBAoBzB"}
|
|
@@ -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
|
+
//# sourceMappingURL=mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.js","sourceRoot":"","sources":["../../../../src/error-overlay/react-overlay/utils/mapper.ts"],"names":[],"mappings":";AAAA;;EAEE;;;AAEF;;;;;GAKG;AAEH,+CAAyC;AACzC,qDAAyD;AACzD,yDAAkD;AAClD,qDAAwC;AAExC;;;;GAIG;AACH,KAAK,UAAU,GAAG,CACjB,MAAoB,EACpB,YAAY,GAAG,CAAC;IAEhB,MAAM,KAAK,GAA0D,EAAE,CAAC;IACxE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACxB,MAAM,EAAC,QAAQ,EAAC,GAAG,KAAK,CAAC;QACzB,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,EAAE;YAChD,OAAO;SACP;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;YACnC,OAAO;SACP;QAED,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtB,CAAC,CAAC,CAAC;IACH,MAAM,IAAA,uBAAM,EACX,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;QAC5B,MAAM,QAAQ,GACb,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC;YAC1C,CAAC,CAAC,mCAAmC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;YACnE,CAAC,CAAC,QAAQ,CAAC;QAEb,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/D,MAAM,IAAI,GAAG,MAAM,IAAA,6BAAY,EAAC,QAAQ,EAAE,UAAU,CAAC,CA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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", "nano"];
|
|
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({ colNumber, editor, fileName, lineNumber, vsCodeNewWindow, }: {
|
|
6
|
+
fileName: string;
|
|
7
|
+
lineNumber: number;
|
|
8
|
+
colNumber: number;
|
|
9
|
+
editor: Editor;
|
|
10
|
+
vsCodeNewWindow: boolean;
|
|
11
|
+
}): Promise<boolean>;
|
|
12
|
+
export {};
|
|
13
|
+
//# 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":"AA2CA,QAAA,MAAM,WAAW,8zCAwDP,CAAC;AA+DX,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;AAID,wBAAsB,YAAY,CAAC,EAClC,SAAS,EACT,MAAM,EACN,QAAQ,EACR,UAAU,EACV,eAAe,GACf,EAAE;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;CACzB,GAAG,OAAO,CAAC,OAAO,CAAC,CAmGnB"}
|