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

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 (322) hide show
  1. package/CodePush.podspec +1 -0
  2. package/LICENSE.md +2 -2
  3. package/README.md +74 -95
  4. package/android/app/build.gradle +62 -18
  5. package/android/app/src/main/AndroidManifest.xml +2 -3
  6. package/android/app/src/main/AndroidManifestNew.xml +3 -0
  7. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePush.java +21 -89
  8. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNativeModule.java +32 -3
  9. package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateManager.java +2 -2
  10. package/android/build.gradle +1 -11
  11. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  12. package/android/gradle.properties +4 -20
  13. package/docs/advanced-usage.md +2 -2
  14. package/docs/api-android.md +12 -10
  15. package/docs/api-ios.md +5 -5
  16. package/docs/api-js.md +180 -178
  17. package/docs/code-signing.md +62 -0
  18. package/docs/migrating-to-v10.md +31 -0
  19. package/docs/setup-android.md +52 -79
  20. package/docs/setup-ios.md +31 -28
  21. package/docs/setup-windows.md +1 -0
  22. package/ios/CodePush/CodePush.m +13 -57
  23. package/lib/commonjs/CodePush.js +90 -0
  24. package/lib/commonjs/CodePush.js.map +1 -0
  25. package/lib/commonjs/allowRestart.js +12 -0
  26. package/lib/commonjs/allowRestart.js.map +1 -0
  27. package/lib/commonjs/checkForUpdates.js +105 -0
  28. package/lib/commonjs/checkForUpdates.js.map +1 -0
  29. package/lib/commonjs/clearUpdates.js +15 -0
  30. package/lib/commonjs/clearUpdates.js.map +1 -0
  31. package/lib/commonjs/disallowRestart.js +12 -0
  32. package/lib/commonjs/disallowRestart.js.map +1 -0
  33. package/lib/commonjs/enums/CheckFrequency.enum.js +25 -0
  34. package/lib/commonjs/enums/CheckFrequency.enum.js.map +1 -0
  35. package/lib/commonjs/enums/DeploymentStatus.enum.js +21 -0
  36. package/lib/commonjs/enums/DeploymentStatus.enum.js.map +1 -0
  37. package/lib/commonjs/enums/InstallMode.enum.js +35 -0
  38. package/lib/commonjs/enums/InstallMode.enum.js.map +1 -0
  39. package/lib/commonjs/enums/SyncStatus.enum.js +53 -0
  40. package/lib/commonjs/enums/SyncStatus.enum.js.map +1 -0
  41. package/lib/commonjs/enums/UpdateState.enum.js +29 -0
  42. package/lib/commonjs/enums/UpdateState.enum.js.map +1 -0
  43. package/lib/commonjs/getUpdateMetadata.js +25 -0
  44. package/lib/commonjs/getUpdateMetadata.js.map +1 -0
  45. package/lib/commonjs/index.js +195 -0
  46. package/lib/commonjs/index.js.map +1 -0
  47. package/lib/commonjs/internals/AcquisitionSdk.js +9 -0
  48. package/lib/commonjs/internals/AcquisitionSdk.js.map +1 -0
  49. package/lib/commonjs/internals/LocalPackageImplementation.js +29 -0
  50. package/lib/commonjs/internals/LocalPackageImplementation.js.map +1 -0
  51. package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js +8 -0
  52. package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js.map +1 -0
  53. package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js +6 -0
  54. package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
  55. package/lib/commonjs/internals/RemotePackageImplementation.js +49 -0
  56. package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -0
  57. package/lib/commonjs/internals/getConfiguration.js +15 -0
  58. package/lib/commonjs/internals/getConfiguration.js.map +1 -0
  59. package/lib/commonjs/internals/getCurrentPackage.js +12 -0
  60. package/lib/commonjs/internals/getCurrentPackage.js.map +1 -0
  61. package/lib/commonjs/internals/getPromisifiedSdk.js +49 -0
  62. package/lib/commonjs/internals/getPromisifiedSdk.js.map +1 -0
  63. package/lib/commonjs/internals/shouldUpdateBeIgnored.js +62 -0
  64. package/lib/commonjs/internals/shouldUpdateBeIgnored.js.map +1 -0
  65. package/lib/commonjs/internals/types.js +6 -0
  66. package/lib/commonjs/internals/types.js.map +1 -0
  67. package/lib/commonjs/internals/utils/log.js +11 -0
  68. package/lib/commonjs/internals/utils/log.js.map +1 -0
  69. package/lib/commonjs/internals/utils/request-fetch-adapter.js +50 -0
  70. package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +1 -0
  71. package/lib/commonjs/internals/version.js +9 -0
  72. package/lib/commonjs/internals/version.js.map +1 -0
  73. package/lib/commonjs/notifyAppReady.js +83 -0
  74. package/lib/commonjs/notifyAppReady.js.map +1 -0
  75. package/lib/commonjs/reactNative.d.js +2 -0
  76. package/lib/commonjs/reactNative.d.js.map +1 -0
  77. package/lib/commonjs/restartApp.js +16 -0
  78. package/lib/commonjs/restartApp.js.map +1 -0
  79. package/lib/commonjs/sync.js +219 -0
  80. package/lib/commonjs/sync.js.map +1 -0
  81. package/lib/commonjs/types.js +6 -0
  82. package/lib/commonjs/types.js.map +1 -0
  83. package/lib/module/CodePush.js +84 -0
  84. package/lib/module/CodePush.js.map +1 -0
  85. package/lib/module/allowRestart.js +9 -0
  86. package/lib/module/allowRestart.js.map +1 -0
  87. package/lib/module/checkForUpdates.js +101 -0
  88. package/lib/module/checkForUpdates.js.map +1 -0
  89. package/lib/module/clearUpdates.js +12 -0
  90. package/lib/module/clearUpdates.js.map +1 -0
  91. package/lib/module/disallowRestart.js +9 -0
  92. package/lib/module/disallowRestart.js.map +1 -0
  93. package/lib/module/enums/CheckFrequency.enum.js +21 -0
  94. package/lib/module/enums/CheckFrequency.enum.js.map +1 -0
  95. package/lib/module/enums/DeploymentStatus.enum.js +17 -0
  96. package/lib/module/enums/DeploymentStatus.enum.js.map +1 -0
  97. package/lib/module/enums/InstallMode.enum.js +32 -0
  98. package/lib/module/enums/InstallMode.enum.js.map +1 -0
  99. package/lib/module/enums/SyncStatus.enum.js +49 -0
  100. package/lib/module/enums/SyncStatus.enum.js.map +1 -0
  101. package/lib/module/enums/UpdateState.enum.js +26 -0
  102. package/lib/module/enums/UpdateState.enum.js.map +1 -0
  103. package/lib/module/getUpdateMetadata.js +21 -0
  104. package/lib/module/getUpdateMetadata.js.map +1 -0
  105. package/lib/module/index.js +19 -0
  106. package/lib/module/index.js.map +1 -0
  107. package/lib/module/internals/AcquisitionSdk.js +5 -0
  108. package/lib/module/internals/AcquisitionSdk.js.map +1 -0
  109. package/lib/module/internals/LocalPackageImplementation.js +24 -0
  110. package/lib/module/internals/LocalPackageImplementation.js.map +1 -0
  111. package/lib/module/internals/NativeRNAppZungCodePushModule.js +4 -0
  112. package/lib/module/internals/NativeRNAppZungCodePushModule.js.map +1 -0
  113. package/lib/module/internals/RNAppZungCodePushModuleSpec.js +4 -0
  114. package/lib/module/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
  115. package/lib/module/internals/RemotePackageImplementation.js +44 -0
  116. package/lib/module/internals/RemotePackageImplementation.js.map +1 -0
  117. package/lib/module/internals/getConfiguration.js +11 -0
  118. package/lib/module/internals/getConfiguration.js.map +1 -0
  119. package/lib/module/internals/getCurrentPackage.js +8 -0
  120. package/lib/module/internals/getCurrentPackage.js.map +1 -0
  121. package/lib/module/internals/getPromisifiedSdk.js +45 -0
  122. package/lib/module/internals/getPromisifiedSdk.js.map +1 -0
  123. package/lib/module/internals/shouldUpdateBeIgnored.js +58 -0
  124. package/lib/module/internals/shouldUpdateBeIgnored.js.map +1 -0
  125. package/lib/module/internals/types.js +4 -0
  126. package/lib/module/internals/types.js.map +1 -0
  127. package/lib/module/internals/utils/log.js +7 -0
  128. package/lib/module/internals/utils/log.js.map +1 -0
  129. package/lib/module/internals/utils/request-fetch-adapter.js +46 -0
  130. package/lib/module/internals/utils/request-fetch-adapter.js.map +1 -0
  131. package/lib/module/internals/version.js +5 -0
  132. package/lib/module/internals/version.js.map +1 -0
  133. package/lib/module/notifyAppReady.js +79 -0
  134. package/lib/module/notifyAppReady.js.map +1 -0
  135. package/lib/module/reactNative.d.js +2 -0
  136. package/lib/module/reactNative.d.js.map +1 -0
  137. package/lib/module/restartApp.js +13 -0
  138. package/lib/module/restartApp.js.map +1 -0
  139. package/lib/module/sync.js +215 -0
  140. package/lib/module/sync.js.map +1 -0
  141. package/lib/module/types.js +4 -0
  142. package/lib/module/types.js.map +1 -0
  143. package/lib/typescript/commonjs/package.json +1 -0
  144. package/lib/typescript/commonjs/src/CodePush.d.ts +24 -0
  145. package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/src/allowRestart.d.ts +5 -0
  147. package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/src/checkForUpdates.d.ts +9 -0
  149. package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/src/clearUpdates.d.ts +8 -0
  151. package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/src/disallowRestart.d.ts +5 -0
  153. package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +18 -0
  155. package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +14 -0
  157. package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +27 -0
  159. package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -0
  160. package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +46 -0
  161. package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +21 -0
  163. package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts +9 -0
  165. package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/src/index.d.ts +17 -0
  167. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +3 -0
  169. package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts +17 -0
  171. package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
  173. package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
  175. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +18 -0
  177. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +3 -0
  179. package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts +2 -0
  181. package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +13 -0
  183. package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
  185. package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/src/internals/types.d.ts +16 -0
  187. package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/src/internals/utils/log.d.ts +2 -0
  189. package/lib/typescript/commonjs/src/internals/utils/log.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +3 -0
  191. package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/src/internals/version.d.ts +2 -0
  193. package/lib/typescript/commonjs/src/internals/version.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/src/notifyAppReady.d.ts +6 -0
  195. package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/src/restartApp.d.ts +7 -0
  197. package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/src/sync.d.ts +17 -0
  199. package/lib/typescript/commonjs/src/sync.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/src/types.d.ts +196 -0
  201. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  202. package/lib/typescript/module/package.json +1 -0
  203. package/lib/typescript/module/src/CodePush.d.ts +24 -0
  204. package/lib/typescript/module/src/CodePush.d.ts.map +1 -0
  205. package/lib/typescript/module/src/allowRestart.d.ts +5 -0
  206. package/lib/typescript/module/src/allowRestart.d.ts.map +1 -0
  207. package/lib/typescript/module/src/checkForUpdates.d.ts +9 -0
  208. package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -0
  209. package/lib/typescript/module/src/clearUpdates.d.ts +8 -0
  210. package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -0
  211. package/lib/typescript/module/src/disallowRestart.d.ts +5 -0
  212. package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -0
  213. package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +18 -0
  214. package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts.map +1 -0
  215. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +14 -0
  216. package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
  217. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +27 -0
  218. package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -0
  219. package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +46 -0
  220. package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts.map +1 -0
  221. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +21 -0
  222. package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -0
  223. package/lib/typescript/module/src/getUpdateMetadata.d.ts +9 -0
  224. package/lib/typescript/module/src/getUpdateMetadata.d.ts.map +1 -0
  225. package/lib/typescript/module/src/index.d.ts +17 -0
  226. package/lib/typescript/module/src/index.d.ts.map +1 -0
  227. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +3 -0
  228. package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +1 -0
  229. package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts +17 -0
  230. package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts.map +1 -0
  231. package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
  232. package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
  233. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
  234. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
  235. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +18 -0
  236. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -0
  237. package/lib/typescript/module/src/internals/getConfiguration.d.ts +3 -0
  238. package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -0
  239. package/lib/typescript/module/src/internals/getCurrentPackage.d.ts +2 -0
  240. package/lib/typescript/module/src/internals/getCurrentPackage.d.ts.map +1 -0
  241. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +13 -0
  242. package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +1 -0
  243. package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
  244. package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
  245. package/lib/typescript/module/src/internals/types.d.ts +16 -0
  246. package/lib/typescript/module/src/internals/types.d.ts.map +1 -0
  247. package/lib/typescript/module/src/internals/utils/log.d.ts +2 -0
  248. package/lib/typescript/module/src/internals/utils/log.d.ts.map +1 -0
  249. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +3 -0
  250. package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
  251. package/lib/typescript/module/src/internals/version.d.ts +2 -0
  252. package/lib/typescript/module/src/internals/version.d.ts.map +1 -0
  253. package/lib/typescript/module/src/notifyAppReady.d.ts +6 -0
  254. package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -0
  255. package/lib/typescript/module/src/restartApp.d.ts +7 -0
  256. package/lib/typescript/module/src/restartApp.d.ts.map +1 -0
  257. package/lib/typescript/module/src/sync.d.ts +17 -0
  258. package/lib/typescript/module/src/sync.d.ts.map +1 -0
  259. package/lib/typescript/module/src/types.d.ts +196 -0
  260. package/lib/typescript/module/src/types.d.ts.map +1 -0
  261. package/package.json +58 -11
  262. package/react-native.config.js +8 -8
  263. package/src/CodePush.tsx +108 -0
  264. package/src/allowRestart.ts +6 -0
  265. package/src/checkForUpdates.ts +109 -0
  266. package/src/clearUpdates.ts +9 -0
  267. package/src/disallowRestart.ts +6 -0
  268. package/src/enums/CheckFrequency.enum.ts +19 -0
  269. package/src/enums/DeploymentStatus.enum.ts +14 -0
  270. package/src/enums/InstallMode.enum.ts +31 -0
  271. package/src/enums/SyncStatus.enum.ts +53 -0
  272. package/src/enums/UpdateState.enum.ts +24 -0
  273. package/src/getUpdateMetadata.ts +23 -0
  274. package/src/index.ts +18 -0
  275. package/src/internals/AcquisitionSdk.ts +3 -0
  276. package/src/internals/LocalPackageImplementation.ts +45 -0
  277. package/src/internals/NativeRNAppZungCodePushModule.ts +3 -0
  278. package/src/internals/RNAppZungCodePushModuleSpec.ts +54 -0
  279. package/src/internals/RemotePackageImplementation.ts +69 -0
  280. package/src/internals/getConfiguration.ts +12 -0
  281. package/src/internals/getCurrentPackage.ts +6 -0
  282. package/src/internals/getPromisifiedSdk.ts +72 -0
  283. package/src/internals/shouldUpdateBeIgnored.ts +76 -0
  284. package/src/internals/types.ts +18 -0
  285. package/{logging.js → src/internals/utils/log.ts} +1 -3
  286. package/src/internals/utils/request-fetch-adapter.ts +58 -0
  287. package/src/internals/version.ts +2 -0
  288. package/src/notifyAppReady.ts +94 -0
  289. package/src/reactNative.d.ts +34 -0
  290. package/src/restartApp.ts +10 -0
  291. package/src/sync.ts +272 -0
  292. package/src/types.ts +237 -0
  293. package/tsconfig.build.json +4 -0
  294. package/tsconfig.json +29 -12
  295. package/AlertAdapter.js +0 -24
  296. package/CONTRIBUTING.md +0 -134
  297. package/CodePush.js +0 -674
  298. package/android/app/.gradle/config.properties +0 -2
  299. package/android/app/local.properties +0 -8
  300. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
  301. package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +0 -102
  302. package/package-mixins.js +0 -68
  303. package/request-fetch-adapter.js +0 -52
  304. package/tslint.json +0 -32
  305. package/typings/react-native-code-push.d.ts +0 -455
  306. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushConstants.java +0 -0
  307. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInstallMode.java +0 -0
  308. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidPublicKeyException.java +0 -0
  309. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidUpdateException.java +0 -0
  310. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushMalformedDataException.java +0 -0
  311. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNotInitializedException.java +0 -0
  312. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushTelemetryManager.java +0 -0
  313. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUnknownException.java +0 -0
  314. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateState.java +0 -0
  315. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateUtils.java +0 -0
  316. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUtils.java +0 -0
  317. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgress.java +0 -0
  318. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgressCallback.java +0 -0
  319. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/FileUtils.java +0 -0
  320. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/ReactInstanceHolder.java +0 -0
  321. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/SettingsManager.java +0 -0
  322. /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/TLSSocketFactory.java +0 -0
@@ -0,0 +1,17 @@
1
+ import type { InstallMode } from '../enums/InstallMode.enum';
2
+ import type { LocalPackage } from '../types';
3
+ export declare class LocalPackageImplementation implements LocalPackage {
4
+ constructor(localPackageData: Omit<LocalPackage, 'install'>);
5
+ appVersion: string;
6
+ description: string;
7
+ failedInstall: boolean;
8
+ isFirstRun: boolean;
9
+ isMandatory: boolean;
10
+ isPending: boolean;
11
+ label: string;
12
+ packageHash: string;
13
+ packageSize: number;
14
+ releaseChannelPublicId: string;
15
+ install: (installMode?: InstallMode, minimumBackgroundDuration?: number, onUpdateInstalled?: () => Promise<void> | void) => Promise<void>;
16
+ }
17
+ //# sourceMappingURL=LocalPackageImplementation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalPackageImplementation.d.ts","sourceRoot":"","sources":["../../../../../src/internals/LocalPackageImplementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,qBAAa,0BAA2B,YAAW,YAAY;gBACjD,gBAAgB,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC;IAuB3D,UAAU,EAAG,MAAM,CAAC;IACpB,WAAW,EAAG,MAAM,CAAC;IACrB,aAAa,EAAG,OAAO,CAAC;IACxB,UAAU,EAAG,OAAO,CAAC;IACrB,WAAW,EAAG,OAAO,CAAC;IACtB,SAAS,UAAS;IAClB,KAAK,EAAG,MAAM,CAAC;IACf,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,sBAAsB,EAAG,MAAM,CAAC;IAEhC,OAAO,EAAE,CACP,WAAW,CAAC,EAAE,WAAW,EACzB,yBAAyB,CAAC,EAAE,MAAM,EAClC,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,KAC3C,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
@@ -0,0 +1,3 @@
1
+ import { type Spec } from './RNAppZungCodePushModuleSpec';
2
+ export declare const NativeRNAppZungCodePushModule: Spec;
3
+ //# sourceMappingURL=NativeRNAppZungCodePushModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeRNAppZungCodePushModule.d.ts","sourceRoot":"","sources":["../../../../../src/internals/NativeRNAppZungCodePushModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAE1D,eAAO,MAAM,6BAA6B,EAAqD,IAAI,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { type TurboModule } from 'react-native';
2
+ import type { InstallMode } from '../enums/InstallMode.enum';
3
+ import type { UpdateState } from '../enums/UpdateState.enum';
4
+ import type { LocalPackage, RemotePackage, StatusReport } from '../types';
5
+ import type { Configuration, LatestRollbackInfo, OmitFunctions } from './types';
6
+ export interface Spec extends TurboModule {
7
+ addListener: (eventName: string) => void;
8
+ removeListeners: (count: number) => void;
9
+ getConstants(): {
10
+ codePushInstallModeImmediate: number;
11
+ codePushInstallModeOnNextRestart: number;
12
+ codePushInstallModeOnNextResume: number;
13
+ codePushInstallModeOnNextSuspend: number;
14
+ codePushUpdateStateLatest: number;
15
+ codePushUpdateStatePending: number;
16
+ codePushUpdateStateRunning: number;
17
+ };
18
+ getConfiguration(): Promise<Configuration>;
19
+ getUpdateMetadata(updateState: UpdateState): Promise<OmitFunctions<LocalPackage>>;
20
+ installUpdate(localPackage: OmitFunctions<LocalPackage>, installMode: InstallMode, minimumBackgroundDuration: number): Promise<void>;
21
+ downloadUpdate(remotePackage: OmitFunctions<RemotePackage>, notifyProgress: boolean): Promise<OmitFunctions<LocalPackage>>;
22
+ restartApp(onlyIfUpdateIsPending: boolean): Promise<void>;
23
+ clearPendingRestart(): Promise<void>;
24
+ disallow(): Promise<void>;
25
+ allow(): Promise<void>;
26
+ clearUpdates(): void;
27
+ notifyApplicationReady(): Promise<void>;
28
+ setLatestRollbackInfo(packageHash: string): Promise<void>;
29
+ getNewStatusReport(): Promise<StatusReport>;
30
+ recordStatusReported(statusReport: StatusReport): void;
31
+ saveStatusReportForRetry(statusReport: StatusReport): void;
32
+ getLatestRollbackInfo(): Promise<LatestRollbackInfo>;
33
+ isFirstRun(packageHash: string): Promise<boolean>;
34
+ isFailedUpdate(packageHash: string): Promise<boolean>;
35
+ }
36
+ //# sourceMappingURL=RNAppZungCodePushModuleSpec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RNAppZungCodePushModuleSpec.d.ts","sourceRoot":"","sources":["../../../../../src/internals/RNAppZungCodePushModuleSpec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEhF,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEzC,YAAY,IAAI;QACd,4BAA4B,EAAE,MAAM,CAAC;QACrC,gCAAgC,EAAE,MAAM,CAAC;QACzC,+BAA+B,EAAE,MAAM,CAAC;QACxC,gCAAgC,EAAE,MAAM,CAAC;QAEzC,yBAAyB,EAAE,MAAM,CAAC;QAClC,0BAA0B,EAAE,MAAM,CAAC;QACnC,0BAA0B,EAAE,MAAM,CAAC;KACpC,CAAC;IAEF,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IAE3C,iBAAiB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC;IAClF,aAAa,CACX,YAAY,EAAE,aAAa,CAAC,YAAY,CAAC,EACzC,WAAW,EAAE,WAAW,EACxB,yBAAyB,EAAE,MAAM,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,cAAc,CACZ,aAAa,EAAE,aAAa,CAAC,aAAa,CAAC,EAC3C,cAAc,EAAE,OAAO,GACtB,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC;IAExC,UAAU,CAAC,qBAAqB,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB,YAAY,IAAI,IAAI,CAAC;IAErB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IAC5C,oBAAoB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IACvD,wBAAwB,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAE3D,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAErD,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvD"}
@@ -0,0 +1,18 @@
1
+ import type { Package } from 'code-push/script/acquisition-sdk';
2
+ import type { DownloadProgressCallback, LocalPackage, RemotePackage } from '../types';
3
+ export declare class RemotePackageImpl implements RemotePackage {
4
+ constructor(remotePackageData: Omit<RemotePackage, 'download'>, reportStatusDownload?: (downloadedPackage: Package) => Promise<void>);
5
+ download: (downloadProgressCallback?: DownloadProgressCallback) => Promise<LocalPackage>;
6
+ appVersion: string;
7
+ description: string;
8
+ downloadUrl: string;
9
+ failedInstall: boolean;
10
+ isFirstRun: boolean;
11
+ isMandatory: boolean;
12
+ isPending: boolean;
13
+ label: string;
14
+ packageHash: string;
15
+ packageSize: number;
16
+ releaseChannelPublicId: string;
17
+ }
18
+ //# sourceMappingURL=RemotePackageImplementation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemotePackageImplementation.d.ts","sourceRoot":"","sources":["../../../../../src/internals/RemotePackageImplementation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKtF,qBAAa,iBAAkB,YAAW,aAAa;gBAEnD,iBAAiB,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,EAClD,oBAAoB,CAAC,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC;IA6CtE,QAAQ,EAAE,CAAC,wBAAwB,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAEzF,UAAU,EAAG,MAAM,CAAC;IACpB,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,aAAa,EAAG,OAAO,CAAC;IACxB,UAAU,EAAG,OAAO,CAAC;IACrB,WAAW,EAAG,OAAO,CAAC;IACtB,SAAS,UAAS;IAClB,KAAK,EAAG,MAAM,CAAC;IACf,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,sBAAsB,EAAG,MAAM,CAAC;CACjC"}
@@ -0,0 +1,3 @@
1
+ import type { Configuration } from './types';
2
+ export declare function getConfiguration(): Promise<Configuration>;
3
+ //# sourceMappingURL=getConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConfiguration.d.ts","sourceRoot":"","sources":["../../../../../src/internals/getConfiguration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,wBAAsB,gBAAgB,2BAMrC"}
@@ -0,0 +1,2 @@
1
+ export declare function getCurrentPackage(): Promise<import("..").LocalPackage | null>;
2
+ //# sourceMappingURL=getCurrentPackage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCurrentPackage.d.ts","sourceRoot":"","sources":["../../../../../src/internals/getCurrentPackage.ts"],"names":[],"mappings":"AAGA,wBAAsB,iBAAiB,8CAEtC"}
@@ -0,0 +1,13 @@
1
+ import type { Http, NativeUpdateNotification, Package, RemotePackage } from 'code-push/script/acquisition-sdk';
2
+ import type { Configuration } from './types';
3
+ export type PromisifiedSdkQueryPackage = Pick<Package, 'appVersion'> & {
4
+ packageHash?: string;
5
+ };
6
+ type PromisifiedSdk = {
7
+ queryUpdateWithCurrentPackage: (queryPackage: PromisifiedSdkQueryPackage) => Promise<RemotePackage | NativeUpdateNotification>;
8
+ reportStatusDeploy: (deployedPackage?: Package, status?: string, previousLabelOrAppVersion?: string, previousDeploymentKey?: string) => Promise<void>;
9
+ reportStatusDownload: (downloadedPackage: Package) => Promise<void>;
10
+ };
11
+ export declare function getPromisifiedSdk(requestFetchAdapter: Http.Requester, config: Configuration): PromisifiedSdk;
12
+ export {};
13
+ //# sourceMappingURL=getPromisifiedSdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPromisifiedSdk.d.ts","sourceRoot":"","sources":["../../../../../src/internals/getPromisifiedSdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAE/G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG,KAAK,cAAc,GAAG;IACpB,6BAA6B,EAAE,CAC7B,YAAY,EAAE,0BAA0B,KACrC,OAAO,CAAC,aAAa,GAAG,wBAAwB,CAAC,CAAC;IACvD,kBAAkB,EAAE,CAClB,eAAe,CAAC,EAAE,OAAO,EACzB,MAAM,CAAC,EAAE,MAAM,EACf,yBAAyB,CAAC,EAAE,MAAM,EAClC,qBAAqB,CAAC,EAAE,MAAM,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,oBAAoB,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,cAAc,CAoD5G"}
@@ -0,0 +1,3 @@
1
+ import type { RemotePackage, SyncOptions } from '../types';
2
+ export declare function shouldUpdateBeIgnored(remotePackage: RemotePackage | null | undefined, syncOptions: SyncOptions): Promise<boolean>;
3
+ //# sourceMappingURL=shouldUpdateBeIgnored.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shouldUpdateBeIgnored.d.ts","sourceRoot":"","sources":["../../../../../src/internals/shouldUpdateBeIgnored.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAwB,WAAW,EAAE,MAAM,UAAU,CAAC;AAuCjF,wBAAsB,qBAAqB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,EAAE,WAAW,EAAE,WAAW,oBAoCpH"}
@@ -0,0 +1,16 @@
1
+ import type { Configuration as BaseConfiguration } from 'code-push/script/acquisition-sdk';
2
+ export interface Configuration extends BaseConfiguration {
3
+ releaseChannelPublicId: string;
4
+ packageHash?: string;
5
+ }
6
+ export interface LatestRollbackInfo {
7
+ time: number;
8
+ count: number;
9
+ packageHash: string;
10
+ }
11
+ type FunctionPropertyNames<T> = {
12
+ [K in keyof T]: T[K] extends Function ? K : never;
13
+ }[keyof T];
14
+ export type OmitFunctions<T extends object> = Omit<T, FunctionPropertyNames<T>>;
15
+ export {};
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/internals/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE3F,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,qBAAqB,CAAC,CAAC,IAAI;KAC7B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,CAAC,GAAG,KAAK;CAClD,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI,IAAI,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function log(message: string): void;
2
+ //# sourceMappingURL=log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/log.ts"],"names":[],"mappings":"AACA,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEzC"}
@@ -0,0 +1,3 @@
1
+ import { Http } from 'code-push/script/acquisition-sdk';
2
+ export declare const requestFetchAdapter: Http.Requester;
3
+ //# sourceMappingURL=request-fetch-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-fetch-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/request-fetch-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAOxD,eAAO,MAAM,mBAAmB,EAAE,IAAI,CAAC,SAsCtC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const version = "10.0.1";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../../src/internals/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,WAAW,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { StatusReport } from './types';
2
+ /**
3
+ * Notifies the CodePush runtime that an installed update is considered successful.
4
+ */
5
+ export declare const notifyAppReady: () => Promise<void | StatusReport>;
6
+ //# sourceMappingURL=notifyAppReady.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifyAppReady.d.ts","sourceRoot":"","sources":["../../../../src/notifyAppReady.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,cAAc,oCAYvB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Immediately restarts the app.
3
+ *
4
+ * @param onlyIfUpdateIsPending Indicates whether you want the restart to no-op if there isn't currently a pending update.
5
+ */
6
+ export declare function restartApp(onlyIfUpdateIsPending?: boolean): Promise<void>;
7
+ //# sourceMappingURL=restartApp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restartApp.d.ts","sourceRoot":"","sources":["../../../../src/restartApp.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,qBAAqB,UAAQ,iBAE7D"}
@@ -0,0 +1,17 @@
1
+ import { SyncStatus } from './enums/SyncStatus.enum';
2
+ import type { DownloadProgressCallback, HandleBinaryVersionMismatchCallback, SyncOptions, SyncStatusChangedCallback, UpdateDialog } from './types';
3
+ /**
4
+ * Represents the default settings that will be used by the sync method if
5
+ * an update dialog is configured to be displayed.
6
+ */
7
+ export declare const DEFAULT_UPDATE_DIALOG: UpdateDialog;
8
+ /**
9
+ * Allows checking for an update, downloading it and installing it, all with a single call.
10
+ *
11
+ * @param options Options used to configure the end-user update experience (e.g. show a prompt?, install the update immediately?).
12
+ * @param syncStatusChangedCallback An optional callback that allows tracking the status of the sync operation, as opposed to simply checking the resolved state via the returned Promise.
13
+ * @param downloadProgressCallback An optional callback that allows tracking the progress of an update while it is being downloaded.
14
+ * @param handleBinaryVersionMismatchCallback An optional callback for handling target binary version mismatch
15
+ */
16
+ export declare const sync: (options?: SyncOptions, syncStatusChangeCallback?: SyncStatusChangedCallback, downloadProgressCallback?: DownloadProgressCallback, handleBinaryVersionMismatchCallback?: HandleBinaryVersionMismatchCallback) => Promise<SyncStatus>;
17
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/sync.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,OAAO,KAAK,EACV,wBAAwB,EACxB,mCAAmC,EACnC,WAAW,EACX,yBAAyB,EACzB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,YASnC,CAAC;AAgLF;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,aAUH,WAAW,6BACM,yBAAyB,6BACzB,wBAAwB,wCACb,mCAAmC,KACxE,OAAO,CAAC,UAAU,CA4CnB,CAAC"}
@@ -0,0 +1,196 @@
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
+ export interface UpdateDialog {
6
+ /**
7
+ * Indicates whether you would like to append the description of an available release to the
8
+ * notification message which is displayed to the end user. Defaults to false.
9
+ */
10
+ appendReleaseDescription?: boolean;
11
+ /**
12
+ * Indicates the string you would like to prefix the release description with, if any, when
13
+ * displaying the update notification to the end user. Defaults to " Description: "
14
+ */
15
+ descriptionPrefix?: string;
16
+ /**
17
+ * The text to use for the button the end user must press in order to install a mandatory update. Defaults to "Continue".
18
+ */
19
+ mandatoryContinueButtonLabel?: string;
20
+ /**
21
+ * The text used as the body of an update notification, when the update is specified as mandatory.
22
+ * Defaults to "An update is available that must be installed.".
23
+ */
24
+ mandatoryUpdateMessage?: string;
25
+ /**
26
+ * 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".
27
+ */
28
+ optionalIgnoreButtonLabel?: string;
29
+ /**
30
+ * The text to use for the button the end user can press in order to install an optional update. Defaults to "Install".
31
+ */
32
+ optionalInstallButtonLabel?: string;
33
+ /**
34
+ * 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?".
35
+ */
36
+ optionalUpdateMessage?: string;
37
+ /**
38
+ * The text used as the header of an update notification that is displayed to the end user. Defaults to "Update available".
39
+ */
40
+ title?: string;
41
+ }
42
+ export type DownloadProgressCallback = (progress: DownloadProgress) => void;
43
+ export type SyncStatusChangedCallback = (status: SyncStatus) => void;
44
+ export type HandleBinaryVersionMismatchCallback = (update: NativeUpdateNotification) => void;
45
+ export interface DownloadProgress {
46
+ /**
47
+ * The total number of bytes expected to be received for this update.
48
+ */
49
+ totalBytes: number;
50
+ /**
51
+ * The number of bytes downloaded thus far.
52
+ */
53
+ receivedBytes: number;
54
+ }
55
+ export interface LocalPackage extends Package {
56
+ /**
57
+ * Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app.
58
+ *
59
+ * @param installMode Indicates when you would like the update changes to take effect for the end-user.
60
+ * @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.
61
+ * @param onUpdateInstalled An optional promise called after app installation
62
+ */
63
+ install(installMode?: InstallMode, minimumBackgroundDuration?: number, onUpdateInstalled?: () => Promise<void> | void): Promise<void>;
64
+ }
65
+ export interface Package {
66
+ /**
67
+ * The app binary version that this update is dependent on. This is the value that was
68
+ * specified via the appStoreVersion parameter when calling the CLI's release command.
69
+ */
70
+ appVersion: string;
71
+ /**
72
+ * The release channel public ID that was used to originally download this update.
73
+ */
74
+ releaseChannelPublicId: string;
75
+ /**
76
+ * The description of the update. This is the same value that you specified in the CLI when you released the update.
77
+ */
78
+ description: string;
79
+ /**
80
+ * Indicates whether this update has been previously installed but was rolled back.
81
+ */
82
+ failedInstall: boolean;
83
+ /**
84
+ * Indicates whether this is the first time the update has been run after being installed.
85
+ */
86
+ isFirstRun: boolean;
87
+ /**
88
+ * Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
89
+ */
90
+ isMandatory: boolean;
91
+ /**
92
+ * Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart
93
+ * needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
94
+ */
95
+ isPending: boolean;
96
+ /**
97
+ * The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its release channel.
98
+ */
99
+ label: string;
100
+ /**
101
+ * The SHA hash value of the update.
102
+ */
103
+ packageHash: string;
104
+ /**
105
+ * The size of the code contained within the update, in bytes.
106
+ */
107
+ packageSize: number;
108
+ }
109
+ export interface RemotePackage extends Package {
110
+ /**
111
+ * Downloads the available update from the CodePush service.
112
+ *
113
+ * @param downloadProgressCallback An optional callback that allows tracking the progress of the update while it is being downloaded.
114
+ */
115
+ download(downloadProgressCallback?: DownloadProgressCallback): Promise<LocalPackage>;
116
+ /**
117
+ * The URL at which the package is available for download.
118
+ */
119
+ downloadUrl: string;
120
+ }
121
+ export interface SyncOptions {
122
+ /**
123
+ * Specifies the release channel you want to query for an update against. By default, this value is derived from the Info.plist
124
+ * file (iOS) and strings resources (Android), but this option allows you to override it from the script-side if you need to
125
+ * dynamically use a different release channel for a specific call to sync.
126
+ */
127
+ releaseChannelPublicId?: string;
128
+ /**
129
+ * Specifies when you would like to install optional updates (i.e. those that aren't marked as mandatory).
130
+ * Defaults to codePush.InstallMode.ON_NEXT_RESTART.
131
+ */
132
+ installMode?: InstallMode;
133
+ /**
134
+ * Specifies when you would like to install updates which are marked as mandatory.
135
+ * Defaults to codePush.InstallMode.IMMEDIATE.
136
+ */
137
+ mandatoryInstallMode?: InstallMode;
138
+ /**
139
+ * Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property
140
+ * only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME` or `InstallMode.ON_NEXT_SUSPEND`, and can be useful
141
+ * for getting your update in front of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying
142
+ * 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.
143
+ */
144
+ minimumBackgroundDuration?: number;
145
+ /**
146
+ * An "options" object used to determine whether a confirmation dialog should be displayed to the end user when an update is available,
147
+ * and if so, what strings to use. Defaults to null, which has the effect of disabling the dialog completely. Setting this to any truthy
148
+ * value will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as
149
+ * overriding one or more of the default strings.
150
+ */
151
+ updateDialog?: UpdateDialog | true;
152
+ /**
153
+ * The rollback retry mechanism allows the application to attempt to reinstall an update that was previously rolled back (with the restrictions
154
+ * 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
155
+ * for the rollback retry. This defaults to null, which has the effect of disabling the retry mechanism. Setting this to true will enable
156
+ * the retry mechanism with the default settings, and passing an object to this parameter allows enabling the rollback retry as well as overriding
157
+ * one or more of the default values.
158
+ */
159
+ rollbackRetryOptions?: RollbackRetryOptions | true;
160
+ ignoreFailedUpdates?: boolean;
161
+ }
162
+ export interface RollbackRetryOptions {
163
+ /**
164
+ * Specifies the minimum time in hours that the app will wait after the latest rollback
165
+ * before attempting to reinstall same rolled-back package. Defaults to `24`.
166
+ */
167
+ delayInHours?: number;
168
+ /**
169
+ * Specifies the maximum number of retry attempts that the app can make before it stops trying.
170
+ * Cannot be less than `1`. Defaults to `1`.
171
+ */
172
+ maxRetryAttempts?: number;
173
+ }
174
+ export interface StatusReport {
175
+ /**
176
+ * Whether the deployment succeeded or failed.
177
+ */
178
+ status: DeploymentStatus;
179
+ /**
180
+ * The version of the app that was deployed (for a native app upgrade).
181
+ */
182
+ appVersion?: string;
183
+ /**
184
+ * Details of the package that was deployed (or attempted to).
185
+ */
186
+ package?: Package;
187
+ /**
188
+ * Release channel used when deploying the previous package.
189
+ */
190
+ previousReleaseChannelPublicId?: string;
191
+ /**
192
+ * The label (v#) of the package that was upgraded from.
193
+ */
194
+ previousLabelOrAppVersion?: string;
195
+ }
196
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appzung/react-native-code-push",
3
- "version": "10.0.0-rc1",
3
+ "version": "10.0.1",
4
4
  "description": "React Native plugin for the CodePush service",
5
5
  "author": "Louis Lagrange <lagrange.louis@gmail.com> (https://github.com/Minishlink)",
6
6
  "license": "MIT",
@@ -8,8 +8,23 @@
8
8
  "bugs": {
9
9
  "email": "support@appzung.com"
10
10
  },
11
- "main": "CodePush.js",
12
- "typings": "typings/react-native-code-push.d.ts",
11
+ "main": "./lib/commonjs/index.js",
12
+ "source": "./src/index.ts",
13
+ "module": "./lib/module/index.js",
14
+ "types": "./lib/typescript/commonjs/src/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": {
18
+ "types": "./lib/typescript/module/src/index.d.ts",
19
+ "default": "./lib/module/index.js"
20
+ },
21
+ "require": {
22
+ "types": "./lib/typescript/commonjs/src/index.d.ts",
23
+ "default": "./lib/commonjs/index.js"
24
+ }
25
+ },
26
+ "./package.json": "./package.json"
27
+ },
13
28
  "scripts": {
14
29
  "clean": "shx rm -rf bin",
15
30
  "setup": "npm install --quiet --no-progress",
@@ -26,7 +41,10 @@
26
41
  "test:fast:ios": "mocha --recursive bin/test --ios",
27
42
  "test:debugger:android": "mocha --recursive --inspect-brk=0.0.0.0 bin/test --android",
28
43
  "test:debugger:ios": "mocha --recursive --inspect-brk=0.0.0.0 bin/test --ios",
29
- "tslint": "tslint -c tslint.json test/**/*.ts"
44
+ "test:types": "tsc --noEmit",
45
+ "test:format": "prettier --check \"{src,docs}/**/*.{ts,js,md}\" README.md react-native.config.js",
46
+ "tslint": "tslint -c tslint.json test/**/*.ts",
47
+ "prepare": "genversion src/internals/version.ts --esm -s && bob build"
30
48
  },
31
49
  "repository": {
32
50
  "type": "git",
@@ -37,24 +55,54 @@
37
55
  "hoist-non-react-statics": "^3.3.2"
38
56
  },
39
57
  "devDependencies": {
58
+ "@trivago/prettier-plugin-sort-imports": "^5.2.2",
40
59
  "@types/assert": "^1.5.2",
60
+ "@types/hoist-non-react-statics": "^3.3.6",
41
61
  "@types/mkdirp": "^1.0.1",
42
62
  "@types/mocha": "^9.0.0",
43
- "@types/node": "^14.0.27",
63
+ "@types/node": "^18.19.74",
44
64
  "@types/q": "^1.5.4",
45
- "archiver": "latest",
46
- "body-parser": "latest",
65
+ "archiver": "^7.0.1",
66
+ "body-parser": "^1.20.3",
47
67
  "code-push-plugin-testing-framework": "file:./code-push-plugin-testing-framework",
48
68
  "del": "v6.0.0",
49
- "express": "latest",
69
+ "express": "^4.21.2",
70
+ "genversion": "^3.2.0",
50
71
  "mkdirp": "latest",
51
72
  "mocha": "^9.2.0",
73
+ "prettier": "^3.4.2",
52
74
  "q": "^1.5.1",
75
+ "react-native-builder-bob": "^0.36.0",
53
76
  "run-sequence": "latest",
54
77
  "shx": "^0.3.4",
55
78
  "slash": "^3.0.0",
56
79
  "tslint": "^6.1.3",
57
- "typescript": "^4.4.3"
80
+ "typescript": "^5.7.3"
81
+ },
82
+ "react-native-builder-bob": {
83
+ "source": "src",
84
+ "output": "lib",
85
+ "targets": [
86
+ [
87
+ "commonjs",
88
+ {
89
+ "esm": true
90
+ }
91
+ ],
92
+ [
93
+ "module",
94
+ {
95
+ "esm": true
96
+ }
97
+ ],
98
+ [
99
+ "typescript",
100
+ {
101
+ "project": "tsconfig.build.json",
102
+ "esm": true
103
+ }
104
+ ]
105
+ ]
58
106
  },
59
107
  "keywords": [
60
108
  "appzung",
@@ -68,6 +116,5 @@
68
116
  "expo-updates",
69
117
  "expo-ota",
70
118
  "appcenter"
71
- ],
72
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
119
+ ]
73
120
  }
@@ -1,10 +1,10 @@
1
1
  module.exports = {
2
- dependency: {
3
- platforms: {
4
- android: {
5
- packageInstance:
6
- "new CodePush(getResources().getString(R.string.CodePushReleaseChannelPublicId), getApplicationContext(), BuildConfig.DEBUG)"
7
- }
8
- }
9
- }
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ packageInstance: 'new CodePush(getApplicationContext())',
6
+ sourceDir: './android/app',
7
+ },
8
+ },
9
+ },
10
10
  };