Compare commits

...

11 Commits

Author SHA1 Message Date
github-actions[bot] 715a0477be Publish New Versions (v2) (#2128)
Co-authored-by: FabianLars <FabianLars@users.noreply.github.com>
2024-12-03 14:45:07 +01:00
enri90 05c62d731f feat(upload): Added body to download function (#1523)
Co-authored-by: FabianLars <fabianlars@fabianlars.de>
2024-12-03 14:35:11 +01:00
Adam C ce83d53775 docs(clipboard-manager): Added missing codeblock quotes in inline code docs (#2127) 2024-12-03 13:48:29 +01:00
renovate[bot] 6dbc304c28 chore(deps): update dependency typescript-eslint to v8.17.0 (#2124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 21:39:37 +01:00
github-actions[bot] ab8cf45bb9 publish new versions (#2121)
Co-authored-by: FabianLars <FabianLars@users.noreply.github.com>
2024-12-02 21:37:16 +01:00
Muhammed Rahif 3ef756f4ce docs(all): incorrect path for registering plugin in rust (#2123) 2024-12-02 21:13:12 +01:00
Fabian-Lars 664c452697 ci(renovate): Rename log-plugin to log (#2122) 2024-12-02 15:01:19 +01:00
Fabian-Lars 82fa1e1f45 docs(updater): Link to website in Usage section
closes #1133
2024-12-02 14:54:20 +01:00
Fabian-Lars 3195646996 fix(sql): Fix QueryResult typings (#1928)
* fix(sql): Fix QueryResult typings

closes #1893

* Create fix-sql-queryresult-type.md

---------

Co-authored-by: Tillmann <28728469+tweidinger@users.noreply.github.com>
2024-12-02 14:49:06 +01:00
FabianLars 6f6a178ae4 ci(renovate): Disable lockfile maintenance 2024-12-02 14:35:10 +01:00
FabianLars 28935b65be ci: Re-add Cargo.lock to ci triggers 2024-12-02 14:31:13 +01:00
50 changed files with 153 additions and 118 deletions
+2 -2
View File
@@ -56,7 +56,7 @@
"dependencies": [
"barcode-scanner",
"biometric",
"log-plugin",
"log",
"cli",
"clipboard-manager",
"dialog",
@@ -217,7 +217,7 @@
"path": "./plugins/localhost",
"manager": "rust"
},
"log-plugin": {
"log": {
"path": "./plugins/log",
"manager": "rust"
},
+27
View File
@@ -47,113 +47,140 @@ jobs:
tauri-plugin-autostart:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/autostart/**
tauri-plugin-cli:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/cli/**
tauri-plugin-clipboard-manager:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/clipboard-manager/**
tauri-plugin-deep-link:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/deep-link/**
tauri-plugin-dialog:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/dialog/**
- plugins/fs/**
tauri-plugin-fs:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/fs/**
tauri-plugin-geolocation:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/geolocation/**
tauri-plugin-global-shortcut:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/global-shortcut/**
tauri-plugin-opener:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/opener/**
tauri-plugin-haptics:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/haptics/**
tauri-plugin-http:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/http/**
- plugins/fs/**
tauri-plugin-localhost:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/localhost/**
tauri-plugin-log:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/log/**
tauri-plugin-notification:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/notification/**
tauri-plugin-os:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/os/**
tauri-plugin-persisted-scope:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/persisted-scope/**
- plugins/fs/**
tauri-plugin-positioner:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/positioner/**
tauri-plugin-process:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/process/**
tauri-plugin-shell:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/shell/**
tauri-plugin-single-instance:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/single-instance/**
tauri-plugin-sql:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/sql/**
tauri-plugin-store:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/store/**
tauri-plugin-stronghold:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/stronghold/**
tauri-plugin-updater:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/updater/**
tauri-plugin-upload:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/upload/**
tauri-plugin-websocket:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/websocket/**
tauri-plugin-window-state:
- .github/workflows/test-rust.yml
- Cargo.toml
- Cargo.lock
- plugins/window-state/**
test:
Generated
+3 -3
View File
@@ -853,9 +853,9 @@ dependencies = [
[[package]]
name = "cargo-platform"
version = "0.1.9"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"
checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc"
dependencies = [
"serde",
]
@@ -6892,7 +6892,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-upload"
version = "2.2.0"
version = "2.2.1"
dependencies = [
"futures-util",
"log",
+1 -1
View File
@@ -24,7 +24,7 @@
"rollup": "4.28.0",
"tslib": "2.8.1",
"typescript": "5.7.2",
"typescript-eslint": "8.16.0"
"typescript-eslint": "8.17.0"
},
"resolutions": {
"semver": ">=7.5.2",
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-autostart#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
use tauri_plugin_autostart::MacosLauncher;
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-barcode-scanner#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -56,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-biometric#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -55,7 +55,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-cli#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-clipboard-manager#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
@@ -65,6 +65,7 @@ async function readText(): Promise<string> {
* 0, 255, 0, 255,
* ];
* await writeImage(buffer);
* ```
*
* @returns A promise indicating the success or failure of the operation.
*
+1 -1
View File
@@ -133,7 +133,7 @@ Under `tauri.conf.json > plugins > deep-link`, configure the domains (mobile) an
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-dialog#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-fs#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+2 -2
View File
@@ -138,7 +138,7 @@ impl<'de> serde::Deserialize<'de> for FilePath {
{
struct FilePathVisitor;
impl<'de> serde::de::Visitor<'de> for FilePathVisitor {
impl serde::de::Visitor<'_> for FilePathVisitor {
type Value = FilePath;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
@@ -169,7 +169,7 @@ impl<'de> serde::Deserialize<'de> for SafeFilePath {
{
struct SafeFilePathVisitor;
impl<'de> serde::de::Visitor<'de> for SafeFilePathVisitor {
impl serde::de::Visitor<'_> for SafeFilePathVisitor {
type Value = SafeFilePath;
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
+1 -1
View File
@@ -81,7 +81,7 @@ The Google Play Store uses this property to decide whether it should show the ap
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -55,7 +55,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-global-shortcut#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -58,7 +58,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-haptics#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-http#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -38,7 +38,7 @@ tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspac
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
use tauri::{Manager, window::WindowBuilder, WindowUrl};
+1 -1
View File
@@ -56,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-log#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
use tauri_plugin_log::{Target, TargetKind};
+1 -1
View File
@@ -56,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-nfc#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-notification#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -56,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-opener#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-os#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -110,7 +110,7 @@ struct InitJavascript<'a> {
exe_extension: &'a str,
}
impl<'a> InitJavascript<'a> {
impl InitJavascript<'_> {
fn new() -> Self {
Self {
#[cfg(windows)]
+1 -1
View File
@@ -35,7 +35,7 @@ tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-wo
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -56,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-positioner#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
use tauri::tray::TrayIconBuilder;
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-process#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-shell#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -224,7 +224,7 @@ impl OpenScope {
}
}
impl<'a> ShellScope<'a> {
impl ShellScope<'_> {
/// Validates argument inputs and creates a Tauri sidecar [`Command`].
pub fn prepare_sidecar(
&self,
+1 -1
View File
@@ -35,7 +35,7 @@ tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-wo
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
use tauri::{Manager};
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.2]
- [`31956469`](https://github.com/tauri-apps/plugins-workspace/commit/319564699638c080b73d506bcaad186ecc4a8236) ([#1928](https://github.com/tauri-apps/plugins-workspace/pull/1928) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Fixed the QueryResult typing by marking `lastInsertId` as optional to reflect postgres-only changes made in the 2.0.0 release.
## \[2.0.3]
- [`90ef77c8`](https://github.com/tauri-apps/plugins-workspace/commit/90ef77c8723ac9d0ba7bd3b52a80a2b14843ff99) ([#2038](https://github.com/tauri-apps/plugins-workspace/pull/2038) by [@johncarmack1984](https://github.com/tauri-apps/plugins-workspace/../../johncarmack1984)) Allow blocking on async code without creating a nested runtime.
+1 -1
View File
@@ -56,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-sql#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+2 -2
View File
@@ -10,12 +10,12 @@ export interface QueryResult {
/**
* The last inserted `id`.
*
* This value is always `0` when using the Postgres driver. If the
* This value is not set for Postgres databases. If the
* last inserted id is required on Postgres, the `select` function
* must be used, with a `RETURNING` clause
* (`INSERT INTO todos (title) VALUES ($1) RETURNING id`).
*/
lastInsertId: number
lastInsertId?: number
}
/**
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-sql",
"version": "2.0.1",
"version": "2.0.2",
"description": "Interface with SQL databases",
"license": "MIT OR Apache-2.0",
"authors": [
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-stronghold#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -125,7 +125,7 @@ impl<'de> Deserialize<'de> for KeyType {
{
struct KeyTypeVisitor;
impl<'de> Visitor<'de> for KeyTypeVisitor {
impl Visitor<'_> for KeyTypeVisitor {
type Value = KeyType;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+3 -1
View File
@@ -55,7 +55,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-updater#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
@@ -82,6 +82,8 @@ if (update?.available) {
}
```
Note that for these APIs to work you have to properly configure the updater first and generate updater artifacts. Please refer to the [guide on our website](https://v2.tauri.app/plugin/updater/) for this.
## Contributing
PRs accepted. Please make sure to read the Contributing Guide before making a pull request.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.2.1]
- [`05c62d73`](https://github.com/tauri-apps/plugins-workspace/commit/05c62d731fa48fd06b8cb3694a962d8cb0db8619) ([#1523](https://github.com/tauri-apps/plugins-workspace/pull/1523) by [@enri90](https://github.com/tauri-apps/plugins-workspace/../../enri90)) Added post request on download function
## \[2.2.0]
- [`5dadd205`](https://github.com/tauri-apps/plugins-workspace/commit/5dadd205f5596c9607457dd015a2f9d7fc48a2db) ([#2033](https://github.com/tauri-apps/plugins-workspace/pull/2033) by [@514sid](https://github.com/tauri-apps/plugins-workspace/../../514sid)) Added a new field `progressTotal` to track the total amount of data transferred during the upload/download process.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-upload"
version = "2.2.0"
version = "2.2.1"
description = "Upload files from disk to a remote server over HTTP."
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -55,7 +55,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-upload#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_UPLOAD__=function(t){"use strict";function e(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)}function n(t,e,n,s,o){if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var s,o,r;"function"==typeof SuppressedError&&SuppressedError;const i="__TAURI_TO_IPC_KEY__";class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,s.set(this,(()=>{})),o.set(this,0),r.set(this,{}),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((({message:t,id:i})=>{if(i===e(this,o,"f")){n(this,o,i+1),e(this,s,"f").call(this,t);const a=Object.keys(e(this,r,"f"));if(a.length>0){let t=i+1;for(const n of a.sort()){if(parseInt(n)!==t)break;{const o=e(this,r,"f")[n];delete e(this,r,"f")[n],e(this,s,"f").call(this,o),t+=1}}n(this,o,t)}}else e(this,r,"f")[i.toString()]=t}))}set onmessage(t){n(this,s,t)}get onmessage(){return e(this,s,"f")}[(s=new WeakMap,o=new WeakMap,r=new WeakMap,i)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[i]()}}async function _(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}return t.download=async function(t,e,n,s){const o=new Uint32Array(1);window.crypto.getRandomValues(o);const r=o[0],i=new a;n&&(i.onmessage=n),await _("plugin:upload|download",{id:r,url:t,filePath:e,headers:s??{},onProgress:i})},t.upload=async function(t,e,n,s){const o=new Uint32Array(1);window.crypto.getRandomValues(o);const r=o[0],i=new a;return n&&(i.onmessage=n),await _("plugin:upload|upload",{id:r,url:t,filePath:e,headers:s??{},onProgress:i})},t}({});Object.defineProperty(window.__TAURI__,"upload",{value:__TAURI_PLUGIN_UPLOAD__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_UPLOAD__=function(t){"use strict";function e(t,e,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(t):o?o.value:e.get(t)}function n(t,e,n,o,s){if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var o,s,r;"function"==typeof SuppressedError&&SuppressedError;const i="__TAURI_TO_IPC_KEY__";class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,o.set(this,(()=>{})),s.set(this,0),r.set(this,{}),this.id=function(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}((({message:t,id:i})=>{if(i===e(this,s,"f")){n(this,s,i+1),e(this,o,"f").call(this,t);const a=Object.keys(e(this,r,"f"));if(a.length>0){let t=i+1;for(const n of a.sort()){if(parseInt(n)!==t)break;{const s=e(this,r,"f")[n];delete e(this,r,"f")[n],e(this,o,"f").call(this,s),t+=1}}n(this,s,t)}}else e(this,r,"f")[i.toString()]=t}))}set onmessage(t){n(this,o,t)}get onmessage(){return e(this,o,"f")}[(o=new WeakMap,s=new WeakMap,r=new WeakMap,i)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[i]()}}async function _(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}return t.download=async function(t,e,n,o,s){const r=new Uint32Array(1);window.crypto.getRandomValues(r);const i=r[0],c=new a;n&&(c.onmessage=n),await _("plugin:upload|download",{id:i,url:t,filePath:e,headers:o??{},onProgress:c,body:s})},t.upload=async function(t,e,n,o){const s=new Uint32Array(1);window.crypto.getRandomValues(s);const r=s[0],i=new a;return n&&(i.onmessage=n),await _("plugin:upload|upload",{id:r,url:t,filePath:e,headers:o??{},onProgress:i})},t}({});Object.defineProperty(window.__TAURI__,"upload",{value:__TAURI_PLUGIN_UPLOAD__})}
+4 -2
View File
@@ -45,7 +45,8 @@ async function download(
url: string,
filePath: string,
progressHandler?: ProgressHandler,
headers?: Map<string, string>
headers?: Map<string, string>,
body?: string
): Promise<void> {
const ids = new Uint32Array(1)
window.crypto.getRandomValues(ids)
@@ -61,7 +62,8 @@ async function download(
url,
filePath,
headers: headers ?? {},
onProgress
onProgress,
body
})
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-upload",
"version": "2.2.0",
"version": "2.2.1",
"description": "Upload files from disk to a remote server over HTTP.",
"license": "MIT OR Apache-2.0",
"authors": [
+8 -4
View File
@@ -69,12 +69,16 @@ async fn download(
url: &str,
file_path: &str,
headers: HashMap<String, String>,
body: Option<String>,
on_progress: Channel<ProgressPayload>,
) -> Result<()> {
let client = reqwest::Client::new();
let mut request = client.get(url);
// Loop through the headers keys and values
let mut request = if let Some(body) = body {
client.post(url).body(body)
} else {
client.get(url)
};
// Loop trought the headers keys and values
// and add them to the request object.
for (key, value) in headers {
request = request.header(&key, value);
@@ -206,7 +210,7 @@ mod tests {
let _ = msg;
Ok(())
});
download(url, file_path, headers, sender).await
download(url, file_path, headers, None, sender).await
}
async fn spawn_server_mocked(return_status: usize) -> MockedServer {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-websocket#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+1 -1
View File
@@ -54,7 +54,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-window-state#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {
+56 -56
View File
@@ -52,8 +52,8 @@ importers:
specifier: 5.7.2
version: 5.7.2
typescript-eslint:
specifier: 8.16.0
version: 8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
specifier: 8.17.0
version: 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
examples/api:
dependencies:
@@ -1071,8 +1071,8 @@ packages:
'@types/unist@2.0.11':
resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==}
'@typescript-eslint/eslint-plugin@8.16.0':
resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==}
'@typescript-eslint/eslint-plugin@8.17.0':
resolution: {integrity: sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
@@ -1082,8 +1082,8 @@ packages:
typescript:
optional: true
'@typescript-eslint/parser@8.16.0':
resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==}
'@typescript-eslint/parser@8.17.0':
resolution: {integrity: sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
@@ -1092,12 +1092,12 @@ packages:
typescript:
optional: true
'@typescript-eslint/scope-manager@8.16.0':
resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==}
'@typescript-eslint/scope-manager@8.17.0':
resolution: {integrity: sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/type-utils@8.16.0':
resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==}
'@typescript-eslint/type-utils@8.17.0':
resolution: {integrity: sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
@@ -1106,12 +1106,12 @@ packages:
typescript:
optional: true
'@typescript-eslint/types@8.16.0':
resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==}
'@typescript-eslint/types@8.17.0':
resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@8.16.0':
resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==}
'@typescript-eslint/typescript-estree@8.17.0':
resolution: {integrity: sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '*'
@@ -1119,8 +1119,8 @@ packages:
typescript:
optional: true
'@typescript-eslint/utils@8.16.0':
resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==}
'@typescript-eslint/utils@8.17.0':
resolution: {integrity: sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
@@ -1129,8 +1129,8 @@ packages:
typescript:
optional: true
'@typescript-eslint/visitor-keys@8.16.0':
resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==}
'@typescript-eslint/visitor-keys@8.17.0':
resolution: {integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@unocss/astro@0.65.0':
@@ -2222,8 +2222,8 @@ packages:
resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==}
engines: {node: '>=8'}
typescript-eslint@8.16.0:
resolution: {integrity: sha512-wDkVmlY6O2do4V+lZd0GtRfbtXbeD0q9WygwXXSJnC1xorE8eqyC2L1tJimqpSeFrOzRlYtWnUp/uzgHQOgfBQ==}
typescript-eslint@8.17.0:
resolution: {integrity: sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
@@ -2441,13 +2441,14 @@ snapshots:
picocolors: 1.1.1
sisteransi: 1.0.5
'@covector/apply@0.10.0':
'@covector/apply@0.10.0(mocha@10.8.2)':
dependencies:
'@covector/files': 0.8.0
effection: 2.0.8(mocha@10.8.2)
semver: 7.6.3
transitivePeerDependencies:
- encoding
- mocha
'@covector/assemble@0.12.0':
dependencies:
@@ -2464,7 +2465,7 @@ snapshots:
- encoding
- supports-color
'@covector/changelog@0.12.0(mocha@10.8.2)':
'@covector/changelog@0.12.0':
dependencies:
'@covector/files': 0.8.0
effection: 2.0.8(mocha@10.8.2)
@@ -2474,7 +2475,6 @@ snapshots:
unified: 9.2.2
transitivePeerDependencies:
- encoding
- mocha
- supports-color
'@covector/command@0.8.0':
@@ -2981,14 +2981,14 @@ snapshots:
'@types/unist@2.0.11': {}
'@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)':
'@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)':
dependencies:
'@eslint-community/regexpp': 4.12.1
'@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/scope-manager': 8.16.0
'@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/visitor-keys': 8.16.0
'@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/scope-manager': 8.17.0
'@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/visitor-keys': 8.17.0
eslint: 9.16.0(jiti@1.21.6)
graphemer: 1.4.0
ignore: 5.3.2
@@ -2999,12 +2999,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)':
'@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)':
dependencies:
'@typescript-eslint/scope-manager': 8.16.0
'@typescript-eslint/types': 8.16.0
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2)
'@typescript-eslint/visitor-keys': 8.16.0
'@typescript-eslint/scope-manager': 8.17.0
'@typescript-eslint/types': 8.17.0
'@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2)
'@typescript-eslint/visitor-keys': 8.17.0
debug: 4.3.7(supports-color@8.1.1)
eslint: 9.16.0(jiti@1.21.6)
optionalDependencies:
@@ -3012,15 +3012,15 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/scope-manager@8.16.0':
'@typescript-eslint/scope-manager@8.17.0':
dependencies:
'@typescript-eslint/types': 8.16.0
'@typescript-eslint/visitor-keys': 8.16.0
'@typescript-eslint/types': 8.17.0
'@typescript-eslint/visitor-keys': 8.17.0
'@typescript-eslint/type-utils@8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)':
'@typescript-eslint/type-utils@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)':
dependencies:
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2)
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2)
'@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
debug: 4.3.7(supports-color@8.1.1)
eslint: 9.16.0(jiti@1.21.6)
ts-api-utils: 1.4.3(typescript@5.7.2)
@@ -3029,12 +3029,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/types@8.16.0': {}
'@typescript-eslint/types@8.17.0': {}
'@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)':
'@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)':
dependencies:
'@typescript-eslint/types': 8.16.0
'@typescript-eslint/visitor-keys': 8.16.0
'@typescript-eslint/types': 8.17.0
'@typescript-eslint/visitor-keys': 8.17.0
debug: 4.3.7(supports-color@8.1.1)
fast-glob: 3.3.2
is-glob: 4.0.3
@@ -3046,21 +3046,21 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)':
'@typescript-eslint/utils@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)':
dependencies:
'@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@1.21.6))
'@typescript-eslint/scope-manager': 8.16.0
'@typescript-eslint/types': 8.16.0
'@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2)
'@typescript-eslint/scope-manager': 8.17.0
'@typescript-eslint/types': 8.17.0
'@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2)
eslint: 9.16.0(jiti@1.21.6)
optionalDependencies:
typescript: 5.7.2
transitivePeerDependencies:
- supports-color
'@typescript-eslint/visitor-keys@8.16.0':
'@typescript-eslint/visitor-keys@8.17.0':
dependencies:
'@typescript-eslint/types': 8.16.0
'@typescript-eslint/types': 8.17.0
eslint-visitor-keys: 4.2.0
'@unocss/astro@0.65.0(rollup@4.28.0)(vite@6.0.1(jiti@1.21.6)(terser@5.36.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.7.2))':
@@ -3413,9 +3413,9 @@ snapshots:
covector@0.12.3(mocha@10.8.2):
dependencies:
'@clack/prompts': 0.7.0
'@covector/apply': 0.10.0
'@covector/apply': 0.10.0(mocha@10.8.2)
'@covector/assemble': 0.12.0
'@covector/changelog': 0.12.0(mocha@10.8.2)
'@covector/changelog': 0.12.0
'@covector/command': 0.8.0
'@covector/files': 0.8.0
effection: 2.0.8(mocha@10.8.2)
@@ -4313,11 +4313,11 @@ snapshots:
type-fest@0.7.1: {}
typescript-eslint@8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2):
typescript-eslint@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2):
dependencies:
'@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/eslint-plugin': 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2))(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/parser': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
'@typescript-eslint/utils': 8.17.0(eslint@9.16.0(jiti@1.21.6))(typescript@5.7.2)
eslint: 9.16.0(jiti@1.21.6)
optionalDependencies:
typescript: 5.7.2
-9
View File
@@ -14,9 +14,6 @@
"**/__fixtures__/**",
"shared/**"
],
"lockFileMaintenance": {
"enabled": true
},
"rangeStrategy": "replace",
"packageRules": [
{
@@ -24,12 +21,6 @@
"matchPackageNames": ["node", "pnpm"],
"matchDepTypes": ["engines", "packageManager"],
"enabled": false
},
{
"description": "Disable lock file maintenance for v1",
"matchBaseBranches": ["v1"],
"matchUpdateTypes": ["lockFileMaintenance"],
"enabled": false
}
],
"postUpdateOptions": ["pnpmDedupe"]
+1 -1
View File
@@ -56,7 +56,7 @@ yarn add https://github.com/tauri-apps/tauri-plugin-PLUGIN_NAME#v2
First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
`src-tauri/src/lib.rs`
```rust
fn main() {