@algocare/react-native-code-push 12.6.4 → 13.0.0-rc.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.
- package/CodePush.podspec +6 -8
- package/README.md +343 -586
- package/android/app/build.gradle +2 -1
- package/android/app/proguard-rules.pro +14 -0
- package/android/app/src/debug/AndroidManifest.xml +9 -0
- package/android/app/src/main/AndroidManifest.xml +1 -2
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +14 -139
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +0 -3
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +108 -63
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +2 -33
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +13 -109
- package/android/build.gradle +3 -0
- package/app.plugin.js +1 -0
- package/bin/code-push.js +6 -0
- package/cli/commands/bundleCommand/bundleCodePush.ts +118 -0
- package/cli/commands/bundleCommand/index.ts +34 -0
- package/cli/commands/createHistoryCommand/createReleaseHistory.ts +37 -0
- package/cli/commands/createHistoryCommand/createReleaseHistoryList.ts +40 -0
- package/cli/commands/createHistoryCommand/index.ts +44 -0
- package/cli/commands/createPullRequestHistoryCommand/createPullRequestHistory.ts +33 -0
- package/cli/commands/createPullRequestHistoryCommand/index.ts +31 -0
- package/cli/commands/createPullRequestReleaseCommand/addToPullRequestRelease.ts +71 -0
- package/cli/commands/createPullRequestReleaseCommand/createPullRequestRelease.ts +75 -0
- package/cli/commands/createPullRequestReleaseCommand/index.ts +74 -0
- package/cli/commands/getPackageHashCommand/index.ts +45 -0
- package/cli/commands/initCommand/index.ts +14 -0
- package/cli/commands/initCommand/initAndroid.ts +91 -0
- package/cli/commands/initCommand/initIos.ts +123 -0
- package/cli/commands/initCommand/test/initAndroid.test.ts +128 -0
- package/cli/commands/initCommand/test/initIos.test.ts +99 -0
- package/cli/commands/releaseCommand/addToReleaseHistory.ts +57 -0
- package/cli/commands/releaseCommand/index.ts +90 -0
- package/cli/commands/releaseCommand/release.ts +105 -0
- package/cli/commands/removePullRequestHistoryCommand/index.ts +37 -0
- package/cli/commands/removePullRequestHistoryCommand/removePullRequestHistory.ts +28 -0
- package/cli/commands/showHistoryCommand/index.ts +31 -0
- package/cli/commands/updateHistoryCommand/index.ts +55 -0
- package/cli/commands/updateHistoryCommand/updateReleaseHistory.ts +42 -0
- package/cli/constant.ts +4 -0
- package/cli/dist/commands/bundleCommand/bundleCodePush.js +65 -0
- package/cli/dist/commands/bundleCommand/index.js +15 -0
- package/cli/dist/commands/createHistoryCommand/createReleaseHistory.js +25 -0
- package/cli/dist/commands/createHistoryCommand/createReleaseHistoryList.js +27 -0
- package/cli/dist/commands/createHistoryCommand/index.js +20 -0
- package/cli/dist/commands/createPullRequestHistoryCommand/createPullRequestHistory.js +23 -0
- package/cli/dist/commands/createPullRequestHistoryCommand/index.js +15 -0
- package/cli/dist/commands/createPullRequestReleaseCommand/addToPullRequestRelease.js +51 -0
- package/cli/dist/commands/createPullRequestReleaseCommand/createPullRequestRelease.js +39 -0
- package/cli/dist/commands/createPullRequestReleaseCommand/index.js +35 -0
- package/cli/dist/commands/getPackageHashCommand/index.js +26 -0
- package/cli/dist/commands/initCommand/index.js +12 -0
- package/cli/dist/commands/initCommand/initAndroid.js +73 -0
- package/cli/dist/commands/initCommand/initIos.js +108 -0
- package/cli/dist/commands/initCommand/test/initAndroid.test.js +113 -0
- package/cli/dist/commands/initCommand/test/initIos.test.js +95 -0
- package/cli/dist/commands/releaseCommand/addToReleaseHistory.js +35 -0
- package/cli/dist/commands/releaseCommand/index.js +45 -0
- package/cli/dist/commands/releaseCommand/release.js +62 -0
- package/cli/dist/commands/removePullRequestHistoryCommand/index.js +19 -0
- package/cli/dist/commands/removePullRequestHistoryCommand/removePullRequestHistory.js +18 -0
- package/cli/dist/commands/showHistoryCommand/index.js +15 -0
- package/cli/dist/commands/updateHistoryCommand/index.js +31 -0
- package/cli/dist/commands/updateHistoryCommand/updateReleaseHistory.js +28 -0
- package/cli/dist/constant.js +4 -0
- package/cli/dist/functions/getReactTempDir.js +10 -0
- package/cli/{functions → dist/functions}/makeCodePushBundle.js +5 -11
- package/cli/{functions → dist/functions}/prepareToBundleJS.js +2 -5
- package/cli/dist/functions/runExpoBundleCommand.js +35 -0
- package/cli/{functions → dist/functions}/runHermesEmitBinaryCommand.js +36 -71
- package/cli/{functions → dist/functions}/runReactNativeBundleCommand.js +19 -24
- package/cli/dist/index.js +54 -0
- package/cli/dist/utils/datetime.js +17 -0
- package/cli/dist/utils/file-utils.js +19 -0
- package/cli/dist/utils/fsUtils.js +44 -0
- package/cli/{utils → dist/utils}/hash-utils.js +19 -130
- package/cli/{utils → dist/utils}/promisfied-fs.js +5 -16
- package/cli/dist/utils/showLogo.js +21 -0
- package/cli/dist/utils/unzip.js +41 -0
- package/cli/{utils → dist/utils}/zip.js +15 -51
- package/cli/functions/{getReactTempDir.js → getReactTempDir.ts} +2 -6
- package/cli/functions/makeCodePushBundle.ts +26 -0
- package/cli/functions/prepareToBundleJS.ts +10 -0
- package/cli/functions/runExpoBundleCommand.ts +45 -0
- package/cli/functions/runHermesEmitBinaryCommand.ts +203 -0
- package/cli/functions/runReactNativeBundleCommand.ts +67 -0
- package/cli/index.ts +68 -0
- package/cli/package.json +35 -0
- package/cli/utils/datetime.ts +19 -0
- package/cli/utils/{file-utils.js → file-utils.ts} +4 -21
- package/cli/utils/fsUtils.ts +50 -0
- package/cli/utils/hash-utils.ts +143 -0
- package/cli/utils/promisfied-fs.ts +19 -0
- package/cli/utils/{showLogo.js → showLogo.ts} +4 -6
- package/cli/utils/unzip.ts +46 -0
- package/cli/utils/zip.ts +65 -0
- package/expo/plugin/withCodePush.js +14 -0
- package/expo/plugin/withCodePushAndroid.js +92 -0
- package/expo/plugin/withCodePushIos.js +143 -0
- package/ios/CodePush/CodePush.h +0 -16
- package/ios/CodePush/CodePush.m +30 -20
- package/ios/CodePush/CodePushConfig.m +1 -11
- package/ios/CodePush/CodePushPackage.m +12 -69
- package/ios/CodePush/CodePushUpdateUtils.m +1 -91
- package/ios/CodePush/SSZipArchive/Info.plist +26 -0
- package/ios/CodePush/SSZipArchive/README.md +1 -1
- package/ios/CodePush/SSZipArchive/SSZipArchive.h +129 -27
- package/ios/CodePush/SSZipArchive/SSZipArchive.m +1119 -314
- package/ios/CodePush/SSZipArchive/SSZipCommon.h +71 -0
- package/ios/CodePush/SSZipArchive/Supporting Files/PrivacyInfo.xcprivacy +23 -0
- package/ios/CodePush/SSZipArchive/include/ZipArchive.h +25 -0
- package/ios/CodePush/SSZipArchive/minizip/LICENSE +17 -0
- package/ios/CodePush/SSZipArchive/minizip/mz.h +273 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_compat.c +1306 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_compat.h +346 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt.c +187 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt.h +65 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_crypt_apple.c +526 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_os.c +348 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_os.h +176 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_os_posix.c +350 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm.c +556 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm.h +132 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.c +383 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.h +42 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.c +269 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.h +48 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_os.h +40 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_os_posix.c +203 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.c +334 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.h +46 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.c +429 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.h +43 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.c +360 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.h +46 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.c +389 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.h +43 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_zip.c +2782 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_zip.h +262 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.c +1942 -0
- package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.h +285 -0
- package/ios/CodePush.xcodeproj/project.pbxproj +244 -453
- package/ios/PrivacyInfo.xcprivacy +31 -0
- package/package.json +68 -42
- package/react-native.config.js +1 -1
- package/{AlertAdapter.js → src/AlertAdapter.js} +5 -5
- package/src/CodePush.js +947 -0
- package/{package-mixins.js → src/package-mixins.js} +1 -1
- package/{versioning → src/versioning}/BaseVersioning.js +12 -1
- package/{versioning → src/versioning}/SemverVersioning.test.js +78 -0
- package/typings/react-native-code-push.d.ts +559 -495
- package/.claude/commands/release.md +0 -78
- package/.claude/skills/npm-release/SKILL.md +0 -89
- package/CLAUDE.md +0 -83
- package/CONTRIBUTING.md +0 -134
- package/CodePush.js +0 -972
- package/SECURITY.md +0 -41
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java +0 -12
- package/android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java +0 -17
- package/android/codepush.gradle +0 -162
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradlew +0 -164
- package/android/gradlew.bat +0 -90
- package/babel.config.js +0 -3
- package/cli/commands/bundleCommand/bundleCodePush.js +0 -57
- package/cli/commands/bundleCommand/index.js +0 -55
- package/cli/commands/common.js +0 -245
- package/cli/commands/createHistoryCommand/createReleaseHistory.js +0 -42
- package/cli/commands/createHistoryCommand/createReleaseHistoryList.js +0 -52
- package/cli/commands/createHistoryCommand/index.js +0 -95
- package/cli/commands/createPullRequestHistoryCommand/createPullRequestHistory.js +0 -34
- package/cli/commands/createPullRequestHistoryCommand/index.js +0 -29
- package/cli/commands/createPullRequestReleaseCommand/addToPullRequestRelease.js +0 -74
- package/cli/commands/createPullRequestReleaseCommand/createPullRequestRelease.js +0 -91
- package/cli/commands/createPullRequestReleaseCommand/index.js +0 -68
- package/cli/commands/getPackageHashCommand/index.js +0 -42
- package/cli/commands/releaseCommand/addToReleaseHistory.js +0 -85
- package/cli/commands/releaseCommand/index.js +0 -151
- package/cli/commands/releaseCommand/release.js +0 -121
- package/cli/commands/removePullRequestHistoryCommand/index.js +0 -28
- package/cli/commands/removePullRequestHistoryCommand/removePullRequestHistory.js +0 -23
- package/cli/commands/showHistoryCommand/index.js +0 -88
- package/cli/commands/updateHistoryCommand/index.js +0 -123
- package/cli/commands/updateHistoryCommand/updateReleaseHistory.js +0 -69
- package/cli/constant.js +0 -8
- package/cli/index.js +0 -63
- package/cli/utils/datetime.js +0 -22
- package/cli/utils/fsUtils.js +0 -64
- package/cli/utils/version.js +0 -26
- package/code-push.config.example.supabase.ts +0 -114
- package/code-push.config.js +0 -229
- package/code-push.config.ts +0 -175
- package/docs/api-android.md +0 -83
- package/docs/api-ios.md +0 -31
- package/docs/api-js.md +0 -592
- package/docs/multi-deployment-testing-android.md +0 -148
- package/docs/multi-deployment-testing-ios.md +0 -59
- package/docs/setup-android.md +0 -482
- package/docs/setup-ios.md +0 -280
- package/eslint.config.mjs +0 -32
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
- package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
- package/ios/CodePush/Base64/README.md +0 -47
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
- package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
- package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
- package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
- package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
- package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
- package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
- package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
- package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
- package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
- package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
- package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
- package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
- package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
- package/ios/CodePush/JWT/LICENSE +0 -19
- package/ios/CodePush/JWT/README.md +0 -489
- package/ios/CodePush/SSZipArchive/Common.h +0 -81
- package/ios/CodePush/SSZipArchive/aes/aes.h +0 -198
- package/ios/CodePush/SSZipArchive/aes/aes_via_ace.h +0 -541
- package/ios/CodePush/SSZipArchive/aes/aescrypt.c +0 -294
- package/ios/CodePush/SSZipArchive/aes/aeskey.c +0 -548
- package/ios/CodePush/SSZipArchive/aes/aesopt.h +0 -739
- package/ios/CodePush/SSZipArchive/aes/aestab.c +0 -391
- package/ios/CodePush/SSZipArchive/aes/aestab.h +0 -173
- package/ios/CodePush/SSZipArchive/aes/brg_endian.h +0 -126
- package/ios/CodePush/SSZipArchive/aes/brg_types.h +0 -219
- package/ios/CodePush/SSZipArchive/aes/entropy.c +0 -54
- package/ios/CodePush/SSZipArchive/aes/entropy.h +0 -16
- package/ios/CodePush/SSZipArchive/aes/fileenc.c +0 -144
- package/ios/CodePush/SSZipArchive/aes/fileenc.h +0 -121
- package/ios/CodePush/SSZipArchive/aes/hmac.c +0 -145
- package/ios/CodePush/SSZipArchive/aes/hmac.h +0 -103
- package/ios/CodePush/SSZipArchive/aes/prng.c +0 -155
- package/ios/CodePush/SSZipArchive/aes/prng.h +0 -82
- package/ios/CodePush/SSZipArchive/aes/pwd2key.c +0 -103
- package/ios/CodePush/SSZipArchive/aes/pwd2key.h +0 -57
- package/ios/CodePush/SSZipArchive/aes/sha1.c +0 -258
- package/ios/CodePush/SSZipArchive/aes/sha1.h +0 -73
- package/ios/CodePush/SSZipArchive/minizip/crypt.h +0 -130
- package/ios/CodePush/SSZipArchive/minizip/ioapi.c +0 -369
- package/ios/CodePush/SSZipArchive/minizip/ioapi.h +0 -175
- package/ios/CodePush/SSZipArchive/minizip/mztools.c +0 -284
- package/ios/CodePush/SSZipArchive/minizip/mztools.h +0 -31
- package/ios/CodePush/SSZipArchive/minizip/unzip.c +0 -1839
- package/ios/CodePush/SSZipArchive/minizip/unzip.h +0 -248
- package/ios/CodePush/SSZipArchive/minizip/zip.c +0 -1910
- package/ios/CodePush/SSZipArchive/minizip/zip.h +0 -202
- package/scripts/generateBundledResourcesHash.js +0 -125
- package/scripts/getFilesInFolder.js +0 -19
- package/scripts/recordFilesBeforeBundleCommand.js +0 -41
- package/scripts/release.sh +0 -86
- package/tsconfig.json +0 -20
- package/tslint.json +0 -32
- /package/{logging.js → src/logging.js} +0 -0
- /package/{versioning → src/versioning}/BaseVersioning.test.js +0 -0
- /package/{versioning → src/versioning}/IncrementalVersioning.js +0 -0
- /package/{versioning → src/versioning}/IncrementalVersioning.test.js +0 -0
- /package/{versioning → src/versioning}/SemverVersioning.js +0 -0
- /package/{versioning → src/versioning}/index.js +0 -0
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,37 +0,0 @@
|
|
|
1
|
-
package com.microsoft.codepush.react;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
|
|
5
|
-
public class CodePushBuilder {
|
|
6
|
-
private String mDeploymentKey;
|
|
7
|
-
private Context mContext;
|
|
8
|
-
|
|
9
|
-
private boolean mIsDebugMode;
|
|
10
|
-
private String mServerUrl;
|
|
11
|
-
private Integer mPublicKeyResourceDescriptor;
|
|
12
|
-
|
|
13
|
-
public CodePushBuilder(String deploymentKey, Context context) {
|
|
14
|
-
this.mDeploymentKey = deploymentKey;
|
|
15
|
-
this.mContext = context;
|
|
16
|
-
this.mServerUrl = CodePush.getServiceUrl();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
public CodePushBuilder setIsDebugMode(boolean isDebugMode) {
|
|
20
|
-
this.mIsDebugMode = isDebugMode;
|
|
21
|
-
return this;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public CodePushBuilder setServerUrl(String serverUrl) {
|
|
25
|
-
this.mServerUrl = serverUrl;
|
|
26
|
-
return this;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public CodePushBuilder setPublicKeyResourceDescriptor(int publicKeyResourceDescriptor) {
|
|
30
|
-
this.mPublicKeyResourceDescriptor = publicKeyResourceDescriptor;
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public CodePush build() {
|
|
35
|
-
return new CodePush(this.mDeploymentKey, this.mContext, this.mIsDebugMode, this.mServerUrl, this.mPublicKeyResourceDescriptor);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
package com.microsoft.codepush.react;
|
|
2
|
-
|
|
3
|
-
class CodePushInvalidPublicKeyException extends RuntimeException {
|
|
4
|
-
|
|
5
|
-
public CodePushInvalidPublicKeyException(String message, Throwable cause) {
|
|
6
|
-
super(message, cause);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
public CodePushInvalidPublicKeyException(String message) {
|
|
10
|
-
super(message);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -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
|
-
}
|
package/android/codepush.gradle
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
// Adapted from https://raw.githubusercontent.com/facebook/react-native/d16ff3bd8b92fa84a9007bf5ebedd8153e4c089d/react.gradle
|
|
2
|
-
|
|
3
|
-
import java.nio.file.Paths;
|
|
4
|
-
|
|
5
|
-
def config = project.extensions.findByName("react") ?: [:]
|
|
6
|
-
def bundleAssetName = config.bundleAssetName ? config.bundleAssetName.get() : "index.android.bundle"
|
|
7
|
-
|
|
8
|
-
// because elvis operator
|
|
9
|
-
def elvisFile(thing) {
|
|
10
|
-
return thing ? file(thing) : null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
void runBefore(String dependentTaskName, Task task) {
|
|
14
|
-
Task dependentTask = tasks.findByPath(dependentTaskName);
|
|
15
|
-
if (dependentTask != null) {
|
|
16
|
-
dependentTask.dependsOn task
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Finds the path of the installed npm package with the given name using Node's
|
|
22
|
-
* module resolution algorithm, which searches "node_modules" directories up to
|
|
23
|
-
* the file system root. This handles various cases, including:
|
|
24
|
-
*
|
|
25
|
-
* - Working in the open-source RN repo:
|
|
26
|
-
* Gradle: /path/to/react-native/ReactAndroid
|
|
27
|
-
* Node module: /path/to/react-native/node_modules/[package]
|
|
28
|
-
*
|
|
29
|
-
* - Installing RN as a dependency of an app and searching for hoisted
|
|
30
|
-
* dependencies:
|
|
31
|
-
* Gradle: /path/to/app/node_modules/react-native/ReactAndroid
|
|
32
|
-
* Node module: /path/to/app/node_modules/[package]
|
|
33
|
-
*
|
|
34
|
-
* - Working in a larger repo (e.g., Facebook) that contains RN:
|
|
35
|
-
* Gradle: /path/to/repo/path/to/react-native/ReactAndroid
|
|
36
|
-
* Node module: /path/to/repo/node_modules/[package]
|
|
37
|
-
*
|
|
38
|
-
* The search begins at the given base directory (a File object). The returned
|
|
39
|
-
* path is a string.
|
|
40
|
-
*/
|
|
41
|
-
static def findNodeModulePath(baseDir, packageName) {
|
|
42
|
-
def basePath = baseDir.toPath().normalize()
|
|
43
|
-
// Node's module resolution algorithm searches up to the root directory,
|
|
44
|
-
// after which the base path will be null
|
|
45
|
-
while (basePath) {
|
|
46
|
-
def candidatePath = Paths.get(basePath.toString(), "node_modules", packageName)
|
|
47
|
-
if (candidatePath.toFile().exists()) {
|
|
48
|
-
return candidatePath.toString()
|
|
49
|
-
}
|
|
50
|
-
basePath = basePath.getParent()
|
|
51
|
-
}
|
|
52
|
-
return null
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
android.buildTypes.each { buildType ->
|
|
56
|
-
// to prevent incorrect long value restoration from strings.xml we need to wrap it with double quotes
|
|
57
|
-
// https://github.com/microsoft/cordova-plugin-code-push/issues/264
|
|
58
|
-
buildType.resValue 'string', "CODE_PUSH_APK_BUILD_TIME", String.format("\"%d\"", System.currentTimeMillis())
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
gradle.projectsEvaluated {
|
|
62
|
-
def debuggableVariants = config.debuggableVariants ? config.debuggableVariants.get() : ['debug']
|
|
63
|
-
|
|
64
|
-
android.applicationVariants.all { variant ->
|
|
65
|
-
// No code push for debuggable variants
|
|
66
|
-
if (debuggableVariants.contains(variant.name)) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
def nodeModulesPath;
|
|
71
|
-
if (project.hasProperty('nodeModulesPath')) {
|
|
72
|
-
nodeModulesPath = "${project.nodeModulesPath}/react-native-code-push"
|
|
73
|
-
} else {
|
|
74
|
-
nodeModulesPath = findNodeModulePath(projectDir, "react-native-code-push")
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
def targetName = variant.name.capitalize()
|
|
78
|
-
def targetPath = variant.dirName
|
|
79
|
-
|
|
80
|
-
def jsBundleDir;
|
|
81
|
-
def resourcesDir;
|
|
82
|
-
def jsBundleFile;
|
|
83
|
-
|
|
84
|
-
// Additional node commandline arguments
|
|
85
|
-
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ? config.nodeExecutableAndArgs.get(): ["node"]
|
|
86
|
-
def extraPackagerArgs = config.extraPackagerArgs ? config.extraPackagerArgs.get() : []
|
|
87
|
-
|
|
88
|
-
// Make this task run right after the bundle task
|
|
89
|
-
def generateBundledResourcesHash;
|
|
90
|
-
|
|
91
|
-
def reactBundleTask = tasks.findByName("createBundle${targetName}JsAndAssets")
|
|
92
|
-
if (reactBundleTask) {
|
|
93
|
-
jsBundleDir = reactBundleTask.property('jsBundleDir').asFile.get()
|
|
94
|
-
resourcesDir = reactBundleTask.property('resourcesDir').asFile.get()
|
|
95
|
-
|
|
96
|
-
// mitigates Resource and asset merger: Duplicate resources error
|
|
97
|
-
project.delete(files("${jsBundleDir}"))
|
|
98
|
-
|
|
99
|
-
jsBundleDir.mkdirs()
|
|
100
|
-
resourcesDir.mkdirs()
|
|
101
|
-
|
|
102
|
-
jsBundleFile = file("$jsBundleDir/$bundleAssetName")
|
|
103
|
-
|
|
104
|
-
generateBundledResourcesHash = tasks.create(
|
|
105
|
-
name: "generateBundledResourcesHash${targetName}",
|
|
106
|
-
type: Exec) {
|
|
107
|
-
commandLine (*nodeExecutableAndArgs, "${nodeModulesPath}/scripts/generateBundledResourcesHash.js", resourcesDir, jsBundleFile, jsBundleDir)
|
|
108
|
-
|
|
109
|
-
enabled !debuggableVariants.contains(variant.name) ?: targetName.toLowerCase().contains("release")
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
runBefore("merge${targetName}Resources", generateBundledResourcesHash)
|
|
113
|
-
runBefore("merge${targetName}Assets", generateBundledResourcesHash)
|
|
114
|
-
} else {
|
|
115
|
-
def jsBundleDirConfigName = "jsBundleDir${targetName}"
|
|
116
|
-
jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ? elvisFile(config."$jsBundleDirConfigName").get():
|
|
117
|
-
file("$buildDir/intermediates/assets/${targetPath}")
|
|
118
|
-
|
|
119
|
-
def resourcesDirConfigName = "resourcesDir${targetName}"
|
|
120
|
-
resourcesDir = elvisFile(config."${resourcesDirConfigName}") ? elvisFile(config."${resourcesDirConfigName}").get():
|
|
121
|
-
file("$buildDir/intermediates/res/merged/${targetPath}")
|
|
122
|
-
|
|
123
|
-
// In case version of 'Android Plugin for Gradle'' is lower than 1.3.0
|
|
124
|
-
// '$buildDir' has slightly different structure - 'merged' folder
|
|
125
|
-
// does not exists so '${targetPath}' folder contains directly in 'res' folder.
|
|
126
|
-
if (!resourcesDir.exists() && file("$buildDir/intermediates/res/${targetPath}").exists()) {
|
|
127
|
-
resourcesDir = file("$buildDir/intermediates/res/${targetPath}")
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
jsBundleFile = file("$jsBundleDir/$bundleAssetName")
|
|
131
|
-
|
|
132
|
-
def resourcesMapTempFileName = "CodePushResourcesMap-" + java.util.UUID.randomUUID().toString().substring(0,8) + ".json"
|
|
133
|
-
|
|
134
|
-
generateBundledResourcesHash = tasks.create(
|
|
135
|
-
name: "generateBundledResourcesHash${targetName}",
|
|
136
|
-
type: Exec) {
|
|
137
|
-
commandLine (*nodeExecutableAndArgs, "${nodeModulesPath}/scripts/generateBundledResourcesHash.js", resourcesDir, jsBundleFile, jsBundleDir, resourcesMapTempFileName)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// Make this task run right before the bundle task
|
|
141
|
-
def recordFilesBeforeBundleCommand = tasks.create(
|
|
142
|
-
name: "recordFilesBeforeBundleCommand${targetName}",
|
|
143
|
-
type: Exec) {
|
|
144
|
-
commandLine (*nodeExecutableAndArgs, "${nodeModulesPath}/scripts/recordFilesBeforeBundleCommand.js", resourcesDir, resourcesMapTempFileName)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
recordFilesBeforeBundleCommand.dependsOn("merge${targetName}Resources")
|
|
148
|
-
recordFilesBeforeBundleCommand.dependsOn("merge${targetName}Assets")
|
|
149
|
-
runBefore("bundle${targetName}JsAndAssets", recordFilesBeforeBundleCommand)
|
|
150
|
-
|
|
151
|
-
// We need to generate and record the resources map, but we use it to generate the bundle hash
|
|
152
|
-
generateBundledResourcesHash.dependsOn("recordFilesBeforeBundleCommand${targetName}")
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
generateBundledResourcesHash.dependsOn("createBundle${targetName}JsAndAssets")
|
|
156
|
-
|
|
157
|
-
runBefore("processArmeabi-v7a${targetName}Resources", generateBundledResourcesHash)
|
|
158
|
-
runBefore("processX86${targetName}Resources", generateBundledResourcesHash)
|
|
159
|
-
runBefore("processUniversal${targetName}Resources", generateBundledResourcesHash)
|
|
160
|
-
runBefore("process${targetName}Resources", generateBundledResourcesHash)
|
|
161
|
-
}
|
|
162
|
-
}
|
|
Binary file
|
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 "$@"
|
package/android/gradlew.bat
DELETED
|
@@ -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/babel.config.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const { prepareToBundleJS } = require('../../functions/prepareToBundleJS');
|
|
3
|
-
const { runReactNativeBundleCommand } = require('../../functions/runReactNativeBundleCommand');
|
|
4
|
-
const { getReactTempDir } = require('../../functions/getReactTempDir');
|
|
5
|
-
const { runHermesEmitBinaryCommand } = require('../../functions/runHermesEmitBinaryCommand');
|
|
6
|
-
const { makeCodePushBundle } = require('../../functions/makeCodePushBundle');
|
|
7
|
-
const { ROOT_OUTPUT_DIR, ENTRY_FILE } = require('../../constant');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @param platform {string} 'ios' | 'android'
|
|
11
|
-
* @param outputRootPath {string}
|
|
12
|
-
* @param entryFile {string}
|
|
13
|
-
* @param jsBundleName {string|undefined}
|
|
14
|
-
* @param bundleDirectory {string}
|
|
15
|
-
* @return {Promise<string>} CodePush bundle file name (equals to packageHash)
|
|
16
|
-
*/
|
|
17
|
-
async function bundleCodePush(
|
|
18
|
-
platform = 'ios',
|
|
19
|
-
outputRootPath = ROOT_OUTPUT_DIR,
|
|
20
|
-
entryFile = ENTRY_FILE,
|
|
21
|
-
jsBundleName, // JS bundle file name (not CodePush bundle file)
|
|
22
|
-
bundleDirectory, // CodePush bundle output directory
|
|
23
|
-
) {
|
|
24
|
-
if (fs.existsSync(outputRootPath)) {
|
|
25
|
-
fs.rmSync(outputRootPath, { recursive: true });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const OUTPUT_CONTENT_PATH = `${outputRootPath}/CodePush`;
|
|
29
|
-
const DEFAULT_JS_BUNDLE_NAME = platform === 'ios' ? 'main.jsbundle' : 'index.android.bundle';
|
|
30
|
-
const _jsBundleName = jsBundleName || DEFAULT_JS_BUNDLE_NAME; // react-native JS bundle output name
|
|
31
|
-
const SOURCEMAP_OUTPUT = `${outputRootPath}/${_jsBundleName}.map`;
|
|
32
|
-
|
|
33
|
-
prepareToBundleJS({ deleteDirs: [outputRootPath, getReactTempDir()], makeDir: OUTPUT_CONTENT_PATH });
|
|
34
|
-
|
|
35
|
-
runReactNativeBundleCommand(
|
|
36
|
-
_jsBundleName,
|
|
37
|
-
OUTPUT_CONTENT_PATH,
|
|
38
|
-
platform,
|
|
39
|
-
SOURCEMAP_OUTPUT,
|
|
40
|
-
entryFile,
|
|
41
|
-
);
|
|
42
|
-
console.log('log: JS bundling complete');
|
|
43
|
-
|
|
44
|
-
await runHermesEmitBinaryCommand(
|
|
45
|
-
_jsBundleName,
|
|
46
|
-
OUTPUT_CONTENT_PATH,
|
|
47
|
-
SOURCEMAP_OUTPUT,
|
|
48
|
-
);
|
|
49
|
-
console.log('log: Hermes compilation complete');
|
|
50
|
-
|
|
51
|
-
const { bundleFileName: codePushBundleFileName } = await makeCodePushBundle(OUTPUT_CONTENT_PATH, bundleDirectory);
|
|
52
|
-
console.log(`log: CodePush bundle created (file path: ./${bundleDirectory}/${codePushBundleFileName})`);
|
|
53
|
-
|
|
54
|
-
return codePushBundleFileName;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
module.exports = { bundleCodePush: bundleCodePush };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
const { program } = require('commander')
|
|
2
|
-
const inquirer = require('inquirer').default
|
|
3
|
-
const { bundleCodePush } = require('./bundleCodePush')
|
|
4
|
-
const {
|
|
5
|
-
OUTPUT_BUNDLE_DIR,
|
|
6
|
-
ROOT_OUTPUT_DIR,
|
|
7
|
-
ENTRY_FILE,
|
|
8
|
-
} = require('../../constant')
|
|
9
|
-
|
|
10
|
-
program
|
|
11
|
-
.command('bundle')
|
|
12
|
-
.description('Creates a CodePush bundle file (assumes Hermes is enabled).')
|
|
13
|
-
.option(
|
|
14
|
-
'-o, --output-path <string>',
|
|
15
|
-
'path to output root directory',
|
|
16
|
-
ROOT_OUTPUT_DIR
|
|
17
|
-
)
|
|
18
|
-
.option('-e, --entry-file <string>', 'path to JS/TS entry file', ENTRY_FILE)
|
|
19
|
-
.option(
|
|
20
|
-
'-b, --bundle-name <string>',
|
|
21
|
-
'bundle file name (default-ios: "main.jsbundle" / default-android: "index.android.bundle")'
|
|
22
|
-
)
|
|
23
|
-
.option(
|
|
24
|
-
'--output-bundle-dir <string>',
|
|
25
|
-
'name of directory containing the bundle file created by the "bundle" command',
|
|
26
|
-
OUTPUT_BUNDLE_DIR
|
|
27
|
-
)
|
|
28
|
-
.action(async (options) => {
|
|
29
|
-
const answers = await inquirer.prompt([
|
|
30
|
-
{
|
|
31
|
-
type: 'list',
|
|
32
|
-
name: 'app',
|
|
33
|
-
message: 'Select the target app',
|
|
34
|
-
choices: ['user', 'device', 'b2c-device', 'home-device', 'home-mobile'],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
type: 'list',
|
|
38
|
-
name: 'platform',
|
|
39
|
-
message: 'Select the target platform',
|
|
40
|
-
choices: ['ios', 'android'],
|
|
41
|
-
when: (answers) => answers.app !== 'device',
|
|
42
|
-
},
|
|
43
|
-
])
|
|
44
|
-
if (answers.app === 'device') {
|
|
45
|
-
answers.platform = 'android'
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
bundleCodePush(
|
|
49
|
-
answers.platform,
|
|
50
|
-
options.outputPath,
|
|
51
|
-
options.entryFile,
|
|
52
|
-
options.bundleName,
|
|
53
|
-
`${options.outputPath}/${options.outputBundleDir}`
|
|
54
|
-
)
|
|
55
|
-
})
|