react-native-update 10.60.0 → 10.61.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 (820) hide show
  1. package/README-CN.md +6 -0
  2. package/README.md +8 -0
  3. package/android/jni/Android.mk +2 -0
  4. package/android/jni/Application.mk +3 -1
  5. package/android/lib/arm64-v8a/librnpushy.so +0 -0
  6. package/android/lib/armeabi-v7a/librnpushy.so +0 -0
  7. package/android/lib/x86/librnpushy.so +0 -0
  8. package/android/lib/x86_64/librnpushy.so +0 -0
  9. package/android/src/main/java/cn/reactnative/modules/update/ApkInstaller.java +1 -1
  10. package/android/src/main/java/cn/reactnative/modules/update/ArchiveLimits.java +3 -2
  11. package/android/src/main/java/cn/reactnative/modules/update/BundlePreparationResult.java +2 -0
  12. package/android/src/main/java/cn/reactnative/modules/update/DownloadTask.java +102 -119
  13. package/android/src/main/java/cn/reactnative/modules/update/DownloadTaskParams.java +5 -3
  14. package/android/src/main/java/cn/reactnative/modules/update/ErrorCodes.java +5 -3
  15. package/android/src/main/java/cn/reactnative/modules/update/FlowBridge.java +7 -0
  16. package/android/src/main/java/cn/reactnative/modules/update/HttpUtils.java +0 -34
  17. package/android/src/main/java/cn/reactnative/modules/update/InstallRecord.java +3 -1
  18. package/android/src/main/java/cn/reactnative/modules/update/NativeCore.java +1 -1
  19. package/android/src/main/java/cn/reactnative/modules/update/PushyRuntime.java +23 -4
  20. package/android/src/main/java/cn/reactnative/modules/update/ReactReloadManager.java +1 -1
  21. package/android/src/main/java/cn/reactnative/modules/update/ResumePlan.java +31 -0
  22. package/android/src/main/java/cn/reactnative/modules/update/SyncCoordinator.java +397 -300
  23. package/android/src/main/java/cn/reactnative/modules/update/Texts.java +15 -1
  24. package/android/src/main/java/cn/reactnative/modules/update/Threads.java +9 -0
  25. package/android/src/main/java/cn/reactnative/modules/update/UpdateContext.java +24 -15
  26. package/android/src/main/java/cn/reactnative/modules/update/UpdateModule.java +1 -1
  27. package/android/src/main/java/cn/reactnative/modules/update/VersionScopedKeys.java +64 -0
  28. package/android/src/oldarch/cn/reactnative/modules/update/NativePushySpec.java +2 -0
  29. package/cpp/android_jni/jni_log.h +2 -3
  30. package/cpp/android_jni/jni_natives.h +14 -8
  31. package/cpp/android_jni/jni_registration.cpp +13 -0
  32. package/cpp/android_jni/resume_plan_jni.cpp +58 -0
  33. package/cpp/android_jni/update_core_android.cpp +3 -5
  34. package/cpp/android_jni/update_flow_jni.cpp +17 -0
  35. package/cpp/patch_core/archive_limits.h +5 -3
  36. package/cpp/patch_core/archive_patch_core.cpp +2 -3
  37. package/cpp/patch_core/archive_patch_core.h +2 -0
  38. package/cpp/patch_core/error_codes.h +15 -13
  39. package/cpp/patch_core/install_record.h +5 -3
  40. package/cpp/patch_core/native_texts.h +102 -0
  41. package/cpp/patch_core/resume_plan.cpp +226 -0
  42. package/cpp/patch_core/resume_plan.h +88 -0
  43. package/cpp/patch_core/state_ops.h +2 -0
  44. package/cpp/update_flow_core/native_config.cpp +5 -25
  45. package/cpp/update_flow_core/native_round.cpp +9 -14
  46. package/cpp/update_flow_core/native_round.h +7 -3
  47. package/cpp/update_flow_core/round_engine.cpp +456 -0
  48. package/cpp/update_flow_core/round_engine.h +106 -0
  49. package/cpp/update_flow_core/update_flow_core.cpp +5 -14
  50. package/harmony/pushy/src/main/cpp/CMakeLists.txt +2 -0
  51. package/harmony/pushy/src/main/cpp/PushyTurboModule.cpp +22 -20
  52. package/harmony/pushy/src/main/cpp/pushy.cpp +146 -24
  53. package/harmony/pushy/src/main/ets/ArchiveLimits.ts +9 -5
  54. package/harmony/pushy/src/main/ets/DownloadTask.ts +138 -158
  55. package/harmony/pushy/src/main/ets/DownloadTaskParams.ts +5 -3
  56. package/harmony/pushy/src/main/ets/ErrorCodes.ts +3 -2
  57. package/harmony/pushy/src/main/ets/InstallRecord.ts +3 -1
  58. package/harmony/pushy/src/main/ets/NativePatchCore.ts +35 -0
  59. package/harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets +8 -3
  60. package/harmony/pushy/src/main/ets/SyncCoordinator.ts +256 -309
  61. package/harmony/pushy/src/main/ets/Texts.ts +8 -3
  62. package/harmony/pushy/src/main/ets/UpdateContext.ts +152 -46
  63. package/harmony/pushy.har +0 -0
  64. package/ios/RCTPushy/RCTPushy+Launch.mm +5 -0
  65. package/ios/RCTPushy/RCTPushy.mm +60 -44
  66. package/ios/RCTPushy/RCTPushyCommon.h +0 -6
  67. package/ios/RCTPushy/RCTPushyConfiguration.mm +8 -10
  68. package/ios/RCTPushy/RCTPushyDownloader.mm +112 -161
  69. package/ios/RCTPushy/RCTPushyInstallRecord.mm +42 -2
  70. package/ios/RCTPushy/RCTPushyInstaller.mm +195 -152
  71. package/ios/RCTPushy/RCTPushyInternal.h +41 -0
  72. package/ios/RCTPushy/RCTPushyOrchestrator.mm +233 -265
  73. package/ios/RCTPushy/RCTPushyState.mm +70 -2
  74. package/package.json +23 -4
  75. package/src/client.ts +126 -1543
  76. package/src/clientActivation.ts +324 -0
  77. package/src/clientCheck.ts +405 -0
  78. package/src/clientDownload.ts +448 -0
  79. package/src/clientNativeConfig.ts +171 -0
  80. package/src/clientReporter.ts +398 -0
  81. package/src/clientState.ts +51 -0
  82. package/src/core.ts +4 -2
  83. package/src/endpoint.ts +22 -6
  84. package/src/error.ts +6 -4
  85. package/src/locales/en.ts +1 -1
  86. package/src/locales/zh.ts +1 -1
  87. package/src/provider.tsx +32 -20
  88. package/android/jni/HDiffPatch/.travis.yml +0 -33
  89. package/android/jni/HDiffPatch/CHANGELOG.md +0 -153
  90. package/android/jni/HDiffPatch/Makefile +0 -157
  91. package/android/jni/HDiffPatch/_atosize.h +0 -83
  92. package/android/jni/HDiffPatch/_clock_for_demo.h +0 -47
  93. package/android/jni/HDiffPatch/_dir_ignore.h +0 -191
  94. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/Android.mk +0 -37
  95. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/Application.mk +0 -7
  96. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/build_libs.bat +0 -1
  97. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/build_libs.sh +0 -1
  98. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/hpatch.c +0 -18
  99. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/hpatch.h +0 -20
  100. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/hpatch_jni.c +0 -28
  101. package/android/jni/HDiffPatch/builds/android_ndk_jni_mk/java/com/github/sisong/HPatch.java +0 -8
  102. package/android/jni/HDiffPatch/builds/codeblocks/HDiffPatch.workspace +0 -8
  103. package/android/jni/HDiffPatch/builds/codeblocks/HDiffZ.cbp +0 -219
  104. package/android/jni/HDiffPatch/builds/codeblocks/HPatchZ.cbp +0 -156
  105. package/android/jni/HDiffPatch/builds/codeblocks/unitTest.cbp +0 -65
  106. package/android/jni/HDiffPatch/builds/vc/HDiffPatch.sln +0 -105
  107. package/android/jni/HDiffPatch/builds/vc/HDiffZ.vcxproj +0 -237
  108. package/android/jni/HDiffPatch/builds/vc/HDiffZ.vcxproj.user +0 -3
  109. package/android/jni/HDiffPatch/builds/vc/HPatchZ.vcxproj +0 -318
  110. package/android/jni/HDiffPatch/builds/vc/HPatchZ.vcxproj.user +0 -3
  111. package/android/jni/HDiffPatch/builds/vc/unitTest.vcxproj +0 -182
  112. package/android/jni/HDiffPatch/builds/vc/unitTest.vcxproj.user +0 -3
  113. package/android/jni/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/contents.xcworkspacedata +0 -30
  114. package/android/jni/HDiffPatch/builds/xcode/HDiffPatch.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  115. package/android/jni/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.pbxproj +0 -408
  116. package/android/jni/HDiffPatch/builds/xcode/bestParams.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  117. package/android/jni/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.pbxproj +0 -573
  118. package/android/jni/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  119. package/android/jni/HDiffPatch/builds/xcode/hdiffz.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  120. package/android/jni/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.pbxproj +0 -396
  121. package/android/jni/HDiffPatch/builds/xcode/hpatchz.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  122. package/android/jni/HDiffPatch/builds/xcode/lz4.xcodeproj/project.pbxproj +0 -268
  123. package/android/jni/HDiffPatch/builds/xcode/lz4.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  124. package/android/jni/HDiffPatch/builds/xcode/lzma.xcodeproj/project.pbxproj +0 -361
  125. package/android/jni/HDiffPatch/builds/xcode/lzma.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  126. package/android/jni/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.pbxproj +0 -301
  127. package/android/jni/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  128. package/android/jni/HDiffPatch/builds/xcode/testHashClash.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  129. package/android/jni/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.pbxproj +0 -411
  130. package/android/jni/HDiffPatch/builds/xcode/unitTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  131. package/android/jni/HDiffPatch/builds/xcode/zstd.xcodeproj/project.pbxproj +0 -504
  132. package/android/jni/HDiffPatch/builds/xcode/zstd.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  133. package/android/jni/HDiffPatch/checksum_plugin_demo.h +0 -344
  134. package/android/jni/HDiffPatch/compress_parallel.cpp +0 -166
  135. package/android/jni/HDiffPatch/compress_parallel.h +0 -59
  136. package/android/jni/HDiffPatch/compress_plugin_demo.h +0 -1152
  137. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.cpp +0 -797
  138. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_diff.h +0 -65
  139. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.cpp +0 -200
  140. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_diff_tools.h +0 -178
  141. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.cpp +0 -357
  142. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/dir_manifest.h +0 -87
  143. package/android/jni/HDiffPatch/dirDiffPatch/dir_diff/file_for_dirDiff.h +0 -151
  144. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.c +0 -770
  145. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch.h +0 -236
  146. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_private.h +0 -47
  147. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.c +0 -112
  148. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/dir_patch_tools.h +0 -53
  149. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.c +0 -331
  150. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/new_dir_output.h +0 -144
  151. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/new_stream.c +0 -176
  152. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/new_stream.h +0 -84
  153. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.c +0 -146
  154. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/ref_stream.h +0 -61
  155. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.c +0 -152
  156. package/android/jni/HDiffPatch/dirDiffPatch/dir_patch/res_handle_limit.h +0 -76
  157. package/android/jni/HDiffPatch/hdiffz.cpp +0 -1570
  158. package/android/jni/HDiffPatch/hpatch_dir_listener.h +0 -290
  159. package/android/jni/HDiffPatch/hpatchz.c +0 -1221
  160. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/diff.cpp +0 -1025
  161. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/diff.h +0 -116
  162. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/diff_types.h +0 -72
  163. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp +0 -213
  164. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.h +0 -63
  165. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.cpp +0 -170
  166. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/compress_detect.h +0 -86
  167. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/config.h +0 -89
  168. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c +0 -13
  169. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h +0 -398
  170. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.h +0 -194
  171. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.c +0 -13
  172. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort64.h +0 -204
  173. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort_private.h +0 -207
  174. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/sssort.c.inc.h +0 -815
  175. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/trsort.c.inc.h +0 -586
  176. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/utils.c.inc.h +0 -381
  177. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.c +0 -352
  178. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/adler_roll.h +0 -137
  179. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/bloom_filter.h +0 -137
  180. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h +0 -70
  181. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.cpp +0 -628
  182. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/digest_matcher.h +0 -87
  183. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp +0 -363
  184. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h +0 -139
  185. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/mem_buf.h +0 -68
  186. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h +0 -115
  187. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp +0 -342
  188. package/android/jni/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.h +0 -94
  189. package/android/jni/HDiffPatch/libHDiffPatch/HPatch/checksum_plugin.h +0 -52
  190. package/android/jni/HDiffPatch/libParallel/parallel_channel.cpp +0 -174
  191. package/android/jni/HDiffPatch/libParallel/parallel_channel.h +0 -73
  192. package/android/jni/HDiffPatch/libParallel/parallel_import.cpp +0 -367
  193. package/android/jni/HDiffPatch/libParallel/parallel_import.h +0 -92
  194. package/android/jni/lzma/Asm/arm/7zCrcOpt.asm +0 -100
  195. package/android/jni/lzma/Asm/x86/7zAsm.asm +0 -147
  196. package/android/jni/lzma/Asm/x86/7zCrcOpt.asm +0 -147
  197. package/android/jni/lzma/Asm/x86/AesOpt.asm +0 -237
  198. package/android/jni/lzma/Asm/x86/LzmaDecOpt.asm +0 -1258
  199. package/android/jni/lzma/Asm/x86/XzCrc64Opt.asm +0 -205
  200. package/android/jni/lzma/C/7z.h +0 -202
  201. package/android/jni/lzma/C/7zAlloc.c +0 -80
  202. package/android/jni/lzma/C/7zAlloc.h +0 -19
  203. package/android/jni/lzma/C/7zArcIn.c +0 -1771
  204. package/android/jni/lzma/C/7zBuf.c +0 -36
  205. package/android/jni/lzma/C/7zBuf.h +0 -35
  206. package/android/jni/lzma/C/7zBuf2.c +0 -52
  207. package/android/jni/lzma/C/7zCrc.c +0 -128
  208. package/android/jni/lzma/C/7zCrc.h +0 -25
  209. package/android/jni/lzma/C/7zCrcOpt.c +0 -115
  210. package/android/jni/lzma/C/7zDec.c +0 -591
  211. package/android/jni/lzma/C/7zFile.c +0 -286
  212. package/android/jni/lzma/C/7zFile.h +0 -83
  213. package/android/jni/lzma/C/7zStream.c +0 -176
  214. package/android/jni/lzma/C/7zVersion.h +0 -27
  215. package/android/jni/lzma/C/7zVersion.rc +0 -55
  216. package/android/jni/lzma/C/Aes.c +0 -306
  217. package/android/jni/lzma/C/Aes.h +0 -38
  218. package/android/jni/lzma/C/AesOpt.c +0 -184
  219. package/android/jni/lzma/C/Alloc.c +0 -455
  220. package/android/jni/lzma/C/Alloc.h +0 -51
  221. package/android/jni/lzma/C/Bcj2.c +0 -257
  222. package/android/jni/lzma/C/Bcj2.h +0 -146
  223. package/android/jni/lzma/C/Bcj2Enc.c +0 -311
  224. package/android/jni/lzma/C/Bra.c +0 -230
  225. package/android/jni/lzma/C/Bra.h +0 -64
  226. package/android/jni/lzma/C/Bra86.c +0 -82
  227. package/android/jni/lzma/C/BraIA64.c +0 -53
  228. package/android/jni/lzma/C/CpuArch.c +0 -218
  229. package/android/jni/lzma/C/CpuArch.h +0 -336
  230. package/android/jni/lzma/C/Delta.c +0 -64
  231. package/android/jni/lzma/C/Delta.h +0 -19
  232. package/android/jni/lzma/C/DllSecur.c +0 -108
  233. package/android/jni/lzma/C/DllSecur.h +0 -20
  234. package/android/jni/lzma/C/LzFind.c +0 -1127
  235. package/android/jni/lzma/C/LzFind.h +0 -121
  236. package/android/jni/lzma/C/LzFindMt.c +0 -853
  237. package/android/jni/lzma/C/LzFindMt.h +0 -101
  238. package/android/jni/lzma/C/LzHash.h +0 -57
  239. package/android/jni/lzma/C/Lzma2DecMt.c +0 -1082
  240. package/android/jni/lzma/C/Lzma2DecMt.h +0 -79
  241. package/android/jni/lzma/C/Lzma2Enc.c +0 -803
  242. package/android/jni/lzma/C/Lzma2Enc.h +0 -55
  243. package/android/jni/lzma/C/Lzma86.h +0 -111
  244. package/android/jni/lzma/C/Lzma86Dec.c +0 -54
  245. package/android/jni/lzma/C/Lzma86Enc.c +0 -106
  246. package/android/jni/lzma/C/LzmaEnc.c +0 -2976
  247. package/android/jni/lzma/C/LzmaEnc.h +0 -76
  248. package/android/jni/lzma/C/LzmaLib.c +0 -40
  249. package/android/jni/lzma/C/LzmaLib.h +0 -131
  250. package/android/jni/lzma/C/MtCoder.c +0 -601
  251. package/android/jni/lzma/C/MtCoder.h +0 -141
  252. package/android/jni/lzma/C/MtDec.c +0 -1138
  253. package/android/jni/lzma/C/MtDec.h +0 -201
  254. package/android/jni/lzma/C/Ppmd.h +0 -85
  255. package/android/jni/lzma/C/Ppmd7.c +0 -712
  256. package/android/jni/lzma/C/Ppmd7.h +0 -142
  257. package/android/jni/lzma/C/Ppmd7Dec.c +0 -191
  258. package/android/jni/lzma/C/Ppmd7Enc.c +0 -187
  259. package/android/jni/lzma/C/RotateDefs.h +0 -30
  260. package/android/jni/lzma/C/Sha256.c +0 -248
  261. package/android/jni/lzma/C/Sha256.h +0 -26
  262. package/android/jni/lzma/C/Sort.c +0 -141
  263. package/android/jni/lzma/C/Sort.h +0 -18
  264. package/android/jni/lzma/C/Threads.c +0 -95
  265. package/android/jni/lzma/C/Threads.h +0 -70
  266. package/android/jni/lzma/C/ThreadsP.c +0 -396
  267. package/android/jni/lzma/C/ThreadsP.h +0 -31
  268. package/android/jni/lzma/C/Util/7z/7z.dsp +0 -241
  269. package/android/jni/lzma/C/Util/7z/7z.dsw +0 -29
  270. package/android/jni/lzma/C/Util/7z/7zMain.c +0 -686
  271. package/android/jni/lzma/C/Util/7z/Precomp.c +0 -4
  272. package/android/jni/lzma/C/Util/7z/Precomp.h +0 -10
  273. package/android/jni/lzma/C/Util/7z/makefile +0 -40
  274. package/android/jni/lzma/C/Util/7z/makefile.gcc +0 -75
  275. package/android/jni/lzma/C/Util/Lzma/LzmaUtil.c +0 -258
  276. package/android/jni/lzma/C/Util/Lzma/LzmaUtil.dsp +0 -168
  277. package/android/jni/lzma/C/Util/Lzma/LzmaUtil.dsw +0 -29
  278. package/android/jni/lzma/C/Util/Lzma/makefile +0 -28
  279. package/android/jni/lzma/C/Util/Lzma/makefile.gcc +0 -44
  280. package/android/jni/lzma/C/Util/LzmaLib/LzmaLib.def +0 -4
  281. package/android/jni/lzma/C/Util/LzmaLib/LzmaLib.dsp +0 -178
  282. package/android/jni/lzma/C/Util/LzmaLib/LzmaLib.dsw +0 -29
  283. package/android/jni/lzma/C/Util/LzmaLib/LzmaLibExports.c +0 -14
  284. package/android/jni/lzma/C/Util/LzmaLib/makefile +0 -34
  285. package/android/jni/lzma/C/Util/LzmaLib/resource.rc +0 -3
  286. package/android/jni/lzma/C/Util/SfxSetup/Precomp.c +0 -4
  287. package/android/jni/lzma/C/Util/SfxSetup/Precomp.h +0 -10
  288. package/android/jni/lzma/C/Util/SfxSetup/SfxSetup.c +0 -640
  289. package/android/jni/lzma/C/Util/SfxSetup/SfxSetup.dsp +0 -231
  290. package/android/jni/lzma/C/Util/SfxSetup/SfxSetup.dsw +0 -29
  291. package/android/jni/lzma/C/Util/SfxSetup/makefile +0 -37
  292. package/android/jni/lzma/C/Util/SfxSetup/makefile_con +0 -38
  293. package/android/jni/lzma/C/Util/SfxSetup/resource.rc +0 -5
  294. package/android/jni/lzma/C/Util/SfxSetup/setup.ico +0 -0
  295. package/android/jni/lzma/C/Xz.c +0 -90
  296. package/android/jni/lzma/C/Xz.h +0 -460
  297. package/android/jni/lzma/C/XzCrc64.c +0 -86
  298. package/android/jni/lzma/C/XzCrc64.h +0 -26
  299. package/android/jni/lzma/C/XzCrc64Opt.c +0 -69
  300. package/android/jni/lzma/C/XzDec.c +0 -2766
  301. package/android/jni/lzma/C/XzEnc.c +0 -1329
  302. package/android/jni/lzma/C/XzEnc.h +0 -60
  303. package/android/jni/lzma/C/XzIn.c +0 -319
  304. package/android/jni/lzma/CPP/7zip/7zip.mak +0 -240
  305. package/android/jni/lzma/CPP/7zip/Aes.mak +0 -7
  306. package/android/jni/lzma/CPP/7zip/Archive/7z/7zCompressionMode.cpp +0 -3
  307. package/android/jni/lzma/CPP/7zip/Archive/7z/7zCompressionMode.h +0 -76
  308. package/android/jni/lzma/CPP/7zip/Archive/7z/7zDecode.cpp +0 -569
  309. package/android/jni/lzma/CPP/7zip/Archive/7z/7zDecode.h +0 -70
  310. package/android/jni/lzma/CPP/7zip/Archive/7z/7zEncode.cpp +0 -678
  311. package/android/jni/lzma/CPP/7zip/Archive/7z/7zEncode.h +0 -92
  312. package/android/jni/lzma/CPP/7zip/Archive/7z/7zExtract.cpp +0 -423
  313. package/android/jni/lzma/CPP/7zip/Archive/7z/7zFolderInStream.cpp +0 -139
  314. package/android/jni/lzma/CPP/7zip/Archive/7z/7zFolderInStream.h +0 -61
  315. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHandler.cpp +0 -763
  316. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHandler.h +0 -181
  317. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHandlerOut.cpp +0 -942
  318. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHeader.cpp +0 -19
  319. package/android/jni/lzma/CPP/7zip/Archive/7z/7zHeader.h +0 -148
  320. package/android/jni/lzma/CPP/7zip/Archive/7z/7zIn.cpp +0 -1666
  321. package/android/jni/lzma/CPP/7zip/Archive/7z/7zIn.h +0 -445
  322. package/android/jni/lzma/CPP/7zip/Archive/7z/7zItem.h +0 -202
  323. package/android/jni/lzma/CPP/7zip/Archive/7z/7zOut.cpp +0 -901
  324. package/android/jni/lzma/CPP/7zip/Archive/7z/7zOut.h +0 -335
  325. package/android/jni/lzma/CPP/7zip/Archive/7z/7zProperties.cpp +0 -174
  326. package/android/jni/lzma/CPP/7zip/Archive/7z/7zProperties.h +0 -22
  327. package/android/jni/lzma/CPP/7zip/Archive/7z/7zRegister.cpp +0 -21
  328. package/android/jni/lzma/CPP/7zip/Archive/7z/7zSpecStream.cpp +0 -22
  329. package/android/jni/lzma/CPP/7zip/Archive/7z/7zSpecStream.h +0 -35
  330. package/android/jni/lzma/CPP/7zip/Archive/7z/7zUpdate.cpp +0 -2500
  331. package/android/jni/lzma/CPP/7zip/Archive/7z/7zUpdate.h +0 -139
  332. package/android/jni/lzma/CPP/7zip/Archive/7z/StdAfx.cpp +0 -3
  333. package/android/jni/lzma/CPP/7zip/Archive/7z/StdAfx.h +0 -8
  334. package/android/jni/lzma/CPP/7zip/Archive/Archive.def +0 -12
  335. package/android/jni/lzma/CPP/7zip/Archive/Archive2.def +0 -19
  336. package/android/jni/lzma/CPP/7zip/Archive/ArchiveExports.cpp +0 -151
  337. package/android/jni/lzma/CPP/7zip/Archive/Common/CoderMixer2.cpp +0 -1125
  338. package/android/jni/lzma/CPP/7zip/Archive/Common/CoderMixer2.h +0 -447
  339. package/android/jni/lzma/CPP/7zip/Archive/Common/DummyOutStream.cpp +0 -17
  340. package/android/jni/lzma/CPP/7zip/Archive/Common/DummyOutStream.h +0 -25
  341. package/android/jni/lzma/CPP/7zip/Archive/Common/HandlerOut.cpp +0 -232
  342. package/android/jni/lzma/CPP/7zip/Archive/Common/HandlerOut.h +0 -110
  343. package/android/jni/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.cpp +0 -46
  344. package/android/jni/lzma/CPP/7zip/Archive/Common/InStreamWithCRC.h +0 -67
  345. package/android/jni/lzma/CPP/7zip/Archive/Common/ItemNameUtils.cpp +0 -88
  346. package/android/jni/lzma/CPP/7zip/Archive/Common/ItemNameUtils.h +0 -28
  347. package/android/jni/lzma/CPP/7zip/Archive/Common/MultiStream.cpp +0 -191
  348. package/android/jni/lzma/CPP/7zip/Archive/Common/MultiStream.h +0 -89
  349. package/android/jni/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp +0 -18
  350. package/android/jni/lzma/CPP/7zip/Archive/Common/OutStreamWithCRC.h +0 -37
  351. package/android/jni/lzma/CPP/7zip/Archive/Common/ParseProperties.cpp +0 -3
  352. package/android/jni/lzma/CPP/7zip/Archive/Common/ParseProperties.h +0 -6
  353. package/android/jni/lzma/CPP/7zip/Archive/Common/StdAfx.h +0 -8
  354. package/android/jni/lzma/CPP/7zip/Archive/DllExports2.cpp +0 -122
  355. package/android/jni/lzma/CPP/7zip/Archive/IArchive.h +0 -608
  356. package/android/jni/lzma/CPP/7zip/Archive/Icons/7z.ico +0 -0
  357. package/android/jni/lzma/CPP/7zip/Archive/LzmaHandler.cpp +0 -629
  358. package/android/jni/lzma/CPP/7zip/Archive/SplitHandler.cpp +0 -359
  359. package/android/jni/lzma/CPP/7zip/Archive/StdAfx.h +0 -8
  360. package/android/jni/lzma/CPP/7zip/Archive/XzHandler.cpp +0 -1308
  361. package/android/jni/lzma/CPP/7zip/Archive/XzHandler.h +0 -11
  362. package/android/jni/lzma/CPP/7zip/Asm.mak +0 -9
  363. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp +0 -1910
  364. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsw +0 -29
  365. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.cpp +0 -3
  366. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h +0 -8
  367. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/makefile +0 -154
  368. package/android/jni/lzma/CPP/7zip/Bundles/Alone7z/resource.rc +0 -7
  369. package/android/jni/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.cpp +0 -3
  370. package/android/jni/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h +0 -8
  371. package/android/jni/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile +0 -96
  372. package/android/jni/lzma/CPP/7zip/Bundles/Format7zExtractR/resource.rc +0 -5
  373. package/android/jni/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.cpp +0 -3
  374. package/android/jni/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h +0 -8
  375. package/android/jni/lzma/CPP/7zip/Bundles/Format7zR/makefile +0 -116
  376. package/android/jni/lzma/CPP/7zip/Bundles/Format7zR/resource.rc +0 -5
  377. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp +0 -799
  378. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp +0 -477
  379. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsw +0 -29
  380. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.cpp +0 -3
  381. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h +0 -8
  382. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/makefile +0 -59
  383. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc +0 -195
  384. package/android/jni/lzma/CPP/7zip/Bundles/LzmaCon/resource.rc +0 -3
  385. package/android/jni/lzma/CPP/7zip/Bundles/LzmaSpec/LzmaSpec.cpp +0 -715
  386. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/7z.ico +0 -0
  387. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp +0 -912
  388. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsw +0 -29
  389. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp +0 -482
  390. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.cpp +0 -3
  391. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h +0 -8
  392. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/makefile +0 -134
  393. package/android/jni/lzma/CPP/7zip/Bundles/SFXCon/resource.rc +0 -5
  394. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp +0 -246
  395. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h +0 -86
  396. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp +0 -137
  397. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h +0 -11
  398. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp +0 -803
  399. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsw +0 -29
  400. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp +0 -364
  401. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.cpp +0 -3
  402. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h +0 -13
  403. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/makefile +0 -117
  404. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/resource.h +0 -6
  405. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/resource.rc +0 -16
  406. package/android/jni/lzma/CPP/7zip/Bundles/SFXSetup/setup.ico +0 -0
  407. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/7z.ico +0 -0
  408. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp +0 -988
  409. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsw +0 -29
  410. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp +0 -241
  411. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.cpp +0 -3
  412. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h +0 -14
  413. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/makefile +0 -153
  414. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/resource.h +0 -1
  415. package/android/jni/lzma/CPP/7zip/Bundles/SFXWin/resource.rc +0 -50
  416. package/android/jni/lzma/CPP/7zip/Common/CWrappers.cpp +0 -250
  417. package/android/jni/lzma/CPP/7zip/Common/CWrappers.h +0 -120
  418. package/android/jni/lzma/CPP/7zip/Common/CreateCoder.cpp +0 -536
  419. package/android/jni/lzma/CPP/7zip/Common/CreateCoder.h +0 -192
  420. package/android/jni/lzma/CPP/7zip/Common/FilePathAutoRename.cpp +0 -46
  421. package/android/jni/lzma/CPP/7zip/Common/FilePathAutoRename.h +0 -10
  422. package/android/jni/lzma/CPP/7zip/Common/FileStreams.cpp +0 -475
  423. package/android/jni/lzma/CPP/7zip/Common/FileStreams.h +0 -166
  424. package/android/jni/lzma/CPP/7zip/Common/FilterCoder.cpp +0 -435
  425. package/android/jni/lzma/CPP/7zip/Common/FilterCoder.h +0 -205
  426. package/android/jni/lzma/CPP/7zip/Common/InBuffer.cpp +0 -163
  427. package/android/jni/lzma/CPP/7zip/Common/InBuffer.h +0 -92
  428. package/android/jni/lzma/CPP/7zip/Common/InOutTempBuffer.cpp +0 -127
  429. package/android/jni/lzma/CPP/7zip/Common/InOutTempBuffer.h +0 -48
  430. package/android/jni/lzma/CPP/7zip/Common/LimitedStreams.cpp +0 -367
  431. package/android/jni/lzma/CPP/7zip/Common/LimitedStreams.h +0 -252
  432. package/android/jni/lzma/CPP/7zip/Common/LockedStream.cpp +0 -3
  433. package/android/jni/lzma/CPP/7zip/Common/LockedStream.h +0 -6
  434. package/android/jni/lzma/CPP/7zip/Common/MethodId.cpp +0 -3
  435. package/android/jni/lzma/CPP/7zip/Common/MethodId.h +0 -10
  436. package/android/jni/lzma/CPP/7zip/Common/MethodProps.cpp +0 -509
  437. package/android/jni/lzma/CPP/7zip/Common/MethodProps.h +0 -264
  438. package/android/jni/lzma/CPP/7zip/Common/OffsetStream.cpp +0 -39
  439. package/android/jni/lzma/CPP/7zip/Common/OffsetStream.h +0 -26
  440. package/android/jni/lzma/CPP/7zip/Common/OutBuffer.cpp +0 -111
  441. package/android/jni/lzma/CPP/7zip/Common/OutBuffer.h +0 -66
  442. package/android/jni/lzma/CPP/7zip/Common/ProgressUtils.cpp +0 -51
  443. package/android/jni/lzma/CPP/7zip/Common/ProgressUtils.h +0 -35
  444. package/android/jni/lzma/CPP/7zip/Common/PropId.cpp +0 -108
  445. package/android/jni/lzma/CPP/7zip/Common/RegisterArc.h +0 -78
  446. package/android/jni/lzma/CPP/7zip/Common/RegisterCodec.h +0 -106
  447. package/android/jni/lzma/CPP/7zip/Common/StdAfx.h +0 -8
  448. package/android/jni/lzma/CPP/7zip/Common/StreamBinder.cpp +0 -156
  449. package/android/jni/lzma/CPP/7zip/Common/StreamBinder.h +0 -60
  450. package/android/jni/lzma/CPP/7zip/Common/StreamObjects.cpp +0 -285
  451. package/android/jni/lzma/CPP/7zip/Common/StreamObjects.h +0 -157
  452. package/android/jni/lzma/CPP/7zip/Common/StreamUtils.cpp +0 -56
  453. package/android/jni/lzma/CPP/7zip/Common/StreamUtils.h +0 -13
  454. package/android/jni/lzma/CPP/7zip/Common/UniqBlocks.cpp +0 -57
  455. package/android/jni/lzma/CPP/7zip/Common/UniqBlocks.h +0 -26
  456. package/android/jni/lzma/CPP/7zip/Common/VirtThread.cpp +0 -48
  457. package/android/jni/lzma/CPP/7zip/Common/VirtThread.h +0 -24
  458. package/android/jni/lzma/CPP/7zip/Compress/Bcj2Coder.cpp +0 -666
  459. package/android/jni/lzma/CPP/7zip/Compress/Bcj2Coder.h +0 -120
  460. package/android/jni/lzma/CPP/7zip/Compress/Bcj2Register.cpp +0 -24
  461. package/android/jni/lzma/CPP/7zip/Compress/BcjCoder.cpp +0 -24
  462. package/android/jni/lzma/CPP/7zip/Compress/BcjCoder.h +0 -31
  463. package/android/jni/lzma/CPP/7zip/Compress/BcjRegister.cpp +0 -17
  464. package/android/jni/lzma/CPP/7zip/Compress/BranchMisc.cpp +0 -23
  465. package/android/jni/lzma/CPP/7zip/Compress/BranchMisc.h +0 -35
  466. package/android/jni/lzma/CPP/7zip/Compress/BranchRegister.cpp +0 -41
  467. package/android/jni/lzma/CPP/7zip/Compress/ByteSwap.cpp +0 -92
  468. package/android/jni/lzma/CPP/7zip/Compress/CodecExports.cpp +0 -344
  469. package/android/jni/lzma/CPP/7zip/Compress/CopyCoder.cpp +0 -120
  470. package/android/jni/lzma/CPP/7zip/Compress/CopyCoder.h +0 -49
  471. package/android/jni/lzma/CPP/7zip/Compress/CopyRegister.cpp +0 -15
  472. package/android/jni/lzma/CPP/7zip/Compress/DeltaFilter.cpp +0 -128
  473. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Decoder.cpp +0 -265
  474. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Decoder.h +0 -96
  475. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Encoder.cpp +0 -122
  476. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Encoder.h +0 -42
  477. package/android/jni/lzma/CPP/7zip/Compress/Lzma2Register.cpp +0 -22
  478. package/android/jni/lzma/CPP/7zip/Compress/LzmaDecoder.cpp +0 -343
  479. package/android/jni/lzma/CPP/7zip/Compress/LzmaDecoder.h +0 -113
  480. package/android/jni/lzma/CPP/7zip/Compress/LzmaEncoder.cpp +0 -182
  481. package/android/jni/lzma/CPP/7zip/Compress/LzmaEncoder.h +0 -46
  482. package/android/jni/lzma/CPP/7zip/Compress/LzmaRegister.cpp +0 -22
  483. package/android/jni/lzma/CPP/7zip/Compress/PpmdDecoder.cpp +0 -170
  484. package/android/jni/lzma/CPP/7zip/Compress/PpmdDecoder.h +0 -86
  485. package/android/jni/lzma/CPP/7zip/Compress/PpmdEncoder.cpp +0 -152
  486. package/android/jni/lzma/CPP/7zip/Compress/PpmdEncoder.h +0 -58
  487. package/android/jni/lzma/CPP/7zip/Compress/PpmdRegister.cpp +0 -22
  488. package/android/jni/lzma/CPP/7zip/Compress/StdAfx.h +0 -8
  489. package/android/jni/lzma/CPP/7zip/Compress/XzDecoder.cpp +0 -150
  490. package/android/jni/lzma/CPP/7zip/Compress/XzDecoder.h +0 -92
  491. package/android/jni/lzma/CPP/7zip/Compress/XzEncoder.cpp +0 -245
  492. package/android/jni/lzma/CPP/7zip/Compress/XzEncoder.h +0 -46
  493. package/android/jni/lzma/CPP/7zip/Crc.mak +0 -8
  494. package/android/jni/lzma/CPP/7zip/Crc64.mak +0 -8
  495. package/android/jni/lzma/CPP/7zip/Crypto/7zAes.cpp +0 -280
  496. package/android/jni/lzma/CPP/7zip/Crypto/7zAes.h +0 -118
  497. package/android/jni/lzma/CPP/7zip/Crypto/7zAesRegister.cpp +0 -17
  498. package/android/jni/lzma/CPP/7zip/Crypto/MyAes.cpp +0 -112
  499. package/android/jni/lzma/CPP/7zip/Crypto/MyAes.h +0 -57
  500. package/android/jni/lzma/CPP/7zip/Crypto/MyAesReg.cpp +0 -16
  501. package/android/jni/lzma/CPP/7zip/Crypto/RandGen.cpp +0 -233
  502. package/android/jni/lzma/CPP/7zip/Crypto/RandGen.h +0 -40
  503. package/android/jni/lzma/CPP/7zip/Crypto/StdAfx.h +0 -8
  504. package/android/jni/lzma/CPP/7zip/GuiCommon.rc +0 -84
  505. package/android/jni/lzma/CPP/7zip/Guid.txt +0 -220
  506. package/android/jni/lzma/CPP/7zip/ICoder.h +0 -399
  507. package/android/jni/lzma/CPP/7zip/IDecl.h +0 -28
  508. package/android/jni/lzma/CPP/7zip/IPassword.h +0 -23
  509. package/android/jni/lzma/CPP/7zip/IProgress.h +0 -19
  510. package/android/jni/lzma/CPP/7zip/IStream.h +0 -127
  511. package/android/jni/lzma/CPP/7zip/LzmaDec.mak +0 -5
  512. package/android/jni/lzma/CPP/7zip/MyVersion.h +0 -2
  513. package/android/jni/lzma/CPP/7zip/MyVersionInfo.rc +0 -2
  514. package/android/jni/lzma/CPP/7zip/PropID.h +0 -127
  515. package/android/jni/lzma/CPP/7zip/SubBuild.mak +0 -3
  516. package/android/jni/lzma/CPP/7zip/UI/Client7z/Client7z.cpp +0 -993
  517. package/android/jni/lzma/CPP/7zip/UI/Client7z/Client7z.dsp +0 -235
  518. package/android/jni/lzma/CPP/7zip/UI/Client7z/Client7z.dsw +0 -29
  519. package/android/jni/lzma/CPP/7zip/UI/Client7z/StdAfx.cpp +0 -3
  520. package/android/jni/lzma/CPP/7zip/UI/Client7z/StdAfx.h +0 -8
  521. package/android/jni/lzma/CPP/7zip/UI/Client7z/makefile +0 -28
  522. package/android/jni/lzma/CPP/7zip/UI/Client7z/resource.rc +0 -3
  523. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.cpp +0 -1295
  524. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveCommandLine.h +0 -136
  525. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +0 -1715
  526. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveExtractCallback.h +0 -403
  527. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveName.cpp +0 -155
  528. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveName.h +0 -10
  529. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp +0 -161
  530. package/android/jni/lzma/CPP/7zip/UI/Common/ArchiveOpenCallback.h +0 -112
  531. package/android/jni/lzma/CPP/7zip/UI/Common/Bench.cpp +0 -3618
  532. package/android/jni/lzma/CPP/7zip/UI/Common/Bench.h +0 -77
  533. package/android/jni/lzma/CPP/7zip/UI/Common/DefaultName.cpp +0 -37
  534. package/android/jni/lzma/CPP/7zip/UI/Common/DefaultName.h +0 -11
  535. package/android/jni/lzma/CPP/7zip/UI/Common/DirItem.h +0 -190
  536. package/android/jni/lzma/CPP/7zip/UI/Common/EnumDirItems.cpp +0 -1096
  537. package/android/jni/lzma/CPP/7zip/UI/Common/EnumDirItems.h +0 -42
  538. package/android/jni/lzma/CPP/7zip/UI/Common/ExitCode.h +0 -27
  539. package/android/jni/lzma/CPP/7zip/UI/Common/Extract.cpp +0 -482
  540. package/android/jni/lzma/CPP/7zip/UI/Common/Extract.h +0 -94
  541. package/android/jni/lzma/CPP/7zip/UI/Common/ExtractMode.h +0 -34
  542. package/android/jni/lzma/CPP/7zip/UI/Common/ExtractingFilePath.cpp +0 -280
  543. package/android/jni/lzma/CPP/7zip/UI/Common/ExtractingFilePath.h +0 -31
  544. package/android/jni/lzma/CPP/7zip/UI/Common/HashCalc.cpp +0 -347
  545. package/android/jni/lzma/CPP/7zip/UI/Common/HashCalc.h +0 -110
  546. package/android/jni/lzma/CPP/7zip/UI/Common/IFileExtractCallback.h +0 -114
  547. package/android/jni/lzma/CPP/7zip/UI/Common/LoadCodecs.cpp +0 -1074
  548. package/android/jni/lzma/CPP/7zip/UI/Common/LoadCodecs.h +0 -424
  549. package/android/jni/lzma/CPP/7zip/UI/Common/OpenArchive.cpp +0 -3553
  550. package/android/jni/lzma/CPP/7zip/UI/Common/OpenArchive.h +0 -436
  551. package/android/jni/lzma/CPP/7zip/UI/Common/PropIDUtils.cpp +0 -668
  552. package/android/jni/lzma/CPP/7zip/UI/Common/PropIDUtils.h +0 -18
  553. package/android/jni/lzma/CPP/7zip/UI/Common/Property.h +0 -14
  554. package/android/jni/lzma/CPP/7zip/UI/Common/SetProperties.cpp +0 -80
  555. package/android/jni/lzma/CPP/7zip/UI/Common/SetProperties.h +0 -10
  556. package/android/jni/lzma/CPP/7zip/UI/Common/SortUtils.cpp +0 -25
  557. package/android/jni/lzma/CPP/7zip/UI/Common/SortUtils.h +0 -10
  558. package/android/jni/lzma/CPP/7zip/UI/Common/StdAfx.h +0 -8
  559. package/android/jni/lzma/CPP/7zip/UI/Common/TempFiles.cpp +0 -19
  560. package/android/jni/lzma/CPP/7zip/UI/Common/TempFiles.h +0 -16
  561. package/android/jni/lzma/CPP/7zip/UI/Common/Update.cpp +0 -1704
  562. package/android/jni/lzma/CPP/7zip/UI/Common/Update.h +0 -200
  563. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateAction.cpp +0 -64
  564. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateAction.h +0 -66
  565. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateCallback.cpp +0 -771
  566. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateCallback.h +0 -162
  567. package/android/jni/lzma/CPP/7zip/UI/Common/UpdatePair.cpp +0 -233
  568. package/android/jni/lzma/CPP/7zip/UI/Common/UpdatePair.h +0 -27
  569. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateProduce.cpp +0 -70
  570. package/android/jni/lzma/CPP/7zip/UI/Common/UpdateProduce.h +0 -55
  571. package/android/jni/lzma/CPP/7zip/UI/Common/WorkDir.cpp +0 -94
  572. package/android/jni/lzma/CPP/7zip/UI/Common/WorkDir.h +0 -26
  573. package/android/jni/lzma/CPP/7zip/UI/Common/ZipRegistry.h +0 -130
  574. package/android/jni/lzma/CPP/7zip/UI/Console/BenchCon.cpp +0 -41
  575. package/android/jni/lzma/CPP/7zip/UI/Console/BenchCon.h +0 -14
  576. package/android/jni/lzma/CPP/7zip/UI/Console/Console.mak +0 -43
  577. package/android/jni/lzma/CPP/7zip/UI/Console/Console.manifest +0 -13
  578. package/android/jni/lzma/CPP/7zip/UI/Console/ConsoleClose.cpp +0 -69
  579. package/android/jni/lzma/CPP/7zip/UI/Console/ConsoleClose.h +0 -33
  580. package/android/jni/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp +0 -825
  581. package/android/jni/lzma/CPP/7zip/UI/Console/ExtractCallbackConsole.h +0 -164
  582. package/android/jni/lzma/CPP/7zip/UI/Console/HashCon.cpp +0 -367
  583. package/android/jni/lzma/CPP/7zip/UI/Console/HashCon.h +0 -48
  584. package/android/jni/lzma/CPP/7zip/UI/Console/List.cpp +0 -1359
  585. package/android/jni/lzma/CPP/7zip/UI/Console/List.h +0 -27
  586. package/android/jni/lzma/CPP/7zip/UI/Console/Main.cpp +0 -1154
  587. package/android/jni/lzma/CPP/7zip/UI/Console/MainAr.cpp +0 -175
  588. package/android/jni/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.cpp +0 -115
  589. package/android/jni/lzma/CPP/7zip/UI/Console/OpenCallbackConsole.h +0 -66
  590. package/android/jni/lzma/CPP/7zip/UI/Console/PercentPrinter.cpp +0 -183
  591. package/android/jni/lzma/CPP/7zip/UI/Console/PercentPrinter.h +0 -62
  592. package/android/jni/lzma/CPP/7zip/UI/Console/StdAfx.cpp +0 -3
  593. package/android/jni/lzma/CPP/7zip/UI/Console/StdAfx.h +0 -8
  594. package/android/jni/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp +0 -702
  595. package/android/jni/lzma/CPP/7zip/UI/Console/UpdateCallbackConsole.h +0 -124
  596. package/android/jni/lzma/CPP/7zip/UI/Console/UserInputUtils.cpp +0 -110
  597. package/android/jni/lzma/CPP/7zip/UI/Console/UserInputUtils.h +0 -27
  598. package/android/jni/lzma/CPP/7zip/UI/Console/makefile +0 -64
  599. package/android/jni/lzma/CPP/7zip/UI/Console/resource.rc +0 -7
  600. package/android/jni/lzma/CPP/7zip/UI/Explorer/MyMessages.cpp +0 -37
  601. package/android/jni/lzma/CPP/7zip/UI/Explorer/MyMessages.h +0 -16
  602. package/android/jni/lzma/CPP/7zip/UI/FileManager/BrowseDialog.cpp +0 -1025
  603. package/android/jni/lzma/CPP/7zip/UI/FileManager/BrowseDialog.h +0 -21
  604. package/android/jni/lzma/CPP/7zip/UI/FileManager/BrowseDialogRes.h +0 -9
  605. package/android/jni/lzma/CPP/7zip/UI/FileManager/ComboDialog.cpp +0 -64
  606. package/android/jni/lzma/CPP/7zip/UI/FileManager/ComboDialog.h +0 -28
  607. package/android/jni/lzma/CPP/7zip/UI/FileManager/ComboDialogRes.h +0 -4
  608. package/android/jni/lzma/CPP/7zip/UI/FileManager/DialogSize.h +0 -16
  609. package/android/jni/lzma/CPP/7zip/UI/FileManager/ExtractCallback.cpp +0 -1037
  610. package/android/jni/lzma/CPP/7zip/UI/FileManager/ExtractCallback.h +0 -328
  611. package/android/jni/lzma/CPP/7zip/UI/FileManager/FormatUtils.cpp +0 -28
  612. package/android/jni/lzma/CPP/7zip/UI/FileManager/FormatUtils.h +0 -14
  613. package/android/jni/lzma/CPP/7zip/UI/FileManager/LangUtils.h +0 -40
  614. package/android/jni/lzma/CPP/7zip/UI/FileManager/MyWindowsNew.h +0 -76
  615. package/android/jni/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.cpp +0 -122
  616. package/android/jni/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.h +0 -69
  617. package/android/jni/lzma/CPP/7zip/UI/FileManager/OverwriteDialog.rc +0 -91
  618. package/android/jni/lzma/CPP/7zip/UI/FileManager/OverwriteDialogRes.h +0 -17
  619. package/android/jni/lzma/CPP/7zip/UI/FileManager/PasswordDialog.cpp +0 -58
  620. package/android/jni/lzma/CPP/7zip/UI/FileManager/PasswordDialog.h +0 -28
  621. package/android/jni/lzma/CPP/7zip/UI/FileManager/PasswordDialog.rc +0 -14
  622. package/android/jni/lzma/CPP/7zip/UI/FileManager/PasswordDialogRes.h +0 -5
  623. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog.cpp +0 -196
  624. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog.h +0 -170
  625. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog.rc +0 -12
  626. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.cpp +0 -1337
  627. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.h +0 -351
  628. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2.rc +0 -40
  629. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2Res.h +0 -48
  630. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialog2a.rc +0 -80
  631. package/android/jni/lzma/CPP/7zip/UI/FileManager/ProgressDialogRes.h +0 -3
  632. package/android/jni/lzma/CPP/7zip/UI/FileManager/PropertyName.cpp +0 -23
  633. package/android/jni/lzma/CPP/7zip/UI/FileManager/PropertyName.h +0 -10
  634. package/android/jni/lzma/CPP/7zip/UI/FileManager/PropertyNameRes.h +0 -95
  635. package/android/jni/lzma/CPP/7zip/UI/FileManager/SysIconUtils.cpp +0 -255
  636. package/android/jni/lzma/CPP/7zip/UI/FileManager/SysIconUtils.h +0 -62
  637. package/android/jni/lzma/CPP/7zip/UI/FileManager/resource.h +0 -177
  638. package/android/jni/lzma/CPP/7zip/UI/FileManager/resourceGui.h +0 -15
  639. package/android/jni/lzma/CPP/7zip/UI/GUI/Extract.rc +0 -59
  640. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp +0 -418
  641. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractDialog.h +0 -113
  642. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractDialog.rc +0 -98
  643. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractDialogRes.h +0 -24
  644. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp +0 -280
  645. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractGUI.h +0 -38
  646. package/android/jni/lzma/CPP/7zip/UI/GUI/ExtractRes.h +0 -51
  647. package/android/jni/lzma/CPP/7zip/UI/GUI/HashGUI.h +0 -27
  648. package/android/jni/lzma/CPP/7zip/UI/GUI/resource2.h +0 -2
  649. package/android/jni/lzma/CPP/Build.mak +0 -156
  650. package/android/jni/lzma/CPP/Common/AutoPtr.h +0 -35
  651. package/android/jni/lzma/CPP/Common/CRC.cpp +0 -7
  652. package/android/jni/lzma/CPP/Common/C_FileIO.cpp +0 -92
  653. package/android/jni/lzma/CPP/Common/C_FileIO.h +0 -53
  654. package/android/jni/lzma/CPP/Common/ComTry.h +0 -21
  655. package/android/jni/lzma/CPP/Common/CommandLineParser.cpp +0 -197
  656. package/android/jni/lzma/CPP/Common/CommandLineParser.h +0 -63
  657. package/android/jni/lzma/CPP/Common/Common.h +0 -43
  658. package/android/jni/lzma/CPP/Common/CrcReg.cpp +0 -98
  659. package/android/jni/lzma/CPP/Common/Defs.h +0 -15
  660. package/android/jni/lzma/CPP/Common/DynamicBuffer.h +0 -64
  661. package/android/jni/lzma/CPP/Common/IntToString.cpp +0 -193
  662. package/android/jni/lzma/CPP/Common/IntToString.h +0 -28
  663. package/android/jni/lzma/CPP/Common/Lang.h +0 -23
  664. package/android/jni/lzma/CPP/Common/ListFileUtils.cpp +0 -132
  665. package/android/jni/lzma/CPP/Common/ListFileUtils.h +0 -18
  666. package/android/jni/lzma/CPP/Common/MyBuffer.h +0 -259
  667. package/android/jni/lzma/CPP/Common/MyBuffer2.h +0 -100
  668. package/android/jni/lzma/CPP/Common/MyCom.h +0 -277
  669. package/android/jni/lzma/CPP/Common/MyException.h +0 -14
  670. package/android/jni/lzma/CPP/Common/MyGuidDef.h +0 -54
  671. package/android/jni/lzma/CPP/Common/MyInitGuid.h +0 -45
  672. package/android/jni/lzma/CPP/Common/MyLinux.h +0 -42
  673. package/android/jni/lzma/CPP/Common/MyString.cpp +0 -1659
  674. package/android/jni/lzma/CPP/Common/MyString.h +0 -868
  675. package/android/jni/lzma/CPP/Common/MyTypes.h +0 -35
  676. package/android/jni/lzma/CPP/Common/MyUnknown.h +0 -17
  677. package/android/jni/lzma/CPP/Common/MyVector.cpp +0 -3
  678. package/android/jni/lzma/CPP/Common/MyVector.h +0 -634
  679. package/android/jni/lzma/CPP/Common/MyWindows.cpp +0 -145
  680. package/android/jni/lzma/CPP/Common/MyWindows.h +0 -231
  681. package/android/jni/lzma/CPP/Common/NewHandler.cpp +0 -163
  682. package/android/jni/lzma/CPP/Common/NewHandler.h +0 -88
  683. package/android/jni/lzma/CPP/Common/Sha256Reg.cpp +0 -40
  684. package/android/jni/lzma/CPP/Common/StdAfx.h +0 -8
  685. package/android/jni/lzma/CPP/Common/StdInStream.cpp +0 -89
  686. package/android/jni/lzma/CPP/Common/StdInStream.h +0 -38
  687. package/android/jni/lzma/CPP/Common/StdOutStream.cpp +0 -163
  688. package/android/jni/lzma/CPP/Common/StdOutStream.h +0 -71
  689. package/android/jni/lzma/CPP/Common/StringConvert.cpp +0 -319
  690. package/android/jni/lzma/CPP/Common/StringConvert.h +0 -88
  691. package/android/jni/lzma/CPP/Common/StringToInt.cpp +0 -144
  692. package/android/jni/lzma/CPP/Common/StringToInt.h +0 -21
  693. package/android/jni/lzma/CPP/Common/TextConfig.cpp +0 -124
  694. package/android/jni/lzma/CPP/Common/TextConfig.h +0 -19
  695. package/android/jni/lzma/CPP/Common/UTFConvert.cpp +0 -288
  696. package/android/jni/lzma/CPP/Common/UTFConvert.h +0 -12
  697. package/android/jni/lzma/CPP/Common/Wildcard.cpp +0 -676
  698. package/android/jni/lzma/CPP/Common/Wildcard.h +0 -149
  699. package/android/jni/lzma/CPP/Common/XzCrc64Init.cpp +0 -7
  700. package/android/jni/lzma/CPP/Common/XzCrc64Reg.cpp +0 -42
  701. package/android/jni/lzma/CPP/Windows/COM.h +0 -70
  702. package/android/jni/lzma/CPP/Windows/CommonDialog.cpp +0 -185
  703. package/android/jni/lzma/CPP/Windows/CommonDialog.h +0 -23
  704. package/android/jni/lzma/CPP/Windows/Control/ComboBox.cpp +0 -66
  705. package/android/jni/lzma/CPP/Windows/Control/ComboBox.h +0 -65
  706. package/android/jni/lzma/CPP/Windows/Control/CommandBar.h +0 -52
  707. package/android/jni/lzma/CPP/Windows/Control/Dialog.cpp +0 -251
  708. package/android/jni/lzma/CPP/Windows/Control/Dialog.h +0 -170
  709. package/android/jni/lzma/CPP/Windows/Control/Edit.h +0 -19
  710. package/android/jni/lzma/CPP/Windows/Control/ImageList.cpp +0 -10
  711. package/android/jni/lzma/CPP/Windows/Control/ImageList.h +0 -87
  712. package/android/jni/lzma/CPP/Windows/Control/ListView.cpp +0 -155
  713. package/android/jni/lzma/CPP/Windows/Control/ListView.h +0 -146
  714. package/android/jni/lzma/CPP/Windows/Control/ProgressBar.h +0 -35
  715. package/android/jni/lzma/CPP/Windows/Control/PropertyPage.cpp +0 -143
  716. package/android/jni/lzma/CPP/Windows/Control/PropertyPage.h +0 -50
  717. package/android/jni/lzma/CPP/Windows/Control/ReBar.h +0 -34
  718. package/android/jni/lzma/CPP/Windows/Control/Static.h +0 -28
  719. package/android/jni/lzma/CPP/Windows/Control/StatusBar.h +0 -42
  720. package/android/jni/lzma/CPP/Windows/Control/StdAfx.h +0 -8
  721. package/android/jni/lzma/CPP/Windows/Control/ToolBar.h +0 -43
  722. package/android/jni/lzma/CPP/Windows/Control/Trackbar.h +0 -27
  723. package/android/jni/lzma/CPP/Windows/Control/Window2.cpp +0 -200
  724. package/android/jni/lzma/CPP/Windows/Control/Window2.h +0 -51
  725. package/android/jni/lzma/CPP/Windows/DLL.cpp +0 -109
  726. package/android/jni/lzma/CPP/Windows/DLL.h +0 -58
  727. package/android/jni/lzma/CPP/Windows/Defs.h +0 -17
  728. package/android/jni/lzma/CPP/Windows/ErrorMsg.cpp +0 -66
  729. package/android/jni/lzma/CPP/Windows/ErrorMsg.h +0 -15
  730. package/android/jni/lzma/CPP/Windows/FileDir.cpp +0 -714
  731. package/android/jni/lzma/CPP/Windows/FileDir.h +0 -117
  732. package/android/jni/lzma/CPP/Windows/FileFind.cpp +0 -749
  733. package/android/jni/lzma/CPP/Windows/FileFind.h +0 -161
  734. package/android/jni/lzma/CPP/Windows/FileIO.cpp +0 -432
  735. package/android/jni/lzma/CPP/Windows/FileIO.h +0 -212
  736. package/android/jni/lzma/CPP/Windows/FileLink.cpp +0 -440
  737. package/android/jni/lzma/CPP/Windows/FileMapping.cpp +0 -12
  738. package/android/jni/lzma/CPP/Windows/FileMapping.h +0 -66
  739. package/android/jni/lzma/CPP/Windows/FileName.cpp +0 -839
  740. package/android/jni/lzma/CPP/Windows/FileName.h +0 -115
  741. package/android/jni/lzma/CPP/Windows/FileSystem.cpp +0 -131
  742. package/android/jni/lzma/CPP/Windows/FileSystem.h +0 -27
  743. package/android/jni/lzma/CPP/Windows/Handle.h +0 -37
  744. package/android/jni/lzma/CPP/Windows/MemoryLock.cpp +0 -112
  745. package/android/jni/lzma/CPP/Windows/MemoryLock.h +0 -40
  746. package/android/jni/lzma/CPP/Windows/NtCheck.h +0 -46
  747. package/android/jni/lzma/CPP/Windows/PropVariant.cpp +0 -347
  748. package/android/jni/lzma/CPP/Windows/PropVariant.h +0 -114
  749. package/android/jni/lzma/CPP/Windows/PropVariantConv.cpp +0 -138
  750. package/android/jni/lzma/CPP/Windows/PropVariantConv.h +0 -37
  751. package/android/jni/lzma/CPP/Windows/Registry.cpp +0 -390
  752. package/android/jni/lzma/CPP/Windows/Registry.h +0 -84
  753. package/android/jni/lzma/CPP/Windows/ResourceString.cpp +0 -103
  754. package/android/jni/lzma/CPP/Windows/ResourceString.h +0 -16
  755. package/android/jni/lzma/CPP/Windows/SecurityUtils.cpp +0 -181
  756. package/android/jni/lzma/CPP/Windows/SecurityUtils.h +0 -167
  757. package/android/jni/lzma/CPP/Windows/Shell.cpp +0 -358
  758. package/android/jni/lzma/CPP/Windows/Shell.h +0 -94
  759. package/android/jni/lzma/CPP/Windows/StdAfx.h +0 -8
  760. package/android/jni/lzma/CPP/Windows/Synchronization.cpp +0 -10
  761. package/android/jni/lzma/CPP/Windows/Synchronization.h +0 -164
  762. package/android/jni/lzma/CPP/Windows/System.cpp +0 -142
  763. package/android/jni/lzma/CPP/Windows/System.h +0 -40
  764. package/android/jni/lzma/CPP/Windows/Thread.h +0 -38
  765. package/android/jni/lzma/CPP/Windows/TimeUtils.cpp +0 -213
  766. package/android/jni/lzma/CPP/Windows/TimeUtils.h +0 -32
  767. package/android/jni/lzma/CPP/Windows/Window.cpp +0 -179
  768. package/android/jni/lzma/CPP/Windows/Window.h +0 -284
  769. package/android/jni/lzma/CS/7zip/Common/CRC.cs +0 -55
  770. package/android/jni/lzma/CS/7zip/Common/CommandLineParser.cs +0 -274
  771. package/android/jni/lzma/CS/7zip/Common/InBuffer.cs +0 -72
  772. package/android/jni/lzma/CS/7zip/Common/OutBuffer.cs +0 -47
  773. package/android/jni/lzma/CS/7zip/Compress/LZ/IMatchFinder.cs +0 -24
  774. package/android/jni/lzma/CS/7zip/Compress/LZ/LzBinTree.cs +0 -367
  775. package/android/jni/lzma/CS/7zip/Compress/LZ/LzInWindow.cs +0 -132
  776. package/android/jni/lzma/CS/7zip/Compress/LZ/LzOutWindow.cs +0 -110
  777. package/android/jni/lzma/CS/7zip/Compress/LZMA/LzmaBase.cs +0 -76
  778. package/android/jni/lzma/CS/7zip/Compress/LZMA/LzmaDecoder.cs +0 -398
  779. package/android/jni/lzma/CS/7zip/Compress/LZMA/LzmaEncoder.cs +0 -1480
  780. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.cs +0 -364
  781. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.csproj +0 -90
  782. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/LzmaAlone.sln +0 -20
  783. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/LzmaBench.cs +0 -340
  784. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/Properties/AssemblyInfo.cs +0 -29
  785. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/Properties/Resources.cs +0 -70
  786. package/android/jni/lzma/CS/7zip/Compress/LzmaAlone/Properties/Settings.cs +0 -42
  787. package/android/jni/lzma/CS/7zip/Compress/RangeCoder/RangeCoder.cs +0 -234
  788. package/android/jni/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBit.cs +0 -117
  789. package/android/jni/lzma/CS/7zip/Compress/RangeCoder/RangeCoderBitTree.cs +0 -157
  790. package/android/jni/lzma/CS/7zip/ICoder.cs +0 -157
  791. package/android/jni/lzma/DOC/7zC.txt +0 -187
  792. package/android/jni/lzma/DOC/7zFormat.txt +0 -469
  793. package/android/jni/lzma/DOC/Methods.txt +0 -173
  794. package/android/jni/lzma/DOC/installer.txt +0 -166
  795. package/android/jni/lzma/DOC/lzma-history.txt +0 -446
  796. package/android/jni/lzma/DOC/lzma-specification.txt +0 -1176
  797. package/android/jni/lzma/DOC/lzma.txt +0 -328
  798. package/android/jni/lzma/Java/SevenZip/CRC.java +0 -52
  799. package/android/jni/lzma/Java/SevenZip/Compression/LZ/BinTree.java +0 -382
  800. package/android/jni/lzma/Java/SevenZip/Compression/LZ/InWindow.java +0 -131
  801. package/android/jni/lzma/Java/SevenZip/Compression/LZ/OutWindow.java +0 -85
  802. package/android/jni/lzma/Java/SevenZip/Compression/LZMA/Base.java +0 -88
  803. package/android/jni/lzma/Java/SevenZip/Compression/LZMA/Decoder.java +0 -329
  804. package/android/jni/lzma/Java/SevenZip/Compression/LZMA/Encoder.java +0 -1416
  805. package/android/jni/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeDecoder.java +0 -55
  806. package/android/jni/lzma/Java/SevenZip/Compression/RangeCoder/BitTreeEncoder.java +0 -99
  807. package/android/jni/lzma/Java/SevenZip/Compression/RangeCoder/Decoder.java +0 -88
  808. package/android/jni/lzma/Java/SevenZip/Compression/RangeCoder/Encoder.java +0 -151
  809. package/android/jni/lzma/Java/SevenZip/ICodeProgress.java +0 -6
  810. package/android/jni/lzma/Java/SevenZip/LzmaAlone.java +0 -253
  811. package/android/jni/lzma/Java/SevenZip/LzmaBench.java +0 -392
  812. package/android/jni/lzma/bin/7zS2.sfx +0 -0
  813. package/android/jni/lzma/bin/7zS2con.sfx +0 -0
  814. package/android/jni/lzma/bin/7zSD.sfx +0 -0
  815. package/android/jni/lzma/bin/7zdec.exe +0 -0
  816. package/android/jni/lzma/bin/7zr.exe +0 -0
  817. package/android/jni/lzma/bin/installer/config.txt +0 -5
  818. package/android/jni/lzma/bin/installer/cr.bat +0 -5
  819. package/android/jni/lzma/bin/lzma.exe +0 -0
  820. package/android/jni/lzma/bin/x64/7zr.exe +0 -0
package/src/client.ts CHANGED
@@ -1,95 +1,22 @@
1
- import { DeviceEventEmitter, Platform } from 'react-native';
2
- import {
3
- buildTime,
4
- cInfo,
5
- currentVersion,
6
- currentVersionInfo,
7
- getBundleHash,
8
- isFirstTime,
9
- isRolledBack,
10
- nativeMethod,
11
- PushyModule,
12
- packageVersion,
13
- pushyNativeEventEmitter,
14
- rolledBackVersion,
15
- setLocalHashInfo,
16
- supportedDiffVersion,
17
- } from './core';
18
- import { executeEndpointFallback } from './endpoint';
19
- import {
20
- readErrorCode,
21
- toUpdateError,
22
- UpdateError,
23
- type UpdateErrorCode,
24
- } from './error';
25
- import {
26
- type ErrorReportContext,
27
- type ErrorReportingOptions,
28
- installGlobalErrorHandler,
29
- type SerializedException,
30
- serializeException,
31
- } from './errorReporting';
1
+ import { Platform } from 'react-native';
2
+ import { Activation } from './clientActivation';
3
+ import { Checker } from './clientCheck';
4
+ import { Downloader } from './clientDownload';
5
+ import { NativeConfigSync } from './clientNativeConfig';
6
+ import { type ReportEvent, Reporter } from './clientReporter';
7
+ import { createProcessState } from './clientState';
8
+ import { cInfo, isRolledBack, packageVersion, rolledBackVersion } from './core';
9
+ import { UpdateError } from './error';
32
10
  import i18n from './i18n';
33
- import {
34
- resolveServerEventHash,
35
- resolveServerEventType,
36
- truncateDetail,
37
- } from './telemetry';
38
- import type {
39
- BeforeReloadContext,
40
- CheckResult,
41
- ClientOptions,
42
- EventType,
43
- ProgressData,
44
- UpdateCheckState,
45
- UpdateServerConfig,
46
- } from './type';
47
- import {
48
- buildCheckFingerprint,
49
- buildCheckRequestBody,
50
- type DownloadPlan,
51
- type DownloadStrategyType,
52
- decideDownload,
53
- dedupeEndpoints,
54
- isMirrorRetryableCode,
55
- isValidCheckResult,
56
- jsonDeepEqual,
57
- nativeConfigsEquivalent,
58
- } from './updateFlowCore';
59
- import {
60
- assertWeb,
61
- computeProgress,
62
- DEFAULT_FETCH_TIMEOUT_MS,
63
- fetchWithTimeout,
64
- info,
65
- log,
66
- noop,
67
- promiseAny,
68
- setDebugLogging,
69
- testUrls,
70
- warn,
71
- } from './utils';
11
+ import type { ClientOptions, UpdateServerConfig } from './type';
12
+ import { dedupeEndpoints } from './updateFlowCore';
13
+ import { assertWeb, info, log, noop, setDebugLogging } from './utils';
72
14
 
73
- /** One report() event: the logger payload and the source of server telemetry. */
74
- interface ReportEvent {
75
- type: EventType;
76
- message?: string;
77
- code?: UpdateErrorCode;
78
- data?: Record<string, string | number>;
79
- }
80
-
81
- /**
82
- * Receives every error the client reports, alongside the report event type.
83
- * The UpdateProvider subscribes to surface errors as lastError/Alert; user
84
- * code can subscribe too. Listeners run before any throwError rethrow.
85
- */
86
- export type UpdateErrorListener = (
87
- error: UpdateError,
88
- eventType: EventType
89
- ) => void;
15
+ export type { UpdateErrorListener } from './clientReporter';
90
16
 
17
+ // Pushy for China users, Cresc for international ones.
18
+ // <generated:service-presets> (scripts/contract.ts; bun scripts/generate-contract.ts)
91
19
  const SERVER_PRESETS = {
92
- // cn
93
20
  Pushy: {
94
21
  main: [
95
22
  'https://update.react-native.cn/api',
@@ -100,7 +27,6 @@ const SERVER_PRESETS = {
100
27
  'https://cdn.jsdelivr.net/gh/reactnativecn/react-native-update@master/endpoints.json',
101
28
  ],
102
29
  },
103
- // i18n
104
30
  Cresc: {
105
31
  main: ['https://api.cresc.dev', 'https://api.cresc.app'],
106
32
  queryUrls: [
@@ -108,22 +34,19 @@ const SERVER_PRESETS = {
108
34
  ],
109
35
  },
110
36
  };
37
+ // </generated:service-presets>
111
38
 
112
39
  const cloneServerConfig = (server: UpdateServerConfig): UpdateServerConfig => ({
113
40
  main: dedupeEndpoints([...(server.main || [])]),
114
41
  queryUrls: server.queryUrls ? [...server.queryUrls] : undefined,
115
42
  });
116
43
 
117
- // How long after a resolved reloadUpdate the process may still be alive before
118
- // the switch is considered not to have restarted the app (see switchVersion).
119
- const RELOAD_WATCHDOG_MS = 5000;
120
-
121
- // Non-2xx check responses are usually HTML error pages; keep only the head
122
- // for the error message (it can end up in an alert) and the logger.
123
- const MAX_HTTP_ERROR_TEXT = 200;
124
-
125
44
  assertWeb();
126
45
 
46
+ // Created once per evaluation of this module, i.e. once per process.
47
+ const processState = createProcessState();
48
+ export const sharedState = processState.shared;
49
+
127
50
  const createDefaultClientOptions = (): ClientOptions => ({
128
51
  appKey: '',
129
52
  autoMarkSuccess: true,
@@ -135,92 +58,6 @@ const createDefaultClientOptions = (): ClientOptions => ({
135
58
  disableErrorReporting: false,
136
59
  });
137
60
 
138
- export const sharedState: {
139
- downloadingTasks: Record<string, Promise<string | undefined>>;
140
- // Progress callbacks per hash: concurrent downloadUpdate callers of the
141
- // same hash each register theirs here instead of the second one being
142
- // silently dropped by the in-flight dedup.
143
- progressCallbacks: Record<string, Set<(data: ProgressData) => void>>;
144
- downloadedHash?: string;
145
- toHash?: string;
146
- apkStatus: 'downloading' | 'downloaded' | null;
147
- marked: boolean;
148
- applyingUpdate: boolean;
149
- } = {
150
- downloadingTasks: {},
151
- progressCallbacks: {},
152
- downloadedHash: undefined,
153
- apkStatus: null,
154
- marked: false,
155
- applyingUpdate: false,
156
- };
157
-
158
- // The native cold-start check writes its response cache at most once per
159
- // launch (and skips it once JS has checked), so once this process has seen it
160
- // absent or expired, later reads are near-certain misses: skip the bridge
161
- // call from then on. The rare miss costs one network check. A fresh entry
162
- // that only mismatches the request or config does not set this: a later check
163
- // with the original options (e.g. after `extra` reverts) can still reuse it.
164
- let nativeCheckCacheExhausted = false;
165
- const NATIVE_CHECK_CACHE_MAX_AGE_S = 120;
166
-
167
- // In-flight native markSuccess shared by concurrent callers, so the native
168
- // call and its telemetry happen once. Cleared once settled.
169
- let markingPromise: Promise<void> | undefined;
170
-
171
- // A reset/new switch invalidates ownership of older async completions and
172
- // watchdogs before the process-wide applyingUpdate flag can be reused.
173
- let applyingUpdateGeneration = 0;
174
- let reloadWatchdogTimer: ReturnType<typeof setTimeout> | undefined;
175
-
176
- const clearReloadWatchdog = () => {
177
- if (reloadWatchdogTimer !== undefined) {
178
- clearTimeout(reloadWatchdogTimer);
179
- reloadWatchdogTimer = undefined;
180
- }
181
- };
182
-
183
- const beginApplyingUpdate = (): number => {
184
- clearReloadWatchdog();
185
- sharedState.applyingUpdate = true;
186
- return ++applyingUpdateGeneration;
187
- };
188
-
189
- const ownsApplyingUpdate = (generation: number): boolean =>
190
- generation === applyingUpdateGeneration && sharedState.applyingUpdate;
191
-
192
- const finishApplyingUpdate = (generation: number): boolean => {
193
- if (!ownsApplyingUpdate(generation)) {
194
- return false;
195
- }
196
- clearReloadWatchdog();
197
- sharedState.applyingUpdate = false;
198
- return true;
199
- };
200
-
201
- const invalidateApplyingUpdate = () => {
202
- applyingUpdateGeneration++;
203
- clearReloadWatchdog();
204
- sharedState.applyingUpdate = false;
205
- };
206
-
207
- const armReloadWatchdog = (generation: number, onTimeout: () => void) => {
208
- if (!ownsApplyingUpdate(generation)) {
209
- return;
210
- }
211
- clearReloadWatchdog();
212
- const timer = setTimeout(() => {
213
- // A cancelled callback may already be queued; both identities must match.
214
- if (reloadWatchdogTimer !== timer || !ownsApplyingUpdate(generation)) {
215
- return;
216
- }
217
- reloadWatchdogTimer = undefined;
218
- sharedState.applyingUpdate = false;
219
- onTimeout();
220
- }, RELOAD_WATCHDOG_MS);
221
- reloadWatchdogTimer = timer;
222
- };
223
-
224
61
  // The SDK is a process-level singleton: module-level sharedState, the global
225
62
  // i18n locale and the native update state are all per-process, so a second
226
63
  // client would silently share (and fight over) them. Constructing one is a
@@ -228,48 +65,43 @@ const armReloadWatchdog = (generation: number, onTimeout: () => void) => {
228
65
  // client (same type + appKey), which dev fast-refresh triggers legitimately.
229
66
  let activeClient: Pushy | undefined;
230
67
 
231
- const assertHash = (hash: string) => {
232
- if (!sharedState.downloadedHash) {
233
- log(`no downloaded hash yet, ignore switch to ${hash}`);
234
- return;
235
- }
236
- if (hash !== sharedState.downloadedHash) {
237
- log(`use downloaded hash ${sharedState.downloadedHash} first`);
238
- return;
239
- }
240
- return true;
241
- };
242
-
68
+ // The client is a facade: checking (clientCheck), downloading
69
+ // (clientDownload), activation (clientActivation), reporting (clientReporter)
70
+ // and the native config sync (clientNativeConfig) each own their part of the
71
+ // flow; this class owns the options and the process-level singleton, and
72
+ // keeps the public API.
243
73
  // for China users
244
74
  export class Pushy {
245
75
  options: ClientOptions = createDefaultClientOptions();
246
76
  clientType: 'Pushy' | 'Cresc' = 'Pushy';
247
- lastChecking?: number;
248
- lastRespJson?: Promise<CheckResult>;
249
- lastCheckFingerprint?: string;
250
- // Endpoint that most recently served a successful checkUpdate; telemetry
251
- // reuses it instead of re-running the fallback race.
252
- private lastWorkingEndpoint?: string;
253
- private syncedNativeConfigJson?: string;
254
- private pendingNativeConfigJson?: string;
255
- private nativeConfigSyncInFlight = false;
256
- // Config last acknowledged by markJsCheckCompleted.
257
- private jsCheckCompletedConfigJson?: string;
258
- private reportedInvalidUpdates = new Set<string>();
259
- private reportedExceptions = new WeakSet<object>();
260
- private globalErrorCleanup?: () => void;
261
-
262
77
  version = cInfo.rnu;
263
- loggerPromise = (() => {
264
- let resolve: (value?: unknown) => void = () => {};
265
- const promise = new Promise((res) => {
266
- resolve = res;
267
- });
268
- return {
269
- promise,
270
- resolve,
271
- };
272
- })();
78
+
79
+ // `options` is mutated in place, never replaced (see optionsVersion), so
80
+ // the reporter can hold it directly.
81
+ private readonly reporter = new Reporter({
82
+ options: this.options,
83
+ getEffectivePackageVersion: () => this.getEffectivePackageVersion(),
84
+ report: (event) => this.report(event),
85
+ telemetryEndpoint: () =>
86
+ this.checker.lastWorkingEndpoint || this.options.server?.main?.[0],
87
+ });
88
+ private readonly nativeConfig = new NativeConfigSync(this);
89
+ private readonly checker = new Checker(
90
+ this,
91
+ this.reporter,
92
+ this.nativeConfig,
93
+ processState
94
+ );
95
+ private readonly downloader = new Downloader(
96
+ this,
97
+ this.reporter,
98
+ processState
99
+ );
100
+ private readonly activation = new Activation(
101
+ this,
102
+ this.reporter,
103
+ processState
104
+ );
273
105
 
274
106
  constructor(options: ClientOptions, clientType?: 'Pushy' | 'Cresc') {
275
107
  this.clientType = clientType || 'Pushy';
@@ -342,7 +174,7 @@ export class Pushy {
342
174
  ? cloneServerConfig(value as UpdateServerConfig)
343
175
  : value;
344
176
  if (key === 'logger') {
345
- this.loggerPromise.resolve();
177
+ this.reporter.loggerPromise.resolve();
346
178
  }
347
179
  if (key === 'locale') {
348
180
  // The constructor applies the initial locale; a runtime switch (or
@@ -361,163 +193,8 @@ export class Pushy {
361
193
  log('onOptionsChange listener error:', e?.message || e);
362
194
  }
363
195
  }
364
- this.syncAutomaticErrorReporting();
365
- this.syncNativeConfig();
366
- };
367
-
368
- private syncAutomaticErrorReporting = (): void => {
369
- if (this.options.disableTelemetry || this.options.disableErrorReporting) {
370
- this.globalErrorCleanup?.();
371
- return;
372
- }
373
- this.enableErrorReporting();
374
- };
375
-
376
- /** Build the subset of options used by the native cold-start check. */
377
- private getNativeConfig = (): Record<string, unknown> | undefined => {
378
- if (!nativeMethod('syncNativeConfig')) {
379
- // Web, or an older native without the native check.
380
- return undefined;
381
- }
382
- const {
383
- appKey,
384
- server,
385
- updateStrategy,
386
- checkStrategy,
387
- disableNativeCheck,
388
- } = this.options;
389
- if (disableNativeCheck) {
390
- // Explicit opt-out: keep the identity fields so the persisted config
391
- // still describes this app, and let the orchestrators bail on `disabled`
392
- // before any IO.
393
- return { disabled: true, appKey, rnu: cInfo.rnu, rn: cInfo.rn };
394
- }
395
- if (!appKey || !server?.main?.length) {
396
- // Unusable rather than merely absent: the JS check would fail on these
397
- // options too (NO_ENDPOINTS / APPKEY_REQUIRED). The caller turns this
398
- // into an explicit disabled state.
399
- return undefined;
400
- }
401
- // An app that turned automatic checks off (checkStrategy: null) must not
402
- // be handed a version switch it never asked for. The cold-start check
403
- // still runs and still downloads — that is what keeps a bricked device
404
- // rescuable — but activation waits for the JS side, or for the server's
405
- // explicit per-version forceBoot directive (shouldActivateAfterDownload).
406
- const autoCheckEnabled = checkStrategy != null;
407
- return {
408
- appKey,
409
- packageVersion: this.getEffectivePackageVersion(),
410
- endpoints: server.main,
411
- queryUrls: server.queryUrls ?? [],
412
- // The native check may activate a downloaded version (next launch)
413
- // only under the silent strategies; alert-style strategies keep
414
- // activation with the JS side (§6/§10.1).
415
- afterDownload:
416
- autoCheckEnabled &&
417
- (updateStrategy === 'silentAndNow' ||
418
- updateStrategy === 'silentAndLater')
419
- ? 'setNeedUpdate'
420
- : 'none',
421
- rnu: cInfo.rnu,
422
- rn: cInfo.rn,
423
- };
424
- };
425
-
426
- private getNativeConfigJson = (): string | undefined => {
427
- const config = this.getNativeConfig();
428
- return config ? JSON.stringify(config) : undefined;
429
- };
430
-
431
- private flushNativeConfig = () => {
432
- if (this.options.nativeConfigSource === 'native') {
433
- this.pendingNativeConfigJson = undefined;
434
- this.syncedNativeConfigJson = undefined;
435
- return;
436
- }
437
- const sync = nativeMethod('syncNativeConfig');
438
- if (!sync || this.nativeConfigSyncInFlight) {
439
- return;
440
- }
441
- const configJson = this.pendingNativeConfigJson;
442
- this.pendingNativeConfigJson = undefined;
443
- if (!configJson || configJson === this.syncedNativeConfigJson) {
444
- return;
445
- }
446
- this.nativeConfigSyncInFlight = true;
447
- sync(configJson)
448
- .then(() => {
449
- // A switch to 'native' while this write was in flight hands storage
450
- // to the host; remembering the write would skip it after switching
451
- // back.
452
- if (this.options.nativeConfigSource !== 'native') {
453
- this.syncedNativeConfigJson = configJson;
454
- }
455
- })
456
- .catch((e: any) => {
457
- log('syncNativeConfig failed:', e?.message || e);
458
- })
459
- .finally(() => {
460
- this.nativeConfigSyncInFlight = false;
461
- this.flushNativeConfig();
462
- });
463
- };
464
-
465
- /**
466
- * Tell the native cold-start orchestrator that this process already holds a
467
- * valid check response for the current config, so its delayed round (5s
468
- * after launch) does not repeat the request. Fire-and-forget: a failure
469
- * costs one duplicate check. Never called on a failed check — the native
470
- * rescue must keep running when JS could not reach the server.
471
- */
472
- private markJsCheckCompleted = () => {
473
- const markCompleted = nativeMethod('markJsCheckCompleted');
474
- if (!markCompleted) {
475
- return;
476
- }
477
- const configJson = this.getNativeConfigJson();
478
- if (!configJson || configJson === this.jsCheckCompletedConfigJson) {
479
- return;
480
- }
481
- markCompleted(configJson).then(
482
- () => {
483
- this.jsCheckCompletedConfigJson = configJson;
484
- },
485
- (e: any) => {
486
- log('markJsCheckCompleted failed:', e?.message || e);
487
- }
488
- );
489
- };
490
-
491
- private syncNativeConfig = () => {
492
- if (this.options.nativeConfigSource === 'native') {
493
- // The host owns the stored config now; forget what JS last wrote so a
494
- // switch back to 'javascript' writes again instead of deduping
495
- // against a value native storage no longer holds.
496
- this.pendingNativeConfigJson = undefined;
497
- this.syncedNativeConfigJson = undefined;
498
- return;
499
- }
500
- if (!nativeMethod('syncNativeConfig')) {
501
- return;
502
- }
503
- const configJson = this.getNativeConfigJson();
504
- if (!configJson) {
505
- // No usable config (empty appKey / no endpoints) is almost always a
506
- // transient state while options are being assembled. Persisting a
507
- // disabled config over the last good one would switch off the
508
- // cold-start rescue for every later launch, so keep what native has.
509
- // (Web and older natives never reach this point — no method.)
510
- log('native check config unusable, keeping the last synced config');
511
- return;
512
- }
513
- // Always record the latest desired value, even when it matches the last
514
- // completed write. Example: A synced -> B in flight -> options revert to
515
- // A. Comparing only with synced(A) would drop the revert and leave native
516
- // storage at B after that in-flight write completes.
517
- // Coalesce rapid setOptions calls, but serialize bridge writes so an older
518
- // completion can never overwrite the newest desired configuration.
519
- this.pendingNativeConfigJson = configJson;
520
- this.flushNativeConfig();
196
+ this.reporter.syncAutomaticErrorReporting();
197
+ this.nativeConfig.syncNativeConfig();
521
198
  };
522
199
 
523
200
  /** Package version used by every server-side update decision. */
@@ -554,474 +231,6 @@ export class Pushy {
554
231
  return i18n.t(key as any, values);
555
232
  };
556
233
 
557
- reportInvalidUpdateOnce = (
558
- reason: 'missingHash' | 'noArtifact',
559
- hash = ''
560
- ) => {
561
- const key = `${this.options.appKey}:${reason}:${hash}`;
562
- if (this.reportedInvalidUpdates.has(key)) {
563
- return;
564
- }
565
- this.reportedInvalidUpdates.add(key);
566
- this.report({
567
- type: 'errorUpdate',
568
- message:
569
- reason === 'missingHash'
570
- ? 'update response is missing a version hash'
571
- : 'update response contains no downloadable artifact',
572
- ...(hash ? { data: { newVersion: hash } } : {}),
573
- });
574
- };
575
-
576
- /**
577
- * Best-effort JS exception reporting for the currently running OTA release.
578
- * It is intentionally synchronous to call and never throws; the transport
579
- * runs in the background and preserves the app's existing error flow.
580
- */
581
- captureException = (
582
- error: unknown,
583
- context: ErrorReportContext = {}
584
- ): void => {
585
- try {
586
- if (
587
- __DEV__ ||
588
- this.options.disableTelemetry ||
589
- this.options.disableErrorReporting ||
590
- !currentVersion
591
- ) {
592
- return;
593
- }
594
- if (
595
- error !== null &&
596
- (typeof error === 'object' || typeof error === 'function')
597
- ) {
598
- const object = error as object;
599
- if (this.reportedExceptions.has(object)) {
600
- return;
601
- }
602
- this.reportedExceptions.add(object);
603
- }
604
- this.postReport({
605
- type: 'js_exception',
606
- hash: currentVersion,
607
- error: serializeException(error, context),
608
- });
609
- } catch (e: any) {
610
- log('exception telemetry error:', e?.message || e);
611
- }
612
- };
613
-
614
- /**
615
- * Ensure uncaught JS exception capture is installed and return a runtime
616
- * cleanup function. Capture is installed automatically by default; this
617
- * method remains an idempotent compatibility hook. The wrapper always
618
- * chains the handler that was installed before it and only restores that
619
- * handler when no later integration has replaced ours.
620
- */
621
- enableErrorReporting = (
622
- options: ErrorReportingOptions = {}
623
- ): (() => void) => {
624
- if (
625
- options.captureGlobal === false ||
626
- this.options.disableTelemetry ||
627
- this.options.disableErrorReporting
628
- ) {
629
- return () => {};
630
- }
631
- if (this.globalErrorCleanup) {
632
- return this.globalErrorCleanup;
633
- }
634
- const uninstall = installGlobalErrorHandler((error, isFatal) => {
635
- this.captureException(error, { fatal: isFatal === true });
636
- });
637
- let active = true;
638
- const cleanup = () => {
639
- if (!active) {
640
- return;
641
- }
642
- active = false;
643
- uninstall();
644
- if (this.globalErrorCleanup === cleanup) {
645
- this.globalErrorCleanup = undefined;
646
- }
647
- };
648
- this.globalErrorCleanup = cleanup;
649
- return cleanup;
650
- };
651
-
652
- report = async ({ type, message = '', code, data = {} }: ReportEvent) => {
653
- log(`${type} ${code ? `[${code}] ` : ''}${message}`);
654
- // Fire-and-forget server telemetry; must not wait for the logger below.
655
- this.reportToServer({ type, message, code, data });
656
- if (this.options.logger === noop) {
657
- // Wait briefly for a logger to arrive via setOptions (e.g. the rollback
658
- // report fires in the constructor before the user configures one), but
659
- // give up after a bound instead of retaining the closure forever when
660
- // no logger is ever provided.
661
- let timer: ReturnType<typeof setTimeout> | undefined;
662
- await Promise.race([
663
- this.loggerPromise.promise,
664
- new Promise<void>((resolve) => {
665
- timer = setTimeout(() => resolve(), 10 * 1000);
666
- }),
667
- ]);
668
- clearTimeout(timer);
669
- }
670
- const { logger = noop, appKey } = this.options;
671
- const overridePackageVersion = this.options.overridePackageVersion;
672
- try {
673
- logger({
674
- type,
675
- data: {
676
- appKey,
677
- currentVersion,
678
- cInfo,
679
- packageVersion,
680
- overridePackageVersion,
681
- buildTime,
682
- message,
683
- code,
684
- ...currentVersionInfo,
685
- ...data,
686
- },
687
- });
688
- } catch (e: any) {
689
- // A user-provided logger must never break the update flow, and report()
690
- // calls are fire-and-forget so a throw here would be an unhandled
691
- // rejection.
692
- log('logger error:', e?.message || e);
693
- }
694
- };
695
- /**
696
- * Best-effort lifecycle event reporting to the update server (aggregate
697
- * counts + sampled failure details power the version health view and the
698
- * rollback safety net server-side). Single POST to the last known working
699
- * endpoint, no retry, no fallback race; any failure is swallowed — telemetry
700
- * must never affect the update flow. Opt out with disableTelemetry.
701
- */
702
- private reportToServer = ({
703
- type,
704
- message,
705
- code,
706
- data = {},
707
- }: ReportEvent) => {
708
- try {
709
- if (__DEV__ || this.options.disableTelemetry) {
710
- return;
711
- }
712
- const serverType = resolveServerEventType(type, code);
713
- if (!serverType) {
714
- return;
715
- }
716
- const hash = resolveServerEventHash({ serverType, data, currentVersion });
717
- if (!hash) {
718
- return;
719
- }
720
- // A download rescued by a later strategy reports its patch-health
721
- // signal through downloadFallback, which only counts patch-apply
722
- // failures; downloadSuccess's data.error (any earlier failure, network
723
- // errors included) stays local.
724
- this.postReport({
725
- type: serverType,
726
- hash,
727
- detail: truncateDetail(message),
728
- });
729
- } catch (e: any) {
730
- log('telemetry error:', e?.message || e);
731
- }
732
- };
733
- /**
734
- * The single telemetry POST ({endpoint}/report/{appKey}) to the last known
735
- * working endpoint; no retry, failures only logged.
736
- */
737
- private postReport = ({
738
- type,
739
- hash,
740
- ...payload
741
- }: {
742
- type: string;
743
- hash: string;
744
- detail?: string;
745
- error?: SerializedException;
746
- }) => {
747
- const { appKey } = this.options;
748
- const endpoint = this.lastWorkingEndpoint || this.options.server?.main?.[0];
749
- if (!appKey || !endpoint) {
750
- return;
751
- }
752
- fetchWithTimeout(`${endpoint}/report/${appKey}`, {
753
- method: 'POST',
754
- headers: { 'Content-Type': 'application/json' },
755
- body: JSON.stringify({
756
- type,
757
- hash,
758
- packageVersion: this.getEffectivePackageVersion(),
759
- cInfo,
760
- ...payload,
761
- }),
762
- }).catch((e: any) => {
763
- log('telemetry report failed:', e?.message || e);
764
- });
765
- };
766
- throwIfEnabled = (e: Error) => {
767
- if (this.options.throwError) {
768
- throw e;
769
- }
770
- };
771
- private errorListeners = new Set<UpdateErrorListener>();
772
- private emittedErrors = new WeakSet<Error>();
773
- /**
774
- * Subscribe to every error the client reports (regardless of throwError).
775
- * Returns an unsubscribe function.
776
- */
777
- onError = (listener: UpdateErrorListener) => {
778
- this.errorListeners.add(listener);
779
- return () => {
780
- this.errorListeners.delete(listener);
781
- };
782
- };
783
- /**
784
- * Whether this exact error object already went through emitError (and was
785
- * therefore delivered to onError subscribers). Lets UI layers decide if a
786
- * caught error still needs surfacing — checking `e.code` is not enough,
787
- * since axios/system errors carry their own code without ever entering the
788
- * pipeline.
789
- */
790
- wasEmitted = (e: unknown): boolean =>
791
- e instanceof Error && this.emittedErrors.has(e);
792
- /**
793
- * Single exit point for errors: reports to the logger (with the stable
794
- * code) and notifies onError listeners. Whether to also throw stays with
795
- * the caller (throwIfEnabled or an unconditional rethrow).
796
- */
797
- private emitError = (
798
- error: UpdateError,
799
- type: EventType,
800
- {
801
- message = error.message,
802
- data,
803
- }: { message?: string; data?: Record<string, string | number> } = {}
804
- ) => {
805
- this.emittedErrors.add(error);
806
- this.report({
807
- type,
808
- message,
809
- code: error.code,
810
- // Structured context from the error (e.g. HTTP status) reaches the
811
- // logger; explicit data wins on key conflicts.
812
- data: error.extra ? { ...error.extra, ...data } : data,
813
- });
814
- for (const listener of this.errorListeners) {
815
- try {
816
- listener(error, type);
817
- } catch (e: any) {
818
- log('onError listener error:', e?.message || e);
819
- }
820
- }
821
- };
822
- /**
823
- * toUpdateError + emitError: how a caught failure leaves the client.
824
- * Returns the error for the caller to throw or pass to throwIfEnabled.
825
- * `fallbackMessage` is reported when the error has no message of its own.
826
- */
827
- private fail = (
828
- e: unknown,
829
- code: UpdateErrorCode,
830
- type: EventType,
831
- {
832
- message,
833
- fallbackMessage,
834
- data,
835
- }: {
836
- message?: string;
837
- fallbackMessage?: string;
838
- data?: Record<string, string | number>;
839
- } = {}
840
- ): UpdateError => {
841
- const err = toUpdateError(e, code);
842
- this.emitError(err, type, {
843
- message: message ?? (err.message || fallbackMessage),
844
- data,
845
- });
846
- return err;
847
- };
848
- notifyAfterCheckUpdate = (state: UpdateCheckState) => {
849
- const { afterCheckUpdate } = this.options;
850
- if (!afterCheckUpdate) {
851
- return;
852
- }
853
- // 这里仅做状态通知,不阻塞原有检查流程
854
- Promise.resolve(afterCheckUpdate(state)).catch((error: any) => {
855
- log('afterCheckUpdate failed:', error?.message || error);
856
- });
857
- };
858
- runBeforeReload = async (context: BeforeReloadContext) => {
859
- const { beforeReload } = this.options;
860
- if (!beforeReload) {
861
- return true;
862
- }
863
- const shouldReload = await beforeReload(context);
864
- if (shouldReload === false) {
865
- log('beforeReload returned false, skipping reload');
866
- return false;
867
- }
868
- return true;
869
- };
870
- // server.main is deduplicated on assignment (cloneServerConfig), and the
871
- // endpoint plan dedupes again anyway.
872
- getConfiguredCheckEndpoints = () => this.options.server?.main ?? [];
873
- getRemoteEndpoints = async () => {
874
- const { server } = this.options;
875
- if (!server?.queryUrls?.length) {
876
- return [];
877
- }
878
- try {
879
- // Race the parsed lists, not the raw responses: fetch resolves for
880
- // 404/403/5xx and anti-bot HTML too, and this path only runs once the
881
- // main endpoints are already failing — a mirror that answers first
882
- // with an error page must not beat the healthy one.
883
- const remoteEndpoints = await promiseAny(
884
- server.queryUrls.map(async (queryUrl) => {
885
- const resp = await fetchWithTimeout(queryUrl, {});
886
- if (!resp.ok) {
887
- throw Error(`${queryUrl}: ${resp.status}`);
888
- }
889
- const list: unknown = await resp.json();
890
- if (!Array.isArray(list)) {
891
- throw Error(`${queryUrl}: not an endpoint list`);
892
- }
893
- return list;
894
- })
895
- );
896
- log('fetch endpoints:', remoteEndpoints);
897
- // Configured and already-failed endpoints are dropped by the endpoint
898
- // fallback itself.
899
- return dedupeEndpoints(
900
- remoteEndpoints.filter(
901
- // The list is fetched from a public mirror; it may add endpoints
902
- // but never move the check outside TLS.
903
- (endpoint): endpoint is string =>
904
- typeof endpoint === 'string' && /^https:\/\//i.test(endpoint)
905
- )
906
- );
907
- } catch (e) {
908
- log('failed to fetch endpoints from: ', server.queryUrls, e);
909
- }
910
- return [];
911
- };
912
- requestCheckResult = async (
913
- endpoint: string,
914
- fetchPayload: Parameters<typeof fetch>[1],
915
- signal?: AbortSignal
916
- ): Promise<CheckResult> => {
917
- try {
918
- const resp = await fetchWithTimeout(
919
- `${endpoint}/checkUpdate/${this.options.appKey}`,
920
- fetchPayload,
921
- DEFAULT_FETCH_TIMEOUT_MS,
922
- signal
923
- );
924
-
925
- if (!resp.ok) {
926
- const respText = (await resp.text()).slice(0, MAX_HTTP_ERROR_TEXT);
927
- throw new UpdateError(
928
- this.t('error_http_status', {
929
- status: resp.status,
930
- statusText: respText,
931
- }),
932
- 'HTTP_STATUS',
933
- { extra: { status: resp.status } }
934
- );
935
- }
936
-
937
- const result: unknown = await resp.json();
938
- if (!isValidCheckResult(result)) {
939
- // A 2xx that is not a verdict (`{"error": ...}`, a captive-portal
940
- // page that parsed, ...) is a failed endpoint: throwing keeps the
941
- // fallback moving to the next one instead of treating it as "no
942
- // update".
943
- throw new UpdateError(
944
- this.t('error_invalid_check_response'),
945
- 'INVALID_RESPONSE'
946
- );
947
- }
948
- return result;
949
- } catch (e) {
950
- log('check endpoint failed', endpoint, e);
951
- throw e;
952
- }
953
- };
954
- fetchCheckResult = async (fetchPayload: Parameters<typeof fetch>[1]) => {
955
- const { endpoint, value } = await executeEndpointFallback<CheckResult>({
956
- configuredEndpoints: this.getConfiguredCheckEndpoints(),
957
- getRemoteEndpoints: this.getRemoteEndpoints,
958
- tryEndpoint: (currentEndpoint, signal) =>
959
- this.requestCheckResult(currentEndpoint, fetchPayload, signal),
960
- onFirstFailure: ({ error }) => {
961
- this.report({
962
- type: 'errorChecking',
963
- message: this.t('error_cannot_connect_backup', {
964
- message: error.message,
965
- }),
966
- });
967
- },
968
- });
969
-
970
- log('check endpoint success', endpoint);
971
- this.lastWorkingEndpoint = endpoint;
972
- return value;
973
- };
974
- /**
975
- * Reuse the native cold-start check's cached response when fresh
976
- * (NATIVE_CHECKUPDATE_DESIGN §10.3) instead of re-checking. Returns
977
- * undefined whenever the cache is absent, stale, or unreadable — any
978
- * failure falls through to a normal network check.
979
- */
980
- private readNativeCheckCache = async (
981
- requestBody: Record<string, any>
982
- ): Promise<CheckResult | undefined> => {
983
- try {
984
- const getCache = nativeMethod('getNativeCheckCache');
985
- if (__DEV__ || nativeCheckCacheExhausted || !getCache) {
986
- return undefined;
987
- }
988
- const raw = await getCache();
989
- if (!raw || typeof raw !== 'string') {
990
- nativeCheckCacheExhausted = true;
991
- return undefined;
992
- }
993
- const entry = JSON.parse(raw);
994
- // Age first: it is the common miss and needs no further parsing.
995
- const ageSeconds =
996
- typeof entry?.ts === 'number' ? Date.now() / 1000 - entry.ts : NaN;
997
- if (!(ageSeconds >= 0 && ageSeconds <= NATIVE_CHECK_CACHE_MAX_AGE_S)) {
998
- nativeCheckCacheExhausted = true;
999
- return undefined;
1000
- }
1001
- const configJson = this.getNativeConfigJson();
1002
- if (
1003
- typeof entry.body !== 'string' ||
1004
- typeof entry.request !== 'string' ||
1005
- typeof entry.config !== 'string' ||
1006
- !configJson ||
1007
- !nativeConfigsEquivalent(entry.config, configJson) ||
1008
- !jsonDeepEqual(JSON.parse(entry.request), requestBody)
1009
- ) {
1010
- return undefined;
1011
- }
1012
- const result: unknown = JSON.parse(entry.body);
1013
- // Same schema gate as the network path: a native old enough to have
1014
- // cached a 200 `{"error": ...}` must not turn it into "no update".
1015
- if (!isValidCheckResult(result)) {
1016
- return undefined;
1017
- }
1018
- log('reusing native check response cache');
1019
- return result;
1020
- } catch {
1021
- return undefined;
1022
- }
1023
- };
1024
-
1025
234
  assertDebug = (matter: string) => {
1026
235
  if (__DEV__ && !this.options.debug) {
1027
236
  info(this.t('dev_debug_disabled', { matter }));
@@ -1029,710 +238,84 @@ export class Pushy {
1029
238
  }
1030
239
  return true;
1031
240
  };
1032
- markSuccess = async () => {
1033
- if (sharedState.marked || __DEV__ || !isFirstTime) {
1034
- return;
1035
- }
1036
- // Concurrent callers (auto mark + an explicit call) would all pass the
1037
- // check above before the first native call settles: share it.
1038
- if (!markingPromise) {
1039
- const promise = this.performMarkSuccess().finally(() => {
1040
- if (markingPromise === promise) {
1041
- markingPromise = undefined;
1042
- }
1043
- });
1044
- markingPromise = promise;
1045
- }
1046
- return markingPromise;
1047
- };
1048
- private performMarkSuccess = async () => {
1049
- try {
1050
- await Promise.resolve(PushyModule.markSuccess());
1051
- } catch (e) {
1052
- throw this.fail(e, 'MARK_SUCCESS_FAILED', 'errorMarkSuccess');
1053
- }
1054
- sharedState.marked = true;
1055
- this.report({ type: 'markSuccess' });
1056
- // 救砖回执:这个版本是被救援通道送进来的,且活过了健康确认——遥测里
1057
- // 一条 rescue 回执就是"这台设备被捞回来了"的证据。
1058
- if (currentVersionInfo.forceBootRescue) {
1059
- this.report({ type: 'forceBootRescue' });
1060
- }
1061
- if (currentVersionInfo.crashRescue) {
1062
- this.report({ type: 'crashRescue' });
1063
- }
1064
- };
241
+ // --- Reporting (clientReporter) ---
242
+ get loggerPromise() {
243
+ return this.reporter.loggerPromise;
244
+ }
245
+ report = (event: ReportEvent) => this.reporter.report(event);
246
+ reportInvalidUpdateOnce: Reporter['reportInvalidUpdateOnce'] = (...args) =>
247
+ this.reporter.reportInvalidUpdateOnce(...args);
248
+ captureException: Reporter['captureException'] = (...args) =>
249
+ this.reporter.captureException(...args);
250
+ enableErrorReporting: Reporter['enableErrorReporting'] = (...args) =>
251
+ this.reporter.enableErrorReporting(...args);
252
+ throwIfEnabled = (e: Error) => this.reporter.throwIfEnabled(e);
253
+ onError: Reporter['onError'] = (listener) => this.reporter.onError(listener);
254
+ wasEmitted = (e: unknown): boolean => this.reporter.wasEmitted(e);
255
+ private emitError: Reporter['emitError'] = (...args) =>
256
+ this.reporter.emitError(...args);
257
+ notifyAfterCheckUpdate: Reporter['notifyAfterCheckUpdate'] = (state) =>
258
+ this.reporter.notifyAfterCheckUpdate(state);
259
+
260
+ // --- Checking (clientCheck) ---
261
+ get lastChecking() {
262
+ return this.checker.lastChecking;
263
+ }
264
+ set lastChecking(value) {
265
+ this.checker.lastChecking = value;
266
+ }
267
+ get lastRespJson() {
268
+ return this.checker.lastRespJson;
269
+ }
270
+ set lastRespJson(value) {
271
+ this.checker.lastRespJson = value;
272
+ }
273
+ get lastCheckFingerprint() {
274
+ return this.checker.lastCheckFingerprint;
275
+ }
276
+ set lastCheckFingerprint(value) {
277
+ this.checker.lastCheckFingerprint = value;
278
+ }
279
+ getConfiguredCheckEndpoints = () =>
280
+ this.checker.getConfiguredCheckEndpoints();
281
+ getRemoteEndpoints = () => this.checker.getRemoteEndpoints();
282
+ requestCheckResult: Checker['requestCheckResult'] = (...args) =>
283
+ this.checker.requestCheckResult(...args);
284
+ fetchCheckResult: Checker['fetchCheckResult'] = (fetchPayload) =>
285
+ this.checker.fetchCheckResult(fetchPayload);
286
+ checkUpdate: Checker['checkUpdate'] = (extra) =>
287
+ this.checker.checkUpdate(extra);
288
+
289
+ // --- Downloading (clientDownload) ---
290
+ downloadUpdate: Downloader['downloadUpdate'] = (...args) =>
291
+ this.downloader.downloadUpdate(...args);
292
+ downloadAndInstallApk: Downloader['downloadAndInstallApk'] = (...args) =>
293
+ this.downloader.downloadAndInstallApk(...args);
294
+
295
+ // --- Activation (clientActivation) ---
296
+ runBeforeReload: Activation['runBeforeReload'] = (context) =>
297
+ this.activation.runBeforeReload(context);
298
+ markSuccess = () => this.activation.markSuccess();
299
+ /** The downloaded version switchVersion(Later) accepts; undefined before a download. */
300
+ getDownloadedHash = (): string | undefined =>
301
+ this.activation.getDownloadedHash();
1065
302
  /**
1066
303
  * Reload into a downloaded version. Resolves true once the native reload
1067
304
  * was requested, false when the call was ignored (not the downloaded hash,
1068
305
  * a switch already in progress, beforeReload declined, dev without debug).
1069
306
  */
1070
- switchVersion = async (hash: string): Promise<boolean> => {
1071
- if (!this.assertDebug('switchVersion()')) {
1072
- return false;
1073
- }
1074
- if (!assertHash(hash)) {
1075
- return false;
1076
- }
1077
- if (sharedState.applyingUpdate) {
1078
- log(`switchVersion: ${hash} ignored, a switch is already in progress`);
1079
- return false;
1080
- }
1081
- log(`switchVersion: ${hash}`);
1082
- const applyingGeneration = beginApplyingUpdate();
1083
- try {
1084
- if (!(await this.runBeforeReload({ type: 'switchVersion', hash }))) {
1085
- finishApplyingUpdate(applyingGeneration);
1086
- return false;
1087
- }
1088
- } catch (e) {
1089
- // Release before emitting: an onError listener may retry right away.
1090
- finishApplyingUpdate(applyingGeneration);
1091
- // A throw from the user's beforeReload hook is business-code failure,
1092
- // not an update-pipeline one: give it a distinct code so telemetry
1093
- // excludes it from the server-side patch-health stats.
1094
- throw this.fail(e, 'USER_HOOK_ERROR', 'errorSwitchVersion', {
1095
- data: { newVersion: hash },
1096
- });
1097
- }
1098
- // resetToPackagedBundle may have completed while beforeReload awaited.
1099
- if (!ownsApplyingUpdate(applyingGeneration)) {
1100
- return false;
1101
- }
1102
- try {
1103
- await PushyModule.reloadUpdate({ hash });
1104
- } catch (e) {
1105
- // Do not let a superseded rejection clear a newer switch.
1106
- finishApplyingUpdate(applyingGeneration);
1107
- throw this.fail(e, 'SWITCH_VERSION_FAILED', 'errorSwitchVersion', {
1108
- data: { newVersion: hash },
1109
- });
1110
- }
1111
- // A resolved reloadUpdate normally tears this JS context down right away.
1112
- // iOS has been seen resolving without restarting (89c638e); a stuck
1113
- // applyingUpdate would then silently swallow every later switchVersion,
1114
- // so release it once the process has outlived the reload and tell the
1115
- // logger (RESTART_FAILED: restart mechanics, not patch health).
1116
- armReloadWatchdog(applyingGeneration, () => {
1117
- this.report({
1118
- type: 'errorSwitchVersion',
1119
- code: 'RESTART_FAILED',
1120
- message: 'reloadUpdate resolved but the app did not restart',
1121
- data: { newVersion: hash },
1122
- });
1123
- });
1124
- return true;
1125
- };
1126
-
1127
- switchVersionLater = async (hash: string) => {
1128
- if (!this.assertDebug('switchVersionLater()')) {
1129
- return;
1130
- }
1131
- if (assertHash(hash)) {
1132
- log(`switchVersionLater: ${hash}`);
1133
- try {
1134
- return await PushyModule.setNeedUpdate({ hash });
1135
- } catch (e) {
1136
- throw this.fail(e, 'SWITCH_VERSION_FAILED', 'errorSwitchVersion', {
1137
- data: { newVersion: hash },
1138
- });
1139
- }
1140
- }
1141
- };
1142
- checkUpdate = async (extra?: Record<string, any>) => {
1143
- if (!this.assertDebug('checkUpdate()')) {
1144
- this.notifyAfterCheckUpdate({ status: 'skipped' });
1145
- return;
1146
- }
1147
- if (!assertWeb()) {
1148
- this.notifyAfterCheckUpdate({ status: 'skipped' });
1149
- return;
1150
- }
1151
- if (
1152
- this.options.beforeCheckUpdate &&
1153
- (await this.options.beforeCheckUpdate()) === false
1154
- ) {
1155
- log('beforeCheckUpdate returned false, skipping check');
1156
- this.notifyAfterCheckUpdate({ status: 'skipped' });
1157
- return;
1158
- }
1159
- // 内容寻址的二进制身份,服务端据此精确判定 pdiff 适用性(取代 buildTime
1160
- // 启发式)。同步读 core 里已预取的值:还没算完就省略字段(服务端回退
1161
- // buildTime 启发式),下一次检查自然带上——绝不为它 await、拖慢或复杂化
1162
- // 检查流程。
1163
- const bundleHash = __DEV__ ? '' : getBundleHash();
1164
- const fetchBody = buildCheckRequestBody({
1165
- packageVersion: this.getEffectivePackageVersion(),
1166
- currentVersion,
1167
- buildTime,
1168
- cInfo,
1169
- supportedDiffVersion,
1170
- bundleHash,
1171
- isDev: __DEV__,
1172
- extra,
1173
- });
1174
- const stringifyBody = JSON.stringify(fetchBody);
1175
- // Identity of this check: only a check with the exact same request (same
1176
- // extra / test hash / bundleHash / binary identity) against the same
1177
- // endpoint set may share an in-flight or just-settled response. Two
1178
- // checks 2s apart with different `extra` are different questions.
1179
- const fingerprint = buildCheckFingerprint({
1180
- appKey: this.options.appKey,
1181
- endpoints: this.options.server?.main,
1182
- queryUrls: this.options.server?.queryUrls,
1183
- body: stringifyBody,
1184
- });
1185
- const now = Date.now();
1186
- if (
1187
- this.lastRespJson &&
1188
- this.lastChecking &&
1189
- this.lastCheckFingerprint === fingerprint &&
1190
- now - this.lastChecking < 1000 * 5
1191
- ) {
1192
- try {
1193
- const result = await this.lastRespJson;
1194
- this.notifyAfterCheckUpdate({ status: 'completed', result });
1195
- return result;
1196
- } catch (e: any) {
1197
- // The shared in-flight check failed. Its initiating call reports it
1198
- // through emitError/throw; this call must still honor its own
1199
- // contract — afterCheckUpdate always fires and throwError applies —
1200
- // without double-reporting the same error.
1201
- const err = toUpdateError(e, 'CHECK_FAILED');
1202
- this.notifyAfterCheckUpdate({ status: 'error', error: err });
1203
- this.throwIfEnabled(err);
1204
- return undefined;
1205
- }
1206
- }
1207
- this.lastChecking = now;
1208
- this.lastCheckFingerprint = fingerprint;
1209
- // harmony fetch body is not string
1210
- let body: any = fetchBody;
1211
- if (Platform.OS === 'ios' || Platform.OS === 'android') {
1212
- body = stringifyBody;
1213
- }
1214
- const fetchPayload = {
1215
- method: 'POST',
1216
- headers: {
1217
- Accept: 'application/json',
1218
- 'Content-Type': 'application/json',
1219
- },
1220
- body,
1221
- };
1222
- let respJsonPromise: Promise<CheckResult> | undefined;
1223
- try {
1224
- this.report({
1225
- type: 'checking',
1226
- message: `${this.options.appKey}: ${stringifyBody}`,
1227
- });
1228
- // The native cold-start check may have a fresh response on disk
1229
- // (§10.3); reuse it instead of re-checking. The read happens INSIDE
1230
- // the promise so no await lands between the dedup window above and the
1231
- // lastRespJson assignment below (the JS2-1 double-send lesson).
1232
- respJsonPromise = (async (): Promise<CheckResult> => {
1233
- // While bundleHash prefetch is still pending, the JS request omits
1234
- // that key whereas the native request always includes its synchronously
1235
- // computed value. That narrow first-launch window intentionally misses
1236
- // the cache rather than delaying checkUpdate for hashing.
1237
- const cached = await this.readNativeCheckCache(fetchBody);
1238
- return cached ?? (await this.fetchCheckResult(fetchPayload));
1239
- })();
1240
- this.lastRespJson = respJsonPromise;
1241
- const result: CheckResult = await respJsonPromise;
1242
-
1243
- log('checking result:', result);
1244
-
1245
- if (result?.bundleStatus === 'unknownBundle') {
1246
- // 服务端判定当前二进制内嵌 bundle 未注册,增量已被降级为全量。只面向
1247
- // 开发者(日志 + 遥测,控制台聚合是主渠道);终端用户无感知。
1248
- warn(this.t('warn_unknown_bundle'));
1249
- this.report({
1250
- type: 'bundleMismatch',
1251
- data: bundleHash ? { bundleHash } : {},
1252
- });
1253
- }
1254
-
1255
- this.notifyAfterCheckUpdate({ status: 'completed', result });
1256
- this.markJsCheckCompleted();
1257
- return result;
1258
- } catch (e: any) {
1259
- // A failed check must not keep vouching for an older response: clear
1260
- // the dedup slot so the next call re-asks the server — unless a newer
1261
- // check already owns the slot, which this failure says nothing about.
1262
- if (this.lastRespJson === respJsonPromise) {
1263
- this.lastRespJson = undefined;
1264
- this.lastCheckFingerprint = undefined;
1265
- }
1266
- const err = this.fail(e, 'CHECK_FAILED', 'errorChecking', {
1267
- fallbackMessage: this.t('error_cannot_connect_server'),
1268
- });
1269
- this.notifyAfterCheckUpdate({ status: 'error', error: err });
1270
- this.throwIfEnabled(err);
1271
- // No silent fallback to a previous successful response: a stale result
1272
- // would let a server outage look like "still updatable" and drive the
1273
- // provider's auto-download off it. Return undefined so callers can
1274
- // distinguish "check failed" from a real empty result and keep their
1275
- // last good updateInfo.
1276
- return undefined;
1277
- }
1278
- };
1279
- downloadUpdate = async (
1280
- updateInfo: CheckResult,
1281
- onDownloadProgress?: (data: ProgressData) => void
1282
- ) => {
1283
- if (
1284
- this.options.beforeDownloadUpdate &&
1285
- (await this.options.beforeDownloadUpdate(updateInfo)) === false
1286
- ) {
1287
- log('beforeDownloadUpdate returned false, skipping download');
1288
- return;
1289
- }
1290
- const decision = decideDownload(
1291
- updateInfo,
1292
- { currentVersion, rolledBackVersion },
1293
- __DEV__
1294
- );
1295
- if (decision.action === 'none') {
1296
- if (decision.reason === 'alreadyCurrent') {
1297
- log(`current hash ${currentVersion}, ignored`);
1298
- } else if (decision.reason === 'rolledBack') {
1299
- log(`rolledback hash ${rolledBackVersion}, ignored`);
1300
- } else if (decision.reason === 'noArtifact') {
1301
- // A server response that advertises an update but provides no usable
1302
- // artifact is a bad release signal, not an ordinary no-update result.
1303
- // Keep the user flow silent and report at most once per bad release in
1304
- // this process: repeated checks must not inflate download_fail health.
1305
- this.reportInvalidUpdateOnce('noArtifact', updateInfo.hash || '');
1306
- }
1307
- return;
1308
- }
1309
- const { hash } = decision;
1310
- if (sharedState.downloadedHash === hash) {
1311
- log(`duplicated downloaded hash ${sharedState.downloadedHash}, ignored`);
1312
- return sharedState.downloadedHash;
1313
- }
1314
- // Deduplicate concurrent downloads of the same hash regardless of whether a
1315
- // progress callback was passed: all callers await the single in-flight
1316
- // promise instead of triggering parallel native downloads.
1317
- const existingTask = sharedState.downloadingTasks[hash];
1318
- if (existingTask) {
1319
- log(`download for hash ${hash} already in progress, reusing it`);
1320
- // The second caller's progress callback must still fire.
1321
- if (onDownloadProgress) {
1322
- sharedState.progressCallbacks[hash]?.add(onDownloadProgress);
1323
- }
1324
- return existingTask;
1325
- }
1326
- const task = this.performDownload(updateInfo, decision, onDownloadProgress);
1327
- sharedState.downloadingTasks[hash] = task;
1328
- try {
1329
- return await task;
1330
- } finally {
1331
- delete sharedState.downloadingTasks[hash];
1332
- }
1333
- };
307
+ switchVersion = (hash: string): Promise<boolean> =>
308
+ this.activation.switchVersion(hash);
309
+ switchVersionLater = (hash: string) =>
310
+ this.activation.switchVersionLater(hash);
311
+ restartApp = () => this.activation.restartApp();
1334
312
  /**
1335
- * Orders candidate mirrors for one artifact: the HEAD-race winner first
1336
- * (its post-redirect URL), then the remaining mirrors in configured order.
1337
- * Empty when there is nothing to try.
313
+ * Reset to the bundle packaged in the binary (see
314
+ * Activation.resetToPackagedBundle). Returns whether the reset happened;
315
+ * a false means the app still runs the hot-updated bundle.
1338
316
  */
1339
- private rankDownloadUrls = async (urls?: string[]): Promise<string[]> => {
1340
- if (!urls?.length) {
1341
- return [];
1342
- }
1343
- const winner = await testUrls(urls);
1344
- const ordered: string[] = [];
1345
- const push = (url?: string | null) => {
1346
- if (url && !ordered.includes(url)) {
1347
- ordered.push(url);
1348
- }
1349
- };
1350
- push(winner);
1351
- for (const url of urls) {
1352
- push(url);
1353
- }
1354
- return ordered;
1355
- };
1356
- private performDownload = async (
1357
- updateInfo: CheckResult,
1358
- plan: DownloadPlan,
1359
- onDownloadProgress?: (data: ProgressData) => void
1360
- ) => {
1361
- const { name, description = '', metaInfo } = updateInfo;
1362
- const { hash, attempts, devNoop } = plan;
1363
- if (devNoop) {
1364
- // Dev without a full package URL: nothing can be fetched, let alone
1365
- // installed. Say so and deliver nothing — faking a success here used to
1366
- // hand the caller a hash whose switchVersion the native side (rightly)
1367
- // rejects with SWITCH_VERSION_FAILED.
1368
- log(this.t('dev_incremental_update_disabled'));
1369
- return;
1370
- }
1371
- const patchStartTime = Date.now();
1372
- // One native listener per hash dispatching to a callback set, so
1373
- // concurrent callers deduped onto this task can each observe progress
1374
- // (they register via downloadUpdate).
1375
- const progressCallbacks = new Set<(data: ProgressData) => void>();
1376
- if (onDownloadProgress) {
1377
- progressCallbacks.add(onDownloadProgress);
1378
- }
1379
- sharedState.progressCallbacks[hash] = progressCallbacks;
1380
- const dispatchProgress = (data: ProgressData) => {
1381
- if (progressCallbacks.size === 0) {
1382
- return;
1383
- }
1384
- const payload = {
1385
- ...data,
1386
- progress: computeProgress(data.received, data.total),
1387
- };
1388
- progressCallbacks.forEach((callback) => {
1389
- // One subscriber throwing must not starve the others or abort the
1390
- // download: business callbacks are isolated, the error is logged.
1391
- try {
1392
- callback(payload);
1393
- } catch (e) {
1394
- warn('onDownloadProgress callback threw', e);
1395
- }
1396
- });
1397
- };
1398
- // RN >= 0.87 types native event listeners as `(...args: readonly Object[])`,
1399
- // which a `(data: ProgressData) => void` callback is not assignable to. Take
1400
- // the raw event and narrow it here so this compiles on every RN version.
1401
- const onNativeProgress = (event: unknown) => {
1402
- const progressData = event as ProgressData;
1403
- if (progressData.hash === hash) {
1404
- dispatchProgress(progressData);
1405
- }
1406
- };
1407
- // @ts-expect-error harmony not in existing platforms
1408
- const isHarmony = Platform.OS === 'harmony';
1409
- const progressSubscription = (
1410
- isHarmony ? DeviceEventEmitter : pushyNativeEventEmitter
1411
- ).addListener('RCTPushyDownloadProgress', onNativeProgress);
1412
- const maxRetries = Math.max(0, Math.floor(this.options.maxRetries ?? 3));
1413
- let succeeded = '';
1414
- let lastError: UpdateError | undefined;
1415
- const errorMessages: string[] = [];
1416
- // A strategy whose bytes arrived but could not be applied fails the same
1417
- // way on every retry (same artifact, same base): remember it — with its
1418
- // message, so the final report still names it — and skip it on later
1419
- // attempts instead of downloading and patching it again.
1420
- const exhaustedStrategies = new Map<DownloadStrategyType, string>();
1421
-
1422
- // The ordered attempts come from decideDownload (the pure decision layer);
1423
- // this side only executes them: probe candidate URLs, run the matching
1424
- // native download, fall through to the next attempt on failure.
1425
- const runners: Record<
1426
- DownloadStrategyType,
1427
- (url: string) => Promise<void>
1428
- > = {
1429
- diff: (url) =>
1430
- PushyModule.downloadPatchFromPpk({
1431
- updateUrl: url,
1432
- hash,
1433
- originHash: currentVersion,
1434
- }),
1435
- pdiff: (url) =>
1436
- PushyModule.downloadPatchFromPackage({
1437
- updateUrl: url,
1438
- hash,
1439
- }),
1440
- full: (url) =>
1441
- PushyModule.downloadFullUpdate({
1442
- updateUrl: url,
1443
- hash,
1444
- }),
1445
- };
1446
- // Mirror ranking per strategy, kept across retry attempts: the HEAD race
1447
- // runs once per strategy per download instead of once per attempt. A
1448
- // winner that failed its download is demoted to the back for the next
1449
- // attempt (every mirror is tried on every attempt anyway).
1450
- const rankedUrls = new Map<DownloadStrategyType, string[]>();
1451
- const errorKeys = {
1452
- diff: 'error_diff_failed',
1453
- pdiff: 'error_pdiff_failed',
1454
- full: 'error_full_patch_failed',
1455
- } as const;
1456
-
1457
- try {
1458
- for (let attempt = 0; attempt <= maxRetries; attempt++) {
1459
- if (attempt > 0) {
1460
- // Exponential backoff with jitter: a bad CDN edge otherwise gets
1461
- // every client back at the same 1/2/4s marks.
1462
- const backoffMs = Math.round(
1463
- Math.min(1000 * 2 ** (attempt - 1), 10000) *
1464
- (0.75 + Math.random() * 0.5)
1465
- );
1466
- log(`retry attempt ${attempt}/${maxRetries}, waiting ${backoffMs}ms`);
1467
- await new Promise<void>((r) => setTimeout(() => r(), backoffMs));
1468
- errorMessages.length = 0;
1469
- errorMessages.push(...exhaustedStrategies.values());
1470
- lastError = undefined;
1471
- succeeded = '';
1472
- }
1473
- this.report({
1474
- type: 'downloading',
1475
- data: {
1476
- newVersion: hash,
1477
- attempt,
1478
- },
1479
- });
1480
- for (const { type, urls } of attempts) {
1481
- if (succeeded) {
1482
- break;
1483
- }
1484
- if (exhaustedStrategies.has(type)) {
1485
- continue;
1486
- }
1487
- // The HEAD race only ranks mirrors; it is not proof that a mirror can
1488
- // serve the whole artifact (CDNs answer HEAD and GET differently, and
1489
- // a transfer can die mid-stream). Every mirror of the same artifact
1490
- // gets a real download attempt before the strategy is abandoned —
1491
- // the native cold-start path already behaves this way.
1492
- let orderedUrls = rankedUrls.get(type);
1493
- if (!orderedUrls) {
1494
- orderedUrls = await this.rankDownloadUrls(urls);
1495
- rankedUrls.set(type, orderedUrls);
1496
- }
1497
- for (const url of orderedUrls) {
1498
- log(`downloading ${type} from ${url}`);
1499
- try {
1500
- await runners[type](url);
1501
- succeeded = type;
1502
- break;
1503
- } catch (e: unknown) {
1504
- // The native rejection's stable code (e.g. PATCH_FAILED vs
1505
- // DOWNLOAD_FAILED — telemetry classifies on it) may sit on the
1506
- // `code` property or, from bridges that cannot set it, as a
1507
- // `[CODE] ` message prefix. Either way it survives into the
1508
- // i18n-wrapped error together with the original as cause.
1509
- const { code, message } = readErrorCode(e);
1510
- if (url === orderedUrls[0] && orderedUrls.length > 1) {
1511
- rankedUrls.set(type, [...orderedUrls.slice(1), url]);
1512
- }
1513
- const errorMessage = this.t(errorKeys[type], {
1514
- message: message || String(e ?? ''),
1515
- });
1516
- errorMessages.push(errorMessage);
1517
- lastError = new UpdateError(
1518
- errorMessage,
1519
- code ?? 'DOWNLOAD_FAILED',
1520
- {
1521
- cause: e,
1522
- }
1523
- );
1524
- log(errorMessage);
1525
- if (!isMirrorRetryableCode(lastError.code)) {
1526
- // The bytes arrived but could not be applied (patch/manifest
1527
- // mismatch): every mirror serves the same artifact, so move
1528
- // on to the next strategy instead of re-downloading it.
1529
- exhaustedStrategies.set(type, errorMessage);
1530
- break;
1531
- }
1532
- }
1533
- }
1534
- }
1535
- if (
1536
- succeeded ||
1537
- attempts.every(({ type }) => exhaustedStrategies.has(type))
1538
- ) {
1539
- // Nothing left that a retry could change.
1540
- break;
1541
- }
1542
- }
1543
- } finally {
1544
- progressSubscription.remove();
1545
- delete sharedState.progressCallbacks[hash];
1546
- }
1547
- // Only a patch-stage failure exhausts a strategy (isMirrorRetryableCode),
1548
- // and an exhausted strategy is never retried: these are exactly the patch
1549
- // failures, each once.
1550
- const patchErrorMessages = [...exhaustedStrategies.values()];
1551
- const patchFailed = patchErrorMessages.length > 0;
1552
- if (succeeded && errorMessages.length > 0) {
1553
- // An earlier strategy failed and a later one rescued the download
1554
- // (e.g. pdiff copiesCrc mismatch on a rebuilt binary → full). Surface
1555
- // the degradation: it is invisible to the end user but tells the
1556
- // platform that incremental delivery is failing for this binary.
1557
- this.report({
1558
- type: 'downloadFallback',
1559
- // The patch-health signal (any strategy, in any attempt, failing at
1560
- // the patch stage) wins over whatever transport failure happened to
1561
- // come last (diff PATCH_FAILED, then pdiff network error, then full
1562
- // succeeded is still a patch_fail server-side).
1563
- code: patchFailed ? 'PATCH_FAILED' : lastError?.code,
1564
- data: {
1565
- newVersion: hash,
1566
- succeeded,
1567
- },
1568
- // Only the patch failures: a mirror's timeout alongside them would
1569
- // otherwise be read as the cause server-side.
1570
- message: (patchFailed ? patchErrorMessages : errorMessages).join(';'),
1571
- });
1572
- }
1573
- if (!succeeded) {
1574
- // Every attempt runs at least one download (a plan always has an
1575
- // artifact URL, devNoop returned above), so a failure left lastError.
1576
- throw this.fail(lastError, 'DOWNLOAD_FAILED', 'errorUpdate', {
1577
- message: errorMessages.join(';'),
1578
- data: { newVersion: hash },
1579
- });
1580
- }
1581
- const data: Record<string, any> = {
1582
- newVersion: hash,
1583
- diff: succeeded,
1584
- duration: Date.now() - patchStartTime,
1585
- };
1586
- if (errorMessages.length > 0) {
1587
- data.error = errorMessages.join(';');
1588
- }
1589
- this.report({
1590
- type: 'downloadSuccess',
1591
- data,
1592
- });
1593
- log(`downloaded ${succeeded} hash:`, hash);
1594
- const hashInfo: Record<string, any> = {
1595
- name,
1596
- description,
1597
- metaInfo,
1598
- };
1599
- if (sharedState.toHash === hash) {
1600
- hashInfo.debugChannel = true;
1601
- }
1602
- // The version is "downloaded" only once its metadata is persisted: a
1603
- // lost hash-info write would leave the next launch with a nameless
1604
- // version and a switchVersion that the native side may refuse.
1605
- try {
1606
- await setLocalHashInfo(hash, hashInfo);
1607
- } catch (e: any) {
1608
- throw this.fail(e, 'FILE_OPERATION_FAILED', 'errorUpdate', {
1609
- data: { newVersion: hash },
1610
- });
1611
- }
1612
- sharedState.downloadedHash = hash;
1613
- return hash;
1614
- };
1615
- downloadAndInstallApk = async (
1616
- url: string,
1617
- onDownloadProgress?: (data: ProgressData) => void
1618
- ) => {
1619
- if (Platform.OS !== 'android') {
1620
- return;
1621
- }
1622
- if (sharedState.apkStatus === 'downloading') {
1623
- return;
1624
- }
1625
- if (sharedState.apkStatus === 'downloaded') {
1626
- const err = new UpdateError(
1627
- this.t('error_apk_pending_install'),
1628
- 'APK_INSTALL_PENDING'
1629
- );
1630
- this.emitError(err, 'errorInstallApk');
1631
- this.throwIfEnabled(err);
1632
- return;
1633
- }
1634
- sharedState.apkStatus = 'downloading';
1635
- this.report({ type: 'downloadingApk' });
1636
- const progressKey = 'downloadingApk';
1637
- const progressSubscription = onDownloadProgress
1638
- ? pushyNativeEventEmitter.addListener(
1639
- 'RCTPushyDownloadProgress',
1640
- (event: unknown) => {
1641
- const progressData = event as ProgressData;
1642
- if (progressData.hash === progressKey) {
1643
- onDownloadProgress(progressData);
1644
- }
1645
- }
1646
- )
1647
- : undefined;
1648
- try {
1649
- await PushyModule.downloadAndInstallApk({
1650
- url,
1651
- target: 'update.apk',
1652
- hash: progressKey,
1653
- });
1654
- sharedState.apkStatus = 'downloaded';
1655
- } catch (e) {
1656
- sharedState.apkStatus = null;
1657
- // Keep the native error (message/stack) instead of discarding it.
1658
- this.throwIfEnabled(
1659
- this.fail(e, 'APK_DOWNLOAD_FAILED', 'errorDownloadAndInstallApk', {
1660
- fallbackMessage: this.t('error_apk_download_failed'),
1661
- })
1662
- );
1663
- } finally {
1664
- progressSubscription?.remove();
1665
- }
1666
- };
1667
- restartApp = async () => {
1668
- try {
1669
- if (!(await this.runBeforeReload({ type: 'restartApp' }))) {
1670
- return;
1671
- }
1672
- } catch (e) {
1673
- throw this.fail(e, 'USER_HOOK_ERROR', 'errorRestart');
1674
- }
1675
- try {
1676
- return await PushyModule.restartApp();
1677
- } catch (e) {
1678
- throw this.fail(e, 'RESTART_FAILED', 'errorRestart');
1679
- }
1680
- };
1681
- /**
1682
- * Reset to the bundle packaged in the binary: wipes every downloaded update
1683
- * and the whole update state on the native side, so the app loads the
1684
- * built-in bundle on the next launch (or immediately with
1685
- * `{ restart: true }`). The client uuid is preserved.
1686
- *
1687
- * Returns whether the reset actually happened. Like the other update-flow
1688
- * APIs it never throws by default — failures land in lastError/onError with
1689
- * code RESET_FAILED — but the boolean must not be ignored: a false means the
1690
- * app is still running the hot-updated bundle. Set `throwError` to throw.
1691
- */
1692
- resetToPackagedBundle = async (options?: {
1693
- restart?: boolean;
1694
- }): Promise<boolean> => {
1695
- if (!assertWeb()) {
1696
- return false;
1697
- }
1698
- const reset = nativeMethod('resetToPackagedBundle');
1699
- if (!reset) {
1700
- const err = new UpdateError(
1701
- this.t('error_reset_not_supported'),
1702
- 'RESET_FAILED'
1703
- );
1704
- this.emitError(err, 'errorReset');
1705
- this.throwIfEnabled(err);
1706
- return false;
1707
- }
1708
- try {
1709
- await reset();
1710
- } catch (e) {
1711
- this.throwIfEnabled(this.fail(e, 'RESET_FAILED', 'errorReset'));
1712
- return false;
1713
- }
1714
- // The downloaded versions are gone; drop JS bookkeeping referring to them
1715
- // so a stale downloadedHash cannot be switched to.
1716
- sharedState.downloadedHash = undefined;
1717
- sharedState.toHash = undefined;
1718
- sharedState.marked = false;
1719
- // Invalidate the private owner too: old promises/timers must not touch
1720
- // a switch that starts after this reset.
1721
- invalidateApplyingUpdate();
1722
- sharedState.apkStatus = null;
1723
- this.report({ type: 'reset' });
1724
- if (options?.restart) {
1725
- try {
1726
- await this.restartApp();
1727
- } catch (e: any) {
1728
- // The reset itself succeeded and the restart failure was already
1729
- // reported through the pipeline; the boolean must still say "state
1730
- // is reset".
1731
- log('restart after reset failed:', e?.message || e);
1732
- }
1733
- }
1734
- return true;
1735
- };
317
+ resetToPackagedBundle: Activation['resetToPackagedBundle'] = (options) =>
318
+ this.activation.resetToPackagedBundle(options);
1736
319
  }
1737
320
 
1738
321
  // for international users