noibu-react-native 0.2.34-rc.3 → 0.2.34
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
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes of the noibu-react-native SDK release series are documented in this file using
|
|
4
4
|
the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
|
5
5
|
|
|
6
|
+
## 0.2.34
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- **Fix SDK consuming the response body, preventing customer code from reading it.** The SDK now clones the response before reading, then rebuilds a fresh `Response` for the customer so `bodyUsed` is never prematurely set.
|
|
10
|
+
- **Fix session replay initialization across all React Native architecture and platform combinations.** Unified initialization logic for legacy (bridge) and new architecture (TurboModule) on both iOS and Android.
|
|
11
|
+
- **Disable automatic freeze timeout for React Native session recording.** The native SDK handles its own event throttling; the JS-side inactivity freeze was causing unnecessary recording gaps.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **HTTP data collection is now conditionally initialized.** Request monitoring and HTTP data bundling only start when `enableHttpDataCollection` is enabled in the client config. Failures in HTTP initialization no longer affect session recording or other monitors.
|
|
15
|
+
- **URL-level exclusion for HTTP body capture.** The SDK checks `shouldContinueForURL` before reading response bodies, skipping body capture for excluded URLs while still recording the HTTP event metadata.
|
|
16
|
+
|
|
6
17
|
## 0.2.33
|
|
7
18
|
|
|
8
19
|
- **Add support for React `19.x.x`
|
package/dist/constants.js
CHANGED
|
@@ -24,7 +24,7 @@ const CONTENT_TYPE = 'content-type';
|
|
|
24
24
|
* Gets the script id from the cookie object, returns default if cannot be found
|
|
25
25
|
*/
|
|
26
26
|
function GET_SCRIPT_ID() {
|
|
27
|
-
return "1.0.104-rn-sdk-0.2.34
|
|
27
|
+
return "1.0.104-rn-sdk-0.2.34" ;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Gets the max metro recon number
|
|
@@ -34,6 +34,7 @@ export interface SessionRecorderConfig {
|
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Initializes the Noibu - Session recording SDK if the API level is supported.
|
|
37
|
+
* Supports both legacy (bridge) and new architecture (TurboModule) on iOS and Android.
|
|
37
38
|
*/
|
|
38
39
|
export declare function initialize(): void;
|
|
39
40
|
export type RecorderEvent = import('./types').RecorderEvent;
|
|
@@ -12,7 +12,6 @@ const RNModule = (_a = NativeModules.NoibuSessionRecorder) !== null && _a !== vo
|
|
|
12
12
|
const NativeSessionRecorder = TurboNativeSessionRecorder !== null && TurboNativeSessionRecorder !== void 0 ? TurboNativeSessionRecorder : RNModule;
|
|
13
13
|
// Consider new-arch if the resolved module exposes the polling method
|
|
14
14
|
const isNewArch = typeof (NativeSessionRecorder === null || NativeSessionRecorder === void 0 ? void 0 : NativeSessionRecorder.consumeEvents) === 'function';
|
|
15
|
-
const isNewArchAndroid = Platform.OS === 'android' && isNewArch;
|
|
16
15
|
const isNewArchIOS = Platform.OS === 'ios' && isNewArch;
|
|
17
16
|
let nativeModuleEmitter;
|
|
18
17
|
const SupportedPlatforms = ['android', 'ios'];
|
|
@@ -29,14 +28,12 @@ var LogLevel;
|
|
|
29
28
|
})(LogLevel || (LogLevel = {}));
|
|
30
29
|
/**
|
|
31
30
|
* Initializes the Noibu - Session recording SDK if the API level is supported.
|
|
31
|
+
* Supports both legacy (bridge) and new architecture (TurboModule) on iOS and Android.
|
|
32
32
|
*/
|
|
33
33
|
function initialize() {
|
|
34
|
-
if (Platform.OS === 'ios') {
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
NativeSessionRecorder.initialize();
|
|
38
|
-
}
|
|
39
|
-
return;
|
|
34
|
+
if (Platform.OS === 'ios' && isNewArchIOS) {
|
|
35
|
+
// New architecture iOS: initialize native module to start capturing
|
|
36
|
+
NativeSessionRecorder.initialize();
|
|
40
37
|
}
|
|
41
38
|
if (!SupportedPlatforms.includes(Platform.OS)) {
|
|
42
39
|
noibuLog(`Noibu - Session recording supports ${SupportedPlatforms.join(', ')} only for now.`);
|
|
@@ -46,16 +43,20 @@ function initialize() {
|
|
|
46
43
|
noibuLog('Noibu - Session recording did not initialize properly.', LINKING_ERROR);
|
|
47
44
|
return;
|
|
48
45
|
}
|
|
49
|
-
// For legacy Android, set up the event emitter; for new-arch
|
|
50
|
-
|
|
46
|
+
// For legacy (iOS or Android), set up the event emitter; for new-arch we poll via TurboModule
|
|
47
|
+
const isLegacy = !isNewArch;
|
|
48
|
+
if (isLegacy) {
|
|
51
49
|
const moduleForEmitter = RNModule !== null && RNModule !== void 0 ? RNModule : NativeSessionRecorder;
|
|
52
50
|
if (!moduleForEmitter) {
|
|
53
|
-
noibuLog('NativeSessionRecorder module missing for legacy
|
|
51
|
+
noibuLog('NativeSessionRecorder module missing for legacy.');
|
|
54
52
|
return;
|
|
55
53
|
}
|
|
56
54
|
nativeModuleEmitter = new NativeEventEmitter(moduleForEmitter);
|
|
57
55
|
}
|
|
58
|
-
|
|
56
|
+
// Call native initialize only when the method is exposed (new-arch and legacy Android; legacy iOS bridge does not export it)
|
|
57
|
+
if (typeof NativeSessionRecorder.initialize === 'function') {
|
|
58
|
+
NativeSessionRecorder.initialize();
|
|
59
|
+
}
|
|
59
60
|
noibuLog("Session recorder initialized.");
|
|
60
61
|
}
|
|
61
62
|
let isIOSInitialized = false;
|
package/package.json
CHANGED