@appzung/react-native-code-push 8.3.2 → 10.0.0-rc1

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 (191) hide show
  1. package/CodePush.js +22 -19
  2. package/CodePush.podspec +3 -3
  3. package/LICENSE.md +1 -1
  4. package/README.md +159 -296
  5. package/android/app/.gradle/config.properties +2 -0
  6. package/android/app/build.gradle +2 -0
  7. package/android/app/local.properties +8 -0
  8. package/android/app/src/main/AndroidManifest.xml +1 -2
  9. package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +27 -21
  10. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +5 -5
  11. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +1 -1
  12. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +1 -1
  13. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInstallMode.java +2 -2
  14. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidPublicKeyException.java +2 -2
  15. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushInvalidUpdateException.java +1 -1
  16. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushMalformedDataException.java +2 -2
  17. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +5 -5
  18. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNotInitializedException.java +2 -2
  19. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushTelemetryManager.java +14 -14
  20. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUnknownException.java +2 -2
  21. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java +1 -1
  22. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateState.java +2 -2
  23. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +16 -9
  24. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUtils.java +1 -1
  25. package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgress.java +1 -1
  26. package/android/app/src/main/java/com/microsoft/codepush/react/DownloadProgressCallback.java +1 -1
  27. package/android/app/src/main/java/com/microsoft/codepush/react/FileUtils.java +1 -1
  28. package/android/app/src/main/java/com/microsoft/codepush/react/ReactInstanceHolder.java +1 -1
  29. package/android/app/src/main/java/com/microsoft/codepush/react/SettingsManager.java +1 -1
  30. package/android/app/src/main/java/com/microsoft/codepush/react/TLSSocketFactory.java +1 -1
  31. package/android/build.gradle +3 -0
  32. package/android/codepush.gradle +3 -3
  33. package/docs/advanced-usage.md +56 -0
  34. package/docs/api-android.md +12 -75
  35. package/docs/api-ios.md +5 -17
  36. package/docs/api-js.md +18 -55
  37. package/docs/setup-android.md +15 -397
  38. package/docs/setup-ios.md +24 -198
  39. package/docs/setup-windows.md +7 -74
  40. package/ios/CodePush/CodePush.h +4 -4
  41. package/ios/CodePush/CodePush.m +10 -9
  42. package/ios/CodePush/CodePushConfig.m +14 -11
  43. package/ios/CodePush/CodePushPackage.m +60 -60
  44. package/ios/CodePush/CodePushTelemetryManager.m +13 -13
  45. package/ios/CodePush.xcodeproj/project.pbxproj +24 -470
  46. package/ios/PrivacyInfo.xcprivacy +31 -0
  47. package/package.json +27 -24
  48. package/react-native.config.js +1 -1
  49. package/scripts/generateBundledResourcesHash.js +1 -1
  50. package/scripts/getFilesInFolder.js +1 -1
  51. package/scripts/recordFilesBeforeBundleCommand.js +1 -1
  52. package/typings/react-native-code-push.d.ts +22 -22
  53. package/windows/CodePush/CodePushConfig.cpp +3 -3
  54. package/windows/CodePush/CodePushConfig.h +3 -3
  55. package/windows/CodePush/CodePushNativeModule.cpp +27 -27
  56. package/windows/CodePush/CodePushNativeModule.h +4 -4
  57. package/windows/CodePush/CodePushTelemetryManager.cpp +12 -12
  58. package/windows/CodePush/CodePushTelemetryManager.h +1 -1
  59. package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
  60. package/.azurepipelines/test-rn-code-push.yml +0 -94
  61. package/.config/CredScanSuppressions.json +0 -14
  62. package/SECURITY.md +0 -41
  63. package/docs/multi-deployment-testing-android.md +0 -148
  64. package/docs/multi-deployment-testing-ios.md +0 -59
  65. package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
  66. package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
  67. package/ios/CodePush/Base64/README.md +0 -47
  68. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
  69. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
  70. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
  71. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
  72. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
  73. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
  74. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
  75. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
  76. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
  77. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
  78. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
  79. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
  80. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
  81. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
  82. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
  83. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
  84. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
  85. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
  86. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
  87. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
  88. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
  89. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
  90. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
  91. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
  92. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
  93. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
  94. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
  95. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
  96. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
  97. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
  98. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
  99. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
  100. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
  101. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
  102. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
  103. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
  104. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
  105. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
  106. package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
  107. package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
  108. package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
  109. package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
  110. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
  111. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
  112. package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
  113. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
  114. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
  115. package/ios/CodePush/JWT/LICENSE +0 -19
  116. package/ios/CodePush/JWT/README.md +0 -489
  117. package/ios/CodePush/SSZipArchive/Common.h +0 -81
  118. package/ios/CodePush/SSZipArchive/README.md +0 -1
  119. package/ios/CodePush/SSZipArchive/SSZipArchive.h +0 -76
  120. package/ios/CodePush/SSZipArchive/SSZipArchive.m +0 -691
  121. package/ios/CodePush/SSZipArchive/aes/aes.h +0 -198
  122. package/ios/CodePush/SSZipArchive/aes/aes_via_ace.h +0 -541
  123. package/ios/CodePush/SSZipArchive/aes/aescrypt.c +0 -294
  124. package/ios/CodePush/SSZipArchive/aes/aeskey.c +0 -548
  125. package/ios/CodePush/SSZipArchive/aes/aesopt.h +0 -739
  126. package/ios/CodePush/SSZipArchive/aes/aestab.c +0 -391
  127. package/ios/CodePush/SSZipArchive/aes/aestab.h +0 -173
  128. package/ios/CodePush/SSZipArchive/aes/brg_endian.h +0 -126
  129. package/ios/CodePush/SSZipArchive/aes/brg_types.h +0 -219
  130. package/ios/CodePush/SSZipArchive/aes/entropy.c +0 -54
  131. package/ios/CodePush/SSZipArchive/aes/entropy.h +0 -16
  132. package/ios/CodePush/SSZipArchive/aes/fileenc.c +0 -144
  133. package/ios/CodePush/SSZipArchive/aes/fileenc.h +0 -121
  134. package/ios/CodePush/SSZipArchive/aes/hmac.c +0 -145
  135. package/ios/CodePush/SSZipArchive/aes/hmac.h +0 -103
  136. package/ios/CodePush/SSZipArchive/aes/prng.c +0 -155
  137. package/ios/CodePush/SSZipArchive/aes/prng.h +0 -82
  138. package/ios/CodePush/SSZipArchive/aes/pwd2key.c +0 -103
  139. package/ios/CodePush/SSZipArchive/aes/pwd2key.h +0 -57
  140. package/ios/CodePush/SSZipArchive/aes/sha1.c +0 -258
  141. package/ios/CodePush/SSZipArchive/aes/sha1.h +0 -73
  142. package/ios/CodePush/SSZipArchive/minizip/crypt.h +0 -130
  143. package/ios/CodePush/SSZipArchive/minizip/ioapi.c +0 -369
  144. package/ios/CodePush/SSZipArchive/minizip/ioapi.h +0 -175
  145. package/ios/CodePush/SSZipArchive/minizip/mztools.c +0 -284
  146. package/ios/CodePush/SSZipArchive/minizip/mztools.h +0 -31
  147. package/ios/CodePush/SSZipArchive/minizip/unzip.c +0 -1839
  148. package/ios/CodePush/SSZipArchive/minizip/unzip.h +0 -248
  149. package/ios/CodePush/SSZipArchive/minizip/zip.c +0 -1910
  150. package/ios/CodePush/SSZipArchive/minizip/zip.h +0 -202
  151. package/scripts/postlink/android/postlink.js +0 -87
  152. package/scripts/postlink/ios/postlink.js +0 -116
  153. package/scripts/postlink/run.js +0 -11
  154. package/scripts/postunlink/android/postunlink.js +0 -74
  155. package/scripts/postunlink/ios/postunlink.js +0 -87
  156. package/scripts/postunlink/run.js +0 -11
  157. package/scripts/tools/linkToolsAndroid.js +0 -57
  158. package/scripts/tools/linkToolsIos.js +0 -130
  159. package/windows-legacy/CodePush/CodePush.csproj +0 -128
  160. package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
  161. package/windows-legacy/CodePush/FileUtils.cs +0 -40
  162. package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
  163. package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
  164. package/windows-legacy/CodePush/UpdateManager.cs +0 -305
  165. package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
  166. package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
  167. package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
  168. package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
  169. package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
  170. package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
  171. package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
  172. package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
  173. package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
  174. package/windows-legacy/CodePush.Net46/packages.config +0 -5
  175. package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
  176. package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
  177. package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
  178. package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
  179. package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
  180. package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
  181. package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
  182. package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
  183. package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
  184. package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
  185. package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
  186. package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
  187. package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
  188. package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
  189. package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
  190. package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
  191. package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
@@ -1,202 +0,0 @@
1
- /* zip.h -- IO on .zip files using zlib
2
- Version 1.1, February 14h, 2010
3
- part of the MiniZip project
4
-
5
- Copyright (C) 1998-2010 Gilles Vollant
6
- http://www.winimage.com/zLibDll/minizip.html
7
- Modifications for Zip64 support
8
- Copyright (C) 2009-2010 Mathias Svensson
9
- http://result42.com
10
-
11
- This program is distributed under the terms of the same license as zlib.
12
- See the accompanying LICENSE file for the full text of the license.
13
- */
14
-
15
- #ifndef _ZIP_H
16
- #define _ZIP_H
17
-
18
- #define HAVE_AES
19
-
20
- #ifdef __cplusplus
21
- extern "C" {
22
- #endif
23
-
24
- #ifndef _ZLIB_H
25
- # include "zlib.h"
26
- #endif
27
-
28
- #ifndef _ZLIBIOAPI_H
29
- # include "ioapi.h"
30
- #endif
31
-
32
- #ifdef HAVE_BZIP2
33
- # include "bzlib.h"
34
- #endif
35
-
36
- #define Z_BZIP2ED 12
37
-
38
- #if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
39
- /* like the STRICT of WIN32, we define a pointer that cannot be converted
40
- from (void*) without cast */
41
- typedef struct TagzipFile__ { int unused; } zipFile__;
42
- typedef zipFile__ *zipFile;
43
- #else
44
- typedef voidp zipFile;
45
- #endif
46
-
47
- #define ZIP_OK (0)
48
- #define ZIP_EOF (0)
49
- #define ZIP_ERRNO (Z_ERRNO)
50
- #define ZIP_PARAMERROR (-102)
51
- #define ZIP_BADZIPFILE (-103)
52
- #define ZIP_INTERNALERROR (-104)
53
-
54
- #ifndef DEF_MEM_LEVEL
55
- # if MAX_MEM_LEVEL >= 8
56
- # define DEF_MEM_LEVEL 8
57
- # else
58
- # define DEF_MEM_LEVEL MAX_MEM_LEVEL
59
- # endif
60
- #endif
61
- /* default memLevel */
62
-
63
- /* tm_zip contain date/time info */
64
- typedef struct tm_zip_s
65
- {
66
- uInt tm_sec; /* seconds after the minute - [0,59] */
67
- uInt tm_min; /* minutes after the hour - [0,59] */
68
- uInt tm_hour; /* hours since midnight - [0,23] */
69
- uInt tm_mday; /* day of the month - [1,31] */
70
- uInt tm_mon; /* months since January - [0,11] */
71
- uInt tm_year; /* years - [1980..2044] */
72
- } tm_zip;
73
-
74
- typedef struct
75
- {
76
- tm_zip tmz_date; /* date in understandable format */
77
- uLong dosDate; /* if dos_date == 0, tmu_date is used */
78
- uLong internal_fa; /* internal file attributes 2 bytes */
79
- uLong external_fa; /* external file attributes 4 bytes */
80
- } zip_fileinfo;
81
-
82
- typedef const char* zipcharpc;
83
-
84
- #define APPEND_STATUS_CREATE (0)
85
- #define APPEND_STATUS_CREATEAFTER (1)
86
- #define APPEND_STATUS_ADDINZIP (2)
87
-
88
- /***************************************************************************/
89
- /* Writing a zip file */
90
-
91
- extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
92
- extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));
93
- /* Create a zipfile.
94
-
95
- pathname should contain the full pathname (by example, on a Windows XP computer
96
- "c:\\zlib\\zlib113.zip" or on an Unix computer "zlib/zlib113.zip".
97
-
98
- return NULL if zipfile cannot be opened
99
- return zipFile handle if no error
100
-
101
- If the file pathname exist and append == APPEND_STATUS_CREATEAFTER, the zip
102
- will be created at the end of the file. (useful if the file contain a self extractor code)
103
- If the file pathname exist and append == APPEND_STATUS_ADDINZIP, we will add files in existing
104
- zip (be sure you don't add file that doesn't exist)
105
-
106
- NOTE: There is no delete function into a zipfile. If you want delete file into a zipfile,
107
- you must open a zipfile, and create another. Of course, you can use RAW reading and writing to copy
108
- the file you did not want delete. */
109
-
110
- extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, int append, zipcharpc* globalcomment,
111
- zlib_filefunc_def* pzlib_filefunc_def));
112
-
113
- extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname, int append, zipcharpc* globalcomment,
114
- zlib_filefunc64_def* pzlib_filefunc_def));
115
-
116
- extern zipFile ZEXPORT zipOpen3 OF((const char *pathname, int append, ZPOS64_T disk_size,
117
- zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc_def));
118
- /* Same as zipOpen2 but allows specification of spanned zip size */
119
-
120
- extern zipFile ZEXPORT zipOpen3_64 OF((const void *pathname, int append, ZPOS64_T disk_size,
121
- zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def));
122
-
123
- extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, const char* filename, const zip_fileinfo* zipfi,
124
- const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global,
125
- uInt size_extrafield_global, const char* comment, int method, int level));
126
- /* Open a file in the ZIP for writing.
127
-
128
- filename : the filename in zip (if NULL, '-' without quote will be used
129
- *zipfi contain supplemental information
130
- extrafield_local buffer to store the local header extra field data, can be NULL
131
- size_extrafield_local size of extrafield_local buffer
132
- extrafield_global buffer to store the global header extra field data, can be NULL
133
- size_extrafield_global size of extrafield_local buffer
134
- comment buffer for comment string
135
- method contain the compression method (0 for store, Z_DEFLATED for deflate)
136
- level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
137
- zip64 is set to 1 if a zip64 extended information block should be added to the local file header.
138
- this MUST be '1' if the uncompressed size is >= 0xffffffff. */
139
-
140
- extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi,
141
- const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global,
142
- uInt size_extrafield_global, const char* comment, int method, int level, int zip64));
143
- /* Same as zipOpenNewFileInZip with zip64 support */
144
-
145
- extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi,
146
- const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global,
147
- uInt size_extrafield_global, const char* comment, int method, int level, int raw));
148
- /* Same as zipOpenNewFileInZip, except if raw=1, we write raw file */
149
-
150
- extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi,
151
- const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global,
152
- uInt size_extrafield_global, const char* comment, int method, int level, int raw, int zip64));
153
- /* Same as zipOpenNewFileInZip3 with zip64 support */
154
-
155
- extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi,
156
- const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global,
157
- uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel,
158
- int strategy, const char* password, uLong crcForCrypting));
159
- /* Same as zipOpenNewFileInZip2, except
160
- windowBits, memLevel, strategy : see parameter strategy in deflateInit2
161
- password : crypting password (NULL for no crypting)
162
- crcForCrypting : crc of file to compress (needed for crypting) */
163
-
164
- extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi,
165
- const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global,
166
- uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel,
167
- int strategy, const char* password, uLong crcForCrypting, int zip64));
168
- /* Same as zipOpenNewFileInZip3 with zip64 support */
169
-
170
- extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi,
171
- const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global,
172
- uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel,
173
- int strategy, const char* password, uLong crcForCrypting, uLong versionMadeBy, uLong flagBase));
174
- /* Same as zipOpenNewFileInZip3 except versionMadeBy & flag fields */
175
-
176
- extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file, const char* filename, const zip_fileinfo* zipfi,
177
- const void* extrafield_local, uInt size_extrafield_local, const void* extrafield_global,
178
- uInt size_extrafield_global, const char* comment, int method, int level, int raw, int windowBits, int memLevel,
179
- int strategy, const char* password, uLong crcForCrypting, uLong versionMadeBy, uLong flagBase, int zip64));
180
- /* Same as zipOpenNewFileInZip4 with zip64 support */
181
-
182
- extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, const void* buf, unsigned len));
183
- /* Write data in the zipfile */
184
-
185
- extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
186
- /* Close the current file in the zipfile */
187
-
188
- extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, uLong uncompressed_size, uLong crc32));
189
- extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file, ZPOS64_T uncompressed_size, uLong crc32));
190
- /* Close the current file in the zipfile, for file opened with parameter raw=1 in zipOpenNewFileInZip2
191
- uncompressed_size and crc32 are value for the uncompressed size */
192
-
193
- extern int ZEXPORT zipClose OF((zipFile file, const char* global_comment));
194
- /* Close the zipfile */
195
-
196
- /***************************************************************************/
197
-
198
- #ifdef __cplusplus
199
- }
200
- #endif
201
-
202
- #endif /* _ZIP_H */
@@ -1,87 +0,0 @@
1
- var linkTools = require('../../tools/linkToolsAndroid');
2
- var fs = require("fs");
3
- var inquirer = require('inquirer');
4
-
5
- module.exports = () => {
6
-
7
- console.log("Running android postlink script");
8
-
9
- var buildGradlePath = linkTools.getBuildGradlePath();
10
- var mainApplicationPath = linkTools.getMainApplicationLocation();
11
-
12
- // 1. Add the getJSBundleFile override
13
- var getJSBundleFileOverride = linkTools.getJSBundleFileOverride;
14
-
15
- if (mainApplicationPath) {
16
- var mainApplicationContents = fs.readFileSync(mainApplicationPath, "utf8");
17
- if (linkTools.isJsBundleOverridden(mainApplicationContents)) {
18
- console.log(`"getJSBundleFile" is already overridden`);
19
- } else {
20
- var reactNativeHostInstantiation = linkTools.reactNativeHostInstantiation;
21
- mainApplicationContents = mainApplicationContents.replace(reactNativeHostInstantiation,
22
- `${reactNativeHostInstantiation}${getJSBundleFileOverride}`);
23
- fs.writeFileSync(mainApplicationPath, mainApplicationContents);
24
- }
25
- } else {
26
- var mainActivityPath = linkTools.getMainActivityPath();
27
- if (mainActivityPath) {
28
- var mainActivityContents = fs.readFileSync(mainActivityPath, "utf8");
29
- if (linkTools.isJsBundleOverridden(mainActivityContents)) {
30
- console.log(`"getJSBundleFile" is already overridden`);
31
- } else {
32
- var mainActivityClassDeclaration = linkTools.mainActivityClassDeclaration;
33
- mainActivityContents = mainActivityContents.replace(mainActivityClassDeclaration,
34
- `${mainActivityClassDeclaration}${getJSBundleFileOverride}`);
35
- fs.writeFileSync(mainActivityPath, mainActivityContents);
36
- }
37
- } else {
38
- return Promise.reject(`Couldn't find Android application entry point. You might need to update it manually. \
39
- Please refer to plugin configuration section for Android at \
40
- https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#plugin-configuration-for-react-native-lower-than-060-android for more details`);
41
- }
42
- }
43
-
44
- if (!fs.existsSync(buildGradlePath)) {
45
- return Promise.reject(`Couldn't find build.gradle file. You might need to update it manually. \
46
- Please refer to plugin installation section for Android at \
47
- https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#plugin-installation-android---manual`);
48
- }
49
-
50
- // 2. Add the codepush.gradle build task definitions
51
- var buildGradleContents = fs.readFileSync(buildGradlePath, "utf8");
52
- var reactGradleLink = buildGradleContents.match(/\napply from: ["'].*?react\.gradle["']/)[0];
53
- var codePushGradleLink = linkTools.codePushGradleLink;
54
- if (~buildGradleContents.indexOf(codePushGradleLink)) {
55
- console.log(`"codepush.gradle" is already linked in the build definition`);
56
- } else {
57
- buildGradleContents = buildGradleContents.replace(reactGradleLink,
58
- `${reactGradleLink}${codePushGradleLink}`);
59
- fs.writeFileSync(buildGradlePath, buildGradleContents);
60
- }
61
-
62
- //3. Add deployment key
63
- var stringsResourcesPath = linkTools.getStringsResourcesPath();
64
- if (!stringsResourcesPath) {
65
- return Promise.reject(new Error(`Couldn't find strings.xml. You might need to update it manually.`));
66
- } else {
67
- var stringsResourcesContent = fs.readFileSync(stringsResourcesPath, "utf8");
68
- var deploymentKeyName = linkTools.deploymentKeyName;
69
- if (~stringsResourcesContent.indexOf(deploymentKeyName)) {
70
- console.log(`${deploymentKeyName} already specified in the strings.xml`);
71
- } else {
72
- return inquirer.prompt({
73
- "type": "input",
74
- "name": "androidDeploymentKey",
75
- "message": "What is your CodePush deployment key for Android (hit <ENTER> to ignore)"
76
- }).then(function(answer) {
77
- var insertAfterString = "<resources>";
78
- var deploymentKeyString = `\t<string moduleConfig="true" name="${deploymentKeyName}">${answer.androidDeploymentKey || "deployment-key-here"}</string>`;
79
- stringsResourcesContent = stringsResourcesContent.replace(insertAfterString,`${insertAfterString}\n${deploymentKeyString}`);
80
- fs.writeFileSync(stringsResourcesPath, stringsResourcesContent);
81
- return Promise.resolve();
82
- });
83
- }
84
- }
85
-
86
- return Promise.resolve();
87
- }
@@ -1,116 +0,0 @@
1
-
2
- var linkTools = require('../../tools/linkToolsIos');
3
- var fs = require("fs");
4
- var inquirer = require('inquirer');
5
- var plist = require("plist");
6
- var semver = require('semver');
7
-
8
- var package = require('../../../../../package.json');
9
-
10
- module.exports = () => {
11
-
12
- console.log("Running ios postlink script");
13
-
14
- var appDelegatePath = linkTools.getAppDeletePath();
15
-
16
- if (!appDelegatePath) {
17
- return Promise.reject(`Couldn't find AppDelegate. You might need to update it manually \
18
- Please refer to plugin configuration section for iOS at \
19
- https://github.com/microsoft/react-native-code-push#plugin-configuration-ios`);
20
- }
21
-
22
- var appDelegateContents = fs.readFileSync(appDelegatePath, "utf8");
23
-
24
- // 1. Add the header import statement
25
- if (~appDelegateContents.indexOf(linkTools.codePushHeaderImportStatement)) {
26
- console.log(`"CodePush.h" header already imported.`);
27
- } else {
28
- var appDelegateHeaderImportStatement = `#import "AppDelegate.h"`;
29
- appDelegateContents = appDelegateContents.replace(appDelegateHeaderImportStatement,
30
- `${appDelegateHeaderImportStatement}${linkTools.codePushHeaderImportStatementFormatted}`);
31
- }
32
-
33
- // 2. Modify jsCodeLocation value assignment
34
- var reactNativeVersion = package && package.dependencies && package.dependencies["react-native"];
35
-
36
- if (!reactNativeVersion) {
37
- console.log(`Can't take react-native version from package.json`);
38
- } else if (semver.gte(semver.coerce(reactNativeVersion), "0.59.0")) {
39
- var oldBundleUrl = linkTools.oldBundleUrl;
40
- var codePushBundleUrl = linkTools.codePushBundleUrl;
41
-
42
- if (~appDelegateContents.indexOf(codePushBundleUrl)) {
43
- console.log(`"BundleUrl" already pointing to "[CodePush bundleURL]".`);
44
- } else {
45
- if (~appDelegateContents.indexOf(oldBundleUrl)) {
46
- appDelegateContents = appDelegateContents.replace(oldBundleUrl, codePushBundleUrl);
47
- } else {
48
- console.log(`AppDelegate isn't compatible for linking`);
49
- }
50
- }
51
- } else {
52
- var jsCodeLocations = appDelegateContents.match(/(jsCodeLocation = .*)/g);
53
-
54
- if (!jsCodeLocations) {
55
- console.log('Couldn\'t find jsCodeLocation setting in AppDelegate.');
56
- }
57
-
58
- var newJsCodeLocationAssignmentStatement = linkTools.codePushGradleLink;
59
- if (~appDelegateContents.indexOf(newJsCodeLocationAssignmentStatement)) {
60
- console.log(`"jsCodeLocation" already pointing to "[CodePush bundleURL]".`);
61
- } else {
62
- if (jsCodeLocations.length === 1) {
63
- // If there is one `jsCodeLocation` it means that react-native app version is not the 0.57.8 or 0.57.0 and lower than 0.59
64
- // and we should replace this line with DEBUG ifdef statement and add CodePush call for Release case
65
-
66
- var oldJsCodeLocationAssignmentStatement = jsCodeLocations[0];
67
- var jsCodeLocationPatch = linkTools.getJsCodeLocationPatch(oldJsCodeLocationAssignmentStatement);
68
- appDelegateContents = appDelegateContents.replace(oldJsCodeLocationAssignmentStatement,
69
- jsCodeLocationPatch);
70
- } else if (jsCodeLocations.length === 2) {
71
- // If there are two `jsCodeLocation` it means that react-native app version is higher than 0.57.8 or equal
72
- // and we should replace the second one(Release case) with CodePush call
73
-
74
- appDelegateContents = appDelegateContents.replace(jsCodeLocations[1],
75
- newJsCodeLocationAssignmentStatement);
76
- } else {
77
- console.log(`AppDelegate isn't compatible for linking`);
78
- }
79
- }
80
- }
81
-
82
- var plistPath = linkTools.getPlistPath();
83
-
84
- if (!plistPath) {
85
- return Promise.reject(`Couldn't find .plist file. You might need to update it manually \
86
- Please refer to plugin configuration section for iOS at \
87
- https://github.com/microsoft/react-native-code-push#plugin-configuration-ios`);
88
- }
89
-
90
- var plistContents = fs.readFileSync(plistPath, "utf8");
91
-
92
- // 3. Add CodePushDeploymentKey to plist file
93
- var parsedInfoPlist = plist.parse(plistContents);
94
- if (parsedInfoPlist.CodePushDeploymentKey) {
95
- console.log(`"CodePushDeploymentKey" already specified in the plist file.`);
96
- writePatches();
97
- return Promise.resolve();
98
- } else {
99
- return inquirer.prompt({
100
- "type": "input",
101
- "name": "iosDeploymentKey",
102
- "message": "What is your CodePush deployment key for iOS (hit <ENTER> to ignore)"
103
- }).then(function(answer) {
104
- parsedInfoPlist.CodePushDeploymentKey = answer.iosDeploymentKey || "deployment-key-here";
105
- plistContents = plist.build(parsedInfoPlist);
106
-
107
- writePatches();
108
- return Promise.resolve();
109
- });
110
- }
111
-
112
- function writePatches() {
113
- fs.writeFileSync(appDelegatePath, appDelegateContents);
114
- fs.writeFileSync(plistPath, plistContents);
115
- }
116
- }
@@ -1,11 +0,0 @@
1
- var postlinks = [
2
- require("./android/postlink"),
3
- require("./ios/postlink")
4
- ];
5
-
6
- //run them sequentially
7
- postlinks
8
- .reduce((p, fn) => p.then(fn), Promise.resolve())
9
- .catch((err) => {
10
- console.error(err.message);
11
- });
@@ -1,74 +0,0 @@
1
- var linkTools = require('../../tools/linkToolsAndroid');
2
- var fs = require("fs");
3
-
4
- module.exports = () => {
5
-
6
- console.log("Running android postunlink script");
7
-
8
- var mainApplicationPath = linkTools.getMainApplicationLocation();
9
-
10
- // 1. Remove the getJSBundleFile override
11
- var getJSBundleFileOverride = linkTools.getJSBundleFileOverride;
12
-
13
- if (mainApplicationPath) {
14
- var mainApplicationContents = fs.readFileSync(mainApplicationPath, "utf8");
15
- if (!linkTools.isJsBundleOverridden(mainApplicationContents)) {
16
- console.log(`"getJSBundleFile" is already removed`);
17
- } else {
18
- mainApplicationContents = mainApplicationContents.replace(`${getJSBundleFileOverride}`, "");
19
- fs.writeFileSync(mainApplicationPath, mainApplicationContents);
20
- }
21
- } else {
22
- var mainActivityPath = linkTools.getMainActivityPath();
23
- if (mainActivityPath) {
24
- var mainActivityContents = fs.readFileSync(mainActivityPath, "utf8");
25
- if (!linkTools.isJsBundleOverridden(mainActivityContents)) {
26
- console.log(`"getJSBundleFile" is already removed`);
27
- } else {
28
- mainActivityContents = mainActivityContents.replace(getJSBundleFileOverride, "");
29
- fs.writeFileSync(mainActivityPath, mainActivityContents);
30
- }
31
- } else {
32
- console.log(`Couldn't find Android application entry point. You might need to update it manually. \
33
- Please refer to plugin configuration section for Android at \
34
- https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#plugin-configuration-for-react-native-lower-than-060-android for more details`);
35
- }
36
- }
37
-
38
- // 2. Remove the codepush.gradle build task definitions
39
- var buildGradlePath = linkTools.getBuildGradlePath();
40
-
41
- if (!fs.existsSync(buildGradlePath)) {
42
- console.log(`Couldn't find build.gradle file. You might need to update it manually. \
43
- Please refer to plugin installation section for Android at \
44
- https://github.com/microsoft/react-native-code-push/blob/master/docs/setup-android.md#plugin-installation-android---manual`);
45
- } else {
46
- var buildGradleContents = fs.readFileSync(buildGradlePath, "utf8");
47
- var codePushGradleLink = linkTools.codePushGradleLink;
48
- if (!~buildGradleContents.indexOf(codePushGradleLink)) {
49
- console.log(`"codepush.gradle" is already unlinked in the build definition`);
50
- } else {
51
- buildGradleContents = buildGradleContents.replace(`${codePushGradleLink}`,"");
52
- fs.writeFileSync(buildGradlePath, buildGradleContents);
53
- }
54
- }
55
-
56
- // 3. Remove deployment key
57
- var stringsResourcesPath = linkTools.getStringsResourcesPath();
58
- if (!stringsResourcesPath) {
59
- return Promise.reject(new Error("Couldn't find strings.xml. You might need to update it manually."));
60
- } else {
61
- var stringsResourcesContent = fs.readFileSync(stringsResourcesPath, "utf8");
62
- var deploymentKeyName = linkTools.deploymentKeyName;
63
- if (!~stringsResourcesContent.indexOf(deploymentKeyName)) {
64
- console.log(`${deploymentKeyName} already removed from the strings.xml`);
65
- } else {
66
- var AndroidDeploymentKey = stringsResourcesContent.match(/(<string moduleConfig="true" name="CodePushDeploymentKey">.*<\/string>)/);
67
- if (AndroidDeploymentKey) {
68
- stringsResourcesContent = stringsResourcesContent.replace(`\n\t${AndroidDeploymentKey[0]}`,"");
69
- fs.writeFileSync(stringsResourcesPath, stringsResourcesContent);
70
- }
71
- }
72
- }
73
- return Promise.resolve();
74
- }
@@ -1,87 +0,0 @@
1
-
2
- var linkTools = require('../../tools/linkToolsIos');
3
- var fs = require("fs");
4
- var plist = require("plist");
5
- var semver = require('semver');
6
- var packageFile = require('../../../../../package.json');
7
-
8
- module.exports = () => {
9
-
10
- console.log("Running ios postunlink script");
11
-
12
- var appDelegatePath = linkTools.getAppDeletePath();
13
-
14
- if (!appDelegatePath) {
15
- console.log(`Couldn't find AppDelegate. You might need to update it manually \
16
- Please refer to plugin configuration section for iOS at \
17
- https://github.com/microsoft/react-native-code-push#plugin-configuration-ios`);
18
- } else {
19
- var appDelegateContents = fs.readFileSync(appDelegatePath, "utf8");
20
-
21
- // 1. Remove the header import statement
22
- if (!~appDelegateContents.indexOf(linkTools.codePushHeaderImportStatement)) {
23
- console.log(`"CodePush.h" header already removed.`);
24
- } else {
25
- appDelegateContents = appDelegateContents.replace(linkTools.codePushHeaderImportStatementFormatted, "");
26
- }
27
-
28
- // 2. Modify jsCodeLocation value assignment
29
- var codePushBundleUrl = linkTools.codePushBundleUrl;
30
- if (!~appDelegateContents.indexOf(codePushBundleUrl)) {
31
- console.log(`"jsCodeLocation" already not pointing to "[CodePush bundleURL]".`);
32
- } else {
33
- var reactNativeVersion = packageFile && packageFile.dependencies && packageFile.dependencies["react-native"];
34
- if (!reactNativeVersion) {
35
- console.log(`Can't take react-native version from package.json`);
36
- } else if (semver.gte(semver.coerce(reactNativeVersion), "0.59.0")) {
37
- var oldBundleUrl = linkTools.oldBundleUrl;
38
- appDelegateContents = appDelegateContents.replace(codePushBundleUrl, oldBundleUrl);
39
- fs.writeFileSync(appDelegatePath, appDelegateContents);
40
- } else {
41
- var linkedJsCodeLocationAssignmentStatement = linkTools.linkedJsCodeLocationAssignmentStatement;
42
- var jsCodeLocations = appDelegateContents.match(/(jsCodeLocation = .*)/g);
43
- if (!jsCodeLocations || jsCodeLocations.length !== 2 || !~appDelegateContents.indexOf(linkedJsCodeLocationAssignmentStatement)) {
44
- console.log(`AppDelegate isn't compatible for unlinking`);
45
- } else {
46
- if (semver.eq(semver.coerce(reactNativeVersion), "0.57.8") || semver.eq(semver.coerce(reactNativeVersion), "0.57.0")) {
47
- // If version of react-native application is 0.57.8 or 0.57 then by default there are two different
48
- // jsCodeLocation for debug and release and we should replace only release
49
- var unlinkedJsCodeLocations = `jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];`;
50
- appDelegateContents = appDelegateContents.replace(linkedJsCodeLocationAssignmentStatement,
51
- unlinkedJsCodeLocations);
52
- } else {
53
- // If version of react-native application is not 0.57.8 or 0.57 and lower than 0.59.0 then by default there is only one
54
- // jsCodeLocation and we should stay on only it
55
- var defaultJsCodeLocationAssignmentStatement = jsCodeLocations[0];
56
- var linkedCodeLocationPatch = linkTools.getJsCodeLocationPatch(defaultJsCodeLocationAssignmentStatement);
57
- appDelegateContents = appDelegateContents.replace(linkedCodeLocationPatch,
58
- defaultJsCodeLocationAssignmentStatement);
59
- }
60
- fs.writeFileSync(appDelegatePath, appDelegateContents);
61
- }
62
- }
63
- }
64
- }
65
-
66
- var plistPath = linkTools.getPlistPath();
67
-
68
- if (!plistPath) {
69
- return Promise.reject(`Couldn't find .plist file. You might need to update it manually \
70
- Please refer to plugin configuration section for iOS at \
71
- https://github.com/microsoft/react-native-code-push#plugin-configuration-ios`);
72
- }
73
-
74
- var plistContents = fs.readFileSync(plistPath, "utf8");
75
-
76
- // 3. Remove CodePushDeploymentKey from plist file
77
- var parsedInfoPlist = plist.parse(plistContents);
78
- if (!parsedInfoPlist.CodePushDeploymentKey) {
79
- console.log(`"CodePushDeploymentKey" already removed from the plist file.`);
80
- } else {
81
- delete parsedInfoPlist.CodePushDeploymentKey;
82
- plistContents = plist.build(parsedInfoPlist);
83
- fs.writeFileSync(plistPath, plistContents);
84
- }
85
-
86
- return Promise.resolve();
87
- }
@@ -1,11 +0,0 @@
1
- var postunlinks = [
2
- require("./ios/postunlink"),
3
- require("./android/postunlink")
4
- ];
5
-
6
- //run them sequentially
7
- postunlinks
8
- .reduce((p, fn) => p.then(fn), Promise.resolve())
9
- .catch((err) => {
10
- console.error(err.message);
11
- });
@@ -1,57 +0,0 @@
1
- var fs = require("fs");
2
- var glob = require("glob");
3
- var path = require("path");
4
-
5
- var ignoreFolders = { ignore: ["node_modules/**", "**/build/**"] };
6
- var manifestPath = glob.sync("**/AndroidManifest.xml", ignoreFolders)[0];
7
-
8
- exports.getJSBundleFileOverride = `
9
- @Override
10
- protected String getJSBundleFile(){
11
- return CodePush.getJSBundleFile();
12
- }
13
- `;
14
- exports.reactNativeHostInstantiation = "new ReactNativeHost(this) {";
15
- exports.mainActivityClassDeclaration = "public class MainActivity extends ReactActivity {";
16
- exports.codePushGradleLink = `\napply from: "../../node_modules/react-native-code-push/android/codepush.gradle"`;
17
- exports.deploymentKeyName = "CodePushDeploymentKey";
18
-
19
- exports.getMainApplicationLocation = function () {
20
- return findMainApplication() || glob.sync("**/MainApplication.java", ignoreFolders)[0];
21
- }
22
-
23
- exports.getMainActivityPath = function () {
24
- return glob.sync("**/MainActivity.java", ignoreFolders)[0]
25
- }
26
-
27
- exports.getStringsResourcesPath = function () {
28
- return glob.sync("**/strings.xml", ignoreFolders)[0];
29
- }
30
-
31
- exports.getBuildGradlePath = function () {
32
- return path.join("android", "app", "build.gradle");
33
- }
34
-
35
- exports.isJsBundleOverridden = function (codeContents) {
36
- return /@Override\s*\n\s*protected String getJSBundleFile\(\)\s*\{[\s\S]*?\}/.test(codeContents);
37
- }
38
-
39
- function findMainApplication() {
40
- if (!manifestPath) {
41
- return null;
42
- }
43
-
44
- var manifest = fs.readFileSync(manifestPath, "utf8");
45
-
46
- // Android manifest must include single 'application' element
47
- var matchResult = manifest.match(/application\s+android:name\s*=\s*"(.*?)"/);
48
- if (matchResult) {
49
- var appName = matchResult[1];
50
- } else {
51
- return null;
52
- }
53
-
54
- var nameParts = appName.split('.');
55
- var searchPath = glob.sync("**/" + nameParts[nameParts.length - 1] + ".java", ignoreFolders)[0];
56
- return searchPath;
57
- }