@userflow-tech/react-native 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +160 -126
- package/docs/anchoring.md +3 -4
- package/docs/troubleshooting.md +27 -24
- package/expo-plugin/hostDependencyWarnings.d.ts +5 -2
- package/expo-plugin/hostDependencyWarnings.d.ts.map +1 -1
- package/expo-plugin/hostDependencyWarnings.js +12 -2
- package/expo-plugin/hostDependencyWarnings.js.map +1 -1
- package/lib/commonjs/authoring/capturePickerScreenshot.js +9 -1
- package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -1
- package/lib/commonjs/evalJs/getWebView.js +5 -13
- package/lib/commonjs/evalJs/getWebView.js.map +1 -1
- package/lib/commonjs/hostAppVersion.js +6 -1
- package/lib/commonjs/hostAppVersion.js.map +1 -1
- package/lib/commonjs/installCheck.js +61 -29
- package/lib/commonjs/installCheck.js.map +1 -1
- package/lib/commonjs/nativeModules.js +44 -0
- package/lib/commonjs/nativeModules.js.map +1 -0
- package/lib/commonjs/network.js +20 -7
- package/lib/commonjs/network.js.map +1 -1
- package/lib/commonjs/pairing/tokenStorage.js +17 -4
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/surfaces/BannerSurface.js +3 -1
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -1
- package/lib/commonjs/surfaces/safeArea.js +6 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/authoring/capturePickerScreenshot.js +9 -1
- package/lib/module/authoring/capturePickerScreenshot.js.map +1 -1
- package/lib/module/evalJs/getWebView.js +5 -13
- package/lib/module/evalJs/getWebView.js.map +1 -1
- package/lib/module/hostAppVersion.js +6 -1
- package/lib/module/hostAppVersion.js.map +1 -1
- package/lib/module/installCheck.js +56 -26
- package/lib/module/installCheck.js.map +1 -1
- package/lib/module/nativeModules.js +40 -0
- package/lib/module/nativeModules.js.map +1 -0
- package/lib/module/network.js +20 -7
- package/lib/module/network.js.map +1 -1
- package/lib/module/pairing/tokenStorage.js +17 -4
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/surfaces/BannerSurface.js +3 -1
- package/lib/module/surfaces/BannerSurface.js.map +1 -1
- package/lib/module/surfaces/safeArea.js +5 -0
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +2 -1
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts +1 -1
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts +18 -3
- package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/nativeModules.d.ts +13 -0
- package/lib/typescript/commonjs/src/nativeModules.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/network.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +2 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -1
- package/lib/typescript/module/src/evalJs/getWebView.d.ts +2 -1
- package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -1
- package/lib/typescript/module/src/hostAppVersion.d.ts +1 -1
- package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -1
- package/lib/typescript/module/src/installCheck.d.ts +18 -3
- package/lib/typescript/module/src/installCheck.d.ts.map +1 -1
- package/lib/typescript/module/src/nativeModules.d.ts +13 -0
- package/lib/typescript/module/src/nativeModules.d.ts.map +1 -0
- package/lib/typescript/module/src/network.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +2 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +13 -8
- package/src/authoring/capturePickerScreenshot.ts +10 -1
- package/src/evalJs/getWebView.ts +6 -13
- package/src/hostAppVersion.ts +7 -1
- package/src/installCheck.ts +67 -33
- package/src/nativeModules.ts +48 -0
- package/src/network.ts +27 -11
- package/src/pairing/tokenStorage.ts +23 -7
- package/src/surfaces/BannerSurface.tsx +7 -5
- package/src/surfaces/safeArea.ts +5 -0
- package/src/version.ts +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/package.json +1 -1
- package/docs/theme-mapping.md +0 -130
- package/docs/webview-custom-banner-poc.md +0 -64
package/docs/troubleshooting.md
CHANGED
|
@@ -5,29 +5,32 @@ Messages are quoted exactly so you can search logs for them.
|
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
|
-
| Symptom / log message
|
|
9
|
-
|
|
|
10
|
-
| `
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
| `
|
|
14
|
-
|
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
| `[Userflow]
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
| `- react-native-
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
8
|
+
| Symptom / log message | Likely cause | Fix |
|
|
9
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
|
+
| `expo doctor` reports `react-native-view-shot` | The app pins `^5.0.0` and Expo SDK 54's expected version is 4.0.3. | Keep the pin. Add `"react-native-view-shot"` to `expo.install.exclude`. |
|
|
11
|
+
| `Unable to resolve module` for an optional peer (`netinfo`, `expo-secure-store`, `expo-router`, safe-area, navigation) | A custom Metro config does not extend `getDefaultConfig`, so `allowOptionalDependencies` is off. | Extend `getDefaultConfig` from `expo/metro-config` or `@react-native/metro-config`. |
|
|
12
|
+
| `ERESOLVE` while installing `@userflow-tech/react-native` | The app already has a version outside a peer range: view-shot 4.0.3 (what unpinned `npx expo install` installs on Expo SDK 54), NetInfo 9.x, safe-area-context 3.x, WebView 13.6.x or 14.x, or React Native older than 0.76. | Move that package into the range in the package README. For view-shot, npm prints `Found: react-native-view-shot@4.0.3` and `peer react-native-view-shot@"^5.0.0" from @userflow-tech/react-native`. Install the SDK and `react-native-view-shot@^5.0.0` in one command, then add `"react-native-view-shot"` to `expo.install.exclude` on Expo SDK 54. Do not retry with `--force` or `--legacy-peer-deps`; that leaves 4.0.3 installed. Raise React Native to 0.76 or later when that is the conflict. |
|
|
13
|
+
| Yarn 1 or `npm install --legacy-peer-deps` succeeded, but `react-native-webview` or `react-native-view-shot` is not installed | Those installs do not fetch peers. WebView and view-shot are required peers, not dependencies. | Install `react-native-webview` and `react-native-view-shot@^5.0.0` in the app, then rebuild native. |
|
|
14
|
+
| Banners, flow cards, or Builder bars draw under the status bar, notch, or home indicator. Development logs `[Userflow] react-native-safe-area-context is not installed, so banners, flow cards, and Builder bars draw under the status bar and home indicator. Install it (npx expo install react-native-safe-area-context) and wrap the app in <SafeAreaProvider>.` | `react-native-safe-area-context` is not installed, so insets are zero. | Install the package and wrap the tree in `<SafeAreaProvider>`. |
|
|
15
|
+
| `Uncaught Error` / `NativeModule.RNCNetInfo is null` as soon as `Userflow.init` runs | On SDK 0.3.1 and earlier, NetInfo's JavaScript was loaded while its native module was not in the binary. Debug builds show a red screen. Dismissing it leaves the app running; a release build can crash. | Link `@react-native-community/netinfo` and rebuild, or remove it. Current versions skip NetInfo when `RNCNetInfo` is not registered and log one dev warning instead. |
|
|
16
|
+
| `[@userflow-tech/react-native] schemeId "…" looks like an environment id. Pass the scheme_id value that starts with userflow- (an opaque id from the dashboard), not the environment UUID.` | The config plugin received the environment UUID. | Pass the `scheme_id` (`userflow-…`) from the dashboard. |
|
|
17
|
+
| `No schemeId was passed, so the plugin left the native config unchanged. Builder preview and pairing links will not open this app. Pass the environment scheme_id (userflow-...) from the Userflow dashboard as the plugin schemeId.` | `expo prebuild` ran the plugin without `schemeId`. | Add `{ "schemeId": "userflow-…" }` and rebuild native. |
|
|
18
|
+
| react-native-view-shot is not a direct dependency. Builder element selection needs >=5.0.0. On Expo SDK 54, an unpinned `npx expo install react-native-view-shot` resolves 4.0.3. Pin ^5.0.0. If expo doctor reports a version mismatch, add "react-native-view-shot" to expo.install.exclude. | Prebuild did not find view-shot in the app `package.json`. | `npx expo install react-native-view-shot@^5.0.0` and rebuild. |
|
|
19
|
+
| `react-native-safe-area-context is not listed in the app package.json. Expo SDK 53 does not autolink native modules that the app only receives indirectly. Without the native module, banners, flow cards, and Builder bars draw under the status bar and home indicator. Install it in the app (npx expo install react-native-safe-area-context) and wrap the app in <SafeAreaProvider>.` | Expo SDK older than 54, and safe-area-context is not a direct dependency, so its native module is not autolinked. | `npx expo install react-native-safe-area-context` and wrap the tree in `<SafeAreaProvider>`. |
|
|
20
|
+
| `[Userflow] react-native-view-shot@4.0.3 is older than 5.0.0, so Builder element selection may not get a screenshot.` The installed version is filled in. The warning also says not to retry with `--force` or `--legacy-peer-deps`. | view-shot 4.x is installed, usually because an `ERESOLVE` was retried with `--force` or `--legacy-peer-deps`, or Expo SDK 54's default 4.0.3 was left in place. | Install `react-native-view-shot@^5.0.0` in the same command as the SDK and rebuild. On Expo SDK 54, add `"react-native-view-shot"` to `expo.install.exclude`. |
|
|
21
|
+
| `react-native-view-shot@4.0.3 is older than 5.0.0. Expo SDK 54's default is 4.0.3, which does not work with this SDK. Pin ^5.0.0 and add "react-native-view-shot" to expo.install.exclude if expo doctor complains.` | The app has view-shot 4.x. | Pin `^5.0.0` and rebuild. |
|
|
22
|
+
| `@react-native-async-storage/async-storage is not listed in the app package.json. Expo SDK 53 does not autolink native modules that the app only receives indirectly. Install it in the app (npx expo install @react-native-async-storage/async-storage) and rebuild.` | Expo SDK older than 54, and AsyncStorage is only a transitive dependency. The WebView line is the same shape with `react-native-webview`. | Install that package in the app and rebuild. |
|
|
23
|
+
| `[Userflow] Native setup is incomplete. Flows may not run until you fix the following, then rebuild the app (a Metro reload is not enough):` | Dev-only check on the first `Userflow.init`. Following lines name each missing native module. A missing safe-area package is a separate warning, because flows still run. | Install the named packages and rebuild. The footer is `See node_modules/@userflow-tech/react-native/docs/troubleshooting.md.` |
|
|
24
|
+
| `- @react-native-async-storage/async-storage is not linked. Anonymous users and Builder pairing will not persist. Add it to the app package.json (npx expo install @react-native-async-storage/async-storage), run pod install on iOS, and rebuild.` | AsyncStorage's native module is not in this binary. | Add it to the app `package.json`, run `pod install` on iOS, and rebuild. |
|
|
25
|
+
| `- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install react-native-view-shot@^5.0.0 and rebuild. On Expo SDK 54, pin ^5.0.0; an unpinned npx expo install resolves 4.0.3.` | `RNViewShot` is not registered. | Install `react-native-view-shot@^5.0.0` and rebuild. |
|
|
26
|
+
| `- react-native-webview is not linked. Evaluate JavaScript and WebView banners will not run. Install it (npx expo install react-native-webview) and rebuild.` | The WebView native module is not registered. | Install `react-native-webview` and rebuild. |
|
|
27
|
+
| `- react-native-device-info is not linked, so app_version and app_build are not sent. npm install react-native-device-info, then rebuild.` | Bare React Native, and `RNDeviceInfo` is not registered. Expo apps that have `expo-constants` do not log this line. | `npm install react-native-device-info` and rebuild. |
|
|
28
|
+
| `[Userflow] This app is running in Expo Go, which cannot load the SDK native modules. Builder preview links will not open the app. Use a development build (npx expo run:ios / npx expo run:android).` | The app is the Expo Go store client. | Use a development build. |
|
|
29
|
+
| `[Userflow] UserflowProvider is not inside a <SafeAreaProvider>, so flow cards use the device's initial safe-area insets. Wrap your app in <SafeAreaProvider> from react-native-safe-area-context.` | `UserflowProvider` has no `SafeAreaProvider` ancestor. The app does not crash. Cards use `initialWindowMetrics`, or zero insets when those are unavailable. | Wrap the tree in `SafeAreaProvider`. |
|
|
30
|
+
| `Userflow.identifyAnonymous() needs @react-native-async-storage/async-storage, which is not linked in this native build. Add it to your app's package.json, run pod install, and rebuild.` | `identifyAnonymous()` ran without a linked AsyncStorage native module. | Install and rebuild, then call it again. |
|
|
31
|
+
| `clientToken is an environment secret key (esk_...). That key must never ship in the app. Pass the client token (ct_...) from Settings → Environments instead.` | `init` was given an `esk_` secret key. | Pass the `ct_…` client token. |
|
|
32
|
+
| `For EU-hosted environments pass serverEndpoint: 'https://e.eu.userflow.com'.` | The default US host rejected the token with `invalid_client_token`. This sentence is appended to that error. It is omitted when `serverEndpoint` was set explicitly. | For an EU environment, pass `serverEndpoint: 'https://e.eu.userflow.com'`. Pairing stays on `https://e.userflow.com`. |
|
|
33
|
+
| `[Userflow] Userflow.init() already ran with different options. The new clientToken, serverEndpoint, and pairingEndpoint are ignored because init runs once per process. Userflow.reset() does not apply new credentials. Restart the app to change them.` | A later `init` passed a different token or endpoint while a previous `init` is in flight or has succeeded. | Restart the app after a successful init. `reset()` clears the user and does not apply new credentials. If the previous `init` rejected, call `init` again with the corrected token or endpoint. |
|
|
31
34
|
|
|
32
35
|
## Init / identify / group
|
|
33
36
|
|
|
@@ -129,7 +132,7 @@ Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all buil
|
|
|
129
132
|
| Symptom | Fix |
|
|
130
133
|
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
131
134
|
| Crashes or missing native modules in Expo Go | Use a **development build**; Expo Go is not supported |
|
|
132
|
-
| Duplicate React / RN instance crashes when linking local packages |
|
|
135
|
+
| Duplicate React / RN instance crashes when linking local packages | Make Metro resolve `react` and `react-native` from the app's own `node_modules` |
|
|
133
136
|
| Preview / pairing scheme not registered | Add the `@userflow-tech/react-native` plugin with `schemeId`, then rebuild native |
|
|
134
137
|
|
|
135
138
|
## Jest
|
|
@@ -9,8 +9,11 @@ export interface HostDependencyWarning {
|
|
|
9
9
|
*
|
|
10
10
|
* `react-native-view-shot` must be at least 5. Expo SDK 54's unpinned install
|
|
11
11
|
* resolves 4.0.3. Expo SDK 53 and older only autolink native modules listed in
|
|
12
|
-
* the app's own package.json, so AsyncStorage
|
|
13
|
-
* dependencies there.
|
|
12
|
+
* the app's own package.json, so AsyncStorage, WebView, and safe-area-context
|
|
13
|
+
* have to be direct dependencies there. Expo SDK 54 and later autolink
|
|
14
|
+
* safe-area-context when Expo Router or React Navigation brought it in, so
|
|
15
|
+
* prebuild does not warn about it on those SDKs. `Userflow.init` warns when
|
|
16
|
+
* the package itself cannot be loaded.
|
|
14
17
|
*/
|
|
15
18
|
export declare function hostDependencyWarnings(projectRoot: string | undefined, sdkVersion: string | null | undefined): HostDependencyWarning[];
|
|
16
19
|
/** Called from inside the iOS and Android config-plugin steps, so it runs at prebuild. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostDependencyWarnings.d.ts","sourceRoot":"","sources":["../plugin/hostDependencyWarnings.ts"],"names":[],"mappings":"AAKA,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,wOACoM,CAAC;AAExO,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"hostDependencyWarnings.d.ts","sourceRoot":"","sources":["../plugin/hostDependencyWarnings.ts"],"names":[],"mappings":"AAKA,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,wOACoM,CAAC;AAExO,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAcD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACpC,qBAAqB,EAAE,CA+CzB;AAED,0FAA0F;AAC1F,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,GAAG,SAAS,EAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI,CAaN"}
|
|
@@ -9,6 +9,7 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|
|
9
9
|
/** Printed from the iOS and Android prebuild steps when `schemeId` is omitted. */
|
|
10
10
|
exports.MISSING_SCHEME_WARNING = 'No schemeId was passed, so the plugin left the native config unchanged. Builder preview and pairing links will not open this app. Pass the environment scheme_id (userflow-...) from the Userflow dashboard as the plugin schemeId.';
|
|
11
11
|
const VIEW_SHOT = 'react-native-view-shot';
|
|
12
|
+
const SAFE_AREA = 'react-native-safe-area-context';
|
|
12
13
|
const TRANSITIVE_NATIVE_MODULES = [
|
|
13
14
|
'@react-native-async-storage/async-storage',
|
|
14
15
|
'react-native-webview',
|
|
@@ -18,8 +19,11 @@ const TRANSITIVE_NATIVE_MODULES = [
|
|
|
18
19
|
*
|
|
19
20
|
* `react-native-view-shot` must be at least 5. Expo SDK 54's unpinned install
|
|
20
21
|
* resolves 4.0.3. Expo SDK 53 and older only autolink native modules listed in
|
|
21
|
-
* the app's own package.json, so AsyncStorage
|
|
22
|
-
* dependencies there.
|
|
22
|
+
* the app's own package.json, so AsyncStorage, WebView, and safe-area-context
|
|
23
|
+
* have to be direct dependencies there. Expo SDK 54 and later autolink
|
|
24
|
+
* safe-area-context when Expo Router or React Navigation brought it in, so
|
|
25
|
+
* prebuild does not warn about it on those SDKs. `Userflow.init` warns when
|
|
26
|
+
* the package itself cannot be loaded.
|
|
23
27
|
*/
|
|
24
28
|
function hostDependencyWarnings(projectRoot, sdkVersion) {
|
|
25
29
|
if (!projectRoot) {
|
|
@@ -48,6 +52,12 @@ function hostDependencyWarnings(projectRoot, sdkVersion) {
|
|
|
48
52
|
}
|
|
49
53
|
const sdkMajor = leadingMajor(sdkVersion ?? '');
|
|
50
54
|
if (sdkMajor != null && sdkMajor < 54) {
|
|
55
|
+
if (!dependencies[SAFE_AREA]) {
|
|
56
|
+
warnings.push({
|
|
57
|
+
property: SAFE_AREA,
|
|
58
|
+
message: `react-native-safe-area-context is not listed in the app package.json. Expo SDK ${sdkMajor} does not autolink native modules that the app only receives indirectly. Without the native module, banners, flow cards, and Builder bars draw under the status bar and home indicator. Install it in the app (npx expo install react-native-safe-area-context) and wrap the app in <SafeAreaProvider>.`,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
51
61
|
for (const name of TRANSITIVE_NATIVE_MODULES) {
|
|
52
62
|
if (!dependencies[name]) {
|
|
53
63
|
warnings.push({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostDependencyWarnings.js","sourceRoot":"","sources":["../plugin/hostDependencyWarnings.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"hostDependencyWarnings.js","sourceRoot":"","sources":["../plugin/hostDependencyWarnings.ts"],"names":[],"mappings":";;;AAqCA,wDAkDC;AAGD,sDAiBC;AA3GD,qCAAuC;AACvC,yCAAiC;AAEjC,yDAAyD;AAEzD,kFAAkF;AACrE,QAAA,sBAAsB,GACjC,qOAAqO,CAAC;AAYxO,MAAM,SAAS,GAAG,wBAAwB,CAAC;AAC3C,MAAM,SAAS,GAAG,gCAAgC,CAAC;AACnD,MAAM,yBAAyB,GAAG;IAChC,2CAA2C;IAC3C,sBAAsB;CACd,CAAC;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K,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.capturePickerScreenshot = capturePickerScreenshot;
|
|
7
7
|
exports.resetViewShotWarningForTests = resetViewShotWarningForTests;
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _nativeModules = require("../nativeModules.js");
|
|
9
10
|
const MAX_CAPTURE_WIDTH = 480;
|
|
11
|
+
const VIEW_SHOT_MODULE = 'RNViewShot';
|
|
10
12
|
const MISSING_VIEW_SHOT_WARNING = '[Userflow] Required peer react-native-view-shot is not installed; ' + 'skipping picker screenshot. Install react-native-view-shot (>=5.0.0) and rebuild native.';
|
|
11
13
|
let didWarnMissingViewShot = false;
|
|
12
14
|
function warnMissingViewShot() {
|
|
@@ -18,8 +20,14 @@ function warnMissingViewShot() {
|
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
function loadViewShot() {
|
|
23
|
+
// view-shot 4 calls TurboModuleRegistry.getEnforcing at import. Metro reports
|
|
24
|
+
// that throw as fatal before this try/catch can see it.
|
|
25
|
+
if (!(0, _nativeModules.isNativeModuleLinked)(VIEW_SHOT_MODULE)) {
|
|
26
|
+
warnMissingViewShot();
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
21
29
|
try {
|
|
22
|
-
// Required peer; degrade if
|
|
30
|
+
// Required peer; degrade if the JS package is missing.
|
|
23
31
|
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
|
|
24
32
|
return require('react-native-view-shot');
|
|
25
33
|
} catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","MAX_CAPTURE_WIDTH","MISSING_VIEW_SHOT_WARNING","didWarnMissingViewShot","warnMissingViewShot","__DEV__","console","warn","loadViewShot","capturePickerScreenshot","rect","viewShot","captureScreen","window","Dimensions","get","winW","width","winH","height","captureWidth","Math","min","round","captureHeight","max","dataUrl","format","quality","result","length","sx","sy","targetX1","x","targetY1","y","targetX2","targetY2","resetViewShotWarningForTests"],"sourceRoot":"../../../src","sources":["authoring/capturePickerScreenshot.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKA,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_nativeModules","MAX_CAPTURE_WIDTH","VIEW_SHOT_MODULE","MISSING_VIEW_SHOT_WARNING","didWarnMissingViewShot","warnMissingViewShot","__DEV__","console","warn","loadViewShot","isNativeModuleLinked","capturePickerScreenshot","rect","viewShot","captureScreen","window","Dimensions","get","winW","width","winH","height","captureWidth","Math","min","round","captureHeight","max","dataUrl","format","quality","result","length","sx","sy","targetX1","x","targetY1","y","targetX2","targetY2","resetViewShotWarningForTests"],"sourceRoot":"../../../src","sources":["authoring/capturePickerScreenshot.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AAKA,MAAME,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,gBAAgB,GAAG,YAAY;AAErC,MAAMC,yBAAyB,GAC7B,oEAAoE,GACpE,0FAA0F;AAY5F,IAAIC,sBAAsB,GAAG,KAAK;AAElC,SAASC,mBAAmBA,CAAA,EAAS;EACnC,IAAID,sBAAsB,EAAE;EAC5BA,sBAAsB,GAAG,IAAI;EAC7B,IAAIE,OAAO,EAAE;IACX;IACAC,OAAO,CAACC,IAAI,CAACL,yBAAyB,CAAC;EACzC;AACF;AAEA,SAASM,YAAYA,CAAA,EAA0B;EAC7C;EACA;EACA,IAAI,CAAC,IAAAC,mCAAoB,EAACR,gBAAgB,CAAC,EAAE;IAC3CG,mBAAmB,CAAC,CAAC;IACrB,OAAO,IAAI;EACb;EACA,IAAI;IACF;IACA;IACA,O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AAK,CAACb,IAAI,CAACwB,CAAC,GAAGH,EAAE,CAAC;MACjCI,QAAQ,EAAEd,IAAI,CAACE,KAAK,CAACb,IAAI,CAAC0B,CAAC,GAAGJ,EAAE,CAAC;MACjCK,QAAQ,EAAEhB,IAAI,CAACE,KAAK,CAAC,CAACb,IAAI,CAACwB,CAAC,GAAGxB,IAAI,CAACO,KAAK,IAAIc,EAAE,CAAC;MAChDO,QAAQ,EAAEjB,IAAI,CAACE,KAAK,CAAC,CAACb,IAAI,CAAC0B,CAAC,GAAG1B,IAAI,CAACS,MAAM,IAAIa,EAAE;IAClD,CAAC;EACH,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF;;AAEA;AACO,SAASO,4BAA4BA,CAAA,EAAS;EACnDrC,sBAAsB,GAAG,KAAK;AAChC","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getEvalJsWebView = getEvalJsWebView;
|
|
7
7
|
exports.isEvalJsWebViewNativeLinked = isEvalJsWebViewNativeLinked;
|
|
8
8
|
exports.resetEvalJsWebViewCacheForTests = resetEvalJsWebViewCacheForTests;
|
|
9
|
-
var
|
|
9
|
+
var _nativeModules = require("../nativeModules.js");
|
|
10
10
|
/**
|
|
11
11
|
* Minimal surface of `react-native-webview` this spike uses.
|
|
12
12
|
* Defined locally so the package root never statically imports the optional peer.
|
|
@@ -18,20 +18,11 @@ let warnedMissing = false;
|
|
|
18
18
|
/**
|
|
19
19
|
* True when the native `react-native-webview` binary is linked. Do not
|
|
20
20
|
* `require('react-native-webview')` before this passes — the JS entry calls
|
|
21
|
-
* `TurboModuleRegistry.getEnforcing('RNCWebViewModule')` and
|
|
21
|
+
* `TurboModuleRegistry.getEnforcing('RNCWebViewModule')` and Metro reports that
|
|
22
|
+
* throw as fatal before try/catch.
|
|
22
23
|
*/
|
|
23
24
|
function isEvalJsWebViewNativeLinked() {
|
|
24
|
-
|
|
25
|
-
if (typeof _reactNative.TurboModuleRegistry?.get === 'function') {
|
|
26
|
-
if (_reactNative.TurboModuleRegistry.get('RNCWebViewModule') != null) {
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const legacy = _reactNative.NativeModules.RNCWebViewModule;
|
|
31
|
-
return legacy != null;
|
|
32
|
-
} catch {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
25
|
+
return (0, _nativeModules.isNativeModuleLinked)('RNCWebViewModule');
|
|
35
26
|
}
|
|
36
27
|
|
|
37
28
|
/**
|
|
@@ -66,6 +57,7 @@ function getEvalJsWebView() {
|
|
|
66
57
|
function warnMissing(reason) {
|
|
67
58
|
if (warnedMissing) return;
|
|
68
59
|
warnedMissing = true;
|
|
60
|
+
if (!__DEV__) return;
|
|
69
61
|
if (reason === 'native') {
|
|
70
62
|
console.warn('Userflow: react-native-webview is listed in package.json but RNCWebViewModule is not in ' + 'this native build. Run npx expo install react-native-webview (or npm install), then ' + 'rebuild the dev client (expo prebuild + run:ios / run:android — not Expo Go). ' + 'Evaluate JavaScript and WebView banners will not run until then.');
|
|
71
63
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_nativeModules","require","cached","warnedMissing","isEvalJsWebViewNativeLinked","isNativeModuleLinked","getEvalJsWebView","undefined","warnMissing","mod","component","WebView","default","reason","__DEV__","console","warn","resetEvalJsWebViewCacheForTests"],"sourceRoot":"../../../src","sources":["evalJs/getWebView.ts"],"mappings":";;;;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;;AAmCA,IAAIC,MAAiD;AACrD,IAAIC,aAAa,GAAG,KAAK;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,2BAA2BA,CAAA,EAAY;EACrD,OAAO,IAAAC,mCAAoB,EAAC,kBAAkB,CAAC;AACjD;;AAEA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAAA,EAAkC;EAChE,IAAIJ,MAAM,KAAKK,SAAS,EAAE,OAAOL,MAAM;EAEvC,IAAI,OAAOD,OAAO,KAAK,UAAU,EAAE;IACjCC,MAAM,GAAG,IAAI;IACbM,WAAW,CAAC,aAAa,CAAC;IAC1B,OAAON,MAAM;EACf;EAEA,IAAI,CAACE,2BAA2B,CAAC,CAAC,EAAE;IAClCF,MAAM,GAAG,IAAI;IACbM,WAAW,CAAC,QAAQ,CAAC;IACrB,OAAON,MAAM;EACf;EAEA,IAAI;IACF;IACA,MAAMO,GAAG,GAAGR,OAAO,CAAC,sBAAsB,CAGzC;IACD,MAAMS,SAAS,GAAGD,GAAG,EAAEE,OAAO,IAAIF,GAAG,EAAEG,OAAO;IAC9CV,MAAM,GAAGQ,SAAS,IAAI,IAAI,GAAGA,SAAS,GAAG,IAAI;EAC/C,CAAC,CAAC,MAAM;IACNR,MAAM,GAAG,IAAI;EACf;EAEA,IAAIA,MAAM,IAAI,IAAI,EAAE;IAClBM,WAAW,CAAC,IAAI,CAAC;EACnB;EACA,OAAON,MAAM;AACf;AAEA,SAASM,WAAWA,CAACK,MAAuC,EAAQ;EAClE,IAAIV,aAAa,EAAE;EACnBA,aAAa,GAAG,IAAI;EACpB,IAAI,CAACW,OAAO,EAAE;EACd,IAAID,MAAM,KAAK,QAAQ,EAAE;IACvBE,OAAO,CAACC,IAAI,CACV,0FAA0F,GACxF,sFAAsF,GACtF,gFAAgF,GAChF,kEACJ,CAAC;IACD;EACF;EACAD,OAAO,CAACC,IAAI,CACV,sFAAsF,GACpF,oFAAoF,GACpF,yBACJ,CAAC;AACH;;AAEA;AACO,SAASC,+BAA+BA,CAAA,EAAS;EACtDf,MAAM,GAAGK,SAAS;EAClBJ,aAAa,GAAG,KAAK;AACvB","ignoreList":[]}
|
|
@@ -17,11 +17,12 @@ exports.resetCachedHostAppVersionForTests = resetCachedHostAppVersionForTests;
|
|
|
17
17
|
exports.resolveHostAppVersion = resolveHostAppVersion;
|
|
18
18
|
exports.resolveHostAppVersionForInit = resolveHostAppVersionForInit;
|
|
19
19
|
exports.resolveHostAppVersionFromSources = resolveHostAppVersionFromSources;
|
|
20
|
+
var _nativeModules = require("./nativeModules.js");
|
|
20
21
|
/**
|
|
21
22
|
* Read the host app's native marketing version (store version), not the
|
|
22
23
|
* SDK package version. React Native does not expose the store version on
|
|
23
24
|
* `Platform`; Expo hosts may use optional expo modules; bare RN reads
|
|
24
|
-
* `NativeModules.RNDeviceInfo` constants from the
|
|
25
|
+
* `NativeModules.RNDeviceInfo` constants from the device-info native
|
|
25
26
|
* module (after autolink + rebuild). The OS name is `Platform.OS`.
|
|
26
27
|
*
|
|
27
28
|
* Do not `require('react-native-device-info')` — that package throws at import
|
|
@@ -45,6 +46,10 @@ function unwrapModule(mod) {
|
|
|
45
46
|
return record;
|
|
46
47
|
}
|
|
47
48
|
function tryRequireExpoApplication() {
|
|
49
|
+
// expo-application calls requireNativeModule('ExpoApplication') at import.
|
|
50
|
+
// Skip the require when that module is not registered so a missing binary
|
|
51
|
+
// cannot surface as a fatal error.
|
|
52
|
+
if (!(0, _nativeModules.isNativeModuleLinked)('ExpoApplication')) return undefined;
|
|
48
53
|
try {
|
|
49
54
|
// Optional on bare RN — Metro requires a string literal.
|
|
50
55
|
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["nonEmptyString","value","length","undefined","unwrapModule","mod","record","nested","tryRequireExpoApplication","
|
|
1
|
+
{"version":3,"names":["_nativeModules","require","nonEmptyString","value","length","undefined","unwrapModule","mod","record","nested","tryRequireExpoApplication","isNativeModuleLinked","tryRequireExpoConstants","loadLinkedDeviceInfoNativeModule","NativeModules","RNDeviceInfo","readExpoApplication","version","build","source","readExpoConstants","expoConfig","configVersion","readDeviceInfoFromNativeModule","module","appVersion","buildNumber","resolveHostAppVersionFromSources","sources","expoApplication","expoConstants","deviceInfoNative","resolveHostAppVersion","resolveHostAppVersionForInit","options","overrideVersion","appBuild","cachedHostAppVersion","cacheHostAppVersionAtInit","getCachedHostAppVersion","HOST_APP_VERSION_USER_ATTRIBUTE","exports","HOST_APP_BUILD_USER_ATTRIBUTE","hostAppVersionUserAttributes","cached","mergeHostAppVersionUserAttributes","attributes","system","Object","keys","resetCachedHostAppVersionForTests","readPlatformOS","os","Platform","OS","formatHostAppVersionLog","resolved","level","message","logHostAppVersion","console","warn","log"],"sourceRoot":"../../src","sources":["hostAppVersion.ts"],"mappings":";;;;;;;;;;;;;;;;;;;AAYA,IAAAA,cAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA,SAASC,cAAcA,CAACC,KAAc,EAAsB;EAC1D,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,MAAM,GAAG,CAAC,GAAGD,KAAK,GAAGE,SAAS;AAC1E;AAEA,SAASC,YAAYA,CAACC,GAAY,EAAkC;EAClE,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAIA,GAAG,KAAK,IAAI,EAAE,OAAO,IAAI;EACxD,MAAMC,MAAM,GAAGD,GAA8B;EAC7C,MAAME,MAAM,GAAGD,MAAM,CAAC,SAAS,CAAC;EAChC,IAAI,OAAOC,MAAM,KAAK,QAAQ,IAAIA,MAAM,KAAK,IAAI,EAAE;IACjD,OAAO;MAAE,GAAGD,MAAM;MAAE,GAAIC;IAAmC,CAAC;EAC9D;EACA,OAAOD,MAAM;AACf;AAEA,SAASE,yBAAyBA,CAAA,EAAY;EAC5C;EACA;EACA;EACA,IAAI,CAAC,IAAAC,mCAAoB,EAAC,iBAAiB,CAAC,EAAE,OAAON,SAAS;EAC9D,IAAI;IACF;IACA;IACA,OAAOJ,OAAO,CAAC,kBAAkB,CAAC;EACpC,CAAC,CAAC,MAAM;IACN,OAAOI,SAAS;EAClB;AACF;AAEA,SAASO,uBAAuBA,CAAA,EAAY;EAC1C,IAAI;IACF;IACA,OAAO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@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.INSTALL_WEBVIEW_LINE = exports.INSTALL_VIEW_SHOT_LINE = exports.INSTALL_DEVICE_INFO_LINE = exports.INSTALL_CHECK_HEADER = exports.INSTALL_CHECK_FOOTER = exports.INSTALL_ASYNC_STORAGE_LINE = exports.INIT_OPTIONS_IGNORED_WARNING = exports.EXPO_GO_WARNING = void 0;
|
|
6
|
+
exports.INSTALL_WEBVIEW_LINE = exports.INSTALL_VIEW_SHOT_LINE = exports.INSTALL_SAFE_AREA_WARNING = exports.INSTALL_DEVICE_INFO_LINE = exports.INSTALL_CHECK_HEADER = exports.INSTALL_CHECK_FOOTER = exports.INSTALL_ASYNC_STORAGE_LINE = exports.INIT_OPTIONS_IGNORED_WARNING = exports.EXPO_GO_WARNING = void 0;
|
|
7
7
|
exports.collectInstallFindings = collectInstallFindings;
|
|
8
8
|
exports.commitInitOptions = commitInitOptions;
|
|
9
9
|
exports.expoGoWarning = expoGoWarning;
|
|
10
10
|
exports.formatInstallWarning = formatInstallWarning;
|
|
11
|
+
exports.formatViewShotVersionWarning = formatViewShotVersionWarning;
|
|
11
12
|
exports.releaseFailedInitOptions = releaseFailedInitOptions;
|
|
12
13
|
exports.resetInstallCheckForTests = resetInstallCheckForTests;
|
|
14
|
+
exports.viewShotVersionWarning = viewShotVersionWarning;
|
|
13
15
|
exports.warnIfInitOptionsIgnored = warnIfInitOptionsIgnored;
|
|
14
16
|
exports.warnIfInstallIncomplete = warnIfInstallIncomplete;
|
|
15
17
|
var _getWebView = require("./evalJs/getWebView.js");
|
|
18
|
+
var _nativeModules = require("./nativeModules.js");
|
|
16
19
|
var _asyncStorage = require("./storage/asyncStorage.js");
|
|
20
|
+
var _safeArea = require("./surfaces/safeArea.js");
|
|
17
21
|
const INSTALL_CHECK_HEADER = exports.INSTALL_CHECK_HEADER = '[Userflow] Native setup is incomplete. Flows may not run until you fix the following, then rebuild the app (a Metro reload is not enough):';
|
|
18
22
|
const INSTALL_ASYNC_STORAGE_LINE = exports.INSTALL_ASYNC_STORAGE_LINE = '- @react-native-async-storage/async-storage is not linked. Anonymous users and Builder pairing will not persist. Add it to the app package.json (npx expo install @react-native-async-storage/async-storage), run pod install on iOS, and rebuild.';
|
|
19
23
|
const INSTALL_VIEW_SHOT_LINE = exports.INSTALL_VIEW_SHOT_LINE = '- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install react-native-view-shot@^5.0.0 and rebuild. On Expo SDK 54, pin ^5.0.0; an unpinned npx expo install resolves 4.0.3.';
|
|
20
24
|
const INSTALL_WEBVIEW_LINE = exports.INSTALL_WEBVIEW_LINE = '- react-native-webview is not linked. Evaluate JavaScript and WebView banners will not run. Install it (npx expo install react-native-webview) and rebuild.';
|
|
21
25
|
const INSTALL_DEVICE_INFO_LINE = exports.INSTALL_DEVICE_INFO_LINE = '- react-native-device-info is not linked, so app_version and app_build are not sent. npm install react-native-device-info, then rebuild.';
|
|
22
|
-
const INSTALL_CHECK_FOOTER = exports.INSTALL_CHECK_FOOTER = 'See docs/troubleshooting.md.';
|
|
26
|
+
const INSTALL_CHECK_FOOTER = exports.INSTALL_CHECK_FOOTER = 'See node_modules/@userflow-tech/react-native/docs/troubleshooting.md.';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Separate from {@link INSTALL_CHECK_HEADER}. Flows still run without
|
|
30
|
+
* safe-area-context; they draw under the status bar.
|
|
31
|
+
*/
|
|
32
|
+
const INSTALL_SAFE_AREA_WARNING = exports.INSTALL_SAFE_AREA_WARNING = '[Userflow] react-native-safe-area-context is not installed, so banners, flow cards, and Builder bars draw under the status bar and home indicator. Install it (npx expo install react-native-safe-area-context) and wrap the app in <SafeAreaProvider>.\n' + INSTALL_CHECK_FOOTER;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Separate from {@link INSTALL_CHECK_HEADER}. Flows still run on view-shot 4;
|
|
36
|
+
* Builder screenshots may not. The installed version is interpolated.
|
|
37
|
+
*/
|
|
38
|
+
function formatViewShotVersionWarning(version) {
|
|
39
|
+
return `[Userflow] react-native-view-shot@${version} is older than 5.0.0, so Builder element selection may not get a screenshot. ` + 'Install react-native-view-shot@^5.0.0 in the same command as the SDK and rebuild. ' + 'Do not retry the install with --force or --legacy-peer-deps; that leaves this version in place. ' + 'On Expo SDK 54, pin ^5.0.0 and add "react-native-view-shot" to expo.install.exclude.\n' + INSTALL_CHECK_FOOTER;
|
|
40
|
+
}
|
|
23
41
|
const EXPO_GO_WARNING = exports.EXPO_GO_WARNING = '[Userflow] This app is running in Expo Go, which cannot load the SDK native modules. Builder preview links will not open the app. Use a development build (npx expo run:ios / npx expo run:android).';
|
|
24
42
|
const INIT_OPTIONS_IGNORED_WARNING = exports.INIT_OPTIONS_IGNORED_WARNING = '[Userflow] Userflow.init() already ran with different options. The new clientToken, serverEndpoint, and pairingEndpoint are ignored because init runs once per process. Userflow.reset() does not apply new credentials. Restart the app to change them.';
|
|
25
43
|
const VIEW_SHOT_MODULE = 'RNViewShot';
|
|
26
44
|
const DEVICE_INFO_MODULE = 'RNDeviceInfo';
|
|
27
45
|
let didWarn = false;
|
|
28
|
-
function loadReactNative() {
|
|
29
|
-
try {
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
|
31
|
-
return require('react-native');
|
|
32
|
-
} catch {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function isNativeModuleLinked(name) {
|
|
37
|
-
const reactNative = loadReactNative();
|
|
38
|
-
if (!reactNative) return false;
|
|
39
|
-
try {
|
|
40
|
-
const turbo = reactNative.TurboModuleRegistry;
|
|
41
|
-
if (typeof turbo?.get === 'function' && turbo.get(name) != null) return true;
|
|
42
|
-
} catch {
|
|
43
|
-
// Fall through to the legacy registry.
|
|
44
|
-
}
|
|
45
|
-
try {
|
|
46
|
-
return reactNative.NativeModules?.[name] != null;
|
|
47
|
-
} catch {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
46
|
function readExpoConstants() {
|
|
52
47
|
try {
|
|
53
48
|
// Optional. Bare React Native does not have this package.
|
|
@@ -63,15 +58,40 @@ function readExpoConstants() {
|
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Installed view-shot version, read from package.json only. Requiring the
|
|
63
|
+
* package entry loads the native module, and view-shot 4 calls
|
|
64
|
+
* `TurboModuleRegistry.getEnforcing` at import.
|
|
65
|
+
*/
|
|
66
|
+
function readViewShotVersion() {
|
|
67
|
+
try {
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
|
69
|
+
const pkg = require('react-native-view-shot/package.json');
|
|
70
|
+
return typeof pkg.version === 'string' && pkg.version.length > 0 ? pkg.version : null;
|
|
71
|
+
} catch {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Dev warning when view-shot 4.x is installed. Null on 5.x or when it is absent. */
|
|
77
|
+
function viewShotVersionWarning() {
|
|
78
|
+
const version = readViewShotVersion();
|
|
79
|
+
if (!version) return null;
|
|
80
|
+
const match = version.match(/\d+/);
|
|
81
|
+
const major = match ? Number(match[0]) : null;
|
|
82
|
+
if (major == null || major >= 5) return null;
|
|
83
|
+
return formatViewShotVersionWarning(version);
|
|
84
|
+
}
|
|
85
|
+
|
|
66
86
|
/** Lines for missing native modules. Empty when the build looks complete. */
|
|
67
87
|
function collectInstallFindings() {
|
|
68
88
|
const findings = [];
|
|
69
89
|
if (!(0, _asyncStorage.isAsyncStorageLinked)()) findings.push(INSTALL_ASYNC_STORAGE_LINE);
|
|
70
|
-
if (!isNativeModuleLinked(VIEW_SHOT_MODULE)) findings.push(INSTALL_VIEW_SHOT_LINE);
|
|
90
|
+
if (!(0, _nativeModules.isNativeModuleLinked)(VIEW_SHOT_MODULE)) findings.push(INSTALL_VIEW_SHOT_LINE);
|
|
71
91
|
if (!(0, _getWebView.isEvalJsWebViewNativeLinked)()) findings.push(INSTALL_WEBVIEW_LINE);
|
|
72
92
|
// Expo reads the store version from expo-constants / expo-application.
|
|
73
93
|
// device-info is the bare React Native path.
|
|
74
|
-
if (readExpoConstants() == null && !isNativeModuleLinked(DEVICE_INFO_MODULE)) {
|
|
94
|
+
if (readExpoConstants() == null && !(0, _nativeModules.isNativeModuleLinked)(DEVICE_INFO_MODULE)) {
|
|
75
95
|
findings.push(INSTALL_DEVICE_INFO_LINE);
|
|
76
96
|
}
|
|
77
97
|
return findings;
|
|
@@ -86,8 +106,11 @@ function formatInstallWarning(findings) {
|
|
|
86
106
|
}
|
|
87
107
|
|
|
88
108
|
/**
|
|
89
|
-
* One development warning for missing native modules,
|
|
90
|
-
*
|
|
109
|
+
* One development warning for missing native modules, separate warnings when
|
|
110
|
+
* safe-area-context is not installed or view-shot is older than 5, and a
|
|
111
|
+
* separate warning when the host is Expo Go. Release builds stay quiet. The
|
|
112
|
+
* safe-area and old view-shot warnings are not part of the native-module list:
|
|
113
|
+
* flows still run, and that list says they may not.
|
|
91
114
|
*/
|
|
92
115
|
function warnIfInstallIncomplete() {
|
|
93
116
|
if (!__DEV__ || didWarn) return;
|
|
@@ -97,6 +120,15 @@ function warnIfInstallIncomplete() {
|
|
|
97
120
|
// eslint-disable-next-line no-console -- intentional install diagnostic
|
|
98
121
|
console.warn(formatInstallWarning(findings));
|
|
99
122
|
}
|
|
123
|
+
if (!(0, _safeArea.isSafeAreaContextInstalled)()) {
|
|
124
|
+
// eslint-disable-next-line no-console -- intentional install diagnostic
|
|
125
|
+
console.warn(INSTALL_SAFE_AREA_WARNING);
|
|
126
|
+
}
|
|
127
|
+
const oldViewShot = viewShotVersionWarning();
|
|
128
|
+
if (oldViewShot) {
|
|
129
|
+
// eslint-disable-next-line no-console -- intentional install diagnostic
|
|
130
|
+
console.warn(oldViewShot);
|
|
131
|
+
}
|
|
100
132
|
const expoGo = expoGoWarning();
|
|
101
133
|
if (expoGo) {
|
|
102
134
|
// eslint-disable-next-line no-console -- intentional install diagnostic
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_getWebView","require","_asyncStorage","INSTALL_CHECK_HEADER","exports","INSTALL_ASYNC_STORAGE_LINE","INSTALL_VIEW_SHOT_LINE","INSTALL_WEBVIEW_LINE","INSTALL_DEVICE_INFO_LINE","INSTALL_CHECK_FOOTER","EXPO_GO_WARNING","INIT_OPTIONS_IGNORED_WARNING","VIEW_SHOT_MODULE","DEVICE_INFO_MODULE","didWarn","
|
|
1
|
+
{"version":3,"names":["_getWebView","require","_nativeModules","_asyncStorage","_safeArea","INSTALL_CHECK_HEADER","exports","INSTALL_ASYNC_STORAGE_LINE","INSTALL_VIEW_SHOT_LINE","INSTALL_WEBVIEW_LINE","INSTALL_DEVICE_INFO_LINE","INSTALL_CHECK_FOOTER","INSTALL_SAFE_AREA_WARNING","formatViewShotVersionWarning","version","EXPO_GO_WARNING","INIT_OPTIONS_IGNORED_WARNING","VIEW_SHOT_MODULE","DEVICE_INFO_MODULE","didWarn","readExpoConstants","mod","record","default","executionEnvironment","readViewShotVersion","pkg","length","viewShotVersionWarning","match","major","Number","collectInstallFindings","findings","isAsyncStorageLinked","push","isNativeModuleLinked","isEvalJsWebViewNativeLinked","expoGoWarning","constants","environment","formatInstallWarning","join","warnIfInstallIncomplete","__DEV__","console","warn","isSafeAreaContextInstalled","oldViewShot","expoGo","resetInstallCheckForTests","recordedInitOptions","initOptionsCommitted","recordInitOptions","config","clientToken","serverEndpoint","pairingEndpoint","warnIfInitOptionsIgnored","next","commitInitOptions","releaseFailedInitOptions"],"sourceRoot":"../../src","sources":["installCheck.ts"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,SAA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