@appzung/react-native-code-push 7.1.1 → 9.0.2

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 (97) hide show
  1. package/.azurepipelines/build-rn-code-push-1es.yml +104 -0
  2. package/.azurepipelines/test-rn-code-push.yml +94 -0
  3. package/.config/CredScanSuppressions.json +14 -0
  4. package/CONTRIBUTING.md +3 -3
  5. package/CodePush.js +20 -21
  6. package/CodePush.podspec +3 -3
  7. package/README.md +7 -5
  8. package/android/app/build.gradle +3 -1
  9. package/android/app/src/main/AndroidManifest.xml +2 -7
  10. package/android/app/src/main/java/com/microsoft/codepush/react/CodePush.java +14 -5
  11. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushConstants.java +1 -0
  12. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushNativeModule.java +9 -1
  13. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateUtils.java +18 -10
  14. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushUtils.java +3 -1
  15. package/android/build.gradle +6 -2
  16. package/android/codepush.gradle +72 -26
  17. package/docs/api-js.md +1 -1
  18. package/docs/setup-android.md +27 -3
  19. package/docs/setup-ios.md +1 -1
  20. package/docs/setup-windows.md +23 -0
  21. package/ios/CodePush/CodePush.m +2 -1
  22. package/ios/CodePush/CodePushPackage.m +4 -0
  23. package/ios/CodePush/SSZipArchive/Info.plist +26 -0
  24. package/ios/CodePush/SSZipArchive/README.md +1 -1
  25. package/ios/CodePush/SSZipArchive/SSZipArchive.h +129 -27
  26. package/ios/CodePush/SSZipArchive/SSZipArchive.m +1119 -314
  27. package/ios/CodePush/SSZipArchive/SSZipCommon.h +71 -0
  28. package/ios/CodePush/SSZipArchive/Supporting Files/PrivacyInfo.xcprivacy +23 -0
  29. package/ios/CodePush/SSZipArchive/include/ZipArchive.h +25 -0
  30. package/ios/CodePush/SSZipArchive/minizip/LICENSE +17 -0
  31. package/ios/CodePush/SSZipArchive/minizip/mz.h +273 -0
  32. package/ios/CodePush/SSZipArchive/minizip/mz_compat.c +1306 -0
  33. package/ios/CodePush/SSZipArchive/minizip/mz_compat.h +346 -0
  34. package/ios/CodePush/SSZipArchive/minizip/mz_crypt.c +187 -0
  35. package/ios/CodePush/SSZipArchive/minizip/mz_crypt.h +65 -0
  36. package/ios/CodePush/SSZipArchive/minizip/mz_crypt_apple.c +526 -0
  37. package/ios/CodePush/SSZipArchive/minizip/mz_os.c +348 -0
  38. package/ios/CodePush/SSZipArchive/minizip/mz_os.h +176 -0
  39. package/ios/CodePush/SSZipArchive/minizip/mz_os_posix.c +350 -0
  40. package/ios/CodePush/SSZipArchive/minizip/mz_strm.c +556 -0
  41. package/ios/CodePush/SSZipArchive/minizip/mz_strm.h +132 -0
  42. package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.c +383 -0
  43. package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.h +42 -0
  44. package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.c +269 -0
  45. package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.h +48 -0
  46. package/ios/CodePush/SSZipArchive/minizip/mz_strm_os.h +40 -0
  47. package/ios/CodePush/SSZipArchive/minizip/mz_strm_os_posix.c +203 -0
  48. package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.c +334 -0
  49. package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.h +46 -0
  50. package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.c +429 -0
  51. package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.h +43 -0
  52. package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.c +360 -0
  53. package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.h +46 -0
  54. package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.c +389 -0
  55. package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.h +43 -0
  56. package/ios/CodePush/SSZipArchive/minizip/mz_zip.c +2782 -0
  57. package/ios/CodePush/SSZipArchive/minizip/mz_zip.h +262 -0
  58. package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.c +1942 -0
  59. package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.h +285 -0
  60. package/ios/CodePush.xcodeproj/project.pbxproj +245 -130
  61. package/ios/PrivacyInfo.xcprivacy +31 -0
  62. package/package.json +2 -2
  63. package/typings/react-native-code-push.d.ts +1 -1
  64. package/windows/CodePush/CodePush.vcxproj +2 -3
  65. package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +2 -2
  66. package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +2 -2
  67. package/ios/CodePush/SSZipArchive/Common.h +0 -81
  68. package/ios/CodePush/SSZipArchive/aes/aes.h +0 -198
  69. package/ios/CodePush/SSZipArchive/aes/aes_via_ace.h +0 -541
  70. package/ios/CodePush/SSZipArchive/aes/aescrypt.c +0 -294
  71. package/ios/CodePush/SSZipArchive/aes/aeskey.c +0 -548
  72. package/ios/CodePush/SSZipArchive/aes/aesopt.h +0 -739
  73. package/ios/CodePush/SSZipArchive/aes/aestab.c +0 -391
  74. package/ios/CodePush/SSZipArchive/aes/aestab.h +0 -173
  75. package/ios/CodePush/SSZipArchive/aes/brg_endian.h +0 -126
  76. package/ios/CodePush/SSZipArchive/aes/brg_types.h +0 -219
  77. package/ios/CodePush/SSZipArchive/aes/entropy.c +0 -54
  78. package/ios/CodePush/SSZipArchive/aes/entropy.h +0 -16
  79. package/ios/CodePush/SSZipArchive/aes/fileenc.c +0 -144
  80. package/ios/CodePush/SSZipArchive/aes/fileenc.h +0 -121
  81. package/ios/CodePush/SSZipArchive/aes/hmac.c +0 -145
  82. package/ios/CodePush/SSZipArchive/aes/hmac.h +0 -103
  83. package/ios/CodePush/SSZipArchive/aes/prng.c +0 -155
  84. package/ios/CodePush/SSZipArchive/aes/prng.h +0 -82
  85. package/ios/CodePush/SSZipArchive/aes/pwd2key.c +0 -103
  86. package/ios/CodePush/SSZipArchive/aes/pwd2key.h +0 -57
  87. package/ios/CodePush/SSZipArchive/aes/sha1.c +0 -258
  88. package/ios/CodePush/SSZipArchive/aes/sha1.h +0 -73
  89. package/ios/CodePush/SSZipArchive/minizip/crypt.h +0 -130
  90. package/ios/CodePush/SSZipArchive/minizip/ioapi.c +0 -369
  91. package/ios/CodePush/SSZipArchive/minizip/ioapi.h +0 -175
  92. package/ios/CodePush/SSZipArchive/minizip/mztools.c +0 -284
  93. package/ios/CodePush/SSZipArchive/minizip/mztools.h +0 -31
  94. package/ios/CodePush/SSZipArchive/minizip/unzip.c +0 -1839
  95. package/ios/CodePush/SSZipArchive/minizip/unzip.h +0 -248
  96. package/ios/CodePush/SSZipArchive/minizip/zip.c +0 -1910
  97. package/ios/CodePush/SSZipArchive/minizip/zip.h +0 -202
@@ -0,0 +1,262 @@
1
+ /* mz_zip.h -- Zip manipulation
2
+ part of the minizip-ng project
3
+
4
+ Copyright (C) Nathan Moinvaziri
5
+ https://github.com/zlib-ng/minizip-ng
6
+ Copyright (C) 2009-2010 Mathias Svensson
7
+ Modifications for Zip64 support
8
+ http://result42.com
9
+ Copyright (C) 1998-2010 Gilles Vollant
10
+ https://www.winimage.com/zLibDll/minizip.html
11
+
12
+ This program is distributed under the terms of the same license as zlib.
13
+ See the accompanying LICENSE file for the full text of the license.
14
+ */
15
+
16
+ #ifndef MZ_ZIP_H
17
+ #define MZ_ZIP_H
18
+
19
+ #ifdef __cplusplus
20
+ extern "C" {
21
+ #endif
22
+
23
+ /***************************************************************************/
24
+
25
+ typedef struct mz_zip_file_s {
26
+ uint16_t version_madeby; /* version made by */
27
+ uint16_t version_needed; /* version needed to extract */
28
+ uint16_t flag; /* general purpose bit flag */
29
+ uint16_t compression_method; /* compression method */
30
+ time_t modified_date; /* last modified date in unix time */
31
+ time_t accessed_date; /* last accessed date in unix time */
32
+ time_t creation_date; /* creation date in unix time */
33
+ uint32_t crc; /* crc-32 */
34
+ int64_t compressed_size; /* compressed size */
35
+ int64_t uncompressed_size; /* uncompressed size */
36
+ uint16_t filename_size; /* filename length */
37
+ uint16_t extrafield_size; /* extra field length */
38
+ uint16_t comment_size; /* file comment length */
39
+ uint32_t disk_number; /* disk number start */
40
+ int64_t disk_offset; /* relative offset of local header */
41
+ uint16_t internal_fa; /* internal file attributes */
42
+ uint32_t external_fa; /* external file attributes */
43
+
44
+ const char *filename; /* filename utf8 null-terminated string */
45
+ const uint8_t *extrafield; /* extrafield data */
46
+ const char *comment; /* comment utf8 null-terminated string */
47
+ const char *linkname; /* sym-link filename utf8 null-terminated string */
48
+
49
+ uint16_t zip64; /* zip64 extension mode */
50
+ uint16_t aes_version; /* winzip aes extension if not 0 */
51
+ uint8_t aes_encryption_mode; /* winzip aes encryption mode */
52
+ uint16_t pk_verify; /* pkware encryption verifier */
53
+
54
+ } mz_zip_file, mz_zip_entry;
55
+
56
+ /***************************************************************************/
57
+
58
+ typedef int32_t (*mz_zip_locate_entry_cb)(void *handle, void *userdata, mz_zip_file *file_info);
59
+
60
+ /***************************************************************************/
61
+
62
+ void * mz_zip_create(void **handle);
63
+ /* Create zip instance for opening */
64
+
65
+ void mz_zip_delete(void **handle);
66
+ /* Delete zip object */
67
+
68
+ int32_t mz_zip_open(void *handle, void *stream, int32_t mode);
69
+ /* Create a zip file, no delete file in zip functionality */
70
+
71
+ int32_t mz_zip_close(void *handle);
72
+ /* Close the zip file */
73
+
74
+ int32_t mz_zip_get_comment(void *handle, const char **comment);
75
+ /* Get a pointer to the global comment */
76
+
77
+ int32_t mz_zip_set_comment(void *handle, const char *comment);
78
+ /* Sets the global comment used for writing zip file */
79
+
80
+ int32_t mz_zip_get_version_madeby(void *handle, uint16_t *version_madeby);
81
+ /* Get the version made by */
82
+
83
+ int32_t mz_zip_set_version_madeby(void *handle, uint16_t version_madeby);
84
+ /* Sets the version made by used for writing zip file */
85
+
86
+ int32_t mz_zip_set_recover(void *handle, uint8_t recover);
87
+ /* Sets the ability to recover the central dir by reading local file headers */
88
+
89
+ int32_t mz_zip_set_data_descriptor(void *handle, uint8_t data_descriptor);
90
+ /* Sets the use of data descriptor flag when writing zip entries */
91
+
92
+ int32_t mz_zip_get_stream(void *handle, void **stream);
93
+ /* Get a pointer to the stream used to open */
94
+
95
+ int32_t mz_zip_set_cd_stream(void *handle, int64_t cd_start_pos, void *cd_stream);
96
+ /* Sets the stream to use for reading the central dir */
97
+
98
+ int32_t mz_zip_get_cd_mem_stream(void *handle, void **cd_mem_stream);
99
+ /* Get a pointer to the stream used to store the central dir in memory */
100
+
101
+ int32_t mz_zip_set_number_entry(void *handle, uint64_t number_entry);
102
+ /* Sets the total number of entries */
103
+
104
+ int32_t mz_zip_get_number_entry(void *handle, uint64_t *number_entry);
105
+ /* Get the total number of entries */
106
+
107
+ int32_t mz_zip_set_disk_number_with_cd(void *handle, uint32_t disk_number_with_cd);
108
+ /* Sets the disk number containing the central directory record */
109
+
110
+ int32_t mz_zip_get_disk_number_with_cd(void *handle, uint32_t *disk_number_with_cd);
111
+ /* Get the disk number containing the central directory record */
112
+
113
+ /***************************************************************************/
114
+
115
+ int32_t mz_zip_entry_is_open(void *handle);
116
+ /* Check to see if entry is open for read/write */
117
+
118
+ int32_t mz_zip_entry_read_open(void *handle, uint8_t raw, const char *password);
119
+ /* Open for reading the current file in the zip file */
120
+
121
+ int32_t mz_zip_entry_read(void *handle, void *buf, int32_t len);
122
+ /* Read bytes from the current file in the zip file */
123
+
124
+ int32_t mz_zip_entry_read_close(void *handle, uint32_t *crc32, int64_t *compressed_size,
125
+ int64_t *uncompressed_size);
126
+ /* Close the current file for reading and get data descriptor values */
127
+
128
+ int32_t mz_zip_entry_write_open(void *handle, const mz_zip_file *file_info,
129
+ int16_t compress_level, uint8_t raw, const char *password);
130
+ /* Open for writing the current file in the zip file */
131
+
132
+ int32_t mz_zip_entry_write(void *handle, const void *buf, int32_t len);
133
+ /* Write bytes from the current file in the zip file */
134
+
135
+ int32_t mz_zip_entry_write_close(void *handle, uint32_t crc32, int64_t compressed_size,
136
+ int64_t uncompressed_size);
137
+ /* Close the current file for writing and set data descriptor values */
138
+
139
+ int32_t mz_zip_entry_seek_local_header(void *handle);
140
+ /* Seeks to the local header for the entry */
141
+
142
+ int32_t mz_zip_entry_get_compress_stream(void *handle, void **compress_stream);
143
+ /* Get a pointer to the compression stream used for the current entry */
144
+
145
+ int32_t mz_zip_entry_close_raw(void *handle, int64_t uncompressed_size, uint32_t crc32);
146
+ /* Close the current file in the zip file where raw is compressed data */
147
+
148
+ int32_t mz_zip_entry_close(void *handle);
149
+ /* Close the current file in the zip file */
150
+
151
+ /***************************************************************************/
152
+
153
+ int32_t mz_zip_entry_is_dir(void *handle);
154
+ /* Checks to see if the entry is a directory */
155
+
156
+ int32_t mz_zip_entry_is_symlink(void *handle);
157
+ /* Checks to see if the entry is a symbolic link */
158
+
159
+ int32_t mz_zip_entry_get_info(void *handle, mz_zip_file **file_info);
160
+ /* Get info about the current file, only valid while current entry is open */
161
+
162
+ int32_t mz_zip_entry_get_local_info(void *handle, mz_zip_file **local_file_info);
163
+ /* Get local info about the current file, only valid while current entry is being read */
164
+
165
+ int32_t mz_zip_entry_set_extrafield(void *handle, const uint8_t *extrafield, uint16_t extrafield_size);
166
+ /* Sets or updates the extra field for the entry to be used before writing cd */
167
+
168
+ int64_t mz_zip_get_entry(void *handle);
169
+ /* Return offset of the current entry in the zip file */
170
+
171
+ int32_t mz_zip_goto_entry(void *handle, int64_t cd_pos);
172
+ /* Go to specified entry in the zip file */
173
+
174
+ int32_t mz_zip_goto_first_entry(void *handle);
175
+ /* Go to the first entry in the zip file */
176
+
177
+ int32_t mz_zip_goto_next_entry(void *handle);
178
+ /* Go to the next entry in the zip file or MZ_END_OF_LIST if reaching the end */
179
+
180
+ int32_t mz_zip_locate_entry(void *handle, const char *filename, uint8_t ignore_case);
181
+ /* Locate the file with the specified name in the zip file or MZ_END_LIST if not found */
182
+
183
+ int32_t mz_zip_locate_first_entry(void *handle, void *userdata, mz_zip_locate_entry_cb cb);
184
+ /* Locate the first matching entry based on a match callback */
185
+
186
+ int32_t mz_zip_locate_next_entry(void *handle, void *userdata, mz_zip_locate_entry_cb cb);
187
+ /* Locate the next matching entry based on a match callback */
188
+
189
+ /***************************************************************************/
190
+
191
+ int32_t mz_zip_attrib_is_dir(uint32_t attrib, int32_t version_madeby);
192
+ /* Checks to see if the attribute is a directory based on platform */
193
+
194
+ int32_t mz_zip_attrib_is_symlink(uint32_t attrib, int32_t version_madeby);
195
+ /* Checks to see if the attribute is a symbolic link based on platform */
196
+
197
+ int32_t mz_zip_attrib_convert(uint8_t src_sys, uint32_t src_attrib, uint8_t target_sys,
198
+ uint32_t *target_attrib);
199
+ /* Converts file attributes from one host system to another */
200
+
201
+ int32_t mz_zip_attrib_posix_to_win32(uint32_t posix_attrib, uint32_t *win32_attrib);
202
+ /* Converts posix file attributes to win32 file attributes */
203
+
204
+ int32_t mz_zip_attrib_win32_to_posix(uint32_t win32_attrib, uint32_t *posix_attrib);
205
+ /* Converts win32 file attributes to posix file attributes */
206
+
207
+ /***************************************************************************/
208
+
209
+ int32_t mz_zip_extrafield_find(void *stream, uint16_t type, int32_t max_seek, uint16_t *length);
210
+ /* Seeks to extra field by its type and returns its length */
211
+
212
+ int32_t mz_zip_extrafield_contains(const uint8_t *extrafield, int32_t extrafield_size,
213
+ uint16_t type, uint16_t *length);
214
+ /* Gets whether an extrafield exists and its size */
215
+
216
+ int32_t mz_zip_extrafield_read(void *stream, uint16_t *type, uint16_t *length);
217
+ /* Reads an extrafield header from a stream */
218
+
219
+ int32_t mz_zip_extrafield_write(void *stream, uint16_t type, uint16_t length);
220
+ /* Writes an extrafield header to a stream */
221
+
222
+ /***************************************************************************/
223
+
224
+ int32_t mz_zip_dosdate_to_tm(uint64_t dos_date, struct tm *ptm);
225
+ /* Convert dos date/time format to struct tm */
226
+
227
+ time_t mz_zip_dosdate_to_time_t(uint64_t dos_date);
228
+ /* Convert dos date/time format to time_t */
229
+
230
+ int32_t mz_zip_time_t_to_tm(time_t unix_time, struct tm *ptm);
231
+ /* Convert time_t to time struct */
232
+
233
+ uint32_t mz_zip_time_t_to_dos_date(time_t unix_time);
234
+ /* Convert time_t to dos date/time format */
235
+
236
+ uint32_t mz_zip_tm_to_dosdate(const struct tm *ptm);
237
+ /* Convert struct tm to dos date/time format */
238
+
239
+ int32_t mz_zip_ntfs_to_unix_time(uint64_t ntfs_time, time_t *unix_time);
240
+ /* Convert ntfs time to unix time */
241
+
242
+ int32_t mz_zip_unix_to_ntfs_time(time_t unix_time, uint64_t *ntfs_time);
243
+ /* Convert unix time to ntfs time */
244
+
245
+ /***************************************************************************/
246
+
247
+ int32_t mz_zip_path_compare(const char *path1, const char *path2, uint8_t ignore_case);
248
+ /* Compare two paths without regard to slashes */
249
+
250
+ /***************************************************************************/
251
+
252
+ const
253
+ char* mz_zip_get_compression_method_string(int32_t compression_method);
254
+ /* Gets a string representing the compression method */
255
+
256
+ /***************************************************************************/
257
+
258
+ #ifdef __cplusplus
259
+ }
260
+ #endif
261
+
262
+ #endif /* _ZIP_H */