@luciq/react-native 19.1.0 → 19.2.2
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 +26 -0
- package/RNLuciq.podspec +1 -1
- package/android/native.gradle +1 -1
- package/android/src/main/java/ai/luciq/reactlibrary/ArgsRegistry.java +1 -0
- package/dist/native/NativeConstants.d.ts +1 -0
- package/dist/utils/Enums.d.ts +2 -1
- package/dist/utils/Enums.js +1 -0
- package/dist/utils/XhrNetworkInterceptor.js +31 -11
- package/ios/RNLuciq/ArgsRegistry.m +2 -1
- package/ios/native.rb +1 -1
- package/package.json +1 -1
- package/plugin/build/index.js +9 -2
- package/plugin/src/withLuciqIOS.ts +9 -2
- package/src/native/NativeConstants.ts +1 -0
- package/src/utils/Enums.ts +1 -0
- package/src/utils/XhrNetworkInterceptor.ts +32 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [19.2.2](https://github.com/luciqai/luciq-reactnative-sdk/compare/v19.2.2...19.2.1)
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Bump Luciq iOS SDK to v19.4.1 ([#34](https://github.com/luciqai/luciq-reactnative-sdk/pull/34)). [See release notes](https://github.com/luciqai/Luciq-iOS-sdk/releases/tag/19.4.1).
|
|
8
|
+
|
|
9
|
+
- Bump Luciq Android SDK to v19.2.2 ([#34](https://github.com/luciqai/luciq-reactnative-sdk/pull/34)). [See release notes](https://github.com/luciqai/Luciq-Android-sdk/releases/tag/v19.2.2).
|
|
10
|
+
|
|
11
|
+
## [19.2.1](https://github.com/luciqai/luciq-reactnative-sdk/compare/v19.2.1...19.1.0)
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Add support for handling aborted and canceled Axios network requests. ([#36](https://github.com/luciqai/luciq-reactnative-sdk/pull/36))
|
|
16
|
+
|
|
17
|
+
- Add new UserConsentActionType - noAutomaticBugGrouping. ([#20](https://github.com/luciqai/luciq-reactnative-sdk/pull/20))
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Bump Luciq iOS SDK to v19.4.0 ([#29](https://github.com/luciqai/luciq-reactnative-sdk/pull/29)). [See release notes](https://github.com/luciqai/Luciq-iOS-sdk/releases/tag/19.4.0).
|
|
22
|
+
|
|
23
|
+
- Bump Luciq Android SDK to v19.2.1 ([#29](https://github.com/luciqai/luciq-reactnative-sdk/pull/29)). [See release notes](https://github.com/luciqai/Luciq-Android-sdk/releases/tag/v19.2.1).
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Running Expo Plugin on ios [#31](https://github.com/luciqai/luciq-reactnative-sdk/pull/31))
|
|
28
|
+
|
|
3
29
|
## [19.1.0](https://github.com/luciqai/luciq-reactnative-sdk/compare/v19.1.0...19.0.0)
|
|
4
30
|
|
|
5
31
|
### Added
|
package/RNLuciq.podspec
CHANGED
|
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
|
|
|
12
12
|
s.homepage = package["homepage"]
|
|
13
13
|
s.source = { :git => "https://github.com/Instabug/Instabug-React-Native.git", :tag => 'v' + package["version"] }
|
|
14
14
|
|
|
15
|
-
s.platform = :ios, "
|
|
15
|
+
s.platform = :ios, "15.0"
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm}"
|
|
17
17
|
|
|
18
18
|
s.dependency 'React-Core'
|
package/android/native.gradle
CHANGED
|
@@ -153,6 +153,7 @@ final class ArgsRegistry {
|
|
|
153
153
|
put("dropAutoCapturedMedia", ai.luciq.bug.userConsent.ActionType.DROP_AUTO_CAPTURED_MEDIA);
|
|
154
154
|
put("dropLogs", ai.luciq.bug.userConsent.ActionType.DROP_LOGS);
|
|
155
155
|
put("noChat", ai.luciq.bug.userConsent.ActionType.NO_CHAT);
|
|
156
|
+
put("noAutomaticBugGrouping", ai.luciq.bug.userConsent.ActionType.NO_AUTOMATIC_BUG_GROUPING);
|
|
156
157
|
}};
|
|
157
158
|
|
|
158
159
|
static final ArgsMap<Integer> sdkLogLevels = new ArgsMap<Integer>() {{
|
package/dist/utils/Enums.d.ts
CHANGED
package/dist/utils/Enums.js
CHANGED
|
@@ -20,6 +20,7 @@ export var userConsentActionType;
|
|
|
20
20
|
userConsentActionType[userConsentActionType["dropAutoCapturedMedia"] = constants.dropAutoCapturedMedia] = "dropAutoCapturedMedia";
|
|
21
21
|
userConsentActionType[userConsentActionType["dropLogs"] = constants.dropLogs] = "dropLogs";
|
|
22
22
|
userConsentActionType[userConsentActionType["noChat"] = constants.noChat] = "noChat";
|
|
23
|
+
userConsentActionType[userConsentActionType["noAutomaticBugGrouping"] = constants.noAutomaticBugGrouping] = "noAutomaticBugGrouping";
|
|
23
24
|
})(userConsentActionType || (userConsentActionType = {}));
|
|
24
25
|
/**
|
|
25
26
|
* The event used to invoke the feedback form.
|
|
@@ -159,6 +159,8 @@ export default {
|
|
|
159
159
|
if (this._hasError) {
|
|
160
160
|
cloneNetwork.errorCode = clientErrorCode;
|
|
161
161
|
cloneNetwork.errorDomain = 'ClientError';
|
|
162
|
+
cloneNetwork.responseCode = 0;
|
|
163
|
+
cloneNetwork.contentType = 'text/plain';
|
|
162
164
|
// @ts-ignore
|
|
163
165
|
const _response = this._response;
|
|
164
166
|
cloneNetwork.requestBody =
|
|
@@ -168,25 +170,32 @@ export default {
|
|
|
168
170
|
if (typeof _response === 'string' && _response.length > 0) {
|
|
169
171
|
cloneNetwork.errorDomain = _response;
|
|
170
172
|
}
|
|
173
|
+
cloneNetwork.responseBody = `ERROR: ${cloneNetwork.errorDomain}`;
|
|
171
174
|
// @ts-ignore
|
|
172
175
|
}
|
|
173
176
|
else if (this._timedOut) {
|
|
174
177
|
cloneNetwork.errorCode = clientErrorCode;
|
|
175
|
-
cloneNetwork.errorDomain = '
|
|
178
|
+
cloneNetwork.errorDomain = 'timeout';
|
|
179
|
+
cloneNetwork.responseCode = 0;
|
|
180
|
+
cloneNetwork.contentType = 'text/plain';
|
|
181
|
+
cloneNetwork.responseBody = `ERROR: ${cloneNetwork.errorDomain}`;
|
|
176
182
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
// Only set response body if not already set by error handlers
|
|
184
|
+
if (!cloneNetwork.errorDomain) {
|
|
185
|
+
if (this.response) {
|
|
186
|
+
if (this.responseType === 'blob') {
|
|
187
|
+
const responseText = await new Response(this.response).text();
|
|
188
|
+
cloneNetwork.responseBody = responseText;
|
|
189
|
+
}
|
|
190
|
+
else if (['text', '', 'json'].includes(this.responseType)) {
|
|
191
|
+
cloneNetwork.responseBody = JSON.stringify(this.response);
|
|
192
|
+
}
|
|
181
193
|
}
|
|
182
|
-
else
|
|
183
|
-
cloneNetwork.responseBody =
|
|
194
|
+
else {
|
|
195
|
+
cloneNetwork.responseBody = '';
|
|
196
|
+
cloneNetwork.contentType = 'text/plain';
|
|
184
197
|
}
|
|
185
198
|
}
|
|
186
|
-
else {
|
|
187
|
-
cloneNetwork.responseBody = '';
|
|
188
|
-
cloneNetwork.contentType = 'text/plain';
|
|
189
|
-
}
|
|
190
199
|
cloneNetwork.requestBodySize = cloneNetwork.requestBody.length;
|
|
191
200
|
if (cloneNetwork.responseBodySize === 0 && cloneNetwork.responseBody) {
|
|
192
201
|
cloneNetwork.responseBodySize = cloneNetwork.responseBody.length;
|
|
@@ -234,6 +243,17 @@ export default {
|
|
|
234
243
|
};
|
|
235
244
|
this.addEventListener('progress', downloadUploadProgressCallback);
|
|
236
245
|
this.upload.addEventListener('progress', downloadUploadProgressCallback);
|
|
246
|
+
// Handler for abort events (works with fetch, Axios, and any XHR-based requests)
|
|
247
|
+
this.addEventListener('abort', () => {
|
|
248
|
+
if (!isInterceptorEnabled) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
cloneNetwork.duration = Date.now() - cloneNetwork.startTime;
|
|
252
|
+
cloneNetwork.responseCode = 0;
|
|
253
|
+
cloneNetwork.errorCode = clientErrorCode;
|
|
254
|
+
cloneNetwork.errorDomain = 'cancelled';
|
|
255
|
+
cloneNetwork.responseBody = `ERROR: ${cloneNetwork.errorDomain}`;
|
|
256
|
+
});
|
|
237
257
|
}
|
|
238
258
|
cloneNetwork.startTime = Date.now();
|
|
239
259
|
const traceparent = await getTraceparentHeader(cloneNetwork);
|
|
@@ -120,7 +120,8 @@
|
|
|
120
120
|
return @{
|
|
121
121
|
@"dropAutoCapturedMedia": @(LCQConsentActionDropAutoCapturedMedia),
|
|
122
122
|
@"dropLogs": @(LCQConsentActionDropLogs),
|
|
123
|
-
@"noChat": @(LCQConsentActionNoChat)
|
|
123
|
+
@"noChat": @(LCQConsentActionNoChat),
|
|
124
|
+
@"noAutomaticBugGrouping": @(LCQConsentActionNoAutomaticBugGrouping),
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
127
|
+ (ArgsDictionary *) extendedBugReportStates {
|
package/ios/native.rb
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luciq/react-native",
|
|
3
3
|
"description": "Luciq is the Agentic Observability Platform built for Mobile.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.2.2",
|
|
5
5
|
"author": "Luciq (https://luciq.ai)",
|
|
6
6
|
"repository": "github:luciqai/luciq-reactnative-sdk",
|
|
7
7
|
"homepage": "https://www.luciq.ai/platforms/react-native",
|
package/plugin/build/index.js
CHANGED
|
@@ -42044,9 +42044,16 @@ function addLuciqBuildPhase(xcodeProject, packageName) {
|
|
|
42044
42044
|
// Inject source map export line into the shell script
|
|
42045
42045
|
function injectSourceMapExport(script) {
|
|
42046
42046
|
var exportLine = 'export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.map"';
|
|
42047
|
-
var escapedLine = exportLine.replace(
|
|
42047
|
+
var escapedLine = exportLine.replace(/"/g, '\\"');
|
|
42048
42048
|
var injectedLine = "".concat(escapedLine, "\\n");
|
|
42049
|
-
|
|
42049
|
+
if (script.includes(escapedLine)) {
|
|
42050
|
+
return script;
|
|
42051
|
+
}
|
|
42052
|
+
var buggyLine = exportLine.replace(/\$/g, '\\$').replace(/"/g, '\\"');
|
|
42053
|
+
if (script.includes(buggyLine)) {
|
|
42054
|
+
return script.split(buggyLine).join(escapedLine);
|
|
42055
|
+
}
|
|
42056
|
+
return script.replace(/^"/, "\"".concat(injectedLine));
|
|
42050
42057
|
}
|
|
42051
42058
|
|
|
42052
42059
|
var luciqPackage = require('../../package.json');
|
|
@@ -102,8 +102,15 @@ function addLuciqBuildPhase(xcodeProject: XcodeProject, packageName: string): vo
|
|
|
102
102
|
// Inject source map export line into the shell script
|
|
103
103
|
function injectSourceMapExport(script: string): string {
|
|
104
104
|
const exportLine = 'export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.map"';
|
|
105
|
-
const escapedLine = exportLine.replace(
|
|
105
|
+
const escapedLine = exportLine.replace(/"/g, '\\"');
|
|
106
106
|
const injectedLine = `${escapedLine}\\n`;
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
if (script.includes(escapedLine)) {
|
|
109
|
+
return script;
|
|
110
|
+
}
|
|
111
|
+
const buggyLine = exportLine.replace(/\$/g, '\\$').replace(/"/g, '\\"');
|
|
112
|
+
if (script.includes(buggyLine)) {
|
|
113
|
+
return script.split(buggyLine).join(escapedLine);
|
|
114
|
+
}
|
|
115
|
+
return script.replace(/^"/, `"${injectedLine}`);
|
|
109
116
|
}
|
package/src/utils/Enums.ts
CHANGED
|
@@ -231,7 +231,8 @@ export default {
|
|
|
231
231
|
if (this._hasError) {
|
|
232
232
|
cloneNetwork.errorCode = clientErrorCode;
|
|
233
233
|
cloneNetwork.errorDomain = 'ClientError';
|
|
234
|
-
|
|
234
|
+
cloneNetwork.responseCode = 0;
|
|
235
|
+
cloneNetwork.contentType = 'text/plain';
|
|
235
236
|
// @ts-ignore
|
|
236
237
|
const _response = this._response;
|
|
237
238
|
cloneNetwork.requestBody =
|
|
@@ -243,22 +244,30 @@ export default {
|
|
|
243
244
|
cloneNetwork.errorDomain = _response;
|
|
244
245
|
}
|
|
245
246
|
|
|
247
|
+
cloneNetwork.responseBody = `ERROR: ${cloneNetwork.errorDomain}`;
|
|
248
|
+
|
|
246
249
|
// @ts-ignore
|
|
247
250
|
} else if (this._timedOut) {
|
|
248
251
|
cloneNetwork.errorCode = clientErrorCode;
|
|
249
|
-
cloneNetwork.errorDomain = '
|
|
252
|
+
cloneNetwork.errorDomain = 'timeout';
|
|
253
|
+
cloneNetwork.responseCode = 0;
|
|
254
|
+
cloneNetwork.contentType = 'text/plain';
|
|
255
|
+
cloneNetwork.responseBody = `ERROR: ${cloneNetwork.errorDomain}`;
|
|
250
256
|
}
|
|
251
257
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
+
// Only set response body if not already set by error handlers
|
|
259
|
+
if (!cloneNetwork.errorDomain) {
|
|
260
|
+
if (this.response) {
|
|
261
|
+
if (this.responseType === 'blob') {
|
|
262
|
+
const responseText = await new Response(this.response).text();
|
|
263
|
+
cloneNetwork.responseBody = responseText;
|
|
264
|
+
} else if (['text', '', 'json'].includes(this.responseType)) {
|
|
265
|
+
cloneNetwork.responseBody = JSON.stringify(this.response);
|
|
266
|
+
}
|
|
267
|
+
} else {
|
|
268
|
+
cloneNetwork.responseBody = '';
|
|
269
|
+
cloneNetwork.contentType = 'text/plain';
|
|
258
270
|
}
|
|
259
|
-
} else {
|
|
260
|
-
cloneNetwork.responseBody = '';
|
|
261
|
-
cloneNetwork.contentType = 'text/plain';
|
|
262
271
|
}
|
|
263
272
|
|
|
264
273
|
cloneNetwork.requestBodySize = cloneNetwork.requestBody.length;
|
|
@@ -310,6 +319,18 @@ export default {
|
|
|
310
319
|
};
|
|
311
320
|
this.addEventListener('progress', downloadUploadProgressCallback);
|
|
312
321
|
this.upload.addEventListener('progress', downloadUploadProgressCallback);
|
|
322
|
+
|
|
323
|
+
// Handler for abort events (works with fetch, Axios, and any XHR-based requests)
|
|
324
|
+
this.addEventListener('abort', () => {
|
|
325
|
+
if (!isInterceptorEnabled) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
cloneNetwork.duration = Date.now() - cloneNetwork.startTime;
|
|
329
|
+
cloneNetwork.responseCode = 0;
|
|
330
|
+
cloneNetwork.errorCode = clientErrorCode;
|
|
331
|
+
cloneNetwork.errorDomain = 'cancelled';
|
|
332
|
+
cloneNetwork.responseBody = `ERROR: ${cloneNetwork.errorDomain}`;
|
|
333
|
+
});
|
|
313
334
|
}
|
|
314
335
|
|
|
315
336
|
cloneNetwork.startTime = Date.now();
|