@rozenite/network-activity-plugin 1.5.1 → 1.7.0-rc.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.
Files changed (113) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +2 -0
  3. package/dist/{App.html → devtools/App.html} +2 -2
  4. package/dist/{boot-recording.cjs → react-native/chunks/boot-recording.cjs} +1 -1
  5. package/dist/{boot-recording.js → react-native/chunks/boot-recording.js} +3 -3
  6. package/dist/react-native/chunks/boot-recording.require.cjs +5 -0
  7. package/dist/react-native/chunks/boot-recording.require.js +5 -0
  8. package/dist/react-native/chunks/useNetworkActivityDevTools.require.cjs +1102 -0
  9. package/dist/react-native/chunks/useNetworkActivityDevTools.require.js +1102 -0
  10. package/dist/{react-native.cjs → react-native/index.cjs} +2 -2
  11. package/dist/react-native/index.d.ts +305 -0
  12. package/dist/{react-native.js → react-native/index.js} +2 -2
  13. package/dist/rozenite.json +1 -1
  14. package/package.json +27 -7
  15. package/src/react-native/agent/__tests__/network-activity-agent-state.test.ts +250 -0
  16. package/src/react-native/agent/state.ts +869 -0
  17. package/src/react-native/agent/tools.ts +146 -0
  18. package/src/react-native/agent/use-network-activity-agent-tools.ts +244 -0
  19. package/src/react-native/http/http-inspector.ts +0 -1
  20. package/src/react-native/useNetworkActivityDevTools.ts +11 -0
  21. package/tsconfig.json +3 -0
  22. package/dist/react-native.d.ts +0 -4
  23. package/dist/rozenite.config.d.ts +0 -7
  24. package/dist/src/react-native/boot-recording.d.ts +0 -41
  25. package/dist/src/react-native/config.d.ts +0 -23
  26. package/dist/src/react-native/events-listener.d.ts +0 -44
  27. package/dist/src/react-native/http/http-inspector.d.ts +0 -10
  28. package/dist/src/react-native/http/http-utils.d.ts +0 -15
  29. package/dist/src/react-native/http/network-requests-registry.d.ts +0 -6
  30. package/dist/src/react-native/http/overrides-registry.d.ts +0 -6
  31. package/dist/src/react-native/http/xhr-interceptor.d.ts +0 -44
  32. package/dist/src/react-native/inspector.d.ts +0 -7
  33. package/dist/src/react-native/network-inspector.d.ts +0 -16
  34. package/dist/src/react-native/sse/event-source.d.ts +0 -2
  35. package/dist/src/react-native/sse/sse-inspector.d.ts +0 -6
  36. package/dist/src/react-native/sse/sse-interceptor.d.ts +0 -36
  37. package/dist/src/react-native/sse/types.d.ts +0 -6
  38. package/dist/src/react-native/useHttpInspector.d.ts +0 -3
  39. package/dist/src/react-native/useNetworkActivityDevTools.d.ts +0 -3
  40. package/dist/src/react-native/useSSEInspector.d.ts +0 -3
  41. package/dist/src/react-native/useWebSocketInspector.d.ts +0 -3
  42. package/dist/src/react-native/utils/getBlobName.d.ts +0 -35
  43. package/dist/src/react-native/utils/getFormDataEntries.d.ts +0 -18
  44. package/dist/src/react-native/utils.d.ts +0 -6
  45. package/dist/src/react-native/websocket/websocket-inspector.d.ts +0 -6
  46. package/dist/src/react-native/websocket/websocket-interceptor.d.ts +0 -73
  47. package/dist/src/shared/client.d.ts +0 -17
  48. package/dist/src/shared/http-events.d.ts +0 -106
  49. package/dist/src/shared/sse-events.d.ts +0 -38
  50. package/dist/src/shared/websocket-events.d.ts +0 -60
  51. package/dist/src/ui/App.d.ts +0 -1
  52. package/dist/src/ui/components/Badge.d.ts +0 -9
  53. package/dist/src/ui/components/Button.d.ts +0 -11
  54. package/dist/src/ui/components/CodeBlock.d.ts +0 -3
  55. package/dist/src/ui/components/CodeEditor.d.ts +0 -5
  56. package/dist/src/ui/components/CookieCard.d.ts +0 -7
  57. package/dist/src/ui/components/CopyRequestDropdown.d.ts +0 -7
  58. package/dist/src/ui/components/DropdownMenu.d.ts +0 -27
  59. package/dist/src/ui/components/FilterBar.d.ts +0 -10
  60. package/dist/src/ui/components/Input.d.ts +0 -3
  61. package/dist/src/ui/components/JsonTree.d.ts +0 -5
  62. package/dist/src/ui/components/JsonTreeCopyableItem.d.ts +0 -7
  63. package/dist/src/ui/components/KeyValueGrid.d.ts +0 -13
  64. package/dist/src/ui/components/OverrideResponse.d.ts +0 -8
  65. package/dist/src/ui/components/RequestBody.d.ts +0 -6
  66. package/dist/src/ui/components/RequestList.d.ts +0 -30
  67. package/dist/src/ui/components/ScrollArea.d.ts +0 -5
  68. package/dist/src/ui/components/Section.d.ts +0 -8
  69. package/dist/src/ui/components/Separator.d.ts +0 -4
  70. package/dist/src/ui/components/SidePanel.d.ts +0 -1
  71. package/dist/src/ui/components/Tabs.d.ts +0 -7
  72. package/dist/src/ui/components/Toolbar.d.ts +0 -1
  73. package/dist/src/ui/hooks/useCopyToClipboard.d.ts +0 -4
  74. package/dist/src/ui/state/derived.d.ts +0 -5
  75. package/dist/src/ui/state/hooks.d.ts +0 -21
  76. package/dist/src/ui/state/model.d.ts +0 -113
  77. package/dist/src/ui/state/store.d.ts +0 -48
  78. package/dist/src/ui/tabs/CookiesTab.d.ts +0 -5
  79. package/dist/src/ui/tabs/HeadersTab.d.ts +0 -5
  80. package/dist/src/ui/tabs/MessagesTab.d.ts +0 -5
  81. package/dist/src/ui/tabs/RequestTab.d.ts +0 -5
  82. package/dist/src/ui/tabs/ResponseTab.d.ts +0 -6
  83. package/dist/src/ui/tabs/SSEMessagesTab.d.ts +0 -5
  84. package/dist/src/ui/tabs/TimingTab.d.ts +0 -5
  85. package/dist/src/ui/types.d.ts +0 -26
  86. package/dist/src/ui/utils/assert.d.ts +0 -1
  87. package/dist/src/ui/utils/checkRequestBodyBinary.d.ts +0 -2
  88. package/dist/src/ui/utils/cn.d.ts +0 -2
  89. package/dist/src/ui/utils/copyToClipboard.d.ts +0 -1
  90. package/dist/src/ui/utils/escapeShellArg.d.ts +0 -1
  91. package/dist/src/ui/utils/generateCurlCommand.d.ts +0 -2
  92. package/dist/src/ui/utils/generateFetchCall.d.ts +0 -2
  93. package/dist/src/ui/utils/generateMultipartBody.d.ts +0 -4
  94. package/dist/src/ui/utils/getId.d.ts +0 -1
  95. package/dist/src/ui/utils/getStatusColor.d.ts +0 -1
  96. package/dist/src/ui/views/InspectorView.d.ts +0 -5
  97. package/dist/src/ui/views/LoadingView.d.ts +0 -1
  98. package/dist/src/utils/applyReactNativeRequestHeadersLogic.d.ts +0 -7
  99. package/dist/src/utils/applyReactNativeResponseHeadersLogic.d.ts +0 -9
  100. package/dist/src/utils/cookieParser.d.ts +0 -6
  101. package/dist/src/utils/getContentTypeMimeType.d.ts +0 -2
  102. package/dist/src/utils/getHttpHeader.d.ts +0 -5
  103. package/dist/src/utils/getHttpHeaderValueAsString.d.ts +0 -11
  104. package/dist/src/utils/getStringSizeInBytes.d.ts +0 -1
  105. package/dist/src/utils/inferContentTypeFromPostData.d.ts +0 -2
  106. package/dist/src/utils/safeStringify.d.ts +0 -1
  107. package/dist/src/utils/typeChecks.d.ts +0 -9
  108. package/dist/useNetworkActivityDevTools.cjs +0 -171
  109. package/dist/useNetworkActivityDevTools.js +0 -171
  110. /package/dist/{assets → devtools/assets}/App-BrSkOkws.css +0 -0
  111. /package/dist/{assets/App-CGt4qucR.js → devtools/assets/App-pokLiGYV.js} +0 -0
  112. /package/dist/{event-source.cjs → react-native/chunks/event-source.cjs} +0 -0
  113. /package/dist/{event-source.js → react-native/chunks/event-source.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @rozenite/network-activity-plugin
2
2
 
3
+ ## 1.7.0-rc.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @rozenite/agent-bridge@1.7.0-rc.0
9
+ - @rozenite/plugin-bridge@1.7.0-rc.0
10
+
11
+ ## 1.6.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#198](https://github.com/callstackincubator/rozenite/pull/198) [`cc97b14`](https://github.com/callstackincubator/rozenite/commit/cc97b1433b0f6a93864060d980e869e08d7242bd) Thanks [@V3RON](https://github.com/V3RON)! - Add agent tools for inspecting HTTP, WebSocket, and SSE activity in the Network Activity plugin.
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies []:
20
+ - @rozenite/agent-bridge@1.6.0
21
+ - @rozenite/plugin-bridge@1.6.0
22
+
3
23
  ## 1.5.1
4
24
 
5
25
  ### Patch Changes
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ### A Rozenite plugin that provides comprehensive network activity monitoring for React Native applications.
4
4
 
5
+ For agents, this plugin is the fallback network domain when the built-in `network` domain is unavailable, such as on older React Native versions. Agents should prefer the built-in `network` domain first, and switch to `@rozenite/network-activity-plugin` only if `network` is missing or fails to initialize.
6
+
5
7
  [![mit licence][license-badge]][license] [![npm downloads][npm-downloads-badge]][npm-downloads] [![Chat][chat-badge]][chat] [![PRs Welcome][prs-welcome-badge]][prs-welcome]
6
8
 
7
9
  The Rozenite Network Activity Plugin provides real-time network request monitoring, detailed request/response inspection within your React Native DevTools environment. It offers comprehensive network debugging capabilities similar to browser DevTools Network panel.
@@ -22,8 +22,8 @@
22
22
  <script>
23
23
  var __ROZENITE_PANEL__ = true;
24
24
  </script>
25
- <script type="module" crossorigin src="./assets/App-CGt4qucR.js"></script>
26
- <link rel="stylesheet" crossorigin href="./assets/App-BrSkOkws.css">
25
+ <script type="module" crossorigin src="../devtools/assets/App-pokLiGYV.js"></script>
26
+ <link rel="stylesheet" crossorigin href="../devtools/assets/App-BrSkOkws.css">
27
27
  </head>
28
28
  <body>
29
29
  <div id="root"></div>
@@ -534,7 +534,6 @@ const getHTTPInspector = () => {
534
534
  },
535
535
  disable: () => {
536
536
  XHRInterceptor.disableInterception();
537
- networkRequestsRegistry.clear();
538
537
  },
539
538
  isEnabled: () => {
540
539
  return XHRInterceptor.isInterceptorEnabled();
@@ -1083,5 +1082,6 @@ exports.getResponseBody = getResponseBody;
1083
1082
  exports.isHttpEvent = isHttpEvent;
1084
1083
  exports.isSSEEvent = isSSEEvent;
1085
1084
  exports.isWebSocketEvent = isWebSocketEvent;
1085
+ exports.safeStringify = safeStringify;
1086
1086
  exports.validateConfig = validateConfig;
1087
1087
  exports.withOnBootNetworkActivityRecording = withOnBootNetworkActivityRecording;
@@ -531,7 +531,6 @@ const getHTTPInspector = () => {
531
531
  },
532
532
  disable: () => {
533
533
  XHRInterceptor.disableInterception();
534
- networkRequestsRegistry.clear();
535
534
  },
536
535
  isEnabled: () => {
537
536
  return XHRInterceptor.isInterceptorEnabled();
@@ -1075,12 +1074,13 @@ const withOnBootNetworkActivityRecording = (options) => {
1075
1074
  };
1076
1075
  export {
1077
1076
  DEFAULT_CONFIG as D,
1078
- getResponseBody as a,
1077
+ getOverridesRegistry as a,
1079
1078
  isWebSocketEvent as b,
1080
1079
  createNetworkInspectorsConfiguration as c,
1081
1080
  isSSEEvent as d,
1082
- getOverridesRegistry as g,
1081
+ getResponseBody as g,
1083
1082
  isHttpEvent as i,
1083
+ safeStringify as s,
1084
1084
  validateConfig as v,
1085
1085
  withOnBootNetworkActivityRecording as w
1086
1086
  };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const bootRecording = require("./boot-recording.cjs");
4
+ exports.createNetworkInspectorsConfiguration = bootRecording.createNetworkInspectorsConfiguration;
5
+ exports.withOnBootNetworkActivityRecording = bootRecording.withOnBootNetworkActivityRecording;
@@ -0,0 +1,5 @@
1
+ import { c, w } from "./boot-recording.js";
2
+ export {
3
+ c as createNetworkInspectorsConfiguration,
4
+ w as withOnBootNetworkActivityRecording
5
+ };