noibu-react-native 0.2.0 → 0.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.
@@ -100,6 +100,16 @@ class NoibuSessionReplayModule(reactContext: ReactApplicationContext) :
100
100
  return ret
101
101
  }
102
102
 
103
+ @ReactMethod
104
+ fun addListener(eventName: String) {
105
+ // Set up any upstream listeners or background tasks as necessary
106
+ }
107
+
108
+ @ReactMethod
109
+ fun removeListeners(count: Int) {
110
+ // Remove upstream listeners, stop unnecessary background tasks
111
+ }
112
+
103
113
  companion object {
104
114
  const val NAME = "NativeSessionRecorder"
105
115
  private var reactContext: ReactApplicationContext? = null
package/dist/constants.js CHANGED
@@ -319,7 +319,7 @@ const CONTENT_LENGTH = 'content-length';
319
319
  * Gets the script id from the cookie object, returns default if cannot be found
320
320
  */
321
321
  function GET_SCRIPT_ID() {
322
- return "1.0.104-rn-sdk-0.2.0" ;
322
+ return "1.0.104-rn-sdk-0.2.2" ;
323
323
  }
324
324
  /**
325
325
  *
@@ -1,4 +1,4 @@
1
- import { strToU8, zlibSync, strFromU8 } from '../node_modules/fflate/esm/browser.js';
1
+ import { strToU8, zlibSync, strFromU8 } from 'fflate';
2
2
  import { LogLevel, initialize, subscribeToNativeEvent } from './nativeSessionRecorderSubscription.js';
3
3
  import StoredMetrics from '../api/storedMetrics.js';
4
4
  import ClientConfig from '../api/clientConfig.js';
@@ -13,7 +13,7 @@ export default class RNStorageProvider extends StorageProvider {
13
13
  */
14
14
  static isAvailable(): Promise<{
15
15
  result: boolean;
16
- error: unknown;
16
+ error: Error | null;
17
17
  }>;
18
18
  /**
19
19
  * Calculates used scape
@@ -1,7 +1,6 @@
1
1
  import AsyncStorage from '@react-native-async-storage/async-storage';
2
2
  import StorageProvider from './storageProvider.js';
3
3
 
4
- // eslint-disable-next-line max-classes-per-file
5
4
  /**
6
5
  * React native storage provider implementation
7
6
  */
@@ -7,9 +7,9 @@ export default abstract class StorageProvider {
7
7
  /** Creates new instance based on provided provider type */
8
8
  constructor(provider: Provider);
9
9
  /** Checks if provider is available */
10
- static isAvailable(resolver: () => Provider): Promise<{
10
+ static isAvailable<T extends Provider>(resolver: () => T): Promise<{
11
11
  result: boolean;
12
- error: unknown;
12
+ error: Error | null;
13
13
  }>;
14
14
  /**
15
15
  * Loads value from storage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noibu-react-native",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
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",
@@ -27,15 +27,26 @@
27
27
  "optional": true
28
28
  }
29
29
  },
30
- "dependencies": {
30
+ "optionalDependencies": {
31
31
  "@react-native-async-storage/async-storage": "^1.19.0",
32
32
  "fflate": "^0.8.2",
33
- "react": ">=16.11.0",
34
- "react-native": ">=0.63.0",
33
+ "react-native-navigation": ">=2.29.0",
34
+ "react-native-url-polyfill": "^1.3.0",
35
+ "react-native-uuid": "^2.0.1"
36
+ },
37
+ "peerDependencies": {
38
+ "@react-native-async-storage/async-storage": "^1.19.0",
39
+ "fflate": "^0.8.2",
40
+ "react": ">=16.13.1 <=18",
41
+ "react-native": "^0.63.0",
42
+ "react-native-navigation": ">=2.29.0",
35
43
  "react-native-url-polyfill": "^1.3.0",
36
44
  "react-native-uuid": "^2.0.1"
37
45
  },
38
46
  "devDependencies": {
47
+ "@babel/preset-env": "^7.24.8",
48
+ "@jest/globals": "^29.7.0",
49
+ "@react-native-async-storage/async-storage": "1.19.0",
39
50
  "@rollup/plugin-commonjs": "^25.0.0",
40
51
  "@rollup/plugin-json": "^6.0.0",
41
52
  "@rollup/plugin-node-resolve": "^15.1.0",
@@ -43,11 +54,12 @@
43
54
  "@rollup/plugin-typescript": "^11.1.1",
44
55
  "@tsconfig/react-native": "^3.0.2",
45
56
  "@types/jest": "^29.5.1",
46
- "@jest/globals": "^29.7.0",
47
57
  "@types/node": "^20.2.3",
48
- "@types/react": "^18.2.6",
58
+ "@types/react": "16.14.62",
59
+ "@types/react-native": "0.63.50",
49
60
  "@types/react-test-renderer": "^18.0.0",
50
61
  "@typescript-eslint/eslint-plugin": "^5.59.6",
62
+ "babel-jest": "^29.7.0",
51
63
  "babel-plugin-transform-flow-strip-types": "^6.22.0",
52
64
  "codecov": "^3.8.3",
53
65
  "dotenv": "^16.1.3",
@@ -56,10 +68,14 @@
56
68
  "eslint-config-prettier": "^8.8.0",
57
69
  "eslint-plugin-jsdoc": "^44.2.4",
58
70
  "eslint-plugin-prettier": "^4.2.1",
71
+ "fflate": "0.8.2",
59
72
  "jest": "^29.7.0",
60
- "@babel/preset-env": "^7.24.8",
61
- "babel-jest": "^29.7.0",
62
73
  "prettier": "^2.8.8",
74
+ "react": "16.13.1",
75
+ "react-native": "^0.63.0",
76
+ "react-native-navigation": "2.29.0",
77
+ "react-native-url-polyfill": "1.3.0",
78
+ "react-native-uuid": "2.0.1",
63
79
  "rimraf": "^5.0.1",
64
80
  "rollup": "^3.24.0",
65
81
  "rollup-plugin-dotenv": "^0.5.0",