@buoy-gg/network 7.0.39 → 7.0.41

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 (56) hide show
  1. package/README.md +6 -0
  2. package/lib/commonjs/index.js +7 -0
  3. package/lib/commonjs/network/components/NetworkListScreen.js +2 -3
  4. package/lib/commonjs/network/components/NetworkListScreen.web.js +2 -3
  5. package/lib/commonjs/network/components/NetworkModal.js +1 -1
  6. package/lib/commonjs/network/conditions/xhr.js +26 -1
  7. package/lib/commonjs/network/overrides/applyToXhr.js +99 -42
  8. package/lib/commonjs/network/overrides/matchRule.js +7 -1
  9. package/lib/commonjs/network/overrides/overriddenRows.js +37 -0
  10. package/lib/commonjs/network/overrides/resolveOverride.js +1 -1
  11. package/lib/commonjs/network/utils/networkEventStore.js +24 -6
  12. package/lib/commonjs/network/utils/networkListener.js +106 -11
  13. package/lib/commonjs/network/utils/networkSavedStore.js +4 -4
  14. package/lib/commonjs/network/utils/requestId.js +16 -0
  15. package/lib/commonjs/network/utils/resolveRequestUrl.js +15 -0
  16. package/lib/commonjs/network/utils/startNetworkCapture.js +24 -0
  17. package/lib/commonjs/preset.js +3 -12
  18. package/lib/module/index.js +1 -0
  19. package/lib/module/network/components/NetworkListScreen.js +2 -3
  20. package/lib/module/network/components/NetworkListScreen.web.js +2 -3
  21. package/lib/module/network/components/NetworkModal.js +1 -1
  22. package/lib/module/network/conditions/xhr.js +27 -2
  23. package/lib/module/network/overrides/applyToXhr.js +98 -42
  24. package/lib/module/network/overrides/matchRule.js +7 -1
  25. package/lib/module/network/overrides/overriddenRows.js +33 -0
  26. package/lib/module/network/overrides/resolveOverride.js +1 -1
  27. package/lib/module/network/utils/networkEventStore.js +25 -7
  28. package/lib/module/network/utils/networkListener.js +106 -12
  29. package/lib/module/network/utils/networkSavedStore.js +4 -4
  30. package/lib/module/network/utils/requestId.js +12 -0
  31. package/lib/module/network/utils/resolveRequestUrl.js +11 -0
  32. package/lib/module/network/utils/startNetworkCapture.js +21 -0
  33. package/lib/module/preset.js +3 -12
  34. package/lib/typescript/index.d.ts +1 -0
  35. package/lib/typescript/index.d.ts.map +1 -1
  36. package/lib/typescript/network/components/NetworkListScreen.d.ts.map +1 -1
  37. package/lib/typescript/network/components/NetworkListScreen.web.d.ts.map +1 -1
  38. package/lib/typescript/network/conditions/xhr.d.ts.map +1 -1
  39. package/lib/typescript/network/overrides/applyToXhr.d.ts +1 -0
  40. package/lib/typescript/network/overrides/applyToXhr.d.ts.map +1 -1
  41. package/lib/typescript/network/overrides/matchRule.d.ts.map +1 -1
  42. package/lib/typescript/network/overrides/overriddenRows.d.ts +16 -0
  43. package/lib/typescript/network/overrides/overriddenRows.d.ts.map +1 -0
  44. package/lib/typescript/network/utils/networkEventStore.d.ts.map +1 -1
  45. package/lib/typescript/network/utils/networkListener.d.ts +3 -4
  46. package/lib/typescript/network/utils/networkListener.d.ts.map +1 -1
  47. package/lib/typescript/network/utils/networkSavedStore.d.ts +4 -4
  48. package/lib/typescript/network/utils/requestId.d.ts +2 -0
  49. package/lib/typescript/network/utils/requestId.d.ts.map +1 -0
  50. package/lib/typescript/network/utils/resolveRequestUrl.d.ts +3 -0
  51. package/lib/typescript/network/utils/resolveRequestUrl.d.ts.map +1 -0
  52. package/lib/typescript/network/utils/startNetworkCapture.d.ts +6 -0
  53. package/lib/typescript/network/utils/startNetworkCapture.d.ts.map +1 -0
  54. package/lib/typescript/preset.d.ts.map +1 -1
  55. package/lib/web/index.mjs +146 -0
  56. package/package.json +32 -10
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ import { resolveRequestUrl } from "./resolveRequestUrl";
4
+ import { nextRequestId } from "./requestId";
3
5
  import { runConditionXhr } from "../conditions/xhr";
4
6
  import { snapshotNetworkCondition } from "../conditions/store";
5
7
  import { throwIfAborted, waitBeforeDispatch } from "../conditions/wait";
@@ -9,10 +11,62 @@ import { throwIfAborted, waitBeforeDispatch } from "../conditions/wait";
9
11
  */
10
12
 
11
13
  import { overrideForRequest } from "../overrides/engine";
12
- import { runOverride } from "../overrides/applyToXhr";
14
+ import { runOverride, hasPendingStandardRequest } from "../overrides/applyToXhr";
13
15
  import { canSynthesizeResponse, synthesizeFetchError, synthesizeResponse } from "../overrides/applyToFetch";
14
16
  import { markForOutcome } from "../overrides/types";
15
17
  import { httpStatusText, xhrCompletionKind } from "./httpCompletion";
18
+ let devOrigin;
19
+
20
+ /**
21
+ * Headers another Buoy tool adds to a request inside our wrapper.
22
+ *
23
+ * Impersonate patches fetch/XHR at boot, so this listener usually wraps it
24
+ * and records the request before the impersonation header is added. The
25
+ * request on the wire carried the header and the Network row did not. Tools
26
+ * that add headers register a function here, keyed by URL, so the row shows
27
+ * what was actually sent.
28
+ */
29
+ function injectedHeaders(url) {
30
+ const injectors = globalThis.__buoyHeaderInjectors;
31
+ if (!injectors || injectors.length === 0) return undefined;
32
+ let out;
33
+ for (const inject of injectors) {
34
+ try {
35
+ const h = inject(url);
36
+ if (h) out = {
37
+ ...out,
38
+ ...h
39
+ };
40
+ } catch {
41
+ /* a broken injector must not break capture */
42
+ }
43
+ }
44
+ return out;
45
+ }
46
+
47
+ /**
48
+ * Origin of the Metro dev server this JS bundle was loaded from, read once from
49
+ * the bundle URL React Native reports. `null` in release builds (the bundle is
50
+ * a file) and anywhere react-native isn't present.
51
+ */
52
+ function devServerOrigin() {
53
+ if (devOrigin !== undefined) return devOrigin;
54
+ devOrigin = null;
55
+ try {
56
+ if (typeof __DEV__ !== "undefined" && !__DEV__) return devOrigin;
57
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
58
+ const rn = require("react-native");
59
+ const sc = rn?.NativeModules?.SourceCode;
60
+ const url = sc?.getConstants?.().scriptURL ?? sc?.scriptURL;
61
+ if (typeof url === "string" && /^https?:\/\//.test(url)) {
62
+ const u = new URL(url);
63
+ devOrigin = `${u.protocol}//${u.host}`;
64
+ }
65
+ } catch {
66
+ devOrigin = null;
67
+ }
68
+ return devOrigin;
69
+ }
16
70
 
17
71
  /**
18
72
  * True only while `originalFetch` is being CALLED (not awaited).
@@ -119,7 +173,6 @@ function isInternalBuoyHost(url) {
119
173
  class NetworkListener {
120
174
  listeners = [];
121
175
  isListening = false;
122
- requestCounter = 1000;
123
176
 
124
177
  // Store original methods
125
178
 
@@ -163,8 +216,15 @@ class NetworkListener {
163
216
  try {
164
217
  const parsed = new URL(url);
165
218
  if (parsed.hostname === "keygen.sh" || parsed.hostname.endsWith(".keygen.sh")) return true;
219
+ // Buoy's own license endpoint (7.0.39+): the same traffic, new address.
220
+ if ((parsed.hostname === "buoy.gg" || parsed.hostname === "www.buoy.gg") && parsed.pathname.startsWith("/api/license")) return true;
166
221
  const local = parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "10.0.2.2";
167
222
  if (local && ["8081", "8802"].includes(parsed.port)) return true;
223
+ // The dev server this bundle actually came from, whatever its host and
224
+ // port (a LAN address, --port 8082…): Metro's own traffic — symbolicate,
225
+ // logs, HMR, the bundle — is not the app's.
226
+ const dev = devServerOrigin();
227
+ if (dev && `${parsed.protocol}//${parsed.host}` === dev) return true;
168
228
  } catch {
169
229
  return false;
170
230
  }
@@ -620,7 +680,7 @@ class NetworkListener {
620
680
  this.originalFetch = globalThis.fetch;
621
681
  const generation = ++this.fetchGeneration;
622
682
  const wrappedFetch = async (input, init) => {
623
- const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
683
+ const url = resolveRequestUrl(typeof input === "string" ? input : input instanceof URL ? input.href : input.url);
624
684
 
625
685
  // A newer install supersedes this wrapper. If it is still stranded in
626
686
  // another tool's chain it must pass through silently, or one request
@@ -634,7 +694,7 @@ class NetworkListener {
634
694
  return passthroughFetch(input, init);
635
695
  }
636
696
  const startTime = Date.now();
637
- const requestId = `fetch_${++self.requestCounter}`;
697
+ const requestId = nextRequestId("fetch");
638
698
  const inputRequest = typeof input === "object" && "method" in input ? input : undefined;
639
699
  const method = init?.method ?? inputRequest?.method ?? "GET";
640
700
  const signal = init?.signal !== undefined ? init.signal : inputRequest?.signal;
@@ -658,9 +718,12 @@ class NetworkListener {
658
718
  requestHeaders[key] = value;
659
719
  });
660
720
  } else {
661
- requestHeaders = headers;
721
+ requestHeaders = {
722
+ ...headers
723
+ };
662
724
  }
663
725
  }
726
+ Object.assign(requestHeaders, injectedHeaders(url));
664
727
 
665
728
  // Parse request body
666
729
  // Explicitly typed: the late emit for a streamed reply reads this from
@@ -709,6 +772,35 @@ class NetworkListener {
709
772
  override,
710
773
  condition
711
774
  });
775
+
776
+ // Clone before dispatch; inspect the body without delaying or consuming the app's upload.
777
+ if (init?.body === undefined && inputRequest?.body && !inputRequest.bodyUsed) {
778
+ try {
779
+ const bodyCopy = inputRequest.clone();
780
+ void self.readStreamedBody(bodyCopy).then(({
781
+ body
782
+ }) => {
783
+ try {
784
+ requestData = JSON.parse(body);
785
+ } catch {
786
+ requestData = body;
787
+ }
788
+ self.emit({
789
+ type: "request-body",
790
+ timestamp: new Date(),
791
+ request: {
792
+ id: requestId || "unknown",
793
+ url: cleanUrl,
794
+ method,
795
+ data: requestData,
796
+ client: clientType
797
+ }
798
+ });
799
+ }).catch(() => {});
800
+ } catch {
801
+ // An unreadable body must not prevent the app's request.
802
+ }
803
+ }
712
804
  try {
713
805
  if (condition || outcome) await waitBeforeDispatch((condition?.delayMs ?? 0) + (outcome?.delayMs ?? 0), signal);
714
806
  throwIfAborted(signal);
@@ -907,9 +999,9 @@ class NetworkListener {
907
999
  if (generation === self.xhrGeneration) {
908
1000
  pendingCapture.get(this)?.();
909
1001
  const xhr = this;
910
- xhr._buoyRequestId = `xhr_${++self.requestCounter}`;
1002
+ xhr._buoyRequestId = nextRequestId("xhr");
911
1003
  xhr._method = method;
912
- xhr._url = url;
1004
+ xhr._url = resolveRequestUrl(url);
913
1005
  xhr._buoyStartTime = Date.now();
914
1006
  xhr._requestHeaders = {};
915
1007
  }
@@ -931,6 +1023,7 @@ class NetworkListener {
931
1023
  if (generation !== self.xhrGeneration || insideFetchHandoff) {
932
1024
  return passthroughSend.call(this, data);
933
1025
  }
1026
+ if (hasPendingStandardRequest(this)) throw new DOMException("The request has already been sent.", "InvalidStateError");
934
1027
  if (this.readyState !== 1 || this._sent) {
935
1028
  return passthroughSend.call(this, data);
936
1029
  }
@@ -942,6 +1035,7 @@ class NetworkListener {
942
1035
  xhr._buoyStartTime = startTime;
943
1036
  xhr._buoyTtfb = undefined;
944
1037
  const requestHeaders = xhr._requestHeaders || {};
1038
+ Object.assign(requestHeaders, injectedHeaders(url));
945
1039
 
946
1040
  // Skip ignored URLs
947
1041
  if (self.shouldIgnoreUrl(url)) {
@@ -1203,7 +1297,7 @@ export const startNetworkListener = () => getNetworkListener().startListening();
1203
1297
  /**
1204
1298
  * Stop network traffic monitoring
1205
1299
  */
1206
- export const stopNetworkListener = () => getNetworkListener().stopListening();
1300
+ export const stopNetworkListener = () => _networkListener?.stopListening();
1207
1301
 
1208
1302
  /**
1209
1303
  * Add a listener for network events
@@ -1226,25 +1320,25 @@ export const addNetworkListener = listener => getNetworkListener().addListener(l
1226
1320
  /**
1227
1321
  * Remove all registered network event listeners
1228
1322
  */
1229
- export const removeAllNetworkListeners = () => getNetworkListener().removeAllListeners();
1323
+ export const removeAllNetworkListeners = () => _networkListener?.removeAllListeners();
1230
1324
 
1231
1325
  /**
1232
1326
  * Check if network monitoring is currently active
1233
1327
  *
1234
1328
  * @returns True if currently intercepting network traffic
1235
1329
  */
1236
- export const isNetworkListening = () => getNetworkListener().isActive;
1330
+ export const isNetworkListening = () => _networkListener?.isActive ?? false;
1237
1331
 
1238
1332
  /**
1239
1333
  * Get the number of registered network event listeners
1240
1334
  *
1241
1335
  * @returns Number of active listeners
1242
1336
  */
1243
- export const getNetworkListenerCount = () => getNetworkListener().listenerCount;
1337
+ export const getNetworkListenerCount = () => _networkListener?.listenerCount ?? 0;
1244
1338
 
1245
1339
  /**
1246
1340
  * Whether both interceptors are actually reachable through the live global
1247
1341
  * chain — the honest version of `isNetworkListening` (whose flag stays true
1248
1342
  * even after another tool re-assigns `globalThis.fetch` over the wrapper).
1249
1343
  */
1250
- export const isNetworkInterceptionLive = () => getNetworkListener().isInterceptionLive();
1344
+ export const isNetworkInterceptionLive = () => _networkListener?.isInterceptionLive() ?? false;
@@ -15,10 +15,10 @@
15
15
  * A record exists while either flag is true and is dropped when both go false,
16
16
  * so all four states fall out without special cases.
17
17
  *
18
- * IDENTITY WARNING: `networkListener` mints request IDs from a per-runtime
19
- * counter (`fetch_1`, `xhr_2`), so after an app reload `fetch_1` is a
20
- * DIFFERENT request. Records are therefore keyed on a generated `key`, carry
21
- * the `sessionId` that captured them, and only trust `liveId` while that
18
+ * Request IDs include a runtime session and a counter. Saved records also
19
+ * track their owning session because live rows disappear on app reload.
20
+ * Records use a generated `key`, carry the `sessionId` that captured them,
21
+ * and only trust `liveId` while that
22
22
  * session is the current one. Snapshots restored from an earlier session get
23
23
  * their event `id` rewritten to `saved:<key>` so a restored pin can never
24
24
  * resolve to (or dedupe against) an unrelated live request.
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ const runtime = globalThis;
4
+
5
+ // Keep identity across Fast Refresh; distinguish requests from earlier app runs.
6
+ export function nextRequestId(client) {
7
+ const sequence = runtime.__BUOY_NETWORK_REQUEST_SEQUENCE__ ??= {
8
+ session: `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`,
9
+ next: 0
10
+ };
11
+ return `${client}_${sequence.session}_${++sequence.next}`;
12
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ /** Resolve browser-relative URLs for capture without changing the request arguments. */
4
+ export function resolveRequestUrl(url) {
5
+ if (typeof document === "undefined") return url;
6
+ try {
7
+ return new URL(url, document.baseURI).href;
8
+ } catch {
9
+ return url;
10
+ }
11
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ import { networkEventStore } from "./networkEventStore";
4
+ import { overrideRulesStore } from "../overrides/overrideRulesStore";
5
+
6
+ /**
7
+ * Keep local capture active while the Network panel is closed.
8
+ * Call in the app being inspected and dispose during unmount or HMR cleanup.
9
+ */
10
+ export function startNetworkCapture() {
11
+ const native = typeof navigator !== "undefined" && navigator.product === "ReactNative";
12
+ if (!native && (typeof window === "undefined" || typeof document === "undefined")) return () => {};
13
+ void overrideRulesStore.ensureLoaded();
14
+ const unsubscribe = networkEventStore.subscribeToEvents(() => {});
15
+ let stopped = false;
16
+ return () => {
17
+ if (stopped) return;
18
+ stopped = true;
19
+ unsubscribe();
20
+ };
21
+ }
@@ -23,18 +23,6 @@ import { NetworkModal } from "./network/components/NetworkModal";
23
23
  import { overrideRulesStore } from "./network/overrides/overrideRulesStore";
24
24
  import { networkEventStore } from "./network/utils/networkEventStore";
25
25
 
26
- /**
27
- * Load persisted response-override rules as soon as the tool is registered.
28
- *
29
- * Deliberately at import time rather than when the Network modal mounts: an
30
- * override has to fire from app boot, with the tool closed and nothing
31
- * capturing — that is the whole point of persisting rules ("force this endpoint
32
- * to 500, then restart and watch the boot path"). Hydrating also re-installs
33
- * the interceptor if any rule is still active. One storage read, dev-only.
34
- */
35
- import { jsx as _jsx } from "react/jsx-runtime";
36
- void overrideRulesStore.ensureLoaded();
37
-
38
26
  /**
39
27
  * Install interception at IMPORT time and buffer boot traffic.
40
28
  *
@@ -51,7 +39,10 @@ void overrideRulesStore.ensureLoaded();
51
39
  * never intercept their OWN process's traffic.
52
40
  * - Dev-only, like the rest of the automatic capture behavior.
53
41
  */
42
+ import { jsx as _jsx } from "react/jsx-runtime";
54
43
  const isReactNativeRuntime = typeof navigator !== "undefined" && navigator.product === "ReactNative";
44
+ // Browser capture initializes persisted rules explicitly through startNetworkCapture.
45
+ if (isReactNativeRuntime) void overrideRulesStore.ensureLoaded();
55
46
  if (isReactNativeRuntime && typeof __DEV__ !== "undefined" && __DEV__) {
56
47
  networkEventStore.startBootCapture();
57
48
  }
@@ -8,6 +8,7 @@
8
8
  * bypassing the tool's intended usage patterns.
9
9
  */
10
10
  export { networkToolPreset, createNetworkTool } from "./preset";
11
+ export { startNetworkCapture } from "./network/utils/startNetworkCapture";
11
12
  export { NetworkModal, NetworkToolView } from "./network/components/NetworkModal";
12
13
  export type { NetworkToolViewProps } from "./network/components/NetworkModal";
13
14
  export { NetworkEventDetailView } from "./network/components/NetworkEventDetailView";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAOhE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAClF,YAAY,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,wCAAwC,CAAC;AAKhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAIpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAI9E,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAIhF,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,qBAAqB,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAKt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AkB,EAClB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACtI,YAAY,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkListScreen.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkListScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAML,KAAK,cAAc,EAKpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA6I5D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,YAAY,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,EACf,KAAK,EACL,UAAU,EACV,YAAY,EACZ,cAAc,GACf,EAAE,sBAAsB,sCAsLxB"}
1
+ {"version":3,"file":"NetworkListScreen.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkListScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAML,KAAK,cAAc,EAKpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA6I5D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,YAAY,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,EACf,KAAK,EACL,UAAU,EACV,YAAY,EACZ,cAAc,GACf,EAAE,sBAAsB,sCAgLxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkListScreen.web.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkListScreen.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA8Q5D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,YAAY,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,EACf,KAAK,EACL,UAAU,EACV,YAAY,EACZ,cAAc,GACf,EAAE,sBAAsB,sCA8HxB"}
1
+ {"version":3,"file":"NetworkListScreen.web.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkListScreen.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA8Q5D,UAAU,sBAAsB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,YAAY,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,EACf,KAAK,EACL,UAAU,EACV,YAAY,EACZ,cAAc,GACf,EAAE,sBAAsB,sCAwHxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../../src/network/conditions/xhr.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAYrD,gFAAgF;AAChF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,qBAAqB,EAChC,OAAO,EAAE,eAAe,GAAG,IAAI,EAC/B,QAAQ,EAAE,MAAM,IAAI,GACnB,IAAI,CAiFN"}
1
+ {"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../../src/network/conditions/xhr.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAYrD,gFAAgF;AAChF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,qBAAqB,EAChC,OAAO,EAAE,eAAe,GAAG,IAAI,EAC/B,QAAQ,EAAE,MAAM,IAAI,GACnB,IAAI,CAyFN"}
@@ -57,6 +57,7 @@ export declare function canSynthesize(xhr: XMLHttpRequest): boolean;
57
57
  * rules out half-mocks that could take the branch and then leak listeners.
58
58
  */
59
59
  export declare function canSynthesizeStandard(xhr: XMLHttpRequest): boolean;
60
+ export declare function hasPendingStandardRequest(xhr: XMLHttpRequest): boolean;
60
61
  /**
61
62
  * Apply an outcome to a request that has NOT been sent yet.
62
63
  *
@@ -1 +1 @@
1
- {"version":3,"file":"applyToXhr.d.ts","sourceRoot":"","sources":["../../../../src/network/overrides/applyToXhr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkC/C;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAM1D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAMlE;AAwUD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,MAAM,IAAI,GACtB,OAAO,CAmET;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI,CAGvG"}
1
+ {"version":3,"file":"applyToXhr.d.ts","sourceRoot":"","sources":["../../../../src/network/overrides/applyToXhr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkC/C;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAM1D;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAMlE;AAqQD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAEtE;AAqGD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,MAAM,IAAI,GACtB,OAAO,CAmET;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI,CAGvG"}
@@ -1 +1 @@
1
- {"version":3,"file":"matchRule.d.ts","sourceRoot":"","sources":["../../../../src/network/overrides/matchRule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAU5C;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUnD;AAWD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAatD;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CACzB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb,OAAO,CAWT"}
1
+ {"version":3,"file":"matchRule.d.ts","sourceRoot":"","sources":["../../../../src/network/overrides/matchRule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAU5C;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAUnD;AAWD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmBtD;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CACzB,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,GACb,OAAO,CAWT"}
@@ -0,0 +1,16 @@
1
+ import type { NetworkEvent } from "../types";
2
+ import type { OverrideRule } from "./types";
3
+ /**
4
+ * Which captured requests belong in the list's OVERRIDDEN strip.
5
+ *
6
+ * A row belongs there when an active rule actually changed it (it carries the
7
+ * rule's override mark) or matched it after the rule existed (while overrides
8
+ * are paused those pass through, and the strip is how you find the rule again).
9
+ * Before a rule existed nothing overrode anything, so older matching requests
10
+ * are real server responses and stay in the list, with one exception: the
11
+ * newest of them, which is the request the rule was built from. That one hoists
12
+ * right away, so creating a rule shows where it points without waiting for the
13
+ * endpoint to be called again.
14
+ */
15
+ export declare function overriddenEvents(events: NetworkEvent[], activeRules: OverrideRule[]): NetworkEvent[];
16
+ //# sourceMappingURL=overriddenRows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overriddenRows.d.ts","sourceRoot":"","sources":["../../../../src/network/overrides/overriddenRows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAkBpG"}
@@ -1 +1 @@
1
- {"version":3,"file":"networkEventStore.d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,CAAS;;IAS3B;;;;;;;;;;;;;;;;OAgBG;IACH,gBAAgB,IAAI,IAAI;IAexB,4EAA4E;IAC5E,OAAO,CAAC,cAAc;IAUtB;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,IAAI;IAuBhC;;OAEG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAc/B;;;;;OAKG;IACH,cAAc,IAAI,IAAI;IAStB;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;;;;;;OAOG;IACH,kBAAkB,IAAI,IAAI;IAK1B;;;;;;OAMG;IACH,iBAAiB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI;IAMzE;;OAEG;IACH,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAmHjD,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,WAAW;IAUnB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIlD;;OAEG;IACH,WAAW,IAAI,IAAI;IAKnB;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,oBAAoB,EAAE,cAAc,UAAO,GAAG,MAAM,IAAI;IAkB1E,QAAQ;;;;;;;;;IAuCR,YAAY,CAAC,MAAM,EAAE;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;QACzC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GAAG,YAAY,EAAE;CAyCnB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,mBAA0B,CAAC"}
@@ -6,7 +6,7 @@ import { type NetworkConditionStamp } from "../conditions/store";
6
6
  import type { NetworkTimings } from "../types";
7
7
  import { type NetworkOverrideMark } from "../overrides/types";
8
8
  export interface NetworkingEvent {
9
- type: "request" | "response" | "error";
9
+ type: "request" | "request-body" | "response" | "error";
10
10
  timestamp: Date;
11
11
  /** Total: request start → body fully received. */
12
12
  duration?: number;
@@ -52,7 +52,6 @@ export declare const BUOY_XHR_INTERCEPTOR_FLAG = "__buoyNetworkXhrIntercepted";
52
52
  declare class NetworkListener {
53
53
  private listeners;
54
54
  private isListening;
55
- private requestCounter;
56
55
  private originalFetch;
57
56
  private originalXHROpen;
58
57
  private originalXHRSend;
@@ -194,7 +193,7 @@ export declare const startNetworkListener: () => void;
194
193
  /**
195
194
  * Stop network traffic monitoring
196
195
  */
197
- export declare const stopNetworkListener: () => void;
196
+ export declare const stopNetworkListener: () => void | undefined;
198
197
  /**
199
198
  * Add a listener for network events
200
199
  *
@@ -215,7 +214,7 @@ export declare const addNetworkListener: (listener: NetworkingEventListener) =>
215
214
  /**
216
215
  * Remove all registered network event listeners
217
216
  */
218
- export declare const removeAllNetworkListeners: () => void;
217
+ export declare const removeAllNetworkListeners: () => void | undefined;
219
218
  /**
220
219
  * Check if network monitoring is currently active
221
220
  *
@@ -1 +1 @@
1
- {"version":3,"file":"networkListener.d.ts","sourceRoot":"","sources":["../../../../src/network/utils/networkListener.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE3F;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQ/C,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AA+B9E,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;IACvC,SAAS,EAAE,IAAI,CAAC;IAChB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAA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6EAA6E;IAC7E,OAAO,CAAC,qBAAqB;IAsP7B;;;;;OAKG;IACH,aAAa;IA+Cb;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,uBAAuB;IAa7C,kBAAkB;IAKlB,IAAI,QAAQ,YAEX;IAGD,IAAI,aAAa,WAEhB;CACF;AAsBD;;;;GAIG;AACH,eAAO,MAAM,eAAe,uBAAqB,CAAC;AAElD;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,YAA8C,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,mBAAmB,wBAA0C,CAAC;AAE3E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,uBAAuB,eACxB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,yBAAyB,wBACE,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,eAA4C,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,cAA6C,CAAC;AAElF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,eACW,CAAC"}
@@ -13,10 +13,10 @@
13
13
  * A record exists while either flag is true and is dropped when both go false,
14
14
  * so all four states fall out without special cases.
15
15
  *
16
- * IDENTITY WARNING: `networkListener` mints request IDs from a per-runtime
17
- * counter (`fetch_1`, `xhr_2`), so after an app reload `fetch_1` is a
18
- * DIFFERENT request. Records are therefore keyed on a generated `key`, carry
19
- * the `sessionId` that captured them, and only trust `liveId` while that
16
+ * Request IDs include a runtime session and a counter. Saved records also
17
+ * track their owning session because live rows disappear on app reload.
18
+ * Records use a generated `key`, carry the `sessionId` that captured them,
19
+ * and only trust `liveId` while that
20
20
  * session is the current one. Snapshots restored from an earlier session get
21
21
  * their event `id` rewritten to `saved:<key>` so a restored pin can never
22
22
  * resolve to (or dedupe against) an unrelated live request.
@@ -0,0 +1,2 @@
1
+ export declare function nextRequestId(client: "fetch" | "xhr"): string;
2
+ //# sourceMappingURL=requestId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestId.d.ts","sourceRoot":"","sources":["../../../../src/network/utils/requestId.ts"],"names":[],"mappings":"AAOA,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAM7D"}
@@ -0,0 +1,3 @@
1
+ /** Resolve browser-relative URLs for capture without changing the request arguments. */
2
+ export declare function resolveRequestUrl(url: string): string;
3
+ //# sourceMappingURL=resolveRequestUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveRequestUrl.d.ts","sourceRoot":"","sources":["../../../../src/network/utils/resolveRequestUrl.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIrD"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Keep local capture active while the Network panel is closed.
3
+ * Call in the app being inspected and dispose during unmount or HMR cleanup.
4
+ */
5
+ export declare function startNetworkCapture(): () => void;
6
+ //# sourceMappingURL=startNetworkCapture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"startNetworkCapture.d.ts","sourceRoot":"","sources":["../../../../src/network/utils/startNetworkCapture.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,IAAI,CAWhD"}
@@ -1 +1 @@
1
- {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAqCjE;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;qBAKX;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAKjC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB;IAG1B,qCAAqC;kCACP,OAAO;;;;;;qBA1BtB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CA8BlC,CAAC"}
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AA4BjE;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;qBAKX;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CAKjC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB;IAG1B,qCAAqC;kCACP,OAAO;;;;;;qBA1BtB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;CA8BlC,CAAC"}