@expo/metro-runtime 3.2.0 → 3.2.1
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/build/HMRClient.js.map +1 -1
- package/build/async-require/buildAsyncRequire.js +2 -1
- package/build/async-require/buildAsyncRequire.js.map +1 -1
- package/build/async-require/buildUrlForBundle.js +2 -1
- package/build/async-require/buildUrlForBundle.js.map +1 -1
- package/build/async-require/buildUrlForBundle.native.js +2 -1
- package/build/async-require/buildUrlForBundle.native.js.map +1 -1
- package/build/async-require/fetchAsync.js +2 -1
- package/build/async-require/fetchAsync.js.map +1 -1
- package/build/async-require/fetchAsync.native.js +2 -1
- package/build/async-require/fetchAsync.native.js.map +1 -1
- package/build/async-require/fetchThenEval.web.js +2 -1
- package/build/async-require/fetchThenEval.web.js.map +1 -1
- package/build/async-require/fetchThenEvalJs.js +2 -1
- package/build/async-require/fetchThenEvalJs.js.map +1 -1
- package/build/async-require/index.native.js.map +1 -1
- package/build/async-require/loadBundle.js +2 -1
- package/build/async-require/loadBundle.js.map +1 -1
- package/build/effects.js.map +1 -1
- package/build/error-overlay/Data/LogBoxData.js +21 -20
- package/build/error-overlay/Data/LogBoxData.js.map +1 -1
- package/build/error-overlay/Data/LogBoxLog.js.map +1 -1
- package/build/error-overlay/Data/LogBoxSymbolication.js +3 -2
- package/build/error-overlay/Data/LogBoxSymbolication.js.map +1 -1
- package/build/error-overlay/Data/LogContext.js +3 -3
- package/build/error-overlay/Data/LogContext.js.map +1 -1
- package/build/error-overlay/Data/parseLogBoxLog.js +6 -5
- package/build/error-overlay/Data/parseLogBoxLog.js.map +1 -1
- package/build/error-overlay/ErrorOverlay.js +5 -4
- package/build/error-overlay/ErrorOverlay.js.map +1 -1
- package/build/error-overlay/LogBox.web.js.map +1 -1
- package/build/error-overlay/UI/AnsiHighlight.js +2 -1
- package/build/error-overlay/UI/AnsiHighlight.js.map +1 -1
- package/build/error-overlay/UI/LogBoxButton.js +2 -1
- package/build/error-overlay/UI/LogBoxButton.js.map +1 -1
- package/build/error-overlay/UI/LogBoxMessage.js +2 -1
- package/build/error-overlay/UI/LogBoxMessage.js.map +1 -1
- package/build/error-overlay/UI/LogBoxStyle.js +15 -14
- package/build/error-overlay/UI/LogBoxStyle.js.map +1 -1
- package/build/error-overlay/formatProjectFilePath.js +3 -2
- package/build/error-overlay/formatProjectFilePath.js.map +1 -1
- package/build/error-overlay/index.js +2 -1
- package/build/error-overlay/index.js.map +1 -1
- package/build/error-overlay/modules/ExceptionsManager/index.js.map +1 -1
- package/build/error-overlay/modules/NativeLogBox/index.js.map +1 -1
- package/build/error-overlay/modules/openFileInEditor/index.js.map +1 -1
- package/build/error-overlay/modules/parseErrorStack/index.js.map +1 -1
- package/build/error-overlay/modules/stringifySafe/index.js +2 -1
- package/build/error-overlay/modules/stringifySafe/index.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js +2 -1
- package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js +2 -1
- package/build/error-overlay/overlay/LogBoxInspectorFooter.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js +2 -1
- package/build/error-overlay/overlay/LogBoxInspectorHeader.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js +2 -1
- package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSection.js +2 -1
- package/build/error-overlay/overlay/LogBoxInspectorSection.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js +2 -1
- package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js +2 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js.map +1 -1
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js +3 -2
- package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js.map +1 -1
- package/build/error-overlay/toast/ErrorToast.js +2 -1
- package/build/error-overlay/toast/ErrorToast.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.js +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastContainer.web.js +2 -1
- package/build/error-overlay/toast/ErrorToastContainer.web.js.map +1 -1
- package/build/error-overlay/toast/ErrorToastMessage.js +2 -1
- package/build/error-overlay/toast/ErrorToastMessage.js.map +1 -1
- package/build/error-overlay/useRejectionHandler.js +2 -1
- package/build/error-overlay/useRejectionHandler.js.map +1 -1
- package/build/getDevServer.js.map +1 -1
- package/build/location/Location.js +3 -2
- package/build/location/Location.js.map +1 -1
- package/build/location/Location.native.js +3 -2
- package/build/location/Location.native.js.map +1 -1
- package/build/location/install.native.js.map +1 -1
- package/build/messageSocket.js.map +1 -1
- package/build/setupFastRefresh.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxButton.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxButton.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,+CAAwC;AACxC,+CAAmG;AAEnG,2DAA6C;AAa7C,SAAgB,YAAY,CAAC,KAAY;IACvC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,IAAI,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;IAC5C,IAAI,CAAC,eAAe,EAAE;QACpB,eAAe,GAAG;YAChB,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC7C,OAAO,EAAE,WAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC;SAC7C,CAAC;KACH;IAED,MAAM,OAAO,GAAG,CACd,8BAAC,mBAAI,IACH,KAAK,EAAE;YACL;gBACE,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO;gBAC5E,GAAG,uBAAQ,CAAC,MAAM,CAAC;oBACjB,GAAG,EAAE;wBACH,MAAM,EAAE,SAAS;qBAClB;iBACF,CAAC;aACH;YACD,KAAK,CAAC,KAAK;SACZ,IACA,KAAK,CAAC,QAAQ,CACV,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAC7B,OAAO,CACR,CAAC,CAAC,CAAC,CACF,8BAAC,wBAAS,IACR,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EACjC,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAClC,OAAO,CACE,CACb,CAAC;AACJ,CAAC;AAvCD,oCAuCC","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 */\nimport React, { useState } from 'react';\nimport { GestureResponderEvent, Insets, Platform, Pressable, View, ViewStyle } from 'react-native';\n\nimport * as LogBoxStyle from './LogBoxStyle';\n\ntype Props = {\n backgroundColor: {\n default: string;\n pressed: string;\n };\n children?: any;\n hitSlop?: Insets;\n onPress?: ((event: GestureResponderEvent) => void) | null;\n style?: ViewStyle;\n};\n\nexport function LogBoxButton(props: Props) {\n const [pressed, setPressed] = useState(false);\n\n let backgroundColor = props.backgroundColor;\n if (!backgroundColor) {\n backgroundColor = {\n default: LogBoxStyle.getBackgroundColor(0.95),\n pressed: LogBoxStyle.getBackgroundColor(0.6),\n };\n }\n\n const content = (\n <View\n style={[\n {\n backgroundColor: pressed ? backgroundColor.pressed : backgroundColor.default,\n ...Platform.select({\n web: {\n cursor: 'pointer',\n },\n }),\n },\n props.style,\n ]}>\n {props.children}\n </View>\n );\n\n return props.onPress == null ? (\n content\n ) : (\n <Pressable\n hitSlop={props.hitSlop}\n onPress={props.onPress}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}>\n {content}\n </Pressable>\n );\n}\n"]}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.LogBoxMessage =
|
|
6
|
+
exports.LogBoxMessage = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) 650 Industries.
|
|
9
9
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -49,4 +49,5 @@ function LogBoxMessage(props) {
|
|
|
49
49
|
}
|
|
50
50
|
return react_1.default.createElement(react_1.default.Fragment, null, elements);
|
|
51
51
|
}
|
|
52
|
+
exports.LogBoxMessage = LogBoxMessage;
|
|
52
53
|
//# sourceMappingURL=LogBoxMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxMessage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxMessage.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxMessage.tsx"],"names":[],"mappings":";;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAA0D;AAW1D,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CACvC,OAAO,CAAC,OAAO,CAAC,mDAAmD,EAAE,EAAE,CAAC,CAAC;AAE3E,SAAgB,aAAa,CAAC,KAAY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GAAG,UAAU,CAAC,CAAC;YAE9E,iBAAiB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;SAClC;QAED,MAAM,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QAElF,iBAAiB,CAAC,GAAG,GAAG,IAAI,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;QACnE,OAAO,YAAY,CAAC,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IACnD,CAAC,EAAE,CAAC,CAAC,CAAC;IAEN,IAAI,UAAU,GAAG,OAAO,CAAC,MAAM,EAAE;QAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5C,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;KACnC;IAED,OAAO,8DAAG,QAAQ,CAAI,CAAC;AACzB,CAAC;AAlDD,sCAkDC","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 */\nimport React from 'react';\nimport { StyleProp, Text, TextStyle } from 'react-native';\n\nimport type { Message } from '../Data/parseLogBoxLog';\n\ntype Props = {\n message: Message;\n style: StyleProp<TextStyle>;\n plaintext?: boolean;\n maxLength?: number;\n};\n\nconst cleanContent = (content: string) =>\n content.replace(/^(TransformError |Warning: (Warning: )?|Error: )/g, '');\n\nexport function LogBoxMessage(props: Props): JSX.Element {\n const { content, substitutions }: Message = props.message;\n\n if (props.plaintext === true) {\n return <Text>{cleanContent(content)}</Text>;\n }\n\n const maxLength = props.maxLength != null ? props.maxLength : Infinity;\n const substitutionStyle: StyleProp<TextStyle> = props.style;\n const elements: JSX.Element[] = [];\n let length = 0;\n const createUnderLength = (key: string | '-1', message: string, style?: StyleProp<TextStyle>) => {\n let cleanMessage = cleanContent(message);\n\n if (props.maxLength != null) {\n cleanMessage = cleanMessage.slice(0, props.maxLength - length);\n }\n\n if (length < maxLength) {\n elements.push(\n <Text key={key} style={style}>\n {cleanMessage}\n </Text>\n );\n }\n\n length += cleanMessage.length;\n };\n\n const lastOffset = substitutions.reduce((prevOffset, substitution, index) => {\n const key = String(index);\n\n if (substitution.offset > prevOffset) {\n const prevPart = content.substr(prevOffset, substitution.offset - prevOffset);\n\n createUnderLength(key, prevPart);\n }\n\n const substititionPart = content.substr(substitution.offset, substitution.length);\n\n createUnderLength(key + '.5', substititionPart, substitutionStyle);\n return substitution.offset + substitution.length;\n }, 0);\n\n if (lastOffset < content.length) {\n const lastPart = content.substr(lastOffset);\n createUnderLength('-1', lastPart);\n }\n\n return <>{elements}</>;\n}\n"]}
|
|
@@ -7,61 +7,62 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.getBackgroundColor =
|
|
11
|
-
exports.getBackgroundLightColor = getBackgroundLightColor;
|
|
12
|
-
exports.getBackgroundDarkColor = getBackgroundDarkColor;
|
|
13
|
-
exports.getWarningColor = getWarningColor;
|
|
14
|
-
exports.getWarningDarkColor = getWarningDarkColor;
|
|
15
|
-
exports.getFatalColor = getFatalColor;
|
|
16
|
-
exports.getFatalDarkColor = getFatalDarkColor;
|
|
17
|
-
exports.getErrorColor = getErrorColor;
|
|
18
|
-
exports.getErrorDarkColor = getErrorDarkColor;
|
|
19
|
-
exports.getLogColor = getLogColor;
|
|
20
|
-
exports.getWarningHighlightColor = getWarningHighlightColor;
|
|
21
|
-
exports.getDividerColor = getDividerColor;
|
|
22
|
-
exports.getHighlightColor = getHighlightColor;
|
|
23
|
-
exports.getTextColor = getTextColor;
|
|
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;
|
|
24
11
|
function getBackgroundColor(opacity) {
|
|
25
12
|
return `rgba(0, 0, 0, ${opacity == null ? 1 : opacity})`;
|
|
26
13
|
// return `rgba(51, 51, 51, ${opacity == null ? 1 : opacity})`;
|
|
27
14
|
}
|
|
15
|
+
exports.getBackgroundColor = getBackgroundColor;
|
|
28
16
|
function getBackgroundLightColor(opacity) {
|
|
29
17
|
return `rgba(69, 69, 69, ${opacity == null ? 1 : opacity})`;
|
|
30
18
|
}
|
|
19
|
+
exports.getBackgroundLightColor = getBackgroundLightColor;
|
|
31
20
|
function getBackgroundDarkColor(opacity) {
|
|
32
21
|
return `rgba(34, 34, 34, ${opacity == null ? 1 : opacity})`;
|
|
33
22
|
}
|
|
23
|
+
exports.getBackgroundDarkColor = getBackgroundDarkColor;
|
|
34
24
|
function getWarningColor(opacity) {
|
|
35
25
|
return `rgba(250, 186, 48, ${opacity == null ? 1 : opacity})`;
|
|
36
26
|
}
|
|
27
|
+
exports.getWarningColor = getWarningColor;
|
|
37
28
|
function getWarningDarkColor(opacity) {
|
|
38
29
|
return `rgba(224, 167, 8, ${opacity == null ? 1 : opacity})`;
|
|
39
30
|
}
|
|
31
|
+
exports.getWarningDarkColor = getWarningDarkColor;
|
|
40
32
|
function getFatalColor(opacity) {
|
|
41
33
|
return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;
|
|
42
34
|
}
|
|
35
|
+
exports.getFatalColor = getFatalColor;
|
|
43
36
|
function getFatalDarkColor(opacity) {
|
|
44
37
|
return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;
|
|
45
38
|
}
|
|
39
|
+
exports.getFatalDarkColor = getFatalDarkColor;
|
|
46
40
|
function getErrorColor(opacity) {
|
|
47
41
|
return `rgba(243, 83, 105, ${opacity == null ? 1 : opacity})`;
|
|
48
42
|
}
|
|
43
|
+
exports.getErrorColor = getErrorColor;
|
|
49
44
|
function getErrorDarkColor(opacity) {
|
|
50
45
|
return `rgba(208, 75, 95, ${opacity == null ? 1 : opacity})`;
|
|
51
46
|
}
|
|
47
|
+
exports.getErrorDarkColor = getErrorDarkColor;
|
|
52
48
|
function getLogColor(opacity) {
|
|
53
49
|
return `rgba(119, 119, 119, ${opacity == null ? 1 : opacity})`;
|
|
54
50
|
}
|
|
51
|
+
exports.getLogColor = getLogColor;
|
|
55
52
|
function getWarningHighlightColor(opacity) {
|
|
56
53
|
return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;
|
|
57
54
|
}
|
|
55
|
+
exports.getWarningHighlightColor = getWarningHighlightColor;
|
|
58
56
|
function getDividerColor(opacity) {
|
|
59
57
|
return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;
|
|
60
58
|
}
|
|
59
|
+
exports.getDividerColor = getDividerColor;
|
|
61
60
|
function getHighlightColor(opacity) {
|
|
62
61
|
return `rgba(252, 176, 29, ${opacity == null ? 1 : opacity})`;
|
|
63
62
|
}
|
|
63
|
+
exports.getHighlightColor = getHighlightColor;
|
|
64
64
|
function getTextColor(opacity) {
|
|
65
65
|
return `rgba(255, 255, 255, ${opacity == null ? 1 : opacity})`;
|
|
66
66
|
}
|
|
67
|
+
exports.getTextColor = getTextColor;
|
|
67
68
|
//# sourceMappingURL=LogBoxStyle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxStyle.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxStyle.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"LogBoxStyle.js","sourceRoot":"","sources":["../../../src/error-overlay/UI/LogBoxStyle.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,SAAgB,kBAAkB,CAAC,OAAgB;IACjD,OAAO,iBAAiB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAA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AAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAC/D,CAAC;AAFD,8CAEC;AAED,SAAgB,WAAW,CAAC,OAAgB;IAC1C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAFD,kCAEC;AAED,SAAgB,wBAAwB,CAAC,OAAgB;IACvD,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAFD,4DAEC;AAED,SAAgB,eAAe,CAAC,OAAgB;IAC9C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAFD,0CAEC;AAED,SAAgB,iBAAiB,CAAC,OAAgB;IAChD,OAAO,sBAAsB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AAChE,CAAC;AAFD,8CAEC;AAED,SAAgB,YAAY,CAAC,OAAgB;IAC3C,OAAO,uBAAuB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC;AACjE,CAAC;AAFD,oCAEC","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,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatProjectFilePath =
|
|
4
|
-
exports.getStackFormattedLocation = getStackFormattedLocation;
|
|
3
|
+
exports.getStackFormattedLocation = exports.formatProjectFilePath = void 0;
|
|
5
4
|
function formatProjectFilePath(projectRoot, file) {
|
|
6
5
|
if (file == null) {
|
|
7
6
|
return '<unknown>';
|
|
8
7
|
}
|
|
9
8
|
return pathRelativeToPath(file.replace(/\\/g, '/'), projectRoot.replace(/\\/g, '/')).replace(/\?.*$/, '');
|
|
10
9
|
}
|
|
10
|
+
exports.formatProjectFilePath = formatProjectFilePath;
|
|
11
11
|
function pathRelativeToPath(path, relativeTo, sep = '/') {
|
|
12
12
|
const relativeToParts = relativeTo.split(sep);
|
|
13
13
|
const pathParts = path.split(sep);
|
|
@@ -28,4 +28,5 @@ function getStackFormattedLocation(projectRoot, frame) {
|
|
|
28
28
|
: '');
|
|
29
29
|
return location;
|
|
30
30
|
}
|
|
31
|
+
exports.getStackFormattedLocation = getStackFormattedLocation;
|
|
31
32
|
//# 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,SAAgB,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;AATD,sDASC;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,SAAgB,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;AATD,8DASC","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"]}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.withErrorOverlay =
|
|
6
|
+
exports.withErrorOverlay = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
if (!global.setImmediate) {
|
|
9
9
|
global.setImmediate = function (fn) {
|
|
@@ -24,4 +24,5 @@ function withErrorOverlay(Comp) {
|
|
|
24
24
|
react_1.default.createElement(Comp, { ...props })));
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
+
exports.withErrorOverlay = withErrorOverlay;
|
|
27
28
|
//# 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,kDAA0B;AAE1B,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,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,EAAE;IAC3E,6CAA6C;IAC7C,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;CACvC;AAED,SAAgB,gBAAgB,CAAC,IAA8B;IAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,OAAO,EAAE,mBAAmB,EAAE,GACpC,OAAO,CAAC,6BAA6B,CAAiD,CAAC;IAEzF,OAAO,SAAS,YAAY,CAAC,KAAU;QACrC,OAAO,CACL,8BAAC,mBAAmB;YAClB,8BAAC,IAAI,OAAK,KAAK,GAAI,CACC,CACvB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAfD,4CAeC","sourcesContent":["import React from 'react';\n\nif (!global.setImmediate) {\n global.setImmediate = function (fn) {\n return setTimeout(fn, 0);\n };\n}\n\nif (process.env.NODE_ENV === 'development' && process.env.EXPO_OS === 'web') {\n // Stack traces are big with React Navigation\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\n const { default: ErrorToastContainer } =\n require('./toast/ErrorToastContainer') as typeof import('./toast/ErrorToastContainer');\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.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAEH,yEAAiD;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,IAAA,yBAAe,EAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACxC,MAAM,kBAAkB,GAAG,EAAE,WAAW,CAAC;IACzC,MAA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,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,kBAAe,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.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,8DAAwC;AACxC,IAAI,WAAW,GAAyB,IAAI,CAAC;AAC7C,kBAAe;IACb,IAAI;QACF,IAAI,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,8DAAwC;AACxC,IAAI,WAAW,GAAyB,IAAI,CAAC;AAC7C,kBAAe;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,gBAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACvC,WAAW,CAAC,MAAM,CAAC,8BAAC,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.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
|
|
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,kBAAe,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.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/index.ts"],"names":[],"mappings":";;AAAA,yDAAsD;AAEtD,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,KAAK,IAAI,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/index.ts"],"names":[],"mappings":";;AAAA,yDAAsD;AAEtD,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,EAAE,CAAC;KACX;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAC;KACd;IAED,yDAAyD;IACzD,sEAAsE;IACtE,+BAA+B;IAC/B,iEAAiE;IACjE,IAAI;IAEJ,OAAO,IAAA,yBAAK,EAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QAChC,wGAAwG;QACxG,OAAO;YACL,GAAG,KAAK;YACR,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI;SACvD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kBAAe,eAAe,CAAC","sourcesContent":["import { parse, StackFrame } from 'stacktrace-parser';\n\nfunction parseErrorStack(stack?: string): (StackFrame & { collapse?: boolean })[] {\n if (stack == null) {\n return [];\n }\n if (Array.isArray(stack)) {\n return stack;\n }\n\n // This file seems to be web-only, so we can remove this.\n // // Native support for parsing for non-standard Hermes stack traces.\n // if (global.HermesInternal) {\n // return require('./parseHermesStack').parseErrorStack(stack);\n // }\n\n return parse(stack).map((frame) => {\n // frame.file will mostly look like `http://localhost:8081/index.bundle?platform=web&dev=true&hot=false`\n return {\n ...frame,\n column: frame.column != null ? frame.column - 1 : null,\n };\n });\n}\n\nexport default parseErrorStack;\n"]}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.createStringifySafeWithLimits =
|
|
10
|
+
exports.createStringifySafeWithLimits = void 0;
|
|
11
11
|
/**
|
|
12
12
|
* Tries to stringify with JSON.stringify and toString, but catches exceptions
|
|
13
13
|
* (e.g. from circular objects) and always returns a string and never throws.
|
|
@@ -103,6 +103,7 @@ function createStringifySafeWithLimits(limits) {
|
|
|
103
103
|
return '["' + typeof arg + '" failed to stringify]';
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
+
exports.createStringifySafeWithLimits = createStringifySafeWithLimits;
|
|
106
107
|
const stringifySafe = createStringifySafeWithLimits({
|
|
107
108
|
maxDepth: 10,
|
|
108
109
|
maxStringLimit: 100,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/stringifySafe/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/stringifySafe/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH;;;GAGG;AACH,SAAgB,6BAA6B,CAAC,MAK7C;IACC,MAAM,EACJ,QAAQ,GAAG,MAAM,CAAC,iBAAiB,EACnC,cAAc,GAAG,MAAM,CAAC,iBAAiB,EACzC,aAAa,GAAG,MAAM,CAAC,iBAAiB,EACxC,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,GAC9C,GAAG,MAAM,CAAC;IACX,MAAM,KAAK,GAAU,EAAE,CAAC;IACxB,SAAS,QAAQ,CAAgB,IAAY,EAAE,KAAU;QACvD,OAAO,KAAK,CAAC,MAAM,IAAI,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE;YACxC,KAAK,CAAC,KAAK,EAAE,CAAC;SACf;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,MAAM,eAAe,GAAG,mBAAmB,CAAC;YAC5C,IAAI,KAAK,CAAC,MAAM,GAAG,cAAc,GAA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EAAE,EAAE;IACZ,cAAc,EAAE,GAAG;IACnB,aAAa,EAAE,EAAE;IACjB,kBAAkB,EAAE,EAAE;CACvB,CAAC,CAAC;AAEH,kBAAe,aAAa,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\n/**\n * Tries to stringify with JSON.stringify and toString, but catches exceptions\n * (e.g. from circular objects) and always returns a string and never throws.\n */\nexport function createStringifySafeWithLimits(limits: {\n maxDepth?: number;\n maxStringLimit?: number;\n maxArrayLimit?: number;\n maxObjectKeysLimit?: number;\n}): (foo: any) => string {\n const {\n maxDepth = Number.POSITIVE_INFINITY,\n maxStringLimit = Number.POSITIVE_INFINITY,\n maxArrayLimit = Number.POSITIVE_INFINITY,\n maxObjectKeysLimit = Number.POSITIVE_INFINITY,\n } = limits;\n const stack: any[] = [];\n function replacer(this: unknown, _key: string, value: any): any {\n while (stack.length && this !== stack[0]) {\n stack.shift();\n }\n\n if (typeof value === 'string') {\n const truncatedString = '...(truncated)...';\n if (value.length > maxStringLimit + truncatedString.length) {\n return value.substring(0, maxStringLimit) + truncatedString;\n }\n return value;\n }\n if (typeof value !== 'object' || value === null) {\n return value;\n }\n\n let retval = value;\n if (Array.isArray(value)) {\n if (stack.length >= maxDepth) {\n retval = `[ ... array with ${value.length} values ... ]`;\n } else if (value.length > maxArrayLimit) {\n retval = value\n .slice(0, maxArrayLimit)\n .concat([`... extra ${value.length - maxArrayLimit} values truncated ...`]);\n }\n } else {\n // Add refinement after Array.isArray call.\n if (typeof value !== 'object') {\n throw new Error('This was already found earlier');\n }\n const keys = Object.keys(value);\n if (stack.length >= maxDepth) {\n retval = `{ ... object with ${keys.length} keys ... }`;\n } else if (keys.length > maxObjectKeysLimit) {\n // Return a sample of the keys.\n retval = {};\n for (const k of keys.slice(0, maxObjectKeysLimit)) {\n retval[k] = value[k];\n }\n const truncatedKey = '...(truncated keys)...';\n retval[truncatedKey] = keys.length - maxObjectKeysLimit;\n }\n }\n stack.unshift(retval);\n return retval;\n }\n\n return function stringifySafe(arg: any): string {\n if (arg === undefined) {\n return 'undefined';\n } else if (arg === null) {\n return 'null';\n } else if (typeof arg === 'function') {\n try {\n return arg.toString();\n } catch {\n return '[function unknown]';\n }\n } else if (arg instanceof Error) {\n return arg.name + ': ' + arg.message;\n } else {\n // Perform a try catch, just in case the object has a circular\n // reference or stringify throws for some other reason.\n try {\n const ret = JSON.stringify(arg, replacer);\n if (ret === undefined) {\n return '[\"' + typeof arg + '\" failed to stringify]';\n }\n return ret;\n } catch {\n if (typeof arg.toString === 'function') {\n try {\n // $FlowFixMe[incompatible-use] : toString shouldn't take any arguments in general.\n return arg.toString();\n } catch {}\n }\n }\n }\n return '[\"' + typeof arg + '\" failed to stringify]';\n };\n}\n\nconst stringifySafe = createStringifySafeWithLimits({\n maxDepth: 10,\n maxStringLimit: 100,\n maxArrayLimit: 50,\n maxObjectKeysLimit: 50,\n});\n\nexport default stringifySafe;\n"]}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LogBoxInspectorCodeFrame =
|
|
29
|
+
exports.LogBoxInspectorCodeFrame = void 0;
|
|
30
30
|
/**
|
|
31
31
|
* Copyright (c) 650 Industries.
|
|
32
32
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -72,6 +72,7 @@ function LogBoxInspectorCodeFrame({ codeFrame }) {
|
|
|
72
72
|
getFileName(),
|
|
73
73
|
getLocation())))));
|
|
74
74
|
}
|
|
75
|
+
exports.LogBoxInspectorCodeFrame = LogBoxInspectorCodeFrame;
|
|
75
76
|
const styles = react_native_1.StyleSheet.create({
|
|
76
77
|
box: {
|
|
77
78
|
backgroundColor: LogBoxStyle.getBackgroundColor(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorCodeFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorCodeFrame.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorCodeFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorCodeFrame.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAkE;AAElE,qEAAkE;AAElE,uDAA2C;AAC3C,qDAAkD;AAClD,+DAAiD;AACjD,+CAA4C;AAC5C,oEAAiE;AACjE,mFAA2D;AAI3D,SAAgB,wBAAwB,CAAC,EAAE,SAAS,EAA6B;IAC/E,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,OAAO,IAAI,CAAC;KACb;IAED,SAAS,WAAW;QAClB,OAAO,IAAA,6CAAqB,EAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACnF,CAAC;IAED,SAAS,WAAW;QAClB,MAAM,QAAQ,GAAG,SAAS,EAAE,QAAQ,CAAC;QACrC,IAAI,QAAQ,IAAI,IAAI,EAAE;YACpB,OAAO,KAAK,QAAQ,CAAC,GAAG,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,yCAAyC,GAAG,CAAC;SAC9F;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,8BAAC,+CAAsB,IAAC,OAAO,EAAC,QAAQ;QACtC,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,GAAG;YACrB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK;gBACvB,8BAAC,yBAAU,IAAC,UAAU;oBACpB,8BAAC,oBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,IAAI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AAC;QACpC,SAAS,EAAE,QAAQ;QACnB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,qBAAS;KACtB;CACF,CAAC,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 */\nimport React from 'react';\nimport { ScrollView, StyleSheet, Text, View } from 'react-native';\n\nimport { LogBoxInspectorSection } from './LogBoxInspectorSection';\nimport type { CodeFrame } from '../Data/parseLogBoxLog';\nimport { Ansi } from '../UI/AnsiHighlight';\nimport { LogBoxButton } from '../UI/LogBoxButton';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\nimport { CODE_FONT } from '../UI/constants';\nimport { formatProjectFilePath } from '../formatProjectFilePath';\nimport openFileInEditor from '../modules/openFileInEditor';\n\ndeclare const process: any;\n\nexport function LogBoxInspectorCodeFrame({ codeFrame }: { codeFrame?: CodeFrame }) {\n if (codeFrame == null) {\n return null;\n }\n\n function getFileName() {\n return formatProjectFilePath(process.env.EXPO_PROJECT_ROOT, codeFrame?.fileName);\n }\n\n function getLocation() {\n const location = codeFrame?.location;\n if (location != null) {\n return ` (${location.row}:${location.column + 1 /* Code frame columns are zero indexed */})`;\n }\n\n return null;\n }\n\n return (\n <LogBoxInspectorSection heading=\"Source\">\n <View style={styles.box}>\n <View style={styles.frame}>\n <ScrollView horizontal>\n <Ansi style={styles.content} text={codeFrame.content} />\n </ScrollView>\n </View>\n <LogBoxButton\n backgroundColor={{\n default: 'transparent',\n pressed: LogBoxStyle.getBackgroundDarkColor(1),\n }}\n style={styles.button}\n onPress={() => {\n openFileInEditor(codeFrame.fileName, codeFrame.location?.row ?? 0);\n }}>\n <Text style={styles.fileText}>\n {getFileName()}\n {getLocation()}\n </Text>\n </LogBoxButton>\n </View>\n </LogBoxInspectorSection>\n );\n}\n\nconst styles = StyleSheet.create({\n box: {\n backgroundColor: LogBoxStyle.getBackgroundColor(),\n borderWidth: 1,\n borderColor: '#323232',\n marginLeft: 10,\n marginRight: 10,\n marginTop: 5,\n borderRadius: 3,\n },\n frame: {\n padding: 10,\n borderBottomColor: LogBoxStyle.getTextColor(0.1),\n borderBottomWidth: 1,\n },\n button: {\n paddingTop: 10,\n paddingBottom: 10,\n },\n content: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 12,\n includeFontPadding: false,\n lineHeight: 20,\n fontFamily: CODE_FONT,\n },\n fileText: {\n userSelect: 'none',\n color: LogBoxStyle.getTextColor(0.5),\n textAlign: 'center',\n flex: 1,\n fontSize: 16,\n includeFontPadding: false,\n fontFamily: CODE_FONT,\n },\n});\n"]}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LogBoxInspectorFooter =
|
|
29
|
+
exports.LogBoxInspectorFooter = void 0;
|
|
30
30
|
/**
|
|
31
31
|
* Copyright (c) 650 Industries.
|
|
32
32
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -49,6 +49,7 @@ function LogBoxInspectorFooter(props) {
|
|
|
49
49
|
react_1.default.createElement(FooterButton, { text: "Dismiss", onPress: props.onDismiss }),
|
|
50
50
|
react_1.default.createElement(FooterButton, { text: "Minimize", onPress: props.onMinimize })));
|
|
51
51
|
}
|
|
52
|
+
exports.LogBoxInspectorFooter = LogBoxInspectorFooter;
|
|
52
53
|
function FooterButton({ text, onPress }) {
|
|
53
54
|
return (react_1.default.createElement(react_native_1.Pressable, { onPress: onPress, style: { flex: 1 } }, ({
|
|
54
55
|
/** @ts-expect-error: react-native types are broken. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorFooter.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorFooter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorFooter.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorFooter.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAA2E;AAE3E,mDAAoD;AACpD,+DAAiD;AAOjD,SAAgB,qBAAqB,CAAC,KAAY;IAChD,MAAM,GAAG,GAAG,IAAA,2BAAc,GAAE,CAAC;IAE7B,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAC5C,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI;YACtB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM;gBACxB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,eAAe,sCAAwC,CACtE,CACF,CACR,CAAC;KACH;IAED,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI;QACtB,8BAAC,YAAY,IAAC,IAAI,EAAC,SAAS,EAAC,OAAO,EAAE,KAAK,CAAC,SAAS,GAAI;QACzD,8BAAC,YAAY,IAAC,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,KAAK,CAAC,UAAU,GAAI,CACtD,CACR,CAAC;AACJ,CAAC;AAnBD,sDAmBC;AAED,SAAS,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAyC;IAC5E,OAAO,CACL,8BAAC,wBAAS,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,IAC5C,CAAC;IACA,uDAAuD;IACvD,OAAO,EACP,OAAO,GACR,EAAE,EAAE,CAAC,CACJ,8BAAC,mBAAI,IACH,KAAK,EAAE;YACL,YAAY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AAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,EAAE;QACjB,SAAS,EAAE,QAAQ;QACnB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;CACF,CAAC,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 */\nimport React from 'react';\nimport { Platform, Pressable, StyleSheet, Text, View } from 'react-native';\n\nimport { useSelectedLog } from '../Data/LogContext';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n onDismiss: () => void;\n onMinimize: () => void;\n};\n\nexport function LogBoxInspectorFooter(props: Props) {\n const log = useSelectedLog();\n\n if (['static', 'syntax'].includes(log.level)) {\n return (\n <View style={styles.root}>\n <View style={styles.button}>\n <Text style={styles.syntaxErrorText}>This error cannot be dismissed.</Text>\n </View>\n </View>\n );\n }\n\n return (\n <View style={styles.root}>\n <FooterButton text=\"Dismiss\" onPress={props.onDismiss} />\n <FooterButton text=\"Minimize\" onPress={props.onMinimize} />\n </View>\n );\n}\n\nfunction FooterButton({ text, onPress }: { onPress: () => void; text: string }) {\n return (\n <Pressable onPress={onPress} style={{ flex: 1 }}>\n {({\n /** @ts-expect-error: react-native types are broken. */\n hovered,\n pressed,\n }) => (\n <View\n style={[\n buttonStyles.safeArea,\n {\n // @ts-expect-error: web-only type\n transitionDuration: '150ms',\n backgroundColor: pressed\n ? '#323232'\n : hovered\n ? '#111111'\n : LogBoxStyle.getBackgroundColor(),\n },\n ]}>\n <View style={buttonStyles.content}>\n <Text style={buttonStyles.label}>{text}</Text>\n </View>\n </View>\n )}\n </Pressable>\n );\n}\n\nconst buttonStyles = StyleSheet.create({\n safeArea: {\n flex: 1,\n borderTopWidth: 1,\n borderColor: '#323232',\n // paddingBottom: DeviceInfo.getConstants().isIPhoneX_deprecated ? 30 : 0,\n },\n content: {\n alignItems: 'center',\n height: 48,\n justifyContent: 'center',\n },\n label: {\n userSelect: 'none',\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 20,\n },\n});\n\nconst styles = StyleSheet.create({\n root: {\n backgroundColor: LogBoxStyle.getBackgroundColor(1),\n ...Platform.select({\n web: {\n boxShadow: `0 -2px 0 2px #000`,\n },\n }),\n flexDirection: 'row',\n },\n button: {\n flex: 1,\n },\n syntaxErrorText: {\n textAlign: 'center',\n width: '100%',\n height: 48,\n fontSize: 14,\n lineHeight: 20,\n paddingTop: 20,\n paddingBottom: 50,\n fontStyle: 'italic',\n color: LogBoxStyle.getTextColor(0.6),\n },\n});\n"]}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LogBoxInspectorHeader =
|
|
29
|
+
exports.LogBoxInspectorHeader = void 0;
|
|
30
30
|
/**
|
|
31
31
|
* Copyright (c) 650 Industries.
|
|
32
32
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -58,6 +58,7 @@ function LogBoxInspectorHeader(props) {
|
|
|
58
58
|
react_1.default.createElement(react_native_1.Text, { style: styles.titleText }, titleText)),
|
|
59
59
|
react_1.default.createElement(LogBoxInspectorHeaderButton, { disabled: total <= 1, level: props.level, image: require('@expo/metro-runtime/assets/chevron-right.png'), onPress: () => props.onSelectIndex(nextIndex) }))));
|
|
60
60
|
}
|
|
61
|
+
exports.LogBoxInspectorHeader = LogBoxInspectorHeader;
|
|
61
62
|
const backgroundForLevel = (level) => ({
|
|
62
63
|
warn: {
|
|
63
64
|
default: 'transparent',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAkF;AAGlF,mDAA6C;AAC7C,qDAAkD;AAClD,+DAAiD;AAOjD,SAAgB,qBAAqB,CAAC,KAAY;IAChD,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,IAAA,oBAAO,GAAE,CAAC;IAC5D,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;IAE1B,IAAI,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE;QAC5B,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACjD,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,MAAM;gBACxB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK;oBACvB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,wBAA0B,CAClD,CACF,CACF,CACR,CAAC;KACH;IAED,MAAM,SAAS,GAAG,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC;IACxE,MAAM,SAAS,GAAG,aAAa,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,GAAG,CAAC,CAAC;IAExE,MAAM,SAAS,GAAG,OAAO,aAAa,GAAG,CAAC,OAAO,KAAK,EAAE,CAAC;IAEzD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EA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AC,aAAa,EAAE;KAC7C;IACD,MAAM,EAAE;QACN,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QAEpB,iBAAiB,EAAE,CAAC;QACpB,MAAM,EAAE,uBAAQ,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,EAAE;YACX,GAAG,EAAE,EAAE;SACR,CAAC;KACH;IACD,KAAK,EAAE;QACL,UAAU,EAAE,QAAQ;QACpB,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;KACzB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,WAAW,CAAC,YAAY,EAAE;QACjC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,wBAAS,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE;KACzE;CACF,CAAC,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 */\nimport React from 'react';\nimport { Image, Platform, StatusBar, StyleSheet, Text, View } from 'react-native';\n\nimport type { LogLevel } from '../Data/LogBoxLog';\nimport { useLogs } from '../Data/LogContext';\nimport { LogBoxButton } from '../UI/LogBoxButton';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n onSelectIndex: (selectedIndex: number) => void;\n level: LogLevel;\n};\n\nexport function LogBoxInspectorHeader(props: Props) {\n const { selectedLogIndex: selectedIndex, logs } = useLogs();\n const total = logs.length;\n\n if (props.level === 'syntax') {\n return (\n <View style={[styles.safeArea, styles[props.level]]}>\n <View style={styles.header}>\n <View style={styles.title}>\n <Text style={styles.titleText}>Failed to compile</Text>\n </View>\n </View>\n </View>\n );\n }\n\n const prevIndex = selectedIndex - 1 < 0 ? total - 1 : selectedIndex - 1;\n const nextIndex = selectedIndex + 1 > total - 1 ? 0 : selectedIndex + 1;\n\n const titleText = `Log ${selectedIndex + 1} of ${total}`;\n\n return (\n <View style={[styles.safeArea, styles[props.level]]}>\n <View style={styles.header}>\n <LogBoxInspectorHeaderButton\n disabled={total <= 1}\n level={props.level}\n image={require('@expo/metro-runtime/assets/chevron-left.png')}\n onPress={() => props.onSelectIndex(prevIndex)}\n />\n <View style={styles.title}>\n <Text style={styles.titleText}>{titleText}</Text>\n </View>\n <LogBoxInspectorHeaderButton\n disabled={total <= 1}\n level={props.level}\n image={require('@expo/metro-runtime/assets/chevron-right.png')}\n onPress={() => props.onSelectIndex(nextIndex)}\n />\n </View>\n </View>\n );\n}\n\nconst backgroundForLevel = (level: LogLevel) =>\n ({\n warn: {\n default: 'transparent',\n pressed: LogBoxStyle.getWarningDarkColor(),\n },\n error: {\n default: 'transparent',\n pressed: LogBoxStyle.getErrorDarkColor(),\n },\n fatal: {\n default: 'transparent',\n pressed: LogBoxStyle.getFatalDarkColor(),\n },\n syntax: {\n default: 'transparent',\n pressed: LogBoxStyle.getFatalDarkColor(),\n },\n static: {\n default: 'transparent',\n pressed: LogBoxStyle.getFatalDarkColor(),\n },\n })[level];\n\nfunction LogBoxInspectorHeaderButton(props: {\n disabled: boolean;\n image: number;\n level: LogLevel;\n onPress?: () => void;\n}) {\n return (\n <LogBoxButton\n backgroundColor={backgroundForLevel(props.level)}\n onPress={props.disabled ? undefined : props.onPress}\n style={headerStyles.button}>\n {props.disabled ? null : (\n <Image\n source={props.image}\n tintColor={LogBoxStyle.getTextColor()}\n style={headerStyles.buttonImage}\n />\n )}\n </LogBoxButton>\n );\n}\n\nconst headerStyles = StyleSheet.create({\n button: {\n alignItems: 'center',\n justifyContent: 'center',\n aspectRatio: 1,\n marginRight: 6,\n marginLeft: 6,\n borderRadius: 3,\n },\n buttonImage: {\n height: 14,\n width: 8,\n },\n});\n\nconst styles = StyleSheet.create({\n syntax: {\n backgroundColor: LogBoxStyle.getFatalColor(),\n },\n static: {\n backgroundColor: LogBoxStyle.getFatalColor(),\n },\n fatal: {\n backgroundColor: LogBoxStyle.getFatalColor(),\n },\n warn: {\n backgroundColor: LogBoxStyle.getWarningColor(),\n },\n error: {\n backgroundColor: LogBoxStyle.getErrorColor(),\n },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n\n paddingHorizontal: 8,\n height: Platform.select({\n default: 48,\n ios: 44,\n }),\n },\n title: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n },\n titleText: {\n color: LogBoxStyle.getTextColor(),\n fontSize: 16,\n fontWeight: '600',\n includeFontPadding: false,\n lineHeight: 20,\n },\n safeArea: {\n paddingTop: process.env.EXPO_OS !== 'ios' ? StatusBar.currentHeight : 40,\n },\n});\n"]}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LogBoxInspectorMessageHeader =
|
|
29
|
+
exports.LogBoxInspectorMessageHeader = void 0;
|
|
30
30
|
/**
|
|
31
31
|
* Copyright (c) 650 Industries.
|
|
32
32
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -53,6 +53,7 @@ function LogBoxInspectorMessageHeader(props) {
|
|
|
53
53
|
react_1.default.createElement(LogBoxMessage_1.LogBoxMessage, { maxLength: props.collapsed ? SHOW_MORE_MESSAGE_LENGTH : Infinity, message: props.message, style: styles.messageText }),
|
|
54
54
|
react_1.default.createElement(ShowMoreButton, { ...props }))));
|
|
55
55
|
}
|
|
56
|
+
exports.LogBoxInspectorMessageHeader = LogBoxInspectorMessageHeader;
|
|
56
57
|
const styles = react_native_1.StyleSheet.create({
|
|
57
58
|
body: {
|
|
58
59
|
backgroundColor: LogBoxStyle.getBackgroundColor(1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorMessageHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorMessageHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorMessageHeader.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorMessageHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAgE;AAIhE,uDAAoD;AACpD,+DAAiD;AAUjD,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAErC,SAAS,cAAc,CAAC,EACtB,OAAO,EACP,SAAS,EACT,OAAO,GAC0C;IACjD,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,wBAAwB,IAAI,CAAC,SAAS,EAAE;QACnE,OAAO,IAAI,CAAC;KACb;IACD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,mBAEvC,CACR,CAAC;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAAC,KAAY;IACvD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI;QACtB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;YACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAG,KAAK,CAAC,KAAK,CAAQ,CACvE;QACP,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ;YAC1B,8BAAC,6BAAa,IACZ,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,EAChE,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,KAAK,EAAE,MAAM,CA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W,EAAE;QACX,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;KACrC;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,EAAE;KACf;IACD,MAAM,EAAE;QACN,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,CAAC;KAChB;CACF,CAAC,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 */\nimport React from 'react';\nimport { Platform, StyleSheet, Text, View } from 'react-native';\n\nimport type { LogLevel } from '../Data/LogBoxLog';\nimport type { Message } from '../Data/parseLogBoxLog';\nimport { LogBoxMessage } from '../UI/LogBoxMessage';\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n collapsed: boolean;\n message: Message;\n level: LogLevel;\n title: string;\n onPress: () => void;\n};\n\nconst SHOW_MORE_MESSAGE_LENGTH = 300;\n\nfunction ShowMoreButton({\n message,\n collapsed,\n onPress,\n}: Pick<Props, 'collapsed' | 'message' | 'onPress'>) {\n if (message.content.length < SHOW_MORE_MESSAGE_LENGTH || !collapsed) {\n return null;\n }\n return (\n <Text style={styles.collapse} onPress={onPress}>\n ... See More\n </Text>\n );\n}\n\nexport function LogBoxInspectorMessageHeader(props: Props) {\n return (\n <View style={styles.body}>\n <View style={styles.heading}>\n <Text style={[styles.headingText, styles[props.level]]}>{props.title}</Text>\n </View>\n <Text style={styles.bodyText}>\n <LogBoxMessage\n maxLength={props.collapsed ? SHOW_MORE_MESSAGE_LENGTH : Infinity}\n message={props.message}\n style={styles.messageText}\n />\n <ShowMoreButton {...props} />\n </Text>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n body: {\n backgroundColor: LogBoxStyle.getBackgroundColor(1),\n ...Platform.select({\n web: {\n boxShadow: `0 2px 0 2px #00000080`,\n },\n }),\n },\n bodyText: {\n color: LogBoxStyle.getTextColor(1),\n fontSize: 14,\n includeFontPadding: false,\n lineHeight: 20,\n fontWeight: '500',\n paddingHorizontal: 12,\n paddingBottom: 10,\n },\n heading: {\n alignItems: 'center',\n flexDirection: 'row',\n paddingHorizontal: 12,\n marginTop: 10,\n marginBottom: 5,\n },\n headingText: {\n flex: 1,\n fontSize: 20,\n fontWeight: '600',\n includeFontPadding: false,\n lineHeight: 28,\n },\n warn: {\n color: LogBoxStyle.getWarningColor(1),\n },\n error: {\n color: LogBoxStyle.getErrorColor(1),\n },\n fatal: {\n color: LogBoxStyle.getFatalColor(1),\n },\n syntax: {\n color: LogBoxStyle.getFatalColor(1),\n },\n static: {\n color: LogBoxStyle.getFatalColor(1),\n },\n messageText: {\n color: LogBoxStyle.getTextColor(0.6),\n },\n collapse: {\n color: LogBoxStyle.getTextColor(0.7),\n fontSize: 14,\n fontWeight: '300',\n lineHeight: 12,\n },\n button: {\n paddingVertical: 5,\n paddingHorizontal: 10,\n borderRadius: 3,\n },\n});\n"]}
|
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LogBoxInspectorSection =
|
|
29
|
+
exports.LogBoxInspectorSection = void 0;
|
|
30
30
|
/**
|
|
31
31
|
* Copyright (c) 650 Industries.
|
|
32
32
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -44,6 +44,7 @@ function LogBoxInspectorSection(props) {
|
|
|
44
44
|
props.action),
|
|
45
45
|
react_1.default.createElement(react_native_1.View, { style: styles.body }, props.children)));
|
|
46
46
|
}
|
|
47
|
+
exports.LogBoxInspectorSection = LogBoxInspectorSection;
|
|
47
48
|
const styles = react_native_1.StyleSheet.create({
|
|
48
49
|
section: {
|
|
49
50
|
marginTop: 15,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogBoxInspectorSection.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogBoxInspectorSection.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorSection.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;GAMG;AACH,kDAA0B;AAC1B,+CAAsD;AAEtD,+DAAiD;AAQjD,SAAgB,sBAAsB,CAAC,KAAY;IACjD,OAAO,CACL,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;QACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,OAAO;YACzB,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,WAAW,IAAG,KAAK,CAAC,OAAO,CAAQ;YACtD,KAAK,CAAC,MAAM,CACR;QACP,8BAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAG,KAAK,CAAC,QAAQ,CAAQ,CAC5C,CACR,CAAC;AACJ,CAAC;AAVD,wDAUC;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,SAAS,EAAE,EAAE;KACd;IACD,OAAO,EAAE;QACP,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;QACpB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;KACjB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;KACf;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,EAAE;KAClB;CACF,CAAC,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 */\nimport React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport * as LogBoxStyle from '../UI/LogBoxStyle';\n\ntype Props = {\n heading: string;\n children: React.ReactNode;\n action?: any;\n};\n\nexport function LogBoxInspectorSection(props: Props) {\n return (\n <View style={styles.section}>\n <View style={styles.heading}>\n <Text style={styles.headingText}>{props.heading}</Text>\n {props.action}\n </View>\n <View style={styles.body}>{props.children}</View>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n section: {\n marginTop: 15,\n },\n heading: {\n alignItems: 'center',\n flexDirection: 'row',\n paddingHorizontal: 12,\n marginBottom: 10,\n },\n headingText: {\n color: LogBoxStyle.getTextColor(1),\n flex: 1,\n fontSize: 18,\n fontWeight: '600',\n includeFontPadding: false,\n lineHeight: 20,\n },\n body: {\n paddingBottom: 10,\n },\n});\n"]}
|
|
@@ -31,7 +31,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
31
31
|
return result;
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.LogBoxInspectorSourceMapStatus =
|
|
34
|
+
exports.LogBoxInspectorSourceMapStatus = void 0;
|
|
35
35
|
const react_1 = __importStar(require("react"));
|
|
36
36
|
const react_native_1 = require("react-native");
|
|
37
37
|
const LogBoxButton_1 = require("../UI/LogBoxButton");
|
|
@@ -103,6 +103,7 @@ function LogBoxInspectorSourceMapStatus(props) {
|
|
|
103
103
|
] }),
|
|
104
104
|
react_1.default.createElement(react_native_1.Text, { style: [styles.text, { color }] }, "Source Map")));
|
|
105
105
|
}
|
|
106
|
+
exports.LogBoxInspectorSourceMapStatus = LogBoxInspectorSourceMapStatus;
|
|
106
107
|
const styles = react_native_1.StyleSheet.create({
|
|
107
108
|
root: {
|
|
108
109
|
alignItems: 'center',
|