MCPcopy Create free account
hub / github.com/bywwcnll/StreamPanel / getCurrentConnectionExportData

Function getCurrentConnectionExportData

devtools/modules/exportManager.js:47–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47export function getCurrentConnectionExportData() {
48 const connection = state.connections[state.selectedConnectionId];
49 if (!connection) {
50 return null;
51 }
52
53 const messages = getVisibleMessages(connection.messages);
54
55 return {
56 connection: getConnectionExportInfo(connection),
57 messages: messages.map(msg => ({
58 id: msg.id,
59 eventType: msg.eventType,
60 data: msg.data,
61 lastEventId: msg.lastEventId,
62 timestamp: formatTimestampForExport(msg.timestamp)
63 })),
64 exportedAt: new Date().toISOString(),
65 totalMessages: messages.length,
66 appliedFilters: getAppliedFiltersMetadata()
67 };
68}
69
70export function getAllConnectionsExportData() {
71 const connections = Object.values(state.connections);

Callers 1

handleExportFunction · 0.70

Calls 4

formatTimestampForExportFunction · 0.90
getVisibleMessagesFunction · 0.70
getConnectionExportInfoFunction · 0.70

Tested by

no test coverage detected