@buoy-gg/network 1.7.7 → 2.1.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/index.js +86 -16
- package/lib/commonjs/network/components/NetworkCopySettingsView.js +2 -3
- package/lib/commonjs/network/components/NetworkEventDetailView.js +7 -0
- package/lib/commonjs/network/components/NetworkEventItemCompact.js +57 -55
- package/lib/commonjs/network/components/NetworkModal.js +15 -12
- package/lib/commonjs/network/index.js +13 -0
- package/lib/module/index.js +44 -3
- package/lib/module/network/components/NetworkCopySettingsView.js +2 -3
- package/lib/module/network/components/NetworkEventDetailView.js +8 -1
- package/lib/module/network/components/NetworkEventItemCompact.js +58 -56
- package/lib/module/network/components/NetworkModal.js +16 -13
- package/lib/module/network/index.js +1 -0
- package/lib/typescript/index.d.ts +20 -1
- package/lib/typescript/index.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/NetworkModal.d.ts.map +1 -1
- package/lib/typescript/network/index.d.ts +1 -0
- package/lib/typescript/network/index.d.ts.map +1 -1
- package/package.json +16 -3
package/lib/commonjs/index.js
CHANGED
|
@@ -3,32 +3,102 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
Object.defineProperty(exports, "NetworkEventDetailView", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _NetworkEventDetailView.NetworkEventDetailView;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "NetworkEventItemCompact", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _NetworkEventItemCompact.NetworkEventItemCompact;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "NetworkModal", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _NetworkModal.NetworkModal;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "TickProvider", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _useTickEveryMinute.TickProvider;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "addNetworkListener", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _networkListener.addNetworkListener;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
10
36
|
Object.defineProperty(exports, "createNetworkTool", {
|
|
11
37
|
enumerable: true,
|
|
12
38
|
get: function () {
|
|
13
39
|
return _preset.createNetworkTool;
|
|
14
40
|
}
|
|
15
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "formatBytes", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _formatting.formatBytes;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "formatDuration", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _formatting.formatDuration;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "formatHttpStatus", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _formatting.formatHttpStatus;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "networkEventStore", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _networkEventStore.networkEventStore;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "networkListener", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _networkListener.networkListener;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
16
72
|
Object.defineProperty(exports, "networkToolPreset", {
|
|
17
73
|
enumerable: true,
|
|
18
74
|
get: function () {
|
|
19
75
|
return _preset.networkToolPreset;
|
|
20
76
|
}
|
|
21
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "removeAllNetworkListeners", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _networkListener.removeAllNetworkListeners;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "useNetworkEvents", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _useNetworkEvents.useNetworkEvents;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "useTickEveryMinute", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _useTickEveryMinute.useTickEveryMinute;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
22
96
|
var _preset = require("./preset");
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return _network[key];
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
97
|
+
var _NetworkModal = require("./network/components/NetworkModal");
|
|
98
|
+
var _NetworkEventDetailView = require("./network/components/NetworkEventDetailView");
|
|
99
|
+
var _NetworkEventItemCompact = require("./network/components/NetworkEventItemCompact");
|
|
100
|
+
var _useNetworkEvents = require("./network/hooks/useNetworkEvents");
|
|
101
|
+
var _useTickEveryMinute = require("./network/hooks/useTickEveryMinute");
|
|
102
|
+
var _formatting = require("./network/utils/formatting");
|
|
103
|
+
var _networkEventStore = require("./network/utils/networkEventStore");
|
|
104
|
+
var _networkListener = require("./network/utils/networkListener");
|
|
@@ -613,11 +613,10 @@ function NetworkCopySettingsView({
|
|
|
613
613
|
style: styles.statusLabel,
|
|
614
614
|
children: statusLabel
|
|
615
615
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolbarCopyButton, {
|
|
616
|
-
value: generateCopyText()
|
|
617
|
-
disabled: !isPro
|
|
616
|
+
value: generateCopyText()
|
|
618
617
|
})]
|
|
619
618
|
});
|
|
620
|
-
}, [hasLiveData, lastEventTimestamp, tick, generateCopyText
|
|
619
|
+
}, [hasLiveData, lastEventTimestamp, tick, generateCopyText]);
|
|
621
620
|
|
|
622
621
|
// Render preview content only
|
|
623
622
|
const renderPreviewContent = (0, _react.useCallback)(() => {
|
|
@@ -180,6 +180,13 @@ function NetworkEventDetailView({
|
|
|
180
180
|
} = (0, _sharedUi.useFeatureGate)();
|
|
181
181
|
const [showUpgradeModal, setShowUpgradeModal] = (0, _react.useState)(false);
|
|
182
182
|
|
|
183
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
184
|
+
(0, _react.useEffect)(() => {
|
|
185
|
+
if (showUpgradeModal && isPro) {
|
|
186
|
+
setShowUpgradeModal(false);
|
|
187
|
+
}
|
|
188
|
+
}, [showUpgradeModal, isPro]);
|
|
189
|
+
|
|
183
190
|
// Generate full request details for copying
|
|
184
191
|
const getFullRequestDetails = () => {
|
|
185
192
|
const requestDetails = {
|
|
@@ -147,18 +147,20 @@ const NetworkEventItemCompact = exports.NetworkEventItemCompact = /*#__PURE__*/(
|
|
|
147
147
|
hour12: true
|
|
148
148
|
});
|
|
149
149
|
const relativeTime = (0, _sharedUi.formatRelativeTime)(event.timestamp, tick);
|
|
150
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.
|
|
150
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.DevToolsCard, {
|
|
151
151
|
onPress: () => onPress(event),
|
|
152
|
-
style:
|
|
152
|
+
style: styles.cardWrapper,
|
|
153
|
+
contentStyle: [styles.container, {
|
|
153
154
|
borderLeftColor: statusColor
|
|
154
155
|
}],
|
|
155
156
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
156
|
-
style: styles.
|
|
157
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
style: styles.topRightContainer,
|
|
158
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StatusIndicator, {
|
|
159
|
+
event: event,
|
|
160
|
+
isPending: isPending,
|
|
161
|
+
statusColor: statusColor
|
|
160
162
|
}), event.requestClient && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
161
|
-
style: [styles.
|
|
163
|
+
style: [styles.topRightBadge, {
|
|
162
164
|
backgroundColor: event.requestClient === "fetch" ? "rgba(74, 144, 226, 0.15)" : event.requestClient === "graphql" ? "rgba(229, 53, 171, 0.15)" : event.requestClient === "grpc-web" ? "rgba(16, 185, 129, 0.15)" : "rgba(147, 51, 234, 0.15)"
|
|
163
165
|
}],
|
|
164
166
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
@@ -167,6 +169,12 @@ const NetworkEventItemCompact = exports.NetworkEventItemCompact = /*#__PURE__*/(
|
|
|
167
169
|
}],
|
|
168
170
|
children: event.requestClient === "graphql" ? "GQL" : event.requestClient === "grpc-web" ? "gRPC" : event.requestClient
|
|
169
171
|
})
|
|
172
|
+
})]
|
|
173
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
174
|
+
style: styles.leftSection,
|
|
175
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.MethodBadge, {
|
|
176
|
+
method: event.method,
|
|
177
|
+
size: "small"
|
|
170
178
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SizeIndicators, {
|
|
171
179
|
requestSize: event.requestSize,
|
|
172
180
|
responseSize: event.responseSize
|
|
@@ -180,50 +188,51 @@ const NetworkEventItemCompact = exports.NetworkEventItemCompact = /*#__PURE__*/(
|
|
|
180
188
|
})
|
|
181
189
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
182
190
|
style: styles.rightSection,
|
|
183
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}), event.duration ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
190
|
-
style: styles.durationText,
|
|
191
|
-
children: (0, _formatting.formatDuration)(event.duration)
|
|
192
|
-
}) : null, contentType ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.TypeBadge, {
|
|
193
|
-
type: contentType,
|
|
194
|
-
size: "small"
|
|
195
|
-
}) : null]
|
|
196
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
197
|
-
style: styles.rightBottomRow,
|
|
198
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ListItem.Metadata, {
|
|
199
|
-
children: [timeString, " (", relativeTime, ")"]
|
|
200
|
-
})
|
|
191
|
+
children: [contentType ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.TypeBadge, {
|
|
192
|
+
type: contentType,
|
|
193
|
+
size: "small"
|
|
194
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronRight, {
|
|
195
|
+
size: 14,
|
|
196
|
+
color: _sharedUi.macOSColors.text.muted
|
|
201
197
|
})]
|
|
202
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
203
|
-
|
|
204
|
-
|
|
198
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
199
|
+
style: styles.bottomRightContainer,
|
|
200
|
+
children: event.duration ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
201
|
+
style: styles.bottomRightText,
|
|
202
|
+
children: [(0, _formatting.formatDuration)(event.duration), " ", relativeTime]
|
|
203
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
204
|
+
style: styles.bottomRightText,
|
|
205
|
+
children: relativeTime
|
|
206
|
+
})
|
|
205
207
|
})]
|
|
206
208
|
});
|
|
207
209
|
});
|
|
208
210
|
const styles = _reactNative.StyleSheet.create({
|
|
211
|
+
cardWrapper: {
|
|
212
|
+
marginHorizontal: 8
|
|
213
|
+
},
|
|
209
214
|
container: {
|
|
210
215
|
flexDirection: "row",
|
|
211
216
|
alignItems: "center",
|
|
212
|
-
backgroundColor: _sharedUi.macOSColors.background.card,
|
|
213
|
-
borderRadius: 6,
|
|
214
|
-
paddingVertical: 8,
|
|
215
|
-
paddingHorizontal: 10,
|
|
216
|
-
paddingLeft: 8,
|
|
217
|
-
marginBottom: 4,
|
|
218
|
-
marginHorizontal: 12,
|
|
219
|
-
minHeight: 44,
|
|
220
217
|
borderLeftWidth: 3,
|
|
221
218
|
borderLeftColor: "transparent"
|
|
222
219
|
},
|
|
223
220
|
leftSection: {
|
|
224
221
|
marginRight: 8,
|
|
225
|
-
alignItems: "flex-start"
|
|
226
|
-
|
|
222
|
+
alignItems: "flex-start"
|
|
223
|
+
},
|
|
224
|
+
topRightContainer: {
|
|
225
|
+
position: "absolute",
|
|
226
|
+
top: 1,
|
|
227
|
+
right: 1,
|
|
228
|
+
flexDirection: "row",
|
|
229
|
+
alignItems: "center",
|
|
230
|
+
gap: 4
|
|
231
|
+
},
|
|
232
|
+
topRightBadge: {
|
|
233
|
+
paddingHorizontal: 4,
|
|
234
|
+
paddingVertical: 2,
|
|
235
|
+
borderRadius: 4
|
|
227
236
|
},
|
|
228
237
|
middleSection: {
|
|
229
238
|
flex: 1,
|
|
@@ -237,20 +246,19 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
237
246
|
fontFamily: "monospace"
|
|
238
247
|
},
|
|
239
248
|
rightSection: {
|
|
240
|
-
alignItems: "flex-end",
|
|
241
|
-
justifyContent: "center",
|
|
242
|
-
marginRight: 4
|
|
243
|
-
},
|
|
244
|
-
rightTopRow: {
|
|
245
249
|
flexDirection: "row",
|
|
246
250
|
alignItems: "center",
|
|
247
|
-
gap: 6
|
|
248
|
-
marginBottom: 2
|
|
251
|
+
gap: 6
|
|
249
252
|
},
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
bottomRightContainer: {
|
|
254
|
+
position: "absolute",
|
|
255
|
+
bottom: 4,
|
|
256
|
+
right: 8
|
|
257
|
+
},
|
|
258
|
+
bottomRightText: {
|
|
259
|
+
fontSize: 9,
|
|
260
|
+
color: _sharedUi.macOSColors.text.muted,
|
|
261
|
+
fontFamily: "monospace"
|
|
254
262
|
},
|
|
255
263
|
statusBadge: {
|
|
256
264
|
paddingHorizontal: 4,
|
|
@@ -308,12 +316,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
308
316
|
color: _sharedUi.macOSColors.text.secondary,
|
|
309
317
|
fontFamily: "monospace"
|
|
310
318
|
},
|
|
311
|
-
clientBadge: {
|
|
312
|
-
paddingHorizontal: 4,
|
|
313
|
-
paddingVertical: 2,
|
|
314
|
-
borderRadius: 3,
|
|
315
|
-
marginTop: 4
|
|
316
|
-
},
|
|
317
319
|
clientText: {
|
|
318
320
|
fontSize: 8,
|
|
319
321
|
fontWeight: "700",
|
|
@@ -72,19 +72,22 @@ function NetworkModalInner({
|
|
|
72
72
|
const flatListRef = (0, _react.useRef)(null);
|
|
73
73
|
const hasLoadedFilters = (0, _react.useRef)(false);
|
|
74
74
|
const hasLoadedCopySettings = (0, _react.useRef)(false);
|
|
75
|
-
const {
|
|
76
|
-
getItem: safeGetItem,
|
|
77
|
-
setItem: safeSetItem
|
|
78
|
-
} = (0, _sharedUi.useSafeAsyncStorage)();
|
|
79
75
|
const [showUpgradeModal, setShowUpgradeModal] = (0, _react.useState)(false);
|
|
80
76
|
|
|
77
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
78
|
+
(0, _react.useEffect)(() => {
|
|
79
|
+
if (showUpgradeModal && isPro) {
|
|
80
|
+
setShowUpgradeModal(false);
|
|
81
|
+
}
|
|
82
|
+
}, [showUpgradeModal, isPro]);
|
|
83
|
+
|
|
81
84
|
// Load persisted filters on mount
|
|
82
85
|
(0, _react.useEffect)(() => {
|
|
83
86
|
if (!visible || hasLoadedFilters.current) return;
|
|
84
87
|
const loadFilters = async () => {
|
|
85
88
|
try {
|
|
86
89
|
// Load ignored patterns (using domains key for now)
|
|
87
|
-
const storedPatterns = await
|
|
90
|
+
const storedPatterns = await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.network.ignoredDomains());
|
|
88
91
|
if (storedPatterns) {
|
|
89
92
|
const patterns = JSON.parse(storedPatterns);
|
|
90
93
|
setIgnoredPatterns(new Set(patterns));
|
|
@@ -96,7 +99,7 @@ function NetworkModalInner({
|
|
|
96
99
|
}
|
|
97
100
|
};
|
|
98
101
|
loadFilters();
|
|
99
|
-
}, [visible
|
|
102
|
+
}, [visible]);
|
|
100
103
|
|
|
101
104
|
// Save filters when they change
|
|
102
105
|
(0, _react.useEffect)(() => {
|
|
@@ -106,20 +109,20 @@ function NetworkModalInner({
|
|
|
106
109
|
try {
|
|
107
110
|
// Save ignored patterns
|
|
108
111
|
const patterns = Array.from(ignoredPatterns);
|
|
109
|
-
await
|
|
112
|
+
await _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.network.ignoredDomains(), JSON.stringify(patterns));
|
|
110
113
|
} catch (_error) {
|
|
111
114
|
// Silently fail - filters will remain in memory
|
|
112
115
|
}
|
|
113
116
|
};
|
|
114
117
|
saveFilters();
|
|
115
|
-
}, [ignoredPatterns
|
|
118
|
+
}, [ignoredPatterns]);
|
|
116
119
|
|
|
117
120
|
// Load persisted copy settings on mount
|
|
118
121
|
(0, _react.useEffect)(() => {
|
|
119
122
|
if (!visible || hasLoadedCopySettings.current) return;
|
|
120
123
|
const loadCopySettings = async () => {
|
|
121
124
|
try {
|
|
122
|
-
const stored = await
|
|
125
|
+
const stored = await _sharedUi.persistentStorage.getItem(_sharedUi.devToolsStorageKeys.network.copyOptions());
|
|
123
126
|
if (stored) {
|
|
124
127
|
const settings = JSON.parse(stored);
|
|
125
128
|
setCopySettings(settings);
|
|
@@ -131,7 +134,7 @@ function NetworkModalInner({
|
|
|
131
134
|
}
|
|
132
135
|
};
|
|
133
136
|
loadCopySettings();
|
|
134
|
-
}, [visible
|
|
137
|
+
}, [visible]);
|
|
135
138
|
|
|
136
139
|
// Save copy settings when they change
|
|
137
140
|
(0, _react.useEffect)(() => {
|
|
@@ -139,13 +142,13 @@ function NetworkModalInner({
|
|
|
139
142
|
|
|
140
143
|
const saveCopySettings = async () => {
|
|
141
144
|
try {
|
|
142
|
-
await
|
|
145
|
+
await _sharedUi.persistentStorage.setItem(_sharedUi.devToolsStorageKeys.network.copyOptions(), JSON.stringify(copySettings));
|
|
143
146
|
} catch (_error) {
|
|
144
147
|
// Silently fail - settings will remain in memory
|
|
145
148
|
}
|
|
146
149
|
};
|
|
147
150
|
saveCopySettings();
|
|
148
|
-
}, [copySettings
|
|
151
|
+
}, [copySettings]);
|
|
149
152
|
|
|
150
153
|
// Simple handlers - no useCallback needed per rule2
|
|
151
154
|
const handleEventPress = event => {
|
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "NetworkModal", {
|
|
|
21
21
|
return _NetworkModal.NetworkModal;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "TickProvider", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _useTickEveryMinute.TickProvider;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "addNetworkListener", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function () {
|
|
@@ -93,10 +99,17 @@ Object.defineProperty(exports, "useNetworkEvents", {
|
|
|
93
99
|
return _useNetworkEvents.useNetworkEvents;
|
|
94
100
|
}
|
|
95
101
|
});
|
|
102
|
+
Object.defineProperty(exports, "useTickEveryMinute", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _useTickEveryMinute.useTickEveryMinute;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
96
108
|
var _NetworkModal = require("./components/NetworkModal");
|
|
97
109
|
var _NetworkEventDetailView = require("./components/NetworkEventDetailView");
|
|
98
110
|
var _NetworkEventItemCompact = require("./components/NetworkEventItemCompact");
|
|
99
111
|
var _useNetworkEvents = require("./hooks/useNetworkEvents");
|
|
112
|
+
var _useTickEveryMinute = require("./hooks/useTickEveryMinute");
|
|
100
113
|
var _networkListener = require("./utils/networkListener");
|
|
101
114
|
var _networkEventStore = require("./utils/networkEventStore");
|
|
102
115
|
var _formatting = require("./utils/formatting");
|
package/lib/module/index.js
CHANGED
|
@@ -1,7 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @buoy-gg/network
|
|
5
|
+
*
|
|
6
|
+
* Network monitoring tool for React Native DevTools.
|
|
7
|
+
*
|
|
8
|
+
* PUBLIC API - Only these exports are supported for external use.
|
|
9
|
+
* Internal utilities (listeners, stores) are not exported to prevent
|
|
10
|
+
* bypassing the tool's intended usage patterns.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// PRESET (Primary entry point for users)
|
|
15
|
+
// =============================================================================
|
|
4
16
|
export { networkToolPreset, createNetworkTool } from "./preset";
|
|
5
17
|
|
|
6
|
-
//
|
|
7
|
-
|
|
18
|
+
// =============================================================================
|
|
19
|
+
// COMPONENTS (For custom UI implementations)
|
|
20
|
+
// =============================================================================
|
|
21
|
+
export { NetworkModal } from "./network/components/NetworkModal";
|
|
22
|
+
export { NetworkEventDetailView } from "./network/components/NetworkEventDetailView";
|
|
23
|
+
export { NetworkEventItemCompact } from "./network/components/NetworkEventItemCompact";
|
|
24
|
+
|
|
25
|
+
// =============================================================================
|
|
26
|
+
// HOOKS (For consuming network data in custom components)
|
|
27
|
+
// =============================================================================
|
|
28
|
+
export { useNetworkEvents } from "./network/hooks/useNetworkEvents";
|
|
29
|
+
export { TickProvider, useTickEveryMinute } from "./network/hooks/useTickEveryMinute";
|
|
30
|
+
|
|
31
|
+
// =============================================================================
|
|
32
|
+
// UTILITIES (Formatting helpers)
|
|
33
|
+
// =============================================================================
|
|
34
|
+
export { formatBytes, formatDuration, formatHttpStatus } from "./network/utils/formatting";
|
|
35
|
+
|
|
36
|
+
// =============================================================================
|
|
37
|
+
// TYPES (For TypeScript users)
|
|
38
|
+
// =============================================================================
|
|
39
|
+
|
|
40
|
+
// =============================================================================
|
|
41
|
+
// INTERNAL EXPORTS (For @buoy-gg/* packages only - not part of public API)
|
|
42
|
+
// These are re-exported for cross-package communication within the monorepo.
|
|
43
|
+
// External users should NOT rely on these - they may change without notice.
|
|
44
|
+
// =============================================================================
|
|
45
|
+
/** @internal */
|
|
46
|
+
export { networkEventStore } from "./network/utils/networkEventStore";
|
|
47
|
+
/** @internal */
|
|
48
|
+
export { networkListener, addNetworkListener, removeAllNetworkListeners } from "./network/utils/networkListener";
|
|
@@ -608,11 +608,10 @@ export function NetworkCopySettingsView({
|
|
|
608
608
|
style: styles.statusLabel,
|
|
609
609
|
children: statusLabel
|
|
610
610
|
}), /*#__PURE__*/_jsx(ToolbarCopyButton, {
|
|
611
|
-
value: generateCopyText()
|
|
612
|
-
disabled: !isPro
|
|
611
|
+
value: generateCopyText()
|
|
613
612
|
})]
|
|
614
613
|
});
|
|
615
|
-
}, [hasLiveData, lastEventTimestamp, tick, generateCopyText
|
|
614
|
+
}, [hasLiveData, lastEventTimestamp, tick, generateCopyText]);
|
|
616
615
|
|
|
617
616
|
// Render preview content only
|
|
618
617
|
const renderPreviewContent = useCallback(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useState } from "react";
|
|
3
|
+
import { useState, useEffect } from "react";
|
|
4
4
|
import { View, Text, StyleSheet, ScrollView, TouchableOpacity } from "react-native";
|
|
5
5
|
import { Clock, Upload, Download, AlertCircle, ChevronDown, ChevronUp, Lock, Unlock, FileJson, Filter, Globe, Link, Copy, InlineCopyButton, macOSColors, useFeatureGate, UpgradeModal } from "@buoy-gg/shared-ui";
|
|
6
6
|
import { formatBytes, formatDuration, formatHttpStatus } from "../utils/formatting";
|
|
@@ -177,6 +177,13 @@ export function NetworkEventDetailView({
|
|
|
177
177
|
} = useFeatureGate();
|
|
178
178
|
const [showUpgradeModal, setShowUpgradeModal] = useState(false);
|
|
179
179
|
|
|
180
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
181
|
+
useEffect(() => {
|
|
182
|
+
if (showUpgradeModal && isPro) {
|
|
183
|
+
setShowUpgradeModal(false);
|
|
184
|
+
}
|
|
185
|
+
}, [showUpgradeModal, isPro]);
|
|
186
|
+
|
|
180
187
|
// Generate full request details for copying
|
|
181
188
|
const getFullRequestDetails = () => {
|
|
182
189
|
const requestDetails = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
import { StyleSheet, View, Text } from "react-native";
|
|
5
|
-
import { ChevronRight, Upload, Download, Clock, AlertCircle,
|
|
5
|
+
import { ChevronRight, Upload, Download, Clock, AlertCircle, DevToolsCard, MethodBadge, TypeBadge, macOSColors } from "@buoy-gg/shared-ui";
|
|
6
6
|
import { formatBytes, formatDuration } from "../utils/formatting";
|
|
7
7
|
import { formatRelativeTime } from "@buoy-gg/shared-ui";
|
|
8
8
|
import { useTickEveryMinute } from "../hooks/useTickEveryMinute";
|
|
@@ -144,18 +144,20 @@ export const NetworkEventItemCompact = /*#__PURE__*/memo(({
|
|
|
144
144
|
hour12: true
|
|
145
145
|
});
|
|
146
146
|
const relativeTime = formatRelativeTime(event.timestamp, tick);
|
|
147
|
-
return /*#__PURE__*/_jsxs(
|
|
147
|
+
return /*#__PURE__*/_jsxs(DevToolsCard, {
|
|
148
148
|
onPress: () => onPress(event),
|
|
149
|
-
style:
|
|
149
|
+
style: styles.cardWrapper,
|
|
150
|
+
contentStyle: [styles.container, {
|
|
150
151
|
borderLeftColor: statusColor
|
|
151
152
|
}],
|
|
152
153
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
153
|
-
style: styles.
|
|
154
|
-
children: [/*#__PURE__*/_jsx(
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
style: styles.topRightContainer,
|
|
155
|
+
children: [/*#__PURE__*/_jsx(StatusIndicator, {
|
|
156
|
+
event: event,
|
|
157
|
+
isPending: isPending,
|
|
158
|
+
statusColor: statusColor
|
|
157
159
|
}), event.requestClient && /*#__PURE__*/_jsx(View, {
|
|
158
|
-
style: [styles.
|
|
160
|
+
style: [styles.topRightBadge, {
|
|
159
161
|
backgroundColor: event.requestClient === "fetch" ? "rgba(74, 144, 226, 0.15)" : event.requestClient === "graphql" ? "rgba(229, 53, 171, 0.15)" : event.requestClient === "grpc-web" ? "rgba(16, 185, 129, 0.15)" : "rgba(147, 51, 234, 0.15)"
|
|
160
162
|
}],
|
|
161
163
|
children: /*#__PURE__*/_jsx(Text, {
|
|
@@ -164,6 +166,12 @@ export const NetworkEventItemCompact = /*#__PURE__*/memo(({
|
|
|
164
166
|
}],
|
|
165
167
|
children: event.requestClient === "graphql" ? "GQL" : event.requestClient === "grpc-web" ? "gRPC" : event.requestClient
|
|
166
168
|
})
|
|
169
|
+
})]
|
|
170
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
171
|
+
style: styles.leftSection,
|
|
172
|
+
children: [/*#__PURE__*/_jsx(MethodBadge, {
|
|
173
|
+
method: event.method,
|
|
174
|
+
size: "small"
|
|
167
175
|
}), /*#__PURE__*/_jsx(SizeIndicators, {
|
|
168
176
|
requestSize: event.requestSize,
|
|
169
177
|
responseSize: event.responseSize
|
|
@@ -177,50 +185,51 @@ export const NetworkEventItemCompact = /*#__PURE__*/memo(({
|
|
|
177
185
|
})
|
|
178
186
|
}), /*#__PURE__*/_jsxs(View, {
|
|
179
187
|
style: styles.rightSection,
|
|
180
|
-
children: [/*#__PURE__*/
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}), event.duration ? /*#__PURE__*/_jsx(Text, {
|
|
187
|
-
style: styles.durationText,
|
|
188
|
-
children: formatDuration(event.duration)
|
|
189
|
-
}) : null, contentType ? /*#__PURE__*/_jsx(TypeBadge, {
|
|
190
|
-
type: contentType,
|
|
191
|
-
size: "small"
|
|
192
|
-
}) : null]
|
|
193
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
194
|
-
style: styles.rightBottomRow,
|
|
195
|
-
children: /*#__PURE__*/_jsxs(ListItem.Metadata, {
|
|
196
|
-
children: [timeString, " (", relativeTime, ")"]
|
|
197
|
-
})
|
|
188
|
+
children: [contentType ? /*#__PURE__*/_jsx(TypeBadge, {
|
|
189
|
+
type: contentType,
|
|
190
|
+
size: "small"
|
|
191
|
+
}) : null, /*#__PURE__*/_jsx(ChevronRight, {
|
|
192
|
+
size: 14,
|
|
193
|
+
color: macOSColors.text.muted
|
|
198
194
|
})]
|
|
199
|
-
}), /*#__PURE__*/_jsx(
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
196
|
+
style: styles.bottomRightContainer,
|
|
197
|
+
children: event.duration ? /*#__PURE__*/_jsxs(Text, {
|
|
198
|
+
style: styles.bottomRightText,
|
|
199
|
+
children: [formatDuration(event.duration), " ", relativeTime]
|
|
200
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
201
|
+
style: styles.bottomRightText,
|
|
202
|
+
children: relativeTime
|
|
203
|
+
})
|
|
202
204
|
})]
|
|
203
205
|
});
|
|
204
206
|
});
|
|
205
207
|
const styles = StyleSheet.create({
|
|
208
|
+
cardWrapper: {
|
|
209
|
+
marginHorizontal: 8
|
|
210
|
+
},
|
|
206
211
|
container: {
|
|
207
212
|
flexDirection: "row",
|
|
208
213
|
alignItems: "center",
|
|
209
|
-
backgroundColor: macOSColors.background.card,
|
|
210
|
-
borderRadius: 6,
|
|
211
|
-
paddingVertical: 8,
|
|
212
|
-
paddingHorizontal: 10,
|
|
213
|
-
paddingLeft: 8,
|
|
214
|
-
marginBottom: 4,
|
|
215
|
-
marginHorizontal: 12,
|
|
216
|
-
minHeight: 44,
|
|
217
214
|
borderLeftWidth: 3,
|
|
218
215
|
borderLeftColor: "transparent"
|
|
219
216
|
},
|
|
220
217
|
leftSection: {
|
|
221
218
|
marginRight: 8,
|
|
222
|
-
alignItems: "flex-start"
|
|
223
|
-
|
|
219
|
+
alignItems: "flex-start"
|
|
220
|
+
},
|
|
221
|
+
topRightContainer: {
|
|
222
|
+
position: "absolute",
|
|
223
|
+
top: 1,
|
|
224
|
+
right: 1,
|
|
225
|
+
flexDirection: "row",
|
|
226
|
+
alignItems: "center",
|
|
227
|
+
gap: 4
|
|
228
|
+
},
|
|
229
|
+
topRightBadge: {
|
|
230
|
+
paddingHorizontal: 4,
|
|
231
|
+
paddingVertical: 2,
|
|
232
|
+
borderRadius: 4
|
|
224
233
|
},
|
|
225
234
|
middleSection: {
|
|
226
235
|
flex: 1,
|
|
@@ -234,20 +243,19 @@ const styles = StyleSheet.create({
|
|
|
234
243
|
fontFamily: "monospace"
|
|
235
244
|
},
|
|
236
245
|
rightSection: {
|
|
237
|
-
alignItems: "flex-end",
|
|
238
|
-
justifyContent: "center",
|
|
239
|
-
marginRight: 4
|
|
240
|
-
},
|
|
241
|
-
rightTopRow: {
|
|
242
246
|
flexDirection: "row",
|
|
243
247
|
alignItems: "center",
|
|
244
|
-
gap: 6
|
|
245
|
-
marginBottom: 2
|
|
248
|
+
gap: 6
|
|
246
249
|
},
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
bottomRightContainer: {
|
|
251
|
+
position: "absolute",
|
|
252
|
+
bottom: 4,
|
|
253
|
+
right: 8
|
|
254
|
+
},
|
|
255
|
+
bottomRightText: {
|
|
256
|
+
fontSize: 9,
|
|
257
|
+
color: macOSColors.text.muted,
|
|
258
|
+
fontFamily: "monospace"
|
|
251
259
|
},
|
|
252
260
|
statusBadge: {
|
|
253
261
|
paddingHorizontal: 4,
|
|
@@ -305,12 +313,6 @@ const styles = StyleSheet.create({
|
|
|
305
313
|
color: macOSColors.text.secondary,
|
|
306
314
|
fontFamily: "monospace"
|
|
307
315
|
},
|
|
308
|
-
clientBadge: {
|
|
309
|
-
paddingHorizontal: 4,
|
|
310
|
-
paddingVertical: 2,
|
|
311
|
-
borderRadius: 3,
|
|
312
|
-
marginTop: 4
|
|
313
|
-
},
|
|
314
316
|
clientText: {
|
|
315
317
|
fontSize: 8,
|
|
316
318
|
fontWeight: "700",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState, useRef, useMemo, useCallback, useEffect } from "react";
|
|
4
4
|
import { View, Text, StyleSheet, TouchableOpacity, TextInput, FlatList } from "react-native";
|
|
5
|
-
import { Globe, Trash2, Power, Search, Filter, CheckCircle, XCircle, Clock, X, Copy, JsModal, ModalHeader, devToolsStorageKeys, macOSColors,
|
|
5
|
+
import { Globe, Trash2, Power, Search, Filter, CheckCircle, XCircle, Clock, X, Copy, JsModal, ModalHeader, devToolsStorageKeys, macOSColors, persistentStorage, CopyButton, TabSelector, useFeatureGate, UpgradeModal, ProBadge, Zap } from "@buoy-gg/shared-ui";
|
|
6
6
|
import { NetworkEventItemCompact } from "./NetworkEventItemCompact";
|
|
7
7
|
import { NetworkFilterViewV3 } from "./NetworkFilterViewV3";
|
|
8
8
|
import { TickProvider } from "../hooks/useTickEveryMinute";
|
|
@@ -68,19 +68,22 @@ function NetworkModalInner({
|
|
|
68
68
|
const flatListRef = useRef(null);
|
|
69
69
|
const hasLoadedFilters = useRef(false);
|
|
70
70
|
const hasLoadedCopySettings = useRef(false);
|
|
71
|
-
const {
|
|
72
|
-
getItem: safeGetItem,
|
|
73
|
-
setItem: safeSetItem
|
|
74
|
-
} = useSafeAsyncStorage();
|
|
75
71
|
const [showUpgradeModal, setShowUpgradeModal] = useState(false);
|
|
76
72
|
|
|
73
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
if (showUpgradeModal && isPro) {
|
|
76
|
+
setShowUpgradeModal(false);
|
|
77
|
+
}
|
|
78
|
+
}, [showUpgradeModal, isPro]);
|
|
79
|
+
|
|
77
80
|
// Load persisted filters on mount
|
|
78
81
|
useEffect(() => {
|
|
79
82
|
if (!visible || hasLoadedFilters.current) return;
|
|
80
83
|
const loadFilters = async () => {
|
|
81
84
|
try {
|
|
82
85
|
// Load ignored patterns (using domains key for now)
|
|
83
|
-
const storedPatterns = await
|
|
86
|
+
const storedPatterns = await persistentStorage.getItem(devToolsStorageKeys.network.ignoredDomains());
|
|
84
87
|
if (storedPatterns) {
|
|
85
88
|
const patterns = JSON.parse(storedPatterns);
|
|
86
89
|
setIgnoredPatterns(new Set(patterns));
|
|
@@ -92,7 +95,7 @@ function NetworkModalInner({
|
|
|
92
95
|
}
|
|
93
96
|
};
|
|
94
97
|
loadFilters();
|
|
95
|
-
}, [visible
|
|
98
|
+
}, [visible]);
|
|
96
99
|
|
|
97
100
|
// Save filters when they change
|
|
98
101
|
useEffect(() => {
|
|
@@ -102,20 +105,20 @@ function NetworkModalInner({
|
|
|
102
105
|
try {
|
|
103
106
|
// Save ignored patterns
|
|
104
107
|
const patterns = Array.from(ignoredPatterns);
|
|
105
|
-
await
|
|
108
|
+
await persistentStorage.setItem(devToolsStorageKeys.network.ignoredDomains(), JSON.stringify(patterns));
|
|
106
109
|
} catch (_error) {
|
|
107
110
|
// Silently fail - filters will remain in memory
|
|
108
111
|
}
|
|
109
112
|
};
|
|
110
113
|
saveFilters();
|
|
111
|
-
}, [ignoredPatterns
|
|
114
|
+
}, [ignoredPatterns]);
|
|
112
115
|
|
|
113
116
|
// Load persisted copy settings on mount
|
|
114
117
|
useEffect(() => {
|
|
115
118
|
if (!visible || hasLoadedCopySettings.current) return;
|
|
116
119
|
const loadCopySettings = async () => {
|
|
117
120
|
try {
|
|
118
|
-
const stored = await
|
|
121
|
+
const stored = await persistentStorage.getItem(devToolsStorageKeys.network.copyOptions());
|
|
119
122
|
if (stored) {
|
|
120
123
|
const settings = JSON.parse(stored);
|
|
121
124
|
setCopySettings(settings);
|
|
@@ -127,7 +130,7 @@ function NetworkModalInner({
|
|
|
127
130
|
}
|
|
128
131
|
};
|
|
129
132
|
loadCopySettings();
|
|
130
|
-
}, [visible
|
|
133
|
+
}, [visible]);
|
|
131
134
|
|
|
132
135
|
// Save copy settings when they change
|
|
133
136
|
useEffect(() => {
|
|
@@ -135,13 +138,13 @@ function NetworkModalInner({
|
|
|
135
138
|
|
|
136
139
|
const saveCopySettings = async () => {
|
|
137
140
|
try {
|
|
138
|
-
await
|
|
141
|
+
await persistentStorage.setItem(devToolsStorageKeys.network.copyOptions(), JSON.stringify(copySettings));
|
|
139
142
|
} catch (_error) {
|
|
140
143
|
// Silently fail - settings will remain in memory
|
|
141
144
|
}
|
|
142
145
|
};
|
|
143
146
|
saveCopySettings();
|
|
144
|
-
}, [copySettings
|
|
147
|
+
}, [copySettings]);
|
|
145
148
|
|
|
146
149
|
// Simple handlers - no useCallback needed per rule2
|
|
147
150
|
const handleEventPress = event => {
|
|
@@ -11,6 +11,7 @@ export { NetworkEventItemCompact } from "./components/NetworkEventItemCompact";
|
|
|
11
11
|
|
|
12
12
|
// Hooks
|
|
13
13
|
export { useNetworkEvents } from "./hooks/useNetworkEvents";
|
|
14
|
+
export { TickProvider, useTickEveryMinute } from "./hooks/useTickEveryMinute";
|
|
14
15
|
|
|
15
16
|
// Utils
|
|
16
17
|
export { networkListener, startNetworkListener, stopNetworkListener, addNetworkListener, removeAllNetworkListeners, isNetworkListening, getNetworkListenerCount } from "./utils/networkListener";
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @buoy-gg/network
|
|
3
|
+
*
|
|
4
|
+
* Network monitoring tool for React Native DevTools.
|
|
5
|
+
*
|
|
6
|
+
* PUBLIC API - Only these exports are supported for external use.
|
|
7
|
+
* Internal utilities (listeners, stores) are not exported to prevent
|
|
8
|
+
* bypassing the tool's intended usage patterns.
|
|
9
|
+
*/
|
|
1
10
|
export { networkToolPreset, createNetworkTool } from "./preset";
|
|
2
|
-
export
|
|
11
|
+
export { NetworkModal } from "./network/components/NetworkModal";
|
|
12
|
+
export { NetworkEventDetailView } from "./network/components/NetworkEventDetailView";
|
|
13
|
+
export { NetworkEventItemCompact } from "./network/components/NetworkEventItemCompact";
|
|
14
|
+
export { useNetworkEvents } from "./network/hooks/useNetworkEvents";
|
|
15
|
+
export { TickProvider, useTickEveryMinute } from "./network/hooks/useTickEveryMinute";
|
|
16
|
+
export { formatBytes, formatDuration, formatHttpStatus, } from "./network/utils/formatting";
|
|
17
|
+
export type { NetworkEvent, NetworkStats, NetworkFilter, NetworkEventStatus, NetworkInsight, } from "./network/types";
|
|
18
|
+
/** @internal */
|
|
19
|
+
export { networkEventStore } from "./network/utils/networkEventStore";
|
|
20
|
+
/** @internal */
|
|
21
|
+
export { networkListener, addNetworkListener, removeAllNetworkListeners, } from "./network/utils/networkListener";
|
|
3
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
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;AAKhE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAKvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAKtF,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAKpC,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,cAAc,GACf,MAAM,iBAAiB,CAAC;AAOzB,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,gBAAgB;AAChB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventDetailView.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventDetailView.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAU7C,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;CAC7C;AAmKD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,eAA2B,EAC3B,eAA0B,GAC3B,EAAE,2BAA2B,+
|
|
1
|
+
{"version":3,"file":"NetworkEventDetailView.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventDetailView.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAU7C,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;CAC7C;AAmKD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,eAA2B,EAC3B,eAA0B,GAC3B,EAAE,2BAA2B,+BAkZ7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkEventItemCompact.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventItemCompact.tsx"],"names":[],"mappings":"AAaA,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;CACxC;AA8FD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"NetworkEventItemCompact.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkEventItemCompact.tsx"],"names":[],"mappings":"AAaA,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;CACxC;AA8FD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,oEAiInC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkModal.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkModal.tsx"],"names":[],"mappings":"AA2CA,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;CACvC;
|
|
1
|
+
{"version":3,"file":"NetworkModal.d.ts","sourceRoot":"","sources":["../../../../src/network/components/NetworkModal.tsx"],"names":[],"mappings":"AA2CA,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;CACvC;AAuhCD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,+BAMpD"}
|
|
@@ -5,6 +5,7 @@ export { NetworkModal } from "./components/NetworkModal";
|
|
|
5
5
|
export { NetworkEventDetailView } from "./components/NetworkEventDetailView";
|
|
6
6
|
export { NetworkEventItemCompact } from "./components/NetworkEventItemCompact";
|
|
7
7
|
export { useNetworkEvents } from "./hooks/useNetworkEvents";
|
|
8
|
+
export { TickProvider, useTickEveryMinute } from "./hooks/useTickEveryMinute";
|
|
8
9
|
export { networkListener, startNetworkListener, stopNetworkListener, addNetworkListener, removeAllNetworkListeners, isNetworkListening, getNetworkListenerCount, } from "./utils/networkListener";
|
|
9
10
|
export { networkEventStore } from "./utils/networkEventStore";
|
|
10
11
|
export { formatBytes, formatDuration, formatHttpStatus, } from "./utils/formatting";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/network/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/network/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EACzB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,cAAc,GACf,MAAM,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/network",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "network package",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
8
8
|
"react-native": "lib/module/index.js",
|
|
9
9
|
"source": "src/index.tsx",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"react-native": "./lib/module/index.js",
|
|
13
|
+
"import": {
|
|
14
|
+
"default": "./lib/module/index.js",
|
|
15
|
+
"types": "./lib/typescript/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"default": "./lib/commonjs/index.js",
|
|
19
|
+
"types": "./lib/typescript/index.d.ts"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
10
24
|
"files": [
|
|
11
25
|
"lib"
|
|
12
26
|
],
|
|
13
27
|
"sideEffects": false,
|
|
14
28
|
"dependencies": {
|
|
15
|
-
"@buoy-gg/
|
|
16
|
-
"@buoy-gg/shared-ui": "1.7.7"
|
|
29
|
+
"@buoy-gg/shared-ui": "2.1.1"
|
|
17
30
|
},
|
|
18
31
|
"peerDependencies": {
|
|
19
32
|
"react": "*",
|