@buoy-gg/network 7.0.25 → 7.0.27
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/lib/commonjs/network/components/NetworkDetailStepper.js +2 -1
- package/lib/commonjs/network/components/NetworkEventDetailView.js +74 -72
- package/lib/commonjs/network/components/NetworkEventItemCompact.js +24 -20
- package/lib/commonjs/network/components/NetworkEventItemCompact.web.js +24 -6
- package/lib/commonjs/network/components/NetworkFilterViewV3.js +12 -12
- package/lib/commonjs/network/components/NetworkHeaderLive.js +25 -29
- package/lib/commonjs/network/components/NetworkHeaderLive.web.js +24 -6
- package/lib/commonjs/network/components/NetworkHeaderMenu.js +10 -9
- package/lib/commonjs/network/components/NetworkListScreen.js +2 -1
- package/lib/commonjs/network/components/NetworkListScreen.web.js +24 -6
- package/lib/commonjs/network/components/NetworkModal.js +45 -31
- package/lib/commonjs/network/components/NetworkOverrideHeaderButton.js +10 -7
- package/lib/commonjs/network/components/NetworkOverridesButton.js +7 -7
- package/lib/commonjs/network/sync/networkSyncAdapter.js +36 -16
- package/lib/commonjs/network/utils/networkEventStore.js +26 -0
- package/lib/commonjs/network/utils/networkListener.js +173 -39
- package/lib/module/network/components/NetworkDetailStepper.js +2 -1
- package/lib/module/network/components/NetworkEventDetailView.js +75 -73
- package/lib/module/network/components/NetworkEventItemCompact.js +25 -21
- package/lib/module/network/components/NetworkEventItemCompact.web.js +24 -6
- package/lib/module/network/components/NetworkFilterViewV3.js +13 -13
- package/lib/module/network/components/NetworkHeaderLive.js +26 -30
- package/lib/module/network/components/NetworkHeaderLive.web.js +24 -6
- package/lib/module/network/components/NetworkHeaderMenu.js +11 -10
- package/lib/module/network/components/NetworkListScreen.js +3 -2
- package/lib/module/network/components/NetworkListScreen.web.js +24 -6
- package/lib/module/network/components/NetworkModal.js +46 -32
- package/lib/module/network/components/NetworkOverrideHeaderButton.js +11 -8
- package/lib/module/network/components/NetworkOverridesButton.js +8 -8
- package/lib/module/network/sync/networkSyncAdapter.js +37 -17
- package/lib/module/network/utils/networkEventStore.js +26 -0
- package/lib/module/network/utils/networkListener.js +171 -38
- package/lib/typescript/network/components/NetworkDetailStepper.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventDetailView.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventItemCompact.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkEventItemCompact.web.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkFilterViewV3.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkHeaderLive.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkHeaderLive.web.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkListScreen.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkListScreen.web.d.ts.map +1 -1
- package/lib/typescript/network/components/NetworkModal.d.ts.map +1 -1
- package/lib/typescript/network/sync/networkSyncAdapter.d.ts +1 -0
- package/lib/typescript/network/sync/networkSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/network/utils/networkEventStore.d.ts +17 -0
- package/lib/typescript/network/utils/networkEventStore.d.ts.map +1 -1
- package/lib/typescript/network/utils/networkListener.d.ts +61 -5
- package/lib/typescript/network/utils/networkListener.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -28,6 +28,18 @@ let insideOverriddenFetch = false;
|
|
|
28
28
|
|
|
29
29
|
// Event types for network operations
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Markers stamped on the installed interceptor functions so their presence in
|
|
33
|
+
* the live chain stays detectable even after another tool wraps them.
|
|
34
|
+
* Cooperating patchers (@buoy-gg/impersonate) copy every `__buoy*` marker from
|
|
35
|
+
* the function they wrap onto their own wrapper; a global fetch/XHR WITHOUT
|
|
36
|
+
* the marker therefore means our interceptor was clobbered — some runtime
|
|
37
|
+
* re-assigned `globalThis.fetch` over it (Expo's winter runtime, React Native
|
|
38
|
+
* DevTools' network panel, a second dev server's tooling, hot-reload churn all
|
|
39
|
+
* do this in the wild) — and capture must re-install. See startListening.
|
|
40
|
+
*/
|
|
41
|
+
export const BUOY_FETCH_INTERCEPTOR_FLAG = "__buoyNetworkFetchIntercepted";
|
|
42
|
+
export const BUOY_XHR_INTERCEPTOR_FLAG = "__buoyNetworkXhrIntercepted";
|
|
31
43
|
/**
|
|
32
44
|
* Network traffic interceptor for React Native applications
|
|
33
45
|
*
|
|
@@ -68,6 +80,25 @@ class NetworkListener {
|
|
|
68
80
|
|
|
69
81
|
// Store original methods
|
|
70
82
|
|
|
83
|
+
/**
|
|
84
|
+
* The wrappers currently installed by THIS instance, for identity checks:
|
|
85
|
+
* `stopListening` restores a global only when it is still literally ours —
|
|
86
|
+
* assigning our saved original over someone who patched after us would wipe
|
|
87
|
+
* their interceptor exactly the way this class gets wiped (see below).
|
|
88
|
+
*/
|
|
89
|
+
patchedFetch = null;
|
|
90
|
+
patchedXHROpen = null;
|
|
91
|
+
patchedXHRSend = null;
|
|
92
|
+
patchedXHRSetRequestHeader = null;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Bumped on every (re)install and on stop. Each wrapper closes over the
|
|
96
|
+
* generation it was born with and goes silent (pure pass-through — no emit,
|
|
97
|
+
* no counter bump) once a newer generation exists, so a wrapper stranded
|
|
98
|
+
* inside another tool's chain can never double-report a request.
|
|
99
|
+
*/
|
|
100
|
+
fetchGeneration = 0;
|
|
101
|
+
xhrGeneration = 0;
|
|
71
102
|
constructor() {
|
|
72
103
|
// Store original methods
|
|
73
104
|
this.originalFetch = globalThis.fetch.bind(globalThis);
|
|
@@ -405,30 +436,82 @@ class NetworkListener {
|
|
|
405
436
|
}
|
|
406
437
|
}
|
|
407
438
|
|
|
439
|
+
/** Is our fetch interceptor still reachable through the global chain? */
|
|
440
|
+
isFetchInterceptionLive() {
|
|
441
|
+
return globalThis.fetch[BUOY_FETCH_INTERCEPTOR_FLAG] === true;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/** Is our XHR interceptor still reachable through the prototype chain? */
|
|
445
|
+
isXhrInterceptionLive() {
|
|
446
|
+
return XMLHttpRequest.prototype.send[BUOY_XHR_INTERCEPTOR_FLAG] === true;
|
|
447
|
+
}
|
|
448
|
+
|
|
408
449
|
/**
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
|
|
450
|
+
* Both halves of the interceptor are reachable — requests actually flow
|
|
451
|
+
* through capture. `isListening` alone cannot promise that (see
|
|
452
|
+
* startListening); diagnostics should report THIS.
|
|
453
|
+
*/
|
|
454
|
+
isInterceptionLive() {
|
|
455
|
+
return this.isFetchInterceptionLive() && this.isXhrInterceptionLive();
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Start (or repair) interception by swizzling fetch and XMLHttpRequest.
|
|
413
460
|
*
|
|
414
|
-
*
|
|
461
|
+
* NOT guarded by a plain `isListening` flag: `globalThis.fetch` gets
|
|
462
|
+
* re-assigned in the wild — Expo's winter runtime, React Native DevTools'
|
|
463
|
+
* network panel, a second dev server's tooling, hot-reload churn. When that
|
|
464
|
+
* happens the flag still says "listening" while every request bypasses
|
|
465
|
+
* capture, and a flag-only guard makes the outage PERMANENT (observed as
|
|
466
|
+
* "No network events" forever with `interceptorInstalled: true`). So this
|
|
467
|
+
* verifies each interceptor is actually reachable (marker check) and
|
|
468
|
+
* re-installs whichever half was clobbered, wrapping the CURRENT global so
|
|
469
|
+
* whatever replaced us keeps working underneath. When both halves are live
|
|
470
|
+
* this costs two property reads.
|
|
415
471
|
*
|
|
416
472
|
* @performance Uses method swizzling for minimal runtime overhead
|
|
417
473
|
* @performance Includes request deduplication through ignored URL patterns
|
|
418
474
|
*/
|
|
419
475
|
startListening() {
|
|
420
|
-
|
|
476
|
+
const fetchLive = this.isListening && this.isFetchInterceptionLive();
|
|
477
|
+
const xhrLive = this.isListening && this.isXhrInterceptionLive();
|
|
478
|
+
if (fetchLive && xhrLive) {
|
|
421
479
|
return;
|
|
422
480
|
}
|
|
423
|
-
|
|
481
|
+
if (!fetchLive) {
|
|
482
|
+
this.installFetchInterceptor();
|
|
483
|
+
}
|
|
484
|
+
if (!xhrLive) {
|
|
485
|
+
this.installXhrInterceptor();
|
|
486
|
+
}
|
|
487
|
+
this.isListening = true;
|
|
488
|
+
if (__DEV__) {
|
|
489
|
+
// Network listener has started monitoring fetch and XMLHttpRequest operations
|
|
490
|
+
}
|
|
491
|
+
}
|
|
424
492
|
|
|
425
|
-
|
|
426
|
-
|
|
493
|
+
/** Swizzle `globalThis.fetch`, wrapping whatever is installed right now. */
|
|
494
|
+
installFetchInterceptor() {
|
|
495
|
+
const self = this;
|
|
496
|
+
// The pass-through is the CURRENT global (not the construction-time one):
|
|
497
|
+
// re-installing after a clobber must call through the replacement, and a
|
|
498
|
+
// stale generation must replay the chain exactly as it stood beneath it.
|
|
499
|
+
const passthroughFetch = globalThis.fetch.bind(globalThis);
|
|
500
|
+
this.originalFetch = passthroughFetch;
|
|
501
|
+
const generation = ++this.fetchGeneration;
|
|
502
|
+
const wrappedFetch = async (input, init) => {
|
|
427
503
|
const url = typeof input === "string" ? input : input instanceof URL ? input.href : input.url;
|
|
428
504
|
|
|
505
|
+
// A newer install supersedes this wrapper. If it is still stranded in
|
|
506
|
+
// another tool's chain it must pass through silently, or one request
|
|
507
|
+
// would be reported once per stranded generation.
|
|
508
|
+
if (generation !== self.fetchGeneration) {
|
|
509
|
+
return passthroughFetch(input, init);
|
|
510
|
+
}
|
|
511
|
+
|
|
429
512
|
// Skip ignored URLs
|
|
430
513
|
if (self.shouldIgnoreUrl(url)) {
|
|
431
|
-
return
|
|
514
|
+
return passthroughFetch(input, init);
|
|
432
515
|
}
|
|
433
516
|
const startTime = Date.now();
|
|
434
517
|
const requestId = `fetch_${++self.requestCounter}`;
|
|
@@ -511,7 +594,7 @@ class NetworkListener {
|
|
|
511
594
|
insideOverriddenFetch = outcome != null;
|
|
512
595
|
let pending;
|
|
513
596
|
try {
|
|
514
|
-
pending =
|
|
597
|
+
pending = passthroughFetch(input, init);
|
|
515
598
|
} finally {
|
|
516
599
|
insideOverriddenFetch = false;
|
|
517
600
|
}
|
|
@@ -614,30 +697,51 @@ class NetworkListener {
|
|
|
614
697
|
throw error;
|
|
615
698
|
}
|
|
616
699
|
};
|
|
700
|
+
wrappedFetch[BUOY_FETCH_INTERCEPTOR_FLAG] = true;
|
|
701
|
+
this.patchedFetch = wrappedFetch;
|
|
702
|
+
globalThis.fetch = this.patchedFetch;
|
|
703
|
+
}
|
|
617
704
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
705
|
+
/** Swizzle the XHR prototype methods, wrapping whatever is installed now. */
|
|
706
|
+
installXhrInterceptor() {
|
|
707
|
+
const self = this;
|
|
708
|
+
// Same contract as the fetch half: pass through to the CURRENT methods.
|
|
709
|
+
const passthroughOpen = XMLHttpRequest.prototype.open;
|
|
710
|
+
const passthroughSend = XMLHttpRequest.prototype.send;
|
|
711
|
+
const passthroughSetRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
|
|
712
|
+
this.originalXHROpen = passthroughOpen;
|
|
713
|
+
this.originalXHRSend = passthroughSend;
|
|
714
|
+
this.originalXHRSetRequestHeader = passthroughSetRequestHeader;
|
|
715
|
+
const generation = ++this.xhrGeneration;
|
|
716
|
+
const patchedOpen = function (method, url, async, user, password) {
|
|
717
|
+
// Superseded generations must not re-stamp (a double stamp burns two
|
|
718
|
+
// request ids per request) — just pass through.
|
|
719
|
+
if (generation === self.xhrGeneration) {
|
|
720
|
+
const xhr = this;
|
|
721
|
+
xhr._requestId = `xhr_${++self.requestCounter}`;
|
|
722
|
+
xhr._method = method;
|
|
723
|
+
xhr._url = url;
|
|
724
|
+
xhr._startTime = Date.now();
|
|
725
|
+
xhr._requestHeaders = {};
|
|
726
|
+
}
|
|
727
|
+
return passthroughOpen.call(this, method, url, async ?? true, user, password);
|
|
628
728
|
};
|
|
629
729
|
|
|
630
730
|
// Track request headers
|
|
631
|
-
|
|
731
|
+
const patchedSetRequestHeader = function (header, value) {
|
|
632
732
|
const xhr = this;
|
|
633
|
-
if (xhr._requestHeaders) {
|
|
733
|
+
if (generation === self.xhrGeneration && xhr._requestHeaders) {
|
|
634
734
|
xhr._requestHeaders[header] = value;
|
|
635
735
|
}
|
|
636
|
-
return
|
|
736
|
+
return passthroughSetRequestHeader.call(this, header, value);
|
|
637
737
|
};
|
|
638
|
-
|
|
738
|
+
const patchedSend = function (
|
|
639
739
|
// @ts-ignore - this does exist on native
|
|
640
740
|
data) {
|
|
741
|
+
// Superseded generation: silent pass-through (see the fetch wrapper).
|
|
742
|
+
if (generation !== self.xhrGeneration) {
|
|
743
|
+
return passthroughSend.call(this, data);
|
|
744
|
+
}
|
|
641
745
|
const xhr = this;
|
|
642
746
|
const requestId = xhr._requestId;
|
|
643
747
|
const method = xhr._method || "GET";
|
|
@@ -647,7 +751,7 @@ class NetworkListener {
|
|
|
647
751
|
|
|
648
752
|
// Skip ignored URLs
|
|
649
753
|
if (self.shouldIgnoreUrl(url)) {
|
|
650
|
-
return
|
|
754
|
+
return passthroughSend.call(this, data);
|
|
651
755
|
}
|
|
652
756
|
const {
|
|
653
757
|
url: cleanUrl,
|
|
@@ -764,18 +868,21 @@ class NetworkListener {
|
|
|
764
868
|
// Listeners are attached above FIRST: `runOverride` drives the same
|
|
765
869
|
// readyState transitions a real response would, and the interceptor has
|
|
766
870
|
// to see them (readyState 2 is where TTFB is stamped).
|
|
767
|
-
const handled = runOverride(this, url, outcome, () =>
|
|
871
|
+
const handled = runOverride(this, url, outcome, () => passthroughSend.call(this, data));
|
|
768
872
|
// `handled` is false only where this isn't React Native's own
|
|
769
873
|
// XMLHttpRequest and can't be driven by hand. Fall through and send for
|
|
770
874
|
// real rather than dropping the request on the floor.
|
|
771
875
|
if (handled) return;
|
|
772
876
|
}
|
|
773
|
-
return
|
|
877
|
+
return passthroughSend.call(this, data);
|
|
774
878
|
};
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
879
|
+
patchedSend[BUOY_XHR_INTERCEPTOR_FLAG] = true;
|
|
880
|
+
this.patchedXHROpen = patchedOpen;
|
|
881
|
+
this.patchedXHRSend = patchedSend;
|
|
882
|
+
this.patchedXHRSetRequestHeader = patchedSetRequestHeader;
|
|
883
|
+
XMLHttpRequest.prototype.open = this.patchedXHROpen;
|
|
884
|
+
XMLHttpRequest.prototype.send = this.patchedXHRSend;
|
|
885
|
+
XMLHttpRequest.prototype.setRequestHeader = this.patchedXHRSetRequestHeader;
|
|
779
886
|
}
|
|
780
887
|
|
|
781
888
|
/**
|
|
@@ -789,11 +896,30 @@ class NetworkListener {
|
|
|
789
896
|
return;
|
|
790
897
|
}
|
|
791
898
|
|
|
792
|
-
//
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
899
|
+
// Silence any of our wrappers stranded inside another tool's chain — they
|
|
900
|
+
// check the generation on every call and now pass through without emitting.
|
|
901
|
+
this.fetchGeneration++;
|
|
902
|
+
this.xhrGeneration++;
|
|
903
|
+
|
|
904
|
+
// Restore ONLY what is still literally ours. If another tool patched after
|
|
905
|
+
// us (impersonate, a debugger), assigning our saved originals would wipe
|
|
906
|
+
// ITS interceptor — the exact injury startListening defends against.
|
|
907
|
+
if (this.patchedFetch && globalThis.fetch === this.patchedFetch) {
|
|
908
|
+
globalThis.fetch = this.originalFetch;
|
|
909
|
+
}
|
|
910
|
+
if (this.patchedXHROpen && XMLHttpRequest.prototype.open === this.patchedXHROpen) {
|
|
911
|
+
XMLHttpRequest.prototype.open = this.originalXHROpen;
|
|
912
|
+
}
|
|
913
|
+
if (this.patchedXHRSend && XMLHttpRequest.prototype.send === this.patchedXHRSend) {
|
|
914
|
+
XMLHttpRequest.prototype.send = this.originalXHRSend;
|
|
915
|
+
}
|
|
916
|
+
if (this.patchedXHRSetRequestHeader && XMLHttpRequest.prototype.setRequestHeader === this.patchedXHRSetRequestHeader) {
|
|
917
|
+
XMLHttpRequest.prototype.setRequestHeader = this.originalXHRSetRequestHeader;
|
|
918
|
+
}
|
|
919
|
+
this.patchedFetch = null;
|
|
920
|
+
this.patchedXHROpen = null;
|
|
921
|
+
this.patchedXHRSend = null;
|
|
922
|
+
this.patchedXHRSetRequestHeader = null;
|
|
797
923
|
this.isListening = false;
|
|
798
924
|
if (__DEV__) {
|
|
799
925
|
// Network listener has stopped monitoring and restored original methods
|
|
@@ -912,4 +1038,11 @@ export const isNetworkListening = () => getNetworkListener().isActive;
|
|
|
912
1038
|
*
|
|
913
1039
|
* @returns Number of active listeners
|
|
914
1040
|
*/
|
|
915
|
-
export const getNetworkListenerCount = () => getNetworkListener().listenerCount;
|
|
1041
|
+
export const getNetworkListenerCount = () => getNetworkListener().listenerCount;
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Whether both interceptors are actually reachable through the live global
|
|
1045
|
+
* chain — the honest version of `isNetworkListening` (whose flag stays true
|
|
1046
|
+
* even after another tool re-assigns `globalThis.fetch` over the wrapper).
|
|
1047
|
+
*/
|
|
1048
|
+
export const isNetworkInterceptionLive = () => getNetworkListener().isInterceptionLive();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkDetailStepper.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkDetailStepper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,UAAU,CAAC;AAW5D,UAAU,yBAAyB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,wEAAwE;IACxE,SAAS,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAMD,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"NetworkDetailStepper.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkDetailStepper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAgC,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,KAAK,EAAgB,aAAa,EAAE,MAAM,UAAU,CAAC;AAW5D,UAAU,yBAAyB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,wEAAwE;IACxE,SAAS,EAAE,OAAO,CAAC;IACnB,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAMD,eAAO,MAAM,oBAAoB,iEAmE/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventDetailView.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventDetailView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NetworkEventDetailView.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventDetailView.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,UAAU,CAAC;AA0B7D,UAAU,2BAA2B;IACnC,KAAK,EAAE,YAAY,CAAC;IACpB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA+QD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,mEAoiBjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventItemCompact.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventItemCompact.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NetworkEventItemCompact.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventItemCompact.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAM7C,UAAU,4BAA4B;IACpC,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAoJD,eAAO,MAAM,uBAAuB,oEA4HnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventItemCompact.web.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventItemCompact.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"NetworkEventItemCompact.web.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventItemCompact.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAob7C,UAAU,4BAA4B;IACpC,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAyFD,eAAO,MAAM,uBAAuB,oEAkHnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkFilterViewV3.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkFilterViewV3.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NetworkFilterViewV3.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkFilterViewV3.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,cAAc,EAA2B,YAAY,EAAE,MAAM,UAAU,CAAC;AAItF,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,wBAAwB;IAChC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,MAAM,EAAE,aAAa,CAAC;IACtB,cAAc,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,qCAAqC;IACrC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,qDAAqD;IACrD,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjD;AA8DD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,MAAM,EACN,cAAc,EACd,eAAoB,EACpB,eAA0B,EAC1B,YAAuB,EACvB,mBAA8B,GAC/B,EAAE,wBAAwB,+BA0V1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkHeaderLive.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkHeaderLive.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"NetworkHeaderLive.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkHeaderLive.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAWL,KAAK,cAAc,EAEpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAqB9D,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpD,UAAU,wBAAwB;IAChC,YAAY,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACtC,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,EAClC,YAAY,EACZ,cAAc,EACd,eAAe,EACf,MAAM,GACP,EAAE,wBAAwB,+BA4D1B;AAED,UAAU,uBAAuB;IAC/B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;iDAEiD;AACjD,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,uBAAuB,+BAqBrE;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,uBAAuB,+BAwBtE;AAED,UAAU,4BAA4B;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,cAAc,GACf,EAAE,4BAA4B,+BAwF9B;AAED,UAAU,4BAA4B;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,MAAM,EACN,eAAe,EACf,YAAY,EACZ,MAAM,EACN,cAAc,EACd,KAAK,GACN,EAAE,4BAA4B,+BAsD9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkHeaderLive.web.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkHeaderLive.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AASH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAe9C,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"NetworkHeaderLive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,EAAE,aAAa,CAAC;IACtB,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,YAAY,EAAE,YAAY,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,MAAM,EACN,eAAe,EACf,YAAY,EACZ,MAAM,EACN,cAAc,EACd,KAAK,GACN,EAAE,4BAA4B,+BAmG9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkListScreen.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkListScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,
|
|
1
|
+
{"version":3,"file":"NetworkListScreen.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkListScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA0J5D,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,sCAwJxB"}
|
|
@@ -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;
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkModal.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkModal.tsx"],"names":[],"mappings":"AAsEA,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;
|
|
1
|
+
{"version":3,"file":"NetworkModal.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkModal.tsx"],"names":[],"mappings":"AAsEA,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAq3BD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAMpD;AAED,MAAM,WAAW,oBAAoB;IACnC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,GAAE,oBAAyB,+BAa/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/network/sync/networkSyncAdapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"networkSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/network/sync/networkSyncAdapter.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,kBAAkB,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,QAAY,CAAC;AAEpD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,QAAqB,CAAC;AA2LzD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,KAAK,CAAC;AA+J9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,kBAAkB;;;;QAczB;;;;WAIG;;;;;;;;;;;;;0BAWe,MAAM,IAAI;;;QAkB9B;;;;;WAKG;gCACqB,OAAO;;;;;;QAY/B,8CAA8C;6BACzB,OAAO;;;;;;;;;QAY5B,gDAAgD;4BAC5B,OAAO;;;;;;;;;QAU3B,sDAAsD;qCACzB,OAAO;;;;;;;;;QAsBpC,uEAAuE;uCACxC,OAAO;;;;QAKtC,2CAA2C;sCACb,OAAO;;;;;;;;;;;;;;;;0CAmCH,OAAO;;;;;;;sCAOX,OAAO;;;;;;;;;;QAYrC,+EAA+E;;QAG/E;;;;WAIG;uCAC4B,OAAO;;;QAYtC,4EAA4E;QAC5E;;;;;;;WAOG;;;;;;;;;kCA2CuB,OAAO;;;;;;;;;;;;;;;;CAiBpC,CAAC"}
|
|
@@ -85,6 +85,23 @@ declare class NetworkEventStore extends BaseEventStore<NetworkEvent> {
|
|
|
85
85
|
* Check if the store is actively capturing network events
|
|
86
86
|
*/
|
|
87
87
|
isCapturing(): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Re-assert the interceptor if something re-assigned fetch/XHR since capture
|
|
90
|
+
* started (Expo's runtime, RN DevTools, a second dev server's tooling — see
|
|
91
|
+
* networkListener.startListening). A no-op costing two property reads when
|
|
92
|
+
* everything is healthy, and a no-op entirely unless this store is actively
|
|
93
|
+
* capturing — a mirror-mode dashboard must never install an interceptor in
|
|
94
|
+
* its own process.
|
|
95
|
+
*/
|
|
96
|
+
ensureInterception(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Every new consumer — the Network modal opening, a badge mounting, a
|
|
99
|
+
* dashboard watch attaching — is a chance to notice and repair a clobbered
|
|
100
|
+
* interceptor, which matters because a long-lived watch can hold the
|
|
101
|
+
* subscriber count above zero for the whole session (so the 0→1
|
|
102
|
+
* startCapturing path would never run again).
|
|
103
|
+
*/
|
|
104
|
+
subscribeToEvents(listener: (events: NetworkEvent[]) => void): () => void;
|
|
88
105
|
/**
|
|
89
106
|
* Process a network listener event
|
|
90
107
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkEventStore.d.ts","sourceRoot":"","sources":["../../../../src/network/utils/networkEventStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQzD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;AAU1E,cAAM,iBAAkB,SAAQ,cAAc,CAAC,YAAY,CAAC;IAC1D,OAAO,CAAC,eAAe,CAAwC;IAC/D;;;;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,iBAAiB;IAWzB,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;IAMnB;;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"}
|
|
@@ -35,6 +35,18 @@ export interface NetworkingEvent {
|
|
|
35
35
|
override?: NetworkOverrideMark;
|
|
36
36
|
}
|
|
37
37
|
export type NetworkingEventListener = (event: NetworkingEvent) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Markers stamped on the installed interceptor functions so their presence in
|
|
40
|
+
* the live chain stays detectable even after another tool wraps them.
|
|
41
|
+
* Cooperating patchers (@buoy-gg/impersonate) copy every `__buoy*` marker from
|
|
42
|
+
* the function they wrap onto their own wrapper; a global fetch/XHR WITHOUT
|
|
43
|
+
* the marker therefore means our interceptor was clobbered — some runtime
|
|
44
|
+
* re-assigned `globalThis.fetch` over it (Expo's winter runtime, React Native
|
|
45
|
+
* DevTools' network panel, a second dev server's tooling, hot-reload churn all
|
|
46
|
+
* do this in the wild) — and capture must re-install. See startListening.
|
|
47
|
+
*/
|
|
48
|
+
export declare const BUOY_FETCH_INTERCEPTOR_FLAG = "__buoyNetworkFetchIntercepted";
|
|
49
|
+
export declare const BUOY_XHR_INTERCEPTOR_FLAG = "__buoyNetworkXhrIntercepted";
|
|
38
50
|
/**
|
|
39
51
|
* Network traffic interceptor for React Native applications
|
|
40
52
|
*
|
|
@@ -71,6 +83,24 @@ declare class NetworkListener {
|
|
|
71
83
|
private originalXHROpen;
|
|
72
84
|
private originalXHRSend;
|
|
73
85
|
private originalXHRSetRequestHeader;
|
|
86
|
+
/**
|
|
87
|
+
* The wrappers currently installed by THIS instance, for identity checks:
|
|
88
|
+
* `stopListening` restores a global only when it is still literally ours —
|
|
89
|
+
* assigning our saved original over someone who patched after us would wipe
|
|
90
|
+
* their interceptor exactly the way this class gets wiped (see below).
|
|
91
|
+
*/
|
|
92
|
+
private patchedFetch;
|
|
93
|
+
private patchedXHROpen;
|
|
94
|
+
private patchedXHRSend;
|
|
95
|
+
private patchedXHRSetRequestHeader;
|
|
96
|
+
/**
|
|
97
|
+
* Bumped on every (re)install and on stop. Each wrapper closes over the
|
|
98
|
+
* generation it was born with and goes silent (pure pass-through — no emit,
|
|
99
|
+
* no counter bump) once a newer generation exists, so a wrapper stranded
|
|
100
|
+
* inside another tool's chain can never double-report a request.
|
|
101
|
+
*/
|
|
102
|
+
private fetchGeneration;
|
|
103
|
+
private xhrGeneration;
|
|
74
104
|
constructor();
|
|
75
105
|
/**
|
|
76
106
|
* Check if URL should be ignored from network monitoring
|
|
@@ -110,18 +140,38 @@ declare class NetworkListener {
|
|
|
110
140
|
* This method processes the response and emits appropriate events
|
|
111
141
|
*/
|
|
112
142
|
private handleXHRResponse;
|
|
143
|
+
/** Is our fetch interceptor still reachable through the global chain? */
|
|
144
|
+
private isFetchInterceptionLive;
|
|
145
|
+
/** Is our XHR interceptor still reachable through the prototype chain? */
|
|
146
|
+
private isXhrInterceptionLive;
|
|
113
147
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
|
|
148
|
+
* Both halves of the interceptor are reachable — requests actually flow
|
|
149
|
+
* through capture. `isListening` alone cannot promise that (see
|
|
150
|
+
* startListening); diagnostics should report THIS.
|
|
151
|
+
*/
|
|
152
|
+
isInterceptionLive(): boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Start (or repair) interception by swizzling fetch and XMLHttpRequest.
|
|
118
155
|
*
|
|
119
|
-
*
|
|
156
|
+
* NOT guarded by a plain `isListening` flag: `globalThis.fetch` gets
|
|
157
|
+
* re-assigned in the wild — Expo's winter runtime, React Native DevTools'
|
|
158
|
+
* network panel, a second dev server's tooling, hot-reload churn. When that
|
|
159
|
+
* happens the flag still says "listening" while every request bypasses
|
|
160
|
+
* capture, and a flag-only guard makes the outage PERMANENT (observed as
|
|
161
|
+
* "No network events" forever with `interceptorInstalled: true`). So this
|
|
162
|
+
* verifies each interceptor is actually reachable (marker check) and
|
|
163
|
+
* re-installs whichever half was clobbered, wrapping the CURRENT global so
|
|
164
|
+
* whatever replaced us keeps working underneath. When both halves are live
|
|
165
|
+
* this costs two property reads.
|
|
120
166
|
*
|
|
121
167
|
* @performance Uses method swizzling for minimal runtime overhead
|
|
122
168
|
* @performance Includes request deduplication through ignored URL patterns
|
|
123
169
|
*/
|
|
124
170
|
startListening(): void;
|
|
171
|
+
/** Swizzle `globalThis.fetch`, wrapping whatever is installed right now. */
|
|
172
|
+
private installFetchInterceptor;
|
|
173
|
+
/** Swizzle the XHR prototype methods, wrapping whatever is installed now. */
|
|
174
|
+
private installXhrInterceptor;
|
|
125
175
|
/**
|
|
126
176
|
* Stop listening and restore original networking methods
|
|
127
177
|
*
|
|
@@ -193,5 +243,11 @@ export declare const isNetworkListening: () => boolean;
|
|
|
193
243
|
* @returns Number of active listeners
|
|
194
244
|
*/
|
|
195
245
|
export declare const getNetworkListenerCount: () => number;
|
|
246
|
+
/**
|
|
247
|
+
* Whether both interceptors are actually reachable through the live global
|
|
248
|
+
* chain — the honest version of `isNetworkListening` (whose flag stays true
|
|
249
|
+
* even after another tool re-assigns `globalThis.fetch` over the wrapper).
|
|
250
|
+
*/
|
|
251
|
+
export declare const isNetworkInterceptionLive: () => boolean;
|
|
196
252
|
export {};
|
|
197
253
|
//# sourceMappingURL=networkListener.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkListener.d.ts","sourceRoot":"","sources":["../../../../src/network/utils/networkListener.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAS/C,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AA8B9E,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,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;KAC7D,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,+DAA+D;IAC/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A0BhB;;;;;OAKG;YACW,mBAAmB;IA2DjC;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAQnB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IA4NzB,yEAAyE;IACzE,OAAO,CAAC,uBAAuB;IAQ/B,0EAA0E;IAC1E,OAAO,CAAC,qBAAqB;IAQ7B;;;;OAIG;IACH,kBAAkB,IAAI,OAAO;IAI7B;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc;IAoBd,4EAA4E;IAC5E,OAAO,CAAC,uBAAuB;IA+N/B,6EAA6E;IAC7E,OAAO,CAAC,qBAAqB;IA2O7B;;;;;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,YAA6C,CAAC;AAE9E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,GAAI,UAAU,uBAAuB,eACxB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,yBAAyB,YACK,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,eAAsC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,cAA2C,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,eACK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/network",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.27",
|
|
4
4
|
"description": "In-app network inspector for React Native — requests, responses, timing & errors live, with GraphQL operation parsing. Part of Buoy devtools.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
29
|
+
"@buoy-gg/shared-ui": "^7.0.27"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "*",
|