expo 44.0.6 → 45.0.0-beta.3

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 (75) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/android/.gitignore +261 -0
  3. package/android/build.gradle +58 -17
  4. package/android/proguard-rules.pro +4 -1
  5. package/android/src/legacyReactNativeHostWrapper/expo/modules/ReactNativeHostWrapper.kt +9 -0
  6. package/android/src/main/java/expo/modules/ReactActivityDelegateWrapper.kt +65 -19
  7. package/android/src/main/java/expo/modules/{ReactNativeHostWrapper.kt → ReactNativeHostWrapperBase.kt} +10 -6
  8. package/android/src/reactNativeHostWrapper/expo/modules/ReactNativeHostWrapper.kt +32 -0
  9. package/android/src/test/AndroidManifest.xml +18 -0
  10. package/bin/cli.js +12 -6
  11. package/build/Expo.d.ts +1 -0
  12. package/build/Expo.d.ts.map +1 -0
  13. package/build/Expo.fx.d.ts +1 -0
  14. package/build/Expo.fx.d.ts.map +1 -0
  15. package/build/Expo.fx.web.d.ts +1 -0
  16. package/build/Expo.fx.web.d.ts.map +1 -0
  17. package/build/environment/DevAppContainer.d.ts +1 -0
  18. package/build/environment/DevAppContainer.d.ts.map +1 -0
  19. package/build/environment/DevLoadingView.d.ts +1 -0
  20. package/build/environment/DevLoadingView.d.ts.map +1 -0
  21. package/build/environment/DevLoadingView.js +8 -10
  22. package/build/environment/DevLoadingView.js.map +1 -1
  23. package/build/environment/getInstallationIdAsync.android.d.ts +1 -0
  24. package/build/environment/getInstallationIdAsync.android.d.ts.map +1 -0
  25. package/build/environment/getInstallationIdAsync.d.ts +1 -0
  26. package/build/environment/getInstallationIdAsync.d.ts.map +1 -0
  27. package/build/environment/getInstallationIdAsync.web.d.ts +1 -0
  28. package/build/environment/getInstallationIdAsync.web.d.ts.map +1 -0
  29. package/build/environment/getInstallationIdAsync.web.js +1 -1
  30. package/build/environment/getInstallationIdAsync.web.js.map +1 -1
  31. package/build/environment/logging.fx.d.ts +1 -0
  32. package/build/environment/logging.fx.d.ts.map +1 -0
  33. package/build/environment/logging.fx.js +6 -13
  34. package/build/environment/logging.fx.js.map +1 -1
  35. package/build/environment/react-native-logs.fx.d.ts +1 -0
  36. package/build/environment/react-native-logs.fx.d.ts.map +1 -0
  37. package/build/environment/react-native-logs.fx.js +1 -1
  38. package/build/environment/react-native-logs.fx.js.map +1 -1
  39. package/build/environment/validate.fx.d.ts +1 -0
  40. package/build/environment/validate.fx.d.ts.map +1 -0
  41. package/build/environment/validate.fx.js +3 -3
  42. package/build/environment/validate.fx.js.map +1 -1
  43. package/build/environment/validatorState.d.ts +1 -0
  44. package/build/environment/validatorState.d.ts.map +1 -0
  45. package/build/launch/RecoveryProps.d.ts +1 -0
  46. package/build/launch/RecoveryProps.d.ts.map +1 -0
  47. package/build/launch/registerRootComponent.d.ts +1 -0
  48. package/build/launch/registerRootComponent.d.ts.map +1 -0
  49. package/build/launch/withExpoRoot.d.ts +1 -0
  50. package/build/launch/withExpoRoot.d.ts.map +1 -0
  51. package/build/launch/withExpoRoot.types.d.ts +1 -0
  52. package/build/launch/withExpoRoot.types.d.ts.map +1 -0
  53. package/build/launch/withExpoRoot.web.d.ts +1 -0
  54. package/build/launch/withExpoRoot.web.d.ts.map +1 -0
  55. package/build/logs/LogSerialization.d.ts +1 -0
  56. package/build/logs/LogSerialization.d.ts.map +1 -0
  57. package/build/logs/LogSerialization.js +1 -1
  58. package/build/logs/LogSerialization.js.map +1 -1
  59. package/build/logs/Logs.d.ts +1 -0
  60. package/build/logs/Logs.d.ts.map +1 -0
  61. package/build/logs/Logs.web.d.ts +1 -0
  62. package/build/logs/Logs.web.d.ts.map +1 -0
  63. package/build/logs/RemoteConsole.d.ts +1 -0
  64. package/build/logs/RemoteConsole.d.ts.map +1 -0
  65. package/build/logs/RemoteLogging.d.ts +1 -0
  66. package/build/logs/RemoteLogging.d.ts.map +1 -0
  67. package/build/logs/format/ReactNodeFormatter.d.ts +1 -0
  68. package/build/logs/format/ReactNodeFormatter.d.ts.map +1 -0
  69. package/build/timer/polyfillNextTick.d.ts +1 -0
  70. package/build/timer/polyfillNextTick.d.ts.map +1 -0
  71. package/bundledNativeModules.json +97 -95
  72. package/ios/EXAppDefinesLoader.m +6 -0
  73. package/package.json +22 -22
  74. package/requiresExtraSetup.json +2 -2
  75. package/scripts/resolveAppEntry.js +38 -0
package/bin/cli.js CHANGED
@@ -1,21 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
- var spawn = require('cross-spawn').spawn;
3
+ const spawn = require('cross-spawn').spawn;
4
+ const { boolish } = require('getenv');
4
5
 
5
6
  run();
6
7
 
7
8
  function run() {
9
+ // Use new beta CLI.
10
+ if (boolish('EXPO_USE_BETA_CLI', false)) {
11
+ return spawn(require.resolve('@expo/cli'), process.argv.slice(2), { stdio: 'inherit' });
12
+ }
13
+
8
14
  spawn('expo-cli', process.argv.slice(2), { stdio: 'inherit' })
9
- .on('exit', function(code) {
15
+ .on('exit', function (code) {
10
16
  process.exit(code);
11
17
  })
12
- .on('error', function() {
18
+ .on('error', function () {
13
19
  console.warn('This command requires Expo CLI.');
14
- var rl = require('readline').createInterface({
20
+ const rl = require('readline').createInterface({
15
21
  input: process.stdin,
16
22
  output: process.stdout,
17
23
  });
18
- rl.question('Do you want to install it globally [Y/n]? ', function(answer) {
24
+ rl.question('Do you want to install it globally [Y/n]? ', function (answer) {
19
25
  rl.close();
20
26
  if (/^n/i.test(answer.trim())) {
21
27
  process.exit(1);
@@ -23,7 +29,7 @@ function run() {
23
29
  console.log("Installing the package 'expo-cli'...");
24
30
  spawn('npm', ['install', '--global', '--loglevel', 'error', 'expo-cli'], {
25
31
  stdio: ['inherit', 'ignore', 'inherit'],
26
- }).on('close', function(code) {
32
+ }).on('close', function (code) {
27
33
  if (code !== 0) {
28
34
  console.error('Installing Expo CLI failed. You can install it manually with:');
29
35
  console.error(' npm install --global expo-cli');
package/build/Expo.d.ts CHANGED
@@ -2,3 +2,4 @@ import './Expo.fx';
2
2
  import * as Logs from './logs/Logs';
3
3
  export { Logs };
4
4
  export { default as registerRootComponent } from './launch/registerRootComponent';
5
+ //# sourceMappingURL=Expo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Expo.d.ts","sourceRoot":"","sources":["../src/Expo.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -2,3 +2,4 @@ import './environment/validate.fx';
2
2
  import './environment/logging.fx';
3
3
  import './environment/react-native-logs.fx';
4
4
  import 'expo-asset';
5
+ //# sourceMappingURL=Expo.fx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Expo.fx.d.ts","sourceRoot":"","sources":["../src/Expo.fx.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAEnC,OAAO,0BAA0B,CAAC;AAClC,OAAO,oCAAoC,CAAC;AAE5C,OAAO,YAAY,CAAC"}
@@ -1 +1,2 @@
1
1
  import './environment/react-native-logs.fx';
2
+ //# sourceMappingURL=Expo.fx.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Expo.fx.web.d.ts","sourceRoot":"","sources":["../src/Expo.fx.web.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC"}
@@ -2,3 +2,4 @@ import * as React from 'react';
2
2
  export default class DevAppContainer extends React.Component {
3
3
  render(): JSX.Element;
4
4
  }
5
+ //# sourceMappingURL=DevAppContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevAppContainer.d.ts","sourceRoot":"","sources":["../../src/environment/DevAppContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,KAAK,CAAC,SAAS;IAC1D,MAAM;CAQP"}
@@ -1 +1,2 @@
1
1
  export default function DevLoadingView(): JSX.Element | null;
2
+ //# sourceMappingURL=DevLoadingView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DevLoadingView.d.ts","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,cAAc,uBAuFrC"}
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState, useRef, useMemo } from 'react';
2
- import { Animated, StyleSheet, Text, NativeModules, NativeEventEmitter, UIManager, View, } from 'react-native';
2
+ import { Animated, StyleSheet, Text, NativeModules, NativeEventEmitter, TurboModuleRegistry, View, } from 'react-native';
3
3
  export default function DevLoadingView() {
4
4
  const [isDevLoading, setIsDevLoading] = useState(false);
5
5
  const [isAnimating, setIsAnimating] = useState(false);
@@ -45,11 +45,11 @@ export default function DevLoadingView() {
45
45
  }
46
46
  });
47
47
  }
48
- emitter.addListener('devLoadingView:showMessage', handleShowMessage);
49
- emitter.addListener('devLoadingView:hide', handleHide);
48
+ const showMessageSubscription = emitter.addListener('devLoadingView:showMessage', handleShowMessage);
49
+ const hideSubscription = emitter.addListener('devLoadingView:hide', handleHide);
50
50
  return function cleanup() {
51
- emitter.removeListener('devLoadingView:showMessage', handleShowMessage);
52
- emitter.removeListener('devLoadingView:hide', handleHide);
51
+ showMessageSubscription.remove();
52
+ hideSubscription.remove();
53
53
  };
54
54
  }, [translateY, emitter]);
55
55
  if (isDevLoading || isAnimating) {
@@ -67,12 +67,10 @@ export default function DevLoadingView() {
67
67
  }
68
68
  /**
69
69
  * This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.
70
- * The following code is lifted from: https://git.io/Jzk4k
71
- *
72
- * TODO: This will need to be updated for Fabric/TurboModules.
73
70
  **/
74
- const RNCSafeAreaProviderConfig = UIManager.getViewManagerConfig('RNCSafeAreaProvider');
75
- const initialWindowMetrics = RNCSafeAreaProviderConfig?.Constants?.initialWindowMetrics;
71
+ const RNCSafeAreaContext = TurboModuleRegistry.get('RNCSafeAreaContext');
72
+ // @ts-ignore: we're not using the spec so the return type of getConstants() is {}
73
+ const initialWindowMetrics = RNCSafeAreaContext?.getConstants()?.initialWindowMetrics;
76
74
  const styles = StyleSheet.create({
77
75
  animatedContainer: {
78
76
  position: 'absolute',
@@ -1 +1 @@
1
- {"version":3,"file":"DevLoadingView.js","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EACL,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,IAAI,GACL,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,OAAO,UAAU,cAAc;IACpC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IACzD,MAAM,OAAO,GAAG,OAAO,CAAqB,GAAG,EAAE;QAC/C,IAAI;YACF,OAAO,IAAI,kBAAkB,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;SAC7D;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CACb,oHAAoH;gBAClH,KAAK,CAAC,OAAO,CAChB,CAAC;SACH;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO;YAAE,OAAO;QAErB,SAAS,iBAAiB,CAAC,EAAE,OAAO,EAAE;YACpC,oEAAoE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AAE,CAAC;QAChB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;KACb;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,uBAAuB;KAC/B;CACF,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState, useRef, useMemo } from 'react';\nimport {\n Animated,\n StyleSheet,\n Text,\n NativeModules,\n NativeEventEmitter,\n UIManager,\n View,\n} from 'react-native';\n\nexport default function DevLoadingView() {\n const [isDevLoading, setIsDevLoading] = useState(false);\n const [isAnimating, setIsAnimating] = useState(false);\n const translateY = useRef(new Animated.Value(0)).current;\n const emitter = useMemo<NativeEventEmitter>(() => {\n try {\n return new NativeEventEmitter(NativeModules.DevLoadingView);\n } catch (error) {\n throw new Error(\n 'Failed to instantiate native emitter in `DevLoadingView` because the native module `DevLoadingView` is undefined: ' +\n error.message\n );\n }\n }, []);\n\n useEffect(() => {\n if (!emitter) return;\n\n function handleShowMessage({ message }) {\n // \"Refreshing...\" is the standard fast refresh message and it's the\n // only time we want to display this overlay.\n if (message !== 'Refreshing...') {\n return;\n }\n\n // TODO: if we show the refreshing banner and don't get a hide message\n // for 3 seconds, warn the user that it's taking a while and suggest\n // they reload\n\n translateY.setValue(0);\n setIsDevLoading(true);\n }\n\n function handleHide() {\n // TODO: if we showed the 'refreshing' banner less than 250ms ago, delay\n // switching to the 'finished' banner\n\n setIsAnimating(true);\n setIsDevLoading(false);\n Animated.timing(translateY, {\n toValue: 150,\n delay: 1000,\n duration: 350,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) {\n setIsAnimating(false);\n translateY.setValue(0);\n }\n });\n }\n\n emitter.addListener('devLoadingView:showMessage', handleShowMessage);\n emitter.addListener('devLoadingView:hide', handleHide);\n\n return function cleanup() {\n emitter.removeListener('devLoadingView:showMessage', handleShowMessage);\n emitter.removeListener('devLoadingView:hide', handleHide);\n };\n }, [translateY, emitter]);\n\n if (isDevLoading || isAnimating) {\n return (\n <Animated.View\n style={[styles.animatedContainer, { transform: [{ translateY }] }]}\n pointerEvents=\"none\">\n <View style={styles.banner}>\n <View style={styles.contentContainer}>\n <View style={{ flexDirection: 'row' }}>\n <Text style={styles.text}>{isDevLoading ? 'Refreshing...' : 'Refreshed'}</Text>\n </View>\n\n <View style={{ flex: 1 }}>\n <Text style={styles.subtitle}>\n {isDevLoading ? 'Using Fast Refresh' : \"Don't see your changes? Reload the app\"}\n </Text>\n </View>\n </View>\n </View>\n </Animated.View>\n );\n } else {\n return null;\n }\n}\n\n/**\n * This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.\n * The following code is lifted from: https://git.io/Jzk4k\n *\n * TODO: This will need to be updated for Fabric/TurboModules.\n **/\nconst RNCSafeAreaProviderConfig = UIManager.getViewManagerConfig('RNCSafeAreaProvider') as any;\nconst initialWindowMetrics = RNCSafeAreaProviderConfig?.Constants?.initialWindowMetrics as\n | { insets: { bottom: number } }\n | undefined;\n\nconst styles = StyleSheet.create({\n animatedContainer: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: 42, // arbitrary\n },\n banner: {\n flex: 1,\n overflow: 'visible',\n backgroundColor: 'rgba(0,0,0,0.75)',\n paddingBottom: initialWindowMetrics?.insets?.bottom ?? 0,\n },\n contentContainer: {\n flex: 1,\n paddingTop: 10,\n paddingBottom: 5,\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n },\n text: {\n color: '#fff',\n fontSize: 15,\n },\n subtitle: {\n color: 'rgba(255,255,255,0.8)',\n },\n});\n"]}
1
+ {"version":3,"file":"DevLoadingView.js","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EACL,QAAQ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EAAE,MAAM,CAAC,QAAQ,IACzB,YAAY,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,wCAAwC,CAC1E,CACF,CACF,CACF,CACO,CACjB,CAAC;KACH;SAAM;QACL,OAAO,IAAI,CAAC;KACb;AACH,CAAC;AAED;;IAEI;AACJ,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAEzE,kFAAkF;AAClF,MAAM,oBAAoB,GAAG,kBAAkB,EAAE,YAAY,EAAE,EAAE,oBAAoB,CAAC;AAEtF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,iBAAiB,EAAE;QACjB,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,EAAE,EAAE,YAAY;KACzB;IAED,MAAM,EAAE;QACN,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,SAAS;QACnB,eAAe,EAAE,kBAAkB;QACnC,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;KACzD;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;KACb;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,uBAAuB;KAC/B;CACF,CAAC,CAAC","sourcesContent":["import React, { useEffect, useState, useRef, useMemo } from 'react';\nimport {\n Animated,\n StyleSheet,\n Text,\n NativeModules,\n NativeEventEmitter,\n TurboModuleRegistry,\n View,\n} from 'react-native';\n\nexport default function DevLoadingView() {\n const [isDevLoading, setIsDevLoading] = useState(false);\n const [isAnimating, setIsAnimating] = useState(false);\n const translateY = useRef(new Animated.Value(0)).current;\n const emitter = useMemo<NativeEventEmitter>(() => {\n try {\n return new NativeEventEmitter(NativeModules.DevLoadingView);\n } catch (error) {\n throw new Error(\n 'Failed to instantiate native emitter in `DevLoadingView` because the native module `DevLoadingView` is undefined: ' +\n error.message\n );\n }\n }, []);\n\n useEffect(() => {\n if (!emitter) return;\n\n function handleShowMessage({ message }) {\n // \"Refreshing...\" is the standard fast refresh message and it's the\n // only time we want to display this overlay.\n if (message !== 'Refreshing...') {\n return;\n }\n\n // TODO: if we show the refreshing banner and don't get a hide message\n // for 3 seconds, warn the user that it's taking a while and suggest\n // they reload\n\n translateY.setValue(0);\n setIsDevLoading(true);\n }\n\n function handleHide() {\n // TODO: if we showed the 'refreshing' banner less than 250ms ago, delay\n // switching to the 'finished' banner\n\n setIsAnimating(true);\n setIsDevLoading(false);\n Animated.timing(translateY, {\n toValue: 150,\n delay: 1000,\n duration: 350,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) {\n setIsAnimating(false);\n translateY.setValue(0);\n }\n });\n }\n\n const showMessageSubscription = emitter.addListener(\n 'devLoadingView:showMessage',\n handleShowMessage\n );\n const hideSubscription = emitter.addListener('devLoadingView:hide', handleHide);\n\n return function cleanup() {\n showMessageSubscription.remove();\n hideSubscription.remove();\n };\n }, [translateY, emitter]);\n\n if (isDevLoading || isAnimating) {\n return (\n <Animated.View\n style={[styles.animatedContainer, { transform: [{ translateY }] }]}\n pointerEvents=\"none\">\n <View style={styles.banner}>\n <View style={styles.contentContainer}>\n <View style={{ flexDirection: 'row' }}>\n <Text style={styles.text}>{isDevLoading ? 'Refreshing...' : 'Refreshed'}</Text>\n </View>\n\n <View style={{ flex: 1 }}>\n <Text style={styles.subtitle}>\n {isDevLoading ? 'Using Fast Refresh' : \"Don't see your changes? Reload the app\"}\n </Text>\n </View>\n </View>\n </View>\n </Animated.View>\n );\n } else {\n return null;\n }\n}\n\n/**\n * This is a hack to get the safe area insets without explicitly depending on react-native-safe-area-context.\n **/\nconst RNCSafeAreaContext = TurboModuleRegistry.get('RNCSafeAreaContext');\n\n// @ts-ignore: we're not using the spec so the return type of getConstants() is {}\nconst initialWindowMetrics = RNCSafeAreaContext?.getConstants()?.initialWindowMetrics;\n\nconst styles = StyleSheet.create({\n animatedContainer: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: 42, // arbitrary\n },\n\n banner: {\n flex: 1,\n overflow: 'visible',\n backgroundColor: 'rgba(0,0,0,0.75)',\n paddingBottom: initialWindowMetrics?.insets?.bottom ?? 0,\n },\n contentContainer: {\n flex: 1,\n paddingTop: 10,\n paddingBottom: 5,\n alignItems: 'center',\n justifyContent: 'center',\n textAlign: 'center',\n },\n text: {\n color: '#fff',\n fontSize: 15,\n },\n subtitle: {\n color: 'rgba(255,255,255,0.8)',\n },\n});\n"]}
@@ -1 +1,2 @@
1
1
  export default function getInstallationIdAsync(): string;
2
+ //# sourceMappingURL=getInstallationIdAsync.android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInstallationIdAsync.android.d.ts","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.android.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,sBAAsB,WAE7C"}
@@ -1 +1,2 @@
1
1
  export default function getInstallationIdAsync(): Promise<string>;
2
+ //# sourceMappingURL=getInstallationIdAsync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInstallationIdAsync.d.ts","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.ts"],"names":[],"mappings":"AAMA,wBAA8B,sBAAsB,oBAmBnD"}
@@ -1 +1,2 @@
1
1
  export default function getInstallationIdAsync(): Promise<string>;
2
+ //# sourceMappingURL=getInstallationIdAsync.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInstallationIdAsync.web.d.ts","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.web.ts"],"names":[],"mappings":"AAMA,wBAA8B,sBAAsB,oBA2BnD"}
@@ -13,7 +13,7 @@ export default async function getInstallationIdAsync() {
13
13
  return installationId;
14
14
  }
15
15
  }
16
- catch (error) {
16
+ catch {
17
17
  // If we weren't able to fetch one (for whatever reason)
18
18
  // let's create a new one.
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getInstallationIdAsync.web.js","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAE7C,IAAI,cAAc,GAAkB,IAAI,CAAC;AAEzC,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB;IAClD,uBAAuB;IACvB,IAAI,cAAc,EAAE;QAClB,OAAO,cAAc,CAAC;KACvB;IAED,IAAI;QACF,gDAAgD;QAChD,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAC3D,IAAI,cAAc,EAAE;YAClB,OAAO,cAAc,CAAC;SACvB;KACF;IAAC,OAAO,KAAK,EAAE;QACd,wDAAwD;QACxD,0BAA0B;KAC3B;IAED,8CAA8C;IAC9C,cAAc,GAAG,MAAM,EAAE,CAAC;IAC1B,+CAA+C;IAC/C,IAAI;QACF,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;KAC3D;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,yEAAyE,EAAE,KAAK,CAAC,CAAC;KACjG;IAED,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["import { v4 as uuidv4 } from 'uuid';\n\nconst INSTALLATION_ID_KEY = 'installationId';\n\nlet installationId: string | null = null;\n\nexport default async function getInstallationIdAsync() {\n // Already cached value\n if (installationId) {\n return installationId;\n }\n\n try {\n // No cached value, fetch from persisted storage\n installationId = localStorage.getItem(INSTALLATION_ID_KEY);\n if (installationId) {\n return installationId;\n }\n } catch (error) {\n // If we weren't able to fetch one (for whatever reason)\n // let's create a new one.\n }\n\n // No persisted value, set the cached value...\n installationId = uuidv4();\n // ...and try to persist it. Ignore the errors.\n try {\n localStorage.setItem(INSTALLATION_ID_KEY, installationId);\n } catch (error) {\n console.debug('Could not save installation ID in persisted storage, it will get reset.', error);\n }\n\n return installationId;\n}\n"]}
1
+ {"version":3,"file":"getInstallationIdAsync.web.js","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;AAE7C,IAAI,cAAc,GAAkB,IAAI,CAAC;AAEzC,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB;IAClD,uBAAuB;IACvB,IAAI,cAAc,EAAE;QAClB,OAAO,cAAc,CAAC;KACvB;IAED,IAAI;QACF,gDAAgD;QAChD,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAC3D,IAAI,cAAc,EAAE;YAClB,OAAO,cAAc,CAAC;SACvB;KACF;IAAC,MAAM;QACN,wDAAwD;QACxD,0BAA0B;KAC3B;IAED,8CAA8C;IAC9C,cAAc,GAAG,MAAM,EAAE,CAAC;IAC1B,+CAA+C;IAC/C,IAAI;QACF,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;KAC3D;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,yEAAyE,EAAE,KAAK,CAAC,CAAC;KACjG;IAED,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["import { v4 as uuidv4 } from 'uuid';\n\nconst INSTALLATION_ID_KEY = 'installationId';\n\nlet installationId: string | null = null;\n\nexport default async function getInstallationIdAsync() {\n // Already cached value\n if (installationId) {\n return installationId;\n }\n\n try {\n // No cached value, fetch from persisted storage\n installationId = localStorage.getItem(INSTALLATION_ID_KEY);\n if (installationId) {\n return installationId;\n }\n } catch {\n // If we weren't able to fetch one (for whatever reason)\n // let's create a new one.\n }\n\n // No persisted value, set the cached value...\n installationId = uuidv4();\n // ...and try to persist it. Ignore the errors.\n try {\n localStorage.setItem(INSTALLATION_ID_KEY, installationId);\n } catch (error) {\n console.debug('Could not save installation ID in persisted storage, it will get reset.', error);\n }\n\n return installationId;\n}\n"]}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=logging.fx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.fx.d.ts","sourceRoot":"","sources":["../../src/environment/logging.fx.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  import Constants from 'expo-constants';
2
+ import { Platform } from 'expo-modules-core';
2
3
  import getDevServer from 'react-native/Libraries/Core/Devtools/getDevServer';
3
4
  // Metro and terser don't seem to be capable of shaking the imports unless they're wrapped in __DEV__.
4
5
  if (__DEV__) {
@@ -47,24 +48,16 @@ if (__DEV__) {
47
48
  Constants.__unsafeNoWarnManifest2?.extra?.expoGo?.logUrl) {
48
49
  // Enable logging to the Expo dev tools only if this JS is not running in a web browser (ex: the
49
50
  // remote debugger). In Expo Web we don't show console logs in the CLI, so there's no special case needed.
50
- if (!isRunningInWebBrowser()) {
51
- const Logs = require('../logs/Logs');
52
- Logs.enableExpoCliLogging();
53
- }
54
- else {
51
+ if (Platform.isAsyncDebugging) {
55
52
  const RemoteLogging = require('../logs/RemoteLogging').default;
56
53
  RemoteLogging.enqueueRemoteLogAsync('info', {}, [
57
54
  'You are now debugging remotely; check your browser console for your application logs.',
58
55
  ]);
59
56
  }
57
+ else {
58
+ const Logs = require('../logs/Logs');
59
+ Logs.enableExpoCliLogging();
60
+ }
60
61
  }
61
62
  }
62
- /**
63
- * In all web browsers navigator.product is "Gecko" for compatibility reasons.
64
- * See https://developer.mozilla.org/en-US/docs/Web/API/NavigatorID/product
65
- * and the discussion at https://github.com/expo/expo/pull/8807#discussion_r441391148.
66
- */
67
- function isRunningInWebBrowser() {
68
- return navigator?.product === 'Gecko';
69
- }
70
63
  //# sourceMappingURL=logging.fx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logging.fx.js","sourceRoot":"","sources":["../../src/environment/logging.fx.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,YAAY,MAAM,mDAAmD,CAAC;AAE7E,sGAAsG;AACtG,IAAI,OAAO,EAAE;IACX,kFAAkF;IAClF,qFAAqF;IACrF;IACE,yGAAyG;IACzG,SAAS,CAAC,sBAAsB;QAChC,2FAA2F;QAC3F,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,EACxC;QACA,MAAM,aAAa,GAAG,YAAY,EAAE,CAAC;QACrC,wDAAwD;QACxD,IAAI,aAAa,CAAC,sBAAsB,EAAE;YACxC,gCAAgC;YAChC,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC;YAC3F,wHAAwH;YAExH,MAAM,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;YAC5B,SAAS,CAAC,sBAAsB,CAAC,MAAM,GAAG,MAAM,CAAC;YACjD,IAAI,SAAS,CAAC,QAAQ,EAAE;gBACtB,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;aACpC;SACF;KACF;SAAM;IACL,uHAAuH;IACvH,SAAS,CAAC,uBAAuB;QACjC,4FAA4F;QAC5F,CAAC,SAAS,CAAC,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EACxD;QACA,MAAM,aAAa,GAAG,YAAY,EAAE,CAAC;QACrC,wDAAwD;QACxD,IAAI,aAAa,CAAC,sBAAsB,EAAE;YACxC,gCAAgC;YAChC,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC;YAC3F,wHAAwH;YAExH,MAAM,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;YAC5B,IAAI,SAAS,CAAC,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE;gBACnD,SAAS,CAAC,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;aAChE;YACD,IAAI,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE;gBACtC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;aAClD;SACF;KACF;IACD,6DAA6D;IAE7D,IACE,SAAS,CAAC,sBAAsB,EAAE,MAAM;QACxC,SAAS,CAAC,uBAAuB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EACxD;QACA,gGAAgG;QAChG,0GAA0G;QAC1G,IAAI,CAAC,qBAAqB,EAAE,EAAE;YAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;YACrC,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;aAAM;YACL,MAAM,aAAa,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC;YAC/D,aAAa,CAAC,qBAAqB,CAAC,MAAM,EAAE,EAAE,EAAE;gBAC9C,uFAAuF;aACxF,CAAC,CAAC;SACJ;KACF;CACF;AACD;;;;GAIG;AACH,SAAS,qBAAqB;IAC5B,OAAO,SAAS,EAAE,OAAO,KAAK,OAAO,CAAC;AACxC,CAAC","sourcesContent":["import Constants from 'expo-constants';\nimport getDevServer from 'react-native/Libraries/Core/Devtools/getDevServer';\n\n// Metro and terser don't seem to be capable of shaking the imports unless they're wrapped in __DEV__.\nif (__DEV__) {\n // If the app is being run outside of the Expo Go app and not using expo-dev-menu,\n // then we can attempt to polyfill the `logUrl` to enable console logging in the CLI.\n if (\n // If this is defined then we can be define Constants.manifest.logUrl without worrying about the warning.\n Constants.__unsafeNoWarnManifest &&\n // Only attempt to set the URL if `Constants.__unsafeNoWarnManifest.logUrl` is not defined.\n !Constants.__unsafeNoWarnManifest.logUrl\n ) {\n const devServerInfo = getDevServer();\n // Ensure the URL is remote and not local. i.e `file://`\n if (devServerInfo.bundleLoadedFromServer) {\n // url: `http://localhost:8081/`\n const url = !devServerInfo.url.endsWith('/') ? `${devServerInfo.url}/` : devServerInfo.url;\n // The standard Expo logUrl is `http://localhost:19000/logs`, this code assumes that the `logs` endpoint doesn't change.\n\n const logUrl = url + 'logs';\n Constants.__unsafeNoWarnManifest.logUrl = logUrl;\n if (Constants.manifest) {\n Constants.manifest.logUrl = logUrl;\n }\n }\n } else if (\n // If this is defined then we can be define Constants.manifest2.extra.expoGo.logUrl without worrying about the warning.\n Constants.__unsafeNoWarnManifest2 &&\n // Only attempt to set the URL if `Constants.__unsafeNoWarnManifest2.logUrl` is not defined.\n !Constants.__unsafeNoWarnManifest2.extra?.expoGo?.logUrl\n ) {\n const devServerInfo = getDevServer();\n // Ensure the URL is remote and not local. i.e `file://`\n if (devServerInfo.bundleLoadedFromServer) {\n // url: `http://localhost:8081/`\n const url = !devServerInfo.url.endsWith('/') ? `${devServerInfo.url}/` : devServerInfo.url;\n // The standard Expo logUrl is `http://localhost:19000/logs`, this code assumes that the `logs` endpoint doesn't change.\n\n const logUrl = url + 'logs';\n if (Constants.__unsafeNoWarnManifest2.extra?.expoGo) {\n Constants.__unsafeNoWarnManifest2.extra.expoGo.logUrl = logUrl;\n }\n if (Constants.manifest2?.extra?.expoGo) {\n Constants.manifest2.extra.expoGo.logUrl = logUrl;\n }\n }\n }\n // TODO: Maybe warn that console logging will not be enabled.\n\n if (\n Constants.__unsafeNoWarnManifest?.logUrl ||\n Constants.__unsafeNoWarnManifest2?.extra?.expoGo?.logUrl\n ) {\n // Enable logging to the Expo dev tools only if this JS is not running in a web browser (ex: the\n // remote debugger). In Expo Web we don't show console logs in the CLI, so there's no special case needed.\n if (!isRunningInWebBrowser()) {\n const Logs = require('../logs/Logs');\n Logs.enableExpoCliLogging();\n } else {\n const RemoteLogging = require('../logs/RemoteLogging').default;\n RemoteLogging.enqueueRemoteLogAsync('info', {}, [\n 'You are now debugging remotely; check your browser console for your application logs.',\n ]);\n }\n }\n}\n/**\n * In all web browsers navigator.product is \"Gecko\" for compatibility reasons.\n * See https://developer.mozilla.org/en-US/docs/Web/API/NavigatorID/product\n * and the discussion at https://github.com/expo/expo/pull/8807#discussion_r441391148.\n */\nfunction isRunningInWebBrowser() {\n return navigator?.product === 'Gecko';\n}\n"]}
1
+ {"version":3,"file":"logging.fx.js","sourceRoot":"","sources":["../../src/environment/logging.fx.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,YAAY,MAAM,mDAAmD,CAAC;AAE7E,sGAAsG;AACtG,IAAI,OAAO,EAAE;IACX,kFAAkF;IAClF,qFAAqF;IACrF;IACE,yGAAyG;IACzG,SAAS,CAAC,sBAAsB;QAChC,2FAA2F;QAC3F,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,EACxC;QACA,MAAM,aAAa,GAAG,YAAY,EAAE,CAAC;QACrC,wDAAwD;QACxD,IAAI,aAAa,CAAC,sBAAsB,EAAE;YACxC,gCAAgC;YAChC,MAAM,GAAG,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC;YAC3F,wHAAwH;YAExH,MAAM,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC;YAC5B,SAAS,CAAC,sBAA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AAE,EAAE,EAAE;gBAC9C,uFAAuF;aACxF,CAAC,CAAC;SACJ;aAAM;YACL,MAAM,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;YACrC,IAAI,CAAC,oBAAoB,EAAE,CAAC;SAC7B;KACF;CACF","sourcesContent":["import Constants from 'expo-constants';\nimport { Platform } from 'expo-modules-core';\nimport getDevServer from 'react-native/Libraries/Core/Devtools/getDevServer';\n\n// Metro and terser don't seem to be capable of shaking the imports unless they're wrapped in __DEV__.\nif (__DEV__) {\n // If the app is being run outside of the Expo Go app and not using expo-dev-menu,\n // then we can attempt to polyfill the `logUrl` to enable console logging in the CLI.\n if (\n // If this is defined then we can be define Constants.manifest.logUrl without worrying about the warning.\n Constants.__unsafeNoWarnManifest &&\n // Only attempt to set the URL if `Constants.__unsafeNoWarnManifest.logUrl` is not defined.\n !Constants.__unsafeNoWarnManifest.logUrl\n ) {\n const devServerInfo = getDevServer();\n // Ensure the URL is remote and not local. i.e `file://`\n if (devServerInfo.bundleLoadedFromServer) {\n // url: `http://localhost:8081/`\n const url = !devServerInfo.url.endsWith('/') ? `${devServerInfo.url}/` : devServerInfo.url;\n // The standard Expo logUrl is `http://localhost:19000/logs`, this code assumes that the `logs` endpoint doesn't change.\n\n const logUrl = url + 'logs';\n Constants.__unsafeNoWarnManifest.logUrl = logUrl;\n if (Constants.manifest) {\n Constants.manifest.logUrl = logUrl;\n }\n }\n } else if (\n // If this is defined then we can be define Constants.manifest2.extra.expoGo.logUrl without worrying about the warning.\n Constants.__unsafeNoWarnManifest2 &&\n // Only attempt to set the URL if `Constants.__unsafeNoWarnManifest2.logUrl` is not defined.\n !Constants.__unsafeNoWarnManifest2.extra?.expoGo?.logUrl\n ) {\n const devServerInfo = getDevServer();\n // Ensure the URL is remote and not local. i.e `file://`\n if (devServerInfo.bundleLoadedFromServer) {\n // url: `http://localhost:8081/`\n const url = !devServerInfo.url.endsWith('/') ? `${devServerInfo.url}/` : devServerInfo.url;\n // The standard Expo logUrl is `http://localhost:19000/logs`, this code assumes that the `logs` endpoint doesn't change.\n\n const logUrl = url + 'logs';\n if (Constants.__unsafeNoWarnManifest2.extra?.expoGo) {\n Constants.__unsafeNoWarnManifest2.extra.expoGo.logUrl = logUrl;\n }\n if (Constants.manifest2?.extra?.expoGo) {\n Constants.manifest2.extra.expoGo.logUrl = logUrl;\n }\n }\n }\n // TODO: Maybe warn that console logging will not be enabled.\n\n if (\n Constants.__unsafeNoWarnManifest?.logUrl ||\n Constants.__unsafeNoWarnManifest2?.extra?.expoGo?.logUrl\n ) {\n // Enable logging to the Expo dev tools only if this JS is not running in a web browser (ex: the\n // remote debugger). In Expo Web we don't show console logs in the CLI, so there's no special case needed.\n if (Platform.isAsyncDebugging) {\n const RemoteLogging = require('../logs/RemoteLogging').default;\n RemoteLogging.enqueueRemoteLogAsync('info', {}, [\n 'You are now debugging remotely; check your browser console for your application logs.',\n ]);\n } else {\n const Logs = require('../logs/Logs');\n Logs.enableExpoCliLogging();\n }\n }\n}\n"]}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=react-native-logs.fx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-native-logs.fx.d.ts","sourceRoot":"","sources":["../../src/environment/react-native-logs.fx.ts"],"names":[],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  // AppRegistry transitively installs YellowBox as a side effect, which overrides various console
2
2
  // methods that we need to set up before we override them
3
3
  import { AppRegistry } from 'react-native';
4
- AppRegistry; // eslint-disable-line @babel/no-unused-expressions
4
+ AppRegistry; // eslint-disable-line no-unused-expressions
5
5
  // NOTE(2018-10-29): temporarily filter out cyclic dependency warnings here since they are noisy and
6
6
  // each warning symbolicates a stack trace, which is slow when there are many warnings
7
7
  // NOTE(2019-05-27): temporarily filter out LottieAnimationView warnings triggered by
@@ -1 +1 @@
1
- {"version":3,"file":"react-native-logs.fx.js","sourceRoot":"","sources":["../../src/environment/react-native-logs.fx.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,yDAAyD;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,WAAW,CAAC,CAAC,mDAAmD;AAEhE,oGAAoG;AACpG,sFAAsF;AACtF,qFAAqF;AACrF,oDAAoD;AACpD,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;AAClC,OAAO,CAAC,IAAI,GAAG,SAAS,IAAI,CAAC,GAAG,IAAI;IAClC,IACE,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;QAC3B,CAAC,gCAAgC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC7C,wEAAwE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACtF,+DAA+D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAChF;QACA,OAAO;KACR;IACD,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;AACpC,OAAO,CAAC,KAAK,GAAG,SAAS,KAAK,CAAC,GAAG,IAAI;IACpC,IACE,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;QAC3B,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAC/C;QACA,OAAO;KACR;IACD,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// AppRegistry transitively installs YellowBox as a side effect, which overrides various console\n// methods that we need to set up before we override them\nimport { AppRegistry } from 'react-native';\n\nAppRegistry; // eslint-disable-line @babel/no-unused-expressions\n\n// NOTE(2018-10-29): temporarily filter out cyclic dependency warnings here since they are noisy and\n// each warning symbolicates a stack trace, which is slow when there are many warnings\n// NOTE(2019-05-27): temporarily filter out LottieAnimationView warnings triggered by\n// unmaintained react-native-safe-module dependency.\nconst originalWarn = console.warn;\nconsole.warn = function warn(...args) {\n if (\n args.length > 0 &&\n typeof args[0] === 'string' &&\n (/^Require cycle: .*node_modules/.test(args[0]) ||\n /Use UIManager\\.getViewManagerConfig\\('LottieAnimationView'\\) instead\\./.test(args[0]) ||\n /ReactNative\\.NativeModules\\.LottieAnimationView\\.getConstants/.test(args[0]))\n ) {\n return;\n }\n originalWarn.apply(console, args);\n};\n\nconst originalError = console.error;\nconsole.error = function error(...args) {\n if (\n args.length > 0 &&\n typeof args[0] === 'string' &&\n /^Warning: .* has been extracted/.test(args[0])\n ) {\n return;\n }\n originalError.apply(console, args);\n};\n"]}
1
+ {"version":3,"file":"react-native-logs.fx.js","sourceRoot":"","sources":["../../src/environment/react-native-logs.fx.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,yDAAyD;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,WAAW,CAAC,CAAC,4CAA4C;AAEzD,oGAAoG;AACpG,sFAAsF;AACtF,qFAAqF;AACrF,oDAAoD;AACpD,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;AAClC,OAAO,CAAC,IAAI,GAAG,SAAS,IAAI,CAAC,GAAG,IAAI;IAClC,IACE,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;QAC3B,CAAC,gCAAgC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAC7C,wEAAwE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACtF,+DAA+D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAChF;QACA,OAAO;KACR;IACD,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC;AACpC,OAAO,CAAC,KAAK,GAAG,SAAS,KAAK,CAAC,GAAG,IAAI;IACpC,IACE,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;QAC3B,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAC/C;QACA,OAAO;KACR;IACD,aAAa,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// AppRegistry transitively installs YellowBox as a side effect, which overrides various console\n// methods that we need to set up before we override them\nimport { AppRegistry } from 'react-native';\n\nAppRegistry; // eslint-disable-line no-unused-expressions\n\n// NOTE(2018-10-29): temporarily filter out cyclic dependency warnings here since they are noisy and\n// each warning symbolicates a stack trace, which is slow when there are many warnings\n// NOTE(2019-05-27): temporarily filter out LottieAnimationView warnings triggered by\n// unmaintained react-native-safe-module dependency.\nconst originalWarn = console.warn;\nconsole.warn = function warn(...args) {\n if (\n args.length > 0 &&\n typeof args[0] === 'string' &&\n (/^Require cycle: .*node_modules/.test(args[0]) ||\n /Use UIManager\\.getViewManagerConfig\\('LottieAnimationView'\\) instead\\./.test(args[0]) ||\n /ReactNative\\.NativeModules\\.LottieAnimationView\\.getConstants/.test(args[0]))\n ) {\n return;\n }\n originalWarn.apply(console, args);\n};\n\nconst originalError = console.error;\nconsole.error = function error(...args) {\n if (\n args.length > 0 &&\n typeof args[0] === 'string' &&\n /^Warning: .* has been extracted/.test(args[0])\n ) {\n return;\n }\n originalError.apply(console, args);\n};\n"]}
@@ -1 +1,2 @@
1
1
  export {};
2
+ //# sourceMappingURL=validate.fx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.fx.d.ts","sourceRoot":"","sources":["../../src/environment/validate.fx.ts"],"names":[],"mappings":""}
@@ -1,13 +1,13 @@
1
- import Constants, { ExecutionEnvironment } from 'expo-constants'; // eslint-disable-line @babel/no-unused-expressions
1
+ import Constants, { ExecutionEnvironment } from 'expo-constants'; // eslint-disable-line no-unused-expressions
2
2
  import {
3
3
  // React Native's internal InitializeCore module sets up `window` but runs only when its React
4
4
  // renderer is loaded. We can cause this by loading one of its dependents.
5
5
  findNodeHandle, } from 'react-native';
6
6
  import { shouldThrowAnErrorOutsideOfExpo } from './validatorState';
7
- findNodeHandle; // eslint-disable-line @babel/no-unused-expressions
7
+ findNodeHandle; // eslint-disable-line no-unused-expressions
8
8
  if (shouldThrowAnErrorOutsideOfExpo() &&
9
9
  !Constants?.expoVersion &&
10
10
  Constants?.executionEnvironment !== ExecutionEnvironment.Bare) {
11
- throw new Error(`Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.io.`);
11
+ throw new Error(`Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.dev.`);
12
12
  }
13
13
  //# sourceMappingURL=validate.fx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate.fx.js","sourceRoot":"","sources":["../../src/environment/validate.fx.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC,CAAC,mDAAmD;AACrH,OAAO;AACL,8FAA8F;AAC9F,0EAA0E;AAC1E,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,cAAc,CAAC,CAAC,mDAAmD;AAEnE,IACE,+BAA+B,EAAE;IACjC,CAAC,SAAS,EAAE,WAAW;IACvB,SAAS,EAAE,oBAAoB,KAAK,oBAAoB,CAAC,IAAI,EAC7D;IACA,MAAM,IAAI,KAAK,CACb,oKAAoK,CACrK,CAAC;CACH","sourcesContent":["import Constants, { ExecutionEnvironment } from 'expo-constants'; // eslint-disable-line @babel/no-unused-expressions\nimport {\n // React Native's internal InitializeCore module sets up `window` but runs only when its React\n // renderer is loaded. We can cause this by loading one of its dependents.\n findNodeHandle,\n} from 'react-native';\n\nimport { shouldThrowAnErrorOutsideOfExpo } from './validatorState';\n\nfindNodeHandle; // eslint-disable-line @babel/no-unused-expressions\n\nif (\n shouldThrowAnErrorOutsideOfExpo() &&\n !Constants?.expoVersion &&\n Constants?.executionEnvironment !== ExecutionEnvironment.Bare\n) {\n throw new Error(\n `Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.io.`\n );\n}\n"]}
1
+ {"version":3,"file":"validate.fx.js","sourceRoot":"","sources":["../../src/environment/validate.fx.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,EAAE,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC,CAAC,4CAA4C;AAC9G,OAAO;AACL,8FAA8F;AAC9F,0EAA0E;AAC1E,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AAEnE,cAAc,CAAC,CAAC,4CAA4C;AAE5D,IACE,+BAA+B,EAAE;IACjC,CAAC,SAAS,EAAE,WAAW;IACvB,SAAS,EAAE,oBAAoB,KAAK,oBAAoB,CAAC,IAAI,EAC7D;IACA,MAAM,IAAI,KAAK,CACb,qKAAqK,CACtK,CAAC;CACH","sourcesContent":["import Constants, { ExecutionEnvironment } from 'expo-constants'; // eslint-disable-line no-unused-expressions\nimport {\n // React Native's internal InitializeCore module sets up `window` but runs only when its React\n // renderer is loaded. We can cause this by loading one of its dependents.\n findNodeHandle,\n} from 'react-native';\n\nimport { shouldThrowAnErrorOutsideOfExpo } from './validatorState';\n\nfindNodeHandle; // eslint-disable-line no-unused-expressions\n\nif (\n shouldThrowAnErrorOutsideOfExpo() &&\n !Constants?.expoVersion &&\n Constants?.executionEnvironment !== ExecutionEnvironment.Bare\n) {\n throw new Error(\n `Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.dev.`\n );\n}\n"]}
@@ -6,3 +6,4 @@ export declare function _setShouldThrowAnErrorOutsideOfExpo(value: any): void;
6
6
  * Should 'expo' validate the environment against Constants.expoVersion
7
7
  */
8
8
  export declare function shouldThrowAnErrorOutsideOfExpo(): boolean;
9
+ //# sourceMappingURL=validatorState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatorState.d.ts","sourceRoot":"","sources":["../../src/environment/validatorState.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,KAAK,KAAA,QAExD;AAED;;GAEG;AACH,wBAAgB,+BAA+B,YAE9C"}
@@ -1,2 +1,3 @@
1
1
  import { InitialProps } from './withExpoRoot.types';
2
2
  export declare const attachRecoveredProps: <P extends InitialProps>(props: P) => P;
3
+ //# sourceMappingURL=RecoveryProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RecoveryProps.d.ts","sourceRoot":"","sources":["../../src/launch/RecoveryProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,eAAO,MAAM,oBAAoB,yCAWhC,CAAC"}
@@ -2,3 +2,4 @@ import 'expo/build/Expo.fx';
2
2
  import * as React from 'react';
3
3
  import { InitialProps } from './withExpoRoot.types';
4
4
  export default function registerRootComponent<P extends InitialProps>(component: React.ComponentType<P>): void;
5
+ //# sourceMappingURL=registerRootComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registerRootComponent.d.ts","sourceRoot":"","sources":["../../src/launch/registerRootComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,CAAC,SAAS,YAAY,EAClE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GAChC,IAAI,CAMN"}
@@ -1,3 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { InitialProps } from './withExpoRoot.types';
3
3
  export default function withExpoRoot<P extends InitialProps>(AppRootComponent: React.ComponentType<P>): React.ComponentType<P>;
4
+ //# sourceMappingURL=withExpoRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withExpoRoot.d.ts","sourceRoot":"","sources":["../../src/launch/withExpoRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAcpD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,SAAS,YAAY,EACzD,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACvC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAOxB"}
@@ -9,3 +9,4 @@ export declare type InitialProps = {
9
9
  shellManifestUrl?: string;
10
10
  [key: string]: any;
11
11
  };
12
+ //# sourceMappingURL=withExpoRoot.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withExpoRoot.types.d.ts","sourceRoot":"","sources":["../../src/launch/withExpoRoot.types.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY,GAAG;IACzB,GAAG,EAAE;QACH,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,aAAa,CAAC,EAAE,GAAG,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import * as React from 'react';
2
2
  import { InitialProps } from './withExpoRoot.types';
3
3
  export default function withExpoRoot<P extends InitialProps>(AppRootComponent: React.ComponentType<P>): React.ComponentClass<P>;
4
+ //# sourceMappingURL=withExpoRoot.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"withExpoRoot.web.d.ts","sourceRoot":"","sources":["../../src/launch/withExpoRoot.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,CAAC,SAAS,YAAY,EACzD,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACvC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAOzB"}
@@ -9,3 +9,4 @@ declare const _default: {
9
9
  serializeLogDataAsync: typeof serializeLogDataAsync;
10
10
  };
11
11
  export default _default;
12
+ //# sourceMappingURL=LogSerialization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogSerialization.d.ts","sourceRoot":"","sources":["../../src/logs/LogSerialization.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGpD,aAAK,cAAc,GAAG;IACpB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAE3D,iBAAe,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CAqD9F;;;;AAwID,wBAEE"}
@@ -94,7 +94,7 @@ async function _symbolicateErrorAsync(error) {
94
94
  // than the one in DefinitelyTyped.
95
95
  symbolicatedStack = (await symbolicateStackTrace(parsedStack))?.stack ?? null;
96
96
  }
97
- catch (error) {
97
+ catch {
98
98
  return parsedStack;
99
99
  }
100
100
  // In this context an unsymbolicated stack is better than no stack
@@ -1 +1 @@
1
- {"version":3,"file":"LogSerialization.js","s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K,QAAQ;QAC3B,uCAAuC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAW,CAAC,CAChE,CAAC;AACJ,CAAC;AAED,SAAS,yBAAyB;IAChC,IAAI;QACF,MAAM,IAAI,KAAK,EAAE,CAAC;KACnB;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CACxD,KAAK,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CACzC,CAAC;QACF,IAAI,kBAAkB,KAAK,CAAC,CAAC,EAAE;YAC7B,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC;YACtD,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACrC;QACD,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,CACL,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW;QAC1C,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW;QAC1D,IAAI,CACL,CAAC;AACJ,CAAC;AAED,eAAe;IACb,qBAAqB;CACtB,CAAC","sourcesContent":["import Constants from 'expo-constants';\nimport prettyFormat from 'pretty-format';\nimport parseErrorStack, { StackFrame } from 'react-native/Libraries/Core/Devtools/parseErrorStack';\nimport symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace';\n\nimport { LogData, LogLevel } from './RemoteLogging';\nimport ReactNodeFormatter from './format/ReactNodeFormatter';\n\ntype SerializedData = {\n body: LogData[];\n includesStack: boolean;\n};\n\nexport const EXPO_CONSOLE_METHOD_NAME = '__expoConsoleLog';\n\nasync function serializeLogDataAsync(data: unknown[], level: LogLevel): Promise<SerializedData> {\n let serializedValues: readonly LogData[];\n let includesStack = false;\n\n if (_stackTraceLogsSupported()) {\n if (_isUnhandledPromiseRejection(data, level)) {\n const rawStack = data[0] as string;\n const syntheticError = { stack: rawStack };\n const stack = await _symbolicateErrorAsync(syntheticError as Error);\n\n if (!stack.length) {\n serializedValues = _stringifyLogData(data);\n } else {\n // NOTE: This doesn't handle error messages with newlines\n const errorMessage = rawStack.split('\\n')[1];\n serializedValues = [\n {\n message: `[Unhandled promise rejection: ${errorMessage}]`,\n stack: _formatStack(stack),\n },\n ];\n includesStack = true;\n }\n } else if (data.length === 1 && data[0] instanceof Error) {\n // When there's only one argument to the log function and that argument is an error, we\n // include the error's stack. If there's more than one argument then we don't include the\n // stack because it's not easy to display nicely in our current UI.\n\n const serializedError = await _serializeErrorAsync(data[0] as Error);\n serializedValues = [serializedError];\n includesStack = serializedError.hasOwnProperty('stack');\n } else if (level === 'warn' || level === 'error') {\n // For console.warn and console.error it is usually useful to know the stack that leads to the\n // warning or error, so we provide this information to help out with debugging\n\n const error = _captureConsoleStackTrace();\n // [\"hello\", \"world\"] becomes \"hello, world\"\n const errorMessage = _stringifyLogData(data).join(', ');\n\n const serializedError = await _serializeErrorAsync(error, errorMessage);\n serializedValues = [serializedError];\n includesStack = serializedError.hasOwnProperty('stack');\n } else {\n serializedValues = _stringifyLogData(data);\n }\n } else {\n serializedValues = _stringifyLogData(data);\n }\n\n return {\n body: [...serializedValues],\n includesStack,\n };\n}\n\nfunction _stringifyLogData(data: unknown[]): string[] {\n return data.map((item) => {\n // define the max length for log msg to be first 10000 characters\n const LOG_MESSAGE_MAX_LENGTH = 10000;\n const result =\n typeof item === 'string' ? item : prettyFormat(item, { plugins: [ReactNodeFormatter] });\n // check the size of string returned\n if (result.length > LOG_MESSAGE_MAX_LENGTH) {\n let truncatedResult = result.substring(0, LOG_MESSAGE_MAX_LENGTH);\n // truncate the result string to the max length\n truncatedResult += `...(truncated to the first ${LOG_MESSAGE_MAX_LENGTH} characters)`;\n return truncatedResult;\n } else {\n return result;\n }\n });\n}\n\nasync function _serializeErrorAsync(error: Error, message?: string): Promise<LogData> {\n if (message == null) {\n message = error.message;\n }\n\n if (!error.stack || !error.stack.length) {\n return prettyFormat(error);\n }\n\n const stack = await _symbolicateErrorAsync(error);\n const formattedStack = _formatStack(stack);\n\n return { message, stack: formattedStack };\n}\n\nasync function _symbolicateErrorAsync(error: Error): Promise<StackFrame[]> {\n // @ts-ignore: parseErrorStack accepts nullable string after RN 0.64 but @types/react-native does not updated yet.\n const parsedStack = parseErrorStack(error?.stack);\n let symbolicatedStack: StackFrame[] | null;\n try {\n // @ts-ignore: symbolicateStackTrace has different real/Flow declaration\n // than the one in DefinitelyTyped.\n symbolicatedStack = (await symbolicateStackTrace(parsedStack))?.stack ?? null;\n } catch (error) {\n return parsedStack;\n }\n\n // In this context an unsymbolicated stack is better than no stack\n if (!symbolicatedStack) {\n return parsedStack;\n }\n\n // Clean the stack trace\n return symbolicatedStack.map(_removeProjectRoot);\n}\n\nfunction _formatStack(stack: StackFrame[]): string {\n return stack\n .map((frame) => {\n let line = `${frame.file}:${frame.lineNumber}`;\n if (frame.column != null) {\n line += `:${frame.column}`;\n }\n line += ` in ${frame.methodName}`;\n return line;\n })\n .join('\\n');\n}\n\nfunction _removeProjectRoot(frame: StackFrame): StackFrame {\n let filename = frame.file;\n if (filename == null) {\n return frame;\n }\n\n const projectRoot = _getProjectRoot();\n if (projectRoot == null) {\n return frame;\n }\n\n if (filename.startsWith(projectRoot)) {\n filename = filename.substring(projectRoot.length);\n if (filename[0] === '/' || filename[0] === '\\\\') {\n filename = filename.substring(1);\n }\n frame.file = filename;\n }\n\n return frame;\n}\n\n/**\n * Returns whether the development server that served this project supports logs with a stack trace.\n * Specifically, the version of Expo CLI that includes `projectRoot` in the manifest also accepts\n * payloads of the form:\n *\n * {\n * includesStack: boolean, body: [{ message: string, stack: string }],\n * }\n */\nfunction _stackTraceLogsSupported(): boolean {\n return !!(__DEV__ && _getProjectRoot());\n}\n\nfunction _isUnhandledPromiseRejection(data: unknown[], level: LogLevel): boolean {\n return (\n level === 'warn' &&\n typeof data[0] === 'string' &&\n /^Possible Unhandled Promise Rejection/.test(data[0] as string)\n );\n}\n\nfunction _captureConsoleStackTrace(): Error {\n try {\n throw new Error();\n } catch (error) {\n let stackLines = error.stack.split('\\n');\n const consoleMethodIndex = stackLines.findIndex((frame) =>\n frame.includes(EXPO_CONSOLE_METHOD_NAME)\n );\n if (consoleMethodIndex !== -1) {\n stackLines = stackLines.slice(consoleMethodIndex + 1);\n error.stack = stackLines.join('\\n');\n }\n return error;\n }\n}\n\nfunction _getProjectRoot(): string | null {\n return (\n Constants.manifest?.developer?.projectRoot ??\n Constants.manifest2?.extra?.expoGo?.developer?.projectRoot ??\n null\n );\n}\n\nexport default {\n serializeLogDataAsync,\n};\n"]}
1
+ {"version":3,"file":"LogSerialization.js","sourceRoot":"","sources":["../../src/logs/LogSerialization.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,eAA+B,MAAM,sDAAsD,CAAC;AACnG,OAAO,qBAAqB,MAAM,4DAA4D,CAAC;AAG/F,OAAO,kBAAkB,MAAM,6BAA6B,CAAC;AAO7D,MAAM,CAAC,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAE3D,KAAK,UAAU,qBAAqB,CAAC,IAAe,EAAE,KAAe;IACnE,IAAI,gBAAoC,CAAC;IACzC,IAAI,aAAa,GAAG,KAAK,CAAC;IAE1B,IAAI,wBAAwB,EAAE,EAAE;QAC9B,IAAI,4BAA4B,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;YAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAW,CAAC;YACnC,MAAM,cAAc,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;YAC3C,MAAM,KAAK,GAAG,MAAM,sBAAsB,CAAC,cAAuB,CAAC,CAA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AAS,EAAE,WAAW;QAC1C,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW;QAC1D,IAAI,CACL,CAAC;AACJ,CAAC;AAED,eAAe;IACb,qBAAqB;CACtB,CAAC","sourcesContent":["import Constants from 'expo-constants';\nimport prettyFormat from 'pretty-format';\nimport parseErrorStack, { StackFrame } from 'react-native/Libraries/Core/Devtools/parseErrorStack';\nimport symbolicateStackTrace from 'react-native/Libraries/Core/Devtools/symbolicateStackTrace';\n\nimport { LogData, LogLevel } from './RemoteLogging';\nimport ReactNodeFormatter from './format/ReactNodeFormatter';\n\ntype SerializedData = {\n body: LogData[];\n includesStack: boolean;\n};\n\nexport const EXPO_CONSOLE_METHOD_NAME = '__expoConsoleLog';\n\nasync function serializeLogDataAsync(data: unknown[], level: LogLevel): Promise<SerializedData> {\n let serializedValues: readonly LogData[];\n let includesStack = false;\n\n if (_stackTraceLogsSupported()) {\n if (_isUnhandledPromiseRejection(data, level)) {\n const rawStack = data[0] as string;\n const syntheticError = { stack: rawStack };\n const stack = await _symbolicateErrorAsync(syntheticError as Error);\n\n if (!stack.length) {\n serializedValues = _stringifyLogData(data);\n } else {\n // NOTE: This doesn't handle error messages with newlines\n const errorMessage = rawStack.split('\\n')[1];\n serializedValues = [\n {\n message: `[Unhandled promise rejection: ${errorMessage}]`,\n stack: _formatStack(stack),\n },\n ];\n includesStack = true;\n }\n } else if (data.length === 1 && data[0] instanceof Error) {\n // When there's only one argument to the log function and that argument is an error, we\n // include the error's stack. If there's more than one argument then we don't include the\n // stack because it's not easy to display nicely in our current UI.\n\n const serializedError = await _serializeErrorAsync(data[0] as Error);\n serializedValues = [serializedError];\n includesStack = serializedError.hasOwnProperty('stack');\n } else if (level === 'warn' || level === 'error') {\n // For console.warn and console.error it is usually useful to know the stack that leads to the\n // warning or error, so we provide this information to help out with debugging\n\n const error = _captureConsoleStackTrace();\n // [\"hello\", \"world\"] becomes \"hello, world\"\n const errorMessage = _stringifyLogData(data).join(', ');\n\n const serializedError = await _serializeErrorAsync(error, errorMessage);\n serializedValues = [serializedError];\n includesStack = serializedError.hasOwnProperty('stack');\n } else {\n serializedValues = _stringifyLogData(data);\n }\n } else {\n serializedValues = _stringifyLogData(data);\n }\n\n return {\n body: [...serializedValues],\n includesStack,\n };\n}\n\nfunction _stringifyLogData(data: unknown[]): string[] {\n return data.map((item) => {\n // define the max length for log msg to be first 10000 characters\n const LOG_MESSAGE_MAX_LENGTH = 10000;\n const result =\n typeof item === 'string' ? item : prettyFormat(item, { plugins: [ReactNodeFormatter] });\n // check the size of string returned\n if (result.length > LOG_MESSAGE_MAX_LENGTH) {\n let truncatedResult = result.substring(0, LOG_MESSAGE_MAX_LENGTH);\n // truncate the result string to the max length\n truncatedResult += `...(truncated to the first ${LOG_MESSAGE_MAX_LENGTH} characters)`;\n return truncatedResult;\n } else {\n return result;\n }\n });\n}\n\nasync function _serializeErrorAsync(error: Error, message?: string): Promise<LogData> {\n if (message == null) {\n message = error.message;\n }\n\n if (!error.stack || !error.stack.length) {\n return prettyFormat(error);\n }\n\n const stack = await _symbolicateErrorAsync(error);\n const formattedStack = _formatStack(stack);\n\n return { message, stack: formattedStack };\n}\n\nasync function _symbolicateErrorAsync(error: Error): Promise<StackFrame[]> {\n // @ts-ignore: parseErrorStack accepts nullable string after RN 0.64 but @types/react-native does not updated yet.\n const parsedStack = parseErrorStack(error?.stack);\n let symbolicatedStack: StackFrame[] | null;\n try {\n // @ts-ignore: symbolicateStackTrace has different real/Flow declaration\n // than the one in DefinitelyTyped.\n symbolicatedStack = (await symbolicateStackTrace(parsedStack))?.stack ?? null;\n } catch {\n return parsedStack;\n }\n\n // In this context an unsymbolicated stack is better than no stack\n if (!symbolicatedStack) {\n return parsedStack;\n }\n\n // Clean the stack trace\n return symbolicatedStack.map(_removeProjectRoot);\n}\n\nfunction _formatStack(stack: StackFrame[]): string {\n return stack\n .map((frame) => {\n let line = `${frame.file}:${frame.lineNumber}`;\n if (frame.column != null) {\n line += `:${frame.column}`;\n }\n line += ` in ${frame.methodName}`;\n return line;\n })\n .join('\\n');\n}\n\nfunction _removeProjectRoot(frame: StackFrame): StackFrame {\n let filename = frame.file;\n if (filename == null) {\n return frame;\n }\n\n const projectRoot = _getProjectRoot();\n if (projectRoot == null) {\n return frame;\n }\n\n if (filename.startsWith(projectRoot)) {\n filename = filename.substring(projectRoot.length);\n if (filename[0] === '/' || filename[0] === '\\\\') {\n filename = filename.substring(1);\n }\n frame.file = filename;\n }\n\n return frame;\n}\n\n/**\n * Returns whether the development server that served this project supports logs with a stack trace.\n * Specifically, the version of Expo CLI that includes `projectRoot` in the manifest also accepts\n * payloads of the form:\n *\n * {\n * includesStack: boolean, body: [{ message: string, stack: string }],\n * }\n */\nfunction _stackTraceLogsSupported(): boolean {\n return !!(__DEV__ && _getProjectRoot());\n}\n\nfunction _isUnhandledPromiseRejection(data: unknown[], level: LogLevel): boolean {\n return (\n level === 'warn' &&\n typeof data[0] === 'string' &&\n /^Possible Unhandled Promise Rejection/.test(data[0] as string)\n );\n}\n\nfunction _captureConsoleStackTrace(): Error {\n try {\n throw new Error();\n } catch (error) {\n let stackLines = error.stack.split('\\n');\n const consoleMethodIndex = stackLines.findIndex((frame) =>\n frame.includes(EXPO_CONSOLE_METHOD_NAME)\n );\n if (consoleMethodIndex !== -1) {\n stackLines = stackLines.slice(consoleMethodIndex + 1);\n error.stack = stackLines.join('\\n');\n }\n return error;\n }\n}\n\nfunction _getProjectRoot(): string | null {\n return (\n Constants.manifest?.developer?.projectRoot ??\n Constants.manifest2?.extra?.expoGo?.developer?.projectRoot ??\n null\n );\n}\n\nexport default {\n serializeLogDataAsync,\n};\n"]}
@@ -1,2 +1,3 @@
1
1
  export declare function enableExpoCliLogging(): void;
2
2
  export declare function disableExpoCliLogging(): void;
3
+ //# sourceMappingURL=Logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logs.d.ts","sourceRoot":"","sources":["../../src/logs/Logs.ts"],"names":[],"mappings":"AAEA,wBAAgB,oBAAoB,IAAI,IAAI,CAU3C;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAS5C"}
@@ -1,2 +1,3 @@
1
1
  export declare function enableExpoCliLogging(): void;
2
2
  export declare function disableExpoCliLogging(): void;
3
+ //# sourceMappingURL=Logs.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logs.web.d.ts","sourceRoot":"","sources":["../../src/logs/Logs.web.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AACD,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
@@ -3,3 +3,4 @@
3
3
  * the messages to the development environment over a remote connection.
4
4
  */
5
5
  export declare function createRemoteConsole(originalConsole: Console): Console;
6
+ //# sourceMappingURL=RemoteConsole.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoteConsole.d.ts","sourceRoot":"","sources":["../../src/logs/RemoteConsole.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,OAAO,GAAG,OAAO,CAuHrE"}
@@ -26,3 +26,4 @@ export default _default;
26
26
  * intended for testing only.
27
27
  */
28
28
  export declare function __waitForEmptyLogQueueAsync(): Promise<void>;
29
+ //# sourceMappingURL=RemoteLogging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemoteLogging.d.ts","sourceRoot":"","sources":["../../src/logs/RemoteLogging.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAO5D,oBAAY,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAU3D,oBAAY,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,oBAAY,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;AAC5C,oBAAY,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,aAAK,sBAAsB,GAAG,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAAE,KAAK,IAAI,CAAC;AAWrF,iBAAe,qBAAqB,CAClC,KAAK,EAAE,QAAQ,EACf,gBAAgB,EAAE,cAAc,EAChC,IAAI,EAAE,OAAO,EAAE,GACd,OAAO,CAAC,IAAI,CAAC,CAgCf;AAiED,iBAAS,yBAAyB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,iBAAiB,CAEtF;;;;;AAQD,wBAGE;AAEF;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC,CAqB3D"}
@@ -7,3 +7,4 @@ declare const _default: {
7
7
  * large and verbose to print.
8
8
  */
9
9
  export default _default;
10
+ //# sourceMappingURL=ReactNodeFormatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReactNodeFormatter.d.ts","sourceRoot":"","sources":["../../../src/logs/format/ReactNodeFormatter.ts"],"names":[],"mappings":";gBAKc,GAAG,GAAG,OAAO;8FAUmC,MAAM;;AAfpE;;;GAGG;AACH,wBAsBE"}
@@ -2,3 +2,4 @@
2
2
  * Defines a small polyfill for process.nextTick. Eventually we'd like to replace this polyfill with
3
3
  * a native implementation with the correct timing semantics.
4
4
  */
5
+ //# sourceMappingURL=polyfillNextTick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polyfillNextTick.d.ts","sourceRoot":"","sources":["../../src/timer/polyfillNextTick.ts"],"names":[],"mappings":"AAAA;;;GAGG"}