@umituz/react-native-sentry 1.4.0 → 1.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/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sentry Test Setting Component
|
|
3
|
-
* Single Responsibility: Provide Sentry test setting config
|
|
3
|
+
* Single Responsibility: Provide Sentry test setting config
|
|
4
4
|
* Framework-agnostic design - returns configuration object
|
|
5
|
+
*
|
|
6
|
+
* Note: Application should handle __DEV__ check before calling this
|
|
5
7
|
*/
|
|
6
8
|
|
|
7
9
|
import { runTestSuite } from "../utils/testHelpers";
|
|
@@ -20,20 +22,19 @@ export interface SentryTestSettingProps {
|
|
|
20
22
|
* Creates Sentry test setting configuration
|
|
21
23
|
* Returns setting item props for use with any UI framework
|
|
22
24
|
*
|
|
25
|
+
* Application should wrap this in __DEV__ check:
|
|
26
|
+
*
|
|
23
27
|
* @example
|
|
24
28
|
* ```typescript
|
|
25
29
|
* import { createSentryTestSetting } from '@umituz/react-native-sentry';
|
|
26
30
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
31
|
+
* if (__DEV__) {
|
|
32
|
+
* const sentryTestConfig = createSentryTestSetting({ userId: 'user123' });
|
|
33
|
+
* // Use with your UI framework's SettingItem component
|
|
34
|
+
* }
|
|
29
35
|
* ```
|
|
30
36
|
*/
|
|
31
37
|
export function createSentryTestSetting(props: SentryTestSettingProps = {}) {
|
|
32
|
-
// Only return config in DEV mode
|
|
33
|
-
if (!__DEV__) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
38
|
return {
|
|
38
39
|
type: "setting-item" as const,
|
|
39
40
|
icon: "bug" as const,
|