Ir al contenido

@tauri-apps/plugin-updater

Esta página aún no está disponible en tu idioma.

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

  • Resource

new Update(metadata): Update;

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

Parameter Type
metadata UpdateMetadata

Update

Resource.constructor
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#L65
body? string - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L69
currentVersion string - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L66
date? string - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L68
rawJson Record<string, unknown> - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L70
version string - Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L67

get rid(): number;

Source: undefined

number

Resource.rid

close(): Promise<void>;

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

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

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

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

Download the updater package. Call install later to install it

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

Promise<void>

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

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

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>

install(options?): Promise<void>;

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

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#L8

Options used when checking for updates

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#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

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

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#L32
timeout? number Timeout in milliseconds Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L36

type DownloadEvent =
| {
data: {
contentLength?: number;
};
event: "Started";
}
| {
data: {
chunkLength: number;
};
event: "Progress";
}
| {
event: "Finished";
};

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

Updater download event

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

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

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

Parameter Type
options? CheckOptions

Promise<Update | null>


© 2026 Tauri Contributors. CC-BY / MIT