Compare commits

...

21 Commits

Author SHA1 Message Date
github-actions[bot] 5006717a7f publish new versions (#986) 2024-03-07 00:24:51 -03:00
Amr Bashir 0f67dfc9b4 feat(http): enhance scope config to accept string as well (#1025) 2024-03-07 00:10:45 -03:00
Lucas Fernandes Nogueira cacf544d51 chore(deps): update to tauri beta.9 (#1037) 2024-03-07 00:08:52 -03:00
Fabian-Lars 16fc0f2ee3 fix(dialog): Remove Linux specific code for rfd 0.14 compatibility (#1033)
fixes #956
2024-03-06 19:38:51 +02:00
Tahmin Ahmed 735810237e fix: fix plugins/fs infinite loop on autoregen (#1029)
* Created safety check for redundant autogenerations

* Accounted for empty file case, added .changes file

* Update plugins/fs/build.rs
2024-03-06 19:30:13 +02:00
Lucas Fernandes Nogueira ac520a2841 feat(http): enhance scope URL matching via urlpattern (#1030)
* feat(http): enhance scope URL matching via urlpattern

* update schema
2024-03-06 13:44:51 -03:00
Rigidity d9870f1948 docs: improve tauri-plugin-store readme and code example (#996)
* Improve tauri-plugin-store readme and code example

* Remove advanced error handling section and fix inaccuracy

* Switch to expect
2024-03-06 06:08:35 +02:00
Victor Aremu 54cd4a58b8 chore(stronghold): readme typo (#1028) 2024-03-05 11:21:24 +01:00
Victor Aremu 570fb8f335 feat: Improve Stronghold (v2) README with usage examples (#1023)
feat: add client side usage
2024-03-05 02:03:44 +02:00
Ahmed Elkhoudiry 22f5acf240 feat(store): Add android & iOS support (#1011)
* update cli

* init android module

* upgdate gitignore

* add desktop and mobile

* android

* ios

* lib

* remove comment

* cargo fmt

* skip empty file creation

* android comments

* apple path

* Discard changes to plugins/store/ios/README.md

* stop auto directories creation

* Update README.md
2024-03-04 21:02:17 +02:00
Fabian-Lars 8a5e05cd83 fix: Fix comp with latest beta (#1018)
* fix: Fix comp with latest beta

* linux
2024-03-04 19:59:24 +02:00
Amr Bashir 9586eabd5a chore(deps): update to open-rs@5.1 (#1021)
* chore(deps): update to `open-rs@5.1`

ref: #1003

* changefile
2024-03-04 18:28:53 +02:00
Tony 2397ec5937 fix: single instance doesn't shutdown immediately (#1019)
* Fix single instance doesn't shutdown immediately

* Add change file
2024-03-04 14:52:40 +01:00
Fabian-Lars 99bea2559c chore: Update tauri to beta.8 (#1005)
* chore: Update tauri to beta.8

fixes #1000

* Update and rename tauri-beta.7.md to tauri-beta-8.md
2024-02-29 19:34:43 +02:00
AHQ 9d4b25cf85 Bump tauri to v2 beta.7 (#1001)
* Bump tauri to v2 beta.7

* change file

---------

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2024-02-28 19:03:51 +02:00
Tillmann f59436dad0 Added Security Policy to All Plugins (#930)
* Added contact and security policy to remaining plugins and the repository

* Added default security policy to shared template
2024-02-27 11:43:31 -03:00
TukanDev dc6d3321e5 feat(clipboard): Implement HTML and clear functionality (#977)
* Implement arboard HTML features (desktop only) and ability to trigger clipboard clear

Signed-off-by: TukanDev <contact@tukandev.com>

* Update readme of clipboard plugin

Signed-off-by: TukanDev <contact@tukandev.com>

* Update plugins/clipboard-manager/src/desktop.rs

Propagate error for clear as requested

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

* Update plugins/clipboard-manager/guest-js/index.ts

Change to camelCase as requested

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

* Update plugins/clipboard-manager/guest-js/index.ts

use camelCase here too

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

* Update README.md

Revert back as mentioned in HTML PR

* Update index.ts

After discussion  readHtml() is decided to be removed. Will follow and remove corresponding rust side function too.

* Strip all other existence of read_html out as determined in HTML support PR conversation

Signed-off-by: TukanDev <contact@tukandev.com>

* Apply requested changes v2

Signed-off-by: TukanDev <contact@tukandev.com>

* pnpm run build and cargo fmt

Signed-off-by: TukanDev <contact@tukandev.com>

* Update plugins/clipboard-manager/src/mobile.rs

fix ci calling

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

* mobile read_html omg....

Signed-off-by: TukanDev <contact@tukandev.com>

* Update plugins/clipboard-manager/src/mobile.rs

* pnpm format....

Signed-off-by: TukanDev <contact@tukandev.com>

* error on mobile as well

* clear on mobile

* change file

---------

Signed-off-by: TukanDev <contact@tukandev.com>
2024-02-25 19:46:12 +02:00
Amr Bashir aa25c91bb0 feat(dialog): allow setting canCreateDirectories on macOS (#978)
* feat(dialog): allow setting `canCreateDirectories` on macOS

closes #949

* Discard changes to plugins/log/src/api-iife.js

* Discard changes to plugins/store/src/api-iife.js

* Discard changes to plugins/window-state/src/api-iife.js

* Update plugins/dialog/src/commands.rs

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update plugins/dialog/src/commands.rs

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update plugins/dialog/src/lib.rs

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update plugins/dialog/guest-js/index.ts

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update plugins/dialog/guest-js/index.ts

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-02-23 21:05:29 +02:00
Amr Bashir ae56b13a4d fix(http): allow User-Agent header to be set (#983)
* fix(http): allow `User-Agent` header to be set

closes #966

* lint

* fix build
2024-02-23 18:32:19 +02:00
github-actions[bot] 267e39e250 Publish New Versions (v2) (#982)
Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
2024-02-22 22:20:16 -03:00
Lucas Fernandes Nogueira 6d1e6218b5 fix(single-instance): wrong zbus import, closes #980 (#981) 2024-02-22 22:17:59 -03:00
247 changed files with 4584 additions and 2766 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"clipboard-manager": patch
"clipboard-manager-js": patch
---
Add support for writing HTML content to the clipboard.
@@ -0,0 +1,6 @@
---
"dialog": "patch"
"dialog-js": "patch"
---
Allow configuring `canCreateDirectories` for open and save dialogs on macOS, if not configured, it will be set to `true` by default.
+5
View File
@@ -0,0 +1,5 @@
---
"dialog": "patch"
---
Fixed an issue where dialogs would not spawn but instead freeze the whole app.
+5
View File
@@ -0,0 +1,5 @@
---
"http": patch
---
The scope URL now follows the URL pattern standard instead of a simple glob pattern.
+6
View File
@@ -0,0 +1,6 @@
---
"fs": patch
"fs-js": patch
---
Fix infinite loop on cargo build operations
+5
View File
@@ -0,0 +1,5 @@
---
'single-instance': patch
---
Fix doesn't shutdown immediately.
+5
View File
@@ -0,0 +1,5 @@
---
"single-instance": patch
---
Fix `zbus::blocking::connection::Builder` import.
+6
View File
@@ -0,0 +1,6 @@
---
"http": "patch"
"http-js": "patch"
---
Allow `User-Agent` header to be set.
+12 -1
View File
@@ -2,7 +2,18 @@
"tag": "beta",
"changes": [
".changes/beta.md",
".changes/clipboard-html.md",
".changes/dialog-can-create-directories.md",
".changes/dialog-linux-freeze.md",
".changes/enhance-http-scope.md",
".changes/file-autogen-fix.md",
".changes/fix-shutdown-timing.md",
".changes/fix-zbus-import.md",
".changes/http-user-agent.md",
".changes/msrv-1.75.md",
".changes/tauri-beta-4.md"
".changes/shell-shellexcute.md",
".changes/tauri-beta-4.md",
".changes/tauri-beta-8.md",
".changes/tauri-beta-9.md"
]
}
+6
View File
@@ -0,0 +1,6 @@
---
"shell": "patch"
"shell-js": "patch"
---
On Windows, fix `open` can't open file if the file is being used by a program.
+57
View File
@@ -0,0 +1,57 @@
---
"authenticator": patch
"autostart": patch
"barcode-scanner": patch
"biometric": patch
"cli": patch
"clipboard-manager": patch
"deep-link": patch
"dialog": patch
"fs": patch
"global-shortcut": patch
"http": patch
"localhost": patch
"log-plugin": patch
"nfc": patch
"notification": patch
"os": patch
"persisted-scope": patch
"positioner": patch
"process": patch
"shell": patch
"single-instance": patch
"sql": patch
"store": patch
"stronghold": patch
"updater": patch
"upload": patch
"websocket": patch
"window-state": patch
"authenticator-js": patch
"autostart-js": patch
"barcode-scanner-js": patch
"biometric-js": patch
"cli-js": patch
"clipboard-manager-js": patch
"deep-link-js": patch
"dialog-js": patch
"fs-js": patch
"global-shortcut-js": patch
"http-js": patch
"log-js": patch
"nfc-js": patch
"notification-js": patch
"os-js": patch
"positioner-js": patch
"process-js": patch
"shell-js": patch
"sql-js": patch
"store-js": patch
"stronghold-js": patch
"updater-js": patch
"upload-js": patch
"websocket-js": patch
"window-state-js": patch
---
Update to tauri beta.8.
+7
View File
@@ -0,0 +1,7 @@
---
"fs": patch
"http": patch
"shell": patch
---
Update to tauri beta.9.
+5 -1
View File
@@ -1,4 +1,8 @@
target
node_modules
dist-js
dist
dist
.idea
.vscode
.gradle
**/capabilities/schemas
Generated
+144 -125
View File
@@ -230,7 +230,7 @@ checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1"
[[package]]
name = "api"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"log",
"serde",
@@ -562,7 +562,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi 0.1.19",
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -579,7 +579,7 @@ dependencies = [
"log",
"rand 0.7.3",
"runloop",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -626,6 +626,12 @@ version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "base64"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51"
[[package]]
name = "base64ct"
version = "1.6.0"
@@ -1174,7 +1180,7 @@ checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355"
dependencies = [
"is-terminal",
"lazy_static",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -1633,7 +1639,7 @@ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
dependencies = [
"libc",
"redox_users",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -1644,7 +1650,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
dependencies = [
"libc",
"redox_users",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -1671,7 +1677,7 @@ dependencies = [
"dlopen2_derive",
"libc",
"once_cell",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -2472,7 +2478,7 @@ dependencies = [
"gobject-sys 0.16.3",
"libc",
"system-deps",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -2485,7 +2491,7 @@ dependencies = [
"gobject-sys 0.18.0",
"libc",
"system-deps",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -2828,7 +2834,7 @@ checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
dependencies = [
"libc",
"match_cfg",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -3266,7 +3272,7 @@ dependencies = [
"jni-sys",
"log",
"thiserror",
"walkdir 2.4.0",
"walkdir",
"windows-sys 0.45.0",
]
@@ -3315,16 +3321,6 @@ dependencies = [
"treediff",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
dependencies = [
"winapi 0.2.8",
"winapi-build",
]
[[package]]
name = "keyboard-types"
version = "0.6.2"
@@ -3432,7 +3428,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -3471,7 +3467,7 @@ dependencies = [
"cc",
"libc",
"pkg-config",
"walkdir 2.4.0",
"walkdir",
]
[[package]]
@@ -3544,9 +3540,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.4.20"
version = "0.4.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
dependencies = [
"value-bag",
]
@@ -3882,7 +3878,7 @@ dependencies = [
"log",
"mio",
"serde",
"walkdir 2.4.0",
"walkdir",
"windows-sys 0.48.0",
]
@@ -3897,7 +3893,7 @@ dependencies = [
"log",
"notify",
"parking_lot",
"walkdir 2.4.0",
"walkdir",
]
[[package]]
@@ -3907,7 +3903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
dependencies = [
"overload",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -4065,9 +4061,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "open"
version = "4.2.0"
version = "5.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a083c0c7e5e4a8ec4176346cf61f67ac674e8bfb059d9226e1c54a96b377c12"
checksum = "68b3fbb0d52bf0cbb5225ba3d2c303aa136031d43abff98284332a9981ecddec"
dependencies = [
"is-wsl",
"libc",
@@ -4146,7 +4142,7 @@ checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e"
dependencies = [
"log",
"serde",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -5038,7 +5034,7 @@ dependencies = [
"spin 0.5.2",
"untrusted 0.7.1",
"web-sys",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -5277,16 +5273,6 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"
[[package]]
name = "same-file"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"
dependencies = [
"kernel32-sys",
"winapi 0.2.8",
]
[[package]]
name = "same-file"
version = "1.0.6"
@@ -5598,7 +5584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef"
dependencies = [
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -6281,9 +6267,9 @@ checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae"
[[package]]
name = "tauri"
version = "2.0.0-beta.4"
version = "2.0.0-beta.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb6b10809e932ed85813fff9ac748cbcc0cf4c78209433b1b6e025660619f2e4"
checksum = "353a521566bd41164a05887f40fe93b375c82b82000726f63c66237955dfb4f5"
dependencies = [
"anyhow",
"bytes",
@@ -6314,7 +6300,6 @@ dependencies = [
"serde_repr",
"serialize-to-javascript",
"state",
"static_assertions",
"swift-rs",
"tauri-build",
"tauri-macros",
@@ -6334,9 +6319,9 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "2.0.0-beta.3"
version = "2.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4ea663cde4862231178215d364b3650dade8cb159fc84a1bea5c365689dacd0"
checksum = "50887f06d343b6ede0260d29abb4edd57f40d8aac538f6e34d801c9a4fa1c6b8"
dependencies = [
"anyhow",
"cargo_toml",
@@ -6353,16 +6338,16 @@ dependencies = [
"tauri-utils",
"tauri-winres",
"toml 0.8.2",
"walkdir 2.4.0",
"walkdir",
]
[[package]]
name = "tauri-codegen"
version = "2.0.0-beta.3"
version = "2.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94a770b18aa021b0c8568c8f0d347044a72d349b6a13dd1db28c558832e8e681"
checksum = "10c676621ba42f97d349ee1a835cfac8a268d8843c8b81fa7663ebac2854786a"
dependencies = [
"base64 0.21.7",
"base64 0.22.0",
"brotli",
"ico",
"json-patch",
@@ -6380,14 +6365,14 @@ dependencies = [
"time",
"url",
"uuid",
"walkdir 2.4.0",
"walkdir",
]
[[package]]
name = "tauri-macros"
version = "2.0.0-beta.3"
version = "2.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85b100bf9f05a013719fa6c9bf096da42511888b3671d9c22bffa12a030d76a9"
checksum = "dd5e87dc692a359ee99662616639fe35681e3ce9929e1ec2447b2e3853b6bda6"
dependencies = [
"heck",
"proc-macro2",
@@ -6399,9 +6384,9 @@ dependencies = [
[[package]]
name = "tauri-plugin"
version = "2.0.0-beta.3"
version = "2.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "140c010cfb7120c9276e6e0b0c271dabb7988be2998011f918b669e766224e55"
checksum = "b84ccc2181a81c66f2b203775b6b67590cc357bc477c57f0fac844c31dd5c474"
dependencies = [
"anyhow",
"glob",
@@ -6411,12 +6396,12 @@ dependencies = [
"serde_json",
"tauri-utils",
"toml 0.8.2",
"walkdir 1.0.7",
"walkdir",
]
[[package]]
name = "tauri-plugin-authenticator"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"authenticator",
"base64 0.21.7",
@@ -6438,7 +6423,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-autostart"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"auto-launch",
"log",
@@ -6451,7 +6436,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-barcode-scanner"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"log",
"serde",
@@ -6463,7 +6448,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-biometric"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"log",
"serde",
@@ -6476,7 +6461,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-cli"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"clap",
"log",
@@ -6489,7 +6474,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-clipboard-manager"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"arboard",
"log",
@@ -6502,7 +6487,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-deep-link"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"log",
"serde",
@@ -6515,7 +6500,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-dialog"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"glib 0.16.9",
"log",
@@ -6531,7 +6516,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-fs"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"anyhow",
"glob",
@@ -6550,7 +6535,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-global-shortcut"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"global-hotkey",
"log",
@@ -6563,11 +6548,11 @@ dependencies = [
[[package]]
name = "tauri-plugin-http"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"data-url",
"glob",
"http 0.2.11",
"regex",
"reqwest",
"schemars",
"serde",
@@ -6577,11 +6562,12 @@ dependencies = [
"tauri-plugin-fs",
"thiserror",
"url",
"urlpattern",
]
[[package]]
name = "tauri-plugin-localhost"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"http 1.0.0",
"log",
@@ -6594,7 +6580,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-log"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"android_logger",
"byte-unit",
@@ -6613,7 +6599,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-nfc"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"log",
"serde",
@@ -6626,7 +6612,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-notification"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"chrono",
"color-backtrace",
@@ -6654,7 +6640,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-os"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"gethostname",
"log",
@@ -6670,7 +6656,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-persisted-scope"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"aho-corasick",
"bincode",
@@ -6684,7 +6670,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-positioner"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"log",
"serde",
@@ -6697,7 +6683,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-process"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"tauri",
"tauri-plugin",
@@ -6705,7 +6691,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-shell"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"encoding_rs",
"log",
@@ -6723,7 +6709,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-single-instance"
version = "2.0.0-beta.0"
version = "2.0.0-beta.2"
dependencies = [
"log",
"serde",
@@ -6736,7 +6722,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-sql"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"futures-core",
"log",
@@ -6752,7 +6738,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-store"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"log",
"serde",
@@ -6764,7 +6750,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-stronghold"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"hex",
"iota-crypto 0.23.1",
@@ -6785,7 +6771,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-updater"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"base64 0.21.7",
"dirs-next",
@@ -6812,7 +6798,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-upload"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"futures-util",
"log",
@@ -6829,7 +6815,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-websocket"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"futures-util",
"http 1.0.0",
@@ -6846,7 +6832,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-window-state"
version = "2.0.0-beta.0"
version = "2.0.0-beta.1"
dependencies = [
"bincode",
"bitflags 2.4.2",
@@ -6860,9 +6846,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
version = "2.0.0-beta.3"
version = "2.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc687ef6571127f0ad9a9bef141ca3f8d9597b7f99949047d5c69ed731cf36c4"
checksum = "3fc1ebe2a720c1b62a9980ebf44f27db4f8a475e1465917959ce3940d6903307"
dependencies = [
"gtk",
"http 0.2.11",
@@ -6878,20 +6864,22 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "2.0.0-beta.3"
version = "2.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a07b1d76d4159aec5c2cff742e30b0f5b3675a2520b979acbbc66c5f92c99491"
checksum = "d0e853c02137e908589e9f0c684f10bb49d0dedf9e86ad734a18e42ce9bbd2ab"
dependencies = [
"cocoa 0.25.0",
"gtk",
"http 0.2.11",
"jni",
"log",
"percent-encoding",
"raw-window-handle 0.6.0",
"softbuffer",
"tao",
"tauri-runtime",
"tauri-utils",
"url",
"webkit2gtk",
"webview2-com",
"windows 0.52.0",
@@ -6900,9 +6888,9 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.0.0-beta.3"
version = "2.0.0-beta.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2729b59832a96dd05f4f2ced33e2ab976ca60c58c1d675afe6aabc486eb51143"
checksum = "e1973b15065cb63868f5fba789d54ef04232d7e0229fb2230d1f557480a5ceea"
dependencies = [
"aes-gcm 0.10.3",
"brotli",
@@ -6931,7 +6919,7 @@ dependencies = [
"thiserror",
"toml 0.8.2",
"url",
"walkdir 2.4.0",
"walkdir",
]
[[package]]
@@ -7466,7 +7454,48 @@ checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9"
dependencies = [
"memoffset 0.9.0",
"tempfile",
"winapi 0.3.9",
"winapi",
]
[[package]]
name = "unic-char-property"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221"
dependencies = [
"unic-char-range",
]
[[package]]
name = "unic-char-range"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc"
[[package]]
name = "unic-common"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc"
[[package]]
name = "unic-ucd-ident"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987"
dependencies = [
"unic-char-property",
"unic-char-range",
"unic-ucd-version",
]
[[package]]
name = "unic-ucd-version"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4"
dependencies = [
"unic-common",
]
[[package]]
@@ -7561,6 +7590,19 @@ version = "2.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
[[package]]
name = "urlpattern"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609"
dependencies = [
"derive_more",
"regex",
"serde",
"unic-ucd-ident",
"url",
]
[[package]]
name = "utf-8"
version = "0.7.6"
@@ -7647,24 +7689,13 @@ dependencies = [
"libc",
]
[[package]]
name = "walkdir"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff"
dependencies = [
"kernel32-sys",
"same-file 0.1.3",
"winapi 0.2.8",
]
[[package]]
name = "walkdir"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
dependencies = [
"same-file 1.0.6",
"same-file",
"winapi-util",
]
@@ -7964,12 +7995,6 @@ dependencies = [
"windows-sys 0.36.1",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
[[package]]
name = "winapi"
version = "0.3.9"
@@ -7980,12 +8005,6 @@ dependencies = [
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
@@ -7998,7 +8017,7 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -8381,7 +8400,7 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d"
dependencies = [
"winapi 0.3.9",
"winapi",
]
[[package]]
@@ -8406,9 +8425,9 @@ dependencies = [
[[package]]
name = "wry"
version = "0.36.0"
version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a9e7b81968555303086ef882a0c213896a76099de4ed0b86a798775c2d54304"
checksum = "8b717040ba9771fd88eb428c6ea6b555f8e734ff8534f02c13e8f10d97f5935e"
dependencies = [
"base64 0.21.7",
"block",
@@ -8432,6 +8451,7 @@ dependencies = [
"objc",
"objc_id",
"once_cell",
"percent-encoding",
"raw-window-handle 0.6.0",
"serde",
"serde_json",
@@ -8439,7 +8459,6 @@ dependencies = [
"soup3",
"tao-macros",
"thiserror",
"url",
"webkit2gtk",
"webkit2gtk-sys",
"webview2-com",
@@ -8529,7 +8548,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e"
dependencies = [
"libc",
"winapi 0.3.9",
"winapi",
]
[[package]]
+3 -3
View File
@@ -10,9 +10,9 @@ resolver = "2"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
log = "0.4"
tauri = "2.0.0-beta.4"
tauri-build = "2.0.0-beta.3"
tauri-plugin = "2.0.0-beta.3"
tauri = "2.0.0-beta.9"
tauri-build = "2.0.0-beta.7"
tauri-plugin = "2.0.0-beta.7"
serde_json = "1"
thiserror = "1"
url = "2"
+1 -1
View File
@@ -24,7 +24,7 @@
| [shell](plugins/shell) | Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application. | ✅ | ✅ | ✅ | ? | ? |
| [single-instance](plugins/single-instance) | Ensure a single instance of your tauri app is running. | ✅ | ? | ✅ | ? | ? |
| [sql](plugins/sql) | Interface with SQL databases. | ✅ | ✅ | ✅ | ? | ? |
| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | ? | ? |
| [store](plugins/store) | Persistent key value storage. | ✅ | ✅ | ✅ | | |
| [stronghold](plugins/stronghold) | Encrypted, secure database. | ✅ | ✅ | ✅ | ? | ? |
| [updater](plugins/updater) | In-app updates for Tauri applications. | ✅ | ✅ | ✅ | ? | ? |
| [upload](plugins/upload) | Tauri plugin for file uploads through HTTP. | ✅ | ✅ | ✅ | ? | ? |
+23
View File
@@ -0,0 +1,23 @@
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Include as much of the following information:
- Type of issue (e.g. improper input parsing, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used to help us with reproduction of the issue
- Step-by-step instructions to reproduce the issue
- Ideally a reproduction repository
- Impact of the issue, including how an attacker might exploit the issue
We prefer to receive reports in English.
## Contact
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
+20
View File
@@ -1,5 +1,25 @@
# Changelog
## \[2.0.0-beta.2]
### Dependencies
- Upgraded to `clipboard-manager-js@2.0.0-beta.2`
- Upgraded to `dialog-js@2.0.0-beta.2`
- Upgraded to `fs-js@2.0.0-beta.2`
- Upgraded to `http-js@2.0.0-beta.2`
- Upgraded to `shell-js@2.0.0-beta.2`
- Upgraded to `barcode-scanner-js@2.0.0-beta.2`
- Upgraded to `biometric-js@2.0.0-beta.2`
- Upgraded to `cli-js@2.0.0-beta.2`
- Upgraded to `global-shortcut-js@2.0.0-beta.2`
- Upgraded to `log-js@2.0.0-beta.2`
- Upgraded to `nfc-js@2.0.0-beta.2`
- Upgraded to `notification-js@2.0.0-beta.2`
- Upgraded to `os-js@2.0.0-beta.2`
- Upgraded to `process-js@2.0.0-beta.2`
- Upgraded to `updater-js@2.0.0-beta.2`
## \[2.0.0-beta.1]
### Dependencies
+17 -17
View File
@@ -1,7 +1,7 @@
{
"name": "svelte-app",
"private": true,
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"type": "module",
"scripts": {
"dev": "vite --clearScreen false",
@@ -9,28 +9,28 @@
"serve": "vite preview"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2",
"@tauri-apps/plugin-barcode-scanner": "2.0.0-beta.1",
"@tauri-apps/plugin-biometric": "2.0.0-beta.1",
"@tauri-apps/plugin-cli": "2.0.0-beta.1",
"@tauri-apps/plugin-clipboard-manager": "2.0.0-beta.1",
"@tauri-apps/plugin-dialog": "2.0.0-beta.1",
"@tauri-apps/plugin-fs": "2.0.0-beta.1",
"@tauri-apps/plugin-global-shortcut": "2.0.0-beta.1",
"@tauri-apps/plugin-http": "2.0.0-beta.1",
"@tauri-apps/plugin-nfc": "2.0.0-beta.1",
"@tauri-apps/plugin-notification": "2.0.0-beta.1",
"@tauri-apps/plugin-os": "2.0.0-beta.1",
"@tauri-apps/plugin-process": "2.0.0-beta.1",
"@tauri-apps/plugin-shell": "2.0.0-beta.1",
"@tauri-apps/plugin-updater": "2.0.0-beta.1",
"@tauri-apps/api": "2.0.0-beta.4",
"@tauri-apps/plugin-barcode-scanner": "2.0.0-beta.2",
"@tauri-apps/plugin-biometric": "2.0.0-beta.2",
"@tauri-apps/plugin-cli": "2.0.0-beta.2",
"@tauri-apps/plugin-clipboard-manager": "2.0.0-beta.2",
"@tauri-apps/plugin-dialog": "2.0.0-beta.2",
"@tauri-apps/plugin-fs": "2.0.0-beta.2",
"@tauri-apps/plugin-global-shortcut": "2.0.0-beta.2",
"@tauri-apps/plugin-http": "2.0.0-beta.2",
"@tauri-apps/plugin-nfc": "2.0.0-beta.2",
"@tauri-apps/plugin-notification": "2.0.0-beta.2",
"@tauri-apps/plugin-os": "2.0.0-beta.2",
"@tauri-apps/plugin-process": "2.0.0-beta.2",
"@tauri-apps/plugin-shell": "2.0.0-beta.2",
"@tauri-apps/plugin-updater": "2.0.0-beta.2",
"@zerodevx/svelte-json-view": "1.0.7"
},
"devDependencies": {
"@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-beta.3",
"@tauri-apps/cli": "2.0.0-beta.7",
"@unocss/extractor-svelte": "^0.58.0",
"internal-ip": "^8.0.0",
"svelte": "^4.2.8",
+20
View File
@@ -1,5 +1,25 @@
# Changelog
## \[2.0.0-beta.2]
### Dependencies
- Upgraded to `clipboard-manager@2.0.0-beta.2`
- Upgraded to `dialog@2.0.0-beta.2`
- Upgraded to `http@2.0.0-beta.2`
- Upgraded to `fs@2.0.0-beta.2`
- Upgraded to `shell@2.0.0-beta.2`
- Upgraded to `barcode-scanner@2.0.0-beta.2`
- Upgraded to `biometric@2.0.0-beta.2`
- Upgraded to `cli@2.0.0-beta.2`
- Upgraded to `global-shortcut@2.0.0-beta.2`
- Upgraded to `log-plugin@2.0.0-beta.2`
- Upgraded to `nfc@2.0.0-beta.2`
- Upgraded to `notification@2.0.0-beta.2`
- Upgraded to `os@2.0.0-beta.2`
- Upgraded to `process@2.0.0-beta.2`
- Upgraded to `updater@2.0.0-beta.2`
## \[2.0.0-beta.1]
### Dependencies
+19 -19
View File
@@ -1,7 +1,7 @@
[package]
name = "api"
publish = false
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "An example Tauri Application showcasing the api"
edition = "2021"
rust-version = { workspace = true }
@@ -19,21 +19,21 @@ serde_json = { workspace = true }
serde = { workspace = true }
tiny_http = "0.11"
log = { workspace = true }
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-beta.1" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-beta.1", features = [ "watch" ] }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-beta.1" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-beta.1" }
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-beta.1" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-beta.1", features = [ "windows7-compat" ] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-beta.1" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-beta.1" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.1" }
tauri-plugin-log = { path = "../../../plugins/log", version = "2.0.0-beta.2" }
tauri-plugin-fs = { path = "../../../plugins/fs", version = "2.0.0-beta.2", features = [ "watch" ] }
tauri-plugin-clipboard-manager = { path = "../../../plugins/clipboard-manager", version = "2.0.0-beta.2" }
tauri-plugin-dialog = { path = "../../../plugins/dialog", version = "2.0.0-beta.2" }
tauri-plugin-http = { path = "../../../plugins/http", features = [ "multipart" ], version = "2.0.0-beta.2" }
tauri-plugin-notification = { path = "../../../plugins/notification", version = "2.0.0-beta.2", features = [ "windows7-compat" ] }
tauri-plugin-os = { path = "../../../plugins/os", version = "2.0.0-beta.2" }
tauri-plugin-process = { path = "../../../plugins/process", version = "2.0.0-beta.2" }
tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.2" }
[dependencies.tauri]
workspace = true
features = [
"icon-ico",
"icon-png",
"image-ico",
"image-png",
"isolation",
"macos-private-api",
"tray-icon",
@@ -41,17 +41,17 @@ tauri-plugin-shell = { path = "../../../plugins/shell", version = "2.0.0-beta.1"
]
[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-beta.1" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-beta.1" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-beta.1" }
tauri-plugin-cli = { path = "../../../plugins/cli", version = "2.0.0-beta.2" }
tauri-plugin-global-shortcut = { path = "../../../plugins/global-shortcut", version = "2.0.0-beta.2" }
tauri-plugin-updater = { path = "../../../plugins/updater", version = "2.0.0-beta.2" }
[target."cfg(any(target_os = \"android\", target_os = \"ios\"))".dependencies]
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-beta.1" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-beta.1" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-beta.1" }
tauri-plugin-barcode-scanner = { path = "../../../plugins/barcode-scanner/", version = "2.0.0-beta.2" }
tauri-plugin-nfc = { path = "../../../plugins/nfc", version = "2.0.0-beta.2" }
tauri-plugin-biometric = { path = "../../../plugins/biometric/", version = "2.0.0-beta.2" }
[target."cfg(target_os = \"windows\")".dependencies]
window-shadows = "0.2"
[features]
custom-protocol = [ "tauri/custom-protocol" ]
prod = [ "tauri/custom-protocol" ]
+1 -7
View File
@@ -3,11 +3,5 @@
// SPDX-License-Identifier: MIT
fn main() {
let mut codegen = tauri_build::CodegenContext::new();
if !cfg!(feature = "custom-protocol") {
codegen = codegen.dev();
}
tauri_build::try_build(tauri_build::Attributes::new().codegen(codegen))
.expect("failed to run tauri_build::try_build");
tauri_build::build();
}
@@ -11,6 +11,13 @@
}
]
},
{
"description": "A list of capabilities.",
"type": "array",
"items": {
"$ref": "#/definitions/Capability"
}
},
{
"description": "A list of capabilities.",
"type": "object",
@@ -47,15 +54,22 @@
"default": "",
"type": "string"
},
"context": {
"description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine whether it is allowed or not and its scope.",
"default": "local",
"allOf": [
"remote": {
"description": "Configure remote URLs that can use the capability permissions.",
"anyOf": [
{
"$ref": "#/definitions/CapabilityContext"
"$ref": "#/definitions/CapabilityRemote"
},
{
"type": "null"
}
]
},
"local": {
"description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.",
"default": true,
"type": "boolean"
},
"windows": {
"description": "List of windows that uses this capability. Can be a glob pattern.\n\nOn multiwebview windows, prefer [`Self::webviews`] for a fine grained access control.",
"type": "array",
@@ -78,7 +92,7 @@
}
},
"platforms": {
"description": "Target platforms this capability applies. By default all platforms applies.",
"description": "Target platforms this capability applies. By default all platforms are affected by this capability.",
"default": [
"linux",
"macOS",
@@ -93,42 +107,21 @@
}
}
},
"CapabilityContext": {
"description": "Context of the capability.",
"oneOf": [
{
"description": "Capability refers to local URL usage.",
"type": "string",
"enum": [
"local"
]
},
{
"description": "Capability refers to remote usage.",
"type": "object",
"required": [
"remote"
],
"properties": {
"remote": {
"type": "object",
"required": [
"urls"
],
"properties": {
"urls": {
"description": "Remote domains this capability refers to. Can use glob patterns.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false
"CapabilityRemote": {
"description": "Configuration for remote URLs that are associated with the capability.",
"type": "object",
"required": [
"urls"
],
"properties": {
"urls": {
"description": "Remote domains this capability refers to. Can use glob patterns.",
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"PermissionEntry": {
"description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.",
@@ -2250,32 +2243,48 @@
"items": {
"title": "ScopeEntry",
"description": "HTTP scope entry object definition.",
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"anyOf": [
{
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"type": "string"
},
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"type": "string"
}
}
}
}
]
}
},
"deny": {
"items": {
"title": "ScopeEntry",
"description": "HTTP scope entry object definition.",
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"anyOf": [
{
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"type": "string"
},
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"type": "string"
}
}
}
}
]
}
}
}
@@ -4804,6 +4813,125 @@
"http:deny-fetch-send"
]
},
{
"description": "image:default -> Default permissions for the plugin.",
"type": "string",
"enum": [
"image:default"
]
},
{
"description": "image:allow-from-bytes -> Enables the from_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-from-bytes"
]
},
{
"description": "image:allow-from-ico-bytes -> Enables the from_ico_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-from-ico-bytes"
]
},
{
"description": "image:allow-from-path -> Enables the from_path command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-from-path"
]
},
{
"description": "image:allow-from-png-bytes -> Enables the from_png_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-from-png-bytes"
]
},
{
"description": "image:allow-height -> Enables the height command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-height"
]
},
{
"description": "image:allow-new -> Enables the new command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-new"
]
},
{
"description": "image:allow-rgba -> Enables the rgba command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-rgba"
]
},
{
"description": "image:allow-width -> Enables the width command without any pre-configured scope.",
"type": "string",
"enum": [
"image:allow-width"
]
},
{
"description": "image:deny-from-bytes -> Denies the from_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-from-bytes"
]
},
{
"description": "image:deny-from-ico-bytes -> Denies the from_ico_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-from-ico-bytes"
]
},
{
"description": "image:deny-from-path -> Denies the from_path command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-from-path"
]
},
{
"description": "image:deny-from-png-bytes -> Denies the from_png_bytes command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-from-png-bytes"
]
},
{
"description": "image:deny-height -> Denies the height command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-height"
]
},
{
"description": "image:deny-new -> Denies the new command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-new"
]
},
{
"description": "image:deny-rgba -> Denies the rgba command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-rgba"
]
},
{
"description": "image:deny-width -> Denies the width command without any pre-configured scope.",
"type": "string",
"enum": [
"image:deny-width"
]
},
{
"description": "log:default -> Allows the log command",
"type": "string",
@@ -5728,6 +5856,13 @@
"webview:allow-print"
]
},
{
"description": "webview:allow-reparent -> Enables the reparent command without any pre-configured scope.",
"type": "string",
"enum": [
"webview:allow-reparent"
]
},
{
"description": "webview:allow-set-webview-focus -> Enables the set_webview_focus command without any pre-configured scope.",
"type": "string",
@@ -5798,6 +5933,13 @@
"webview:deny-print"
]
},
{
"description": "webview:deny-reparent -> Denies the reparent command without any pre-configured scope.",
"type": "string",
"enum": [
"webview:deny-reparent"
]
},
{
"description": "webview:deny-set-webview-focus -> Denies the set_webview_focus command without any pre-configured scope.",
"type": "string",
@@ -47,15 +47,22 @@
"default": "",
"type": "string"
},
"context": {
"description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine whether it is allowed or not and its scope.",
"default": "local",
"allOf": [
"remote": {
"description": "Configure remote URLs that can use the capability permissions.",
"anyOf": [
{
"$ref": "#/definitions/CapabilityContext"
"$ref": "#/definitions/CapabilityRemote"
},
{
"type": "null"
}
]
},
"local": {
"description": "Whether this capability is enabled for local app URLs or not. Defaults to `true`.",
"default": true,
"type": "boolean"
},
"windows": {
"description": "List of windows that uses this capability. Can be a glob pattern.\n\nOn multiwebview windows, prefer [`Self::webviews`] for a fine grained access control.",
"type": "array",
@@ -78,7 +85,7 @@
}
},
"platforms": {
"description": "Target platforms this capability applies. By default all platforms applies.",
"description": "Target platforms this capability applies. By default all platforms are affected by this capability.",
"default": [
"linux",
"macOS",
@@ -93,42 +100,21 @@
}
}
},
"CapabilityContext": {
"description": "Context of the capability.",
"oneOf": [
{
"description": "Capability refers to local URL usage.",
"type": "string",
"enum": [
"local"
]
},
{
"description": "Capability refers to remote usage.",
"type": "object",
"required": [
"remote"
],
"properties": {
"remote": {
"type": "object",
"required": [
"urls"
],
"properties": {
"urls": {
"description": "Remote domains this capability refers to. Can use glob patterns.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false
"CapabilityRemote": {
"description": "Configuration for remote URLs that are associated with the capability.",
"type": "object",
"required": [
"urls"
],
"properties": {
"urls": {
"description": "Remote domains this capability refers to. Can use glob patterns.",
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"PermissionEntry": {
"description": "An entry for a permission value in a [`Capability`] can be either a raw permission [`Identifier`] or an object that references a permission and extends its scope.",
@@ -2250,32 +2236,48 @@
"items": {
"title": "ScopeEntry",
"description": "HTTP scope entry object definition.",
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"anyOf": [
{
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"type": "string"
},
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"type": "string"
}
}
}
}
]
}
},
"deny": {
"items": {
"title": "ScopeEntry",
"description": "HTTP scope entry object definition.",
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "A URL that can be accessed by the webview when using the HTTP APIs. The scoped URL is matched against the request URL using a glob pattern.\n\nExamples:\n\n- \"https://*\" or \"https://**\" : allows all HTTPS urls\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"anyOf": [
{
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"type": "string"
},
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
"type": "string"
}
}
}
}
]
}
}
}
@@ -5756,6 +5758,13 @@
"webview:allow-print"
]
},
{
"description": "webview:allow-reparent -> Enables the reparent command without any pre-configured scope.",
"type": "string",
"enum": [
"webview:allow-reparent"
]
},
{
"description": "webview:allow-set-webview-focus -> Enables the set_webview_focus command without any pre-configured scope.",
"type": "string",
@@ -5826,6 +5835,13 @@
"webview:deny-print"
]
},
{
"description": "webview:deny-reparent -> Denies the reparent command without any pre-configured scope.",
"type": "string",
"enum": [
"webview:deny-reparent"
]
},
{
"description": "webview:deny-set-webview-focus -> Denies the set_webview_focus command without any pre-configured scope.",
"type": "string",
+18 -13
View File
@@ -7,7 +7,10 @@ mod cmd;
mod tray;
use serde::Serialize;
use tauri::{webview::WebviewWindowBuilder, App, AppHandle, Manager, RunEvent, WebviewUrl};
use tauri::{
webview::{PageLoadEvent, WebviewWindowBuilder},
App, AppHandle, Manager, RunEvent, WebviewUrl,
};
#[derive(Clone, Serialize)]
struct Reply {
@@ -107,18 +110,20 @@ pub fn run() {
Ok(())
})
.on_page_load(|webview, _| {
let webview_ = webview.clone();
webview.listen("js-event", move |event| {
println!("got js-event with message '{:?}'", event.payload());
let reply = Reply {
data: "something else".to_string(),
};
.on_page_load(|webview, payload| {
if payload.event() == PageLoadEvent::Finished {
let webview_ = webview.clone();
webview.listen("js-event", move |event| {
println!("got js-event with message '{:?}'", event.payload());
let reply = Reply {
data: "something else".to_string(),
};
webview_
.emit("rust-event", Some(reply))
.expect("failed to emit");
});
webview_
.emit("rust-event", Some(reply))
.expect("failed to emit");
});
}
});
#[cfg(target_os = "macos")]
@@ -132,7 +137,7 @@ pub fn run() {
cmd::log_operation,
cmd::perform_request,
])
.build(tauri::tauri_build_context!())
.build(tauri::generate_context!())
.expect("error while building tauri application");
#[cfg(target_os = "macos")]
+7 -4
View File
@@ -79,11 +79,14 @@ pub fn create_tray<R: Runtime>(app: &tauri::AppHandle<R>) -> tauri::Result<()> {
}
i @ "icon-1" | i @ "icon-2" => {
if let Some(tray) = app.tray_by_id("tray-1") {
let _ = tray.set_icon(Some(tauri::Icon::Raw(if i == "icon-1" {
include_bytes!("../icons/icon.ico").to_vec()
let _ = tray.set_icon(Some(if i == "icon-1" {
tauri::Image::from_ico_bytes(include_bytes!("../icons/icon.ico")).unwrap()
} else {
include_bytes!("../icons/tray_icon_with_transparency.png").to_vec()
})));
tauri::Image::from_png_bytes(include_bytes!(
"../icons/tray_icon_with_transparency.png"
))
.unwrap()
}));
}
}
"switch-menu" => {
+4 -4
View File
@@ -1,15 +1,15 @@
<script>
import { getCurrent } from "@tauri-apps/api/window";
import { getCurrent } from "@tauri-apps/api/webview";
import { invoke } from "@tauri-apps/api/core";
import { onMount, onDestroy } from "svelte";
const appWindow = getCurrent();
const webview = getCurrent();
export let onMessage;
let unlisten;
onMount(async () => {
unlisten = await appWindow.listen("rust-event", onMessage);
unlisten = await webview.listen("rust-event", onMessage);
});
onDestroy(() => {
if (unlisten) {
@@ -37,7 +37,7 @@
}
function emitEvent() {
appWindow.emit("js-event", "this is the payload string");
webview.emit("js-event", "this is the payload string");
}
</script>
+1 -1
View File
@@ -53,7 +53,7 @@
const form = new FormData();
form.append("foo", foo);
form.append("bar", bar);
const response = await tauriFetch("http://localhost:3003", {
const response = await tauriFetch("http://localhost:3003/tauri", {
method: "POST",
body: form,
});
+5 -1
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-beta.2]
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -41,4 +45,4 @@
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-authenticator"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Use hardware security-keys in your Tauri App."
authors = { workspace = true }
license = { workspace = true }
+23
View File
@@ -0,0 +1,23 @@
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Include as much of the following information:
- Type of issue (e.g. improper input parsing, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used to help us with reproduction of the issue
- Step-by-step instructions to reproduce the issue
- Ideally a reproduction repository
- Impact of the issue, including how an attacker might exploit the issue
We prefer to receive reports in English.
## Contact
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-authenticator",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"description": "Use hardware security-keys in your Tauri App.",
"license": "MIT or APACHE-2.0",
"authors": [
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
@@ -1,42 +1,12 @@
# Permissions
## allow-init-auth
Enables the init_auth command without any pre-configured scope.
## deny-init-auth
Denies the init_auth command without any pre-configured scope.
## allow-register
Enables the register command without any pre-configured scope.
## deny-register
Denies the register command without any pre-configured scope.
## allow-sign
Enables the sign command without any pre-configured scope.
## deny-sign
Denies the sign command without any pre-configured scope.
## allow-verify-registration
Enables the verify_registration command without any pre-configured scope.
## deny-verify-registration
Denies the verify_registration command without any pre-configured scope.
## allow-verify-signature
Enables the verify_signature command without any pre-configured scope.
## deny-verify-signature
Denies the verify_signature command without any pre-configured scope.
| Permission | Description |
|------|-----|
|`allow-init-auth`|Enables the init_auth command without any pre-configured scope.|
|`deny-init-auth`|Denies the init_auth command without any pre-configured scope.|
|`allow-register`|Enables the register command without any pre-configured scope.|
|`deny-register`|Denies the register command without any pre-configured scope.|
|`allow-sign`|Enables the sign command without any pre-configured scope.|
|`deny-sign`|Denies the sign command without any pre-configured scope.|
|`allow-verify-registration`|Enables the verify_registration command without any pre-configured scope.|
|`deny-verify-registration`|Denies the verify_registration command without any pre-configured scope.|
|`allow-verify-signature`|Enables the verify_signature command without any pre-configured scope.|
|`deny-verify-signature`|Denies the verify_signature command without any pre-configured scope.|
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
+5 -1
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-beta.2]
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -41,4 +45,4 @@
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-autostart"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Automatically launch your application at startup."
authors = { workspace = true }
license = { workspace = true }
+23
View File
@@ -0,0 +1,23 @@
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Include as much of the following information:
- Type of issue (e.g. improper input parsing, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used to help us with reproduction of the issue
- Step-by-step instructions to reproduce the issue
- Ideally a reproduction repository
- Impact of the issue, including how an attacker might exploit the issue
We prefer to receive reports in English.
## Contact
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-autostart",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"license": "MIT or APACHE-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
@@ -1,26 +1,8 @@
# Permissions
## allow-disable
Enables the disable command without any pre-configured scope.
## deny-disable
Denies the disable command without any pre-configured scope.
## allow-enable
Enables the enable command without any pre-configured scope.
## deny-enable
Denies the enable command without any pre-configured scope.
## allow-is-enabled
Enables the is_enabled command without any pre-configured scope.
## deny-is-enabled
Denies the is_enabled command without any pre-configured scope.
| Permission | Description |
|------|-----|
|`allow-disable`|Enables the disable command without any pre-configured scope.|
|`deny-disable`|Denies the disable command without any pre-configured scope.|
|`allow-enable`|Enables the enable command without any pre-configured scope.|
|`deny-enable`|Denies the enable command without any pre-configured scope.|
|`allow-is-enabled`|Enables the is_enabled command without any pre-configured scope.|
|`deny-is-enabled`|Denies the is_enabled command without any pre-configured scope.|
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
+5 -1
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-beta.2]
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -28,4 +32,4 @@
## \[2.0.0-alpha.0]
- [`454428c`](https://github.com/tauri-apps/plugins-workspace/commit/454428cd50ce4962f0bad8e355aebc68af8cc61f)([#536](https://github.com/tauri-apps/plugins-workspace/pull/536)) Initial release.
commit/454428cd50ce4962f0bad8e355aebc68af8cc61f)([#536](https://github.com/tauri-apps/plugins-workspace/pull/536)) Initial release.
commit/454428cd50ce4962f0bad8e355aebc68af8cc61f)([#536](https://github.com/tauri-apps/plugins-workspace/pull/536)) Initial release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-barcode-scanner"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS"
edition = { workspace = true }
authors = { workspace = true }
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-barcode-scanner",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"description": "Scan QR codes, EAN-13 and other kinds of barcodes on Android and iOS",
"license": "MIT or APACHE-2.0",
"authors": [
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
@@ -1,50 +1,14 @@
# Permissions
## allow-cancel
Enables the cancel command without any pre-configured scope.
## deny-cancel
Denies the cancel command without any pre-configured scope.
## allow-check-permissions
Enables the check_permissions command without any pre-configured scope.
## deny-check-permissions
Denies the check_permissions command without any pre-configured scope.
## allow-open-app-settings
Enables the open_app_settings command without any pre-configured scope.
## deny-open-app-settings
Denies the open_app_settings command without any pre-configured scope.
## allow-request-permissions
Enables the request_permissions command without any pre-configured scope.
## deny-request-permissions
Denies the request_permissions command without any pre-configured scope.
## allow-scan
Enables the scan command without any pre-configured scope.
## deny-scan
Denies the scan command without any pre-configured scope.
## allow-vibrate
Enables the vibrate command without any pre-configured scope.
## deny-vibrate
Denies the vibrate command without any pre-configured scope.
| Permission | Description |
|------|-----|
|`allow-cancel`|Enables the cancel command without any pre-configured scope.|
|`deny-cancel`|Denies the cancel command without any pre-configured scope.|
|`allow-check-permissions`|Enables the check_permissions command without any pre-configured scope.|
|`deny-check-permissions`|Denies the check_permissions command without any pre-configured scope.|
|`allow-open-app-settings`|Enables the open_app_settings command without any pre-configured scope.|
|`deny-open-app-settings`|Denies the open_app_settings command without any pre-configured scope.|
|`allow-request-permissions`|Enables the request_permissions command without any pre-configured scope.|
|`deny-request-permissions`|Denies the request_permissions command without any pre-configured scope.|
|`allow-scan`|Enables the scan command without any pre-configured scope.|
|`deny-scan`|Denies the scan command without any pre-configured scope.|
|`allow-vibrate`|Enables the vibrate command without any pre-configured scope.|
|`deny-vibrate`|Denies the vibrate command without any pre-configured scope.|
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
+5 -1
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-beta.2]
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -12,4 +16,4 @@
- [`8df28a9`](https://github.com/tauri-apps/plugins-workspace/commit/8df28a987519ecfa03dcb8635443025f8d010362)([#829](https://github.com/tauri-apps/plugins-workspace/pull/829)) Initial release.
- [`8df28a9`](https://github.com/tauri-apps/plugins-workspace/commit/8df28a987519ecfa03dcb8635443025f8d010362)([#829](https://github.com/tauri-apps/plugins-workspace/pull/829)) Initial release.
commit/8df28a987519ecfa03dcb8635443025f8d010362)([#829](https://github.com/tauri-apps/plugins-workspace/pull/829)) Initial release.
commit/8df28a987519ecfa03dcb8635443025f8d010362)([#829](https://github.com/tauri-apps/plugins-workspace/pull/829)) Initial release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-biometric"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Prompt the user for biometric authentication on Android and iOS."
edition = { workspace = true }
authors = { workspace = true }
+23
View File
@@ -0,0 +1,23 @@
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Include as much of the following information:
- Type of issue (e.g. improper input parsing, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used to help us with reproduction of the issue
- Step-by-step instructions to reproduce the issue
- Ideally a reproduction repository
- Impact of the issue, including how an attacker might exploit the issue
We prefer to receive reports in English.
## Contact
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-biometric",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"license": "MIT or APACHE-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
@@ -27,6 +27,6 @@
"tslib": "2.6.0"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
@@ -1,18 +1,6 @@
# Permissions
## allow-authenticate
Enables the authenticate command without any pre-configured scope.
## deny-authenticate
Denies the authenticate command without any pre-configured scope.
## allow-status
Enables the status command without any pre-configured scope.
## deny-status
Denies the status command without any pre-configured scope.
| Permission | Description |
|------|-----|
|`allow-authenticate`|Enables the authenticate command without any pre-configured scope.|
|`deny-authenticate`|Denies the authenticate command without any pre-configured scope.|
|`allow-status`|Enables the status command without any pre-configured scope.|
|`deny-status`|Denies the status command without any pre-configured scope.|
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
+5 -1
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-beta.2]
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -41,4 +45,4 @@
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-cli"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Parse arguments from your Tauri application's command line interface."
edition = { workspace = true }
authors = { workspace = true }
+23
View File
@@ -0,0 +1,23 @@
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Include as much of the following information:
- Type of issue (e.g. improper input parsing, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used to help us with reproduction of the issue
- Step-by-step instructions to reproduce the issue
- Ideally a reproduction repository
- Impact of the issue, including how an attacker might exploit the issue
We prefer to receive reports in English.
## Contact
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-cli",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"license": "MIT or APACHE-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
@@ -1,14 +1,5 @@
# Permissions
## allow-cli-matches
Enables the cli_matches command without any pre-configured scope.
## deny-cli-matches
Denies the cli_matches command without any pre-configured scope.
## default
Allows reading the CLI matches
| Permission | Description |
|------|-----|
|`allow-cli-matches`|Enables the cli_matches command without any pre-configured scope.|
|`deny-cli-matches`|Denies the cli_matches command without any pre-configured scope.|
|`default`|Allows reading the CLI matches|
+54 -2
View File
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
+6 -1
View File
@@ -1,5 +1,10 @@
# Changelog
## \[2.0.0-beta.2]
- [`dc6d332`](https://github.com/tauri-apps/plugins-workspace/commit/dc6d3321e5305fa8b7250553bd179cbee995998a)([#977](https://github.com/tauri-apps/plugins-workspace/pull/977)) Add support for writing HTML content to the clipboard.
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -41,4 +46,4 @@
## \[2.0.0-alpha.0]
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-clipboard-manager"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Read and write to the system clipboard."
edition = { workspace = true }
authors = { workspace = true }
+1 -1
View File
@@ -60,7 +60,7 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { writeText, readText } from "@tauri-apps/plugin-clipboard-manager";
import { writeText, readText, writeHtml, readHtml, clear } from "@tauri-apps/plugin-clipboard-manager";
await writeText("Tauri is awesome!");
assert(await readText(), "Tauri is awesome!");
```
+23
View File
@@ -0,0 +1,23 @@
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Include as much of the following information:
- Type of issue (e.g. improper input parsing, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used to help us with reproduction of the issue
- Step-by-step instructions to reproduce the issue
- Ideally a reproduction repository
- Impact of the issue, including how an attacker might exploit the issue
We prefer to receive reports in English.
## Contact
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
+40 -1
View File
@@ -53,4 +53,43 @@ async function readText(): Promise<string> {
return kind.plainText.text;
}
export { writeText, readText };
/**
* Writes HTML or fallbacks to write provided plain text to the clipboard.
* @example
* ```typescript
* import { writeHtml, readHtml } from '@tauri-apps/plugin-clipboard-manager';
* await writeHtml('<h1>Tauri is awesome!</h1>', 'plaintext');
* await writeHtml('<h1>Tauri is awesome!</h1>', '<h1>Tauri is awesome</h1>'); // Will write "<h1>Tauri is awesome</h1>" as plain text
* assert(await readText(), '<h1>Tauri is awesome!</h1>');
* ```
*
* @returns A promise indicating the success or failure of the operation.
*
* @since 2.0.0
*/
async function writeHtml(html: string, altHtml?: string): Promise<void> {
return invoke("plugin:clipboard-manager|write_html", {
data: {
html: {
html,
altHtml,
},
},
});
}
/**
* Clears the clipboard.
* @example
* ```typescript
* import { clear } from '@tauri-apps/plugin-clipboard-manager';
* await clear();
* ```
* @since 2.0.0
*/
async function clear(): Promise<void> {
await invoke("plugin:clipboard-manager|clear");
return;
}
export { writeText, readText, writeHtml, clear };
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-clipboard-manager",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"license": "MIT or APACHE-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
@@ -1,18 +1,6 @@
# Permissions
## allow-read
Enables the read command without any pre-configured scope.
## deny-read
Denies the read command without any pre-configured scope.
## allow-write
Enables the write command without any pre-configured scope.
## deny-write
Denies the write command without any pre-configured scope.
| Permission | Description |
|------|-----|
|`allow-read`|Enables the read command without any pre-configured scope.|
|`deny-read`|Denies the read command without any pre-configured scope.|
|`allow-write`|Enables the write command without any pre-configured scope.|
|`deny-write`|Denies the write command without any pre-configured scope.|
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
+1 -1
View File
@@ -1 +1 @@
if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARDMANAGER__=function(e){"use strict";async function n(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}return"function"==typeof SuppressedError&&SuppressedError,e.readText=async function(){return(await n("plugin:clipboard-manager|read")).plainText.text},e.writeText=async function(e,r){return n("plugin:clipboard-manager|write",{data:{plainText:{label:r?.label,text:e}}})},e}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARDMANAGER__})}
if("__TAURI__"in window){var __TAURI_PLUGIN_CLIPBOARDMANAGER__=function(n){"use strict";async function r(n,r={},a){return window.__TAURI_INTERNALS__.invoke(n,r,a)}return"function"==typeof SuppressedError&&SuppressedError,n.clear=async function(){await r("plugin:clipboard-manager|clear")},n.readText=async function(){return(await r("plugin:clipboard-manager|read")).plainText.text},n.writeHtml=async function(n,a){return r("plugin:clipboard-manager|write_html",{data:{html:{html:n,altHtml:a}}})},n.writeText=async function(n,a){return r("plugin:clipboard-manager|write",{data:{plainText:{label:a?.label,text:n}}})},n}({});Object.defineProperty(window.__TAURI__,"clipboardManager",{value:__TAURI_PLUGIN_CLIPBOARDMANAGER__})}
+17
View File
@@ -22,3 +22,20 @@ pub(crate) async fn read<R: Runtime>(
) -> Result<ClipboardContents> {
clipboard.read()
}
#[command]
pub(crate) async fn write_html<R: Runtime>(
_app: AppHandle<R>,
clipboard: State<'_, Clipboard<R>>,
data: ClipKind,
) -> Result<()> {
clipboard.write_html(data)
}
#[command]
pub(crate) async fn clear<R: Runtime>(
_app: AppHandle<R>,
clipboard: State<'_, Clipboard<R>>,
) -> Result<()> {
clipboard.clear()
}
+27 -4
View File
@@ -28,10 +28,12 @@ pub struct Clipboard<R: Runtime> {
impl<R: Runtime> Clipboard<R> {
pub fn write(&self, kind: ClipKind) -> crate::Result<()> {
let ClipKind::PlainText { text, .. } = kind;
match &self.clipboard {
Ok(clipboard) => clipboard.lock().unwrap().set_text(text).map_err(Into::into),
Err(e) => Err(crate::Error::Clipboard(e.to_string())),
match kind {
ClipKind::PlainText { text, .. } => match &self.clipboard {
Ok(clipboard) => clipboard.lock().unwrap().set_text(text).map_err(Into::into),
Err(e) => Err(crate::Error::Clipboard(e.to_string())),
},
_ => Err(crate::Error::Clipboard("Invalid clip kind!".to_string())),
}
}
@@ -44,4 +46,25 @@ impl<R: Runtime> Clipboard<R> {
Err(e) => Err(crate::Error::Clipboard(e.to_string())),
}
}
pub fn write_html(&self, kind: ClipKind) -> crate::Result<()> {
match kind {
ClipKind::Html { html, alt_html, .. } => match &self.clipboard {
Ok(clipboard) => clipboard
.lock()
.unwrap()
.set_html(html, alt_html)
.map_err(Into::into),
Err(e) => Err(crate::Error::Clipboard(e.to_string())),
},
_ => Err(crate::Error::Clipboard("Invalid clip kind!".to_string())),
}
}
pub fn clear(&self) -> crate::Result<()> {
match &self.clipboard {
Ok(clipboard) => clipboard.lock().unwrap().clear().map_err(Into::into),
Err(e) => Err(crate::Error::Clipboard(e.to_string())),
}
}
}
-1
View File
@@ -11,7 +11,6 @@ pub enum Error {
#[cfg(mobile)]
#[error(transparent)]
PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError),
#[cfg(desktop)]
#[error("{0}")]
Clipboard(String),
}
+8 -1
View File
@@ -49,7 +49,14 @@ impl<R: Runtime, T: Manager<R>> crate::ClipboardExt<R> for T {
pub fn init<R: Runtime>() -> TauriPlugin<R> {
Builder::new("clipboard-manager")
.js_init_script(include_str!("api-iife.js").to_string())
.invoke_handler(tauri::generate_handler![commands::write, commands::read])
.invoke_handler(tauri::generate_handler![
commands::write,
commands::read,
#[cfg(desktop)]
commands::write_html,
#[cfg(desktop)]
commands::clear
])
.setup(|app, api| {
#[cfg(mobile)]
let clipboard = mobile::init(app, api)?;
+13
View File
@@ -39,4 +39,17 @@ impl<R: Runtime> Clipboard<R> {
pub fn read(&self) -> crate::Result<ClipboardContents> {
self.0.run_mobile_plugin("read", ()).map_err(Into::into)
}
// Treat HTML as unsupported on mobile until tested
pub fn write_html(&self, _kind: ClipKind) -> crate::Result<()> {
Err(crate::Error::Clipboard(
"Unsupported on this platform".to_string(),
))
}
pub fn clear(&self) -> crate::Result<()> {
Err(crate::Error::Clipboard(
"Unsupported on this platform".to_string(),
))
}
}
+8 -1
View File
@@ -7,7 +7,14 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub enum ClipKind {
PlainText { label: Option<String>, text: String },
PlainText {
label: Option<String>,
text: String,
},
Html {
html: String,
alt_html: Option<String>,
},
}
#[derive(Debug, Serialize, Deserialize)]
+5 -1
View File
@@ -1,5 +1,9 @@
# Changelog
## \[2.0.0-beta.2]
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -36,4 +40,4 @@
- [`eccd6f9`](https://github.com/tauri-apps/plugins-workspace/commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
- [`eccd6f9`](https://github.com/tauri-apps/plugins-workspace/commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
commit/eccd6f977af7629255b6f5a5205666c9079a86ed)([#504](https://github.com/tauri-apps/plugins-workspace/pull/504)) Initial release.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-deep-link"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Set your Tauri application as the default handler for an URL"
authors = { workspace = true }
license = { workspace = true }
+23
View File
@@ -0,0 +1,23 @@
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Include as much of the following information:
- Type of issue (e.g. improper input parsing, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used to help us with reproduction of the issue
- Step-by-step instructions to reproduce the issue
- Ideally a reproduction repository
- Impact of the issue, including how an attacker might exploit the issue
We prefer to receive reports in English.
## Contact
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
@@ -1,5 +1,11 @@
# Changelog
## \[2.0.0-beta.2]
### Dependencies
- Upgraded to `deep-link-js@2.0.0-beta.2`
## \[2.0.0-beta.1]
### Dependencies
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "deep-link-example",
"private": true,
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"type": "module",
"scripts": {
"dev": "vite",
@@ -10,11 +10,11 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2",
"@tauri-apps/plugin-deep-link": "2.0.0-beta.1"
"@tauri-apps/api": "2.0.0-beta.4",
"@tauri-apps/plugin-deep-link": "2.0.0-beta.2"
},
"devDependencies": {
"@tauri-apps/cli": "2.0.0-beta.3",
"@tauri-apps/cli": "2.0.0-beta.7",
"internal-ip": "^8.0.0",
"typescript": "^5.2.2",
"vite": "^5.0.12"
@@ -26,4 +26,4 @@ tauri-plugin-deep-link = { path = "../../../" }
# this feature is used for production builds or when `devUrl` points to the filesystem and the built-in dev server is disabled.
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes.
# DO NOT REMOVE!!
custom-protocol = [ "tauri/custom-protocol" ]
prod = ["tauri/custom-protocol"]
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-deep-link",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"description": "Set your Tauri application as the default handler for an URL",
"license": "MIT or APACHE-2.0",
"authors": [
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
@@ -1,14 +1,5 @@
# Permissions
## allow-get-current
Enables the get_current command without any pre-configured scope.
## deny-get-current
Denies the get_current command without any pre-configured scope.
## default
Allows reading the opened deep link via the get_current command
| Permission | Description |
|------|-----|
|`allow-get-current`|Enables the get_current command without any pre-configured scope.|
|`deny-get-current`|Denies the get_current command without any pre-configured scope.|
|`default`|Allows reading the opened deep link via the get_current command|
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
+10 -1
View File
@@ -1,5 +1,10 @@
# Changelog
## \[2.0.0-beta.2]
- [`aa25c91`](https://github.com/tauri-apps/plugins-workspace/commit/aa25c91bb01e957872fb2b606a3acaf2f2c4ef3a)([#978](https://github.com/tauri-apps/plugins-workspace/pull/978)) Allow configuring `canCreateDirectories` for open and save dialogs on macOS, if not configured, it will be set to `true` by default.
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -87,5 +92,9 @@
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
pull/371)) First v2 alpha release!
kspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
kspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
pull/371)) First v2 alpha release!
71](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
pull/371)) First v2 alpha release!
kspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
pull/371)) First v2 alpha release!
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-dialog"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Native system dialogs for opening and saving files along with message dialogs on your Tauri application."
edition = { workspace = true }
authors = { workspace = true }
@@ -22,7 +22,7 @@ serde_json = { workspace = true }
tauri = { workspace = true }
log = { workspace = true }
thiserror = { workspace = true }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.1" }
tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.2" }
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies]
glib = "0.16"
+23
View File
@@ -0,0 +1,23 @@
# Security Policy
**Do not report security vulnerabilities through public GitHub issues.**
**Please use the [Private Vulnerability Disclosure](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) feature of GitHub.**
Include as much of the following information:
- Type of issue (e.g. improper input parsing, privilege escalation, etc.)
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- The distribution affected or used to help us with reproduction of the issue
- Step-by-step instructions to reproduce the issue
- Ideally a reproduction repository
- Impact of the issue, including how an attacker might exploit the issue
We prefer to receive reports in English.
## Contact
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
+4
View File
@@ -55,6 +55,8 @@ interface OpenDialogOptions {
* Defines whether subdirectories will be allowed on the scope or not.
*/
recursive?: boolean;
/** Whether to allow creating directories in the dialog. Enabled by default. **macOS Only** */
canCreateDirectories?: boolean;
}
/**
@@ -73,6 +75,8 @@ interface SaveDialogOptions {
* If it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder.
*/
defaultPath?: string;
/** Whether to allow creating directories in the dialog. Enabled by default. **macOS Only** */
canCreateDirectories?: boolean;
}
/**
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-dialog",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"license": "MIT or APACHE-2.0",
"authors": [
"Tauri Programme within The Commons Conservancy"
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
@@ -1,42 +1,12 @@
# Permissions
## allow-ask
Enables the ask command without any pre-configured scope.
## deny-ask
Denies the ask command without any pre-configured scope.
## allow-confirm
Enables the confirm command without any pre-configured scope.
## deny-confirm
Denies the confirm command without any pre-configured scope.
## allow-message
Enables the message command without any pre-configured scope.
## deny-message
Denies the message command without any pre-configured scope.
## allow-open
Enables the open command without any pre-configured scope.
## deny-open
Denies the open command without any pre-configured scope.
## allow-save
Enables the save command without any pre-configured scope.
## deny-save
Denies the save command without any pre-configured scope.
| Permission | Description |
|------|-----|
|`allow-ask`|Enables the ask command without any pre-configured scope.|
|`deny-ask`|Denies the ask command without any pre-configured scope.|
|`allow-confirm`|Enables the confirm command without any pre-configured scope.|
|`deny-confirm`|Denies the confirm command without any pre-configured scope.|
|`allow-message`|Enables the message command without any pre-configured scope.|
|`deny-message`|Denies the message command without any pre-configured scope.|
|`allow-open`|Enables the open command without any pre-configured scope.|
|`deny-open`|Denies the open command without any pre-configured scope.|
|`allow-save`|Enables the save command without any pre-configured scope.|
|`deny-save`|Denies the save command without any pre-configured scope.|
+54 -2
View File
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
+10
View File
@@ -51,6 +51,8 @@ pub struct OpenDialogOptions {
#[serde(default)]
#[cfg_attr(mobile, allow(dead_code))]
recursive: bool,
/// Whether to allow creating directories in the dialog **macOS Only**
can_create_directories: Option<bool>,
}
/// The options for the save dialog API.
@@ -65,6 +67,8 @@ pub struct SaveDialogOptions {
filters: Vec<DialogFilter>,
/// The initial path of the dialog.
default_path: Option<PathBuf>,
/// Whether to allow creating directories in the dialog **macOS Only**
can_create_directories: Option<bool>,
}
fn set_default_path<R: Runtime>(
@@ -105,6 +109,9 @@ pub(crate) async fn open<R: Runtime>(
if let Some(default_path) = options.default_path {
dialog_builder = set_default_path(dialog_builder, default_path);
}
if let Some(can) = options.can_create_directories {
dialog_builder = dialog_builder.set_can_create_directories(can);
}
for filter in options.filters {
let extensions: Vec<&str> = filter.extensions.iter().map(|s| &**s).collect();
dialog_builder = dialog_builder.add_filter(filter.name, &extensions);
@@ -185,6 +192,9 @@ pub(crate) async fn save<R: Runtime>(
if let Some(default_path) = options.default_path {
dialog_builder = set_default_path(dialog_builder, default_path);
}
if let Some(can) = options.can_create_directories {
dialog_builder = dialog_builder.set_can_create_directories(can);
}
for filter in options.filters {
let extensions: Vec<&str> = filter.extensions.iter().map(|s| &**s).collect();
dialog_builder = dialog_builder.add_filter(filter.name, &extensions);
+13 -47
View File
@@ -11,6 +11,7 @@
use std::path::PathBuf;
use raw_window_handle::{HasWindowHandle, RawWindowHandle};
use rfd::{AsyncFileDialog, AsyncMessageDialog};
use serde::de::DeserializeOwned;
use tauri::{plugin::PluginApi, AppHandle, Runtime};
@@ -18,16 +19,6 @@ use crate::{models::*, FileDialogBuilder, MessageDialogBuilder};
const OK: &str = "Ok";
#[cfg(target_os = "linux")]
type FileDialog = rfd::FileDialog;
#[cfg(not(target_os = "linux"))]
type FileDialog = rfd::AsyncFileDialog;
#[cfg(target_os = "linux")]
type MessageDialog = rfd::MessageDialog;
#[cfg(not(target_os = "linux"))]
type MessageDialog = rfd::AsyncMessageDialog;
pub fn init<R: Runtime, C: DeserializeOwned>(
app: &AppHandle<R>,
_api: PluginApi<R, C>,
@@ -51,40 +42,18 @@ impl<R: Runtime> Dialog<R> {
}
}
#[cfg(not(target_os = "linux"))]
macro_rules! run_dialog {
($e:expr, $h: expr) => {{
std::thread::spawn(move || $h(tauri::async_runtime::block_on($e)));
}};
}
#[cfg(target_os = "linux")]
macro_rules! run_dialog {
($e:expr, $h: ident) => {{
std::thread::spawn(move || {
let context = glib::MainContext::default();
context.invoke_with_priority(glib::PRIORITY_HIGH, move || $h($e));
});
}};
}
#[cfg(not(target_os = "linux"))]
macro_rules! run_file_dialog {
($e:expr, $h: ident) => {{
std::thread::spawn(move || $h(tauri::async_runtime::block_on($e)));
}};
}
#[cfg(target_os = "linux")]
macro_rules! run_file_dialog {
($e:expr, $h: ident) => {{
std::thread::spawn(move || {
let context = glib::MainContext::default();
context.invoke_with_priority(glib::PRIORITY_HIGH, move || $h($e));
});
}};
}
impl From<MessageDialogKind> for rfd::MessageLevel {
fn from(kind: MessageDialogKind) -> Self {
match kind {
@@ -105,9 +74,9 @@ impl HasWindowHandle for WindowHandle {
}
}
impl<R: Runtime> From<FileDialogBuilder<R>> for FileDialog {
impl<R: Runtime> From<FileDialogBuilder<R>> for AsyncFileDialog {
fn from(d: FileDialogBuilder<R>) -> Self {
let mut builder = FileDialog::new();
let mut builder = AsyncFileDialog::new();
if let Some(title) = d.title {
builder = builder.set_title(title);
@@ -127,13 +96,15 @@ impl<R: Runtime> From<FileDialogBuilder<R>> for FileDialog {
builder = builder.set_parent(&WindowHandle(parent));
}
builder = builder.set_can_create_directories(d.can_create_directories.unwrap_or(true));
builder
}
}
impl<R: Runtime> From<MessageDialogBuilder<R>> for MessageDialog {
impl<R: Runtime> From<MessageDialogBuilder<R>> for AsyncMessageDialog {
fn from(d: MessageDialogBuilder<R>) -> Self {
let mut dialog = MessageDialog::new()
let mut dialog = AsyncMessageDialog::new()
.set_title(&d.title)
.set_description(&d.message)
.set_level(d.kind.into());
@@ -160,49 +131,44 @@ pub fn pick_file<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
dialog: FileDialogBuilder<R>,
f: F,
) {
#[cfg(not(target_os = "linux"))]
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf()));
run_file_dialog!(FileDialog::from(dialog).pick_file(), f)
run_file_dialog!(AsyncFileDialog::from(dialog).pick_file(), f)
}
pub fn pick_files<R: Runtime, F: FnOnce(Option<Vec<PathBuf>>) + Send + 'static>(
dialog: FileDialogBuilder<R>,
f: F,
) {
#[cfg(not(target_os = "linux"))]
let f = |paths: Option<Vec<rfd::FileHandle>>| {
f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect()))
};
run_file_dialog!(FileDialog::from(dialog).pick_files(), f)
run_file_dialog!(AsyncFileDialog::from(dialog).pick_files(), f)
}
pub fn pick_folder<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
dialog: FileDialogBuilder<R>,
f: F,
) {
#[cfg(not(target_os = "linux"))]
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf()));
run_file_dialog!(FileDialog::from(dialog).pick_folder(), f)
run_file_dialog!(AsyncFileDialog::from(dialog).pick_folder(), f)
}
pub fn pick_folders<R: Runtime, F: FnOnce(Option<Vec<PathBuf>>) + Send + 'static>(
dialog: FileDialogBuilder<R>,
f: F,
) {
#[cfg(not(target_os = "linux"))]
let f = |paths: Option<Vec<rfd::FileHandle>>| {
f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect()))
};
run_file_dialog!(FileDialog::from(dialog).pick_folders(), f)
run_file_dialog!(AsyncFileDialog::from(dialog).pick_folders(), f)
}
pub fn save_file<R: Runtime, F: FnOnce(Option<PathBuf>) + Send + 'static>(
dialog: FileDialogBuilder<R>,
f: F,
) {
#[cfg(not(target_os = "linux"))]
let f = |path: Option<rfd::FileHandle>| f(path.map(|p| p.path().to_path_buf()));
run_file_dialog!(FileDialog::from(dialog).save_file(), f)
run_file_dialog!(AsyncFileDialog::from(dialog).save_file(), f)
}
/// Shows a message dialog
@@ -221,5 +187,5 @@ pub fn show_message_dialog<R: Runtime, F: FnOnce(bool) + Send + 'static>(
});
};
run_dialog!(MessageDialog::from(dialog).show(), f);
run_dialog!(AsyncMessageDialog::from(dialog).show(), f);
}
+8
View File
@@ -267,6 +267,7 @@ pub struct FileDialogBuilder<R: Runtime> {
pub(crate) starting_directory: Option<PathBuf>,
pub(crate) file_name: Option<String>,
pub(crate) title: Option<String>,
pub(crate) can_create_directories: Option<bool>,
#[cfg(desktop)]
pub(crate) parent: Option<raw_window_handle::RawWindowHandle>,
}
@@ -291,6 +292,7 @@ impl<R: Runtime> FileDialogBuilder<R> {
starting_directory: None,
file_name: None,
title: None,
can_create_directories: None,
#[cfg(desktop)]
parent: None,
}
@@ -345,6 +347,12 @@ impl<R: Runtime> FileDialogBuilder<R> {
self
}
/// Set whether it should be possible to create new directories in the dialog. Enabled by default. **macOS only**.
pub fn set_can_create_directories(mut self, can: bool) -> Self {
self.can_create_directories.replace(can);
self
}
/// Shows the dialog to select a single file.
/// This is not a blocking operation,
/// and should be used when running on the main thread to avoid deadlocks with the event loop.
+8 -1
View File
@@ -1,5 +1,10 @@
# Changelog
## \[2.0.0-beta.2]
- [`7358102`](https://github.com/tauri-apps/plugins-workspace/commit/735810237e21504a027a65a7b3c25fd7e594288a)([#1029](https://github.com/tauri-apps/plugins-workspace/pull/1029)) Fix infinite loop on cargo build operations
- [`99bea25`](https://github.com/tauri-apps/plugins-workspace/commit/99bea2559c2c0648c2519c50a18cd124dacef57b)([#1005](https://github.com/tauri-apps/plugins-workspace/pull/1005)) Update to tauri beta.8.
## \[2.0.0-beta.1]
- [`569defb`](https://github.com/tauri-apps/plugins-workspace/commit/569defbe9492e38938554bb7bdc1be9151456d21) Update to tauri beta.4.
@@ -55,4 +60,6 @@
- [`717ae67`](https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
ae67\`]\(https://github.com/tauri-apps/plugins-workspace/commit/717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
717ae670978feb4492fac1f295998b93f2b9347f)([#371](https://github.com/tauri-apps/plugins-workspace/pull/371)) First v2 alpha release!
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-fs"
version = "2.0.0-beta.1"
version = "2.0.0-beta.2"
description = "Access the file system."
authors = { workspace = true }
license = { workspace = true }
+5 -2
View File
@@ -154,8 +154,11 @@ permissions = [
]"###
);
std::fs::write(base_dirs.join(format!("{lower}.toml")), toml)
.unwrap_or_else(|e| panic!("unable to autogenerate ${upper}: {e}"));
let permission_path = base_dirs.join(format!("{lower}.toml"));
if toml != std::fs::read_to_string(&permission_path).unwrap_or_default() {
std::fs::write(permission_path, toml)
.unwrap_or_else(|e| panic!("unable to autogenerate ${lower}: {e}"));
}
}
tauri_plugin::Builder::new(COMMANDS)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@tauri-apps/plugin-fs",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"description": "Access the file system.",
"license": "MIT or APACHE-2.0",
"authors": [
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.2"
"@tauri-apps/api": "2.0.0-beta.4"
}
}
File diff suppressed because it is too large Load Diff
+54 -2
View File
@@ -17,7 +17,6 @@
},
"set": {
"description": "A list of permissions sets defined",
"default": [],
"type": "array",
"items": {
"$ref": "#/definitions/PermissionSet"
@@ -132,12 +131,25 @@
},
"scope": {
"description": "Allowed or denied scoped when using this permission.",
"default": {},
"allOf": [
{
"$ref": "#/definitions/Scopes"
}
]
},
"platforms": {
"description": "Target platforms this permission applies. By default all platforms are affected by this permission.",
"default": [
"linux",
"macOS",
"windows",
"android",
"iOS"
],
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
@@ -243,6 +255,46 @@
}
]
},
"Target": {
"description": "Platform target.",
"oneOf": [
{
"description": "MacOS.",
"type": "string",
"enum": [
"macOS"
]
},
{
"description": "Windows.",
"type": "string",
"enum": [
"windows"
]
},
{
"description": "Linux.",
"type": "string",
"enum": [
"linux"
]
},
{
"description": "Android.",
"type": "string",
"enum": [
"android"
]
},
{
"description": "iOS.",
"type": "string",
"enum": [
"iOS"
]
}
]
},
"PermissionKind": {
"type": "string",
"oneOf": [
File diff suppressed because one or more lines are too long
+1 -3
View File
@@ -809,9 +809,7 @@ pub fn resolve_path<R: Runtime>(
) -> CommandResult<PathBuf> {
let path = file_url_to_safe_pathbuf(path)?;
let path = if let Some(base_dir) = base_dir {
app.path()
.resolve(&path, base_dir)
.map_err(Error::CannotResolvePath)?
app.path().resolve(&path, base_dir)?
} else {
path.as_ref().to_path_buf()
};
-2
View File
@@ -16,8 +16,6 @@ pub enum Error {
Io(#[from] std::io::Error),
#[error("forbidden path: {0}")]
PathForbidden(PathBuf),
#[error("failed to resolve path: {0}")]
CannotResolvePath(tauri::path::Error),
/// Invalid glob pattern.
#[error("invalid glob pattern: {0}")]
GlobPattern(#[from] glob::PatternError),

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