@expo/metro-runtime 2.2.3 → 3.0.0
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/README.md +17 -1
- package/async-require.d.ts +1 -1
- package/async-require.js +1 -1
- package/build/HMRClient.d.ts +1 -1
- package/build/HMRClient.d.ts.map +1 -1
- package/build/HMRClient.js +40 -68
- package/build/HMRClient.js.map +1 -1
- package/build/HMRClient.native.js +2 -4
- package/build/HMRClient.native.js.map +1 -1
- package/build/LoadingView.d.ts +1 -1
- package/build/LoadingView.d.ts.map +1 -1
- package/build/LoadingView.js +4 -10
- package/build/LoadingView.js.map +1 -1
- package/build/LoadingView.native.d.ts +2 -0
- package/build/LoadingView.native.d.ts.map +1 -1
- package/build/LoadingView.native.js +2 -2
- package/build/LoadingView.native.js.map +1 -1
- package/build/async-require/buildAsyncRequire.js +3 -7
- package/build/async-require/buildAsyncRequire.js.map +1 -1
- package/build/async-require/buildUrlForBundle.js +2 -6
- package/build/async-require/buildUrlForBundle.js.map +1 -1
- package/build/async-require/buildUrlForBundle.native.js +6 -9
- package/build/async-require/buildUrlForBundle.native.js.map +1 -1
- package/build/async-require/fetchAsync.d.ts.map +1 -1
- package/build/async-require/fetchAsync.js +4 -8
- package/build/async-require/fetchAsync.js.map +1 -1
- package/build/async-require/fetchAsync.native.d.ts +1 -1
- package/build/async-require/fetchAsync.native.d.ts.map +1 -1
- package/build/async-require/fetchAsync.native.js +14 -21
- package/build/async-require/fetchAsync.native.js.map +1 -1
- package/build/async-require/fetchThenEval.d.ts.map +1 -1
- package/build/async-require/fetchThenEval.js +5 -10
- package/build/async-require/fetchThenEval.js.map +1 -1
- package/build/async-require/fetchThenEval.web.d.ts.map +1 -1
- package/build/async-require/fetchThenEval.web.js +14 -27
- package/build/async-require/fetchThenEval.web.js.map +1 -1
- package/build/async-require/index.js +2 -6
- package/build/async-require/index.js.map +1 -1
- package/build/async-require/loadBundle.d.ts.map +1 -1
- package/build/async-require/loadBundle.js +14 -18
- package/build/async-require/loadBundle.js.map +1 -1
- package/build/effects.js +5 -7
- package/build/effects.js.map +1 -1
- package/build/effects.native.js +0 -1
- package/build/error-overlay/Data/LogBoxData.d.ts +5 -5
- package/build/error-overlay/Data/LogBoxData.d.ts.map +1 -1
- package/build/error-overlay/Data/LogBoxData.js +76 -127
- package/build/error-overlay/Data/LogBoxData.js.map +1 -1
- package/build/error-overlay/Data/LogBoxLog.d.ts +10 -10
- package/build/error-overlay/Data/LogBoxLog.d.ts.map +1 -1
- package/build/error-overlay/Data/LogBoxLog.js +46 -69
- package/build/error-overlay/Data/LogBoxLog.js.map +1 -1
- package/build/error-overlay/Data/LogBoxSymbolication.d.ts +2 -2
- package/build/error-overlay/Data/LogBoxSymbolication.js +9 -17
- package/build/error-overlay/Data/LogBoxSymbolication.js.map +1 -1
- package/build/error-overlay/Data/LogContext.d.ts +2 -2
- package/build/error-overlay/Data/LogContext.d.ts.map +1 -1
- package/build/error-overlay/Data/LogContext.js +12 -20
- package/build/error-overlay/Data/LogContext.js.map +1 -1
- package/build/error-overlay/Data/parseLogBoxLog.d.ts +2 -2
- package/build/error-overlay/Data/parseLogBoxLog.d.ts.map +1 -1
- package/build/error-overlay/Data/parseLogBoxLog.js +35 -50
- package/build/error-overlay/Data/parseLogBoxLog.js.map +1 -1
- package/build/error-overlay/ErrorOverlay.d.ts +10 -3
- package/build/error-overlay/ErrorOverlay.d.ts.map +1 -1
- package/build/error-overlay/ErrorOverlay.js +55 -86
- package/build/error-overlay/ErrorOverlay.js.map +1 -1
- package/build/error-overlay/LogBox.d.ts +2 -2
- package/build/error-overlay/LogBox.d.ts.map +1 -1
- package/build/error-overlay/LogBox.js +1 -4
- package/build/error-overlay/LogBox.js.map +1 -1
- package/build/error-overlay/LogBox.web.d.ts +3 -3
- package/build/error-overlay/LogBox.web.d.ts.map +1 -1
- package/build/error-overlay/LogBox.web.js +12 -17
- package/build/error-overlay/LogBox.web.js.map +1 -1
- package/build/error-overlay/UI/AnsiHighlight.d.ts +2 -2
- package/build/error-overlay/UI/AnsiHighlight.d.ts.map +1 -1
- package/build/error-overlay/UI/AnsiHighlight.js +28 -36
- package/build/error-overlay/UI/AnsiHighlight.js.map +1 -1
- package/build/error-overlay/UI/LogBoxButton.d.ts +1 -1
- package/build/error-overlay/UI/LogBoxButton.d.ts.map +1 -1
- package/build/error-overlay/UI/LogBoxButton.js +18 -44
- package/build/error-overlay/UI/LogBoxButton.js.map +1 -1
- package/build/error-overlay/UI/LogBoxMessage.d.ts +2 -2
- package/build/error-overlay/UI/LogBoxMessage.d.ts.map +1 -1
- package/build/error-overlay/UI/LogBoxMessage.js +10 -17
- package/build/error-overlay/UI/LogBoxMessage.js.map +1 -1
- package/build/error-overlay/UI/LogBoxStyle.d.ts +1 -1
- package/build/error-overlay/UI/LogBoxStyle.js +15 -32
- package/build/error-overlay/UI/LogBoxStyle.js.map +1 -1
- package/build/error-overlay/UI/constants.js +5 -8
- package/build/error-overlay/UI/constants.js.map +1 -1
- package/build/error-overlay/formatProjectFilePath.d.ts +1 -1
- package/build/error-overlay/formatProjectFilePath.d.ts.map +1 -1
- package/build/error-overlay/formatProjectFilePath.js +7 -14
- package/build/error-overlay/formatProjectFilePath.js.map +1 -1
- package/build/error-overlay/index.d.ts +1 -1
- package/build/error-overlay/index.d.ts.map +1 -1
- package/build/error-overlay/index.js +9 -17
- package/build/error-overlay/index.js.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.d.ts +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.d.ts.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.js +11 -21
- package/build/error-overlay/modules/ExceptionsManager/index.js.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.native.d.ts +2 -1
- package/build/error-overlay/modules/ExceptionsManager/index.native.d.ts.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.native.js +3 -3
- package/build/error-overlay/modules/ExceptionsManager/index.native.js.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.d.ts.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.js +10 -15
- package/build/error-overlay/modules/NativeLogBox/index.js.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.native.d.ts +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.native.d.ts.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.native.js +2 -8
- package/build/error-overlay/modules/NativeLogBox/index.native.js.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.js +5 -7
- package/build/error-overlay/modules/openFileInEditor/index.js.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.native.d.ts +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.native.d.ts.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.native.js +2 -8
- package/build/error-overlay/modules/openFileInEditor/index.native.js.map +1 -1
- package/build/error-overlay/modules/parseErrorStack/index.d.ts +1 -1
- package/build/error-overlay/modules/parseErrorStack/index.d.ts.map +1 -1
- package/build/error-overlay/modules/parseErrorStack/index.js +4 -7
- package/build/error-overlay/modules/parseErrorStack/index.js.map +1 -1
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.d.ts +1 -1
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js +2 -8
- package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js.map +1 -1
- package/build/error-overlay/modules/stringifySafe/index.d.ts +1 -1
- package/build/error-overlay/modules/stringifySafe/index.d.ts.map +1 -1
- package/build/error-overlay/modules/stringifySafe/index.js +16 -22
- package/build/error-overlay/modules/stringifySafe/index.js.map +1 -1
- package/build/error-overlay/modules/symbolicateStackTrace/index.d.ts +2 -2
- package/build/error-overlay/modules/symbolicateStackTrace/index.d.ts.map +1 -1
- package/build/error-overlay/modules/symbolicateStackTrace/index.js +6 -8
- package/build/error-overlay/modules/symbolicateStackTrace/index.js.map +1 -1
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.d.ts +1 -1
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.js +2 -7
- package/build/error-overlay/modules/symbolicateStackTrace/index.native.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js +28 -58
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorFooter.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js +35 -64
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.d.ts +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js +37 -71
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js +20 -54
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSection.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorSection.js +13 -43
- package/build/error-overlay/overlay/LogBoxInspectorSection.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js +26 -55
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js +23 -53
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts +2 -2
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js +42 -76
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js.map +1 -1
- package/build/error-overlay/toast/ErrorToast.d.ts +2 -2
- package/build/error-overlay/toast/ErrorToast.d.ts.map +1 -1
- package/build/error-overlay/toast/ErrorToast.js +44 -72
- package/build/error-overlay/toast/ErrorToast.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.d.ts +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.js +3 -9
- package/build/error-overlay/toast/ErrorToastContainer.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.web.d.ts +2 -2
- package/build/error-overlay/toast/ErrorToastContainer.web.d.ts.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.web.js +22 -49
- package/build/error-overlay/toast/ErrorToastContainer.web.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastMessage.d.ts +1 -1
- package/build/error-overlay/toast/ErrorToastMessage.d.ts.map +1 -1
- package/build/error-overlay/toast/ErrorToastMessage.js +8 -37
- package/build/error-overlay/toast/ErrorToastMessage.js.map +1 -1
- package/build/error-overlay/useRejectionHandler.d.ts +1 -1
- package/build/error-overlay/useRejectionHandler.d.ts.map +1 -1
- package/build/error-overlay/useRejectionHandler.js +20 -28
- package/build/error-overlay/useRejectionHandler.js.map +1 -1
- package/build/getDevServer.d.ts.map +1 -1
- package/build/getDevServer.js +10 -16
- package/build/getDevServer.js.map +1 -1
- package/build/getDevServer.native.d.ts +2 -0
- package/build/getDevServer.native.d.ts.map +1 -1
- package/build/getDevServer.native.js +2 -2
- package/build/getDevServer.native.js.map +1 -1
- package/build/index.d.ts +2 -2
- package/build/index.js +4 -6
- package/build/index.js.map +1 -1
- package/build/location/Location.js +2 -7
- package/build/location/Location.js.map +1 -1
- package/build/location/Location.native.d.ts.map +1 -1
- package/build/location/Location.native.js +25 -32
- package/build/location/Location.native.js.map +1 -1
- package/build/location/install.js +0 -1
- package/build/location/install.native.d.ts +1 -1
- package/build/location/install.native.js +23 -34
- package/build/location/install.native.js.map +1 -1
- package/build/messageSocket.d.ts.map +1 -1
- package/build/messageSocket.js +5 -6
- package/build/messageSocket.js.map +1 -1
- package/build/setupFastRefresh.d.ts.map +1 -1
- package/build/setupFastRefresh.js +2 -4
- package/build/setupFastRefresh.js.map +1 -1
- package/build/setupHMR.js +5 -12
- package/build/setupHMR.js.map +1 -1
- package/build/symbolicate.d.ts +3 -3
- package/build/symbolicate.js +4 -25
- package/build/symbolicate.js.map +1 -1
- package/error-overlay.d.ts +1 -1
- package/error-overlay.js +1 -1
- package/package.json +25 -14
- package/LICENSE +0 -13
|
@@ -1,68 +1,51 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 650 Industries.
|
|
4
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
4
|
*
|
|
6
5
|
* This source code is licensed under the MIT license found in the
|
|
7
6
|
* LICENSE file in the root directory of this source tree.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
exports.getTextColor = exports.getHighlightColor = exports.getDividerColor = exports.getWarningHighlightColor = exports.getLogColor = exports.getErrorDarkColor = exports.getErrorColor = exports.getFatalDarkColor = exports.getFatalColor = exports.getWarningDarkColor = exports.getWarningColor = exports.getBackgroundDarkColor = exports.getBackgroundLightColor = exports.getBackgroundColor = void 0;
|
|
11
|
-
function getBackgroundColor(opacity) {
|
|
8
|
+
export function getBackgroundColor(opacity) {
|
|
12
9
|
return `rgba(0, 0, 0, ${opacity == null ? 1 : opacity})`;
|
|
13
10
|
// return `rgba(51, 51, 51, ${opacity == null ? 1 : opacity})`;
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
function getBackgroundLightColor(opacity) {
|
|
12
|
+
export function getBackgroundLightColor(opacity) {
|
|
17
13
|
return `rgba(69, 69, 69, ${opacity == null ? 1 : opacity})`;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
|
-
function getBackgroundDarkColor(opacity) {
|
|
15
|
+
export function getBackgroundDarkColor(opacity) {
|
|
21
16
|
return `rgba(34, 34, 34, ${opacity == null ? 1 : opacity})`;
|
|
22
17
|
}
|
|
23
|
-
|
|
24
|
-
function getWarningColor(opacity) {
|
|
18
|
+
export function getWarningColor(opacity) {
|
|
25
19
|
return `rgba(250, 186, 48, ${opacity == null ? 1 : opacity})`;
|
|
26
20
|
}
|
|
27
|
-
|
|
28
|
-
function getWarningDarkColor(opacity) {
|
|
21
|
+
export function getWarningDarkColor(opacity) {
|
|
29
22
|
return `rgba(224, 167, 8, ${opacity == null ? 1 : opacity})`;
|
|
30
23
|
}
|
|
31
|
-
|
|
32
|
-
function getFatalColor(opacity) {
|
|
24
|
+
export function getFatalColor(opacity) {
|
|
33
25
|
return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;
|
|
34
26
|
}
|
|
35
|
-
|
|
36
|
-
function getFatalDarkColor(opacity) {
|
|
27
|
+
export function getFatalDarkColor(opacity) {
|
|
37
28
|
return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;
|
|
38
29
|
}
|
|
39
|
-
|
|
40
|
-
function getErrorColor(opacity) {
|
|
30
|
+
export function getErrorColor(opacity) {
|
|
41
31
|
return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;
|
|
42
32
|
}
|
|
43
|
-
|
|
44
|
-
function getErrorDarkColor(opacity) {
|
|
33
|
+
export function getErrorDarkColor(opacity) {
|
|
45
34
|
return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;
|
|
46
35
|
}
|
|
47
|
-
|
|
48
|
-
function getLogColor(opacity) {
|
|
36
|
+
export function getLogColor(opacity) {
|
|
49
37
|
return `rgba(119, 119, 119, ${opacity == null ? 1 : opacity})`;
|
|
50
38
|
}
|
|
51
|
-
|
|
52
|
-
function getWarningHighlightColor(opacity) {
|
|
39
|
+
export function getWarningHighlightColor(opacity) {
|
|
53
40
|
return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;
|
|
54
41
|
}
|
|
55
|
-
|
|
56
|
-
function getDividerColor(opacity) {
|
|
42
|
+
export function getDividerColor(opacity) {
|
|
57
43
|
return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;
|
|
58
44
|
}
|
|
59
|
-
|
|
60
|
-
function getHighlightColor(opacity) {
|
|
45
|
+
export function getHighlightColor(opacity) {
|
|
61
46
|
return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;
|
|
62
47
|
}
|
|
63
|
-
|
|
64
|
-
function getTextColor(opacity) {
|
|
48
|
+
export function getTextColor(opacity) {
|
|
65
49
|
return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;
|
|
66
50
|
}
|
|
67
|
-
exports.getTextColor = getTextColor;
|
|
68
51
|
//# sourceMappingURL=LogBoxStyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxStyle.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxStyle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxStyle.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxStyle.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,OAAO,iBAAiB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;IACzD,+DAA+D;AACjE,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,OAAO,oBAAoB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAAgB;IACrD,OAAO,oBAAoB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO,qBAAqB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,OAAO,qBAAqB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,OAAO,qBAAqB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,OAAgB;IACvD,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC","sourcesContent":["/**\n * Copyright (c) 650 Industries.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport function getBackgroundColor(opacity?: number): string {\n return `rgba(0, 0, 0, ${opacity == null ? 1 : opacity})`;\n // return `rgba(51, 51, 51, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getBackgroundLightColor(opacity?: number): string {\n return `rgba(69, 69, 69, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getBackgroundDarkColor(opacity?: number): string {\n return `rgba(34, 34, 34, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningColor(opacity?: number): string {\n return `rgba(250, 186, 48, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningDarkColor(opacity?: number): string {\n return `rgba(224, 167, 8, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getFatalColor(opacity?: number): string {\n return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getFatalDarkColor(opacity?: number): string {\n return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getErrorColor(opacity?: number): string {\n return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getErrorDarkColor(opacity?: number): string {\n return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getLogColor(opacity?: number): string {\n return `rgba(119, 119, 119, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getWarningHighlightColor(opacity?: number): string {\n return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getDividerColor(opacity?: number): string {\n return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getHighlightColor(opacity?: number): string {\n return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;\n}\n\nexport function getTextColor(opacity?: number): string {\n return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;\n}\n"]}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
default: "Courier",
|
|
7
|
-
ios: "Courier New",
|
|
8
|
-
android: "monospace",
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
export const CODE_FONT = Platform.select({
|
|
3
|
+
default: 'Courier',
|
|
4
|
+
ios: 'Courier New',
|
|
5
|
+
android: 'monospace',
|
|
9
6
|
});
|
|
10
7
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,aAAa;IAClB,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC","sourcesContent":["import { Platform } from 'react-native';\n\nexport const CODE_FONT = Platform.select({\n default: 'Courier',\n ios: 'Courier New',\n android: 'monospace',\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatProjectFilePath.d.ts","sourceRoot":"","sources":["../../src/error-overlay/formatProjectFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAElE,wBAAgB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"formatProjectFilePath.d.ts","sourceRoot":"","sources":["../../src/error-overlay/formatProjectFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAElE,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CASvF;AAeD,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,UASpF"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getStackFormattedLocation = exports.formatProjectFilePath = void 0;
|
|
4
|
-
function formatProjectFilePath(projectRoot, file) {
|
|
1
|
+
export function formatProjectFilePath(projectRoot, file) {
|
|
5
2
|
if (file == null) {
|
|
6
|
-
return
|
|
3
|
+
return '<unknown>';
|
|
7
4
|
}
|
|
8
|
-
return pathRelativeToPath(file.replace(/\\/g,
|
|
5
|
+
return pathRelativeToPath(file.replace(/\\/g, '/'), projectRoot.replace(/\\/g, '/')).replace(/\?.*$/, '');
|
|
9
6
|
}
|
|
10
|
-
|
|
11
|
-
function pathRelativeToPath(path, relativeTo, sep = "/") {
|
|
7
|
+
function pathRelativeToPath(path, relativeTo, sep = '/') {
|
|
12
8
|
const relativeToParts = relativeTo.split(sep);
|
|
13
9
|
const pathParts = path.split(sep);
|
|
14
10
|
let i = 0;
|
|
@@ -20,15 +16,12 @@ function pathRelativeToPath(path, relativeTo, sep = "/") {
|
|
|
20
16
|
}
|
|
21
17
|
return pathParts.slice(i).join(sep);
|
|
22
18
|
}
|
|
23
|
-
function getStackFormattedLocation(projectRoot, frame) {
|
|
19
|
+
export function getStackFormattedLocation(projectRoot, frame) {
|
|
24
20
|
const column = frame.column != null && parseInt(String(frame.column), 10);
|
|
25
21
|
const location = formatProjectFilePath(projectRoot, frame.file) +
|
|
26
22
|
(frame.lineNumber != null
|
|
27
|
-
?
|
|
28
|
-
|
|
29
|
-
(column && !isNaN(column) ? ":" + (column + 1) : "")
|
|
30
|
-
: "");
|
|
23
|
+
? ':' + frame.lineNumber + (column && !isNaN(column) ? ':' + (column + 1) : '')
|
|
24
|
+
: '');
|
|
31
25
|
return location;
|
|
32
26
|
}
|
|
33
|
-
exports.getStackFormattedLocation = getStackFormattedLocation;
|
|
34
27
|
//# sourceMappingURL=formatProjectFilePath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatProjectFilePath.js","sourceRoot":"","sources":["../../src/error-overlay/formatProjectFilePath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formatProjectFilePath.js","sourceRoot":"","sources":["../../src/error-overlay/formatProjectFilePath.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,qBAAqB,CAAC,WAAmB,EAAE,IAAoB;IAC7E,IAAI,IAAI,IAAI,IAAI,EAAE;QAChB,OAAO,WAAW,CAAC;KACpB;IAED,OAAO,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,OAAO,CAC1F,OAAO,EACP,EAAE,CACH,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAY,EAAE,UAAkB,EAAE,GAAG,GAAG,GAAG;IACrE,MAAM,eAAe,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,GAAG,eAAe,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE;QACzD,IAAI,eAAe,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE;YACvC,MAAM;SACP;QACD,CAAC,EAAE,CAAC;KACL;IACD,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,WAAmB,EAAE,KAAsB;IACnF,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,IAAI,IAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1E,MAAM,QAAQ,GACZ,qBAAqB,CAAC,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC;QAC9C,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI;YACvB,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/E,CAAC,CAAC,EAAE,CAAC,CAAC;IAEV,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import type { StackFrame } from 'stacktrace-parser';\n\nexport type MetroStackFrame = StackFrame & { collapse?: boolean };\n\nexport function formatProjectFilePath(projectRoot: string, file?: string | null): string {\n if (file == null) {\n return '<unknown>';\n }\n\n return pathRelativeToPath(file.replace(/\\\\/g, '/'), projectRoot.replace(/\\\\/g, '/')).replace(\n /\\?.*$/,\n ''\n );\n}\n\nfunction pathRelativeToPath(path: string, relativeTo: string, sep = '/') {\n const relativeToParts = relativeTo.split(sep);\n const pathParts = path.split(sep);\n let i = 0;\n while (i < relativeToParts.length && i < pathParts.length) {\n if (relativeToParts[i] !== pathParts[i]) {\n break;\n }\n i++;\n }\n return pathParts.slice(i).join(sep);\n}\n\nexport function getStackFormattedLocation(projectRoot: string, frame: MetroStackFrame) {\n const column = frame.column != null && parseInt(String(frame.column), 10);\n const location =\n formatProjectFilePath(projectRoot, frame.file) +\n (frame.lineNumber != null\n ? ':' + frame.lineNumber + (column && !isNaN(column) ? ':' + (column + 1) : '')\n : '');\n\n return location;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,uCAIzB,GAAG,kBAOxC"}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.withErrorOverlay = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const react_native_1 = require("react-native");
|
|
9
|
-
const ErrorToastContainer_1 = __importDefault(require("./toast/ErrorToastContainer"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import ErrorToastContainer from './toast/ErrorToastContainer';
|
|
10
4
|
if (!global.setImmediate) {
|
|
11
|
-
// @ts-expect-error: setImmediate is not defined in the global scope
|
|
12
5
|
global.setImmediate = function (fn) {
|
|
13
6
|
return setTimeout(fn, 0);
|
|
14
7
|
};
|
|
15
8
|
}
|
|
16
|
-
if (process.env.NODE_ENV ===
|
|
9
|
+
if (process.env.NODE_ENV === 'development' && Platform.OS === 'web') {
|
|
17
10
|
// Stack traces are big with React Navigation
|
|
18
|
-
require(
|
|
11
|
+
require('./LogBox').default.install();
|
|
19
12
|
}
|
|
20
|
-
function withErrorOverlay(Comp) {
|
|
21
|
-
if (process.env.NODE_ENV ===
|
|
13
|
+
export function withErrorOverlay(Comp) {
|
|
14
|
+
if (process.env.NODE_ENV === 'production') {
|
|
22
15
|
return Comp;
|
|
23
16
|
}
|
|
24
17
|
return function ErrorOverlay(props) {
|
|
25
|
-
return (
|
|
26
|
-
|
|
18
|
+
return (React.createElement(ErrorToastContainer, null,
|
|
19
|
+
React.createElement(Comp, { ...props })));
|
|
27
20
|
};
|
|
28
21
|
}
|
|
29
|
-
exports.withErrorOverlay = withErrorOverlay;
|
|
30
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,mBAAmB,MAAM,6BAA6B,CAAC;AAI9D,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;IACxB,MAAM,CAAC,YAAY,GAAG,UAAU,EAAE;QAChC,OAAO,UAAU,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;CACH;AAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;IACnE,6CAA6C;IAE7C,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;CACvC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAA8B;IAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IACD,OAAO,SAAS,YAAY,CAAC,KAAU;QACrC,OAAO,CACL,oBAAC,mBAAmB;YAClB,oBAAC,IAAI,OAAK,KAAK,GAAI,CACC,CACvB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\n\nimport ErrorToastContainer from './toast/ErrorToastContainer';\n\ndeclare const process: any;\n\nif (!global.setImmediate) {\n global.setImmediate = function (fn) {\n return setTimeout(fn, 0);\n };\n}\n\nif (process.env.NODE_ENV === 'development' && Platform.OS === 'web') {\n // Stack traces are big with React Navigation\n\n require('./LogBox').default.install();\n}\n\nexport function withErrorOverlay(Comp: React.ComponentType<any>) {\n if (process.env.NODE_ENV === 'production') {\n return Comp;\n }\n return function ErrorOverlay(props: any) {\n return (\n <ErrorToastContainer>\n <Comp {...props} />\n </ErrorToastContainer>\n );\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,KAAK,aAAa,GAAG,GAAG,CAAC;AAEzB,cAAM,cAAe,SAAQ,KAAK;IAChC,IAAI,EAAE,MAAM,CAAM;CACnB;AAOD,iBAAS,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,KAAK,aAAa,GAAG,GAAG,CAAC;AAEzB,cAAM,cAAe,SAAQ,KAAK;IAChC,IAAI,EAAE,MAAM,CAAM;CACnB;AAOD,iBAAS,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;EAkCzD;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,CAAC,EAAE,GAAG,QAa9B;AAED,QAAA,MAAM,UAAU;;;;CAIf,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,45 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 650 Industries.
|
|
4
3
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
4
|
*
|
|
6
5
|
* This source code is licensed under the MIT license found in the
|
|
7
6
|
* LICENSE file in the root directory of this source tree.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
const parseErrorStack_1 = __importDefault(require("../parseErrorStack"));
|
|
8
|
+
import parseErrorStack from '../parseErrorStack';
|
|
14
9
|
class SyntheticError extends Error {
|
|
15
|
-
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.name = "";
|
|
18
|
-
}
|
|
10
|
+
name = '';
|
|
19
11
|
}
|
|
20
12
|
/**
|
|
21
13
|
* Handles the developer-visible aspect of errors and exceptions
|
|
22
14
|
*/
|
|
23
15
|
let exceptionID = 0;
|
|
24
16
|
function parseException(e, isFatal) {
|
|
25
|
-
const stack = (
|
|
17
|
+
const stack = parseErrorStack(e?.stack);
|
|
26
18
|
const currentExceptionID = ++exceptionID;
|
|
27
|
-
const originalMessage = e.message ||
|
|
19
|
+
const originalMessage = e.message || '';
|
|
28
20
|
let message = originalMessage;
|
|
29
21
|
if (e.componentStack != null) {
|
|
30
22
|
message += `\n\nThis error is located at:${e.componentStack}`;
|
|
31
23
|
}
|
|
32
|
-
const namePrefix = e.name == null || e.name ===
|
|
24
|
+
const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;
|
|
33
25
|
if (!message.startsWith(namePrefix)) {
|
|
34
26
|
message = namePrefix + message;
|
|
35
27
|
}
|
|
36
|
-
message =
|
|
37
|
-
e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
|
|
28
|
+
message = e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
|
|
38
29
|
const data = {
|
|
39
30
|
message,
|
|
40
31
|
originalMessage: message === originalMessage ? null : originalMessage,
|
|
41
|
-
name: e.name == null || e.name ===
|
|
42
|
-
componentStack: typeof e.componentStack ===
|
|
32
|
+
name: e.name == null || e.name === '' ? null : e.name,
|
|
33
|
+
componentStack: typeof e.componentStack === 'string' ? e.componentStack : null,
|
|
43
34
|
stack,
|
|
44
35
|
id: currentExceptionID,
|
|
45
36
|
isFatal,
|
|
@@ -68,13 +59,12 @@ function handleException(e) {
|
|
|
68
59
|
// `throw '<error message>'` somewhere in your codebase.
|
|
69
60
|
error = new SyntheticError(e);
|
|
70
61
|
}
|
|
71
|
-
require(
|
|
62
|
+
require('../../LogBox').default.addException(parseException(error, true));
|
|
72
63
|
}
|
|
73
64
|
const ErrorUtils = {
|
|
74
65
|
parseException,
|
|
75
66
|
handleException,
|
|
76
67
|
SyntheticError,
|
|
77
68
|
};
|
|
78
|
-
|
|
79
|
-
exports.default = ErrorUtils;
|
|
69
|
+
export default ErrorUtils;
|
|
80
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAIjD,MAAM,cAAe,SAAQ,KAAK;IAChC,IAAI,GAAW,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,IAAI,WAAW,GAAG,CAAC,CAAC;AAEpB,SAAS,cAAc,CAAC,CAAgB,EAAE,OAAgB;IACxD,MAAM,KAAK,GAAG,eAAe,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACxC,MAAM,kBAAkB,GAAG,EAAE,WAAW,CAAC;IACzC,MAAM,eAAe,GAAG,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC;IACxC,IAAI,OAAO,GAAG,eAAe,CAAC;IAC9B,IAAI,CAAC,CAAC,cAAc,IAAI,IAAI,EAAE;QAC5B,OAAO,IAAI,gCAAgC,CAAC,CAAC,cAAc,EAAE,CAAC;KAC/D;IACD,MAAM,UAAU,GAAG,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC;IAExE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;QACnC,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;KAChC;IAED,OAAO,GAAG,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,gBAAgB,CAAC,CAAC,QAAQ,EAAE,CAAC;IAEhF,MAAM,IAAI,GAAG;QACX,OAAO;QACP,eAAe,EAAE,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe;QACrE,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;QACrD,cAAc,EAAE,OAAO,CAAC,CAAC,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI;QAC9E,KAAK;QACL,EAAE,EAAE,kBAAkB;QACtB,OAAO;QACP,SAAS,EAAE;YACT,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,QAAQ,EAAE,CAAC,CAAC,KAAK;SAClB;KACF,CAAC;IAEF,OAAO;QACL,GAAG,IAAI;QACP,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,gBAAgB;KACvC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,CAAM;IAC7B,IAAI,KAAY,CAAC;IACjB,IAAI,CAAC,YAAY,KAAK,EAAE;QACtB,KAAK,GAAG,CAAC,CAAC;KACX;SAAM;QACL,kEAAkE;QAClE,qEAAqE;QACrE,mEAAmE;QACnE,wDAAwD;QACxD,KAAK,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,CAAC;KAC/B;IAED,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,cAAc;IACd,eAAe;IACf,cAAc;CACf,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright (c) 650 Industries.\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport parseErrorStack from '../parseErrorStack';\n\ntype ExtendedError = any;\n\nclass SyntheticError extends Error {\n name: string = '';\n}\n\n/**\n * Handles the developer-visible aspect of errors and exceptions\n */\nlet exceptionID = 0;\n\nfunction parseException(e: ExtendedError, isFatal: boolean) {\n const stack = parseErrorStack(e?.stack);\n const currentExceptionID = ++exceptionID;\n const originalMessage = e.message || '';\n let message = originalMessage;\n if (e.componentStack != null) {\n message += `\\n\\nThis error is located at:${e.componentStack}`;\n }\n const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;\n\n if (!message.startsWith(namePrefix)) {\n message = namePrefix + message;\n }\n\n message = e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;\n\n const data = {\n message,\n originalMessage: message === originalMessage ? null : originalMessage,\n name: e.name == null || e.name === '' ? null : e.name,\n componentStack: typeof e.componentStack === 'string' ? e.componentStack : null,\n stack,\n id: currentExceptionID,\n isFatal,\n extraData: {\n jsEngine: e.jsEngine,\n rawStack: e.stack,\n },\n };\n\n return {\n ...data,\n isComponentError: !!e.isComponentError,\n };\n}\n\n/**\n * Logs exceptions to the (native) console and displays them\n */\nfunction handleException(e: any) {\n let error: Error;\n if (e instanceof Error) {\n error = e;\n } else {\n // Workaround for reporting errors caused by `throw 'some string'`\n // Unfortunately there is no way to figure out the stacktrace in this\n // case, so if you ended up here trying to trace an error, look for\n // `throw '<error message>'` somewhere in your codebase.\n error = new SyntheticError(e);\n }\n\n require('../../LogBox').default.addException(parseException(error, true));\n}\n\nconst ErrorUtils = {\n parseException,\n handleException,\n SyntheticError,\n};\n\nexport default ErrorUtils;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":"AACA,OAAO,iBAAiB,MAAM,6CAA6C,CAAC;AAE5E,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
// @ts-expect-error
|
|
2
|
+
import ExceptionsManager from 'react-native/Library/Core/ExceptionsManager';
|
|
3
|
+
export default ExceptionsManager;
|
|
4
4
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,iBAAiB,MAAM,6CAA6C,CAAC;AAE5E,eAAe,iBAAiB,CAAC","sourcesContent":["// @ts-expect-error\nimport ExceptionsManager from 'react-native/Library/Core/ExceptionsManager';\n\nexport default ExceptionsManager;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":";;;;AAGA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":";;;;AAGA,wBAuBE"}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const client_1 = __importDefault(require("react-dom/client"));
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
8
3
|
let currentRoot = null;
|
|
9
|
-
|
|
4
|
+
export default {
|
|
10
5
|
show() {
|
|
11
6
|
if (currentRoot) {
|
|
12
7
|
return;
|
|
13
8
|
}
|
|
14
|
-
const ErrorOverlay = require(
|
|
9
|
+
const ErrorOverlay = require('../../ErrorOverlay').default;
|
|
15
10
|
// Create a new div with ID `error-overlay` element and render LogBoxInspector into it.
|
|
16
|
-
const div = document.createElement(
|
|
17
|
-
div.id =
|
|
11
|
+
const div = document.createElement('div');
|
|
12
|
+
div.id = 'error-overlay';
|
|
18
13
|
document.body.appendChild(div);
|
|
19
|
-
currentRoot =
|
|
20
|
-
currentRoot.render(
|
|
14
|
+
currentRoot = ReactDOM.createRoot(div);
|
|
15
|
+
currentRoot.render(React.createElement(ErrorOverlay, null));
|
|
21
16
|
},
|
|
22
17
|
hide() {
|
|
23
18
|
// Remove div with ID `error-overlay`
|
|
@@ -25,8 +20,8 @@ exports.default = {
|
|
|
25
20
|
currentRoot.unmount();
|
|
26
21
|
currentRoot = null;
|
|
27
22
|
}
|
|
28
|
-
const div = document.getElementById(
|
|
29
|
-
div
|
|
23
|
+
const div = document.getElementById('error-overlay');
|
|
24
|
+
div?.remove();
|
|
30
25
|
},
|
|
31
26
|
};
|
|
32
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,IAAI,WAAW,GAAyB,IAAI,CAAC;AAC7C,eAAe;IACb,IAAI;QACF,IAAI,WAAW,EAAE;YACf,OAAO;SACR;QACD,MAAM,YAAY,GAAwB,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;QAChF,uFAAuF;QACvF,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,EAAE,GAAG,eAAe,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAE/B,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACvC,WAAW,CAAC,MAAM,CAAC,oBAAC,YAAY,OAAG,CAAC,CAAC;IACvC,CAAC;IACD,IAAI;QACF,qCAAqC;QACrC,IAAI,WAAW,EAAE;YACf,WAAW,CAAC,OAAO,EAAE,CAAC;YACtB,WAAW,GAAG,IAAI,CAAC;SACpB;QACD,MAAM,GAAG,GAAG,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;QACrD,GAAG,EAAE,MAAM,EAAE,CAAC;IAChB,CAAC;CACF,CAAC","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom/client';\nlet currentRoot: ReactDOM.Root | null = null;\nexport default {\n show() {\n if (currentRoot) {\n return;\n }\n const ErrorOverlay: React.ComponentType = require('../../ErrorOverlay').default;\n // Create a new div with ID `error-overlay` element and render LogBoxInspector into it.\n const div = document.createElement('div');\n div.id = 'error-overlay';\n document.body.appendChild(div);\n\n currentRoot = ReactDOM.createRoot(div);\n currentRoot.render(<ErrorOverlay />);\n },\n hide() {\n // Remove div with ID `error-overlay`\n if (currentRoot) {\n currentRoot.unmount();\n currentRoot = null;\n }\n const div = document.getElementById('error-overlay');\n div?.remove();\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,yDAAyD,CAAC;AAEnF,eAAe,YAAY,CAAC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
// @ts-expect-error
|
|
7
|
-
const NativeLogBox_1 = __importDefault(require("react-native/Libraries/NativeModules/specs/NativeLogBox"));
|
|
8
|
-
exports.default = NativeLogBox_1.default;
|
|
1
|
+
import NativeLogBox from 'react-native/Libraries/NativeModules/specs/NativeLogBox';
|
|
2
|
+
export default NativeLogBox;
|
|
9
3
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,yDAAyD,CAAC;AAEnF,eAAe,YAAY,CAAC","sourcesContent":["import NativeLogBox from 'react-native/Libraries/NativeModules/specs/NativeLogBox';\n\nexport default NativeLogBox;\n"]}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
function openFileInEditor(file, lineNumber) {
|
|
4
|
-
if (process.env.NODE_ENV !==
|
|
2
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
5
3
|
// TODO: This is not a great URL since it now blocks users from accessing the `/open-stack-frame` url in their router
|
|
6
4
|
// ideally it would be something like `/_devtools/open-stack-frame`.
|
|
7
|
-
const baseUrl = window.location.protocol +
|
|
8
|
-
fetch(baseUrl +
|
|
9
|
-
method:
|
|
5
|
+
const baseUrl = window.location.protocol + '//' + window.location.host;
|
|
6
|
+
fetch(baseUrl + '/open-stack-frame', {
|
|
7
|
+
method: 'POST',
|
|
10
8
|
body: JSON.stringify({ file, lineNumber }),
|
|
11
9
|
});
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
|
-
|
|
12
|
+
export default openFileInEditor;
|
|
15
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.ts"],"names":[],"mappings":"AAEA,SAAS,gBAAgB,CAAC,IAAY,EAAE,UAAkB;IACxD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,qHAAqH;QACrH,oEAAoE;QACpE,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEvE,KAAK,CAAC,OAAO,GAAG,mBAAmB,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;SAC3C,CAAC,CAAC;KACJ;AACH,CAAC;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["declare const process: any;\n\nfunction openFileInEditor(file: string, lineNumber: number) {\n if (process.env.NODE_ENV !== 'production') {\n // TODO: This is not a great URL since it now blocks users from accessing the `/open-stack-frame` url in their router\n // ideally it would be something like `/_devtools/open-stack-frame`.\n const baseUrl = window.location.protocol + '//' + window.location.host;\n\n fetch(baseUrl + '/open-stack-frame', {\n method: 'POST',\n body: JSON.stringify({ file, lineNumber }),\n });\n }\n}\n\nexport default openFileInEditor;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AAErF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
// @ts-expect-error
|
|
7
|
-
const openFileInEditor_1 = __importDefault(require("react-native/Libraries/Core/Devtools/openFileInEditor"));
|
|
8
|
-
exports.default = openFileInEditor_1.default;
|
|
1
|
+
import openFileInEditor from 'react-native/Libraries/Core/Devtools/openFileInEditor';
|
|
2
|
+
export default openFileInEditor;
|
|
9
3
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,uDAAuD,CAAC;AAErF,eAAe,gBAAgB,CAAC","sourcesContent":["import openFileInEditor from 'react-native/Libraries/Core/Devtools/openFileInEditor';\n\nexport default openFileInEditor;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEtD,iBAAS,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEtD,iBAAS,eAAe,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,EAAE,CAoBhF;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const stacktrace_parser_1 = require("stacktrace-parser");
|
|
1
|
+
import { parse } from 'stacktrace-parser';
|
|
4
2
|
function parseErrorStack(stack) {
|
|
5
3
|
if (stack == null) {
|
|
6
4
|
return [];
|
|
@@ -9,11 +7,10 @@ function parseErrorStack(stack) {
|
|
|
9
7
|
return stack;
|
|
10
8
|
}
|
|
11
9
|
// Native support for parsing for non-standard Hermes stack traces.
|
|
12
|
-
// @ts-expect-error: HermesInternal is not a global variable, but it is injected by the Hermes VM.
|
|
13
10
|
if (global.HermesInternal) {
|
|
14
|
-
return require(
|
|
11
|
+
return require('./parseHermesStack').parseErrorStack(stack);
|
|
15
12
|
}
|
|
16
|
-
return
|
|
13
|
+
return parse(stack).map((frame) => {
|
|
17
14
|
// frame.file will mostly look like `http://localhost:8081/index.bundle?platform=web&dev=true&hot=false`
|
|
18
15
|
return {
|
|
19
16
|
...frame,
|
|
@@ -21,5 +18,5 @@ function parseErrorStack(stack) {
|
|
|
21
18
|
};
|
|
22
19
|
});
|
|
23
20
|
}
|
|
24
|
-
|
|
21
|
+
export default parseErrorStack;
|
|
25
22
|
//# sourceMappingURL=index.js.map
|