-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(updater): Use escaped installer path to start the nsis updater (#…
…727) Port of v1 change: tauri-apps/tauri#7956 Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/6877612128 Co-authored-by: amrbashir <[email protected]>
- Loading branch information
Showing
11 changed files
with
47 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict'; | ||
|
||
var primitives = require('@tauri-apps/api/primitives'); | ||
|
||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-License-Identifier: MIT | ||
class Update { | ||
constructor(metadata) { | ||
this.currentVersion = metadata.currentVersion; | ||
this.version = metadata.version; | ||
this.date = metadata.date; | ||
this.body = metadata.body; | ||
} | ||
/** Downloads the updater package and installs it */ | ||
async downloadAndInstall(onEvent) { | ||
const channel = new primitives.Channel(); | ||
if (onEvent != null) { | ||
channel.onmessage = onEvent; | ||
} | ||
return primitives.invoke("plugin:updater|download_and_install", { | ||
onEvent: channel, | ||
}); | ||
} | ||
} | ||
/** Check for updates, resolves to `null` if no updates are available */ | ||
async function check(options) { | ||
if (options?.headers) { | ||
options.headers = Array.from(new Headers(options.headers).entries()); | ||
} | ||
return primitives.invoke("plugin:updater|check", { ...options }).then((meta) => (meta.available ? new Update(meta) : null)); | ||
} | ||
|
||
exports.Update = Update; | ||
exports.check = check; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-License-Identifier: MIT | ||
|
||
import { createConfig } from "../../shared/rollup.config.js"; | ||
|
||
export default createConfig(); |
Oops, something went wrong.