react-native-inapp-inspector 1.0.13 → 1.0.15

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/example/App.tsx CHANGED
@@ -11,17 +11,20 @@ import {
11
11
  import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
12
12
  import { NavigationContainer } from '@react-navigation/native';
13
13
  import { createNativeStackNavigator } from '@react-navigation/native-stack';
14
+ import axios from 'axios';
14
15
  import NetworkInspector, {
15
16
  WebView,
16
17
  ErrorBoundary,
17
18
  connectReduxStore,
19
+ setupNetworkLogger,
18
20
  subscribeNetworkLogs,
19
21
  subscribeConsoleLogs,
20
22
  logAnalyticsEvent,
21
23
  subscribeAnalyticsEvents,
22
24
  } from 'react-native-inapp-inspector';
23
- import axios from 'axios';
24
25
 
26
+ // ⚡ Call BEFORE any component renders so axios.create() is already patched
27
+ setupNetworkLogger();
25
28
  // ─── Mock Redux Store ────────────────────────────────────────────────────────
26
29
  const mockStore = {
27
30
  state: {
@@ -126,8 +129,7 @@ function HomeScreen({ navigation }: any) {
126
129
  };
127
130
  }, []);
128
131
 
129
- // Create an Axios instance to test automatic interception of custom instances.
130
- // Note: No manual addAxiosInterceptors call is performed! It is now automatic.
132
+ // Axios client interceptors are automatically applied by setupNetworkLogger()
131
133
  const axiosClient = React.useMemo(() => axios.create({
132
134
  baseURL: 'https://jsonplaceholder.typicode.com',
133
135
  }), []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-inapp-inspector",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "A self-contained network, console, analytics, and webview inspector for React Native applications.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -65,6 +65,8 @@
65
65
  "@react-navigation/native": "^6.1.9",
66
66
  "@types/react": "^19.1.0",
67
67
  "@types/react-native": "^0.72.0",
68
+ "axios": "^1.7.2",
69
+ "prettier": "^2.8.8",
68
70
  "react": "19.1.0",
69
71
  "react-native": "0.81.4",
70
72
  "react-native-linear-gradient": "^2.8.3",