diff --git a/.changes/config.json b/.changes/config.json index d89ed2b6..78bcd57b 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -187,7 +187,6 @@ "path": "./plugins/log", "manager": "javascript" }, - "nfc": { "path": "./plugins/nfc", "manager": "rust" @@ -196,7 +195,6 @@ "path": "./plugins/nfc", "manager": "javascript" }, - "notification": { "path": "./plugins/notification", "manager": "rust" diff --git a/.changes/msrv-1.75.md b/.changes/msrv-1.75.md new file mode 100644 index 00000000..c694ae87 --- /dev/null +++ b/.changes/msrv-1.75.md @@ -0,0 +1,32 @@ +--- +"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 +--- + +Update MSRV to 1.75. diff --git a/.changes/pre.json b/.changes/pre.json index 89f431c0..310d3c47 100644 --- a/.changes/pre.json +++ b/.changes/pre.json @@ -1,95 +1,4 @@ { - "tag": "alpha", - "changes": [ - ".changes/alpha.16.md", - ".changes/alpha.17.md", - ".changes/alpha.18.md", - ".changes/alpha.20.md", - ".changes/api-alpha.11.md", - ".changes/api-alpha.12.md", - ".changes/api-alpha.13.md", - ".changes/api-alpha.9.md", - ".changes/beta.md", - ".changes/biometric-initial-release.md", - ".changes/deep-link-initial-release.md", - ".changes/dialog-async-message-dialog.md", - ".changes/dialog-default-path-windows-slash.md", - ".changes/dialog-export-fileresponse.md", - ".changes/dialog-message-android.md", - ".changes/dialog-pin-rfd.md", - ".changes/dialog-return-result.md", - ".changes/fix-cmd-spawn-deadlock.md", - ".changes/fix-debounced-event-type.md", - ".changes/fix-deep-link-alpha-20.md", - ".changes/fix-docs-build.md", - ".changes/fix-emit-all-usage.md", - ".changes/fix-fs-write-default-option.md", - ".changes/fix-invoke-usage.md", - ".changes/fix-notification-schedule-export.md", - ".changes/fix-number-query-params.md", - ".changes/fix-permission-notification.md", - ".changes/fix-scheduled-notification.md", - ".changes/fix-updater-macos.md", - ".changes/fix-window-state-api.md", - ".changes/fs-create-new.md", - ".changes/fs-exists-2nd-arg.md", - ".changes/fs-improve-error-message.md", - ".changes/fs-improved-apis.md", - ".changes/fs-replace-notify-debouncer.md", - ".changes/fs-scope-tauri.md", - ".changes/fs-trunacte-non-append.md", - ".changes/fs-unwtach-rid.md", - ".changes/fs-wiret-binary-file.md", - ".changes/fs-write-panic.md", - ".changes/global-shortcut-app-handle.md", - ".changes/http-init-fetch-option-connectTimeout.md", - ".changes/http-multipart-refactor.md", - ".changes/http-plugin-refactor.md", - ".changes/http-proxy-config.md", - ".changes/http-remove-cmd-property.md", - ".changes/http-response.md", - ".changes/msrv-1.70.md", - ".changes/nfc-initial-release.md", - ".changes/notification-init-script.md", - ".changes/notification-revert-sound.md", - ".changes/notification-sound.md", - ".changes/os-OsType.md", - ".changes/os-plugin-refactor.md", - ".changes/os-reading-undefined.md", - ".changes/permissions.md", - ".changes/persisted-scope-asset.md", - ".changes/persisted-scope-glob.md", - ".changes/positioner-tray-flag.md", - ".changes/scanner-initial-release.md", - ".changes/shell-command-apis.md", - ".changes/shell-detached.md", - ".changes/sql-decode-floats.md", - ".changes/stronghold-arg-name.md", - ".changes/stronghold-argon2.md", - ".changes/stronghold-constructor.md", - ".changes/tauri-alpha-15.md", - ".changes/tauri-alpha.11.md", - ".changes/tauri-alpha.12.md", - ".changes/tauri-http-plugin-errror-invalid-rid.md", - ".changes/tray-position.md", - ".changes/updater-appimage.md", - ".changes/updater-escaped-path.md", - ".changes/updater-js-started-event.md", - ".changes/updater-nsis-admin.md", - ".changes/updater-nsis-basicui.md", - ".changes/updater-nsis.md", - ".changes/updater-on-chunk-fn-mut.md", - ".changes/updater-plugin-refactor.md", - ".changes/updater-proxy.md", - ".changes/updater-string-replace-round2.md", - ".changes/updater-string-replace.md", - ".changes/updater.md", - ".changes/upload-bufwriter.md", - ".changes/v2-alpha.md", - ".changes/websocket-fix-arg-name.md", - ".changes/websocket-headers.md", - ".changes/window-state-decorated.md", - ".changes/window-state-promise.md", - ".changes/window-state-zero-positions.md" - ] + "tag": "beta", + "changes": [".changes/beta.md"] } diff --git a/.changes/tauri-beta-4.md b/.changes/tauri-beta-4.md new file mode 100644 index 00000000..53026485 --- /dev/null +++ b/.changes/tauri-beta-4.md @@ -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.4. diff --git a/.github/workflows/test-rust.yml b/.github/workflows/test-rust.yml index 805ac4f8..ead80be3 100644 --- a/.github/workflows/test-rust.yml +++ b/.github/workflows/test-rust.yml @@ -175,7 +175,7 @@ jobs: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append vcpkg install openssl:x64-windows-static-md - - uses: dtolnay/rust-toolchain@1.70.0 + - uses: dtolnay/rust-toolchain@1.75.0 with: targets: ${{ matrix.platform.target }} diff --git a/.scripts/ci/check-license-header.js b/.scripts/ci/check-license-header.js index 2f7b7909..7c69bb33 100644 --- a/.scripts/ci/check-license-header.js +++ b/.scripts/ci/check-license-header.js @@ -27,12 +27,13 @@ const ignore = [ "api-iife.js", "init-iife.js", ".build", + "notify_rust", ]; async function checkFile(file) { if ( extensions.some((e) => file.endsWith(e)) && - !ignore.some((i) => file.endsWith(i)) + !ignore.some((i) => file.includes(`${path.sep}${i}`)) ) { const fileStream = fs.createReadStream(file); const rl = readline.createInterface({ diff --git a/Cargo.lock b/Cargo.lock index 23cb9111..14cdd89b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,9 +50,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -80,7 +80,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead 0.5.2", - "aes 0.8.3", + "aes 0.8.4", "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", @@ -89,23 +89,23 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -176,9 +176,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" dependencies = [ "anstyle", "anstyle-parse", @@ -190,43 +190,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "api" @@ -265,18 +265,18 @@ dependencies = [ "tauri", "tauri-build", "tauri-plugin-updater", - "time 0.3.30", + "time", "tiny_http 0.11.0", ] [[package]] name = "arboard" -version = "3.3.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafb29b107435aa276664c1db8954ac27a6e105cdad3c88287a199eb0e313c08" +checksum = "1faa3c733d9a3dd6fbaf85da5d162a2e03b2e0033a90dceb0e2a90fdd1e5380a" dependencies = [ "clipboard-win", - "core-graphics 0.22.3", + "core-graphics 0.23.1", "image", "log", "objc", @@ -284,8 +284,8 @@ dependencies = [ "objc_id", "parking_lot", "thiserror", - "winapi 0.3.9", - "x11rb 0.12.0", + "windows-sys 0.48.0", + "x11rb", ] [[package]] @@ -312,6 +312,23 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" +[[package]] +name = "ashpd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b22517ee647547c01a687cf9b76074e1c91334032a4324f7243c6ee0f949390" +dependencies = [ + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.8.5", + "serde", + "serde_repr", + "tokio", + "url", + "zbus", +] + [[package]] name = "assert-json-diff" version = "2.0.2" @@ -324,32 +341,34 @@ dependencies = [ [[package]] name = "async-broadcast" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" dependencies = [ - "event-listener 2.5.3", + "event-listener 5.1.0", + "event-listener-strategy 0.5.0", "futures-core", + "pin-project-lite", ] [[package]] name = "async-channel" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 3.1.0", - "event-listener-strategy", + "event-listener 5.1.0", + "event-listener-strategy 0.5.0", "futures-core", "pin-project-lite", ] [[package]] name = "async-compression" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" +checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" dependencies = [ "brotli", "flate2", @@ -361,68 +380,46 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5ea910c42e5ab19012bab31f53cb4d63d54c3a27730f9a833a88efcf4bb52d" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ - "async-lock 3.1.1", + "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.0.1", + "fastrand", + "futures-lite", "slab", ] [[package]] name = "async-fs" -version = "1.6.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +checksum = "bc19683171f287921f2405677dd2ed2549c3b3bda697a563ebc3a121ace2aba1" dependencies = [ - "async-lock 2.8.0", - "autocfg", + "async-lock 3.3.0", "blocking", - "futures-lite 1.13.0", + "futures-lite", ] [[package]] name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ - "async-lock 3.1.1", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.0.1", + "futures-lite", "parking", - "polling 3.3.0", - "rustix 0.38.25", + "polling", + "rustix", "slab", "tracing", - "waker-fn", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -436,30 +433,31 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.1.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655b9c7fe787d3b25cc0f804a1a8401790f0c5bc395beb5a64dc77d8de079105" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 3.1.0", - "event-listener-strategy", + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", "pin-project-lite", ] [[package]] name = "async-process" -version = "1.8.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +checksum = "451e3cf68011bd56771c79db04a9e333095ab6349f7e47592b788e9b98720cc8" dependencies = [ - "async-io 1.13.0", - "async-lock 2.8.0", + "async-channel", + "async-io", + "async-lock 3.3.0", "async-signal", "blocking", "cfg-if", - "event-listener 3.1.0", - "futures-lite 1.13.0", - "rustix 0.38.25", - "windows-sys 0.48.0", + "event-listener 5.1.0", + "futures-lite", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -470,7 +468,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -479,13 +477,13 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" dependencies = [ - "async-io 2.2.0", + "async-io", "async-lock 2.8.0", "atomic-waker", "cfg-if", "futures-core", "futures-io", - "rustix 0.38.25", + "rustix", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -493,19 +491,19 @@ dependencies = [ [[package]] name = "async-task" -version = "4.5.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -515,7 +513,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", - "glib 0.18.3", + "glib 0.18.5", "libc", ] @@ -548,14 +546,25 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "atomic-write-file" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c232177ba50b16fe7a4588495bd474a62a9e45a8e4ca6fd7d0b7ac29d164631e" +checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" dependencies = [ - "nix 0.26.4", + "nix 0.27.1", "rand 0.8.5", ] +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi 0.3.9", +] + [[package]] name = "authenticator" version = "0.3.1" @@ -613,9 +622,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -632,6 +641,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bit_field" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" + [[package]] name = "bitflags" version = "1.3.2" @@ -640,9 +655,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -710,20 +725,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel", - "async-lock 3.1.1", + "async-lock 3.3.0", "async-task", - "fastrand 2.0.1", + "fastrand", "futures-io", - "futures-lite 2.0.1", + "futures-lite", "piper", "tracing", ] [[package]] name = "borsh" -version = "1.3.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" +checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" dependencies = [ "borsh-derive", "cfg_aliases 0.1.1", @@ -731,15 +746,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" +checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", "syn_derive", ] @@ -766,9 +781,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" [[package]] name = "byte-unit" @@ -783,9 +798,9 @@ dependencies = [ [[package]] name = "bytecheck" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -794,9 +809,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2", "quote", @@ -805,9 +820,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" dependencies = [ "bytemuck_derive", ] @@ -820,7 +835,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -861,13 +876,13 @@ dependencies = [ [[package]] name = "cairo-rs" -version = "0.18.3" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f33613627f0dea6a731b0605101fad59ba4f193a52c96c4687728d822605a8a1" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cairo-sys-rs", - "glib 0.18.3", + "glib 0.18.5", "libc", "once_cell", "thiserror", @@ -895,9 +910,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" +checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" dependencies = [ "serde", ] @@ -918,12 +933,12 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.17.0" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca592ad99e6a0fd4b95153406138b997cc26ccd3cd0aecdfd4fbdbf1519bd77" +checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" dependencies = [ "serde", - "toml 0.8.8", + "toml 0.8.2", ] [[package]] @@ -955,9 +970,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" +checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" dependencies = [ "smallvec", "target-lexicon", @@ -1008,25 +1023,24 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.29" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87d9d13be47a5b7c3907137f1290b0459a7f80efb26be8c52afb11963bccb02" +checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] name = "chunked_transfer" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cca491388666e04d7248af3f60f0c40cfb0991c72205595d7c396e3510207d1a" +checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" [[package]] name = "cipher" @@ -1049,40 +1063,38 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.8" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.4.8" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.0", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "clipboard-win" -version = "4.5.0" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +checksum = "3ec832972fefb8cf9313b45a0d1945e29c9c251f1d4c6eafc5fe2124c02d2e81" dependencies = [ "error-code", - "str-buf", - "winapi 0.3.9", ] [[package]] @@ -1131,6 +1143,17 @@ dependencies = [ "objc", ] +[[package]] +name = "color-backtrace" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6c04463c99389fff045d2b90ce84f5131332712c7ffbede020f5e9ad1ed685" +dependencies = [ + "atty", + "backtrace", + "termcolor", +] + [[package]] name = "color_quant" version = "1.1.0" @@ -1156,11 +1179,10 @@ dependencies = [ [[package]] name = "colored" -version = "2.0.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "is-terminal", "lazy_static", "windows-sys 0.48.0", ] @@ -1177,18 +1199,18 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" @@ -1210,37 +1232,37 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cookie" -version = "0.16.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" +checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" dependencies = [ "percent-encoding", - "time 0.3.30", + "time", "version_check", ] [[package]] name = "cookie_store" -version = "0.16.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d606d0fba62e13cf04db20536c05cb7f13673c161cb47a47a82b9b9e7d3f1daa" +checksum = "387461abbc748185c3a6e1673d826918b450b87ff22639429c694619a83b6cf6" dependencies = [ "cookie", - "idna 0.2.3", + "idna 0.3.0", "log", "publicsuffix", "serde", "serde_derive", "serde_json", - "time 0.3.30", + "time", "url", ] [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1248,9 +1270,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" @@ -1280,9 +1302,9 @@ dependencies = [ [[package]] name = "core-graphics-types" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -1291,9 +1313,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -1315,42 +1337,62 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] -name = "crossbeam-queue" -version = "0.3.8" +name = "crossbeam-deque" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", + "crossbeam-epoch", "crossbeam-utils", ] [[package]] -name = "crossbeam-utils" -version = "0.8.16" +name = "crossbeam-epoch" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "cfg-if", + "crossbeam-utils", ] +[[package]] +name = "crossbeam-queue" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-common" version = "0.1.6" @@ -1386,17 +1428,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] name = "ctor" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" +checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -1432,9 +1474,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" dependencies = [ "darling_core", "darling_macro", @@ -1442,40 +1484,40 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.39", + "strsim 0.10.0", + "syn 2.0.49", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" dependencies = [ "darling_core", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "data-url" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" +checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "deep-link-example" @@ -1501,9 +1543,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -1620,6 +1662,29 @@ dependencies = [ "libloading 0.8.1", ] +[[package]] +name = "dlopen2" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1297103d2bbaea85724fcee6294c2d50b1081f9ad47d0f6f6f61eda65315a6" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi 0.3.9", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + [[package]] name = "dotenvy" version = "0.15.7" @@ -1638,11 +1703,11 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "bytemuck", "drm-ffi", "drm-fourcc", - "rustix 0.38.25", + "rustix", ] [[package]] @@ -1652,7 +1717,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41334f8405792483e32ad05fbb9c5680ff4e84491883d2947a4757dc54cb2ac6" dependencies = [ "drm-sys", - "rustix 0.38.25", + "rustix", ] [[package]] @@ -1714,22 +1779,23 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" dependencies = [ "serde", ] [[package]] name = "embed-resource" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54cc3e827ee1c3812239a9a41dede7b4d7d5d5464faa32d71bd7cba28ce2cb2" +checksum = "3bde55e389bea6a966bd467ad1ad7da0ae14546a5bc794d16d1e55e7fca44881" dependencies = [ "cc", + "memchr", "rustc_version", - "toml 0.8.8", + "toml 0.8.2", "vswhom", "winreg 0.51.0", ] @@ -1749,6 +1815,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "endi" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" + [[package]] name = "enum-as-inner" version = "0.6.0" @@ -1758,14 +1830,14 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] name = "enumflags2" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" +checksum = "3278c9d5fb675e0a51dabcf4c0d355f692b064171535ba72361be1528a9d8e8d" dependencies = [ "enumflags2_derive", "serde", @@ -1773,23 +1845,26 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" +checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ + "humantime", + "is-terminal", "log", "regex", + "termcolor", ] [[package]] @@ -1800,23 +1875,19 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "error-code" -version = "2.3.1" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" -dependencies = [ - "libc", - "str-buf", -] +checksum = "281e452d3bad4005426416cdba5ccfd4f5c1280e10099e21db27f7c1c28347fc" [[package]] name = "etcetera" @@ -1837,9 +1908,20 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.1.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27" dependencies = [ "concurrent-queue", "parking", @@ -1848,21 +1930,38 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 3.1.0", + "event-listener 4.0.3", "pin-project-lite", ] [[package]] -name = "fastrand" -version = "1.9.0" +name = "event-listener-strategy" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" dependencies = [ - "instant", + "event-listener 5.1.0", + "pin-project-lite", +] + +[[package]] +name = "exr" +version = "1.72.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" +dependencies = [ + "bit_field", + "flume", + "half", + "lebe", + "miniz_oxide", + "rayon-core", + "smallvec", + "zune-inflate", ] [[package]] @@ -1873,9 +1972,9 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" dependencies = [ "simd-adler32", ] @@ -1911,14 +2010,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "redox_syscall", + "windows-sys 0.52.0", ] [[package]] @@ -1981,7 +2080,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -1998,9 +2097,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -2032,9 +2131,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -2047,9 +2146,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -2057,15 +2156,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -2085,67 +2184,51 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" -dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ - "fastrand 2.0.1", + "fastrand", "futures-core", "futures-io", - "memchr", "parking", "pin-project-lite", ] [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -2178,20 +2261,20 @@ dependencies = [ "gdk-pixbuf", "gdk-sys", "gio", - "glib 0.18.3", + "glib 0.18.5", "libc", "pango", ] [[package]] name = "gdk-pixbuf" -version = "0.18.3" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446f32b74d22c33b7b258d4af4ffde53c2bf96ca2e29abdf1a785fe59bd6c82c" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" dependencies = [ "gdk-pixbuf-sys", "gio", - "glib 0.18.3", + "glib 0.18.5", "libc", "once_cell", ] @@ -2249,7 +2332,7 @@ dependencies = [ "gdk", "gdkx11-sys", "gio", - "glib 0.18.3", + "glib 0.18.5", "libc", "x11", ] @@ -2290,16 +2373,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" -dependencies = [ - "libc", - "winapi 0.3.9", -] - [[package]] name = "gethostname" version = "0.4.3" @@ -2323,9 +2396,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -2354,24 +2427,34 @@ dependencies = [ "polyval 0.6.1", ] +[[package]] +name = "gif" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +dependencies = [ + "color_quant", + "weezl", +] + [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gio" -version = "0.18.3" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d809baf02bdf1b5ef4ad3bf60dd9d4977149db4612b7bbb58e56aef168193b" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ "futures-channel", "futures-core", "futures-io", "futures-util", "gio-sys 0.18.1", - "glib 0.18.3", + "glib 0.18.5", "libc", "once_cell", "pin-project-lite", @@ -2429,18 +2512,18 @@ dependencies = [ [[package]] name = "glib" -version = "0.18.3" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cf801b6f7829fa76db37449ab67c9c98a2b1bf21076d9113225621e61a0fa6" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "futures-channel", "futures-core", "futures-executor", "futures-task", "futures-util", "gio-sys 0.18.1", - "glib-macros 0.18.3", + "glib-macros 0.18.5", "glib-sys 0.18.1", "gobject-sys 0.18.0", "libc", @@ -2467,16 +2550,16 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.18.3" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72793962ceece3863c2965d7f10c8786323b17c7adea75a515809fa20ab799a5" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ "heck", - "proc-macro-crate 2.0.0", + "proc-macro-crate 2.0.2", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -2554,7 +2637,7 @@ dependencies = [ "gdk", "gdk-pixbuf", "gio", - "glib 0.18.3", + "glib 0.18.5", "gtk-sys", "gtk3-macros", "libc", @@ -2590,14 +2673,14 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -2605,7 +2688,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.11", - "indexmap 2.1.0", + "indexmap 2.2.3", "slab", "tokio", "tokio-util", @@ -2614,48 +2697,60 @@ dependencies = [ [[package]] name = "h3" -version = "0.0.2" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6de6ca43eed186fd055214af06967b0a7a68336cefec7e8a4004e96efeaccb9e" +checksum = "b83e1915177ea624b5bbbdb16bc54f0c106c9664892c695f995e53f5c6793b80" dependencies = [ "bytes", - "fastrand 1.9.0", + "fastrand", "futures-util", "http 0.2.11", + "pin-project-lite", "tokio", "tracing", ] [[package]] name = "h3-quinn" -version = "0.0.3" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d4a1a1763e4f3e82ee9f1ecf2cf862b22cc7316ebe14684e42f94532b5ec64d" +checksum = "ac9675014d703c3d516a121757bbc02e53f1ee838e0729fc7534b35024a81ae4" dependencies = [ "bytes", "futures", "h3", "quinn", "quinn-proto", + "tokio", "tokio-util", ] +[[package]] +name = "half" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc52e53916c08643f1b56ec082790d1e86a32e58dc5268f897f313fbae7b4872" +dependencies = [ + "cfg-if", + "crunchy", +] + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.7", + "ahash 0.7.8", ] [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.8", "allocator-api2", ] @@ -2665,7 +2760,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -2679,9 +2774,18 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" [[package]] name = "hex" @@ -2691,9 +2795,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -2709,11 +2813,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2749,7 +2853,7 @@ checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", - "itoa 1.0.9", + "itoa 1.0.10", ] [[package]] @@ -2760,14 +2864,14 @@ checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" dependencies = [ "bytes", "fnv", - "itoa 1.0.9", + "itoa 1.0.10", ] [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http 0.2.11", @@ -2792,11 +2896,17 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -2807,9 +2917,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.9", + "itoa 1.0.10", "pin-project-lite", - "socket2 0.4.10", + "socket2", "tokio", "tower-service", "tracing", @@ -2825,7 +2935,7 @@ dependencies = [ "futures-util", "http 0.2.11", "hyper", - "rustls 0.21.9", + "rustls 0.21.10", "tokio", "tokio-rustls 0.24.1", ] @@ -2845,16 +2955,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.51.1", + "windows-core 0.52.0", ] [[package]] @@ -2884,20 +2994,19 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2905,9 +3014,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -2915,16 +3024,19 @@ dependencies = [ [[package]] name = "image" -version = "0.24.7" +version = "0.24.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" dependencies = [ "bytemuck", "byteorder", "color_quant", - "num-rational", + "exr", + "gif", + "jpeg-decoder", "num-traits", "png", + "qoi", "tiff", ] @@ -2941,12 +3053,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", "serde", ] @@ -2997,17 +3109,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "iota-crypto" version = "0.15.3" @@ -3024,7 +3125,7 @@ dependencies = [ "digest 0.10.7", "ed25519-zebra", "generic-array", - "getrandom 0.2.11", + "getrandom 0.2.12", "hmac", "pbkdf2", "serde", @@ -3036,9 +3137,9 @@ dependencies = [ [[package]] name = "iota-crypto" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d5a986d972c3a703d48ced24fdc0bf16fb2d02959ff4b152fa77b9132f6fb0" +checksum = "a5db0e2d85e258d6d0db66f4a6bf1e8bdf5b10c3353aa87d98b168778d13fdc1" dependencies = [ "autocfg", ] @@ -3067,7 +3168,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.5", + "socket2", "widestring", "windows-sys 0.48.0", "winreg 0.50.0", @@ -3090,13 +3191,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi", - "rustix 0.38.25", - "windows-sys 0.48.0", + "hermit-abi 0.3.6", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -3111,9 +3212,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -3126,9 +3227,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "javascriptcore-rs" @@ -3137,7 +3238,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" dependencies = [ "bitflags 1.3.2", - "glib 0.18.3", + "glib 0.18.5", "javascriptcore-rs-sys", ] @@ -3177,24 +3278,27 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" dependencies = [ "libc", ] [[package]] name = "jpeg-decoder" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" +dependencies = [ + "rayon", +] [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -3238,7 +3342,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "serde", "unicode-segmentation", ] @@ -3285,13 +3389,19 @@ dependencies = [ "spin 0.5.2", ] +[[package]] +name = "lebe" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" + [[package]] name = "libappindicator" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" dependencies = [ - "glib 0.18.3", + "glib 0.18.5", "gtk", "gtk-sys", "libappindicator-sys", @@ -3311,9 +3421,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.150" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" @@ -3347,9 +3457,9 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", - "redox_syscall 0.4.1", + "redox_syscall", ] [[package]] @@ -3412,15 +3522,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "linux-raw-sys" @@ -3487,7 +3591,7 @@ dependencies = [ "dirs-next", "objc-foundation", "objc_id", - "time 0.3.30", + "time", ] [[package]] @@ -3499,6 +3603,12 @@ dependencies = [ "libc", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "markup5ever" version = "0.11.0" @@ -3546,15 +3656,15 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -3568,15 +3678,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.9.0" @@ -3616,9 +3717,9 @@ checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", "simd-adler32", @@ -3626,9 +3727,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "log", @@ -3643,7 +3744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80f9fece9bd97ab74339fe19f4bcaf52b76dcc18e5364c7977c1838f76b38de9" dependencies = [ "assert-json-diff", - "colored 2.0.4", + "colored 2.1.0", "httparse", "lazy_static", "log", @@ -3656,9 +3757,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.11.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b564d551449738387fb4541aef5fbfceaa81b2b732f2534c1c7c89dc7d673eaa" +checksum = "4c47e7625990fc1af2226ea4f34fb2412b03c12639fcb91868581eb3a6893453" dependencies = [ "cocoa 0.25.0", "crossbeam-channel", @@ -3739,15 +3840,14 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.4" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", "cfg-if", "libc", - "memoffset 0.7.1", - "pin-utils", + "memoffset 0.9.0", ] [[package]] @@ -3772,7 +3872,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "crossbeam-channel", "filetime", "fsevent-sys", @@ -3800,19 +3900,6 @@ dependencies = [ "walkdir 2.4.0", ] -[[package]] -name = "notify-rust" -version = "4.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "827c5edfa80235ded4ab3fe8e9dc619b4f866ef16fe9b1c6b8a7f8692c0f2226" -dependencies = [ - "log", - "mac-notification-sys", - "serde", - "tauri-winrt-notification", - "zbus", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -3841,31 +3928,25 @@ dependencies = [ ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] -name = "num-iter" -version = "0.1.43" +name = "num-integer" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", - "num-integer", "num-traits", ] [[package]] -name = "num-rational" -version = "0.4.1" +name = "num-iter" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" dependencies = [ "autocfg", "num-integer", @@ -3874,9 +3955,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -3888,7 +3969,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.6", "libc", ] @@ -3915,9 +3996,9 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" dependencies = [ "libc", ] @@ -3963,18 +4044,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -3995,11 +4076,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.59" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if", "foreign-types 0.3.2", "libc", @@ -4016,7 +4097,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -4027,18 +4108,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.1.6+3.1.4" +version = "300.2.3+3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439fac53e092cd7442a3660c85dde4643ab3b5bd39040912388dcdabf6b88085" +checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.95" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -4070,12 +4151,12 @@ dependencies = [ [[package]] name = "os_pipe" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" +checksum = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4091,7 +4172,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" dependencies = [ "gio", - "glib 0.18.3", + "glib 0.18.5", "libc", "once_cell", "pango-sys", @@ -4133,7 +4214,7 @@ checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", "windows-targets 0.48.5", ] @@ -4184,9 +4265,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" @@ -4292,7 +4373,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -4341,7 +4422,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand", "futures-io", ] @@ -4368,9 +4449,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "plist" @@ -4378,55 +4459,39 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" dependencies = [ - "base64 0.21.5", - "indexmap 2.1.0", + "base64 0.21.7", + "indexmap 2.2.3", "line-wrap", "quick-xml 0.31.0", "serde", - "time 0.3.30", + "time", ] [[package]] name = "png" -version = "0.17.10" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" dependencies = [ "bitflags 1.3.2", "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", + "fdeflate", + "flate2", + "miniz_oxide", ] [[package]] name = "polling" -version = "3.3.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.25", + "rustix", "tracing", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4494,20 +4559,12 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" -dependencies = [ - "toml_edit 0.20.7", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" dependencies = [ - "toml_edit 0.21.0", + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -4542,9 +4599,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -4585,6 +4642,15 @@ dependencies = [ "psl-types", ] +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -4616,11 +4682,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" dependencies = [ "bytes", + "futures-io", "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.21.9", + "rustls 0.21.10", "thiserror", "tokio", "tracing", @@ -4636,7 +4703,7 @@ dependencies = [ "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls 0.21.9", + "rustls 0.21.10", "slab", "thiserror", "tinyvec", @@ -4651,16 +4718,16 @@ checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" dependencies = [ "bytes", "libc", - "socket2 0.5.5", + "socket2", "tracing", "windows-sys 0.48.0", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -4731,7 +4798,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", ] [[package]] @@ -4764,6 +4831,26 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" +[[package]] +name = "rayon" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "read-progress-stream" version = "1.0.0" @@ -4775,15 +4862,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -4799,20 +4877,20 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.5", "regex-syntax 0.8.2", ] @@ -4827,9 +4905,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -4850,21 +4928,21 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rend" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" dependencies = [ "async-compression", - "base64 0.21.5", + "base64 0.21.7", "bytes", "cookie", "cookie_store", @@ -4890,12 +4968,13 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.21.9", + "rustls 0.21.10", "rustls-native-certs", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -4909,7 +4988,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots 0.25.4", "winreg 0.50.0", ] @@ -4925,10 +5004,11 @@ dependencies = [ [[package]] name = "rfd" -version = "0.12.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241a0deb168c88050d872294f7b3106c1dfa8740942bcc97bc91b98e97b5c501" +checksum = "373d2fc6310e2d14943d4e66ebed5b774a2b6b3b1610e7377edf124fb2760d6b" dependencies = [ + "ashpd", "block", "dispatch", "glib-sys 0.18.1", @@ -4939,7 +5019,7 @@ dependencies = [ "objc", "objc-foundation", "objc_id", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -4963,23 +5043,24 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "getrandom 0.2.11", + "cfg-if", + "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "rkyv" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ "bitvec", "bytecheck", @@ -4995,9 +5076,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.43" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", @@ -5006,9 +5087,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3211b01eea83d80687da9eef70e39d65144a3894866a5153a2723e425a157f" +checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" dependencies = [ "const-oid", "digest 0.10.7", @@ -5044,9 +5125,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.34.2" +version = "1.34.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755392e1a2f77afd95580d3f0d0e94ac83eeeb7167552c9b5bca549e61a94d83" +checksum = "b39449a79f45e8da28c57c341891b69a183044b29518bb8f86dbac9df60bb7df" dependencies = [ "arrayvec", "borsh", @@ -5081,39 +5162,25 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.25" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys 0.4.11", - "windows-sys 0.48.0", + "linux-raw-sys 0.4.13", + "windows-sys 0.52.0", ] [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.8", "rustls-webpki 0.101.7", "sct", ] @@ -5125,7 +5192,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.8", "rustls-pki-types", "rustls-webpki 0.102.2", "subtle", @@ -5150,14 +5217,14 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] name = "rustls-pki-types" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" +checksum = "048a63e5b3ac996d78d402940b5fa47973d2d080c6c6fffa1d0f19c4445310b7" [[package]] name = "rustls-webpki" @@ -5165,7 +5232,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -5175,7 +5242,7 @@ version = "0.102.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" dependencies = [ - "ring 0.17.5", + "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", ] @@ -5200,9 +5267,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "safemem" @@ -5231,11 +5298,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -5282,7 +5349,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -5337,31 +5404,31 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.192" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -5377,31 +5444,31 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ - "itoa 1.0.9", + "itoa 1.0.10", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -5413,38 +5480,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa 1.0.9", + "itoa 1.0.10", "ryu", "serde", ] [[package]] name = "serde_with" -version = "3.4.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +checksum = "15d167997bd841ec232f5b2b8e0e26606df2e7caa4c31b95ea9ca52b200bd270" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.1.0", + "indexmap 2.2.3", "serde", + "serde_derive", "serde_json", "serde_with_macros", - "time 0.3.30", + "time", ] [[package]] name = "serde_with_macros" -version = "3.4.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +checksum = "865f9743393e638991566a8b7a479043c2c8da94a33e0a31f18214c9cae0a64d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -5566,9 +5634,9 @@ checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "similar" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" +checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" [[package]] name = "single-instance-example" @@ -5598,19 +5666,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" - -[[package]] -name = "socket2" -version = "0.4.10" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi 0.3.9", -] +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" @@ -5634,15 +5692,15 @@ dependencies = [ "cocoa 0.25.0", "core-graphics 0.23.1", "drm", - "fastrand 2.0.1", + "fastrand", "foreign-types 0.5.0", "js-sys", "log", "memmap2", "objc", "raw-window-handle 0.6.0", - "redox_syscall 0.4.1", - "rustix 0.38.25", + "redox_syscall", + "rustix", "tiny-xlib", "wasm-bindgen", "wayland-backend", @@ -5650,7 +5708,7 @@ dependencies = [ "wayland-sys", "web-sys", "windows-sys 0.52.0", - "x11rb 0.13.0", + "x11rb", ] [[package]] @@ -5661,7 +5719,7 @@ checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" dependencies = [ "futures-channel", "gio", - "glib 0.18.3", + "glib 0.18.5", "libc", "soup3-sys", ] @@ -5696,9 +5754,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", @@ -5706,9 +5764,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ "itertools", "nom", @@ -5734,7 +5792,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.8", "atoi", "byteorder", "bytes", @@ -5750,13 +5808,13 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.1.0", + "indexmap 2.2.3", "log", "memchr", "once_cell", "paste", "percent-encoding", - "rustls 0.21.9", + "rustls 0.21.10", "rustls-pemfile", "serde", "serde_json", @@ -5764,12 +5822,12 @@ dependencies = [ "smallvec", "sqlformat", "thiserror", - "time 0.3.30", + "time", "tokio", "tokio-stream", "tracing", "url", - "webpki-roots 0.25.2", + "webpki-roots 0.25.4", ] [[package]] @@ -5819,8 +5877,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" dependencies = [ "atoi", - "base64 0.21.5", - "bitflags 2.4.1", + "base64 0.21.7", + "bitflags 2.4.2", "byteorder", "bytes", "crc", @@ -5835,7 +5893,7 @@ dependencies = [ "hex", "hkdf", "hmac", - "itoa 1.0.9", + "itoa 1.0.10", "log", "md-5", "memchr", @@ -5850,7 +5908,7 @@ dependencies = [ "sqlx-core", "stringprep", "thiserror", - "time 0.3.30", + "time", "tracing", "whoami", ] @@ -5862,8 +5920,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" dependencies = [ "atoi", - "base64 0.21.5", - "bitflags 2.4.1", + "base64 0.21.7", + "bitflags 2.4.2", "byteorder", "crc", "dotenvy", @@ -5876,7 +5934,7 @@ dependencies = [ "hkdf", "hmac", "home", - "itoa 1.0.9", + "itoa 1.0.10", "log", "md-5", "memchr", @@ -5890,7 +5948,7 @@ dependencies = [ "sqlx-core", "stringprep", "thiserror", - "time 0.3.30", + "time", "tracing", "whoami", ] @@ -5913,7 +5971,7 @@ dependencies = [ "percent-encoding", "serde", "sqlx-core", - "time 0.3.30", + "time", "tracing", "url", "urlencoding", @@ -5940,12 +5998,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "str-buf" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" - [[package]] name = "string_cache" version = "0.8.7" @@ -6047,6 +6099,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + [[package]] name = "subtle" version = "2.5.0" @@ -6059,7 +6117,7 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bbdb58577b6301f8d17ae2561f32002a5bae056d444e0f69e611e504a276204" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "serde", "serde_json", ] @@ -6077,9 +6135,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" dependencies = [ "proc-macro2", "quote", @@ -6095,9 +6153,15 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "sys-locale" version = "0.3.1" @@ -6137,23 +6201,23 @@ dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml 0.8.8", + "toml 0.8.2", "version-compare", ] [[package]] name = "tao" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa7ba6ee5b8908ba3a62e6a4f3683490ed732fca614cdd3f4c989bba548f9a9" +checksum = "29d9325da2dd7ebd48a8a433c64240079b15dbe1249da04c72557611bcd08d1c" dependencies = [ "bitflags 1.3.2", - "cc", "cocoa 0.25.0", "core-foundation", "core-graphics 0.23.1", "crossbeam-channel", "dispatch", + "dlopen2", "gdkwayland-sys", "gdkx11-sys", "gtk", @@ -6170,7 +6234,6 @@ dependencies = [ "once_cell", "parking_lot", "png", - "raw-window-handle 0.5.2", "raw-window-handle 0.6.0", "scopeguard", "tao-macros", @@ -6180,7 +6243,6 @@ dependencies = [ "windows-implement", "windows-version", "x11-dl", - "zbus", ] [[package]] @@ -6213,15 +6275,15 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.12" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tauri" -version = "2.0.0-beta.1" +version = "2.0.0-beta.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f04c896fc95e8fae460dea7c5e99df8b110a2e8aa9246ac871cd853ece5081c" +checksum = "bb6b10809e932ed85813fff9ac748cbcc0cf4c78209433b1b6e025660619f2e4" dependencies = [ "anyhow", "bytes", @@ -6229,7 +6291,7 @@ dependencies = [ "dirs-next", "embed_plist", "futures-util", - "getrandom 0.2.11", + "getrandom 0.2.12", "glob", "gtk", "heck", @@ -6245,7 +6307,7 @@ dependencies = [ "objc", "percent-encoding", "png", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "reqwest", "serde", "serde_json", @@ -6272,9 +6334,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-beta.0" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e2e6f743278a9b6db360c382dcaf1069b842b600174f0b82e89d03795ef28f" +checksum = "e4ea663cde4862231178215d364b3650dade8cb159fc84a1bea5c365689dacd0" dependencies = [ "anyhow", "cargo_toml", @@ -6290,17 +6352,17 @@ dependencies = [ "tauri-codegen", "tauri-utils", "tauri-winres", - "toml 0.8.8", + "toml 0.8.2", "walkdir 2.4.0", ] [[package]] name = "tauri-codegen" -version = "2.0.0-beta.0" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def6fe2f80c5f49ce255e4e74a7cf19861ddbbb1da0b201183fed13842a018bd" +checksum = "94a770b18aa021b0c8568c8f0d347044a72d349b6a13dd1db28c558832e8e681" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "brotli", "ico", "json-patch", @@ -6312,9 +6374,10 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", + "syn 2.0.49", "tauri-utils", "thiserror", - "time 0.3.30", + "time", "url", "uuid", "walkdir 2.4.0", @@ -6322,23 +6385,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-beta.0" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dadbcda0ad142907f7fcb287f7213e2657bd3346232355cd9ffaabbed786e5b" +checksum = "85b100bf9f05a013719fa6c9bf096da42511888b3671d9c22bffa12a030d76a9" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-plugin" -version = "2.0.0-beta.0" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3bad1d89a3dd41a55fcafa29bbc4e926340f7bb9af8f5c1d2cda3a16196ce8" +checksum = "140c010cfb7120c9276e6e0b0c271dabb7988be2998011f918b669e766224e55" dependencies = [ "anyhow", "glob", @@ -6347,7 +6410,7 @@ dependencies = [ "serde", "serde_json", "tauri-utils", - "toml 0.8.8", + "toml 0.8.2", "walkdir 1.0.7", ] @@ -6356,7 +6419,7 @@ name = "tauri-plugin-authenticator" version = "2.0.0-beta.0" dependencies = [ "authenticator", - "base64 0.21.5", + "base64 0.21.7", "byteorder", "bytes", "chrono", @@ -6456,7 +6519,7 @@ version = "2.0.0-beta.0" dependencies = [ "glib 0.16.9", "log", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "rfd", "serde", "serde_json", @@ -6545,7 +6608,7 @@ dependencies = [ "swift-rs", "tauri", "tauri-plugin", - "time 0.3.30", + "time", ] [[package]] @@ -6565,26 +6628,35 @@ dependencies = [ name = "tauri-plugin-notification" version = "2.0.0-beta.0" dependencies = [ + "chrono", + "color-backtrace", + "ctor", + "env_logger", + "image", + "lazy_static", "log", - "notify-rust", + "mac-notification-sys", + "maplit", "rand 0.8.5", "serde", "serde_json", "serde_repr", "tauri", "tauri-plugin", + "tauri-winrt-notification", "thiserror", - "time 0.3.30", + "time", "url", "win7-notifications", "windows-version", + "zbus", ] [[package]] name = "tauri-plugin-os" version = "2.0.0-beta.0" dependencies = [ - "gethostname 0.4.3", + "gethostname", "log", "os_info", "serde", @@ -6674,7 +6746,7 @@ dependencies = [ "tauri", "tauri-plugin", "thiserror", - "time 0.3.30", + "time", "tokio", ] @@ -6695,7 +6767,7 @@ name = "tauri-plugin-stronghold" version = "2.0.0-beta.0" dependencies = [ "hex", - "iota-crypto 0.23.0", + "iota-crypto 0.23.1", "iota_stronghold", "log", "rand 0.8.5", @@ -6715,7 +6787,7 @@ dependencies = [ name = "tauri-plugin-updater" version = "2.0.0-beta.0" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "dirs-next", "flate2", "futures-util", @@ -6732,7 +6804,7 @@ dependencies = [ "tauri-plugin", "tempfile", "thiserror", - "time 0.3.30", + "time", "tokio", "url", "zip", @@ -6777,7 +6849,7 @@ name = "tauri-plugin-window-state" version = "2.0.0-beta.0" dependencies = [ "bincode", - "bitflags 2.4.1", + "bitflags 2.4.2", "log", "serde", "serde_json", @@ -6788,14 +6860,14 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.0.0-beta.0" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d567f244e28e04e025646eb63c8552bfbc7d1c414753e5b22b7daf16510c2b5" +checksum = "dc687ef6571127f0ad9a9bef141ca3f8d9597b7f99949047d5c69ed731cf36c4" dependencies = [ "gtk", "http 0.2.11", "jni", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "serde", "serde_json", "tauri-utils", @@ -6806,16 +6878,16 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.0.0-beta.0" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e7f9ba6cf789cd2aa347e08961c43e2e64ba7a3f896b79b8a61af7983a0322" +checksum = "a07b1d76d4159aec5c2cff742e30b0f5b3675a2520b979acbbc66c5f92c99491" dependencies = [ "cocoa 0.25.0", "gtk", "http 0.2.11", "jni", "percent-encoding", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "softbuffer", "tao", "tauri-runtime", @@ -6828,16 +6900,16 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-beta.0" +version = "2.0.0-beta.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3355fb8c96c36e5796add0c0b429fe849340f24ccb757a7a00953ef0333d99e7" +checksum = "2729b59832a96dd05f4f2ced33e2ab976ca60c58c1d675afe6aabc486eb51143" dependencies = [ "aes-gcm 0.10.3", "brotli", "cargo_metadata", "ctor", "dunce", - "getrandom 0.2.11", + "getrandom 0.2.12", "glob", "heck", "html5ever", @@ -6857,7 +6929,7 @@ dependencies = [ "serialize-to-javascript", "swift-rs", "thiserror", - "toml 0.8.8", + "toml 0.8.2", "url", "walkdir 2.4.0", ] @@ -6884,15 +6956,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", - "fastrand 2.0.1", - "redox_syscall 0.4.1", - "rustix 0.38.25", - "windows-sys 0.48.0", + "fastrand", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -6906,6 +6977,15 @@ dependencies = [ "utf-8", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "thin-slice" version = "0.1.1" @@ -6914,22 +6994,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -6944,9 +7024,9 @@ dependencies = [ [[package]] name = "tiff" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" dependencies = [ "flate2", "jpeg-decoder", @@ -6955,24 +7035,14 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", -] - -[[package]] -name = "time" -version = "0.3.30" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", - "itoa 1.0.9", + "itoa 1.0.10", "libc", + "num-conv", "num_threads", "powerfmt", "serde", @@ -6988,10 +7058,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -7016,7 +7087,7 @@ dependencies = [ "ascii", "chunked_transfer", "log", - "time 0.3.30", + "time", "url", ] @@ -7049,9 +7120,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -7059,7 +7130,9 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.5", + "signal-hook-registry", + "socket2", + "tracing", "windows-sys 0.48.0", ] @@ -7079,7 +7152,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls 0.21.10", "tokio", ] @@ -7163,21 +7236,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.8" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.21.0", + "toml_edit 0.20.2", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] @@ -7188,7 +7261,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.3", "serde", "serde_spanned", "toml_datetime", @@ -7197,22 +7270,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.7" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" -dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.3", "serde", "serde_spanned", "toml_datetime", @@ -7245,7 +7307,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -7289,9 +7351,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.11.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5375d350db4ccd3c783a4c683be535e70df5c62b07a824e7bcd6d43ef6d74181" +checksum = "7a4d9ddd4a7c0f3b6862af1c4911b529a49db4ee89310d3a258859c2f5053fdd" dependencies = [ "cocoa 0.25.0", "core-graphics 0.23.1", @@ -7309,9 +7371,9 @@ dependencies = [ [[package]] name = "treediff" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" +checksum = "4d127780145176e2b5d16611cc25a900150e86e9fd79d3bde6ff3a37359c9cb5" dependencies = [ "serde_json", ] @@ -7364,9 +7426,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" @@ -7398,10 +7460,11 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uds_windows" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ + "memoffset 0.9.0", "tempfile", "winapi 0.3.9", ] @@ -7417,9 +7480,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -7438,9 +7501,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode_categories" @@ -7482,12 +7545,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", "serde", ] @@ -7518,11 +7581,11 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", ] [[package]] @@ -7533,9 +7596,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" +checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" [[package]] name = "vcpkg" @@ -7584,12 +7647,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waker-fn" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" - [[package]] name = "walkdir" version = "1.0.7" @@ -7626,12 +7683,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -7640,9 +7691,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -7650,24 +7701,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -7677,9 +7728,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7687,28 +7738,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "wasm-streams" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" dependencies = [ "futures-util", "js-sys", @@ -7719,13 +7770,13 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" +checksum = "9d50fa61ce90d76474c87f5fc002828d81b32677340112b4ef08079a9d459a40" dependencies = [ "cc", "downcast-rs", - "nix 0.26.4", + "rustix", "scoped-tls", "smallvec", "wayland-sys", @@ -7733,24 +7784,24 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.1" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" +checksum = "82fb96ee935c2cea6668ccb470fb7771f6215d1691746c2d896b447a00ad3f1f" dependencies = [ - "bitflags 2.4.1", - "nix 0.26.4", + "bitflags 2.4.2", + "rustix", "wayland-backend", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" +checksum = "63b3a62929287001986fb58c789dce9b67604a397c15c611ad9f747300b6c283" dependencies = [ "proc-macro2", - "quick-xml 0.30.0", + "quick-xml 0.31.0", "quote", ] @@ -7768,9 +7819,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -7788,7 +7839,7 @@ dependencies = [ "gdk-sys", "gio", "gio-sys 0.18.1", - "glib 0.18.3", + "glib 0.18.5", "glib-sys 0.18.1", "gobject-sys 0.18.0", "gtk", @@ -7822,9 +7873,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" @@ -7871,7 +7922,7 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -7887,9 +7938,9 @@ dependencies = [ [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "whoami" @@ -7950,15 +8001,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "winapi-wsapoll" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -7979,13 +8021,13 @@ dependencies = [ [[package]] name = "window-vibrancy" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6abc2b9c56bd95887825a1ce56cde49a2a97c07e28db465d541f5098a2656c" +checksum = "33082acd404763b315866e14a0d5193f3422c81086657583937a750cdd3ec340" dependencies = [ "cocoa 0.25.0", "objc", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "windows-sys 0.52.0", "windows-version", ] @@ -8060,7 +8102,7 @@ checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -8071,7 +8113,7 @@ checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -8326,9 +8368,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -8364,11 +8406,11 @@ dependencies = [ [[package]] name = "wry" -version = "0.35.2" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3016c47c9b6f7029a9da7cd48af8352327226bba0e955f3c92e2966651365a9" +checksum = "3a9e7b81968555303086ef882a0c213896a76099de4ed0b86a798775c2d54304" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "block", "cfg_aliases 0.1.1", "cocoa 0.25.0", @@ -8390,7 +8432,7 @@ dependencies = [ "objc", "objc_id", "once_cell", - "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "serde", "serde_json", "sha2 0.10.8", @@ -8437,19 +8479,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" -dependencies = [ - "gethostname 0.3.0", - "nix 0.26.4", - "winapi 0.3.9", - "winapi-wsapoll", - "x11rb-protocol 0.12.0", -] - [[package]] name = "x11rb" version = "0.13.0" @@ -8457,21 +8486,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8f25ead8c7e4cba123243a6367da5d3990e0d3affa708ea19dce96356bd9f1a" dependencies = [ "as-raw-xcb-connection", - "gethostname 0.4.3", + "gethostname", "libc", "libloading 0.8.1", "once_cell", - "rustix 0.38.25", - "x11rb-protocol 0.13.0", -] - -[[package]] -name = "x11rb-protocol" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" -dependencies = [ - "nix 0.26.4", + "rustix", + "x11rb-protocol", ] [[package]] @@ -8493,58 +8513,59 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", + "linux-raw-sys 0.4.13", + "rustix", ] [[package]] name = "xdg-home" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" +checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" dependencies = [ - "nix 0.26.4", + "libc", "winapi 0.3.9", ] [[package]] name = "zbus" -version = "3.14.1" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" +checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" dependencies = [ "async-broadcast", "async-executor", "async-fs", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io", + "async-lock 3.3.0", "async-process", "async-recursion", "async-task", "async-trait", "blocking", - "byteorder", "derivative", "enumflags2", - "event-listener 2.5.3", + "event-listener 5.1.0", "futures-core", "futures-sink", "futures-util", "hex", - "nix 0.26.4", - "once_cell", + "nix 0.27.1", "ordered-stream", "rand 0.8.5", "serde", "serde_repr", "sha1", "static_assertions", + "tokio", "tracing", "uds_windows", - "winapi 0.3.9", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -8553,9 +8574,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.14.1" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" +checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -8567,9 +8588,9 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.6.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", @@ -8578,22 +8599,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -8613,7 +8634,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.49", ] [[package]] @@ -8622,7 +8643,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ - "aes 0.8.3", + "aes 0.8.4", "byteorder", "bzip2", "constant_time_eq 0.1.5", @@ -8632,7 +8653,7 @@ dependencies = [ "hmac", "pbkdf2", "sha1", - "time 0.3.30", + "time", "zstd", ] @@ -8665,25 +8686,34 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + [[package]] name = "zvariant" -version = "3.15.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" +checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" dependencies = [ - "byteorder", + "endi", "enumflags2", - "libc", "serde", "static_assertions", + "url", "zvariant_derive", ] [[package]] name = "zvariant_derive" -version = "3.15.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" +checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -8694,9 +8724,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 8f0be2b5..cdc5865e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,9 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = "2.0.0-beta.1" -tauri-build = "2.0.0-beta.0" -tauri-plugin = "2.0.0-beta.0" +tauri = "2.0.0-beta.4" +tauri-build = "2.0.0-beta.3" +tauri-plugin = "2.0.0-beta.3" serde_json = "1" thiserror = "1" url = "2" @@ -22,7 +22,7 @@ schemars = "0.8" edition = "2021" authors = ["Tauri Programme within The Commons Conservancy"] license = "Apache-2.0 OR MIT" -rust-version = "1.70" +rust-version = "1.75" # default to small, optimized release binaries [profile.release] diff --git a/README.md b/README.md index 51184474..444c4e99 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ | [websocket](plugins/websocket) | Open a WebSocket connection using a Rust client in JS. | ✅ | ✅ | ✅ | ? | ? | | [window-state](plugins/window-state) | Persist window sizes and positions. | ✅ | ✅ | ✅ | ? | ? | -_This repo and all plugins require a Rust version of at least **1.70**_ +_This repo and all plugins require a Rust version of at least **1.75**_ ## Partners diff --git a/examples/api/package.json b/examples/api/package.json index 2cfb06ca..0b00b3ba 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -9,7 +9,7 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0", + "@tauri-apps/api": "2.0.0-beta.2", "@tauri-apps/plugin-barcode-scanner": "2.0.0-beta.0", "@tauri-apps/plugin-biometric": "2.0.0-beta.0", "@tauri-apps/plugin-cli": "2.0.0-beta.0", @@ -30,7 +30,7 @@ "@iconify-json/codicon": "^1.1.37", "@iconify-json/ph": "^1.1.8", "@sveltejs/vite-plugin-svelte": "^3.0.1", - "@tauri-apps/cli": "2.0.0-beta.0", + "@tauri-apps/cli": "2.0.0-beta.3", "@unocss/extractor-svelte": "^0.58.0", "internal-ip": "^8.0.0", "svelte": "^4.2.8", diff --git a/examples/api/src-tauri/.gitignore b/examples/api/src-tauri/.gitignore index 211f2466..99cb2b7c 100644 --- a/examples/api/src-tauri/.gitignore +++ b/examples/api/src-tauri/.gitignore @@ -4,3 +4,7 @@ # cargo-mobile .cargo/ + +gen/schemas/*.json +!gen/schemas/desktop-schema.json +!gen/schemas/mobile-schema.json diff --git a/examples/api/src-tauri/capabilities/base.json b/examples/api/src-tauri/capabilities/base.json index 559e8c81..f34be5ec 100644 --- a/examples/api/src-tauri/capabilities/base.json +++ b/examples/api/src-tauri/capabilities/base.json @@ -1,5 +1,5 @@ { - "$schema": "schemas/desktop-schema.json", + "$schema": "../gen/schemas/desktop-schema.json", "identifier": "run-app-base", "description": "Base permissions to run the app", "windows": ["main"], diff --git a/examples/api/src-tauri/capabilities/desktop.json b/examples/api/src-tauri/capabilities/desktop.json index 343e7834..2edd44cd 100644 --- a/examples/api/src-tauri/capabilities/desktop.json +++ b/examples/api/src-tauri/capabilities/desktop.json @@ -1,5 +1,5 @@ { - "$schema": "./schemas/desktop-schema.json", + "$schema": "../gen/schemas/desktop-schema.json", "identifier": "run-app-desktop", "description": "Permissions to run the app (desktop only)", "windows": ["main"], diff --git a/examples/api/src-tauri/capabilities/mobile.json b/examples/api/src-tauri/capabilities/mobile.json index a9cbfa87..40f547ff 100644 --- a/examples/api/src-tauri/capabilities/mobile.json +++ b/examples/api/src-tauri/capabilities/mobile.json @@ -1,5 +1,5 @@ { - "$schema": "./schemas/mobile-schema.json", + "$schema": "../gen/schemas/mobile-schema.json", "identifier": "run-app-mobile", "description": "Permissions to run the app (mobile only)", "windows": ["main"], diff --git a/examples/api/src-tauri/capabilities/schemas/.gitignore b/examples/api/src-tauri/capabilities/schemas/.gitignore deleted file mode 100644 index 5a0d2638..00000000 --- a/examples/api/src-tauri/capabilities/schemas/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.json -!desktop-schema.json -!mobile-schema.json diff --git a/examples/api/src-tauri/capabilities/schemas/desktop-schema.json b/examples/api/src-tauri/gen/schemas/desktop-schema.json similarity index 97% rename from examples/api/src-tauri/capabilities/schemas/desktop-schema.json rename to examples/api/src-tauri/gen/schemas/desktop-schema.json index 4f6efb0e..88c01d5b 100644 --- a/examples/api/src-tauri/capabilities/schemas/desktop-schema.json +++ b/examples/api/src-tauri/gen/schemas/desktop-schema.json @@ -48,7 +48,7 @@ "type": "string" }, "context": { - "description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine wheter it is allowed or not and its scope.", + "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": [ { @@ -57,7 +57,14 @@ ] }, "windows": { - "description": "List of windows that uses this capability. Can be a glob pattern.", + "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", + "items": { + "type": "string" + } + }, + "webviews": { + "description": "List of webviews that uses this capability. Can be a glob pattern.\n\nThis is only required when using on multiwebview contexts, by default all child webviews of a window that matches [`Self::windows`] are linked.", "type": "array", "items": { "type": "string" @@ -106,10 +113,10 @@ "remote": { "type": "object", "required": [ - "domains" + "urls" ], "properties": { - "domains": { + "urls": { "description": "Remote domains this capability refers to. Can use glob patterns.", "type": "array", "items": { @@ -2147,8 +2154,7 @@ "path": { "type": "string" } - }, - "$schema": "http://json-schema.org/draft-07/schema#" + } } }, "deny": { @@ -2162,8 +2168,7 @@ "path": { "type": "string" } - }, - "$schema": "http://json-schema.org/draft-07/schema#" + } } } } @@ -2254,8 +2259,7 @@ "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/\"", "type": "string" } - }, - "$schema": "http://json-schema.org/draft-07/schema#" + } } }, "deny": { @@ -2271,8 +2275,7 @@ "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/\"", "type": "string" } - }, - "$schema": "http://json-schema.org/draft-07/schema#" + } } } } @@ -2375,48 +2378,6 @@ "description": "If this command is a sidecar command.", "type": "boolean" } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ShellAllowedArg": { - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "additionalProperties": false, - "description": "A variable that is set while calling the command from the webview API.", - "properties": { - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", - "type": "string" - } - }, - "required": [ - "validator" - ], - "type": "object" - } - ], - "description": "A command argument allowed to be executed by the webview API." - }, - "ShellAllowedArgs": { - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", - "items": { - "$ref": "#/definitions/ShellAllowedArg" - }, - "type": "array" - } - ], - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration." - } } } }, @@ -2452,48 +2413,6 @@ "description": "If this command is a sidecar command.", "type": "boolean" } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ShellAllowedArg": { - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "additionalProperties": false, - "description": "A variable that is set while calling the command from the webview API.", - "properties": { - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", - "type": "string" - } - }, - "required": [ - "validator" - ], - "type": "object" - } - ], - "description": "A command argument allowed to be executed by the webview API." - }, - "ShellAllowedArgs": { - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", - "items": { - "$ref": "#/definitions/ShellAllowedArg" - }, - "type": "array" - } - ], - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration." - } } } } @@ -2504,7 +2423,6 @@ ] }, "Identifier": { - "description": "Permission identifier", "oneOf": [ { "description": "app:default -> Default permissions for the plugin.", @@ -5992,20 +5910,6 @@ "window:allow-inner-size" ] }, - { - "description": "window:allow-internal-on-mousedown -> Enables the internal_on_mousedown command without any pre-configured scope.", - "type": "string", - "enum": [ - "window:allow-internal-on-mousedown" - ] - }, - { - "description": "window:allow-internal-on-mousemove -> Enables the internal_on_mousemove command without any pre-configured scope.", - "type": "string", - "enum": [ - "window:allow-internal-on-mousemove" - ] - }, { "description": "window:allow-internal-toggle-maximize -> Enables the internal_toggle_maximize command without any pre-configured scope.", "type": "string", @@ -6426,20 +6330,6 @@ "window:deny-inner-size" ] }, - { - "description": "window:deny-internal-on-mousedown -> Denies the internal_on_mousedown command without any pre-configured scope.", - "type": "string", - "enum": [ - "window:deny-internal-on-mousedown" - ] - }, - { - "description": "window:deny-internal-on-mousemove -> Denies the internal_on_mousemove command without any pre-configured scope.", - "type": "string", - "enum": [ - "window:deny-internal-on-mousemove" - ] - }, { "description": "window:deny-internal-toggle-maximize -> Denies the internal_toggle_maximize command without any pre-configured scope.", "type": "string", @@ -6892,6 +6782,45 @@ ] } ] + }, + "ShellAllowedArg": { + "description": "A command argument allowed to be executed by the webview API.", + "anyOf": [ + { + "description": "A non-configurable argument that is passed to the command in the order it was specified.", + "type": "string" + }, + { + "description": "A variable that is set while calling the command from the webview API.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "ShellAllowedArgs": { + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", + "type": "array", + "items": { + "$ref": "#/definitions/ShellAllowedArg" + } + } + ] } } } \ No newline at end of file diff --git a/examples/api/src-tauri/capabilities/schemas/mobile-schema.json b/examples/api/src-tauri/gen/schemas/mobile-schema.json similarity index 97% rename from examples/api/src-tauri/capabilities/schemas/mobile-schema.json rename to examples/api/src-tauri/gen/schemas/mobile-schema.json index c296543f..884d268f 100644 --- a/examples/api/src-tauri/capabilities/schemas/mobile-schema.json +++ b/examples/api/src-tauri/gen/schemas/mobile-schema.json @@ -48,7 +48,7 @@ "type": "string" }, "context": { - "description": "Execution context of the capability.\n\nAt runtime, Tauri filters the IPC command together with the context to determine wheter it is allowed or not and its scope.", + "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": [ { @@ -57,7 +57,14 @@ ] }, "windows": { - "description": "List of windows that uses this capability. Can be a glob pattern.", + "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", + "items": { + "type": "string" + } + }, + "webviews": { + "description": "List of webviews that uses this capability. Can be a glob pattern.\n\nThis is only required when using on multiwebview contexts, by default all child webviews of a window that matches [`Self::windows`] are linked.", "type": "array", "items": { "type": "string" @@ -106,10 +113,10 @@ "remote": { "type": "object", "required": [ - "domains" + "urls" ], "properties": { - "domains": { + "urls": { "description": "Remote domains this capability refers to. Can use glob patterns.", "type": "array", "items": { @@ -2147,8 +2154,7 @@ "path": { "type": "string" } - }, - "$schema": "http://json-schema.org/draft-07/schema#" + } } }, "deny": { @@ -2162,8 +2168,7 @@ "path": { "type": "string" } - }, - "$schema": "http://json-schema.org/draft-07/schema#" + } } } } @@ -2254,8 +2259,7 @@ "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/\"", "type": "string" } - }, - "$schema": "http://json-schema.org/draft-07/schema#" + } } }, "deny": { @@ -2271,8 +2275,7 @@ "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/\"", "type": "string" } - }, - "$schema": "http://json-schema.org/draft-07/schema#" + } } } } @@ -2375,48 +2378,6 @@ "description": "If this command is a sidecar command.", "type": "boolean" } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ShellAllowedArg": { - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "additionalProperties": false, - "description": "A variable that is set while calling the command from the webview API.", - "properties": { - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", - "type": "string" - } - }, - "required": [ - "validator" - ], - "type": "object" - } - ], - "description": "A command argument allowed to be executed by the webview API." - }, - "ShellAllowedArgs": { - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", - "items": { - "$ref": "#/definitions/ShellAllowedArg" - }, - "type": "array" - } - ], - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration." - } } } }, @@ -2452,48 +2413,6 @@ "description": "If this command is a sidecar command.", "type": "boolean" } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ShellAllowedArg": { - "anyOf": [ - { - "description": "A non-configurable argument that is passed to the command in the order it was specified.", - "type": "string" - }, - { - "additionalProperties": false, - "description": "A variable that is set while calling the command from the webview API.", - "properties": { - "validator": { - "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", - "type": "string" - } - }, - "required": [ - "validator" - ], - "type": "object" - } - ], - "description": "A command argument allowed to be executed by the webview API." - }, - "ShellAllowedArgs": { - "anyOf": [ - { - "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", - "type": "boolean" - }, - { - "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", - "items": { - "$ref": "#/definitions/ShellAllowedArg" - }, - "type": "array" - } - ], - "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration." - } } } } @@ -2504,7 +2423,6 @@ ] }, "Identifier": { - "description": "Permission identifier", "oneOf": [ { "description": "app:default -> Default permissions for the plugin.", @@ -6020,20 +5938,6 @@ "window:allow-inner-size" ] }, - { - "description": "window:allow-internal-on-mousedown -> Enables the internal_on_mousedown command without any pre-configured scope.", - "type": "string", - "enum": [ - "window:allow-internal-on-mousedown" - ] - }, - { - "description": "window:allow-internal-on-mousemove -> Enables the internal_on_mousemove command without any pre-configured scope.", - "type": "string", - "enum": [ - "window:allow-internal-on-mousemove" - ] - }, { "description": "window:allow-internal-toggle-maximize -> Enables the internal_toggle_maximize command without any pre-configured scope.", "type": "string", @@ -6454,20 +6358,6 @@ "window:deny-inner-size" ] }, - { - "description": "window:deny-internal-on-mousedown -> Denies the internal_on_mousedown command without any pre-configured scope.", - "type": "string", - "enum": [ - "window:deny-internal-on-mousedown" - ] - }, - { - "description": "window:deny-internal-on-mousemove -> Denies the internal_on_mousemove command without any pre-configured scope.", - "type": "string", - "enum": [ - "window:deny-internal-on-mousemove" - ] - }, { "description": "window:deny-internal-toggle-maximize -> Denies the internal_toggle_maximize command without any pre-configured scope.", "type": "string", @@ -6920,6 +6810,45 @@ ] } ] + }, + "ShellAllowedArg": { + "description": "A command argument allowed to be executed by the webview API.", + "anyOf": [ + { + "description": "A non-configurable argument that is passed to the command in the order it was specified.", + "type": "string" + }, + { + "description": "A variable that is set while calling the command from the webview API.", + "type": "object", + "required": [ + "validator" + ], + "properties": { + "validator": { + "description": "[regex] validator to require passed values to conform to an expected input.\n\nThis will require the argument value passed to this variable to match the `validator` regex before it will be executed.\n\n[regex]: https://docs.rs/regex/latest/regex/#syntax", + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "ShellAllowedArgs": { + "description": "A set of command arguments allowed to be executed by the webview API.\n\nA value of `true` will allow any arguments to be passed to the command. `false` will disable all arguments. A list of [`ShellAllowedArg`] will set those arguments as the only valid arguments to be passed to the attached command configuration.", + "anyOf": [ + { + "description": "Use a simple boolean to allow all or disable all arguments to this command configuration.", + "type": "boolean" + }, + { + "description": "A specific set of [`ShellAllowedArg`] that are valid to call for the command configuration.", + "type": "array", + "items": { + "$ref": "#/definitions/ShellAllowedArg" + } + } + ] } } } \ No newline at end of file diff --git a/plugins/authenticator/README.md b/plugins/authenticator/README.md index b56f30e8..13c75a5f 100644 --- a/plugins/authenticator/README.md +++ b/plugins/authenticator/README.md @@ -6,7 +6,7 @@ Use hardware security-keys in your Tauri App. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/authenticator/package.json b/plugins/authenticator/package.json index 445a1011..eecda5e5 100644 --- a/plugins/authenticator/package.json +++ b/plugins/authenticator/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/autostart/README.md b/plugins/autostart/README.md index 2e81dfc2..01f385ab 100644 --- a/plugins/autostart/README.md +++ b/plugins/autostart/README.md @@ -4,7 +4,7 @@ Automatically launch your application at startup. Supports Windows, Mac (via App ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json index 6b455800..c3e692d5 100644 --- a/plugins/autostart/package.json +++ b/plugins/autostart/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/barcode-scanner/package.json b/plugins/barcode-scanner/package.json index eccc2341..d8e46864 100644 --- a/plugins/barcode-scanner/package.json +++ b/plugins/barcode-scanner/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/biometric/package.json b/plugins/biometric/package.json index c314d995..0e85db0b 100644 --- a/plugins/biometric/package.json +++ b/plugins/biometric/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/cli/README.md b/plugins/cli/README.md index bc2bbabd..c58a6f31 100644 --- a/plugins/cli/README.md +++ b/plugins/cli/README.md @@ -6,7 +6,7 @@ Parse arguments from your Command Line Interface. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/cli/package.json b/plugins/cli/package.json index c82640d6..471df245 100644 --- a/plugins/cli/package.json +++ b/plugins/cli/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/clipboard-manager/README.md b/plugins/clipboard-manager/README.md index 70ad717f..02b26b3c 100644 --- a/plugins/clipboard-manager/README.md +++ b/plugins/clipboard-manager/README.md @@ -4,7 +4,7 @@ Read and write to the system clipboard. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json index a6dfbefd..c6d29548 100644 --- a/plugins/clipboard-manager/package.json +++ b/plugins/clipboard-manager/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/deep-link/README.md b/plugins/deep-link/README.md index abe89cf0..d014040c 100644 --- a/plugins/deep-link/README.md +++ b/plugins/deep-link/README.md @@ -4,7 +4,7 @@ Set your Tauri application as the default handler for an URL. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/deep-link/examples/app/package.json b/plugins/deep-link/examples/app/package.json index 59f0158e..05ff9cf9 100644 --- a/plugins/deep-link/examples/app/package.json +++ b/plugins/deep-link/examples/app/package.json @@ -10,11 +10,11 @@ "tauri": "tauri" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0", + "@tauri-apps/api": "2.0.0-beta.2", "@tauri-apps/plugin-deep-link": "2.0.0-beta.0" }, "devDependencies": { - "@tauri-apps/cli": "2.0.0-beta.0", + "@tauri-apps/cli": "2.0.0-beta.3", "internal-ip": "^8.0.0", "typescript": "^5.2.2", "vite": "^5.0.12" diff --git a/plugins/deep-link/examples/app/src-tauri/.gitignore b/plugins/deep-link/examples/app/src-tauri/.gitignore index 67d4662d..877b3f77 100644 --- a/plugins/deep-link/examples/app/src-tauri/.gitignore +++ b/plugins/deep-link/examples/app/src-tauri/.gitignore @@ -2,6 +2,6 @@ # will have compiled files and executables /target/ -/capabilities/schemas +/gen/schemas .cargo \ No newline at end of file diff --git a/plugins/deep-link/examples/app/src-tauri/Cargo.toml b/plugins/deep-link/examples/app/src-tauri/Cargo.toml index 7cbf3fd5..9d1eb501 100644 --- a/plugins/deep-link/examples/app/src-tauri/Cargo.toml +++ b/plugins/deep-link/examples/app/src-tauri/Cargo.toml @@ -6,7 +6,7 @@ authors = ["you"] license = "" repository = "" edition = "2021" -rust-version = "1.70" +rust-version = "1.75" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/plugins/deep-link/package.json b/plugins/deep-link/package.json index 7481b92b..deb432eb 100644 --- a/plugins/deep-link/package.json +++ b/plugins/deep-link/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/deep-link/src/api-iife.js b/plugins/deep-link/src/api-iife.js index 6a37d748..d46ebd7d 100644 --- a/plugins/deep-link/src/api-iife.js +++ b/plugins/deep-link/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_DEEPLINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function t(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var r;async function _(e,r,_){const i="string"==typeof _?.target?{kind:"AnyLabel",label:_.target}:_?.target??{kind:"Any"};return t("plugin:event|listen",{event:e,target:i,handler:n(r)}).then((n=>async()=>async function(e,n){await t("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(){return await t("plugin:deep-link|get_current")}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.WEBVIEW_FILE_DROP="tauri://file-drop",e.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),e.getCurrent=i,e.onOpenUrl=async function(e){const n=await i();return null!=n&&e(n),await _("deep-link://new-url",(n=>e(n.payload)))},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEPLINK__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_DEEPLINK__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function t(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var r;async function i(e,r,i){const _="string"==typeof i?.target?{kind:"AnyLabel",label:i.target}:i?.target??{kind:"Any"};return t("plugin:event|listen",{event:e,target:_,handler:n(r)}).then((n=>async()=>async function(e,n){await t("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function _(){return await t("plugin:deep-link|get_current")}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.FILE_DROP="tauri://file-drop",e.FILE_DROP_HOVER="tauri://file-drop-hover",e.FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),e.getCurrent=_,e.onOpenUrl=async function(e){const n=await _();return null!=n&&e(n),await i("deep-link://new-url",(n=>e(n.payload)))},e}({});Object.defineProperty(window.__TAURI__,"deepLink",{value:__TAURI_PLUGIN_DEEPLINK__})} diff --git a/plugins/dialog/Cargo.toml b/plugins/dialog/Cargo.toml index b2620ca6..7be4e215 100644 --- a/plugins/dialog/Cargo.toml +++ b/plugins/dialog/Cargo.toml @@ -28,5 +28,5 @@ tauri-plugin-fs = { path = "../fs", version = "2.0.0-beta.0" } glib = "0.16" [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -rfd = { version = "=0.12.0", features = [ "gtk3", "common-controls-v6" ] } -raw-window-handle = "0.5" +rfd = { version = "0.14", default-features = false, features = [ "tokio", "gtk3", "common-controls-v6" ] } +raw-window-handle = "0.6" diff --git a/plugins/dialog/README.md b/plugins/dialog/README.md index 602efc34..0fbd529c 100644 --- a/plugins/dialog/README.md +++ b/plugins/dialog/README.md @@ -4,7 +4,7 @@ Native system dialogs for opening and saving files along with message dialogs. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/dialog/package.json b/plugins/dialog/package.json index 4a6b030d..315d081d 100644 --- a/plugins/dialog/package.json +++ b/plugins/dialog/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/dialog/src/desktop.rs b/plugins/dialog/src/desktop.rs index 257fdf73..82bb3fe6 100644 --- a/plugins/dialog/src/desktop.rs +++ b/plugins/dialog/src/desktop.rs @@ -10,7 +10,7 @@ use std::path::PathBuf; -use raw_window_handle::{HasRawWindowHandle, RawWindowHandle}; +use raw_window_handle::{HasWindowHandle, RawWindowHandle}; use serde::de::DeserializeOwned; use tauri::{plugin::PluginApi, AppHandle, Runtime}; @@ -97,9 +97,11 @@ impl From for rfd::MessageLevel { struct WindowHandle(RawWindowHandle); -unsafe impl HasRawWindowHandle for WindowHandle { - fn raw_window_handle(&self) -> RawWindowHandle { - self.0 +impl HasWindowHandle for WindowHandle { + fn window_handle( + &self, + ) -> Result, raw_window_handle::HandleError> { + Ok(unsafe { raw_window_handle::WindowHandle::borrow_raw(self.0) }) } } diff --git a/plugins/dialog/src/lib.rs b/plugins/dialog/src/lib.rs index 325ba92d..62563731 100644 --- a/plugins/dialog/src/lib.rs +++ b/plugins/dialog/src/lib.rs @@ -178,8 +178,10 @@ impl MessageDialogBuilder { /// /// - **Linux:** Unsupported. #[cfg(desktop)] - pub fn parent(mut self, parent: &W) -> Self { - self.parent.replace(parent.raw_window_handle()); + pub fn parent(mut self, parent: &W) -> Self { + if let Ok(h) = parent.window_handle() { + self.parent.replace(h.as_raw()); + } self } @@ -329,8 +331,10 @@ impl FileDialogBuilder { /// Sets the parent window of the dialog. #[cfg(desktop)] #[must_use] - pub fn set_parent(mut self, parent: &W) -> Self { - self.parent.replace(parent.raw_window_handle()); + pub fn set_parent(mut self, parent: &W) -> Self { + if let Ok(h) = parent.window_handle() { + self.parent.replace(h.as_raw()); + } self } diff --git a/plugins/fs/README.md b/plugins/fs/README.md index 72df1941..239ff04c 100644 --- a/plugins/fs/README.md +++ b/plugins/fs/README.md @@ -4,7 +4,7 @@ Access the file system. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/fs/package.json b/plugins/fs/package.json index 0977095d..fffb5be5 100644 --- a/plugins/fs/package.json +++ b/plugins/fs/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/fs/src/commands.rs b/plugins/fs/src/commands.rs index 0b4f8015..fe49d15c 100644 --- a/plugins/fs/src/commands.rs +++ b/plugins/fs/src/commands.rs @@ -73,8 +73,8 @@ pub struct BaseOptions { #[tauri::command] pub fn create( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { @@ -123,8 +123,8 @@ fn default_true() -> bool { #[tauri::command] pub fn open( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { @@ -184,8 +184,8 @@ pub struct CopyFileOptions { #[tauri::command] pub fn copy_file( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, from_path: SafePathBuf, to_path: SafePathBuf, options: Option, @@ -226,8 +226,8 @@ pub struct MkdirOptions { #[tauri::command] pub fn mkdir( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult<()> { @@ -293,8 +293,8 @@ fn read_dir_inner>(path: P) -> crate::Result> { #[tauri::command] pub fn read_dir( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult> { @@ -332,8 +332,8 @@ pub fn read( #[tauri::command] pub fn read_file( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult> { @@ -357,8 +357,8 @@ pub fn read_file( #[tauri::command] pub fn read_text_file( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { @@ -382,8 +382,8 @@ pub fn read_text_file( #[tauri::command] pub fn read_text_file_lines( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { @@ -438,8 +438,8 @@ pub struct RemoveOptions { #[tauri::command] pub fn remove( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult<()> { @@ -506,8 +506,8 @@ pub struct RenameOptions { #[tauri::command] pub fn rename( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, old_path: SafePathBuf, new_path: SafePathBuf, options: Option, @@ -568,8 +568,8 @@ pub fn seek( #[tauri::command] pub fn stat( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { @@ -592,8 +592,8 @@ pub fn stat( #[tauri::command] pub fn lstat( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { @@ -624,8 +624,8 @@ pub fn fstat(app: AppHandle, rid: ResourceId) -> CommandResult( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, len: Option, options: Option, @@ -701,8 +701,8 @@ fn default_create_value() -> bool { fn write_file_inner( app: AppHandle, - global_scope: &GlobalScope<'_, Entry>, - command_scope: &CommandScope<'_, Entry>, + global_scope: &GlobalScope, + command_scope: &CommandScope, path: SafePathBuf, data: &[u8], options: Option, @@ -754,8 +754,8 @@ fn write_file_inner( #[tauri::command] pub fn write_file( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, data: Vec, options: Option, @@ -766,8 +766,8 @@ pub fn write_file( #[tauri::command] pub fn write_text_file( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, data: String, options: Option, @@ -785,8 +785,8 @@ pub fn write_text_file( #[tauri::command] pub fn exists( app: AppHandle, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, path: SafePathBuf, options: Option, ) -> CommandResult { @@ -802,8 +802,8 @@ pub fn exists( pub fn resolve_path( app: &AppHandle, - global_scope: &GlobalScope<'_, Entry>, - command_scope: &CommandScope<'_, Entry>, + global_scope: &GlobalScope, + command_scope: &CommandScope, path: SafePathBuf, base_dir: Option, ) -> CommandResult { diff --git a/plugins/fs/src/watcher.rs b/plugins/fs/src/watcher.rs index eae62698..d83262a2 100644 --- a/plugins/fs/src/watcher.rs +++ b/plugins/fs/src/watcher.rs @@ -86,8 +86,8 @@ pub async fn watch( paths: Vec, options: WatchOptions, on_event: Channel, - global_scope: GlobalScope<'_, Entry>, - command_scope: CommandScope<'_, Entry>, + global_scope: GlobalScope, + command_scope: CommandScope, ) -> CommandResult { let mut resolved_paths = Vec::with_capacity(paths.capacity()); for path in paths { diff --git a/plugins/global-shortcut/README.md b/plugins/global-shortcut/README.md index cf10f98c..4bdb24f4 100644 --- a/plugins/global-shortcut/README.md +++ b/plugins/global-shortcut/README.md @@ -6,7 +6,7 @@ Register global shortcuts. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/global-shortcut/package.json b/plugins/global-shortcut/package.json index 2afe1aa4..f8d501b8 100644 --- a/plugins/global-shortcut/package.json +++ b/plugins/global-shortcut/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/http/README.md b/plugins/http/README.md index 44477c6e..d1f9bfa1 100644 --- a/plugins/http/README.md +++ b/plugins/http/README.md @@ -4,7 +4,7 @@ Access the HTTP client written in Rust. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/http/package.json b/plugins/http/package.json index 29b1f45d..bd26983b 100644 --- a/plugins/http/package.json +++ b/plugins/http/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/http/src/commands.rs b/plugins/http/src/commands.rs index bc030b85..3831b9ab 100644 --- a/plugins/http/src/commands.rs +++ b/plugins/http/src/commands.rs @@ -139,8 +139,8 @@ fn attach_proxy( pub async fn fetch( app: AppHandle, client_config: ClientConfig, - command_scope: CommandScope<'_, Entry>, - global_scope: GlobalScope<'_, Entry>, + command_scope: CommandScope, + global_scope: GlobalScope, ) -> crate::Result { let ClientConfig { method, diff --git a/plugins/localhost/CHANGELOG.md b/plugins/localhost/CHANGELOG.md index a454622f..150c6a82 100644 --- a/plugins/localhost/CHANGELOG.md +++ b/plugins/localhost/CHANGELOG.md @@ -19,7 +19,7 @@ ## \[2.0.0-alpha.3] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update MSRV to 1.70. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update MSRV to 1.75. ## \[2.0.0-alpha.2] diff --git a/plugins/localhost/README.md b/plugins/localhost/README.md index 35df725e..0b21087e 100644 --- a/plugins/localhost/README.md +++ b/plugins/localhost/README.md @@ -6,7 +6,7 @@ Expose your apps assets through a localhost server instead of the default custom ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/log/README.md b/plugins/log/README.md index a2542cd5..56c4beeb 100644 --- a/plugins/log/README.md +++ b/plugins/log/README.md @@ -4,7 +4,7 @@ Configurable logging for your Tauri app. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/log/package.json b/plugins/log/package.json index a542afd5..e2bc7c31 100644 --- a/plugins/log/package.json +++ b/plugins/log/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/log/src/api-iife.js b/plugins/log/src/api-iife.js index 6d6a3e1c..ff5eb504 100644 --- a/plugins/log/src/api-iife.js +++ b/plugins/log/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_LOG__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var a,t;async function o(e,a,t){const o="string"==typeof t?.target?{kind:"AnyLabel",label:t.target}:t?.target??{kind:"Any"};return r("plugin:event|listen",{event:e,target:o,handler:n(a)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(e,n,a){const t=(new Error).stack?.split("\n").map((e=>e.split("@"))),o=t?.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:i,line:c,keyValues:l}=a??{};let u=o?.[0]?.filter((e=>e.length>0)).join("@");"Error"===u&&(u="webview::unknown"),await r("plugin:log|log",{level:e,message:n,location:u,file:i,line:c,keyValues:l})}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.WEBVIEW_FILE_DROP="tauri://file-drop",e.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(a||(a={})),function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(t||(t={})),e.attachConsole=async function(){return await o("log://log",(e=>{const n=e.payload,r=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case t.Trace:console.log(r);break;case t.Debug:console.debug(r);break;case t.Info:console.info(r);break;case t.Warn:console.warn(r);break;case t.Error:console.error(r);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await i(t.Debug,e,n)},e.error=async function(e,n){await i(t.Error,e,n)},e.info=async function(e,n){await i(t.Info,e,n)},e.trace=async function(e,n){await i(t.Trace,e,n)},e.warn=async function(e,n){await i(t.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_PLUGIN_LOG__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_LOG__=function(e){"use strict";function n(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}async function r(e,n={},r){return window.__TAURI_INTERNALS__.invoke(e,n,r)}var a,t;async function o(e,a,t){const o="string"==typeof t?.target?{kind:"AnyLabel",label:t.target}:t?.target??{kind:"Any"};return r("plugin:event|listen",{event:e,target:o,handler:n(a)}).then((n=>async()=>async function(e,n){await r("plugin:event|unlisten",{event:e,eventId:n})}(e,n)))}async function i(e,n,a){const t=(new Error).stack?.split("\n").map((e=>e.split("@"))),o=t?.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:i,line:c,keyValues:l}=a??{};let u=o?.[0]?.filter((e=>e.length>0)).join("@");"Error"===u&&(u="webview::unknown"),await r("plugin:log|log",{level:e,message:n,location:u,file:i,line:c,keyValues:l})}return"function"==typeof SuppressedError&&SuppressedError,function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.FILE_DROP="tauri://file-drop",e.FILE_DROP_HOVER="tauri://file-drop-hover",e.FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(a||(a={})),function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(t||(t={})),e.attachConsole=async function(){return await o("log://log",(e=>{const n=e.payload,r=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case t.Trace:console.log(r);break;case t.Debug:console.debug(r);break;case t.Info:console.info(r);break;case t.Warn:console.warn(r);break;case t.Error:console.error(r);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await i(t.Debug,e,n)},e.error=async function(e,n){await i(t.Error,e,n)},e.info=async function(e,n){await i(t.Info,e,n)},e.trace=async function(e,n){await i(t.Trace,e,n)},e.warn=async function(e,n){await i(t.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_PLUGIN_LOG__})} diff --git a/plugins/nfc/package.json b/plugins/nfc/package.json index c6916422..56b35e04 100644 --- a/plugins/nfc/package.json +++ b/plugins/nfc/package.json @@ -27,6 +27,6 @@ "tslib": "2.6.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/notification/Cargo.toml b/plugins/notification/Cargo.toml index 3535a214..24cea18f 100644 --- a/plugins/notification/Cargo.toml +++ b/plugins/notification/Cargo.toml @@ -27,12 +27,30 @@ time = { version = "0.3", features = [ "serde", "parsing", "formatting" ] } url = { version = "2", features = [ "serde" ] } serde_repr = "0.1" -[target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -notify-rust = "4.5" - [target."cfg(windows)".dependencies] win7-notifications = { version = "0.3.1", optional = true } windows-version = { version = "0.1", optional = true } +[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies] +lazy_static = { version = "1", optional = true } +image = { version = "0.24", optional = true } +zbus = { version = "4", optional = true } +log = "0.4" +env_logger ={ version ="0.10", optional = true } + +[target.'cfg(target_os="macos")'.dependencies] +mac-notification-sys = "0.6" +chrono = { version = "0.4", optional = true} + +[target.'cfg(target_os="windows")'.dependencies] +winrt-notification = { package = "tauri-winrt-notification", version = "0.1" } + +[dev-dependencies] +color-backtrace = "0.5" +ctor = "0.2" +maplit = "1.0" + [features] +default = [ "zbus", "async" ] +async = [] windows7-compat = [ "win7-notifications", "windows-version" ] diff --git a/plugins/notification/README.md b/plugins/notification/README.md index 1163f0c2..8d1f9637 100644 --- a/plugins/notification/README.md +++ b/plugins/notification/README.md @@ -4,7 +4,7 @@ Send message notifications (brief auto-expiring OS window element) to your user. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/notification/package.json b/plugins/notification/package.json index 181538eb..78dd948f 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/notification/src/desktop.rs b/plugins/notification/src/desktop.rs index 8015885e..be3c348e 100644 --- a/plugins/notification/src/desktop.rs +++ b/plugins/notification/src/desktop.rs @@ -160,7 +160,7 @@ mod imp { deprecated = "This function does not work on Windows 7. Use `Self::notify` instead." )] pub fn show(self) -> crate::Result<()> { - let mut notification = notify_rust::Notification::new(); + let mut notification = crate::notify_rust::Notification::new(); if let Some(body) = self.body { notification.body(&body); } @@ -186,7 +186,7 @@ mod imp { } #[cfg(target_os = "macos")] { - let _ = notify_rust::set_application(if cfg!(feature = "custom-protocol") { + let _ = crate::notify_rust::set_application(if cfg!(feature = "custom-protocol") { &self.identifier } else { "com.apple.Terminal" diff --git a/plugins/notification/src/lib.rs b/plugins/notification/src/lib.rs index 4df17b87..408a0f79 100644 --- a/plugins/notification/src/lib.rs +++ b/plugins/notification/src/lib.rs @@ -32,6 +32,9 @@ mod commands; mod error; mod models; +#[allow(dead_code, unused_imports, deprecated, clippy::derivable_impls)] +mod notify_rust; + pub use error::{Error, Result}; #[cfg(desktop)] diff --git a/plugins/notification/src/notify_rust/error.rs b/plugins/notification/src/notify_rust/error.rs new file mode 100644 index 00000000..923bf713 --- /dev/null +++ b/plugins/notification/src/notify_rust/error.rs @@ -0,0 +1,161 @@ +#![allow(missing_docs)] + +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +use super::image::ImageError; +use std::{fmt, num}; +/// Convenient wrapper around `std::Result`. +pub type Result = ::std::result::Result; + +#[cfg(target_os = "macos")] +pub use super::macos::{ApplicationError, MacOsError, NotificationError}; + +/// The Error type. +#[derive(Debug)] +pub struct Error { + kind: ErrorKind, +} + +/// The kind of an error. +#[derive(Debug)] +#[non_exhaustive] +pub enum ErrorKind { + /// only here for backwards compatibility + Msg(String), + + #[cfg(all(feature = "dbus", unix, not(target_os = "macos")))] + Dbus(dbus::Error), + + #[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] + Zbus(zbus::Error), + + #[cfg(target_os = "macos")] + MacNotificationSys(mac_notification_sys::error::Error), + + Parse(num::ParseIntError), + + SpecVersion(String), + + Conversion(String), + + #[cfg(all(feature = "images", unix, not(target_os = "macos")))] + Image(ImageError), + + ImplementationMissing, +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self.kind { + #[cfg(all(feature = "dbus", unix, not(target_os = "macos")))] + ErrorKind::Dbus(ref e) => write!(f, "{}", e), + + #[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] + ErrorKind::Zbus(ref e) => write!(f, "{}", e), + + #[cfg(target_os = "macos")] + ErrorKind::MacNotificationSys(ref e) => write!(f, "{}", e), + + ErrorKind::Parse(ref e) => write!(f, "Parsing Error: {}", e), + ErrorKind::Conversion(ref e) => write!(f, "Conversion Error: {}", e), + ErrorKind::SpecVersion(ref e) | ErrorKind::Msg(ref e) => write!(f, "{}", e), + #[cfg(all(feature = "images", unix, not(target_os = "macos")))] + ErrorKind::Image(ref e) => write!(f, "{}", e), + ErrorKind::ImplementationMissing => write!( + f, + r#"No Dbus implementation available, please compile with either feature ="z" or feature="d""# + ), + } + } +} + +impl std::error::Error for Error {} + +impl From<&str> for Error { + fn from(e: &str) -> Error { + Error { + kind: ErrorKind::Msg(e.into()), + } + } +} + +#[cfg(all(feature = "dbus", unix, not(target_os = "macos")))] +impl From for Error { + fn from(e: dbus::Error) -> Error { + Error { + kind: ErrorKind::Dbus(e), + } + } +} + +#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] +impl From for Error { + fn from(e: zbus::Error) -> Error { + Error { + kind: ErrorKind::Zbus(e), + } + } +} + +#[cfg(target_os = "macos")] +impl From for Error { + fn from(e: mac_notification_sys::error::Error) -> Error { + Error { + kind: ErrorKind::MacNotificationSys(e), + } + } +} + +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +impl From for Error { + fn from(e: ImageError) -> Error { + Error { + kind: ErrorKind::Image(e), + } + } +} + +impl From for Error { + fn from(e: num::ParseIntError) -> Error { + Error { + kind: ErrorKind::Parse(e), + } + } +} + +impl From for Error { + fn from(kind: ErrorKind) -> Error { + Error { kind } + } +} + +/// Just the usual bail macro +#[macro_export] +#[doc(hidden)] +macro_rules! bail { + ($e:expr) => { + return Err($e.into()); + }; + ($fmt:expr, $($arg:tt)+) => { + return Err(format!($fmt, $($arg)+).into()); + }; +} + +/// Exits a function early with an `Error` if the condition is not satisfied. +/// +/// Similar to `assert!`, `ensure!` takes a condition and exits the function +/// if the condition fails. Unlike `assert!`, `ensure!` returns an `Error`, +/// it does not panic. +#[macro_export(local_inner_macros)] +#[doc(hidden)] +macro_rules! ensure { + ($cond:expr, $e:expr) => { + if !($cond) { + bail!($e); + } + }; + ($cond:expr, $fmt:expr, $($arg:tt)*) => { + if !($cond) { + bail!($fmt, $($arg)*); + } + }; +} diff --git a/plugins/notification/src/notify_rust/hints.rs b/plugins/notification/src/notify_rust/hints.rs new file mode 100644 index 00000000..9513abeb --- /dev/null +++ b/plugins/notification/src/notify_rust/hints.rs @@ -0,0 +1,245 @@ +#![cfg_attr(rustfmt, rustfmt_skip)] + +#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] +use zbus::zvariant; + +#[cfg(all(unix, not(target_os = "macos")))] +pub(crate) mod message; + +#[cfg(all(feature = "images", any(feature = "dbus", feature = "zbus"), unix, not(target_os = "macos")))] +use super::image::Image; + +#[cfg(all(feature = "images", feature = "zbus", unix, not(target_os = "macos")))] +use super::image::image_spec_str; +use super::Urgency; + +#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] use super::notification::Notification; +#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] use std::collections::HashMap; + +mod constants; + +#[cfg(all(unix, not(target_os = "macos")))] +#[derive(Eq, PartialEq, Hash, Clone, Debug)] +pub(crate) enum CustomHintType { + Int, + String, +} + +/// `Hints` allow you to pass extra information to the server. +/// +/// Many of these are standardized by either: +/// +/// * +/// * +/// +/// Which of these are actually implemented depends strongly on the Notification server you talk to. +/// Usually the [`get_capabilities()`](`crate::get_capabilities`) gives some clues, but the standards usually mention much more +/// than is actually available. +/// +/// you pass these to [`Notification::hint`] +#[derive(Eq, PartialEq, Hash, Clone, Debug)] +pub enum Hint { + /// If true, server may interpret action identifiers as named icons and display those. + ActionIcons(bool), + + /// Check out: + /// + /// * + /// * + Category(String), + + /// Name of the DesktopEntry representing the calling application. In case of "firefox.desktop" + /// use "firefox". May be used to retrieve the correct icon. + DesktopEntry(String), + + /// Image as raw data + #[cfg(all(feature = "images", unix, not(target_os = "macos")))] + ImageData(Image), + + /// Display the image at this path. + ImagePath(String), + + /// This does not work on all servers, however timeout=0 will do the job + Resident(bool), + + /// Play the sound at this path. + SoundFile(String), + + /// A themeable named sound from the freedesktop.org [sound naming specification](http://0pointer.de/public/sound-naming-spec.html) to play when the notification pops up. Similar to icon-name, only for sounds. An example would be "message-new-instant". + SoundName(String), + + /// Suppress the notification sound. + SuppressSound(bool), + + /// When set the server will treat the notification as transient and by-pass the server's persistence capability, if it should exist. + Transient(bool), + + /// Lets the notification point to a certain 'x' position on the screen. + /// Requires `Y`. + X(i32), + + /// Lets the notification point to a certain 'y' position on the screen. + /// Requires `X`. + Y(i32), + + /// Pass me a Urgency, either Low, Normal or Critical + Urgency(Urgency), + + /// If you want to pass something entirely different. + Custom(String, String), + + /// A custom numerical (integer) hint + CustomInt(String, i32), + + /// Only used by this NotificationServer implementation + Invalid // TODO find a better solution to this +} + +impl Hint { + /// Get the `bool` representation of this hint. + pub fn as_bool(&self) -> Option { + match *self { + | Hint::ActionIcons(inner) + | Hint::Resident(inner) + | Hint::SuppressSound(inner) + | Hint::Transient(inner) => Some(inner), + _ => None + } + } + + /// Get the `i32` representation of this hint. + pub fn as_i32(&self) -> Option { + match *self { + Hint::X(inner) | Hint::Y(inner) => Some(inner), + _ => None + } + } + + /// Get the `&str` representation of this hint. + pub fn as_str(&self) -> Option<&str> { + match *self { + Hint::DesktopEntry(ref inner) | + Hint::ImagePath(ref inner) | + Hint::SoundFile(ref inner) | + Hint::SoundName(ref inner) => Some(inner), + _ => None + } + } + + /// convenience converting a name and value into a hint + pub fn from_key_val(name: &str, value: &str) -> Result { + match (name,value){ + (constants::ACTION_ICONS,val) => val.parse::().map(Hint::ActionIcons).map_err(|e|e.to_string()), + (constants::CATEGORY, val) => Ok(Hint::Category(val.to_owned())), + (constants::DESKTOP_ENTRY, val) => Ok(Hint::DesktopEntry(val.to_owned())), + (constants::IMAGE_PATH, val) => Ok(Hint::ImagePath(val.to_owned())), + (constants::RESIDENT, val) => val.parse::().map(Hint::Resident).map_err(|e|e.to_string()), + (constants::SOUND_FILE, val) => Ok(Hint::SoundFile(val.to_owned())), + (constants::SOUND_NAME, val) => Ok(Hint::SoundName(val.to_owned())), + (constants::SUPPRESS_SOUND, val) => val.parse::().map(Hint::SuppressSound).map_err(|e|e.to_string()), + (constants::TRANSIENT, val) => val.parse::().map(Hint::Transient).map_err(|e|e.to_string()), + (constants::X, val) => val.parse::().map(Hint::X).map_err(|e|e.to_string()), + (constants::Y, val) => val.parse::().map(Hint::Y).map_err(|e|e.to_string()), + _ => Err(String::from("unknown name")) + } + } +} + +#[cfg(all(unix, not(target_os = "macos")))] +impl Hint {} + +#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] +#[test] +fn test_hints_to_map() { + + // custom value should only be there once if the names are identical + + let n1 = super::Notification::new() + .hint(Hint::Custom("foo".into(), "bar1".into())) + .hint(Hint::Custom("foo".into(), "bar2".into())) + .hint(Hint::Custom("f00".into(), "bar3".into())) + .finalize(); + + assert_eq!(hints_to_map(&n1), maplit::hashmap!{ + "foo" => zvariant::Value::Str("bar2".into()), + "f00" => zvariant::Value::Str("bar3".into()) + }); +} + +#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] +pub(crate) fn hints_to_map(notification: &Notification) -> HashMap::<&str, zvariant::Value<'_>> { + notification + .get_hints() + .map(Into::into) + .collect() +} + +#[cfg(all(feature = "zbus", unix, not(target_os = "macos")))] +impl<'a> From<&'a Hint> for (&'a str, zvariant::Value<'a>) { + fn from(val: &'a Hint) -> Self { + use self::constants::*; + match val { + Hint::ActionIcons(value) => (ACTION_ICONS , zvariant::Value::Bool(*value)), // bool + Hint::Category(value) => (CATEGORY , zvariant::Value::Str(value.as_str().into())), + Hint::DesktopEntry(value) => (DESKTOP_ENTRY , zvariant::Value::Str(value.as_str().into())), + + #[cfg(all(feature = "zbus", feature = "images", unix, not(target_os = "macos")))] + //Hint::ImageData(image) => (image_spec(*crate::SPEC_VERSION).as_str(), ImagePayload::from(*image).into()), + Hint::ImageData(image) => ( + image_spec_str(*crate::SPEC_VERSION), + zvariant::Value::Structure( + image.to_tuple().into() + ) + ), + + + Hint::ImagePath(value) => (IMAGE_PATH , zvariant::Value::Str(value.as_str().into())), + Hint::Resident(value) => (RESIDENT , zvariant::Value::Bool(*value)), // bool + Hint::SoundFile(value) => (SOUND_FILE , zvariant::Value::Str(value.as_str().into())), + Hint::SoundName(value) => (SOUND_NAME , zvariant::Value::Str(value.as_str().into())), + Hint::SuppressSound(value) => (SUPPRESS_SOUND , zvariant::Value::Bool(*value)), + Hint::Transient(value) => (TRANSIENT , zvariant::Value::Bool(*value)), + Hint::X(value) => (X , zvariant::Value::I32(*value)), + Hint::Y(value) => (Y , zvariant::Value::I32(*value)), + Hint::Urgency(value) => (URGENCY , zvariant::Value::U8(*value as u8)), + Hint::Custom(key, val) => (key.as_str() , zvariant::Value::Str(val.as_str().into())), + Hint::CustomInt(key, val) => (key.as_str() , zvariant::Value::I32(*val)), + Hint::Invalid => (INVALID , zvariant::Value::Str(INVALID.into())) + } + } +} + + +#[cfg(all(feature = "dbus", unix, not(target_os = "macos")))] +impl<'a, A: dbus::arg::RefArg> From<(&'a String, &'a A)> for Hint { + fn from(pair: (&String, &A)) -> Self { + + let (key, variant) = pair; + match (key.as_ref(), variant.as_u64(), variant.as_i64(), variant.as_str().map(String::from)) { + + (constants::ACTION_ICONS, Some(1), _, _ ) => Hint::ActionIcons(true), + (constants::ACTION_ICONS, _, _, _ ) => Hint::ActionIcons(false), + (constants::URGENCY, level, _, _ ) => Hint::Urgency(level.into()), + (constants::CATEGORY, _, _, Some(name) ) => Hint::Category(name), + + (constants::DESKTOP_ENTRY, _, _, Some(entry)) => Hint::DesktopEntry(entry), + (constants::IMAGE_PATH, _, _, Some(path) ) => Hint::ImagePath(path), + (constants::RESIDENT, Some(1), _, _ ) => Hint::Resident(true), + (constants::RESIDENT, _, _, _ ) => Hint::Resident(false), + + (constants::SOUND_FILE, _, _, Some(path) ) => Hint::SoundFile(path), + (constants::SOUND_NAME, _, _, Some(name) ) => Hint::SoundName(name), + (constants::SUPPRESS_SOUND, Some(1), _, _ ) => Hint::SuppressSound(true), + (constants::SUPPRESS_SOUND, _, _, _ ) => Hint::SuppressSound(false), + (constants::TRANSIENT, Some(1), _, _ ) => Hint::Transient(true), + (constants::TRANSIENT, _, _, _ ) => Hint::Transient(false), + (constants::X, _, Some(x), _ ) => Hint::X(x as i32), + (constants::Y, _, Some(y), _ ) => Hint::Y(y as i32), + + other => { + eprintln!("Invalid Hint {:#?} ", other); + Hint::Invalid + } + } + } +} diff --git a/plugins/notification/src/notify_rust/hints/constants.rs b/plugins/notification/src/notify_rust/hints/constants.rs new file mode 100644 index 00000000..a7c666c1 --- /dev/null +++ b/plugins/notification/src/notify_rust/hints/constants.rs @@ -0,0 +1,17 @@ +#![allow(dead_code)] + +pub const ACTION_ICONS: &str = "action-icons"; +pub const CATEGORY: &str = "category"; +pub const DESKTOP_ENTRY: &str = "desktop-entry"; +pub const IMAGE_PATH: &str = "image-path"; +pub const RESIDENT: &str = "resident"; +pub const SOUND_FILE: &str = "sound-file"; +pub const SOUND_NAME: &str = "sound-name"; +pub const SUPPRESS_SOUND: &str = "suppress-sound"; +pub const TRANSIENT: &str = "transient"; +pub const X: &str = "x"; +pub const Y: &str = "y"; +pub const URGENCY: &str = "urgency"; + + +pub const INVALID: &str = "invalid"; \ No newline at end of file diff --git a/plugins/notification/src/notify_rust/hints/message.rs b/plugins/notification/src/notify_rust/hints/message.rs new file mode 100644 index 00000000..4e8d0e70 --- /dev/null +++ b/plugins/notification/src/notify_rust/hints/message.rs @@ -0,0 +1,159 @@ +//! `Hints` allow you to pass extra information to the server. +//! +//! Many of these are standardized by either: +//! +//! [galago-project spec](http://www.galago-project.org/specs/notification/0.9/x344.html) or +//! [gnome notification-spec](https://developer.gnome.org/notification-spec/#hints) +//! +//! Which of these are actually implemented depends strongly on the Notification server you talk to. +//! Usually the `get_capabilities()` gives some clues, but the standards usually mention much more +//! than is actually available. +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(dead_code, unused_imports)] + + +use super::{Hint, constants::*}; +use super::Urgency; + +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +use super::image::*; + +use std::collections::{HashMap, HashSet}; +#[cfg(feature = "dbus")] +use dbus::arg::{messageitem::MessageItem, RefArg}; + +/// All currently implemented `Hints` that can be sent. +/// +/// as found on +#[derive(Eq, PartialEq, Hash, Clone, Debug)] +pub(crate) struct HintMessage(Hint); + +#[cfg(feature = "dbus")] +impl HintMessage { + pub fn wrap_hint(hint: Hint) -> (MessageItem, MessageItem) { + Self::from(hint).into() + } +} + +impl From for HintMessage { + fn from(hint: Hint) -> Self { + HintMessage(hint) + } +} + +impl std::ops::Deref for HintMessage { + type Target = Hint; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +#[cfg(feature = "dbus")] +impl<'a, A: RefArg> From<(&'a String, &'a A)> for HintMessage { + fn from(pair: (&String, &A)) -> Self { + + let (key, variant) = pair; + match (key.as_ref(), variant.as_u64(), variant.as_i64(), variant.as_str().map(String::from)) { + + (ACTION_ICONS, Some(1), _, _ ) => Hint::ActionIcons(true), + (ACTION_ICONS, _, _, _ ) => Hint::ActionIcons(false), + (URGENCY, level, _, _ ) => Hint::Urgency(level.into()), + (CATEGORY, _, _, Some(name) ) => Hint::Category(name), + + (DESKTOP_ENTRY, _, _, Some(entry)) => Hint::DesktopEntry(entry), + (IMAGE_PATH, _, _, Some(path) ) => Hint::ImagePath(path), + (RESIDENT, Some(1), _, _ ) => Hint::Resident(true), + (RESIDENT, _, _, _ ) => Hint::Resident(false), + + (SOUND_FILE, _, _, Some(path) ) => Hint::SoundFile(path), + (SOUND_NAME, _, _, Some(name) ) => Hint::SoundName(name), + (SUPPRESS_SOUND, Some(1), _, _ ) => Hint::SuppressSound(true), + (SUPPRESS_SOUND, _, _, _ ) => Hint::SuppressSound(false), + (TRANSIENT, Some(1), _, _ ) => Hint::Transient(true), + (TRANSIENT, _, _, _ ) => Hint::Transient(false), + (X, _, Some(x), _ ) => Hint::X(x as i32), + (Y, _, Some(y), _ ) => Hint::Y(y as i32), + + other => { + eprintln!("Invalid Hint{:#?} ", other); + Hint::Invalid + } + }.into() + } +} + +#[cfg(feature = "dbus")] +impl From for (MessageItem, MessageItem) { + fn from(hint: HintMessage) -> Self { + + let (key, value): (String, MessageItem) = match hint.0 { + Hint::ActionIcons(value) => (ACTION_ICONS .to_owned(), MessageItem::Bool(value)), // bool + Hint::Category(ref value) => (CATEGORY .to_owned(), MessageItem::Str(value.clone())), + Hint::DesktopEntry(ref value) => (DESKTOP_ENTRY .to_owned(), MessageItem::Str(value.clone())), + #[cfg(all(feature = "images", unix, not(target_os ="macos")))] + Hint::ImageData(image) => (image_spec(*crate::SPEC_VERSION), ImageMessage::from(image).into()), + Hint::ImagePath(ref value) => (IMAGE_PATH .to_owned(), MessageItem::Str(value.clone())), + Hint::Resident(value) => (RESIDENT .to_owned(), MessageItem::Bool(value)), // bool + Hint::SoundFile(ref value) => (SOUND_FILE .to_owned(), MessageItem::Str(value.clone())), + Hint::SoundName(ref value) => (SOUND_NAME .to_owned(), MessageItem::Str(value.clone())), + Hint::SuppressSound(value) => (SUPPRESS_SOUND .to_owned(), MessageItem::Bool(value)), + Hint::Transient(value) => (TRANSIENT .to_owned(), MessageItem::Bool(value)), + Hint::X(value) => (X .to_owned(), MessageItem::Int32(value)), + Hint::Y(value) => (Y .to_owned(), MessageItem::Int32(value)), + Hint::Urgency(value) => (URGENCY .to_owned(), MessageItem::Byte(value as u8)), + Hint::Custom(ref key, ref val) => (key .to_owned(), MessageItem::Str(val.to_owned ())), + Hint::CustomInt(ref key, val) => (key .to_owned(), MessageItem::Int32(val)), + Hint::Invalid => ("invalid" .to_owned(), MessageItem::Str("Invalid".to_owned())) + }; + + (MessageItem::Str(key), MessageItem::Variant(Box::new(value))) + } +} + + +// TODO: deprecated, Prefer the DBus Arg and RefArg APIs +#[cfg(feature = "dbus")] +impl From<(&MessageItem, &MessageItem)> for HintMessage { + fn from ((key, mut value): (&MessageItem, &MessageItem)) -> Self { + use Hint as Hint; + + // If this is a variant, consider the thing inside it + // If it's a nested variant, keep drilling down until we get a real value + while let MessageItem::Variant(inner) = value { + value = inner; + } + + let is_stringy = value.inner::<&str>().is_ok(); + + match key.inner::<&str>() { + Ok(CATEGORY) => value.inner::<&str>().map(String::from).map(Hint::Category), + Ok(ACTION_ICONS) => value.inner().map(Hint::ActionIcons), + Ok(DESKTOP_ENTRY) => value.inner::<&str>().map(String::from).map(Hint::DesktopEntry), + Ok(IMAGE_PATH) => value.inner::<&str>().map(String::from).map(Hint::ImagePath), + Ok(RESIDENT) => value.inner().map(Hint::Resident), + Ok(SOUND_FILE) => value.inner::<&str>().map(String::from).map(Hint::SoundFile), + Ok(SOUND_NAME) => value.inner::<&str>().map(String::from).map(Hint::SoundName), + Ok(SUPPRESS_SOUND) => value.inner().map(Hint::SuppressSound), + Ok(TRANSIENT) => value.inner().map(Hint::Transient), + Ok(X) => value.inner().map(Hint::X), + Ok(Y) => value.inner().map(Hint::Y), + Ok(URGENCY) => value.inner().map(|i| match i { + 0 => Urgency::Low, + 2 => Urgency::Critical, + _ => Urgency::Normal + }).map(Hint::Urgency), + Ok(k) if is_stringy => value.inner::<&str>().map(|v| Hint::Custom(k.to_string(), v.to_string())), + Ok(k) => value.inner().map(|v| Hint::CustomInt(k.to_string(), v)), + _ => Err(()), + }.unwrap_or(Hint::Invalid) + .into() + } +} + + +#[allow(missing_docs)] +#[cfg(feature = "dbus")] +pub(crate) fn hints_from_variants(hints: &HashMap) -> HashSet { + hints.iter().map(Into::into).collect() +} diff --git a/plugins/notification/src/notify_rust/hints/tests.rs b/plugins/notification/src/notify_rust/hints/tests.rs new file mode 100644 index 00000000..23759c4a --- /dev/null +++ b/plugins/notification/src/notify_rust/hints/tests.rs @@ -0,0 +1,85 @@ +#![cfg(all(test, unix, not(target_os = "macos")))] + +use dbus::arg::messageitem::MessageItem as Item; +use ctor::ctor; + +use super::*; +use self::Hint as Hint; +use super::Urgency::*; + + +#[ctor] +fn init_color_backtrace() { + color_backtrace::install(); +} + +#[test] +fn hint_to_item() { + let category = &Hint::Category("test-me".to_owned()); + let (k, v) = category.into(); + + let test_k = Item::Str("category".into()); + let test_v = Item::Variant(Box::new(Item::Str("test-me".into()))); + + assert_eq!(k, test_k); + assert_eq!(v, test_v); +} + +#[test] +fn urgency() { + let low = &Hint::Urgency(Low); + let (k, v) = low.into(); + + let test_k = Item::Str("urgency".into()); + let test_v = Item::Variant(Box::new(Item::Byte(0))); + + assert_eq!(k, test_k); + assert_eq!(v, test_v); +} + +#[test] +fn simple_hint_to_item() { + let old_hint = &Hint::Custom("foo".into(), "bar".into()); + + let (k, v) = old_hint.into(); + let hint: Hint = (&k, &v).into(); + + assert_eq!(old_hint, &hint); +} + +#[test] +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +fn imagedata_hint_to_item() { + let hint = &Hint::ImageData(Image::from_rgb(1, 1, vec![0, 0, 0]).unwrap()); + let item: MessageItem = hint.into(); + let test_item = Item::DictEntry( + Box::new(Item::Str(image_spec(*::SPEC_VERSION))), + Box::new(Item::Variant(Box::new(Item::Struct(vec![ + Item::Int32(1), + Item::Int32(1), + Item::Int32(3), + Item::Bool(false), + Item::Int32(8), + Item::Int32(3), + Item::Array(dbus::MessageItemArray::new(vec![ + Item::Byte(0), + Item::Byte(0), + Item::Byte(0), + ],"ay".into()).unwrap()) + ])))) + ); + assert_eq!(item, test_item); +} + +#[test] +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +fn imagedata_hint_to_item_with_spec() { + let key = image_spec(Version::new(1, 0)); + assert_eq!(key, String::from("icon_data")); + + let key = image_spec(Version::new(1, 1)); + assert_eq!(key, String::from("image_data")); + + let key = image_spec(Version::new(1, 2)); + assert_eq!(key, String::from("image-data")); +} diff --git a/plugins/notification/src/notify_rust/image.rs b/plugins/notification/src/notify_rust/image.rs new file mode 100644 index 00000000..27e33038 --- /dev/null +++ b/plugins/notification/src/notify_rust/image.rs @@ -0,0 +1,229 @@ +#[cfg(feature = "dbus")] +use dbus::arg::messageitem::{MessageItem, MessageItemArray}; +pub use image::DynamicImage; + +use std::cmp::Ordering; +use std::convert::TryFrom; +use std::error::Error; +use std::fmt; +use std::path::Path; + +use super::miniver::Version; + +mod constants { + pub const IMAGE_DATA: &str = "image-data"; + pub const IMAGE_DATA_1_1: &str = "image_data"; + pub const IMAGE_DATA_1_0: &str = "icon_data"; +} + +/// Image representation for images. Send via `Notification::image_data()` +#[derive(PartialEq, Eq, Debug, Clone, Hash)] +pub struct Image { + width: i32, + height: i32, + rowstride: i32, + alpha: bool, + bits_per_sample: i32, + channels: i32, + data: Vec, +} + +impl Image { + fn from_raw_data( + width: i32, + height: i32, + data: Vec, + channels: i32, + bits_per_sample: i32, + alpha: bool, + ) -> Result { + const MAX_SIZE: i32 = 0x0fff_ffff; + if width > MAX_SIZE || height > MAX_SIZE { + return Err(ImageError::TooBig); + } + + if data.len() != (width * height * channels) as usize { + Err(ImageError::WrongDataSize) + } else { + Ok(Self { + width, + height, + bits_per_sample, + channels, + data, + rowstride: width * channels, + alpha, + }) + } + } + + /// Creates an image from a raw vector of bytes + pub fn from_rgb(width: i32, height: i32, data: Vec) -> Result { + let channels = 3i32; + let bits_per_sample = 8; + Self::from_raw_data(width, height, data, channels, bits_per_sample, false) + } + + /// Creates an image from a raw vector of bytes with alpha + pub fn from_rgba(width: i32, height: i32, data: Vec) -> Result { + let channels = 4i32; + let bits_per_sample = 8; + Self::from_raw_data(width, height, data, channels, bits_per_sample, true) + } + + /// Attempts to open the given path as image + pub fn open + Sized>(path: T) -> Result { + let dyn_img = image::open(&path).map_err(ImageError::CantOpen)?; + Image::try_from(dyn_img) + } + + #[cfg(all(feature = "images", feature = "zbus"))] + pub(crate) fn to_tuple(&self) -> (i32, i32, i32, bool, i32, i32, Vec) { + ( + self.width, + self.height, + self.rowstride, + self.alpha, + self.bits_per_sample, + self.channels, + self.data.clone(), + ) + } +} + +impl TryFrom for Image { + type Error = ImageError; + + fn try_from(dyn_img: DynamicImage) -> Result { + match dyn_img { + DynamicImage::ImageRgb8(img) => Self::try_from(img), + DynamicImage::ImageRgba8(img) => Self::try_from(img), + _ => Err(ImageError::CantConvert), + } + } +} + +impl TryFrom for Image { + type Error = ImageError; + + fn try_from(img: image::RgbImage) -> Result { + let (width, height) = img.dimensions(); + let image_data = img.into_raw(); + Image::from_rgb(width as i32, height as i32, image_data) + } +} + +impl TryFrom for Image { + type Error = ImageError; + + fn try_from(img: image::RgbaImage) -> Result { + let (width, height) = img.dimensions(); + let image_data = img.into_raw(); + Image::from_rgba(width as i32, height as i32, image_data) + } +} + +/// Errors that can occur when creating an Image +#[derive(Debug)] +pub enum ImageError { + /// The given image is too big. DBus only has 32 bits for width / height + TooBig, + /// The given bytes don't match the width, height and channel count + WrongDataSize, + /// Can't open given path + CantOpen(image::ImageError), + /// Can't convert from given input + CantConvert, +} + +impl Error for ImageError { + fn source(&self) -> Option<&(dyn Error + 'static)> { + use ImageError::*; + match self { + TooBig | WrongDataSize | CantConvert => None, + CantOpen(e) => Some(e), + } + } +} + +impl fmt::Display for ImageError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + use ImageError::*; + match self { + TooBig => writeln!( + f, + "The given image is too big. DBus only has 32 bits for width / height" + ), + WrongDataSize => writeln!( + f, + "The given bytes don't match the width, height and channel count" + ), + CantOpen(e) => writeln!(f, "Can't open given path {}", e), + CantConvert => writeln!(f, "Can't convert from given input"), + } + } +} + +/// matching image data key for each spec version +#[cfg(feature = "dbus")] +pub(crate) fn image_spec(version: Version) -> String { + match version.cmp(&Version::new(1, 1)) { + Ordering::Less => constants::IMAGE_DATA_1_0.to_owned(), + Ordering::Equal => constants::IMAGE_DATA_1_1.to_owned(), + Ordering::Greater => constants::IMAGE_DATA.to_owned(), + } +} + +/// matching image data key for each spec version +#[cfg(feature = "zbus")] +pub(crate) fn image_spec_str(version: Version) -> &'static str { + match version.cmp(&Version::new(1, 1)) { + Ordering::Less => constants::IMAGE_DATA_1_0, + Ordering::Equal => constants::IMAGE_DATA_1_1, + Ordering::Greater => constants::IMAGE_DATA, + } +} + +#[cfg(feature = "dbus")] +pub struct ImageMessage(Image); + +#[cfg(feature = "dbus")] +impl From for ImageMessage { + fn from(hint: Image) -> Self { + ImageMessage(hint) + } +} + +impl From for ImageError { + fn from(image_error: image::ImageError) -> Self { + ImageError::CantOpen(image_error) + } +} + +#[cfg(feature = "dbus")] +impl std::ops::Deref for ImageMessage { + type Target = Image; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +#[cfg(feature = "dbus")] +impl From for MessageItem { + fn from(img_msg: ImageMessage) -> Self { + let img = img_msg.0; + + let bytes = img.data.into_iter().map(MessageItem::Byte).collect(); + + MessageItem::Struct(vec![ + MessageItem::Int32(img.width), + MessageItem::Int32(img.height), + MessageItem::Int32(img.rowstride), + MessageItem::Bool(img.alpha), + MessageItem::Int32(img.bits_per_sample), + MessageItem::Int32(img.channels), + MessageItem::Array(MessageItemArray::new(bytes, "ay".into()).unwrap()), + ]) + } +} diff --git a/plugins/notification/src/notify_rust/macos.rs b/plugins/notification/src/notify_rust/macos.rs new file mode 100644 index 00000000..c886c0a7 --- /dev/null +++ b/plugins/notification/src/notify_rust/macos.rs @@ -0,0 +1,61 @@ +use super::{error::*, notification::Notification}; + +pub use mac_notification_sys::error::{ApplicationError, Error as MacOsError, NotificationError}; + +use std::ops::{Deref, DerefMut}; + +/// A handle to a shown notification. +/// +/// This keeps a connection alive to ensure actions work on certain desktops. +#[derive(Debug)] +pub struct NotificationHandle { + notification: Notification, +} + +impl NotificationHandle { + #[allow(missing_docs)] + pub fn new(notification: Notification) -> NotificationHandle { + NotificationHandle { notification } + } +} + +impl Deref for NotificationHandle { + type Target = Notification; + + fn deref(&self) -> &Notification { + &self.notification + } +} + +/// Allow to easily modify notification properties +impl DerefMut for NotificationHandle { + fn deref_mut(&mut self) -> &mut Notification { + &mut self.notification + } +} + +pub(crate) fn show_notification(notification: &Notification) -> Result { + mac_notification_sys::Notification::default() + .title(notification.summary.as_str()) + .message(¬ification.body) + .maybe_subtitle(notification.subtitle.as_deref()) + .maybe_sound(notification.sound_name.as_deref()) + .send()?; + + Ok(NotificationHandle::new(notification.clone())) +} + +pub(crate) fn schedule_notification( + notification: &Notification, + delivery_date: f64, +) -> Result { + mac_notification_sys::Notification::default() + .title(notification.summary.as_str()) + .message(¬ification.body) + .maybe_subtitle(notification.subtitle.as_deref()) + .maybe_sound(notification.sound_name.as_deref()) + .delivery_date(delivery_date) + .send()?; + + Ok(NotificationHandle::new(notification.clone())) +} diff --git a/plugins/notification/src/notify_rust/miniver.rs b/plugins/notification/src/notify_rust/miniver.rs new file mode 100644 index 00000000..5c8deb83 --- /dev/null +++ b/plugins/notification/src/notify_rust/miniver.rs @@ -0,0 +1,75 @@ +use super::error::*; +use std::str::FromStr; + +#[derive(Copy, Clone, Eq, Debug)] +pub struct Version { + pub major: u64, + pub minor: u64, +} + +impl Version { + #[allow(dead_code)] + pub fn new(major: u64, minor: u64) -> Self { + Self { major, minor } + } +} + +impl FromStr for Version { + type Err = Error; + fn from_str(s: &str) -> Result { + let vv = s.split('.').collect::>(); + match (vv.first(), vv.get(1)) { + (Some(maj), Some(min)) => Ok(Version { + major: maj.parse()?, + minor: min.parse()?, + }), + _ => Err(ErrorKind::SpecVersion(s.into()).into()), + } + } +} + +use std::cmp; + +impl PartialOrd for Version { + fn partial_cmp(&self, other: &Version) -> Option { + Some(self.cmp(other)) + } +} + +impl PartialEq for Version { + fn eq(&self, other: &Version) -> bool { + self.major == other.major && self.minor == other.minor + } +} + +impl Ord for Version { + fn cmp(&self, other: &Version) -> cmp::Ordering { + match self.major.cmp(&other.major) { + cmp::Ordering::Equal => {} + r => return r, + } + match self.minor.cmp(&other.minor) { + cmp::Ordering::Equal => {} + r => return r, + } + cmp::Ordering::Equal + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn version_parsing() { + assert_eq!("1.3".parse::().unwrap(), Version::new(1, 3)); + } + + #[test] + fn version_comparison() { + assert!(Version::new(1, 3) >= Version::new(1, 2)); + assert!(Version::new(1, 2) >= Version::new(1, 2)); + assert!(Version::new(1, 2) == Version::new(1, 2)); + assert!(Version::new(1, 1) <= Version::new(1, 2)); + } +} diff --git a/plugins/notification/src/notify_rust/mod.rs b/plugins/notification/src/notify_rust/mod.rs new file mode 100644 index 00000000..6177db84 --- /dev/null +++ b/plugins/notification/src/notify_rust/mod.rs @@ -0,0 +1,173 @@ +//! Desktop Notifications for Rust. +//! +//! Desktop notifications are popup messages generated to notify the user of certain events. +//! +//! ## Platform Support +//! +//! This library was originally conceived with the [XDG](https://en.wikipedia.org/wiki/XDG) notification specification in mind. +//! Since version 3.3 this crate also builds on macOS, however the semantics of the [XDG](https://en.wikipedia.org/wiki/XDG) specification and macOS `NSNotifications` +//! are quite different. +//! Therefore only a very small subset of functions is supported on macOS. +//! Certain methods don't have any effect there, others will explicitly fail to compile, +//! in these cases you will have to add platform specific toggles to your code. +//! For more see [platform differences](#platform-differences) +//! +//! # Platform Differences +//!
+//! ✔︎ = works
+//! ❌ = will not compile +//! +//! ## `Notification` +//! | method | XDG | macOS | windows | +//! |---------------------|-------|-------|---------| +//! | `fn appname(...)` | ✔︎ | | | +//! | `fn summary(...)` | ✔︎ | ✔︎ | ✔︎ | +//! | `fn subtitle(...)` | | ✔︎ | ✔︎ | +//! | `fn body(...)` | ✔︎ | ✔︎ | ✔︎ | +//! | `fn icon(...)` | ✔︎ | | | +//! | `fn auto_icon(...)`| ✔︎ | | | +//! | `fn hint(...)` | ✔︎ | ❌ | ❌ | +//! | `fn timeout(...)` | ✔︎ | | ✔︎ | +//! | `fn urgency(...)` | ✔︎ | ❌ | ❌ | +//! | `fn action(...)` | ✔︎ | | | +//! | `fn id(...)` | ✔︎ | | | +//! | `fn finalize(...)` | ✔︎ | ✔︎ | ✔︎ | +//! | `fn show(...)` | ✔︎ | ✔︎ | ✔︎ | +//! +//! ## `NotificationHandle` +//! +//! | method | XDG | macOS | windows | +//! |--------------------------|-----|-------|---------| +//! | `fn wait_for_action(...)`| ✔︎ | ❌ | ❌ | +//! | `fn close(...)` | ✔︎ | ❌ | ❌ | +//! | `fn on_close(...)` | ✔︎ | ❌ | ❌ | +//! | `fn update(...)` | ✔︎ | ❌ | ❌ | +//! | `fn id(...)` | ✔︎ | ❌ | ❌ | +//! +//! ## Functions +//! +//! | | XDG | macOS | windows | +//! |--------------------------------------------|-----|-------|---------| +//! | `fn get_capabilities(...)` | ✔︎ | ❌ | ❌ | +//! | `fn get_server_information(...)` | ✔︎ | ❌ | ❌ | +//! | `fn set_application(...)` | ❌ | ✔︎ | ❌ | +//! | `fn get_bundle_identifier_or_default(...)` | ❌ | ✔︎ | ❌ | +//! +//! +//! ### Toggles +//! +//! Please use `target_os` toggles if you plan on using methods labeled with ❌. +//! +//! ```ignore +//! #[cfg(target_os = "macos")] +//! // or +//! // #### #[cfg(all(unix, not(target_os = "macos")))] +//! ``` +//!
+//! + +#![deny( + missing_copy_implementations, + trivial_casts, + trivial_numeric_casts, + unsafe_code, + unused_import_braces, + unused_qualifications +)] +#![warn( + missing_docs, + clippy::doc_markdown, + clippy::semicolon_if_nothing_returned, + clippy::single_match_else, + clippy::inconsistent_struct_constructor, + clippy::map_unwrap_or, + clippy::match_same_arms +)] + +#[cfg(all(feature = "dbus", unix, not(target_os = "macos")))] +extern crate dbus; + +#[cfg(target_os = "macos")] +extern crate mac_notification_sys; + +#[cfg(target_os = "windows")] +extern crate winrt_notification; + +#[macro_use] +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +extern crate lazy_static; + +pub mod error; +mod hints; +mod miniver; +mod notification; +mod timeout; +pub(crate) mod urgency; + +#[cfg(target_os = "macos")] +mod macos; + +#[cfg(target_os = "windows")] +mod windows; + +#[cfg(all(unix, not(target_os = "macos")))] +mod xdg; + +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +mod image; + +#[cfg(all(feature = "server", feature = "dbus", unix, not(target_os = "macos")))] +pub mod server; + +#[cfg(target_os = "macos")] +pub use mac_notification_sys::{get_bundle_identifier_or_default, set_application}; + +#[cfg(target_os = "macos")] +pub use macos::NotificationHandle; + +#[cfg(all( + any(feature = "dbus", feature = "zbus"), + unix, + not(target_os = "macos") +))] +pub use xdg::{ + dbus_stack, get_capabilities, get_server_information, handle_action, ActionResponse, + CloseHandler, CloseReason, DbusStack, NotificationHandle, +}; + +#[cfg(all(feature = "server", unix, not(target_os = "macos")))] +pub use xdg::stop_server; + +pub use hints::Hint; + +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +pub use image::{Image, ImageError}; + +#[cfg_attr( + target_os = "macos", + deprecated(note = "Urgency is not supported on macOS") +)] +pub use urgency::Urgency; + +pub use {notification::Notification, timeout::Timeout}; + +#[cfg(all(feature = "images", unix, not(target_os = "macos")))] +lazy_static! { + /// Read once at runtime. Needed for Images + pub static ref SPEC_VERSION: miniver::Version = + get_server_information() + .and_then(|info| info.spec_version.parse::()) + .unwrap_or_else(|_| miniver::Version::new(1,1)); +} +/// Return value of `get_server_information()`. +#[derive(Debug)] +pub struct ServerInformation { + /// The product name of the server. + pub name: String, + /// The vendor name. + pub vendor: String, + /// The server's version string. + pub version: String, + /// The specification version the server is compliant with. + pub spec_version: String, +} diff --git a/plugins/notification/src/notify_rust/notification.rs b/plugins/notification/src/notify_rust/notification.rs new file mode 100644 index 00000000..256941af --- /dev/null +++ b/plugins/notification/src/notify_rust/notification.rs @@ -0,0 +1,480 @@ +#[cfg(all(unix, not(target_os = "macos")))] +use super::{ + hints::{CustomHintType, Hint}, + urgency::Urgency, + xdg, +}; + +#[cfg(all(unix, not(target_os = "macos"), feature = "images"))] +use super::image::Image; + +#[cfg(all(unix, target_os = "macos"))] +use super::macos; +#[cfg(target_os = "windows")] +use super::windows; + +use super::{error::*, timeout::Timeout}; + +#[cfg(all(unix, not(target_os = "macos")))] +use std::collections::{HashMap, HashSet}; + +// Returns the name of the current executable, used as a default for `Notification.appname`. +fn exe_name() -> String { + std::env::current_exe() + .unwrap() + .file_name() + .unwrap() + .to_str() + .unwrap() + .to_owned() +} + +/// Desktop notification. +/// +/// A desktop notification is configured via builder pattern, before it is launched with `show()`. +#[derive(Debug, Clone)] +#[non_exhaustive] +pub struct Notification { + /// Filled by default with executable name. + pub appname: String, + + /// Single line to summarize the content. + pub summary: String, + + /// Subtitle for macOS + pub subtitle: Option, + + /// Multiple lines possible, may support simple markup, + /// check out `get_capabilities()` -> `body-markup` and `body-hyperlinks`. + pub body: String, + + /// Use a file:// URI or a name in an icon theme, must be compliant freedesktop.org. + pub icon: String, + + /// Check out `Hint` + /// + /// # warning + /// this does not hold all hints, [`Hint::Custom`] and [`Hint::CustomInt`] are held elsewhere, + // /// please access hints via [`Notification::get_hints`]. + #[cfg(all(unix, not(target_os = "macos")))] + pub hints: HashSet, + + #[cfg(all(unix, not(target_os = "macos")))] + pub(crate) hints_unique: HashMap<(String, CustomHintType), Hint>, + + /// See `Notification::actions()` and `Notification::action()` + pub actions: Vec, + + #[cfg(target_os = "macos")] + pub(crate) sound_name: Option, + + #[cfg(target_os = "windows")] + pub(crate) sound_name: Option, + + #[cfg(target_os = "windows")] + pub(crate) path_to_image: Option, + + #[cfg(target_os = "windows")] + pub(crate) app_id: Option, + + #[cfg(all(unix, not(target_os = "macos")))] + pub(crate) bus: xdg::NotificationBus, + + /// Lifetime of the Notification in ms. Often not respected by server, sorry. + pub timeout: Timeout, // both gnome and galago want allow for -1 + + /// Only to be used on the receive end. Use Notification hand for updating. + pub(crate) id: Option, +} + +impl Notification { + /// Constructs a new Notification. + /// + /// Most fields are empty by default, only `appname` is initialized with the name of the current + /// executable. + /// The appname is used by some desktop environments to group notifications. + pub fn new() -> Notification { + Notification::default() + } + + /// This is for testing purposes only and will not work with actual implementations. + #[cfg(all(unix, not(target_os = "macos")))] + #[doc(hidden)] + #[deprecated(note = "this is a test only feature")] + pub fn at_bus(sub_bus: &str) -> Notification { + let bus = xdg::NotificationBus::custom(sub_bus) + .ok_or("invalid subpath") + .unwrap(); + Notification { + bus, + ..Notification::default() + } + } + + /// Overwrite the appname field used for Notification. + /// + /// # Platform Support + /// Please note that this method has no effect on macOS. Here you can only set the application via [`set_application()`](fn.set_application.html) + pub fn appname(&mut self, appname: &str) -> &mut Notification { + self.appname = appname.to_owned(); + self + } + + /// Set the `summary`. + /// + /// Often acts as title of the notification. For more elaborate content use the `body` field. + pub fn summary(&mut self, summary: &str) -> &mut Notification { + self.summary = summary.to_owned(); + self + } + + /// Set the `subtitle`. + /// + /// This is only useful on macOS, it's not part of the XDG specification and will therefore be eaten by gremlins under your CPU 😈🤘. + pub fn subtitle(&mut self, subtitle: &str) -> &mut Notification { + self.subtitle = Some(subtitle.to_owned()); + self + } + + /// Manual wrapper for `Hint::ImageData` + #[cfg(all(feature = "images", unix, not(target_os = "macos")))] + pub fn image_data(&mut self, image: Image) -> &mut Notification { + self.hint(Hint::ImageData(image)); + self + } + + /// Wrapper for `Hint::ImagePath` + #[cfg(all(unix, not(target_os = "macos")))] + pub fn image_path(&mut self, path: &str) -> &mut Notification { + self.hint(Hint::ImagePath(path.to_string())); + self + } + + /// Wrapper for `NotificationHint::ImagePath` + #[cfg(target_os = "windows")] + pub fn image_path(&mut self, path: &str) -> &mut Notification { + self.path_to_image = Some(path.to_string()); + self + } + + /// app's System.AppUserModel.ID + #[cfg(target_os = "windows")] + pub fn app_id(&mut self, app_id: &str) -> &mut Notification { + self.app_id = Some(app_id.to_string()); + self + } + + /// Wrapper for `Hint::ImageData` + #[cfg(all(feature = "images", unix, not(target_os = "macos")))] + pub fn image + Sized>( + &mut self, + path: T, + ) -> Result<&mut Notification> { + let img = Image::open(&path)?; + self.hint(Hint::ImageData(img)); + Ok(self) + } + + /// Wrapper for `Hint::SoundName` + #[cfg(all(unix, not(target_os = "macos")))] + pub fn sound_name(&mut self, name: &str) -> &mut Notification { + self.hint(Hint::SoundName(name.to_owned())); + self + } + + /// Set the `sound_name` for the `NSUserNotification` + #[cfg(any(target_os = "macos", target_os = "windows"))] + pub fn sound_name(&mut self, name: &str) -> &mut Notification { + self.sound_name = Some(name.to_owned()); + self + } + + /// Set the content of the `body` field. + /// + /// Multiline textual content of the notification. + /// Each line should be treated as a paragraph. + /// Simple html markup should be supported, depending on the server implementation. + pub fn body(&mut self, body: &str) -> &mut Notification { + self.body = body.to_owned(); + self + } + + /// Set the `icon` field. + /// + /// You can use common icon names here, usually those in `/usr/share/icons` + /// can all be used. + /// You can also use an absolute path to file. + /// + /// # Platform support + /// macOS does not have support manually setting the icon. However you can pretend to be another app using [`set_application()`](fn.set_application.html) + pub fn icon(&mut self, icon: &str) -> &mut Notification { + self.icon = icon.to_owned(); + self + } + + /// Set the `icon` field automatically. + /// + /// This looks at your binary's name and uses it to set the icon. + /// + /// # Platform support + /// macOS does not support manually setting the icon. However you can pretend to be another app using [`set_application()`](fn.set_application.html) + pub fn auto_icon(&mut self) -> &mut Notification { + self.icon = exe_name(); + self + } + + /// Adds a hint. + /// + /// This method will add a hint to the internal hint [`HashSet`]. + /// Hints must be of type [`Hint`]. + /// + /// Many of these are again wrapped by more convenient functions such as: + /// + /// * `sound_name(...)` + /// * `urgency(...)` + /// * [`image(...)`](#method.image) or + /// * [`image_data(...)`](#method.image_data) + /// * [`image_path(...)`](#method.image_path) + /// + /// # Platform support + /// Most of these hints don't even have an effect on the big XDG Desktops, they are completely tossed on macOS. + #[cfg(all(unix, not(target_os = "macos")))] + pub fn hint(&mut self, hint: Hint) -> &mut Notification { + match hint { + Hint::CustomInt(k, v) => { + self.hints_unique + .insert((k.clone(), CustomHintType::Int), Hint::CustomInt(k, v)); + } + Hint::Custom(k, v) => { + self.hints_unique + .insert((k.clone(), CustomHintType::String), Hint::Custom(k, v)); + } + _ => { + self.hints.insert(hint); + } + } + self + } + + #[cfg(all(unix, not(target_os = "macos")))] + pub(crate) fn get_hints(&self) -> impl Iterator { + self.hints.iter().chain(self.hints_unique.values()) + } + + /// Set the `timeout`. + /// + /// Accepts multiple types that implement `Into`. + /// + /// ## `i31` + /// + /// This sets the time (in milliseconds) from the time the notification is displayed until it is + /// closed again by the Notification Server. + /// According to [specification](https://developer.gnome.org/notification-spec/) + /// -1 will leave the timeout to be set by the server and + /// 0 will cause the notification never to expire. + + /// ## [Duration](`std::time::Duration`) + /// + /// When passing a [`Duration`](`std::time::Duration`) we will try convert it into milliseconds. + /// + /// # Platform support + /// This only works on XDG Desktops, macOS does not support manually setting the timeout. + pub fn timeout>(&mut self, timeout: T) -> &mut Notification { + self.timeout = timeout.into(); + self + } + + /// Set the `urgency`. + /// + /// Pick between Medium, Low and High. + /// + /// # Platform support + /// Most Desktops on linux and bsd are far too relaxed to pay any attention to this. + /// In macOS this does not exist + #[cfg(all(unix, not(target_os = "macos")))] + pub fn urgency(&mut self, urgency: Urgency) -> &mut Notification { + self.hint(Hint::Urgency(urgency)); // TODO impl as T where T: Into + self + } + + /// Set `actions`. + /// + /// To quote + /// + /// > Actions are sent over as a list of pairs. + /// > Each even element in the list (starting at index 0) represents the identifier for the action. + /// > Each odd element in the list is the localized string that will be displayed to the user.y + /// + /// There is nothing fancy going on here yet. + /// **Careful! This replaces the internal list of actions!** + /// + /// (xdg only) + #[deprecated(note = "please use .action() only")] + pub fn actions(&mut self, actions: Vec) -> &mut Notification { + self.actions = actions; + self + } + + /// Add an action. + /// + /// This adds a single action to the internal list of actions. + /// + /// (xdg only) + pub fn action(&mut self, identifier: &str, label: &str) -> &mut Notification { + self.actions.push(identifier.to_owned()); + self.actions.push(label.to_owned()); + self + } + + /// Set an Id ahead of time + /// + /// Setting the id ahead of time allows overriding a known other notification. + /// Though if you want to update a notification, it is easier to use the `update()` method of + /// the `NotificationHandle` object that `show()` returns. + /// + /// (xdg only) + pub fn id(&mut self, id: u32) -> &mut Notification { + self.id = Some(id); + self + } + + /// Finalizes a Notification. + /// + /// Part of the builder pattern, returns a complete copy of the built notification. + pub fn finalize(&self) -> Notification { + self.clone() + } + + /// Schedules a Notification + /// + /// Sends a Notification at the specified date. + #[cfg(all(target_os = "macos", feature = "chrono"))] + pub fn schedule( + &self, + delivery_date: chrono::DateTime, + ) -> Result { + macos::schedule_notification(self, delivery_date.timestamp() as f64) + } + + /// Schedules a Notification + /// + /// Sends a Notification at the specified timestamp. + /// This is a raw `f64`, if that is a bit too raw for you please activate the feature `"chrono"`, + /// then you can use `Notification::schedule()` instead, which accepts a `chrono::DateTime`. + #[cfg(target_os = "macos")] + pub fn schedule_raw(&self, timestamp: f64) -> Result { + macos::schedule_notification(self, timestamp) + } + + /// Sends Notification to D-Bus. + /// + /// Returns a handle to a notification + #[cfg(all(unix, not(target_os = "macos")))] + pub fn show(&self) -> Result { + xdg::show_notification(self) + } + + /// Sends Notification to D-Bus. + /// + /// Returns a handle to a notification + #[cfg(all(unix, not(target_os = "macos")))] + #[cfg(all(feature = "async", feature = "zbus"))] + pub async fn show_async(&self) -> Result { + xdg::show_notification_async(self).await + } + + /// Sends Notification to D-Bus. + /// + /// Returns a handle to a notification + #[cfg(all(unix, not(target_os = "macos")))] + #[cfg(feature = "async")] + // #[cfg(test)] + pub async fn show_async_at_bus(&self, sub_bus: &str) -> Result { + let bus = super::xdg::NotificationBus::custom(sub_bus).ok_or("invalid subpath")?; + super::xdg::show_notification_async_at_bus(self, bus).await + } + + /// Sends Notification to `NSUserNotificationCenter`. + /// + /// Returns an `Ok` no matter what, since there is currently no way of telling the success of + /// the notification. + #[cfg(target_os = "macos")] + pub fn show(&self) -> Result { + macos::show_notification(self) + } + + /// Sends Notification to `NSUserNotificationCenter`. + /// + /// Returns an `Ok` no matter what, since there is currently no way of telling the success of + /// the notification. + #[cfg(target_os = "windows")] + pub fn show(&self) -> Result<()> { + windows::show_notification(self) + } + + /// Wraps `show()` but prints notification to stdout. + #[cfg(all(unix, not(target_os = "macos")))] + #[deprecated = "this was never meant to be public API"] + pub fn show_debug(&mut self) -> Result { + println!( + "Notification:\n{appname}: ({icon}) {summary:?} {body:?}\nhints: [{hints:?}]\n", + appname = self.appname, + summary = self.summary, + body = self.body, + hints = self.hints, + icon = self.icon, + ); + self.show() + } +} + +impl Default for Notification { + #[cfg(all(unix, not(target_os = "macos")))] + fn default() -> Notification { + Notification { + appname: exe_name(), + summary: String::new(), + subtitle: None, + body: String::new(), + icon: String::new(), + hints: HashSet::new(), + hints_unique: HashMap::new(), + actions: Vec::new(), + timeout: Timeout::Default, + bus: Default::default(), + id: None, + } + } + + #[cfg(target_os = "macos")] + fn default() -> Notification { + Notification { + appname: exe_name(), + summary: String::new(), + subtitle: None, + body: String::new(), + icon: String::new(), + actions: Vec::new(), + timeout: Timeout::Default, + sound_name: Default::default(), + id: None, + } + } + + #[cfg(target_os = "windows")] + fn default() -> Notification { + Notification { + appname: exe_name(), + summary: String::new(), + subtitle: None, + body: String::new(), + icon: String::new(), + actions: Vec::new(), + timeout: Timeout::Default, + sound_name: Default::default(), + id: None, + path_to_image: None, + app_id: None, + } + } +} diff --git a/plugins/notification/src/notify_rust/server.rs b/plugins/notification/src/notify_rust/server.rs new file mode 100644 index 00000000..c6802ece --- /dev/null +++ b/plugins/notification/src/notify_rust/server.rs @@ -0,0 +1,238 @@ +//! **Experimental** server taking the place of your Desktop Environment's Notification Server. +//! +//! This is not nearly meant for anything but testing, as it only prints notifications to stdout. +//! It does not respond properly either yet. +//! +//! This server will not replace an already running notification server. +//! + +#![allow(unused_imports, unused_variables, dead_code)] + +use std::cell::Cell; +use std::collections::{HashMap, HashSet}; +use std::sync::{Arc, Mutex}; + +#[cfg(feature = "dbus")] +use dbus::{ + arg::{self, RefArg}, + ffidisp::{BusType, Connection, NameFlag}, + tree::{self, Factory, Interface, MTFn, MTSync, Tree}, + Path, +}; + +use super::xdg::{NOTIFICATION_NAMESPACE, NOTIFICATION_OBJECTPATH}; +use super::{Hint, Notification, Timeout}; + +static DBUS_ERROR_FAILED: &str = "org.freedesktop.DBus.Error.Failed"; +/// Version of the crate equals the version server. +pub const VERSION: &str = env!("CARGO_PKG_VERSION"); + +/// An **experimental** notification server. +/// See [the module level documentation](index.html) for more. +#[derive(Debug, Default)] +pub struct NotificationServer { + /// Counter for generating notification ids + counter: Mutex>, + + /// A flag that stops the server + stopped: Mutex>, +} + +impl NotificationServer { + fn count_up(&self) { + if let Ok(counter) = self.counter.lock() { + counter.set(counter.get() + 1); + } + } + + fn stop(&self) { + if let Ok(stop) = self.stopped.lock() { + stop.set(true); + } + } + + fn is_stopped(&self) -> bool { + if let Ok(stop) = self.stopped.lock() { + stop.get() + } else { + true + } + } + + /// Create a new `NotificationServer` instance. + pub fn create() -> Arc { + Arc::new(NotificationServer::default()) + } + // pub fn notify_mothod(&mut self, closure: F) + // -> Method + // where F: Fn(&Notification) + // { + + // fn handle_notification + + /// Start listening for incoming notifications + pub fn start(me: &Arc, closure: F) + where + F: Fn(&Notification), + { + let connection = Connection::get_private(BusType::Session).unwrap(); + + connection.release_name(NOTIFICATION_NAMESPACE).unwrap(); + connection + .register_name(NOTIFICATION_NAMESPACE, NameFlag::ReplaceExisting as u32) + .unwrap(); + connection + .register_object_path(NOTIFICATION_OBJECTPATH) + .unwrap(); + + let mytex = Arc::new(Mutex::new(me.clone())); + + let factory = Factory::new_fn::<()>(); // D::Tree = () + let tree = factory.tree(()).add( + factory + .object_path(NOTIFICATION_OBJECTPATH, ()) + .introspectable() + .add( + factory + .interface(NOTIFICATION_NAMESPACE, ()) + .add_m(method_notify(&factory, closure)) + .add_m(method_close_notification(&factory)) + .add_m(Self::stop_server(mytex.clone(), &factory)) + // .add_signal(method_notification_closed(&factory)) + // .add_signal(method_action_invoked(&factory)) + .add_m(method_get_capabilities(&factory)) + .add_m(method_get_server_information(&factory)), + ), + ); + + connection.add_handler(tree); + + while !me.is_stopped() { + // Wait for incoming messages. This will block up to one second. + // Discard the result - relevant messages have already been handled. + if let Some(received) = connection.incoming(1000).next() { + println!("RECEIVED {:?}", received); + } + } + } + + fn stop_server( + me: Arc>>, + factory: &Factory, + ) -> tree::Method, ()> { + factory + .method("Stop", (), move |minfo| { + if let Ok(me) = me.lock() { + me.stop(); + println!("STOPPING"); + Ok(vec![]) + } else { + Err(tree::MethodErr::failed(&String::from("nope!"))) + } + }) + .out_arg(("", "u")) + } +} + +fn hints_from_variants(hints: &HashMap) -> HashSet { + hints.iter().map(Into::into).collect() +} + +fn method_notify( + factory: &Factory, + on_notification: F, +) -> tree::Method, ()> +where + F: Fn(&Notification), +{ + factory + .method("Notify", (), move |minfo| { + let mut i = minfo.msg.iter_init(); + let appname: String = i.read()?; + let replaces_id: u32 = i.read()?; + let icon: String = i.read()?; + let summary: String = i.read()?; + let body: String = i.read()?; + let actions: Vec = i.read()?; + let hints: ::std::collections::HashMap>> = + i.read()?; + let timeout: i32 = i.read()?; + println!("hints {:?} ", hints); + + // let arg0 = try!(d.notify(app_name, replaces_id, app_icon, summary, body, actions, hints, timeout)); + let notification = Notification { + appname, + icon, + summary, + body, + actions, + hints: hints_from_variants(&hints), + timeout: Timeout::from(timeout), + id: if replaces_id == 0 { + None + } else { + Some(replaces_id) + }, + subtitle: None, + }; + + on_notification(¬ification); + + let arg0 = 43; + let rm = minfo.msg.method_return(); + let rm = rm.append1(arg0); + Ok(vec![rm]) + }) + .in_arg(("app_name", "s")) + .in_arg(("replaces_id", "u")) + .in_arg(("app_icon", "s")) + .in_arg(("summary", "s")) + .in_arg(("body", "s")) + .in_arg(("actions", "as")) + .in_arg(("hints", "a{sv}")) + .in_arg(("timeout", "i")) + .out_arg(("", "u")) +} + +fn method_close_notification(factory: &Factory) -> tree::Method, ()> { + factory + .method("CloseNotification", (), |minfo| { + let i = minfo.msg.iter_init(); + let rm = minfo.msg.method_return(); + Ok(vec![rm]) + }) + .in_arg(("id", "u")) +} + +fn method_get_capabilities(factory: &Factory) -> tree::Method, ()> { + factory + .method("GetCapabilities", (), |minfo| { + let caps: Vec = vec![]; + let rm = minfo.msg.method_return(); + let rm = rm.append1(caps); + Ok(vec![rm]) + }) + .out_arg(("caps", "as")) +} + +fn method_get_server_information(factory: &Factory) -> tree::Method, ()> { + factory + .method("GetServerInformation", (), |minfo| { + let (name, vendor, version, spec_version) = ( + "notify-rust", + "notify-rust", + env!("CARGO_PKG_VERSION"), + "0.0.0", + ); + let rm = minfo.msg.method_return(); + let rm = rm.append1(name); + let rm = rm.append1(vendor); + let rm = rm.append1(version); + let rm = rm.append1(spec_version); + Ok(vec![rm]) + }) + .out_arg(("name", "s")) + .out_arg(("vendor", "s")) + .out_arg(("version", "s")) + .out_arg(("spec_version", "s")) +} diff --git a/plugins/notification/src/notify_rust/timeout.rs b/plugins/notification/src/notify_rust/timeout.rs new file mode 100644 index 00000000..6b76a55a --- /dev/null +++ b/plugins/notification/src/notify_rust/timeout.rs @@ -0,0 +1,102 @@ +use std::{convert::TryInto, num::ParseIntError, str::FromStr, time::Duration}; + +/// Describes the timeout of a notification +/// +/// # `FromStr` +/// You can also parse a `Timeout` from a `&str`. +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub enum Timeout { + /// Expires according to server default. + /// + /// Whatever that might be... + Default, + + /// Do not expire, user will have to close this manually. + Never, + + /// Expire after n milliseconds. + Milliseconds(u32), +} + +impl Default for Timeout { + fn default() -> Self { + Timeout::Default + } +} + +#[test] +fn timeout_from_i32() { + assert_eq!(Timeout::from(234), Timeout::Milliseconds(234)); + assert_eq!(Timeout::from(-234), Timeout::Default); + assert_eq!(Timeout::from(0), Timeout::Never); +} + +impl From for Timeout { + fn from(int: i32) -> Timeout { + use std::cmp::Ordering::*; + match int.cmp(&0) { + Greater => Timeout::Milliseconds(int as u32), + Less => Timeout::Default, + Equal => Timeout::Never, + } + } +} + +impl From for Timeout { + fn from(duration: Duration) -> Timeout { + if duration.is_zero() { + Timeout::Never + } else if duration.as_millis() > u32::MAX.into() { + Timeout::Default + } else { + Timeout::Milliseconds(duration.as_millis().try_into().unwrap_or(u32::MAX)) + } + } +} + +impl From for i32 { + fn from(timeout: Timeout) -> Self { + match timeout { + Timeout::Default => -1, + Timeout::Never => 0, + Timeout::Milliseconds(ms) => ms as i32, + } + } +} + +impl FromStr for Timeout { + type Err = ParseIntError; + + fn from_str(s: &str) -> Result { + match s { + "default" => Ok(Timeout::Default), + "never" => Ok(Timeout::Never), + milliseconds => Ok(Timeout::Milliseconds(u32::from_str(milliseconds)?)), + } + } +} + +pub struct TimeoutMessage(Timeout); + +impl From for TimeoutMessage { + fn from(hint: Timeout) -> Self { + TimeoutMessage(hint) + } +} + +impl std::ops::Deref for TimeoutMessage { + type Target = Timeout; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +#[cfg(all(feature = "dbus", unix, not(target_os = "macos")))] +impl TryFrom<&dbus::arg::messageitem::MessageItem> for TimeoutMessage { + type Error = (); + + fn try_from(mi: &dbus::arg::messageitem::MessageItem) -> Result { + mi.inner::().map(|i| TimeoutMessage(i.into())) + } +} diff --git a/plugins/notification/src/notify_rust/urgency.rs b/plugins/notification/src/notify_rust/urgency.rs new file mode 100644 index 00000000..eeddf763 --- /dev/null +++ b/plugins/notification/src/notify_rust/urgency.rs @@ -0,0 +1,74 @@ +use super::error::ErrorKind; +use std::convert::TryFrom; + +/// Levels of Urgency. +/// +/// # Specification +/// > Developers must use their own judgement when deciding the urgency of a notification. Typically, if the majority of programs are using the same level for a specific type of urgency, other applications should follow them. +/// > +/// > For low and normal urgencies, server implementations may display the notifications how they choose. They should, however, have a sane expiration timeout dependent on the urgency level. +/// > +/// > **Critical notifications should not automatically expire**, as they are things that the user will most likely want to know about. They should only be closed when the user dismisses them, for example, by clicking on the notification. +/// +/// — see [Galago](http://www.galago-project.org/specs/notification/0.9/x320.html) or [Gnome](https://developer.gnome.org/notification-spec/#urgency-levels) specification. +#[derive(Eq, PartialEq, Hash, Copy, Clone, Debug)] +pub enum Urgency { + /// The behavior for `Low` urgency depends on the notification server. + Low = 0, + /// The behavior for `Normal` urgency depends on the notification server. + Normal = 1, + /// A critical notification will not time out. + Critical = 2, +} + +impl TryFrom<&str> for Urgency { + type Error = super::error::Error; + + #[rustfmt::skip] + fn try_from(string: &str) -> Result { + match string.to_lowercase().as_ref() { + "low" | + "lo" => Ok(Urgency::Low), + "normal" | + "medium" => Ok(Urgency::Normal), + "critical" | + "high" | + "hi" => Ok(Urgency::Critical), + _ => Err(ErrorKind::Conversion(format!("invalid input {:?}", string)).into()) + } + } +} + +impl From> for Urgency { + fn from(maybe_int: Option) -> Urgency { + match maybe_int { + Some(0) => Urgency::Low, + Some(x) if x >= 2 => Urgency::Critical, + _ => Urgency::Normal, + } + } +} + +// TODO: remove this in v5.0 +#[cfg(not(feature = "server"))] +impl From for Urgency { + fn from(int: u64) -> Urgency { + match int { + 0 => Urgency::Low, + 1 => Urgency::Normal, + 2..=std::u64::MAX => Urgency::Critical, + } + } +} + +// TODO: make this the default in v5.0 +#[cfg(feature = "server")] +impl From for Urgency { + fn from(int: u8) -> Urgency { + match int { + 0 => Urgency::Low, + 1 => Urgency::Normal, + 2..=std::u8::MAX => Urgency::Critical, + } + } +} diff --git a/plugins/notification/src/notify_rust/windows.rs b/plugins/notification/src/notify_rust/windows.rs new file mode 100644 index 00000000..423aae99 --- /dev/null +++ b/plugins/notification/src/notify_rust/windows.rs @@ -0,0 +1,40 @@ +use winrt_notification::Toast; + +pub use super::{error::*, notification::Notification, timeout::Timeout}; + +use std::{path::Path, str::FromStr}; + +pub(crate) fn show_notification(notification: &Notification) -> Result<()> { + let sound = match ¬ification.sound_name { + Some(chosen_sound_name) => winrt_notification::Sound::from_str(chosen_sound_name).ok(), + None => None, + }; + + let duration = match notification.timeout { + Timeout::Default => winrt_notification::Duration::Short, + Timeout::Never => winrt_notification::Duration::Long, + Timeout::Milliseconds(t) => { + if t >= 25000 { + winrt_notification::Duration::Long + } else { + winrt_notification::Duration::Short + } + } + }; + + let powershell_app_id = &Toast::POWERSHELL_APP_ID.to_string(); + let app_id = ¬ification.app_id.as_ref().unwrap_or(powershell_app_id); + let mut toast = Toast::new(app_id) + .title(¬ification.summary) + .text1(notification.subtitle.as_ref().map_or("", AsRef::as_ref)) // subtitle + .text2(¬ification.body) + .sound(sound) + .duration(duration); + if let Some(image_path) = ¬ification.path_to_image { + toast = toast.image(Path::new(&image_path), ""); + } + + toast + .show() + .map_err(|e| Error::from(ErrorKind::Msg(format!("{:?}", e)))) +} diff --git a/plugins/notification/src/notify_rust/xdg/bus.rs b/plugins/notification/src/notify_rust/xdg/bus.rs new file mode 100644 index 00000000..cd6c1cca --- /dev/null +++ b/plugins/notification/src/notify_rust/xdg/bus.rs @@ -0,0 +1,68 @@ +use super::super::xdg::NOTIFICATION_DEFAULT_BUS; + +fn skip_first_slash(s: &str) -> &str { + if let Some('/') = s.chars().next() { + &s[1..] + } else { + s + } +} + +use std::path::PathBuf; + +type BusNameType = std::borrow::Cow<'static, str>; + +#[derive(Clone, Debug)] +pub struct NotificationBus(BusNameType); + +impl Default for NotificationBus { + #[cfg(feature = "zbus")] + fn default() -> Self { + Self( + zbus::names::WellKnownName::from_static_str(NOTIFICATION_DEFAULT_BUS) + .unwrap() + .to_string() + .into(), + ) + } + + #[cfg(all(feature = "dbus", not(feature = "zbus")))] + fn default() -> Self { + Self( + dbus::strings::BusName::from_slice(NOTIFICATION_DEFAULT_BUS) + .unwrap() + .to_string() + .into(), + ) + } +} + +impl NotificationBus { + fn namespaced_custom(custom_path: &str) -> Option { + // abusing path for semantic join + skip_first_slash( + PathBuf::from("/de/hoodie/Notification") + .join(custom_path) + .to_str()?, + ) + .replace('/', ".") + .into() + } + + #[cfg(feature = "zbus")] + pub fn custom(custom_path: &str) -> Option { + let name = + zbus::names::WellKnownName::try_from(Self::namespaced_custom(custom_path)?).ok()?; + Some(Self(name.to_string().into())) + } + + #[cfg(all(feature = "dbus", not(feature = "zbus")))] + pub fn custom(custom_path: &str) -> Option { + let name = dbus::strings::BusName::new(Self::namespaced_custom(custom_path)?).ok()?; + Some(Self(name.to_string().into())) + } + + pub fn into_name(self) -> BusNameType { + self.0 + } +} diff --git a/plugins/notification/src/notify_rust/xdg/dbus_rs.rs b/plugins/notification/src/notify_rust/xdg/dbus_rs.rs new file mode 100644 index 00000000..b1658122 --- /dev/null +++ b/plugins/notification/src/notify_rust/xdg/dbus_rs.rs @@ -0,0 +1,328 @@ +use dbus::{ + arg::messageitem::{MessageItem, MessageItemArray}, + ffidisp::{BusType, Connection, ConnectionItem}, + Message, +}; + +use super::{ + bus::NotificationBus, ActionResponse, ActionResponseHandler, CloseReason, + NOTIFICATION_INTERFACE, +}; + +use super::super::{ + error::*, + hints::message::HintMessage, + notification::Notification, + xdg::{ServerInformation, NOTIFICATION_OBJECTPATH}, +}; + +pub mod bus { + + use super::super::super::xdg::NOTIFICATION_DEFAULT_BUS; + + fn skip_first_slash(s: &str) -> &str { + if let Some('/') = s.chars().next() { + &s[1..] + } else { + s + } + } + + use std::path::PathBuf; + + type BusNameType = dbus::strings::BusName<'static>; + + #[derive(Clone, Debug)] + pub struct NotificationBus(BusNameType); + + impl Default for NotificationBus { + fn default() -> Self { + Self(dbus::strings::BusName::from_slice(NOTIFICATION_DEFAULT_BUS).unwrap()) + } + } + + impl NotificationBus { + fn namespaced_custom(custom_path: &str) -> Option { + // abusing path for semantic join + skip_first_slash( + PathBuf::from("/de/hoodie/Notification") + .join(custom_path) + .to_str()?, + ) + .replace('/', ".") + .into() + } + + pub fn custom(custom_path: &str) -> Option { + let name = dbus::strings::BusName::new(Self::namespaced_custom(custom_path)?).ok()?; + Some(Self(name)) + } + + pub fn into_name(self) -> BusNameType { + self.0 + } + } +} + +/// A handle to a shown notification. +/// +/// This keeps a connection alive to ensure actions work on certain desktops. +#[derive(Debug)] +pub struct DbusNotificationHandle { + pub(crate) id: u32, + pub(crate) connection: Connection, + pub(crate) notification: Notification, +} + +impl DbusNotificationHandle { + pub(crate) fn new( + id: u32, + connection: Connection, + notification: Notification, + ) -> DbusNotificationHandle { + DbusNotificationHandle { + id, + connection, + notification, + } + } + + pub fn wait_for_action(self, invocation_closure: impl ActionResponseHandler) { + wait_for_action_signal(&self.connection, self.id, invocation_closure); + } + + pub fn close(self) { + let mut message = build_message("CloseNotification", Default::default()); + message.append_items(&[self.id.into()]); + let _ = self.connection.send(message); // If closing fails there's nothing we could do anyway + } + + pub fn on_close(self, closure: F) + where + F: FnOnce(CloseReason), + { + self.wait_for_action(|action: &ActionResponse| { + if let ActionResponse::Closed(reason) = action { + closure(*reason); + } + }); + } + + pub fn update(&mut self) { + self.id = send_notification_via_connection(&self.notification, self.id, &self.connection) + .unwrap(); + } +} + +pub fn send_notification_via_connection( + notification: &Notification, + id: u32, + connection: &Connection, +) -> Result { + send_notification_via_connection_at_bus(notification, id, connection, Default::default()) +} + +pub fn send_notification_via_connection_at_bus( + notification: &Notification, + id: u32, + connection: &Connection, + bus: NotificationBus, +) -> Result { + let mut message = build_message("Notify", bus); + let timeout: i32 = notification.timeout.into(); + message.append_items(&[ + notification.appname.to_owned().into(), // appname + id.into(), // notification to update + notification.icon.to_owned().into(), // icon + notification.summary.to_owned().into(), // summary (title) + notification.body.to_owned().into(), // body + pack_actions(notification), // actions + pack_hints(notification)?, // hints + timeout.into(), // timeout + ]); + + let reply = connection.send_with_reply_and_block(message, 2000)?; + + match reply.get_items().first() { + Some(MessageItem::UInt32(ref id)) => Ok(*id), + _ => Ok(0), + } +} + +pub fn connect_and_send_notification( + notification: &Notification, +) -> Result { + let bus = notification.bus.clone(); + connect_and_send_notification_at_bus(notification, bus) +} + +pub fn connect_and_send_notification_at_bus( + notification: &Notification, + bus: NotificationBus, +) -> Result { + let connection = Connection::get_private(BusType::Session)?; + let inner_id = notification.id.unwrap_or(0); + let id = send_notification_via_connection_at_bus(notification, inner_id, &connection, bus)?; + + Ok(DbusNotificationHandle::new( + id, + connection, + notification.clone(), + )) +} + +fn build_message(method_name: &str, bus: NotificationBus) -> Message { + Message::new_method_call( + bus.into_name(), + NOTIFICATION_OBJECTPATH, + NOTIFICATION_INTERFACE, + method_name, + ) + .unwrap_or_else(|_| panic!("Error building message call {:?}.", method_name)) +} + +pub fn pack_hints(notification: &Notification) -> Result { + if !notification.hints.is_empty() || !notification.hints_unique.is_empty() { + let hints = notification + .get_hints() + .cloned() + .map(HintMessage::wrap_hint) + .collect::>(); + + if let Ok(array) = MessageItem::new_dict(hints) { + return Ok(array); + } + } + + Ok(MessageItem::Array( + MessageItemArray::new(vec![], "a{sv}".into()).unwrap(), + )) +} + +pub fn pack_actions(notification: &Notification) -> MessageItem { + if !notification.actions.is_empty() { + let mut actions = vec![]; + for action in ¬ification.actions { + actions.push(action.to_owned().into()); + } + if let Ok(array) = MessageItem::new_array(actions) { + return array; + } + } + + MessageItem::Array(MessageItemArray::new(vec![], "as".into()).unwrap()) +} + +pub fn get_capabilities() -> Result> { + let mut capabilities = vec![]; + + let message = build_message("GetCapabilities", Default::default()); + let connection = Connection::get_private(BusType::Session)?; + let reply = connection.send_with_reply_and_block(message, 2000)?; + + if let Some(MessageItem::Array(items)) = reply.get_items().first() { + for item in items.iter() { + if let MessageItem::Str(ref cap) = *item { + capabilities.push(cap.clone()); + } + } + } + + Ok(capabilities) +} + +fn unwrap_message_string(item: Option<&MessageItem>) -> String { + match item { + Some(MessageItem::Str(value)) => value.to_owned(), + _ => "".to_owned(), + } +} + +#[allow(clippy::get_first)] +pub fn get_server_information() -> Result { + let message = build_message("GetServerInformation", Default::default()); + let connection = Connection::get_private(BusType::Session)?; + let reply = connection.send_with_reply_and_block(message, 2000)?; + + let items = reply.get_items(); + + Ok(ServerInformation { + name: unwrap_message_string(items.get(0)), + vendor: unwrap_message_string(items.get(1)), + version: unwrap_message_string(items.get(2)), + spec_version: unwrap_message_string(items.get(3)), + }) +} + +/// Listens for the `ActionInvoked(UInt32, String)` Signal. +/// +/// No need to use this, check out `Notification::show_and_wait_for_action(FnOnce(action:&str))` +pub fn handle_action(id: u32, func: impl ActionResponseHandler) { + let connection = Connection::get_private(BusType::Session).unwrap(); + wait_for_action_signal(&connection, id, func); +} + +// Listens for the `ActionInvoked(UInt32, String)` signal. +fn wait_for_action_signal(connection: &Connection, id: u32, handler: impl ActionResponseHandler) { + connection + .add_match(&format!( + "interface='{}',member='ActionInvoked'", + NOTIFICATION_INTERFACE + )) + .unwrap(); + connection + .add_match(&format!( + "interface='{}',member='NotificationClosed'", + NOTIFICATION_INTERFACE + )) + .unwrap(); + + for item in connection.iter(1000) { + if let ConnectionItem::Signal(message) = item { + let items = message.get_items(); + + let (path, interface, member) = ( + message.path().map_or_else(String::new, |p| { + p.into_cstring().to_string_lossy().into_owned() + }), + message.interface().map_or_else(String::new, |p| { + p.into_cstring().to_string_lossy().into_owned() + }), + message.member().map_or_else(String::new, |p| { + p.into_cstring().to_string_lossy().into_owned() + }), + ); + match (path.as_str(), interface.as_str(), member.as_str()) { + // match (protocol.unwrap(), iface.unwrap(), member.unwrap()) { + // Action Invoked + (path, interface, "ActionInvoked") + if path == NOTIFICATION_OBJECTPATH && interface == NOTIFICATION_INTERFACE => + { + if let (&MessageItem::UInt32(nid), MessageItem::Str(ref action)) = + (&items[0], &items[1]) + { + if nid == id { + handler.call(&ActionResponse::Custom(action)); + break; + } + } + } + + // Notification Closed + (path, interface, "NotificationClosed") + if path == NOTIFICATION_OBJECTPATH && interface == NOTIFICATION_INTERFACE => + { + if let (&MessageItem::UInt32(nid), &MessageItem::UInt32(reason)) = + (&items[0], &items[1]) + { + if nid == id { + handler.call(&ActionResponse::Closed(reason.into())); + break; + } + } + } + (..) => (), + } + } + } +} diff --git a/plugins/notification/src/notify_rust/xdg/mod.rs b/plugins/notification/src/notify_rust/xdg/mod.rs new file mode 100644 index 00000000..3012b570 --- /dev/null +++ b/plugins/notification/src/notify_rust/xdg/mod.rs @@ -0,0 +1,544 @@ +//! This module contains `XDG` and `DBus` specific code. +//! +//! it should not be available under any platform other than `(unix, not(target_os = "macos"))` + +#[cfg(feature = "dbus")] +use dbus::ffidisp::Connection as DbusConnection; +#[cfg(feature = "zbus")] +use zbus::{block_on, zvariant}; + +use super::{error::*, notification::Notification}; + +use std::ops::{Deref, DerefMut}; + +#[cfg(feature = "dbus")] +mod dbus_rs; +#[cfg(all(feature = "dbus", not(feature = "zbus")))] +use dbus_rs::bus; + +#[cfg(feature = "zbus")] +mod zbus_rs; +#[cfg(all(feature = "zbus", not(feature = "dbus")))] +use zbus_rs::bus; + +#[cfg(all(feature = "dbus", feature = "zbus"))] +mod bus; + +// #[cfg(all(feature = "server", feature = "dbus", unix, not(target_os = "macos")))] +// pub mod server_dbus; + +// #[cfg(all(feature = "server", feature = "zbus", unix, not(target_os = "macos")))] +// pub mod server_zbus; + +// #[cfg(all(feature = "server", unix, not(target_os = "macos")))] +// pub mod server; + +#[cfg(not(feature = "debug_namespace"))] +#[doc(hidden)] +pub static NOTIFICATION_DEFAULT_BUS: &str = "org.freedesktop.Notifications"; + +#[cfg(feature = "debug_namespace")] +#[doc(hidden)] +// #[deprecated] +pub static NOTIFICATION_DEFAULT_BUS: &str = "de.hoodie.Notifications"; + +#[doc(hidden)] +pub static NOTIFICATION_INTERFACE: &str = "org.freedesktop.Notifications"; + +#[doc(hidden)] +pub static NOTIFICATION_OBJECTPATH: &str = "/org/freedesktop/Notifications"; + +pub(crate) use bus::NotificationBus; + +#[derive(Debug)] +enum NotificationHandleInner { + #[cfg(feature = "dbus")] + Dbus(dbus_rs::DbusNotificationHandle), + + #[cfg(feature = "zbus")] + Zbus(zbus_rs::ZbusNotificationHandle), +} + +/// A handle to a shown notification. +/// +/// This keeps a connection alive to ensure actions work on certain desktops. +#[derive(Debug)] +pub struct NotificationHandle { + inner: NotificationHandleInner, +} + +#[allow(dead_code)] +impl NotificationHandle { + #[cfg(feature = "dbus")] + pub(crate) fn for_dbus( + id: u32, + connection: DbusConnection, + notification: Notification, + ) -> NotificationHandle { + NotificationHandle { + inner: dbus_rs::DbusNotificationHandle::new(id, connection, notification).into(), + } + } + + #[cfg(feature = "zbus")] + pub(crate) fn for_zbus( + id: u32, + connection: zbus::Connection, + notification: Notification, + ) -> NotificationHandle { + NotificationHandle { + inner: zbus_rs::ZbusNotificationHandle::new(id, connection, notification).into(), + } + } + + /// Waits for the user to act on a notification and then calls + /// `invocation_closure` with the name of the corresponding action. + pub fn wait_for_action(self, invocation_closure: F) + where + F: FnOnce(&str), + { + match self.inner { + #[cfg(feature = "dbus")] + NotificationHandleInner::Dbus(inner) => { + inner.wait_for_action(|action: &ActionResponse| match action { + ActionResponse::Custom(action) => invocation_closure(action), + ActionResponse::Closed(_reason) => invocation_closure("__closed"), // FIXME: remove backward compatibility with 5.0 + }); + } + + #[cfg(feature = "zbus")] + NotificationHandleInner::Zbus(inner) => { + block_on( + inner.wait_for_action(|action: &ActionResponse| match action { + ActionResponse::Custom(action) => invocation_closure(action), + ActionResponse::Closed(_reason) => invocation_closure("__closed"), // FIXME: remove backward compatibility with 5.0 + }), + ); + } + }; + } + + /// Manually close the notification + pub fn close(self) { + match self.inner { + #[cfg(feature = "dbus")] + NotificationHandleInner::Dbus(inner) => inner.close(), + #[cfg(feature = "zbus")] + NotificationHandleInner::Zbus(inner) => block_on(inner.close()), + } + } + + /// Executes a closure after the notification has closed. + pub fn on_close(self, handler: impl CloseHandler) { + match self.inner { + #[cfg(feature = "dbus")] + NotificationHandleInner::Dbus(inner) => { + inner.wait_for_action(|action: &ActionResponse| { + if let ActionResponse::Closed(reason) = action { + handler.call(*reason); + } + }); + } + #[cfg(feature = "zbus")] + NotificationHandleInner::Zbus(inner) => { + block_on(inner.wait_for_action(|action: &ActionResponse| { + if let ActionResponse::Closed(reason) = action { + handler.call(*reason); + } + })); + } + }; + } + + pub fn update(&mut self) { + match self.inner { + #[cfg(feature = "dbus")] + NotificationHandleInner::Dbus(ref mut inner) => inner.update(), + #[cfg(feature = "zbus")] + NotificationHandleInner::Zbus(ref mut inner) => inner.update(), + } + } + + /// Returns the Handle's id. + pub fn id(&self) -> u32 { + match self.inner { + #[cfg(feature = "dbus")] + NotificationHandleInner::Dbus(ref inner) => inner.id, + #[cfg(feature = "zbus")] + NotificationHandleInner::Zbus(ref inner) => inner.id, + } + } +} + +/// Required for `DerefMut` +impl Deref for NotificationHandle { + type Target = Notification; + + fn deref(&self) -> &Notification { + match self.inner { + #[cfg(feature = "dbus")] + NotificationHandleInner::Dbus(ref inner) => &inner.notification, + #[cfg(feature = "zbus")] + NotificationHandleInner::Zbus(ref inner) => &inner.notification, + } + } +} + +/// Allow you to easily modify notification properties +impl DerefMut for NotificationHandle { + fn deref_mut(&mut self) -> &mut Notification { + match self.inner { + #[cfg(feature = "dbus")] + NotificationHandleInner::Dbus(ref mut inner) => &mut inner.notification, + #[cfg(feature = "zbus")] + NotificationHandleInner::Zbus(ref mut inner) => &mut inner.notification, + } + } +} + +#[cfg(feature = "dbus")] +impl From for NotificationHandleInner { + fn from(handle: dbus_rs::DbusNotificationHandle) -> NotificationHandleInner { + NotificationHandleInner::Dbus(handle) + } +} + +#[cfg(feature = "zbus")] +impl From for NotificationHandleInner { + fn from(handle: zbus_rs::ZbusNotificationHandle) -> NotificationHandleInner { + NotificationHandleInner::Zbus(handle) + } +} + +#[cfg(feature = "dbus")] +impl From for NotificationHandle { + fn from(handle: dbus_rs::DbusNotificationHandle) -> NotificationHandle { + NotificationHandle { + inner: handle.into(), + } + } +} + +#[cfg(feature = "zbus")] +impl From for NotificationHandle { + fn from(handle: zbus_rs::ZbusNotificationHandle) -> NotificationHandle { + NotificationHandle { + inner: handle.into(), + } + } +} + +// here be public functions + +// TODO: breaking change, wait for 5.0 +// #[cfg(all(feature = "dbus", feature = "zbus"))] +//compile_error!("the z and d features are mutually exclusive"); + +#[cfg(all( + not(any(feature = "dbus", feature = "zbus")), + unix, + not(target_os = "macos") +))] +compile_error!("you have to build with either zbus or dbus turned on"); + +/// Which Dbus implementation are we using? +#[derive(Copy, Clone, Debug)] +pub enum DbusStack { + /// using [dbus-rs](https://docs.rs/dbus-rs) + Dbus, + /// using [zbus](https://docs.rs/zbus) + Zbus, +} + +#[cfg(all(feature = "dbus", feature = "zbus"))] +const DBUS_SWITCH_VAR: &str = "DBUSRS"; + +#[cfg(all(feature = "zbus", not(feature = "dbus")))] +pub(crate) fn show_notification(notification: &Notification) -> Result { + block_on(zbus_rs::connect_and_send_notification(notification)).map(Into::into) +} + +#[cfg(all(feature = "async", feature = "zbus"))] +pub(crate) async fn show_notification_async( + notification: &Notification, +) -> Result { + zbus_rs::connect_and_send_notification(notification) + .await + .map(Into::into) +} + +#[cfg(all(feature = "async", feature = "zbus"))] +pub(crate) async fn show_notification_async_at_bus( + notification: &Notification, + bus: NotificationBus, +) -> Result { + zbus_rs::connect_and_send_notification_at_bus(notification, bus) + .await + .map(Into::into) +} + +#[cfg(all(feature = "dbus", not(feature = "zbus")))] +pub(crate) fn show_notification(notification: &Notification) -> Result { + dbus_rs::connect_and_send_notification(notification).map(Into::into) +} + +#[cfg(all(feature = "dbus", feature = "zbus"))] +pub(crate) fn show_notification(notification: &Notification) -> Result { + if std::env::var(DBUS_SWITCH_VAR).is_ok() { + dbus_rs::connect_and_send_notification(notification).map(Into::into) + } else { + block_on(zbus_rs::connect_and_send_notification(notification)).map(Into::into) + } +} + +/// Get the currently used [`DbusStack`] +/// +/// (zbus only) +#[cfg(all(feature = "zbus", not(feature = "dbus")))] +pub fn dbus_stack() -> Option { + Some(DbusStack::Zbus) +} + +/// Get the currently used [`DbusStack`] +/// +/// (dbus-rs only) +#[cfg(all(feature = "dbus", not(feature = "zbus")))] +pub fn dbus_stack() -> Option { + Some(DbusStack::Dbus) +} + +/// Get the currently used [`DbusStack`] +/// +/// both dbus-rs and zbus, switch via `$ZBUS_NOTIFICATION` +#[cfg(all(feature = "dbus", feature = "zbus"))] +pub fn dbus_stack() -> Option { + Some(if std::env::var(DBUS_SWITCH_VAR).is_ok() { + DbusStack::Dbus + } else { + DbusStack::Zbus + }) +} + +/// Get the currently used [`DbusStack`] +/// +/// neither zbus nor dbus-rs are configured +#[cfg(all(not(feature = "dbus"), not(feature = "zbus")))] +pub fn dbus_stack() -> Option { + None +} + +/// Get list of all capabilities of the running notification server. +/// +/// (zbus only) +#[cfg(all(feature = "zbus", not(feature = "dbus")))] +pub fn get_capabilities() -> Result> { + block_on(zbus_rs::get_capabilities()) +} + +/// Get list of all capabilities of the running notification server. +/// +/// (dbus-rs only) +#[cfg(all(feature = "dbus", not(feature = "zbus")))] +pub fn get_capabilities() -> Result> { + dbus_rs::get_capabilities() +} + +/// Get list of all capabilities of the running notification server. +/// +/// both dbus-rs and zbus, switch via `$ZBUS_NOTIFICATION` +#[cfg(all(feature = "dbus", feature = "zbus"))] +pub fn get_capabilities() -> Result> { + if std::env::var(DBUS_SWITCH_VAR).is_ok() { + dbus_rs::get_capabilities() + } else { + block_on(zbus_rs::get_capabilities()) + } +} + +/// Returns a struct containing `ServerInformation`. +/// +/// This struct contains `name`, `vendor`, `version` and `spec_version` of the notification server +/// running. +/// +/// (zbus only) +#[cfg(all(feature = "zbus", not(feature = "dbus")))] +pub fn get_server_information() -> Result { + block_on(zbus_rs::get_server_information()) +} + +/// Returns a struct containing `ServerInformation`. +/// +/// This struct contains `name`, `vendor`, `version` and `spec_version` of the notification server +/// running. +/// +/// (dbus-rs only) +#[cfg(all(feature = "dbus", not(feature = "zbus")))] +pub fn get_server_information() -> Result { + dbus_rs::get_server_information() +} + +/// Returns a struct containing `ServerInformation`. +/// +/// This struct contains `name`, `vendor`, `version` and `spec_version` of the notification server +/// running. +/// +/// both dbus-rs and zbus, switch via `$ZBUS_NOTIFICATION` +#[cfg(all(feature = "dbus", feature = "zbus"))] +pub fn get_server_information() -> Result { + if std::env::var(DBUS_SWITCH_VAR).is_ok() { + dbus_rs::get_server_information() + } else { + block_on(zbus_rs::get_server_information()) + } +} + +/// Return value of `get_server_information()`. +#[derive(Debug, serde::Deserialize)] +#[cfg_attr(feature = "zbus", derive(zvariant::Type))] +pub struct ServerInformation { + /// The product name of the server. + pub name: String, + /// The vendor name. + pub vendor: String, + /// The server's version string. + pub version: String, + /// The specification version the server is compliant with. + pub spec_version: String, +} + +/// Strictly internal. +/// The NotificationServer implemented here exposes a "Stop" function. +/// stops the notification server +#[cfg(all(feature = "server", unix, not(target_os = "macos")))] +#[doc(hidden)] +pub fn stop_server() { + #[cfg(feature = "dbus")] + dbus_rs::stop_server() +} + +/// Listens for the `ActionInvoked(UInt32, String)` Signal. +/// +/// No need to use this, check out [`NotificationHandle::wait_for_action`] +/// (xdg only) +#[cfg(all(feature = "zbus", not(feature = "dbus")))] +// #[deprecated(note="please use [`NotificationHandle::wait_for_action`]")] +pub fn handle_action(id: u32, func: F) +where + F: FnOnce(&ActionResponse), +{ + block_on(zbus_rs::handle_action(id, func)); +} + +/// Listens for the `ActionInvoked(UInt32, String)` Signal. +/// +/// No need to use this, check out [`NotificationHandle::wait_for_action`] +/// (xdg only) +#[cfg(all(feature = "dbus", not(feature = "zbus")))] +// #[deprecated(note="please use `NotificationHandle::wait_for_action`")] +pub fn handle_action(id: u32, func: F) +where + F: FnOnce(&ActionResponse), +{ + dbus_rs::handle_action(id, func); +} + +/// Listens for the `ActionInvoked(UInt32, String)` Signal. +/// +/// No need to use this, check out [`NotificationHandle::wait_for_action`] +/// both dbus-rs and zbus, switch via `$ZBUS_NOTIFICATION` +#[cfg(all(feature = "dbus", feature = "zbus"))] +// #[deprecated(note="please use `NotificationHandle::wait_for_action`")] +pub fn handle_action(id: u32, func: F) +where + F: FnOnce(&ActionResponse), +{ + if std::env::var(DBUS_SWITCH_VAR).is_ok() { + dbus_rs::handle_action(id, func); + } else { + block_on(zbus_rs::handle_action(id, func)); + } +} + +/// Reason passed to `NotificationClosed` Signal +/// +/// ## Specification +/// As listed under [Table 8. `NotificationClosed` Parameters](https://specifications.freedesktop.org/notification-spec/latest/ar01s09.html#idm46350804042704) +#[derive(Copy, Clone, Debug)] +pub enum CloseReason { + /// The notification expired + Expired, + /// The notification was dismissed by the user + Dismissed, + /// The notification was closed by a call to `CloseNotification` + CloseAction, + /// Undefined/Reserved reason + Other(u32), +} + +impl From for CloseReason { + fn from(raw_reason: u32) -> Self { + match raw_reason { + 1 => CloseReason::Expired, + 2 => CloseReason::Dismissed, + 3 => CloseReason::CloseAction, + other => CloseReason::Other(other), + } + } +} + +/// Helper Trait implemented by `Fn()` +pub trait ActionResponseHandler { + fn call(self, response: &ActionResponse); +} + +// impl ActionResponseHandler for F +impl ActionResponseHandler for F +where + F: FnOnce(&ActionResponse), +{ + fn call(self, res: &ActionResponse) { + (self)(res); + } +} + +/// Response to an action +pub enum ActionResponse<'a> { + /// Custom Action configured by the Notification. + Custom(&'a str), + + /// The Notification was closed. + Closed(CloseReason), +} + +impl<'a> From<&'a str> for ActionResponse<'a> { + fn from(raw: &'a str) -> Self { + Self::Custom(raw) + } +} + +/// Your handy callback for the `Close` signal of your Notification. +/// +/// This is implemented by `Fn()` and `Fn(CloseReason)`, so there is probably no good reason for you to manually implement this trait. +/// Should you find one anyway, please notify me and I'll gladly remove this obviously redundant comment. +pub trait CloseHandler { + /// This is called with the [`CloseReason`]. + fn call(&self, reason: CloseReason); +} + +impl CloseHandler for F +where + F: Fn(CloseReason), +{ + fn call(&self, reason: CloseReason) { + self(reason); + } +} + +impl CloseHandler<()> for F +where + F: Fn(), +{ + fn call(&self, _: CloseReason) { + self(); + } +} diff --git a/plugins/notification/src/notify_rust/xdg/zbus_rs.rs b/plugins/notification/src/notify_rust/xdg/zbus_rs.rs new file mode 100644 index 00000000..7bf7017a --- /dev/null +++ b/plugins/notification/src/notify_rust/xdg/zbus_rs.rs @@ -0,0 +1,285 @@ +use super::super::{error::*, notification::Notification, xdg}; +use zbus::{export::futures_util::TryStreamExt, MatchRule}; + +use super::{bus::NotificationBus, ActionResponse, ActionResponseHandler, CloseReason}; + +pub mod bus { + + use super::super::super::xdg::NOTIFICATION_DEFAULT_BUS; + + fn skip_first_slash(s: &str) -> &str { + if let Some('/') = s.chars().next() { + &s[1..] + } else { + s + } + } + + use std::path::PathBuf; + + type BusNameType = zbus::names::WellKnownName<'static>; + + #[derive(Clone, Debug)] + pub struct NotificationBus(BusNameType); + + impl Default for NotificationBus { + #[cfg(feature = "zbus")] + fn default() -> Self { + Self(zbus::names::WellKnownName::from_static_str(NOTIFICATION_DEFAULT_BUS).unwrap()) + } + } + + impl NotificationBus { + fn namespaced_custom(custom_path: &str) -> Option { + // abusing path for semantic join + skip_first_slash( + PathBuf::from("/de/hoodie/Notification") + .join(custom_path) + .to_str()?, + ) + .replace('/', ".") + .into() + } + + pub fn custom(custom_path: &str) -> Option { + let name = + zbus::names::WellKnownName::try_from(Self::namespaced_custom(custom_path)?).ok()?; + Some(Self(name)) + } + + pub fn into_name(self) -> BusNameType { + self.0 + } + } +} + +/// A handle to a shown notification. +/// +/// This keeps a connection alive to ensure actions work on certain desktops. +#[derive(Debug)] +pub struct ZbusNotificationHandle { + pub(crate) id: u32, + pub(crate) connection: zbus::Connection, + pub(crate) notification: Notification, +} + +impl ZbusNotificationHandle { + pub(crate) fn new( + id: u32, + connection: zbus::Connection, + notification: Notification, + ) -> ZbusNotificationHandle { + ZbusNotificationHandle { + id, + connection, + notification, + } + } + + pub async fn wait_for_action(self, invocation_closure: impl ActionResponseHandler) { + wait_for_action_signal(&self.connection, self.id, invocation_closure).await; + } + + pub async fn close_fallible(self) -> Result<()> { + self.connection + .call_method( + Some(self.notification.bus.clone().into_name()), + xdg::NOTIFICATION_OBJECTPATH, + Some(xdg::NOTIFICATION_INTERFACE), + "CloseNotification", + &(self.id), + ) + .await?; + Ok(()) + } + + pub async fn close(self) { + self.close_fallible().await.unwrap(); + } + + pub fn on_close(self, closure: F) + where + F: FnOnce(CloseReason), + { + zbus::block_on(self.wait_for_action(|action: &ActionResponse| { + if let ActionResponse::Closed(reason) = action { + closure(*reason); + } + })); + } + + pub fn update_fallible(&mut self) -> Result<()> { + self.id = zbus::block_on(send_notification_via_connection( + &self.notification, + self.id, + &self.connection, + ))?; + Ok(()) + } + + pub fn update(&mut self) { + self.update_fallible().unwrap(); + } +} + +async fn send_notification_via_connection( + notification: &Notification, + id: u32, + connection: &zbus::Connection, +) -> Result { + send_notification_via_connection_at_bus(notification, id, connection, Default::default()).await +} + +async fn send_notification_via_connection_at_bus( + notification: &Notification, + id: u32, + connection: &zbus::Connection, + bus: NotificationBus, +) -> Result { + let reply: u32 = connection + .call_method( + Some(bus.into_name()), + xdg::NOTIFICATION_OBJECTPATH, + Some(xdg::NOTIFICATION_INTERFACE), + "Notify", + &( + ¬ification.appname, + id, + ¬ification.icon, + ¬ification.summary, + ¬ification.body, + ¬ification.actions, + super::super::hints::hints_to_map(notification), + i32::from(notification.timeout), + ), + ) + .await? + .body() + .deserialize()?; + Ok(reply) +} + +pub async fn connect_and_send_notification( + notification: &Notification, +) -> Result { + let bus = notification.bus.clone(); + connect_and_send_notification_at_bus(notification, bus).await +} + +pub(crate) async fn connect_and_send_notification_at_bus( + notification: &Notification, + bus: NotificationBus, +) -> Result { + let connection = zbus::Connection::session().await?; + let inner_id = notification.id.unwrap_or(0); + let id = + send_notification_via_connection_at_bus(notification, inner_id, &connection, bus).await?; + + Ok(ZbusNotificationHandle::new( + id, + connection, + notification.clone(), + )) +} + +pub async fn get_capabilities_at_bus(bus: NotificationBus) -> Result> { + let connection = zbus::Connection::session().await?; + let info: Vec = connection + .call_method( + Some(bus.into_name()), + xdg::NOTIFICATION_OBJECTPATH, + Some(xdg::NOTIFICATION_INTERFACE), + "GetCapabilities", + &(), + ) + .await? + .body() + .deserialize()?; + Ok(info) +} + +pub async fn get_capabilities() -> Result> { + get_capabilities_at_bus(Default::default()).await +} + +pub async fn get_server_information_at_bus(bus: NotificationBus) -> Result { + let connection = zbus::Connection::session().await?; + let info: xdg::ServerInformation = connection + .call_method( + Some(bus.into_name()), + xdg::NOTIFICATION_OBJECTPATH, + Some(xdg::NOTIFICATION_INTERFACE), + "GetServerInformation", + &(), + ) + .await? + .body() + .deserialize()?; + + Ok(info) +} + +pub async fn get_server_information() -> Result { + get_server_information_at_bus(Default::default()).await +} + +/// Listens for the `ActionInvoked(UInt32, String)` Signal. +/// +/// No need to use this, check out `Notification::show_and_wait_for_action(FnOnce(action:&str))` +pub async fn handle_action(id: u32, func: impl ActionResponseHandler) { + let connection = zbus::Connection::session().await.unwrap(); + wait_for_action_signal(&connection, id, func).await; +} + +async fn wait_for_action_signal( + connection: &zbus::Connection, + id: u32, + handler: impl ActionResponseHandler, +) { + let action_signal_rule = MatchRule::builder() + .msg_type(zbus::MessageType::Signal) + .interface(xdg::NOTIFICATION_INTERFACE) + .unwrap() + .member("ActionInvoked") + .unwrap() + .build(); + + let proxy = zbus::fdo::DBusProxy::new(connection).await.unwrap(); + proxy.add_match_rule(action_signal_rule).await.unwrap(); + + let close_signal_rule = MatchRule::builder() + .msg_type(zbus::MessageType::Signal) + .interface(xdg::NOTIFICATION_INTERFACE) + .unwrap() + .member("NotificationClosed") + .unwrap() + .build(); + proxy.add_match_rule(close_signal_rule).await.unwrap(); + + while let Ok(Some(msg)) = zbus::MessageStream::from(connection).try_next().await { + let header = msg.header(); + if let zbus::MessageType::Signal = header.message_type() { + match header.member() { + Some(name) if name == "ActionInvoked" => { + match msg.body().deserialize::<(u32, String)>() { + Ok((nid, action)) if nid == id => { + handler.call(&ActionResponse::Custom(&action)); + break; + } + _ => {} + } + } + Some(name) if name == "NotificationClosed" => { + match msg.body().deserialize::<(u32, u32)>() { + Ok((nid, reason)) if nid == id => { + handler.call(&ActionResponse::Closed(reason.into())); + break; + } + _ => {} + } + } + _ => {} + } + } + } +} diff --git a/plugins/os/README.md b/plugins/os/README.md index 6a4cfe21..6e518911 100644 --- a/plugins/os/README.md +++ b/plugins/os/README.md @@ -4,7 +4,7 @@ Read information about the operating system. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/os/package.json b/plugins/os/package.json index b42dd458..c9a5a45b 100644 --- a/plugins/os/package.json +++ b/plugins/os/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/persisted-scope/CHANGELOG.md b/plugins/persisted-scope/CHANGELOG.md index 4fb175eb..6f254439 100644 --- a/plugins/persisted-scope/CHANGELOG.md +++ b/plugins/persisted-scope/CHANGELOG.md @@ -42,7 +42,7 @@ ## \[2.0.0-alpha.3] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update MSRV to 1.70. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update MSRV to 1.75. - [`5de23e7`](https://github.com/tauri-apps/plugins-workspace/commit/5de23e79f9880921b62e4b7a8819bc0dbc833216)([#649](https://github.com/tauri-apps/plugins-workspace/pull/649)) Update to tauri@alpha.15. ### Dependencies diff --git a/plugins/persisted-scope/README.md b/plugins/persisted-scope/README.md index 6d6afb11..9621b0f5 100644 --- a/plugins/persisted-scope/README.md +++ b/plugins/persisted-scope/README.md @@ -4,7 +4,7 @@ Save filesystem and asset scopes and restore them when the app is reopened. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/positioner/README.md b/plugins/positioner/README.md index e6b2e2cd..4dd31413 100644 --- a/plugins/positioner/README.md +++ b/plugins/positioner/README.md @@ -6,7 +6,7 @@ This plugin is a port of [electron-positioner](https://github.com/jenslind/elect ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json index 9b5df656..b2af4a02 100644 --- a/plugins/positioner/package.json +++ b/plugins/positioner/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/process/README.md b/plugins/process/README.md index b389b38b..515539d3 100644 --- a/plugins/process/README.md +++ b/plugins/process/README.md @@ -4,7 +4,7 @@ This plugin provides APIs to access the current process. To spawn child processe ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/process/package.json b/plugins/process/package.json index fcf27c66..ed7eff21 100644 --- a/plugins/process/package.json +++ b/plugins/process/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/shell/README.md b/plugins/shell/README.md index 8cb80724..d97899e2 100644 --- a/plugins/shell/README.md +++ b/plugins/shell/README.md @@ -4,7 +4,7 @@ Access the system shell. Allows you to spawn child processes and manage files an ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/shell/package.json b/plugins/shell/package.json index aeedf388..a1127c5c 100644 --- a/plugins/shell/package.json +++ b/plugins/shell/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/shell/src/commands.rs b/plugins/shell/src/commands.rs index 0d44f936..050713a3 100644 --- a/plugins/shell/src/commands.rs +++ b/plugins/shell/src/commands.rs @@ -103,8 +103,8 @@ pub fn execute( args: ExecuteArgs, on_event: Channel, options: CommandOptions, - command_scope: CommandScope<'_, crate::scope::ScopeAllowedCommand>, - global_scope: GlobalScope<'_, crate::scope::ScopeAllowedCommand>, + command_scope: CommandScope, + global_scope: GlobalScope, ) -> crate::Result { let scope = crate::scope::ShellScope { scopes: command_scope diff --git a/plugins/single-instance/CHANGELOG.md b/plugins/single-instance/CHANGELOG.md index a454622f..150c6a82 100644 --- a/plugins/single-instance/CHANGELOG.md +++ b/plugins/single-instance/CHANGELOG.md @@ -19,7 +19,7 @@ ## \[2.0.0-alpha.3] -- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update MSRV to 1.70. +- [`5c13736`](https://github.com/tauri-apps/plugins-workspace/commit/5c137365c60790e8d4037d449e8237aa3fffdab0)([#673](https://github.com/tauri-apps/plugins-workspace/pull/673)) Update MSRV to 1.75. ## \[2.0.0-alpha.2] diff --git a/plugins/single-instance/Cargo.toml b/plugins/single-instance/Cargo.toml index 3a4c8fd4..31b2da6e 100644 --- a/plugins/single-instance/Cargo.toml +++ b/plugins/single-instance/Cargo.toml @@ -32,4 +32,4 @@ features = [ ] [target."cfg(target_os = \"linux\")".dependencies] -zbus = "3" +zbus = "4" diff --git a/plugins/single-instance/README.md b/plugins/single-instance/README.md index a1a554c1..b72b7612 100644 --- a/plugins/single-instance/README.md +++ b/plugins/single-instance/README.md @@ -4,7 +4,7 @@ Ensure a single instance of your tauri app is running. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/single-instance/examples/vanilla/package.json b/plugins/single-instance/examples/vanilla/package.json index 96e9f1d8..0a0e8683 100644 --- a/plugins/single-instance/examples/vanilla/package.json +++ b/plugins/single-instance/examples/vanilla/package.json @@ -9,6 +9,6 @@ "author": "", "license": "MIT", "devDependencies": { - "@tauri-apps/cli": "2.0.0-beta.0" + "@tauri-apps/cli": "2.0.0-beta.3" } } diff --git a/plugins/single-instance/examples/vanilla/src-tauri/.gitignore b/plugins/single-instance/examples/vanilla/src-tauri/.gitignore index ea13580b..949785a1 100644 --- a/plugins/single-instance/examples/vanilla/src-tauri/.gitignore +++ b/plugins/single-instance/examples/vanilla/src-tauri/.gitignore @@ -3,4 +3,4 @@ /target/ WixTools -/capabilities/schemas +/gen/schemas diff --git a/plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml b/plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml index 71bc0d1f..13da3100 100644 --- a/plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml +++ b/plugins/single-instance/examples/vanilla/src-tauri/Cargo.toml @@ -5,7 +5,7 @@ description = "A Tauri App" authors = [ "You" ] repository = "" edition = "2021" -rust-version = "1.70" +rust-version = "1.75" [dependencies] serde_json = { workspace = true } diff --git a/plugins/single-instance/src/platform_impl/linux.rs b/plugins/single-instance/src/platform_impl/linux.rs index c3418734..2eee89a0 100644 --- a/plugins/single-instance/src/platform_impl/linux.rs +++ b/plugins/single-instance/src/platform_impl/linux.rs @@ -10,8 +10,8 @@ use tauri::{ AppHandle, Config, Manager, RunEvent, Runtime, }; use zbus::{ - blocking::{Connection, ConnectionBuilder}, - dbus_interface, + blocking::{Builder, Connection}, + interface, }; struct ConnectionHandle(Connection); @@ -21,7 +21,7 @@ struct SingleInstanceDBus { app_handle: AppHandle, } -#[dbus_interface(name = "org.SingleInstance.DBus")] +#[interface(name = "org.SingleInstance.DBus")] impl SingleInstanceDBus { fn execute_callback(&mut self, argv: Vec, cwd: String) { (self.callback)(&self.app_handle, argv, cwd); @@ -43,7 +43,7 @@ pub fn init(f: Box>) -> TauriPlugin { let dbus_name = format!("org.{id}.SingleInstance"); let dbus_path = format!("/org/{id}/SingleInstance"); - match ConnectionBuilder::session() + match Builder::session() .unwrap() .name(dbus_name.as_str()) .unwrap() diff --git a/plugins/sql/README.md b/plugins/sql/README.md index ff62d4f8..770db6b1 100644 --- a/plugins/sql/README.md +++ b/plugins/sql/README.md @@ -4,7 +4,7 @@ Interface with SQL databases through [sqlx](https://github.com/launchbadge/sqlx) ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/sql/package.json b/plugins/sql/package.json index 61762019..469eac6c 100644 --- a/plugins/sql/package.json +++ b/plugins/sql/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/store/README.md b/plugins/store/README.md index ae4aa71f..ad746854 100644 --- a/plugins/store/README.md +++ b/plugins/store/README.md @@ -4,7 +4,7 @@ Simple, persistent key-value store. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/store/package.json b/plugins/store/package.json index 405b019e..05d16c9c 100644 --- a/plugins/store/package.json +++ b/plugins/store/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/store/src/api-iife.js b/plugins/store/src/api-iife.js index 4a50fb76..15eaf751 100644 --- a/plugins/store/src/api-iife.js +++ b/plugins/store/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_STORE__=function(t){"use strict";function a(t,a=!1){return window.__TAURI_INTERNALS__.transformCallback(t,a)}async function e(t,a={},e){return window.__TAURI_INTERNALS__.invoke(t,a,e)}var n;async function r(t,n,r){const i="string"==typeof r?.target?{kind:"AnyLabel",label:r.target}:r?.target??{kind:"Any"};return e("plugin:event|listen",{event:t,target:i,handler:a(n)}).then((a=>async()=>async function(t,a){await e("plugin:event|unlisten",{event:t,eventId:a})}(t,a)))}"function"==typeof SuppressedError&&SuppressedError,function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WEBVIEW_CREATED="tauri://webview-created",t.WEBVIEW_FILE_DROP="tauri://file-drop",t.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(n||(n={}));return t.Store=class{constructor(t){this.path=t}async set(t,a){return await e("plugin:store|set",{path:this.path,key:t,value:a})}async get(t){return await e("plugin:store|get",{path:this.path,key:t})}async has(t){return await e("plugin:store|has",{path:this.path,key:t})}async delete(t){return await e("plugin:store|delete",{path:this.path,key:t})}async clear(){return await e("plugin:store|clear",{path:this.path})}async reset(){return await e("plugin:store|reset",{path:this.path})}async keys(){return await e("plugin:store|keys",{path:this.path})}async values(){return await e("plugin:store|values",{path:this.path})}async entries(){return await e("plugin:store|entries",{path:this.path})}async length(){return await e("plugin:store|length",{path:this.path})}async load(){return await e("plugin:store|load",{path:this.path})}async save(){return await e("plugin:store|save",{path:this.path})}async onKeyChange(t,a){return await r("store://change",(e=>{e.payload.path===this.path&&e.payload.key===t&&a(e.payload.value)}))}async onChange(t){return await r("store://change",(a=>{a.payload.path===this.path&&t(a.payload.key,a.payload.value)}))}},t}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_PLUGIN_STORE__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_STORE__=function(t){"use strict";function a(t,a=!1){return window.__TAURI_INTERNALS__.transformCallback(t,a)}async function e(t,a={},e){return window.__TAURI_INTERNALS__.invoke(t,a,e)}var n;async function r(t,n,r){const i="string"==typeof r?.target?{kind:"AnyLabel",label:r.target}:r?.target??{kind:"Any"};return e("plugin:event|listen",{event:t,target:i,handler:a(n)}).then((a=>async()=>async function(t,a){await e("plugin:event|unlisten",{event:t,eventId:a})}(t,a)))}"function"==typeof SuppressedError&&SuppressedError,function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WEBVIEW_CREATED="tauri://webview-created",t.FILE_DROP="tauri://file-drop",t.FILE_DROP_HOVER="tauri://file-drop-hover",t.FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(n||(n={}));return t.Store=class{constructor(t){this.path=t}async set(t,a){return await e("plugin:store|set",{path:this.path,key:t,value:a})}async get(t){return await e("plugin:store|get",{path:this.path,key:t})}async has(t){return await e("plugin:store|has",{path:this.path,key:t})}async delete(t){return await e("plugin:store|delete",{path:this.path,key:t})}async clear(){return await e("plugin:store|clear",{path:this.path})}async reset(){return await e("plugin:store|reset",{path:this.path})}async keys(){return await e("plugin:store|keys",{path:this.path})}async values(){return await e("plugin:store|values",{path:this.path})}async entries(){return await e("plugin:store|entries",{path:this.path})}async length(){return await e("plugin:store|length",{path:this.path})}async load(){return await e("plugin:store|load",{path:this.path})}async save(){return await e("plugin:store|save",{path:this.path})}async onKeyChange(t,a){return await r("store://change",(e=>{e.payload.path===this.path&&e.payload.key===t&&a(e.payload.value)}))}async onChange(t){return await r("store://change",(a=>{a.payload.path===this.path&&t(a.payload.key,a.payload.value)}))}},t}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_PLUGIN_STORE__})} diff --git a/plugins/stronghold/README.md b/plugins/stronghold/README.md index b342c56c..0b293a2d 100644 --- a/plugins/stronghold/README.md +++ b/plugins/stronghold/README.md @@ -4,7 +4,7 @@ Store secrets and keys using the [IOTA Stronghold](https://github.com/iotaledger ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/stronghold/package.json b/plugins/stronghold/package.json index 325c8b31..05494f6b 100644 --- a/plugins/stronghold/package.json +++ b/plugins/stronghold/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/updater/README.md b/plugins/updater/README.md index 28e0271a..71e3b282 100644 --- a/plugins/updater/README.md +++ b/plugins/updater/README.md @@ -6,7 +6,7 @@ In-app updates for Tauri applications. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/updater/package.json b/plugins/updater/package.json index 42f64b85..d56ecdb8 100644 --- a/plugins/updater/package.json +++ b/plugins/updater/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/updater/tests/app-updater/.gitignore b/plugins/updater/tests/app-updater/.gitignore index fd0dd656..6a4bb536 100644 --- a/plugins/updater/tests/app-updater/.gitignore +++ b/plugins/updater/tests/app-updater/.gitignore @@ -1 +1 @@ -/capabilities/schemas +/gen/schemas diff --git a/plugins/upload/README.md b/plugins/upload/README.md index 17868bf5..d0c43078 100644 --- a/plugins/upload/README.md +++ b/plugins/upload/README.md @@ -5,7 +5,7 @@ Download files from a remote HTTP server to disk. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/upload/package.json b/plugins/upload/package.json index 5cb56bed..5319d407 100644 --- a/plugins/upload/package.json +++ b/plugins/upload/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/websocket/README.md b/plugins/websocket/README.md index f897a489..650ffcf1 100644 --- a/plugins/websocket/README.md +++ b/plugins/websocket/README.md @@ -4,7 +4,7 @@ Expose a WebSocket server to your Tauri frontend. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/websocket/examples/tauri-app/package.json b/plugins/websocket/examples/tauri-app/package.json index 30b30705..dc916a38 100644 --- a/plugins/websocket/examples/tauri-app/package.json +++ b/plugins/websocket/examples/tauri-app/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "devDependencies": { - "@tauri-apps/cli": "1.5.9", + "@tauri-apps/cli": "2.0.0-beta.3", "typescript": "^5.3.3", "vite": "^5.0.12" }, diff --git a/plugins/websocket/examples/tauri-app/src-tauri/.gitignore b/plugins/websocket/examples/tauri-app/src-tauri/.gitignore index b4fd48c6..6bc5d6f4 100644 --- a/plugins/websocket/examples/tauri-app/src-tauri/.gitignore +++ b/plugins/websocket/examples/tauri-app/src-tauri/.gitignore @@ -3,7 +3,7 @@ /target/ WixTools -/capabilities/schemas +/gen/schemas # These are backup files generated by rustfmt **/*.rs.bk diff --git a/plugins/websocket/package.json b/plugins/websocket/package.json index 1f3d0385..57c38af4 100644 --- a/plugins/websocket/package.json +++ b/plugins/websocket/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/window-state/README.md b/plugins/window-state/README.md index b8a42864..c71b4df3 100644 --- a/plugins/window-state/README.md +++ b/plugins/window-state/README.md @@ -4,7 +4,7 @@ Save window positions and sizes and restore them when the app is reopened. ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json index 295500a6..a3b1c7d4 100644 --- a/plugins/window-state/package.json +++ b/plugins/window-state/package.json @@ -24,6 +24,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } } diff --git a/plugins/window-state/src/api-iife.js b/plugins/window-state/src/api-iife.js index cbfa26f8..47212356 100644 --- a/plugins/window-state/src/api-iife.js +++ b/plugins/window-state/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_PLUGIN_WINDOWSTATE__=function(e){"use strict";function t(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function i(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class a{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new n(this.width/e,this.height/e)}}class l{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class s{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new l(this.x/e,this.y/e)}}var r,o,u;async function c(e,t){await i("plugin:event|unlisten",{event:e,eventId:t})}async function d(e,n,a){const l="string"==typeof a?.target?{kind:"AnyLabel",label:a.target}:a?.target??{kind:"Any"};return i("plugin:event|listen",{event:e,target:l,handler:t(n)}).then((t=>async()=>c(e,t)))}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.WEBVIEW_FILE_DROP="tauri://file-drop",e.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(o||(o={}));class w{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function h(){return new g(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function b(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new g(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(u||(u={}));const y=["tauri://created","tauri://error"];class g{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:window|create",{options:{...t,parent:"string"==typeof t.parent?t.parent:t.parent?.label,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return b().find((t=>t.label===e))??null}static getCurrent(){return h()}static getAll(){return b()}static async getFocusedWindow(){for(const e of b())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):d(e,t,{target:{kind:"Window",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):async function(e,t,i){return d(e,(i=>{t(i),c(e,i.id).catch((()=>{}))}),i)}(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(y.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:t});return Promise.resolve()}return async function(e,t){await i("plugin:event|emit",{event:e,payload:t})}(e,t)}async emitTo(e,t,n){if(y.includes(t)){for(const e of this.listeners[t]||[])e({event:t,id:-1,payload:n});return Promise.resolve()}return async function(e,t,n){const a="string"==typeof e?{kind:"AnyLabel",label:e}:e;await i("plugin:event|emit_to",{target:a,event:t,payload:n})}(e,t,n)}_handleTauriEvent(e,t){return!!y.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===o.Critical?{type:"Critical"}:{type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async destroy(){return i("plugin:window|destroy",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return i("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return i("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(r.WINDOW_RESIZED,(t=>{var i;t.payload=(i=t.payload,new a(i.width,i.height)),e(t)}))}async onMoved(e){return this.listen(r.WINDOW_MOVED,(t=>{var i;t.payload=(i=t.payload,new s(i.x,i.y)),e(t)}))}async onCloseRequested(e){return this.listen(r.WINDOW_CLOSE_REQUESTED,(t=>{const i=new w(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.destroy()}))}))}async onFocusChanged(e){const t=await this.listen(r.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),i=await this.listen(r.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),i()}}async onScaleChanged(e){return this.listen(r.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(r.WINDOW_THEME_CHANGED,e)}}var p,_,m;async function v(e,t){return i("plugin:window-state|restore_state",{label:e,flags:t})}return function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(p||(p={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(_||(_={})),e.StateFlags=void 0,(m=e.StateFlags||(e.StateFlags={}))[m.SIZE=1]="SIZE",m[m.POSITION=2]="POSITION",m[m.MAXIMIZED=4]="MAXIMIZED",m[m.VISIBLE=8]="VISIBLE",m[m.DECORATIONS=16]="DECORATIONS",m[m.FULLSCREEN=32]="FULLSCREEN",m[m.ALL=63]="ALL",e.restoreState=v,e.restoreStateCurrent=async function(e){return v(h().label,e)},e.saveWindowState=async function(e){return i("plugin:window-state|save_window_state",{flags:e})},e}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_PLUGIN_WINDOWSTATE__})} +if("__TAURI__"in window){var __TAURI_PLUGIN_WINDOWSTATE__=function(e){"use strict";function t(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function i(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}"function"==typeof SuppressedError&&SuppressedError;class n{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class a{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new n(this.width/e,this.height/e)}}class l{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class s{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new l(this.x/e,this.y/e)}}var r,o,u;async function c(e,t){await i("plugin:event|unlisten",{event:e,eventId:t})}async function d(e,n,a){const l="string"==typeof a?.target?{kind:"AnyLabel",label:a.target}:a?.target??{kind:"Any"};return i("plugin:event|listen",{event:e,target:l,handler:t(n)}).then((t=>async()=>c(e,t)))}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WEBVIEW_CREATED="tauri://webview-created",e.FILE_DROP="tauri://file-drop",e.FILE_DROP_HOVER="tauri://file-drop-hover",e.FILE_DROP_CANCELLED="tauri://file-drop-cancelled"}(r||(r={})),function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(o||(o={}));class h{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function w(){return new y(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function b(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new y(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(u||(u={}));const p=["tauri://created","tauri://error"];class y{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:window|create",{options:{...t,parent:"string"==typeof t.parent?t.parent:t.parent?.label,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return b().find((t=>t.label===e))??null}static getCurrent(){return w()}static getAll(){return b()}static async getFocusedWindow(){for(const e of b())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):d(e,t,{target:{kind:"Window",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)})):async function(e,t,i){return d(e,(i=>{t(i),c(e,i.id).catch((()=>{}))}),i)}(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(p.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:t});return Promise.resolve()}return async function(e,t){await i("plugin:event|emit",{event:e,payload:t})}(e,t)}async emitTo(e,t,n){if(p.includes(t)){for(const e of this.listeners[t]||[])e({event:t,id:-1,payload:n});return Promise.resolve()}return async function(e,t,n){const a="string"==typeof e?{kind:"AnyLabel",label:e}:e;await i("plugin:event|emit_to",{target:a,event:t,payload:n})}(e,t,n)}_handleTauriEvent(e,t){return!!p.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new s(e,t)))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new a(e,t)))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===o.Critical?{type:"Critical"}:{type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async destroy(){return i("plugin:window|destroy",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return i("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return i("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(r.WINDOW_RESIZED,(t=>{var i;t.payload=(i=t.payload,new a(i.width,i.height)),e(t)}))}async onMoved(e){return this.listen(r.WINDOW_MOVED,(t=>{t.payload=v(t.payload),e(t)}))}async onCloseRequested(e){return this.listen(r.WINDOW_CLOSE_REQUESTED,(t=>{const i=new h(t);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.destroy()}))}))}async onFileDropEvent(e){const t=await this.listen(r.FILE_DROP,(t=>{e({...t,payload:{type:"drop",paths:t.payload.paths,position:v(t.payload.position)}})})),i=await this.listen(r.FILE_DROP_HOVER,(t=>{e({...t,payload:{type:"hover",paths:t.payload.paths,position:v(t.payload.position)}})})),n=await this.listen(r.FILE_DROP_CANCELLED,(t=>{e({...t,payload:{type:"cancel"}})}));return()=>{t(),i(),n()}}async onFocusChanged(e){const t=await this.listen(r.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),i=await this.listen(r.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{t(),i()}}async onScaleChanged(e){return this.listen(r.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(r.WINDOW_THEME_CHANGED,e)}}var g,_,m;function v(e){return new s(e.x,e.y)}async function f(e,t){return i("plugin:window-state|restore_state",{label:e,flags:t})}return function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(g||(g={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(_||(_={})),e.StateFlags=void 0,(m=e.StateFlags||(e.StateFlags={}))[m.SIZE=1]="SIZE",m[m.POSITION=2]="POSITION",m[m.MAXIMIZED=4]="MAXIMIZED",m[m.VISIBLE=8]="VISIBLE",m[m.DECORATIONS=16]="DECORATIONS",m[m.FULLSCREEN=32]="FULLSCREEN",m[m.ALL=63]="ALL",e.restoreState=f,e.restoreStateCurrent=async function(e){return f(w().label,e)},e.saveWindowState=async function(e){return i("plugin:window-state|save_window_state",{flags:e})},e}({});Object.defineProperty(window.__TAURI__,"windowState",{value:__TAURI_PLUGIN_WINDOWSTATE__})} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44339320..594b879b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -64,8 +64,8 @@ importers: examples/api: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 '@tauri-apps/plugin-barcode-scanner': specifier: 2.0.0-beta.0 version: link:../../plugins/barcode-scanner @@ -122,8 +122,8 @@ importers: specifier: ^3.0.1 version: 3.0.1(svelte@4.2.8)(vite@5.0.12) '@tauri-apps/cli': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.3 + version: 2.0.0-beta.3 '@unocss/extractor-svelte': specifier: ^0.58.0 version: 0.58.0 @@ -143,26 +143,26 @@ importers: plugins/authenticator: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/autostart: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/barcode-scanner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/biometric: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 devDependencies: tslib: specifier: 2.6.0 @@ -171,33 +171,33 @@ importers: plugins/cli: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/clipboard-manager: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/deep-link: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/deep-link/examples/app: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 '@tauri-apps/plugin-deep-link': specifier: 2.0.0-beta.0 version: link:../.. devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.3 + version: 2.0.0-beta.3 internal-ip: specifier: ^8.0.0 version: 8.0.0 @@ -211,38 +211,38 @@ importers: plugins/dialog: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/fs: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/global-shortcut: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/http: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/log: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/nfc: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 devDependencies: tslib: specifier: 2.6.0 @@ -251,74 +251,74 @@ importers: plugins/notification: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/os: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/positioner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/process: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/shell: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/single-instance/examples/vanilla: devDependencies: '@tauri-apps/cli': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.3 + version: 2.0.0-beta.3 plugins/sql: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/store: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/stronghold: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/updater: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/upload: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/websocket: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 plugins/websocket/examples/tauri-app: dependencies: @@ -327,8 +327,8 @@ importers: version: link:../.. devDependencies: '@tauri-apps/cli': - specifier: 1.5.9 - version: 1.5.9 + specifier: 2.0.0-beta.3 + version: 2.0.0-beta.3 typescript: specifier: ^5.3.3 version: 5.3.3 @@ -339,8 +339,8 @@ importers: plugins/window-state: dependencies: '@tauri-apps/api': - specifier: 2.0.0-beta.0 - version: 2.0.0-beta.0 + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 packages: @@ -1476,13 +1476,13 @@ packages: - supports-color dev: true - /@tauri-apps/api@2.0.0-beta.0: - resolution: {integrity: sha512-WLoh/Vk8cgY7XrJV7Vpb6PssReBZWQCATfYBb1aCRDk+sp0NyPwumx6fZ2ECAKzAcs3OeanluwZcajruIW4CPQ==} + /@tauri-apps/api@2.0.0-beta.2: + resolution: {integrity: sha512-4r1r6kgttzIWxJ3HxkZQH+b7EiUtKhdUCPbi0KSalD+2T3j6klw+v8VyxhKwEdjM/eo60NE+J33v1E/Urq8puw==} engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} dev: false - /@tauri-apps/cli-darwin-arm64@1.5.9: - resolution: {integrity: sha512-7C2Jf8f0gzv778mLYb7Eszqqv1bm9Wzews81MRTqKrUIcC+eZEtDXLex+JaEkEzFEUrgIafdOvMBVEavF030IA==} + /@tauri-apps/cli-darwin-arm64@2.0.0-beta.3: + resolution: {integrity: sha512-gHcn3jI/4MDXDIlK/4Zz0ftTosgN3OimWlKxEz777QrA1hldrQweYIhdZXkqE9KgoE+u6w80vWIcr0InHAf7Iw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1490,26 +1490,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-darwin-arm64@2.0.0-beta.0: - resolution: {integrity: sha512-ncLUmkILngH/tG2lRpksT1N6GYbhmck0EaYdd6PTQQycMedP4ZwNXV+JnT3w/YD8JTQUmkcQnPDQtSUxdcPMWQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-darwin-x64@1.5.9: - resolution: {integrity: sha512-LHKytpkofPYgH8RShWvwDa3hD1ws131x7g7zNasJPfOiCWLqYVQFUuQVmjEUt8+dpHe/P/err5h4z+YZru2d0A==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-darwin-x64@2.0.0-beta.0: - resolution: {integrity: sha512-O9PATRKiyLoYBfk5/D9uwWk7ceHyH9/M7nuq5rDtWsofe9Q1QrPGjEe+cTuFXlabhFeoXrsWHhunp09D3G2NrQ==} + /@tauri-apps/cli-darwin-x64@2.0.0-beta.3: + resolution: {integrity: sha512-kRCaukT2IAGMmNuAOUBhdZRlKujTy2lSsdNKmgGEMnzQLKJwWO9Gpq1NmPY7ZVqyXK/X8QnGHuasDEQsSO6B4w==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1517,8 +1499,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm-gnueabihf@1.5.9: - resolution: {integrity: sha512-teGK20IYKx+dVn8wFq/Lg57Q9ce7foq1KHSfyHi464LVt1T0V1rsmULSgZpQPPj/NYPF5BG78PcWYv64yH86jw==} + /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.3: + resolution: {integrity: sha512-cpNZOQDotNSdjoZT16s1JtZvnkM0wgLwU39AhKhRCco4KEH3/8G1ngKF9JKalWUN8zDTcuCigEAr37gEv4mLAA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -1526,17 +1508,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.0: - resolution: {integrity: sha512-KEkCXaGopy7JWVwFySeacIBHoiKeBpmRcXg8MLSHfnjFttByZ38yY8A+1b1bzJqfK3C9jSRMdUvmIG/gFIgxIw==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm64-gnu@1.5.9: - resolution: {integrity: sha512-onJ/DW5Crw38qVx+wquY4uBbfCxVhzhdJmlCYqnYyXsZZmSiPUfSyhV58y+5TYB0q1hG8eYdB5x8VAwzByhGzw==} + /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.3: + resolution: {integrity: sha512-8q86V6P9bkeoFcnvSsnvOwmKY6ijIN4ueRVXCj5cVpsw392VF9vud1Nq7/l+QDgn9OWbZNNVDl30iyoSuaykBA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1544,8 +1517,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.0: - resolution: {integrity: sha512-UV9LJIQXTAdvusRCYL+6UyDwS1wGTuBQviKBJ/37+5LX8q7nbsjOYcrR8JTs78UwzHinFWFXsOpBbKgYEuh3ew==} + /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.3: + resolution: {integrity: sha512-L7fokh4aqyV6yDPoeKwFN3Yt0pCAuZMWeP5tOeSBiom1pU7ppKH+4KHeTekNEIecZG+Ah250DkVCdmWS+aRFTA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1553,26 +1526,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-musl@1.5.9: - resolution: {integrity: sha512-23AYoLD3acakLp9NtheKQDJl8F66eTOflxoPzdJNRy13hUSxb+W9qpz4rRA+CIzkjICFvO2i3UWjeV9QwDVpsQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.0: - resolution: {integrity: sha512-qosHNs/HDIV0pIX9ywNH0B9ARQazfcIiPpWbDH5kFDQufXTeSDLcEGlIW3HoqpkoWUzfDr6xDhG5vnCGT9gRsw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-x64-gnu@1.5.9: - resolution: {integrity: sha512-9PQA1rE7gh41W2ylyKd5qOGOds55ymaYPml9KOpM0g+cxmCXa+8Wf9K5NKvACnJldJJ6cekWzIyB4eN6o5T+yQ==} + /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.3: + resolution: {integrity: sha512-/crp3K6PathqicVWPj8Kh1120NNVV7nagJ7oZW9OFch7nBS1tmDnSB5k5LgA4yYu+lDKNUREnATMWHL6i0gNeg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1580,8 +1535,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.0: - resolution: {integrity: sha512-i4rK0sUmTuFoz5d5ItQUpyy98F0I6A0shVAx6Y5NNSNiMbUNuY8XuZ9zQ2Bbs/qX2tsxJa3n8l4E1e05EwrRxQ==} + /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.3: + resolution: {integrity: sha512-jX1ZT0UQwdBGbpCwlpv2bsLDO7KFMeDJQ/ZZVMfWyjuYrGBG5zhJ2NXwTMkHVnxfvE6BVmnybWcykeSqTATeOw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1589,26 +1544,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl@1.5.9: - resolution: {integrity: sha512-5hdbNFeDsrJ/pXZ4cSQV4bJwUXPPxXxN3/pAtNUqIph7q+vLcBXOXIMoS64iuyaluJC59lhEwlWZFz+EPv0Hqg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-linux-x64-musl@2.0.0-beta.0: - resolution: {integrity: sha512-j9nKnT8/F76yc0zudGzuGAnFMArJU3NSkGWJOp/LcxqA+jJKDUnC/t7jEQdDUoUV1Te5gv3FVUso4L8I6arh4A==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-arm64-msvc@1.5.9: - resolution: {integrity: sha512-O18JufjSB3hSJYu5WWByONouGeX7DraLAtXLErsG1r/VS3zHd/zyuzycrVUaObNXk5bfGlIP0Ypt+RvZJILN2w==} + /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.3: + resolution: {integrity: sha512-UCEZNKocENLX3HYKid4FEbrCMjCX9e58klBIvJKxT8HTjvpgFYDoKccswDNfszLhmineKMlkUvm7j7U0sMh8MQ==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -1616,17 +1553,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.0: - resolution: {integrity: sha512-nMjFg5Q+yGS0wk//7QvJUVBw6mGpT/HirtCt2J6XGTKOHBxr/M/oYFqYa4m351IW4sjz4PcQVvIpOOvljihDvQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-ia32-msvc@1.5.9: - resolution: {integrity: sha512-FQxtxTZu0JVBihfd/lmpxo7jyMOesjWQehfyVUqtgMfm5+Pvvw0Y+ZioeDi1TZkFVrT3QDYy8R4LqDLSZVMQRA==} + /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.3: + resolution: {integrity: sha512-O8syGXDHyKN/cv1ktD76dTcbkQ1nNEPhnT1Z+r0GKxNsw4/MyIVglzEcou3aPq0/1MQ0PEGVyG1x0JMaPw7oHQ==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1634,26 +1562,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.0: - resolution: {integrity: sha512-uthUiat0dXHvHLY6zQQzo552ToUaIVd9XPs0xfUktfHA7gUmF1trLgAF1be+N4A3wh6r5POqPzvy2L8NOt/Tyg==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-x64-msvc@1.5.9: - resolution: {integrity: sha512-EeI1+L518cIBLKw0qUFwnLIySBeSmPQjPLIlNwSukHSro4tAQPHycEVGgKrdToiCWgaZJBA0e5aRSds0Du2TWg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.0: - resolution: {integrity: sha512-4EK3q5MA/bXniIeDbormaudOaoeJc3fggFZ0+RQ2zD9iobNCjaqmaZd6A31nxgooz7HBzrub7Fn7dlF7H/E4Xw==} + /@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.3: + resolution: {integrity: sha512-YDdF3XWaptjKtKz33sZhC+uNAZwp6QtAmZSRCQQlC1W7uJwLD00/3QF4vO/c6Qm+BGFsazVh1+YmBF1p0kV0rg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1661,38 +1571,21 @@ packages: dev: true optional: true - /@tauri-apps/cli@1.5.9: - resolution: {integrity: sha512-knSt/9AvCTeyfC6wkyeouF9hBW/0Mzuw+5vBKEvzaGPQsfFJo1ZCp5FkdiZpGBBfnm09BhugasGRTGofzatfqQ==} - engines: {node: '>= 10'} - hasBin: true - optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 1.5.9 - '@tauri-apps/cli-darwin-x64': 1.5.9 - '@tauri-apps/cli-linux-arm-gnueabihf': 1.5.9 - '@tauri-apps/cli-linux-arm64-gnu': 1.5.9 - '@tauri-apps/cli-linux-arm64-musl': 1.5.9 - '@tauri-apps/cli-linux-x64-gnu': 1.5.9 - '@tauri-apps/cli-linux-x64-musl': 1.5.9 - '@tauri-apps/cli-win32-arm64-msvc': 1.5.9 - '@tauri-apps/cli-win32-ia32-msvc': 1.5.9 - '@tauri-apps/cli-win32-x64-msvc': 1.5.9 - dev: true - - /@tauri-apps/cli@2.0.0-beta.0: - resolution: {integrity: sha512-Mx/dyo0ZV6zhgxylH7DrObct1qtQFVQrYpAvtYe5Z/y3iLt49Y2loHCGy0r2ksAn+TQzqgtcIhXbgOCir8Vx+A==} + /@tauri-apps/cli@2.0.0-beta.3: + resolution: {integrity: sha512-xLAL2DNNUJWqHBKvanc3V9bG9kkwtFwc40X/DrfgEKnkajEm79wqnkaT8LUnmbe0WZ8bzBRO1fLIgKlOH6GiCA==} engines: {node: '>= 10'} hasBin: true optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.0 - '@tauri-apps/cli-darwin-x64': 2.0.0-beta.0 - '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.0 - '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.0 - '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.0 - '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.0 - '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.0 - '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.0 - '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.0 - '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.0 + '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.3 + '@tauri-apps/cli-darwin-x64': 2.0.0-beta.3 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.3 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.3 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.3 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.3 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.3 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.3 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.3 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.3 dev: true /@tauri-apps/toml@2.2.4: diff --git a/shared/template/README.md b/shared/template/README.md index cc955ab7..920f5f8c 100644 --- a/shared/template/README.md +++ b/shared/template/README.md @@ -4,7 +4,7 @@ ## Install -_This plugin requires a Rust version of at least **1.70**_ +_This plugin requires a Rust version of at least **1.75**_ There are three general methods of installation that we can recommend. diff --git a/shared/template/package.json b/shared/template/package.json index eb37eead..60cf5e26 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -23,6 +23,6 @@ "LICENSE" ], "dependencies": { - "@tauri-apps/api": "2.0.0-beta.0" + "@tauri-apps/api": "2.0.0-beta.2" } }