@buoy-gg/events 3.0.2 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/UnifiedEventDetail.js +34 -10
- package/lib/commonjs/components/UnifiedEventDetail.js.map +1 -1
- package/lib/commonjs/hooks/useUnifiedEvents.js +57 -27
- package/lib/commonjs/hooks/useUnifiedEvents.js.map +1 -1
- package/lib/commonjs/sources/sourceIds.js +30 -0
- package/lib/commonjs/sources/sourceIds.js.map +1 -0
- package/lib/commonjs/stores/unifiedEventStore.js +138 -14
- package/lib/commonjs/stores/unifiedEventStore.js.map +1 -1
- package/lib/commonjs/sync/eventsSyncAdapter.js +35 -10
- package/lib/commonjs/sync/eventsSyncAdapter.js.map +1 -1
- package/lib/module/components/UnifiedEventDetail.js +36 -12
- package/lib/module/components/UnifiedEventDetail.js.map +1 -1
- package/lib/module/hooks/useUnifiedEvents.js +59 -29
- package/lib/module/hooks/useUnifiedEvents.js.map +1 -1
- package/lib/module/sources/sourceIds.js +26 -0
- package/lib/module/sources/sourceIds.js.map +1 -0
- package/lib/module/stores/unifiedEventStore.js +138 -14
- package/lib/module/stores/unifiedEventStore.js.map +1 -1
- package/lib/module/sync/eventsSyncAdapter.js +35 -11
- package/lib/module/sync/eventsSyncAdapter.js.map +1 -1
- package/lib/typescript/components/UnifiedEventDetail.d.ts +20 -0
- package/lib/typescript/components/UnifiedEventDetail.d.ts.map +1 -1
- package/lib/typescript/hooks/useUnifiedEvents.d.ts.map +1 -1
- package/lib/typescript/sources/sourceIds.d.ts +13 -0
- package/lib/typescript/sources/sourceIds.d.ts.map +1 -0
- package/lib/typescript/stores/unifiedEventStore.d.ts +29 -1
- package/lib/typescript/stores/unifiedEventStore.d.ts.map +1 -1
- package/lib/typescript/sync/eventsSyncAdapter.d.ts +20 -6
- package/lib/typescript/sync/eventsSyncAdapter.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/UnifiedEventDetail.tsx +51 -7
- package/src/hooks/useUnifiedEvents.ts +74 -28
- package/src/sources/sourceIds.ts +25 -0
- package/src/stores/unifiedEventStore.ts +149 -15
- package/src/sync/eventsSyncAdapter.ts +35 -10
|
@@ -10,7 +10,20 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { getCachedDiscovery, getAggregatedSubscriberCounts } from "../utils/autoDiscoverEventSources";
|
|
13
|
+
import { EVENT_SOURCE_TO_DISCOVERY_ID } from "../sources/sourceIds";
|
|
13
14
|
const MAX_EVENTS = 200;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Source IDs that subscribeToAll() must NOT auto-subscribe to.
|
|
18
|
+
*
|
|
19
|
+
* These are high-frequency sources the UI excludes from DEFAULT_ENABLED_SOURCES
|
|
20
|
+
* (see useUnifiedEvents.ts). "render" (highlight-updates) fires on every
|
|
21
|
+
* component render — tens of events per second — which floods the shared store
|
|
22
|
+
* (capped at MAX_EVENTS), shoves real events out, and shows up as hidden noise
|
|
23
|
+
* ("1 of 100"). subscribeToAll() is the dashboard-watch path; it must mirror
|
|
24
|
+
* the on-device default of leaving render OFF unless the user opts in.
|
|
25
|
+
*/
|
|
26
|
+
const SUBSCRIBE_ALL_EXCLUDED_SOURCE_IDS = new Set(["render"]);
|
|
14
27
|
class UnifiedEventStore {
|
|
15
28
|
events = [];
|
|
16
29
|
listeners = new Set();
|
|
@@ -18,9 +31,17 @@ class UnifiedEventStore {
|
|
|
18
31
|
clearListeners = new Set();
|
|
19
32
|
remoteAvailableSources = null;
|
|
20
33
|
|
|
21
|
-
// Track which sources are currently subscribed
|
|
34
|
+
// Track which sources are currently subscribed, ref-counted so independent
|
|
35
|
+
// consumers (the on-device EventsModal and the remote dashboard) can each
|
|
36
|
+
// request a source and the underlying capture only stops when the LAST one
|
|
37
|
+
// drops it. Presence of a key still means "subscribed".
|
|
22
38
|
sourceUnsubscribers = new Map();
|
|
23
39
|
|
|
40
|
+
// Discovery IDs the remote dashboard (sync adapter) currently wants. Tracked
|
|
41
|
+
// separately so the remote consumer can be diffed/cleared independently of
|
|
42
|
+
// the on-device consumer's subscriptions.
|
|
43
|
+
remoteDiscoveryIds = new Set();
|
|
44
|
+
|
|
24
45
|
// Map network event IDs to unified event IDs for updates
|
|
25
46
|
networkEventIdMap = new Map();
|
|
26
47
|
|
|
@@ -50,9 +71,20 @@ class UnifiedEventStore {
|
|
|
50
71
|
* Override source availability with the synced device's (auto-discovery
|
|
51
72
|
* finds nothing on the dashboard — the tool packages live on the device).
|
|
52
73
|
* Pass null to restore local discovery.
|
|
74
|
+
*
|
|
75
|
+
* Notifies listeners when the set actually changes so consumers
|
|
76
|
+
* (useUnifiedEvents) can refresh their available-source list — this is the
|
|
77
|
+
* only signal the dashboard's filter badge bar gets when capture is OFF and
|
|
78
|
+
* no events are flowing to trigger replaceEvents().
|
|
53
79
|
*/
|
|
54
80
|
setRemoteAvailableSources(sources) {
|
|
55
|
-
|
|
81
|
+
const next = sources ? new Set(sources) : null;
|
|
82
|
+
const prev = this.remoteAvailableSources;
|
|
83
|
+
const unchanged = prev === null && next === null || !!prev && !!next && prev.size === next.size && [...next].every(s => prev.has(s));
|
|
84
|
+
this.remoteAvailableSources = next;
|
|
85
|
+
if (!unchanged) {
|
|
86
|
+
this.notifyListeners();
|
|
87
|
+
}
|
|
56
88
|
}
|
|
57
89
|
|
|
58
90
|
/**
|
|
@@ -84,6 +116,12 @@ class UnifiedEventStore {
|
|
|
84
116
|
sources
|
|
85
117
|
} = getCachedDiscovery();
|
|
86
118
|
for (const source of sources) {
|
|
119
|
+
// Skip high-frequency sources the UI leaves off by default (e.g. render).
|
|
120
|
+
// Subscribing to them here would flood the timeline with events that are
|
|
121
|
+
// then filtered out of the display — see SUBSCRIBE_ALL_EXCLUDED_SOURCE_IDS.
|
|
122
|
+
if (SUBSCRIBE_ALL_EXCLUDED_SOURCE_IDS.has(source.id)) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
87
125
|
await this.subscribeToSource(source);
|
|
88
126
|
}
|
|
89
127
|
}
|
|
@@ -92,9 +130,20 @@ class UnifiedEventStore {
|
|
|
92
130
|
* Subscribe to a specific event source by ID
|
|
93
131
|
*/
|
|
94
132
|
async subscribeToSource(source) {
|
|
95
|
-
|
|
96
|
-
|
|
133
|
+
const existing = this.sourceUnsubscribers.get(source.id);
|
|
134
|
+
if (existing) {
|
|
135
|
+
existing.refCount++; // Another consumer wants it — just count.
|
|
136
|
+
return;
|
|
97
137
|
}
|
|
138
|
+
|
|
139
|
+
// Reserve the slot synchronously (refCount 1) so concurrent subscribe calls
|
|
140
|
+
// for the same source ref-count instead of double-subscribing during the
|
|
141
|
+
// awaits below.
|
|
142
|
+
const entry = {
|
|
143
|
+
unsubscribe: () => {},
|
|
144
|
+
refCount: 1
|
|
145
|
+
};
|
|
146
|
+
this.sourceUnsubscribers.set(source.id, entry);
|
|
98
147
|
try {
|
|
99
148
|
// Run setup if needed
|
|
100
149
|
if (source.setup) {
|
|
@@ -106,20 +155,27 @@ class UnifiedEventStore {
|
|
|
106
155
|
this.addEvent(event);
|
|
107
156
|
});
|
|
108
157
|
if (unsubscribe) {
|
|
109
|
-
|
|
158
|
+
entry.unsubscribe = unsubscribe;
|
|
110
159
|
}
|
|
111
160
|
} catch {
|
|
112
|
-
//
|
|
161
|
+
// Failed - source may not be available. Drop the reservation unless other
|
|
162
|
+
// consumers incremented it while we were awaiting.
|
|
163
|
+
if (this.sourceUnsubscribers.get(source.id) === entry && entry.refCount <= 1) {
|
|
164
|
+
this.sourceUnsubscribers.delete(source.id);
|
|
165
|
+
}
|
|
113
166
|
}
|
|
114
167
|
}
|
|
115
168
|
|
|
116
169
|
/**
|
|
117
|
-
* Unsubscribe from a specific source by ID
|
|
170
|
+
* Unsubscribe from a specific source by ID. Ref-counted: the real teardown
|
|
171
|
+
* only runs when the last consumer drops it.
|
|
118
172
|
*/
|
|
119
173
|
unsubscribeFromSource(sourceId) {
|
|
120
|
-
const
|
|
121
|
-
if (
|
|
122
|
-
|
|
174
|
+
const entry = this.sourceUnsubscribers.get(sourceId);
|
|
175
|
+
if (!entry) return;
|
|
176
|
+
entry.refCount--;
|
|
177
|
+
if (entry.refCount <= 0) {
|
|
178
|
+
entry.unsubscribe();
|
|
123
179
|
this.sourceUnsubscribers.delete(sourceId);
|
|
124
180
|
}
|
|
125
181
|
}
|
|
@@ -422,14 +478,82 @@ class UnifiedEventStore {
|
|
|
422
478
|
* Unsubscribe from all sources
|
|
423
479
|
*/
|
|
424
480
|
unsubscribeAll() {
|
|
425
|
-
//
|
|
426
|
-
for (const [,
|
|
427
|
-
unsubscribe();
|
|
481
|
+
// Hard reset: tear down every tracked source regardless of ref-count.
|
|
482
|
+
for (const [, entry] of this.sourceUnsubscribers) {
|
|
483
|
+
entry.unsubscribe();
|
|
428
484
|
}
|
|
429
485
|
this.sourceUnsubscribers.clear();
|
|
430
486
|
|
|
431
|
-
// Clear active
|
|
487
|
+
// Clear active + remote source bookkeeping (all subscriptions are gone).
|
|
432
488
|
this.activeSources.clear();
|
|
489
|
+
this.remoteDiscoveryIds.clear();
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Remote-consumer channel: the dashboard sync adapter declares which event
|
|
494
|
+
* sources it wants the device to capture. Diffed against the previous remote
|
|
495
|
+
* set so only changed sources are (un)subscribed; ref-counting keeps the
|
|
496
|
+
* on-device EventsModal's own subscriptions intact. Pass "all" to capture
|
|
497
|
+
* every discovered source except the high-frequency excluded ones.
|
|
498
|
+
*/
|
|
499
|
+
async setRemoteEnabledSources(sources) {
|
|
500
|
+
const {
|
|
501
|
+
sources: discovered
|
|
502
|
+
} = getCachedDiscovery();
|
|
503
|
+
let nextIds;
|
|
504
|
+
if (sources === "all") {
|
|
505
|
+
nextIds = new Set(discovered.map(s => s.id).filter(id => !SUBSCRIBE_ALL_EXCLUDED_SOURCE_IDS.has(id)));
|
|
506
|
+
} else {
|
|
507
|
+
nextIds = new Set();
|
|
508
|
+
for (const src of sources) {
|
|
509
|
+
const id = EVENT_SOURCE_TO_DISCOVERY_ID[src];
|
|
510
|
+
if (id) nextIds.add(id);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// Swap the tracked set SYNCHRONOUSLY (before the awaits) so a watch's
|
|
515
|
+
// ensureRemoteSourcesDefault() that runs in between sees the new selection
|
|
516
|
+
// and won't re-broaden to "all".
|
|
517
|
+
const prevIds = this.remoteDiscoveryIds;
|
|
518
|
+
this.remoteDiscoveryIds = nextIds;
|
|
519
|
+
|
|
520
|
+
// Subscribe newly-requested sources.
|
|
521
|
+
for (const id of nextIds) {
|
|
522
|
+
if (!prevIds.has(id)) {
|
|
523
|
+
const source = discovered.find(s => s.id === id);
|
|
524
|
+
if (source) await this.subscribeToSource(source);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
// Release sources the remote no longer wants.
|
|
528
|
+
for (const id of prevIds) {
|
|
529
|
+
if (!nextIds.has(id)) {
|
|
530
|
+
this.unsubscribeFromSource(id);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Called by the sync adapter when a dashboard starts watching: default to all
|
|
537
|
+
* sources, but ONLY if the dashboard hasn't already declared a selection for
|
|
538
|
+
* this watch session (the setEnabledSources action can arrive before the
|
|
539
|
+
* watch). Keeps backward compatibility with dashboards that never narrow.
|
|
540
|
+
*/
|
|
541
|
+
ensureRemoteSourcesDefault() {
|
|
542
|
+
if (this.remoteDiscoveryIds.size === 0) {
|
|
543
|
+
void this.setRemoteEnabledSources("all");
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Release all of the remote consumer's source subscriptions (e.g. when the
|
|
549
|
+
* dashboard stops watching the events tool). Ref-counting means sources the
|
|
550
|
+
* on-device EventsModal also wants stay subscribed.
|
|
551
|
+
*/
|
|
552
|
+
clearRemoteSources() {
|
|
553
|
+
for (const id of this.remoteDiscoveryIds) {
|
|
554
|
+
this.unsubscribeFromSource(id);
|
|
555
|
+
}
|
|
556
|
+
this.remoteDiscoveryIds.clear();
|
|
433
557
|
}
|
|
434
558
|
|
|
435
559
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getCachedDiscovery","getAggregatedSubscriberCounts","MAX_EVENTS","UnifiedEventStore","events","listeners","Set","activeSources","clearListeners","remoteAvailableSources","sourceUnsubscribers","Map","networkEventIdMap","getDiscoveredSources","sources","getAvailableEventSources","availableEventSources","setRemoteAvailableSources","replaceEvents","slice","map","event","source","notifyListeners","onClear","listener","add","delete","subscribeToAll","subscribeToSource","has","id","setup","unsubscribe","subscribe","addEvent","set","unsubscribeFromSource","sourceId","get","subscribeToStorage","storageSource","find","s","unsubscribeFromStorage","subscribeToRedux","reduxSource","unsubscribeFromRedux","subscribeToNetwork","networkSource","unsubscribeFromNetwork","subscribeToReactQuery","rqSource","unsubscribeFromReactQuery","subscribeToRoutes","routeSource","unsubscribeFromRoutes","subscribeToZustand","zustandSource","unsubscribeFromZustand","subscribeToJotai","jotaiSource","unsubscribeFromJotai","subscribeToRender","renderSource","unsubscribeFromRender","originalEvent","existingUnifiedId","existingIndex","findIndex","e","getEvents","enabledSources","size","filter","getActiveSources","Array","from","getSourceCounts","counts","redux","network","route","zustand","jotai","render","clearEvents","clear","forEach","getEventCount","length","unsubscribeAll","isSourceSubscribed","getSubscriptionStatus","getSubscriberCounts","unifiedEventStore"],"sourceRoot":"../../../src","sources":["stores/unifiedEventStore.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SACEA,kBAAkB,EAClBC,6BAA6B,QAGxB,mCAAmC;AAE1C,MAAMC,UAAU,GAAG,GAAG;AAEtB,MAAMC,iBAAiB,CAAC;EACdC,MAAM,GAAmB,EAAE;EAC3BC,SAAS,GAA8B,IAAIC,GAAG,CAAC,CAAC;EAChDC,aAAa,GAAqB,IAAID,G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ACnE,cAAc,CAAC,CAAC;AACtE,OAAO,MAAMkE,mBAAmB,GAAGA,CAAA,KAAMC,iBAAiB,CAACD,mBAAmB,CAAC,CAAC;;AAEhF","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["getCachedDiscovery","getAggregatedSubscriberCounts","EVENT_SOURCE_TO_DISCOVERY_ID","MAX_EVENTS","SUBSCRIBE_ALL_EXCLUDED_SOURCE_IDS","Set","UnifiedEventStore","events","listeners","activeSources","clearListeners","remoteAvailableSources","sourceUnsubscribers","Map","remoteDiscoveryIds","networkEventIdMap","getDiscoveredSources","sources","getAvailableEventSources","availableEventSources","setRemoteAvailableSources","next","prev","unchanged","size","every","s","has","notifyListeners","replaceEvents","slice","map","event","source","onClear","listener","add","delete","subscribeToAll","id","subscribeToSource","existing","get","refCount","entry","unsubscribe","set","setup","subscribe","addEvent","unsubscribeFromSource","sourceId","subscribeToStorage","storageSource","find","unsubscribeFromStorage","subscribeToRedux","reduxSource","unsubscribeFromRedux","subscribeToNetwork","networkSource","unsubscribeFromNetwork","subscribeToReactQuery","rqSource","unsubscribeFromReactQuery","subscribeToRoutes","routeSource","unsubscribeFromRoutes","subscribeToZustand","zustandSource","unsubscribeFromZustand","subscribeToJotai","jotaiSource","unsubscribeFromJotai","subscribeToRender","renderSource","unsubscribeFromRender","originalEvent","existingUnifiedId","existingIndex","findIndex","e","getEvents","enabledSources","filter","getActiveSources","Array","from","getSourceCounts","counts","redux","network","route","zustand","jotai","render","clearEvents","clear","forEach","getEventCount","length","unsubscribeAll","setRemoteEnabledSources","discovered","nextIds","src","prevIds","ensureRemoteSourcesDefault","clearRemoteSources","isSourceSubscribed","getSubscriptionStatus","getSubscriberCounts","unifiedEventStore"],"sourceRoot":"../../../src","sources":["stores/unifiedEventStore.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SACEA,kBAAkB,EAClBC,6BAA6B,QAGxB,mCAAmC;AAC1C,SAASC,4BAA4B,QAAQ,s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Q,WAAW,GAAGA,CAAA,KAAMgB,iBAAiB,CAAChB,WAAW,CAAC,CAAC;AAChE,OAAO,MAAMhD,SAAS,GAAIb,QAA8B,IACtD6E,iBAAiB,CAAChE,SAAS,CAACb,QAAQ,CAAC;AACvC,OAAO,MAAMgE,aAAa,GAAGA,CAAA,KAAMa,iBAAiB,CAACb,aAAa,CAAC,CAAC;AACpE,OAAO,MAAMU,kBAAkB,GAAI5E,MAAmB,IACpD+E,iBAAiB,CAACH,kBAAkB,CAAC5E,MAAM,CAAC;AAC9C,OAAO,MAAM6E,qBAAqB,GAAGA,CAAA,KACnCE,iBAAiB,CAACF,qBAAqB,CAAC,CAAC;AAC3C,OAAO,MAAMT,cAAc,GAAGA,CAAA,KAAMW,iBAAiB,CAACX,cAAc,CAAC,CAAC;;AAEtE;AACA,OAAO,MAAMrF,oBAAoB,GAAGA,CAAA,KAAMgG,iBAAiB,CAAChG,oBAAoB,CAAC,CAAC;AAClF,OAAO,MAAME,wBAAwB,GAAGA,CAAA,KAAM8F,iBAAiB,CAAC9F,wBAAwB,CAAC,CAAC;AAC1F,OAAO,MAAMoB,cAAc,GAAGA,CAAA,KAAM0E,iBAAiB,CAAC1E,cAAc,CAAC,CAAC;AACtE,OAAO,MAAMyE,mBAAmB,GAAGA,CAAA,KAAMC,iBAAiB,CAACD,mBAAmB,CAAC,CAAC;;AAEhF","ignoreList":[]}
|
|
@@ -1,33 +1,57 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { unifiedEventStore } from "../stores/unifiedEventStore";
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Sync adapter for the events tool, consumed by @buoy-gg/external-sync's
|
|
7
6
|
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
8
7
|
* this package doesn't need a dependency on it).
|
|
9
8
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* This adapter is the "remote consumer" of the unified event store. While a
|
|
10
|
+
* dashboard is watching, it requests a SET of event sources (defaulting to all,
|
|
11
|
+
* narrowed by the dashboard via `setEnabledSources`). On unwatch it releases
|
|
12
|
+
* those requests, so — unlike before — the device stops capturing sources that
|
|
13
|
+
* nothing else is watching. Source requests are ref-counted in the store, so
|
|
14
|
+
* the on-device EventsModal keeps working when open at the same time.
|
|
15
|
+
*
|
|
16
|
+
* The snapshot carries the device's available sources so the dashboard can
|
|
17
|
+
* render the source filter chips (its own auto-discovery finds nothing — the
|
|
18
|
+
* tool packages live on the device).
|
|
15
19
|
*/
|
|
16
20
|
export const eventsSyncAdapter = {
|
|
17
|
-
version:
|
|
21
|
+
version: 2,
|
|
18
22
|
getSnapshot: () => ({
|
|
19
23
|
events: unifiedEventStore.getEvents(),
|
|
20
24
|
availableSources: Array.from(unifiedEventStore.getAvailableEventSources())
|
|
21
25
|
}),
|
|
22
26
|
subscribe: onChange => {
|
|
23
|
-
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
+
// Default to all sources until the dashboard narrows the set via
|
|
28
|
+
// setEnabledSources — backward compatible with dashboards that don't send
|
|
29
|
+
// it. Uses ensureRemoteSourcesDefault so a setEnabledSources that raced
|
|
30
|
+
// ahead of this watch isn't clobbered back to "all".
|
|
31
|
+
unifiedEventStore.ensureRemoteSourcesDefault();
|
|
32
|
+
const unsubscribe = unifiedEventStore.subscribe(() => onChange());
|
|
33
|
+
return () => {
|
|
34
|
+
unsubscribe();
|
|
35
|
+
// Release this consumer's source subscriptions so the device stops
|
|
36
|
+
// capturing sources nothing else is watching (fixes the old leak).
|
|
37
|
+
unifiedEventStore.clearRemoteSources();
|
|
38
|
+
};
|
|
27
39
|
},
|
|
28
40
|
actions: {
|
|
29
41
|
clearEvents: () => {
|
|
30
42
|
unifiedEventStore.clearEvents();
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* Narrow which sources the device captures for this dashboard, driven by
|
|
46
|
+
* the dashboard's source badges. Ref-counted in the store, so disabling a
|
|
47
|
+
* source here only stops its capture if no other consumer wants it.
|
|
48
|
+
*/
|
|
49
|
+
setEnabledSources: params => {
|
|
50
|
+
const sources = params?.sources ?? [];
|
|
51
|
+
unifiedEventStore.setRemoteEnabledSources(sources);
|
|
52
|
+
return {
|
|
53
|
+
enabledSources: sources
|
|
54
|
+
};
|
|
31
55
|
}
|
|
32
56
|
}
|
|
33
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["unifiedEventStore","eventsSyncAdapter","version","getSnapshot","events","getEvents","availableSources","Array","from","getAvailableEventSources","subscribe","onChange","
|
|
1
|
+
{"version":3,"names":["unifiedEventStore","eventsSyncAdapter","version","getSnapshot","events","getEvents","availableSources","Array","from","getAvailableEventSources","subscribe","onChange","ensureRemoteSourcesDefault","unsubscribe","clearRemoteSources","actions","clearEvents","setEnabledSources","params","sources","setRemoteEnabledSources","enabledSources"],"sourceRoot":"../../../src","sources":["sync/eventsSyncAdapter.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,6BAA6B;AAG/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAG;EAC/BC,OAAO,EAAE,CAAC;EACVC,WAAW,EAAEA,CAAA,MAAO;IAClBC,MAAM,EAAEJ,iBAAiB,CAACK,SAAS,CAAC,CAAC;IACrCC,gBAAgB,EAAEC,KAAK,CAACC,IAAI,CAACR,iBAAiB,CAACS,wBAAwB,CAAC,CAAC;EAC3E,CAAC,CAAC;EACFC,SAAS,EAAGC,QAAoB,IAAK;IACnC;IACA;IACA;IACA;IACAX,iBAAiB,CAACY,0BAA0B,CAAC,CAAC;IAC9C,MAAMC,WAAW,GAAGb,iBAAiB,CAACU,SAAS,CAAC,MAAMC,QAAQ,CAAC,CAAC,CAAC;IACjE,OAAO,MAAM;MACXE,WAAW,CAAC,CAAC;MACb;MACA;MACAb,iBAAiB,CAACc,kBAAkB,CAAC,CAAC;IACxC,CAAC;EACH,CAAC;EACDC,OAAO,EAAE;IACPC,WAAW,EAAEA,CAAA,KAAM;MACjBhB,iBAAiB,CAACgB,WAAW,CAAC,CAAC;IACjC,CAAC;IACD;AACJ;AACA;AACA;AACA;IACIC,iBAAiB,EAAGC,MAAe,IAAK;MACtC,MAAMC,OAAO,GACVD,MAAM,EAA8CC,OAAO,IAAI,EAAE;MACpEnB,iBAAiB,CAACoB,uBAAuB,CAACD,OAAO,CAAC;MAClD,OAAO;QAAEE,cAAc,EAAEF;MAAQ,CAAC;IACpC;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -5,10 +5,30 @@
|
|
|
5
5
|
* Uses shared detail components from other packages when available,
|
|
6
6
|
* falls back to generic DataViewer when packages aren't installed.
|
|
7
7
|
*/
|
|
8
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
8
9
|
import type { UnifiedEvent } from "../types";
|
|
9
10
|
interface UnifiedEventDetailProps {
|
|
10
11
|
event: UnifiedEvent;
|
|
11
12
|
onBack?: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Optional override for the network detail component. The desktop dashboard
|
|
15
|
+
* injects the real `@buoy-gg/network` export here because the runtime
|
|
16
|
+
* `require("@buoy-gg/network")` fallback is unreliable in its Vite/ESM build.
|
|
17
|
+
* When omitted, the dynamically-required component is used (works on mobile).
|
|
18
|
+
*/
|
|
19
|
+
NetworkEventDetailViewComponent?: ComponentType<{
|
|
20
|
+
event: unknown;
|
|
21
|
+
ignoredPatterns?: Set<string>;
|
|
22
|
+
onTogglePattern?: (value: string) => void;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Optional wrapper rendered around the network detail view — e.g. the desktop
|
|
26
|
+
* passes `NetworkBodyResolverProvider` so large request/response bodies that
|
|
27
|
+
* were stripped from the sync snapshot can be fetched from the device on demand.
|
|
28
|
+
*/
|
|
29
|
+
networkDetailWrapper?: ComponentType<{
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}>;
|
|
12
32
|
}
|
|
13
33
|
export declare const UnifiedEventDetail: import("react").NamedExoticComponent<UnifiedEventDetailProps>;
|
|
14
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnifiedEventDetail.d.ts","sourceRoot":"","sources":["../../../src/components/UnifiedEventDetail.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"UnifiedEventDetail.d.ts","sourceRoot":"","sources":["../../../src/components/UnifiedEventDetail.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAiB,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAU1E,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,UAAU,CAAC;AA8K1D,UAAU,uBAAuB;IAC/B,KAAK,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,+BAA+B,CAAC,EAAE,aAAa,CAAC;QAC9C,KAAK,EAAE,OAAO,CAAC;QACf,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAC9B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;KAC3C,CAAC,CAAC;IACH;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,aAAa,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;CAC/D;AAED,eAAO,MAAM,kBAAkB,+DA8N7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnifiedEvents.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUnifiedEvents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"useUnifiedEvents.d.ts","sourceRoot":"","sources":["../../../src/hooks/useUnifiedEvents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA4HtE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,gBAAgB,EAAE,UAAU,EAAE,CAAC;IAC/B,cAAc,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IACjC,YAAY,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gEAAgE;IAChE,iBAAiB,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IACpC,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,0EAA0E;IAC1E,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,gBAAgB,IAAI,sBAAsB,CAsXzD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EventSource } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Map an event source (the granular UI badge identity) to its parent discovery
|
|
4
|
+
* ID (the key used by unifiedEventStore's source subscriptions). Several event
|
|
5
|
+
* sources can share one discovery source — e.g. storage-async + storage-mmkv
|
|
6
|
+
* both come from the "storage" discovery source, and the react-query family all
|
|
7
|
+
* map to "react-query".
|
|
8
|
+
*
|
|
9
|
+
* Shared by useUnifiedEvents (the on-device consumer) and unifiedEventStore's
|
|
10
|
+
* remote-consumer channel so the mapping lives in exactly one place.
|
|
11
|
+
*/
|
|
12
|
+
export declare const EVENT_SOURCE_TO_DISCOVERY_ID: Record<EventSource, string>;
|
|
13
|
+
//# sourceMappingURL=sourceIds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sourceIds.d.ts","sourceRoot":"","sources":["../../../src/sources/sourceIds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAYpE,CAAC"}
|
|
@@ -15,6 +15,7 @@ declare class UnifiedEventStore {
|
|
|
15
15
|
private clearListeners;
|
|
16
16
|
private remoteAvailableSources;
|
|
17
17
|
private sourceUnsubscribers;
|
|
18
|
+
private remoteDiscoveryIds;
|
|
18
19
|
private networkEventIdMap;
|
|
19
20
|
/**
|
|
20
21
|
* Get all discovered event sources
|
|
@@ -29,6 +30,11 @@ declare class UnifiedEventStore {
|
|
|
29
30
|
* Override source availability with the synced device's (auto-discovery
|
|
30
31
|
* finds nothing on the dashboard — the tool packages live on the device).
|
|
31
32
|
* Pass null to restore local discovery.
|
|
33
|
+
*
|
|
34
|
+
* Notifies listeners when the set actually changes so consumers
|
|
35
|
+
* (useUnifiedEvents) can refresh their available-source list — this is the
|
|
36
|
+
* only signal the dashboard's filter badge bar gets when capture is OFF and
|
|
37
|
+
* no events are flowing to trigger replaceEvents().
|
|
32
38
|
*/
|
|
33
39
|
setRemoteAvailableSources(sources: EventSource[] | null): void;
|
|
34
40
|
/**
|
|
@@ -50,7 +56,8 @@ declare class UnifiedEventStore {
|
|
|
50
56
|
*/
|
|
51
57
|
subscribeToSource(source: DiscoveredEventSource): Promise<void>;
|
|
52
58
|
/**
|
|
53
|
-
* Unsubscribe from a specific source by ID
|
|
59
|
+
* Unsubscribe from a specific source by ID. Ref-counted: the real teardown
|
|
60
|
+
* only runs when the last consumer drops it.
|
|
54
61
|
*/
|
|
55
62
|
unsubscribeFromSource(sourceId: string): void;
|
|
56
63
|
/**
|
|
@@ -153,6 +160,27 @@ declare class UnifiedEventStore {
|
|
|
153
160
|
* Unsubscribe from all sources
|
|
154
161
|
*/
|
|
155
162
|
unsubscribeAll(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Remote-consumer channel: the dashboard sync adapter declares which event
|
|
165
|
+
* sources it wants the device to capture. Diffed against the previous remote
|
|
166
|
+
* set so only changed sources are (un)subscribed; ref-counting keeps the
|
|
167
|
+
* on-device EventsModal's own subscriptions intact. Pass "all" to capture
|
|
168
|
+
* every discovered source except the high-frequency excluded ones.
|
|
169
|
+
*/
|
|
170
|
+
setRemoteEnabledSources(sources: EventSource[] | "all"): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Called by the sync adapter when a dashboard starts watching: default to all
|
|
173
|
+
* sources, but ONLY if the dashboard hasn't already declared a selection for
|
|
174
|
+
* this watch session (the setEnabledSources action can arrive before the
|
|
175
|
+
* watch). Keeps backward compatibility with dashboards that never narrow.
|
|
176
|
+
*/
|
|
177
|
+
ensureRemoteSourcesDefault(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Release all of the remote consumer's source subscriptions (e.g. when the
|
|
180
|
+
* dashboard stops watching the events tool). Ref-counting means sources the
|
|
181
|
+
* on-device EventsModal also wants stay subscribed.
|
|
182
|
+
*/
|
|
183
|
+
clearRemoteSources(): void;
|
|
156
184
|
/**
|
|
157
185
|
* Check if a specific source is currently subscribed
|
|
158
186
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unifiedEventStore.d.ts","sourceRoot":"","sources":["../../../src/stores/unifiedEventStore.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK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,oCACS,CAAC;AAC5C,eAAO,MAAM,cAAc,YAA2C,CAAC;AAGvE,eAAO,MAAM,oBAAoB,+BAAiD,CAAC;AACnF,eAAO,MAAM,wBAAwB,wBAAqD,CAAC;AAC3F,eAAO,MAAM,cAAc,qBAA2C,CAAC;AACvE,eAAO,MAAM,mBAAmB,kCAAgD,CAAC;AAGjF,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -1,23 +1,37 @@
|
|
|
1
|
+
import type { EventSource } from "../types";
|
|
1
2
|
/**
|
|
2
3
|
* Sync adapter for the events tool, consumed by @buoy-gg/external-sync's
|
|
3
4
|
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
4
5
|
* this package doesn't need a dependency on it).
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* This adapter is the "remote consumer" of the unified event store. While a
|
|
8
|
+
* dashboard is watching, it requests a SET of event sources (defaulting to all,
|
|
9
|
+
* narrowed by the dashboard via `setEnabledSources`). On unwatch it releases
|
|
10
|
+
* those requests, so — unlike before — the device stops capturing sources that
|
|
11
|
+
* nothing else is watching. Source requests are ref-counted in the store, so
|
|
12
|
+
* the on-device EventsModal keeps working when open at the same time.
|
|
13
|
+
*
|
|
14
|
+
* The snapshot carries the device's available sources so the dashboard can
|
|
15
|
+
* render the source filter chips (its own auto-discovery finds nothing — the
|
|
16
|
+
* tool packages live on the device).
|
|
11
17
|
*/
|
|
12
18
|
export declare const eventsSyncAdapter: {
|
|
13
19
|
version: number;
|
|
14
20
|
getSnapshot: () => {
|
|
15
21
|
events: import("..").UnifiedEvent[];
|
|
16
|
-
availableSources:
|
|
22
|
+
availableSources: EventSource[];
|
|
17
23
|
};
|
|
18
24
|
subscribe: (onChange: () => void) => () => void;
|
|
19
25
|
actions: {
|
|
20
26
|
clearEvents: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Narrow which sources the device captures for this dashboard, driven by
|
|
29
|
+
* the dashboard's source badges. Ref-counted in the store, so disabling a
|
|
30
|
+
* source here only stops its capture if no other consumer wants it.
|
|
31
|
+
*/
|
|
32
|
+
setEnabledSources: (params: unknown) => {
|
|
33
|
+
enabledSources: EventSource[];
|
|
34
|
+
};
|
|
21
35
|
};
|
|
22
36
|
};
|
|
23
37
|
//# sourceMappingURL=eventsSyncAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventsSyncAdapter.d.ts","sourceRoot":"","sources":["../../../src/sync/eventsSyncAdapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"eventsSyncAdapter.d.ts","sourceRoot":"","sources":["../../../src/sync/eventsSyncAdapter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB;;;;;;0BAMN,MAAM,IAAI;;;QAkB9B;;;;WAIG;oCACyB,OAAO;;;;CAOtC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/events",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "events package",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
],
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@buoy-gg/floating-tools-core": "
|
|
31
|
-
"@buoy-gg/shared-ui": "
|
|
30
|
+
"@buoy-gg/floating-tools-core": "4.0.1",
|
|
31
|
+
"@buoy-gg/shared-ui": "4.0.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "*",
|