noibu-react-native 0.1.3 → 0.2.1
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/.gitignore +13 -0
- package/android/build.gradle +79 -0
- package/android/gradle.properties +7 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/com/noibu/sessionreplay/reactnative/NoibuSessionReplayModule.kt +107 -0
- package/android/src/main/java/com/noibu/sessionreplay/reactnative/NoibuSessionReplayPackage.kt +17 -0
- package/dist/api/clientConfig.d.ts +2 -2
- package/dist/api/clientConfig.js +1 -1
- package/dist/api/helpCode.d.ts +29 -0
- package/dist/api/inputManager.d.ts +87 -0
- package/dist/api/metroplexSocket.d.ts +7 -6
- package/dist/api/metroplexSocket.js +14 -18
- package/dist/api/storedMetrics.d.ts +73 -0
- package/dist/api/storedPageVisit.d.ts +49 -0
- package/dist/const_matchers.d.ts +1 -0
- package/dist/constants.d.ts +6 -1
- package/dist/constants.js +13 -2
- package/dist/entry/index.d.ts +1 -1
- package/dist/entry/init.js +8 -4
- package/dist/monitors/clickMonitor.d.ts +44 -0
- package/dist/monitors/gqlErrorValidator.d.ts +82 -0
- package/dist/monitors/httpDataBundler.d.ts +161 -0
- package/dist/monitors/inputMonitor.d.ts +34 -0
- package/dist/monitors/keyboardInputMonitor.d.ts +17 -0
- package/dist/monitors/pageMonitor.d.ts +22 -0
- package/dist/monitors/requestMonitor.d.ts +10 -0
- package/dist/pageVisit/pageVisit.d.ts +52 -0
- package/dist/pageVisit/pageVisit.js +4 -2
- package/dist/pageVisit/pageVisitEventError.d.ts +15 -0
- package/dist/pageVisit/pageVisitEventHTTP.d.ts +18 -0
- package/dist/pageVisit/userStep.d.ts +5 -0
- package/dist/react/ErrorBoundary.js +17 -9
- package/dist/sessionRecorder/nativeSessionRecorderSubscription.d.ts +64 -0
- package/dist/sessionRecorder/nativeSessionRecorderSubscription.js +58 -0
- package/dist/sessionRecorder/sessionRecorder.d.ts +60 -0
- package/dist/sessionRecorder/sessionRecorder.js +287 -0
- package/dist/sessionRecorder/types.d.ts +91 -0
- package/dist/types/StoredPageVisit.types.d.ts +54 -0
- package/dist/types/globals.d.ts +0 -1
- package/dist/utils/date.d.ts +6 -0
- package/dist/utils/eventlistener.d.ts +8 -0
- package/dist/utils/eventlistener.js +2 -2
- package/dist/utils/function.d.ts +4 -0
- package/dist/utils/function.js +13 -1
- package/dist/utils/log.d.ts +0 -1
- package/dist/utils/log.js +3 -5
- package/dist/utils/object.d.ts +2 -2
- package/package.json +11 -3
package/dist/utils/function.js
CHANGED
|
@@ -269,5 +269,17 @@ function isInstanceOf(instance, type) {
|
|
|
269
269
|
return false;
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* To grab the video recorder type based on the device we run the app on.
|
|
274
|
+
*/
|
|
275
|
+
async function getVideoRecorderType() {
|
|
276
|
+
if (Platform.OS === 'android') {
|
|
277
|
+
return 'AndroidNative';
|
|
278
|
+
}
|
|
279
|
+
if (Platform.OS === 'ios') {
|
|
280
|
+
return 'IOSNative';
|
|
281
|
+
}
|
|
282
|
+
return '';
|
|
283
|
+
}
|
|
272
284
|
|
|
273
|
-
export { asString, getJSStack, getMaxSubstringAllowed, getUserAgent, isInstanceOf, isInvalidURLConfig, isNoibuJSAlreadyLoaded, isStackTrace, isValidURL, makeRequest, maskTextInput, processFrames, stringifyJSON };
|
|
285
|
+
export { asString, getJSStack, getMaxSubstringAllowed, getUserAgent, getVideoRecorderType, isInstanceOf, isInvalidURLConfig, isNoibuJSAlreadyLoaded, isStackTrace, isValidURL, makeRequest, maskTextInput, processFrames, stringifyJSON };
|
package/dist/utils/log.d.ts
CHANGED
package/dist/utils/log.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/* eslint-disable no-console,@typescript-eslint/no-empty-function */
|
|
2
2
|
/** no operation */
|
|
3
|
-
const noop = () => { };
|
|
4
3
|
/**
|
|
5
4
|
* checks if was overridden and calls original console function
|
|
6
5
|
*/
|
|
7
6
|
const getConsoleMethod = (ogProp) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
return console[ogProp].__noibu_original__ || console[ogProp];
|
|
11
9
|
};
|
|
12
10
|
/**
|
|
13
11
|
* log with level = info
|
|
14
12
|
*/
|
|
15
|
-
const noibuLog = (...msgs) => getConsoleMethod()('Noibu', ...msgs);
|
|
13
|
+
const noibuLog = (...msgs) => getConsoleMethod('log')('Noibu', ...msgs);
|
|
16
14
|
|
|
17
15
|
export { noibuLog };
|
package/dist/utils/object.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare function unwrapNoibuWrapped<T>(anything: {
|
|
|
26
26
|
* @param {string} property
|
|
27
27
|
* @returns {boolean} Whether the property on the prototype is (or is now) writeable
|
|
28
28
|
*/
|
|
29
|
-
export declare const propWriteableOrMadeWriteable: (proto: object, property:
|
|
29
|
+
export declare const propWriteableOrMadeWriteable: (proto: object, property: keyof typeof proto) => boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Iterates object recursively and calls visit function
|
|
32
32
|
* for each property allowing to override its value
|
|
@@ -35,7 +35,7 @@ export declare const propWriteableOrMadeWriteable: (proto: object, property: nev
|
|
|
35
35
|
* There are 3 arguments: current object, current property and its value
|
|
36
36
|
* @param {{depth: number}} limit Use limit config object to set depth of the recursion
|
|
37
37
|
*/
|
|
38
|
-
export declare const iterateObjectRecursively: (instance: Record<any, any>, visit: (i:
|
|
38
|
+
export declare const iterateObjectRecursively: (instance: Record<any, any>, visit: (i: typeof instance, p: keyof typeof i, v: (typeof i)[typeof p]) => typeof v, limit?: {
|
|
39
39
|
depth: number;
|
|
40
40
|
}) => void;
|
|
41
41
|
export {};
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noibu-react-native",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"targetNjsVersion": "1.0.104",
|
|
5
5
|
"description": "React-Native SDK for NoibuJS to collect errors in React-Native applications",
|
|
6
6
|
"main": "dist/entry/index.js",
|
|
7
7
|
"types": "dist/entry/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
|
+
"android/*",
|
|
9
10
|
"dist/*",
|
|
10
11
|
"README.md"
|
|
11
12
|
],
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"@react-native-async-storage/async-storage": "^1.19.0",
|
|
32
|
+
"fflate": "^0.8.2",
|
|
31
33
|
"react": ">=16.11.0",
|
|
32
34
|
"react-native": ">=0.63.0",
|
|
33
35
|
"react-native-url-polyfill": "^1.3.0",
|
|
@@ -41,10 +43,12 @@
|
|
|
41
43
|
"@rollup/plugin-typescript": "^11.1.1",
|
|
42
44
|
"@tsconfig/react-native": "^3.0.2",
|
|
43
45
|
"@types/jest": "^29.5.1",
|
|
46
|
+
"@jest/globals": "^29.7.0",
|
|
44
47
|
"@types/node": "^20.2.3",
|
|
45
48
|
"@types/react": "^18.2.6",
|
|
46
49
|
"@types/react-test-renderer": "^18.0.0",
|
|
47
50
|
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
|
51
|
+
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
|
48
52
|
"codecov": "^3.8.3",
|
|
49
53
|
"dotenv": "^16.1.3",
|
|
50
54
|
"eslint": "^8.41.0",
|
|
@@ -52,10 +56,14 @@
|
|
|
52
56
|
"eslint-config-prettier": "^8.8.0",
|
|
53
57
|
"eslint-plugin-jsdoc": "^44.2.4",
|
|
54
58
|
"eslint-plugin-prettier": "^4.2.1",
|
|
55
|
-
"jest": "^29.
|
|
59
|
+
"jest": "^29.7.0",
|
|
60
|
+
"@babel/preset-env": "^7.24.8",
|
|
61
|
+
"babel-jest": "^29.7.0",
|
|
56
62
|
"prettier": "^2.8.8",
|
|
57
63
|
"rimraf": "^5.0.1",
|
|
58
64
|
"rollup": "^3.24.0",
|
|
59
|
-
"rollup-plugin-dotenv": "^0.5.0"
|
|
65
|
+
"rollup-plugin-dotenv": "^0.5.0",
|
|
66
|
+
"ts-jest": "^29.2.3",
|
|
67
|
+
"typescript": "^5.5.3"
|
|
60
68
|
}
|
|
61
69
|
}
|