git ssb

1+

Daan Patchwork / manyverse



Commit 4780c2690a87ad8fcfb5e2c585aefd812a6189ea

dx: update nodejs-mobile

Andre Staltz committed on 7/14/2019, 8:57:14 AM
Parent: 55c30906392728280c2d5ef79905d20056046f58

Files changed

package-lock.jsonchanged
package.jsonchanged
patches/nodejs-mobile-react-native+0.4.1.patchdeleted
patches/nodejs-mobile-react-native+0.4.3.patchadded
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 1100564 bytes
New file size: 1100945 bytes
package.jsonView
@@ -52,9 +52,9 @@
5252 "mdast-normalize-react-native": "3.1.x",
5353 "multiserver": "1.13.4",
5454 "multiserver-rn-channel": "~1.2.0",
5555 "muxrpc": "6.4.1",
56- "nodejs-mobile-react-native": "0.4.1",
56+ "nodejs-mobile-react-native": "0.4.3",
5757 "promisify-tuple": "1.0.0",
5858 "prop-types": "15.6.x",
5959 "pull-cat": "1.1.11",
6060 "pull-defer": "0.2.3",
patches/nodejs-mobile-react-native+0.4.1.patchView
@@ -1,39 +1,0 @@
1-patch-package
2---- a/node_modules/nodejs-mobile-react-native/android/src/main/java/com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java
3-+++ b/node_modules/nodejs-mobile-react-native/android/src/main/java/com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java
4-@@ -45,6 +45,11 @@ public class RNNodeJsMobileModule extends ReactContextBaseJavaModule implements
5- private static String builtinModulesPath;
6- private static String nativeAssetsPath;
7-
8-+ public interface Invokable<T> {
9-+ public void invoke(T param);
10-+ }
11-+
12-+ private static Invokable<String> jsExceptionInvokable;
13- private static long lastUpdateTime = 1;
14- private static long previousLastUpdateTime = 0;
15- private static Semaphore initSemaphore = new Semaphore(1);
16-@@ -91,6 +96,10 @@ public class RNNodeJsMobileModule extends ReactContextBaseJavaModule implements
17- asyncInit();
18- }
19-
20-+ public void setJsExceptionInvokable(Invokable<String> i) {
21-+ jsExceptionInvokable = i;
22-+ }
23-+
24- private void asyncInit() {
25- if (wasAPKUpdated()) {
26- try {
27-@@ -243,6 +236,12 @@ public class RNNodeJsMobileModule extends ReactContextBaseJavaModule implements
28- final RNNodeJsMobileModule _moduleInstance = _instance;
29- final String _channelNameToPass = new String(channelName);
30- final String _msgToPass = new String(msg);
31-+ if (jsExceptionInvokable != null) {
32-+ if (_msgToPass.matches("^\\{\"event\":\"exception\",\"payload\":\".*")) {
33-+ final String _exception = _msgToPass.substring(35, _msgToPass.length() - 5);
34-+ jsExceptionInvokable.invoke(_exception);
35-+ }
36-+ }
37- new Thread(new Runnable() {
38- @Override
39- public void run() {
patches/nodejs-mobile-react-native+0.4.3.patchView
@@ -1,0 +1,39 @@
1+patch-package
2+--- a/node_modules/nodejs-mobile-react-native/android/src/main/java/com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java
3++++ b/node_modules/nodejs-mobile-react-native/android/src/main/java/com/janeasystems/rn_nodejs_mobile/RNNodeJsMobileModule.java
4+@@ -45,6 +45,11 @@ public class RNNodeJsMobileModule extends ReactContextBaseJavaModule implements
5+ private static String builtinModulesPath;
6+ private static String nativeAssetsPath;
7+
8++ public interface Invokable<T> {
9++ public void invoke(T param);
10++ }
11++
12++ private static Invokable<String> jsExceptionInvokable;
13+ private static long lastUpdateTime = 1;
14+ private static long previousLastUpdateTime = 0;
15+ private static Semaphore initSemaphore = new Semaphore(1);
16+@@ -91,6 +96,10 @@ public class RNNodeJsMobileModule extends ReactContextBaseJavaModule implements
17+ asyncInit();
18+ }
19+
20++ public void setJsExceptionInvokable(Invokable<String> i) {
21++ jsExceptionInvokable = i;
22++ }
23++
24+ private void asyncInit() {
25+ if (wasAPKUpdated()) {
26+ try {
27+@@ -243,6 +236,12 @@ public class RNNodeJsMobileModule extends ReactContextBaseJavaModule implements
28+ final RNNodeJsMobileModule _moduleInstance = _instance;
29+ final String _channelNameToPass = new String(channelName);
30+ final String _msgToPass = new String(msg);
31++ if (jsExceptionInvokable != null) {
32++ if (_msgToPass.matches("^\\{\"event\":\"exception\",\"payload\":\".*")) {
33++ final String _exception = _msgToPass.substring(35, _msgToPass.length() - 5);
34++ jsExceptionInvokable.invoke(_exception);
35++ }
36++ }
37+ new Thread(new Runnable() {
38+ @Override
39+ public void run() {

Built with git-ssb-web