react-native-debug-toolkit 0.6.3 → 0.6.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-debug-toolkit",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "A simple yet powerful debugging toolkit for React Native with a convenient floating UI for development",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,34 +0,0 @@
1
- apply plugin: 'com.android.library'
2
-
3
- android {
4
- compileSdkVersion rootProject.ext.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
5
- buildToolsVersion rootProject.ext.hasProperty('buildToolsVersion') ? rootProject.ext.buildToolsVersion : "30.0.3"
6
-
7
- defaultConfig {
8
- minSdkVersion rootProject.ext.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
9
- targetSdkVersion rootProject.ext.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30
10
- versionCode 1
11
- versionName "1.0"
12
- }
13
-
14
- compileOptions {
15
- sourceCompatibility JavaVersion.VERSION_1_8
16
- targetCompatibility JavaVersion.VERSION_1_8
17
- }
18
- }
19
-
20
- repositories {
21
- mavenCentral()
22
- maven { url "https://jitpack.io" }
23
- google()
24
- }
25
-
26
- dependencies {
27
- implementation "com.facebook.react:react-native:+"
28
- // implementation 'com.didichuxing.doraemonkit:dokit:3.7.1'
29
- debugImplementation 'io.github.didi.dokit:dokitx:3.7.1'
30
- releaseImplementation 'io.github.didi.dokit:dokitx-no-op:3.7.1'
31
- // implementation 'io.github.didi.dokit:dokitx:3.7.1'
32
- implementation 'com.android.volley:volley:1.2.0'
33
-
34
- }
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- package="com.reactnative.debuglibs">
4
-
5
- <uses-permission android:name="android.permission.INTERNET" />
6
- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
7
-
8
- </manifest>
@@ -1,44 +0,0 @@
1
- package com.reactnative.debuglibs;
2
-
3
- import com.facebook.react.bridge.ReactApplicationContext;
4
- import com.facebook.react.bridge.ReactContextBaseJavaModule;
5
- import com.facebook.react.bridge.ReactMethod;
6
- import com.facebook.react.bridge.Promise;
7
-
8
- import java.util.HashMap;
9
- import java.util.Map;
10
-
11
- public class BuildTypeModule extends ReactContextBaseJavaModule {
12
- private final ReactApplicationContext reactContext;
13
-
14
- public BuildTypeModule(ReactApplicationContext reactContext) {
15
- super(reactContext);
16
- this.reactContext = reactContext;
17
- }
18
-
19
- @Override
20
- public String getName() {
21
- return "BuildTypeModule";
22
- }
23
-
24
- @Override
25
- public Map<String, Object> getConstants() {
26
- final Map<String, Object> constants = new HashMap<>();
27
- constants.put("buildType", BuildConfig.DEBUG ? "debug" : "release");
28
- return constants;
29
- }
30
-
31
- @ReactMethod(isBlockingSynchronousMethod = true)
32
- public String getBuildTypeSync() {
33
- return BuildConfig.DEBUG ? "debug" : "release";
34
- }
35
-
36
- @ReactMethod
37
- public void getBuildType(Promise promise) {
38
- try {
39
- promise.resolve(BuildConfig.DEBUG ? "debug" : "release");
40
- } catch (Exception e) {
41
- promise.reject("ERR_UNEXPECTED", e.getMessage(), e);
42
- }
43
- }
44
- }
@@ -1,25 +0,0 @@
1
- package com.reactnative.debuglibs;
2
-
3
- import com.facebook.react.ReactPackage;
4
- import com.facebook.react.bridge.NativeModule;
5
- import com.facebook.react.bridge.ReactApplicationContext;
6
- import com.facebook.react.uimanager.ViewManager;
7
-
8
- import java.util.ArrayList;
9
- import java.util.Collections;
10
- import java.util.List;
11
-
12
- public class BuildTypePackage implements ReactPackage {
13
- @Override
14
- public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
15
- List<NativeModule> modules = new ArrayList<>();
16
- modules.add(new BuildTypeModule(reactContext));
17
- modules.add(new RNDebugLibsModule(reactContext));
18
- return modules;
19
- }
20
-
21
- @Override
22
- public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
23
- return Collections.emptyList();
24
- }
25
- }
@@ -1,75 +0,0 @@
1
- package com.reactnative.debuglibs;
2
-
3
- import android.app.Application;
4
- import androidx.annotation.NonNull;
5
-
6
- import com.facebook.react.bridge.ReactApplicationContext;
7
- import com.facebook.react.bridge.ReactContextBaseJavaModule;
8
- import com.facebook.react.bridge.ReactMethod;
9
-
10
- import com.didichuxing.doraemonkit.DoKit;
11
- import com.didichuxing.doraemonkit.kit.AbstractKit;
12
-
13
- import java.util.ArrayList;
14
- import java.util.List;
15
-
16
- public class RNDebugLibsModule extends ReactContextBaseJavaModule {
17
- private final ReactApplicationContext reactContext;
18
-
19
- public RNDebugLibsModule(ReactApplicationContext reactContext) {
20
- super(reactContext);
21
- this.reactContext = reactContext;
22
- }
23
-
24
- @NonNull
25
- @Override
26
- public String getName() {
27
- return "RNDebugLibs";
28
- }
29
-
30
- @ReactMethod
31
- public void showExplorer() {
32
- // FLEX is iOS only
33
- }
34
-
35
- @ReactMethod
36
- public void hideExplorer() {
37
- // FLEX is iOS only
38
- }
39
-
40
- @ReactMethod
41
- public void toggleExplorer() {
42
- // FLEX is iOS only
43
- }
44
-
45
- // @ReactMethod
46
- // public void installDoraemonKit(String productId) {
47
- // Application app = (Application) reactContext.getApplicationContext();
48
- // List<AbstractKit> kits = new ArrayList<>();
49
- // // Initialize DoKit with custom kits if needed
50
- // DoKit.Builder(app)
51
- // .productId(productId)
52
- // .customKits(kits)
53
- // .build();
54
- // }
55
-
56
- @ReactMethod
57
- public void showDoraemonKit() {
58
- reactContext.runOnUiQueueThread(new Runnable() {
59
- @Override
60
- public void run() {
61
- DoKit.show();
62
- }
63
- });
64
- }
65
-
66
- @ReactMethod
67
- public void hideDoraemonKit() {
68
- reactContext.runOnUiQueueThread(new Runnable() {
69
- @Override
70
- public void run() {
71
- DoKit.hide();
72
- }
73
- });
74
- }
75
- }
@@ -1,28 +0,0 @@
1
- package com.reactnative.debuglibs;
2
-
3
- import androidx.annotation.NonNull;
4
-
5
- import com.facebook.react.ReactPackage;
6
- import com.facebook.react.bridge.NativeModule;
7
- import com.facebook.react.bridge.ReactApplicationContext;
8
- import com.facebook.react.uimanager.ViewManager;
9
-
10
- import java.util.ArrayList;
11
- import java.util.Collections;
12
- import java.util.List;
13
-
14
- public class RNDebugLibsPackage implements ReactPackage {
15
- @NonNull
16
- @Override
17
- public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
18
- List<NativeModule> modules = new ArrayList<>();
19
- modules.add(new RNDebugLibsModule(reactContext));
20
- return modules;
21
- }
22
-
23
- @NonNull
24
- @Override
25
- public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
26
- return Collections.emptyList();
27
- }
28
- }