react-native-update 10.37.19 → 10.38.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README-CN.md +4 -4
  2. package/README.md +2 -12
  3. package/android/bin/.settings/org.eclipse.buildship.core.prefs +13 -0
  4. package/android/build.gradle +4 -0
  5. package/android/jni/Android.mk +14 -1
  6. package/android/jni/Application.mk +5 -2
  7. package/android/lib/arm64-v8a/librnupdate.so +0 -0
  8. package/android/lib/armeabi-v7a/librnupdate.so +0 -0
  9. package/android/lib/x86/librnupdate.so +0 -0
  10. package/android/lib/x86_64/librnupdate.so +0 -0
  11. package/android/src/main/java/cn/reactnative/modules/update/ArchivePatchPlanResult.java +6 -0
  12. package/android/src/main/java/cn/reactnative/modules/update/CopyGroupResult.java +6 -0
  13. package/android/src/main/java/cn/reactnative/modules/update/DownloadTask.java +136 -136
  14. package/android/src/main/java/cn/reactnative/modules/update/NativeUpdateCore.java +34 -0
  15. package/android/src/main/java/cn/reactnative/modules/update/StateCoreResult.java +16 -0
  16. package/android/src/main/java/cn/reactnative/modules/update/UpdateContext.java +131 -48
  17. package/android/src/main/java/cn/reactnative/modules/update/UpdateModuleImpl.java +88 -40
  18. package/cpp/patch_core/archive_patch_core.cpp +125 -0
  19. package/cpp/patch_core/archive_patch_core.h +59 -0
  20. package/cpp/patch_core/patch_core.cpp +533 -0
  21. package/cpp/patch_core/patch_core.h +68 -0
  22. package/cpp/patch_core/patch_core_android.cpp +112 -0
  23. package/cpp/patch_core/state_core.cpp +110 -0
  24. package/cpp/patch_core/state_core.h +58 -0
  25. package/cpp/patch_core/tests/patch_core_test.cpp +473 -0
  26. package/cpp/patch_core/update_core_android.cpp +469 -0
  27. package/harmony/pushy.har +0 -0
  28. package/ios/RCTPushy/RCTPushy.mm +233 -143
  29. package/package.json +17 -15
  30. package/react-native-update.podspec +3 -0
  31. package/scripts/build-harmony-har.js +12 -0
  32. package/scripts/prepublish.ts +49 -3
  33. package/scripts/prune-host-stl.sh +6 -0
  34. package/scripts/test-patch-core.sh +39 -0
  35. package/src/client.ts +129 -76
  36. package/src/core.ts +2 -1
  37. package/src/endpoint.ts +171 -0
  38. package/src/utils.ts +40 -27
  39. package/android/jni/lzma/DOC/7zC.txt +0 -187
  40. package/android/jni/lzma/DOC/7zFormat.txt +0 -469
  41. package/android/jni/lzma/DOC/Methods.txt +0 -173
  42. package/android/jni/lzma/DOC/installer.txt +0 -166
  43. package/android/jni/lzma/DOC/lzma-history.txt +0 -446
  44. package/android/jni/lzma/DOC/lzma-sdk.txt +0 -357
  45. package/android/jni/lzma/DOC/lzma-specification.txt +0 -1176
  46. package/android/jni/lzma/DOC/lzma.txt +0 -328
  47. package/android/jni/lzma/bin/7zS2.sfx +0 -0
  48. package/android/jni/lzma/bin/7zS2con.sfx +0 -0
  49. package/android/jni/lzma/bin/7zSD.sfx +0 -0
  50. package/android/jni/lzma/bin/7zdec.exe +0 -0
  51. package/android/jni/lzma/bin/7zr.exe +0 -0
  52. package/android/jni/lzma/bin/installer/config.txt +0 -5
  53. package/android/jni/lzma/bin/installer/cr.bat +0 -5
  54. package/android/jni/lzma/bin/lzma.exe +0 -0
  55. package/android/jni/lzma/bin/x64/7zr.exe +0 -0
  56. package/error.js +0 -1609
  57. package/harmony/har-wrapper/AppScope/app.json5 +0 -8
  58. package/harmony/har-wrapper/build-profile.json5 +0 -35
  59. package/harmony/har-wrapper/hvigor/hvigor-config.json5 +0 -5
  60. package/harmony/har-wrapper/hvigorfile.ts +0 -6
  61. package/harmony/har-wrapper/oh-package.json5 +0 -4
  62. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/.cmake/api/v1/reply/cache-v2-77b153ce45aba0ed28ef.json +0 -1415
  63. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/.cmake/api/v1/reply/cmakeFiles-v1-b65a07793384e0ce3e08.json +0 -809
  64. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/.cmake/api/v1/reply/codemodel-v2-ce0e89410afd8bf3a057.json +0 -60
  65. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/.cmake/api/v1/reply/directory-.-Release-f5ebdc15457944623624.json +0 -14
  66. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/.cmake/api/v1/reply/index-2026-03-18T12-02-38-0668.json +0 -89
  67. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/.cmake/api/v1/reply/target-rnupdate-Release-267153624504c9c3ffdd.json +0 -222
  68. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/.ninja_deps +0 -0
  69. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/.ninja_log +0 -8
  70. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeCache.txt +0 -415
  71. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CMakeCCompiler.cmake +0 -74
  72. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CMakeCXXCompiler.cmake +0 -85
  73. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CMakeDetermineCompilerABI_C.bin +0 -0
  74. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CMakeDetermineCompilerABI_CXX.bin +0 -0
  75. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CMakeSystem.cmake +0 -15
  76. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CompilerIdC/CMakeCCompilerId.c +0 -880
  77. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CompilerIdC/CMakeCCompilerId.o +0 -0
  78. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CompilerIdCXX/CMakeCXXCompilerId.cpp +0 -869
  79. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/3.28.2/CompilerIdCXX/CMakeCXXCompilerId.o +0 -0
  80. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/CMakeConfigureLog.yaml +0 -388
  81. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/TargetDirectories.txt +0 -3
  82. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/cmake.check_cache +0 -1
  83. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/rnupdate.dir/__w/react-native-update/react-native-update/android/jni/HDiffPatch/file_for_patch.c.o +0 -0
  84. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/rnupdate.dir/__w/react-native-update/react-native-update/android/jni/HDiffPatch/libHDiffPatch/HPatch/patch.c.o +0 -0
  85. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/rnupdate.dir/__w/react-native-update/react-native-update/android/jni/hpatch.c.o +0 -0
  86. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/rnupdate.dir/__w/react-native-update/react-native-update/android/jni/lzma/C/Lzma2Dec.c.o +0 -0
  87. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/rnupdate.dir/__w/react-native-update/react-native-update/android/jni/lzma/C/LzmaDec.c.o +0 -0
  88. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/rnupdate.dir/pushy.c.o +0 -0
  89. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/CMakeFiles/rules.ninja +0 -64
  90. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/additional_project_files.txt +0 -0
  91. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/build.ninja +0 -206
  92. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/build_file_index.txt +0 -1
  93. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/cmake_install.cmake +0 -54
  94. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/compile_commands.json +0 -38
  95. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/configure_fingerprint.json +0 -1
  96. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/hvigor_native_config.json +0 -1
  97. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/metadata_generation_command.txt +0 -17
  98. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/native_work_dir.txt +0 -1
  99. package/harmony/pushy/.cxx/default/default/release/arm64-v8a/output.log +0 -14
  100. package/harmony/pushy/.cxx/default/default/release/hvigor/arm64-v8a/summary.cmake +0 -0
  101. package/harmony/pushy/BuildProfile.ets +0 -17
  102. package/harmony/pushy/OAT.xml +0 -38
  103. package/harmony/pushy/README.md +0 -0
  104. package/harmony/pushy/build-profile.json5 +0 -15
  105. package/harmony/pushy/hvigor-plugin.ts +0 -34
  106. package/harmony/pushy/hvigorfile.ts +0 -1
  107. package/harmony/pushy/index.ets +0 -2
  108. package/harmony/pushy/oh-package-lock.json5 +0 -20
  109. package/harmony/pushy/oh-package.json5 +0 -13
  110. package/harmony/pushy/src/main/cpp/CMakeLists.txt +0 -51
  111. package/harmony/pushy/src/main/cpp/PushyPackage.h +0 -55
  112. package/harmony/pushy/src/main/cpp/PushyTurboModule.cpp +0 -142
  113. package/harmony/pushy/src/main/cpp/PushyTurboModule.h +0 -38
  114. package/harmony/pushy/src/main/cpp/pushy.c +0 -117
  115. package/harmony/pushy/src/main/cpp/pushy.h +0 -8
  116. package/harmony/pushy/src/main/ets/DownloadTask.ts +0 -570
  117. package/harmony/pushy/src/main/ets/DownloadTaskParams.ts +0 -19
  118. package/harmony/pushy/src/main/ets/EventHub.ts +0 -39
  119. package/harmony/pushy/src/main/ets/Logger.ts +0 -52
  120. package/harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets +0 -50
  121. package/harmony/pushy/src/main/ets/PushyPackage.ts +0 -22
  122. package/harmony/pushy/src/main/ets/PushyTurboModule.ts +0 -171
  123. package/harmony/pushy/src/main/ets/SaveFile.ts +0 -34
  124. package/harmony/pushy/src/main/ets/UpdateContext.ts +0 -262
  125. package/harmony/pushy/src/main/ets/UpdateModuleImpl.ts +0 -123
  126. package/harmony/pushy/src/main/module.json5 +0 -7
  127. package/harmony/pushy/src/main/resources/base/element/string.json +0 -8
  128. package/harmony/pushy/src/main/resources/en_US/element/string.json +0 -8
  129. package/harmony/pushy/src/main/resources/zh_CN/element/string.json +0 -8
  130. package/harmony/pushy/ts.ts +0 -3
  131. package/src/__tests__/core.test.ts +0 -103
  132. package/src/__tests__/utils.test.ts +0 -36
@@ -1,173 +0,0 @@
1
- 7-Zip method IDs for 7z and xz archives
2
- ---------------------------------------
3
-
4
- Version: 18.06
5
- Date: 2018-06-30
6
-
7
- Each compression or crypto method in 7z is associated with unique binary value (ID).
8
- The length of ID in bytes is arbitrary but it can not exceed 63 bits (8 bytes).
9
-
10
- xz and 7z formats use same ID map.
11
-
12
- If you want to add some new ID, you have two ways:
13
- 1) Write request for allocating IDs to 7-Zip developers.
14
- 2) Generate 8-bytes ID:
15
-
16
- 3F ZZ ZZ ZZ ZZ ZZ MM MM
17
-
18
- 3F - Prefix for random IDs (1 byte)
19
- ZZ ZZ ZZ ZZ ZZ - Developer ID (5 bytes). Use real random bytes.
20
-
21
- MM MM - Method ID (2 bytes)
22
-
23
- You can notify 7-Zip developers about your Developer ID / Method ID.
24
-
25
- Note: Use new ID, if old codec can not decode data encoded with new version.
26
-
27
-
28
- List of defined IDs
29
- -------------------
30
-
31
- 00 - Copy
32
-
33
- 03 - Delta
34
- 04 - BCJ (x86)
35
- 05 - PPC (big-endian)
36
- 06 - IA64
37
- 07 - ARM (little-endian)
38
- 08 - ARMT (little-endian)
39
- 09 - SPARC
40
-
41
- 21 - LZMA2
42
-
43
- 02.. - Common
44
- 03 [Swap]
45
- - 2 Swap2
46
- - 4 Swap4
47
-
48
- 03.. - 7z
49
- 01 -
50
- 01 - LZMA
51
-
52
- 03 - [Branch Codecs]
53
- 01 - [x86 Codecs]
54
- 03 - BCJ
55
- 1B - BCJ2 (4 packed streams)
56
- 02 -
57
- 05 - PPC (big-endian)
58
- 03 -
59
- 01 - Alpha
60
- 04 -
61
- 01 - IA64
62
- 05 -
63
- 01 - ARM (little-endian)
64
- 06 -
65
- 05 - M68 (big-endian)
66
- 07 -
67
- 01 - ARMT (little-endian)
68
- 08 -
69
- 05 - SPARC
70
-
71
- 04 -
72
- 01 - PPMD
73
-
74
- 7F -
75
- 01 - experimental method.
76
-
77
-
78
- 04.. - Misc codecs
79
-
80
- 00 - Reserved
81
-
82
- 01 - [Zip]
83
- 00 - Copy (not used. Use {00} instead)
84
- 01 - Shrink
85
- 06 - Implode
86
- 08 - Deflate
87
- 09 - Deflate64
88
- 0A - Imploding
89
- 0C - BZip2 (not used. Use {040202} instead)
90
- 0E - LZMA (LZMA-zip)
91
- 5F - xz
92
- 60 - Jpeg
93
- 61 - WavPack
94
- 62 - PPMd (PPMd-zip)
95
- 63 - wzAES
96
-
97
- 02 -
98
- 02 - BZip2
99
-
100
- 03 - [Rar]
101
- 01 - Rar1
102
- 02 - Rar2
103
- 03 - Rar3
104
- 05 - Rar5
105
-
106
- 04 - [Arj]
107
- 01 - Arj(1,2,3)
108
- 02 - Arj4
109
-
110
- 05 - [Z]
111
-
112
- 06 - [Lzh]
113
-
114
- 07 - Reserved for 7z
115
-
116
- 08 - [Cab]
117
-
118
- 09 - [NSIS]
119
- 01 - DeflateNSIS
120
- 02 - BZip2NSIS
121
-
122
- F7 - External codecs (that are not included to 7-Zip)
123
-
124
- 0x xx - reserved
125
-
126
- 10 xx - reserved (LZHAM)
127
- 01 - LZHAM
128
-
129
- 11 xx - reserved (Tino Reichardt)
130
- 01 - ZSTD
131
- 02 - BROTLI
132
- 04 - LZ4
133
- 05 - LZ5
134
- 06 - LIZARD
135
-
136
- 12 xx - reserverd (Denis Anisimov)
137
-
138
- 01 - WavPack2
139
- FE - eSplitter
140
- FF - RawSplitter
141
-
142
-
143
- 06.. - Crypto
144
-
145
- F0 - Ciphers without hashing algo
146
-
147
- 01 - [AES]
148
- 0x - AES-128
149
- 4x - AES-192
150
- 8x - AES-256
151
- Cx - AES
152
-
153
- x0 - ECB
154
- x1 - CBC
155
- x2 - CFB
156
- x3 - OFB
157
- x4 - CTR
158
-
159
- F1 - Combine Ciphers
160
-
161
- 01 - [Zip]
162
- 01 - ZipCrypto (Main Zip crypto algo)
163
-
164
- 03 - [RAR]
165
- 02 -
166
- 03 - Rar29AES (AES-128 + modified SHA-1)
167
-
168
- 07 - [7z]
169
- 01 - 7zAES (AES-256 + SHA-256)
170
-
171
-
172
- ---
173
- End of document
@@ -1,166 +0,0 @@
1
- 7-Zip for installers 9.38
2
- -------------------------
3
-
4
- 7-Zip is a file archiver for Windows NT/2000/2003/2008/XP/Vista/7/8/10.
5
-
6
- 7-Zip for installers is part of LZMA SDK.
7
- LZMA SDK is written and placed in the public domain by Igor Pavlov.
8
-
9
- It's allowed to join 7-Zip SFX module with another software.
10
- It's allowed to change resources of 7-Zip's SFX modules.
11
-
12
-
13
- HOW to use
14
- -----------
15
-
16
- 7zr.exe is reduced version of 7za.exe of 7-Zip.
17
- 7zr.exe supports only format with these codecs: LZMA, LZMA2, BCJ, BCJ2, ARM, Copy.
18
-
19
- Example of compressing command for installation packages:
20
-
21
- 7zr a archive.7z files
22
-
23
- 7zSD.sfx is SFX module for installers. 7zSD.sfx uses msvcrt.dll.
24
-
25
- SFX modules for installers allow to create installation program.
26
- Such module extracts archive to temp folder and then runs specified program and removes
27
- temp files after program finishing. Self-extract archive for installers must be created
28
- as joining 3 files: SFX_Module, Installer_Config, 7z_Archive.
29
- Installer_Config is optional file. You can use the following command to create installer
30
- self-extract archive:
31
-
32
- copy /b 7zSD.sfx + config.txt + archive.7z archive.exe
33
-
34
- The smallest installation package size can be achieved, if installation files was
35
- uncompressed before including to 7z archive.
36
-
37
- -y switch for installer module (at runtime) specifies quiet mode for extracting.
38
-
39
- Installer Config file format
40
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41
- Config file contains commands for Installer. File begins from string
42
- ;!@Install@!UTF-8! and ends with ;!@InstallEnd@!. File must be written
43
- in UTF-8 encoding. File contains string pairs:
44
-
45
- ID_String="Value"
46
-
47
- ID_String Description
48
-
49
- Title Title for messages
50
- BeginPrompt Begin Prompt message
51
- Progress Value can be "yes" or "no". Default value is "yes".
52
- RunProgram Command for executing. Default value is "setup.exe".
53
- Substring %%T will be replaced with path to temporary
54
- folder, where files were extracted
55
- Directory Directory prefix for "RunProgram". Default value is ".\\"
56
- ExecuteFile Name of file for executing
57
- ExecuteParameters Parameters for "ExecuteFile"
58
-
59
-
60
- You can omit any string pair.
61
-
62
- There are two ways to run program: RunProgram and ExecuteFile.
63
- Use RunProgram, if you want to run some program from .7z archive.
64
- Use ExecuteFile, if you want to open some document from .7z archive or
65
- if you want to execute some command from Windows.
66
-
67
- If you use RunProgram and if you specify empty directory prefix: Directory="",
68
- the system searches for the executable file in the following sequence:
69
-
70
- 1. The directory from which the application (installer) loaded.
71
- 2. The temporary folder, where files were extracted.
72
- 3. The Windows system directory.
73
-
74
-
75
- Config file Examples
76
- ~~~~~~~~~~~~~~~~~~~~
77
-
78
- ;!@Install@!UTF-8!
79
- Title="7-Zip 4.00"
80
- BeginPrompt="Do you want to install the 7-Zip 4.00?"
81
- RunProgram="setup.exe"
82
- ;!@InstallEnd@!
83
-
84
-
85
-
86
- ;!@Install@!UTF-8!
87
- Title="7-Zip 4.00"
88
- BeginPrompt="Do you want to install the 7-Zip 4.00?"
89
- ExecuteFile="7zip.msi"
90
- ;!@InstallEnd@!
91
-
92
-
93
-
94
- ;!@Install@!UTF-8!
95
- Title="7-Zip 4.01 Update"
96
- BeginPrompt="Do you want to install the 7-Zip 4.01 Update?"
97
- ExecuteFile="msiexec.exe"
98
- ExecuteParameters="/i 7zip.msi REINSTALL=ALL REINSTALLMODE=vomus"
99
- ;!@InstallEnd@!
100
-
101
-
102
-
103
- Small SFX modules for installers
104
- --------------------------------
105
-
106
- 7zS2.sfx - small SFX module (GUI version)
107
- 7zS2con.sfx - small SFX module (Console version)
108
-
109
- Small SFX modules support this codecs: LZMA, LZMA2, BCJ, BCJ2, ARM, COPY
110
-
111
- Small SFX module is similar to common SFX module for installers.
112
- The difference (what's new in small version):
113
- - Smaller size (30 KB vs 100 KB)
114
- - C source code instead of �++
115
- - No installer Configuration file
116
- - No extracting progress window
117
- - It decompresses solid 7z blocks (it can be whole 7z archive) to RAM.
118
- So user that calls SFX installer must have free RAM of size of largest
119
- solid 7z block (size of 7z archive at simplest case).
120
-
121
- How to use
122
- ----------
123
-
124
- copy /b 7zS2.sfx + archive.7z sfx.exe
125
-
126
- When you run installer sfx module (sfx.exe)
127
- 1) It creates "7zNNNNNNNN" temp folder in system temp folder.
128
- 2) It extracts .7z archive to that folder
129
- 3) It executes one file from "7zNNNNNNNN" temp folder.
130
- 4) It removes "7zNNNNNNNN" temp folder
131
-
132
- You can send parameters to installer, and installer will transfer them to extracted .exe file.
133
-
134
- Small SFX uses 3 levels of priorities to select file to execute:
135
-
136
- 1) Files in root folder have higher priority than files in subfolders.
137
- 2) File extension priorities (from high to low priority order):
138
- bat, cmd, exe, inf, msi, cab (under Windows CE), html, htm
139
- 3) File name priorities (from high to low priority order):
140
- setup, install, run, start
141
-
142
- Windows CE (ARM) version of 7zS2.sfx is included to 7-Zip for Windows Mobile package.
143
-
144
-
145
- Examples
146
- --------
147
-
148
- 1) To create compressed console 7-Zip:
149
-
150
- 7zr a c.7z 7z.exe 7z.dll -mx
151
- copy /b 7zS2con.sfx + c.7z 7zCompr.exe
152
- 7zCompr.exe b -md22
153
-
154
-
155
- 2) To create compressed GUI 7-Zip:
156
-
157
- 7zr a g.7z 7zg.exe 7z.dll -mx
158
- copy /b 7zS2.sfx + g.7z 7zgCompr.exe
159
- 7zgCompr.exe b -md22
160
-
161
-
162
- 3) To open some file:
163
-
164
- 7zr a h.7z readme.txt -mx
165
- copy /b 7zS2.sfx + h.7z 7zTxt.exe
166
- 7zTxt.exe