@posthog/react-native-plugin 2.4.3 → 2.5.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.
package/android/build.gradle
CHANGED
package/android/src/main/java/com/posthogreactnativeplugin/PosthogReactNativePluginModule.kt
CHANGED
|
@@ -158,6 +158,8 @@ class PosthogReactNativePluginModule(
|
|
|
158
158
|
sessionReplayConfig.maskAllImages = maskAllImages
|
|
159
159
|
sessionReplayConfig.maskAllTextInputs = maskAllTextInputs
|
|
160
160
|
sessionReplayConfig.sampleRate = getDoubleOrNull(sdkReplayConfig, "sampleRate")
|
|
161
|
+
sessionReplayConfig.verifyScreenshotMaskAlignment =
|
|
162
|
+
getBoolean(sdkReplayConfig, "verifyScreenshotMaskAlignment", false)
|
|
161
163
|
|
|
162
164
|
val endpoint = getString(decideReplayConfig, "endpoint", "")
|
|
163
165
|
if (endpoint.isNotEmpty()) {
|
|
@@ -374,17 +376,6 @@ class PosthogReactNativePluginModule(
|
|
|
374
376
|
}
|
|
375
377
|
}.getOrNull()
|
|
376
378
|
|
|
377
|
-
private fun hasKey(
|
|
378
|
-
map: ReadableMap?,
|
|
379
|
-
key: String,
|
|
380
|
-
): Boolean = runCatching { map != null && map.hasKey(key) && !map.isNull(key) }.getOrDefault(false)
|
|
381
|
-
|
|
382
|
-
private fun getBoolean(
|
|
383
|
-
map: ReadableMap?,
|
|
384
|
-
key: String,
|
|
385
|
-
default: Boolean,
|
|
386
|
-
): Boolean = runCatching { if (hasKey(map, key)) map?.getBoolean(key) ?: default else default }.getOrDefault(default)
|
|
387
|
-
|
|
388
379
|
private fun getString(
|
|
389
380
|
map: ReadableMap?,
|
|
390
381
|
key: String,
|
|
@@ -634,3 +625,14 @@ class PosthogReactNativePluginModule(
|
|
|
634
625
|
}
|
|
635
626
|
}
|
|
636
627
|
}
|
|
628
|
+
|
|
629
|
+
private fun hasKey(
|
|
630
|
+
map: ReadableMap?,
|
|
631
|
+
key: String,
|
|
632
|
+
): Boolean = runCatching { map != null && map.hasKey(key) && !map.isNull(key) }.getOrDefault(false)
|
|
633
|
+
|
|
634
|
+
internal fun getBoolean(
|
|
635
|
+
map: ReadableMap?,
|
|
636
|
+
key: String,
|
|
637
|
+
default: Boolean,
|
|
638
|
+
): Boolean = runCatching { if (hasKey(map, key)) map?.getBoolean(key) ?: default else default }.getOrDefault(default)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/react-native-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "PostHog React Native plugin for iOS and Android integrations",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"!android/gradlew",
|
|
33
33
|
"!android/gradlew.bat",
|
|
34
34
|
"!android/local.properties",
|
|
35
|
+
"!android/src/test",
|
|
35
36
|
"!**/__tests__",
|
|
36
37
|
"!**/__fixtures__",
|
|
37
38
|
"!**/__mocks__",
|