@luciq/react-native 18.0.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/CHANGELOG.md +5 -0
- package/FONTS_SETUP_GUIDE.md +521 -0
- package/Gemfile +1 -0
- package/Gemfile.lock +11 -0
- package/LICENSE +21 -0
- package/README.md +148 -0
- package/RNLuciq.podspec +21 -0
- package/android/build.gradle +88 -0
- package/android/gradle.properties +4 -0
- package/android/jacoco.gradle +52 -0
- package/android/native.gradle +7 -0
- package/android/proguard-rules.txt +1 -0
- package/android/sourcemaps.gradle +255 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/ai/luciq/reactlibrary/ArgsRegistry.java +278 -0
- package/android/src/main/java/ai/luciq/reactlibrary/Constants.java +20 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciq.java +328 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqAPMModule.java +392 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqBugReportingModule.java +444 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqCrashReportingModule.java +169 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqFeatureRequestsModule.java +98 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqNetworkLoggerModule.java +195 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativeModule.java +1611 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativePackage.java +41 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqRepliesModule.java +298 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSessionReplayModule.java +213 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSurveysModule.java +237 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/ArrayUtil.java +167 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/EventEmitterModule.java +35 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/LuciqUtil.java +58 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/MainThreadHandler.java +13 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/MapUtil.java +171 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/RNTouchedViewExtractor.java +167 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/ReportUtil.java +67 -0
- package/app.plugin.js +1 -0
- package/babel.config.js +3 -0
- package/bin/commands/MigrateCommand.d.ts +6 -0
- package/bin/commands/UploadEasUpdatesSourcemaps.d.ts +2 -0
- package/bin/commands/UploadSoFiles.d.ts +6 -0
- package/bin/commands/UploadSourcemaps.d.ts +2 -0
- package/bin/config/migration-config.json +125 -0
- package/bin/index.d.ts +2 -0
- package/bin/index.js +19179 -0
- package/bin/upload/index.d.ts +4 -0
- package/bin/upload/migrate.d.ts +14 -0
- package/bin/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
- package/bin/upload/uploadSoFiles.d.ts +21 -0
- package/bin/upload/uploadSourcemaps.d.ts +21 -0
- package/cli/commands/MigrateCommand.ts +32 -0
- package/cli/commands/UploadEasUpdatesSourcemaps.ts +34 -0
- package/cli/commands/UploadSoFiles.ts +38 -0
- package/cli/commands/UploadSourcemaps.ts +40 -0
- package/cli/config/migration-config.json +125 -0
- package/cli/index.ts +21 -0
- package/cli/upload/index.ts +4 -0
- package/cli/upload/migrate.ts +271 -0
- package/cli/upload/uploadEasUpdatesSourcemaps.ts +74 -0
- package/cli/upload/uploadSoFiles.ts +112 -0
- package/cli/upload/uploadSourcemaps.ts +73 -0
- package/dangerfile.ts +44 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +14 -0
- package/dist/models/FeatureFlag.d.ts +11 -0
- package/dist/models/FeatureFlag.js +1 -0
- package/dist/models/LuciqConfig.d.ts +42 -0
- package/dist/models/LuciqConfig.js +1 -0
- package/dist/models/NonFatalOptions.d.ts +15 -0
- package/dist/models/NonFatalOptions.js +1 -0
- package/dist/models/OverAirUpdate.d.ts +12 -0
- package/dist/models/OverAirUpdate.js +1 -0
- package/dist/models/Report.d.ts +70 -0
- package/dist/models/Report.js +109 -0
- package/dist/models/ReproConfig.d.ts +27 -0
- package/dist/models/ReproConfig.js +1 -0
- package/dist/models/SessionMetadata.d.ts +55 -0
- package/dist/models/SessionMetadata.js +1 -0
- package/dist/models/ThemeConfig.d.ts +27 -0
- package/dist/models/ThemeConfig.js +1 -0
- package/dist/models/W3cExternalTraceAttributes.d.ts +22 -0
- package/dist/models/W3cExternalTraceAttributes.js +1 -0
- package/dist/modules/APM.d.ts +77 -0
- package/dist/modules/APM.js +104 -0
- package/dist/modules/BugReporting.d.ts +138 -0
- package/dist/modules/BugReporting.js +202 -0
- package/dist/modules/CrashReporting.d.ts +19 -0
- package/dist/modules/CrashReporting.js +40 -0
- package/dist/modules/FeatureRequests.d.ts +20 -0
- package/dist/modules/FeatureRequests.js +28 -0
- package/dist/modules/Luciq.d.ts +362 -0
- package/dist/modules/Luciq.js +797 -0
- package/dist/modules/NetworkLogger.d.ts +52 -0
- package/dist/modules/NetworkLogger.js +208 -0
- package/dist/modules/Replies.d.ts +78 -0
- package/dist/modules/Replies.js +121 -0
- package/dist/modules/SessionReplay.d.ts +78 -0
- package/dist/modules/SessionReplay.js +98 -0
- package/dist/modules/Surveys.d.ts +75 -0
- package/dist/modules/Surveys.js +101 -0
- package/dist/native/NativeAPM.d.ts +18 -0
- package/dist/native/NativeAPM.js +4 -0
- package/dist/native/NativeBugReporting.d.ts +32 -0
- package/dist/native/NativeBugReporting.js +10 -0
- package/dist/native/NativeConstants.d.ts +182 -0
- package/dist/native/NativeConstants.js +1 -0
- package/dist/native/NativeCrashReporting.d.ts +18 -0
- package/dist/native/NativeCrashReporting.js +2 -0
- package/dist/native/NativeFeatureRequests.d.ts +8 -0
- package/dist/native/NativeFeatureRequests.js +2 -0
- package/dist/native/NativeLuciq.d.ts +86 -0
- package/dist/native/NativeLuciq.js +10 -0
- package/dist/native/NativeNetworkLogger.d.ts +21 -0
- package/dist/native/NativeNetworkLogger.js +14 -0
- package/dist/native/NativePackage.d.ts +21 -0
- package/dist/native/NativePackage.js +2 -0
- package/dist/native/NativeReplies.d.ts +21 -0
- package/dist/native/NativeReplies.js +8 -0
- package/dist/native/NativeSessionReplay.d.ts +16 -0
- package/dist/native/NativeSessionReplay.js +8 -0
- package/dist/native/NativeSurveys.d.ts +22 -0
- package/dist/native/NativeSurveys.js +9 -0
- package/dist/utils/AppStatesHandler.d.ts +3 -0
- package/dist/utils/AppStatesHandler.js +16 -0
- package/dist/utils/Enums.d.ts +244 -0
- package/dist/utils/Enums.js +266 -0
- package/dist/utils/FeatureFlags.d.ts +7 -0
- package/dist/utils/FeatureFlags.js +24 -0
- package/dist/utils/LuciqConstants.d.ts +14 -0
- package/dist/utils/LuciqConstants.js +15 -0
- package/dist/utils/LuciqUtils.d.ts +97 -0
- package/dist/utils/LuciqUtils.js +301 -0
- package/dist/utils/UnhandledRejectionTracking.d.ts +9 -0
- package/dist/utils/UnhandledRejectionTracking.js +99 -0
- package/dist/utils/XhrNetworkInterceptor.d.ts +39 -0
- package/dist/utils/XhrNetworkInterceptor.js +253 -0
- package/dist/utils/config.d.ts +5 -0
- package/dist/utils/config.js +6 -0
- package/dist/utils/logger.d.ts +10 -0
- package/dist/utils/logger.js +39 -0
- package/expo.d.ts +1 -0
- package/expo.js +1 -0
- package/ios/RNLuciq/ArgsRegistry.h +32 -0
- package/ios/RNLuciq/ArgsRegistry.m +276 -0
- package/ios/RNLuciq/LuciqAPMBridge.h +26 -0
- package/ios/RNLuciq/LuciqAPMBridge.m +99 -0
- package/ios/RNLuciq/LuciqBugReportingBridge.h +60 -0
- package/ios/RNLuciq/LuciqBugReportingBridge.m +241 -0
- package/ios/RNLuciq/LuciqCrashReportingBridge.h +18 -0
- package/ios/RNLuciq/LuciqCrashReportingBridge.m +68 -0
- package/ios/RNLuciq/LuciqFeatureRequestsBridge.h +30 -0
- package/ios/RNLuciq/LuciqFeatureRequestsBridge.m +61 -0
- package/ios/RNLuciq/LuciqNetworkLoggerBridge.h +44 -0
- package/ios/RNLuciq/LuciqNetworkLoggerBridge.m +206 -0
- package/ios/RNLuciq/LuciqReactBridge.h +151 -0
- package/ios/RNLuciq/LuciqReactBridge.m +548 -0
- package/ios/RNLuciq/LuciqRepliesBridge.h +40 -0
- package/ios/RNLuciq/LuciqRepliesBridge.m +80 -0
- package/ios/RNLuciq/LuciqSessionReplayBridge.h +32 -0
- package/ios/RNLuciq/LuciqSessionReplayBridge.m +107 -0
- package/ios/RNLuciq/LuciqSurveysBridge.h +46 -0
- package/ios/RNLuciq/LuciqSurveysBridge.m +107 -0
- package/ios/RNLuciq/RCTConvert+LuciqEnums.h +18 -0
- package/ios/RNLuciq/RCTConvert+LuciqEnums.m +127 -0
- package/ios/RNLuciq/RNLuciq.h +35 -0
- package/ios/RNLuciq/RNLuciq.m +107 -0
- package/ios/RNLuciq/Util/LCQAPM+PrivateAPIs.h +15 -0
- package/ios/RNLuciq/Util/LCQCrashReporting+CP.h +13 -0
- package/ios/RNLuciq/Util/LCQNetworkLogger+CP.h +68 -0
- package/ios/RNLuciq/Util/Luciq+CP.h +12 -0
- package/ios/RNLuciq.xcodeproj/project.pbxproj +352 -0
- package/ios/native.rb +12 -0
- package/ios/sourcemaps.sh +120 -0
- package/migrate.js +569 -0
- package/package.json +92 -0
- package/plugin/build/index.js +42078 -0
- package/plugin/src/index.ts +5 -0
- package/plugin/src/pluginProps.ts +6 -0
- package/plugin/src/withLuciq.ts +51 -0
- package/plugin/src/withLuciqAndroid.ts +99 -0
- package/plugin/src/withLuciqIOS.ts +109 -0
- package/plugin/tsconfig.json +7 -0
- package/react-native.config.js +16 -0
- package/scripts/customize-ios-endpoints.sh +28 -0
- package/scripts/dream-11-delete-unused-features.sh +62 -0
- package/scripts/find-token.js +58 -0
- package/scripts/find-token.sh +70 -0
- package/scripts/notify-github.sh +15 -0
- package/scripts/replace.js +58 -0
- package/scripts/snapshot-comment.md +15 -0
- package/scripts/snapshot-version.sh +11 -0
- package/src/index.ts +40 -0
- package/src/models/FeatureFlag.ts +12 -0
- package/src/models/LuciqConfig.ts +48 -0
- package/src/models/NonFatalOptions.ts +16 -0
- package/src/models/OverAirUpdate.ts +14 -0
- package/src/models/Report.ts +124 -0
- package/src/models/ReproConfig.ts +31 -0
- package/src/models/SessionMetadata.ts +57 -0
- package/src/models/ThemeConfig.ts +34 -0
- package/src/models/W3cExternalTraceAttributes.ts +22 -0
- package/src/modules/APM.ts +117 -0
- package/src/modules/BugReporting.ts +254 -0
- package/src/modules/CrashReporting.ts +54 -0
- package/src/modules/FeatureRequests.ts +32 -0
- package/src/modules/Luciq.ts +934 -0
- package/src/modules/NetworkLogger.ts +270 -0
- package/src/modules/Replies.ts +137 -0
- package/src/modules/SessionReplay.ts +111 -0
- package/src/modules/Surveys.ts +118 -0
- package/src/native/NativeAPM.ts +51 -0
- package/src/native/NativeBugReporting.ts +70 -0
- package/src/native/NativeConstants.ts +215 -0
- package/src/native/NativeCrashReporting.ts +29 -0
- package/src/native/NativeFeatureRequests.ts +12 -0
- package/src/native/NativeLuciq.ts +179 -0
- package/src/native/NativeNetworkLogger.ts +42 -0
- package/src/native/NativePackage.ts +25 -0
- package/src/native/NativeReplies.ts +34 -0
- package/src/native/NativeSessionReplay.ts +21 -0
- package/src/native/NativeSurveys.ts +34 -0
- package/src/promise.d.ts +11 -0
- package/src/utils/AppStatesHandler.ts +19 -0
- package/src/utils/Enums.ts +266 -0
- package/src/utils/FeatureFlags.ts +33 -0
- package/src/utils/LuciqConstants.ts +24 -0
- package/src/utils/LuciqUtils.ts +417 -0
- package/src/utils/UnhandledRejectionTracking.ts +118 -0
- package/src/utils/XhrNetworkInterceptor.ts +333 -0
- package/src/utils/config.ts +7 -0
- package/src/utils/logger.ts +54 -0
- package/tsconfig.json +32 -0
- package/tsconfig.test.json +4 -0
- package/tsconfig.upload.json +10 -0
- package/upload/index.d.ts +4 -0
- package/upload/index.js +17314 -0
- package/upload/migrate.d.ts +14 -0
- package/upload/package.json +5 -0
- package/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
- package/upload/uploadSoFiles.d.ts +21 -0
- package/upload/uploadSourcemaps.d.ts +21 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AppState, type AppStateStatus } from 'react-native';
|
|
2
|
+
|
|
3
|
+
let subscription: any = null;
|
|
4
|
+
|
|
5
|
+
// Register the event listener manually
|
|
6
|
+
export const addAppStateListener = (handleAppStateChange: (state: AppStateStatus) => void) => {
|
|
7
|
+
if (!subscription) {
|
|
8
|
+
subscription = AppState.addEventListener('change', handleAppStateChange);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// Unregister the event listener manually
|
|
13
|
+
//todo: find where to Unregister appState listener
|
|
14
|
+
export const removeAppStateListener = () => {
|
|
15
|
+
if (subscription) {
|
|
16
|
+
subscription.remove();
|
|
17
|
+
subscription = null;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { NativeLuciq } from '../native/NativeLuciq';
|
|
2
|
+
|
|
3
|
+
const constants = NativeLuciq.getConstants();
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Verbosity level of the SDK debug logs. This has nothing to do with `Luciq.log`,
|
|
7
|
+
* and only affect the logs used to debug the SDK itself.
|
|
8
|
+
*/
|
|
9
|
+
export enum LogLevel {
|
|
10
|
+
verbose = constants.sdkDebugLogsLevelVerbose,
|
|
11
|
+
debug = constants.sdkDebugLogsLevelDebug,
|
|
12
|
+
error = constants.sdkDebugLogsLevelError,
|
|
13
|
+
none = constants.sdkDebugLogsLevelNone,
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Enum representing the available user consent action types.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export enum userConsentActionType {
|
|
20
|
+
dropAutoCapturedMedia = constants.dropAutoCapturedMedia,
|
|
21
|
+
dropLogs = constants.dropLogs,
|
|
22
|
+
noChat = constants.noChat,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The event used to invoke the feedback form.
|
|
27
|
+
*/
|
|
28
|
+
export enum InvocationEvent {
|
|
29
|
+
none = constants.invocationEventNone,
|
|
30
|
+
shake = constants.invocationEventShake,
|
|
31
|
+
screenshot = constants.invocationEventScreenshot,
|
|
32
|
+
twoFingersSwipe = constants.invocationEventTwoFingersSwipeLeft,
|
|
33
|
+
floatingButton = constants.invocationEventFloatingButton,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The network interceptor to use.
|
|
38
|
+
*/
|
|
39
|
+
export enum NetworkInterceptionMode {
|
|
40
|
+
javascript,
|
|
41
|
+
native,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Options added while invoking bug reporting.
|
|
46
|
+
*/
|
|
47
|
+
export enum InvocationOption {
|
|
48
|
+
emailFieldHidden = constants.optionEmailFieldHidden,
|
|
49
|
+
emailFieldOptional = constants.optionEmailFieldOptional,
|
|
50
|
+
commentFieldRequired = constants.optionCommentFieldRequired,
|
|
51
|
+
disablePostSendingDialog = constants.optionDisablePostSendingDialog,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The color theme of the different UI elements.
|
|
56
|
+
*/
|
|
57
|
+
export enum ColorTheme {
|
|
58
|
+
light = constants.colorThemeLight,
|
|
59
|
+
dark = constants.colorThemeDark,
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Floating button positions.
|
|
64
|
+
*/
|
|
65
|
+
export enum FloatingButtonPosition {
|
|
66
|
+
left = constants.rectMinXEdge,
|
|
67
|
+
right = constants.rectMaxXEdge,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Video recording button positions.
|
|
72
|
+
*/
|
|
73
|
+
export enum RecordingButtonPosition {
|
|
74
|
+
bottomRight = constants.bottomRight,
|
|
75
|
+
topRight = constants.topRight,
|
|
76
|
+
bottomLeft = constants.bottomLeft,
|
|
77
|
+
topLeft = constants.topLeft,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The welcome message mode.
|
|
82
|
+
*/
|
|
83
|
+
export enum WelcomeMessageMode {
|
|
84
|
+
live = constants.welcomeMessageModeLive,
|
|
85
|
+
beta = constants.welcomeMessageModeBeta,
|
|
86
|
+
disabled = constants.welcomeMessageModeDisabled,
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Type of the report either feedback or bug.
|
|
91
|
+
*/
|
|
92
|
+
export enum ReportType {
|
|
93
|
+
bug = constants.bugReportingReportTypeBug,
|
|
94
|
+
feedback = constants.bugReportingReportTypeFeedback,
|
|
95
|
+
question = constants.bugReportingReportTypeQuestion,
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Type of SDK dismiss.
|
|
100
|
+
*/
|
|
101
|
+
export enum DismissType {
|
|
102
|
+
submit = constants.dismissTypeSubmit,
|
|
103
|
+
cancel = constants.dismissTypeCancel,
|
|
104
|
+
addAttachment = constants.dismissTypeAddAttachment,
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Types of possible actions inside Feature Requests.
|
|
109
|
+
*/
|
|
110
|
+
export enum ActionType {
|
|
111
|
+
all = constants.allActions,
|
|
112
|
+
reportBug = constants.reportBugAction,
|
|
113
|
+
requestNewFeature = constants.requestNewFeature,
|
|
114
|
+
addCommentToFeature = constants.addCommentToFeature,
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The extended bug report mode.
|
|
119
|
+
*/
|
|
120
|
+
export enum ExtendedBugReportMode {
|
|
121
|
+
enabledWithRequiredFields = constants.enabledWithRequiredFields,
|
|
122
|
+
enabledWithOptionalFields = constants.enabledWithOptionalFields,
|
|
123
|
+
disabled = constants.disabled,
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The user steps option.
|
|
128
|
+
*/
|
|
129
|
+
export enum ReproStepsMode {
|
|
130
|
+
enabledWithNoScreenshots = constants.reproStepsEnabledWithNoScreenshots,
|
|
131
|
+
enabled = constants.reproStepsEnabled,
|
|
132
|
+
disabled = constants.reproStepsDisabled,
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The non fatal error level.
|
|
137
|
+
*/
|
|
138
|
+
export enum NonFatalErrorLevel {
|
|
139
|
+
error = constants.nonFatalErrorLevelError,
|
|
140
|
+
critical = constants.nonFatalErrorLevelCritical,
|
|
141
|
+
info = constants.nonFatalErrorLevelInfo,
|
|
142
|
+
warning = constants.nonFatalErrorLevelWarning,
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Supported locales
|
|
147
|
+
*/
|
|
148
|
+
export enum Locale {
|
|
149
|
+
arabic = constants.localeArabic,
|
|
150
|
+
azerbaijani = constants.localeAzerbaijani,
|
|
151
|
+
chineseSimplified = constants.localeChineseSimplified,
|
|
152
|
+
chineseTraditional = constants.localeChineseTraditional,
|
|
153
|
+
czech = constants.localeCzech,
|
|
154
|
+
danish = constants.localeDanish,
|
|
155
|
+
dutch = constants.localeDutch,
|
|
156
|
+
english = constants.localeEnglish,
|
|
157
|
+
french = constants.localeFrench,
|
|
158
|
+
german = constants.localeGerman,
|
|
159
|
+
italian = constants.localeItalian,
|
|
160
|
+
japanese = constants.localeJapanese,
|
|
161
|
+
korean = constants.localeKorean,
|
|
162
|
+
polish = constants.localePolish,
|
|
163
|
+
portugueseBrazil = constants.localePortugueseBrazil,
|
|
164
|
+
romanian = constants.localeRomanian,
|
|
165
|
+
russian = constants.localeRussian,
|
|
166
|
+
spanish = constants.localeSpanish,
|
|
167
|
+
swedish = constants.localeSwedish,
|
|
168
|
+
turkish = constants.localeTurkish,
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Overridable strings in Luciq's UI
|
|
173
|
+
*/
|
|
174
|
+
export enum StringKey {
|
|
175
|
+
addAttachmentButtonTitleStringName = constants.addAttachmentButtonTitleStringName,
|
|
176
|
+
addExtraScreenshot = constants.addExtraScreenshot,
|
|
177
|
+
addImageFromGallery = constants.addImageFromGallery,
|
|
178
|
+
addVideoMessage = constants.addVideoMessage,
|
|
179
|
+
addVoiceMessage = constants.addVoiceMessage,
|
|
180
|
+
audio = constants.audio,
|
|
181
|
+
audioRecordingPermissionDeniedMessage = constants.audioRecordingPermissionDeniedMessage,
|
|
182
|
+
audioRecordingPermissionDeniedTitle = constants.audioRecordingPermissionDeniedTitle,
|
|
183
|
+
cancelButtonText = constants.cancelButtonTitle,
|
|
184
|
+
collectingDataText = constants.collectingDataText,
|
|
185
|
+
commentFieldHintForBugReport = constants.commentFieldHintForBugReport,
|
|
186
|
+
commentFieldHintForFeedback = constants.commentFieldHintForFeedback,
|
|
187
|
+
commentFieldHintForQuestion = constants.commentFieldHintForQuestion,
|
|
188
|
+
conversationsHeaderTitle = constants.conversationsHeaderTitle,
|
|
189
|
+
conversationTextFieldHint = constants.conversationTextFieldHint,
|
|
190
|
+
discardAlertDiscard = constants.discardAlertDiscard,
|
|
191
|
+
discardAlertStay = constants.discardAlertStay,
|
|
192
|
+
discardAlertMessage = constants.discardAlertMessage,
|
|
193
|
+
discardAlertTitle = constants.discardAlertTitle,
|
|
194
|
+
edgeSwipeStartHint = constants.edgeSwipeStartHint,
|
|
195
|
+
emailFieldHint = constants.emailFieldHint,
|
|
196
|
+
image = constants.image,
|
|
197
|
+
|
|
198
|
+
insufficientContentMessage = constants.insufficientContentMessage,
|
|
199
|
+
/** iOS only */
|
|
200
|
+
insufficientContentTitle = constants.insufficientContentTitle,
|
|
201
|
+
invalidEmailMessage = constants.invalidEmailMessage,
|
|
202
|
+
invalidEmailTitle = constants.invalidEmailTitle,
|
|
203
|
+
invocationHeader = constants.invocationHeader,
|
|
204
|
+
messagesNotification = constants.messagesNotification,
|
|
205
|
+
messagesNotificationAndOthers = constants.messagesNotificationAndOthers,
|
|
206
|
+
microphonePermissionAlertSettingsButtonText = constants.microphonePermissionAlertSettingsButtonTitle,
|
|
207
|
+
okButtonText = constants.okButtonTitle,
|
|
208
|
+
recordingMessageToHoldText = constants.recordingMessageToHoldText,
|
|
209
|
+
recordingMessageToReleaseText = constants.recordingMessageToReleaseText,
|
|
210
|
+
reportBug = constants.reportBug,
|
|
211
|
+
reportBugDescription = constants.reportBugDescription,
|
|
212
|
+
reportFeedback = constants.reportFeedback,
|
|
213
|
+
reportFeedbackDescription = constants.reportFeedbackDescription,
|
|
214
|
+
reportQuestion = constants.reportQuestion,
|
|
215
|
+
reportQuestionDescription = constants.reportQuestionDescription,
|
|
216
|
+
reportReproStepsDisclaimerBody = constants.reportReproStepsDisclaimerBody,
|
|
217
|
+
reportReproStepsDisclaimerLink = constants.reportReproStepsDisclaimerLink,
|
|
218
|
+
reproStepsListDescription = constants.reproStepsListDescription,
|
|
219
|
+
reproStepsListEmptyStateDescription = constants.reproStepsListEmptyStateDescription,
|
|
220
|
+
reproStepsListHeader = constants.reproStepsListHeader,
|
|
221
|
+
reproStepsListItemNumberingTitle = constants.reproStepsListItemNumberingTitle,
|
|
222
|
+
reproStepsProgressDialogBody = constants.reproStepsProgressDialogBody,
|
|
223
|
+
requestFeatureDescription = constants.requestFeatureDescription,
|
|
224
|
+
screenRecording = constants.screenRecording,
|
|
225
|
+
screenshotHeaderTitle = constants.screenshotHeaderTitle,
|
|
226
|
+
shakeHint = constants.shakeHint,
|
|
227
|
+
startAlertText = constants.startAlertText,
|
|
228
|
+
surveysStoreRatingThanksSubtitle = constants.surveysStoreRatingThanksSubtitle,
|
|
229
|
+
surveysStoreRatingThanksTitle = constants.surveysStoreRatingThanksTitle,
|
|
230
|
+
swipeHint = constants.swipeHint,
|
|
231
|
+
team = constants.team,
|
|
232
|
+
thankYouAlertText = constants.thankYouAlertText,
|
|
233
|
+
thankYouText = constants.thankYouText,
|
|
234
|
+
videoPressRecord = constants.videoPressRecord,
|
|
235
|
+
welcomeMessageBetaFinishStepContent = constants.welcomeMessageBetaFinishStepContent,
|
|
236
|
+
welcomeMessageBetaFinishStepTitle = constants.welcomeMessageBetaFinishStepTitle,
|
|
237
|
+
welcomeMessageBetaHowToReportStepContent = constants.welcomeMessageBetaHowToReportStepContent,
|
|
238
|
+
welcomeMessageBetaHowToReportStepTitle = constants.welcomeMessageBetaHowToReportStepTitle,
|
|
239
|
+
welcomeMessageBetaWelcomeStepContent = constants.welcomeMessageBetaWelcomeStepContent,
|
|
240
|
+
welcomeMessageBetaWelcomeStepTitle = constants.welcomeMessageBetaWelcomeStepTitle,
|
|
241
|
+
welcomeMessageLiveWelcomeStepContent = constants.welcomeMessageLiveWelcomeStepContent,
|
|
242
|
+
welcomeMessageLiveWelcomeStepTitle = constants.welcomeMessageLiveWelcomeStepTitle,
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export enum LaunchType {
|
|
246
|
+
cold = constants.cold,
|
|
247
|
+
unknown = constants.unknown,
|
|
248
|
+
/**
|
|
249
|
+
* Android only
|
|
250
|
+
*/
|
|
251
|
+
warm = constants.warm,
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Over Air Update Service
|
|
256
|
+
*/
|
|
257
|
+
export enum OverAirUpdateServices {
|
|
258
|
+
codePush = constants.codePush,
|
|
259
|
+
expo = constants.expo,
|
|
260
|
+
}
|
|
261
|
+
export enum AutoMaskingType {
|
|
262
|
+
labels = constants.labels,
|
|
263
|
+
textInputs = constants.textInputs,
|
|
264
|
+
media = constants.media,
|
|
265
|
+
none = constants.none,
|
|
266
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NativeLuciq } from '../native/NativeLuciq';
|
|
2
|
+
import { _registerFeatureFlagsChangeListener } from '../modules/Luciq';
|
|
3
|
+
|
|
4
|
+
export const FeatureFlags = {
|
|
5
|
+
isW3ExternalTraceID: () => NativeLuciq.isW3ExternalTraceIDEnabled(),
|
|
6
|
+
isW3ExternalGeneratedHeader: () => NativeLuciq.isW3ExternalGeneratedHeaderEnabled(),
|
|
7
|
+
isW3CaughtHeader: () => NativeLuciq.isW3CaughtHeaderEnabled(),
|
|
8
|
+
networkLogLimit: () => NativeLuciq.getNetworkBodyMaxSize(),
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const registerFeatureFlagsListener = () => {
|
|
12
|
+
_registerFeatureFlagsChangeListener(
|
|
13
|
+
(res: {
|
|
14
|
+
isW3ExternalTraceIDEnabled: boolean;
|
|
15
|
+
isW3ExternalGeneratedHeaderEnabled: boolean;
|
|
16
|
+
isW3CaughtHeaderEnabled: boolean;
|
|
17
|
+
networkBodyLimit: number;
|
|
18
|
+
}) => {
|
|
19
|
+
FeatureFlags.isW3ExternalTraceID = async () => {
|
|
20
|
+
return res.isW3ExternalTraceIDEnabled;
|
|
21
|
+
};
|
|
22
|
+
FeatureFlags.isW3ExternalGeneratedHeader = async () => {
|
|
23
|
+
return res.isW3ExternalGeneratedHeaderEnabled;
|
|
24
|
+
};
|
|
25
|
+
FeatureFlags.isW3CaughtHeader = async () => {
|
|
26
|
+
return res.isW3CaughtHeaderEnabled;
|
|
27
|
+
};
|
|
28
|
+
FeatureFlags.networkLogLimit = async () => {
|
|
29
|
+
return res.networkBodyLimit;
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const LuciqConstants = {
|
|
2
|
+
GRAPHQL_HEADER: 'lcq-graphql-header',
|
|
3
|
+
|
|
4
|
+
// TODO: dyanmically get the max size from the native SDK and update the error message to reflect the dynamic size.
|
|
5
|
+
MAX_NETWORK_BODY_SIZE_IN_BYTES: 1024 * 10, // 10 KB
|
|
6
|
+
MAX_RESPONSE_BODY_SIZE_EXCEEDED_MESSAGE:
|
|
7
|
+
'The response body has not been logged because it exceeds the maximum size of ',
|
|
8
|
+
MAX_REQUEST_BODY_SIZE_EXCEEDED_MESSAGE:
|
|
9
|
+
'The request body has not been logged because it exceeds the maximum size of ',
|
|
10
|
+
SET_USER_ATTRIBUTES_ERROR_TYPE_MESSAGE:
|
|
11
|
+
'LCQ-RN: Expected key and value passed to setUserAttribute to be of type string',
|
|
12
|
+
REMOVE_USER_ATTRIBUTES_ERROR_TYPE_MESSAGE:
|
|
13
|
+
'LCQ-RN: Expected key and value passed to removeUserAttribute to be of type string',
|
|
14
|
+
DEFAULT_METRO_PORT: '8081',
|
|
15
|
+
LCQ_APM_TAG: 'LCQ-APM: ',
|
|
16
|
+
SWITCHED_TO_NATIVE_INTERCEPTION_MESSAGE:
|
|
17
|
+
'Android Plugin Detected. Switched to Native Interception.',
|
|
18
|
+
PLUGIN_NOT_INSTALLED_MESSAGE:
|
|
19
|
+
'Network Spans will not be captured as Android Plugin is not installed. Disabling Native Interception to minimize data loss.',
|
|
20
|
+
NATIVE_INTERCEPTION_DISABLED_MESSAGE:
|
|
21
|
+
'Network Spans capture is disabled by Luciq. Disabling native interception to avoid data loss.',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default LuciqConstants;
|