mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-16 14:30:06 +02:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a826fb6bf | |||
| 86bae64a52 | |||
| 8d4c925a62 | |||
| 6149e70916 | |||
| a9ac1e3c93 | |||
| 3461a7ae2c | |||
| 7a83d4f7e1 | |||
| 1fe70dc61c | |||
| b21915938f | |||
| 57efb47c11 | |||
| c4d50aa9ec | |||
| 768b72acf8 | |||
| 8d6c992661 | |||
| 83b6507269 | |||
| da64d9b665 | |||
| aa2f2bfba0 | |||
| 51919fb26c | |||
| ee0f65de5c | |||
| 319ef556cd | |||
| 802399a969 |
Generated
+3
-3
@@ -206,7 +206,7 @@ checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775"
|
||||
|
||||
[[package]]
|
||||
name = "api"
|
||||
version = "2.0.10"
|
||||
version = "2.0.12"
|
||||
dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
@@ -6707,7 +6707,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-opener"
|
||||
version = "2.2.1"
|
||||
version = "2.2.3"
|
||||
dependencies = [
|
||||
"dunce",
|
||||
"glob",
|
||||
@@ -6864,7 +6864,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-updater"
|
||||
version = "2.3.0"
|
||||
version = "2.3.1"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"dirs 5.0.1",
|
||||
|
||||
@@ -29,7 +29,7 @@ This repo and all plugins require a Rust version of at least **1.77.2**
|
||||
| [process](plugins/process) | This plugin provides APIs to access the current process. To spawn child processes, see the [`shell`](https://github.com/tauri-apps/tauri-plugin-shell) plugin. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [shell](plugins/shell) | Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ✅ |
|
||||
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| [stronghold](plugins/stronghold) | Encrypted, secure database. | ✅ | ✅ | ✅ | ? | ? |
|
||||
| [updater](plugins/updater) | In-app updates for Tauri applications. | ✅ | ✅ | ✅ | ❌ | ❌ |
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.9]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `opener-js@2.2.3`
|
||||
- Upgraded to `updater-js@2.3.1`
|
||||
|
||||
## \[2.0.8]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `opener-js@2.2.2`
|
||||
|
||||
## \[2.0.7]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "api",
|
||||
"private": true,
|
||||
"version": "2.0.7",
|
||||
"version": "2.0.9",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --clearScreen false",
|
||||
@@ -10,7 +10,7 @@
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.1.1",
|
||||
"@tauri-apps/api": "2.2.0",
|
||||
"@tauri-apps/plugin-barcode-scanner": "2.2.0",
|
||||
"@tauri-apps/plugin-biometric": "2.2.0",
|
||||
"@tauri-apps/plugin-cli": "2.2.0",
|
||||
@@ -19,7 +19,7 @@
|
||||
"@tauri-apps/plugin-fs": "2.2.0",
|
||||
"@tauri-apps/plugin-geolocation": "2.2.0",
|
||||
"@tauri-apps/plugin-global-shortcut": "2.2.0",
|
||||
"@tauri-apps/plugin-opener": "2.2.1",
|
||||
"@tauri-apps/plugin-opener": "2.2.3",
|
||||
"@tauri-apps/plugin-haptics": "2.2.0",
|
||||
"@tauri-apps/plugin-http": "2.2.0",
|
||||
"@tauri-apps/plugin-nfc": "2.2.0",
|
||||
@@ -28,14 +28,14 @@
|
||||
"@tauri-apps/plugin-process": "2.2.0",
|
||||
"@tauri-apps/plugin-shell": "2.2.0",
|
||||
"@tauri-apps/plugin-store": "2.2.0",
|
||||
"@tauri-apps/plugin-updater": "2.3.0",
|
||||
"@tauri-apps/plugin-updater": "2.3.1",
|
||||
"@zerodevx/svelte-json-view": "1.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/codicon": "^1.2.6",
|
||||
"@iconify-json/ph": "^1.2.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.1",
|
||||
"@tauri-apps/cli": "2.1.0",
|
||||
"@tauri-apps/cli": "2.2.2",
|
||||
"@unocss/extractor-svelte": "^0.65.1",
|
||||
"svelte": "^5.10.0",
|
||||
"unocss": "^0.65.1",
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.0.12]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `opener@2.2.3`
|
||||
- Upgraded to `updater@2.3.1`
|
||||
|
||||
## \[2.0.11]
|
||||
|
||||
### Dependencies
|
||||
|
||||
- Upgraded to `opener@2.2.2`
|
||||
|
||||
## \[2.0.10]
|
||||
|
||||
### Dependencies
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "api"
|
||||
publish = false
|
||||
version = "2.0.10"
|
||||
version = "2.0.12"
|
||||
description = "An example Tauri Application showcasing the api"
|
||||
edition = "2021"
|
||||
rust-version = { workspace = true }
|
||||
@@ -33,7 +33,7 @@ tauri-plugin-notification = { path = "../../../plugins/notification", version =
|
||||
] }
|
||||
tauri-plugin-os = { path = "../../../plugins/os", version = "2.2.0" }
|
||||
tauri-plugin-process = { path = "../../../plugins/process", version = "2.2.0" }
|
||||
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.2.1" }
|
||||
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.2.3" }
|
||||
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.2.0" }
|
||||
tauri-plugin-store = { path = "../../../plugins/store", version = "2.2.0" }
|
||||
|
||||
@@ -53,8 +53,8 @@ features = [
|
||||
[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
|
||||
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.2.0" }
|
||||
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.2.0" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.3.0" }
|
||||
tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.0.0" }
|
||||
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.3.1" }
|
||||
tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.2.0" }
|
||||
|
||||
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
|
||||
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.2.0" }
|
||||
|
||||
+5
-5
@@ -11,20 +11,20 @@
|
||||
"example:api:dev": "pnpm run --filter \"api\" tauri dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "9.16.0",
|
||||
"@rollup/plugin-node-resolve": "15.3.0",
|
||||
"@eslint/js": "9.17.0",
|
||||
"@rollup/plugin-node-resolve": "16.0.0",
|
||||
"@rollup/plugin-terser": "0.4.4",
|
||||
"@rollup/plugin-typescript": "11.1.6",
|
||||
"@types/eslint__js": "8.42.3",
|
||||
"covector": "^0.12.3",
|
||||
"eslint": "9.16.0",
|
||||
"eslint": "9.17.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-security": "3.0.1",
|
||||
"prettier": "3.4.2",
|
||||
"rollup": "4.28.1",
|
||||
"rollup": "4.30.0",
|
||||
"tslib": "2.8.1",
|
||||
"typescript": "5.7.2",
|
||||
"typescript-eslint": "8.18.0"
|
||||
"typescript-eslint": "8.19.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"semver": ">=7.5.2",
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.1.1",
|
||||
"@tauri-apps/api": "2.2.0",
|
||||
"@tauri-apps/plugin-deep-link": "2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.1.0",
|
||||
"@tauri-apps/cli": "2.2.2",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^6.0.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.2.3]
|
||||
|
||||
- [`a9ac1e3c`](https://github.com/tauri-apps/plugins-workspace/commit/a9ac1e3c939cec4338a9422ef02323c1d4dde6cd) ([#2253](https://github.com/tauri-apps/plugins-workspace/pull/2253) by [@betamos](https://github.com/tauri-apps/plugins-workspace/../../betamos)) Return an error in `open_path` if the file does not exist when opening with default application.
|
||||
|
||||
## \[2.2.2]
|
||||
|
||||
- [`ee0f65de`](https://github.com/tauri-apps/plugins-workspace/commit/ee0f65de5c645c244c5f0b638e0e0aab687cb9bf) ([#2207](https://github.com/tauri-apps/plugins-workspace/pull/2207) by [@universalappfactory](https://github.com/tauri-apps/plugins-workspace/../../universalappfactory)) Fixed OpenerPlugin packagename for android
|
||||
|
||||
## \[2.2.1]
|
||||
|
||||
- [`18dffc9d`](https://github.com/tauri-apps/plugins-workspace/commit/18dffc9dfecaf0c900e233e041d9ca36c92834b5) ([#2189](https://github.com/tauri-apps/plugins-workspace/pull/2189) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Fix usage on iOS.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-opener"
|
||||
version = "2.2.1"
|
||||
version = "2.2.3"
|
||||
description = "Open files and URLs using their default application."
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
|
||||
@@ -98,8 +98,18 @@ fn main() {
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.setup(|app| {
|
||||
let opener = app.opener();
|
||||
|
||||
// Opens the URL in the default browser
|
||||
opener.open_url("https://example.com", None::<&str>)?;
|
||||
// Or with a specific browser/app
|
||||
opener.open_url("https://example.com", Some("firefox"))?;
|
||||
|
||||
// Opens the path with the system's default app
|
||||
opener.open_path("/path/to/file", None::<&str>)?;
|
||||
// Or with a specific app
|
||||
opener.open_path("/path/to/file", Some("firefox"))?;
|
||||
|
||||
// Reveal a path with the system's default explorer
|
||||
opener.reveal_item_in_dir("/path/to/file")?;
|
||||
Ok(())
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package app.tauri.shell
|
||||
package app.tauri.opener
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
@@ -27,4 +27,4 @@ class OpenerPlugin(private val activity: Activity) : Plugin(activity) {
|
||||
invoke.reject(ex.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-opener",
|
||||
"version": "2.2.1",
|
||||
"version": "2.2.3",
|
||||
"description": "Open files and URLs using their default application.",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"authors": [
|
||||
|
||||
@@ -38,6 +38,19 @@ pub struct Opener<R: Runtime> {
|
||||
impl<R: Runtime> Opener<R> {
|
||||
/// Open a url with a default or specific program.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// use tauri_plugin_opener::OpenerExt;
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// // open the given URL on the system default browser
|
||||
/// app.opener().open_url("https://github.com/tauri-apps/tauri", None::<&str>)?;
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// ## Platform-specific:
|
||||
///
|
||||
/// - **Android / iOS**: Always opens using default program.
|
||||
@@ -48,6 +61,19 @@ impl<R: Runtime> Opener<R> {
|
||||
|
||||
/// Open a url with a default or specific program.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// use tauri_plugin_opener::OpenerExt;
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// // open the given URL on the system default browser
|
||||
/// app.opener().open_url("https://github.com/tauri-apps/tauri", None::<&str>)?;
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// ## Platform-specific:
|
||||
///
|
||||
/// - **Android / iOS**: Always opens using default program.
|
||||
@@ -60,6 +86,19 @@ impl<R: Runtime> Opener<R> {
|
||||
|
||||
/// Open a path with a default or specific program.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// use tauri_plugin_opener::OpenerExt;
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// // open the given path on the system default explorer
|
||||
/// app.opener().open_path("/path/to/file", None::<&str>)?;
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// ## Platform-specific:
|
||||
///
|
||||
/// - **Android / iOS**: Always opens using default program.
|
||||
@@ -74,6 +113,19 @@ impl<R: Runtime> Opener<R> {
|
||||
|
||||
/// Open a path with a default or specific program.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust,no_run
|
||||
/// use tauri_plugin_opener::OpenerExt;
|
||||
///
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// // open the given path on the system default explorer
|
||||
/// app.opener().open_path("/path/to/file", None::<&str>)?;
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
///
|
||||
/// ## Platform-specific:
|
||||
///
|
||||
/// - **Android / iOS**: Always opens using default program.
|
||||
@@ -98,7 +150,7 @@ pub trait OpenerExt<R: Runtime> {
|
||||
fn opener(&self) -> &Opener<R>;
|
||||
}
|
||||
|
||||
impl<R: Runtime, T: Manager<R>> crate::OpenerExt<R> for T {
|
||||
impl<R: Runtime, T: Manager<R>> OpenerExt<R> for T {
|
||||
fn opener(&self) -> &Opener<R> {
|
||||
self.state::<Opener<R>>().inner()
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ pub(crate) fn open<P: AsRef<OsStr>, S: AsRef<str>>(path: P, with: Option<S>) ->
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// // open the given URL on the system default browser
|
||||
/// tauri_plugin_opener::open_url("https://github.com/tauri-apps/tauri", None)?;
|
||||
/// tauri_plugin_opener::open_url("https://github.com/tauri-apps/tauri", None::<&str>)?;
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
@@ -46,12 +46,16 @@ pub fn open_url<P: AsRef<str>, S: AsRef<str>>(url: P, with: Option<S>) -> crate:
|
||||
/// ```rust,no_run
|
||||
/// tauri::Builder::default()
|
||||
/// .setup(|app| {
|
||||
/// // open the given URL on the system default browser
|
||||
/// tauri_plugin_opener::open_path("/path/to/file", None)?;
|
||||
/// // open the given URL on the system default explorer
|
||||
/// tauri_plugin_opener::open_path("/path/to/file", None::<&str>)?;
|
||||
/// Ok(())
|
||||
/// });
|
||||
/// ```
|
||||
pub fn open_path<P: AsRef<Path>, S: AsRef<str>>(path: P, with: Option<S>) -> crate::Result<()> {
|
||||
let path = path.as_ref();
|
||||
if with.is_none() {
|
||||
// Returns an IO error if not exists, and besides `exists()` is a shorthand for `metadata()`
|
||||
_ = path.metadata()?;
|
||||
}
|
||||
open(path, with)
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.1.0"
|
||||
"@tauri-apps/cli": "2.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ windows = { level = "full", notes = "" }
|
||||
linux = { level = "full", notes = "" }
|
||||
macos = { level = "full", notes = "" }
|
||||
android = { level = "full", notes = "" }
|
||||
ios = { level = "none", notes = "" }
|
||||
ios = { level = "full", notes = "" }
|
||||
|
||||
[build-dependencies]
|
||||
tauri-plugin = { workspace = true, features = ["build"] }
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.1.0",
|
||||
"@tauri-apps/cli": "2.2.2",
|
||||
"vite": "^6.0.0",
|
||||
"typescript": "^5.4.7"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## \[2.3.1]
|
||||
|
||||
- [`57efb47c`](https://github.com/tauri-apps/plugins-workspace/commit/57efb47c116f880477f72f02a8e4239e88007d44) ([#2235](https://github.com/tauri-apps/plugins-workspace/pull/2235) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Add `Builder::header` and `Builder::headers` method to configure default headers for updater.
|
||||
|
||||
## \[2.3.0]
|
||||
|
||||
- [`829b6326`](https://github.com/tauri-apps/plugins-workspace/commit/829b63265030bc9c61d1738c4eaca0ffb3178677) ([#1919](https://github.com/tauri-apps/plugins-workspace/pull/1919) by [@n1ght-hunter](https://github.com/tauri-apps/plugins-workspace/../../n1ght-hunter)) Add `tauri_plugin_updater::Builder::default_version_comparator` method to set the default version comparator for the updater.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tauri-plugin-updater"
|
||||
version = "2.3.0"
|
||||
version = "2.3.1"
|
||||
description = "In-app updates for Tauri applications."
|
||||
edition = { workspace = true }
|
||||
authors = { workspace = true }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tauri-apps/plugin-updater",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"authors": [
|
||||
"Tauri Programme within The Commons Conservancy"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
use std::{ffi::OsString, sync::Arc};
|
||||
|
||||
use http::{HeaderMap, HeaderName, HeaderValue};
|
||||
use semver::Version;
|
||||
use tauri::{
|
||||
plugin::{Builder as PluginBuilder, TauriPlugin},
|
||||
@@ -74,13 +75,15 @@ impl<R: Runtime, T: Manager<R>> UpdaterExt<R> for T {
|
||||
config,
|
||||
target,
|
||||
version_comparator,
|
||||
headers,
|
||||
} = self.state::<UpdaterState>().inner();
|
||||
|
||||
let mut builder = UpdaterBuilder::new(
|
||||
package_info.name.clone(),
|
||||
package_info.version.clone(),
|
||||
config.clone(),
|
||||
);
|
||||
)
|
||||
.headers(headers.clone());
|
||||
|
||||
if let Some(target) = target {
|
||||
builder = builder.target(target);
|
||||
@@ -124,6 +127,7 @@ struct UpdaterState {
|
||||
target: Option<String>,
|
||||
config: Config,
|
||||
version_comparator: Option<VersionComparator>,
|
||||
headers: HeaderMap,
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
@@ -131,6 +135,7 @@ pub struct Builder {
|
||||
target: Option<String>,
|
||||
pubkey: Option<String>,
|
||||
installer_args: Vec<OsString>,
|
||||
headers: HeaderMap,
|
||||
default_version_comparator: Option<VersionComparator>,
|
||||
}
|
||||
|
||||
@@ -172,6 +177,26 @@ impl Builder {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn header<K, V>(mut self, key: K, value: V) -> Result<Self>
|
||||
where
|
||||
HeaderName: TryFrom<K>,
|
||||
<HeaderName as TryFrom<K>>::Error: Into<http::Error>,
|
||||
HeaderValue: TryFrom<V>,
|
||||
<HeaderValue as TryFrom<V>>::Error: Into<http::Error>,
|
||||
{
|
||||
let key: std::result::Result<HeaderName, http::Error> = key.try_into().map_err(Into::into);
|
||||
let value: std::result::Result<HeaderValue, http::Error> =
|
||||
value.try_into().map_err(Into::into);
|
||||
self.headers.insert(key?, value?);
|
||||
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
pub fn headers(mut self, headers: HeaderMap) -> Self {
|
||||
self.headers = headers;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn default_version_comparator<
|
||||
F: Fn(Version, RemoteRelease) -> bool + Send + Sync + 'static,
|
||||
>(
|
||||
@@ -187,6 +212,7 @@ impl Builder {
|
||||
let target = self.target;
|
||||
let version_comparator = self.default_version_comparator;
|
||||
let installer_args = self.installer_args;
|
||||
let headers = self.headers;
|
||||
PluginBuilder::<R, Config>::new("updater")
|
||||
.setup(move |app, api| {
|
||||
let mut config = api.config().clone();
|
||||
@@ -200,6 +226,7 @@ impl Builder {
|
||||
target,
|
||||
config,
|
||||
version_comparator,
|
||||
headers,
|
||||
});
|
||||
Ok(())
|
||||
})
|
||||
|
||||
@@ -179,6 +179,16 @@ impl UpdaterBuilder {
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
pub fn headers(mut self, headers: HeaderMap) -> Self {
|
||||
self.headers = headers;
|
||||
self
|
||||
}
|
||||
|
||||
pub fn clear_headers(mut self) -> Self {
|
||||
self.headers.clear();
|
||||
self
|
||||
}
|
||||
|
||||
pub fn timeout(mut self, timeout: Duration) -> Self {
|
||||
self.timeout = Some(timeout);
|
||||
self
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tauri-apps/cli": "2.1.0",
|
||||
"@tauri-apps/cli": "2.2.2",
|
||||
"typescript": "^5.3.3",
|
||||
"vite": "^6.0.0"
|
||||
},
|
||||
|
||||
Generated
+277
-277
File diff suppressed because it is too large
Load Diff
+5
-2
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"extends": ["config:base"],
|
||||
"extends": ["config:recommended"],
|
||||
"baseBranches": ["v2", "v1"],
|
||||
"enabledManagers": ["cargo", "npm"],
|
||||
"semanticCommitType": "chore",
|
||||
"labels": ["dependencies"],
|
||||
"ignorePaths": [
|
||||
"**/node_modules/**",
|
||||
@@ -16,6 +15,10 @@
|
||||
],
|
||||
"rangeStrategy": "replace",
|
||||
"packageRules": [
|
||||
{
|
||||
"semanticCommitType": "chore",
|
||||
"matchPackageNames": ["*"]
|
||||
},
|
||||
{
|
||||
"description": "Disable node/pnpm version updates",
|
||||
"matchPackageNames": ["node", "pnpm"],
|
||||
|
||||
Reference in New Issue
Block a user