@appzung/react-native-code-push 10.0.0-rc1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CodePush.podspec +1 -0
- package/LICENSE.md +2 -2
- package/README.md +74 -95
- package/android/app/build.gradle +62 -18
- package/android/app/src/main/AndroidManifest.xml +2 -3
- package/android/app/src/main/AndroidManifestNew.xml +3 -0
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePush.java +21 -89
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNativeModule.java +32 -3
- package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateManager.java +2 -2
- package/android/build.gradle +1 -11
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradle.properties +4 -20
- package/docs/advanced-usage.md +2 -2
- package/docs/api-android.md +12 -10
- package/docs/api-ios.md +5 -5
- package/docs/api-js.md +180 -178
- package/docs/code-signing.md +62 -0
- package/docs/migrating-to-v10.md +31 -0
- package/docs/setup-android.md +52 -79
- package/docs/setup-ios.md +31 -28
- package/docs/setup-windows.md +1 -0
- package/ios/CodePush/CodePush.m +13 -57
- package/lib/commonjs/CodePush.js +90 -0
- package/lib/commonjs/CodePush.js.map +1 -0
- package/lib/commonjs/allowRestart.js +12 -0
- package/lib/commonjs/allowRestart.js.map +1 -0
- package/lib/commonjs/checkForUpdates.js +105 -0
- package/lib/commonjs/checkForUpdates.js.map +1 -0
- package/lib/commonjs/clearUpdates.js +15 -0
- package/lib/commonjs/clearUpdates.js.map +1 -0
- package/lib/commonjs/disallowRestart.js +12 -0
- package/lib/commonjs/disallowRestart.js.map +1 -0
- package/lib/commonjs/enums/CheckFrequency.enum.js +25 -0
- package/lib/commonjs/enums/CheckFrequency.enum.js.map +1 -0
- package/lib/commonjs/enums/DeploymentStatus.enum.js +21 -0
- package/lib/commonjs/enums/DeploymentStatus.enum.js.map +1 -0
- package/lib/commonjs/enums/InstallMode.enum.js +35 -0
- package/lib/commonjs/enums/InstallMode.enum.js.map +1 -0
- package/lib/commonjs/enums/SyncStatus.enum.js +53 -0
- package/lib/commonjs/enums/SyncStatus.enum.js.map +1 -0
- package/lib/commonjs/enums/UpdateState.enum.js +29 -0
- package/lib/commonjs/enums/UpdateState.enum.js.map +1 -0
- package/lib/commonjs/getUpdateMetadata.js +25 -0
- package/lib/commonjs/getUpdateMetadata.js.map +1 -0
- package/lib/commonjs/index.js +195 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internals/AcquisitionSdk.js +9 -0
- package/lib/commonjs/internals/AcquisitionSdk.js.map +1 -0
- package/lib/commonjs/internals/LocalPackageImplementation.js +29 -0
- package/lib/commonjs/internals/LocalPackageImplementation.js.map +1 -0
- package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js +8 -0
- package/lib/commonjs/internals/NativeRNAppZungCodePushModule.js.map +1 -0
- package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js +6 -0
- package/lib/commonjs/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js +49 -0
- package/lib/commonjs/internals/RemotePackageImplementation.js.map +1 -0
- package/lib/commonjs/internals/getConfiguration.js +15 -0
- package/lib/commonjs/internals/getConfiguration.js.map +1 -0
- package/lib/commonjs/internals/getCurrentPackage.js +12 -0
- package/lib/commonjs/internals/getCurrentPackage.js.map +1 -0
- package/lib/commonjs/internals/getPromisifiedSdk.js +49 -0
- package/lib/commonjs/internals/getPromisifiedSdk.js.map +1 -0
- package/lib/commonjs/internals/shouldUpdateBeIgnored.js +62 -0
- package/lib/commonjs/internals/shouldUpdateBeIgnored.js.map +1 -0
- package/lib/commonjs/internals/types.js +6 -0
- package/lib/commonjs/internals/types.js.map +1 -0
- package/lib/commonjs/internals/utils/log.js +11 -0
- package/lib/commonjs/internals/utils/log.js.map +1 -0
- package/lib/commonjs/internals/utils/request-fetch-adapter.js +50 -0
- package/lib/commonjs/internals/utils/request-fetch-adapter.js.map +1 -0
- package/lib/commonjs/internals/version.js +9 -0
- package/lib/commonjs/internals/version.js.map +1 -0
- package/lib/commonjs/notifyAppReady.js +83 -0
- package/lib/commonjs/notifyAppReady.js.map +1 -0
- package/lib/commonjs/reactNative.d.js +2 -0
- package/lib/commonjs/reactNative.d.js.map +1 -0
- package/lib/commonjs/restartApp.js +16 -0
- package/lib/commonjs/restartApp.js.map +1 -0
- package/lib/commonjs/sync.js +219 -0
- package/lib/commonjs/sync.js.map +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/CodePush.js +84 -0
- package/lib/module/CodePush.js.map +1 -0
- package/lib/module/allowRestart.js +9 -0
- package/lib/module/allowRestart.js.map +1 -0
- package/lib/module/checkForUpdates.js +101 -0
- package/lib/module/checkForUpdates.js.map +1 -0
- package/lib/module/clearUpdates.js +12 -0
- package/lib/module/clearUpdates.js.map +1 -0
- package/lib/module/disallowRestart.js +9 -0
- package/lib/module/disallowRestart.js.map +1 -0
- package/lib/module/enums/CheckFrequency.enum.js +21 -0
- package/lib/module/enums/CheckFrequency.enum.js.map +1 -0
- package/lib/module/enums/DeploymentStatus.enum.js +17 -0
- package/lib/module/enums/DeploymentStatus.enum.js.map +1 -0
- package/lib/module/enums/InstallMode.enum.js +32 -0
- package/lib/module/enums/InstallMode.enum.js.map +1 -0
- package/lib/module/enums/SyncStatus.enum.js +49 -0
- package/lib/module/enums/SyncStatus.enum.js.map +1 -0
- package/lib/module/enums/UpdateState.enum.js +26 -0
- package/lib/module/enums/UpdateState.enum.js.map +1 -0
- package/lib/module/getUpdateMetadata.js +21 -0
- package/lib/module/getUpdateMetadata.js.map +1 -0
- package/lib/module/index.js +19 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internals/AcquisitionSdk.js +5 -0
- package/lib/module/internals/AcquisitionSdk.js.map +1 -0
- package/lib/module/internals/LocalPackageImplementation.js +24 -0
- package/lib/module/internals/LocalPackageImplementation.js.map +1 -0
- package/lib/module/internals/NativeRNAppZungCodePushModule.js +4 -0
- package/lib/module/internals/NativeRNAppZungCodePushModule.js.map +1 -0
- package/lib/module/internals/RNAppZungCodePushModuleSpec.js +4 -0
- package/lib/module/internals/RNAppZungCodePushModuleSpec.js.map +1 -0
- package/lib/module/internals/RemotePackageImplementation.js +44 -0
- package/lib/module/internals/RemotePackageImplementation.js.map +1 -0
- package/lib/module/internals/getConfiguration.js +11 -0
- package/lib/module/internals/getConfiguration.js.map +1 -0
- package/lib/module/internals/getCurrentPackage.js +8 -0
- package/lib/module/internals/getCurrentPackage.js.map +1 -0
- package/lib/module/internals/getPromisifiedSdk.js +45 -0
- package/lib/module/internals/getPromisifiedSdk.js.map +1 -0
- package/lib/module/internals/shouldUpdateBeIgnored.js +58 -0
- package/lib/module/internals/shouldUpdateBeIgnored.js.map +1 -0
- package/lib/module/internals/types.js +4 -0
- package/lib/module/internals/types.js.map +1 -0
- package/lib/module/internals/utils/log.js +7 -0
- package/lib/module/internals/utils/log.js.map +1 -0
- package/lib/module/internals/utils/request-fetch-adapter.js +46 -0
- package/lib/module/internals/utils/request-fetch-adapter.js.map +1 -0
- package/lib/module/internals/version.js +5 -0
- package/lib/module/internals/version.js.map +1 -0
- package/lib/module/notifyAppReady.js +79 -0
- package/lib/module/notifyAppReady.js.map +1 -0
- package/lib/module/reactNative.d.js +2 -0
- package/lib/module/reactNative.d.js.map +1 -0
- package/lib/module/restartApp.js +13 -0
- package/lib/module/restartApp.js.map +1 -0
- package/lib/module/sync.js +215 -0
- package/lib/module/sync.js.map +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/CodePush.d.ts +24 -0
- package/lib/typescript/commonjs/src/CodePush.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts +5 -0
- package/lib/typescript/commonjs/src/allowRestart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts +9 -0
- package/lib/typescript/commonjs/src/checkForUpdates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/clearUpdates.d.ts +8 -0
- package/lib/typescript/commonjs/src/clearUpdates.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts +5 -0
- package/lib/typescript/commonjs/src/disallowRestart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts +18 -0
- package/lib/typescript/commonjs/src/enums/CheckFrequency.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts +14 -0
- package/lib/typescript/commonjs/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts +27 -0
- package/lib/typescript/commonjs/src/enums/InstallMode.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts +46 -0
- package/lib/typescript/commonjs/src/enums/SyncStatus.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts +21 -0
- package/lib/typescript/commonjs/src/enums/UpdateState.enum.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts +9 -0
- package/lib/typescript/commonjs/src/getUpdateMetadata.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/AcquisitionSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts +17 -0
- package/lib/typescript/commonjs/src/internals/LocalPackageImplementation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
- package/lib/typescript/commonjs/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts +18 -0
- package/lib/typescript/commonjs/src/internals/RemotePackageImplementation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/getConfiguration.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/getCurrentPackage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts +13 -0
- package/lib/typescript/commonjs/src/internals/getPromisifiedSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/types.d.ts +16 -0
- package/lib/typescript/commonjs/src/internals/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/log.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/utils/log.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts +3 -0
- package/lib/typescript/commonjs/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts +2 -0
- package/lib/typescript/commonjs/src/internals/version.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts +6 -0
- package/lib/typescript/commonjs/src/notifyAppReady.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts +7 -0
- package/lib/typescript/commonjs/src/restartApp.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/sync.d.ts +17 -0
- package/lib/typescript/commonjs/src/sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +196 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/CodePush.d.ts +24 -0
- package/lib/typescript/module/src/CodePush.d.ts.map +1 -0
- package/lib/typescript/module/src/allowRestart.d.ts +5 -0
- package/lib/typescript/module/src/allowRestart.d.ts.map +1 -0
- package/lib/typescript/module/src/checkForUpdates.d.ts +9 -0
- package/lib/typescript/module/src/checkForUpdates.d.ts.map +1 -0
- package/lib/typescript/module/src/clearUpdates.d.ts +8 -0
- package/lib/typescript/module/src/clearUpdates.d.ts.map +1 -0
- package/lib/typescript/module/src/disallowRestart.d.ts +5 -0
- package/lib/typescript/module/src/disallowRestart.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts +18 -0
- package/lib/typescript/module/src/enums/CheckFrequency.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts +14 -0
- package/lib/typescript/module/src/enums/DeploymentStatus.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts +27 -0
- package/lib/typescript/module/src/enums/InstallMode.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts +46 -0
- package/lib/typescript/module/src/enums/SyncStatus.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts +21 -0
- package/lib/typescript/module/src/enums/UpdateState.enum.d.ts.map +1 -0
- package/lib/typescript/module/src/getUpdateMetadata.d.ts +9 -0
- package/lib/typescript/module/src/getUpdateMetadata.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +17 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts +3 -0
- package/lib/typescript/module/src/internals/AcquisitionSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts +17 -0
- package/lib/typescript/module/src/internals/LocalPackageImplementation.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts +3 -0
- package/lib/typescript/module/src/internals/NativeRNAppZungCodePushModule.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts +36 -0
- package/lib/typescript/module/src/internals/RNAppZungCodePushModuleSpec.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts +18 -0
- package/lib/typescript/module/src/internals/RemotePackageImplementation.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts +3 -0
- package/lib/typescript/module/src/internals/getConfiguration.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getCurrentPackage.d.ts +2 -0
- package/lib/typescript/module/src/internals/getCurrentPackage.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts +13 -0
- package/lib/typescript/module/src/internals/getPromisifiedSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts +3 -0
- package/lib/typescript/module/src/internals/shouldUpdateBeIgnored.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/types.d.ts +16 -0
- package/lib/typescript/module/src/internals/types.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/log.d.ts +2 -0
- package/lib/typescript/module/src/internals/utils/log.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts +3 -0
- package/lib/typescript/module/src/internals/utils/request-fetch-adapter.d.ts.map +1 -0
- package/lib/typescript/module/src/internals/version.d.ts +2 -0
- package/lib/typescript/module/src/internals/version.d.ts.map +1 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts +6 -0
- package/lib/typescript/module/src/notifyAppReady.d.ts.map +1 -0
- package/lib/typescript/module/src/restartApp.d.ts +7 -0
- package/lib/typescript/module/src/restartApp.d.ts.map +1 -0
- package/lib/typescript/module/src/sync.d.ts +17 -0
- package/lib/typescript/module/src/sync.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +196 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/package.json +58 -11
- package/react-native.config.js +8 -8
- package/src/CodePush.tsx +108 -0
- package/src/allowRestart.ts +6 -0
- package/src/checkForUpdates.ts +109 -0
- package/src/clearUpdates.ts +9 -0
- package/src/disallowRestart.ts +6 -0
- package/src/enums/CheckFrequency.enum.ts +19 -0
- package/src/enums/DeploymentStatus.enum.ts +14 -0
- package/src/enums/InstallMode.enum.ts +31 -0
- package/src/enums/SyncStatus.enum.ts +53 -0
- package/src/enums/UpdateState.enum.ts +24 -0
- package/src/getUpdateMetadata.ts +23 -0
- package/src/index.ts +18 -0
- package/src/internals/AcquisitionSdk.ts +3 -0
- package/src/internals/LocalPackageImplementation.ts +45 -0
- package/src/internals/NativeRNAppZungCodePushModule.ts +3 -0
- package/src/internals/RNAppZungCodePushModuleSpec.ts +54 -0
- package/src/internals/RemotePackageImplementation.ts +69 -0
- package/src/internals/getConfiguration.ts +12 -0
- package/src/internals/getCurrentPackage.ts +6 -0
- package/src/internals/getPromisifiedSdk.ts +72 -0
- package/src/internals/shouldUpdateBeIgnored.ts +76 -0
- package/src/internals/types.ts +18 -0
- package/{logging.js → src/internals/utils/log.ts} +1 -3
- package/src/internals/utils/request-fetch-adapter.ts +58 -0
- package/src/internals/version.ts +2 -0
- package/src/notifyAppReady.ts +94 -0
- package/src/reactNative.d.ts +34 -0
- package/src/restartApp.ts +10 -0
- package/src/sync.ts +272 -0
- package/src/types.ts +237 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +29 -12
- package/AlertAdapter.js +0 -24
- package/CONTRIBUTING.md +0 -134
- package/CodePush.js +0 -674
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushBuilder.java +0 -37
- package/android/app/src/main/java/com/microsoft/codepush/react/CodePushDialog.java +0 -102
- package/package-mixins.js +0 -68
- package/request-fetch-adapter.js +0 -52
- package/tslint.json +0 -32
- package/typings/react-native-code-push.d.ts +0 -455
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushConstants.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInstallMode.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidPublicKeyException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushInvalidUpdateException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushMalformedDataException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushNotInitializedException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushTelemetryManager.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUnknownException.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateState.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUpdateUtils.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/CodePushUtils.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgress.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/DownloadProgressCallback.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/FileUtils.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/ReactInstanceHolder.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/SettingsManager.java +0 -0
- /package/android/app/src/main/java/com/{microsoft → appzung}/codepush/react/TLSSocketFactory.java +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCurrentPackage.d.ts","sourceRoot":"","sources":["../../../../../src/internals/getCurrentPackage.ts"],"names":[],"mappings":"AAGA,wBAAsB,iBAAiB,8CAEtC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Http, NativeUpdateNotification, Package, RemotePackage } from 'code-push/script/acquisition-sdk';
|
|
2
|
+
import type { Configuration } from './types';
|
|
3
|
+
export type PromisifiedSdkQueryPackage = Pick<Package, 'appVersion'> & {
|
|
4
|
+
packageHash?: string;
|
|
5
|
+
};
|
|
6
|
+
type PromisifiedSdk = {
|
|
7
|
+
queryUpdateWithCurrentPackage: (queryPackage: PromisifiedSdkQueryPackage) => Promise<RemotePackage | NativeUpdateNotification>;
|
|
8
|
+
reportStatusDeploy: (deployedPackage?: Package, status?: string, previousLabelOrAppVersion?: string, previousDeploymentKey?: string) => Promise<void>;
|
|
9
|
+
reportStatusDownload: (downloadedPackage: Package) => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export declare function getPromisifiedSdk(requestFetchAdapter: Http.Requester, config: Configuration): PromisifiedSdk;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=getPromisifiedSdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPromisifiedSdk.d.ts","sourceRoot":"","sources":["../../../../../src/internals/getPromisifiedSdk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAE/G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhG,KAAK,cAAc,GAAG;IACpB,6BAA6B,EAAE,CAC7B,YAAY,EAAE,0BAA0B,KACrC,OAAO,CAAC,aAAa,GAAG,wBAAwB,CAAC,CAAC;IACvD,kBAAkB,EAAE,CAClB,eAAe,CAAC,EAAE,OAAO,EACzB,MAAM,CAAC,EAAE,MAAM,EACf,yBAAyB,CAAC,EAAE,MAAM,EAClC,qBAAqB,CAAC,EAAE,MAAM,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,oBAAoB,EAAE,CAAC,iBAAiB,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrE,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,GAAG,cAAc,CAoD5G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shouldUpdateBeIgnored.d.ts","sourceRoot":"","sources":["../../../../../src/internals/shouldUpdateBeIgnored.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAwB,WAAW,EAAE,MAAM,UAAU,CAAC;AAuCjF,wBAAsB,qBAAqB,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,EAAE,WAAW,EAAE,WAAW,oBAoCpH"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Configuration as BaseConfiguration } from 'code-push/script/acquisition-sdk';
|
|
2
|
+
export interface Configuration extends BaseConfiguration {
|
|
3
|
+
releaseChannelPublicId: string;
|
|
4
|
+
packageHash?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface LatestRollbackInfo {
|
|
7
|
+
time: number;
|
|
8
|
+
count: number;
|
|
9
|
+
packageHash: string;
|
|
10
|
+
}
|
|
11
|
+
type FunctionPropertyNames<T> = {
|
|
12
|
+
[K in keyof T]: T[K] extends Function ? K : never;
|
|
13
|
+
}[keyof T];
|
|
14
|
+
export type OmitFunctions<T extends object> = Omit<T, FunctionPropertyNames<T>>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/internals/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE3F,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,sBAAsB,EAAE,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,qBAAqB,CAAC,CAAC,IAAI;KAC7B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,CAAC,GAAG,KAAK;CAClD,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,IAAI,IAAI,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/log.ts"],"names":[],"mappings":"AACA,wBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-fetch-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/internals/utils/request-fetch-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAOxD,eAAO,MAAM,mBAAmB,EAAE,IAAI,CAAC,SAsCtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../../src/internals/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifyAppReady.d.ts","sourceRoot":"","sources":["../../../../src/notifyAppReady.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,cAAc,oCAYvB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Immediately restarts the app.
|
|
3
|
+
*
|
|
4
|
+
* @param onlyIfUpdateIsPending Indicates whether you want the restart to no-op if there isn't currently a pending update.
|
|
5
|
+
*/
|
|
6
|
+
export declare function restartApp(onlyIfUpdateIsPending?: boolean): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=restartApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restartApp.d.ts","sourceRoot":"","sources":["../../../../src/restartApp.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,qBAAqB,UAAQ,iBAE7D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SyncStatus } from './enums/SyncStatus.enum';
|
|
2
|
+
import type { DownloadProgressCallback, HandleBinaryVersionMismatchCallback, SyncOptions, SyncStatusChangedCallback, UpdateDialog } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the default settings that will be used by the sync method if
|
|
5
|
+
* an update dialog is configured to be displayed.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_UPDATE_DIALOG: UpdateDialog;
|
|
8
|
+
/**
|
|
9
|
+
* Allows checking for an update, downloading it and installing it, all with a single call.
|
|
10
|
+
*
|
|
11
|
+
* @param options Options used to configure the end-user update experience (e.g. show a prompt?, install the update immediately?).
|
|
12
|
+
* @param syncStatusChangedCallback An optional callback that allows tracking the status of the sync operation, as opposed to simply checking the resolved state via the returned Promise.
|
|
13
|
+
* @param downloadProgressCallback An optional callback that allows tracking the progress of an update while it is being downloaded.
|
|
14
|
+
* @param handleBinaryVersionMismatchCallback An optional callback for handling target binary version mismatch
|
|
15
|
+
*/
|
|
16
|
+
export declare const sync: (options?: SyncOptions, syncStatusChangeCallback?: SyncStatusChangedCallback, downloadProgressCallback?: DownloadProgressCallback, handleBinaryVersionMismatchCallback?: HandleBinaryVersionMismatchCallback) => Promise<SyncStatus>;
|
|
17
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/sync.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,OAAO,KAAK,EACV,wBAAwB,EACxB,mCAAmC,EACnC,WAAW,EACX,yBAAyB,EACzB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,YASnC,CAAC;AAgLF;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,aAUH,WAAW,6BACM,yBAAyB,6BACzB,wBAAwB,wCACb,mCAAmC,KACxE,OAAO,CAAC,UAAU,CA4CnB,CAAC"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import type { NativeUpdateNotification } from 'code-push/script/acquisition-sdk';
|
|
2
|
+
import type { DeploymentStatus } from './enums/DeploymentStatus.enum';
|
|
3
|
+
import type { InstallMode } from './enums/InstallMode.enum';
|
|
4
|
+
import type { SyncStatus } from './enums/SyncStatus.enum';
|
|
5
|
+
export interface UpdateDialog {
|
|
6
|
+
/**
|
|
7
|
+
* Indicates whether you would like to append the description of an available release to the
|
|
8
|
+
* notification message which is displayed to the end user. Defaults to false.
|
|
9
|
+
*/
|
|
10
|
+
appendReleaseDescription?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Indicates the string you would like to prefix the release description with, if any, when
|
|
13
|
+
* displaying the update notification to the end user. Defaults to " Description: "
|
|
14
|
+
*/
|
|
15
|
+
descriptionPrefix?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The text to use for the button the end user must press in order to install a mandatory update. Defaults to "Continue".
|
|
18
|
+
*/
|
|
19
|
+
mandatoryContinueButtonLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The text used as the body of an update notification, when the update is specified as mandatory.
|
|
22
|
+
* Defaults to "An update is available that must be installed.".
|
|
23
|
+
*/
|
|
24
|
+
mandatoryUpdateMessage?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The text to use for the button the end user can press in order to ignore an optional update that is available. Defaults to "Ignore".
|
|
27
|
+
*/
|
|
28
|
+
optionalIgnoreButtonLabel?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The text to use for the button the end user can press in order to install an optional update. Defaults to "Install".
|
|
31
|
+
*/
|
|
32
|
+
optionalInstallButtonLabel?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The text used as the body of an update notification, when the update is optional. Defaults to "An update is available. Would you like to install it?".
|
|
35
|
+
*/
|
|
36
|
+
optionalUpdateMessage?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The text used as the header of an update notification that is displayed to the end user. Defaults to "Update available".
|
|
39
|
+
*/
|
|
40
|
+
title?: string;
|
|
41
|
+
}
|
|
42
|
+
export type DownloadProgressCallback = (progress: DownloadProgress) => void;
|
|
43
|
+
export type SyncStatusChangedCallback = (status: SyncStatus) => void;
|
|
44
|
+
export type HandleBinaryVersionMismatchCallback = (update: NativeUpdateNotification) => void;
|
|
45
|
+
export interface DownloadProgress {
|
|
46
|
+
/**
|
|
47
|
+
* The total number of bytes expected to be received for this update.
|
|
48
|
+
*/
|
|
49
|
+
totalBytes: number;
|
|
50
|
+
/**
|
|
51
|
+
* The number of bytes downloaded thus far.
|
|
52
|
+
*/
|
|
53
|
+
receivedBytes: number;
|
|
54
|
+
}
|
|
55
|
+
export interface LocalPackage extends Package {
|
|
56
|
+
/**
|
|
57
|
+
* Installs the update by saving it to the location on disk where the runtime expects to find the latest version of the app.
|
|
58
|
+
*
|
|
59
|
+
* @param installMode Indicates when you would like the update changes to take effect for the end-user.
|
|
60
|
+
* @param minimumBackgroundDuration For resume-based installs, this specifies the number of seconds the app needs to be in the background before forcing a restart. Defaults to 0 if unspecified.
|
|
61
|
+
* @param onUpdateInstalled An optional promise called after app installation
|
|
62
|
+
*/
|
|
63
|
+
install(installMode?: InstallMode, minimumBackgroundDuration?: number, onUpdateInstalled?: () => Promise<void> | void): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
export interface Package {
|
|
66
|
+
/**
|
|
67
|
+
* The app binary version that this update is dependent on. This is the value that was
|
|
68
|
+
* specified via the appStoreVersion parameter when calling the CLI's release command.
|
|
69
|
+
*/
|
|
70
|
+
appVersion: string;
|
|
71
|
+
/**
|
|
72
|
+
* The release channel public ID that was used to originally download this update.
|
|
73
|
+
*/
|
|
74
|
+
releaseChannelPublicId: string;
|
|
75
|
+
/**
|
|
76
|
+
* The description of the update. This is the same value that you specified in the CLI when you released the update.
|
|
77
|
+
*/
|
|
78
|
+
description: string;
|
|
79
|
+
/**
|
|
80
|
+
* Indicates whether this update has been previously installed but was rolled back.
|
|
81
|
+
*/
|
|
82
|
+
failedInstall: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Indicates whether this is the first time the update has been run after being installed.
|
|
85
|
+
*/
|
|
86
|
+
isFirstRun: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Indicates whether the update is considered mandatory. This is the value that was specified in the CLI when the update was released.
|
|
89
|
+
*/
|
|
90
|
+
isMandatory: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Indicates whether this update is in a "pending" state. When true, that means the update has been downloaded and installed, but the app restart
|
|
93
|
+
* needed to apply it hasn't occurred yet, and therefore, its changes aren't currently visible to the end-user.
|
|
94
|
+
*/
|
|
95
|
+
isPending: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* The internal label automatically given to the update by the CodePush server. This value uniquely identifies the update within its release channel.
|
|
98
|
+
*/
|
|
99
|
+
label: string;
|
|
100
|
+
/**
|
|
101
|
+
* The SHA hash value of the update.
|
|
102
|
+
*/
|
|
103
|
+
packageHash: string;
|
|
104
|
+
/**
|
|
105
|
+
* The size of the code contained within the update, in bytes.
|
|
106
|
+
*/
|
|
107
|
+
packageSize: number;
|
|
108
|
+
}
|
|
109
|
+
export interface RemotePackage extends Package {
|
|
110
|
+
/**
|
|
111
|
+
* Downloads the available update from the CodePush service.
|
|
112
|
+
*
|
|
113
|
+
* @param downloadProgressCallback An optional callback that allows tracking the progress of the update while it is being downloaded.
|
|
114
|
+
*/
|
|
115
|
+
download(downloadProgressCallback?: DownloadProgressCallback): Promise<LocalPackage>;
|
|
116
|
+
/**
|
|
117
|
+
* The URL at which the package is available for download.
|
|
118
|
+
*/
|
|
119
|
+
downloadUrl: string;
|
|
120
|
+
}
|
|
121
|
+
export interface SyncOptions {
|
|
122
|
+
/**
|
|
123
|
+
* Specifies the release channel you want to query for an update against. By default, this value is derived from the Info.plist
|
|
124
|
+
* file (iOS) and strings resources (Android), but this option allows you to override it from the script-side if you need to
|
|
125
|
+
* dynamically use a different release channel for a specific call to sync.
|
|
126
|
+
*/
|
|
127
|
+
releaseChannelPublicId?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Specifies when you would like to install optional updates (i.e. those that aren't marked as mandatory).
|
|
130
|
+
* Defaults to codePush.InstallMode.ON_NEXT_RESTART.
|
|
131
|
+
*/
|
|
132
|
+
installMode?: InstallMode;
|
|
133
|
+
/**
|
|
134
|
+
* Specifies when you would like to install updates which are marked as mandatory.
|
|
135
|
+
* Defaults to codePush.InstallMode.IMMEDIATE.
|
|
136
|
+
*/
|
|
137
|
+
mandatoryInstallMode?: InstallMode;
|
|
138
|
+
/**
|
|
139
|
+
* Specifies the minimum number of seconds that the app needs to have been in the background before restarting the app. This property
|
|
140
|
+
* only applies to updates which are installed using `InstallMode.ON_NEXT_RESUME` or `InstallMode.ON_NEXT_SUSPEND`, and can be useful
|
|
141
|
+
* for getting your update in front of end users sooner, without being too obtrusive. Defaults to `0`, which has the effect of applying
|
|
142
|
+
* the update immediately after a resume or unless the app suspension is long enough to not matter, regardless how long it was in the background.
|
|
143
|
+
*/
|
|
144
|
+
minimumBackgroundDuration?: number;
|
|
145
|
+
/**
|
|
146
|
+
* An "options" object used to determine whether a confirmation dialog should be displayed to the end user when an update is available,
|
|
147
|
+
* and if so, what strings to use. Defaults to null, which has the effect of disabling the dialog completely. Setting this to any truthy
|
|
148
|
+
* value will enable the dialog with the default strings, and passing an object to this parameter allows enabling the dialog as well as
|
|
149
|
+
* overriding one or more of the default strings.
|
|
150
|
+
*/
|
|
151
|
+
updateDialog?: UpdateDialog | true;
|
|
152
|
+
/**
|
|
153
|
+
* The rollback retry mechanism allows the application to attempt to reinstall an update that was previously rolled back (with the restrictions
|
|
154
|
+
* specified in the options). It is an "options" object used to determine whether a rollback retry should occur, and if so, what settings to use
|
|
155
|
+
* for the rollback retry. This defaults to null, which has the effect of disabling the retry mechanism. Setting this to true will enable
|
|
156
|
+
* the retry mechanism with the default settings, and passing an object to this parameter allows enabling the rollback retry as well as overriding
|
|
157
|
+
* one or more of the default values.
|
|
158
|
+
*/
|
|
159
|
+
rollbackRetryOptions?: RollbackRetryOptions | true;
|
|
160
|
+
ignoreFailedUpdates?: boolean;
|
|
161
|
+
}
|
|
162
|
+
export interface RollbackRetryOptions {
|
|
163
|
+
/**
|
|
164
|
+
* Specifies the minimum time in hours that the app will wait after the latest rollback
|
|
165
|
+
* before attempting to reinstall same rolled-back package. Defaults to `24`.
|
|
166
|
+
*/
|
|
167
|
+
delayInHours?: number;
|
|
168
|
+
/**
|
|
169
|
+
* Specifies the maximum number of retry attempts that the app can make before it stops trying.
|
|
170
|
+
* Cannot be less than `1`. Defaults to `1`.
|
|
171
|
+
*/
|
|
172
|
+
maxRetryAttempts?: number;
|
|
173
|
+
}
|
|
174
|
+
export interface StatusReport {
|
|
175
|
+
/**
|
|
176
|
+
* Whether the deployment succeeded or failed.
|
|
177
|
+
*/
|
|
178
|
+
status: DeploymentStatus;
|
|
179
|
+
/**
|
|
180
|
+
* The version of the app that was deployed (for a native app upgrade).
|
|
181
|
+
*/
|
|
182
|
+
appVersion?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Details of the package that was deployed (or attempted to).
|
|
185
|
+
*/
|
|
186
|
+
package?: Package;
|
|
187
|
+
/**
|
|
188
|
+
* Release channel used when deploying the previous package.
|
|
189
|
+
*/
|
|
190
|
+
previousReleaseChannelPublicId?: string;
|
|
191
|
+
/**
|
|
192
|
+
* The label (v#) of the package that was upgraded from.
|
|
193
|
+
*/
|
|
194
|
+
previousLabelOrAppVersion?: string;
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CheckFrequency } from './enums/CheckFrequency.enum';
|
|
3
|
+
import type { SyncOptions } from './types';
|
|
4
|
+
export interface CodePushOptions extends SyncOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies when you would like to synchronize updates with the CodePush server.
|
|
7
|
+
* Defaults to codePush.CheckFrequency.ON_APP_START.
|
|
8
|
+
*/
|
|
9
|
+
checkFrequency?: CheckFrequency;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Decorates a React Component configuring it to sync for updates with the CodePush server.
|
|
13
|
+
*
|
|
14
|
+
* @param component the React Component that will be decorated
|
|
15
|
+
*/
|
|
16
|
+
export declare function withCodePush(component: any): React.FunctionComponent;
|
|
17
|
+
/**
|
|
18
|
+
* Decorates a React Component configuring it to sync for updates with the CodePush server.
|
|
19
|
+
*
|
|
20
|
+
* @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?).
|
|
21
|
+
*/
|
|
22
|
+
export declare function withCodePush(options: CodePushOptions): (component: any) => React.FunctionComponent;
|
|
23
|
+
export default withCodePush;
|
|
24
|
+
//# sourceMappingURL=CodePush.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodePush.d.ts","sourceRoot":"","sources":["../../../../src/CodePush.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,OAAO,KAAK,EAGV,WAAW,EAEZ,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED;;;;GAIG;AAEH,wBAAgB,YAAY,CAAC,SAAS,EAAE,GAAG,GAAG,KAAK,CAAC,iBAAiB,CAAC;AAEtE;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,CAAC,SAAS,EAAE,GAAG,KAAK,KAAK,CAAC,iBAAiB,CAAC;AAyEpG,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allowRestart.d.ts","sourceRoot":"","sources":["../../../../src/allowRestart.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,IAA0C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { HandleBinaryVersionMismatchCallback, RemotePackage } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Asks the CodePush service whether the configured app release channel has an update available.
|
|
4
|
+
*
|
|
5
|
+
* @param releaseChannelPublicId The release channel public ID to use to query the CodePush server for an update.
|
|
6
|
+
* @param handleBinaryVersionMismatchCallback An optional callback for handling target binary version mismatch
|
|
7
|
+
*/
|
|
8
|
+
export declare function checkForUpdate(releaseChannelPublicId?: string, handleBinaryVersionMismatchCallback?: HandleBinaryVersionMismatchCallback): Promise<RemotePackage | null>;
|
|
9
|
+
//# sourceMappingURL=checkForUpdates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkForUpdates.d.ts","sourceRoot":"","sources":["../../../../src/checkForUpdates.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAElF;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,sBAAsB,CAAC,EAAE,MAAM,EAC/B,mCAAmC,CAAC,EAAE,mCAAmC,GACxE,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAwF/B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clears all downloaded CodePush updates.
|
|
3
|
+
* This is useful when switching to a different release channel which may have an older release than the current package.
|
|
4
|
+
* Note: we don’t recommend to use this method in scenarios other than that (CodePush will call
|
|
5
|
+
* this method automatically when needed in other cases) as it could lead to unpredictable behavior.
|
|
6
|
+
*/
|
|
7
|
+
export declare const clearUpdates: () => void;
|
|
8
|
+
//# sourceMappingURL=clearUpdates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clearUpdates.d.ts","sourceRoot":"","sources":["../../../../src/clearUpdates.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,IAAiD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disallowRestart.d.ts","sourceRoot":"","sources":["../../../../src/disallowRestart.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,IAA6C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indicates when you would like to check for (and install) updates from the CodePush server.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum CheckFrequency {
|
|
5
|
+
/**
|
|
6
|
+
* When the app is fully initialized (or more specifically, when the root component is mounted).
|
|
7
|
+
*/
|
|
8
|
+
ON_APP_START = 0,
|
|
9
|
+
/**
|
|
10
|
+
* When the app re-enters the foreground.
|
|
11
|
+
*/
|
|
12
|
+
ON_APP_RESUME = 1,
|
|
13
|
+
/**
|
|
14
|
+
* Don't automatically check for updates, but only do it when codePush.sync() is manually called inside app code.
|
|
15
|
+
*/
|
|
16
|
+
MANUAL = 2
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=CheckFrequency.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckFrequency.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/CheckFrequency.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,cAAc;IACxB;;OAEG;IACH,YAAY,IAAA;IAEZ;;OAEG;IACH,aAAa,IAAA;IAEb;;OAEG;IACH,MAAM,IAAA;CACP"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indicates the status of a deployment (after installing and restarting).
|
|
3
|
+
*/
|
|
4
|
+
export declare enum DeploymentStatus {
|
|
5
|
+
/**
|
|
6
|
+
* The deployment failed (and was rolled back).
|
|
7
|
+
*/
|
|
8
|
+
FAILED = "DeploymentFailed",
|
|
9
|
+
/**
|
|
10
|
+
* The deployment succeeded.
|
|
11
|
+
*/
|
|
12
|
+
SUCCEEDED = "DeploymentSucceeded"
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=DeploymentStatus.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeploymentStatus.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/DeploymentStatus.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,gBAAgB;IAC1B;;OAEG;IACH,MAAM,qBAAqB;IAE3B;;OAEG;IACH,SAAS,wBAAwB;CAClC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indicates when you would like an installed update to actually be applied.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum InstallMode {
|
|
5
|
+
/**
|
|
6
|
+
* Indicates that you want to install the update and restart the app immediately.
|
|
7
|
+
*/
|
|
8
|
+
IMMEDIATE,
|
|
9
|
+
/**
|
|
10
|
+
* Indicates that you want to install the update, but not forcibly restart the app.
|
|
11
|
+
*/
|
|
12
|
+
ON_NEXT_RESTART,
|
|
13
|
+
/**
|
|
14
|
+
* Indicates that you want to install the update, but don't want to restart the app until the next time
|
|
15
|
+
* the end user resumes it from the background. This way, you don't disrupt their current session,
|
|
16
|
+
* but you can get the update in front of them sooner than having to wait for the next natural restart.
|
|
17
|
+
* This value is appropriate for silent installs that can be applied on resume in a non-invasive way.
|
|
18
|
+
*/
|
|
19
|
+
ON_NEXT_RESUME,
|
|
20
|
+
/**
|
|
21
|
+
* Indicates that you want to install the update when the app is in the background,
|
|
22
|
+
* but only after it has been in the background for "minimumBackgroundDuration" seconds (0 by default),
|
|
23
|
+
* so that user context isn't lost unless the app suspension is long enough to not matter.
|
|
24
|
+
*/
|
|
25
|
+
ON_NEXT_SUSPEND
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=InstallMode.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstallMode.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/InstallMode.enum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,SAAqF;IAErF;;OAEG;IACH,eAA+F;IAE/F;;;;;OAKG;IACH,cAA6F;IAE7F;;;;OAIG;IACH,eAA+F;CAChG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indicates the current status of a sync operation.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum SyncStatus {
|
|
5
|
+
/**
|
|
6
|
+
* The app is up-to-date with the CodePush server.
|
|
7
|
+
*/
|
|
8
|
+
UP_TO_DATE = 0,
|
|
9
|
+
/**
|
|
10
|
+
* An available update has been installed and will be run either immediately after the
|
|
11
|
+
* syncStatusChangedCallback function returns or the next time the app resumes/restarts,
|
|
12
|
+
* depending on the InstallMode specified in SyncOptions
|
|
13
|
+
*/
|
|
14
|
+
UPDATE_INSTALLED = 1,
|
|
15
|
+
/**
|
|
16
|
+
* The app had an optional update which the end user chose to ignore.
|
|
17
|
+
* (This is only applicable when the updateDialog is used)
|
|
18
|
+
*/
|
|
19
|
+
UPDATE_IGNORED = 2,
|
|
20
|
+
/**
|
|
21
|
+
* The sync operation encountered an unknown error.
|
|
22
|
+
*/
|
|
23
|
+
UNKNOWN_ERROR = 3,
|
|
24
|
+
/**
|
|
25
|
+
* There is an ongoing sync operation running which prevents the current call from being executed.
|
|
26
|
+
*/
|
|
27
|
+
SYNC_IN_PROGRESS = 4,
|
|
28
|
+
/**
|
|
29
|
+
* The CodePush server is being queried for an update.
|
|
30
|
+
*/
|
|
31
|
+
CHECKING_FOR_UPDATE = 5,
|
|
32
|
+
/**
|
|
33
|
+
* An update is available, and a confirmation dialog was shown
|
|
34
|
+
* to the end user. (This is only applicable when the updateDialog is used)
|
|
35
|
+
*/
|
|
36
|
+
AWAITING_USER_ACTION = 6,
|
|
37
|
+
/**
|
|
38
|
+
* An available update is being downloaded from the CodePush server.
|
|
39
|
+
*/
|
|
40
|
+
DOWNLOADING_PACKAGE = 7,
|
|
41
|
+
/**
|
|
42
|
+
* An available update was downloaded and is about to be installed.
|
|
43
|
+
*/
|
|
44
|
+
INSTALLING_UPDATE = 8
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=SyncStatus.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyncStatus.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/SyncStatus.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,UAAU;IACpB;;OAEG;IACH,UAAU,IAAA;IAEV;;;;OAIG;IACH,gBAAgB,IAAA;IAEhB;;;OAGG;IACH,cAAc,IAAA;IAEd;;OAEG;IACH,aAAa,IAAA;IAEb;;OAEG;IACH,gBAAgB,IAAA;IAEhB;;OAEG;IACH,mBAAmB,IAAA;IAEnB;;;OAGG;IACH,oBAAoB,IAAA;IAEpB;;OAEG;IACH,mBAAmB,IAAA;IAEnB;;OAEG;IACH,iBAAiB,IAAA;CAClB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Indicates the state that an update is currently in.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum UpdateState {
|
|
5
|
+
/**
|
|
6
|
+
* Indicates that an update represents the
|
|
7
|
+
* version of the app that is currently running.
|
|
8
|
+
*/
|
|
9
|
+
RUNNING,
|
|
10
|
+
/**
|
|
11
|
+
* Indicates than an update has been installed, but the
|
|
12
|
+
* app hasn't been restarted yet in order to apply it.
|
|
13
|
+
*/
|
|
14
|
+
PENDING,
|
|
15
|
+
/**
|
|
16
|
+
* Indicates than an update represents the latest available
|
|
17
|
+
* release, and can be either currently running or pending.
|
|
18
|
+
*/
|
|
19
|
+
LATEST
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=UpdateState.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateState.enum.d.ts","sourceRoot":"","sources":["../../../../../src/enums/UpdateState.enum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,WAAW;IACrB;;;OAGG;IACH,OAAiF;IAEjF;;;OAGG;IACH,OAAiF;IAEjF;;;OAGG;IACH,MAA+E;CAChF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UpdateState } from './enums/UpdateState.enum';
|
|
2
|
+
import type { LocalPackage } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the metadata for an installed update (e.g. description, mandatory).
|
|
5
|
+
*
|
|
6
|
+
* @param updateState The state of the update you want to retrieve the metadata for. Defaults to UpdateState.RUNNING.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getUpdateMetadata(updateState?: UpdateState): Promise<LocalPackage | null>;
|
|
9
|
+
//# sourceMappingURL=getUpdateMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUpdateMetadata.d.ts","sourceRoot":"","sources":["../../../../src/getUpdateMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAY/F"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './allowRestart';
|
|
2
|
+
export * from './checkForUpdates';
|
|
3
|
+
export * from './clearUpdates';
|
|
4
|
+
export * from './CodePush';
|
|
5
|
+
export { default } from './CodePush';
|
|
6
|
+
export * from './disallowRestart';
|
|
7
|
+
export * from './getUpdateMetadata';
|
|
8
|
+
export * from './notifyAppReady';
|
|
9
|
+
export * from './restartApp';
|
|
10
|
+
export * from './sync';
|
|
11
|
+
export * from './types';
|
|
12
|
+
export * from './enums/SyncStatus.enum';
|
|
13
|
+
export * from './enums/InstallMode.enum';
|
|
14
|
+
export * from './enums/UpdateState.enum';
|
|
15
|
+
export * from './enums/DeploymentStatus.enum';
|
|
16
|
+
export * from './enums/CheckFrequency.enum';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAEvB,cAAc,SAAS,CAAC;AAExB,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AcquisitionSdk.d.ts","sourceRoot":"","sources":["../../../../../src/internals/AcquisitionSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE,eAAO,MAAM,cAAc,2BAAqB,CAAC"}
|