react-native-in-app-debugger 2.0.6 → 2.0.7
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/Api/index.jsx +62 -54
- package/package.json +1 -1
package/Api/index.jsx
CHANGED
|
@@ -192,37 +192,40 @@ export default (props) => {
|
|
|
192
192
|
|
|
193
193
|
return (
|
|
194
194
|
<View style={styles.rowHeader}>
|
|
195
|
-
<
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
{
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
195
|
+
<View style={{ flex: 1 }}>
|
|
196
|
+
<View style={{ flexDirection: "row", gap: 5 }}>
|
|
197
|
+
<Bookmark
|
|
198
|
+
color={bookmarkColor}
|
|
199
|
+
onPress={() => {
|
|
200
|
+
props.setBookmarks((v) => {
|
|
201
|
+
if (!bookmarkColor)
|
|
202
|
+
return { ...v, [item.id]: getRandomBrightColor() };
|
|
203
|
+
const newV = { ...v };
|
|
204
|
+
delete newV[item.id];
|
|
205
|
+
return newV;
|
|
206
|
+
});
|
|
207
|
+
}}
|
|
208
|
+
/>
|
|
209
|
+
<Text style={{ color: "#555", fontSize: 8 }}>
|
|
210
|
+
{item.id + "\n"}
|
|
211
|
+
</Text>
|
|
212
|
+
</View>
|
|
213
|
+
<Text selectable style={{ flex: 1, color }}>
|
|
214
|
+
<Text style={{ opacity: 0.7 }}>
|
|
215
|
+
{item.request.method +
|
|
216
|
+
` (${item.response?.status ?? "no response"})` +
|
|
217
|
+
" - " +
|
|
218
|
+
item.request.time +
|
|
219
|
+
(hasResponse ? " - " + duration + " second(s)" : "") +
|
|
220
|
+
"\n"}
|
|
221
|
+
</Text>
|
|
222
|
+
<Highlight
|
|
223
|
+
text={item.request.url.slice(0, MAX_URL_LENGTH)}
|
|
224
|
+
filter={filter}
|
|
225
|
+
/>
|
|
226
|
+
{item.request.url.length > MAX_URL_LENGTH && "......."}
|
|
219
227
|
</Text>
|
|
220
|
-
|
|
221
|
-
text={item.request.url.slice(0, MAX_URL_LENGTH)}
|
|
222
|
-
filter={filter}
|
|
223
|
-
/>
|
|
224
|
-
{item.request.url.length > MAX_URL_LENGTH && "......."}
|
|
225
|
-
</Text>
|
|
228
|
+
</View>
|
|
226
229
|
<View style={{ gap: 4 }}>
|
|
227
230
|
<TouchableOpacity
|
|
228
231
|
onPress={() =>
|
|
@@ -254,30 +257,35 @@ export default (props) => {
|
|
|
254
257
|
<Text style={{ color: "black", fontSize: 10 }}>Copy</Text>
|
|
255
258
|
</TouchableOpacity>
|
|
256
259
|
)}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
260
|
+
{isExpand && (
|
|
261
|
+
<TouchableOpacity
|
|
262
|
+
onPress={() => {
|
|
263
|
+
Alert.alert(
|
|
264
|
+
"Are you sure",
|
|
265
|
+
`You want to blacklist: \n\n(${item.request.method}) ${item.request.url} \n\nwhere all history logs for this API will be removed and all future request for this API will not be recorded?`,
|
|
266
|
+
[
|
|
267
|
+
{
|
|
268
|
+
text: "Blacklist",
|
|
269
|
+
onPress: () =>
|
|
270
|
+
props.setBlacklists({
|
|
271
|
+
method: item.request.method,
|
|
272
|
+
url: item.request.url,
|
|
273
|
+
}),
|
|
274
|
+
style: "cancel",
|
|
275
|
+
},
|
|
276
|
+
{ text: "Cancel" },
|
|
277
|
+
]
|
|
278
|
+
);
|
|
279
|
+
}}
|
|
280
|
+
style={styles.actionButton}
|
|
281
|
+
>
|
|
282
|
+
<Text style={{ color: "black", fontSize: 10 }}>
|
|
283
|
+
Blacklist{" "}
|
|
284
|
+
</Text>
|
|
285
|
+
<BlacklistIcon />
|
|
286
|
+
</TouchableOpacity>
|
|
287
|
+
)}
|
|
288
|
+
{isExpand && item.interface === "axios" && (
|
|
281
289
|
<TouchableOpacity
|
|
282
290
|
onPress={() => {
|
|
283
291
|
props.goToMock(
|
package/package.json
CHANGED