@appzung/react-native-code-push 11.0.0-rc5 → 11.0.0-rc7

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 (223) hide show
  1. package/CodePush.podspec +3 -5
  2. package/README.md +1 -1
  3. package/android/app/src/main/java/com/appzung/codepush/react/CodePushConstants.java +2 -0
  4. package/android/app/src/main/java/com/appzung/codepush/react/CodePushNativeModule.java +62 -0
  5. package/ios/CodePush/CodePush.h +10 -6
  6. package/ios/CodePush/{CodePush.m → CodePush.mm} +126 -142
  7. package/ios/CodePush/CodePushConfig.m +50 -0
  8. package/ios/CodePush.xcodeproj/project.pbxproj +6 -6
  9. package/lib/commonjs/CodePush.js.map +1 -1
  10. package/lib/commonjs/allowRestart.js +4 -2
  11. package/lib/commonjs/allowRestart.js.map +1 -1
  12. package/lib/commonjs/checkForUpdates.js +1 -1
  13. package/lib/commonjs/checkForUpdates.js.map +1 -1
  14. package/lib/commonjs/clearUpdates.js +4 -2
  15. package/lib/commonjs/clearUpdates.js.map +1 -1
  16. package/lib/commonjs/dataTransmission.js +28 -0
  17. package/lib/commonjs/dataTransmission.js.map +1 -0
  18. package/lib/commonjs/disallowRestart.js +4 -2
  19. package/lib/commonjs/disallowRestart.js.map +1 -1
  20. package/lib/commonjs/enums/LogLevel.enum.js +3 -0
  21. package/lib/commonjs/enums/LogLevel.enum.js.map +1 -1
  22. package/lib/commonjs/index.js +36 -0
  23. package/lib/commonjs/index.js.map +1 -1
  24. package/lib/commonjs/internals/CodePushApiSdk.js +23 -1
  25. package/lib/commonjs/internals/CodePushApiSdk.js.map +1 -1
  26. package/lib/commonjs/internals/CodePushApiSdk.types.js.map +1 -1
  27. package/lib/commonjs/internals/CodePushEventEmitter.js +10 -0
  28. package/lib/commonjs/internals/CodePushEventEmitter.js.map +1 -0
  29. package/lib/commonjs/internals/RemotePackageImplementation.js +2 -3
  30. package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -1
  31. package/lib/commonjs/internals/logger.js +51 -0
  32. package/lib/commonjs/internals/logger.js.map +1 -0
  33. package/lib/commonjs/internals/utils/log.js +4 -2
  34. package/lib/commonjs/internals/utils/log.js.map +1 -1
  35. package/lib/commonjs/internals/version.js +1 -1
  36. package/lib/commonjs/logger.js +19 -0
  37. package/lib/commonjs/logger.js.map +1 -0
  38. package/lib/commonjs/notifyAppReady.js +4 -2
  39. package/lib/commonjs/notifyAppReady.js.map +1 -1
  40. package/lib/commonjs/restartApp.js +2 -2
  41. package/lib/commonjs/restartApp.js.map +1 -1
  42. package/lib/commonjs/sync.js +5 -3
  43. package/lib/commonjs/sync.js.map +1 -1
  44. package/lib/commonjs/telemetry.js +28 -0
  45. package/lib/commonjs/telemetry.js.map +1 -0
  46. package/lib/module/CodePush.js.map +1 -1
  47. package/lib/module/allowRestart.js +3 -1
  48. package/lib/module/allowRestart.js.map +1 -1
  49. package/lib/module/checkForUpdates.js +1 -1
  50. package/lib/module/checkForUpdates.js.map +1 -1
  51. package/lib/module/clearUpdates.js +3 -1
  52. package/lib/module/clearUpdates.js.map +1 -1
  53. package/lib/module/dataTransmission.js +24 -0
  54. package/lib/module/dataTransmission.js.map +1 -0
  55. package/lib/module/disallowRestart.js +3 -1
  56. package/lib/module/disallowRestart.js.map +1 -1
  57. package/lib/module/enums/LogLevel.enum.js +3 -0
  58. package/lib/module/enums/LogLevel.enum.js.map +1 -1
  59. package/lib/module/index.js +3 -0
  60. package/lib/module/index.js.map +1 -1
  61. package/lib/module/internals/CodePushApiSdk.js +23 -1
  62. package/lib/module/internals/CodePushApiSdk.js.map +1 -1
  63. package/lib/module/internals/CodePushApiSdk.types.js.map +1 -1
  64. package/lib/module/internals/CodePushEventEmitter.js +6 -0
  65. package/lib/module/internals/CodePushEventEmitter.js.map +1 -0
  66. package/lib/module/internals/RemotePackageImplementation.js +2 -3
  67. package/lib/module/internals/RemotePackageImplementation.js.map +1 -1
  68. package/lib/module/internals/logger.js +44 -0
  69. package/lib/module/internals/logger.js.map +1 -0
  70. package/lib/module/internals/utils/log.js +4 -2
  71. package/lib/module/internals/utils/log.js.map +1 -1
  72. package/lib/module/internals/version.js +1 -1
  73. package/lib/module/logger.js +4 -0
  74. package/lib/module/logger.js.map +1 -0
  75. package/lib/module/notifyAppReady.js +4 -2
  76. package/lib/module/notifyAppReady.js.map +1 -1
  77. package/lib/module/restartApp.js +2 -2
  78. package/lib/module/restartApp.js.map +1 -1
  79. package/lib/module/sync.js +5 -3
  80. package/lib/module/sync.js.map +1 -1
  81. package/lib/module/telemetry.js +24 -0
  82. package/lib/module/telemetry.js.map +1 -0
  83. package/lib/typescript/commonjs/src/CodePush.d.ts +2 -2
  84. package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/src/allowRestart.d.ts +1 -1
  86. package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/src/clearUpdates.d.ts +1 -1
  88. package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -1
  89. package/lib/typescript/commonjs/src/dataTransmission.d.ts +13 -0
  90. package/lib/typescript/commonjs/src/dataTransmission.d.ts.map +1 -0
  91. package/lib/typescript/commonjs/src/disallowRestart.d.ts +1 -1
  92. package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/src/enums/LogLevel.enum.d.ts +3 -0
  94. package/lib/typescript/commonjs/src/enums/LogLevel.enum.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/src/index.d.ts +3 -0
  96. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.d.ts +3 -1
  98. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.types.d.ts +2 -0
  100. package/lib/typescript/commonjs/src/internals/CodePushApiSdk.types.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/internals/CodePushEventEmitter.d.ts +3 -0
  102. package/lib/typescript/commonjs/src/internals/CodePushEventEmitter.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +4 -0
  104. package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/src/internals/logger.d.ts +33 -0
  107. package/lib/typescript/commonjs/src/internals/logger.d.ts.map +1 -0
  108. package/lib/typescript/commonjs/src/internals/utils/log.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/src/internals/version.d.ts +1 -1
  110. package/lib/typescript/commonjs/src/logLevel.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/src/logger.d.ts +3 -0
  112. package/lib/typescript/commonjs/src/logger.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/src/notifyAppReady.d.ts +2 -0
  114. package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/src/sync.d.ts +2 -0
  117. package/lib/typescript/commonjs/src/sync.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/src/telemetry.d.ts +13 -0
  119. package/lib/typescript/commonjs/src/telemetry.d.ts.map +1 -0
  120. package/lib/typescript/module/src/CodePush.d.ts +2 -2
  121. package/lib/typescript/module/src/CodePush.d.ts.map +1 -1
  122. package/lib/typescript/module/src/allowRestart.d.ts +1 -1
  123. package/lib/typescript/module/src/allowRestart.d.ts.map +1 -1
  124. package/lib/typescript/module/src/clearUpdates.d.ts +1 -1
  125. package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -1
  126. package/lib/typescript/module/src/dataTransmission.d.ts +13 -0
  127. package/lib/typescript/module/src/dataTransmission.d.ts.map +1 -0
  128. package/lib/typescript/module/src/disallowRestart.d.ts +1 -1
  129. package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -1
  130. package/lib/typescript/module/src/enums/LogLevel.enum.d.ts +3 -0
  131. package/lib/typescript/module/src/enums/LogLevel.enum.d.ts.map +1 -1
  132. package/lib/typescript/module/src/index.d.ts +3 -0
  133. package/lib/typescript/module/src/index.d.ts.map +1 -1
  134. package/lib/typescript/module/src/internals/CodePushApiSdk.d.ts +3 -1
  135. package/lib/typescript/module/src/internals/CodePushApiSdk.d.ts.map +1 -1
  136. package/lib/typescript/module/src/internals/CodePushApiSdk.types.d.ts +2 -0
  137. package/lib/typescript/module/src/internals/CodePushApiSdk.types.d.ts.map +1 -1
  138. package/lib/typescript/module/src/internals/CodePushEventEmitter.d.ts +3 -0
  139. package/lib/typescript/module/src/internals/CodePushEventEmitter.d.ts.map +1 -0
  140. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +4 -0
  141. package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -1
  142. package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -1
  143. package/lib/typescript/module/src/internals/logger.d.ts +33 -0
  144. package/lib/typescript/module/src/internals/logger.d.ts.map +1 -0
  145. package/lib/typescript/module/src/internals/utils/log.d.ts.map +1 -1
  146. package/lib/typescript/module/src/internals/version.d.ts +1 -1
  147. package/lib/typescript/module/src/logLevel.d.ts.map +1 -1
  148. package/lib/typescript/module/src/logger.d.ts +3 -0
  149. package/lib/typescript/module/src/logger.d.ts.map +1 -0
  150. package/lib/typescript/module/src/notifyAppReady.d.ts +2 -0
  151. package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -1
  152. package/lib/typescript/module/src/restartApp.d.ts.map +1 -1
  153. package/lib/typescript/module/src/sync.d.ts +2 -0
  154. package/lib/typescript/module/src/sync.d.ts.map +1 -1
  155. package/lib/typescript/module/src/telemetry.d.ts +13 -0
  156. package/lib/typescript/module/src/telemetry.d.ts.map +1 -0
  157. package/package.json +23 -14
  158. package/scripts/generateBundledResourcesHash.js +73 -68
  159. package/scripts/getFilesInFolder.js +12 -12
  160. package/scripts/recordFilesBeforeBundleCommand.js +19 -20
  161. package/src/CodePush.tsx +4 -2
  162. package/src/allowRestart.ts +3 -1
  163. package/src/checkForUpdates.ts +1 -1
  164. package/src/clearUpdates.ts +3 -1
  165. package/src/dataTransmission.ts +21 -0
  166. package/src/disallowRestart.ts +3 -1
  167. package/src/enums/LogLevel.enum.ts +3 -0
  168. package/src/index.ts +3 -0
  169. package/src/internals/CodePushApiSdk.ts +27 -0
  170. package/src/internals/CodePushApiSdk.types.ts +2 -0
  171. package/src/internals/CodePushEventEmitter.ts +4 -0
  172. package/src/internals/RNAppZungCodePushModuleSpec.ts +6 -0
  173. package/src/internals/RemotePackageImplementation.ts +2 -3
  174. package/src/internals/logger.ts +46 -0
  175. package/src/internals/utils/log.ts +4 -2
  176. package/src/internals/version.ts +1 -1
  177. package/src/logger.ts +2 -0
  178. package/src/notifyAppReady.ts +4 -2
  179. package/src/restartApp.ts +2 -2
  180. package/src/sync.ts +5 -3
  181. package/src/telemetry.ts +21 -0
  182. package/docs/advanced-usage.md +0 -71
  183. package/docs/api-android.md +0 -22
  184. package/docs/api-ios.md +0 -19
  185. package/docs/api-js/README.md +0 -58
  186. package/docs/api-js/enumerations/CheckFrequency.md +0 -33
  187. package/docs/api-js/enumerations/DeploymentStatus.md +0 -25
  188. package/docs/api-js/enumerations/InstallMode.md +0 -50
  189. package/docs/api-js/enumerations/LogLevel.md +0 -31
  190. package/docs/api-js/enumerations/SyncStatus.md +0 -85
  191. package/docs/api-js/enumerations/UpdateState.md +0 -37
  192. package/docs/api-js/functions/allowRestart.md +0 -17
  193. package/docs/api-js/functions/checkForUpdate.md +0 -29
  194. package/docs/api-js/functions/clearUpdates.md +0 -19
  195. package/docs/api-js/functions/disallowRestart.md +0 -17
  196. package/docs/api-js/functions/getClientUniqueId.md +0 -15
  197. package/docs/api-js/functions/getLogLevel.md +0 -13
  198. package/docs/api-js/functions/getUpdateMetadata.md +0 -23
  199. package/docs/api-js/functions/notifyAppReady.md +0 -17
  200. package/docs/api-js/functions/resetClientUniqueId.md +0 -15
  201. package/docs/api-js/functions/restartApp.md +0 -25
  202. package/docs/api-js/functions/setLogLevel.md +0 -19
  203. package/docs/api-js/functions/sync.md +0 -43
  204. package/docs/api-js/functions/withCodePush.md +0 -65
  205. package/docs/api-js/interfaces/CodePushOptions.md +0 -118
  206. package/docs/api-js/interfaces/DownloadProgress.md +0 -23
  207. package/docs/api-js/interfaces/LocalPackage.md +0 -171
  208. package/docs/api-js/interfaces/Package.md +0 -98
  209. package/docs/api-js/interfaces/RemotePackage.md +0 -169
  210. package/docs/api-js/interfaces/RollbackRetryOptions.md +0 -28
  211. package/docs/api-js/interfaces/StatusReport.md +0 -47
  212. package/docs/api-js/interfaces/SyncOptions.md +0 -80
  213. package/docs/api-js/interfaces/UpdateDialog.md +0 -89
  214. package/docs/api-js/type-aliases/DownloadProgressCallback.md +0 -21
  215. package/docs/api-js/type-aliases/HandleBinaryVersionMismatchCallback.md +0 -23
  216. package/docs/api-js/type-aliases/SyncStatusChangedCallback.md +0 -23
  217. package/docs/api-js/variables/DEFAULT_UPDATE_DIALOG.md +0 -12
  218. package/docs/code-signing.md +0 -64
  219. package/docs/migrating-to-v10.md +0 -31
  220. package/docs/setup-android.md +0 -80
  221. package/docs/setup-ios.md +0 -108
  222. package/docs/setup-windows.md +0 -55
  223. package/typedoc.json +0 -9
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAE3B,cAAc,SAAS,CAAC;AAExB,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AAEnC,cAAc,SAAS,CAAC;AAExB,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
@@ -1,8 +1,10 @@
1
+ import { LogLevel } from '../enums/LogLevel.enum';
1
2
  import { type ApiSdkConfiguration, type ApiSdkDeployReportPackageInfo, type ApiSdkDownloadReportPackageInfo, type ApiSdkNativeUpdateNotification, type ApiSdkQueryUpdatePackageInfo, type ApiSdkRemotePackage, DeploymentStatus, type Http } from './CodePushApiSdk.types';
2
3
  export declare class CodePushApiSdk {
3
4
  private readonly httpRequester;
5
+ private readonly log;
4
6
  private configuration;
5
- constructor(httpRequester: Http.Requester, configuration: ApiSdkConfiguration);
7
+ constructor(httpRequester: Http.Requester, log: (level: LogLevel, message: string) => void, configuration: ApiSdkConfiguration);
6
8
  queryUpdateWithCurrentPackage(currentPackageInfo: ApiSdkQueryUpdatePackageInfo): Promise<ApiSdkRemotePackage | ApiSdkNativeUpdateNotification | null>;
7
9
  reportStatusDeploy(deployedPackageInfo: {
8
10
  package: ApiSdkDeployReportPackageInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"CodePushApiSdk.d.ts","sourceRoot":"","sources":["../../../../../src/internals/CodePushApiSdk.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EAGxB,gBAAgB,EAChB,KAAK,IAAI,EAGV,MAAM,wBAAwB,CAAC;AAKhC,qBAAa,cAAc;IAIvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAHhC,OAAO,CAAC,aAAa,CAAsB;gBAGxB,aAAa,EAAE,IAAI,CAAC,SAAS,EAC9C,aAAa,EAAE,mBAAmB;IAS9B,6BAA6B,CACjC,kBAAkB,EAAE,4BAA4B,GAC/C,OAAO,CAAC,mBAAmB,GAAG,8BAA8B,GAAG,IAAI,CAAC;IAgDjE,kBAAkB,CACtB,mBAAmB,EAAE;QAAE,OAAO,EAAE,6BAA6B,CAAC;QAAC,MAAM,EAAE,gBAAgB,CAAA;KAAE,GAAG,IAAI,EAChG,yBAAyB,EAAE,MAAM,GAAG,IAAI,EACxC,qBAAqB,EAAE,MAAM,GAAG,IAAI,GACnC,OAAO,CAAC,IAAI,CAAC;IA8BV,oBAAoB,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC;CAe9F"}
1
+ {"version":3,"file":"CodePushApiSdk.d.ts","sourceRoot":"","sources":["../../../../../src/internals/CodePushApiSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EAGxB,gBAAgB,EAChB,KAAK,IAAI,EAGV,MAAM,wBAAwB,CAAC;AAKhC,qBAAa,cAAc;IAIvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG;IAJtB,OAAO,CAAC,aAAa,CAAsB;gBAGxB,aAAa,EAAE,IAAI,CAAC,SAAS,EAC7B,GAAG,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,EAChE,aAAa,EAAE,mBAAmB;IAS9B,6BAA6B,CACjC,kBAAkB,EAAE,4BAA4B,GAC/C,OAAO,CAAC,mBAAmB,GAAG,8BAA8B,GAAG,IAAI,CAAC;IAqDjE,kBAAkB,CACtB,mBAAmB,EAAE;QAAE,OAAO,EAAE,6BAA6B,CAAC;QAAC,MAAM,EAAE,gBAAgB,CAAA;KAAE,GAAG,IAAI,EAChG,yBAAyB,EAAE,MAAM,GAAG,IAAI,EACxC,qBAAqB,EAAE,MAAM,GAAG,IAAI,GACnC,OAAO,CAAC,IAAI,CAAC;IAwCV,oBAAoB,CAAC,iBAAiB,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC;CAyB9F"}
@@ -38,6 +38,8 @@ export interface ApiSdkConfiguration {
38
38
  clientUniqueId: string;
39
39
  releaseChannelPublicId: string;
40
40
  serverUrl: string;
41
+ dataTransmissionEnabled: boolean;
42
+ telemetryEnabled: boolean;
41
43
  ignoreAppVersion?: boolean;
42
44
  }
43
45
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CodePushApiSdk.types.d.ts","sourceRoot":"","sources":["../../../../../src/internals/CodePushApiSdk.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA8B;IAC7C,gBAAgB,EAAE,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,yBAAiB,IAAI,CAAC;IACpB,UAAiB,QAAQ;QACvB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,SAAS;QACxB,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;KACrG;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB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,EAAE,OAAO,CAAC;QACnC,kBAAkB,EAAE,OAAO,CAAC;KAC7B,GACD;QACE,YAAY,EAAE,KAAK,CAAC;QACpB,yBAAyB,EAAE,OAAO,CAAC;QACnC,mBAAmB,EAAE,MAAM,CAAC;QAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;CACP"}
1
+ {"version":3,"file":"CodePushApiSdk.types.d.ts","sourceRoot":"","sources":["../../../../../src/internals/CodePushApiSdk.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8BAA8B;IAC7C,gBAAgB,EAAE,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,yBAAiB,IAAI,CAAC;IACpB,UAAiB,QAAQ;QACvB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAED,UAAiB,SAAS;QACxB,OAAO,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI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AE,MAAM,CAAC;QAC5B,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,OAAO,CAAC;QACrB,YAAY,EAAE,OAAO,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,yBAAyB,EAAE,OAAO,CAAC;QACnC,kBAAkB,EAAE,OAAO,CAAC;KAC7B,GACD;QACE,YAAY,EAAE,KAAK,CAAC;QACpB,yBAAyB,EAAE,OAAO,CAAC;QACnC,mBAAmB,EAAE,MAAM,CAAC;QAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;CACP"}
@@ -0,0 +1,3 @@
1
+ import { NativeEventEmitter } from 'react-native';
2
+ export declare const CodePushEventEmitter: NativeEventEmitter;
3
+ //# sourceMappingURL=CodePushEventEmitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodePushEventEmitter.d.ts","sourceRoot":"","sources":["../../../../../src/internals/CodePushEventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD,eAAO,MAAM,oBAAoB,oBAAwD,CAAC"}
@@ -33,5 +33,9 @@ export interface Spec extends TurboModule {
33
33
  getLatestRollbackInfo(): Promise<LatestRollbackInfo>;
34
34
  isFirstRun(packageHash: string): Promise<boolean>;
35
35
  isFailedUpdate(packageHash: string): Promise<boolean>;
36
+ setTelemetryEnabled(enabled: boolean): Promise<void>;
37
+ getTelemetryEnabled(): Promise<boolean>;
38
+ setDataTransmissionEnabled(enabled: boolean): Promise<void>;
39
+ getDataTransmissionEnabled(): Promise<boolean>;
36
40
  }
37
41
  //# sourceMappingURL=RNAppZungCodePushModuleSpec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RNAppZungCodePushModuleSpec.d.ts","sourceRoot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AM,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"}
1
+ {"version":3,"file":"RemotePackageImplementation.d.ts","sourceRoot":"","sources":["../../../../../src/internals/RemotePackageImplementation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACtF,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAM9E,qBAAa,iBAAkB,YAAW,aAAa;gBAEnD,iBAAiB,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,EAClD,oBAAoB,EAAE,CAAC,iBAAiB,EAAE,+BAA+B,KAAK,OAAO,CAAC,IAAI,CAAC;IA6C7F,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,33 @@
1
+ import type { LogLevel } from '../enums/LogLevel.enum';
2
+ export type LoggerFunction = (level: LogLevel, message: string) => void;
3
+ /**
4
+ * Set a custom logger function to handle all CodePush logs
5
+ *
6
+ * @param logger A function that takes a log level and message and handles the logging
7
+ * @example
8
+ * ```
9
+ * import { setLogger, LogLevel } from '@appzung/react-native-code-push';
10
+ *
11
+ * // Custom logger that sends critical logs to a crash reporting service
12
+ * setLogger((level, message) => {
13
+ * // Always log to console
14
+ * console.log(`[CodePush] ${message}`);
15
+ *
16
+ * // Send error logs to crash reporting
17
+ * if (level === LogLevel.ERROR) {
18
+ * MyCrashReportingService.log(`CodePush error: ${message}`);
19
+ * }
20
+ * });
21
+ * ```
22
+ */
23
+ export declare const setLogger: (logger: LoggerFunction) => void;
24
+ /**
25
+ * Get the current logger function
26
+ * @returns The current logger function
27
+ */
28
+ export declare const getLogger: () => LoggerFunction;
29
+ /**
30
+ * Reset the logger to the default implementation
31
+ */
32
+ export declare const resetLogger: () => void;
33
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../src/internals/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAQxE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,cAAc,KAAG,IAElD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAO,cAA+B,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,WAAW,QAAO,IAE9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAI1D,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAO1D"}
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAK1D,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQ1D"}
@@ -1,2 +1,2 @@
1
- export declare const version = "11.0.0-rc5";
1
+ export declare const version = "11.0.0-rc7";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logLevel.d.ts","sourceRoot":"","sources":["../../../../src/logLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjD,eAAO,MAAM,WAAW,UAAW,QAAQ,SAE1C,CAAC;AAEF,eAAO,MAAM,WAAW,gBAAiB,CAAC"}
1
+ {"version":3,"file":"logLevel.d.ts","sourceRoot":"","sources":["../../../../src/logLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAIjD,eAAO,MAAM,WAAW,GAAI,OAAO,QAAQ,SAE1C,CAAC;AAEF,eAAO,MAAM,WAAW,gBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { setLogger, resetLogger } from './internals/logger';
2
+ export type { LoggerFunction } from './internals/logger';
3
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import type { StatusReport } from './types';
2
2
  /**
3
+ * @function
4
+ *
3
5
  * Notifies the CodePush runtime that an installed update is considered successful.
4
6
  *
5
7
  * If you are manually checking for and installing updates (i.e. not using the `sync` method to handle it all for you), then this method **MUST** be called; otherwise CodePush will treat the update as failed and rollback to the previous version when the app next restarts.
@@ -1 +1 @@
1
- {"version":3,"file":"notifyAppReady.d.ts","sourceRoot":"","sources":["../../../../src/notifyAppReady.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,cAAc,oCAYvB,CAAC"}
1
+ {"version":3,"file":"notifyAppReady.d.ts","sourceRoot":"","sources":["../../../../src/notifyAppReady.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,oCAYvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"restartApp.d.ts","sourceRoot":"","sources":["../../../../src/restartApp.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,qBAAqB,UAAQ,iBAE7D"}
1
+ {"version":3,"file":"restartApp.d.ts","sourceRoot":"","sources":["../../../../src/restartApp.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,qBAAqB,UAAQ,iBAEvD"}
@@ -6,6 +6,8 @@ import type { DownloadProgressCallback, HandleBinaryVersionMismatchCallback, Syn
6
6
  */
7
7
  export declare const DEFAULT_UPDATE_DIALOG: UpdateDialog;
8
8
  /**
9
+ * @function
10
+ *
9
11
  * Allows checking for an update, downloading it and installing it, all with a single call.
10
12
  *
11
13
  * Unless you need custom UI and/or behavior, we recommend most developers to use this method when integrating CodePush into their apps, if they are not using the `withCodePush` HOC.
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/sync.ts"],"names":[],"mappings":"AAIA,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;AAqLF;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,aAUH,WAAW,8BACO,yBAAyB,6BAC1B,wBAAwB,wCACb,mCAAmC,KACxE,OAAO,CAAC,UAAU,CAgDnB,CAAC"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/sync.ts"],"names":[],"mappings":"AAIA,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;AAqLF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,IAAI,aAUH,WAAW,8BACO,yBAAyB,6BAC1B,wBAAwB,wCACb,mCAAmC,KACxE,OAAO,CAAC,UAAU,CAgDnB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Controls telemetry reporting.
3
+ *
4
+ * @param enabled - When false, updates on this device will stop appearing as failed, pending or succeeded in analytics.
5
+ */
6
+ export declare function setTelemetryEnabled(enabled: boolean): Promise<void>;
7
+ /**
8
+ * Gets the current telemetry enabled status.
9
+ *
10
+ * When setTelemetryEnabled has never been enabled, returns the default value set in your configuration.
11
+ */
12
+ export declare function getTelemetryEnabled(): Promise<boolean>;
13
+ //# sourceMappingURL=telemetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../../../src/telemetry.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,OAAO,CAAC,CAEtD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appzung/react-native-code-push",
3
- "version": "11.0.0-rc5",
3
+ "version": "11.0.0-rc7",
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",
@@ -26,13 +26,13 @@
26
26
  "./package.json": "./package.json"
27
27
  },
28
28
  "scripts": {
29
+ "genversion": "genversion src/internals/version.ts --esm -s",
30
+ "prepare": "yarn genversion && typedoc && bob build",
29
31
  "clean": "shx rm -rf bin",
30
- "setup": "npm install --quiet --no-progress",
31
- "prebuild:tests": "npm run clean && npm run tslint",
32
+ "prebuild:tests": "yarn clean",
32
33
  "build:tests": "tsc",
33
- "test": "npm run build:tests && npm run test:setup && npm run test:fast",
34
- "test:android": "npm run build:tests && npm run test:setup:android && npm run test:fast:android",
35
- "test:ios": "npm run build:tests && npm run test:setup:ios && npm run test:fast:ios",
34
+ "test:android": "yarn build:tests && yarn test:setup:android && yarn test:fast:android",
35
+ "test:ios": "yarn build:tests && yarn test:setup:ios && yarn test:fast:ios",
36
36
  "test:setup": "mocha --recursive bin/test --android --ios --setup",
37
37
  "test:setup:android": "mocha --recursive bin/test --android --setup",
38
38
  "test:setup:ios": "mocha --recursive bin/test --ios --setup",
@@ -42,9 +42,9 @@
42
42
  "test:debugger:android": "mocha --recursive --inspect-brk=0.0.0.0 bin/test --android",
43
43
  "test:debugger:ios": "mocha --recursive --inspect-brk=0.0.0.0 bin/test --ios",
44
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 && typedoc && bob build"
45
+ "test:format": "prettier --check \"docs/**/*.md\" README.md",
46
+ "test:lint": "eslint \"**/*.{js,ts,tsx}\"",
47
+ "test": "yarn test:lint && yarn test:format && yarn test:types"
48
48
  },
49
49
  "repository": {
50
50
  "type": "git",
@@ -54,6 +54,10 @@
54
54
  "hoist-non-react-statics": "^3.3.2"
55
55
  },
56
56
  "devDependencies": {
57
+ "@eslint/compat": "^1.2.7",
58
+ "@eslint/eslintrc": "^3.3.1",
59
+ "@eslint/js": "^9.23.0",
60
+ "@react-native/eslint-config": "^0.78.1",
57
61
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",
58
62
  "@types/assert": "^1.5.2",
59
63
  "@types/hoist-non-react-statics": "^3.3.6",
@@ -63,8 +67,11 @@
63
67
  "@types/q": "^1.5.4",
64
68
  "archiver": "^7.0.1",
65
69
  "body-parser": "^1.20.3",
66
- "code-push-plugin-testing-framework": "file:./code-push-plugin-testing-framework",
70
+ "code-push-plugin-testing-framework": "workspace:./code-push-plugin-testing-framework",
67
71
  "del": "v6.0.0",
72
+ "eslint": "^9.23.0",
73
+ "eslint-config-prettier": "^10.1.1",
74
+ "eslint-plugin-prettier": "^5.2.5",
68
75
  "express": "^4.21.2",
69
76
  "genversion": "^3.2.0",
70
77
  "mkdirp": "latest",
@@ -75,9 +82,8 @@
75
82
  "run-sequence": "latest",
76
83
  "shx": "^0.3.4",
77
84
  "slash": "^3.0.0",
78
- "tslint": "^6.1.3",
79
- "typedoc": "^0.27.7",
80
- "typedoc-plugin-markdown": "^4.4.2",
85
+ "typedoc": "^0.28.1",
86
+ "typedoc-plugin-markdown": "^4.6.0",
81
87
  "typescript": "^5.7.3"
82
88
  },
83
89
  "react-native-builder-bob": {
@@ -105,6 +111,9 @@
105
111
  ]
106
112
  ]
107
113
  },
114
+ "workspaces": [
115
+ "code-push-plugin-testing-framework"
116
+ ],
108
117
  "keywords": [
109
118
  "appzung",
110
119
  "codepush",
@@ -118,5 +127,5 @@
118
127
  "expo-ota",
119
128
  "appcenter"
120
129
  ],
121
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
130
+ "packageManager": "yarn@4.8.1"
122
131
  }
@@ -11,16 +11,16 @@
11
11
  * manifest to generate the final hash, which is saved to the APK's assets directory.
12
12
  */
13
13
 
14
- var crypto = require("crypto");
15
- var fs = require("fs");
16
- var path = require("path");
14
+ var crypto = require('crypto');
15
+ var fs = require('fs');
16
+ var path = require('path');
17
17
 
18
- var getFilesInFolder = require("./getFilesInFolder");
18
+ var getFilesInFolder = require('./getFilesInFolder');
19
19
 
20
- var CODE_PUSH_FOLDER_PREFIX = "CodePush";
21
- var CODE_PUSH_HASH_FILE_NAME = "CodePushHash";
22
- var CODE_PUSH_HASH_OLD_FILE_NAME = "CodePushHash.json";
23
- var HASH_ALGORITHM = "sha256";
20
+ var CODE_PUSH_FOLDER_PREFIX = 'CodePush';
21
+ var CODE_PUSH_HASH_FILE_NAME = 'CodePushHash';
22
+ var CODE_PUSH_HASH_OLD_FILE_NAME = 'CodePushHash.json';
23
+ var HASH_ALGORITHM = 'sha256';
24
24
 
25
25
  var resourcesDir = process.argv[2];
26
26
  var jsBundleFilePath = process.argv[3];
@@ -30,8 +30,8 @@ var tempFileName = process.argv[5];
30
30
  var oldFileToModifiedTimeMap = {};
31
31
  var tempFileLocalPath = null;
32
32
  if (tempFileName) {
33
- tempFileLocalPath = path.join(require("os").tmpdir(), tempFileName);
34
- oldFileToModifiedTimeMap = require(tempFileLocalPath);
33
+ tempFileLocalPath = path.join(require('os').tmpdir(), tempFileName);
34
+ oldFileToModifiedTimeMap = require(tempFileLocalPath);
35
35
  }
36
36
  var resourceFiles = [];
37
37
 
@@ -39,87 +39,92 @@ getFilesInFolder(resourcesDir, resourceFiles);
39
39
 
40
40
  var newFileToModifiedTimeMap = {};
41
41
 
42
- resourceFiles.forEach(function(resourceFile) {
43
- newFileToModifiedTimeMap[resourceFile.path.substring(resourcesDir.length)] = resourceFile.mtime;
42
+ resourceFiles.forEach(function (resourceFile) {
43
+ newFileToModifiedTimeMap[resourceFile.path.substring(resourcesDir.length)] = resourceFile.mtime;
44
44
  });
45
45
 
46
46
  var bundleGeneratedAssetFiles = [];
47
47
 
48
48
  for (var newFilePath in newFileToModifiedTimeMap) {
49
- if (!oldFileToModifiedTimeMap[newFilePath] || oldFileToModifiedTimeMap[newFilePath] < newFileToModifiedTimeMap[newFilePath].getTime()) {
50
- bundleGeneratedAssetFiles.push(newFilePath);
51
- }
49
+ if (
50
+ !oldFileToModifiedTimeMap[newFilePath] ||
51
+ oldFileToModifiedTimeMap[newFilePath] < newFileToModifiedTimeMap[newFilePath].getTime()
52
+ ) {
53
+ bundleGeneratedAssetFiles.push(newFilePath);
54
+ }
52
55
  }
53
56
 
54
57
  var manifest = [];
55
58
 
56
59
  if (bundleGeneratedAssetFiles.length) {
57
- bundleGeneratedAssetFiles.forEach(function(assetFile) {
58
- // Generate hash for each asset file
59
- addFileToManifest(resourcesDir, assetFile, manifest, function() {
60
- if (manifest.length === bundleGeneratedAssetFiles.length) {
61
- addJsBundleAndMetaToManifest();
62
- }
63
- });
60
+ bundleGeneratedAssetFiles.forEach(function (assetFile) {
61
+ // Generate hash for each asset file
62
+ addFileToManifest(resourcesDir, assetFile, manifest, function () {
63
+ if (manifest.length === bundleGeneratedAssetFiles.length) {
64
+ addJsBundleAndMetaToManifest();
65
+ }
64
66
  });
67
+ });
65
68
  } else {
66
- addJsBundleAndMetaToManifest();
69
+ addJsBundleAndMetaToManifest();
67
70
  }
68
71
 
69
72
  function addJsBundleAndMetaToManifest() {
70
- addFileToManifest(path.dirname(jsBundleFilePath), path.basename(jsBundleFilePath), manifest, function() {
71
- var jsBundleMetaFilePath = jsBundleFilePath + ".meta";
72
- addFileToManifest(path.dirname(jsBundleMetaFilePath), path.basename(jsBundleMetaFilePath), manifest, function() {
73
- manifest = manifest.sort();
74
- var finalHash = crypto.createHash(HASH_ALGORITHM)
75
- .update(JSON.stringify(manifest))
76
- .digest("hex");
77
-
78
- console.log(finalHash);
79
-
80
- var savedResourcesManifestPath = assetsDir + "/" + CODE_PUSH_HASH_FILE_NAME;
81
- fs.writeFileSync(savedResourcesManifestPath, finalHash);
82
-
83
- // "CodePushHash.json" file name breaks flow type checking.
84
- // To fix the issue we need to delete "CodePushHash.json" file and
85
- // use "CodePushHash" file name instead to store the hash value.
86
- // Relates to https://github.com/microsoft/react-native-code-push/issues/577
87
- var oldSavedResourcesManifestPath = assetsDir + "/" + CODE_PUSH_HASH_OLD_FILE_NAME;
88
- if (fs.existsSync(oldSavedResourcesManifestPath)) {
89
- fs.unlinkSync(oldSavedResourcesManifestPath);
90
- }
91
- });
73
+ addFileToManifest(path.dirname(jsBundleFilePath), path.basename(jsBundleFilePath), manifest, function () {
74
+ var jsBundleMetaFilePath = jsBundleFilePath + '.meta';
75
+ addFileToManifest(path.dirname(jsBundleMetaFilePath), path.basename(jsBundleMetaFilePath), manifest, function () {
76
+ manifest = manifest.sort();
77
+ var finalHash = crypto.createHash(HASH_ALGORITHM).update(JSON.stringify(manifest)).digest('hex');
78
+
79
+ console.log(finalHash);
80
+
81
+ var savedResourcesManifestPath = assetsDir + '/' + CODE_PUSH_HASH_FILE_NAME;
82
+ fs.writeFileSync(savedResourcesManifestPath, finalHash);
83
+
84
+ // "CodePushHash.json" file name breaks flow type checking.
85
+ // To fix the issue we need to delete "CodePushHash.json" file and
86
+ // use "CodePushHash" file name instead to store the hash value.
87
+ // Relates to https://github.com/microsoft/react-native-code-push/issues/577
88
+ var oldSavedResourcesManifestPath = assetsDir + '/' + CODE_PUSH_HASH_OLD_FILE_NAME;
89
+ if (fs.existsSync(oldSavedResourcesManifestPath)) {
90
+ fs.unlinkSync(oldSavedResourcesManifestPath);
91
+ }
92
92
  });
93
+ });
93
94
  }
94
95
 
95
96
  function addFileToManifest(folder, assetFile, manifest, done) {
96
- var fullFilePath = path.join(folder, assetFile);
97
- if (!fileExists(fullFilePath)) {
98
- done();
99
- return;
100
- }
101
-
102
- var readStream = fs.createReadStream(path.join(folder, assetFile));
103
- var hashStream = crypto.createHash(HASH_ALGORITHM);
104
-
105
- readStream.pipe(hashStream)
106
- .on("error", function(error) {
107
- throw error;
108
- })
109
- .on("finish", function() {
110
- hashStream.end();
111
- var buffer = hashStream.read();
112
- var fileHash = buffer.toString("hex");
113
- manifest.push(path.join(CODE_PUSH_FOLDER_PREFIX, assetFile).replace(/\\/g, "/") + ":" + fileHash);
114
- done();
115
- });
97
+ var fullFilePath = path.join(folder, assetFile);
98
+ if (!fileExists(fullFilePath)) {
99
+ done();
100
+ return;
101
+ }
102
+
103
+ var readStream = fs.createReadStream(path.join(folder, assetFile));
104
+ var hashStream = crypto.createHash(HASH_ALGORITHM);
105
+
106
+ readStream
107
+ .pipe(hashStream)
108
+ .on('error', function (error) {
109
+ throw error;
110
+ })
111
+ .on('finish', function () {
112
+ hashStream.end();
113
+ var buffer = hashStream.read();
114
+ var fileHash = buffer.toString('hex');
115
+ manifest.push(path.join(CODE_PUSH_FOLDER_PREFIX, assetFile).replace(/\\/g, '/') + ':' + fileHash);
116
+ done();
117
+ });
116
118
  }
117
119
 
118
120
  function fileExists(file) {
119
- try { return fs.statSync(file).isFile(); }
120
- catch (e) { return false; }
121
+ try {
122
+ return fs.statSync(file).isFile();
123
+ } catch {
124
+ return false;
125
+ }
121
126
  }
122
127
 
123
128
  if (tempFileLocalPath) {
124
- fs.unlinkSync(tempFileLocalPath);
129
+ fs.unlinkSync(tempFileLocalPath);
125
130
  }
@@ -1,19 +1,19 @@
1
- var fs = require("fs");
2
- var path = require("path");
1
+ var fs = require('fs');
2
+ var path = require('path');
3
3
 
4
4
  // Utility function that collects the stats of every file in a directory
5
5
  // as well as in its subdirectories.
6
6
  function getFilesInFolder(folderName, fileList) {
7
- var folderFiles = fs.readdirSync(folderName);
8
- folderFiles.forEach(function(file) {
9
- var fileStats = fs.statSync(path.join(folderName, file));
10
- if (fileStats.isDirectory()) {
11
- getFilesInFolder(path.join(folderName, file), fileList);
12
- } else {
13
- fileStats.path = path.join(folderName, file);
14
- fileList.push(fileStats);
15
- }
16
- });
7
+ var folderFiles = fs.readdirSync(folderName);
8
+ folderFiles.forEach(function (file) {
9
+ var fileStats = fs.statSync(path.join(folderName, file));
10
+ if (fileStats.isDirectory()) {
11
+ getFilesInFolder(path.join(folderName, file), fileList);
12
+ } else {
13
+ fileStats.path = path.join(folderName, file);
14
+ fileList.push(fileStats);
15
+ }
16
+ });
17
17
  }
18
18
 
19
19
  module.exports = getFilesInFolder;
@@ -1,41 +1,40 @@
1
1
  /*
2
2
  * This script creates a snapshot of the contents in the resource directory
3
3
  * by creating a map with the modified time of all the files in the directory
4
- * and saving it to a temp file. This snapshot is later referenced in
4
+ * and saving it to a temp file. This snapshot is later referenced in
5
5
  * "generatePackageHash.js" to figure out which files have changed or were
6
6
  * newly generated by the "react-native bundle" command.
7
7
  */
8
8
 
9
- var fs = require("fs");
10
- var path = require("path");
11
-
12
- var getFilesInFolder = require("./getFilesInFolder");
9
+ var fs = require('fs');
10
+ var path = require('path');
13
11
 
12
+ var getFilesInFolder = require('./getFilesInFolder');
14
13
 
15
14
  var resourcesDir = process.argv[2];
16
15
  var tempFileName = process.argv[3];
17
16
 
18
- var tempFileLocalPath = path.join(require("os").tmpdir(), tempFileName);
17
+ var tempFileLocalPath = path.join(require('os').tmpdir(), tempFileName);
19
18
  var resourceFiles = [];
20
19
 
21
20
  try {
22
- getFilesInFolder(resourcesDir, resourceFiles);
23
- } catch(error) {
24
- var targetPathNotFoundExceptionMessage = "\nResources directory path does not exist.\n";
25
- targetPathNotFoundExceptionMessage += "Unable to find '" + resourcesDir;
26
- targetPathNotFoundExceptionMessage += "' directory. Please check version of Android Plugin for Gradle.";
27
- error.message += targetPathNotFoundExceptionMessage;
28
- throw error;
21
+ getFilesInFolder(resourcesDir, resourceFiles);
22
+ } catch (error) {
23
+ var targetPathNotFoundExceptionMessage = '\nResources directory path does not exist.\n';
24
+ targetPathNotFoundExceptionMessage += "Unable to find '" + resourcesDir;
25
+ targetPathNotFoundExceptionMessage += "' directory. Please check version of Android Plugin for Gradle.";
26
+ error.message += targetPathNotFoundExceptionMessage;
27
+ throw error;
29
28
  }
30
29
 
31
30
  var fileToModifiedTimeMap = {};
32
31
 
33
- resourceFiles.forEach(function(resourceFile) {
34
- fileToModifiedTimeMap[resourceFile.path.substring(resourcesDir.length)] = resourceFile.mtime.getTime();
32
+ resourceFiles.forEach(function (resourceFile) {
33
+ fileToModifiedTimeMap[resourceFile.path.substring(resourcesDir.length)] = resourceFile.mtime.getTime();
35
34
  });
36
35
 
37
- fs.writeFile(tempFileLocalPath, JSON.stringify(fileToModifiedTimeMap), function(err) {
38
- if (err) {
39
- throw err;
40
- }
41
- });
36
+ fs.writeFile(tempFileLocalPath, JSON.stringify(fileToModifiedTimeMap), function (err) {
37
+ if (err) {
38
+ throw err;
39
+ }
40
+ });
package/src/CodePush.tsx CHANGED
@@ -30,7 +30,9 @@ export interface CodePushOptions extends SyncOptions {
30
30
  * @param component the React Component that will be decorated
31
31
  */
32
32
  // @ts-ignore
33
- export function withCodePush<P extends object>(component: React.ComponentType<P>): React.ComponentType;
33
+ export function withCodePush<P extends object | Record<string, unknown>>(
34
+ component: React.ComponentType<P>,
35
+ ): React.ComponentType;
34
36
 
35
37
  /**
36
38
  * Wraps a React component inside a "higher order" React component that knows how to synchronize your app's JavaScript bundle and image assets when it is mounted.
@@ -39,7 +41,7 @@ export function withCodePush<P extends object>(component: React.ComponentType<P>
39
41
  *
40
42
  * @param options Options used to configure the end-user sync and update experience (e.g. when to check for updates?, show a prompt?, install the update immediately?).
41
43
  */
42
- export function withCodePush<P extends object>(
44
+ export function withCodePush<P extends object | Record<string, unknown>>(
43
45
  options: CodePushOptions,
44
46
  ): (component: React.ComponentType<P>) => React.ComponentType;
45
47
 
@@ -5,4 +5,6 @@ import { NativeRNAppZungCodePushModule } from './internals/NativeRNAppZungCodePu
5
5
  *
6
6
  * This is an advanced API and is only necessary if your app explicitly disallowed restarts via the `disallowRestart` method.
7
7
  */
8
- export const allowRestart: () => void = NativeRNAppZungCodePushModule.allow;
8
+ export function allowRestart() {
9
+ return NativeRNAppZungCodePushModule.allow();
10
+ }
@@ -39,7 +39,7 @@ export async function checkForUpdate(
39
39
  * release channels (e.g. an early access release channel for insiders).
40
40
  */
41
41
  const config: Configuration = releaseChannelPublicId ? { ...nativeConfig, releaseChannelPublicId } : nativeConfig;
42
- const sdk = new CodePushApiSdk(requestFetchAdapter, config);
42
+ const sdk = new CodePushApiSdk(requestFetchAdapter, log, config);
43
43
 
44
44
  const localPackage = await getCurrentPackage();
45
45