Skip to content

Commit

Permalink
chore: Update PushyOptions interface to include new updateStrategy op…
Browse files Browse the repository at this point in the history
…tions

The PushyOptions interface has been updated to include two new updateStrategy options: "alwaysAlert" and "alertUpdateAndIgnoreError". These options provide different behaviors for handling hot updates. The "alwaysAlert" option is now the default for debug environments, displaying an alert page for hot updates and showing an error prompt when there are errors. The "alertUpdateAndIgnoreError" option is the default for production environments, displaying an alert page for hot updates but not showing any error prompts.

Co-authored-by: dependabot[bot] <[email protected]>
  • Loading branch information
sunnylqm and dependabot[bot] committed Jun 25, 2024
1 parent cf2205a commit f28c8f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion site/pages/docs/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ interface PushyOptions {
| null; // 不自动检查更新,必须手动调用checkUpdate方法,此选项需v10.4.2或更高版本
// 自动下载和应用更新的策略
updateStrategy?:
| "alwaysAlert" // 默认值,使用系统默认的alert页面提示热更,v10.6.0版本前为 useAlert 选项
| "alwaysAlert" // 调试环境(__DEV__)默认值,使用系统默认的alert页面提示热更且会在有报错时弹出提示
| "alertUpdateAndIgnoreError" // 生产环境默认值,在有热更时使用系统默认的alert页面提示热更,但不弹出任何报错提示
| "silentAndNow" // 自动静默下载并立刻应用热更
| "silentAndLater"; // 自动静默下载,但仅在用户退出app后重启时应用更新
| null; // 不自动下载和应用更新,如需自定义热更界面请选择此项
Expand Down

0 comments on commit f28c8f8

Please sign in to comment.