@appzung/react-native-code-push 9.0.2 → 10.0.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 (473) hide show
  1. package/CodePush.podspec +1 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +169 -329
  4. package/android/app/.gradle/config.properties +2 -0
  5. package/android/app/build.gradle +63 -19
  6. package/android/app/local.properties +8 -0
  7. package/android/app/src/main/AndroidManifest.xml +2 -3
  8. package/android/app/src/main/AndroidManifestNew.xml +3 -0
  9. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePush.java +35 -97
  10. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushConstants.java +1 -1
  11. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInstallMode.java +2 -2
  12. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidPublicKeyException.java +2 -2
  13. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidUpdateException.java +1 -1
  14. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushMalformedDataException.java +2 -2
  15. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNativeModule.java +37 -8
  16. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNotInitializedException.java +2 -2
  17. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushTelemetryManager.java +14 -14
  18. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUnknownException.java +2 -2
  19. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateManager.java +3 -3
  20. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateState.java +2 -2
  21. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateUtils.java +1 -1
  22. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUtils.java +1 -1
  23. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgress.java +1 -1
  24. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgressCallback.java +1 -1
  25. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/FileUtils.java +1 -1
  26. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/ReactInstanceHolder.java +1 -1
  27. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/SettingsManager.java +1 -1
  28. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/TLSSocketFactory.java +1 -1
  29. package/android/build.gradle +1 -11
  30. package/android/codepush.gradle +3 -3
  31. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  32. package/android/gradle.properties +4 -20
  33. package/docs/advanced-usage.md +56 -0
  34. package/docs/api-android.md +16 -77
  35. package/docs/api-ios.md +9 -21
  36. package/docs/api-js.md +184 -219
  37. package/docs/code-signing.md +62 -0
  38. package/docs/migrating-to-v10.md +31 -0
  39. package/docs/setup-android.md +54 -463
  40. package/docs/setup-ios.md +37 -208
  41. package/docs/setup-windows.md +8 -74
  42. package/ios/CodePush/CodePush.h +4 -4
  43. package/ios/CodePush/CodePush.m +21 -65
  44. package/ios/CodePush/CodePushConfig.m +14 -11
  45. package/ios/CodePush/CodePushPackage.m +60 -60
  46. package/ios/CodePush/CodePushTelemetryManager.m +13 -13
  47. package/ios/CodePush.xcodeproj/project.pbxproj +1 -562
  48. package/lib/commonjs/CodePush.js +90 -0
  49. package/lib/commonjs/CodePush.js.map +1 -0
  50. package/lib/commonjs/allowRestart.js +12 -0
  51. package/lib/commonjs/allowRestart.js.map +1 -0
  52. package/lib/commonjs/checkForUpdates.js +105 -0
  53. package/lib/commonjs/checkForUpdates.js.map +1 -0
  54. package/lib/commonjs/clearUpdates.js +15 -0
  55. package/lib/commonjs/clearUpdates.js.map +1 -0
  56. package/lib/commonjs/disallowRestart.js +12 -0
  57. package/lib/commonjs/disallowRestart.js.map +1 -0
  58. package/lib/commonjs/enums/CheckFrequency.enum.js +25 -0
  59. package/lib/commonjs/enums/CheckFrequency.enum.js.map +1 -0
  60. package/lib/commonjs/enums/DeploymentStatus.enum.js +21 -0
  61. package/lib/commonjs/enums/DeploymentStatus.enum.js.map +1 -0
  62. package/lib/commonjs/enums/InstallMode.enum.js +35 -0
  63. package/lib/commonjs/enums/InstallMode.enum.js.map +1 -0
  64. package/lib/commonjs/enums/SyncStatus.enum.js +53 -0
  65. package/lib/commonjs/enums/SyncStatus.enum.js.map +1 -0
  66. package/lib/commonjs/enums/UpdateState.enum.js +29 -0
  67. package/lib/commonjs/enums/UpdateState.enum.js.map +1 -0
  68. package/lib/commonjs/getUpdateMetadata.js +25 -0
  69. package/lib/commonjs/getUpdateMetadata.js.map +1 -0
  70. package/lib/commonjs/index.js +195 -0
  71. package/lib/commonjs/index.js.map +1 -0
  72. package/lib/commonjs/internals/AcquisitionSdk.js +9 -0
  73. package/lib/commonjs/internals/AcquisitionSdk.js.map +1 -0
  74. package/lib/commonjs/internals/LocalPackageImplementation.js +29 -0
  75. package/lib/commonjs/internals/LocalPackageImplementation.js.map +1 -0
  76. package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js +8 -0
  77. package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js.map +1 -0
  78. package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js +6 -0
  79. package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
  80. package/lib/commonjs/internals/RemotePackageImplementation.js +49 -0
  81. package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -0
  82. package/lib/commonjs/internals/getConfiguration.js +15 -0
  83. package/lib/commonjs/internals/getConfiguration.js.map +1 -0
  84. package/lib/commonjs/internals/getCurrentPackage.js +12 -0
  85. package/lib/commonjs/internals/getCurrentPackage.js.map +1 -0
  86. package/lib/commonjs/internals/getPromisifiedSdk.js +49 -0
  87. package/lib/commonjs/internals/getPromisifiedSdk.js.map +1 -0
  88. package/lib/commonjs/internals/shouldUpdateBeIgnored.js +62 -0
  89. package/lib/commonjs/internals/shouldUpdateBeIgnored.js.map +1 -0
  90. package/lib/commonjs/internals/types.js +6 -0
  91. package/lib/commonjs/internals/types.js.map +1 -0
  92. package/lib/commonjs/internals/utils/log.js +11 -0
  93. package/lib/commonjs/internals/utils/log.js.map +1 -0
  94. package/lib/commonjs/internals/utils/request-fetch-adapter.js +50 -0
  95. package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +1 -0
  96. package/lib/commonjs/internals/version.js +9 -0
  97. package/lib/commonjs/internals/version.js.map +1 -0
  98. package/lib/commonjs/notifyAppReady.js +83 -0
  99. package/lib/commonjs/notifyAppReady.js.map +1 -0
  100. package/lib/commonjs/reactNative.d.js +2 -0
  101. package/lib/commonjs/reactNative.d.js.map +1 -0
  102. package/lib/commonjs/restartApp.js +16 -0
  103. package/lib/commonjs/restartApp.js.map +1 -0
  104. package/lib/commonjs/sync.js +219 -0
  105. package/lib/commonjs/sync.js.map +1 -0
  106. package/lib/commonjs/types.js +6 -0
  107. package/lib/commonjs/types.js.map +1 -0
  108. package/lib/module/CodePush.js +84 -0
  109. package/lib/module/CodePush.js.map +1 -0
  110. package/lib/module/allowRestart.js +9 -0
  111. package/lib/module/allowRestart.js.map +1 -0
  112. package/lib/module/checkForUpdates.js +101 -0
  113. package/lib/module/checkForUpdates.js.map +1 -0
  114. package/lib/module/clearUpdates.js +12 -0
  115. package/lib/module/clearUpdates.js.map +1 -0
  116. package/lib/module/disallowRestart.js +9 -0
  117. package/lib/module/disallowRestart.js.map +1 -0
  118. package/lib/module/enums/CheckFrequency.enum.js +21 -0
  119. package/lib/module/enums/CheckFrequency.enum.js.map +1 -0
  120. package/lib/module/enums/DeploymentStatus.enum.js +17 -0
  121. package/lib/module/enums/DeploymentStatus.enum.js.map +1 -0
  122. package/lib/module/enums/InstallMode.enum.js +32 -0
  123. package/lib/module/enums/InstallMode.enum.js.map +1 -0
  124. package/lib/module/enums/SyncStatus.enum.js +49 -0
  125. package/lib/module/enums/SyncStatus.enum.js.map +1 -0
  126. package/lib/module/enums/UpdateState.enum.js +26 -0
  127. package/lib/module/enums/UpdateState.enum.js.map +1 -0
  128. package/lib/module/getUpdateMetadata.js +21 -0
  129. package/lib/module/getUpdateMetadata.js.map +1 -0
  130. package/lib/module/index.js +19 -0
  131. package/lib/module/index.js.map +1 -0
  132. package/lib/module/internals/AcquisitionSdk.js +5 -0
  133. package/lib/module/internals/AcquisitionSdk.js.map +1 -0
  134. package/lib/module/internals/LocalPackageImplementation.js +24 -0
  135. package/lib/module/internals/LocalPackageImplementation.js.map +1 -0
  136. package/lib/module/internals/NativeRNAppZungCodePushModule.js +4 -0
  137. package/lib/module/internals/NativeRNAppZungCodePushModule.js.map +1 -0
  138. package/lib/module/internals/RNAppZungCodePushModuleSpec.js +4 -0
  139. package/lib/module/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
  140. package/lib/module/internals/RemotePackageImplementation.js +44 -0
  141. package/lib/module/internals/RemotePackageImplementation.js.map +1 -0
  142. package/lib/module/internals/getConfiguration.js +11 -0
  143. package/lib/module/internals/getConfiguration.js.map +1 -0
  144. package/lib/module/internals/getCurrentPackage.js +8 -0
  145. package/lib/module/internals/getCurrentPackage.js.map +1 -0
  146. package/lib/module/internals/getPromisifiedSdk.js +45 -0
  147. package/lib/module/internals/getPromisifiedSdk.js.map +1 -0
  148. package/lib/module/internals/shouldUpdateBeIgnored.js +58 -0
  149. package/lib/module/internals/shouldUpdateBeIgnored.js.map +1 -0
  150. package/lib/module/internals/types.js +4 -0
  151. package/lib/module/internals/types.js.map +1 -0
  152. package/lib/module/internals/utils/log.js +7 -0
  153. package/lib/module/internals/utils/log.js.map +1 -0
  154. package/lib/module/internals/utils/request-fetch-adapter.js +46 -0
  155. package/lib/module/internals/utils/request-fetch-adapter.js.map +1 -0
  156. package/lib/module/internals/version.js +5 -0
  157. package/lib/module/internals/version.js.map +1 -0
  158. package/lib/module/notifyAppReady.js +79 -0
  159. package/lib/module/notifyAppReady.js.map +1 -0
  160. package/lib/module/reactNative.d.js +2 -0
  161. package/lib/module/reactNative.d.js.map +1 -0
  162. package/lib/module/restartApp.js +13 -0
  163. package/lib/module/restartApp.js.map +1 -0
  164. package/lib/module/sync.js +215 -0
  165. package/lib/module/sync.js.map +1 -0
  166. package/lib/module/types.js +4 -0
  167. package/lib/module/types.js.map +1 -0
  168. package/lib/typescript/commonjs/package.json +1 -0
  169. package/lib/typescript/commonjs/src/CodePush.d.ts +24 -0
  170. package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/src/allowRestart.d.ts +5 -0
  172. package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/src/checkForUpdates.d.ts +9 -0
  174. package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/src/clearUpdates.d.ts +8 -0
  176. package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/src/disallowRestart.d.ts +5 -0
  178. package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +18 -0
  180. package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +14 -0
  182. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +27 -0
  184. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +46 -0
  186. package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +21 -0
  188. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts +9 -0
  190. package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/src/index.d.ts +17 -0
  192. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +3 -0
  194. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts +17 -0
  196. package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
  198. package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
  200. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +18 -0
  202. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +3 -0
  204. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts +2 -0
  206. package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +13 -0
  208. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
  210. package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/src/internals/types.d.ts +16 -0
  212. package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/src/internals/utils/log.d.ts +2 -0
  214. package/lib/typescript/commonjs/src/internals/utils/log.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +3 -0
  216. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/src/internals/version.d.ts +2 -0
  218. package/lib/typescript/commonjs/src/internals/version.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/src/notifyAppReady.d.ts +6 -0
  220. package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/src/restartApp.d.ts +7 -0
  222. package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/src/sync.d.ts +17 -0
  224. package/lib/typescript/commonjs/src/sync.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/src/types.d.ts +196 -0
  226. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  227. package/lib/typescript/module/package.json +1 -0
  228. package/lib/typescript/module/src/CodePush.d.ts +24 -0
  229. package/lib/typescript/module/src/CodePush.d.ts.map +1 -0
  230. package/lib/typescript/module/src/allowRestart.d.ts +5 -0
  231. package/lib/typescript/module/src/allowRestart.d.ts.map +1 -0
  232. package/lib/typescript/module/src/checkForUpdates.d.ts +9 -0
  233. package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -0
  234. package/lib/typescript/module/src/clearUpdates.d.ts +8 -0
  235. package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -0
  236. package/lib/typescript/module/src/disallowRestart.d.ts +5 -0
  237. package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -0
  238. package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +18 -0
  239. package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts.map +1 -0
  240. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +14 -0
  241. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
  242. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +27 -0
  243. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -0
  244. package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +46 -0
  245. package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts.map +1 -0
  246. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +21 -0
  247. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -0
  248. package/lib/typescript/module/src/getUpdateMetadata.d.ts +9 -0
  249. package/lib/typescript/module/src/getUpdateMetadata.d.ts.map +1 -0
  250. package/lib/typescript/module/src/index.d.ts +17 -0
  251. package/lib/typescript/module/src/index.d.ts.map +1 -0
  252. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +3 -0
  253. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +1 -0
  254. package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts +17 -0
  255. package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts.map +1 -0
  256. package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
  257. package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
  258. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
  259. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
  260. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +18 -0
  261. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -0
  262. package/lib/typescript/module/src/internals/getConfiguration.d.ts +3 -0
  263. package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -0
  264. package/lib/typescript/module/src/internals/getCurrentPackage.d.ts +2 -0
  265. package/lib/typescript/module/src/internals/getCurrentPackage.d.ts.map +1 -0
  266. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +13 -0
  267. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +1 -0
  268. package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
  269. package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
  270. package/lib/typescript/module/src/internals/types.d.ts +16 -0
  271. package/lib/typescript/module/src/internals/types.d.ts.map +1 -0
  272. package/lib/typescript/module/src/internals/utils/log.d.ts +2 -0
  273. package/lib/typescript/module/src/internals/utils/log.d.ts.map +1 -0
  274. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +3 -0
  275. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
  276. package/lib/typescript/module/src/internals/version.d.ts +2 -0
  277. package/lib/typescript/module/src/internals/version.d.ts.map +1 -0
  278. package/lib/typescript/module/src/notifyAppReady.d.ts +6 -0
  279. package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -0
  280. package/lib/typescript/module/src/restartApp.d.ts +7 -0
  281. package/lib/typescript/module/src/restartApp.d.ts.map +1 -0
  282. package/lib/typescript/module/src/sync.d.ts +17 -0
  283. package/lib/typescript/module/src/sync.d.ts.map +1 -0
  284. package/lib/typescript/module/src/types.d.ts +196 -0
  285. package/lib/typescript/module/src/types.d.ts.map +1 -0
  286. package/package.json +79 -29
  287. package/react-native.config.js +8 -8
  288. package/scripts/generateBundledResourcesHash.js +1 -1
  289. package/scripts/getFilesInFolder.js +1 -1
  290. package/scripts/recordFilesBeforeBundleCommand.js +1 -1
  291. package/src/CodePush.tsx +108 -0
  292. package/src/allowRestart.ts +6 -0
  293. package/src/checkForUpdates.ts +109 -0
  294. package/src/clearUpdates.ts +9 -0
  295. package/src/disallowRestart.ts +6 -0
  296. package/src/enums/CheckFrequency.enum.ts +19 -0
  297. package/src/enums/DeploymentStatus.enum.ts +14 -0
  298. package/src/enums/InstallMode.enum.ts +31 -0
  299. package/src/enums/SyncStatus.enum.ts +53 -0
  300. package/src/enums/UpdateState.enum.ts +24 -0
  301. package/src/getUpdateMetadata.ts +23 -0
  302. package/src/index.ts +18 -0
  303. package/src/internals/AcquisitionSdk.ts +3 -0
  304. package/src/internals/LocalPackageImplementation.ts +45 -0
  305. package/src/internals/NativeRNAppZungCodePushModule.ts +3 -0
  306. package/src/internals/RNAppZungCodePushModuleSpec.ts +54 -0
  307. package/src/internals/RemotePackageImplementation.ts +69 -0
  308. package/src/internals/getConfiguration.ts +12 -0
  309. package/src/internals/getCurrentPackage.ts +6 -0
  310. package/src/internals/getPromisifiedSdk.ts +72 -0
  311. package/src/internals/shouldUpdateBeIgnored.ts +76 -0
  312. package/src/internals/types.ts +18 -0
  313. package/{logging.js → src/internals/utils/log.ts} +1 -3
  314. package/src/internals/utils/request-fetch-adapter.ts +58 -0
  315. package/src/internals/version.ts +2 -0
  316. package/src/notifyAppReady.ts +94 -0
  317. package/src/reactNative.d.ts +34 -0
  318. package/src/restartApp.ts +10 -0
  319. package/src/sync.ts +272 -0
  320. package/src/types.ts +237 -0
  321. package/tsconfig.build.json +4 -0
  322. package/tsconfig.json +29 -12
  323. package/windows/CodePush/CodePushConfig.cpp +3 -3
  324. package/windows/CodePush/CodePushConfig.h +3 -3
  325. package/windows/CodePush/CodePushNativeModule.cpp +27 -27
  326. package/windows/CodePush/CodePushNativeModule.h +4 -4
  327. package/windows/CodePush/CodePushTelemetryManager.cpp +12 -12
  328. package/windows/CodePush/CodePushTelemetryManager.h +1 -1
  329. package/.azurepipelines/build-rn-code-push-1es.yml +0 -104
  330. package/.azurepipelines/test-rn-code-push.yml +0 -94
  331. package/.config/CredScanSuppressions.json +0 -14
  332. package/AlertAdapter.js +0 -24
  333. package/CONTRIBUTING.md +0 -134
  334. package/CodePush.js +0 -671
  335. package/SECURITY.md +0 -41
  336. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
  337. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +0 -102
  338. package/docs/multi-deployment-testing-android.md +0 -148
  339. package/docs/multi-deployment-testing-ios.md +0 -59
  340. package/ios/CodePush/Base64/Base64/MF_Base64Additions.h +0 -34
  341. package/ios/CodePush/Base64/Base64/MF_Base64Additions.m +0 -252
  342. package/ios/CodePush/Base64/README.md +0 -47
  343. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithm.h +0 -69
  344. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.h +0 -16
  345. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmFactory.m +0 -51
  346. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.h +0 -15
  347. package/ios/CodePush/JWT/Core/Algorithms/Base/JWTAlgorithmNone.m +0 -55
  348. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.h +0 -24
  349. package/ios/CodePush/JWT/Core/Algorithms/ESFamily/JWTAlgorithmESBase.m +0 -41
  350. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.h +0 -28
  351. package/ios/CodePush/JWT/Core/Algorithms/HSFamily/JWTAlgorithmHSBase.m +0 -205
  352. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.h +0 -103
  353. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolder.m +0 -322
  354. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.h +0 -37
  355. package/ios/CodePush/JWT/Core/Algorithms/Holders/JWTAlgorithmDataHolderChain.m +0 -145
  356. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.h +0 -35
  357. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTAlgorithmRSBase.m +0 -551
  358. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/JWTRSAlgorithm.h +0 -23
  359. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.h +0 -43
  360. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m +0 -230
  361. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.h +0 -31
  362. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoKeyExtractor.m +0 -113
  363. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.h +0 -38
  364. package/ios/CodePush/JWT/Core/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m +0 -500
  365. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.h +0 -18
  366. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaim.m +0 -214
  367. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.h +0 -23
  368. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSet.m +0 -29
  369. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.h +0 -19
  370. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetSerializer.m +0 -68
  371. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.h +0 -18
  372. package/ios/CodePush/JWT/Core/ClaimSet/JWTClaimsSetVerifier.m +0 -72
  373. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.h +0 -67
  374. package/ios/CodePush/JWT/Core/Coding/JWTCoding+ResultTypes.m +0 -111
  375. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.h +0 -119
  376. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionOne.m +0 -307
  377. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.h +0 -94
  378. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionThree.m +0 -619
  379. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.h +0 -164
  380. package/ios/CodePush/JWT/Core/Coding/JWTCoding+VersionTwo.m +0 -514
  381. package/ios/CodePush/JWT/Core/Coding/JWTCoding.h +0 -24
  382. package/ios/CodePush/JWT/Core/Coding/JWTCoding.m +0 -11
  383. package/ios/CodePush/JWT/Core/FrameworkSupplement/JWT.h +0 -52
  384. package/ios/CodePush/JWT/Core/FrameworkSupplement/Map.modulemap +0 -5
  385. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.h +0 -28
  386. package/ios/CodePush/JWT/Core/Supplement/JWTBase64Coder.m +0 -70
  387. package/ios/CodePush/JWT/Core/Supplement/JWTDeprecations.h +0 -22
  388. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.h +0 -34
  389. package/ios/CodePush/JWT/Core/Supplement/JWTErrorDescription.m +0 -73
  390. package/ios/CodePush/JWT/LICENSE +0 -19
  391. package/ios/CodePush/JWT/README.md +0 -489
  392. package/ios/CodePush/SSZipArchive/Info.plist +0 -26
  393. package/ios/CodePush/SSZipArchive/README.md +0 -1
  394. package/ios/CodePush/SSZipArchive/SSZipArchive.h +0 -178
  395. package/ios/CodePush/SSZipArchive/SSZipArchive.m +0 -1496
  396. package/ios/CodePush/SSZipArchive/SSZipCommon.h +0 -71
  397. package/ios/CodePush/SSZipArchive/Supporting Files/PrivacyInfo.xcprivacy +0 -23
  398. package/ios/CodePush/SSZipArchive/include/ZipArchive.h +0 -25
  399. package/ios/CodePush/SSZipArchive/minizip/LICENSE +0 -17
  400. package/ios/CodePush/SSZipArchive/minizip/mz.h +0 -273
  401. package/ios/CodePush/SSZipArchive/minizip/mz_compat.c +0 -1306
  402. package/ios/CodePush/SSZipArchive/minizip/mz_compat.h +0 -346
  403. package/ios/CodePush/SSZipArchive/minizip/mz_crypt.c +0 -187
  404. package/ios/CodePush/SSZipArchive/minizip/mz_crypt.h +0 -65
  405. package/ios/CodePush/SSZipArchive/minizip/mz_crypt_apple.c +0 -526
  406. package/ios/CodePush/SSZipArchive/minizip/mz_os.c +0 -348
  407. package/ios/CodePush/SSZipArchive/minizip/mz_os.h +0 -176
  408. package/ios/CodePush/SSZipArchive/minizip/mz_os_posix.c +0 -350
  409. package/ios/CodePush/SSZipArchive/minizip/mz_strm.c +0 -556
  410. package/ios/CodePush/SSZipArchive/minizip/mz_strm.h +0 -132
  411. package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.c +0 -383
  412. package/ios/CodePush/SSZipArchive/minizip/mz_strm_buf.h +0 -42
  413. package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.c +0 -269
  414. package/ios/CodePush/SSZipArchive/minizip/mz_strm_mem.h +0 -48
  415. package/ios/CodePush/SSZipArchive/minizip/mz_strm_os.h +0 -40
  416. package/ios/CodePush/SSZipArchive/minizip/mz_strm_os_posix.c +0 -203
  417. package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.c +0 -334
  418. package/ios/CodePush/SSZipArchive/minizip/mz_strm_pkcrypt.h +0 -46
  419. package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.c +0 -429
  420. package/ios/CodePush/SSZipArchive/minizip/mz_strm_split.h +0 -43
  421. package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.c +0 -360
  422. package/ios/CodePush/SSZipArchive/minizip/mz_strm_wzaes.h +0 -46
  423. package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.c +0 -389
  424. package/ios/CodePush/SSZipArchive/minizip/mz_strm_zlib.h +0 -43
  425. package/ios/CodePush/SSZipArchive/minizip/mz_zip.c +0 -2782
  426. package/ios/CodePush/SSZipArchive/minizip/mz_zip.h +0 -262
  427. package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.c +0 -1942
  428. package/ios/CodePush/SSZipArchive/minizip/mz_zip_rw.h +0 -285
  429. package/package-mixins.js +0 -68
  430. package/request-fetch-adapter.js +0 -52
  431. package/scripts/postlink/android/postlink.js +0 -87
  432. package/scripts/postlink/ios/postlink.js +0 -116
  433. package/scripts/postlink/run.js +0 -11
  434. package/scripts/postunlink/android/postunlink.js +0 -74
  435. package/scripts/postunlink/ios/postunlink.js +0 -87
  436. package/scripts/postunlink/run.js +0 -11
  437. package/scripts/tools/linkToolsAndroid.js +0 -57
  438. package/scripts/tools/linkToolsIos.js +0 -130
  439. package/tslint.json +0 -32
  440. package/typings/react-native-code-push.d.ts +0 -455
  441. package/windows-legacy/CodePush/CodePush.csproj +0 -128
  442. package/windows-legacy/CodePush/CodePushUtils.cs +0 -47
  443. package/windows-legacy/CodePush/FileUtils.cs +0 -40
  444. package/windows-legacy/CodePush/Properties/AssemblyInfo.cs +0 -29
  445. package/windows-legacy/CodePush/Properties/CodePush.rd.xml +0 -33
  446. package/windows-legacy/CodePush/UpdateManager.cs +0 -305
  447. package/windows-legacy/CodePush/UpdateUtils.cs +0 -46
  448. package/windows-legacy/CodePush.Net46/Adapters/Http/HttpProgress.cs +0 -28
  449. package/windows-legacy/CodePush.Net46/Adapters/Storage/ApplicationDataContainer.cs +0 -106
  450. package/windows-legacy/CodePush.Net46/CodePush.Net46.csproj +0 -103
  451. package/windows-legacy/CodePush.Net46/CodePushUtils.cs +0 -158
  452. package/windows-legacy/CodePush.Net46/FileUtils.cs +0 -55
  453. package/windows-legacy/CodePush.Net46/Properties/AssemblyInfo.cs +0 -36
  454. package/windows-legacy/CodePush.Net46/UpdateManager.cs +0 -330
  455. package/windows-legacy/CodePush.Net46/UpdateUtils.cs +0 -70
  456. package/windows-legacy/CodePush.Net46/packages.config +0 -5
  457. package/windows-legacy/CodePush.Net46.Test/ApplicationDataContainerTest.cs +0 -105
  458. package/windows-legacy/CodePush.Net46.Test/CodePush.Net46.Test.csproj +0 -137
  459. package/windows-legacy/CodePush.Net46.Test/Properties/AssemblyInfo.cs +0 -36
  460. package/windows-legacy/CodePush.Net46.Test/TelemetryManagerTest.cs +0 -117
  461. package/windows-legacy/CodePush.Net46.Test/app.config +0 -11
  462. package/windows-legacy/CodePush.Net46.Test/packages.config +0 -4
  463. package/windows-legacy/CodePush.Shared/CodePush.Shared.projitems +0 -22
  464. package/windows-legacy/CodePush.Shared/CodePush.Shared.shproj +0 -13
  465. package/windows-legacy/CodePush.Shared/CodePushConstants.cs +0 -35
  466. package/windows-legacy/CodePush.Shared/CodePushNativeModule.cs +0 -329
  467. package/windows-legacy/CodePush.Shared/CodePushReactPackage.cs +0 -235
  468. package/windows-legacy/CodePush.Shared/CodePushUtils.cs +0 -70
  469. package/windows-legacy/CodePush.Shared/InstallMode.cs +0 -9
  470. package/windows-legacy/CodePush.Shared/MinimumBackgroundListener.cs +0 -44
  471. package/windows-legacy/CodePush.Shared/SettingsManager.cs +0 -148
  472. package/windows-legacy/CodePush.Shared/TelemetryManager.cs +0 -250
  473. package/windows-legacy/CodePush.Shared/UpdateState.cs +0 -9
package/src/types.ts ADDED
@@ -0,0 +1,237 @@
1
+ import type { NativeUpdateNotification } from 'code-push/script/acquisition-sdk';
2
+ import type { DeploymentStatus } from './enums/DeploymentStatus.enum';
3
+ import type { InstallMode } from './enums/InstallMode.enum';
4
+ import type { SyncStatus } from './enums/SyncStatus.enum';
5
+
6
+ export interface UpdateDialog {
7
+ /**
8
+ * Indicates whether you would like to append the description of an available release to the
9
+ * notification message which is displayed to the end user. Defaults to false.
10
+ */
11
+ appendReleaseDescription?: boolean;
12
+
13
+ /**
14
+ * Indicates the string you would like to prefix the release description with, if any, when
15
+ * displaying the update notification to the end user. Defaults to " Description: "
16
+ */
17
+ descriptionPrefix?: string;
18
+
19
+ /**
20
+ * The text to use for the button the end user must press in order to install a mandatory update. Defaults to "Continue".
21
+ */
22
+ mandatoryContinueButtonLabel?: string;
23
+
24
+ /**
25
+ * The text used as the body of an update notification, when the update is specified as mandatory.
26
+ * Defaults to "An update is available that must be installed.".
27
+ */
28
+ mandatoryUpdateMessage?: string;
29
+
30
+ /**
31
+ * The text to use for the button the end user can press in order to ignore an optional update that is available. Defaults to "Ignore".
32
+ */
33
+ optionalIgnoreButtonLabel?: string;
34
+
35
+ /**
36
+ * The text to use for the button the end user can press in order to install an optional update. Defaults to "Install".
37
+ */
38
+ optionalInstallButtonLabel?: string;
39
+
40
+ /**
41
+ * The text used as the body of an update notification, when the update is optional. Defaults to "An update is available. Would you like to install it?".
42
+ */
43
+ optionalUpdateMessage?: string;
44
+
45
+ /**
46
+ * The text used as the header of an update notification that is displayed to the end user. Defaults to "Update available".
47
+ */
48
+ title?: string;
49
+ }
50
+
51
+ export type DownloadProgressCallback = (progress: DownloadProgress) => void;
52
+ export type SyncStatusChangedCallback = (status: SyncStatus) => void;
53
+ export type HandleBinaryVersionMismatchCallback = (update: NativeUpdateNotification) => void;
54
+
55
+ export interface DownloadProgress {
56
+ /**
57
+ * The total number of bytes expected to be received for this update.
58
+ */
59
+ totalBytes: number;
60
+
61
+ /**
62
+ * The number of bytes downloaded thus far.
63
+ */
64
+ receivedBytes: number;
65
+ }
66
+
67
+ export interface LocalPackage extends Package {
68
+ /**
69
+ * Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app.
70
+ *
71
+ * @param installMode Indicates when you would like the update changes to take effect for the end-user.
72
+ * @param minimumBackgroundDuration For resume-based installs, this specifies the number of seconds the app needs to be in the background before forcing a restart. Defaults to 0 if unspecified.
73
+ * @param onUpdateInstalled An optional promise called after app installation
74
+ */
75
+ install(
76
+ installMode?: InstallMode,
77
+ minimumBackgroundDuration?: number,
78
+ onUpdateInstalled?: () => Promise<void> | void,
79
+ ): Promise<void>;
80
+ }
81
+
82
+ export interface Package {
83
+ /**
84
+ * The app binary version that this update is dependent on. This is the value that was
85
+ * specified via the appStoreVersion parameter when calling the CLI's release command.
86
+ */
87
+ appVersion: string;
88
+
89
+ /**
90
+ * The release channel public ID that was used to originally download this update.
91
+ */
92
+ releaseChannelPublicId: string;
93
+
94
+ /**
95
+ * The description of the update. This is the same value that you specified in the CLI when you released the update.
96
+ */
97
+ description: string;
98
+
99
+ /**
100
+ * Indicates whether this update has been previously installed but was rolled back.
101
+ */
102
+ failedInstall: boolean;
103
+
104
+ /**
105
+ * Indicates whether this is the first time the update has been run after being installed.
106
+ */
107
+ isFirstRun: boolean;
108
+
109
+ /**
110
+ * Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
111
+ */
112
+ isMandatory: boolean;
113
+
114
+ /**
115
+ * Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart
116
+ * needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
117
+ */
118
+ isPending: boolean;
119
+
120
+ /**
121
+ * The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its release channel.
122
+ */
123
+ label: string;
124
+
125
+ /**
126
+ * The SHA hash value of the update.
127
+ */
128
+ packageHash: string;
129
+
130
+ /**
131
+ * The size of the code contained within the update, in bytes.
132
+ */
133
+ packageSize: number;
134
+ }
135
+
136
+ export interface RemotePackage extends Package {
137
+ /**
138
+ * Downloads the available update from the CodePush service.
139
+ *
140
+ * @param downloadProgressCallback An optional callback that allows tracking the progress of the update while it is being downloaded.
141
+ */
142
+ download(downloadProgressCallback?: DownloadProgressCallback): Promise<LocalPackage>;
143
+
144
+ /**
145
+ * The URL at which the package is available for download.
146
+ */
147
+ downloadUrl: string;
148
+ }
149
+
150
+ export interface SyncOptions {
151
+ /**
152
+ * Specifies the release channel you want to query for an update against. By default, this value is derived from the Info.plist
153
+ * file (iOS) and strings resources (Android), but this option allows you to override it from the script-side if you need to
154
+ * dynamically use a different release channel for a specific call to sync.
155
+ */
156
+ releaseChannelPublicId?: string;
157
+
158
+ /**
159
+ * Specifies when you would like to install optional updates (i.e. those that aren't marked as mandatory).
160
+ * Defaults to codePush.InstallMode.ON_NEXT_RESTART.
161
+ */
162
+ installMode?: InstallMode;
163
+
164
+ /**
165
+ * Specifies when you would like to install updates which are marked as mandatory.
166
+ * Defaults to codePush.InstallMode.IMMEDIATE.
167
+ */
168
+ mandatoryInstallMode?: InstallMode;
169
+
170
+ /**
171
+ * Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property
172
+ * only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME` or `InstallMode.ON_NEXT_SUSPEND`, and can be useful
173
+ * for getting your update in front of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying
174
+ * the update immediately after a resume or unless the app suspension is long enough to not matter, regardless how long it was in the background.
175
+ */
176
+ minimumBackgroundDuration?: number;
177
+
178
+ /**
179
+ * An "options" object used to determine whether a confirmation dialog should be displayed to the end user when an update is available,
180
+ * and if so, what strings to use. Defaults to null, which has the effect of disabling the dialog completely. Setting this to any truthy
181
+ * value will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as
182
+ * overriding one or more of the default strings.
183
+ */
184
+ updateDialog?: UpdateDialog | true;
185
+
186
+ /**
187
+ * The rollback retry mechanism allows the application to attempt to reinstall an update that was previously rolled back (with the restrictions
188
+ * specified in the options). It is an "options" object used to determine whether a rollback retry should occur, and if so, what settings to use
189
+ * for the rollback retry. This defaults to null, which has the effect of disabling the retry mechanism. Setting this to true will enable
190
+ * the retry mechanism with the default settings, and passing an object to this parameter allows enabling the rollback retry as well as overriding
191
+ * one or more of the default values.
192
+ */
193
+ rollbackRetryOptions?: RollbackRetryOptions | true;
194
+
195
+ ignoreFailedUpdates?: boolean;
196
+ }
197
+
198
+ export interface RollbackRetryOptions {
199
+ /**
200
+ * Specifies the minimum time in hours that the app will wait after the latest rollback
201
+ * before attempting to reinstall same rolled-back package. Defaults to `24`.
202
+ */
203
+ delayInHours?: number;
204
+
205
+ /**
206
+ * Specifies the maximum number of retry attempts that the app can make before it stops trying.
207
+ * Cannot be less than `1`. Defaults to `1`.
208
+ */
209
+ maxRetryAttempts?: number;
210
+ }
211
+
212
+ export interface StatusReport {
213
+ /**
214
+ * Whether the deployment succeeded or failed.
215
+ */
216
+ status: DeploymentStatus;
217
+
218
+ /**
219
+ * The version of the app that was deployed (for a native app upgrade).
220
+ */
221
+ appVersion?: string;
222
+
223
+ /**
224
+ * Details of the package that was deployed (or attempted to).
225
+ */
226
+ package?: Package;
227
+
228
+ /**
229
+ * Release channel used when deploying the previous package.
230
+ */
231
+ previousReleaseChannelPublicId?: string;
232
+
233
+ /**
234
+ * The label (v#) of the package that was upgraded from.
235
+ */
236
+ previousLabelOrAppVersion?: string;
237
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig",
3
+ "exclude": ["Examples", "lib", "test"]
4
+ }
package/tsconfig.json CHANGED
@@ -1,14 +1,31 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ES5",
4
- "module": "commonjs",
5
- "lib": ["es6"],
6
- "noImplicitAny": true,
7
- "noEmitOnError": true,
8
- "moduleResolution": "node",
9
- "sourceMap": true,
10
- "rootDir": "test",
11
- "outDir": "bin",
12
- "removeComments": true
13
- }
2
+ "exclude": ["test"],
3
+ "compilerOptions": {
4
+ "rootDir": ".",
5
+ "paths": {
6
+ "@appzung/react-native-code-push": ["./src/index"]
7
+ },
8
+ "allowUnreachableCode": false,
9
+ "allowUnusedLabels": false,
10
+ "esModuleInterop": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "jsx": "react-jsx",
13
+ "lib": ["ESNext"],
14
+ "module": "ESNext",
15
+ "moduleResolution": "Bundler",
16
+ "noEmit": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noImplicitReturns": true,
19
+ "noImplicitUseStrict": false,
20
+ "noStrictGenericChecks": false,
21
+ "noUncheckedIndexedAccess": true,
22
+ "noUnusedLocals": true,
23
+ "noUnusedParameters": true,
24
+ "resolveJsonModule": true,
25
+ "resolvePackageJsonImports": false,
26
+ "skipLibCheck": true,
27
+ "strict": true,
28
+ "target": "ESNext",
29
+ "verbatimModuleSyntax": true
30
+ }
14
31
  }
@@ -36,7 +36,7 @@ namespace winrt::Microsoft::CodePush::ReactNative::implementation
36
36
  {
37
37
  std::optional<hstring> appVersion;
38
38
  std::optional<hstring> buildVersion;
39
- std::optional<hstring> deploymentKey;
39
+ std::optional<hstring> releaseChannelPublicId;
40
40
  std::optional<hstring> publicKey;
41
41
  std::optional<hstring> serverUrl;
42
42
 
@@ -44,7 +44,7 @@ namespace winrt::Microsoft::CodePush::ReactNative::implementation
44
44
  {
45
45
  appVersion = configMap.TryLookup(AppVersionConfigKey);
46
46
  buildVersion = configMap.TryLookup(BuildVersionConfigKey);
47
- deploymentKey = configMap.TryLookup(DeploymentKeyConfigKey);
47
+ releaseChannelPublicId = configMap.TryLookup(ReleaseChannelPublicIdConfigKey);
48
48
  publicKey = configMap.TryLookup(PublicKeyKey);
49
49
  serverUrl = configMap.TryLookup(ServerURLConfigKey);
50
50
  }
@@ -73,7 +73,7 @@ namespace winrt::Microsoft::CodePush::ReactNative::implementation
73
73
 
74
74
  addToConfiguration(AppVersionConfigKey, appVersion);
75
75
  addToConfiguration(BuildVersionConfigKey, buildVersion);
76
- addToConfiguration(DeploymentKeyConfigKey, deploymentKey);
76
+ addToConfiguration(ReleaseChannelPublicIdConfigKey, releaseChannelPublicId);
77
77
  addToConfiguration(PublicKeyKey, publicKey);
78
78
  addToConfiguration(ServerURLConfigKey, serverUrl);
79
79
 
@@ -29,8 +29,8 @@ namespace winrt::Microsoft::CodePush::ReactNative::implementation
29
29
 
30
30
  Windows::Data::Json::JsonObject GetConfiguration();
31
31
 
32
- hstring GetDeploymentKey() { return QueryConfig(DeploymentKeyConfigKey); }
33
- void SetDeploymentKey(std::wstring_view deploymentKey) { m_configuration.Insert(DeploymentKeyConfigKey, deploymentKey); }
32
+ hstring GetReleaseChannelPublicId() { return QueryConfig(ReleaseChannelPublicIdConfigKey); }
33
+ void SetReleaseChannelPublicId(std::wstring_view releaseChannelPublicId) { m_configuration.Insert(ReleaseChannelPublicIdConfigKey, releaseChannelPublicId); }
34
34
 
35
35
  hstring GetServerUrl() { return QueryConfig(ServerURLConfigKey); }
36
36
  void SetServerUrl(std::wstring_view serverUrl) { m_configuration.Insert(ServerURLConfigKey, serverUrl); }
@@ -42,7 +42,7 @@ namespace winrt::Microsoft::CodePush::ReactNative::implementation
42
42
  static constexpr std::wstring_view AppVersionConfigKey{ L"appVersion" };
43
43
  static constexpr std::wstring_view BuildVersionConfigKey{ L"buildVersion" };
44
44
  static constexpr std::wstring_view ClientUniqueIDConfigKey{ L"clientUniqueId" };
45
- static constexpr std::wstring_view DeploymentKeyConfigKey{ L"deploymentKey" };
45
+ static constexpr std::wstring_view ReleaseChannelPublicIdConfigKey{ L"releaseChannelPublicId" };
46
46
  static constexpr std::wstring_view ServerURLConfigKey{ L"serverUrl" };
47
47
  static constexpr std::wstring_view PublicKeyKey{ L"publicKey" };
48
48
 
@@ -127,22 +127,22 @@ namespace Microsoft::CodePush::ReactNative
127
127
  return ApplicationData::Current().LocalSettings();
128
128
  }
129
129
 
130
- void CodePushNativeModule::OverrideAppVersion(std::wstring_view appVersion)
130
+ void CodePushNativeModule::OverrideAppVersion(std::wstring_view appVersion)
131
131
  {
132
132
  CodePushConfig::Current().SetAppVersion(appVersion);
133
133
  }
134
134
 
135
- void CodePushNativeModule::SetDeploymentKey(std::wstring_view deploymentKey)
135
+ void CodePushNativeModule::SetReleaseChannelPublicId(std::wstring_view releaseChannelPublicId)
136
136
  {
137
- CodePushConfig::Current().SetDeploymentKey(deploymentKey);
137
+ CodePushConfig::Current().SetReleaseChannelPublicId(releaseChannelPublicId);
138
138
  }
139
139
 
140
140
  /*
141
141
  * This method checks to see whether a specific package hash
142
142
  * has previously failed installation.
143
143
  */
144
- bool CodePushNativeModule::IsFailedHash(std::wstring_view packageHash)
145
- {
144
+ bool CodePushNativeModule::IsFailedHash(std::wstring_view packageHash)
145
+ {
146
146
  auto localSettings{ GetLocalSettings() };
147
147
  auto failedUpdatesData{ localSettings.Values().TryLookup(FailedUpdatesKey) };
148
148
  if (failedUpdatesData == nullptr)
@@ -186,7 +186,7 @@ namespace Microsoft::CodePush::ReactNative
186
186
  * This method is used to get the count of rollback for the package
187
187
  * using the latest rollback information.
188
188
  */
189
- int CodePushNativeModule::GetRollbackCountForPackage(std::wstring_view packageHash, const JsonObject& latestRollbackInfo)
189
+ int CodePushNativeModule::GetRollbackCountForPackage(std::wstring_view packageHash, const JsonObject& latestRollbackInfo)
190
190
  {
191
191
  auto oldPackageHash{ latestRollbackInfo.GetNamedString(LatestRollbackPackageHashKey, L"null") };
192
192
  if (packageHash == oldPackageHash)
@@ -194,7 +194,7 @@ namespace Microsoft::CodePush::ReactNative
194
194
  auto oldCount{ latestRollbackInfo.GetNamedNumber(LatestRollbackCountKey, 0) };
195
195
  return static_cast<int>(oldCount);
196
196
  }
197
- return 0;
197
+ return 0;
198
198
  }
199
199
 
200
200
  /*
@@ -203,7 +203,7 @@ namespace Microsoft::CodePush::ReactNative
203
203
  * been applied yet via an app restart.
204
204
  */
205
205
  /*static*/ bool CodePushNativeModule::IsPendingUpdate(std::wstring_view packageHash)
206
- {
206
+ {
207
207
  auto localSettings{ GetLocalSettings() };
208
208
  auto pendingUpdateData{ localSettings.Values().TryLookup(PendingUpdateKey) };
209
209
  if (pendingUpdateData != nullptr)
@@ -211,7 +211,7 @@ namespace Microsoft::CodePush::ReactNative
211
211
  auto pendingUpdateString{ unbox_value<hstring>(pendingUpdateData) };
212
212
  JsonObject pendingUpdate;
213
213
  auto success{ JsonObject::TryParse(pendingUpdateString, pendingUpdate) };
214
-
214
+
215
215
  // If there is a pending update whose "state" isn't loading, then we consider it "pending".
216
216
  // Additionally, if a specific hash was provided, we ensure it matches that of the pending update.
217
217
  auto updateIsPending{ success &&
@@ -478,9 +478,9 @@ namespace Microsoft::CodePush::ReactNative
478
478
  * This is the native side of the CodePush.getConfiguration method. It isn't
479
479
  * currently exposed via the "react-native-code-push" module, and is used
480
480
  * internally only by the CodePush.checkForUpdate method in order to get the
481
- * app version, as well as the deployment key that was configured in App.cpp.
481
+ * app version, as well as the release channel that was configured in App.cpp.
482
482
  */
483
- fire_and_forget CodePushNativeModule::GetConfiguration(ReactPromise<IJsonValue> promise) noexcept
483
+ fire_and_forget CodePushNativeModule::GetConfiguration(ReactPromise<IJsonValue> promise) noexcept
484
484
  {
485
485
  auto configuration{ CodePushConfig::Current().GetConfiguration() };
486
486
  if (isRunningBinaryVersion)
@@ -498,7 +498,7 @@ namespace Microsoft::CodePush::ReactNative
498
498
  /*
499
499
  * This method is the native side of the CodePush.getUpdateMetadata method.
500
500
  */
501
- fire_and_forget CodePushNativeModule::GetUpdateMetadataAsync(CodePushUpdateState updateState, ReactPromise<IJsonValue> promise) noexcept
501
+ fire_and_forget CodePushNativeModule::GetUpdateMetadataAsync(CodePushUpdateState updateState, ReactPromise<IJsonValue> promise) noexcept
502
502
  {
503
503
  auto package{ co_await CodePushPackage::GetCurrentPackageAsync() };
504
504
  if (package == nullptr)
@@ -539,14 +539,14 @@ namespace Microsoft::CodePush::ReactNative
539
539
  package.Insert(PackageIsPendingKey, JsonValue::CreateBooleanValue(currentUpdateIsPending));
540
540
  promise.Resolve(package);
541
541
  }
542
- co_return;
542
+ co_return;
543
543
  }
544
544
 
545
545
  /*
546
546
  * This method is the native side of the LocalPackage.install method.
547
547
  */
548
- fire_and_forget CodePushNativeModule::InstallUpdateAsync(JsonObject updatePackage, CodePushInstallMode installMode, int minimumBackgroundDuration, ReactPromise<void> promise) noexcept
549
- {
548
+ fire_and_forget CodePushNativeModule::InstallUpdateAsync(JsonObject updatePackage, CodePushInstallMode installMode, int minimumBackgroundDuration, ReactPromise<void> promise) noexcept
549
+ {
550
550
  try
551
551
  {
552
552
  co_await CodePushPackage::InstallPackageAsync(updatePackage, IsPendingUpdate(L""));
@@ -568,7 +568,7 @@ namespace Microsoft::CodePush::ReactNative
568
568
 
569
569
  // Signal to JS that the update has been applied.
570
570
  promise.Resolve();
571
- co_return;
571
+ co_return;
572
572
  }
573
573
 
574
574
  /*
@@ -659,7 +659,7 @@ namespace Microsoft::CodePush::ReactNative
659
659
  * This information will be used to decide whether the application
660
660
  * should ignore the update or not.
661
661
  */
662
- void CodePushNativeModule::GetLatestRollbackInfo(ReactPromise<IJsonValue> promise) noexcept
662
+ void CodePushNativeModule::GetLatestRollbackInfo(ReactPromise<IJsonValue> promise) noexcept
663
663
  {
664
664
  auto localSettings{ GetLocalSettings() };
665
665
  auto res{ localSettings.Values().TryLookup(LatestRollbackInfoKey) };
@@ -698,7 +698,7 @@ namespace Microsoft::CodePush::ReactNative
698
698
  promise.Resolve(JsonValue::CreateNullValue());
699
699
  }
700
700
 
701
- void CodePushNativeModule::Allow(ReactPromise<JSValue> promise) noexcept
701
+ void CodePushNativeModule::Allow(ReactPromise<JSValue> promise) noexcept
702
702
  {
703
703
  CodePushUtils::Log(L"Re-allowing restarts.");
704
704
  m_allowed = true;
@@ -714,7 +714,7 @@ namespace Microsoft::CodePush::ReactNative
714
714
  promise.Resolve(JSValue::Null);
715
715
  }
716
716
 
717
- void CodePushNativeModule::ClearPendingRestart() noexcept
717
+ void CodePushNativeModule::ClearPendingRestart() noexcept
718
718
  {
719
719
  m_restartQueue.clear();
720
720
  }
@@ -729,7 +729,7 @@ namespace Microsoft::CodePush::ReactNative
729
729
  /*
730
730
  * This method is the native side of the CodePush.restartApp() method.
731
731
  */
732
- fire_and_forget CodePushNativeModule::RestartApp(bool onlyIfUpdateIsPending, ReactPromise<JSValue> promise) noexcept
732
+ fire_and_forget CodePushNativeModule::RestartApp(bool onlyIfUpdateIsPending, ReactPromise<JSValue> promise) noexcept
733
733
  {
734
734
  co_await RestartAppInternal(onlyIfUpdateIsPending);
735
735
  promise.Resolve(JSValue::Null);
@@ -737,11 +737,11 @@ namespace Microsoft::CodePush::ReactNative
737
737
 
738
738
  /*
739
739
  * This method clears CodePush's downloaded updates.
740
- * It is needed to switch to a different deployment if the current deployment is more recent.
741
- * Note: we don�t recommend to use this method in scenarios other than that (CodePush will call this method
740
+ * It is needed to switch to a different release channel if the current release channel is more recent.
741
+ * Note: we don�t recommend to use this method in scenarios other than that (CodePush will call this method
742
742
  * automatically when needed in other cases) as it could lead to unpredictable behavior.
743
743
  */
744
- fire_and_forget CodePushNativeModule::ClearUpdates() noexcept
744
+ fire_and_forget CodePushNativeModule::ClearUpdates() noexcept
745
745
  {
746
746
  co_await ClearUpdatesStaticAsync();
747
747
  }
@@ -752,7 +752,7 @@ namespace Microsoft::CodePush::ReactNative
752
752
  * removeBundleUrl. It is only to be used during tests and no-ops if the test
753
753
  * configuration flag is not set.
754
754
  */
755
- fire_and_forget CodePushNativeModule::DownloadAndReplaceCurrentBundle(std::wstring remoteBundleUrl) noexcept
755
+ fire_and_forget CodePushNativeModule::DownloadAndReplaceCurrentBundle(std::wstring remoteBundleUrl) noexcept
756
756
  {
757
757
  auto errorMessage{ L"Error: DownloadAndReplaceCurrentBundle is not currently implmented" };
758
758
  hresult_error error{ E_NOTIMPL, errorMessage };
@@ -764,7 +764,7 @@ namespace Microsoft::CodePush::ReactNative
764
764
  * This method is checks if a new status update exists (new version was installed,
765
765
  * or an update failed) and return its details (version label, status).
766
766
  */
767
- fire_and_forget CodePushNativeModule::GetNewStatusReportAsync(ReactPromise<IJsonValue> promise) noexcept
767
+ fire_and_forget CodePushNativeModule::GetNewStatusReportAsync(ReactPromise<IJsonValue> promise) noexcept
768
768
  {
769
769
  if (needToReportRollback)
770
770
  {
@@ -816,12 +816,12 @@ namespace Microsoft::CodePush::ReactNative
816
816
  co_return;
817
817
  }
818
818
 
819
- void CodePushNativeModule::RecordStatusReported(JsonObject statusReport) noexcept
819
+ void CodePushNativeModule::RecordStatusReported(JsonObject statusReport) noexcept
820
820
  {
821
821
  CodePushTelemetryManager::RecordStatusReported(statusReport);
822
822
  }
823
823
 
824
- void CodePushNativeModule::SaveStatusReportForRetry(JsonObject statusReport) noexcept
824
+ void CodePushNativeModule::SaveStatusReportForRetry(JsonObject statusReport) noexcept
825
825
  {
826
826
  CodePushTelemetryManager::SaveStatusReportForRetry(statusReport);
827
827
  }
@@ -47,7 +47,7 @@ namespace Microsoft::CodePush::ReactNative
47
47
  static winrt::Windows::Storage::ApplicationDataContainer GetLocalSettings();
48
48
 
49
49
  void OverrideAppVersion(std::wstring_view appVersion);
50
- void SetDeploymentKey(std::wstring_view deploymentKey);
50
+ void SetReleaseChannelPublicId(std::wstring_view releaseChannelPublicId);
51
51
 
52
52
  bool IsFailedHash(std::wstring_view packageHash);
53
53
 
@@ -79,7 +79,7 @@ namespace Microsoft::CodePush::ReactNative
79
79
  * This is the native side of the CodePush.getConfiguration method. It isn't
80
80
  * currently exposed via the "react-native-code-push" module, and is used
81
81
  * internally only by the CodePush.checkForUpdate method in order to get the
82
- * app version, as well as the deployment key that was configured in the Info.plist file.
82
+ * app version, as well as the release channel that was configured.
83
83
  */
84
84
  REACT_METHOD(GetConfiguration, L"getConfiguration");
85
85
  winrt::fire_and_forget GetConfiguration(winrt::Microsoft::ReactNative::ReactPromise<winrt::Windows::Data::Json::IJsonValue> promise) noexcept;
@@ -151,8 +151,8 @@ namespace Microsoft::CodePush::ReactNative
151
151
 
152
152
  /*
153
153
  * This method clears CodePush's downloaded updates.
154
- * It is needed to switch to a different deployment if the current deployment is more recent.
155
- * Note: we don�t recommend to use this method in scenarios other than that (CodePush will call this method
154
+ * It is needed to switch to a different release channel if the current release channel is more recent.
155
+ * Note: we don�t recommend to use this method in scenarios other than that (CodePush will call this method
156
156
  * automatically when needed in other cases) as it could lead to unpredictable behavior.
157
157
  */
158
158
  REACT_METHOD(ClearUpdates, L"clearUpdates");
@@ -18,12 +18,12 @@ namespace Microsoft::CodePush::ReactNative
18
18
 
19
19
  static const std::wstring_view AppVersionKey{ L"appVersion" };
20
20
  static const std::wstring_view DeploymentFailed{ L"DeploymentFailed" };
21
- static const std::wstring_view DeploymentKeyKey{ L"deploymentKey" };
21
+ static const std::wstring_view ReleaseChannelPublicIdKey{ L"releaseChannelPublicId" };
22
22
  static const std::wstring_view DeploymentSucceeded{ L"DeploymentSucceeded" };
23
23
  static const std::wstring_view LabelKey{ L"label" };
24
24
  static const std::wstring_view LastDeploymentReportKey{ L"CODE_PUSH_LAST_DEPLOYMENT_REPORT" };
25
25
  static const std::wstring_view PackageKey{ L"package" };
26
- static const std::wstring_view PreviousDeploymentKeyKey{ L"previousDeploymentKey" };
26
+ static const std::wstring_view PreviousReleaseChannelPublicIdKey{ L"previousReleaseChannelPublicId" };
27
27
  static const std::wstring_view PreviousLabelOrAppVersionKey{ L"previousLabelOrAppVersion" };
28
28
  static const std::wstring_view RetryDeploymentReportKey{ L"CODE_PUSH_RETRY_DEPLOYMENT_REPORT" };
29
29
  static const std::wstring_view StatusKey{ L"status" };
@@ -42,12 +42,12 @@ namespace Microsoft::CodePush::ReactNative
42
42
  {
43
43
  if (IsStatusReportIdentifierCodePushLabel(previousStatusReportIdentifier))
44
44
  {
45
- auto previousDeploymentKey{ GetDeploymentKeyFromStatusReportIdentifier(previousStatusReportIdentifier) };
45
+ auto previousReleaseChannelPublicId{ GetReleaseChannelPublicIdFromStatusReportIdentifier(previousStatusReportIdentifier) };
46
46
  auto previousLabel{ GetVersionLabelFromStatusReportIdentifier(previousStatusReportIdentifier) };
47
47
  ClearRetryStatusReport();
48
48
  JsonObject out;
49
49
  out.Insert(AppVersionKey, JsonValue::CreateStringValue(appVersion));
50
- out.Insert(PreviousDeploymentKeyKey, JsonValue::CreateStringValue(previousDeploymentKey));
50
+ out.Insert(PreviousReleaseChannelPublicIdKey, JsonValue::CreateStringValue(previousReleaseChannelPublicId));
51
51
  out.Insert(PreviousLabelOrAppVersionKey, JsonValue::CreateStringValue(previousLabel));
52
52
  return out;
53
53
  }
@@ -109,12 +109,12 @@ namespace Microsoft::CodePush::ReactNative
109
109
  ClearRetryStatusReport();
110
110
  if (IsStatusReportIdentifierCodePushLabel(previousStatusReportIdentifier))
111
111
  {
112
- auto previousDeploymentKey{ GetDeploymentKeyFromStatusReportIdentifier(previousStatusReportIdentifier) };
112
+ auto previousReleaseChannelPublicId{ GetReleaseChannelPublicIdFromStatusReportIdentifier(previousStatusReportIdentifier) };
113
113
  auto previousLabel{ GetVersionLabelFromStatusReportIdentifier(previousStatusReportIdentifier) };
114
114
  JsonObject out;
115
115
  out.Insert(PackageKey, currentPackage);
116
116
  out.Insert(StatusKey, JsonValue::CreateStringValue(DeploymentSucceeded));
117
- out.Insert(PreviousDeploymentKeyKey, JsonValue::CreateStringValue(previousDeploymentKey));
117
+ out.Insert(PreviousReleaseChannelPublicIdKey, JsonValue::CreateStringValue(previousReleaseChannelPublicId));
118
118
  out.Insert(PreviousLabelOrAppVersionKey, JsonValue::CreateStringValue(previousLabel));
119
119
  return out;
120
120
  }
@@ -165,22 +165,22 @@ namespace Microsoft::CodePush::ReactNative
165
165
  localSettings.Values().Remove(RetryDeploymentReportKey);
166
166
  }
167
167
 
168
- /*static*/ std::wstring_view CodePushTelemetryManager::GetDeploymentKeyFromStatusReportIdentifier(std::wstring_view statusReportIdentifier)
168
+ /*static*/ std::wstring_view CodePushTelemetryManager::GetReleaseChannelPublicIdFromStatusReportIdentifier(std::wstring_view statusReportIdentifier)
169
169
  {
170
170
  return statusReportIdentifier.substr(0, statusReportIdentifier.find(':'));
171
171
  }
172
172
 
173
173
  /*static*/ hstring CodePushTelemetryManager::GetPackageStatusReportIdentifier(const JsonObject& package)
174
174
  {
175
- // Because deploymentKeys can be dynamically switched, we use a
176
- // combination of the deploymentKey and label as the packageIdentifier.
177
- if (package.HasKey(DeploymentKeyKey) && package.HasKey(LabelKey))
175
+ // Because release channels can be dynamically switched, we use a
176
+ // combination of the release channel public ID and label as the packageIdentifier.
177
+ if (package.HasKey(ReleaseChannelPublicIdKey) && package.HasKey(LabelKey))
178
178
  {
179
179
  return L"";
180
180
  }
181
- auto deploymentKey{ package.GetNamedString(DeploymentKeyKey) };
181
+ auto releaseChannelPublicId{ package.GetNamedString(ReleaseChannelPublicIdKey) };
182
182
  auto label{ package.GetNamedString(LabelKey) };
183
- return deploymentKey + L":" + label;
183
+ return releaseChannelPublicId + L":" + label;
184
184
  }
185
185
 
186
186
  /*static*/ hstring CodePushTelemetryManager::GetPreviousStatusReportIdentifier()
@@ -19,7 +19,7 @@ namespace Microsoft::CodePush::ReactNative
19
19
 
20
20
  private:
21
21
  static void ClearRetryStatusReport();
22
- static std::wstring_view GetDeploymentKeyFromStatusReportIdentifier(std::wstring_view statusReportIdentifier);
22
+ static std::wstring_view GetReleaseChannelPublicIdFromStatusReportIdentifier(std::wstring_view statusReportIdentifier);
23
23
  static winrt::hstring GetPackageStatusReportIdentifier(const winrt::Windows::Data::Json::JsonObject& package);
24
24
  static winrt::hstring GetPreviousStatusReportIdentifier();
25
25
  static std::wstring_view GetVersionLabelFromStatusReportIdentifier(std::wstring_view statusReportIdentifier);