@appzung/react-native-code-push 11.0.0-rc2 → 11.0.0-rc4
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.
- package/README.md +10 -10
- package/android/app/src/main/java/com/appzung/codepush/react/CodePush.java +3 -0
- package/android/app/src/main/java/com/appzung/codepush/react/CodePushNativeModule.java +14 -0
- package/docs/advanced-usage.md +15 -0
- package/docs/api-js/README.md +55 -0
- package/docs/api-js/enumerations/CheckFrequency.md +33 -0
- package/docs/api-js/enumerations/DeploymentStatus.md +25 -0
- package/docs/api-js/enumerations/InstallMode.md +50 -0
- package/docs/api-js/enumerations/SyncStatus.md +85 -0
- package/docs/api-js/enumerations/UpdateState.md +37 -0
- package/docs/api-js/functions/allowRestart.md +17 -0
- package/docs/api-js/functions/checkForUpdate.md +29 -0
- package/docs/api-js/functions/clearUpdates.md +19 -0
- package/docs/api-js/functions/disallowRestart.md +17 -0
- package/docs/api-js/functions/getClientUniqueId.md +15 -0
- package/docs/api-js/functions/getUpdateMetadata.md +23 -0
- package/docs/api-js/functions/notifyAppReady.md +17 -0
- package/docs/api-js/functions/resetClientUniqueId.md +15 -0
- package/docs/api-js/functions/restartApp.md +25 -0
- package/docs/api-js/functions/sync.md +43 -0
- package/docs/api-js/functions/withCodePush.md +65 -0
- package/docs/api-js/interfaces/CodePushOptions.md +118 -0
- package/docs/api-js/interfaces/DownloadProgress.md +23 -0
- package/docs/api-js/interfaces/LocalPackage.md +171 -0
- package/docs/api-js/interfaces/Package.md +98 -0
- package/docs/api-js/interfaces/RemotePackage.md +169 -0
- package/docs/api-js/interfaces/RollbackRetryOptions.md +28 -0
- package/docs/api-js/interfaces/StatusReport.md +47 -0
- package/docs/api-js/interfaces/SyncOptions.md +80 -0
- package/docs/api-js/interfaces/UpdateDialog.md +89 -0
- package/docs/api-js/type-aliases/DownloadProgressCallback.md +21 -0
- package/docs/api-js/type-aliases/HandleBinaryVersionMismatchCallback.md +23 -0
- package/docs/api-js/type-aliases/SyncStatusChangedCallback.md +23 -0
- package/docs/api-js/variables/DEFAULT_UPDATE_DIALOG.md +12 -0
- package/docs/code-signing.md +2 -0
- package/docs/setup-android.md +1 -2
- package/docs/setup-ios.md +1 -1
- package/ios/CodePush/CodePush.h +1 -0
- package/ios/CodePush/CodePush.m +7 -0
- package/ios/CodePush/CodePushConfig.m +4 -0
- package/lib/commonjs/CodePush.js +6 -2
- package/lib/commonjs/CodePush.js.map +1 -1
- package/lib/commonjs/allowRestart.js +2 -0
- package/lib/commonjs/allowRestart.js.map +1 -1
- package/lib/commonjs/checkForUpdates.js +23 -25
- package/lib/commonjs/checkForUpdates.js.map +1 -1
- package/lib/commonjs/clearUpdates.js +2 -1
- package/lib/commonjs/clearUpdates.js.map +1 -1
- package/lib/commonjs/disallowRestart.js +2 -0
- package/lib/commonjs/disallowRestart.js.map +1 -1
- package/lib/commonjs/enums/CheckFrequency.enum.js +2 -2
- package/lib/commonjs/enums/InstallMode.enum.js +7 -3
- package/lib/commonjs/enums/InstallMode.enum.js.map +1 -1
- package/lib/commonjs/enums/SyncStatus.enum.js +7 -7
- package/lib/commonjs/enums/UpdateState.enum.js +7 -6
- package/lib/commonjs/enums/UpdateState.enum.js.map +1 -1
- package/lib/commonjs/getClientUniqueId.js +16 -0
- package/lib/commonjs/getClientUniqueId.js.map +1 -0
- package/lib/commonjs/index.js +34 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internals/CodePushApiSdk.errors.js +26 -0
- package/lib/commonjs/internals/CodePushApiSdk.errors.js.map +1 -0
- package/lib/commonjs/internals/CodePushApiSdk.js +100 -0
- package/lib/commonjs/internals/CodePushApiSdk.js.map +1 -0
- package/lib/commonjs/{enums/DeploymentStatus.enum.js → internals/CodePushApiSdk.types.js} +3 -2
- package/lib/commonjs/internals/CodePushApiSdk.types.js.map +1 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js +6 -5
- package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -1
- package/lib/commonjs/internals/getConfiguration.js +4 -0
- package/lib/commonjs/internals/getConfiguration.js.map +1 -1
- package/lib/commonjs/internals/utils/fetchRetry.js +59 -0
- package/lib/commonjs/internals/utils/fetchRetry.js.map +1 -0
- package/lib/commonjs/internals/utils/queryStringify.js +25 -0
- package/lib/commonjs/internals/utils/queryStringify.js.map +1 -0
- package/lib/commonjs/internals/utils/requestFetchAdapter.js +33 -0
- package/lib/commonjs/internals/utils/requestFetchAdapter.js.map +1 -0
- package/lib/commonjs/internals/version.js +1 -1
- package/lib/commonjs/notifyAppReady.js +11 -9
- package/lib/commonjs/notifyAppReady.js.map +1 -1
- package/lib/commonjs/resetClientUniqueId.js +18 -0
- package/lib/commonjs/resetClientUniqueId.js.map +1 -0
- package/lib/commonjs/restartApp.js +2 -0
- package/lib/commonjs/restartApp.js.map +1 -1
- package/lib/commonjs/sync.js +5 -3
- package/lib/commonjs/sync.js.map +1 -1
- package/lib/module/CodePush.js +6 -2
- package/lib/module/CodePush.js.map +1 -1
- package/lib/module/allowRestart.js +2 -0
- package/lib/module/allowRestart.js.map +1 -1
- package/lib/module/checkForUpdates.js +23 -25
- package/lib/module/checkForUpdates.js.map +1 -1
- package/lib/module/clearUpdates.js +2 -1
- package/lib/module/clearUpdates.js.map +1 -1
- package/lib/module/disallowRestart.js +2 -0
- package/lib/module/disallowRestart.js.map +1 -1
- package/lib/module/enums/CheckFrequency.enum.js +2 -2
- package/lib/module/enums/InstallMode.enum.js +7 -3
- package/lib/module/enums/InstallMode.enum.js.map +1 -1
- package/lib/module/enums/SyncStatus.enum.js +7 -7
- package/lib/module/enums/UpdateState.enum.js +7 -6
- package/lib/module/enums/UpdateState.enum.js.map +1 -1
- package/lib/module/getClientUniqueId.js +12 -0
- package/lib/module/getClientUniqueId.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/internals/CodePushApiSdk.errors.js +20 -0
- package/lib/module/internals/CodePushApiSdk.errors.js.map +1 -0
- package/lib/module/internals/CodePushApiSdk.js +96 -0
- package/lib/module/internals/CodePushApiSdk.js.map +1 -0
- package/lib/module/{enums/DeploymentStatus.enum.js → internals/CodePushApiSdk.types.js} +2 -1
- package/lib/module/internals/CodePushApiSdk.types.js.map +1 -0
- package/lib/module/internals/RemotePackageImplementation.js +6 -5
- package/lib/module/internals/RemotePackageImplementation.js.map +1 -1
- package/lib/module/internals/getConfiguration.js +3 -0
- package/lib/module/internals/getConfiguration.js.map +1 -1
- package/lib/module/internals/utils/fetchRetry.js +55 -0
- package/lib/module/internals/utils/fetchRetry.js.map +1 -0
- package/lib/module/internals/utils/queryStringify.js +21 -0
- package/lib/module/internals/utils/queryStringify.js.map +1 -0
- package/lib/module/internals/utils/requestFetchAdapter.js +29 -0
- package/lib/module/internals/utils/requestFetchAdapter.js.map +1 -0
- package/lib/module/internals/version.js +1 -1
- package/lib/module/notifyAppReady.js +11 -9
- package/lib/module/notifyAppReady.js.map +1 -1
- package/lib/module/resetClientUniqueId.js +14 -0
- package/lib/module/resetClientUniqueId.js.map +1 -0
- package/lib/module/restartApp.js +2 -0
- package/lib/module/restartApp.js.map +1 -1
- package/lib/module/sync.js +5 -3
- package/lib/module/sync.js.map +1 -1
- package/lib/typescript/commonjs/src/CodePush.d.ts +10 -5
- package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/allowRestart.d.ts +2 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/clearUpdates.d.ts +2 -1
- package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/disallowRestart.d.ts +2 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +2 -2
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +7 -3
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +7 -7
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +7 -6
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/getClientUniqueId.d.ts +5 -0
- package/lib/typescript/commonjs/src/getClientUniqueId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +3 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/internals/CodePushApiSdk.d.ts +13 -0
- package/lib/typescript/commonjs/src/internals/CodePushApiSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/CodePushApiSdk.errors.d.ts +9 -0
- package/lib/typescript/commonjs/src/internals/CodePushApiSdk.errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/CodePushApiSdk.types.d.ts +101 -0
- package/lib/typescript/commonjs/src/internals/CodePushApiSdk.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +1 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +2 -2
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +1 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/internals/types.d.ts +2 -2
- package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/internals/utils/fetchRetry.d.ts +9 -0
- package/lib/typescript/commonjs/src/internals/utils/fetchRetry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/queryStringify.d.ts +4 -0
- package/lib/typescript/commonjs/src/internals/utils/queryStringify.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/requestFetchAdapter.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/utils/requestFetchAdapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts +1 -1
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts +2 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/resetClientUniqueId.d.ts +5 -0
- package/lib/typescript/commonjs/src/resetClientUniqueId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts +2 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/sync.d.ts +3 -1
- package/lib/typescript/commonjs/src/sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +72 -29
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/CodePush.d.ts +10 -5
- package/lib/typescript/module/src/CodePush.d.ts.map +1 -1
- package/lib/typescript/module/src/allowRestart.d.ts +2 -0
- package/lib/typescript/module/src/allowRestart.d.ts.map +1 -1
- package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -1
- package/lib/typescript/module/src/clearUpdates.d.ts +2 -1
- package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -1
- package/lib/typescript/module/src/disallowRestart.d.ts +2 -0
- package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -1
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +2 -2
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +7 -3
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -1
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +7 -7
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +7 -6
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -1
- package/lib/typescript/module/src/getClientUniqueId.d.ts +5 -0
- package/lib/typescript/module/src/getClientUniqueId.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +3 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/internals/CodePushApiSdk.d.ts +13 -0
- package/lib/typescript/module/src/internals/CodePushApiSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/CodePushApiSdk.errors.d.ts +9 -0
- package/lib/typescript/module/src/internals/CodePushApiSdk.errors.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/CodePushApiSdk.types.d.ts +101 -0
- package/lib/typescript/module/src/internals/CodePushApiSdk.types.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +1 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -1
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +2 -2
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -1
- package/lib/typescript/module/src/internals/getConfiguration.d.ts +1 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -1
- package/lib/typescript/module/src/internals/types.d.ts +2 -2
- package/lib/typescript/module/src/internals/types.d.ts.map +1 -1
- package/lib/typescript/module/src/internals/utils/fetchRetry.d.ts +9 -0
- package/lib/typescript/module/src/internals/utils/fetchRetry.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/queryStringify.d.ts +4 -0
- package/lib/typescript/module/src/internals/utils/queryStringify.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/requestFetchAdapter.d.ts +3 -0
- package/lib/typescript/module/src/internals/utils/requestFetchAdapter.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/version.d.ts +1 -1
- package/lib/typescript/module/src/notifyAppReady.d.ts +2 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -1
- package/lib/typescript/module/src/resetClientUniqueId.d.ts +5 -0
- package/lib/typescript/module/src/resetClientUniqueId.d.ts.map +1 -0
- package/lib/typescript/module/src/restartApp.d.ts +2 -0
- package/lib/typescript/module/src/restartApp.d.ts.map +1 -1
- package/lib/typescript/module/src/sync.d.ts +3 -1
- package/lib/typescript/module/src/sync.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +72 -29
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/package.json +6 -4
- package/src/CodePush.tsx +12 -5
- package/src/allowRestart.ts +2 -0
- package/src/checkForUpdates.ts +24 -23
- package/src/clearUpdates.ts +2 -1
- package/src/disallowRestart.ts +2 -0
- package/src/enums/CheckFrequency.enum.ts +2 -2
- package/src/enums/InstallMode.enum.ts +7 -3
- package/src/enums/SyncStatus.enum.ts +7 -7
- package/src/enums/UpdateState.enum.ts +7 -6
- package/src/getClientUniqueId.ts +9 -0
- package/src/index.ts +3 -1
- package/src/internals/CodePushApiSdk.errors.ts +22 -0
- package/src/internals/CodePushApiSdk.ts +133 -0
- package/src/internals/CodePushApiSdk.types.ts +115 -0
- package/src/internals/RNAppZungCodePushModuleSpec.ts +1 -0
- package/src/internals/RemotePackageImplementation.ts +8 -7
- package/src/internals/getConfiguration.ts +4 -0
- package/src/internals/types.ts +2 -2
- package/src/internals/utils/fetchRetry.ts +72 -0
- package/src/internals/utils/queryStringify.ts +22 -0
- package/src/internals/utils/requestFetchAdapter.ts +28 -0
- package/src/internals/version.ts +1 -1
- package/src/notifyAppReady.ts +12 -13
- package/src/resetClientUniqueId.ts +11 -0
- package/src/restartApp.ts +2 -0
- package/src/sync.ts +5 -3
- package/src/types.ts +72 -29
- package/typedoc.json +9 -0
- package/docs/api-js.md +0 -557
- package/lib/commonjs/enums/DeploymentStatus.enum.js.map +0 -1
- package/lib/commonjs/internals/AcquisitionSdk.js +0 -9
- package/lib/commonjs/internals/AcquisitionSdk.js.map +0 -1
- package/lib/commonjs/internals/getPromisifiedSdk.js +0 -49
- package/lib/commonjs/internals/getPromisifiedSdk.js.map +0 -1
- package/lib/commonjs/internals/utils/request-fetch-adapter.js +0 -50
- package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +0 -1
- package/lib/module/enums/DeploymentStatus.enum.js.map +0 -1
- package/lib/module/internals/AcquisitionSdk.js +0 -5
- package/lib/module/internals/AcquisitionSdk.js.map +0 -1
- package/lib/module/internals/getPromisifiedSdk.js +0 -45
- package/lib/module/internals/getPromisifiedSdk.js.map +0 -1
- package/lib/module/internals/utils/request-fetch-adapter.js +0 -46
- package/lib/module/internals/utils/request-fetch-adapter.js.map +0 -1
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +0 -14
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +0 -3
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +0 -13
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +0 -3
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +0 -1
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +0 -14
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +0 -1
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +0 -3
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +0 -1
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +0 -13
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +0 -1
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +0 -3
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +0 -1
- package/src/enums/DeploymentStatus.enum.ts +0 -14
- package/src/internals/AcquisitionSdk.ts +0 -3
- package/src/internals/getPromisifiedSdk.ts +0 -72
- package/src/internals/utils/request-fetch-adapter.ts +0 -58
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[@appzung/react-native-code-push](../README.md) / StatusReport
|
|
6
|
+
|
|
7
|
+
# Interface: StatusReport
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### appVersion?
|
|
12
|
+
|
|
13
|
+
> `optional` **appVersion**: `string`
|
|
14
|
+
|
|
15
|
+
The version of the app that was deployed (for a native app upgrade).
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### package?
|
|
20
|
+
|
|
21
|
+
> `optional` **package**: [`Package`](Package.md)
|
|
22
|
+
|
|
23
|
+
Details of the package that was deployed (or attempted to).
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### previousLabelOrAppVersion?
|
|
28
|
+
|
|
29
|
+
> `optional` **previousLabelOrAppVersion**: `string`
|
|
30
|
+
|
|
31
|
+
The label (v#) of the package that was upgraded from.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### previousReleaseChannelPublicId?
|
|
36
|
+
|
|
37
|
+
> `optional` **previousReleaseChannelPublicId**: `string`
|
|
38
|
+
|
|
39
|
+
Release channel used when deploying the previous package.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### status
|
|
44
|
+
|
|
45
|
+
> **status**: [`DeploymentStatus`](../enumerations/DeploymentStatus.md)
|
|
46
|
+
|
|
47
|
+
Whether the deployment succeeded or failed.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
[**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[@appzung/react-native-code-push](../README.md) / SyncOptions
|
|
6
|
+
|
|
7
|
+
# Interface: SyncOptions
|
|
8
|
+
|
|
9
|
+
## Extended by
|
|
10
|
+
|
|
11
|
+
- [`CodePushOptions`](CodePushOptions.md)
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### ignoreFailedUpdates?
|
|
16
|
+
|
|
17
|
+
> `optional` **ignoreFailedUpdates**: `boolean`
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### installMode?
|
|
22
|
+
|
|
23
|
+
> `optional` **installMode**: [`InstallMode`](../enumerations/InstallMode.md)
|
|
24
|
+
|
|
25
|
+
Specifies when you would like to install regular updates (i.e. those that aren't marked as mandatory).
|
|
26
|
+
|
|
27
|
+
Defaults to InstallMode.ON_NEXT_RESTART.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### mandatoryInstallMode?
|
|
32
|
+
|
|
33
|
+
> `optional` **mandatoryInstallMode**: [`InstallMode`](../enumerations/InstallMode.md)
|
|
34
|
+
|
|
35
|
+
Specifies when you would like to install updates which are marked as mandatory.
|
|
36
|
+
|
|
37
|
+
Defaults to InstallMode.IMMEDIATE.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
### minimumBackgroundDuration?
|
|
42
|
+
|
|
43
|
+
> `optional` **minimumBackgroundDuration**: `number`
|
|
44
|
+
|
|
45
|
+
Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property
|
|
46
|
+
only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME` or `InstallMode.ON_NEXT_SUSPEND`, and can be useful
|
|
47
|
+
for getting your update in front of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying
|
|
48
|
+
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.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### releaseChannelPublicId?
|
|
53
|
+
|
|
54
|
+
> `optional` **releaseChannelPublicId**: `string`
|
|
55
|
+
|
|
56
|
+
Specifies the release channel you want to query for an update against.
|
|
57
|
+
|
|
58
|
+
By default, this value is derived from the Info.plist file (iOS) and strings resources (Android), but this option allows you to override it from the JS-side if you need to dynamically use a different release channel for a specific call to sync.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### rollbackRetryOptions?
|
|
63
|
+
|
|
64
|
+
> `optional` **rollbackRetryOptions**: `true` \| [`RollbackRetryOptions`](RollbackRetryOptions.md)
|
|
65
|
+
|
|
66
|
+
The rollback retry mechanism allows the application to attempt to reinstall an update that was previously rolled back (with the restrictions specified in the options).
|
|
67
|
+
|
|
68
|
+
This defaults to null, which has the effect of disabling the retry mechanism.
|
|
69
|
+
Setting this to true will enable the retry mechanism with the default settings, and passing an object to this parameter allows enabling the rollback retry as well as overriding one or more of the default values.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### updateDialog?
|
|
74
|
+
|
|
75
|
+
> `optional` **updateDialog**: `true` \| [`UpdateDialog`](UpdateDialog.md)
|
|
76
|
+
|
|
77
|
+
Used to determine whether a confirmation dialog should be displayed to the end user when an update is available, and if so, what strings to use.
|
|
78
|
+
|
|
79
|
+
Defaults to null, which has the effect of disabling the dialog completely.
|
|
80
|
+
Setting this to true will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as overriding one or more of the default strings.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
[**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[@appzung/react-native-code-push](../README.md) / UpdateDialog
|
|
6
|
+
|
|
7
|
+
# Interface: UpdateDialog
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### appendReleaseDescription?
|
|
12
|
+
|
|
13
|
+
> `optional` **appendReleaseDescription**: `boolean`
|
|
14
|
+
|
|
15
|
+
Indicates whether you would like to append the description of an available release to the
|
|
16
|
+
notification message which is displayed to the end user.
|
|
17
|
+
|
|
18
|
+
Defaults to false.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### descriptionPrefix?
|
|
23
|
+
|
|
24
|
+
> `optional` **descriptionPrefix**: `string`
|
|
25
|
+
|
|
26
|
+
Indicates the string you would like to prefix the release description with, if any, when
|
|
27
|
+
displaying the update notification to the end user.
|
|
28
|
+
|
|
29
|
+
Defaults to " Description: "
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### mandatoryContinueButtonLabel?
|
|
34
|
+
|
|
35
|
+
> `optional` **mandatoryContinueButtonLabel**: `string`
|
|
36
|
+
|
|
37
|
+
The text to use for the button the end user must press in order to install a mandatory update.
|
|
38
|
+
|
|
39
|
+
Defaults to "Continue".
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### mandatoryUpdateMessage?
|
|
44
|
+
|
|
45
|
+
> `optional` **mandatoryUpdateMessage**: `string`
|
|
46
|
+
|
|
47
|
+
The text used as the body of an update notification, when the update is specified as mandatory.
|
|
48
|
+
|
|
49
|
+
Defaults to "An update is available that must be installed.".
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### optionalIgnoreButtonLabel?
|
|
54
|
+
|
|
55
|
+
> `optional` **optionalIgnoreButtonLabel**: `string`
|
|
56
|
+
|
|
57
|
+
The text to use for the button the end user can press in order to ignore an optional update that is available.
|
|
58
|
+
|
|
59
|
+
Defaults to "Ignore".
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### optionalInstallButtonLabel?
|
|
64
|
+
|
|
65
|
+
> `optional` **optionalInstallButtonLabel**: `string`
|
|
66
|
+
|
|
67
|
+
The text to use for the button the end user can press in order to install an optional update.
|
|
68
|
+
|
|
69
|
+
Defaults to "Install".
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### optionalUpdateMessage?
|
|
74
|
+
|
|
75
|
+
> `optional` **optionalUpdateMessage**: `string`
|
|
76
|
+
|
|
77
|
+
The text used as the body of an update notification, when the update is optional.
|
|
78
|
+
|
|
79
|
+
Defaults to "An update is available. Would you like to install it?".
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### title?
|
|
84
|
+
|
|
85
|
+
> `optional` **title**: `string`
|
|
86
|
+
|
|
87
|
+
The text used as the header of an update notification that is displayed to the end user.
|
|
88
|
+
|
|
89
|
+
Defaults to "Update available".
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[@appzung/react-native-code-push](../README.md) / DownloadProgressCallback
|
|
6
|
+
|
|
7
|
+
# Type Alias: DownloadProgressCallback()
|
|
8
|
+
|
|
9
|
+
> **DownloadProgressCallback**: (`progress`) => `void`
|
|
10
|
+
|
|
11
|
+
Called periodically when an available update is being downloaded from the CodePush server.
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### progress
|
|
16
|
+
|
|
17
|
+
[`DownloadProgress`](../interfaces/DownloadProgress.md)
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
`void`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[@appzung/react-native-code-push](../README.md) / HandleBinaryVersionMismatchCallback
|
|
6
|
+
|
|
7
|
+
# Type Alias: HandleBinaryVersionMismatchCallback()
|
|
8
|
+
|
|
9
|
+
> **HandleBinaryVersionMismatchCallback**: (`update`) => `void`
|
|
10
|
+
|
|
11
|
+
Called when there are any binary update available.
|
|
12
|
+
|
|
13
|
+
## Parameters
|
|
14
|
+
|
|
15
|
+
### update
|
|
16
|
+
|
|
17
|
+
#### appVersion
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`void`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[@appzung/react-native-code-push](../README.md) / SyncStatusChangedCallback
|
|
6
|
+
|
|
7
|
+
# Type Alias: SyncStatusChangedCallback()
|
|
8
|
+
|
|
9
|
+
> **SyncStatusChangedCallback**: (`status`) => `void`
|
|
10
|
+
|
|
11
|
+
Called when the sync process moves from one stage to another in the overall update process.
|
|
12
|
+
|
|
13
|
+
The method is called with a status code which represents the current state, and can be any of the `SyncStatus` values.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
### status
|
|
18
|
+
|
|
19
|
+
[`SyncStatus`](../enumerations/SyncStatus.md)
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`void`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[**@appzung/react-native-code-push v11.0.0-rc4**](../README.md)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[@appzung/react-native-code-push](../README.md) / DEFAULT_UPDATE_DIALOG
|
|
6
|
+
|
|
7
|
+
# Variable: DEFAULT_UPDATE_DIALOG
|
|
8
|
+
|
|
9
|
+
> `const` **DEFAULT_UPDATE_DIALOG**: [`UpdateDialog`](../interfaces/UpdateDialog.md)
|
|
10
|
+
|
|
11
|
+
Represents the default settings that will be used by the sync method if
|
|
12
|
+
an update dialog is configured to be displayed.
|
package/docs/code-signing.md
CHANGED
|
@@ -23,6 +23,8 @@ Store the private key securely.
|
|
|
23
23
|
In the `appzung releases deploy-react-native` command that you run during your release process, add the `--private-key-path` flag pointing to the private key path.
|
|
24
24
|
You should see `Code signing: true` in the confirmation text in interactive mode.
|
|
25
25
|
|
|
26
|
+
After following the setup for your app below, if you previously sent a CodePush release without code-signing (the `--private-key-path` CLI flag), it is expected that when you check for updates CodePush doesn't present you this update, since it now expects a code signed release. Make sure when you test your integration that you sent a code-signed release.
|
|
27
|
+
|
|
26
28
|
### Setup Android
|
|
27
29
|
|
|
28
30
|
Add the `CodePushSigningPublicKey` string resource in `/android/app/src/main/res/values/strings.xml`. It may look like this:
|
package/docs/setup-android.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
## Android Setup
|
|
2
2
|
|
|
3
3
|
- [Plugin Installation and Configuration](#plugin-installation-and-configuration)
|
|
4
|
-
- [Code Signing setup](#code-signing-setup)
|
|
5
4
|
|
|
6
5
|
### Plugin Installation and Configuration
|
|
7
6
|
|
|
@@ -76,6 +75,6 @@
|
|
|
76
75
|
</resources>
|
|
77
76
|
```
|
|
78
77
|
|
|
79
|
-
_Note: If you need to dynamically use a different release channel, you can also override your release channel public ID in JS code using [Code-Push options](./api-js.md
|
|
78
|
+
_Note: If you need to dynamically use a different release channel, you can also override your release channel public ID in JS code using [Code-Push options](./api-js/interfaces/CodePushOptions.md)_
|
|
80
79
|
|
|
81
80
|
4. [Configure code signing](./code-signing.md), this is optional but recommended for security
|
package/docs/setup-ios.md
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
You may want to refer to the [multiple environments](./advanced-usage.md#multiple-environments) docs before actually moving your app's usage of CodePush into production.
|
|
73
73
|
|
|
74
|
-
_Note: If you need to dynamically use a different release channel, you can also override your release channel public ID in JS code using [Code-Push options](./api-js.
|
|
74
|
+
_Note: If you need to dynamically use a different release channel, you can also override your release channel public ID in JS code using [Code-Push options](./api-js/interfaces/CodePushOptions.mds)_
|
|
75
75
|
|
|
76
76
|
6. [Configure code signing](./code-signing.md), this is optional but recommended for security
|
|
77
77
|
|
package/ios/CodePush/CodePush.h
CHANGED
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
@property (readonly) NSString *buildVersion;
|
|
102
102
|
@property (readonly) NSDictionary *configuration;
|
|
103
103
|
@property (copy) NSString *releaseChannelPublicId;
|
|
104
|
+
@property (readonly) NSString *clientUniqueId;
|
|
104
105
|
@property (copy) NSString *serverURL;
|
|
105
106
|
@property (copy) NSString *publicKey;
|
|
106
107
|
|
package/ios/CodePush/CodePush.m
CHANGED
|
@@ -1042,6 +1042,13 @@ RCT_EXPORT_METHOD(clearUpdates) {
|
|
|
1042
1042
|
[CodePush clearUpdates];
|
|
1043
1043
|
}
|
|
1044
1044
|
|
|
1045
|
+
RCT_EXPORT_METHOD(resetClientUniqueId:(RCTPromiseResolveBlock)resolve
|
|
1046
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
1047
|
+
{
|
|
1048
|
+
CPLog(@"On iOS, resetting client device ID does nothing as it is the iOS IDFV.");
|
|
1049
|
+
resolve([[CodePushConfig current] clientUniqueId]);
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1045
1052
|
#pragma mark - JavaScript-exported module methods (Private)
|
|
1046
1053
|
|
|
1047
1054
|
/*
|
|
@@ -35,6 +35,10 @@ static NSString * const PublicKeyKey = @"publicKey";
|
|
|
35
35
|
NSString *buildVersion = [infoDictionary objectForKey:(NSString *)kCFBundleVersionKey];
|
|
36
36
|
NSString *releaseChannelPublicId = [infoDictionary objectForKey:@"CodePushReleaseChannelPublicId"];
|
|
37
37
|
NSString *serverURL = [infoDictionary objectForKey:@"CodePushServerURL"];
|
|
38
|
+
if (!serverURL) {
|
|
39
|
+
serverURL = [infoDictionary objectForKey:@"CodePushServerUrl"];
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
NSString *publicKey = [infoDictionary objectForKey:@"CodePushSigningPublicKey"];
|
|
39
43
|
|
|
40
44
|
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
|
package/lib/commonjs/CodePush.js
CHANGED
|
@@ -14,14 +14,18 @@ var _sync = require("./sync.js");
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* 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.
|
|
18
|
+
*
|
|
19
|
+
* Internally, the higher-order component calls `sync` inside its `componentDidMount` lifecycle handle, which in turns performs an update check, downloads the update if it exists and installs the update for you.
|
|
18
20
|
*
|
|
19
21
|
* @param component the React Component that will be decorated
|
|
20
22
|
*/
|
|
21
23
|
// @ts-ignore
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* 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.
|
|
27
|
+
*
|
|
28
|
+
* Internally, the higher-order component calls `sync` inside its `componentDidMount` lifecycle handle, which in turns performs an update check, downloads the update if it exists and installs the update for you.
|
|
25
29
|
*
|
|
26
30
|
* @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?).
|
|
27
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hoistNonReactStatics","_interopRequireDefault","require","_react","_reactNative","_CheckFrequencyEnum","_notifyAppReady","_sync","_jsxRuntime","e","__esModule","default","withCodePush","optionsOrComponent","options","WithCodePush","RootComponent","CodePushComponent","React","Component","constructor","props","rootComponentRef","createRef","componentDidMount","checkFrequency","CheckFrequency","MANUAL","notifyAppReady","rootComponentInstance","current","syncStatusCallback","codePushStatusDidChange","bind","downloadProgressCallback","codePushDownloadDidProgress","handleBinaryVersionMismatchCallback","codePushOnBinaryVersionMismatch","sync","ON_APP_RESUME","AppState","addEventListener","newState","render","prototype","ref","jsx","hoistStatics","_default","exports"],"sourceRoot":"../../src","sources":["CodePush.tsx"],"mappings":";;;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAA8B,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;
|
|
1
|
+
{"version":3,"names":["_hoistNonReactStatics","_interopRequireDefault","require","_react","_reactNative","_CheckFrequencyEnum","_notifyAppReady","_sync","_jsxRuntime","e","__esModule","default","withCodePush","optionsOrComponent","options","WithCodePush","RootComponent","CodePushComponent","React","Component","constructor","props","rootComponentRef","createRef","componentDidMount","checkFrequency","CheckFrequency","MANUAL","notifyAppReady","rootComponentInstance","current","syncStatusCallback","codePushStatusDidChange","bind","downloadProgressCallback","codePushDownloadDidProgress","handleBinaryVersionMismatchCallback","codePushOnBinaryVersionMismatch","sync","ON_APP_RESUME","AppState","addEventListener","newState","render","prototype","ref","jsx","hoistStatics","_default","exports"],"sourceRoot":"../../src","sources":["CodePush.tsx"],"mappings":";;;;;;;AAAA,IAAAA,qBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAA8B,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAiB9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKO,SAASG,YAAYA,CAAmBC,kBAA4D,EAAE;EAC3G,MAAMC,OAAwB,GAAG,OAAOD,kBAAkB,KAAK,UAAU,GAAG,CAAC,CAAC,GAAGA,kBAAkB;EAEnG,MAAME,YAAY,GAAIC,aAAqC,IAAK;IAC9D,MAAMC,iBAAiB,SAASC,cAAK,CAACC,SAAS,CAAI;MAGjDC,WAAWA,CAACC,KAAY,EAAE;QACxB,KAAK,CAACA,KAAK,CAAC;QACZ,IAAI,CAACC,gBAAgB,gBAAGJ,cAAK,CAACK,SAAS,CAAC,CAAC;MAC3C;MAEAC,iBAAiBA,CAAA,EAAG;QAClB,IAAIV,OAAO,CAACW,cAAc,KAAKC,kCAAc,CAACC,MAAM,EAAE;UACpD,IAAAC,8BAAc,EAAC,CAAC;QAClB,CAAC,MAAM;UACL,MAAMC,qBAAqB,GAAG,IAAI,CAACP,gBAAgB,CAACQ,OAAO;UAE3D,IAAIC,kBAAyD;UAC7D,IAAIF,qBAAqB,IAAIA,qBAAqB,CAACG,uBAAuB,EAAE;YAC1ED,kBAAkB,GAAGF,qBAAqB,CAACG,uBAAuB,CAACC,IAAI,CAACJ,qBAAqB,CAAC;UAChG;UAEA,IAAIK,wBAA8D;UAClE,IAAIL,qBAAqB,IAAIA,qBAAqB,CAACM,2BAA2B,EAAE;YAC9ED,wBAAwB,GAAGL,qBAAqB,CAACM,2BAA2B,CAACF,IAAI,CAACJ,qBAAqB,CAAC;UAC1G;UAEA,IAAIO,mCAAoF;UACxF,IAAIP,qBAAqB,IAAIA,qBAAqB,CAACQ,+BAA+B,EAAE;YAClFD,mCAAmC,GACjCP,qBAAqB,CAACQ,+BAA+B,CAACJ,IAAI,CAACJ,qBAAqB,CAAC;UACrF;UAEA,IAAAS,UAAI,EAACxB,OAAO,EAAEiB,kBAAkB,EAAEG,wBAAwB,EAAEE,mCAAmC,CAAC;UAEhG,IAAItB,OAAO,CAACW,cAAc,KAAKC,kCAAc,CAACa,aAAa,EAAE;YAC3DC,qBAAQ,CAACC,gBAAgB,CAAC,QAAQ,EAAGC,QAAgB,IAAK;cACxD,IAAIA,QAAQ,KAAK,QAAQ,EAAE;gBACzB,IAAAJ,UAAI,EAACxB,OAAO,EAAEiB,kBAAkB,EAAEG,wBAAwB,CAAC;cAC7D;YACF,CAAC,CAAC;UACJ;QACF;MACF;MAEAS,MAAMA,CAAA,EAAG;QACP,MAAMtB,KAAK,GAAG;UAAE,GAAG,IAAI,CAACA;QAAM,CAAC;;QAE/B;QACA;QACA,IAAIL,aAAa,CAAC4B,SAAS,IAAI5B,aAAa,CAAC4B,SAAS,CAACD,MAAM,EAAE;UAC7D;UACAtB,KAAK,CAACwB,GAAG,GAAG,IAAI,CAACvB,gBAAgB;QACnC;QAEA,oBAAO,IAAAd,WAAA,CAAAsC,GAAA,EAAC9B,aAAa;UAAA,GAAKK;QAAK,CAAG,CAAC;MACrC;IACF;IAEA,OAAO,IAAA0B,6BAAY,EAAC9B,iBAAiB,EAAED,aAAa,CAAC;EACvD,CAAC;EAED,IAAI,OAAOH,kBAAkB,KAAK,UAAU,EAAE;IAC5C;IACA,OAAOE,YAAY,CAACF,kBAAkB,CAAC;EACzC,CAAC,MAAM;IACL,OAAOE,YAAY;EACrB;AACF;AAAC,IAAAiC,QAAA,GAAAC,OAAA,CAAAtC,OAAA,GAEcC,YAAY","ignoreList":[]}
|
|
@@ -7,6 +7,8 @@ exports.allowRestart = void 0;
|
|
|
7
7
|
var _NativeRNAppZungCodePushModule = require("./internals/NativeRNAppZungCodePushModule.js");
|
|
8
8
|
/**
|
|
9
9
|
* Allow CodePush to restart the app.
|
|
10
|
+
*
|
|
11
|
+
* This is an advanced API and is only necessary if your app explicitly disallowed restarts via the `disallowRestart` method.
|
|
10
12
|
*/
|
|
11
13
|
const allowRestart = exports.allowRestart = _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.allow;
|
|
12
14
|
//# sourceMappingURL=allowRestart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_NativeRNAppZungCodePushModule","require","allowRestart","exports","NativeRNAppZungCodePushModule","allow"],"sourceRoot":"../../src","sources":["allowRestart.ts"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACO,MAAMC,YAAwB,GAAAC,OAAA,CAAAD,YAAA,GAAGE,4DAA6B,CAACC,KAAK","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_NativeRNAppZungCodePushModule","require","allowRestart","exports","NativeRNAppZungCodePushModule","allow"],"sourceRoot":"../../src","sources":["allowRestart.ts"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAwB,GAAAC,OAAA,CAAAD,YAAA,GAAGE,4DAA6B,CAACC,KAAK","ignoreList":[]}
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.checkForUpdate = checkForUpdate;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
+
var _CodePushApiSdk = require("./internals/CodePushApiSdk.js");
|
|
8
9
|
var _NativeRNAppZungCodePushModule = require("./internals/NativeRNAppZungCodePushModule.js");
|
|
9
10
|
var _RemotePackageImplementation = require("./internals/RemotePackageImplementation.js");
|
|
10
11
|
var _getConfiguration = require("./internals/getConfiguration.js");
|
|
11
12
|
var _getCurrentPackage = require("./internals/getCurrentPackage.js");
|
|
12
|
-
var _getPromisifiedSdk = require("./internals/getPromisifiedSdk.js");
|
|
13
13
|
var _log = require("./internals/utils/log.js");
|
|
14
|
-
var _requestFetchAdapter = require("./internals/utils/
|
|
14
|
+
var _requestFetchAdapter = require("./internals/utils/requestFetchAdapter.js");
|
|
15
15
|
/**
|
|
16
16
|
* Asks the CodePush service whether the configured app release channel has an update available.
|
|
17
17
|
*
|
|
@@ -38,11 +38,9 @@ async function checkForUpdate(releaseChannelPublicId, handleBinaryVersionMismatc
|
|
|
38
38
|
*/
|
|
39
39
|
const config = releaseChannelPublicId ? {
|
|
40
40
|
...nativeConfig,
|
|
41
|
-
|
|
42
|
-
releaseChannelPublicId
|
|
43
|
-
}
|
|
41
|
+
releaseChannelPublicId
|
|
44
42
|
} : nativeConfig;
|
|
45
|
-
const sdk =
|
|
43
|
+
const sdk = new _CodePushApiSdk.CodePushApiSdk(_requestFetchAdapter.requestFetchAdapter, config);
|
|
46
44
|
const localPackage = await (0, _getCurrentPackage.getCurrentPackage)();
|
|
47
45
|
|
|
48
46
|
/*
|
|
@@ -53,17 +51,12 @@ async function checkForUpdate(releaseChannelPublicId, handleBinaryVersionMismatc
|
|
|
53
51
|
* to send the app version to the server, since we are interested
|
|
54
52
|
* in any updates for current binary version, regardless of hash.
|
|
55
53
|
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
if (_reactNative.Platform.OS === 'ios' && config.packageHash) {
|
|
64
|
-
queryPackage.packageHash = config.packageHash;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
54
|
+
const queryPackage = localPackage ?? {
|
|
55
|
+
appVersion: config.appVersion,
|
|
56
|
+
...(_reactNative.Platform.OS === 'ios' && config.packageHash ? {
|
|
57
|
+
packageHash: config.packageHash
|
|
58
|
+
} : {})
|
|
59
|
+
};
|
|
67
60
|
const update = await sdk.queryUpdateWithCurrentPackage(queryPackage);
|
|
68
61
|
|
|
69
62
|
/*
|
|
@@ -87,19 +80,24 @@ async function checkForUpdate(releaseChannelPublicId, handleBinaryVersionMismatc
|
|
|
87
80
|
if (!update) {
|
|
88
81
|
return null;
|
|
89
82
|
}
|
|
90
|
-
if ('updateAppVersion' in update
|
|
83
|
+
if ('updateAppVersion' in update) {
|
|
84
|
+
if (!update.updateAppVersion) {
|
|
85
|
+
throw new Error('updateAppVersion should never be false');
|
|
86
|
+
}
|
|
91
87
|
(0, _log.log)('An update is available but it is not targeting the binary version of your app.');
|
|
92
88
|
handleBinaryVersionMismatchCallback?.(update);
|
|
93
89
|
return null;
|
|
94
90
|
}
|
|
95
|
-
if (localPackage &&
|
|
91
|
+
if (localPackage && update.packageHash === localPackage.packageHash || (!localPackage || '_isDebugOnly' in localPackage && localPackage._isDebugOnly) && config.packageHash === update.packageHash) {
|
|
96
92
|
return null;
|
|
97
93
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
94
|
+
const remotePackageData = {
|
|
95
|
+
...update,
|
|
96
|
+
releaseChannelPublicId: releaseChannelPublicId || nativeConfig.releaseChannelPublicId,
|
|
97
|
+
failedInstall: await _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.isFailedUpdate(update.packageHash),
|
|
98
|
+
isFirstRun: false,
|
|
99
|
+
isPending: false
|
|
100
|
+
};
|
|
101
|
+
return new _RemotePackageImplementation.RemotePackageImpl(remotePackageData, packageInfo => sdk.reportStatusDownload(packageInfo));
|
|
104
102
|
}
|
|
105
103
|
//# sourceMappingURL=checkForUpdates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_NativeRNAppZungCodePushModule","_RemotePackageImplementation","_getConfiguration","_getCurrentPackage","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_CodePushApiSdk","_NativeRNAppZungCodePushModule","_RemotePackageImplementation","_getConfiguration","_getCurrentPackage","_log","_requestFetchAdapter","checkForUpdate","releaseChannelPublicId","handleBinaryVersionMismatchCallback","nativeConfig","getConfiguration","config","sdk","CodePushApiSdk","requestFetchAdapter","localPackage","getCurrentPackage","queryPackage","appVersion","Platform","OS","packageHash","update","queryUpdateWithCurrentPackage","updateAppVersion","Error","log","_isDebugOnly","remotePackageData","failedInstall","NativeRNAppZungCodePushModule","isFailedUpdate","isFirstRun","isPending","RemotePackageImpl","packageInfo","reportStatusDownload"],"sourceRoot":"../../src","sources":["checkForUpdates.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAEA,IAAAE,8BAAA,GAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AAEA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeQ,cAAcA,CAClCC,sBAA+B,EAC/BC,mCAAyE,EAC1C;EAC/B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,YAAY,GAAG,MAAM,IAAAC,kCAAgB,EAAC,CAAC;EAC7C;AACF;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,MAAqB,GAAGJ,sBAAsB,GAAG;IAAE,GAAGE,YAAY;IAAEF;EAAuB,CAAC,GAAGE,YAAY;EACjH,MAAMG,GAAG,GAAG,IAAIC,8BAAc,CAACC,wCAAmB,EAAEH,MAAM,CAAC;EAE3D,MAAMI,YAAY,GAAG,MAAM,IAAAC,oCAAiB,EAAC,CAAC;;EAE9C;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,YAA0C,GAAGF,YAAY,IAAI;IACjEG,UAAU,EAAEP,MAAM,CAACO,UAAU;IAC7B,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAIT,MAAM,CAACU,WAAW,GAAG;MAAEA,WAAW,EAAEV,MAAM,CAACU;IAAY,CAAC,GAAG,CAAC,CAAC;EAC5F,CAAC;EAED,MAAMC,MAAM,GAAG,MAAMV,GAAG,CAACW,6BAA6B,CAACN,YAAY,CAAC;;EAEpE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAI,CAACK,MAAM,EAAE;IACX,OAAO,IAAI;EACb;EAEA,IAAI,kBAAkB,IAAIA,MAAM,EAAE;IAChC,IAAI,CAACA,MAAM,CAACE,gBAAgB,EAAE;MAC5B,MAAM,IAAIC,KAAK,CAAC,wCAAwC,CAAC;IAC3D;IAEA,IAAAC,QAAG,EAAC,gFAAgF,CAAC;IACrFlB,mCAAmC,GAAGc,MAAM,CAAC;IAE7C,OAAO,IAAI;EACb;EAEA,IACGP,YAAY,IAAIO,MAAM,CAACD,WAAW,KAAKN,YAAY,CAACM,WAAW,IAC/D,CAAC,CAACN,YAAY,IAAK,cAAc,IAAIA,YAAY,IAAIA,YAAY,CAACY,YAAa,KAC9EhB,MAAM,CAACU,WAAW,KAAKC,MAAM,CAACD,WAAY,EAC5C;IACA,OAAO,IAAI;EACb;EAEA,MAAMO,iBAAkD,GAAG;IACzD,GAAGN,MAAM;IACTf,sBAAsB,EAAEA,sBAAsB,IAAIE,YAAY,CAACF,sBAAsB;IACrFsB,aAAa,EAAE,MAAMC,4DAA6B,CAACC,cAAc,CAACT,MAAM,CAACD,WAAW,CAAC;IACrFW,UAAU,EAAE,KAAK;IACjBC,SAAS,EAAE;EACb,CAAC;EAED,OAAO,IAAIC,8CAAiB,CAACN,iBAAiB,EAAGO,WAAW,IAAKvB,GAAG,CAACwB,oBAAoB,CAACD,WAAW,CAAC,CAAC;AACzG","ignoreList":[]}
|
|
@@ -7,8 +7,9 @@ exports.clearUpdates = void 0;
|
|
|
7
7
|
var _NativeRNAppZungCodePushModule = require("./internals/NativeRNAppZungCodePushModule.js");
|
|
8
8
|
/**
|
|
9
9
|
* Clears all downloaded CodePush updates.
|
|
10
|
+
*
|
|
10
11
|
* This is useful when switching to a different release channel which may have an older release than the current package.
|
|
11
|
-
* Note: we don’t recommend
|
|
12
|
+
* Note: we don’t recommend using this method in scenarios other than that (CodePush will call
|
|
12
13
|
* this method automatically when needed in other cases) as it could lead to unpredictable behavior.
|
|
13
14
|
*/
|
|
14
15
|
const clearUpdates = exports.clearUpdates = _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.clearUpdates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_NativeRNAppZungCodePushModule","require","clearUpdates","exports","NativeRNAppZungCodePushModule"],"sourceRoot":"../../src","sources":["clearUpdates.ts"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAwB,GAAAC,OAAA,CAAAD,YAAA,GAAGE,4DAA6B,CAACF,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_NativeRNAppZungCodePushModule","require","clearUpdates","exports","NativeRNAppZungCodePushModule"],"sourceRoot":"../../src","sources":["clearUpdates.ts"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAwB,GAAAC,OAAA,CAAAD,YAAA,GAAGE,4DAA6B,CAACF,YAAY","ignoreList":[]}
|
|
@@ -7,6 +7,8 @@ exports.disallowRestart = void 0;
|
|
|
7
7
|
var _NativeRNAppZungCodePushModule = require("./internals/NativeRNAppZungCodePushModule.js");
|
|
8
8
|
/**
|
|
9
9
|
* Forbid CodePush to restart the app.
|
|
10
|
+
*
|
|
11
|
+
* This is an advanced API, and is useful when a component within your app (for example an onboarding process) needs to ensure that no end-user interruptions can occur during its lifetime.
|
|
10
12
|
*/
|
|
11
13
|
const disallowRestart = exports.disallowRestart = _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.disallow;
|
|
12
14
|
//# sourceMappingURL=disallowRestart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_NativeRNAppZungCodePushModule","require","disallowRestart","exports","NativeRNAppZungCodePushModule","disallow"],"sourceRoot":"../../src","sources":["disallowRestart.ts"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACO,MAAMC,eAA2B,GAAAC,OAAA,CAAAD,eAAA,GAAGE,4DAA6B,CAACC,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_NativeRNAppZungCodePushModule","require","disallowRestart","exports","NativeRNAppZungCodePushModule","disallow"],"sourceRoot":"../../src","sources":["disallowRestart.ts"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAA2B,GAAAC,OAAA,CAAAD,eAAA,GAAGE,4DAA6B,CAACC,QAAQ","ignoreList":[]}
|
|
@@ -13,11 +13,11 @@ let CheckFrequency = exports.CheckFrequency = /*#__PURE__*/function (CheckFreque
|
|
|
13
13
|
*/
|
|
14
14
|
CheckFrequency[CheckFrequency["ON_APP_START"] = 0] = "ON_APP_START";
|
|
15
15
|
/**
|
|
16
|
-
* When the app re-enters the foreground.
|
|
16
|
+
* When the app re-enters the foreground after being "backgrounded" (user pressed the home button, app launches a separate payment process, etc.)
|
|
17
17
|
*/
|
|
18
18
|
CheckFrequency[CheckFrequency["ON_APP_RESUME"] = 1] = "ON_APP_RESUME";
|
|
19
19
|
/**
|
|
20
|
-
* Don't automatically check for updates, but only do it when
|
|
20
|
+
* Don't automatically check for updates, but only do it when `sync()` is manually called in app code.
|
|
21
21
|
*/
|
|
22
22
|
CheckFrequency[CheckFrequency["MANUAL"] = 2] = "MANUAL";
|
|
23
23
|
return CheckFrequency;
|
|
@@ -11,16 +11,20 @@ var _NativeRNAppZungCodePushModule = require("../internals/NativeRNAppZungCodePu
|
|
|
11
11
|
let InstallMode = exports.InstallMode = function (InstallMode) {
|
|
12
12
|
/**
|
|
13
13
|
* Indicates that you want to install the update and restart the app immediately.
|
|
14
|
+
*
|
|
15
|
+
* This value is appropriate for debugging scenarios as well as when displaying an update prompt to the user, since they would expect to see the changes immediately after accepting the installation. Additionally, this mode can be used to enforce mandatory updates, since it removes the potentially undesired latency between the update installation and the next time the end user restarts or resumes the app.
|
|
14
16
|
*/
|
|
15
17
|
InstallMode[InstallMode["IMMEDIATE"] = _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.getConstants().codePushInstallModeImmediate] = "IMMEDIATE";
|
|
16
18
|
/**
|
|
17
19
|
* Indicates that you want to install the update, but not forcibly restart the app.
|
|
20
|
+
*
|
|
21
|
+
* When the app is "naturally" restarted (due the OS or end user killing it), the update will be seamlessly picked up. This value is appropriate when performing silent updates, since it would likely be disruptive to the end user if the app suddenly restarted out of nowhere, since they wouldn't have realized an update was even downloaded. This is the default mode used for both the `sync` and `LocalPackage.install` methods.
|
|
18
22
|
*/
|
|
19
23
|
InstallMode[InstallMode["ON_NEXT_RESTART"] = _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.getConstants().codePushInstallModeOnNextRestart] = "ON_NEXT_RESTART";
|
|
20
24
|
/**
|
|
21
|
-
* Indicates that you want to install the update, but don't want to restart the app until the next time
|
|
22
|
-
*
|
|
23
|
-
* but you can get the update in front of them sooner than having to wait for the next natural restart.
|
|
25
|
+
* Indicates that you want to install the update, but don't want to restart the app until the next time the end user resumes it from the background.
|
|
26
|
+
*
|
|
27
|
+
* This way, you don't disrupt their current session,but you can get the update in front of them sooner than having to wait for the next natural restart.
|
|
24
28
|
* This value is appropriate for silent installs that can be applied on resume in a non-invasive way.
|
|
25
29
|
*/
|
|
26
30
|
InstallMode[InstallMode["ON_NEXT_RESUME"] = _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.getConstants().codePushInstallModeOnNextResume] = "ON_NEXT_RESUME";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_NativeRNAppZungCodePushModule","require","InstallMode","exports","NativeRNAppZungCodePushModule","getConstants","codePushInstallModeImmediate","codePushInstallModeOnNextRestart","codePushInstallModeOnNextResume","codePushInstallModeOnNextSuspend"],"sourceRoot":"../../../src","sources":["enums/InstallMode.enum.ts"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AAFA,IAGYC,WAAW,GAAAC,OAAA,CAAAD,WAAA,aAAXA,WAAW;EACrB;AACF;AACA;
|
|
1
|
+
{"version":3,"names":["_NativeRNAppZungCodePushModule","require","InstallMode","exports","NativeRNAppZungCodePushModule","getConstants","codePushInstallModeImmediate","codePushInstallModeOnNextRestart","codePushInstallModeOnNextResume","codePushInstallModeOnNextSuspend"],"sourceRoot":"../../../src","sources":["enums/InstallMode.enum.ts"],"mappings":";;;;;;AAAA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AAFA,IAGYC,WAAW,GAAAC,OAAA,CAAAD,WAAA,aAAXA,WAAW;EACrB;AACF;AACA;AACA;AACA;EALYA,WAAW,CAAXA,WAAW,gBAMTE,4DAA6B,CAACC,YAAY,CAAC,CAAC,CAACC,4BAA4B;EAErF;AACF;AACA;AACA;AACA;EAZYJ,WAAW,CAAXA,WAAW,sBAaHE,4DAA6B,CAACC,YAAY,CAAC,CAAC,CAACE,gCAAgC;EAE/F;AACF;AACA;AACA;AACA;AACA;EApBYL,WAAW,CAAXA,WAAW,qBAqBJE,4DAA6B,CAACC,YAAY,CAAC,CAAC,CAACG,+BAA+B;EAE7F;AACF;AACA;AACA;AACA;EA3BYN,WAAW,CAAXA,WAAW,sBA4BHE,4DAA6B,CAACC,YAAY,CAAC,CAAC,CAACI,gCAAgC;EAAA,OA5BrFP,WAAW;AAAA","ignoreList":[]}
|