跳到主要內容
Tauri

@tauri-apps/plugin-updater

類別

更新

繼承

  • 資源

建構函式

new Update()
new Update(metadata): Update
參數
參數類型
metadataUpdateMetadata
回傳

更新

覆寫

Resource.constructor

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

屬性

屬性類型定義於
availablebooleanSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L56
body?stringSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L60
currentVersionstringSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L57
date?stringSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L59
rawJsonRecord<string, unknown>Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L61
versionstringSource: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L58

存取器

rid
取得簽名
get rid(): number
回傳

數字

繼承自

Resource.rid

Source: undefined

方法

close()
close(): Promise<void>

從記憶體中銷毀並清除此資源。您不應再對此物件呼叫任何方法,並應捨棄對它的所有參考。

回傳

Promise<void>

覆寫

Resource.close

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

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

下載更新器套件

參數
參數類型
onEvent?(progress) => void
options?DownloadOptions
回傳

Promise<void>

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

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

下載更新器套件並安裝

參數
參數類型
onEvent?(progress) => void
options?DownloadOptions
回傳

Promise<void>

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

install()
install(): Promise<void>

安裝已下載的更新器套件

回傳

Promise<void>

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

介面

CheckOptions

檢查更新時使用的選項

屬性

屬性類型描述定義於
headers?HeadersInit請求標頭Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L12
proxy?string用於檢查和下載更新的 Proxy URL。Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L20
target?string執行中應用程式的目標識別符。這會被傳送到後端。Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L24
timeout?數字逾時時間(毫秒)Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L16

DownloadOptions

下載更新時使用的選項

屬性

屬性類型描述定義於
headers?HeadersInit請求標頭Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L32
timeout?數字逾時時間(毫秒)Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L36

類型別名

DownloadEvent

type DownloadEvent: object | object | object;

更新器下載事件

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

函式

check()

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

檢查更新,如果沒有可用更新則解析為 null

參數

參數類型
options?CheckOptions

回傳

Promise<Update | null>

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


© 2025 Tauri 貢獻者。CC-BY / MIT