@rozenite/network-activity-plugin 1.9.0 → 1.11.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/CHANGELOG.md +60 -0
- package/dist/devtools/App.html +2 -2
- package/dist/devtools/assets/{App-hSoryVpJ.js → App-CEESZAW_.js} +7520 -937
- package/dist/devtools/assets/{App-m6xge0az.css → App-xppYUJvX.css} +246 -2
- package/dist/react-native/chunks/boot-recording.cjs +138 -14
- package/dist/react-native/chunks/boot-recording.js +138 -14
- package/dist/react-native/chunks/get-nitro-module.cjs +4 -1
- package/dist/react-native/chunks/get-nitro-module.js +4 -1
- package/dist/react-native/chunks/useNetworkActivityDevTools.require.cjs +20 -1
- package/dist/react-native/chunks/useNetworkActivityDevTools.require.js +20 -1
- package/dist/react-native/index.d.ts +37 -1
- package/dist/rozenite.json +1 -1
- package/dist/sdk/index.d.ts +37 -1
- package/package.json +12 -7
- package/src/react-native/agent/use-network-activity-agent-tools.ts +22 -4
- package/src/react-native/http/__tests__/http-utils.test.ts +228 -0
- package/src/react-native/http/http-utils.ts +208 -25
- package/src/react-native/network-inspector.ts +2 -2
- package/src/react-native/nitro-fetch/get-nitro-module.ts +5 -1
- package/src/react-native/nitro-fetch/nitro-network-inspector.ts +8 -2
- package/src/shared/http-events.ts +40 -1
- package/src/ui/components/CodeBlock.tsx +45 -1
- package/src/ui/components/FilterBar.tsx +337 -61
- package/src/ui/components/HexView.tsx +54 -0
- package/src/ui/components/MetadataCard.tsx +95 -0
- package/src/ui/components/NetworkTimeline.tsx +422 -0
- package/src/ui/components/RequestList.tsx +19 -40
- package/src/ui/components/SidePanel.tsx +42 -1
- package/src/ui/components/Toolbar.tsx +13 -1
- package/src/ui/components/ViewToggle.tsx +44 -0
- package/src/ui/components/XmlTree.tsx +160 -0
- package/src/ui/components/__tests__/CodeBlock.test.tsx +89 -0
- package/src/ui/components/__tests__/HexView.test.tsx +41 -0
- package/src/ui/components/__tests__/MetadataCard.test.tsx +107 -0
- package/src/ui/components/__tests__/ViewToggle.test.tsx +80 -0
- package/src/ui/components/__tests__/XmlTree.test.tsx +149 -0
- package/src/ui/hooks/useNetworkActivitySessionExport.ts +39 -0
- package/src/ui/response-renderers/__tests__/binary-too-large.test.tsx +56 -0
- package/src/ui/response-renderers/__tests__/binary.test.tsx +96 -0
- package/src/ui/response-renderers/__tests__/dispatch.test.ts +124 -0
- package/src/ui/response-renderers/__tests__/html.test.tsx +101 -0
- package/src/ui/response-renderers/__tests__/image.test.tsx +73 -0
- package/src/ui/response-renderers/__tests__/json.test.tsx +95 -0
- package/src/ui/response-renderers/__tests__/svg.test.tsx +46 -0
- package/src/ui/response-renderers/__tests__/xml.test.tsx +100 -0
- package/src/ui/response-renderers/binary-too-large.tsx +36 -0
- package/src/ui/response-renderers/binary.tsx +31 -0
- package/src/ui/response-renderers/empty.tsx +14 -0
- package/src/ui/response-renderers/html.tsx +36 -0
- package/src/ui/response-renderers/image.tsx +37 -0
- package/src/ui/response-renderers/index.ts +55 -0
- package/src/ui/response-renderers/json.tsx +40 -0
- package/src/ui/response-renderers/svg.tsx +27 -0
- package/src/ui/response-renderers/text-fallback.tsx +14 -0
- package/src/ui/response-renderers/types.ts +38 -0
- package/src/ui/response-renderers/unknown.tsx +18 -0
- package/src/ui/response-renderers/xml.tsx +46 -0
- package/src/ui/state/__tests__/store.test.ts +77 -0
- package/src/ui/state/derived.ts +14 -0
- package/src/ui/state/filter.ts +49 -0
- package/src/ui/state/hooks.ts +2 -2
- package/src/ui/state/model.ts +7 -1
- package/src/ui/state/store.ts +63 -4
- package/src/ui/tabs/InitiatorTab.tsx +230 -0
- package/src/ui/tabs/ResponseTab.tsx +80 -97
- package/src/ui/tabs/__tests__/ResponseTab.test.tsx +102 -0
- package/src/ui/utils/__tests__/download.test.ts +115 -0
- package/src/ui/utils/__tests__/hex.test.ts +84 -0
- package/src/ui/utils/__tests__/requestFilters.test.ts +32 -0
- package/src/ui/utils/__tests__/sessionExport.test.ts +174 -0
- package/src/ui/utils/__tests__/symbolication.test.ts +207 -0
- package/src/ui/utils/__tests__/timelineModel.test.ts +170 -0
- package/src/ui/utils/download.ts +161 -0
- package/src/ui/utils/hex.ts +59 -0
- package/src/ui/utils/initiator.ts +136 -0
- package/src/ui/utils/requestFilters.ts +183 -0
- package/src/ui/utils/sessionExport.ts +185 -0
- package/src/ui/utils/symbolication.ts +248 -0
- package/src/ui/utils/timelineModel.ts +352 -0
- package/src/ui/views/InspectorView.tsx +43 -8
- package/src/utils/__tests__/getContentTypeMimeType.test.ts +34 -0
- package/src/utils/getContentTypeMimeType.ts +14 -0
- package/vite.config.ts +5 -1
- package/vitest.setup.ts +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @rozenite/network-activity-plugin
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#270](https://github.com/callstackincubator/rozenite/pull/270) [`5dea81e`](https://github.com/callstackincubator/rozenite/commit/5dea81e4139aae51ef01b4db0aacdc66c8fb039c) Thanks [@draggie](https://github.com/draggie)! - Add a timeline view to Network Activity that shows requests as a waterfall. Drag a range on the timeline to filter the request list.
|
|
8
|
+
|
|
9
|
+
- [#272](https://github.com/callstackincubator/rozenite/pull/272) [`32d4ea3`](https://github.com/callstackincubator/rozenite/commit/32d4ea34b12b2c1adcc7d24698086bd492825935) Thanks [@draggie](https://github.com/draggie)! - Add a toolbar export button that downloads the current network activity session as a JSON file.
|
|
10
|
+
|
|
11
|
+
The export includes HTTP requests, WebSocket connections, SSE streams, and realtime messages captured during the session, along with a summary (entry counts by type) and metadata (`schemaVersion`, `exportedAt`).
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies []:
|
|
16
|
+
- @rozenite/agent-bridge@1.11.0
|
|
17
|
+
- @rozenite/agent-shared@1.11.0
|
|
18
|
+
- @rozenite/plugin-bridge@1.11.0
|
|
19
|
+
|
|
20
|
+
## 1.10.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- [#271](https://github.com/callstackincubator/rozenite/pull/271) [`3a77ccf`](https://github.com/callstackincubator/rozenite/commit/3a77ccfce710a45c674c7cd05ca9a7f6aa422f4f) Thanks [@burczu](https://github.com/burczu)! - Image responses now render inline in the Network Activity panel. PNG, JPEG, GIF, WebP, and SVG show up as previews under a new Preview/Raw sub-tab. The Raw tab shows Content-Type and decoded size; for SVG, the Raw tab shows the source XML. Image responses above an in-capture 5 MB cap show a "Response too large for preview" message instead of crossing the bridge.
|
|
25
|
+
|
|
26
|
+
Adds a Preview/Raw axis that subsequent response-viewer improvements (rendered HTML, formatted XML, JSON Raw, ...) will extend. The toggle is adaptive — hidden for formats with only one meaningful view. The user's last toggle choice sticks across responses within a panel session.
|
|
27
|
+
|
|
28
|
+
The `response-body` bridge event's wire shape is extended additively to a discriminated union (`string | { kind: 'binary'; base64 } | { kind: 'binary-too-large'; size } | null`). Existing consumers that only handle the string variant continue to work unchanged.
|
|
29
|
+
|
|
30
|
+
- [#266](https://github.com/callstackincubator/rozenite/pull/266) [`3adbe11`](https://github.com/callstackincubator/rozenite/commit/3adbe117d38b00455b864a60bdc86b3cd151cbab) Thanks [@draggie](https://github.com/draggie)! - Add advanced request filters to Network Activity.
|
|
31
|
+
|
|
32
|
+
- [#263](https://github.com/callstackincubator/rozenite/pull/263) [`340b779`](https://github.com/callstackincubator/rozenite/commit/340b779c43b43702959dd9a29ed77041b73b970c) Thanks [@draggie](https://github.com/draggie)! - Show source-mapped request initiator details in Network Activity.
|
|
33
|
+
|
|
34
|
+
- [#274](https://github.com/callstackincubator/rozenite/pull/274) [`032ff3e`](https://github.com/callstackincubator/rozenite/commit/032ff3eb9795c7cb0c747d52b73d341a2871185e) Thanks [@burczu](https://github.com/burczu)! - Non-image binary responses now render with a metadata card + virtualized hex viewer, replacing the "Binary content not shown" placeholder. PDFs, fonts, audio, video, archives, and `application/octet-stream` payloads show their bytes in the classic offset / hex / ASCII layout, with a Download button on the metadata card that saves the file using a sensibly-derived name (`Content-Disposition` filename → URL last segment → `response.<ext>` from a small content-type map).
|
|
35
|
+
|
|
36
|
+
Image responses get the same upgrade in their Raw tab — was metadata-only, now metadata + hex view + Download.
|
|
37
|
+
|
|
38
|
+
The `getResponseBody` capture widens to cover everything that isn't text: arraybuffer responses and non-text non-image blobs now arrive at the panel as base64-encoded binary via the existing wire union, with chunked encoding so large payloads don't blow up `String.fromCharCode`. The 5 MB cap continues to apply uniformly; oversized responses surface as "Response too large for preview" with the Download button disabled.
|
|
39
|
+
|
|
40
|
+
Post-this-release invariant: `body === null` on the wire means only "the plugin could not read the body at all" — every other shape arrives as a typed variant of the discriminated union.
|
|
41
|
+
|
|
42
|
+
- [#279](https://github.com/callstackincubator/rozenite/pull/279) [`571d273`](https://github.com/callstackincubator/rozenite/commit/571d2730a570016c60b018f7523945aaee03e15a) Thanks [@burczu](https://github.com/burczu)! - Virtualize large code blocks in the Network Activity panel.
|
|
43
|
+
|
|
44
|
+
Text response bodies above 50,000 characters now render inside a virtualized 500 px scrollable window instead of an unbounded `<pre>` element. Smaller bodies and tree views (JSON, XML) are unaffected. This keeps the panel snappy on multi-megabyte responses (pretty-printed JSON, minified bundles served as text, large logs) without truncating any content.
|
|
45
|
+
|
|
46
|
+
- [#275](https://github.com/callstackincubator/rozenite/pull/275) [`c18dc0f`](https://github.com/callstackincubator/rozenite/commit/c18dc0fb335f4fc472b8392f5e6af72e658edde6) Thanks [@burczu](https://github.com/burczu)! - Render HTML responses in the Network Activity panel via a sandboxed iframe. The Preview tab shows the page with `sandbox=""` (scripts blocked) and a Content-Security-Policy that disallows external subresources (no outbound requests to images, stylesheets, or fonts referenced by the captured HTML). The Raw tab shows the HTML source.
|
|
47
|
+
|
|
48
|
+
- [#277](https://github.com/callstackincubator/rozenite/pull/277) [`e82fa22`](https://github.com/callstackincubator/rozenite/commit/e82fa2201d6e68c0e300a08c2bc49b640aa6fd69) Thanks [@burczu](https://github.com/burczu)! - Render XML responses in the Network Activity panel and add a Raw view to JSON responses.
|
|
49
|
+
|
|
50
|
+
XML responses (`application/xml`, `text/xml`, and RFC 7303 composite types like `application/atom+xml`, `application/rss+xml`, `application/soap+xml`, `application/xhtml+xml`, ...) now render as a collapsible tree with copy affordances on elements, text, and CDATA values in the Preview tab; the Raw tab shows the XML source verbatim. Malformed XML falls back to source with a warning. The capture path was also extended so `application/xml` and `+xml` composite bodies actually reach the panel — previously they were dropped on the wire.
|
|
51
|
+
|
|
52
|
+
JSON responses gain a Preview/Raw toggle: Preview keeps the existing tree, Raw shows the body pretty-printed with 2-space indent regardless of how the wire response was formatted, so minified JSON is readable without leaving the panel.
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- [#273](https://github.com/callstackincubator/rozenite/pull/273) [`60a157e`](https://github.com/callstackincubator/rozenite/commit/60a157e4eb3a2b894bafa50decc1e04eb8b19374) Thanks [@V3RON](https://github.com/V3RON)! - Resolve the optional `react-native-nitro-fetch` dependency before React Native finishes initializing so Metro 0.82 does not show an error overlay when the package is not installed.
|
|
57
|
+
|
|
58
|
+
- Updated dependencies []:
|
|
59
|
+
- @rozenite/agent-bridge@1.10.0
|
|
60
|
+
- @rozenite/agent-shared@1.10.0
|
|
61
|
+
- @rozenite/plugin-bridge@1.10.0
|
|
62
|
+
|
|
3
63
|
## 1.9.0
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|
package/dist/devtools/App.html
CHANGED
|
@@ -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-
|
|
26
|
-
<link rel="stylesheet" crossorigin href="../devtools/assets/App-
|
|
25
|
+
<script type="module" crossorigin src="../devtools/assets/App-CEESZAW_.js"></script>
|
|
26
|
+
<link rel="stylesheet" crossorigin href="../devtools/assets/App-xppYUJvX.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
29
29
|
<div id="root"></div>
|