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

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 (3) hide show
  1. package/Api.jsx +1 -12
  2. package/README.md +2 -1
  3. package/package.json +1 -1
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
@@ -46,7 +46,7 @@ export default () => (
46
46
  <Text>Heavy</Text>
47
47
  </TouchableOpacity>
48
48
  </View>
49
- <InAppDebugger version={version} env="staging" variables={variables} />
49
+ <InAppDebugger version={version} env="staging" variables={variables} labels={['branch: master']} />
50
50
  </>
51
51
  );
52
52
 
@@ -63,6 +63,7 @@ All FlatList props should work plus props mentioned below
63
63
  | ----------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------- |
64
64
  | `env` | string | any value set here will be shown in the floating debugger panel | | Optional |
65
65
  | `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 |
66
+ | `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
67
  | `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
68
  `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
69
 
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.11",
4
4
  "description": "",
5
5
  "main": "index.jsx",
6
6
  "scripts": {