react-native-in-app-debugger 1.0.10 → 1.0.12

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.jsx CHANGED
@@ -22,7 +22,7 @@ const Row = ({ item }) => {
22
22
  const tabs = [
23
23
  { value: "Response Body" },
24
24
  { value: "Request Body", hide: !item.request.data },
25
- { value: "Request Body" },
25
+ { value: "Request Header" },
26
26
  ];
27
27
  const [tab, setTab] = useState(tabs[0].value);
28
28
  const hasResponse = item.response;
@@ -184,17 +184,6 @@ export default (props) => {
184
184
  const duration = item.response?.timestamp
185
185
  ? ~~(item.response?.timestamp - item.request.timestamp) / 1000
186
186
  : 0;
187
- const date = new Date(item.request.datetime);
188
- let hour = date.getHours();
189
- const minute = date.getMinutes();
190
-
191
- const amPm = hour >= 12 ? "PM" : "AM";
192
-
193
- if (hour > 12) {
194
- hour -= 12;
195
- } else if (hour === 0) {
196
- hour = 12;
197
- }
198
187
  const isExpand = expands[item.id];
199
188
  return (
200
189
  <View style={styles.rowHeader}>
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # react-native-in-app-debugger
2
2
 
3
- This library's main usage is be used by Non-Technical tester during UAT or SIT or any testing phase.
3
+ This library's main usage is to be used by Non-Technical testers during UAT, SIT or any testing phase.
4
+
5
+ ![ezgif-3-1cb92b8367](https://github.com/fattahmuhyiddeen/react-native-in-app-debugger/assets/24792201/4ffe083a-4807-4a2e-a624-6a81f506439b)
4
6
 
5
- ![Simulator Screen Recording - iPhone SE (3rd generation) - 2024-02-13 at 19 07 03](https://github.com/fattahmuhyiddeen/react-native-in-app-debugger/assets/24792201/87d0ef78-f692-4cbd-88ed-a6ba67d5931e)
6
7
 
7
8
 
8
9
  Usage :
@@ -46,7 +47,7 @@ export default () => (
46
47
  <Text>Heavy</Text>
47
48
  </TouchableOpacity>
48
49
  </View>
49
- <InAppDebugger version={version} env="staging" variables={variables} />
50
+ <InAppDebugger version={version} env="staging" variables={variables} labels={['branch: master']} />
50
51
  </>
51
52
  );
52
53
 
@@ -63,6 +64,7 @@ All FlatList props should work plus props mentioned below
63
64
  | ----------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- |
64
65
  | `env` | string | any value set here will be shown in the floating debugger panel | | Optional |
65
66
  | `variables` | Plain Old JavaScript Object object {} | Key-Value Plain Old JavaScript Object. Normal use case is to show API URL endpoints, environment variable values or any variables you want to debug on run time | | Optional. If set, the debugger will show a dedicated tab for variables when open in full screen mode |
67
+ | `labels` | Array of strings | Array of strings you want to show of the floating debugger pill. For each strings in the array will eb displayed as a single line in the floating debugger pill | | Optional |
66
68
  | `maxNumOfApiToStore` | integer | Number of APIs to be kept. Too much API might make the whole app lag, therefore need to trade off. Suggested value is 50 | | Optional. If not set, all APIs will be kept forever |
67
69
  `version` | string | Any string passed here will be shown in debugger's floating panel. | | Optional. If not supplied, version number will taken automatically using React Native Device Info library. But if Device Info library is not installed, then no version will be shown if this prop is not passed.
68
70
 
package/index.jsx CHANGED
@@ -1,6 +1,3 @@
1
- /* eslint-disable react-hooks/rules-of-hooks */
2
- // hooks are prevented to be called conditionally, but in this case, bundle id / package name will never changed in run time, so it is safe to call the hooks under that condition
3
-
4
1
  import React, { useState } from "react";
5
2
  import {
6
3
  Animated,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-in-app-debugger",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "",
5
5
  "main": "index.jsx",
6
6
  "scripts": {