expo 49.0.4 → 50.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,7 +33,7 @@ def getRNVersion() {
33
33
  ensureDependeciesWereEvaluated(project)
34
34
 
35
35
  group = 'host.exp.exponent'
36
- version = '49.0.4'
36
+ version = '50.0.0-alpha.0'
37
37
 
38
38
  buildscript {
39
39
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -97,7 +97,7 @@ android {
97
97
  minSdkVersion safeExtGet("minSdkVersion", 21)
98
98
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
99
99
  versionCode 1
100
- versionName "49.0.4"
100
+ versionName "50.0.0-alpha.0"
101
101
  consumerProguardFiles("proguard-rules.pro")
102
102
  }
103
103
  lintOptions {
@@ -17,6 +17,7 @@ import com.facebook.react.ReactRootView
17
17
  import com.facebook.react.bridge.ReactContext
18
18
  import com.facebook.react.modules.core.PermissionListener
19
19
  import expo.modules.core.interfaces.ReactActivityLifecycleListener
20
+ import expo.modules.kotlin.Utils
20
21
  import java.lang.reflect.Field
21
22
  import java.lang.reflect.Method
22
23
  import java.lang.reflect.Modifier
@@ -84,6 +85,9 @@ class ReactActivityDelegateWrapper(
84
85
  reactDelegate.loadApp(appKey)
85
86
  rootViewContainer.addView(reactDelegate.reactRootView, ViewGroup.LayoutParams.MATCH_PARENT)
86
87
  activity.setContentView(rootViewContainer)
88
+ reactActivityLifecycleListeners.forEach { listener ->
89
+ listener.onContentChanged(activity)
90
+ }
87
91
  return
88
92
  }
89
93
 
@@ -92,7 +96,11 @@ class ReactActivityDelegateWrapper(
92
96
  .firstOrNull()
93
97
  if (delayLoadAppHandler != null) {
94
98
  delayLoadAppHandler.whenReady {
99
+ Utils.assertMainThread()
95
100
  invokeDelegateMethod<Unit, String?>("loadApp", arrayOf(String::class.java), arrayOf(appKey))
101
+ reactActivityLifecycleListeners.forEach { listener ->
102
+ listener.onContentChanged(activity)
103
+ }
96
104
  if (shouldEmitPendingResume) {
97
105
  onResume()
98
106
  }
@@ -100,7 +108,10 @@ class ReactActivityDelegateWrapper(
100
108
  return
101
109
  }
102
110
 
103
- return invokeDelegateMethod("loadApp", arrayOf(String::class.java), arrayOf(appKey))
111
+ invokeDelegateMethod<Unit, String?>("loadApp", arrayOf(String::class.java), arrayOf(appKey))
112
+ reactActivityLifecycleListeners.forEach { listener ->
113
+ listener.onContentChanged(activity)
114
+ }
104
115
  }
105
116
 
106
117
  override fun onCreate(savedInstanceState: Bundle?) {
package/build/Expo.d.ts CHANGED
@@ -3,4 +3,5 @@ import * as Logs from './logs/Logs';
3
3
  export { Logs };
4
4
  export { disableErrorHandling } from './errors/ExpoErrorManager';
5
5
  export { default as registerRootComponent } from './launch/registerRootComponent';
6
+ export { isRunningInExpoGo, getExpoGoProjectConfig } from './environment/ExpoGo';
6
7
  //# sourceMappingURL=Expo.d.ts.map
@@ -1 +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,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC"}
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,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC"}
package/build/Expo.js CHANGED
@@ -3,4 +3,5 @@ import * as Logs from './logs/Logs';
3
3
  export { Logs };
4
4
  export { disableErrorHandling } from './errors/ExpoErrorManager';
5
5
  export { default as registerRootComponent } from './launch/registerRootComponent';
6
+ export { isRunningInExpoGo, getExpoGoProjectConfig } from './environment/ExpoGo';
6
7
  //# sourceMappingURL=Expo.js.map
package/build/Expo.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Expo.js","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,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["import './Expo.fx';\n\nimport * as Logs from './logs/Logs';\n\nexport { Logs };\nexport { disableErrorHandling } from './errors/ExpoErrorManager';\nexport { default as registerRootComponent } from './launch/registerRootComponent';\n"]}
1
+ {"version":3,"file":"Expo.js","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,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["import './Expo.fx';\n\nimport * as Logs from './logs/Logs';\n\nexport { Logs };\nexport { disableErrorHandling } from './errors/ExpoErrorManager';\nexport { default as registerRootComponent } from './launch/registerRootComponent';\nexport { isRunningInExpoGo, getExpoGoProjectConfig } from './environment/ExpoGo';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DevLoadingView.d.ts","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,uBAmFrC"}
1
+ {"version":3,"file":"DevLoadingView.d.ts","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,uBAiFrC"}
@@ -55,7 +55,7 @@ export default function DevLoadingView() {
55
55
  if (!isDevLoading && !isAnimating) {
56
56
  return null;
57
57
  }
58
- return (React.createElement(Animated.View, { style: [styles.animatedContainer, { transform: [{ translateY }] }], pointerEvents: "none" },
58
+ return (React.createElement(Animated.View, { style: [styles.animatedContainer, { transform: [{ translateY }] }] },
59
59
  React.createElement(View, { style: styles.banner },
60
60
  React.createElement(View, { style: styles.contentContainer },
61
61
  React.createElement(View, { style: { flexDirection: 'row' } },
@@ -70,6 +70,7 @@ const styles = StyleSheet.create({
70
70
  web: 'fixed',
71
71
  default: 'absolute',
72
72
  }),
73
+ pointerEvents: 'none',
73
74
  bottom: 0,
74
75
  left: 0,
75
76
  right: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"DevLoadingView.js","sourceRoot":"","sources":["../../src/environment/DevLoadingView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,OAAO,UAAU,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ACF,CACF,CACF,CACO,CACjB,CAAC;AACJ,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,iBAAiB,EAAE;QACjB,sFAAsF;QACtF,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;YACxB,GAAG,EAAE,OAAO;YACZ,OAAO,EAAE,UAAU;SACpB,CAAC;QACF,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,kBAAkB,EAAE,CAAC,MAAM;KAC3C;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 { EventEmitter } from 'expo-modules-core';\nimport React, { useEffect, useState, useRef, useMemo } from 'react';\nimport { Animated, StyleSheet, Text, Platform, View } from 'react-native';\n\nimport DevLoadingViewNativeModule from './DevLoadingViewNativeModule';\nimport { getInitialSafeArea } from './getInitialSafeArea';\n\nexport default function DevLoadingView() {\n const [message, setMessage] = useState('Refreshing...');\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<EventEmitter>(() => {\n try {\n return new EventEmitter(DevLoadingViewNativeModule);\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(event: { message: string }) {\n setMessage(event.message);\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: Platform.OS !== 'web',\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 null;\n }\n\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}>{message}</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}\n\nconst styles = StyleSheet.create({\n animatedContainer: {\n // @ts-expect-error: fixed is not a valid value for position in Yoga but it is on web.\n position: Platform.select({\n web: 'fixed',\n default: 'absolute',\n }),\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: getInitialSafeArea().bottom,\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,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1E,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,OAAO,UAAU,cAAc;IACpC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;IACxD,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,CAAe,GAAG,EAAE;QACzC,IAAI;YACF,OAAO,IAAI,YAAY,CAAC,0BAA0B,CAAC,CAAC;SACrD;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,EA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,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 { EventEmitter } from 'expo-modules-core';\nimport React, { useEffect, useState, useRef, useMemo } from 'react';\nimport { Animated, StyleSheet, Text, Platform, View } from 'react-native';\n\nimport DevLoadingViewNativeModule from './DevLoadingViewNativeModule';\nimport { getInitialSafeArea } from './getInitialSafeArea';\n\nexport default function DevLoadingView() {\n const [message, setMessage] = useState('Refreshing...');\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<EventEmitter>(() => {\n try {\n return new EventEmitter(DevLoadingViewNativeModule);\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(event: { message: string }) {\n setMessage(event.message);\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: Platform.OS !== 'web',\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 null;\n }\n\n return (\n <Animated.View style={[styles.animatedContainer, { transform: [{ translateY }] }]}>\n <View style={styles.banner}>\n <View style={styles.contentContainer}>\n <View style={{ flexDirection: 'row' }}>\n <Text style={styles.text}>{message}</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}\n\nconst styles = StyleSheet.create({\n animatedContainer: {\n // @ts-expect-error: fixed is not a valid value for position in Yoga but it is on web.\n position: Platform.select({\n web: 'fixed',\n default: 'absolute',\n }),\n pointerEvents: 'none',\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: getInitialSafeArea().bottom,\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"]}
@@ -0,0 +1,30 @@
1
+ type ExpoGoProjectConfig = {
2
+ mainModuleName?: string;
3
+ debuggerHost?: string;
4
+ logUrl?: string;
5
+ developer?: {
6
+ tool?: string;
7
+ [key: string]: any;
8
+ };
9
+ packagerOpts?: ExpoGoPackagerOpts;
10
+ };
11
+ type ExpoGoPackagerOpts = {
12
+ hostType?: string;
13
+ dev?: boolean;
14
+ strict?: boolean;
15
+ minify?: boolean;
16
+ urlType?: string;
17
+ urlRandomness?: string;
18
+ lanType?: string;
19
+ [key: string]: any;
20
+ };
21
+ /**
22
+ * Returns a boolean value whether the app is running in Expo Go.
23
+ */
24
+ export declare function isRunningInExpoGo(): boolean;
25
+ /**
26
+ * Returns an Expo Go project config from the manifest or `null` if the app is not running in Expo Go.
27
+ */
28
+ export declare function getExpoGoProjectConfig(): ExpoGoProjectConfig | null;
29
+ export {};
30
+ //# sourceMappingURL=ExpoGo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoGo.d.ts","sourceRoot":"","sources":["../../src/environment/ExpoGo.ts"],"names":[],"mappings":"AAOA,KAAK,mBAAmB,GAAG;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;IACF,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAYF;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,mBAAmB,GAAG,IAAI,CAEnE"}
@@ -0,0 +1,24 @@
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+ // ExpoGo module is available only when the app is run in Expo Go,
3
+ // otherwise we use `null` instead of throwing an error.
4
+ const NativeExpoGoModule = (() => {
5
+ try {
6
+ return requireNativeModule('ExpoGo');
7
+ }
8
+ catch {
9
+ return null;
10
+ }
11
+ })();
12
+ /**
13
+ * Returns a boolean value whether the app is running in Expo Go.
14
+ */
15
+ export function isRunningInExpoGo() {
16
+ return NativeExpoGoModule != null;
17
+ }
18
+ /**
19
+ * Returns an Expo Go project config from the manifest or `null` if the app is not running in Expo Go.
20
+ */
21
+ export function getExpoGoProjectConfig() {
22
+ return NativeExpoGoModule?.projectConfig ?? null;
23
+ }
24
+ //# sourceMappingURL=ExpoGo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoGo.js","sourceRoot":"","sources":["../../src/environment/ExpoGo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA6BxD,kEAAkE;AAClE,wDAAwD;AACxD,MAAM,kBAAkB,GAAG,CAAC,GAAwB,EAAE;IACpD,IAAI;QACF,OAAO,mBAAmB,CAAC,QAAQ,CAAC,CAAC;KACtC;IAAC,MAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC,EAAE,CAAC;AAEL;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,kBAAkB,IAAI,IAAI,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,kBAAkB,EAAE,aAAa,IAAI,IAAI,CAAC;AACnD,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\ntype ExpoGoModule = {\n expoVersion: string;\n projectConfig: ExpoGoProjectConfig;\n};\n\ntype ExpoGoProjectConfig = {\n mainModuleName?: string;\n debuggerHost?: string;\n logUrl?: string;\n developer?: {\n tool?: string;\n [key: string]: any;\n };\n packagerOpts?: ExpoGoPackagerOpts;\n};\n\ntype ExpoGoPackagerOpts = {\n hostType?: string;\n dev?: boolean;\n strict?: boolean;\n minify?: boolean;\n urlType?: string;\n urlRandomness?: string;\n lanType?: string;\n [key: string]: any;\n};\n\n// ExpoGo module is available only when the app is run in Expo Go,\n// otherwise we use `null` instead of throwing an error.\nconst NativeExpoGoModule = ((): ExpoGoModule | null => {\n try {\n return requireNativeModule('ExpoGo');\n } catch {\n return null;\n }\n})();\n\n/**\n * Returns a boolean value whether the app is running in Expo Go.\n */\nexport function isRunningInExpoGo(): boolean {\n return NativeExpoGoModule != null;\n}\n\n/**\n * Returns an Expo Go project config from the manifest or `null` if the app is not running in Expo Go.\n */\nexport function getExpoGoProjectConfig(): ExpoGoProjectConfig | null {\n return NativeExpoGoModule?.projectConfig ?? null;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getInstallationIdAsync.d.ts","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.ts"],"names":[],"mappings":"AAMA,wBAA8B,sBAAsB,oBAmBnD"}
1
+ {"version":3,"file":"getInstallationIdAsync.d.ts","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.ts"],"names":[],"mappings":"AAMA,wBAA8B,sBAAsB,oBAoBnD"}
@@ -1,7 +1,7 @@
1
1
  import * as Application from 'expo-application';
2
- import uuidv5 from 'uuid/v5';
2
+ import { uuidv5 } from 'expo-modules-core';
3
3
  let installationId;
4
- const UUID_NAMESPACE = '29cc8a0d-747c-5f85-9ff9-f2f16636d963'; // uuidv5(0, "expo")
4
+ const UUID_NAMESPACE = '29cc8a0d-747c-5f85-9ff9-f2f16636d963';
5
5
  export default async function getInstallationIdAsync() {
6
6
  if (installationId) {
7
7
  return installationId;
@@ -1 +1 @@
1
- {"version":3,"file":"getInstallationIdAsync.js","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,MAAM,MAAM,SAAS,CAAC;AAE7B,IAAI,cAA6B,CAAC;AAClC,MAAM,cAAc,GAAG,sCAAsC,CAAC,CAAC,oBAAoB;AAEnF,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB;IAClD,IAAI,cAAc,EAAE;QAClB,OAAO,cAAc,CAAC;KACvB;IAED,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAC,sBAAsB,EAAE,CAAC;IACvE,MAAM,gBAAgB,GAAG,WAAW,CAAC,aAAc,CAAC;IAEpD,yEAAyE;IACzE,yEAAyE;IACzE,QAAQ;IACR,IAAI,mBAAmB,EAAE;QACvB,cAAc,GAAG,MAAM,CAAC,GAAG,gBAAgB,IAAI,mBAAmB,EAAE,EAAE,cAAc,CAAC,CAAC;KACvF;SAAM;QACL,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,wBAAwB,EAAE,CAAC;QACtE,cAAc,GAAG,MAAM,CAAC,GAAG,gBAAgB,IAAI,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC;KAC9F;IAED,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["import * as Application from 'expo-application';\nimport uuidv5 from 'uuid/v5';\n\nlet installationId: string | null;\nconst UUID_NAMESPACE = '29cc8a0d-747c-5f85-9ff9-f2f16636d963'; // uuidv5(0, \"expo\")\n\nexport default async function getInstallationIdAsync() {\n if (installationId) {\n return installationId;\n }\n\n const identifierForVendor = await Application.getIosIdForVendorAsync();\n const bundleIdentifier = Application.applicationId!;\n\n // It's unlikely identifierForVendor will be null (it returns null if the\n // device has been restarted but not yet unlocked), but let's handle this\n // case.\n if (identifierForVendor) {\n installationId = uuidv5(`${bundleIdentifier}-${identifierForVendor}`, UUID_NAMESPACE);\n } else {\n const installationTime = await Application.getInstallationTimeAsync();\n installationId = uuidv5(`${bundleIdentifier}-${installationTime.getTime()}`, UUID_NAMESPACE);\n }\n\n return installationId;\n}\n"]}
1
+ {"version":3,"file":"getInstallationIdAsync.js","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,IAAI,cAA6B,CAAC;AAClC,MAAM,cAAc,GAAG,sCAAsC,CAAC;AAE9D,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,sBAAsB;IAClD,IAAI,cAAc,EAAE;QAClB,OAAO,cAAc,CAAC;KACvB;IAED,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAC,sBAAsB,EAAE,CAAC;IACvE,MAAM,gBAAgB,GAAG,WAAW,CAAC,aAAc,CAAC;IAEpD,yEAAyE;IACzE,yEAAyE;IACzE,QAAQ;IAER,IAAI,mBAAmB,EAAE;QACvB,cAAc,GAAG,MAAM,CAAC,GAAG,gBAAgB,IAAI,mBAAmB,EAAE,EAAE,cAAc,CAAC,CAAC;KACvF;SAAM;QACL,MAAM,gBAAgB,GAAG,MAAM,WAAW,CAAC,wBAAwB,EAAE,CAAC;QACtE,cAAc,GAAG,MAAM,CAAC,GAAG,gBAAgB,IAAI,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC;KAC9F;IAED,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["import * as Application from 'expo-application';\nimport { uuidv5 } from 'expo-modules-core';\n\nlet installationId: string | null;\nconst UUID_NAMESPACE = '29cc8a0d-747c-5f85-9ff9-f2f16636d963';\n\nexport default async function getInstallationIdAsync() {\n if (installationId) {\n return installationId;\n }\n\n const identifierForVendor = await Application.getIosIdForVendorAsync();\n const bundleIdentifier = Application.applicationId!;\n\n // It's unlikely identifierForVendor will be null (it returns null if the\n // device has been restarted but not yet unlocked), but let's handle this\n // case.\n\n if (identifierForVendor) {\n installationId = uuidv5(`${bundleIdentifier}-${identifierForVendor}`, UUID_NAMESPACE);\n } else {\n const installationTime = await Application.getInstallationTimeAsync();\n installationId = uuidv5(`${bundleIdentifier}-${installationTime.getTime()}`, UUID_NAMESPACE);\n }\n\n return installationId;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { v4 as uuidv4 } from 'uuid';
1
+ import { uuidv4 } from 'expo-modules-core';
2
2
  const INSTALLATION_ID_KEY = 'installationId';
3
3
  let installationId = null;
4
4
  export default async function getInstallationIdAsync() {
@@ -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,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
+ {"version":3,"file":"getInstallationIdAsync.web.js","sourceRoot":"","sources":["../../src/environment/getInstallationIdAsync.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,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,EAAY,CAAC;IACpC,+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 { uuidv4 } from 'expo-modules-core';\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() as string;\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 @@
1
- {"version":3,"file":"RemoteLogging.d.ts","sourceRoot":"","sources":["../../src/logs/RemoteLogging.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAO5D,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAU3D,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;AAC5C,MAAM,MAAM,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,KAAK,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"}
1
+ {"version":3,"file":"RemoteLogging.d.ts","sourceRoot":"","sources":["../../src/logs/RemoteLogging.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAM5D,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAU3D,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;AAC5C,MAAM,MAAM,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,KAAK,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"}
@@ -1,8 +1,7 @@
1
1
  import Constants from 'expo-constants';
2
- import { Platform } from 'expo-modules-core';
2
+ import { Platform, uuidv4 } from 'expo-modules-core';
3
3
  import { EventEmitter } from 'fbemitter';
4
4
  import invariant from 'invariant';
5
- import { v4 as uuidv4 } from 'uuid';
6
5
  import getInstallationIdAsync from '../environment/getInstallationIdAsync';
7
6
  import LogSerialization from './LogSerialization';
8
7
  const _sessionId = uuidv4();
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteLogging.js","sourceRoot":"","sources":["../../src/logs/RemoteLogging.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,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kB,CAAC;KAC3B;IAED,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;QACxC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;KAC1B;IAED,kBAAkB,GAAG,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3C,kBAAkB,GAAG,GAAG,EAAE;YACxB,SAAS,CAAC,CAAC,cAAc,EAAE,wCAAwC,CAAC,CAAC;YACrE,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,uCAAuC,CAAC,CAAC;YAEtE,kBAAkB,GAAG,IAAI,CAAC;YAC1B,kBAAkB,GAAG,IAAI,CAAC;YAE1B,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["import Constants from 'expo-constants';\nimport { Platform } from 'expo-modules-core';\nimport { EventEmitter, EventSubscription } from 'fbemitter';\nimport invariant from 'invariant';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport getInstallationIdAsync from '../environment/getInstallationIdAsync';\nimport LogSerialization from './LogSerialization';\n\nexport type LogLevel = 'debug' | 'info' | 'warn' | 'error';\n\ntype LogEntry = {\n count: number;\n level: LogLevel;\n body: LogData[];\n includesStack: boolean;\n groupDepth?: number;\n} & LogEntryFields;\n\nexport type LogEntryFields = {\n shouldHide?: boolean;\n groupDepth?: number;\n groupCollapsed?: boolean;\n};\n\nexport type LogData = string | LogErrorData;\nexport type LogErrorData = { message: string; stack: string };\n\ntype TransportErrorListener = (event: { error: Error; response?: Response }) => void;\n\nconst _sessionId = uuidv4();\nconst _logQueue: LogEntry[] = [];\nconst _transportEventEmitter = new EventEmitter();\n\nlet _logCounter = 0;\nlet _isSendingLogs = false;\nlet _completionPromise: Promise<void> | null = null;\nlet _resolveCompletion: (() => void) | null = null;\n\nasync function enqueueRemoteLogAsync(\n level: LogLevel,\n additionalFields: LogEntryFields,\n data: unknown[]\n): Promise<void> {\n if (_isReactNativeWarning(data)) {\n // Remove the stack trace from the warning message since we'll capture our own\n if (data.length === 0) {\n throw new Error(`Warnings must include log arguments`);\n }\n const warning = data[0];\n if (typeof warning !== 'string') {\n throw new TypeError(`The log argument for a warning must be a string`);\n }\n const lines = warning.split('\\n');\n if (lines.length > 1 && /^\\s+in /.test(lines[1])) {\n data[0] = lines[0];\n }\n }\n\n const { body, includesStack } = await LogSerialization.serializeLogDataAsync(data, level);\n\n _logQueue.push({\n count: _logCounter++,\n level,\n body,\n includesStack,\n ...additionalFields,\n });\n\n // Send the logs asynchronously (system errors are emitted with transport error events) and throw an uncaught error\n _sendRemoteLogsAsync().catch((error) => {\n setImmediate(() => {\n throw error;\n });\n });\n}\n\nasync function _sendRemoteLogsAsync(): Promise<void> {\n if (_isSendingLogs || !_logQueue.length) {\n return;\n }\n\n // Our current transport policy is to send all of the pending log messages in one batch. If we opt\n // for another policy (ex: throttling) this is where to to implement it.\n const batch = _logQueue.splice(0);\n\n const logUrl = Constants.expoGoConfig?.logUrl;\n if (typeof logUrl !== 'string') {\n throw new Error('The Expo project manifest must specify `logUrl`');\n }\n\n _isSendingLogs = true;\n try {\n await _sendNextLogBatchAsync(batch, logUrl);\n } finally {\n _isSendingLogs = false;\n }\n\n if (_logQueue.length) {\n return _sendRemoteLogsAsync();\n } else if (_resolveCompletion) {\n _resolveCompletion();\n }\n}\n\nasync function _sendNextLogBatchAsync(batch: LogEntry[], logUrl: string): Promise<void> {\n let response;\n\n const headers = {\n 'Content-Type': 'application/json',\n Connection: 'keep-alive',\n 'Proxy-Connection': 'keep-alive',\n Accept: 'application/json',\n 'Device-Id': await getInstallationIdAsync(),\n 'Session-Id': _sessionId,\n 'Expo-Platform': Platform.OS,\n };\n if (Constants.deviceName) {\n headers['Device-Name'] = Constants.deviceName;\n }\n try {\n response = await fetch(logUrl, {\n method: 'POST',\n headers,\n body: JSON.stringify(batch),\n });\n } catch (error) {\n _transportEventEmitter.emit('error', { error });\n return;\n }\n\n const success = response.status >= 200 && response.status < 300;\n if (!success) {\n _transportEventEmitter.emit('error', {\n error: new Error(`An HTTP error occurred when sending remote logs`),\n response,\n });\n }\n}\n\nfunction addTransportErrorListener(listener: TransportErrorListener): EventSubscription {\n return _transportEventEmitter.addListener('error', listener);\n}\n\nfunction _isReactNativeWarning(data: unknown[]): boolean {\n // NOTE: RN does the same thing internally for YellowBox\n const message = data[0];\n return data.length === 1 && typeof message === 'string' && message.startsWith('Warning: ');\n}\n\nexport default {\n enqueueRemoteLogAsync,\n addTransportErrorListener,\n};\n\n/**\n * Returns a promise that resolves when all entries in the log queue have been sent. This method is\n * intended for testing only.\n */\nexport function __waitForEmptyLogQueueAsync(): Promise<void> {\n if (_completionPromise) {\n return _completionPromise;\n }\n\n if (!_isSendingLogs && !_logQueue.length) {\n return Promise.resolve();\n }\n\n _completionPromise = new Promise((resolve) => {\n _resolveCompletion = () => {\n invariant(!_isSendingLogs, `Must not be sending logs at completion`);\n invariant(!_logQueue.length, `Log queue must be empty at completion`);\n\n _completionPromise = null;\n _resolveCompletion = null;\n\n resolve();\n };\n });\n return _completionPromise;\n}\n"]}
1
+ {"version":3,"file":"RemoteLogging.js","sourceRoot":"","sources":["../../src/logs/RemoteLogging.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAqB,MAAM,WAAW,CAAC;AAC5D,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,OAAO,sBAAsB,MAAM,uCAAuC,CAAC;AAC3E,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAuBlD,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC;AAC5B,MAAM,SAAS,GAAe,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,IAAI,YAAY,EAAE,CAAC;AAElD,IAAI,WAAW,GAAG,CAAC,CAAC;AACpB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;YAE1B,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["import Constants from 'expo-constants';\nimport { Platform, uuidv4 } from 'expo-modules-core';\nimport { EventEmitter, EventSubscription } from 'fbemitter';\nimport invariant from 'invariant';\n\nimport getInstallationIdAsync from '../environment/getInstallationIdAsync';\nimport LogSerialization from './LogSerialization';\n\nexport type LogLevel = 'debug' | 'info' | 'warn' | 'error';\n\ntype LogEntry = {\n count: number;\n level: LogLevel;\n body: LogData[];\n includesStack: boolean;\n groupDepth?: number;\n} & LogEntryFields;\n\nexport type LogEntryFields = {\n shouldHide?: boolean;\n groupDepth?: number;\n groupCollapsed?: boolean;\n};\n\nexport type LogData = string | LogErrorData;\nexport type LogErrorData = { message: string; stack: string };\n\ntype TransportErrorListener = (event: { error: Error; response?: Response }) => void;\n\nconst _sessionId = uuidv4();\nconst _logQueue: LogEntry[] = [];\nconst _transportEventEmitter = new EventEmitter();\n\nlet _logCounter = 0;\nlet _isSendingLogs = false;\nlet _completionPromise: Promise<void> | null = null;\nlet _resolveCompletion: (() => void) | null = null;\n\nasync function enqueueRemoteLogAsync(\n level: LogLevel,\n additionalFields: LogEntryFields,\n data: unknown[]\n): Promise<void> {\n if (_isReactNativeWarning(data)) {\n // Remove the stack trace from the warning message since we'll capture our own\n if (data.length === 0) {\n throw new Error(`Warnings must include log arguments`);\n }\n const warning = data[0];\n if (typeof warning !== 'string') {\n throw new TypeError(`The log argument for a warning must be a string`);\n }\n const lines = warning.split('\\n');\n if (lines.length > 1 && /^\\s+in /.test(lines[1])) {\n data[0] = lines[0];\n }\n }\n\n const { body, includesStack } = await LogSerialization.serializeLogDataAsync(data, level);\n\n _logQueue.push({\n count: _logCounter++,\n level,\n body,\n includesStack,\n ...additionalFields,\n });\n\n // Send the logs asynchronously (system errors are emitted with transport error events) and throw an uncaught error\n _sendRemoteLogsAsync().catch((error) => {\n setImmediate(() => {\n throw error;\n });\n });\n}\n\nasync function _sendRemoteLogsAsync(): Promise<void> {\n if (_isSendingLogs || !_logQueue.length) {\n return;\n }\n\n // Our current transport policy is to send all of the pending log messages in one batch. If we opt\n // for another policy (ex: throttling) this is where to to implement it.\n const batch = _logQueue.splice(0);\n\n const logUrl = Constants.expoGoConfig?.logUrl;\n if (typeof logUrl !== 'string') {\n throw new Error('The Expo project manifest must specify `logUrl`');\n }\n\n _isSendingLogs = true;\n try {\n await _sendNextLogBatchAsync(batch, logUrl);\n } finally {\n _isSendingLogs = false;\n }\n\n if (_logQueue.length) {\n return _sendRemoteLogsAsync();\n } else if (_resolveCompletion) {\n _resolveCompletion();\n }\n}\n\nasync function _sendNextLogBatchAsync(batch: LogEntry[], logUrl: string): Promise<void> {\n let response;\n\n const headers = {\n 'Content-Type': 'application/json',\n Connection: 'keep-alive',\n 'Proxy-Connection': 'keep-alive',\n Accept: 'application/json',\n 'Device-Id': await getInstallationIdAsync(),\n 'Session-Id': _sessionId,\n 'Expo-Platform': Platform.OS,\n };\n if (Constants.deviceName) {\n headers['Device-Name'] = Constants.deviceName;\n }\n try {\n response = await fetch(logUrl, {\n method: 'POST',\n headers,\n body: JSON.stringify(batch),\n });\n } catch (error) {\n _transportEventEmitter.emit('error', { error });\n return;\n }\n\n const success = response.status >= 200 && response.status < 300;\n if (!success) {\n _transportEventEmitter.emit('error', {\n error: new Error(`An HTTP error occurred when sending remote logs`),\n response,\n });\n }\n}\n\nfunction addTransportErrorListener(listener: TransportErrorListener): EventSubscription {\n return _transportEventEmitter.addListener('error', listener);\n}\n\nfunction _isReactNativeWarning(data: unknown[]): boolean {\n // NOTE: RN does the same thing internally for YellowBox\n const message = data[0];\n return data.length === 1 && typeof message === 'string' && message.startsWith('Warning: ');\n}\n\nexport default {\n enqueueRemoteLogAsync,\n addTransportErrorListener,\n};\n\n/**\n * Returns a promise that resolves when all entries in the log queue have been sent. This method is\n * intended for testing only.\n */\nexport function __waitForEmptyLogQueueAsync(): Promise<void> {\n if (_completionPromise) {\n return _completionPromise;\n }\n\n if (!_isSendingLogs && !_logQueue.length) {\n return Promise.resolve();\n }\n\n _completionPromise = new Promise((resolve) => {\n _resolveCompletion = () => {\n invariant(!_isSendingLogs, `Must not be sending logs at completion`);\n invariant(!_logQueue.length, `Log queue must be empty at completion`);\n\n _completionPromise = null;\n _resolveCompletion = null;\n\n resolve();\n };\n });\n return _completionPromise;\n}\n"]}
@@ -15,72 +15,72 @@
15
15
  "expo-apple-authentication": "~6.1.0",
16
16
  "expo-application": "~5.3.0",
17
17
  "expo-asset": "~8.10.1",
18
- "expo-auth-session": "~5.0.2",
19
- "expo-av": "~13.4.1",
18
+ "expo-auth-session": "~5.1.0",
19
+ "expo-av": "~13.5.0",
20
20
  "expo-background-fetch": "~11.3.0",
21
- "expo-barcode-scanner": "~12.5.3",
21
+ "expo-barcode-scanner": "~12.6.0",
22
22
  "expo-battery": "~7.3.0",
23
23
  "expo-blur": "~12.4.1",
24
24
  "expo-brightness": "~11.4.0",
25
- "expo-build-properties": "~0.8.3",
26
- "expo-calendar": "~11.3.0",
27
- "expo-camera": "~13.4.2",
28
- "expo-cellular": "~5.3.0",
25
+ "expo-build-properties": "~0.9.0",
26
+ "expo-calendar": "~11.4.0",
27
+ "expo-camera": "~13.5.0",
28
+ "expo-cellular": "~5.4.0",
29
29
  "expo-checkbox": "~2.4.0",
30
30
  "expo-clipboard": "~4.3.0",
31
- "expo-constants": "~14.4.2",
32
- "expo-contacts": "~12.2.0",
33
- "expo-crypto": "~12.4.1",
34
- "expo-dev-client": "~2.4.6",
31
+ "expo-constants": "~14.5.0",
32
+ "expo-contacts": "~12.3.0",
33
+ "expo-crypto": "~12.5.0",
34
+ "expo-dev-client": "~2.4.7",
35
35
  "expo-device": "~5.4.0",
36
- "expo-document-picker": "~11.5.4",
36
+ "expo-document-picker": "~11.6.0",
37
37
  "expo-face-detector": "~12.2.0",
38
- "expo-file-system": "~15.4.2",
39
- "expo-font": "~11.4.0",
40
- "expo-gl": "~13.0.1",
38
+ "expo-file-system": "~15.5.0",
39
+ "expo-font": "~11.5.0",
40
+ "expo-gl": "~13.1.0",
41
41
  "expo-google-app-auth": "~8.3.0",
42
42
  "expo-haptics": "~12.4.0",
43
- "expo-image": "~1.3.2",
43
+ "expo-image": "~1.4.0",
44
44
  "expo-image-loader": "~4.3.0",
45
- "expo-image-manipulator": "~11.3.0",
46
- "expo-image-picker": "~14.3.1",
47
- "expo-in-app-purchases": "~14.3.0",
48
- "expo-insights": "~0.2.0",
45
+ "expo-image-manipulator": "~11.4.0",
46
+ "expo-image-picker": "~14.4.0",
47
+ "expo-in-app-purchases": "~14.4.0",
49
48
  "expo-intent-launcher": "~10.7.0",
50
- "expo-keep-awake": "~12.3.0",
49
+ "expo-insights": "~0.2.0",
50
+ "expo-keep-awake": "~12.4.0",
51
51
  "expo-linear-gradient": "~12.3.0",
52
52
  "expo-linking": "~5.0.2",
53
53
  "expo-local-authentication": "~13.4.1",
54
54
  "expo-localization": "~14.3.0",
55
- "expo-location": "~16.1.0",
55
+ "expo-location": "~16.2.0",
56
56
  "expo-mail-composer": "~12.3.0",
57
- "expo-media-library": "~15.4.0",
58
- "expo-module-template": "~10.9.5",
59
- "expo-modules-core": "~1.5.7",
60
- "expo-navigation-bar": "~2.3.0",
57
+ "expo-media-library": "~15.5.0",
58
+ "expo-module-template": "~10.10.0",
59
+ "expo-modules-core": "~1.6.0",
60
+ "expo-navigation-bar": "~2.4.0",
61
61
  "expo-network": "~5.4.0",
62
- "expo-notifications": "~0.20.1",
63
- "expo-permissions": "~14.2.1",
64
- "expo-print": "~12.4.2",
62
+ "expo-notifications": "~0.21.0",
63
+ "expo-permissions": "~14.3.0",
64
+ "expo-print": "~12.5.0",
65
65
  "expo-random": "~13.2.0",
66
- "expo-router": "2.0.0",
66
+ "expo-router": "2.0.0-rc.8",
67
67
  "expo-screen-capture": "~5.3.0",
68
- "expo-screen-orientation": "~6.0.3",
69
- "expo-secure-store": "~12.3.1",
70
- "expo-sensors": "~12.3.0",
68
+ "expo-screen-orientation": "~6.1.0",
69
+ "expo-secure-store": "~12.4.0",
70
+ "expo-sensors": "~12.4.0",
71
71
  "expo-sharing": "~11.5.0",
72
72
  "expo-sms": "~11.4.0",
73
73
  "expo-speech": "~11.3.0",
74
- "expo-splash-screen": "~0.20.4",
75
- "expo-sqlite": "~11.3.1",
76
- "expo-status-bar": "~1.6.0",
74
+ "expo-splash-screen": "~0.21.0",
75
+ "expo-sqlite": "~11.4.0",
76
+ "expo-status-bar": "~1.7.0",
77
77
  "expo-store-review": "~6.4.0",
78
78
  "expo-system-ui": "~2.4.0",
79
79
  "expo-task-manager": "~11.3.0",
80
80
  "expo-tracking-transparency": "~3.1.0",
81
- "expo-updates": "~0.18.10",
81
+ "expo-updates": "~0.19.0",
82
82
  "expo-video-thumbnails": "~7.4.0",
83
- "expo-web-browser": "~12.3.2",
83
+ "expo-web-browser": "~12.4.0",
84
84
  "lottie-react-native": "5.1.6",
85
85
  "react": "18.2.0",
86
86
  "react-dom": "18.2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo",
3
- "version": "49.0.4",
3
+ "version": "50.0.0-alpha.0",
4
4
  "description": "The Expo SDK",
5
5
  "main": "build/Expo.js",
6
6
  "module": "build/Expo.js",
@@ -58,36 +58,34 @@
58
58
  "homepage": "https://github.com/expo/expo/tree/main/packages/expo",
59
59
  "dependencies": {
60
60
  "@babel/runtime": "^7.20.0",
61
- "@expo/cli": "0.10.11",
61
+ "@expo/cli": "0.11.0",
62
+ "@expo/config": "8.2.0",
63
+ "@expo/config-plugins": "7.3.0",
62
64
  "@expo/vector-icons": "^13.0.0",
63
- "@expo/config-plugins": "7.2.5",
64
- "@expo/config": "8.1.2",
65
- "babel-preset-expo": "~9.5.0",
65
+ "babel-preset-expo": "~9.6.0",
66
66
  "expo-application": "~5.3.0",
67
67
  "expo-asset": "~8.10.1",
68
- "expo-constants": "~14.4.2",
69
- "expo-file-system": "~15.4.2",
70
- "expo-font": "~11.4.0",
71
- "expo-keep-awake": "~12.3.0",
68
+ "expo-constants": "~14.5.0",
69
+ "expo-file-system": "~15.5.0",
70
+ "expo-font": "~11.5.0",
71
+ "expo-keep-awake": "~12.4.0",
72
72
  "expo-modules-autolinking": "1.5.0",
73
- "expo-modules-core": "1.5.7",
73
+ "expo-modules-core": "1.6.0",
74
74
  "fbemitter": "^3.0.0",
75
75
  "invariant": "^2.2.4",
76
76
  "md5-file": "^3.2.3",
77
77
  "node-fetch": "^2.6.7",
78
- "pretty-format": "^26.5.2",
79
- "uuid": "^3.4.0"
78
+ "pretty-format": "^26.5.2"
80
79
  },
81
80
  "devDependencies": {
82
81
  "@types/fbemitter": "^2.0.32",
83
82
  "@types/invariant": "^2.2.33",
84
83
  "@types/react": "~18.0.14",
85
84
  "@types/react-test-renderer": "^18.0.0",
86
- "@types/uuid": "^3.4.7",
87
- "expo-module-scripts": "^3.0.11",
85
+ "expo-module-scripts": "^3.0.12",
88
86
  "react": "18.2.0",
89
87
  "react-dom": "18.2.0",
90
88
  "react-native": "0.72.3"
91
89
  },
92
- "gitHead": "e452983c7b44411a3c6e49ca297c1e4a6508a93a"
90
+ "gitHead": "663654577a7068c641b5e9474efbc502e3f334ea"
93
91
  }