Compare commits

...

33 Commits

Author SHA1 Message Date
github-actions[bot] 525abc4be5 Publish New Versions (v2) (#1961)
Co-authored-by: amrbashir <amrbashir@users.noreply.github.com>
2024-10-21 15:13:27 +03:00
bWanShiTong 14cee64c82 fix(fs): fix compilation on targets with pointer width 16 and 32 (#1958) 2024-10-21 15:07:55 +03:00
github-actions[bot] 3fd283121f publish new versions (#1909)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-10-20 08:54:26 -03:00
Amr Bashir ae8024565f perf(fs): improve FileHandle.read performance (#1950)
* perf(fs): improve `FileHandle.read` performance

* handle different target pointer width

* improve `writeTextFile` performance

* revert packageManager field

* change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-20 08:49:01 -03:00
Tony 2302c2db1c fix(dialog): ask and confirm not using system button texts (#1910)
* Fix `ask`'s button texts being ok and cancel

* Update change file
2024-10-20 08:48:45 -03:00
renovate[bot] 44c50c1275 chore(deps): update rust crate tauri to 2.0.4 (#1952)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-20 17:28:39 +08:00
renovate[bot] 415bf2abc3 chore(deps): update eslint monorepo to v9.13.0 (#1951)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-20 16:54:34 +08:00
renovate[bot] 36207a93f3 chore(deps): update dependency @tauri-apps/cli to v2.0.3 (#1925)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-19 11:14:14 +08:00
renovate[bot] 854754e10b chore(deps): update dependency typescript-eslint to v8.10.0 (#1949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-19 11:13:06 +08:00
renovate[bot] 1c2f137a8a chore(deps): lock file maintenance (#1929)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-19 11:12:38 +08:00
Tony 8c67d44aef refactor(store)!: more reworks (#1860)
* refactor(store): more reworks

* Enable auto save by default

* Store to resource table by default

* Remove share store

* Clean up

* Add close store

* Add store function

* Add lazy store

* Add init to lazy store

* refresh cache in example

* Add get-or-create-store

* Revert "Add get-or-create-store"

This reverts commit 7ffd769240.

* try get first

* Docs

* Use absolute path for store

* more docs

* Allow js to use pre-stored (de)serialize functions

* Fix js get and close store

* Show case how to use pretty json

* Update readme

* Use store instead of `store_builder` in example

* Build

* Fix example

* More docs for StoreBuilder::build

* Add default (de)serialize fn

* Use pretty json by default

* Use `undefined` for empty value in get

* Change files

* Differentiate json null from no value for events

* Add create or existing

* Build

* Rename inner store's inset method to set

* Update readme

* Apply suggestions from code review

* Use close instead

* Update breaking changes

* Return result in resolve_store_path

* Change to close_resource and take &self

* Clean up

* Apply suggestions from code review

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>

* Remove unused pub(crate)

* Update change file

* Expose resolve_store_path

* Remove with_store

* Remove StoreInner from pub and expose is_empty

* Fix wrong jsdoc param

* Update readme

* rename createOrExistingStore to createOrLoad

* make api consistent with the JS implementation, add examples

* fmt

* reintroduce "get existing store" behavior for create_or_load

* rename createOrLoad to newOrExisting

* keep store lock throughout whole new_or_existing_inner

* Remove load

* Missed if load

* Don't make StoreState public

* Remove R: Runtime from Builder

* rename newOrExisting to load, load to reload

* update docs

* rename missing reload fn

* rename builder fn to build()

* fix default permission

* Fix description and create_new logic

* Clippy

* Update docs

* Update docs

* remove create_store command

* remove close_store command since we extend from Resource

* Revert "remove close_store command since we extend from Resource"

This reverts commit 4a29fc8990.

* Reapply "remove close_store command since we extend from Resource"

This reverts commit 70a1830e7d.

---------

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-17 19:14:41 +08:00
Niko Korvenlaita cfd48b3b2e feat: allow http calls without origin header (#1941) 2024-10-16 15:56:36 +03:00
renovate[bot] 558e14bb4c chore(deps): update dependency typescript-eslint to v8.9.0 (#1937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-16 09:52:18 +08:00
凊弦凝绝 aef5dd6157 fix(sql): don't panic on missing migration when preload is enabled (#1932)
Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-10-14 20:32:49 +02:00
Fabian-Lars 74ee7edc43 ci: Run workflows on ubuntu 22.04 (#1936) 2024-10-14 18:40:56 +02:00
Fabian-Lars 7e1c17a635 ci(renovate): Remove tauri pre-release workaround 2024-10-09 14:44:38 +02:00
Lucas Fernandes Nogueira 3c1f3874f4 fix(positioner): handleIconState missing permission and wrong impl (#1911) 2024-10-09 09:37:16 -03:00
Amr Bashir 51ddf6a715 fix(shell): use async command for open JS API (#1881)
closes tauri-apps/tauri#11212
2024-10-09 08:47:25 -03:00
renovate[bot] 62082b7086 chore(deps): lock file maintenance (#1895)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-09 08:46:38 -03:00
nashaofu aee14ed426 fix(dialog): Fix the issue of Android saving files with a .txt extension (#1892)
* fix: Fix the issue of Android saving files with a .txt extension

* fix(dialog): pull intent type from extensions filters

* fix covector

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-09 08:45:05 -03:00
Amr Bashir 9b2840db94 fix(http): retain headers order (#1884)
* fix(http): retain headers order

closes #1882

* simplify if

* actually set headers

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-10-09 08:07:46 -03:00
renovate[bot] 60064fce52 chore(deps): update dependency typescript to v5.6.3 (#1905)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-09 09:28:06 +08:00
renovate[bot] 0058583583 fix(deps): update tauri monorepo to v2.0.2 (#1874)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-08 15:29:28 +08:00
renovate[bot] fb676626f1 chore(deps): update dependency typescript-eslint to v8.8.1 (#1899)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-08 10:01:07 +08:00
renovate[bot] f445c704a1 chore(deps): update eslint monorepo to v9.12.0 (#1887)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-05 07:29:30 +08:00
github-actions[bot] fd785ab5de publish new versions (#1878)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-10-03 10:58:13 -03:00
Lucas Fernandes Nogueira a1a82208ed chore: change MSRV to 1.77.2 to support Windows 7 (#1873)
* chore: change MSRV to 1.77.2 to support Windows 7

* fmt
2024-10-03 10:31:13 -03:00
renovate[bot] dc49de5341 chore(deps): update dependency typescript-eslint to v8.8.0 (#1854)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-03 20:52:00 +08:00
Tillmann 4c2454d410 sync readme with metadata (#1872) 2024-10-03 07:23:40 -03:00
renovate[bot] fe6dd0ff9e fix(deps): update dependency @tauri-apps/api to v2.0.1 (#1862)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-03 10:54:25 +08:00
Horu ab8d089b2b chore(barcode-scanner): fix banner link in readme (#1870)
* chore: fix banner link in readme

* chore: raw
2024-10-03 05:04:38 +03:00
github-actions[bot] ee02ea7746 publish new versions (#1869)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-10-02 16:40:18 -03:00
Lucas Fernandes Nogueira 9501cfa5f5 fix(updater): validate endpoint scheme before printing warning (#1868)
regression from #1814
2024-10-02 16:28:16 -03:00
149 changed files with 2227 additions and 1227 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ jobs:
clippy:
needs: changes
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
+2 -2
View File
@@ -168,7 +168,7 @@ jobs:
}
- {
target: x86_64-unknown-linux-gnu,
os: ubuntu-latest,
os: ubuntu-22.04,
runner: 'cargo',
command: 'test'
}
@@ -202,7 +202,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
- uses: dtolnay/rust-toolchain@1.78.0
- uses: dtolnay/rust-toolchain@1.77.2
with:
targets: ${{ matrix.platform.target }}
Generated
+323 -214
View File
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -11,10 +11,10 @@ resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
tauri = { version = "2.0.0", default-features = false }
tauri-build = "2.0.0"
tauri-plugin = "2.0.0"
tauri-utils = "2.0.0"
tauri = { version = "2.0.4", default-features = false }
tauri-build = "2.0.1"
tauri-plugin = "2.0.1"
tauri-utils = "2.0.1"
serde_json = "1"
thiserror = "1"
url = "2"
@@ -27,7 +27,7 @@ specta = "=2.0.0-rc.20"
edition = "2021"
authors = ["Tauri Programme within The Commons Conservancy"]
license = "Apache-2.0 OR MIT"
rust-version = "1.78"
rust-version = "1.77.2"
repository = "https://github.com/tauri-apps/plugins-workspace"
# default to small, optimized release binaries
+1 -1
View File
@@ -30,7 +30,7 @@
| [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? |
| [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ? | ? |
_This repo and all plugins require a Rust version of at least **1.78**_
_This repo and all plugins require a Rust version of at least **1.77.2**_
## Contributing
+10
View File
@@ -1,5 +1,15 @@
# Changelog
## \[2.0.1]
### Dependencies
- Upgraded to `dialog-js@2.0.1`
- Upgraded to `fs-js@2.0.1`
- Upgraded to `http-js@2.0.1`
- Upgraded to `shell-js@2.0.1`
- Upgraded to `store-js@2.1.0`
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+8 -8
View File
@@ -1,7 +1,7 @@
{
"name": "svelte-app",
"private": true,
"version": "2.0.0",
"version": "2.0.1",
"type": "module",
"scripts": {
"dev": "vite --clearScreen false",
@@ -9,23 +9,23 @@
"serve": "vite preview"
},
"dependencies": {
"@tauri-apps/api": "2.0.0",
"@tauri-apps/api": "2.0.2",
"@tauri-apps/plugin-barcode-scanner": "2.0.0",
"@tauri-apps/plugin-biometric": "2.0.0",
"@tauri-apps/plugin-cli": "2.0.0",
"@tauri-apps/plugin-clipboard-manager": "2.0.0",
"@tauri-apps/plugin-dialog": "2.0.0",
"@tauri-apps/plugin-fs": "2.0.0",
"@tauri-apps/plugin-dialog": "2.0.1",
"@tauri-apps/plugin-fs": "2.0.1",
"@tauri-apps/plugin-geolocation": "2.0.0",
"@tauri-apps/plugin-global-shortcut": "2.0.0",
"@tauri-apps/plugin-haptics": "2.0.0",
"@tauri-apps/plugin-http": "2.0.0",
"@tauri-apps/plugin-http": "2.0.1",
"@tauri-apps/plugin-nfc": "2.0.0",
"@tauri-apps/plugin-notification": "2.0.0",
"@tauri-apps/plugin-os": "2.0.0",
"@tauri-apps/plugin-process": "2.0.0",
"@tauri-apps/plugin-shell": "2.0.0",
"@tauri-apps/plugin-store": "2.0.0",
"@tauri-apps/plugin-shell": "2.0.1",
"@tauri-apps/plugin-store": "2.1.0",
"@tauri-apps/plugin-updater": "2.0.0",
"@zerodevx/svelte-json-view": "1.0.11"
},
@@ -33,7 +33,7 @@
"@iconify-json/codicon": "^1.1.37",
"@iconify-json/ph": "^1.1.8",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tauri-apps/cli": "2.0.0",
"@tauri-apps/cli": "2.0.3",
"@unocss/extractor-svelte": "^0.63.0",
"svelte": "^4.2.19",
"unocss": "^0.63.0",
+49
View File
@@ -1,5 +1,54 @@
# Changelog
## \[2.0.4]
### Dependencies
- Upgraded to `fs@2.0.3`
- Upgraded to `dialog@2.0.3`
- Upgraded to `http@2.0.3`
## \[2.0.3]
### Dependencies
- Upgraded to `dialog@2.0.2`
- Upgraded to `fs@2.0.2`
- Upgraded to `http@2.0.2`
- Upgraded to `shell@2.0.2`
- Upgraded to `store@2.1.0`
## \[2.0.2]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
### Dependencies
- Upgraded to `barcode-scanner@2.0.1`
- Upgraded to `biometric@2.0.1`
- Upgraded to `cli@2.0.1`
- Upgraded to `clipboard-manager@2.0.1`
- Upgraded to `fs@2.0.1`
- Upgraded to `dialog@2.0.1`
- Upgraded to `geolocation@2.0.1`
- Upgraded to `global-shortcut@2.0.1`
- Upgraded to `haptics@2.0.1`
- Upgraded to `http@2.0.1`
- Upgraded to `log-plugin@2.0.1`
- Upgraded to `nfc@2.0.1`
- Upgraded to `notification@2.0.1`
- Upgraded to `os@2.0.1`
- Upgraded to `process@2.0.1`
- Upgraded to `shell@2.0.1`
- Upgraded to `store@2.0.1`
- Upgraded to `updater@2.0.2`
## \[2.0.1]
### Dependencies
- Upgraded to `updater@2.0.1`
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+19 -19
View File
@@ -1,7 +1,7 @@
[package]
name = "api"
publish = false
version = "2.0.0"
version = "2.0.4"
description = "An example Tauri Application showcasing the api"
edition = "2021"
rust-version = { workspace = true }
@@ -19,22 +19,22 @@ serde_json = { workspace = true }
serde = { workspace = true }
tiny_http = "0.12"
log = { workspace = true }
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0", features = [
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.1" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.3", features = [
"watch",
] }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0" }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.1" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.3" }
tauri-plugin-http = { path = "../../../plugins/http", features = [
"multipart",
], version = "2.0.0" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0", features = [
], version = "2.0.3" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.1", features = [
"windows7-compat",
] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.0.0" }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.1" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.1" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.2" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.1.0" }
[dependencies.tauri]
workspace = true
@@ -50,17 +50,17 @@ 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.0.0" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0" }
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.1" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.1" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.2" }
tauri-plugin-window-state = { path = "../../../plugins/window-state", version = "2.0.0" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0" }
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.0.0" }
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.0.0" }
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.1" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.1" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.1" }
tauri-plugin-geolocation = { path = "../../../plugins/geolocation/", version = "2.0.1" }
tauri-plugin-haptics = { path = "../../../plugins/haptics/", version = "2.0.1" }
[features]
prod = ["tauri/custom-protocol"]
@@ -79,10 +79,6 @@
],
"deny": ["$APPDATA/db/*.stronghold"]
},
"store:allow-entries",
"store:allow-get",
"store:allow-set",
"store:allow-save",
"store:allow-load"
"store:default"
]
}
+4 -1
View File
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
@@ -18,7 +19,7 @@
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
<option name="modules">
<set>
<option value="$USER_HOME$/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.0-rc.7/mobile/android" />
<option value="$USER_HOME$/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tauri-2.0.2/mobile/android" />
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/buildSrc" />
@@ -27,6 +28,8 @@
<option value="$PROJECT_DIR$/../../../../../plugins/clipboard-manager/android" />
<option value="$PROJECT_DIR$/../../../../../plugins/dialog/android" />
<option value="$PROJECT_DIR$/../../../../../plugins/fs/android" />
<option value="$PROJECT_DIR$/../../../../../plugins/geolocation/android" />
<option value="$PROJECT_DIR$/../../../../../plugins/haptics/android" />
<option value="$PROJECT_DIR$/../../../../../plugins/nfc/android" />
<option value="$PROJECT_DIR$/../../../../../plugins/notification/android" />
<option value="$PROJECT_DIR$/../../../../../plugins/shell/android" />
+2 -1
View File
@@ -67,7 +67,8 @@ pub fn run() {
.user_agent(&format!("Tauri API - {}", std::env::consts::OS))
.title("Tauri API Validation")
.inner_size(1000., 800.)
.min_inner_size(600., 400.);
.min_inner_size(600., 400.)
.visible(false);
}
#[cfg(target_os = "windows")]
+60 -18
View File
@@ -1,5 +1,5 @@
<script>
import { Store } from "@tauri-apps/plugin-store";
import { LazyStore } from "@tauri-apps/plugin-store";
import { onMount } from "svelte";
export let onMessage;
@@ -7,28 +7,65 @@
let key;
let value;
const store = new Store("cache.json");
let store = new LazyStore("cache.json");
let cache = {};
onMount(async () => {
await store.load();
const values = await store.entries();
for (const [key, value] of values) {
cache[key] = value;
async function refreshEntries() {
try {
const values = await store.entries();
cache = {};
for (const [key, value] of values) {
cache[key] = value;
}
} catch (error) {
onMessage(error);
}
cache = cache;
}
onMount(async () => {
await refreshEntries();
});
function write(key, value) {
store
.set(key, value)
.then(() => store.get(key))
.then((v) => {
cache[key] = v;
async function write(key, value) {
try {
if (value) {
await store.set(key, value);
} else {
await store.delete(key);
}
const v = await store.get(key);
if (v === undefined) {
delete cache[key];
cache = cache;
})
.then(() => store.save())
.catch(onMessage);
} else {
cache[key] = v;
}
} catch (error) {
onMessage(error);
}
}
async function reset() {
try {
await store.reset();
} catch (error) {
onMessage(error);
}
await refreshEntries();
}
async function close() {
try {
await store.close();
onMessage("Store is now closed, any new operations will error out");
} catch (error) {
onMessage(error);
}
}
function reopen() {
store = new LazyStore("cache.json");
onMessage("We made a new `LazyStore` instance, operations will now work");
}
</script>
@@ -44,7 +81,12 @@
<input class="grow input" bind:value />
</div>
<button class="btn" on:click={() => write(key, value)}> Write </button>
<div>
<button class="btn" on:click={() => write(key, value)}>Write</button>
<button class="btn" on:click={() => reset()}>Reset</button>
<button class="btn" on:click={() => close()}>Close</button>
<button class="btn" on:click={() => reopen()}>Re-open</button>
</div>
</div>
<div>
+4 -4
View File
@@ -10,20 +10,20 @@
"format:check": "prettier --check ."
},
"devDependencies": {
"@eslint/js": "9.11.1",
"@eslint/js": "9.13.0",
"@rollup/plugin-node-resolve": "15.3.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.11.1",
"eslint": "9.13.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-security": "3.0.1",
"prettier": "3.3.3",
"rollup": "4.22.4",
"tslib": "2.7.0",
"typescript": "5.6.2",
"typescript-eslint": "8.7.0"
"typescript": "5.6.3",
"typescript-eslint": "8.10.0"
},
"resolutions": {
"semver": ">=7.5.2",
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-autostart"
version = "2.0.0"
version = "2.0.1"
description = "Automatically launch your application at startup."
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Automatically launch your application at startup.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-barcode-scanner"
version = "2.0.0"
version = "2.0.1"
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -1,4 +1,4 @@
![Barcode Scanner](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/scanner/banner.png)
![Barcode Scanner](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/barcode-scanner/banner.png)
Allows your mobile application to use the camera to scan QR codes, EAN-13 and other kinds of barcodes.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-biometric"
version = "2.0.0"
version = "2.0.1"
description = "Prompt the user for biometric authentication on Android and iOS."
edition = { workspace = true }
authors = { workspace = true }
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-cli"
version = "2.0.0"
version = "2.0.1"
description = "Parse arguments from your Tauri application's command line interface."
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Parse arguments from your Command Line Interface.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-clipboard-manager"
version = "2.0.0"
version = "2.0.1"
description = "Read and write to the system clipboard."
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Read and write to the system clipboard.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-deep-link"
version = "2.0.0"
version = "2.0.1"
description = "Set your Tauri application as the default handler for an URL"
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Set your Tauri application as the default handler for an URL.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+2 -2
View File
@@ -10,11 +10,11 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "2.0.0",
"@tauri-apps/api": "2.0.2",
"@tauri-apps/plugin-deep-link": "2.0.0"
},
"devDependencies": {
"@tauri-apps/cli": "2.0.0",
"@tauri-apps/cli": "2.0.3",
"typescript": "^5.2.2",
"vite": "^5.4.7"
}
@@ -6,7 +6,7 @@ authors = ["you"]
license = ""
repository = ""
edition = "2021"
rust-version = "1.78"
rust-version = "1.77.2"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+21
View File
@@ -1,5 +1,24 @@
# Changelog
## \[2.0.3]
### Dependencies
- Upgraded to `fs@2.0.3`
## \[2.0.1]
- [`2302c2db`](https://github.com/tauri-apps/plugins-workspace/commit/2302c2db1c49673e61dcbda8cdb01b2c57e9ba6f) ([#1910](https://github.com/tauri-apps/plugins-workspace/pull/1910) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix `ask` and `confirm` not using system button texts
- [`aee14ed4`](https://github.com/tauri-apps/plugins-workspace/commit/aee14ed4261cdedc4ed7cc2686f01f437859a5c7) ([#1892](https://github.com/tauri-apps/plugins-workspace/pull/1892) by [@nashaofu](https://github.com/tauri-apps/plugins-workspace/../../nashaofu)) Set `save` dialog mime type from the `filters` extensions on Android.
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
### Dependencies
- Upgraded to `fs@2.0.1`
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
@@ -280,3 +299,5 @@
pull/371)) First v2 alpha release!
lpha release!
pull/371)) First v2 alpha release!
lease!
pull/371)) First v2 alpha release!
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-dialog"
version = "2.0.0"
version = "2.0.3"
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
@@ -34,7 +34,7 @@ tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }
tauri-plugin-fs = { path = "../fs", version = "2.0.0" }
tauri-plugin-fs = { path = "../fs", version = "2.0.3" }
[target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] }
+1 -1
View File
@@ -12,7 +12,7 @@ Native system dialogs for opening and saving files along with message dialogs.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
@@ -10,6 +10,7 @@ import android.content.Intent
import android.net.Uri
import android.os.Handler
import android.os.Looper
import android.webkit.MimeTypeMap
import androidx.activity.result.ActivityResult
import app.tauri.Logger
import app.tauri.annotation.ActivityCallback
@@ -43,6 +44,7 @@ class MessageOptions {
@InvokeArg
class SaveFileDialogOptions {
var fileName: String? = null
lateinit var filters: Array<Filter>
}
@TauriPlugin
@@ -57,20 +59,7 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
val intent = if (parsedTypes.isNotEmpty()) {
val intent = Intent(Intent.ACTION_PICK)
intent.putExtra(Intent.EXTRA_MIME_TYPES, parsedTypes)
var uniqueMimeType = true
var mimeKind: String? = null
for (mime in parsedTypes) {
val kind = mime.split("/")[0]
if (mimeKind == null) {
mimeKind = kind
} else if (mimeKind != kind) {
uniqueMimeType = false
}
}
intent.type = if (uniqueMimeType) Intent.normalizeMimeType("$mimeKind/*") else "*/*"
setIntentMimeTypes(intent, parsedTypes)
intent
} else {
val intent = Intent(Intent.ACTION_GET_CONTENT)
@@ -130,12 +119,46 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
private fun parseFiltersOption(filters: Array<Filter>): Array<String> {
val mimeTypes = mutableListOf<String>()
for (filter in filters) {
for (mime in filter.extensions) {
mimeTypes.add(if (mime == "text/csv") "text/comma-separated-values" else mime)
for (ext in filter.extensions) {
if (ext.contains('/')) {
mimeTypes.add(if (ext == "text/csv") "text/comma-separated-values" else ext)
} else {
MimeTypeMap.getSingleton().getMimeTypeFromExtension(ext)?.let {
mimeTypes.add(it)
}
}
}
}
return mimeTypes.toTypedArray()
}
private fun setIntentMimeTypes(intent: Intent, mimeTypes: Array<String>) {
if (mimeTypes.isNotEmpty()) {
var uniqueMimeKind = true
var mimeKind: String? = null
for (mime in mimeTypes) {
val kind = mime.split("/")[0]
if (mimeKind == null) {
mimeKind = kind
} else if (mimeKind != kind) {
uniqueMimeKind = false
}
}
if (uniqueMimeKind) {
if (mimeTypes.size > 1) {
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes)
intent.type = Intent.normalizeMimeType("$mimeKind/*")
} else {
intent.type = mimeTypes[0]
}
} else {
intent.type = "*/*"
}
} else {
intent.type = "*/*"
}
}
@Command
fun showMessageDialog(invoke: Invoke) {
@@ -187,10 +210,12 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
fun saveFileDialog(invoke: Invoke) {
try {
val args = invoke.parseArgs(SaveFileDialogOptions::class.java)
val parsedTypes = parseFiltersOption(args.filters)
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT)
setIntentMimeTypes(intent, parsedTypes)
intent.addCategory(Intent.CATEGORY_OPENABLE)
intent.setType("text/plain")
intent.putExtra(Intent.EXTRA_TITLE, args.fileName ?: "")
startActivityForResult(invoke, intent, "saveFileDialogResult")
} catch (ex: Exception) {
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_DIALOG__=function(t){"use strict";async function n(t,n={},e){return window.__TAURI_INTERNALS__.invoke(t,n,e)}return"function"==typeof SuppressedError&&SuppressedError,t.ask=async function(t,e){const i="string"==typeof e?{title:e}:e;return await n("plugin:dialog|ask",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()??"Yes",cancelButtonLabel:i?.cancelLabel?.toString()??"No"})},t.confirm=async function(t,e){const i="string"==typeof e?{title:e}:e;return await n("plugin:dialog|confirm",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()??"Ok",cancelButtonLabel:i?.cancelLabel?.toString()??"Cancel"})},t.message=async function(t,e){const i="string"==typeof e?{title:e}:e;await n("plugin:dialog|message",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()})},t.open=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|open",{options:t})},t.save=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|save",{options:t})},t}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_PLUGIN_DIALOG__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_DIALOG__=function(t){"use strict";async function n(t,n={},e){return window.__TAURI_INTERNALS__.invoke(t,n,e)}return"function"==typeof SuppressedError&&SuppressedError,t.ask=async function(t,e){const i="string"==typeof e?{title:e}:e;return await n("plugin:dialog|ask",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,yesButtonLabel:i?.okLabel?.toString(),noButtonLabel:i?.cancelLabel?.toString()})},t.confirm=async function(t,e){const i="string"==typeof e?{title:e}:e;return await n("plugin:dialog|confirm",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString(),cancelButtonLabel:i?.cancelLabel?.toString()})},t.message=async function(t,e){const i="string"==typeof e?{title:e}:e;await n("plugin:dialog|message",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()})},t.open=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|open",{options:t})},t.save=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|save",{options:t})},t}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_PLUGIN_DIALOG__})}
+4 -4
View File
@@ -257,8 +257,8 @@ async function ask(
message: message.toString(),
title: opts?.title?.toString(),
kind: opts?.kind,
okButtonLabel: opts?.okLabel?.toString() ?? 'Yes',
cancelButtonLabel: opts?.cancelLabel?.toString() ?? 'No'
yesButtonLabel: opts?.okLabel?.toString(),
noButtonLabel: opts?.cancelLabel?.toString()
})
}
@@ -287,8 +287,8 @@ async function confirm(
message: message.toString(),
title: opts?.title?.toString(),
kind: opts?.kind,
okButtonLabel: opts?.okLabel?.toString() ?? 'Ok',
cancelButtonLabel: opts?.cancelLabel?.toString() ?? 'Cancel'
okButtonLabel: opts?.okLabel?.toString(),
cancelButtonLabel: opts?.cancelLabel?.toString()
})
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-dialog",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
+23 -21
View File
@@ -10,7 +10,7 @@ use tauri_plugin_fs::FsExt;
use crate::{
Dialog, FileDialogBuilder, FilePath, MessageDialogButtons, MessageDialogKind, Result, CANCEL,
OK,
NO, OK, YES,
};
#[derive(Serialize)]
@@ -299,8 +299,8 @@ pub(crate) async fn ask<R: Runtime>(
title: Option<String>,
message: String,
kind: Option<MessageDialogKind>,
ok_button_label: Option<String>,
cancel_button_label: Option<String>,
yes_button_label: Option<String>,
no_button_label: Option<String>,
) -> Result<bool> {
Ok(message_dialog(
window,
@@ -308,7 +308,16 @@ pub(crate) async fn ask<R: Runtime>(
title,
message,
kind,
get_ok_cancel_type(ok_button_label, cancel_button_label),
if let Some(yes_button_label) = yes_button_label {
MessageDialogButtons::OkCancelCustom(
yes_button_label,
no_button_label.unwrap_or(NO.to_string()),
)
} else if let Some(no_button_label) = no_button_label {
MessageDialogButtons::OkCancelCustom(YES.to_string(), no_button_label)
} else {
MessageDialogButtons::YesNo
},
))
}
@@ -328,22 +337,15 @@ pub(crate) async fn confirm<R: Runtime>(
title,
message,
kind,
get_ok_cancel_type(ok_button_label, cancel_button_label),
if let Some(ok_button_label) = ok_button_label {
MessageDialogButtons::OkCancelCustom(
ok_button_label,
cancel_button_label.unwrap_or(CANCEL.to_string()),
)
} else if let Some(cancel_button_label) = cancel_button_label {
MessageDialogButtons::OkCancelCustom(OK.to_string(), cancel_button_label)
} else {
MessageDialogButtons::OkCancel
},
))
}
fn get_ok_cancel_type(
ok_button_label: Option<String>,
cancel_button_label: Option<String>,
) -> MessageDialogButtons {
if let Some(ok_button_label) = ok_button_label {
MessageDialogButtons::OkCancelCustom(
ok_button_label,
cancel_button_label.unwrap_or(CANCEL.to_string()),
)
} else if let Some(cancel_button_label) = cancel_button_label {
MessageDialogButtons::OkCancelCustom(OK.to_string(), cancel_button_label)
} else {
MessageDialogButtons::OkCancel
}
}
+1
View File
@@ -112,6 +112,7 @@ impl From<MessageDialogButtons> for rfd::MessageButtons {
match value {
MessageDialogButtons::Ok => Self::Ok,
MessageDialogButtons::OkCancel => Self::OkCancel,
MessageDialogButtons::YesNo => Self::YesNo,
MessageDialogButtons::OkCustom(ok) => Self::OkCustom(ok),
MessageDialogButtons::OkCancelCustom(ok, cancel) => Self::OkCancelCustom(ok, cancel),
}
+3
View File
@@ -43,6 +43,8 @@ use mobile::*;
pub(crate) const OK: &str = "Ok";
pub(crate) const CANCEL: &str = "Cancel";
pub(crate) const YES: &str = "Yes";
pub(crate) const NO: &str = "No";
macro_rules! blocking_fn {
($self:ident, $fn:ident) => {{
@@ -236,6 +238,7 @@ impl<R: Runtime> MessageDialogBuilder<R> {
let (ok_button_label, cancel_button_label) = match &self.buttons {
MessageDialogButtons::Ok => (Some(OK), None),
MessageDialogButtons::OkCancel => (Some(OK), Some(CANCEL)),
MessageDialogButtons::YesNo => (Some(YES), Some(NO)),
MessageDialogButtons::OkCustom(ok) => (Some(ok.as_str()), Some(CANCEL)),
MessageDialogButtons::OkCancelCustom(ok, cancel) => {
(Some(ok.as_str()), Some(cancel.as_str()))
+2
View File
@@ -59,6 +59,8 @@ pub enum MessageDialogButtons {
Ok,
/// 2 buttons `Ok` and `Cancel` with OS default dialog texts
OkCancel,
/// 2 buttons `Yes` and `No` with OS default dialog texts
YesNo,
/// A single `Ok` button with custom text
OkCustom(String),
/// 2 buttons `Ok` and `Cancel` with custom texts
+12
View File
@@ -1,5 +1,17 @@
# Changelog
## \[2.0.3]
- [`14cee64c`](https://github.com/tauri-apps/plugins-workspace/commit/14cee64c82a72655ae6a4ac0892736a2959dbda5) ([#1958](https://github.com/tauri-apps/plugins-workspace/pull/1958) by [@bWanShiTong](https://github.com/tauri-apps/plugins-workspace/../../bWanShiTong)) Fix compilation on targets with pointer width of `16` or `32`
## \[2.0.1]
- [`ae802456`](https://github.com/tauri-apps/plugins-workspace/commit/ae8024565f074f313084777c8b10d1b5e3bbe220) ([#1950](https://github.com/tauri-apps/plugins-workspace/pull/1950) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Improve performance of the `FileHandle.read` and `writeTextFile` APIs.
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-fs"
version = "2.0.0"
version = "2.0.3"
description = "Access the file system."
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Access the file system.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
File diff suppressed because one or more lines are too long
+36 -6
View File
@@ -243,6 +243,25 @@ function parseFileInfo(r: UnparsedFileInfo): FileInfo {
}
}
// https://mstn.github.io/2018/06/08/fixed-size-arrays-in-typescript/
type FixedSizeArray<T, N extends number> = ReadonlyArray<T> & {
length: N
}
// https://gist.github.com/zapthedingbat/38ebfbedd98396624e5b5f2ff462611d
/** Converts a big-endian eight byte array to number */
function fromBytes(buffer: FixedSizeArray<number, 8>): number {
const bytes = new Uint8ClampedArray(buffer)
const size = bytes.byteLength
let x = 0
for (let i = 0; i < size; i++) {
const byte = bytes[i]
x *= 0x100
x += byte
}
return x
}
/**
* The Tauri abstraction for reading and writing files.
*
@@ -285,12 +304,20 @@ class FileHandle extends Resource {
return 0
}
const [data, nread] = await invoke<[number[], number]>('plugin:fs|read', {
const data = await invoke<ArrayBuffer | number[]>('plugin:fs|read', {
rid: this.rid,
len: buffer.byteLength
})
buffer.set(data)
// Rust side will never return an empty array for this command and
// ensure there is at least 8 elements there.
//
// This is an optimization to include the number of read bytes (as bigendian bytes)
// at the end of returned array to avoid serialization overhead of separate values.
const nread = fromBytes(data.slice(-8) as FixedSizeArray<number, 8>)
const bytes = data instanceof ArrayBuffer ? new Uint8Array(data) : data
buffer.set(bytes.slice(0, bytes.length - 8))
return nread === 0 ? null : nread
}
@@ -1041,10 +1068,13 @@ async function writeTextFile(
throw new TypeError('Must be a file URL.')
}
await invoke('plugin:fs|write_text_file', {
path: path instanceof URL ? path.toString() : path,
data,
options
const encoder = new TextEncoder()
await invoke('plugin:fs|write_text_file', encoder.encode(data), {
headers: {
path: path instanceof URL ? path.toString() : path,
options: JSON.stringify(options)
}
})
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-fs",
"version": "2.0.0",
"version": "2.0.1",
"description": "Access the file system.",
"license": "MIT OR Apache-2.0",
"authors": [
+63 -50
View File
@@ -9,7 +9,7 @@ use tauri::{
ipc::{CommandScope, GlobalScope},
path::BaseDirectory,
utils::config::FsScope,
AppHandle, Manager, Resource, ResourceId, Runtime, Webview,
Manager, Resource, ResourceId, Runtime, Webview,
};
use std::{
@@ -301,13 +301,36 @@ pub async fn read_dir<R: Runtime>(
pub async fn read<R: Runtime>(
webview: Webview<R>,
rid: ResourceId,
len: u32,
) -> CommandResult<(Vec<u8>, usize)> {
let mut data = vec![0; len as usize];
len: usize,
) -> CommandResult<tauri::ipc::Response> {
let mut data = vec![0; len];
let file = webview.resources_table().get::<StdFileResource>(rid)?;
let nread = StdFileResource::with_lock(&file, |mut file| file.read(&mut data))
.map_err(|e| format!("faied to read bytes from file with error: {e}"))?;
Ok((data, nread))
// This is an optimization to include the number of read bytes (as bigendian bytes)
// at the end of returned vector so we can use `tauri::ipc::Response`
// and avoid serialization overhead of separate values.
#[cfg(target_pointer_width = "16")]
let nread = {
let nread = nread.to_be_bytes();
let mut out = [0; 8];
out[6..].copy_from_slice(&nread);
out
};
#[cfg(target_pointer_width = "32")]
let nread = {
let nread = nread.to_be_bytes();
let mut out = [0; 8];
out[4..].copy_from_slice(&nread);
out
};
#[cfg(target_pointer_width = "64")]
let nread = nread.to_be_bytes();
data.extend(nread);
Ok(tauri::ipc::Response::new(data))
}
#[tauri::command]
@@ -783,10 +806,34 @@ fn write_file_inner<R: Runtime>(
webview: Webview<R>,
global_scope: &GlobalScope<Entry>,
command_scope: &CommandScope<Entry>,
path: SafeFilePath,
data: &[u8],
options: Option<WriteFileOptions>,
request: tauri::ipc::Request<'_>,
) -> CommandResult<()> {
let data = match request.body() {
tauri::ipc::InvokeBody::Raw(data) => Cow::Borrowed(data),
tauri::ipc::InvokeBody::Json(serde_json::Value::Array(data)) => Cow::Owned(
data.iter()
.flat_map(|v| v.as_number().and_then(|v| v.as_u64().map(|v| v as u8)))
.collect(),
),
_ => return Err(anyhow::anyhow!("unexpected invoke body").into()),
};
let path = request
.headers()
.get("path")
.ok_or_else(|| anyhow::anyhow!("missing file path").into())
.and_then(|p| {
percent_encoding::percent_decode(p.as_ref())
.decode_utf8()
.map_err(|_| anyhow::anyhow!("path is not a valid UTF-8").into())
})
.and_then(|p| SafeFilePath::from_str(&p).map_err(CommandError::from))?;
let options: Option<WriteFileOptions> = request
.headers()
.get("options")
.and_then(|p| p.to_str().ok())
.and_then(|opts| serde_json::from_str(opts).ok());
let (mut file, path) = resolve_file(
&webview,
global_scope,
@@ -823,7 +870,7 @@ fn write_file_inner<R: Runtime>(
},
)?;
file.write_all(data)
file.write_all(&data)
.map_err(|e| {
format!(
"failed to write bytes to file at path: {} with error: {e}",
@@ -840,52 +887,18 @@ pub async fn write_file<R: Runtime>(
command_scope: CommandScope<Entry>,
request: tauri::ipc::Request<'_>,
) -> CommandResult<()> {
let data = match request.body() {
tauri::ipc::InvokeBody::Raw(data) => Cow::Borrowed(data),
tauri::ipc::InvokeBody::Json(serde_json::Value::Array(data)) => Cow::Owned(
data.iter()
.flat_map(|v| v.as_number().and_then(|v| v.as_u64().map(|v| v as u8)))
.collect(),
),
_ => return Err(anyhow::anyhow!("unexpected invoke body").into()),
};
let path = request
.headers()
.get("path")
.ok_or_else(|| anyhow::anyhow!("missing file path").into())
.and_then(|p| {
percent_encoding::percent_decode(p.as_ref())
.decode_utf8()
.map_err(|_| anyhow::anyhow!("path is not a valid UTF-8").into())
})
.and_then(|p| SafeFilePath::from_str(&p).map_err(CommandError::from))?;
let options = request
.headers()
.get("options")
.and_then(|p| p.to_str().ok())
.and_then(|opts| serde_json::from_str(opts).ok());
write_file_inner(webview, &global_scope, &command_scope, path, &data, options)
write_file_inner(webview, &global_scope, &command_scope, request)
}
// TODO, in v3, remove this command and rely on `write_file` command only
#[tauri::command]
pub async fn write_text_file<R: Runtime>(
#[allow(unused)] app: AppHandle<R>,
#[allow(unused)] webview: Webview<R>,
#[allow(unused)] global_scope: GlobalScope<Entry>,
#[allow(unused)] command_scope: CommandScope<Entry>,
path: SafeFilePath,
data: String,
#[allow(unused)] options: Option<WriteFileOptions>,
webview: Webview<R>,
global_scope: GlobalScope<Entry>,
command_scope: CommandScope<Entry>,
request: tauri::ipc::Request<'_>,
) -> CommandResult<()> {
write_file_inner(
webview,
&global_scope,
&command_scope,
path,
data.as_bytes(),
options,
)
write_file_inner(webview, &global_scope, &command_scope, request)
}
#[tauri::command]
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "tauri-plugin-geolocation"
description = "Get and track the device's current position"
version = "2.0.0"
version = "2.0.1"
edition = { workspace = true }
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ This plugin provides APIs for getting and tracking the device's current position
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-global-shortcut"
version = "2.0.0"
version = "2.0.1"
description = "Register global hotkeys listeners on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Register global shortcuts.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "tauri-plugin-haptics"
description = "Haptic feedback and vibrations on Android and iOS"
version = "2.0.0"
version = "2.0.1"
edition = { workspace = true }
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -14,7 +14,7 @@ There are no standards/requirements for vibration support on Android, so the `fe
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+22
View File
@@ -1,5 +1,24 @@
# Changelog
## \[2.0.3]
### Dependencies
- Upgraded to `fs@2.0.3`
## \[2.0.1]
- [`cfd48b3b`](https://github.com/tauri-apps/plugins-workspace/commit/cfd48b3b2ec0fccfc162197518694ed59ceda22c) ([#1941](https://github.com/tauri-apps/plugins-workspace/pull/1941) by [@Nipsuli](https://github.com/tauri-apps/plugins-workspace/../../Nipsuli)) Allow skipping sending `Origin` header in HTTP requests by setting `Origin` header to an empty string when calling `fetch`.
- [`9b2840db`](https://github.com/tauri-apps/plugins-workspace/commit/9b2840db9464cf08db75806270e4441f0af81e5d) ([#1884](https://github.com/tauri-apps/plugins-workspace/pull/1884) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) Retain headers order.
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
### Dependencies
- Upgraded to `fs@2.0.1`
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
@@ -278,3 +297,6 @@
ha release!
!
371\)) First v2 alpha release!
lease!
!
371\)) First v2 alpha release!
+4 -4
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-http"
version = "2.0.0"
version = "2.0.3"
description = "Access an HTTP client written in Rust."
edition = { workspace = true }
authors = { workspace = true }
@@ -17,8 +17,8 @@ rustdoc-args = ["--cfg", "docsrs"]
windows = { level = "full", notes = "" }
linux = { level = "full", notes = "" }
macos = { level = "full", notes = "" }
android = { level = "none", notes = "" }
ios = { level = "none", notes = "" }
android = { level = "full", notes = "" }
ios = { level = "full", notes = "" }
[build-dependencies]
tauri-plugin = { workspace = true, features = ["build"] }
@@ -34,7 +34,7 @@ serde_json = { workspace = true }
tauri = { workspace = true }
thiserror = { workspace = true }
tokio = { version = "1", features = ["sync", "macros"] }
tauri-plugin-fs = { path = "../fs", version = "2.0.0" }
tauri-plugin-fs = { path = "../fs", version = "2.0.3" }
urlpattern = "0.3"
regex = "1"
http = "1"
+1 -1
View File
@@ -12,7 +12,7 @@ Access the HTTP client written in Rust.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-http",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
+35 -24
View File
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use std::{collections::HashMap, future::Future, pin::Pin, sync::Arc, time::Duration};
use std::{future::Future, pin::Pin, str::FromStr, sync::Arc, time::Duration};
use http::{header, HeaderName, Method, StatusCode};
use http::{header, HeaderMap, HeaderName, HeaderValue, Method, StatusCode};
use reqwest::{redirect::Policy, NoProxy};
use serde::{Deserialize, Serialize};
use tauri::{
@@ -176,7 +176,7 @@ pub async fn fetch<R: Runtime>(
let ClientConfig {
method,
url,
headers,
headers: headers_raw,
data,
connect_timeout,
max_redirections,
@@ -185,7 +185,17 @@ pub async fn fetch<R: Runtime>(
let scheme = url.scheme();
let method = Method::from_bytes(method.as_bytes())?;
let headers: HashMap<String, String> = HashMap::from_iter(headers);
let mut headers = HeaderMap::new();
for (h, v) in headers_raw {
let name = HeaderName::from_str(&h)?;
#[cfg(not(feature = "unsafe-headers"))]
if is_unsafe_header(&name) {
continue;
}
headers.append(name, HeaderValue::from_str(&v)?);
}
match scheme {
"http" | "https" => {
@@ -228,45 +238,46 @@ pub async fn fetch<R: Runtime>(
let mut request = builder.build()?.request(method.clone(), url);
for (name, value) in &headers {
let name = HeaderName::from_bytes(name.as_bytes())?;
#[cfg(not(feature = "unsafe-headers"))]
if is_unsafe_header(&name) {
continue;
}
request = request.header(name, value);
}
// POST and PUT requests should always have a 0 length content-length,
// if there is no body. https://fetch.spec.whatwg.org/#http-network-or-cache-fetch
if data.is_none() && matches!(method, Method::POST | Method::PUT) {
request = request.header(header::CONTENT_LENGTH, 0);
headers.append(header::CONTENT_LENGTH, HeaderValue::from_str("0")?);
}
if headers.contains_key(header::RANGE.as_str()) {
if headers.contains_key(header::RANGE) {
// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch step 18
// If httpRequests header list contains `Range`, then append (`Accept-Encoding`, `identity`)
request = request.header(header::ACCEPT_ENCODING, "identity");
headers.append(header::ACCEPT_ENCODING, HeaderValue::from_str("identity")?);
}
if !headers.contains_key(header::USER_AGENT.as_str()) {
request = request.header(header::USER_AGENT, HTTP_USER_AGENT);
if !headers.contains_key(header::USER_AGENT) {
headers.append(header::USER_AGENT, HeaderValue::from_str(HTTP_USER_AGENT)?);
}
if cfg!(feature = "unsafe-headers")
&& !headers.contains_key(header::ORIGIN.as_str())
{
// ensure we have an Origin header set
if cfg!(not(feature = "unsafe-headers")) || !headers.contains_key(header::ORIGIN) {
if let Ok(url) = webview.url() {
request =
request.header(header::ORIGIN, url.origin().ascii_serialization());
headers.append(
header::ORIGIN,
HeaderValue::from_str(&url.origin().ascii_serialization())?,
);
}
}
// In case empty origin is passed, remove it. Some services do not like Origin header
// so this way we can remove it in explicit way. The default behaviour is still to set it
if cfg!(feature = "unsafe-headers")
&& headers.get(header::ORIGIN) == Some(&HeaderValue::from_static(""))
{
headers.remove(header::ORIGIN);
};
if let Some(data) = data {
request = request.body(data);
}
request = request.headers(headers);
let fut = async move { request.send().await.map_err(Into::into) };
let mut resources_table = webview.resources_table();
let rid = resources_table.add_request(Box::pin(fut));
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-localhost"
version = "2.0.0"
version = "2.0.1"
description = "Expose your apps assets through a localhost server instead of the default custom protocol."
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -14,7 +14,7 @@ Expose your apps assets through a localhost server instead of the default custom
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-log"
version = "2.0.0"
version = "2.0.1"
description = "Configurable logging for your Tauri app."
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Configurable logging for your Tauri app.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-nfc"
version = "2.0.0"
version = "2.0.1"
description = "Read and write NFC tags on Android and iOS."
edition = { workspace = true }
authors = { workspace = true }
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-notification"
version = "2.0.0"
version = "2.0.1"
description = "Send desktop and mobile notifications on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Send message notifications (brief auto-expiring OS window element) to your user.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-os"
version = "2.0.0"
version = "2.0.1"
description = "Read information about the operating system."
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Read information about the operating system.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+20
View File
@@ -1,5 +1,25 @@
# Changelog
## \[2.0.3]
### Dependencies
- Upgraded to `fs@2.0.3`
## \[2.0.2]
### Dependencies
- Upgraded to `fs@2.0.2`
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
### Dependencies
- Upgraded to `fs@2.0.1`
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-persisted-scope"
version = "2.0.0"
version = "2.0.3"
description = "Save filesystem and asset scopes and restore them when the app is reopened."
authors = { workspace = true }
license = { workspace = true }
@@ -27,7 +27,7 @@ log = { workspace = true }
thiserror = { workspace = true }
aho-corasick = "1"
bincode = "1"
tauri-plugin-fs = { path = "../fs", version = "2.0.0" }
tauri-plugin-fs = { path = "../fs", version = "2.0.3" }
[features]
protocol-asset = ["tauri/protocol-asset"]
+1 -1
View File
@@ -12,7 +12,7 @@ Save filesystem and asset scopes and restore them when the app is reopened.
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## \[2.0.1]
- [`3c1f3874`](https://github.com/tauri-apps/plugins-workspace/commit/3c1f3874f4c828637b3aa983cba13c77427faf58) ([#1911](https://github.com/tauri-apps/plugins-workspace/pull/1911) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Added missing permission for `handleIconState` and fixed its event processing logic.
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-positioner"
version = "2.0.0"
version = "2.0.2"
description = "Position your windows at well-known locations."
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -14,7 +14,7 @@ This plugin is a port of [electron-positioner](https://github.com/jenslind/elect
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_POSITIONER__=function(t){"use strict";async function e(t,e={},o){return window.__TAURI_INTERNALS__.invoke(t,e,o)}var o;return"function"==typeof SuppressedError&&SuppressedError,t.Position=void 0,(o=t.Position||(t.Position={}))[o.TopLeft=0]="TopLeft",o[o.TopRight=1]="TopRight",o[o.BottomLeft=2]="BottomLeft",o[o.BottomRight=3]="BottomRight",o[o.TopCenter=4]="TopCenter",o[o.BottomCenter=5]="BottomCenter",o[o.LeftCenter=6]="LeftCenter",o[o.RightCenter=7]="RightCenter",o[o.Center=8]="Center",o[o.TrayLeft=9]="TrayLeft",o[o.TrayBottomLeft=10]="TrayBottomLeft",o[o.TrayRight=11]="TrayRight",o[o.TrayBottomRight=12]="TrayBottomRight",o[o.TrayCenter=13]="TrayCenter",o[o.TrayBottomCenter=14]="TrayBottomCenter",t.handleIconState=async function(t){const o={};o[`${t.rect.size.type}`]={width:t.rect.size.width,height:t.rect.size.height};const i={};i[`${t.rect.position.type}`]={x:t.rect.position.x,y:t.rect.position.y},await e("plugin:positioner|set_tray_icon_state",{position:i,size:o})},t.moveWindow=async function(t){await e("plugin:positioner|move_window",{position:t})},t}({});Object.defineProperty(window.__TAURI__,"positioner",{value:__TAURI_PLUGIN_POSITIONER__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_POSITIONER__=function(t){"use strict";async function o(t,o={},e){return window.__TAURI_INTERNALS__.invoke(t,o,e)}var e;return"function"==typeof SuppressedError&&SuppressedError,t.Position=void 0,(e=t.Position||(t.Position={}))[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e[e.TopCenter=4]="TopCenter",e[e.BottomCenter=5]="BottomCenter",e[e.LeftCenter=6]="LeftCenter",e[e.RightCenter=7]="RightCenter",e[e.Center=8]="Center",e[e.TrayLeft=9]="TrayLeft",e[e.TrayBottomLeft=10]="TrayBottomLeft",e[e.TrayRight=11]="TrayRight",e[e.TrayBottomRight=12]="TrayBottomRight",e[e.TrayCenter=13]="TrayCenter",e[e.TrayBottomCenter=14]="TrayBottomCenter",t.handleIconState=async function(t){await o("plugin:positioner|set_tray_icon_state",{position:t.rect.position,size:t.rect.size})},t.moveWindow=async function(t){await o("plugin:positioner|move_window",{position:t})},t}({});Object.defineProperty(window.__TAURI__,"positioner",{value:__TAURI_PLUGIN_POSITIONER__})}
+1 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
const COMMANDS: &[&str] = &["move_window"];
const COMMANDS: &[&str] = &["move_window", "set_tray_icon_state"];
fn main() {
tauri_plugin::Builder::new(COMMANDS)
+2 -14
View File
@@ -40,20 +40,8 @@ export async function moveWindow(to: Position): Promise<void> {
}
export async function handleIconState(event: TrayIconEvent): Promise<void> {
const size = {} as Record<string, unknown>
size[`${event.rect.size.type}`] = {
width: event.rect.size.width,
height: event.rect.size.height
}
const position = {} as Record<string, unknown>
position[`${event.rect.position.type}`] = {
x: event.rect.position.x,
y: event.rect.position.y
}
await invoke('plugin:positioner|set_tray_icon_state', {
position,
size
position: event.rect.position,
size: event.rect.size
})
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-positioner",
"version": "2.0.0",
"version": "2.0.1",
"description": "Position your windows at well-known locations.",
"license": "MIT OR Apache-2.0",
"authors": [
@@ -4,5 +4,10 @@
[[permission]]
identifier = "allow-set-tray-icon-state"
description = "Enables the set_tray_icon_state to handle events and set the TrayIcon state."
description = "Enables the set_tray_icon_state command without any pre-configured scope."
commands.allow = ["set_tray_icon_state"]
[[permission]]
identifier = "deny-set-tray-icon-state"
description = "Denies the set_tray_icon_state command without any pre-configured scope."
commands.deny = ["set_tray_icon_state"]
@@ -1,6 +1,6 @@
## Default Permission
Allows the move_window command
Allows the moveWindow and handleIconState APIs
- `allow-move-window`
- `set-tray-icon-state`
@@ -48,7 +48,20 @@ Denies the move_window command without any pre-configured scope.
</td>
<td>
Enables the set_tray_icon_state to handle events and set the TrayIcon state.
Enables the set_tray_icon_state command without any pre-configured scope.
</td>
</tr>
<tr>
<td>
`positioner:deny-set-tray-icon-state`
</td>
<td>
Denies the set_tray_icon_state command without any pre-configured scope.
</td>
</tr>
+1 -1
View File
@@ -1,4 +1,4 @@
"$schema" = "schemas/schema.json"
[default]
description = "Allows the move_window command"
description = "Allows the moveWindow and handleIconState APIs"
permissions = ["allow-move-window", "set-tray-icon-state"]
@@ -305,12 +305,17 @@
"const": "deny-move-window"
},
{
"description": "Enables the set_tray_icon_state to handle events and set the TrayIcon state.",
"description": "Enables the set_tray_icon_state command without any pre-configured scope.",
"type": "string",
"const": "allow-set-tray-icon-state"
},
{
"description": "Allows the move_window command",
"description": "Denies the set_tray_icon_state command without any pre-configured scope.",
"type": "string",
"const": "deny-set-tray-icon-state"
},
{
"description": "Allows the moveWindow and handleIconState APIs",
"type": "string",
"const": "default"
}
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-process"
version = "2.0.0"
version = "2.0.1"
description = "Access the current process of your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ This plugin provides APIs to access the current process. To spawn child processe
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## \[2.0.1]
- [`51ddf6a7`](https://github.com/tauri-apps/plugins-workspace/commit/51ddf6a71544acfb261ffc9393dab1342da0a219) ([#1881](https://github.com/tauri-apps/plugins-workspace/pull/1881) by [@amrbashir](https://github.com/tauri-apps/plugins-workspace/../../amrbashir)) On Windows, Fix `open` JS API hanging and freezing the app.
## \[2.0.1]
- [`a1a82208`](https://github.com/tauri-apps/plugins-workspace/commit/a1a82208ed4ab87f83310be0dc95428aec9ab241) ([#1873](https://github.com/tauri-apps/plugins-workspace/pull/1873) by [@lucasfernog](https://github.com/tauri-apps/plugins-workspace/../../lucasfernog)) Downgrade MSRV to 1.77.2 to support Windows 7.
## \[2.0.0]
- [`e2c4dfb6`](https://github.com/tauri-apps/plugins-workspace/commit/e2c4dfb6af43e5dd8d9ceba232c315f5febd55c1) Update to tauri v2 stable release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-shell"
version = "2.0.0"
version = "2.0.2"
description = "Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application."
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -12,7 +12,7 @@ Access the system shell. Allows you to spawn child processes and manage files an
## Install
_This plugin requires a Rust version of at least **1.78**_
_This plugin requires a Rust version of at least **1.77.2**_
There are three general methods of installation that we can recommend.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-shell",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"

Some files were not shown because too many files have changed in this diff Show More