@rozenite/network-activity-plugin 1.7.0 → 1.8.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +24 -0
  3. package/dist/devtools/App.html +2 -2
  4. package/dist/devtools/assets/{App-pokLiGYV.js → App-B3xlUjs6.js} +163 -115
  5. package/dist/devtools/assets/{App-BrSkOkws.css → App-m6xge0az.css} +13 -0
  6. package/dist/react-native/chunks/boot-recording.cjs +307 -28
  7. package/dist/react-native/chunks/boot-recording.js +310 -31
  8. package/dist/react-native/chunks/useNetworkActivityDevTools.require.cjs +192 -141
  9. package/dist/react-native/chunks/useNetworkActivityDevTools.require.js +193 -142
  10. package/dist/react-native/index.d.ts +24 -7
  11. package/dist/rozenite.json +1 -1
  12. package/dist/sdk/index.cjs +127 -0
  13. package/dist/sdk/index.d.ts +1243 -0
  14. package/dist/sdk/index.js +127 -0
  15. package/package.json +17 -6
  16. package/sdk.ts +59 -0
  17. package/src/react-native/__tests__/events-listener.test.ts +35 -0
  18. package/src/react-native/agent/__tests__/network-activity-agent-state.test.ts +21 -9
  19. package/src/react-native/agent/state.ts +13 -13
  20. package/src/react-native/agent/tools.ts +20 -146
  21. package/src/react-native/agent/use-network-activity-agent-tools.ts +73 -64
  22. package/src/react-native/events-listener.ts +12 -3
  23. package/src/react-native/http/http-inspector.ts +19 -5
  24. package/src/react-native/network-inspector.ts +46 -8
  25. package/src/react-native/nitro-fetch/__tests__/nitro-network-inspector.test.ts +198 -0
  26. package/src/react-native/nitro-fetch/nitro-network-inspector.ts +403 -0
  27. package/src/react-native/useHttpInspector.ts +9 -19
  28. package/src/react-native/useNetworkActivityDevTools.ts +13 -1
  29. package/src/react-native/websocket/__tests__/websocket-inspector.test.ts +69 -0
  30. package/src/react-native/websocket/websocket-inspector.ts +32 -17
  31. package/src/shared/agent-tools.ts +230 -0
  32. package/src/shared/client.ts +3 -0
  33. package/src/shared/http-events.ts +6 -0
  34. package/src/shared/websocket-events.ts +16 -7
  35. package/src/ui/components/RequestList.tsx +21 -0
  36. package/src/ui/components/SidePanel.tsx +12 -9
  37. package/src/ui/state/derived.ts +4 -0
  38. package/src/ui/state/model.ts +6 -1
  39. package/src/ui/state/store.ts +52 -36
  40. package/src/ui/tabs/HeadersTab.tsx +18 -4
  41. package/src/ui/tabs/ResponseTab.tsx +5 -3
  42. package/tsconfig.json +4 -1
  43. package/vite.config.ts +7 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @rozenite/network-activity-plugin
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @rozenite/agent-bridge@1.8.1
9
+ - @rozenite/agent-shared@1.8.1
10
+ - @rozenite/plugin-bridge@1.8.1
11
+
12
+ ## 1.8.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#222](https://github.com/callstackincubator/rozenite/pull/222) [`404244b`](https://github.com/callstackincubator/rozenite/commit/404244bab0600761ed82e5a7e8072b933c46f80a) Thanks [@manapard](https://github.com/manapard)! - Add typed `./sdk` entrypoints for the official agent-enabled plugins backed by
17
+ the same shared tool contracts used at runtime.
18
+
19
+ These plugins now publish typed descriptor groups for `session.tools.call(...)`
20
+ workflows, including shared public input/result types, while keeping their
21
+ existing tool names and runtime behavior unchanged. The official agent SDK docs
22
+ and plugin authoring guidance now also document this SDK export pattern,
23
+ including the `network-activity` fallback note for environments without the
24
+ built-in `network` domain.
25
+
26
+ - [#233](https://github.com/callstackincubator/rozenite/pull/233) [`90e7fb6`](https://github.com/callstackincubator/rozenite/commit/90e7fb603496e3db2a8d6823c04e6686679619cb) Thanks [@V3RON](https://github.com/V3RON)! - Added support for Nitro fetch traffic in Network Activity.
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [[`404244b`](https://github.com/callstackincubator/rozenite/commit/404244bab0600761ed82e5a7e8072b933c46f80a), [`404244b`](https://github.com/callstackincubator/rozenite/commit/404244bab0600761ed82e5a7e8072b933c46f80a)]:
31
+ - @rozenite/agent-bridge@1.8.0
32
+ - @rozenite/agent-shared@1.8.0
33
+ - @rozenite/plugin-bridge@1.8.0
34
+
3
35
  ## 1.7.0
4
36
 
5
37
  ### Patch Changes
package/README.md CHANGED
@@ -10,6 +10,16 @@ The Rozenite Network Activity Plugin provides real-time network request monitori
10
10
 
11
11
  ![Network Activity Plugin](https://rozenite.dev/network-activity-plugin.png)
12
12
 
13
+ ## Nitro Support
14
+
15
+ The plugin now integrates with `react-native-nitro-fetch` when it is installed in your app.
16
+
17
+ - Nitro HTTP traffic is shown in the same Network Activity panel as built-in React Native requests
18
+ - Nitro WebSocket traffic is supported through the nitro network inspector event stream
19
+ - Requests are labeled with a source badge in the list and details view: `Built-in` or `Nitro`
20
+ - Response body lookup works for both built-in and nitro HTTP entries
21
+ - HTTP response overrides remain built-in only and are disabled for nitro entries
22
+
13
23
  ## Features
14
24
 
15
25
  - **Real-time Network Monitoring**: Track all HTTP/HTTPS requests in real-time
@@ -17,6 +27,7 @@ The Rozenite Network Activity Plugin provides real-time network request monitori
17
27
  - **Response Inspection**: Examine response headers, status codes, and timing data
18
28
  - **Performance Analysis**: Analyze request duration, connection timing, and performance metrics
19
29
  - **Request History**: Maintain a searchable history of network activity
30
+ - **Nitro Integration**: Merge `react-native-nitro-fetch` traffic into the same inspector when available
20
31
  - **Chrome DevTools Protocol**: Built on CDP for accurate network event capture
21
32
  - **Production Safety**: Automatically disabled in production builds
22
33
 
@@ -28,6 +39,12 @@ Install the Network Activity plugin as a dependency:
28
39
  npm install @rozenite/network-activity-plugin
29
40
  ```
30
41
 
42
+ Optional nitro integration:
43
+
44
+ ```bash
45
+ npm install react-native-nitro-fetch
46
+ ```
47
+
31
48
  ## Quick Start
32
49
 
33
50
  ### 1. Install the Plugin
@@ -65,6 +82,13 @@ withOnBootNetworkActivityRecording();
65
82
 
66
83
  Start your development server and open React Native DevTools. You'll find the "Network Activity" panel in the DevTools interface.
67
84
 
85
+ ## Notes and Limitations
86
+
87
+ - Built-in React Native inspectors still only capture traffic coming from the JavaScript thread
88
+ - When `react-native-nitro-fetch` is installed, the plugin also listens to nitro's network inspector and shows that traffic in the same panel
89
+ - Native traffic from other networking stacks that do not expose compatible inspector events will not appear automatically
90
+ - Nitro HTTP entries support response body inspection, but response overriding is not available for them
91
+
68
92
  ## Made with ❤️ at Callstack
69
93
 
70
94
  `rozenite` is an open source project and will always remain free to use. If you think it's cool, please star it 🌟.
@@ -22,8 +22,8 @@
22
22
  <script>
23
23
  var __ROZENITE_PANEL__ = true;
24
24
  </script>
25
- <script type="module" crossorigin src="../devtools/assets/App-pokLiGYV.js"></script>
26
- <link rel="stylesheet" crossorigin href="../devtools/assets/App-BrSkOkws.css">
25
+ <script type="module" crossorigin src="../devtools/assets/App-B3xlUjs6.js"></script>
26
+ <link rel="stylesheet" crossorigin href="../devtools/assets/App-m6xge0az.css">
27
27
  </head>
28
28
  <body>
29
29
  <div id="root"></div>