Compare commits

...

16 Commits

Author SHA1 Message Date
github-actions[bot] 5c7668b6bb publish new versions (#3397)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-02 19:37:51 +08:00
renovate[bot] ec0540138b chore(deps): update rust crate toml to v1 (#3323)
* chore(deps): update rust crate toml to v1

* downgrade to 1.0.x in lockfile

* Add change file

* Downgrade indexmap

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2026-05-01 18:09:41 +08:00
Tony b86e999beb chore(deps): update tauri packages to 2.11 (#3407)
* chore(deps): update tauri packages to 2.11

* Downgrade derive_more

* Fix audit

* Update tauri-plugin
2026-05-01 16:39:43 +08:00
Fabian-Lars c463d8ab14 chore(deps): update rustls-webpki in lockfile, ignore core2 in audit (#3405) 2026-04-23 17:48:22 +02:00
dependabot[bot] 1bb7beb307 chore(deps): bump openssl (#3402)
Bumps [openssl](https://github.com/rust-openssl/rust-openssl) from 0.10.72 to 0.10.78.
- [Release notes](https://github.com/rust-openssl/rust-openssl/releases)
- [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-v0.10.72...openssl-v0.10.78)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.78
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-23 11:52:55 +08:00
Fabian-Lars 3412fa2741 docs(readme): fix platform support matrix (opener supports mobile) 2026-04-22 11:40:46 +02:00
Fabian-Lars af81fdac98 docs(readme): fix platform support matrix (mobile is supported) 2026-04-22 11:39:26 +02:00
Tony c1fd33b3a2 fix(opener): allow open network share locations (#3343)
* fix(opener): allow open network share locations

* Clippy

* Move to a seperate file

* Add license header

* test(opener): add unit tests for shell_parent_path and absolute functions (#1)

* Keep `absolute` non pub in `windows_shell_path`

* Add change file

---------

Co-authored-by: Mark Gandolfo <mark@gandolfo.com.au>
2026-04-18 19:02:09 +08:00
renovate[bot] 250857b7b7 chore(deps): update dependency typescript to v6 (#3363)
* chore(deps): update dependency typescript to v6

* Use 6.0.3

* Fix eslint

* Add `rootDir` since it's no longer inferred
  > https://github.com/microsoft/TypeScript/issues/62508#issuecomment-3348659946

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2026-04-18 18:57:41 +08:00
Tony 964e13f124 fix(store): dead lock trying to set while exiting (#3395)
* fix(store): dead lock trying to set while exiting

* Add change file
2026-04-18 00:45:16 +08:00
Tony e6cdc9f52e fix(deep-link): inverted is app link filter (#3396)
Fix #3392, regression from #3143
2026-04-17 22:15:07 +08:00
renovate[bot] 9228419e13 chore(deps): update dependency eslint to v10.2.0 (#3381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 12:49:27 +02:00
renovate[bot] 04d92139c8 chore(deps): update dependency typescript-eslint to v8.58.1 (#3364)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 10:55:45 +02:00
renovate[bot] 5260fc90b0 chore(deps): update rust crate tokio-tungstenite to 0.29 (#3354)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 10:09:04 +02:00
renovate[bot] ea5c70060b chore(deps): update rust crate rand to v0.9.3 [security] (#3388)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-14 12:12:42 +08:00
renovate[bot] d016a8ab1e chore(deps): update dependency vite to v8.0.5 [security] (#3380)
* chore(deps): update dependency vite to v8.0.5 [security]

* Fix audit
2026-04-07 12:03:37 +08:00
102 changed files with 1288 additions and 939 deletions
+2
View File
@@ -2,4 +2,6 @@
ignore = [
# time crate can't be updated in the repo because of MSRV, users are unaffected
"RUSTSEC-2026-0009",
# libflate crates can't be updated in the repo because of MSRV, users are unaffected
"RUSTSEC-2026-0105",
]
Generated
+348 -443
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -22,7 +22,7 @@ This repo and all plugins require a Rust version of at least **1.77.2**
| [log](plugins/log) | Configurable logging. | ✅ | ✅ | ✅ | ✅ | ✅ |
| [nfc](plugins/nfc) | Read and write NFC tags on Android and iOS. | ? | ? | ? | ✅ | ✅ |
| [notification](plugins/notification) | Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API. | ✅ | ✅ | ✅ | ✅ | ✅ |
| [opener](plugins/opener) | Open files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? |
| [opener](plugins/opener) | Open files and URLs using their default application. | ✅ | ✅ | ✅ | | |
| [os](plugins/os) | Read information about the operating system. | ✅ | ✅ | ✅ | ✅ | ✅ |
| [persisted-scope](plugins/persisted-scope) | Persist runtime scope changes on the filesystem. | ✅ | ✅ | ✅ | ? | ? |
| [positioner](plugins/positioner) | Move windows to common locations. | ✅ | ✅ | ✅ | ❌ | ❌ |
+10
View File
@@ -1,5 +1,15 @@
# Changelog
## \[2.0.39]
### Dependencies
- Upgraded to `fs-js@2.5.1`
- Upgraded to `opener-js@2.5.4`
- Upgraded to `store-js@2.4.3`
- Upgraded to `dialog-js@2.7.1`
- Upgraded to `http-js@2.5.9`
## \[2.0.38]
### Dependencies
+8 -8
View File
@@ -1,7 +1,7 @@
{
"name": "api",
"private": true,
"version": "2.0.38",
"version": "2.0.39",
"type": "module",
"scripts": {
"dev": "vite --clearScreen false",
@@ -10,24 +10,24 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^2.10.1",
"@tauri-apps/api": "^2.11.0",
"@tauri-apps/plugin-barcode-scanner": "^2.4.4",
"@tauri-apps/plugin-biometric": "^2.3.2",
"@tauri-apps/plugin-cli": "^2.4.1",
"@tauri-apps/plugin-clipboard-manager": "^2.3.2",
"@tauri-apps/plugin-dialog": "^2.7.0",
"@tauri-apps/plugin-fs": "^2.5.0",
"@tauri-apps/plugin-dialog": "^2.7.1",
"@tauri-apps/plugin-fs": "^2.5.1",
"@tauri-apps/plugin-geolocation": "^2.3.2",
"@tauri-apps/plugin-global-shortcut": "^2.3.1",
"@tauri-apps/plugin-haptics": "^2.3.2",
"@tauri-apps/plugin-http": "^2.5.8",
"@tauri-apps/plugin-http": "^2.5.9",
"@tauri-apps/plugin-nfc": "^2.3.5",
"@tauri-apps/plugin-notification": "^2.3.3",
"@tauri-apps/plugin-opener": "^2.5.3",
"@tauri-apps/plugin-opener": "^2.5.4",
"@tauri-apps/plugin-os": "^2.3.2",
"@tauri-apps/plugin-process": "^2.3.1",
"@tauri-apps/plugin-shell": "^2.3.5",
"@tauri-apps/plugin-store": "^2.4.2",
"@tauri-apps/plugin-store": "^2.4.3",
"@tauri-apps/plugin-updater": "^2.10.1",
"@tauri-apps/plugin-upload": "^2.4.0",
"@zerodevx/svelte-json-view": "1.0.11"
@@ -36,7 +36,7 @@
"@iconify-json/codicon": "^1.2.49",
"@iconify-json/ph": "^1.2.2",
"@sveltejs/vite-plugin-svelte": "^7.0.0",
"@tauri-apps/cli": "2.10.1",
"@tauri-apps/cli": "2.11.0",
"@unocss/extractor-svelte": "^66.6.7",
"svelte": "^5.54.0",
"unocss": "^66.6.7",
+10
View File
@@ -1,5 +1,15 @@
# Changelog
## \[2.0.43]
### Dependencies
- Upgraded to `fs@2.5.1`
- Upgraded to `opener@2.5.4`
- Upgraded to `store@2.4.3`
- Upgraded to `dialog@2.7.1`
- Upgraded to `http@2.5.9`
## \[2.0.42]
### Dependencies
+6 -6
View File
@@ -1,7 +1,7 @@
[package]
name = "api"
publish = false
version = "2.0.42"
version = "2.0.43"
description = "An example Tauri Application showcasing the api"
edition = "2021"
rust-version = { workspace = true }
@@ -21,23 +21,23 @@ tiny_http = "0.12"
time = "0.3"
log = { workspace = true }
tauri-plugin-log = { path = "../../../plugins/log", version = "2.8.0" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.5.0", features = [
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.5.1", features = [
"watch",
] }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.3.2" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.7.0" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.7.1" }
tauri-plugin-http = { path = "../../../plugins/http", features = [
"multipart",
"cookies",
], version = "2.5.8" }
], version = "2.5.9" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.3.3", features = [
"windows7-compat",
] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.3.2" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.3.1" }
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.3" }
tauri-plugin-opener = { path = "../../../plugins/opener", version = "2.5.4" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.3.5" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.2" }
tauri-plugin-store = { path = "../../../plugins/store", version = "2.4.3" }
tauri-plugin-upload = { path = "../../../plugins/upload", version = "2.3.0" }
[dependencies.tauri]
+3 -3
View File
@@ -15,14 +15,14 @@
"@rollup/plugin-node-resolve": "16.0.3",
"@rollup/plugin-terser": "1.0.0",
"@rollup/plugin-typescript": "12.3.0",
"eslint": "10.1.0",
"eslint": "10.2.0",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-security": "4.0.0",
"prettier": "3.8.1",
"rollup": "4.59.0",
"tslib": "2.8.1",
"typescript": "5.9.3",
"typescript-eslint": "8.57.1"
"typescript": "6.0.3",
"typescript-eslint": "8.58.2"
},
"minimumReleaseAge": 4320,
"pnpm": {
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.4.9]
- [`e6cdc9f5`](https://github.com/tauri-apps/plugins-workspace/commit/e6cdc9f52e2cd975b11b8e4c12879d597f1f76c3) ([#3396](https://github.com/tauri-apps/plugins-workspace/pull/3396) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix broken iOS custom URL schemes
## \[2.4.8]
- [`024ec0c2`](https://github.com/tauri-apps/plugins-workspace/commit/024ec0c29c20cf94579dab9b79d6be0da61a8daa) ([#3214](https://github.com/tauri-apps/plugins-workspace/pull/3214) by [@joshIsCoding](https://github.com/tauri-apps/plugins-workspace/../../joshIsCoding)) Account for differing Android VIEW intent in ChromeOS, fixing deep-link behaviour on Chromium platforms.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-deep-link"
version = "2.4.8"
version = "2.4.9"
description = "Set your Tauri application as the default handler for an URL"
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_DEEP_LINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function i(e,t,i){const _={kind:"Any"};return r("plugin:event|listen",{event:e,target:_,handler:n(t)}).then(n=>async()=>async function(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n))}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(t||(t={})),e.getCurrent=async function(){return await r("plugin:deep-link|get_current")},e.isRegistered=async function(e){return await r("plugin:deep-link|is_registered",{protocol:e})},e.onOpenUrl=async function(e){return await i("deep-link://new-url",n=>{e(n.payload)})},e.register=async function(e){return await r("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await r("plugin:deep-link|unregister",{protocol:e})},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEP_LINK__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_DEEP_LINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var t;async function i(e,t,i){const _={kind:"Any"};return r("plugin:event|listen",{event:e,target:_,handler:n(t)}).then(n=>async()=>async function(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n))}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_SUSPENDED="tauri://suspended",e.WINDOW_RESUMED="tauri://resumed",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(t||(t={})),e.getCurrent=async function(){return await r("plugin:deep-link|get_current")},e.isRegistered=async function(e){return await r("plugin:deep-link|is_registered",{protocol:e})},e.onOpenUrl=async function(e){return await i("deep-link://new-url",n=>{e(n.payload)})},e.register=async function(e){return await r("plugin:deep-link|register",{protocol:e})},e.unregister=async function(e){return await r("plugin:deep-link|unregister",{protocol:e})},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEP_LINK__})}
+1 -1
View File
@@ -139,7 +139,7 @@ fn main() {
let deep_link_domains = config
.mobile
.iter()
.filter(|domain| domain.is_app_link())
.filter(|domain| !domain.is_app_link())
.collect::<Vec<_>>();
if deep_link_domains.is_empty() {
@@ -1,5 +1,11 @@
# Changelog
## \[2.2.12]
### Dependencies
- Upgraded to `deep-link-js@2.4.9`
## \[2.2.11]
### Dependencies
+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "deep-link-example",
"private": true,
"version": "2.2.11",
"version": "2.2.12",
"type": "module",
"scripts": {
"dev": "vite",
@@ -10,12 +10,12 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^2.10.1",
"@tauri-apps/plugin-deep-link": "2.4.8"
"@tauri-apps/api": "^2.11.0",
"@tauri-apps/plugin-deep-link": "2.4.9"
},
"devDependencies": {
"@tauri-apps/cli": "2.10.1",
"typescript": "^5.9.3",
"@tauri-apps/cli": "2.11.0",
"typescript": "^6.0.0",
"vite": "^8.0.1"
}
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-deep-link",
"version": "2.4.8",
"version": "2.4.9",
"description": "Set your Tauri application as the default handler for an URL",
"license": "MIT OR Apache-2.0",
"authors": [
@@ -25,9 +25,9 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
},
"devDependencies": {
"@tauri-apps/cli": "2.10.1"
"@tauri-apps/cli": "2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## \[2.7.1]
### Dependencies
- Upgraded to `fs-js@2.5.1`
## \[2.7.0]
- [`24154472`](https://github.com/tauri-apps/plugins-workspace/commit/24154472a6710a690173df0a121125d1f1b871e8) ([#3287](https://github.com/tauri-apps/plugins-workspace/pull/3287) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Re-use `message` command in Rust side for `ask` and `confirm` commands, `allow-ask` and `allow-confirm` permissions are now aliases to `allow-message`
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-dialog"
version = "2.7.0"
version = "2.7.1"
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
@@ -37,7 +37,7 @@ tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }
tauri-plugin-fs = { path = "../fs", version = "2.5.0" }
tauri-plugin-fs = { path = "../fs", version = "2.5.1" }
[target.'cfg(target_os = "ios")'.dependencies]
tauri = { workspace = true, features = ["wry"] }
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-dialog",
"version": "2.7.0",
"version": "2.7.1",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.5.1]
- [`ec054013`](https://github.com/tauri-apps/plugins-workspace/commit/ec0540138bece081e9a87982091947360e61987a) ([#3323](https://github.com/tauri-apps/plugins-workspace/pull/3323) by [@renovate](https://github.com/tauri-apps/plugins-workspace/../../renovate)) Updated dependency `toml` from 0.9 to 1
## \[2.5.0]
- [`e97a4ded`](https://github.com/tauri-apps/plugins-workspace/commit/e97a4dedab8608d9d57029784ee8a2607ca3a996) ([#3244](https://github.com/tauri-apps/plugins-workspace/pull/3244) by [@SeijiOkuda](https://github.com/tauri-apps/plugins-workspace/../../SeijiOkuda)) Add `encoding` option for `readTextFile` and `readTextFileLines`
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-fs"
version = "2.5.0"
version = "2.5.1"
description = "Access the file system."
authors = { workspace = true }
license = { workspace = true }
@@ -20,7 +20,7 @@ ios = { level = "partial", notes = "Access is restricted to Application folder b
tauri-plugin = { workspace = true, features = ["build"] }
schemars = { workspace = true }
serde = { workspace = true }
toml = "0.9"
toml = "1.0"
tauri-utils = { workspace = true }
[dependencies]
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-fs",
"version": "2.5.0",
"version": "2.5.1",
"description": "Access the file system.",
"license": "MIT OR Apache-2.0",
"authors": [
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_HAPTICS__=function(r){"use strict";async function t(r,t={},e){return window.__TAURI_INTERNALS__.invoke(r,t,e)}var e;"function"==typeof SuppressedError&&SuppressedError,function(r){r.WINDOW_RESIZED="tauri://resize",r.WINDOW_MOVED="tauri://move",r.WINDOW_CLOSE_REQUESTED="tauri://close-requested",r.WINDOW_DESTROYED="tauri://destroyed",r.WINDOW_FOCUS="tauri://focus",r.WINDOW_BLUR="tauri://blur",r.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",r.WINDOW_THEME_CHANGED="tauri://theme-changed",r.WINDOW_CREATED="tauri://window-created",r.WEBVIEW_CREATED="tauri://webview-created",r.DRAG_ENTER="tauri://drag-enter",r.DRAG_OVER="tauri://drag-over",r.DRAG_DROP="tauri://drag-drop",r.DRAG_LEAVE="tauri://drag-leave"}(e||(e={}));const a={async vibrate(r){try{return{status:"ok",data:await t("plugin:haptics|vibrate",{duration:r})}}catch(r){if(r instanceof Error)throw r;return{status:"error",error:r}}},async impactFeedback(r){try{return{status:"ok",data:await t("plugin:haptics|impact_feedback",{style:r})}}catch(r){if(r instanceof Error)throw r;return{status:"error",error:r}}},async notificationFeedback(r){try{return{status:"ok",data:await t("plugin:haptics|notification_feedback",{type:r})}}catch(r){if(r instanceof Error)throw r;return{status:"error",error:r}}},async selectionFeedback(){try{return{status:"ok",data:await t("plugin:haptics|selection_feedback")}}catch(r){if(r instanceof Error)throw r;return{status:"error",error:r}}}},{vibrate:i,impactFeedback:c,notificationFeedback:n,selectionFeedback:o}=a;return r.impactFeedback=c,r.notificationFeedback=n,r.selectionFeedback=o,r.vibrate=i,r}({});Object.defineProperty(window.__TAURI__,"haptics",{value:__TAURI_PLUGIN_HAPTICS__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_HAPTICS__=function(r){"use strict";async function t(r,t={},e){return window.__TAURI_INTERNALS__.invoke(r,t,e)}var e;"function"==typeof SuppressedError&&SuppressedError,function(r){r.WINDOW_RESIZED="tauri://resize",r.WINDOW_MOVED="tauri://move",r.WINDOW_CLOSE_REQUESTED="tauri://close-requested",r.WINDOW_DESTROYED="tauri://destroyed",r.WINDOW_FOCUS="tauri://focus",r.WINDOW_BLUR="tauri://blur",r.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",r.WINDOW_THEME_CHANGED="tauri://theme-changed",r.WINDOW_CREATED="tauri://window-created",r.WINDOW_SUSPENDED="tauri://suspended",r.WINDOW_RESUMED="tauri://resumed",r.WEBVIEW_CREATED="tauri://webview-created",r.DRAG_ENTER="tauri://drag-enter",r.DRAG_OVER="tauri://drag-over",r.DRAG_DROP="tauri://drag-drop",r.DRAG_LEAVE="tauri://drag-leave"}(e||(e={}));const a={async vibrate(r){try{return{status:"ok",data:await t("plugin:haptics|vibrate",{duration:r})}}catch(r){if(r instanceof Error)throw r;return{status:"error",error:r}}},async impactFeedback(r){try{return{status:"ok",data:await t("plugin:haptics|impact_feedback",{style:r})}}catch(r){if(r instanceof Error)throw r;return{status:"error",error:r}}},async notificationFeedback(r){try{return{status:"ok",data:await t("plugin:haptics|notification_feedback",{type:r})}}catch(r){if(r instanceof Error)throw r;return{status:"error",error:r}}},async selectionFeedback(){try{return{status:"ok",data:await t("plugin:haptics|selection_feedback")}}catch(r){if(r instanceof Error)throw r;return{status:"error",error:r}}}},{vibrate:i,impactFeedback:c,notificationFeedback:n,selectionFeedback:o}=a;return r.impactFeedback=c,r.notificationFeedback=n,r.selectionFeedback=o,r.vibrate=i,r}({});Object.defineProperty(window.__TAURI__,"haptics",{value:__TAURI_PLUGIN_HAPTICS__})}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## \[2.5.9]
### Dependencies
- Upgraded to `fs-js@2.5.1`
## \[2.5.8]
- [`29712892`](https://github.com/tauri-apps/plugins-workspace/commit/29712892526cfc2d35c9002e0a56925084ae1b73) ([#3252](https://github.com/tauri-apps/plugins-workspace/pull/3252) by [@NVolcz](https://github.com/tauri-apps/plugins-workspace/../../NVolcz)) Correct Response header initialization to support cloning and ensure Set-Cookie visibility.
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-http"
version = "2.5.8"
version = "2.5.9"
description = "Access an HTTP client written in Rust."
edition = { workspace = true }
authors = { workspace = true }
@@ -30,7 +30,7 @@ serde_json = { workspace = true }
tauri = { workspace = true }
thiserror = { workspace = true }
tokio = { version = "1", features = ["sync", "macros"] }
tauri-plugin-fs = { path = "../fs", version = "2.5.0" }
tauri-plugin-fs = { path = "../fs", version = "2.5.1" }
urlpattern = "0.3"
regex = "1"
http = "1"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-http",
"version": "2.5.8",
"version": "2.5.9",
"license": "MIT OR Apache-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_LOG__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var a,t;async function o(e,a,t){const o={kind:"Any"};return r("plugin:event|listen",{event:e,target:o,handler:n(a)}).then(n=>async()=>async function(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n))}async function i(e,n,a){const t=function(e){if(e){if(!e.startsWith("Error")){const n=e.split("\n").map(e=>e.split("@")).filter(([e,n])=>e.length>0&&"[native code]"!==n);return n[2]?.filter(e=>e.length>0).join("@")}{const n=e.split("\n"),r=n[3]?.trim();if(!r)return;const a=/at\s+(?<functionName>.*?)\s+\((?<fileName>.*?):(?<lineNumber>\d+):(?<columnNumber>\d+)\)/,t=r.match(a);if(t){const{functionName:e,fileName:n,lineNumber:r,columnNumber:a}=t.groups;return`${e}@${n}:${r}:${a}`}{const e=/at\s+(?<fileName>.*?):(?<lineNumber>\d+):(?<columnNumber>\d+)/,n=r.match(e);if(n){const{fileName:e,lineNumber:r,columnNumber:a}=n.groups;return`<anonymous>@${e}:${r}:${a}`}}}}}((new Error).stack),{file:o,line:i,keyValues:u}=a??{};await r("plugin:log|log",{level:e,message:n,location:t,file:o,line:i,keyValues:u})}async function u(e){return await o("log://log",n=>{const{level:r}=n.payload;let{message:a}=n.payload;a=a.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),e({message:a,level:r})})}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(a||(a={})),e.LogLevel=void 0,(t=e.LogLevel||(e.LogLevel={}))[t.Trace=1]="Trace",t[t.Debug=2]="Debug",t[t.Info=3]="Info",t[t.Warn=4]="Warn",t[t.Error=5]="Error",e.attachConsole=async function(){return await u(({level:n,message:r})=>{switch(n){case e.LogLevel.Trace:console.log(r);break;case e.LogLevel.Debug:console.debug(r);break;case e.LogLevel.Info:console.info(r);break;case e.LogLevel.Warn:console.warn(r);break;case e.LogLevel.Error:console.error(r);break;default:throw new Error(`unknown log level ${n}`)}})},e.attachLogger=u,e.debug=async function(n,r){await i(e.LogLevel.Debug,n,r)},e.error=async function(n,r){await i(e.LogLevel.Error,n,r)},e.info=async function(n,r){await i(e.LogLevel.Info,n,r)},e.trace=async function(n,r){await i(e.LogLevel.Trace,n,r)},e.warn=async function(n,r){await i(e.LogLevel.Warn,n,r)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_PLUGIN_LOG__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_LOG__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var a,t;async function o(e,a,t){const o={kind:"Any"};return r("plugin:event|listen",{event:e,target:o,handler:n(a)}).then(n=>async()=>async function(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n))}async function i(e,n,a){const t=function(e){if(e){if(!e.startsWith("Error")){const n=e.split("\n").map(e=>e.split("@")).filter(([e,n])=>e.length>0&&"[native code]"!==n);return n[2]?.filter(e=>e.length>0).join("@")}{const n=e.split("\n"),r=n[3]?.trim();if(!r)return;const a=/at\s+(?<functionName>.*?)\s+\((?<fileName>.*?):(?<lineNumber>\d+):(?<columnNumber>\d+)\)/,t=r.match(a);if(t){const{functionName:e,fileName:n,lineNumber:r,columnNumber:a}=t.groups;return`${e}@${n}:${r}:${a}`}{const e=/at\s+(?<fileName>.*?):(?<lineNumber>\d+):(?<columnNumber>\d+)/,n=r.match(e);if(n){const{fileName:e,lineNumber:r,columnNumber:a}=n.groups;return`<anonymous>@${e}:${r}:${a}`}}}}}((new Error).stack),{file:o,line:i,keyValues:u}=a??{};await r("plugin:log|log",{level:e,message:n,location:t,file:o,line:i,keyValues:u})}async function u(e){return await o("log://log",n=>{const{level:r}=n.payload;let{message:a}=n.payload;a=a.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),e({message:a,level:r})})}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_SUSPENDED="tauri://suspended",e.WINDOW_RESUMED="tauri://resumed",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(a||(a={})),e.LogLevel=void 0,(t=e.LogLevel||(e.LogLevel={}))[t.Trace=1]="Trace",t[t.Debug=2]="Debug",t[t.Info=3]="Info",t[t.Warn=4]="Warn",t[t.Error=5]="Error",e.attachConsole=async function(){return await u(({level:n,message:r})=>{switch(n){case e.LogLevel.Trace:console.log(r);break;case e.LogLevel.Debug:console.debug(r);break;case e.LogLevel.Info:console.info(r);break;case e.LogLevel.Warn:console.warn(r);break;case e.LogLevel.Error:console.error(r);break;default:throw new Error(`unknown log level ${n}`)}})},e.attachLogger=u,e.debug=async function(n,r){await i(e.LogLevel.Debug,n,r)},e.error=async function(n,r){await i(e.LogLevel.Error,n,r)},e.info=async function(n,r){await i(e.LogLevel.Info,n,r)},e.trace=async function(n,r){await i(e.LogLevel.Trace,n,r)},e.warn=async function(n,r){await i(e.LogLevel.Warn,n,r)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_PLUGIN_LOG__})}
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.5.4]
- [`c1fd33b3`](https://github.com/tauri-apps/plugins-workspace/commit/c1fd33b3a2735f2e25c1d026dc524af932db3315) ([#3343](https://github.com/tauri-apps/plugins-workspace/pull/3343) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix `revealItemInDir`/`reveal_items_in_dir` can't reveal network paths like `\\wsl.localhost\Ubuntu\etc` on Windows
## \[2.5.3]
- [`3d0d2e04`](https://github.com/tauri-apps/plugins-workspace/commit/3d0d2e041bbad9766aebecaeba291a28d8d7bf5c) ([#3163](https://github.com/tauri-apps/plugins-workspace/pull/3163) by [@FabianLars](https://github.com/tauri-apps/plugins-workspace/../../FabianLars)) Properly ignore `with: inAppBrowser` on desktop. This prevents an issue were `open_url` seamingly did nothing on desktop.
+2 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-opener"
version = "2.5.3"
version = "2.5.4"
description = "Open files and URLs using their default application."
edition = { workspace = true }
authors = { workspace = true }
@@ -41,6 +41,7 @@ features = [
"Win32_UI_WindowsAndMessaging",
"Win32_System_Com",
"Win32_System_Registry",
"Win32_Storage_FileSystem",
]
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"netbsd\", target_os = \"openbsd\"))".dependencies]
+2 -2
View File
@@ -7,8 +7,8 @@
| Linux | ✓ |
| Windows | ✓ |
| macOS | ✓ |
| Android | ? |
| iOS | ? |
| Android | |
| iOS | |
## Install
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-opener",
"version": "2.5.3",
"version": "2.5.4",
"description": "Open files and URLs using their default application.",
"license": "MIT OR Apache-2.0",
"authors": [
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+1
View File
@@ -31,6 +31,7 @@ pub enum Error {
Win32Error(#[from] windows::core::Error),
#[error("Path doesn't have a parent: {0}")]
NoParent(PathBuf),
// TODO: Add the underlying io::Error to this variant
#[cfg(windows)]
#[error("Failed to convert path '{0}' to ITEMIDLIST")]
FailedToConvertPathToItemIdList(PathBuf),
+2
View File
@@ -20,6 +20,8 @@ mod open;
mod reveal_item_in_dir;
mod scope;
mod scope_entry;
#[cfg(windows)]
mod windows_shell_path;
pub use error::Error;
type Result<T> = std::result::Result<T, Error>;
+21 -11
View File
@@ -2,15 +2,15 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use std::path::Path;
use std::path::{Path, PathBuf};
/// Reveal a path the system's default explorer.
/// Reveal a path in the system's default explorer.
///
/// ## Platform-specific:
///
/// - **Android / iOS:** Unsupported.
pub fn reveal_item_in_dir<P: AsRef<Path>>(path: P) -> crate::Result<()> {
let path = dunce::canonicalize(path.as_ref())?;
let path = canonicalize(path.as_ref())?;
#[cfg(any(
windows,
@@ -35,7 +35,7 @@ pub fn reveal_item_in_dir<P: AsRef<Path>>(path: P) -> crate::Result<()> {
Err(crate::Error::UnsupportedPlatform)
}
/// Reveal the paths the system's default explorer.
/// Reveal multiple paths in the system's default explorer.
///
/// ## Platform-specific:
///
@@ -48,7 +48,7 @@ where
let mut canonicalized = vec![];
for path in paths {
let path = dunce::canonicalize(path.as_ref())?;
let path = canonicalize(path.as_ref())?;
canonicalized.push(path);
}
@@ -75,10 +75,21 @@ where
Err(crate::Error::UnsupportedPlatform)
}
fn canonicalize(path: &Path) -> crate::Result<PathBuf> {
#[cfg(windows)]
let path = crate::windows_shell_path::absolute_and_check_exists(dunce::simplified(path))?;
#[cfg(not(windows))]
let path = std::fs::canonicalize(path)?;
Ok(path)
}
#[cfg(windows)]
mod imp {
use std::collections::HashMap;
use std::path::{Path, PathBuf};
use std::{
borrow::Cow,
collections::HashMap,
path::{Path, PathBuf},
};
use windows::Win32::UI::Shell::Common::ITEMIDLIST;
use windows::{
@@ -101,10 +112,9 @@ mod imp {
return Ok(());
}
let mut grouped_paths: HashMap<&Path, Vec<&Path>> = HashMap::new();
let mut grouped_paths: HashMap<Cow<Path>, Vec<&Path>> = HashMap::new();
for path in paths {
let parent = path
.parent()
let parent = crate::windows_shell_path::shell_parent_path(path)
.ok_or_else(|| crate::Error::NoParent(path.to_path_buf()))?;
grouped_paths.entry(parent).or_default().push(path);
}
@@ -112,7 +122,7 @@ mod imp {
let _ = unsafe { CoInitialize(None) };
for (parent, to_reveals) in grouped_paths {
let parent_item_id_list = OwnedItemIdList::new(parent)?;
let parent_item_id_list = OwnedItemIdList::new(&parent)?;
let to_reveals_item_id_list = to_reveals
.iter()
.map(|to_reveal| OwnedItemIdList::new(to_reveal))
+255
View File
@@ -0,0 +1,255 @@
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
use std::{
borrow::Cow,
ffi::OsString,
io,
os::windows::ffi::OsStringExt,
path::{Component, Path, PathBuf, Prefix, PrefixComponent},
};
use windows::{core::HSTRING, Win32::Storage::FileSystem::GetFullPathNameW};
pub fn absolute_and_check_exists(path: &Path) -> io::Result<PathBuf> {
let path = absolute(path)?;
if path.exists() {
Ok(path)
} else {
Err(std::io::Error::new(
std::io::ErrorKind::NotFound,
"path doesn't exist",
))
}
}
// TODO: Switch to use `std::path::absolute` once MSRV > 1.79
// Modified from https://github.com/rust-lang/rust/blob/b49ecc9eb70a51e89f32a7358e790f7b3808ccb3/library/std/src/sys/path/windows.rs#L185
// Note: this doesn't resolve symlinks
fn absolute(path: &Path) -> io::Result<PathBuf> {
if path.as_os_str().is_empty() {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
"cannot make an empty path absolute",
));
}
let prefix = path.components().next();
// Verbatim paths should not be modified.
if prefix
.map(|component| {
let Component::Prefix(prefix) = component else {
return false;
};
matches!(
prefix.kind(),
Prefix::Verbatim(..) | Prefix::VerbatimDisk(..) | Prefix::VerbatimUNC(..)
)
})
.unwrap_or(false)
{
// NULs in verbatim paths are rejected for consistency.
if path.as_os_str().as_encoded_bytes().contains(&0) {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
"strings passed to WinAPI cannot contain NULs",
));
}
return Ok(path.to_owned());
}
// This is an additional check to make sure we don't pass in a single driver letter to GetFullPathNameW
// which will resolves to the current working directory
//
// > https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew#:~:text=If%20you%20specify%20%22U%3A%22%20the%20path%20returned%20is%20the%20current%20directory%20on%20the%20%22U%3A%5C%22%20drive
#[allow(clippy::collapsible_if)]
if let Some(Component::Prefix(last_prefix)) = path.components().next_back() {
if matches!(last_prefix.kind(), Prefix::Disk(..)) {
return Ok(PathBuf::from(last_prefix.as_os_str()));
}
}
let path_hstring = HSTRING::from(path);
let size = unsafe { GetFullPathNameW(&path_hstring, None, None) };
if size == 0 {
return Err(io::Error::last_os_error());
}
let mut buffer = vec![0; size as usize];
let size = unsafe { GetFullPathNameW(&path_hstring, Some(&mut buffer), None) };
if size == 0 {
return Err(io::Error::last_os_error());
}
Ok(PathBuf::from(OsString::from_wide(&buffer[..size as usize])))
}
/// Similar to [`Path::parent`] but resolves parent of `C:`/`C:\` to `""` and handles UNC host name (`\\wsl.localhost\Ubuntu\` to `\\wsl.localhost`)
pub fn shell_parent_path(path: &Path) -> Option<Cow<'_, Path>> {
fn handle_prefix(prefix: PrefixComponent<'_>) -> Option<Cow<'_, Path>> {
match prefix.kind() {
Prefix::UNC(host_name, _share_name) => {
let mut path = OsString::from(r"\\");
path.push(host_name);
Some(PathBuf::from(path).into())
}
Prefix::Disk(_) => Some(PathBuf::from("").into()),
_ => None,
}
}
let mut components = path.components();
let component = components.next_back()?;
match component {
Component::Normal(_) | Component::CurDir | Component::ParentDir => {
Some(components.as_path().into())
}
Component::Prefix(prefix) => handle_prefix(prefix),
// Handle cases like `C:\` and `\\wsl.localhost\Ubuntu\`
Component::RootDir => {
if let Component::Prefix(prefix) = components.next_back()? {
handle_prefix(prefix)
} else {
None
}
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use std::path::Path;
// absolute() tests
#[test]
fn absolute_empty_error() {
let err = absolute(Path::new("")).unwrap_err();
assert_eq!(err.kind(), io::ErrorKind::InvalidInput);
}
#[test]
fn absolute_verbatim_passthrough() {
let path = Path::new(r"\\?\C:\foo");
assert_eq!(absolute(path).unwrap(), path);
}
#[test]
fn absolute_verbatim_unc_passthrough() {
let path = Path::new(r"\\?\UNC\server\share");
assert_eq!(absolute(path).unwrap(), path);
}
#[test]
fn absolute_bare_drive_letter() {
let result = absolute(Path::new("C:")).unwrap();
assert_eq!(result, Path::new("C:"));
}
#[test]
fn absolute_already_absolute() {
let result = absolute(Path::new(r"C:\Windows")).unwrap();
assert_eq!(result, Path::new(r"C:\Windows"));
}
#[test]
fn absolute_unc_path() {
let result = absolute(Path::new(r"\\server\share\folder")).unwrap();
assert_eq!(result, Path::new(r"\\server\share\folder"));
}
#[test]
fn absolute_converts_forward_slashes() {
let result = absolute(Path::new("C:/Windows/System32")).unwrap();
assert_eq!(result, Path::new(r"C:\Windows\System32"));
}
// absolute_and_check_exists() tests
#[test]
fn absolute_and_check_exists_existing_path() {
assert!(absolute_and_check_exists(Path::new(r"C:\Windows")).is_ok());
}
#[test]
fn absolute_and_check_exists_nonexistent_path() {
let err = absolute_and_check_exists(Path::new(r"C:\nonexistent_xyz_12345")).unwrap_err();
assert_eq!(err.kind(), io::ErrorKind::NotFound);
}
#[test]
fn absolute_and_check_exists_empty_propagates() {
let err = absolute_and_check_exists(Path::new("")).unwrap_err();
assert_eq!(err.kind(), io::ErrorKind::InvalidInput);
}
// shell_parent_path() tests
#[test]
fn shell_parent_path_local_path() {
let result = shell_parent_path(Path::new(r"C:\Users\foo"));
assert_eq!(result.as_deref(), Some(Path::new(r"C:\Users")));
}
#[test]
fn shell_parent_path_nested_path() {
let result = shell_parent_path(Path::new(r"C:\a\b\c\d"));
assert_eq!(result.as_deref(), Some(Path::new(r"C:\a\b\c")));
}
#[test]
fn shell_parent_path_drive_root_trailing() {
let result = shell_parent_path(Path::new(r"C:\"));
assert_eq!(result.as_deref(), Some(Path::new("")));
}
#[test]
fn shell_parent_path_bare_drive() {
let result = shell_parent_path(Path::new("C:"));
assert_eq!(result.as_deref(), Some(Path::new("")));
}
#[test]
fn shell_parent_path_unc_with_subfolder() {
let result = shell_parent_path(Path::new(r"\\server\share\folder"));
assert_eq!(result.as_deref(), Some(Path::new(r"\\server\share")));
}
#[test]
fn shell_parent_path_unc_share_trailing_slash() {
let result = shell_parent_path(Path::new(r"\\server.local\share\"));
assert_eq!(result.as_deref(), Some(Path::new(r"\\server.local")));
}
#[test]
fn shell_parent_path_unc_share_no_slash() {
let result = shell_parent_path(Path::new(r"\\server\share"));
assert_eq!(result.as_deref(), Some(Path::new(r"\\server")));
}
#[test]
fn shell_parent_path_relative() {
let result = shell_parent_path(Path::new(r"foo\bar"));
assert_eq!(result.as_deref(), Some(Path::new("foo")));
}
#[test]
fn shell_parent_path_single_component() {
let result = shell_parent_path(Path::new("foo"));
assert_eq!(result.as_deref(), Some(Path::new("")));
}
#[test]
fn shell_parent_path_empty() {
let result = shell_parent_path(Path::new(""));
assert!(result.is_none());
}
#[test]
fn shell_parent_path_verbatim() {
let result = shell_parent_path(Path::new(r"\\?\C:\foo"));
assert_eq!(result.as_deref(), Some(Path::new(r"\\?\C:\")));
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## \[2.3.7]
### Dependencies
- Upgraded to `fs@2.5.1`
## \[2.3.6]
### Dependencies
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-persisted-scope"
version = "2.3.6"
version = "2.3.7"
description = "Save filesystem and asset scopes and restore them when the app is reopened."
authors = { workspace = true }
license = { workspace = true }
@@ -23,7 +23,7 @@ log = { workspace = true }
thiserror = { workspace = true }
aho-corasick = "1"
bincode = "1"
tauri-plugin-fs = { path = "../fs", version = "2.5.0" }
tauri-plugin-fs = { path = "../fs", version = "2.5.1" }
[features]
protocol-asset = ["tauri/protocol-asset"]
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -10,7 +10,7 @@ function openLinks(): void {
let target: HTMLElement | null = e.target as HTMLElement
while (target) {
if (target.matches('a')) {
const t = target as HTMLAnchorElement
const t = target
if (
t.href !== ''
&& ['http://', 'https://', 'mailto:', 'tel:'].some((v) =>
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## \[2.4.2]
### Dependencies
- Upgraded to `deep-link@2.4.9`
## \[2.4.1]
### Dependencies
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-single-instance"
version = "2.4.1"
version = "2.4.2"
description = "Ensure a single instance of your tauri app is running."
authors = { workspace = true }
license = { workspace = true }
@@ -22,7 +22,7 @@ serde_json = { workspace = true }
tauri = { workspace = true }
tracing = { workspace = true }
thiserror = { workspace = true }
tauri-plugin-deep-link = { path = "../deep-link", version = "2.4.8", optional = true }
tauri-plugin-deep-link = { path = "../deep-link", version = "2.4.9", optional = true }
semver = { version = "1", optional = true }
[target."cfg(target_os = \"windows\")".dependencies.windows-sys]
@@ -9,6 +9,6 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@tauri-apps/cli": "2.10.1"
"@tauri-apps/cli": "2.11.0"
}
}
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.4.3]
- [`964e13f1`](https://github.com/tauri-apps/plugins-workspace/commit/964e13f124ad1feeb93c10168b265dc4936f738c) ([#3395](https://github.com/tauri-apps/plugins-workspace/pull/3395) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Fix a deadlock when calling `Store::set` while exiting (on `RunEvent::Exit`)
## \[2.4.2]
- [`eebfd2ed`](https://github.com/tauri-apps/plugins-workspace/commit/eebfd2ed3e4bae4ef195f20c992f01657a5f5121) ([#3157](https://github.com/tauri-apps/plugins-workspace/pull/3157) by [@Legend-Master](https://github.com/tauri-apps/plugins-workspace/../../Legend-Master)) Return an error instead of panic when the internally tracked resource id is invalid on creating new stores
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-store"
version = "2.4.2"
version = "2.4.3"
description = "Simple, persistent key-value store."
authors = { workspace = true }
license = { workspace = true }
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_STORE__=function(t){"use strict";var e,a;function r(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function s(t,e={},a){return window.__TAURI_INTERNALS__.invoke(t,e,a)}"function"==typeof SuppressedError&&SuppressedError;class i{get rid(){return function(t,e,a,r){if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?r:"a"===a?r.call(t):r?r.value:e.get(t)}(this,e,"f")}constructor(t){e.set(this,void 0),function(t,e,a){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,a)}(this,e,t)}async close(){return s("plugin:resources|close",{rid:this.rid})}}async function n(t,e,a){const i={kind:"Any"};return s("plugin:event|listen",{event:t,target:i,handler:r(e)}).then(e=>async()=>async function(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await s("plugin:event|unlisten",{event:t,eventId:e})}(t,e))}async function o(t,e){return await u.load(t,e)}e=new WeakMap,function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"}(a||(a={}));class u extends i{constructor(t){super(t)}static async load(t,e){const a=await s("plugin:store|load",{path:t,options:e});return new u(a)}static async get(t){return await s("plugin:store|get_store",{path:t}).then(t=>t?new u(t):null)}async set(t,e){await s("plugin:store|set",{rid:this.rid,key:t,value:e})}async get(t){const[e,a]=await s("plugin:store|get",{rid:this.rid,key:t});return a?e:void 0}async has(t){return await s("plugin:store|has",{rid:this.rid,key:t})}async delete(t){return await s("plugin:store|delete",{rid:this.rid,key:t})}async clear(){await s("plugin:store|clear",{rid:this.rid})}async reset(){await s("plugin:store|reset",{rid:this.rid})}async keys(){return await s("plugin:store|keys",{rid:this.rid})}async values(){return await s("plugin:store|values",{rid:this.rid})}async entries(){return await s("plugin:store|entries",{rid:this.rid})}async length(){return await s("plugin:store|length",{rid:this.rid})}async reload(t){await s("plugin:store|reload",{rid:this.rid,...t})}async save(){await s("plugin:store|save",{rid:this.rid})}async onKeyChange(t,e){return await n("store://change",a=>{a.payload.resourceId===this.rid&&a.payload.key===t&&e(a.payload.exists?a.payload.value:void 0)})}async onChange(t){return await n("store://change",e=>{e.payload.resourceId===this.rid&&t(e.payload.key,e.payload.exists?e.payload.value:void 0)})}}return t.LazyStore=class{get store(){return this._store||(this._store=o(this.path,this.options)),this._store}constructor(t,e){this.path=t,this.options=e}async init(){await this.store}async set(t,e){return(await this.store).set(t,e)}async get(t){return(await this.store).get(t)}async has(t){return(await this.store).has(t)}async delete(t){return(await this.store).delete(t)}async clear(){await(await this.store).clear()}async reset(){await(await this.store).reset()}async keys(){return(await this.store).keys()}async values(){return(await this.store).values()}async entries(){return(await this.store).entries()}async length(){return(await this.store).length()}async reload(t){await(await this.store).reload(t)}async save(){await(await this.store).save()}async onKeyChange(t,e){return(await this.store).onKeyChange(t,e)}async onChange(t){return(await this.store).onChange(t)}async close(){this._store&&await(await this._store).close()}},t.Store=u,t.getStore=async function(t){return await u.get(t)},t.load=o,t}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_PLUGIN_STORE__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_STORE__=function(t){"use strict";var e,a;function r(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function s(t,e={},a){return window.__TAURI_INTERNALS__.invoke(t,e,a)}"function"==typeof SuppressedError&&SuppressedError;class i{get rid(){return function(t,e,a,r){if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?r:"a"===a?r.call(t):r?r.value:e.get(t)}(this,e,"f")}constructor(t){e.set(this,void 0),function(t,e,a){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,a)}(this,e,t)}async close(){return s("plugin:resources|close",{rid:this.rid})}}async function n(t,e,a){const i={kind:"Any"};return s("plugin:event|listen",{event:t,target:i,handler:r(e)}).then(e=>async()=>async function(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await s("plugin:event|unlisten",{event:t,eventId:e})}(t,e))}async function o(t,e){return await u.load(t,e)}e=new WeakMap,function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_SUSPENDED="tauri://suspended",t.WINDOW_RESUMED="tauri://resumed",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"}(a||(a={}));class u extends i{constructor(t){super(t)}static async load(t,e){const a=await s("plugin:store|load",{path:t,options:e});return new u(a)}static async get(t){return await s("plugin:store|get_store",{path:t}).then(t=>t?new u(t):null)}async set(t,e){await s("plugin:store|set",{rid:this.rid,key:t,value:e})}async get(t){const[e,a]=await s("plugin:store|get",{rid:this.rid,key:t});return a?e:void 0}async has(t){return await s("plugin:store|has",{rid:this.rid,key:t})}async delete(t){return await s("plugin:store|delete",{rid:this.rid,key:t})}async clear(){await s("plugin:store|clear",{rid:this.rid})}async reset(){await s("plugin:store|reset",{rid:this.rid})}async keys(){return await s("plugin:store|keys",{rid:this.rid})}async values(){return await s("plugin:store|values",{rid:this.rid})}async entries(){return await s("plugin:store|entries",{rid:this.rid})}async length(){return await s("plugin:store|length",{rid:this.rid})}async reload(t){await s("plugin:store|reload",{rid:this.rid,...t})}async save(){await s("plugin:store|save",{rid:this.rid})}async onKeyChange(t,e){return await n("store://change",a=>{a.payload.resourceId===this.rid&&a.payload.key===t&&e(a.payload.exists?a.payload.value:void 0)})}async onChange(t){return await n("store://change",e=>{e.payload.resourceId===this.rid&&t(e.payload.key,e.payload.exists?e.payload.value:void 0)})}}return t.LazyStore=class{get store(){return this._store||(this._store=o(this.path,this.options)),this._store}constructor(t,e){this.path=t,this.options=e}async init(){await this.store}async set(t,e){return(await this.store).set(t,e)}async get(t){return(await this.store).get(t)}async has(t){return(await this.store).has(t)}async delete(t){return(await this.store).delete(t)}async clear(){await(await this.store).clear()}async reset(){await(await this.store).reset()}async keys(){return(await this.store).keys()}async values(){return(await this.store).values()}async entries(){return(await this.store).entries()}async length(){return(await this.store).length()}async reload(t){await(await this.store).reload(t)}async save(){await(await this.store).save()}async onKeyChange(t,e){return(await this.store).onKeyChange(t,e)}async onChange(t){return(await this.store).onChange(t)}async close(){this._store&&await(await this._store).close()}},t.Store=u,t.getStore=async function(t){return await u.get(t)},t.load=o,t}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_PLUGIN_STORE__})}
@@ -8,8 +8,8 @@
"tauri": "tauri"
},
"devDependencies": {
"@tauri-apps/cli": "2.10.1",
"typescript": "^5.9.3",
"@tauri-apps/cli": "2.11.0",
"typescript": "^6.0.0",
"vite": "^8.0.1"
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-store",
"version": "2.4.2",
"version": "2.4.3",
"description": "Simple, persistent key-value store.",
"license": "MIT OR Apache-2.0",
"authors": [
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+6 -6
View File
@@ -15,7 +15,7 @@ pub use serde_json::Value as JsonValue;
use std::{
collections::HashMap,
path::{Path, PathBuf},
sync::{Arc, Mutex},
sync::{Arc, RwLock},
time::Duration,
};
pub use store::{resolve_store_path, DeserializeFn, SerializeFn, Store, StoreBuilder};
@@ -39,7 +39,7 @@ struct ChangePayload<'a> {
#[derive(Debug)]
struct StoreState {
stores: Arc<Mutex<HashMap<PathBuf, ResourceId>>>,
stores: Arc<RwLock<HashMap<PathBuf, ResourceId>>>,
serialize_fns: HashMap<String, SerializeFn>,
deserialize_fns: HashMap<String, DeserializeFn>,
default_serialize: SerializeFn,
@@ -139,7 +139,7 @@ async fn get_store<R: Runtime>(
store_state: State<'_, StoreState>,
path: PathBuf,
) -> Result<Option<ResourceId>> {
let stores = store_state.stores.lock().unwrap();
let stores = store_state.stores.read().unwrap();
Ok(stores.get(&resolve_store_path(&app, path)?).copied())
}
@@ -317,7 +317,7 @@ impl<R: Runtime, T: Manager<R>> StoreExt<R> for T {
fn get_store(&self, path: impl AsRef<Path>) -> Option<Arc<Store<R>>> {
let collection = self.state::<StoreState>();
let stores = collection.stores.lock().unwrap();
let stores = collection.stores.read().unwrap();
stores
.get(&resolve_store_path(self.app_handle(), path.as_ref()).ok()?)
.and_then(|rid| self.resources_table().get(*rid).ok())
@@ -437,7 +437,7 @@ impl Builder {
])
.setup(move |app_handle, _api| {
app_handle.manage(StoreState {
stores: Arc::new(Mutex::new(HashMap::new())),
stores: Arc::new(RwLock::new(HashMap::new())),
serialize_fns: self.serialize_fns,
deserialize_fns: self.deserialize_fns,
default_serialize: self.default_serialize,
@@ -448,7 +448,7 @@ impl Builder {
.on_event(|app_handle, event| {
if let RunEvent::Exit = event {
let collection = app_handle.state::<StoreState>();
let stores = collection.stores.lock().unwrap();
let stores = collection.stores.read().unwrap();
for (path, rid) in stores.iter() {
if let Ok(store) = app_handle.resources_table().get::<Store<R>>(*rid) {
if let Err(err) = store.save() {
+4 -4
View File
@@ -188,7 +188,7 @@ impl<R: Runtime> StoreBuilder<R> {
pub(crate) fn build_inner(mut self) -> crate::Result<(Arc<Store<R>>, ResourceId)> {
let stores = self.app.state::<StoreState>().stores.clone();
let mut stores = stores.lock().unwrap();
let mut stores = stores.write().unwrap();
self.path = resolve_store_path(&self.app, self.path)?;
@@ -403,7 +403,7 @@ impl<R: Runtime> StoreInner<R> {
fn emit_change_event(&self, key: &str, value: Option<&JsonValue>) -> crate::Result<()> {
let state = self.app.state::<StoreState>();
let stores = state.stores.lock().unwrap();
let stores = state.stores.read().unwrap();
let exists = value.is_some();
self.app.emit(
"store://change",
@@ -438,7 +438,7 @@ impl<R: Runtime> Resource for Store<R> {
fn close(self: Arc<Self>) {
let store = self.store.lock().unwrap();
let state = store.app.state::<StoreState>();
let mut stores = state.stores.lock().unwrap();
let mut stores = state.stores.write().unwrap();
stores.remove(&store.path);
}
}
@@ -554,7 +554,7 @@ impl<R: Runtime> Store<R> {
let store = self.store.lock().unwrap();
let app = store.app.clone();
let state = app.state::<StoreState>();
let stores = state.stores.lock().unwrap();
let stores = state.stores.read().unwrap();
if let Some(rid) = stores.get(&store.path).copied() {
drop(store);
drop(stores);
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+4 -4
View File
@@ -1822,9 +1822,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "openssl"
version = "0.10.72"
version = "0.10.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da"
checksum = "f38c4372413cdaaf3cc79dd92d29d7d9f5ab09b51b10dded508fb90bb70b9222"
dependencies = [
"bitflags 2.6.0",
"cfg-if",
@@ -1854,9 +1854,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
version = "0.9.107"
version = "0.9.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07"
checksum = "13ce1245cd07fcc4cfdb438f7507b0c7e4f3849a69fd84d52374c66d83741bb6"
dependencies = [
"cc",
"libc",
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
+1 -1
View File
@@ -30,7 +30,7 @@ http = "1"
rand = "0.9"
futures-util = "0.3"
tokio = { version = "1", features = ["net", "sync"] }
tokio-tungstenite = { version = "0.28" }
tokio-tungstenite = { version = "0.29" }
rustls = { version = "0.23", default-features = false, features = [
"ring",
], optional = true }
@@ -9,8 +9,8 @@
"preview": "vite preview"
},
"devDependencies": {
"@tauri-apps/cli": "2.10.1",
"typescript": "^5.9.3",
"@tauri-apps/cli": "2.11.0",
"typescript": "^6.0.0",
"vite": "^8.0.1"
},
"dependencies": {
@@ -11,7 +11,7 @@ tauri = { workspace = true, features = ["wry", "common-controls-v6", "x11"] }
tokio = { version = "1", features = ["net"] }
futures-util = "0.3"
tauri-plugin-websocket = { path = "../../../" }
tokio-tungstenite = "0.28"
tokio-tungstenite = "0.29"
[build-dependencies]
tauri-build = { workspace = true }
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -25,6 +25,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "^2.10.1"
"@tauri-apps/api": "^2.11.0"
}
}
+3
View File
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "guest-js"
},
"include": ["guest-js/*.ts"]
}

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