noibu-react-native 0.2.10 → 0.2.12
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/android/build.gradle +1 -1
- package/android/src/main/java/com/noibu/sessionreplay/reactnative/NoibuSessionReplayModule.kt +5 -2
- package/dist/api/MetroplexSocket.js +4 -3
- package/dist/constants.d.ts +0 -6
- package/dist/constants.js +1 -1
- package/dist/monitors/KeyboardInputMonitor.test.d.ts +1 -0
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -67,7 +67,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
|
67
67
|
dependencies {
|
|
68
68
|
implementation "com.facebook.react:react-native:+"
|
|
69
69
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
70
|
-
implementation "com.noibu:sessionreplay-recorder:0.2.
|
|
70
|
+
implementation "com.noibu:sessionreplay-recorder:0.2.2"
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
if (isNewArchitectureEnabled()) {
|
package/android/src/main/java/com/noibu/sessionreplay/reactnative/NoibuSessionReplayModule.kt
CHANGED
|
@@ -24,7 +24,6 @@ class NoibuSessionReplayModule(reactContext: ReactApplicationContext) :
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
private fun sendEvent(eventName: String, params: WritableMap?) {
|
|
27
|
-
Log.d("SessionReplayModule", "will send event: ${params}")
|
|
28
27
|
reactContext?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)?.emit(eventName, params)
|
|
29
28
|
}
|
|
30
29
|
|
|
@@ -64,9 +63,13 @@ class NoibuSessionReplayModule(reactContext: ReactApplicationContext) :
|
|
|
64
63
|
)
|
|
65
64
|
|
|
66
65
|
Handler(Looper.getMainLooper()).post {
|
|
66
|
+
val context = currentActivity?.applicationContext ?: reactContext?.applicationContext ?: run {
|
|
67
|
+
promise.reject("ACTIVITY_NOT_AVAILABLE", "Current activity is not available.")
|
|
68
|
+
return@post
|
|
69
|
+
}
|
|
67
70
|
promise.resolve(
|
|
68
71
|
SessionReplay.initialize(
|
|
69
|
-
|
|
72
|
+
context,
|
|
70
73
|
config,
|
|
71
74
|
currentActivity
|
|
72
75
|
) { param ->
|
|
@@ -43,6 +43,7 @@ function createSlidingArrayOfSize(size, arraySource = [], downsizeThreshold = 1.
|
|
|
43
43
|
return (...args) => {
|
|
44
44
|
target.push(...args);
|
|
45
45
|
if (target.length >= downsizeThreshold * size) {
|
|
46
|
+
StoredMetrics.getInstance().setDidCutPv();
|
|
46
47
|
target.splice(0, size / downsizeFactor);
|
|
47
48
|
}
|
|
48
49
|
};
|
|
@@ -57,7 +58,7 @@ const METROPLEX_RETRY_FREQUENCY = 30000;
|
|
|
57
58
|
const CURRENT_PV_VERSION = 5;
|
|
58
59
|
// maximum number of connection a single page visit can reach
|
|
59
60
|
const MAX_METROPLEX_CONNECTION_COUNT = 100;
|
|
60
|
-
const MAX_RETRY_MSG_Q_SIZE =
|
|
61
|
+
const MAX_RETRY_MSG_Q_SIZE = 1000;
|
|
61
62
|
/** Manages the socket to Metroplex */
|
|
62
63
|
class MetroplexSocket extends Singleton {
|
|
63
64
|
/**
|
|
@@ -568,7 +569,7 @@ class MetroplexSocket extends Singleton {
|
|
|
568
569
|
});
|
|
569
570
|
yield this.postMessage(currentCompletePv);
|
|
570
571
|
// debug log if large retry message queue
|
|
571
|
-
if (this.retryMessageQueue.length >
|
|
572
|
+
if (this.retryMessageQueue.length > MAX_RETRY_MSG_Q_SIZE) {
|
|
572
573
|
let postInfoMessage = `Vid: ${currentCompletePv.pvvf.length}`;
|
|
573
574
|
postInfoMessage += ` PV: ${currentCompletePv.pvp.length}`;
|
|
574
575
|
postInfoMessage += ` HTTP: ${(_a = currentCompletePv.pvh) === null || _a === void 0 ? void 0 : _a.length},`;
|
|
@@ -603,7 +604,7 @@ class MetroplexSocket extends Singleton {
|
|
|
603
604
|
// debug message gets through
|
|
604
605
|
const clientDisabled = ClientConfig.getInstance().isClientDisabled;
|
|
605
606
|
ClientConfig.getInstance().isClientDisabled = false;
|
|
606
|
-
ClientConfig.getInstance().postInternalError(message, clientDisabled, Severity.
|
|
607
|
+
ClientConfig.getInstance().postInternalError(message, clientDisabled, Severity.ERROR);
|
|
607
608
|
}
|
|
608
609
|
});
|
|
609
610
|
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -4,12 +4,6 @@ export declare const MAX_STRING_LENGTH = 1024;
|
|
|
4
4
|
export declare const MAX_TIME_FOR_UNSENT_DATA_MILLIS = 500;
|
|
5
5
|
export declare const PII_EMAIL_PATTERN: RegExp;
|
|
6
6
|
export declare const PII_REDACTION_REPLACEMENT_STRING = "******";
|
|
7
|
-
export declare const SEVERITY: {
|
|
8
|
-
error: string;
|
|
9
|
-
warn: string;
|
|
10
|
-
info: string;
|
|
11
|
-
debug: string;
|
|
12
|
-
};
|
|
13
7
|
export declare const MAX_METROPLEX_SOCKET_INNACTIVE_TIME: number;
|
|
14
8
|
export declare const MAX_BEACON_PAYLOAD_SIZE = 59000;
|
|
15
9
|
export declare const CONTENT_TYPE = "content-type";
|
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.
|
|
27
|
+
return "1.0.104-rn-sdk-0.2.12" ;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Gets the max metro recon number
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED