enhance(plugin): check updates for the web plugins

This commit is contained in:
charlie
2024-12-30 18:15:24 +08:00
parent 208ca930eb
commit 109e91bd35
7 changed files with 46 additions and 24 deletions

View File

@@ -144,9 +144,12 @@
(-> (load-marketplace-plugins false)
(p/then (fn [manifests]
(let [mft (some #(when (= (:id %) id) %) manifests)]
(let [mft (some #(when (= (:id %) id) %) manifests)
opts (merge (dissoc pkg :logger) mft)]
;;TODO: (throw (js/Error. [:not-found-in-marketplace id]))
(ipc/ipc :updateMarketPlugin (merge (dissoc pkg :logger) mft)))
(if (util/electron?)
(ipc/ipc :updateMarketPlugin opts)
(plugin-common-handler/async-install-or-update-for-web! opts)))
true))
(p/catch (fn [^js e]
(state/reset-all-updates-state)