@tauri-apps/plugin-updater
類別
更新
繼承
資源
建構函式
new Update()
new Update(metadata): Update
參數
參數 | 類型 |
---|---|
metadata | UpdateMetadata |
回傳
覆寫
Resource.constructor
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L64
屬性
屬性 | 類型 | 定義於 |
---|---|---|
available | boolean | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L56 |
body? | string | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L60 |
currentVersion | string | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L57 |
date? | string | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L59 |
rawJson | Record <string , unknown > | Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L61 |
version | string | Source: 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 |
回傳
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/updater/guest-js/index.ts#L129
© 2025 Tauri 貢獻者。CC-BY / MIT