@expo/metro-runtime 3.0.0 → 3.0.2

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.
Files changed (219) hide show
  1. package/build/HMRClient.js +43 -15
  2. package/build/HMRClient.js.map +1 -1
  3. package/build/HMRClient.native.js +3 -1
  4. package/build/HMRClient.native.js.map +1 -1
  5. package/build/LoadingView.d.ts +6 -0
  6. package/build/LoadingView.d.ts.map +1 -1
  7. package/build/LoadingView.js +12 -4
  8. package/build/LoadingView.js.map +1 -1
  9. package/build/LoadingView.native.js +7 -2
  10. package/build/LoadingView.native.js.map +1 -1
  11. package/build/async-require/buildAsyncRequire.js +7 -3
  12. package/build/async-require/buildAsyncRequire.js.map +1 -1
  13. package/build/async-require/buildUrlForBundle.js +5 -1
  14. package/build/async-require/buildUrlForBundle.js.map +1 -1
  15. package/build/async-require/buildUrlForBundle.native.js +5 -1
  16. package/build/async-require/buildUrlForBundle.native.js.map +1 -1
  17. package/build/async-require/fetchAsync.d.ts +6 -0
  18. package/build/async-require/fetchAsync.d.ts.map +1 -1
  19. package/build/async-require/fetchAsync.js +6 -3
  20. package/build/async-require/fetchAsync.js.map +1 -1
  21. package/build/async-require/fetchAsync.native.js +13 -6
  22. package/build/async-require/fetchAsync.native.js.map +1 -1
  23. package/build/async-require/fetchThenEval.d.ts +1 -6
  24. package/build/async-require/fetchThenEval.d.ts.map +1 -1
  25. package/build/async-require/fetchThenEval.js +5 -31
  26. package/build/async-require/fetchThenEval.js.map +1 -1
  27. package/build/async-require/fetchThenEval.web.js +6 -2
  28. package/build/async-require/fetchThenEval.web.js.map +1 -1
  29. package/build/async-require/fetchThenEvalJs.d.ts +7 -0
  30. package/build/async-require/fetchThenEvalJs.d.ts.map +1 -0
  31. package/build/async-require/fetchThenEvalJs.js +36 -0
  32. package/build/async-require/fetchThenEvalJs.js.map +1 -0
  33. package/build/async-require/index.js +4 -2
  34. package/build/async-require/index.js.map +1 -1
  35. package/build/async-require/index.native.d.ts +7 -0
  36. package/build/async-require/index.native.d.ts.map +1 -0
  37. package/build/async-require/index.native.js +14 -0
  38. package/build/async-require/index.native.js.map +1 -0
  39. package/build/async-require/loadBundle.js +10 -6
  40. package/build/async-require/loadBundle.js.map +1 -1
  41. package/build/effects.d.ts +0 -1
  42. package/build/effects.js +7 -10
  43. package/build/effects.js.map +1 -1
  44. package/build/error-overlay/Data/LogBoxData.d.ts.map +1 -1
  45. package/build/error-overlay/Data/LogBoxData.js +82 -33
  46. package/build/error-overlay/Data/LogBoxData.js.map +1 -1
  47. package/build/error-overlay/Data/LogBoxLog.js +29 -2
  48. package/build/error-overlay/Data/LogBoxLog.js.map +1 -1
  49. package/build/error-overlay/Data/LogBoxSymbolication.js +12 -4
  50. package/build/error-overlay/Data/LogBoxSymbolication.js.map +1 -1
  51. package/build/error-overlay/Data/LogContext.js +17 -9
  52. package/build/error-overlay/Data/LogContext.js.map +1 -1
  53. package/build/error-overlay/Data/parseLogBoxLog.d.ts.map +1 -1
  54. package/build/error-overlay/Data/parseLogBoxLog.js +20 -11
  55. package/build/error-overlay/Data/parseLogBoxLog.js.map +1 -1
  56. package/build/error-overlay/ErrorOverlay.d.ts.map +1 -1
  57. package/build/error-overlay/ErrorOverlay.js +73 -41
  58. package/build/error-overlay/ErrorOverlay.js.map +1 -1
  59. package/build/error-overlay/LogBox.js +3 -1
  60. package/build/error-overlay/LogBox.js.map +1 -1
  61. package/build/error-overlay/LogBox.web.d.ts.map +1 -1
  62. package/build/error-overlay/LogBox.web.js +4 -3
  63. package/build/error-overlay/LogBox.web.js.map +1 -1
  64. package/build/error-overlay/UI/AnsiHighlight.js +15 -8
  65. package/build/error-overlay/UI/AnsiHighlight.js.map +1 -1
  66. package/build/error-overlay/UI/LogBoxButton.js +35 -8
  67. package/build/error-overlay/UI/LogBoxButton.js.map +1 -1
  68. package/build/error-overlay/UI/LogBoxMessage.js +13 -6
  69. package/build/error-overlay/UI/LogBoxMessage.js.map +1 -1
  70. package/build/error-overlay/UI/LogBoxStyle.js +31 -14
  71. package/build/error-overlay/UI/LogBoxStyle.js.map +1 -1
  72. package/build/error-overlay/UI/constants.js +5 -2
  73. package/build/error-overlay/UI/constants.js.map +1 -1
  74. package/build/error-overlay/formatProjectFilePath.js +7 -2
  75. package/build/error-overlay/formatProjectFilePath.js.map +1 -1
  76. package/build/error-overlay/index.d.ts.map +1 -1
  77. package/build/error-overlay/index.js +19 -9
  78. package/build/error-overlay/index.js.map +1 -1
  79. package/build/error-overlay/modules/ExceptionsManager/index.js +8 -3
  80. package/build/error-overlay/modules/ExceptionsManager/index.js.map +1 -1
  81. package/build/error-overlay/modules/ExceptionsManager/index.native.js +7 -2
  82. package/build/error-overlay/modules/ExceptionsManager/index.native.js.map +1 -1
  83. package/build/error-overlay/modules/NativeLogBox/index.js +10 -5
  84. package/build/error-overlay/modules/NativeLogBox/index.js.map +1 -1
  85. package/build/error-overlay/modules/NativeLogBox/index.native.js +7 -2
  86. package/build/error-overlay/modules/NativeLogBox/index.native.js.map +1 -1
  87. package/build/error-overlay/modules/openFileInEditor/index.js +3 -1
  88. package/build/error-overlay/modules/openFileInEditor/index.js.map +1 -1
  89. package/build/error-overlay/modules/openFileInEditor/index.native.js +7 -2
  90. package/build/error-overlay/modules/openFileInEditor/index.native.js.map +1 -1
  91. package/build/error-overlay/modules/parseErrorStack/index.d.ts.map +1 -1
  92. package/build/error-overlay/modules/parseErrorStack/index.js +10 -7
  93. package/build/error-overlay/modules/parseErrorStack/index.js.map +1 -1
  94. package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js +8 -2
  95. package/build/error-overlay/modules/parseErrorStack/parseHermesStack.js.map +1 -1
  96. package/build/error-overlay/modules/stringifySafe/index.js +6 -2
  97. package/build/error-overlay/modules/stringifySafe/index.js.map +1 -1
  98. package/build/error-overlay/modules/symbolicateStackTrace/index.js +3 -1
  99. package/build/error-overlay/modules/symbolicateStackTrace/index.js.map +1 -1
  100. package/build/error-overlay/modules/symbolicateStackTrace/index.native.js +7 -2
  101. package/build/error-overlay/modules/symbolicateStackTrace/index.native.js.map +1 -1
  102. package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.d.ts.map +1 -1
  103. package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js +52 -22
  104. package/build/error-overlay/overlay/LogBoxInspectorCodeFrame.js.map +1 -1
  105. package/build/error-overlay/overlay/LogBoxInspectorFooter.js +48 -18
  106. package/build/error-overlay/overlay/LogBoxInspectorFooter.js.map +1 -1
  107. package/build/error-overlay/overlay/LogBoxInspectorHeader.js +53 -23
  108. package/build/error-overlay/overlay/LogBoxInspectorHeader.js.map +1 -1
  109. package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js +43 -13
  110. package/build/error-overlay/overlay/LogBoxInspectorMessageHeader.js.map +1 -1
  111. package/build/error-overlay/overlay/LogBoxInspectorSection.js +39 -9
  112. package/build/error-overlay/overlay/LogBoxInspectorSection.js.map +1 -1
  113. package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js +41 -14
  114. package/build/error-overlay/overlay/LogBoxInspectorSourceMapStatus.js.map +1 -1
  115. package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js +44 -14
  116. package/build/error-overlay/overlay/LogBoxInspectorStackFrame.js.map +1 -1
  117. package/build/error-overlay/overlay/LogBoxInspectorStackFrames.d.ts.map +1 -1
  118. package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js +55 -24
  119. package/build/error-overlay/overlay/LogBoxInspectorStackFrames.js.map +1 -1
  120. package/build/error-overlay/toast/ErrorToast.d.ts.map +1 -1
  121. package/build/error-overlay/toast/ErrorToast.js +48 -21
  122. package/build/error-overlay/toast/ErrorToast.js.map +1 -1
  123. package/build/error-overlay/toast/ErrorToastContainer.js +9 -3
  124. package/build/error-overlay/toast/ErrorToastContainer.js.map +1 -1
  125. package/build/error-overlay/toast/ErrorToastContainer.web.d.ts.map +1 -1
  126. package/build/error-overlay/toast/ErrorToastContainer.web.js +49 -21
  127. package/build/error-overlay/toast/ErrorToastContainer.web.js.map +1 -1
  128. package/build/error-overlay/toast/ErrorToastMessage.js +37 -7
  129. package/build/error-overlay/toast/ErrorToastMessage.js.map +1 -1
  130. package/build/error-overlay/useRejectionHandler.js +16 -9
  131. package/build/error-overlay/useRejectionHandler.js.map +1 -1
  132. package/build/getDevServer.d.ts.map +1 -1
  133. package/build/getDevServer.js +10 -9
  134. package/build/getDevServer.js.map +1 -1
  135. package/build/getDevServer.native.js +7 -2
  136. package/build/getDevServer.native.js.map +1 -1
  137. package/build/index.d.ts +7 -0
  138. package/build/index.d.ts.map +1 -1
  139. package/build/index.js +12 -8
  140. package/build/index.js.map +1 -1
  141. package/build/location/Location.js +7 -2
  142. package/build/location/Location.js.map +1 -1
  143. package/build/location/Location.native.js +12 -4
  144. package/build/location/Location.native.js.map +1 -1
  145. package/build/location/install.native.js +16 -11
  146. package/build/location/install.native.js.map +1 -1
  147. package/build/setupHMR.js +28 -26
  148. package/build/setupHMR.js.map +1 -1
  149. package/build/symbolicate.js +25 -4
  150. package/build/symbolicate.js.map +1 -1
  151. package/package.json +5 -2
  152. package/src/HMRClient.native.ts +3 -0
  153. package/src/HMRClient.ts +316 -0
  154. package/src/LoadingView.native.ts +3 -0
  155. package/src/LoadingView.ts +24 -0
  156. package/src/__mocks__/LoadingView.ts +4 -0
  157. package/src/async-require/buildAsyncRequire.ts +34 -0
  158. package/src/async-require/buildUrlForBundle.native.ts +28 -0
  159. package/src/async-require/buildUrlForBundle.ts +18 -0
  160. package/src/async-require/fetchAsync.native.ts +72 -0
  161. package/src/async-require/fetchAsync.ts +19 -0
  162. package/src/async-require/fetchThenEval.ts +1 -0
  163. package/src/async-require/fetchThenEval.web.ts +70 -0
  164. package/src/async-require/fetchThenEvalJs.ts +39 -0
  165. package/src/async-require/index.native.ts +15 -0
  166. package/src/async-require/index.ts +10 -0
  167. package/src/async-require/loadBundle.ts +46 -0
  168. package/src/effects.native.ts +0 -0
  169. package/src/effects.ts +11 -0
  170. package/src/error-overlay/Data/LogBoxData.tsx +438 -0
  171. package/src/error-overlay/Data/LogBoxLog.ts +221 -0
  172. package/src/error-overlay/Data/LogBoxSymbolication.tsx +64 -0
  173. package/src/error-overlay/Data/LogContext.tsx +41 -0
  174. package/src/error-overlay/Data/parseLogBoxLog.tsx +342 -0
  175. package/src/error-overlay/ErrorOverlay.tsx +191 -0
  176. package/src/error-overlay/LogBox.ts +51 -0
  177. package/src/error-overlay/LogBox.web.ts +174 -0
  178. package/src/error-overlay/UI/AnsiHighlight.tsx +96 -0
  179. package/src/error-overlay/UI/LogBoxButton.tsx +63 -0
  180. package/src/error-overlay/UI/LogBoxMessage.tsx +73 -0
  181. package/src/error-overlay/UI/LogBoxStyle.ts +64 -0
  182. package/src/error-overlay/UI/constants.ts +7 -0
  183. package/src/error-overlay/formatProjectFilePath.ts +38 -0
  184. package/src/error-overlay/index.tsx +34 -0
  185. package/src/error-overlay/modules/ExceptionsManager/index.native.ts +4 -0
  186. package/src/error-overlay/modules/ExceptionsManager/index.ts +82 -0
  187. package/src/error-overlay/modules/NativeLogBox/index.native.ts +3 -0
  188. package/src/error-overlay/modules/NativeLogBox/index.tsx +27 -0
  189. package/src/error-overlay/modules/openFileInEditor/index.native.ts +3 -0
  190. package/src/error-overlay/modules/openFileInEditor/index.ts +16 -0
  191. package/src/error-overlay/modules/parseErrorStack/index.ts +26 -0
  192. package/src/error-overlay/modules/parseErrorStack/parseHermesStack.ts +3 -0
  193. package/src/error-overlay/modules/stringifySafe/index.ts +115 -0
  194. package/src/error-overlay/modules/symbolicateStackTrace/index.native.ts +3 -0
  195. package/src/error-overlay/modules/symbolicateStackTrace/index.ts +39 -0
  196. package/src/error-overlay/overlay/LogBoxInspectorCodeFrame.tsx +102 -0
  197. package/src/error-overlay/overlay/LogBoxInspectorFooter.tsx +111 -0
  198. package/src/error-overlay/overlay/LogBoxInspectorHeader.tsx +167 -0
  199. package/src/error-overlay/overlay/LogBoxInspectorMessageHeader.tsx +116 -0
  200. package/src/error-overlay/overlay/LogBoxInspectorSection.tsx +52 -0
  201. package/src/error-overlay/overlay/LogBoxInspectorSourceMapStatus.tsx +125 -0
  202. package/src/error-overlay/overlay/LogBoxInspectorStackFrame.tsx +89 -0
  203. package/src/error-overlay/overlay/LogBoxInspectorStackFrames.tsx +201 -0
  204. package/src/error-overlay/toast/ErrorToast.tsx +167 -0
  205. package/src/error-overlay/toast/ErrorToastContainer.tsx +9 -0
  206. package/src/error-overlay/toast/ErrorToastContainer.web.tsx +92 -0
  207. package/src/error-overlay/toast/ErrorToastMessage.tsx +28 -0
  208. package/src/error-overlay/useRejectionHandler.ts +61 -0
  209. package/src/getDevServer.native.ts +3 -0
  210. package/src/getDevServer.ts +34 -0
  211. package/src/index.ts +12 -0
  212. package/src/location/Location.native.ts +201 -0
  213. package/src/location/Location.ts +3 -0
  214. package/src/location/install.native.ts +90 -0
  215. package/src/location/install.ts +0 -0
  216. package/src/messageSocket.ts +25 -0
  217. package/src/setupFastRefresh.ts +30 -0
  218. package/src/setupHMR.ts +28 -0
  219. package/src/symbolicate.ts +6 -0
@@ -1,22 +1,32 @@
1
- import React from 'react';
2
- import { Platform } from 'react-native';
3
- import ErrorToastContainer from './toast/ErrorToastContainer';
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.withErrorOverlay = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ // TODO: This will break tree shaking due to how we transpile this package.
9
+ const react_native_1 = require("react-native");
10
+ const ErrorToastContainer_1 = __importDefault(require("./toast/ErrorToastContainer"));
4
11
  if (!global.setImmediate) {
5
12
  global.setImmediate = function (fn) {
6
13
  return setTimeout(fn, 0);
7
14
  };
8
15
  }
9
- if (process.env.NODE_ENV === 'development' && Platform.OS === 'web') {
10
- // Stack traces are big with React Navigation
11
- require('./LogBox').default.install();
16
+ if (process.env.NODE_ENV === 'development') {
17
+ if (react_native_1.Platform.OS === 'web') {
18
+ // Stack traces are big with React Navigation
19
+ require('./LogBox').default.install();
20
+ }
12
21
  }
13
- export function withErrorOverlay(Comp) {
22
+ function withErrorOverlay(Comp) {
14
23
  if (process.env.NODE_ENV === 'production') {
15
24
  return Comp;
16
25
  }
17
26
  return function ErrorOverlay(props) {
18
- return (React.createElement(ErrorToastContainer, null,
19
- React.createElement(Comp, { ...props })));
27
+ return (react_1.default.createElement(ErrorToastContainer_1.default, null,
28
+ react_1.default.createElement(Comp, { ...props })));
20
29
  };
21
30
  }
31
+ exports.withErrorOverlay = withErrorOverlay;
22
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error-overlay/index.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,2EAA2E;AAC3E,+CAAwC;AAExC,sFAA8D;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,EAAE;IAC1C,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;QACzB,6CAA6C;QAE7C,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;KACvC;CACF;AAED,SAAgB,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,8BAAC,6BAAmB;YAClB,8BAAC,IAAI,OAAK,KAAK,GAAI,CACC,CACvB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAXD,4CAWC","sourcesContent":["import React from 'react';\n// TODO: This will break tree shaking due to how we transpile this package.\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') {\n if (Platform.OS === 'web') {\n // Stack traces are big with React Navigation\n\n require('./LogBox').default.install();\n }\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,3 +1,4 @@
1
+ "use strict";
1
2
  /**
2
3
  * Copyright (c) 650 Industries.
3
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -5,7 +6,11 @@
5
6
  * This source code is licensed under the MIT license found in the
6
7
  * LICENSE file in the root directory of this source tree.
7
8
  */
8
- import parseErrorStack from '../parseErrorStack';
9
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ const parseErrorStack_1 = __importDefault(require("../parseErrorStack"));
9
14
  class SyntheticError extends Error {
10
15
  name = '';
11
16
  }
@@ -14,7 +19,7 @@ class SyntheticError extends Error {
14
19
  */
15
20
  let exceptionID = 0;
16
21
  function parseException(e, isFatal) {
17
- const stack = parseErrorStack(e?.stack);
22
+ const stack = (0, parseErrorStack_1.default)(e?.stack);
18
23
  const currentExceptionID = ++exceptionID;
19
24
  const originalMessage = e.message || '';
20
25
  let message = originalMessage;
@@ -66,5 +71,5 @@ const ErrorUtils = {
66
71
  handleException,
67
72
  SyntheticError,
68
73
  };
69
- export default ErrorUtils;
74
+ exports.default = ErrorUtils;
70
75
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"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AC,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
+ {"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,MAAM,eAAe,GAAG,CAA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ACJ,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,4 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
1
6
  // @ts-expect-error
2
- import ExceptionsManager from 'react-native/Library/Core/ExceptionsManager';
3
- export default ExceptionsManager;
7
+ const ExceptionsManager_1 = __importDefault(require("react-native/Library/Core/ExceptionsManager"));
8
+ exports.default = ExceptionsManager_1.default;
4
9
  //# 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":"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
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/ExceptionsManager/index.native.ts"],"names":[],"mappings":";;;;;AAAA,mBAAmB;AACnB,oGAA4E;AAE5E,kBAAe,2BAAiB,CAAC","sourcesContent":["// @ts-expect-error\nimport ExceptionsManager from 'react-native/Library/Core/ExceptionsManager';\n\nexport default ExceptionsManager;\n"]}
@@ -1,7 +1,12 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom/client';
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const client_1 = __importDefault(require("react-dom/client"));
3
8
  let currentRoot = null;
4
- export default {
9
+ exports.default = {
5
10
  show() {
6
11
  if (currentRoot) {
7
12
  return;
@@ -11,8 +16,8 @@ export default {
11
16
  const div = document.createElement('div');
12
17
  div.id = 'error-overlay';
13
18
  document.body.appendChild(div);
14
- currentRoot = ReactDOM.createRoot(div);
15
- currentRoot.render(React.createElement(ErrorOverlay, null));
19
+ currentRoot = client_1.default.createRoot(div);
20
+ currentRoot.render(react_1.default.createElement(ErrorOverlay, null));
16
21
  },
17
22
  hide() {
18
23
  // Remove div with ID `error-overlay`
@@ -1 +1 @@
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
+ {"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,3 +1,8 @@
1
- import NativeLogBox from 'react-native/Libraries/NativeModules/specs/NativeLogBox';
2
- export default NativeLogBox;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const NativeLogBox_1 = __importDefault(require("react-native/Libraries/NativeModules/specs/NativeLogBox"));
7
+ exports.default = NativeLogBox_1.default;
3
8
  //# 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":"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
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/NativeLogBox/index.native.ts"],"names":[],"mappings":";;;;;AAAA,2GAAmF;AAEnF,kBAAe,sBAAY,CAAC","sourcesContent":["import NativeLogBox from 'react-native/Libraries/NativeModules/specs/NativeLogBox';\n\nexport default NativeLogBox;\n"]}
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
1
3
  function openFileInEditor(file, lineNumber) {
2
4
  if (process.env.NODE_ENV !== 'production') {
3
5
  // TODO: This is not a great URL since it now blocks users from accessing the `/open-stack-frame` url in their router
@@ -9,5 +11,5 @@ function openFileInEditor(file, lineNumber) {
9
11
  });
10
12
  }
11
13
  }
12
- export default openFileInEditor;
14
+ exports.default = openFileInEditor;
13
15
  //# sourceMappingURL=index.js.map
@@ -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;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
+ {"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,3 +1,8 @@
1
- import openFileInEditor from 'react-native/Libraries/Core/Devtools/openFileInEditor';
2
- export default openFileInEditor;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const openFileInEditor_1 = __importDefault(require("react-native/Libraries/Core/Devtools/openFileInEditor"));
7
+ exports.default = openFileInEditor_1.default;
3
8
  //# 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":"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
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.native.ts"],"names":[],"mappings":";;;;;AAAA,6GAAqF;AAErF,kBAAe,0BAAgB,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,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,EAAE,CAoBhF;AAED,eAAe,eAAe,CAAC"}
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,CAqBhF;AAED,eAAe,eAAe,CAAC"}
@@ -1,4 +1,6 @@
1
- import { parse } from 'stacktrace-parser';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const stacktrace_parser_1 = require("stacktrace-parser");
2
4
  function parseErrorStack(stack) {
3
5
  if (stack == null) {
4
6
  return [];
@@ -6,11 +8,12 @@ function parseErrorStack(stack) {
6
8
  if (Array.isArray(stack)) {
7
9
  return stack;
8
10
  }
9
- // Native support for parsing for non-standard Hermes stack traces.
10
- if (global.HermesInternal) {
11
- return require('./parseHermesStack').parseErrorStack(stack);
12
- }
13
- return parse(stack).map((frame) => {
11
+ // This file seems to be web-only, so we can remove this.
12
+ // // Native support for parsing for non-standard Hermes stack traces.
13
+ // if (global.HermesInternal) {
14
+ // return require('./parseHermesStack').parseErrorStack(stack);
15
+ // }
16
+ return (0, stacktrace_parser_1.parse)(stack).map((frame) => {
14
17
  // frame.file will mostly look like `http://localhost:8081/index.bundle?platform=web&dev=true&hot=false`
15
18
  return {
16
19
  ...frame,
@@ -18,5 +21,5 @@ function parseErrorStack(stack) {
18
21
  };
19
22
  });
20
23
  }
21
- export default parseErrorStack;
24
+ exports.default = parseErrorStack;
22
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAc,MAAM,mBAAmB,CAAC;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,mEAAmE;IACnE,IAAI,MAAM,CAAC,cAAc,EAAE;QACzB,OAAO,OAAO,CAAC,oBAAoB,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KAC7D;IAED,OAAO,KAAK,CAAC,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,eAAe,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 // 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"]}
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"]}
@@ -1,3 +1,9 @@
1
- import parseErrorStack from 'react-native/Libraries/Core/Devtools/parseErrorStack';
2
- export { parseErrorStack };
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.parseErrorStack = void 0;
7
+ const parseErrorStack_1 = __importDefault(require("react-native/Libraries/Core/Devtools/parseErrorStack"));
8
+ exports.parseErrorStack = parseErrorStack_1.default;
3
9
  //# sourceMappingURL=parseHermesStack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseHermesStack.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/parseHermesStack.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,sDAAsD,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,CAAC","sourcesContent":["import parseErrorStack from 'react-native/Libraries/Core/Devtools/parseErrorStack';\n\nexport { parseErrorStack };\n"]}
1
+ {"version":3,"file":"parseHermesStack.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/parseErrorStack/parseHermesStack.ts"],"names":[],"mappings":";;;;;;AAAA,2GAAmF;AAE1E,0BAFF,yBAAe,CAEE","sourcesContent":["import parseErrorStack from 'react-native/Libraries/Core/Devtools/parseErrorStack';\n\nexport { parseErrorStack };\n"]}
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /**
2
3
  * Copyright (c) 650 Industries.
3
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -5,11 +6,13 @@
5
6
  * This source code is licensed under the MIT license found in the
6
7
  * LICENSE file in the root directory of this source tree.
7
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.createStringifySafeWithLimits = void 0;
8
11
  /**
9
12
  * Tries to stringify with JSON.stringify and toString, but catches exceptions
10
13
  * (e.g. from circular objects) and always returns a string and never throws.
11
14
  */
12
- export function createStringifySafeWithLimits(limits) {
15
+ function createStringifySafeWithLimits(limits) {
13
16
  const { maxDepth = Number.POSITIVE_INFINITY, maxStringLimit = Number.POSITIVE_INFINITY, maxArrayLimit = Number.POSITIVE_INFINITY, maxObjectKeysLimit = Number.POSITIVE_INFINITY, } = limits;
14
17
  const stack = [];
15
18
  function replacer(_key, value) {
@@ -100,11 +103,12 @@ export function createStringifySafeWithLimits(limits) {
100
103
  return '["' + typeof arg + '" failed to stringify]';
101
104
  };
102
105
  }
106
+ exports.createStringifySafeWithLimits = createStringifySafeWithLimits;
103
107
  const stringifySafe = createStringifySafeWithLimits({
104
108
  maxDepth: 10,
105
109
  maxStringLimit: 100,
106
110
  maxArrayLimit: 50,
107
111
  maxObjectKeysLimit: 50,
108
112
  });
109
- export default stringifySafe;
113
+ exports.default = stringifySafe;
110
114
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/stringifySafe/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAAC,MAK7C;IACC,MAAM,EACJ,QAAQ,GAAG,MAAM,CAAC,iBAAiB,EACnC,cAAc,GAAG,MAAM,CAAC,i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AAS,EAAE;oBACrB,OAAO,IAAI,GAAG,OAAO,GAAG,GAAG,wBAAwB,CAAC;iBACrD;gBACD,OAAO,GAAG,CAAC;aACZ;YAAC,MAAM;gBACN,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,UAAU,EAAE;oBACtC,IAAI;wBACF,mFAAmF;wBACnF,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;qBACvB;oBAAC,MAAM,GAAE;iBACX;aACF;SACF;QACD,OAAO,IAAI,GAAG,OAAO,GAAG,GAAG,wBAAwB,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,aAAa,GAAG,6BAA6B,CAAC;IAClD,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,GAAG;IACnB,aAAa,EAAE,EAAE;IACjB,kBAAkB,EAAE,EAAE;CACvB,CAAC,CAAC;AAEH,eAAe,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"]}
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,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GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;gBAC1C,IAAI,GAAG,KAAK,SAAS,EAAE;oBACrB,OAAO,IAAI,GAAG,OAAO,GAAG,GAAG,wBAAwB,CAAC;iBACrD;gBACD,OAAO,GAAG,CAAC;aACZ;YAAC,MAAM;gBACN,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,UAAU,EAAE;oBACtC,IAAI;wBACF,mFAAmF;wBACnF,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;qBACvB;oBAAC,MAAM,GAAE;iBACX;aACF;SACF;QACD,OAAO,IAAI,GAAG,OAAO,GAAG,GAAG,wBAAwB,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC;AA7FD,sEA6FC;AAED,MAAM,aAAa,GAAG,6BAA6B,CAAC;IAClD,QAAQ,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"]}
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /**
2
3
  * Copyright (c) 650 Industries.
3
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -5,6 +6,7 @@
5
6
  * This source code is licensed under the MIT license found in the
6
7
  * LICENSE file in the root directory of this source tree.
7
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
8
10
  async function symbolicateStackTrace(stack) {
9
11
  const baseUrl = typeof window === 'undefined'
10
12
  ? process.env.EXPO_DEV_SERVER_ORIGIN
@@ -15,5 +17,5 @@ async function symbolicateStackTrace(stack) {
15
17
  });
16
18
  return await response.json();
17
19
  }
18
- export default symbolicateStackTrace;
20
+ exports.default = symbolicateStackTrace;
19
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/symbolicateStackTrace/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmBH,KAAK,UAAU,qBAAqB,CAAC,KAAmB;IACtD,MAAM,OAAO,GACX,OAAO,MAAM,KAAK,WAAW;QAC3B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB;QACpC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAE7D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,GAAG,cAAc,EAAE;QACrD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC;KAChC,CAAC,CAAC;IACH,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,eAAe,qBAAqB,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 { StackFrame } from 'stacktrace-parser';\n\nexport type CodeFrame = {\n content: string;\n location?: {\n row: number;\n column: number;\n [key: string]: any;\n };\n fileName: string;\n};\n\nexport type SymbolicatedStackTrace = {\n stack: StackFrame[];\n codeFrame?: CodeFrame;\n};\n\nasync function symbolicateStackTrace(stack: StackFrame[]): Promise<SymbolicatedStackTrace> {\n const baseUrl =\n typeof window === 'undefined'\n ? process.env.EXPO_DEV_SERVER_ORIGIN\n : window.location.protocol + '//' + window.location.host;\n\n const response = await fetch(baseUrl + '/symbolicate', {\n method: 'POST',\n body: JSON.stringify({ stack }),\n });\n return await response.json();\n}\n\nexport default symbolicateStackTrace;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/symbolicateStackTrace/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAmBH,KAAK,UAAU,qBAAqB,CAAC,KAAmB;IACtD,MAAM,OAAO,GACX,OAAO,MAAM,KAAK,WAAW;QAC3B,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB;QACpC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAE7D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,GAAG,cAAc,EAAE;QACrD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC;KAChC,CAAC,CAAC;IACH,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC;AAED,kBAAe,qBAAqB,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 { StackFrame } from 'stacktrace-parser';\n\nexport type CodeFrame = {\n content: string;\n location?: {\n row: number;\n column: number;\n [key: string]: any;\n };\n fileName: string;\n};\n\nexport type SymbolicatedStackTrace = {\n stack: StackFrame[];\n codeFrame?: CodeFrame;\n};\n\nasync function symbolicateStackTrace(stack: StackFrame[]): Promise<SymbolicatedStackTrace> {\n const baseUrl =\n typeof window === 'undefined'\n ? process.env.EXPO_DEV_SERVER_ORIGIN\n : window.location.protocol + '//' + window.location.host;\n\n const response = await fetch(baseUrl + '/symbolicate', {\n method: 'POST',\n body: JSON.stringify({ stack }),\n });\n return await response.json();\n}\n\nexport default symbolicateStackTrace;\n"]}
@@ -1,3 +1,8 @@
1
- import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace';
2
- export default symbolicateStackTrace;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const symbolicateStackTrace_1 = __importDefault(require("react-native/Libraries/Core/Devtools/symbolicateStackTrace"));
7
+ exports.default = symbolicateStackTrace_1.default;
3
8
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/symbolicateStackTrace/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,4DAA4D,CAAC;AAE/F,eAAe,qBAAqB,CAAC","sourcesContent":["import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace';\n\nexport default symbolicateStackTrace;\n"]}
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/symbolicateStackTrace/index.native.ts"],"names":[],"mappings":";;;;;AAAA,uHAA+F;AAE/F,kBAAe,+BAAqB,CAAC","sourcesContent":["import symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace';\n\nexport default symbolicateStackTrace;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxInspectorCodeFrame.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorCodeFrame.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAWxD,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,sBA2ChF"}
1
+ {"version":3,"file":"LogBoxInspectorCodeFrame.d.ts","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorCodeFrame.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAUxD,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,sBA2ChF"}
@@ -1,3 +1,32 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.LogBoxInspectorCodeFrame = void 0;
1
30
  /**
2
31
  * Copyright (c) 650 Industries.
3
32
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -5,21 +34,21 @@
5
34
  * This source code is licensed under the MIT license found in the
6
35
  * LICENSE file in the root directory of this source tree.
7
36
  */
8
- import React from 'react';
9
- import { ScrollView, StyleSheet, Text, View } from 'react-native';
10
- import { Ansi } from '../UI/AnsiHighlight';
11
- import { LogBoxButton } from '../UI/LogBoxButton';
12
- import * as LogBoxStyle from '../UI/LogBoxStyle';
13
- import { CODE_FONT } from '../UI/constants';
14
- import { formatProjectFilePath } from '../formatProjectFilePath';
15
- import openFileInEditor from '../modules/openFileInEditor';
16
- import { LogBoxInspectorSection } from './LogBoxInspectorSection';
17
- export function LogBoxInspectorCodeFrame({ codeFrame }) {
37
+ const react_1 = __importDefault(require("react"));
38
+ const react_native_1 = require("react-native");
39
+ const LogBoxInspectorSection_1 = require("./LogBoxInspectorSection");
40
+ const AnsiHighlight_1 = require("../UI/AnsiHighlight");
41
+ const LogBoxButton_1 = require("../UI/LogBoxButton");
42
+ const LogBoxStyle = __importStar(require("../UI/LogBoxStyle"));
43
+ const constants_1 = require("../UI/constants");
44
+ const formatProjectFilePath_1 = require("../formatProjectFilePath");
45
+ const openFileInEditor_1 = __importDefault(require("../modules/openFileInEditor"));
46
+ function LogBoxInspectorCodeFrame({ codeFrame }) {
18
47
  if (codeFrame == null) {
19
48
  return null;
20
49
  }
21
50
  function getFileName() {
22
- return formatProjectFilePath(process.env.EXPO_PROJECT_ROOT, codeFrame?.fileName);
51
+ return (0, formatProjectFilePath_1.formatProjectFilePath)(process.env.EXPO_PROJECT_ROOT, codeFrame?.fileName);
23
52
  }
24
53
  function getLocation() {
25
54
  const location = codeFrame?.location;
@@ -28,22 +57,23 @@ export function LogBoxInspectorCodeFrame({ codeFrame }) {
28
57
  }
29
58
  return null;
30
59
  }
31
- return (React.createElement(LogBoxInspectorSection, { heading: "Source" },
32
- React.createElement(View, { style: styles.box },
33
- React.createElement(View, { style: styles.frame },
34
- React.createElement(ScrollView, { horizontal: true },
35
- React.createElement(Ansi, { style: styles.content, text: codeFrame.content }))),
36
- React.createElement(LogBoxButton, { backgroundColor: {
60
+ return (react_1.default.createElement(LogBoxInspectorSection_1.LogBoxInspectorSection, { heading: "Source" },
61
+ react_1.default.createElement(react_native_1.View, { style: styles.box },
62
+ react_1.default.createElement(react_native_1.View, { style: styles.frame },
63
+ react_1.default.createElement(react_native_1.ScrollView, { horizontal: true },
64
+ react_1.default.createElement(AnsiHighlight_1.Ansi, { style: styles.content, text: codeFrame.content }))),
65
+ react_1.default.createElement(LogBoxButton_1.LogBoxButton, { backgroundColor: {
37
66
  default: 'transparent',
38
67
  pressed: LogBoxStyle.getBackgroundDarkColor(1),
39
68
  }, style: styles.button, onPress: () => {
40
- openFileInEditor(codeFrame.fileName, codeFrame.location?.row ?? 0);
69
+ (0, openFileInEditor_1.default)(codeFrame.fileName, codeFrame.location?.row ?? 0);
41
70
  } },
42
- React.createElement(Text, { style: styles.fileText },
71
+ react_1.default.createElement(react_native_1.Text, { style: styles.fileText },
43
72
  getFileName(),
44
73
  getLocation())))));
45
74
  }
46
- const styles = StyleSheet.create({
75
+ exports.LogBoxInspectorCodeFrame = LogBoxInspectorCodeFrame;
76
+ const styles = react_native_1.StyleSheet.create({
47
77
  box: {
48
78
  backgroundColor: LogBoxStyle.getBackgroundColor(),
49
79
  borderWidth: 1,
@@ -67,7 +97,7 @@ const styles = StyleSheet.create({
67
97
  fontSize: 12,
68
98
  includeFontPadding: false,
69
99
  lineHeight: 20,
70
- fontFamily: CODE_FONT,
100
+ fontFamily: constants_1.CODE_FONT,
71
101
  },
72
102
  fileText: {
73
103
  userSelect: 'none',
@@ -76,7 +106,7 @@ const styles = StyleSheet.create({
76
106
  flex: 1,
77
107
  fontSize: 16,
78
108
  includeFontPadding: false,
79
- fontFamily: CODE_FONT,
109
+ fontFamily: constants_1.CODE_FONT,
80
110
  },
81
111
  });
82
112
  //# sourceMappingURL=LogBoxInspectorCodeFrame.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LogBoxInspectorCodeFrame.js","sourceRoot":"","sources":["../../../src/error-overlay/overlay/LogBoxInspectorCodeFrame.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGlE,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,MAAM,UAAU,wBAAwB,CAAC,EAAE,SAAS,EAA6B;IAC/E,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,OAAO,IAAI,CAAC;KACb;IAED,SAAS,WAAW;QAClB,OAAO,qBAAqB,CAAC,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,oBAAC,sBAAsB,IAAC,OAAO,EAAC,QAAQ;QACtC,oBA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AAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,SAAS;KACtB;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QACpC,SAAS,EAAE,QAAQ;QACnB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,SAAS;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 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';\nimport { LogBoxInspectorSection } from './LogBoxInspectorSection';\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"]}
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,EAA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AChB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,EAAE;QACX,iBAAiB,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;QAChD,iBAAiB,EAAE,CAAC;KACrB;IACD,MAAM,EAAE;QACN,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,EAAE;KAClB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;QAClC,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,KAAK;QACzB,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,qBAAS;KACtB;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM;QAClB,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC;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"]}