@metarouter/react-native-sdk 1.5.0 → 1.7.0
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/README.md +59 -10
- package/android/build.gradle +41 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/metarouter/reactnative/MetaRouterNetworkMonitorModule.kt +119 -0
- package/android/src/main/java/com/metarouter/reactnative/MetaRouterPackage.kt +23 -0
- package/android/src/main/java/com/metarouter/reactnative/MetaRouterQueueStorageModule.kt +124 -0
- package/ios/MetaRouterNetworkMonitor.m +76 -0
- package/ios/MetaRouterQueueStorage.m +127 -0
- package/lib/analytics/MetaRouterAnalyticsClient.d.ts +23 -4
- package/lib/analytics/MetaRouterAnalyticsClient.d.ts.map +1 -1
- package/lib/analytics/MetaRouterAnalyticsClient.js +178 -89
- package/lib/analytics/dispatcher.d.ts +61 -4
- package/lib/analytics/dispatcher.d.ts.map +1 -1
- package/lib/analytics/dispatcher.js +248 -45
- package/lib/analytics/init.d.ts +1 -1
- package/lib/analytics/init.d.ts.map +1 -1
- package/lib/analytics/init.js +12 -2
- package/lib/analytics/persistence/NativeQueueStorage.d.ts +5 -0
- package/lib/analytics/persistence/NativeQueueStorage.d.ts.map +1 -0
- package/lib/analytics/persistence/NativeQueueStorage.js +59 -0
- package/lib/analytics/persistence/PersistentEventQueue.d.ts +96 -0
- package/lib/analytics/persistence/PersistentEventQueue.d.ts.map +1 -0
- package/lib/analytics/persistence/PersistentEventQueue.js +401 -0
- package/lib/analytics/persistence/types.d.ts +20 -0
- package/lib/analytics/persistence/types.d.ts.map +1 -0
- package/lib/analytics/persistence/types.js +10 -0
- package/lib/analytics/proxy/proxyClient.d.ts +1 -1
- package/lib/analytics/proxy/proxyClient.d.ts.map +1 -1
- package/lib/analytics/proxy/proxyClient.js +23 -29
- package/lib/analytics/types.d.ts +12 -4
- package/lib/analytics/types.d.ts.map +1 -1
- package/lib/analytics/utils/circuitBreaker.d.ts +4 -1
- package/lib/analytics/utils/circuitBreaker.d.ts.map +1 -1
- package/lib/analytics/utils/circuitBreaker.js +23 -14
- package/lib/analytics/utils/contextInfo.d.ts +1 -1
- package/lib/analytics/utils/contextInfo.d.ts.map +1 -1
- package/lib/analytics/utils/contextInfo.js +28 -24
- package/lib/analytics/utils/debouncedNetworkMonitor.d.ts +25 -0
- package/lib/analytics/utils/debouncedNetworkMonitor.d.ts.map +1 -0
- package/lib/analytics/utils/debouncedNetworkMonitor.js +68 -0
- package/lib/analytics/utils/networkMonitor.d.ts +30 -0
- package/lib/analytics/utils/networkMonitor.d.ts.map +1 -0
- package/lib/analytics/utils/networkMonitor.js +90 -0
- package/lib/analytics/utils/responseCategory.d.ts +14 -0
- package/lib/analytics/utils/responseCategory.d.ts.map +1 -0
- package/lib/analytics/utils/responseCategory.js +26 -0
- package/metarouter-react-native-sdk.podspec +19 -0
- package/package.json +27 -10
- package/react-native.config.js +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metarouter/react-native-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"lib",
|
|
15
|
-
"
|
|
15
|
+
"ios",
|
|
16
|
+
"android",
|
|
17
|
+
"react-native.config.js",
|
|
18
|
+
"metarouter-react-native-sdk.podspec"
|
|
16
19
|
],
|
|
17
20
|
"scripts": {
|
|
18
21
|
"clean": "rm -rf lib",
|
|
19
22
|
"build": "tsc --project tsconfig.build.json",
|
|
20
|
-
"prepare": "
|
|
23
|
+
"prepare": "husky",
|
|
21
24
|
"prepublishOnly": "npm run clean && npm run build",
|
|
22
25
|
"test": "jest"
|
|
23
26
|
},
|
|
@@ -41,17 +44,31 @@
|
|
|
41
44
|
"peerDependencies": {
|
|
42
45
|
"@react-native-async-storage/async-storage": ">=2.2.0",
|
|
43
46
|
"react": ">=16.8.0",
|
|
44
|
-
"react-native": ">=0.
|
|
45
|
-
"react-native-device-info": "
|
|
47
|
+
"react-native": ">=0.73.0",
|
|
48
|
+
"react-native-device-info": ">=14.0.4"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
51
|
+
"@commitlint/cli": "^20.3.0",
|
|
52
|
+
"@commitlint/config-conventional": "^20.3.0",
|
|
53
|
+
"@eslint/compat": "^2.0.0",
|
|
54
|
+
"@eslint/eslintrc": "^3.3.3",
|
|
55
|
+
"@eslint/js": "^9.39.2",
|
|
48
56
|
"@react-native-async-storage/async-storage": ">=2.2.0",
|
|
57
|
+
"@react-native/eslint-config": "^0.84.0-nightly-20260106-36a0d9ef6",
|
|
49
58
|
"@types/jest": "^30.0.0",
|
|
50
|
-
"@types/react": "^19.
|
|
51
|
-
"
|
|
59
|
+
"@types/react": "^19.2.7",
|
|
60
|
+
"eslint": "^9.39.2",
|
|
61
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
62
|
+
"husky": "^9.1.7",
|
|
63
|
+
"jest": "^30.2.0",
|
|
64
|
+
"lint-staged": "^16.2.7",
|
|
52
65
|
"metro-react-native-babel-preset": "^0.77.0",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
66
|
+
"prettier": "^3.7.4",
|
|
67
|
+
"react-native-device-info": "^15.0.1",
|
|
68
|
+
"typescript": "^5.9.3"
|
|
55
69
|
},
|
|
56
|
-
"react-native": "./lib/index.js"
|
|
70
|
+
"react-native": "./lib/index.js",
|
|
71
|
+
"lint-staged": {
|
|
72
|
+
"*.{ts,js}": "eslint --fix"
|
|
73
|
+
}
|
|
57
74
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
dependency: {
|
|
3
|
+
platforms: {
|
|
4
|
+
ios: {
|
|
5
|
+
podspecPath: './metarouter-react-native-sdk.podspec',
|
|
6
|
+
},
|
|
7
|
+
android: {
|
|
8
|
+
sourceDir: './android',
|
|
9
|
+
packageImportPath:
|
|
10
|
+
'import com.metarouter.reactnative.MetaRouterPackage;',
|
|
11
|
+
packageInstance: 'new MetaRouterPackage()',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|