@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,253 @@
|
|
|
1
|
+
import LuciqConstants from './LuciqConstants';
|
|
2
|
+
import { stringifyIfNotString, generateW3CHeader } from './LuciqUtils';
|
|
3
|
+
import { FeatureFlags } from '../utils/FeatureFlags';
|
|
4
|
+
const XMLHttpRequest = global.XMLHttpRequest;
|
|
5
|
+
let originalXHROpen = XMLHttpRequest.prototype.open;
|
|
6
|
+
let originalXHRSend = XMLHttpRequest.prototype.send;
|
|
7
|
+
let originalXHRSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
|
8
|
+
let onProgressCallback;
|
|
9
|
+
let onDoneCallback;
|
|
10
|
+
let isInterceptorEnabled = false;
|
|
11
|
+
let network;
|
|
12
|
+
const _reset = () => {
|
|
13
|
+
network = {
|
|
14
|
+
id: '',
|
|
15
|
+
url: '',
|
|
16
|
+
method: '',
|
|
17
|
+
requestBody: '',
|
|
18
|
+
requestBodySize: 0,
|
|
19
|
+
responseBody: '',
|
|
20
|
+
responseBodySize: 0,
|
|
21
|
+
responseCode: 0,
|
|
22
|
+
requestHeaders: {},
|
|
23
|
+
responseHeaders: {},
|
|
24
|
+
contentType: '',
|
|
25
|
+
errorDomain: '',
|
|
26
|
+
errorCode: 0,
|
|
27
|
+
startTime: 0,
|
|
28
|
+
duration: 0,
|
|
29
|
+
gqlQueryName: '',
|
|
30
|
+
serverErrorMessage: '',
|
|
31
|
+
requestContentType: '',
|
|
32
|
+
isW3cHeaderFound: null,
|
|
33
|
+
partialId: null,
|
|
34
|
+
networkStartTimeInSeconds: null,
|
|
35
|
+
w3cGeneratedHeader: null,
|
|
36
|
+
w3cCaughtHeader: null,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
const getTraceparentHeader = async (networkData) => {
|
|
40
|
+
const [isW3cExternalTraceIDEnabled, isW3cExternalGeneratedHeaderEnabled, isW3cCaughtHeaderEnabled,] = await Promise.all([
|
|
41
|
+
FeatureFlags.isW3ExternalTraceID(),
|
|
42
|
+
FeatureFlags.isW3ExternalGeneratedHeader(),
|
|
43
|
+
FeatureFlags.isW3CaughtHeader(),
|
|
44
|
+
]);
|
|
45
|
+
return injectHeaders(networkData, {
|
|
46
|
+
isW3cExternalTraceIDEnabled,
|
|
47
|
+
isW3cExternalGeneratedHeaderEnabled,
|
|
48
|
+
isW3cCaughtHeaderEnabled,
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
export const injectHeaders = (networkData, featureFlags) => {
|
|
52
|
+
const { isW3cExternalTraceIDEnabled, isW3cExternalGeneratedHeaderEnabled, isW3cCaughtHeaderEnabled, } = featureFlags;
|
|
53
|
+
if (!isW3cExternalTraceIDEnabled) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const isHeaderFound = networkData.requestHeaders.traceparent != null;
|
|
57
|
+
networkData.isW3cHeaderFound = isHeaderFound;
|
|
58
|
+
const injectionMethodology = isHeaderFound
|
|
59
|
+
? identifyCaughtHeader(networkData, isW3cCaughtHeaderEnabled)
|
|
60
|
+
: injectGeneratedData(networkData, isW3cExternalGeneratedHeaderEnabled);
|
|
61
|
+
return injectionMethodology;
|
|
62
|
+
};
|
|
63
|
+
const identifyCaughtHeader = (networkData, isW3cCaughtHeaderEnabled) => {
|
|
64
|
+
if (isW3cCaughtHeaderEnabled) {
|
|
65
|
+
networkData.w3cCaughtHeader = networkData.requestHeaders.traceparent;
|
|
66
|
+
return networkData.requestHeaders.traceparent;
|
|
67
|
+
}
|
|
68
|
+
return;
|
|
69
|
+
};
|
|
70
|
+
const injectGeneratedData = (networkData, isW3cExternalGeneratedHeaderEnabled) => {
|
|
71
|
+
const { timestampInSeconds, partialId, w3cHeader } = generateW3CHeader(networkData.startTime);
|
|
72
|
+
networkData.partialId = partialId;
|
|
73
|
+
networkData.networkStartTimeInSeconds = timestampInSeconds;
|
|
74
|
+
if (isW3cExternalGeneratedHeaderEnabled) {
|
|
75
|
+
networkData.w3cGeneratedHeader = w3cHeader;
|
|
76
|
+
return w3cHeader;
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
};
|
|
80
|
+
export default {
|
|
81
|
+
setOnDoneCallback(callback) {
|
|
82
|
+
onDoneCallback = callback;
|
|
83
|
+
},
|
|
84
|
+
setOnProgressCallback(callback) {
|
|
85
|
+
onProgressCallback = callback;
|
|
86
|
+
},
|
|
87
|
+
enableInterception() {
|
|
88
|
+
// Prevents infinite calls to XMLHttpRequest.open when enabling interception multiple times
|
|
89
|
+
if (isInterceptorEnabled) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
originalXHROpen = XMLHttpRequest.prototype.open;
|
|
93
|
+
originalXHRSend = XMLHttpRequest.prototype.send;
|
|
94
|
+
originalXHRSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
|
95
|
+
// An error code that signifies an issue with the RN client.
|
|
96
|
+
const clientErrorCode = 9876;
|
|
97
|
+
XMLHttpRequest.prototype.open = function (method, url, ...args) {
|
|
98
|
+
_reset();
|
|
99
|
+
network.url = url;
|
|
100
|
+
network.method = method;
|
|
101
|
+
originalXHROpen.apply(this, [method, url, ...args]);
|
|
102
|
+
};
|
|
103
|
+
XMLHttpRequest.prototype.setRequestHeader = function (header, value) {
|
|
104
|
+
// According to the HTTP RFC, headers are case-insensitive, so we convert
|
|
105
|
+
// them to lower-case to make accessing headers predictable.
|
|
106
|
+
// This avoid issues like failing to get the Content-Type header for a request
|
|
107
|
+
// because the header is set as 'Content-Type' instead of 'content-type'.
|
|
108
|
+
const key = header.toLowerCase();
|
|
109
|
+
network.requestHeaders[key] = stringifyIfNotString(value);
|
|
110
|
+
originalXHRSetRequestHeader.apply(this, [header, value]);
|
|
111
|
+
};
|
|
112
|
+
XMLHttpRequest.prototype.send = async function (data) {
|
|
113
|
+
const cloneNetwork = JSON.parse(JSON.stringify(network));
|
|
114
|
+
cloneNetwork.requestBody = data ? data : '';
|
|
115
|
+
if (typeof cloneNetwork.requestBody !== 'string') {
|
|
116
|
+
cloneNetwork.requestBody = JSON.stringify(cloneNetwork.requestBody);
|
|
117
|
+
}
|
|
118
|
+
if (this.addEventListener) {
|
|
119
|
+
this.addEventListener('readystatechange', async () => {
|
|
120
|
+
if (!isInterceptorEnabled) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (this.readyState === this.HEADERS_RECEIVED) {
|
|
124
|
+
const contentTypeString = this.getResponseHeader('Content-Type');
|
|
125
|
+
if (contentTypeString) {
|
|
126
|
+
cloneNetwork.contentType = contentTypeString.split(';')[0];
|
|
127
|
+
}
|
|
128
|
+
const responseBodySizeString = this.getResponseHeader('Content-Length');
|
|
129
|
+
if (responseBodySizeString) {
|
|
130
|
+
const responseBodySizeNumber = Number(responseBodySizeString);
|
|
131
|
+
if (!isNaN(responseBodySizeNumber)) {
|
|
132
|
+
cloneNetwork.responseBodySize = responseBodySizeNumber;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (this.getAllResponseHeaders()) {
|
|
136
|
+
const responseHeaders = this.getAllResponseHeaders().split('\r\n');
|
|
137
|
+
const responseHeadersDictionary = {};
|
|
138
|
+
responseHeaders.forEach((element) => {
|
|
139
|
+
const key = element.split(/:(.+)/)[0];
|
|
140
|
+
const value = element.split(/:(.+)/)[1];
|
|
141
|
+
responseHeadersDictionary[key] = value;
|
|
142
|
+
});
|
|
143
|
+
cloneNetwork.responseHeaders = responseHeadersDictionary;
|
|
144
|
+
}
|
|
145
|
+
if (cloneNetwork.requestHeaders['content-type']) {
|
|
146
|
+
cloneNetwork.requestContentType =
|
|
147
|
+
cloneNetwork.requestHeaders['content-type'].split(';')[0];
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (this.readyState === this.DONE) {
|
|
151
|
+
cloneNetwork.duration = Date.now() - cloneNetwork.startTime;
|
|
152
|
+
if (this.status == null) {
|
|
153
|
+
cloneNetwork.responseCode = 0;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
cloneNetwork.responseCode = this.status;
|
|
157
|
+
}
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
if (this._hasError) {
|
|
160
|
+
cloneNetwork.errorCode = clientErrorCode;
|
|
161
|
+
cloneNetwork.errorDomain = 'ClientError';
|
|
162
|
+
// @ts-ignore
|
|
163
|
+
const _response = this._response;
|
|
164
|
+
cloneNetwork.requestBody =
|
|
165
|
+
typeof _response === 'string' ? _response : JSON.stringify(_response);
|
|
166
|
+
cloneNetwork.responseBody = '';
|
|
167
|
+
// Detect a more descriptive error message.
|
|
168
|
+
if (typeof _response === 'string' && _response.length > 0) {
|
|
169
|
+
cloneNetwork.errorDomain = _response;
|
|
170
|
+
}
|
|
171
|
+
// @ts-ignore
|
|
172
|
+
}
|
|
173
|
+
else if (this._timedOut) {
|
|
174
|
+
cloneNetwork.errorCode = clientErrorCode;
|
|
175
|
+
cloneNetwork.errorDomain = 'TimeOutError';
|
|
176
|
+
}
|
|
177
|
+
if (this.response) {
|
|
178
|
+
if (this.responseType === 'blob') {
|
|
179
|
+
const responseText = await new Response(this.response).text();
|
|
180
|
+
cloneNetwork.responseBody = responseText;
|
|
181
|
+
}
|
|
182
|
+
else if (['text', '', 'json'].includes(this.responseType)) {
|
|
183
|
+
cloneNetwork.responseBody = JSON.stringify(this.response);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
cloneNetwork.responseBody = '';
|
|
188
|
+
cloneNetwork.contentType = 'text/plain';
|
|
189
|
+
}
|
|
190
|
+
cloneNetwork.requestBodySize = cloneNetwork.requestBody.length;
|
|
191
|
+
if (cloneNetwork.responseBodySize === 0 && cloneNetwork.responseBody) {
|
|
192
|
+
cloneNetwork.responseBodySize = cloneNetwork.responseBody.length;
|
|
193
|
+
}
|
|
194
|
+
if (cloneNetwork.requestHeaders[LuciqConstants.GRAPHQL_HEADER]) {
|
|
195
|
+
cloneNetwork.gqlQueryName =
|
|
196
|
+
cloneNetwork.requestHeaders[LuciqConstants.GRAPHQL_HEADER];
|
|
197
|
+
delete cloneNetwork.requestHeaders[LuciqConstants.GRAPHQL_HEADER];
|
|
198
|
+
if (cloneNetwork.gqlQueryName === 'null') {
|
|
199
|
+
cloneNetwork.gqlQueryName = '';
|
|
200
|
+
}
|
|
201
|
+
if (cloneNetwork.responseBody) {
|
|
202
|
+
const responseObj = JSON.parse(cloneNetwork.responseBody);
|
|
203
|
+
if (responseObj.errors) {
|
|
204
|
+
cloneNetwork.serverErrorMessage = 'GraphQLError';
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
cloneNetwork.serverErrorMessage = '';
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
delete cloneNetwork.gqlQueryName;
|
|
213
|
+
}
|
|
214
|
+
if (onDoneCallback) {
|
|
215
|
+
onDoneCallback(cloneNetwork);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
const downloadUploadProgressCallback = (event) => {
|
|
220
|
+
if (!isInterceptorEnabled) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
// check if will be able to compute progress
|
|
224
|
+
if (event.lengthComputable && onProgressCallback) {
|
|
225
|
+
const totalBytesSent = event.loaded;
|
|
226
|
+
const totalBytesExpectedToSend = event.total - event.loaded;
|
|
227
|
+
onProgressCallback(totalBytesSent, totalBytesExpectedToSend);
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
this.addEventListener('progress', downloadUploadProgressCallback);
|
|
231
|
+
this.upload.addEventListener('progress', downloadUploadProgressCallback);
|
|
232
|
+
}
|
|
233
|
+
cloneNetwork.startTime = Date.now();
|
|
234
|
+
const traceparent = await getTraceparentHeader(cloneNetwork);
|
|
235
|
+
if (traceparent) {
|
|
236
|
+
this.setRequestHeader('Traceparent', traceparent);
|
|
237
|
+
}
|
|
238
|
+
if (this.readyState === this.UNSENT) {
|
|
239
|
+
return; // Prevent sending the request if not opened
|
|
240
|
+
}
|
|
241
|
+
originalXHRSend.apply(this, [data]);
|
|
242
|
+
};
|
|
243
|
+
isInterceptorEnabled = true;
|
|
244
|
+
},
|
|
245
|
+
disableInterception() {
|
|
246
|
+
isInterceptorEnabled = false;
|
|
247
|
+
XMLHttpRequest.prototype.send = originalXHRSend;
|
|
248
|
+
XMLHttpRequest.prototype.open = originalXHROpen;
|
|
249
|
+
XMLHttpRequest.prototype.setRequestHeader = originalXHRSetRequestHeader;
|
|
250
|
+
onDoneCallback = null;
|
|
251
|
+
onProgressCallback = null;
|
|
252
|
+
},
|
|
253
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class Logger {
|
|
2
|
+
private static shouldLog;
|
|
3
|
+
private static logMessage;
|
|
4
|
+
static error(message?: any, ...optionalParams: any[]): void;
|
|
5
|
+
static info(message?: any, ...optionalParams: any[]): void;
|
|
6
|
+
static log(message?: any, ...optionalParams: any[]): void;
|
|
7
|
+
static warn(message?: any, ...optionalParams: any[]): void;
|
|
8
|
+
static trace(message?: any, ...optionalParams: any[]): void;
|
|
9
|
+
static debug(message?: any, ...optionalParams: any[]): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LuciqRNConfig } from './config';
|
|
2
|
+
import { LogLevel } from './Enums';
|
|
3
|
+
export class Logger {
|
|
4
|
+
static shouldLog(level) {
|
|
5
|
+
const currentLevel = LuciqRNConfig.debugLogsLevel;
|
|
6
|
+
// Return true if the current log level is equal to or more verbose than the requested level
|
|
7
|
+
const logLevelHierarchy = {
|
|
8
|
+
[LogLevel.verbose]: 3,
|
|
9
|
+
[LogLevel.debug]: 2,
|
|
10
|
+
[LogLevel.error]: 1,
|
|
11
|
+
[LogLevel.none]: 0,
|
|
12
|
+
};
|
|
13
|
+
return logLevelHierarchy[currentLevel] >= logLevelHierarchy[level];
|
|
14
|
+
}
|
|
15
|
+
// General logging method that takes a logging function as an argument
|
|
16
|
+
static logMessage(level, logMethod, message, ...optionalParams) {
|
|
17
|
+
if (this.shouldLog(level)) {
|
|
18
|
+
logMethod(message, ...optionalParams);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
static error(message, ...optionalParams) {
|
|
22
|
+
this.logMessage(LogLevel.error, console.error, message, ...optionalParams); // Pass console.error for errors
|
|
23
|
+
}
|
|
24
|
+
static info(message, ...optionalParams) {
|
|
25
|
+
this.logMessage(LogLevel.verbose, console.info, message, ...optionalParams); // Pass console.info for info
|
|
26
|
+
}
|
|
27
|
+
static log(message, ...optionalParams) {
|
|
28
|
+
this.logMessage(LogLevel.verbose, console.log, message, ...optionalParams); // Default log method
|
|
29
|
+
}
|
|
30
|
+
static warn(message, ...optionalParams) {
|
|
31
|
+
this.logMessage(LogLevel.debug, console.warn, message, ...optionalParams); // Use console.warn for debug
|
|
32
|
+
}
|
|
33
|
+
static trace(message, ...optionalParams) {
|
|
34
|
+
this.logMessage(LogLevel.debug, console.trace, message, ...optionalParams); // Use console.trace for debugging
|
|
35
|
+
}
|
|
36
|
+
static debug(message, ...optionalParams) {
|
|
37
|
+
this.logMessage(LogLevel.debug, console.debug, message, ...optionalParams); // Use console.debug for debug logs
|
|
38
|
+
}
|
|
39
|
+
}
|
package/expo.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './plugin/build';
|
package/expo.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./plugin/build');
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
3
|
+
#import <LuciqSDK/LuciqSDK.h>
|
|
4
|
+
|
|
5
|
+
typedef NSDictionary<NSString*, NSNumber*> ArgsDictionary;
|
|
6
|
+
|
|
7
|
+
@interface ArgsRegistry : NSObject
|
|
8
|
+
|
|
9
|
+
+ (NSMutableDictionary *) getAll;
|
|
10
|
+
|
|
11
|
+
+ (ArgsDictionary *) sdkLogLevels;
|
|
12
|
+
+ (ArgsDictionary *) invocationEvents;
|
|
13
|
+
+ (ArgsDictionary *) invocationOptions;
|
|
14
|
+
+ (ArgsDictionary *) colorThemes;
|
|
15
|
+
+ (ArgsDictionary *) floatingButtonEdges;
|
|
16
|
+
+ (ArgsDictionary *) recordButtonPositions;
|
|
17
|
+
+ (ArgsDictionary *) welcomeMessageStates;
|
|
18
|
+
+ (ArgsDictionary *) reportTypes;
|
|
19
|
+
+ (ArgsDictionary *) dismissTypes;
|
|
20
|
+
+ (ArgsDictionary *) actionTypes;
|
|
21
|
+
+ (ArgsDictionary *) extendedBugReportStates;
|
|
22
|
+
+ (ArgsDictionary *) reproStates;
|
|
23
|
+
+ (ArgsDictionary *) locales;
|
|
24
|
+
+ (ArgsDictionary *)nonFatalExceptionLevel;
|
|
25
|
+
+ (ArgsDictionary *) launchType;
|
|
26
|
+
+ (ArgsDictionary *) overAirServices;
|
|
27
|
+
+ (ArgsDictionary *) userConsentActionTypes;
|
|
28
|
+
|
|
29
|
+
+ (NSDictionary<NSString *, NSString *> *) placeholders;
|
|
30
|
+
+ (ArgsDictionary *)autoMaskingTypes;
|
|
31
|
+
|
|
32
|
+
@end
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
#import "ArgsRegistry.h"
|
|
2
|
+
|
|
3
|
+
@implementation ArgsRegistry
|
|
4
|
+
|
|
5
|
+
+ (NSMutableDictionary *) getAll {
|
|
6
|
+
NSMutableDictionary *all = [[NSMutableDictionary alloc] init];
|
|
7
|
+
|
|
8
|
+
[all addEntriesFromDictionary:ArgsRegistry.sdkLogLevels];
|
|
9
|
+
[all addEntriesFromDictionary:ArgsRegistry.invocationEvents];
|
|
10
|
+
[all addEntriesFromDictionary:ArgsRegistry.invocationOptions];
|
|
11
|
+
[all addEntriesFromDictionary:ArgsRegistry.colorThemes];
|
|
12
|
+
[all addEntriesFromDictionary:ArgsRegistry.floatingButtonEdges];
|
|
13
|
+
[all addEntriesFromDictionary:ArgsRegistry.recordButtonPositions];
|
|
14
|
+
[all addEntriesFromDictionary:ArgsRegistry.welcomeMessageStates];
|
|
15
|
+
[all addEntriesFromDictionary:ArgsRegistry.reportTypes];
|
|
16
|
+
[all addEntriesFromDictionary:ArgsRegistry.dismissTypes];
|
|
17
|
+
[all addEntriesFromDictionary:ArgsRegistry.actionTypes];
|
|
18
|
+
[all addEntriesFromDictionary:ArgsRegistry.extendedBugReportStates];
|
|
19
|
+
[all addEntriesFromDictionary:ArgsRegistry.reproStates];
|
|
20
|
+
[all addEntriesFromDictionary:ArgsRegistry.locales];
|
|
21
|
+
[all addEntriesFromDictionary:ArgsRegistry.nonFatalExceptionLevel];
|
|
22
|
+
[all addEntriesFromDictionary:ArgsRegistry.placeholders];
|
|
23
|
+
[all addEntriesFromDictionary:ArgsRegistry.launchType];
|
|
24
|
+
[all addEntriesFromDictionary:ArgsRegistry.overAirServices];
|
|
25
|
+
|
|
26
|
+
[all addEntriesFromDictionary:ArgsRegistry.autoMaskingTypes];
|
|
27
|
+
[all addEntriesFromDictionary:ArgsRegistry.userConsentActionTypes];
|
|
28
|
+
|
|
29
|
+
return all;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
+ (ArgsDictionary *) sdkLogLevels {
|
|
33
|
+
return @{
|
|
34
|
+
@"sdkDebugLogsLevelVerbose": @(LCQSDKDebugLogsLevelVerbose),
|
|
35
|
+
@"sdkDebugLogsLevelDebug": @(LCQSDKDebugLogsLevelDebug),
|
|
36
|
+
@"sdkDebugLogsLevelError": @(LCQSDKDebugLogsLevelError),
|
|
37
|
+
@"sdkDebugLogsLevelNone": @(LCQSDKDebugLogsLevelNone),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
+ (ArgsDictionary *) invocationEvents {
|
|
42
|
+
return@{
|
|
43
|
+
@"invocationEventNone": @(LCQInvocationEventNone),
|
|
44
|
+
@"invocationEventShake": @(LCQInvocationEventShake),
|
|
45
|
+
@"invocationEventScreenshot": @(LCQInvocationEventScreenshot),
|
|
46
|
+
@"invocationEventTwoFingersSwipeLeft": @(LCQInvocationEventTwoFingersSwipeLeft),
|
|
47
|
+
@"invocationEventRightEdgePan": @(LCQInvocationEventRightEdgePan),
|
|
48
|
+
@"invocationEventFloatingButton": @(LCQInvocationEventFloatingButton)
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
+ (ArgsDictionary *) invocationOptions {
|
|
53
|
+
return @{
|
|
54
|
+
@"optionEmailFieldHidden": @(LCQBugReportingOptionEmailFieldHidden),
|
|
55
|
+
@"optionEmailFieldOptional": @(LCQBugReportingOptionEmailFieldOptional),
|
|
56
|
+
@"optionCommentFieldRequired": @(LCQBugReportingOptionCommentFieldRequired),
|
|
57
|
+
@"optionDisablePostSendingDialog": @(LCQBugReportingOptionDisablePostSendingDialog),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
+ (ArgsDictionary *) colorThemes {
|
|
62
|
+
return @{
|
|
63
|
+
@"colorThemeLight": @(LCQColorThemeLight),
|
|
64
|
+
@"colorThemeDark": @(LCQColorThemeDark),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
+ (ArgsDictionary *) floatingButtonEdges {
|
|
69
|
+
return @{
|
|
70
|
+
@"rectMinXEdge": @(CGRectMinXEdge),
|
|
71
|
+
@"rectMinYEdge": @(CGRectMinYEdge),
|
|
72
|
+
@"rectMaxXEdge": @(CGRectMaxXEdge),
|
|
73
|
+
@"rectMaxYEdge": @(CGRectMaxYEdge),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
+ (ArgsDictionary *) recordButtonPositions {
|
|
78
|
+
return @{
|
|
79
|
+
@"topLeft": @(LCQPositionTopLeft),
|
|
80
|
+
@"topRight": @(LCQPositionTopRight),
|
|
81
|
+
@"bottomLeft": @(LCQPositionBottomLeft),
|
|
82
|
+
@"bottomRight": @(LCQPositionBottomRight),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
+ (ArgsDictionary *) welcomeMessageStates {
|
|
87
|
+
return @{
|
|
88
|
+
@"welcomeMessageModeLive": @(LCQWelcomeMessageModeLive),
|
|
89
|
+
@"welcomeMessageModeBeta": @(LCQWelcomeMessageModeBeta),
|
|
90
|
+
@"welcomeMessageModeDisabled": @(LCQWelcomeMessageModeDisabled),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
+ (ArgsDictionary *) reportTypes {
|
|
95
|
+
return @{
|
|
96
|
+
@"bugReportingReportTypeBug": @(LCQBugReportingReportTypeBug),
|
|
97
|
+
@"bugReportingReportTypeFeedback": @(LCQBugReportingReportTypeFeedback),
|
|
98
|
+
@"bugReportingReportTypeQuestion": @(LCQBugReportingReportTypeQuestion),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
+ (ArgsDictionary *) dismissTypes {
|
|
103
|
+
return @{
|
|
104
|
+
@"dismissTypeSubmit": @(LCQDismissTypeSubmit),
|
|
105
|
+
@"dismissTypeCancel": @(LCQDismissTypeCancel),
|
|
106
|
+
@"dismissTypeAddAttachment": @(LCQDismissTypeAddAttachment),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
+ (ArgsDictionary *) actionTypes {
|
|
111
|
+
return @{
|
|
112
|
+
@"allActions": @(LCQActionAllActions),
|
|
113
|
+
@"requestNewFeature": @(LCQActionRequestNewFeature),
|
|
114
|
+
@"addCommentToFeature": @(LCQActionAddCommentToFeature),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
+ (ArgsDictionary *) userConsentActionTypes {
|
|
118
|
+
return @{
|
|
119
|
+
@"dropAutoCapturedMedia": @(LCQConsentActionDropAutoCapturedMedia),
|
|
120
|
+
@"dropLogs": @(LCQConsentActionDropLogs),
|
|
121
|
+
@"noChat": @(LCQConsentActionNoChat)
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
+ (ArgsDictionary *) extendedBugReportStates {
|
|
125
|
+
return @{
|
|
126
|
+
@"enabledWithRequiredFields": @(LCQExtendedBugReportModeEnabledWithRequiredFields),
|
|
127
|
+
@"enabledWithOptionalFields": @(LCQExtendedBugReportModeEnabledWithOptionalFields),
|
|
128
|
+
@"disabled": @(LCQExtendedBugReportModeDisabled),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
+ (ArgsDictionary *) reproStates {
|
|
133
|
+
return @{
|
|
134
|
+
@"reproStepsEnabled": @(LCQUserStepsModeEnable),
|
|
135
|
+
@"reproStepsDisabled": @(LCQUserStepsModeDisable),
|
|
136
|
+
@"reproStepsEnabledWithNoScreenshots": @(LCQUserStepsModeEnabledWithNoScreenshots),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
+ (ArgsDictionary *) locales {
|
|
141
|
+
return @{
|
|
142
|
+
@"localeArabic": @(LCQLocaleArabic),
|
|
143
|
+
@"localeAzerbaijani": @(LCQLocaleAzerbaijani),
|
|
144
|
+
@"localeChineseSimplified": @(LCQLocaleChineseSimplified),
|
|
145
|
+
@"localeChineseTraditional": @(LCQLocaleChineseTraditional),
|
|
146
|
+
@"localeCzech": @(LCQLocaleCzech),
|
|
147
|
+
@"localeDanish": @(LCQLocaleDanish),
|
|
148
|
+
@"localeDutch": @(LCQLocaleDutch),
|
|
149
|
+
@"localeEnglish": @(LCQLocaleEnglish),
|
|
150
|
+
@"localeFrench": @(LCQLocaleFrench),
|
|
151
|
+
@"localeGerman": @(LCQLocaleGerman),
|
|
152
|
+
@"localeItalian": @(LCQLocaleItalian),
|
|
153
|
+
@"localeJapanese": @(LCQLocaleJapanese),
|
|
154
|
+
@"localeKorean": @(LCQLocaleKorean),
|
|
155
|
+
@"localePolish": @(LCQLocalePolish),
|
|
156
|
+
@"localePortugueseBrazil": @(LCQLocalePortugueseBrazil),
|
|
157
|
+
@"localeRomanian": @(LCQLocaleRomanian),
|
|
158
|
+
@"localeRussian": @(LCQLocaleRussian),
|
|
159
|
+
@"localeSpanish": @(LCQLocaleSpanish),
|
|
160
|
+
@"localeSwedish": @(LCQLocaleSwedish),
|
|
161
|
+
@"localeTurkish": @(LCQLocaleTurkish),
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
+ (ArgsDictionary *)nonFatalExceptionLevel {
|
|
166
|
+
return @{
|
|
167
|
+
@"nonFatalErrorLevelInfo" : @(LCQNonFatalLevelInfo),
|
|
168
|
+
@"nonFatalErrorLevelError" : @(LCQNonFatalLevelError),
|
|
169
|
+
@"nonFatalErrorLevelWarning" : @(LCQNonFatalLevelWarning),
|
|
170
|
+
@"nonFatalErrorLevelCritical" : @(LCQNonFatalLevelCritical)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
+ (NSDictionary<NSString *, NSString *> *) placeholders {
|
|
177
|
+
return @{
|
|
178
|
+
@"shakeHint": kLCQShakeStartAlertTextStringName,
|
|
179
|
+
@"swipeHint": kLCQTwoFingerSwipeStartAlertTextStringName,
|
|
180
|
+
@"edgeSwipeStartHint": kLCQEdgeSwipeStartAlertTextStringName,
|
|
181
|
+
@"startAlertText": kLCQStartAlertTextStringName,
|
|
182
|
+
@"invalidEmailMessage": kLCQInvalidEmailMessageStringName,
|
|
183
|
+
@"invalidEmailTitle": kLCQInvalidEmailTitleStringName,
|
|
184
|
+
|
|
185
|
+
@"invocationHeader": kLCQInvocationTitleStringName,
|
|
186
|
+
@"reportQuestion": kLCQAskAQuestionStringName,
|
|
187
|
+
@"reportBug": kLCQReportBugStringName,
|
|
188
|
+
@"reportFeedback": kLCQReportFeedbackStringName,
|
|
189
|
+
@"emailFieldHint": kLCQEmailFieldPlaceholderStringName,
|
|
190
|
+
@"commentFieldHintForBugReport": kLCQCommentFieldPlaceholderForBugReportStringName,
|
|
191
|
+
@"commentFieldHintForFeedback": kLCQCommentFieldPlaceholderForFeedbackStringName,
|
|
192
|
+
@"commentFieldHintForQuestion": kLCQCommentFieldPlaceholderForQuestionStringName,
|
|
193
|
+
@"addVideoMessage": kLCQAddScreenRecordingMessageStringName,
|
|
194
|
+
@"addVoiceMessage": kLCQAddVoiceMessageStringName,
|
|
195
|
+
@"addImageFromGallery": kLCQAddImageFromGalleryStringName,
|
|
196
|
+
@"addExtraScreenshot": kLCQAddExtraScreenshotStringName,
|
|
197
|
+
@"audioRecordingPermissionDeniedTitle": kLCQAudioRecordingPermissionDeniedTitleStringName,
|
|
198
|
+
@"audioRecordingPermissionDeniedMessage": kLCQAudioRecordingPermissionDeniedMessageStringName,
|
|
199
|
+
@"microphonePermissionAlertSettingsButtonTitle": kLCQMicrophonePermissionAlertSettingsButtonTitleStringName,
|
|
200
|
+
@"conversationsHeaderTitle": kLCQChatsTitleStringName,
|
|
201
|
+
@"chatsHeaderTitle": kLCQChatsTitleStringName,
|
|
202
|
+
@"team": kLCQTeamStringName,
|
|
203
|
+
@"recordingMessageToHoldText": kLCQRecordingMessageToHoldTextStringName,
|
|
204
|
+
@"recordingMessageToReleaseText": kLCQRecordingMessageToReleaseTextStringName,
|
|
205
|
+
@"messagesNotification": kLCQMessagesNotificationTitleSingleMessageStringName,
|
|
206
|
+
@"messagesNotificationAndOthers": kLCQMessagesNotificationTitleMultipleMessagesStringName,
|
|
207
|
+
@"screenshotHeaderTitle": kLCQScreenshotTitleStringName,
|
|
208
|
+
@"okButtonTitle": kLCQOkButtonTitleStringName,
|
|
209
|
+
@"cancelButtonTitle": kLCQCancelButtonTitleStringName,
|
|
210
|
+
@"thankYouText": kLCQThankYouAlertTitleStringName,
|
|
211
|
+
@"audio": kLCQAudioStringName,
|
|
212
|
+
@"screenRecording": kLCQScreenRecordingStringName,
|
|
213
|
+
@"image": kLCQImageStringName,
|
|
214
|
+
@"surveyEnterYourAnswer": kLCQSurveyEnterYourAnswerTextPlaceholder,
|
|
215
|
+
@"videoPressRecord": kLCQVideoPressRecordTitle,
|
|
216
|
+
@"collectingDataText": kLCQCollectingDataText,
|
|
217
|
+
@"thankYouAlertText": kLCQThankYouAlertMessageStringName,
|
|
218
|
+
|
|
219
|
+
@"welcomeMessageBetaWelcomeStepTitle": kLCQBetaWelcomeMessageWelcomeStepTitle,
|
|
220
|
+
@"welcomeMessageBetaWelcomeStepContent": kLCQBetaWelcomeMessageWelcomeStepContent,
|
|
221
|
+
@"welcomeMessageBetaHowToReportStepTitle": kLCQBetaWelcomeMessageHowToReportStepTitle,
|
|
222
|
+
@"welcomeMessageBetaHowToReportStepContent": kLCQBetaWelcomeMessageHowToReportStepContent,
|
|
223
|
+
@"welcomeMessageBetaFinishStepTitle": kLCQBetaWelcomeMessageFinishStepTitle,
|
|
224
|
+
@"welcomeMessageBetaFinishStepContent": kLCQBetaWelcomeMessageFinishStepContent,
|
|
225
|
+
@"welcomeMessageLiveWelcomeStepTitle": kLCQLiveWelcomeMessageTitle,
|
|
226
|
+
@"welcomeMessageLiveWelcomeStepContent": kLCQLiveWelcomeMessageContent,
|
|
227
|
+
|
|
228
|
+
@"surveysStoreRatingThanksTitle": kLCQStoreRatingThankYouTitleText,
|
|
229
|
+
@"surveysStoreRatingThanksSubtitle": kLCQStoreRatingThankYouDescriptionText,
|
|
230
|
+
|
|
231
|
+
@"reportBugDescription": kLCQReportBugDescriptionStringName,
|
|
232
|
+
@"reportFeedbackDescription": kLCQReportFeedbackDescriptionStringName,
|
|
233
|
+
@"reportQuestionDescription": kLCQReportQuestionDescriptionStringName,
|
|
234
|
+
@"requestFeatureDescription": kLCQRequestFeatureDescriptionStringName,
|
|
235
|
+
|
|
236
|
+
@"discardAlertTitle": kLCQDiscardAlertTitle,
|
|
237
|
+
@"discardAlertMessage": kLCQDiscardAlertMessage,
|
|
238
|
+
@"discardAlertDiscard": kLCQDiscardAlertCancel,
|
|
239
|
+
@"discardAlertStay": kLCQDiscardAlertAction,
|
|
240
|
+
@"addAttachmentButtonTitleStringName": kLCQAddAttachmentButtonTitleStringName,
|
|
241
|
+
|
|
242
|
+
@"reportReproStepsDisclaimerBody": kLCQReproStepsDisclaimerBody,
|
|
243
|
+
@"reportReproStepsDisclaimerLink": kLCQReproStepsDisclaimerLink,
|
|
244
|
+
@"reproStepsProgressDialogBody": kLCQProgressViewTitle,
|
|
245
|
+
@"reproStepsListHeader": kLCQReproStepsListTitle,
|
|
246
|
+
@"reproStepsListDescription": kLCQReproStepsListHeader,
|
|
247
|
+
@"reproStepsListEmptyStateDescription": kLCQReproStepsListEmptyStateLabel,
|
|
248
|
+
@"reproStepsListItemNumberingTitle": kLCQReproStepsListItemName,
|
|
249
|
+
@"conversationTextFieldHint": kLCQChatReplyFieldPlaceholderStringName,
|
|
250
|
+
@"insufficientContentTitle" : kLCQInsufficientContentTitleStringName,
|
|
251
|
+
@"insufficientContentMessage" : kLCQInsufficientContentMessageStringName,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
+ (ArgsDictionary *) launchType {
|
|
256
|
+
return @{
|
|
257
|
+
@"cold": @(LaunchTypeCold),
|
|
258
|
+
@"unknown":@(LaunchTypeUnknown)
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
+ (ArgsDictionary *) overAirServices {
|
|
262
|
+
return @{
|
|
263
|
+
@"expo":@(LCQOverAirTypeExpo) ,
|
|
264
|
+
@"codePush":@(LCQOverAirTypeCodePush),
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
+ (ArgsDictionary *)autoMaskingTypes {
|
|
269
|
+
return @{
|
|
270
|
+
@"labels" : @(LCQAutoMaskScreenshotOptionLabels),
|
|
271
|
+
@"textInputs" : @(LCQAutoMaskScreenshotOptionTextInputs),
|
|
272
|
+
@"media" : @(LCQAutoMaskScreenshotOptionMedia),
|
|
273
|
+
@"none" : @(LCQAutoMaskScreenshotOptionMaskNothing)
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
@end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
#import <Foundation/Foundation.h>
|
|
3
|
+
#import <React/RCTBridgeModule.h>
|
|
4
|
+
#import <React/RCTEventEmitter.h>
|
|
5
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
6
|
+
|
|
7
|
+
@interface LuciqAPMBridge : RCTEventEmitter <RCTBridgeModule>
|
|
8
|
+
/*
|
|
9
|
+
+------------------------------------------------------------------------+
|
|
10
|
+
| APM Module |
|
|
11
|
+
+------------------------------------------------------------------------+
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
- (void)setEnabled:(BOOL)isEnabled;
|
|
15
|
+
- (void)setAppLaunchEnabled:(BOOL)isEnabled;
|
|
16
|
+
- (void)endAppLaunch;
|
|
17
|
+
- (void)setAutoUITraceEnabled:(BOOL)isEnabled;
|
|
18
|
+
- (void)startFlow:(NSString *)name;
|
|
19
|
+
- (void)endFlow:(NSString *)name;
|
|
20
|
+
- (void)setFlowAttribute:(NSString *)name :(NSString *)key :(NSString *_Nullable)value;
|
|
21
|
+
- (void)startUITrace:(NSString *)name;
|
|
22
|
+
- (void)endUITrace;
|
|
23
|
+
|
|
24
|
+
extern NSMutableDictionary *traces;
|
|
25
|
+
|
|
26
|
+
@end
|