ota-native-bridge 1.8.1 → 1.8.2
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/dist/cjs/version.js +1 -1
- package/dist/native.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/USAGE.md +1 -1
- package/ota-native-bridge.js +1 -1
- package/package.json +1 -1
package/dist/cjs/version.js
CHANGED
package/dist/native.d.ts
CHANGED
|
@@ -246,7 +246,7 @@ export declare const Native: {
|
|
|
246
246
|
readonly Push: {
|
|
247
247
|
getToken(callback?: import("./runtime").NativeCallback<import("./types").PushTokenResult>): Promise<import("./types").PushTokenResult>;
|
|
248
248
|
};
|
|
249
|
-
readonly sdkVersion: "1.8.
|
|
249
|
+
readonly sdkVersion: "1.8.2";
|
|
250
250
|
readonly getPlatform: typeof getPlatform;
|
|
251
251
|
readonly isNativePlatform: typeof isNativePlatform;
|
|
252
252
|
readonly isNativeBridgeAvailable: typeof isNativeBridgeAvailable;
|
package/dist/types.d.ts
CHANGED
|
@@ -535,7 +535,7 @@ export interface InstallAppPackageResult {
|
|
|
535
535
|
* `Ota.onInstallEvent` 的阶段。顺序一般为:
|
|
536
536
|
* download-start → download-progress… → download-complete → install-start →
|
|
537
537
|
* install-prompt(等用户在系统框里确认)→ install-success。
|
|
538
|
-
*
|
|
538
|
+
* 同包升级走系统安装器(ACTION_VIEW),不会发出 install-success,装完后需用户手动打开应用。
|
|
539
539
|
*/
|
|
540
540
|
export type OtaInstallStage = 'download-start' | 'download-progress' | 'download-complete' | 'download-failed' | 'install-start' | 'install-prompt' | 'install-success' | 'install-canceled' | 'install-failed';
|
|
541
541
|
export interface OtaInstallEvent {
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/docs/USAGE.md
CHANGED
|
@@ -824,7 +824,7 @@ const offMigration = Migration.onEvent((e) => {
|
|
|
824
824
|
|
|
825
825
|
事件是 DOM 事件 `nativebridgeevent`(`detail = { name, payload }`),`Ota.onInstallEvent` / `Migration.onEvent` / `Native.on(name, fn)` 都是对它的封装。**页面还没加载好时发出的事件不补发**,页面启动时请用 `Ota.getInstallState()`、`Migration.getInfo()` 读当前状态。
|
|
826
826
|
|
|
827
|
-
`Ota.onInstallEvent` 的 `stage` 一般顺序为:`download-start` → `download-progress`(多次)→ `download-complete` → `install-start` → `install-prompt`(等用户在系统框里确认)→ `install-success`。失败或取消时为 `download-failed` / `install-canceled` / `install-failed
|
|
827
|
+
`Ota.onInstallEvent` 的 `stage` 一般顺序为:`download-start` → `download-progress`(多次)→ `download-complete` → `install-start` → `install-prompt`(等用户在系统框里确认)→ `install-success`。失败或取消时为 `download-failed` / `install-canceled` / `install-failed`。同包升级走系统安装器(`ACTION_VIEW`),壳拿不到安装结果,不会发出 `install-success`,装完后也不会自动打开应用,需要用户手动打开。`install-prompt` 的 `foreground` 为 `false` 时,壳会改用通知提示用户确认。
|
|
828
828
|
|
|
829
829
|
**接口**
|
|
830
830
|
|
package/ota-native-bridge.js
CHANGED