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.
Files changed (2) hide show
  1. package/Api/index.jsx +62 -54
  2. 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
- <Bookmark
196
- color={bookmarkColor}
197
- onPress={() => {
198
- props.setBookmarks((v) => {
199
- if (!bookmarkColor)
200
- return { ...v, [item.id]: getRandomBrightColor() };
201
- const newV = { ...v };
202
- delete newV[item.id];
203
- return newV;
204
- });
205
- }}
206
- />
207
- <Text selectable style={{ flex: 1, color, marginVertical: 10 }}>
208
- <Text style={{ color: "#555", fontSize: 8 }}>
209
- {item.id + "\n"}
210
- </Text>
211
-
212
- <Text style={{ opacity: 0.7 }}>
213
- {item.request.method +
214
- ` (${item.response?.status ?? "no response"})` +
215
- " - " +
216
- item.request.time +
217
- (hasResponse ? " - " + duration + " second(s)" : "") +
218
- "\n"}
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
- <Highlight
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
- <TouchableOpacity
258
- onPress={() => {
259
- Alert.alert(
260
- "Are you sure",
261
- `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?`,
262
- [
263
- {
264
- text: "Blacklist",
265
- onPress: () =>
266
- props.setBlacklists({
267
- method: item.request.method,
268
- url: item.request.url,
269
- }),
270
- style: "cancel",
271
- },
272
- { text: "Cancel" },
273
- ]
274
- );
275
- }}
276
- style={styles.actionButton}
277
- >
278
- <BlacklistIcon />
279
- </TouchableOpacity>
280
- {item.interface === "axios" && (
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-in-app-debugger",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "This library's main usage is to be used by Non-Technical testers during UAT, SIT or any testing phase.",
5
5
  "main": "index.jsx",
6
6
  "scripts": {