react-native-in-app-debugger 1.0.29 → 1.0.31

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
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from "react";
2
2
  import {
3
- Text,
4
3
  SectionList,
5
4
  TextInput,
6
5
  View,
@@ -8,7 +7,7 @@ import {
8
7
  StyleSheet,
9
8
  TouchableOpacity,
10
9
  } from "react-native";
11
- // import Clipboard from '@react-native-clipboard/clipboard';
10
+ import Text from "./Text";
12
11
  let Clipboard;
13
12
  try {
14
13
  Clipboard = require("@react-native-clipboard/clipboard")?.default;
@@ -130,7 +129,8 @@ export default (props) => {
130
129
  textDecorationLine: errorOnly ? "line-through" : undefined,
131
130
  }}
132
131
  >
133
- {apis.filter(isError).length} error{apis.filter(isError).length > 1 ? 's' : ''}
132
+ {apis.filter(isError).length} error
133
+ {apis.filter(isError).length > 1 ? "s" : ""}
134
134
  </Text>
135
135
  </TouchableOpacity>
136
136
  )}
package/Text.jsx ADDED
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { Text, Platform } from 'react-native';
3
+
4
+ export default ({ style = {}, ...props }) => <Text {...props} style={[{ fontFamily: Platform.OS === 'android' ? 'Roboto' : 'San Francisco' }, style]} />;
package/Variables.jsx CHANGED
@@ -1,5 +1,6 @@
1
1
  import React, { useState } from 'react';
2
- import { Text, FlatList, TextInput } from 'react-native';
2
+ import { FlatList, TextInput } from 'react-native';
3
+ import Text from "./Text";
3
4
 
4
5
  export default ({ variables }) => {
5
6
  const [filter, setFilter] = useState('');
package/index.jsx CHANGED
@@ -1,14 +1,13 @@
1
1
  import React, { useState } from "react";
2
2
  import {
3
3
  Animated,
4
- Text,
5
4
  StyleSheet,
6
5
  TouchableOpacity,
7
6
  View,
8
7
  SafeAreaView,
9
8
  Dimensions,
10
9
  } from "react-native";
11
-
10
+ import Text from "./Text";
12
11
  let DeviceInfo;
13
12
  try {
14
13
  DeviceInfo = require("react-native-device-info");
@@ -23,13 +22,15 @@ import useApiInterceptor from "./useApiInterceptor";
23
22
 
24
23
  const dimension = Dimensions.get("window");
25
24
 
26
- const v = DeviceInfo?.getReadableVersion() || "";
27
-
25
+ let v = "";
28
26
  let modelOs;
29
27
  if (DeviceInfo) {
30
28
  let model = DeviceInfo.getDeviceId();
31
29
  if (model === "unknown") model = DeviceInfo.getModel();
32
30
  modelOs = model + " - " + DeviceInfo.getSystemVersion();
31
+ const pcs = DeviceInfo.getReadableVersion().split(".");
32
+ const lastPc = pcs.pop();
33
+ v = pcs.join(".") + "-" + lastPc;
33
34
  }
34
35
 
35
36
  const Label = (props) => (
@@ -87,7 +88,11 @@ export default ({
87
88
  {...(isOpen ? {} : panResponder.panHandlers)}
88
89
  >
89
90
  {!isOpen ? (
90
- <TouchableOpacity onPress={() => setIsOpen(true)} style={styles.box} activeOpacity={.8}>
91
+ <TouchableOpacity
92
+ onPress={() => setIsOpen(true)}
93
+ style={styles.box}
94
+ activeOpacity={0.8}
95
+ >
91
96
  <View style={styles.badgeContainer}>
92
97
  {!!numPendingApiCalls && (
93
98
  <View style={[styles.badge, { backgroundColor: "orange" }]}>
@@ -117,6 +122,11 @@ export default ({
117
122
  </TouchableOpacity>
118
123
  ) : (
119
124
  <SafeAreaView style={{ flex: 1 }}>
125
+ {!!version && (
126
+ <View style={{ backgroundColor: "black" }}>
127
+ <Label>{version}</Label>
128
+ </View>
129
+ )}
120
130
  <View style={{ flexDirection: "row", padding: 5 }}>
121
131
  <View style={{ flex: 1, flexDirection: "row" }}>
122
132
  {!!variables &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-in-app-debugger",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "",
5
5
  "main": "index.jsx",
6
6
  "scripts": {