跳转到内容

@tauri-apps/plugin-updater

此内容尚不支持你的语言。

  • Resource

new Update(metadata): Update
Parameter Type
metadata UpdateMetadata

Update

Resource.constructor

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L77

Property Type Description Defined in
available boolean Deprecated This is always true, check if the return value is null instead when using check Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L69
body? string - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L73
currentVersion string - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L70
date? string - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L72
rawJson Record<string, unknown> - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L74
version string - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L71

get rid(): number

number

Resource.rid

Source: undefined

close(): Promise<void>

Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.

Promise<void>

Resource.close

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L152

download(onEvent?, options?): Promise<void>

Download the updater package. Call install later to install it

Parameter Type
onEvent? (progress) => void
options? DownloadOptions

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L88

downloadAndInstall(onEvent?, options?): Promise<void>

Downloads the updater package and installs it

  • Windows: This function exits the app after launching the updater installer successfully
  • macOS / Linux: You need to relaunch the app to run the newly install version
Parameter Type
onEvent? (progress) => void
options? DownloadOptions & InstallOptions

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L136

install(options?): Promise<void>

Install downloaded updater package. Must be called after download.

  • Windows: This function exits the app after launching the updater installer successfully
  • macOS / Linux: You need to relaunch the app to run the newly install version
Parameter Type
options? InstallOptions

Promise<void>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L113

Options used when checking for updates

Property Type Description Defined in
allowDowngrades? boolean Allow downgrades to previous versions by not checking if the current version is greater than the available version. Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L28
headers? HeadersInit Request headers Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L12
proxy? string A proxy url to be used when checking and downloading updates. Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L20
target? string Target identifier for the running application. This is sent to the backend. Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L24
timeout? number Timeout in milliseconds Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L16

Options used when downloading an update

Property Type Description Defined in
headers? HeadersInit Request headers Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L36
timeout? number Timeout in milliseconds Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L40

type DownloadEvent: object | object | object;

Updater download event

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L61

function check(options?): Promise<Update | null>

Check for updates, resolves to null if no updates are available

Parameter Type
options? CheckOptions

Promise<Update | null>

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L159


© 2026 Tauri Contributors. CC-BY / MIT