@bravemobile/react-native-code-push 12.0.1 → 12.1.0

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 (99) hide show
  1. package/README.md +1 -1
  2. package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +1 -52
  3. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +4 -43
  4. package/bin/code-push.js +6 -0
  5. package/cli/commands/bundleCommand/{bundleCodePush.js → bundleCodePush.ts} +16 -24
  6. package/cli/commands/bundleCommand/{index.js → index.ts} +13 -14
  7. package/cli/commands/createHistoryCommand/{createReleaseHistory.js → createReleaseHistory.ts} +11 -28
  8. package/cli/commands/createHistoryCommand/{index.js → index.ts} +12 -13
  9. package/cli/commands/initCommand/{index.js → index.ts} +3 -3
  10. package/cli/commands/initCommand/{initAndroid.js → initAndroid.ts} +6 -11
  11. package/cli/commands/initCommand/initIos.ts +123 -0
  12. package/cli/commands/initCommand/test/{initAndroid.test.js → initAndroid.test.ts} +5 -4
  13. package/cli/commands/initCommand/test/{initIos.test.js → initIos.test.ts} +2 -1
  14. package/cli/commands/releaseCommand/{addToReleaseHistory.js → addToReleaseHistory.ts} +17 -45
  15. package/cli/commands/releaseCommand/{index.js → index.ts} +24 -25
  16. package/cli/commands/releaseCommand/release.ts +72 -0
  17. package/cli/commands/showHistoryCommand/{index.js → index.ts} +11 -12
  18. package/cli/commands/updateHistoryCommand/{index.js → index.ts} +17 -18
  19. package/cli/commands/updateHistoryCommand/{updateReleaseHistory.js → updateReleaseHistory.ts} +15 -41
  20. package/cli/constant.ts +4 -0
  21. package/cli/dist/commands/bundleCommand/bundleCodePush.js +34 -0
  22. package/cli/dist/commands/bundleCommand/index.js +14 -0
  23. package/cli/dist/commands/createHistoryCommand/createReleaseHistory.js +25 -0
  24. package/cli/dist/commands/createHistoryCommand/index.js +14 -0
  25. package/cli/dist/commands/initCommand/index.js +12 -0
  26. package/cli/dist/commands/initCommand/initAndroid.js +37 -0
  27. package/cli/{commands → dist/commands}/initCommand/initIos.js +13 -33
  28. package/cli/dist/commands/initCommand/test/initAndroid.test.js +75 -0
  29. package/cli/dist/commands/initCommand/test/initIos.test.js +95 -0
  30. package/cli/dist/commands/releaseCommand/addToReleaseHistory.js +32 -0
  31. package/cli/dist/commands/releaseCommand/index.js +38 -0
  32. package/cli/dist/commands/releaseCommand/release.js +36 -0
  33. package/cli/dist/commands/showHistoryCommand/index.js +14 -0
  34. package/cli/dist/commands/updateHistoryCommand/index.js +30 -0
  35. package/cli/dist/commands/updateHistoryCommand/updateReleaseHistory.js +26 -0
  36. package/cli/dist/constant.js +4 -0
  37. package/cli/dist/functions/getReactTempDir.js +10 -0
  38. package/cli/{functions → dist/functions}/makeCodePushBundle.js +5 -11
  39. package/cli/{functions → dist/functions}/prepareToBundleJS.js +2 -5
  40. package/cli/{functions → dist/functions}/runExpoBundleCommand.js +3 -21
  41. package/cli/{functions → dist/functions}/runHermesEmitBinaryCommand.js +12 -68
  42. package/cli/{functions → dist/functions}/runReactNativeBundleCommand.js +3 -23
  43. package/cli/dist/index.js +38 -0
  44. package/cli/dist/utils/file-utils.js +19 -0
  45. package/cli/dist/utils/fsUtils.js +37 -0
  46. package/cli/{utils → dist/utils}/hash-utils.js +19 -127
  47. package/cli/{utils → dist/utils}/promisfied-fs.js +5 -16
  48. package/cli/dist/utils/showLogo.js +21 -0
  49. package/cli/{utils → dist/utils}/zip.js +15 -51
  50. package/cli/functions/{getReactTempDir.js → getReactTempDir.ts} +2 -6
  51. package/cli/functions/makeCodePushBundle.ts +26 -0
  52. package/cli/functions/prepareToBundleJS.ts +10 -0
  53. package/cli/functions/runExpoBundleCommand.ts +45 -0
  54. package/cli/functions/runHermesEmitBinaryCommand.ts +186 -0
  55. package/cli/functions/runReactNativeBundleCommand.ts +51 -0
  56. package/cli/index.ts +48 -0
  57. package/cli/package.json +33 -0
  58. package/cli/utils/{file-utils.js → file-utils.ts} +4 -21
  59. package/cli/utils/{fsUtils.js → fsUtils.ts} +12 -19
  60. package/cli/utils/hash-utils.ts +146 -0
  61. package/cli/utils/promisfied-fs.ts +19 -0
  62. package/cli/utils/{showLogo.js → showLogo.ts} +1 -3
  63. package/cli/utils/zip.ts +65 -0
  64. package/expo/plugin/withCodePush.js +1 -2
  65. package/package.json +42 -12
  66. package/{AlertAdapter.js → src/AlertAdapter.js} +5 -5
  67. package/CONTRIBUTING.md +0 -134
  68. package/SECURITY.md +0 -41
  69. package/android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java +0 -17
  70. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  71. package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  72. package/android/gradlew +0 -164
  73. package/android/gradlew.bat +0 -90
  74. package/app.plugin.js +0 -1
  75. package/babel.config.js +0 -3
  76. package/cli/commands/releaseCommand/release.js +0 -114
  77. package/cli/constant.js +0 -6
  78. package/cli/index.js +0 -49
  79. package/docs/api-android.md +0 -83
  80. package/docs/api-ios.md +0 -31
  81. package/docs/api-js.md +0 -592
  82. package/docs/multi-deployment-testing-android.md +0 -148
  83. package/docs/multi-deployment-testing-ios.md +0 -59
  84. package/eslint.config.mjs +0 -32
  85. package/scripts/generateBundledResourcesHash.js +0 -125
  86. package/scripts/getFilesInFolder.js +0 -19
  87. package/scripts/recordFilesBeforeBundleCommand.js +0 -41
  88. package/tsconfig.json +0 -18
  89. package/tslint.json +0 -32
  90. /package/{CodePush.js → src/CodePush.js} +0 -0
  91. /package/{logging.js → src/logging.js} +0 -0
  92. /package/{package-mixins.js → src/package-mixins.js} +0 -0
  93. /package/{versioning → src/versioning}/BaseVersioning.js +0 -0
  94. /package/{versioning → src/versioning}/BaseVersioning.test.js +0 -0
  95. /package/{versioning → src/versioning}/IncrementalVersioning.js +0 -0
  96. /package/{versioning → src/versioning}/IncrementalVersioning.test.js +0 -0
  97. /package/{versioning → src/versioning}/SemverVersioning.js +0 -0
  98. /package/{versioning → src/versioning}/SemverVersioning.test.js +0 -0
  99. /package/{versioning → src/versioning}/index.js +0 -0
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@bravemobile/react-native-code-push",
3
- "version": "12.0.1",
3
+ "version": "12.1.0",
4
4
  "description": "React Native plugin for the CodePush service",
5
- "main": "CodePush.js",
6
- "typings": "typings/react-native-code-push.d.ts",
5
+ "main": "src/CodePush.js",
6
+ "react-native": "src/CodePush.js",
7
+ "source": "src/CodePush.js",
8
+ "types": "typings/react-native-code-push.d.ts",
7
9
  "homepage": "https://microsoft.github.io/code-push",
8
10
  "keywords": [
9
11
  "react-native",
@@ -14,16 +16,42 @@
14
16
  "react-native-code-push",
15
17
  "expo-code-push"
16
18
  ],
19
+ "workspaces": [
20
+ "cli"
21
+ ],
17
22
  "author": "Soomgo Mobile Team (originally Microsoft Corporation)",
18
23
  "license": "MIT",
19
24
  "bin": {
20
- "code-push": "cli/index.js"
25
+ "code-push": "bin/code-push.js"
21
26
  },
27
+ "files": [
28
+ "src",
29
+ "bin/code-push.js",
30
+ "android",
31
+ "ios",
32
+ "cli/dist",
33
+ "cli/**/*.ts",
34
+ "!cli/node_modules",
35
+ "expo",
36
+ "typings",
37
+ "*.podspec",
38
+ "react-native.config.js",
39
+ "package.json",
40
+ "package-lock.json",
41
+ "!ios/build",
42
+ "!android/build",
43
+ "!android/app/build",
44
+ "!android/gradle",
45
+ "!android/gradlew",
46
+ "!android/gradlew.bat",
47
+ "!android/local.properties",
48
+ "!**/__tests__",
49
+ "!**/__fixtures__",
50
+ "!**/__mocks__",
51
+ "!**/.*"
52
+ ],
22
53
  "scripts": {
23
- "clean": "shx rm -rf bin",
24
54
  "setup": "npm install --quiet --no-progress",
25
- "prebuild:tests": "npm run clean && npm run tslint",
26
- "build:tests": "tsc",
27
55
  "test": "npm run build:tests && npm run test:setup && npm run test:fast",
28
56
  "test:android": "npm run build:tests && npm run test:setup:android && npm run test:fast:android",
29
57
  "test:ios": "npm run build:tests && npm run test:setup:ios && npm run test:fast:ios",
@@ -36,9 +64,12 @@
36
64
  "test:debugger:android": "mocha --recursive --inspect-brk=0.0.0.0 bin/test --android",
37
65
  "test:debugger:ios": "mocha --recursive --inspect-brk=0.0.0.0 bin/test --ios",
38
66
  "tslint": "tslint -c tslint.json test/**/*.ts",
67
+ "type:cli": "npm run --workspace cli typecheck",
68
+ "build:cli": "npm run --workspace cli clean && npm run --workspace cli build",
69
+ "prepack": "npm run build:cli",
39
70
  "publish": "npm publish --access=public",
40
71
  "eslint": "eslint --quiet .",
41
- "jest": "jest versioning/*"
72
+ "jest": "jest src/versioning/* && npm run --workspace cli test"
42
73
  },
43
74
  "repository": {
44
75
  "type": "git",
@@ -48,7 +79,7 @@
48
79
  "commander": "^12.1.0",
49
80
  "hoist-non-react-statics": "^3.3.2",
50
81
  "semver": "^7.3.5",
51
- "shelljs": "^0.8.5",
82
+ "shelljs": "^0.10.0",
52
83
  "xcode": "^3.0.1",
53
84
  "yazl": "^3.3.1"
54
85
  },
@@ -64,11 +95,12 @@
64
95
  "devDependencies": {
65
96
  "@babel/core": "^7.26.0",
66
97
  "@babel/preset-env": "^7.26.0",
98
+ "@babel/preset-typescript": "^7.27.1",
67
99
  "@eslint/js": "^9.13.0",
68
100
  "@types/assert": "^1.5.2",
69
101
  "@types/mkdirp": "^1.0.1",
70
102
  "@types/mocha": "^9.0.0",
71
- "@types/node": "^14.0.27",
103
+ "@types/node": "^18.19.129",
72
104
  "@types/q": "^1.5.4",
73
105
  "@types/semver": "^7.5.8",
74
106
  "@types/shelljs": "^0.8.15",
@@ -76,7 +108,6 @@
76
108
  "babel-jest": "^29.7.0",
77
109
  "body-parser": "latest",
78
110
  "code-push-plugin-testing-framework": "file:./code-push-plugin-testing-framework",
79
- "del": "v6.0.0",
80
111
  "eslint": "^9.13.0",
81
112
  "eslint-plugin-react": "^7.37.2",
82
113
  "express": "latest",
@@ -85,7 +116,6 @@
85
116
  "mkdirp": "latest",
86
117
  "mocha": "^9.2.0",
87
118
  "q": "^1.5.1",
88
- "shx": "^0.3.4",
89
119
  "slash": "^3.0.0",
90
120
  "ts-node": "^10.9.2",
91
121
  "tslint": "^6.1.3",
@@ -3,22 +3,22 @@ let { Alert } = React;
3
3
 
4
4
  if (Platform.OS === "android") {
5
5
  const { NativeModules: { CodePushDialog } } = React;
6
-
6
+
7
7
  Alert = {
8
8
  alert(title, message, buttons) {
9
9
  if (buttons.length > 2) {
10
10
  throw "Can only show 2 buttons for Android dialog.";
11
11
  }
12
-
12
+
13
13
  const button1Text = buttons[0] ? buttons[0].text : null,
14
14
  button2Text = buttons[1] ? buttons[1].text : null;
15
-
15
+
16
16
  CodePushDialog.showDialog(
17
17
  title, message, button1Text, button2Text,
18
- (buttonId) => { buttons[buttonId].onPress && buttons[buttonId].onPress(); },
18
+ (buttonId) => { buttons[buttonId].onPress && buttons[buttonId].onPress(); },
19
19
  (error) => { throw error; });
20
20
  }
21
21
  };
22
22
  }
23
23
 
24
- module.exports = { Alert };
24
+ module.exports = { Alert };
package/CONTRIBUTING.md DELETED
@@ -1,134 +0,0 @@
1
- # Contributing
2
-
3
- ## Using the plugin
4
-
5
- ### Environment setup
6
-
7
- `node.js` and `npm` are needed for using this project. `npm` comes bundled with the `node.js` installer. You can download the `node.js` installer here: https://nodejs.org/download/.
8
-
9
- Once you have installed `node.js` and `npm`, install the dev dependencies for the project.
10
-
11
- ```
12
- npm install
13
- ```
14
-
15
- ### Using the plugin manually
16
-
17
- Follow these steps to test your modifications to the plugin manually:
18
- - clone this repository
19
- - install the dependencies
20
-
21
- Navigate to the root folder from your command line console and run:
22
- ```
23
- npm install
24
- ```
25
- - install the plugin in a React-Native project
26
-
27
- Navigate to the root folder of your React-Native project from your command line console and run:
28
- ```
29
- npm install local_path_to_your_clone_of_this_repo
30
- ```
31
- - configure the plugin using the steps in the README.md
32
- - build and run your app on an emulator or device
33
-
34
- ## Test
35
-
36
- ### Environment setup
37
-
38
- First, make sure you have installed the dependencies for the plugin by following the steps above.
39
-
40
- Then, make sure you have installed `react-native`.
41
-
42
- ```
43
- npm install -g react-native
44
- ```
45
-
46
- To run Android tests, make sure you have `sdk\tools`, `sdk\emulator` and `sdk\platform-tools` in your PATH.
47
-
48
- To run iOS tests, make sure you've installed CocoaPods and have `.gem/bin` in your PATH.
49
-
50
- ### Supported platforms
51
-
52
- The plugin has end to end tests for Android and iOS. Depending on your development machine OS, you can run some or all the tests.
53
-
54
- OS | Supported tests
55
- ------------- | -------------
56
- OS X | Android, iOS
57
- Windows | Android
58
-
59
- ### Test descriptions
60
-
61
- The tests first build the app.
62
-
63
- They then check if the required emulators are currently running.
64
-
65
- If an Android emulator is not running, it attempts to boot the latest Android emulator. You can specify an emulator by adding env variable `ANDROID_EMU=yourEmulatorNameHere` to the npm command. For example: `ANDROID_EMU=yourEmulatorNameHere npm run test:android`.
66
-
67
- If an iOS simulator is not running, it attempts to boot the latest iOS iPhone simulator. You can specify a simulator by adding env variable `IOS_EMU=yourSimulatorNameHere` to the npm command. For example: `IOS_EMU="iPhone 8 (0567DFF8-329E-41A3-BD6D-E48E9DD5EF39)" npm run test:ios`.
68
-
69
- If all the required emulators are not running and the tests fail to boot them, the tests will fail.
70
-
71
- If you would like the tests to always restart the necessary emulators (killing them if they are currently running), setup a env variable `CLEAN=true` to the command. For example: `CLEAN=true npm run test`.
72
-
73
- The desired unit tests are then run.
74
-
75
- If you would like to skip building, add a `:fast` in the command you'd like to run. For example, `npm run test:ios` becomes `npm run test:fast:ios` or `npm run test:android` becomes `npm run test:fast:android`.
76
-
77
- There is a both a full unit test suite and a "core" set of unit tests that you may run. If you would like to run only the core tests, setup a env variable `CORE=true` to the command. For example: `CORE=true npm run test:android`.
78
-
79
- If you would like to pull the plugin from NPM rather than running the tests on the local version, setup a env variable `NPM=true` to the command. For example: `NPM=true npm run test:ios`.
80
-
81
- #### Default
82
-
83
- To run all of the unit tests on Android and iOS:
84
- ```
85
- npm run test
86
- ```
87
-
88
- #### iOS
89
-
90
- To run all of the unit tests on iOS:
91
- ```
92
- npm run test:ios
93
- ```
94
-
95
- #### Android
96
-
97
- To run all of the unit tests on Android:
98
- ```
99
- npm run test:android
100
- ```
101
-
102
- #### More examples
103
-
104
- All possible testing configurations have tasks!
105
-
106
- The platforms are ordered as follows, and ran in that order:
107
- android, ios
108
-
109
- To run the core unit tests on Android:
110
- ```
111
- CORE=true npm run test:android
112
- ```
113
-
114
- To run all of the unit tests on iOS and pull the plugin from NPM:
115
- ```
116
- NPM=true npm run test:ios
117
- ```
118
-
119
- To run all of the unit tests on Android and iOS without building first:
120
- ```
121
- npm run test:fast
122
- ```
123
-
124
- To run all of the unit tests on iOS and restart the emulators:
125
- ```
126
- CLEAN=true npm run test:ios
127
- ```
128
-
129
- To run the core unit tests on Android and pull the plugin from NPM:
130
- ```
131
- NPM=true CORE=true npm run test:android
132
- ```
133
-
134
- ...and so on!
package/SECURITY.md DELETED
@@ -1,41 +0,0 @@
1
- <!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
2
-
3
- ## Security
4
-
5
- Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6
-
7
- If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
8
-
9
- ## Reporting Security Issues
10
-
11
- **Please do not report security vulnerabilities through public GitHub issues.**
12
-
13
- Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14
-
15
- If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
16
-
17
- You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18
-
19
- Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
-
21
- * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
- * Full paths of source file(s) related to the manifestation of the issue
23
- * The location of the affected source code (tag/branch/commit or direct URL)
24
- * Any special configuration required to reproduce the issue
25
- * Step-by-step instructions to reproduce the issue
26
- * Proof-of-concept or exploit code (if possible)
27
- * Impact of the issue, including how an attacker might exploit the issue
28
-
29
- This information will help us triage your report more quickly.
30
-
31
- If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32
-
33
- ## Preferred Languages
34
-
35
- We prefer all communications to be in English.
36
-
37
- ## Policy
38
-
39
- Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
40
-
41
- <!-- END MICROSOFT SECURITY.MD BLOCK -->
@@ -1,17 +0,0 @@
1
- package com.microsoft.codepush.react;
2
-
3
- import com.facebook.react.ReactInstanceManager;
4
-
5
- /**
6
- * Provides access to a {@link ReactInstanceManager}.
7
- *
8
- * ReactNativeHost already implements this interface, if you make use of that react-native
9
- * component (just add `implements ReactInstanceHolder`).
10
- */
11
- public interface ReactInstanceHolder {
12
-
13
- /**
14
- * Get the current {@link ReactInstanceManager} instance. May return null.
15
- */
16
- ReactInstanceManager getReactInstanceManager();
17
- }
@@ -1,5 +0,0 @@
1
- distributionBase=GRADLE_USER_HOME
2
- distributionPath=wrapper/dists
3
- zipStoreBase=GRADLE_USER_HOME
4
- zipStorePath=wrapper/dists
5
- distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
package/android/gradlew DELETED
@@ -1,164 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- ##############################################################################
4
- ##
5
- ## Gradle start up script for UN*X
6
- ##
7
- ##############################################################################
8
-
9
- # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10
- DEFAULT_JVM_OPTS=""
11
-
12
- APP_NAME="Gradle"
13
- APP_BASE_NAME=`basename "$0"`
14
-
15
- # Use the maximum available, or set MAX_FD != -1 to use that value.
16
- MAX_FD="maximum"
17
-
18
- warn ( ) {
19
- echo "$*"
20
- }
21
-
22
- die ( ) {
23
- echo
24
- echo "$*"
25
- echo
26
- exit 1
27
- }
28
-
29
- # OS specific support (must be 'true' or 'false').
30
- cygwin=false
31
- msys=false
32
- darwin=false
33
- case "`uname`" in
34
- CYGWIN* )
35
- cygwin=true
36
- ;;
37
- Darwin* )
38
- darwin=true
39
- ;;
40
- MINGW* )
41
- msys=true
42
- ;;
43
- esac
44
-
45
- # For Cygwin, ensure paths are in UNIX format before anything is touched.
46
- if $cygwin ; then
47
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48
- fi
49
-
50
- # Attempt to set APP_HOME
51
- # Resolve links: $0 may be a link
52
- PRG="$0"
53
- # Need this for relative symlinks.
54
- while [ -h "$PRG" ] ; do
55
- ls=`ls -ld "$PRG"`
56
- link=`expr "$ls" : '.*-> \(.*\)$'`
57
- if expr "$link" : '/.*' > /dev/null; then
58
- PRG="$link"
59
- else
60
- PRG=`dirname "$PRG"`"/$link"
61
- fi
62
- done
63
- SAVED="`pwd`"
64
- cd "`dirname \"$PRG\"`/" >&-
65
- APP_HOME="`pwd -P`"
66
- cd "$SAVED" >&-
67
-
68
- CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69
-
70
- # Determine the Java command to use to start the JVM.
71
- if [ -n "$JAVA_HOME" ] ; then
72
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73
- # IBM's JDK on AIX uses strange locations for the executables
74
- JAVACMD="$JAVA_HOME/jre/sh/java"
75
- else
76
- JAVACMD="$JAVA_HOME/bin/java"
77
- fi
78
- if [ ! -x "$JAVACMD" ] ; then
79
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80
-
81
- Please set the JAVA_HOME variable in your environment to match the
82
- location of your Java installation."
83
- fi
84
- else
85
- JAVACMD="java"
86
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87
-
88
- Please set the JAVA_HOME variable in your environment to match the
89
- location of your Java installation."
90
- fi
91
-
92
- # Increase the maximum file descriptors if we can.
93
- if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94
- MAX_FD_LIMIT=`ulimit -H -n`
95
- if [ $? -eq 0 ] ; then
96
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97
- MAX_FD="$MAX_FD_LIMIT"
98
- fi
99
- ulimit -n $MAX_FD
100
- if [ $? -ne 0 ] ; then
101
- warn "Could not set maximum file descriptor limit: $MAX_FD"
102
- fi
103
- else
104
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105
- fi
106
- fi
107
-
108
- # For Darwin, add options to specify how the application appears in the dock
109
- if $darwin; then
110
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111
- fi
112
-
113
- # For Cygwin, switch paths to Windows format before running java
114
- if $cygwin ; then
115
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117
-
118
- # We build the pattern for arguments to be converted via cygpath
119
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120
- SEP=""
121
- for dir in $ROOTDIRSRAW ; do
122
- ROOTDIRS="$ROOTDIRS$SEP$dir"
123
- SEP="|"
124
- done
125
- OURCYGPATTERN="(^($ROOTDIRS))"
126
- # Add a user-defined pattern to the cygpath arguments
127
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129
- fi
130
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
131
- i=0
132
- for arg in "$@" ; do
133
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135
-
136
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138
- else
139
- eval `echo args$i`="\"$arg\""
140
- fi
141
- i=$((i+1))
142
- done
143
- case $i in
144
- (0) set -- ;;
145
- (1) set -- "$args0" ;;
146
- (2) set -- "$args0" "$args1" ;;
147
- (3) set -- "$args0" "$args1" "$args2" ;;
148
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154
- esac
155
- fi
156
-
157
- # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158
- function splitJvmOpts() {
159
- JVM_OPTS=("$@")
160
- }
161
- eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162
- JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163
-
164
- exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
@@ -1,90 +0,0 @@
1
- @if "%DEBUG%" == "" @echo off
2
- @rem ##########################################################################
3
- @rem
4
- @rem Gradle startup script for Windows
5
- @rem
6
- @rem ##########################################################################
7
-
8
- @rem Set local scope for the variables with windows NT shell
9
- if "%OS%"=="Windows_NT" setlocal
10
-
11
- @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12
- set DEFAULT_JVM_OPTS=
13
-
14
- set DIRNAME=%~dp0
15
- if "%DIRNAME%" == "" set DIRNAME=.
16
- set APP_BASE_NAME=%~n0
17
- set APP_HOME=%DIRNAME%
18
-
19
- @rem Find java.exe
20
- if defined JAVA_HOME goto findJavaFromJavaHome
21
-
22
- set JAVA_EXE=java.exe
23
- %JAVA_EXE% -version >NUL 2>&1
24
- if "%ERRORLEVEL%" == "0" goto init
25
-
26
- echo.
27
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28
- echo.
29
- echo Please set the JAVA_HOME variable in your environment to match the
30
- echo location of your Java installation.
31
-
32
- goto fail
33
-
34
- :findJavaFromJavaHome
35
- set JAVA_HOME=%JAVA_HOME:"=%
36
- set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37
-
38
- if exist "%JAVA_EXE%" goto init
39
-
40
- echo.
41
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42
- echo.
43
- echo Please set the JAVA_HOME variable in your environment to match the
44
- echo location of your Java installation.
45
-
46
- goto fail
47
-
48
- :init
49
- @rem Get command-line arguments, handling Windowz variants
50
-
51
- if not "%OS%" == "Windows_NT" goto win9xME_args
52
- if "%@eval[2+2]" == "4" goto 4NT_args
53
-
54
- :win9xME_args
55
- @rem Slurp the command line arguments.
56
- set CMD_LINE_ARGS=
57
- set _SKIP=2
58
-
59
- :win9xME_args_slurp
60
- if "x%~1" == "x" goto execute
61
-
62
- set CMD_LINE_ARGS=%*
63
- goto execute
64
-
65
- :4NT_args
66
- @rem Get arguments from the 4NT Shell from JP Software
67
- set CMD_LINE_ARGS=%$
68
-
69
- :execute
70
- @rem Setup the command line
71
-
72
- set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73
-
74
- @rem Execute Gradle
75
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76
-
77
- :end
78
- @rem End local scope for the variables with windows NT shell
79
- if "%ERRORLEVEL%"=="0" goto mainEnd
80
-
81
- :fail
82
- rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83
- rem the _cmd.exe /c_ return code!
84
- if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85
- exit /b 1
86
-
87
- :mainEnd
88
- if "%OS%"=="Windows_NT" endlocal
89
-
90
- :omega
package/app.plugin.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require("./expo/plugin/withCodePush");
package/babel.config.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
3
- };