From a238760c8858c4e65a7d3beb46cb476015a544c1 Mon Sep 17 00:00:00 2001 From: Oscar Beaumont Date: Tue, 7 May 2024 16:36:50 +0800 Subject: [PATCH] [ENG-1690] Upgrade to Tauri 2.0 (#2433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Most of it * Cleanup menu * fixes * Fixed linux compilation, still not working though, as the app panic on start * Add dialog permissions * fix search keybind * Fix linux ∙ - Disable linux-ipc-protocol feature, as that is causing panics due to trying to access some WebKit internal structures outside the main thread * Update to Ubuntu 22.04, new tauri doesn't support ubuntu 20.04 > - Add note to download page about deb's distro support * Remove gen/schemas * Update linux dependencies in setup.sh * Fix linux deps again - Enable rt-tokio-crypto-rust feature in secret-service so clippy stops complaining * Clippy + auto fmt * Fix cache-factory - Create a devtools feature for desktop app, which is enabled by default on dev builds * Fix minor error in patchTauri.mjs * Fix some envvars that have been renamed on tauri v2 * Dont change the secrets * Add missing linux dependency --------- Co-authored-by: Vítor Vasconcellos --- .github/workflows/cache-factory.yaml | 10 +- .github/workflows/ci.yml | 4 +- .github/workflows/release.yml | 12 +- Cargo.lock | 2138 ++++++++++++----- Cargo.toml | 17 +- apps/desktop/crates/linux/Cargo.toml | 4 +- apps/desktop/package.json | 7 +- apps/desktop/src-tauri/.gitignore | 1 + apps/desktop/src-tauri/Cargo.toml | 28 +- .../src-tauri/capabilities/default.json | 21 + apps/desktop/src-tauri/src/main.rs | 381 +-- apps/desktop/src-tauri/src/menu.rs | 415 ++-- apps/desktop/src-tauri/src/tauri_plugins.rs | 25 +- apps/desktop/src-tauri/src/updater.rs | 28 +- apps/desktop/src-tauri/tauri.conf.json | 143 +- apps/desktop/src/commands.ts | 151 +- apps/desktop/src/platform.ts | 26 +- apps/landing/src/app/Downloads/Platform.tsx | 4 +- apps/landing/src/app/Downloads/index.tsx | 22 +- core/crates/indexer-rules/src/lib.rs | 4 +- core/src/api/cloud.rs | 2 +- core/src/api/mod.rs | 2 +- core/src/old_job/worker.rs | 2 +- core/src/util/unsafe_streamed_query.rs | 8 +- crates/crypto/Cargo.toml | 3 +- crates/media-metadata/src/image/flash/data.rs | 2 +- interface/app/$libraryId/search/SearchBar.tsx | 5 + interface/hooks/useKeybindEventHandler.ts | 14 +- interface/util/Platform.tsx | 2 +- package.json | 3 +- packages/client/src/core.ts | 22 +- ...t-sd__rspc-tauri@0.0.0-main-dc31e5b2.patch | 68 + pnpm-lock.yaml | 147 +- scripts/setup.sh | 18 +- scripts/utils/patchTauri.mjs | 43 +- 35 files changed, 2407 insertions(+), 1375 deletions(-) create mode 100644 apps/desktop/src-tauri/capabilities/default.json create mode 100644 patches/@oscartbeaumont-sd__rspc-tauri@0.0.0-main-dc31e5b2.patch diff --git a/.github/workflows/cache-factory.yaml b/.github/workflows/cache-factory.yaml index 335f42a2d..9a0e7a6ba 100644 --- a/.github/workflows/cache-factory.yaml +++ b/.github/workflows/cache-factory.yaml @@ -40,15 +40,15 @@ jobs: target: x86_64-pc-windows-msvc # - host: windows-latest # target: aarch64-pc-windows-msvc - - host: ubuntu-20.04 + - host: ubuntu-22.04 target: x86_64-unknown-linux-gnu - # - host: ubuntu-20.04 + # - host: ubuntu-22.04 # target: x86_64-unknown-linux-musl - # - host: ubuntu-20.04 + # - host: uubuntu-22.04 # target: aarch64-unknown-linux-gnu - # - host: ubuntu-20.04 + # - host: ubuntu-22.04 # target: aarch64-unknown-linux-musl - # - host: ubuntu-20.04 + # - host: ubuntu-22.04 # target: armv7-unknown-linux-gnueabihf name: 'Make Cache' runs-on: ${{ matrix.settings.host }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c95f758c8..41329b26f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,7 +178,7 @@ jobs: runs-on: ${{ matrix.platform }} strategy: matrix: - platform: [ubuntu-20.04, macos-14, windows-latest] + platform: [ubuntu-22.04, macos-14, windows-latest] permissions: contents: read timeout-minutes: 45 @@ -241,7 +241,7 @@ jobs: # runs-on: ${{ matrix.platform }} # strategy: # matrix: - # platform: [ubuntu-20.04, macos-latest, windows-latest] + # platform: [ubuntu-22.04, macos-latest, windows-latest] # steps: # - name: Checkout repository # uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d058ebad..6dedb68d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,17 +32,17 @@ jobs: arch: x86_64 # - host: windows-latest # target: aarch64-pc-windows-msvc - - host: ubuntu-20.04 + - host: ubuntu-22.04 target: x86_64-unknown-linux-gnu bundles: deb os: linux arch: x86_64 - # - host: ubuntu-20.04 + # - host: ubuntu-22.04 # target: x86_64-unknown-linux-musl - # - host: ubuntu-20.04 + # - host: ubuntu-22.04 # target: aarch64-unknown-linux-gnu # bundles: deb - # - host: ubuntu-20.04 + # - host: ubuntu-22.04 # target: aarch64-unknown-linux-musl name: Desktop - Main ${{ matrix.settings.target }} runs-on: ${{ matrix.settings.host }} @@ -101,8 +101,8 @@ jobs: run: | pnpm tauri build --ci -v --target ${{ matrix.settings.target }} --bundles ${{ matrix.settings.bundles }},updater env: - TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} diff --git a/Cargo.lock b/Cargo.lock index 51b2c1312..a7176d3b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -241,7 +241,7 @@ dependencies = [ "base64ct", "blake2 0.11.0-pre.3", "cpufeatures", - "password-hash", + "password-hash 0.5.0", "zeroize", ] @@ -266,6 +266,23 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" +[[package]] +name = "ashpd" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" +dependencies = [ + "enumflags2", + "futures-channel", + "futures-util", + "rand 0.8.5", + "serde", + "serde_repr", + "tokio", + "url", + "zbus 4.0.1", +] + [[package]] name = "asn1-rs" version = "0.5.2" @@ -315,6 +332,18 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-broadcast" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258b52a1aa741b9f09783b2d86cf0aeeb617bbf847f6933340a39644227acbdb" +dependencies = [ + "event-listener 5.3.0", + "event-listener-strategy 0.5.2", + "futures-core", + "pin-project-lite", +] + [[package]] name = "async-channel" version = "2.1.1" @@ -323,7 +352,7 @@ checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" dependencies = [ "concurrent-queue", "event-listener 4.0.1", - "event-listener-strategy", + "event-listener-strategy 0.4.0", "futures-core", "pin-project-lite", ] @@ -383,7 +412,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.1", - "event-listener-strategy", + "event-listener-strategy 0.4.0", "pin-project-lite", ] @@ -404,6 +433,26 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "async-process" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" +dependencies = [ + "async-channel", + "async-io 2.3.0", + "async-lock 3.3.0", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener 5.3.0", + "futures-lite 2.2.0", + "rustix 0.38.31", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "async-recursion" version = "1.0.5" @@ -412,7 +461,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -452,7 +501,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -469,7 +518,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -501,26 +550,25 @@ dependencies = [ [[package]] name = "atk" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" +checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", - "bitflags 1.3.2", "glib", "libc", ] [[package]] name = "atk-sys" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58aeb089fb698e06db8089971c7ee317ab9644bade33383f63631437b03aafb6" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] @@ -544,7 +592,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d9a9bf8b79a749ee0b911b91b671cc2b6c670bdbc7e3dfd537576ddc94bb2a2" dependencies = [ - "http", + "http 0.2.11", "log", "url", ] @@ -577,8 +625,8 @@ dependencies = [ "bytes", "fastrand 2.0.1", "hex", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "ring 0.17.7", "time", "tokio", @@ -608,8 +656,8 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "pin-project-lite", "tracing", ] @@ -630,7 +678,7 @@ dependencies = [ "aws-smithy-types", "aws-types", "fastrand 2.0.1", - "http", + "http 0.2.11", "percent-encoding", "tracing", "uuid", @@ -657,8 +705,8 @@ dependencies = [ "aws-smithy-xml", "aws-types", "bytes", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "once_cell", "percent-encoding", "regex", @@ -683,7 +731,7 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http", + "http 0.2.11", "regex", "tracing", ] @@ -705,7 +753,7 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http", + "http 0.2.11", "regex", "tracing", ] @@ -728,7 +776,7 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "http", + "http 0.2.11", "regex", "tracing", ] @@ -749,7 +797,7 @@ dependencies = [ "form_urlencoded", "hex", "hmac", - "http", + "http 0.2.11", "once_cell", "p256", "percent-encoding", @@ -785,8 +833,8 @@ dependencies = [ "crc32c", "crc32fast", "hex", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "md-5", "pin-project-lite", "sha1", @@ -817,8 +865,8 @@ dependencies = [ "bytes", "bytes-utils", "futures-core", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "once_cell", "percent-encoding", "pin-project-lite", @@ -858,14 +906,14 @@ dependencies = [ "bytes", "fastrand 2.0.1", "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", + "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", "pin-utils", - "rustls", + "rustls 0.21.10", "tokio", "tracing", ] @@ -879,7 +927,7 @@ dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", - "http", + "http 0.2.11", "pin-project-lite", "tokio", "tracing", @@ -896,8 +944,8 @@ dependencies = [ "bytes", "bytes-utils", "futures-core", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "itoa 1.0.10", "num-integer", "pin-project-lite", @@ -928,7 +976,7 @@ dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", - "http", + "http 0.2.11", "rustc_version", "tracing", ] @@ -946,9 +994,9 @@ dependencies = [ "bytes", "futures-util", "headers", - "http", - "http-body", - "hyper", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", "itoa 1.0.10", "matchit", "memchr", @@ -978,8 +1026,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -1009,7 +1057,7 @@ checksum = "371b91193f54f345ec55fe913dc63ca4f8d2f948f4e8a8e189591b76a2dda718" dependencies = [ "crypto-bigint 0.6.0-pre.12", "digest 0.11.0-pre.8", - "password-hash", + "password-hash 0.5.0", "zeroize", ] @@ -1059,6 +1107,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64-simd" version = "0.8.0" @@ -1164,7 +1218,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.60", "which", ] @@ -1185,6 +1239,9 @@ name = "bitflags" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +dependencies = [ + "serde", +] [[package]] name = "bitvec" @@ -1225,7 +1282,7 @@ dependencies = [ "arrayvec", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", "digest 0.11.0-pre.8", "generic-array 1.0.0", "hybrid-array", @@ -1417,27 +1474,49 @@ dependencies = [ ] [[package]] -name = "cairo-rs" -version = "0.15.12" +name = "bzip2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ - "bitflags 1.3.2", + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.4.1", "cairo-sys-rs", "glib", "libc", + "once_cell", "thiserror", ] [[package]] name = "cairo-sys-rs" -version = "0.15.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ "glib-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] @@ -1487,12 +1566,12 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.15.3" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" +checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" dependencies = [ "serde", - "toml 0.7.8", + "toml 0.8.2", ] [[package]] @@ -1546,15 +1625,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "cfg-expr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3431df59f28accaf4cb4eed4a9acc66bea3f3c3753aa6cdc2f024174ef232af7" -dependencies = [ - "smallvec 1.13.1", -] - [[package]] name = "cfg-expr" version = "0.15.5" @@ -1571,6 +1641,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f" + [[package]] name = "chacha20" version = "0.9.1" @@ -1699,7 +1775,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -1716,16 +1792,16 @@ checksum = "1b1dc960ba75d543267db9254da8ec1cb318a037beb3f8d2497520e410096fab" [[package]] name = "cocoa" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" dependencies = [ "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", "core-graphics", - "foreign-types", + "foreign-types 0.5.0", "libc", "objc", ] @@ -1843,6 +1919,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + [[package]] name = "constant_time_eq" version = "0.3.0" @@ -1899,14 +1981,14 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.5.0", "libc", ] @@ -2118,7 +2200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -2128,7 +2210,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -2198,7 +2280,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -2222,7 +2304,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -2233,7 +2315,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -2488,7 +2570,39 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", +] + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +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", +] + +[[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.60", ] [[package]] @@ -2517,6 +2631,15 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" +[[package]] +name = "dpi" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f25c0e292a7ca6d6498557ff1df68f32c99850012b6ea401cf8daf771f22ff53" +dependencies = [ + "serde", +] + [[package]] name = "dtoa" version = "1.0.9" @@ -2538,6 +2661,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "ecdsa" version = "0.14.8" @@ -2609,7 +2738,7 @@ checksum = "f54cc3e827ee1c3812239a9a41dede7b4d7d5d5464faa32d71bd7cba28ce2cb2" dependencies = [ "cc", "rustc_version", - "toml 0.8.8", + "toml 0.8.2", "vswhom", "winreg 0.51.0", ] @@ -2629,6 +2758,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 = "endian-type" version = "0.1.2" @@ -2644,7 +2779,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -2665,7 +2800,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -2676,7 +2811,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -2732,6 +2867,17 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "event-listener" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + [[package]] name = "event-listener-strategy" version = "0.4.0" @@ -2742,6 +2888,16 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.0", + "pin-project-lite", +] + [[package]] name = "exr" version = "1.6.4" @@ -2950,7 +3106,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", ] [[package]] @@ -2959,6 +3136,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -3097,7 +3280,10 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ + "fastrand 2.0.1", "futures-core", + "futures-io", + "parking", "pin-project-lite", ] @@ -3120,7 +3306,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -3130,7 +3316,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35bd3cf68c183738046838e300353e4716c674dc5e56890de4826801a6622a28" dependencies = [ "futures-io", - "rustls", + "rustls 0.21.10", ] [[package]] @@ -3191,11 +3377,10 @@ dependencies = [ [[package]] name = "gdk" -version = "0.15.4" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" +checksum = "f5ba081bdef3b75ebcdbfc953699ed2d7417d6bd853347a42a37d76406a33646" dependencies = [ - "bitflags 1.3.2", "cairo-rs", "gdk-pixbuf", "gdk-sys", @@ -3207,35 +3392,35 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.15.11" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" dependencies = [ - "bitflags 1.3.2", "gdk-pixbuf-sys", "gio", "glib", "libc", + "once_cell", ] [[package]] name = "gdk-pixbuf-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140b2f5378256527150350a8346dbdb08fadc13453a7a2d73aecd5fab3c402a7" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ "gio-sys", "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] name = "gdk-sys" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e7a08c1e8f06f4177fb7e51a777b8c1689f743a7bc11ea91d44d2226073a88" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -3245,19 +3430,47 @@ dependencies = [ "libc", "pango-sys", "pkg-config", - "system-deps 6.2.0", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2ea8a4909d530f79921290389cbd7c34cb9d623bfe970eaae65ca5f9cd9cce" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", ] [[package]] name = "gdkx11-sys" -version = "0.15.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7f8c7a84b407aa9b143877e267e848ff34106578b64d1e0a24bf550716178" +checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" dependencies = [ "gdk-sys", "glib-sys", "libc", - "system-deps 6.2.0", + "system-deps", "x11", ] @@ -3293,6 +3506,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -3345,49 +3568,54 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gio" -version = "0.15.12" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" dependencies = [ - "bitflags 1.3.2", "futures-channel", "futures-core", "futures-io", + "futures-util", "gio-sys", "glib", "libc", "once_cell", + "pin-project-lite", + "smallvec 1.13.1", "thiserror", ] [[package]] name = "gio-sys" -version = "0.15.10" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32157a475271e2c4a023382e9cab31c4584ee30a97da41d3c4e9fdd605abcf8d" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.0", + "system-deps", "winapi", ] [[package]] name = "glib" -version = "0.15.12" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "futures-channel", "futures-core", "futures-executor", "futures-task", + "futures-util", + "gio-sys", "glib-macros", "glib-sys", "gobject-sys", "libc", + "memchr", "once_cell", "smallvec 1.13.1", "thiserror", @@ -3395,27 +3623,26 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.15.13" +version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ - "anyhow", "heck 0.4.1", - "proc-macro-crate", + "proc-macro-crate 2.0.2", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] name = "glib-sys" -version = "0.15.10" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" dependencies = [ "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] @@ -3440,13 +3667,13 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ "glib-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] @@ -3472,12 +3699,11 @@ dependencies = [ [[package]] name = "gtk" -version = "0.15.5" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" +checksum = "93c4f5e0e20b60e10631a5f06da7fe3dda744b05ad0ea71fee2f47adf865890c" dependencies = [ "atk", - "bitflags 1.3.2", "cairo-rs", "field-offset", "futures-channel", @@ -3488,16 +3714,15 @@ dependencies = [ "gtk-sys", "gtk3-macros", "libc", - "once_cell", "pango", "pkg-config", ] [[package]] name = "gtk-sys" -version = "0.15.3" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5bc2f0587cba247f60246a0ca11fe25fb733eabc3de12d1965fc07efab87c84" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" dependencies = [ "atk-sys", "cairo-sys-rs", @@ -3508,21 +3733,20 @@ dependencies = [ "gobject-sys", "libc", "pango-sys", - "system-deps 6.2.0", + "system-deps", ] [[package]] name = "gtk3-macros" -version = "0.15.6" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" +checksum = "c6063efb63db582968fb7df72e1ae68aa6360dcfb0a75143f34fc7d616bad75e" dependencies = [ - "anyhow", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", ] [[package]] @@ -3536,7 +3760,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.11", "indexmap 2.2.1", "slab", "tokio", @@ -3607,7 +3831,7 @@ dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http", + "http 0.2.11", "httpdate", "mime", "sha1", @@ -3619,7 +3843,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.11", ] [[package]] @@ -3637,6 +3861,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.3" @@ -3764,6 +3994,17 @@ dependencies = [ "itoa 1.0.10", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa 1.0.10", +] + [[package]] name = "http-body" version = "0.4.6" @@ -3771,7 +4012,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.11", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", "pin-project-lite", ] @@ -3796,7 +4060,7 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "httpz" version = "0.0.6" -source = "git+https://github.com/spacedriveapp/rspc.git?rev=f3347e2e8bfe3f37bfacc437ca329fe71cdcb048#f3347e2e8bfe3f37bfacc437ca329fe71cdcb048" +source = "git+https://github.com/spacedriveapp/rspc.git?rev=ab12964b140991e0730c3423693533fba71efb03#ab12964b140991e0730c3423693533fba71efb03" dependencies = [ "async-tungstenite", "axum", @@ -3804,8 +4068,8 @@ dependencies = [ "cookie", "form_urlencoded", "futures", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "sha1", "thiserror", "tokio", @@ -3837,8 +4101,8 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "httparse", "httpdate", "itoa 1.0.10", @@ -3850,6 +4114,25 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa 1.0.10", + "pin-project-lite", + "smallvec 1.13.1", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -3857,13 +4140,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "log", - "rustls", + "rustls 0.21.10", "rustls-native-certs", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls 0.22.4", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.25.0", + "tower-service", ] [[package]] @@ -3873,12 +4173,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.28", "native-tls", "tokio", "tokio-native-tls", ] +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.3.1", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower", + "tower-service", + "tracing", +] + [[package]] name = "iana-time-zone" version = "0.1.58" @@ -3890,7 +4210,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.51.1", ] [[package]] @@ -3986,8 +4306,8 @@ dependencies = [ "attohttpc", "bytes", "futures", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "log", "rand 0.8.5", "tokio", @@ -3995,22 +4315,6 @@ dependencies = [ "xmltree", ] -[[package]] -name = "ignore" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata 0.4.5", - "same-file", - "walkdir", - "winapi-util", -] - [[package]] name = "image" version = "0.24.7" @@ -4079,15 +4383,15 @@ dependencies = [ [[package]] name = "indoc" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" [[package]] name = "infer" -version = "0.13.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f551f8c3a39f68f986517db0d1759de85881894fdc7db798bd2a9df9cb04b7fc" +checksum = "cb33622da908807a06f9513c19b3c1ad50fab3e4137d82a78107d502075aa199" dependencies = [ "cfb", ] @@ -4145,7 +4449,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df1f2f068675add1a3fc77f5f5ab2e29290c841ee34d151abc007bce902e5d34" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -4180,6 +4484,15 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + [[package]] name = "is-terminal" version = "0.4.12" @@ -4191,6 +4504,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + [[package]] name = "iter_tools" version = "0.1.4" @@ -4232,9 +4555,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "javascriptcore-rs" -version = "0.16.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" dependencies = [ "bitflags 1.3.2", "glib", @@ -4243,28 +4566,14 @@ dependencies = [ [[package]] name = "javascriptcore-rs-sys" -version = "0.4.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905fbb87419c5cde6e3269537e4ea7d46431f3008c5d057e915ef3f115e7793c" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 5.0.0", -] - -[[package]] -name = "jni" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" -dependencies = [ - "cesu8", - "combine 4.6.6", - "jni-sys", - "log", - "thiserror", - "walkdir", + "system-deps", ] [[package]] @@ -4372,6 +4681,17 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.4.1", + "serde", + "unicode-segmentation", +] + [[package]] name = "kqueue" version = "1.0.8" @@ -4452,6 +4772,30 @@ dependencies = [ "pin-project", ] +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading 0.7.4", + "once_cell", +] + [[package]] name = "libc" version = "0.2.153" @@ -4816,7 +5160,7 @@ dependencies = [ "quinn", "rand 0.8.5", "ring 0.16.20", - "rustls", + "rustls 0.21.10", "socket2 0.5.5", "thiserror", "tokio", @@ -4911,7 +5255,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -4941,8 +5285,8 @@ dependencies = [ "libp2p-identity", "rcgen", "ring 0.16.20", - "rustls", - "rustls-webpki", + "rustls 0.21.10", + "rustls-webpki 0.101.7", "thiserror", "x509-parser", "yasna", @@ -5009,6 +5353,25 @@ dependencies = [ "glob", ] +[[package]] +name = "libxdo" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00333b8756a3d28e78def82067a377de7fa61b24909000aeaa2b446a948d14db" +dependencies = [ + "libxdo-sys", +] + +[[package]] +name = "libxdo-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db23b9e7e2b7831bbd8aac0bbeeeb7b68cbebc162b227e7052e8e55829a09212" +dependencies = [ + "libc", + "x11", +] + [[package]] name = "line-wrap" version = "0.1.1" @@ -5058,9 +5421,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "loom" @@ -5302,7 +5665,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953cbbb6f9ba4b9304f4df79b98cdc9d14071ed93065a9fca11c00c5d9181b66" dependencies = [ - "hyper", + "hyper 0.14.28", "indexmap 1.9.3", "ipnet", "metrics 0.19.0", @@ -5447,6 +5810,26 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "muda" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f428b4e9db3d17e2f809dfb1ff9ddfbbf16c71790d1656d10aee320877e1392f" +dependencies = [ + "cocoa", + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "libxdo", + "objc", + "once_cell", + "png", + "serde", + "thiserror", + "windows-sys 0.52.0", +] + [[package]] name = "multiaddr" version = "0.18.1" @@ -5558,14 +5941,15 @@ dependencies = [ [[package]] name = "ndk" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ "bitflags 1.3.2", "jni-sys", "ndk-sys", "num_enum", + "raw-window-handle 0.5.2", "thiserror", ] @@ -5577,9 +5961,9 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.3.0" +version = "0.4.1+23.1.7779620" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" dependencies = [ "jni-sys", ] @@ -5688,6 +6072,18 @@ dependencies = [ "memoffset 0.7.1", ] +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.1", + "cfg-if", + "libc", + "memoffset 0.9.0", +] + [[package]] name = "no-std-compat" version = "0.2.0" @@ -5884,7 +6280,7 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -5989,12 +6385,13 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "open" -version = "3.2.0" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +checksum = "449f0ff855d85ddbf1edd5b646d65249ead3f5e422aaa86b7d2d0b049b103e32" dependencies = [ + "is-wsl", + "libc", "pathdiff", - "windows-sys 0.42.0", ] [[package]] @@ -6018,7 +6415,7 @@ checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" dependencies = [ "bitflags 2.4.1", "cfg-if", - "foreign-types", + "foreign-types 0.3.2", "libc", "once_cell", "openssl-macros", @@ -6033,7 +6430,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -6146,23 +6543,23 @@ dependencies = [ [[package]] name = "os_info" -version = "3.7.0" +version = "3.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" dependencies = [ "log", "serde", - "winapi", + "windows-sys 0.52.0", ] [[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]] @@ -6199,11 +6596,11 @@ dependencies = [ [[package]] name = "pango" -version = "0.15.10" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" dependencies = [ - "bitflags 1.3.2", + "gio", "glib", "libc", "once_cell", @@ -6212,14 +6609,14 @@ dependencies = [ [[package]] name = "pango-sys" -version = "0.15.10" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a00081cde4661982ed91d80ef437c20eacaf6aa1a5962c0279ae194662c3aa" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ "glib-sys", "gobject-sys", "libc", - "system-deps 6.2.0", + "system-deps", ] [[package]] @@ -6310,6 +6707,17 @@ dependencies = [ "schema-ast", ] +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "password-hash" version = "0.5.0" @@ -6333,6 +6741,18 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash 0.4.2", + "sha2 0.10.8", +] + [[package]] name = "pdfium-render" version = "0.8.16" @@ -6413,7 +6833,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -6557,7 +6977,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -6610,7 +7030,7 @@ checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -6807,7 +7227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -6821,7 +7241,7 @@ dependencies = [ [[package]] name = "prisma-client-rust" version = "0.6.8" -source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=f99d6f5566570f3ab1edecb7a172ad25b03d95af#f99d6f5566570f3ab1edecb7a172ad25b03d95af" +source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=d6f6b224b874fad904bb17b81cf2e570c6003ac9#d6f6b224b874fad904bb17b81cf2e570c6003ac9" dependencies = [ "base64 0.13.1", "bigdecimal 0.3.1", @@ -6854,16 +7274,16 @@ dependencies = [ [[package]] name = "prisma-client-rust-cli" version = "0.6.8" -source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=f99d6f5566570f3ab1edecb7a172ad25b03d95af#f99d6f5566570f3ab1edecb7a172ad25b03d95af" +source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=d6f6b224b874fad904bb17b81cf2e570c6003ac9#d6f6b224b874fad904bb17b81cf2e570c6003ac9" dependencies = [ "directories 4.0.1", "flate2", - "http", + "http 0.2.11", "prisma-client-rust-generator", "proc-macro2", "quote", "regex", - "reqwest", + "reqwest 0.11.23", "serde", "serde_json", "serde_path_to_error", @@ -6874,16 +7294,16 @@ dependencies = [ [[package]] name = "prisma-client-rust-generator" version = "0.6.8" -source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=f99d6f5566570f3ab1edecb7a172ad25b03d95af#f99d6f5566570f3ab1edecb7a172ad25b03d95af" +source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=d6f6b224b874fad904bb17b81cf2e570c6003ac9#d6f6b224b874fad904bb17b81cf2e570c6003ac9" dependencies = [ "directories 4.0.1", "flate2", - "http", + "http 0.2.11", "prisma-client-rust-sdk", "proc-macro2", "quote", "regex", - "reqwest", + "reqwest 0.11.23", "serde", "serde_json", "serde_path_to_error", @@ -6894,7 +7314,7 @@ dependencies = [ [[package]] name = "prisma-client-rust-macros" version = "0.6.8" -source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=f99d6f5566570f3ab1edecb7a172ad25b03d95af#f99d6f5566570f3ab1edecb7a172ad25b03d95af" +source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=d6f6b224b874fad904bb17b81cf2e570c6003ac9#d6f6b224b874fad904bb17b81cf2e570c6003ac9" dependencies = [ "convert_case 0.6.0", "proc-macro2", @@ -6906,7 +7326,7 @@ dependencies = [ [[package]] name = "prisma-client-rust-sdk" version = "0.6.8" -source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=f99d6f5566570f3ab1edecb7a172ad25b03d95af#f99d6f5566570f3ab1edecb7a172ad25b03d95af" +source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=d6f6b224b874fad904bb17b81cf2e570c6003ac9#d6f6b224b874fad904bb17b81cf2e570c6003ac9" dependencies = [ "convert_case 0.5.0", "dmmf", @@ -6964,6 +7384,16 @@ dependencies = [ "toml_edit 0.19.15", ] +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -6996,9 +7426,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -7023,7 +7453,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -7242,7 +7672,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls", + "rustls 0.21.10", "thiserror", "tokio", "tracing", @@ -7258,7 +7688,7 @@ dependencies = [ "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls", + "rustls 0.21.10", "slab", "thiserror", "tinyvec", @@ -7280,9 +7710,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -7459,6 +7889,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "raw-window-handle" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc3bcbdb1ddfc11e700e62968e6b4cc9c75bb466464ad28fb61c5b2c964418b" + [[package]] name = "rawpointer" version = "0.2.1" @@ -7533,6 +7969,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.4.1", +] + [[package]] name = "redox_users" version = "0.4.4" @@ -7633,9 +8078,9 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", - "http-body", - "hyper", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", "hyper-tls", "ipnet", "js-sys", @@ -7656,11 +8101,54 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", + "wasm-streams 0.3.0", "web-sys", "winreg 0.50.0", ] +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-rustls 0.26.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls 0.22.4", + "rustls-pemfile 2.1.2", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls 0.25.0", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.4.0", + "web-sys", + "webpki-roots 0.26.1", + "winreg 0.52.0", +] + [[package]] name = "resolv-conf" version = "0.7.0" @@ -7701,26 +8189,26 @@ dependencies = [ [[package]] name = "rfd" -version = "0.10.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0149778bd99b6959285b0933288206090c50e2327f47a9c463bfdbf45c8823ea" +checksum = "25a73a7337fc24366edfca76ec521f51877b114e42dab584008209cca6719251" dependencies = [ + "ashpd", "block", "dispatch", "glib-sys", "gobject-sys", "gtk-sys", "js-sys", - "lazy_static", "log", "objc", "objc-foundation", "objc_id", - "raw-window-handle", + "raw-window-handle 0.6.1", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.37.0", + "windows-sys 0.48.0", ] [[package]] @@ -7813,7 +8301,7 @@ checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" [[package]] name = "rspc" version = "0.1.4" -source = "git+https://github.com/spacedriveapp/rspc.git?rev=f3347e2e8bfe3f37bfacc437ca329fe71cdcb048#f3347e2e8bfe3f37bfacc437ca329fe71cdcb048" +source = "git+https://github.com/spacedriveapp/rspc.git?rev=ab12964b140991e0730c3423693533fba71efb03#ab12964b140991e0730c3423693533fba71efb03" dependencies = [ "futures", "futures-channel", @@ -7926,10 +8414,24 @@ checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", "ring 0.17.7", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki 0.102.3", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -7937,7 +8439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "schannel", "security-framework", ] @@ -7951,6 +8453,22 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -7961,6 +8479,17 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustls-webpki" +version = "0.102.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -8084,6 +8613,32 @@ dependencies = [ "user-facing-errors", ] +[[package]] +name = "schemars" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f55c82c700538496bdc329bb4918a81f87cc8888811bd123cf325a0f2f8d309" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "schemars_derive" +version = "0.8.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83263746fe5e32097f06356968a077f96089739c927a61450efa069905eec108" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.60", +] + [[package]] name = "scoped-tls" version = "1.0.1" @@ -8128,7 +8683,7 @@ dependencies = [ "once_cell", "ort", "prisma-client-rust", - "reqwest", + "reqwest 0.11.23", "rmp-serde", "rmpv", "sd-core-file-path-helper", @@ -8164,7 +8719,7 @@ name = "sd-cloud-api" version = "0.1.0" dependencies = [ "base64 0.21.7", - "reqwest", + "reqwest 0.11.23", "rmpv", "rspc", "sd-p2p", @@ -8201,9 +8756,9 @@ dependencies = [ "futures-concurrency", "globset", "hostname", - "http-body", + "http-body 0.4.6", "http-range", - "hyper", + "hyper 0.14.28", "icrate", "image", "int-enum", @@ -8219,7 +8774,7 @@ dependencies = [ "plist", "prisma-client-rust", "regex", - "reqwest", + "reqwest 0.11.23", "rmp", "rmp-serde", "rmpv", @@ -8408,7 +8963,7 @@ dependencies = [ "thiserror", "tokio", "uuid", - "zbus", + "zbus 4.0.1", "zeroize", ] @@ -8419,7 +8974,7 @@ dependencies = [ "anyhow", "cargo_metadata 0.18.1", "clap", - "reqwest", + "reqwest 0.11.23", "serde", "serde_json", ] @@ -8431,8 +8986,8 @@ dependencies = [ "axum", "directories 5.0.1", "futures", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "opener", "prisma-client-rust", "rand 0.8.5", @@ -8444,16 +8999,22 @@ dependencies = [ "sd-fda", "sd-prisma", "serde", + "serde_json", "specta", + "strum", "tauri", "tauri-build", + "tauri-plugin-dialog", + "tauri-plugin-os", + "tauri-plugin-shell", + "tauri-plugin-updater", "tauri-specta", "thiserror", "tokio", "tracing", "uuid", "webkit2gtk", - "webview2-com", + "webview2-com 0.19.1", ] [[package]] @@ -8550,7 +9111,7 @@ dependencies = [ name = "sd-mobile-android" version = "0.1.0" dependencies = [ - "jni 0.21.1", + "jni", "sd-mobile-core", "tracing", ] @@ -8593,7 +9154,7 @@ dependencies = [ "mdns-sd", "pin-project-lite", "rand_core 0.6.4", - "reqwest", + "reqwest 0.11.23", "serde", "sha256", "specta", @@ -8638,7 +9199,7 @@ version = "0.0.1" dependencies = [ "hex", "libp2p", - "reqwest", + "reqwest 0.11.23", "serde", "serde_json", "tokio", @@ -8674,7 +9235,7 @@ version = "0.1.0" dependencies = [ "axum", "base64 0.21.7", - "http", + "http 0.2.11", "include_dir", "mime_guess", "rspc", @@ -8774,7 +9335,7 @@ dependencies = [ "rand 0.8.5", "serde", "sha2 0.10.8", - "zbus", + "zbus 3.15.1", ] [[package]] @@ -8892,7 +9453,18 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", ] [[package]] @@ -8925,7 +9497,7 @@ checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -8975,7 +9547,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -9250,38 +9822,58 @@ dependencies = [ ] [[package]] -name = "soup2" -version = "0.2.1" +name = "softbuffer" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" +checksum = "61d5d17f23326fe0d9b0af282f73f3af666699420fd5f42629efd9c6e7dc166f" dependencies = [ - "bitflags 1.3.2", - "gio", - "glib", - "libc", - "once_cell", - "soup2-sys", + "bytemuck", + "cfg_aliases", + "cocoa", + "core-graphics", + "foreign-types 0.5.0", + "js-sys", + "log", + "objc", + "raw-window-handle 0.6.1", + "redox_syscall 0.5.1", + "wasm-bindgen", + "wayland-sys", + "web-sys", + "windows-sys 0.52.0", ] [[package]] -name = "soup2-sys" -version = "0.2.0" +name = "soup3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" dependencies = [ - "bitflags 1.3.2", "gio-sys", "glib-sys", "gobject-sys", "libc", - "system-deps 5.0.0", + "system-deps", ] [[package]] name = "specta" -version = "2.0.0-rc.7" +version = "2.0.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18938fc0c7c0e8b7c8f4702e8cb53c218d4442f5b7420dd8b3d9640ca9a46712" +checksum = "1ed13baa3131e5b627ca78dca1097aa84dd83509b18ac9f876a0db5e70413636" dependencies = [ "bigdecimal 0.4.2", "chrono", @@ -9291,7 +9883,6 @@ dependencies = [ "serde", "serde_json", "specta-macros", - "tauri", "thiserror", "tokio", "uhlc 0.6.3", @@ -9300,9 +9891,9 @@ dependencies = [ [[package]] name = "specta-macros" -version = "2.0.0-rc.7" +version = "2.0.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05080358d47cc706229b854d51c6477208de2b022ec0e16f1572c8cdc5263c8e" +checksum = "ef33e9678ae36993fcbfc46aa29568ef10d32fd54428808759c6a450998c43ec" dependencies = [ "Inflector", "proc-macro2", @@ -9471,9 +10062,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "state" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" +checksum = "2b8c4a4445d81357df8b1a650d0d0d6fbbbfe99d064aa5e02f3e4022061476d8" dependencies = [ "loom", ] @@ -9557,7 +10148,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -9600,9 +10191,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" dependencies = [ "proc-macro2", "quote", @@ -9629,15 +10220,11 @@ dependencies = [ [[package]] name = "sys-locale" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" +checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" dependencies = [ - "js-sys", "libc", - "wasm-bindgen", - "web-sys", - "windows-sys 0.45.0", ] [[package]] @@ -9676,30 +10263,17 @@ dependencies = [ "libc", ] -[[package]] -name = "system-deps" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18db855554db7bd0e73e06cf7ba3df39f97812cb11d3f75e71c39bf45171797e" -dependencies = [ - "cfg-expr 0.9.1", - "heck 0.3.3", - "pkg-config", - "toml 0.5.11", - "version-compare 0.0.11", -] - [[package]] name = "system-deps" version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" dependencies = [ - "cfg-expr 0.15.5", + "cfg-expr", "heck 0.4.1", "pkg-config", - "toml 0.8.8", - "version-compare 0.1.1", + "toml 0.8.2", + "version-compare", ] [[package]] @@ -9710,28 +10284,23 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tao" -version = "0.16.5" -source = "git+https://github.com/spacedriveapp/tao?rev=7880adbc090402c44fbcf006669458fa82623403#7880adbc090402c44fbcf006669458fa82623403" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92bcf8885e147b56d6e26751263b45876284f32ca404703f6d3b8f80d16ff4dd" dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "cc", + "bitflags 2.4.1", "cocoa", "core-foundation", "core-graphics", "crossbeam-channel", "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", + "dlopen2", + "dpi", + "gdkwayland-sys", "gdkx11-sys", - "gio", - "glib", - "glib-sys", "gtk", - "image", "instant", - "jni 0.20.0", + "jni", "lazy_static", "libc", "log", @@ -9741,22 +10310,22 @@ dependencies = [ "objc", "once_cell", "parking_lot 0.12.1", - "png", - "raw-window-handle", + "raw-window-handle 0.6.1", "scopeguard", - "serde", "tao-macros", "unicode-segmentation", - "uuid", - "windows 0.39.0", - "windows-implement", + "url", + "windows 0.56.0", + "windows-core 0.56.0", + "windows-version", "x11-dl", ] [[package]] name = "tao-macros" -version = "0.1.0" -source = "git+https://github.com/spacedriveapp/tao?rev=7880adbc090402c44fbcf006669458fa82623403#7880adbc090402c44fbcf006669458fa82623403" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec114582505d158b669b136e6851f85840c109819d77c42bb7c0709f727d18c2" dependencies = [ "proc-macro2", "quote", @@ -9788,87 +10357,83 @@ checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tauri" -version = "1.5.3" -source = "git+https://github.com/spacedriveapp/tauri.git?rev=8409af71a83d631ff9d1cd876c441a57511a1cbd#8409af71a83d631ff9d1cd876c441a57511a1cbd" +version = "2.0.0-beta.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fedd5490eddf117253945f0baedafded43474c971cba546a818f527d5c26266" dependencies = [ "anyhow", - "base64 0.21.7", "bytes", "cocoa", "dirs-next", + "dunce", "embed_plist", - "encoding_rs", - "flate2", "futures-util", - "glib", + "getrandom 0.2.12", "glob", "gtk", - "heck 0.4.1", - "http", - "ignore", - "minisign-verify", + "heck 0.5.0", + "http 1.1.0", + "jni", + "libc", + "log", + "mime", + "muda", "objc", - "once_cell", - "open", - "os_info", - "os_pipe", "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "regex", - "reqwest", - "rfd", - "semver", + "raw-window-handle 0.6.1", + "reqwest 0.12.4", "serde", "serde_json", "serde_repr", "serialize-to-javascript", - "shared_child", + "specta", "state", - "sys-locale", - "tar", + "swift-rs", + "tauri-build", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", - "tauri-utils 1.5.1", - "tempfile", + "tauri-utils", "thiserror", - "time", "tokio", - "tracing", + "tray-icon", "url", - "uuid", + "urlpattern", "webkit2gtk", - "webview2-com", - "windows 0.39.0", - "zip", + "webview2-com 0.30.0", + "window-vibrancy", + "windows 0.56.0", ] [[package]] name = "tauri-build" -version = "1.5.1" +version = "2.0.0-beta.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9914a4715e0b75d9f387a285c7e26b5bbfeb1249ad9f842675a82481565c532" +checksum = "abcf98a9b4527567c3e5ca9723431d121e001c2145651b3fa044d22b5e025a7e" dependencies = [ "anyhow", "cargo_toml", "dirs-next", - "heck 0.4.1", + "glob", + "heck 0.5.0", "json-patch", + "schemars", "semver", "serde", "serde_json", - "tauri-utils 1.5.2", + "tauri-utils", "tauri-winres", + "toml 0.8.2", "walkdir", ] [[package]] name = "tauri-codegen" -version = "1.4.1" -source = "git+https://github.com/spacedriveapp/tauri.git?rev=8409af71a83d631ff9d1cd876c441a57511a1cbd#8409af71a83d631ff9d1cd876c441a57511a1cbd" +version = "2.0.0-beta.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b383f341efb803852b0235a2f330ca90c4c113f422dd6d646b888685b372cace" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "brotli", "ico", "json-patch", @@ -9876,78 +10441,201 @@ dependencies = [ "png", "proc-macro2", "quote", - "regex", "semver", "serde", "serde_json", "sha2 0.10.8", - "tauri-utils 1.5.1", + "syn 2.0.60", + "tauri-utils", "thiserror", "time", + "url", "uuid", "walkdir", ] [[package]] name = "tauri-macros" -version = "1.4.2" -source = "git+https://github.com/spacedriveapp/tauri.git?rev=8409af71a83d631ff9d1cd876c441a57511a1cbd#8409af71a83d631ff9d1cd876c441a57511a1cbd" +version = "2.0.0-beta.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71be71718cfe48b149507157bfbad0e2ba0e98ea51658be26c7c677eb188fb0c" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.60", "tauri-codegen", - "tauri-utils 1.5.1", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.0.0-beta.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6baaee0a083db1e04a1b7a3b0670d86a4d95dd2a54e7cbfb5547762b8ed098d9" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars", + "serde", + "serde_json", + "tauri-utils", + "toml 0.8.2", + "walkdir", +] + +[[package]] +name = "tauri-plugin-dialog" +version = "2.0.0-beta.6" +source = "git+https://github.com/tauri-apps/plugins-workspace?rev=1fa4d30eabb3768e1e97fa56f275408db2955b32#1fa4d30eabb3768e1e97fa56f275408db2955b32" +dependencies = [ + "dunce", + "log", + "raw-window-handle 0.6.1", + "rfd", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror", +] + +[[package]] +name = "tauri-plugin-fs" +version = "2.0.0-beta.6" +source = "git+https://github.com/tauri-apps/plugins-workspace?rev=1fa4d30eabb3768e1e97fa56f275408db2955b32#1fa4d30eabb3768e1e97fa56f275408db2955b32" +dependencies = [ + "anyhow", + "glob", + "schemars", + "serde", + "serde_json", + "serde_repr", + "tauri", + "tauri-plugin", + "thiserror", + "url", + "uuid", +] + +[[package]] +name = "tauri-plugin-os" +version = "2.0.0-beta.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dc0a2037ef113d9d9db85edceab6f95f83ae111e4d989d6bc1df79c8ab4cf" +dependencies = [ + "gethostname", + "log", + "os_info", + "serde", + "serde_json", + "serialize-to-javascript", + "sys-locale", + "tauri", + "tauri-plugin", + "thiserror", +] + +[[package]] +name = "tauri-plugin-shell" +version = "2.0.0-beta.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5624537650f627707f3bd9c6562efe2116c7fb043fcfc2e3d10f802d7870a1cd" +dependencies = [ + "encoding_rs", + "log", + "open", + "os_pipe", + "regex", + "schemars", + "serde", + "serde_json", + "shared_child", + "tauri", + "tauri-plugin", + "thiserror", +] + +[[package]] +name = "tauri-plugin-updater" +version = "2.0.0-beta.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f34be6851c7e84ca99b3bddd57e033d55d8bfca1dd153d6e8d18e9f1fb95469" +dependencies = [ + "base64 0.22.1", + "dirs-next", + "flate2", + "futures-util", + "http 1.1.0", + "minisign-verify", + "reqwest 0.12.4", + "semver", + "serde", + "serde_json", + "tar", + "tauri", + "tauri-plugin", + "tempfile", + "thiserror", + "time", + "tokio", + "url", + "windows-sys 0.52.0", + "zip", ] [[package]] name = "tauri-runtime" -version = "0.14.1" -source = "git+https://github.com/spacedriveapp/tauri.git?rev=8409af71a83d631ff9d1cd876c441a57511a1cbd#8409af71a83d631ff9d1cd876c441a57511a1cbd" +version = "2.0.0-beta.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "148b6e6aff8e63fe5d4ae1d50159d50cfc0b4309abdeca64833c887c6b5631ef" dependencies = [ + "dpi", "gtk", - "http", - "http-range", - "rand 0.8.5", - "raw-window-handle", + "http 1.1.0", + "jni", + "raw-window-handle 0.6.1", "serde", "serde_json", - "tauri-utils 1.5.1", + "tauri-utils", "thiserror", "url", - "uuid", - "webview2-com", - "windows 0.39.0", + "windows 0.56.0", ] [[package]] name = "tauri-runtime-wry" -version = "0.14.2" -source = "git+https://github.com/spacedriveapp/tauri.git?rev=8409af71a83d631ff9d1cd876c441a57511a1cbd#8409af71a83d631ff9d1cd876c441a57511a1cbd" +version = "2.0.0-beta.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "398d065c6e0fbf3c4304583759b6e153bc1e0daeb033bede6834ebe4df371fc3" dependencies = [ "cocoa", "gtk", + "http 1.1.0", + "jni", + "log", "percent-encoding", - "rand 0.8.5", - "raw-window-handle", + "raw-window-handle 0.6.1", + "softbuffer", + "tao", "tauri-runtime", - "tauri-utils 1.5.1", - "tracing", - "uuid", + "tauri-utils", + "url", "webkit2gtk", - "webview2-com", - "windows 0.39.0", + "webview2-com 0.30.0", + "windows 0.56.0", "wry", ] [[package]] name = "tauri-specta" -version = "2.0.0-rc.4" +version = "2.0.0-rc.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9c8e4e35bb01f7b53df4bd7f747626e45c67f41bf40b51a648c953ec779b5c" +checksum = "54fd66a6cdf8ca36aa44f9044510b449678e043056d84b551b4ff6ecb957364b" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "indoc", "serde", "serde_json", @@ -9959,26 +10647,28 @@ dependencies = [ [[package]] name = "tauri-specta-macros" -version = "2.0.0-rc.4" +version = "2.0.0-rc.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2098cb9333e5ae46629ef74ce89b2fce3978bdcaf9dea6dd0fcb1aca85934ddd" +checksum = "e6f9e90bf2012877e2c4029a1bf756277183e9c7c77b850ef965711553998012" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] name = "tauri-utils" -version = "1.5.1" -source = "git+https://github.com/spacedriveapp/tauri.git?rev=8409af71a83d631ff9d1cd876c441a57511a1cbd#8409af71a83d631ff9d1cd876c441a57511a1cbd" +version = "2.0.0-beta.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4709765385f035338ecc330f3fba753b8ee283c659c235da9768949cdb25469" dependencies = [ "brotli", + "cargo_metadata 0.18.1", "ctor", "dunce", "glob", - "heck 0.4.1", + "heck 0.5.0", "html5ever", "infer", "json-patch", @@ -9988,43 +10678,18 @@ dependencies = [ "phf 0.11.2", "proc-macro2", "quote", + "regex", + "schemars", "semver", "serde", "serde_json", "serde_with", + "swift-rs", "thiserror", + "toml 0.8.2", "url", + "urlpattern", "walkdir", - "windows-version", -] - -[[package]] -name = "tauri-utils" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece74810b1d3d44f29f732a7ae09a63183d63949bbdd59c61f8ed2a1b70150db" -dependencies = [ - "ctor", - "dunce", - "glob", - "heck 0.4.1", - "html5ever", - "infer", - "json-patch", - "kuchikiki", - "log", - "memchr", - "phf 0.11.2", - "proc-macro2", - "quote", - "semver", - "serde", - "serde_json", - "serde_with", - "thiserror", - "url", - "walkdir", - "windows-version", ] [[package]] @@ -10093,7 +10758,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -10225,7 +10890,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -10244,7 +10909,18 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.10", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", "tokio", ] @@ -10310,21 +10986,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", ] @@ -10344,9 +11020,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.2.1", "serde", @@ -10415,7 +11091,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -10541,6 +11217,26 @@ dependencies = [ "windows 0.44.0", ] +[[package]] +name = "tray-icon" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97ec55956c54569e74209ae9d29a7a79193b252d17a6ac28bcffd4c11a384ad" +dependencies = [ + "cocoa", + "core-graphics", + "crossbeam-channel", + "dirs-next", + "libappindicator", + "muda", + "objc", + "once_cell", + "png", + "serde", + "thiserror", + "windows-sys 0.52.0", +] + [[package]] name = "treediff" version = "4.0.2" @@ -10577,7 +11273,7 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 0.2.11", "httparse", "log", "rand 0.8.5", @@ -10648,6 +11344,47 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-ucd-ident" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + [[package]] name = "unicase" version = "2.7.0" @@ -10704,9 +11441,9 @@ checksum = "7d817255e1bed6dfd4ca47258685d14d2bdcfbc64fdc9e3819bd5848057b8ecc" [[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-vo" @@ -10778,10 +11515,10 @@ dependencies = [ "base64 0.21.7", "log", "once_cell", - "rustls", - "rustls-webpki", + "rustls 0.21.10", + "rustls-webpki 0.101.7", "url", - "webpki-roots", + "webpki-roots 0.25.3", ] [[package]] @@ -10802,6 +11539,19 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "urlpattern" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609" +dependencies = [ + "derive_more", + "regex", + "serde", + "unic-ucd-ident", + "url", +] + [[package]] name = "user-facing-error-macros" version = "0.1.0" @@ -10906,12 +11656,6 @@ dependencies = [ "piston-float", ] -[[package]] -name = "version-compare" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" - [[package]] name = "version-compare" version = "0.1.1" @@ -11026,7 +11770,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", "wasm-bindgen-shared", ] @@ -11060,7 +11804,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -11084,6 +11828,30 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wayland-sys" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" +dependencies = [ + "dlib", + "log", + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.66" @@ -11096,9 +11864,9 @@ dependencies = [ [[package]] name = "webkit2gtk" -version = "0.18.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" +checksum = "76b1bc1e54c581da1e9f179d0b38512ba358fb1af2d634a1affe42e37172361a" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -11114,20 +11882,18 @@ dependencies = [ "javascriptcore-rs", "libc", "once_cell", - "soup2", + "soup3", "webkit2gtk-sys", ] [[package]] name = "webkit2gtk-sys" -version = "0.18.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" +checksum = "62daa38afc514d1f8f12b8693d30d5993ff77ced33ce30cd04deebc267a6d57c" dependencies = [ - "atk-sys", "bitflags 1.3.2", "cairo-sys-rs", - "gdk-pixbuf-sys", "gdk-sys", "gio-sys", "glib-sys", @@ -11135,10 +11901,9 @@ dependencies = [ "gtk-sys", "javascriptcore-rs-sys", "libc", - "pango-sys", "pkg-config", - "soup2-sys", - "system-deps 6.2.0", + "soup3-sys", + "system-deps", ] [[package]] @@ -11157,16 +11922,39 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +[[package]] +name = "webpki-roots" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webview2-com" version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4a769c9f1a64a8734bde70caafac2b96cada12cd4aefa49196b3a386b8b4178" dependencies = [ - "webview2-com-macros", - "webview2-com-sys", + "webview2-com-macros 0.6.0", + "webview2-com-sys 0.19.0", "windows 0.39.0", - "windows-implement", + "windows-implement 0.39.0", +] + +[[package]] +name = "webview2-com" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c914dd492a52f0377bef56fd1b6e74a79090f9ee631d625d5b505a00e4538b6" +dependencies = [ + "webview2-com-macros 0.7.0", + "webview2-com-sys 0.30.0", + "windows 0.56.0", + "windows-core 0.56.0", + "windows-implement 0.56.0", + "windows-interface", ] [[package]] @@ -11180,6 +11968,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "webview2-com-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "webview2-com-sys" version = "0.19.0" @@ -11195,6 +11994,17 @@ dependencies = [ "windows-metadata", ] +[[package]] +name = "webview2-com-sys" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a46bcf03482ec28eeb764ca788f67998cde4213adfbbfa90462622058530f5e" +dependencies = [ + "thiserror", + "windows 0.56.0", + "windows-core 0.56.0", +] + [[package]] name = "weezl" version = "0.1.7" @@ -11251,16 +12061,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.37.0" +name = "window-vibrancy" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" +checksum = "33082acd404763b315866e14a0d5193f3422c81086657583937a750cdd3ec340" dependencies = [ - "windows_aarch64_msvc 0.37.0", - "windows_i686_gnu 0.37.0", - "windows_i686_msvc 0.37.0", - "windows_x86_64_gnu 0.37.0", - "windows_x86_64_msvc 0.37.0", + "cocoa", + "objc", + "raw-window-handle 0.6.1", + "windows-sys 0.52.0", + "windows-version", ] [[package]] @@ -11269,7 +12079,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" dependencies = [ - "windows-implement", + "windows-implement 0.39.0", "windows_aarch64_msvc 0.39.0", "windows_i686_gnu 0.39.0", "windows_i686_msvc 0.39.0", @@ -11301,10 +12111,20 @@ version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ - "windows-core", + "windows-core 0.51.1", "windows-targets 0.48.5", ] +[[package]] +name = "windows" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +dependencies = [ + "windows-core 0.56.0", + "windows-targets 0.52.5", +] + [[package]] name = "windows-bindgen" version = "0.39.0" @@ -11324,6 +12144,18 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-core" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" +dependencies = [ + "windows-implement 0.56.0", + "windows-interface", + "windows-result", + "windows-targets 0.52.5", +] + [[package]] name = "windows-implement" version = "0.39.0" @@ -11334,6 +12166,28 @@ dependencies = [ "windows-tokens", ] +[[package]] +name = "windows-implement" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "windows-interface" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", +] + [[package]] name = "windows-metadata" version = "0.39.0" @@ -11341,18 +12195,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" [[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-result" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.52.5", ] [[package]] @@ -11379,7 +12227,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -11414,17 +12262,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -11439,7 +12288,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75aa004c988e080ad34aff5739c39d0312f4684699d6d71fc8a198d057b8b9b4" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -11456,15 +12305,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -11486,15 +12329,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -11516,15 +12353,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] -name = "windows_i686_msvc" -version = "0.37.0" +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -11546,15 +12383,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -11576,9 +12407,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -11594,15 +12425,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -11624,9 +12449,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" @@ -11658,42 +12483,55 @@ dependencies = [ ] [[package]] -name = "wry" -version = "0.24.7" +name = "winreg" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad85d0e067359e409fcb88903c3eac817c392e5d638258abfb3da5ad8ba6fc4" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "base64 0.13.1", + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wry" +version = "0.39.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e180ac2740d6cb4d5cec0abf63eacbea90f1b7e5e3803043b13c1c84c4b7884" +dependencies = [ + "base64 0.22.1", "block", "cocoa", "core-graphics", "crossbeam-channel", + "dpi", "dunce", - "gdk", - "gio", - "glib", + "gdkx11", "gtk", "html5ever", - "http", + "http 1.1.0", + "javascriptcore-rs", + "jni", "kuchikiki", "libc", - "log", + "ndk", + "ndk-context", + "ndk-sys", "objc", "objc_id", "once_cell", - "serde", - "serde_json", + "percent-encoding", + "raw-window-handle 0.6.1", "sha2 0.10.8", - "soup2", - "tao", + "soup3", + "tao-macros", "thiserror", - "tracing", - "url", "webkit2gtk", "webkit2gtk-sys", - "webview2-com", - "windows 0.39.0", - "windows-implement", + "webview2-com 0.30.0", + "windows 0.56.0", + "windows-core 0.56.0", + "windows-version", + "x11-dl", ] [[package]] @@ -11845,15 +12683,14 @@ dependencies = [ [[package]] name = "zbus" -version = "3.15.2" +version = "3.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" +checksum = "5acecd3f8422f198b1a2f954bcc812fe89f3fa4281646f3da1da7925db80085d" dependencies = [ - "async-broadcast", - "async-process", + "async-broadcast 0.5.1", + "async-process 1.8.1", "async-recursion", "async-trait", - "blocking", "byteorder", "derivative", "enumflags2", @@ -11875,18 +12712,67 @@ dependencies = [ "uds_windows", "winapi", "xdg-home", - "zbus_macros", - "zbus_names", - "zvariant", + "zbus_macros 3.15.1", + "zbus_names 2.6.1", + "zvariant 3.15.1", +] + +[[package]] +name = "zbus" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" +dependencies = [ + "async-broadcast 0.7.0", + "async-process 2.2.2", + "async-recursion", + "async-trait", + "blocking", + "derivative", + "enumflags2", + "event-listener 5.3.0", + "futures-core", + "futures-sink", + "futures-util", + "hex", + "nix 0.27.1", + "ordered-stream", + "rand 0.8.5", + "serde", + "serde_repr", + "sha1", + "static_assertions", + "tokio", + "tracing", + "uds_windows", + "windows-sys 0.52.0", + "xdg-home", + "zbus_macros 4.0.1", + "zbus_names 3.0.0", + "zvariant 4.0.0", ] [[package]] name = "zbus_macros" -version = "3.15.2" +version = "3.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" +checksum = "2207eb71efebda17221a579ca78b45c4c5f116f074eb745c3a172e688ccf89f5" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "regex", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zbus_macros" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" +dependencies = [ + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "regex", @@ -11902,7 +12788,18 @@ checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d" dependencies = [ "serde", "static_assertions", - "zvariant", + "zvariant 3.15.1", +] + +[[package]] +name = "zbus_names" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" +dependencies = [ + "serde", + "static_assertions", + "zvariant 4.0.0", ] [[package]] @@ -11931,7 +12828,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -11942,7 +12839,7 @@ checksum = "157bd6b2f5a6f8e2b1b1e5b427aec8d2c085f9ab99c92eaa0ca79b9b84c11254" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -11962,7 +12859,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.60", ] [[package]] @@ -11971,9 +12868,47 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ + "aes 0.8.3", "byteorder", + "bzip2", + "constant_time_eq 0.1.5", "crc32fast", "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", ] [[package]] @@ -11987,25 +12922,52 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.2" +version = "3.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" +checksum = "c5b4fcf3660d30fc33ae5cd97e2017b23a96e85afd7a1dd014534cd0bf34ba67" dependencies = [ "byteorder", "enumflags2", "libc", "serde", "static_assertions", - "zvariant_derive", + "zvariant_derive 3.15.1", +] + +[[package]] +name = "zvariant" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" +dependencies = [ + "endi", + "enumflags2", + "serde", + "static_assertions", + "url", + "zvariant_derive 4.0.0", ] [[package]] name = "zvariant_derive" -version = "3.15.2" +version = "3.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" +checksum = "0277758a8a0afc0e573e80ed5bfd9d9c2b48bd3108ffe09384f9f738c83f4a55" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" +dependencies = [ + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -12014,9 +12976,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 1f0cfbacd..f2bf7d1bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,19 +21,19 @@ repository = "https://github.com/spacedriveapp/spacedrive" [workspace.dependencies] # First party dependencies -prisma-client-rust = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "f99d6f5566570f3ab1edecb7a172ad25b03d95af", features = [ +prisma-client-rust = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "d6f6b224b874fad904bb17b81cf2e570c6003ac9", features = [ "specta", "sqlite-create-many", "migrations", "sqlite", ], default-features = false } -prisma-client-rust-cli = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "f99d6f5566570f3ab1edecb7a172ad25b03d95af", features = [ +prisma-client-rust-cli = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "d6f6b224b874fad904bb17b81cf2e570c6003ac9", features = [ "specta", "sqlite-create-many", "migrations", "sqlite", ], default-features = false } -prisma-client-rust-sdk = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "f99d6f5566570f3ab1edecb7a172ad25b03d95af", features = [ +prisma-client-rust-sdk = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "d6f6b224b874fad904bb17b81cf2e570c6003ac9", features = [ "sqlite", ], default-features = false } @@ -42,12 +42,11 @@ tracing-subscriber = "0.3.18" tracing-appender = "0.2.3" rspc = { version = "0.1.4" } -specta = { version = "=2.0.0-rc.7" } -tauri-specta = { version = "=2.0.0-rc.4" } +specta = { version = "=2.0.0-rc.11" } +tauri-specta = { version = "=2.0.0-rc.8" } swift-rs = { version = "1.0.6" } - # Third party dependencies used by one or more of our crates anyhow = "1.0.75" async-channel = "2.0.0" @@ -96,11 +95,7 @@ tracing-test = { version = "^0.2.4" } if-watch = { git = "https://github.com/oscartbeaumont/if-watch.git", rev = "a92c17d3f85c1c6fb0afeeaf6c2b24d0b147e8c3" } # We hack it to the high heavens -rspc = { git = "https://github.com/spacedriveapp/rspc.git", rev = "f3347e2e8bfe3f37bfacc437ca329fe71cdcb048" } - -# `cursor_position` method -tauri = { git = "https://github.com/spacedriveapp/tauri.git", rev = "8409af71a83d631ff9d1cd876c441a57511a1cbd" } -tao = { git = "https://github.com/spacedriveapp/tao", rev = "7880adbc090402c44fbcf006669458fa82623403" } +rspc = { git = "https://github.com/spacedriveapp/rspc.git", rev = "ab12964b140991e0730c3423693533fba71efb03" } # Add `Control::open_stream_with_addrs` libp2p = { git = "https://github.com/spacedriveapp/rust-libp2p.git", rev = "a005656df7e82059a0eb2e333ebada4731d23f8c" } diff --git a/apps/desktop/crates/linux/Cargo.toml b/apps/desktop/crates/linux/Cargo.toml index d551fa03d..2577f13d8 100644 --- a/apps/desktop/crates/linux/Cargo.toml +++ b/apps/desktop/crates/linux/Cargo.toml @@ -11,5 +11,5 @@ libc = "0.2" [target.'cfg(target_os = "linux")'.dependencies] # WARNING: gtk should follow the same version used by tauri -# https://github.com/tauri-apps/tauri/blob/441eb4f4a5f9af206752c2e287975eb8d5ccfd01/core/tauri/Cargo.toml#L95 -gtk = { version = "0.15", features = [ "v3_20" ] } +# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-beta.17/core/tauri/Cargo.toml#L85C1-L85C51 +gtk = { version = "0.18", features = [ "v3_24" ] } diff --git a/apps/desktop/package.json b/apps/desktop/package.json index d815a0594..c61bf70c4 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -20,7 +20,10 @@ "@sd/ui": "workspace:*", "@t3-oss/env-core": "^0.7.1", "@tanstack/react-query": "^4.36.1", - "@tauri-apps/api": "1.5.1", + "@tauri-apps/api": "next", + "@tauri-apps/plugin-dialog": "2.0.0-beta.2", + "@tauri-apps/plugin-os": "2.0.0-beta.2", + "@tauri-apps/plugin-shell": "2.0.0-beta.2", "consistent-hash": "^1.2.2", "immer": "^10.0.3", "react": "^18.2.0", @@ -31,7 +34,7 @@ "devDependencies": { "@sd/config": "workspace:*", "@sentry/vite-plugin": "^2.16.0", - "@tauri-apps/cli": "^1.5.11", + "@tauri-apps/cli": "next", "@types/react": "^18.2.67", "@types/react-dom": "^18.2.22", "sass": "^1.72.0", diff --git a/apps/desktop/src-tauri/.gitignore b/apps/desktop/src-tauri/.gitignore index 1edb8fac3..742fd18b6 100644 --- a/apps/desktop/src-tauri/.gitignore +++ b/apps/desktop/src-tauri/.gitignore @@ -1,6 +1,7 @@ # Generated by Cargo # will have compiled files and executables /target/ +gen/ WixTools *.dll *.dll.* diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index d3ce7ac66..f3774f351 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -28,26 +28,25 @@ tracing = { workspace = true } tauri-specta = { workspace = true, features = ["typescript"] } uuid = { workspace = true, features = ["serde"] } thiserror.workspace = true +directories = "5.0.1" opener = { version = "0.6.1", features = ["reveal"] } -tauri = { version = "=1.5.3", features = [ +tauri = { version = "=2.0.0-beta.17", features = [ "macos-private-api", - "path-all", - "protocol-all", - "os-all", - "shell-all", - "dialog-all", - "linux-protocol-headers", - "updater", - "window-all", - "native-tls-vendored", - "tracing", + "unstable", + "linux-libxdo", ] } -directories = "5.0.1" +tauri-plugin-updater = "2.0.0-beta" +tauri-plugin-dialog = { git = "https://github.com/tauri-apps/plugins-workspace", rev = "1fa4d30eabb3768e1e97fa56f275408db2955b32" } # "2.0.0-beta" +tauri-plugin-os = "2.0.0-beta" +tauri-plugin-shell = "2.0.0-beta" +serde_json.workspace = true +strum = { workspace = true, features = ["derive"] } [target.'cfg(target_os = "linux")'.dependencies] sd-desktop-linux = { path = "../crates/linux" } -webkit2gtk = { version = "0.18.2", features = ["v2_2"] } +# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-beta.17/core/tauri/Cargo.toml#L86 +webkit2gtk = { version = "=2.0.1", features = ["v2_38"] } [target.'cfg(target_os = "macos")'.dependencies] sd-desktop-macos = { path = "../crates/macos" } @@ -57,9 +56,10 @@ sd-desktop-windows = { path = "../crates/windows" } webview2-com = "0.19.1" [build-dependencies] -tauri-build = "1.5.0" +tauri-build = "=2.0.0-beta.13" [features] default = ["custom-protocol"] +devtools = ["tauri/devtools"] ai-models = ["sd-core/ai"] custom-protocol = ["tauri/custom-protocol"] diff --git a/apps/desktop/src-tauri/capabilities/default.json b/apps/desktop/src-tauri/capabilities/default.json new file mode 100644 index 000000000..65d3ed05b --- /dev/null +++ b/apps/desktop/src-tauri/capabilities/default.json @@ -0,0 +1,21 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "Capability for the main window", + "windows": ["main"], + "permissions": [ + "path:default", + "event:default", + "window:default", + "app:default", + "image:default", + "resources:default", + "menu:default", + "tray:default", + "webview:default", + "webview:allow-internal-toggle-devtools", + "os:allow-os-type", + "window:allow-start-dragging", + "dialog:allow-open" + ] +} diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs index aaaed1dbf..e879d6c1c 100644 --- a/apps/desktop/src-tauri/src/main.rs +++ b/apps/desktop/src-tauri/src/main.rs @@ -3,25 +3,17 @@ windows_subsystem = "windows" )] -use std::{ - collections::HashMap, - fs, - path::PathBuf, - process::Command, - sync::{Arc, Mutex, PoisonError}, - time::Duration, -}; +use std::{fs, path::PathBuf, process::Command, sync::Arc, time::Duration}; +use menu::{set_enabled, MenuEvent}; use sd_core::{Node, NodeError}; use sd_fda::DiskAccess; use serde::{Deserialize, Serialize}; -use tauri::{ - api::path, ipc::RemoteDomainAccessScope, window::PlatformWebview, AppHandle, FileDropEvent, - Manager, Window, WindowEvent, -}; +use tauri::{async_runtime::block_on, webview::PlatformWebview, AppHandle, Manager, WindowEvent}; use tauri_plugins::{sd_error_plugin, sd_server_plugin}; -use tauri_specta::{collect_events, ts, Event}; +use tauri_specta::{collect_events, ts}; +use tokio::task::block_in_place; use tokio::time::sleep; use tracing::error; @@ -34,7 +26,7 @@ mod updater; #[tauri::command(async)] #[specta::specta] async fn app_ready(app_handle: AppHandle) { - let window = app_handle.get_window("main").unwrap(); + let window = app_handle.get_webview_window("main").unwrap(); window.show().unwrap(); } @@ -47,22 +39,19 @@ async fn request_fda_macos() { #[tauri::command(async)] #[specta::specta] -async fn set_menu_bar_item_state(_window: tauri::Window, _id: String, _enabled: bool) { - #[cfg(target_os = "macos")] - { - _window - .menu_handle() - .get_item(&_id) - .set_enabled(_enabled) - .expect("Unable to modify menu item"); - } +async fn set_menu_bar_item_state(window: tauri::Window, event: MenuEvent, enabled: bool) { + let menu = window + .menu() + .expect("unable to get menu for current window"); + + set_enabled(&menu, event, enabled); } #[tauri::command(async)] #[specta::specta] async fn reload_webview(app_handle: AppHandle) { app_handle - .get_window("main") + .get_webview_window("main") .expect("Error getting window handle") .with_webview(reload_webview_inner) .expect("Error while reloading webview"); @@ -77,7 +66,7 @@ fn reload_webview_inner(webview: PlatformWebview) { } #[cfg(target_os = "linux")] { - use webkit2gtk::traits::WebViewExt; + use webkit2gtk::WebViewExt; webview.inner().reload(); } @@ -95,8 +84,10 @@ fn reload_webview_inner(webview: PlatformWebview) { #[tauri::command(async)] #[specta::specta] async fn reset_spacedrive(app_handle: AppHandle) { - let data_dir = path::data_dir() - .unwrap_or_else(|| PathBuf::from("./")) + let data_dir = app_handle + .path() + .data_dir() + .unwrap_or_else(|_| PathBuf::from("./")) .join("spacedrive"); #[cfg(debug_assertions)] @@ -112,25 +103,9 @@ async fn reset_spacedrive(app_handle: AppHandle) { #[tauri::command(async)] #[specta::specta] -async fn refresh_menu_bar( - _node: tauri::State<'_, Arc>, - _app_handle: AppHandle, -) -> Result<(), ()> { - #[cfg(target_os = "macos")] - { - let menu_handles: Vec = _app_handle - .windows() - .iter() - .map(|x| x.1.menu_handle()) - .collect(); - - let has_library = !_node.libraries.get_all().await.is_empty(); - - for menu in menu_handles { - menu::set_library_locked_menu_items_enabled(menu, has_library); - } - } - +async fn refresh_menu_bar(node: tauri::State<'_, Arc>, app: AppHandle) -> Result<(), ()> { + let has_library = !node.libraries.get_all().await.is_empty(); + menu::refresh_menu_bar(&app, has_library); Ok(()) } @@ -199,11 +174,6 @@ pub enum DragAndDropEvent { Cancelled, } -#[derive(Default)] -pub struct DragAndDropState { - windows: HashMap>, -} - const CLIENT_ID: &str = "2abb241e-40b8-4517-a3e3-5594375c8fbb"; #[tokio::main] @@ -211,46 +181,8 @@ async fn main() -> tauri::Result<()> { #[cfg(target_os = "linux")] sd_desktop_linux::normalize_environment(); - let data_dir = path::data_dir() - .unwrap_or_else(|| PathBuf::from("./")) - .join("spacedrive"); - - #[cfg(debug_assertions)] - let data_dir = data_dir.join("dev"); - - // The `_guard` must be assigned to variable for flushing remaining logs on main exit through Drop - let (_guard, result) = match Node::init_logger(&data_dir) { - Ok(guard) => ( - Some(guard), - Node::new(data_dir, sd_core::Env::new(CLIENT_ID)).await, - ), - Err(err) => (None, Err(NodeError::Logger(err))), - }; - - let app = tauri::Builder::default(); - - let (node_router, app) = match result { - Ok((node, router)) => (Some((node, router)), app), - Err(err) => { - error!("Error starting up the node: {err:#?}"); - (None, app.plugin(sd_error_plugin(err))) - } - }; - - let (node, router) = node_router.expect("Unable to get the node or router"); - - let should_clear_localstorage = node.libraries.get_all().await.is_empty(); - - let app = app - .plugin(rspc::integrations::tauri::plugin(router, { - let node = node.clone(); - move || node.clone() - })) - .plugin(sd_server_plugin(node.clone()).await.unwrap()) // TODO: Handle `unwrap` - .manage(node.clone()); - - let specta_builder = { - let specta_builder = ts::builder() + let (invoke_handler, register_events) = { + let builder = ts::builder() .events(collect_events![DragAndDropEvent]) .commands(tauri_specta::collect_commands![ app_ready, @@ -269,224 +201,145 @@ async fn main() -> tauri::Result<()> { file::open_ephemeral_file_with, file::reveal_items, theme::lock_app_theme, - // TODO: move to plugin w/tauri-specta updater::check_for_update, updater::install_update ]) .config(specta::ts::ExportConfig::default().formatter(specta::ts::formatter::prettier)); #[cfg(debug_assertions)] - let specta_builder = specta_builder.path("../src/commands.ts"); + let builder = builder.path("../src/commands.ts"); - specta_builder.into_plugin() + builder.build().unwrap() }; - let file_drop_status = Arc::new(Mutex::new(DragAndDropState::default())); - let app = app - .plugin(updater::plugin()) - // .plugin(tauri_plugin_window_state::Builder::default().build()) - .plugin(specta_builder) + tauri::Builder::default() + .invoke_handler(invoke_handler) .setup(move |app| { - let app = app.handle(); + // We need a the app handle to determine the data directory now. + // This means all the setup code has to be within `setup`, however it doesn't support async so we `block_on`. + block_in_place(|| { + block_on(async move { + register_events(app); - println!("setup"); + let data_dir = app + .path() + .data_dir() + .unwrap_or_else(|_| PathBuf::from("./")) + .join("spacedrive"); - app.windows().iter().for_each(|(_, window)| { - if should_clear_localstorage { - println!("bruh?"); - window.eval("localStorage.clear();").ok(); - } + #[cfg(debug_assertions)] + let data_dir = data_dir.join("dev"); - tokio::spawn({ - let window = window.clone(); - async move { - sleep(Duration::from_secs(3)).await; - if !window.is_visible().unwrap_or(true) { - // This happens if the JS bundle crashes and hence doesn't send ready event. - println!( - "Window did not emit `app_ready` event fast enough. Showing window..." - ); - window.show().expect("Main window should show"); + // The `_guard` must be assigned to variable for flushing remaining logs on main exit through Drop + let (_guard, result) = match Node::init_logger(&data_dir) { + Ok(guard) => ( + Some(guard), + Node::new(data_dir, sd_core::Env::new(CLIENT_ID)).await, + ), + Err(err) => (None, Err(NodeError::Logger(err))), + }; + + let handle = app.handle(); + let (node, router) = match result { + Ok(r) => r, + Err(err) => { + error!("Error starting up the node: {err:#?}"); + handle.plugin(sd_error_plugin(err))?; + return Ok(()); } - } - }); + }; - #[cfg(target_os = "windows")] - window.set_decorations(true).unwrap(); + let should_clear_localstorage = node.libraries.get_all().await.is_empty(); - #[cfg(target_os = "macos")] - { - use sd_desktop_macos::{blur_window_background, set_titlebar_style}; + handle.plugin(rspc::integrations::tauri::plugin(router, { + let node = node.clone(); + move || node.clone() + }))?; + handle.plugin(sd_server_plugin(node.clone(), handle).await.unwrap())?; // TODO: Handle `unwrap` + handle.manage(node.clone()); - let nswindow = window.ns_window().unwrap(); - - unsafe { set_titlebar_style(&nswindow, false) }; - unsafe { blur_window_background(&nswindow) }; - - tokio::spawn({ - let libraries = node.libraries.clone(); - let menu_handle = window.menu_handle(); - async move { - if libraries.get_all().await.is_empty() { - menu::set_library_locked_menu_items_enabled(menu_handle, false); + handle.windows().iter().for_each(|(_, window)| { + if should_clear_localstorage { + println!("bruh?"); + for webview in window.webviews() { + webview.eval("localStorage.clear();").ok(); } } + + tokio::spawn({ + let window = window.clone(); + async move { + sleep(Duration::from_secs(3)).await; + if !window.is_visible().unwrap_or(true) { + // This happens if the JS bundle crashes and hence doesn't send ready event. + println!( + "Window did not emit `app_ready` event fast enough. Showing window..." + ); + window.show().expect("Main window should show"); + } + } + }); + + #[cfg(target_os = "windows")] + window.set_decorations(true).unwrap(); + + #[cfg(target_os = "macos")] + { + use sd_desktop_macos::{blur_window_background, set_titlebar_style}; + + let nswindow = window.ns_window().unwrap(); + + unsafe { set_titlebar_style(&nswindow, false) }; + unsafe { blur_window_background(&nswindow) }; + } }); - } - }); - // Configure IPC for custom protocol - app.ipc_scope().configure_remote_access( - RemoteDomainAccessScope::new("localhost") - .allow_on_scheme("spacedrive") - .add_window("main"), - ); - - Ok(()) + Ok(()) + }) + }) }) - .on_menu_event(menu::handle_menu_event) - .on_window_event(move |event| match event.event() { + .on_window_event(move |window, event| match event { // macOS expected behavior is for the app to not exit when the main window is closed. // Instead, the window is hidden and the dock icon remains so that on user click it should show the window again. #[cfg(target_os = "macos")] WindowEvent::CloseRequested { api, .. } => { // TODO: make this multi-window compatible in the future - event - .window() + window .app_handle() .hide() .expect("Window should hide on macOS"); api.prevent_close(); } - WindowEvent::FileDrop(drop) => { - let window = event.window(); - let mut file_drop_status = file_drop_status - .lock() - .unwrap_or_else(PoisonError::into_inner); - - match drop { - FileDropEvent::Hovered(paths) => { - // Look this shouldn't happen but let's be sure we don't leak threads. - if file_drop_status.windows.contains_key(window) { - return; - } - - // We setup a thread to keep emitting the updated position of the cursor - // It will be killed when the `FileDropEvent` is finished or cancelled. - let paths = paths.clone(); - file_drop_status.windows.insert(window.clone(), { - let window = window.clone(); - tokio::spawn(async move { - let (mut last_x, mut last_y) = (0.0, 0.0); - loop { - let (x, y) = mouse_position(&window); - - let x_diff = difference(x, last_x); - let y_diff = difference(y, last_y); - - // If the mouse hasn't moved much we will "debounce" the event - if x_diff > 28.0 || y_diff > 28.0 { - last_x = x; - last_y = y; - - DragAndDropEvent::Hovered { - paths: paths - .iter() - .filter_map(|x| x.to_str().map(|x| x.to_string())) - .collect(), - x, - y, - } - .emit(&window) - .ok(); - } - - sleep(Duration::from_millis(125)).await; - } - }) - }); - } - FileDropEvent::Dropped(paths) => { - if let Some(handle) = file_drop_status.windows.remove(window) { - handle.abort(); - } - - let (x, y) = mouse_position(window); - DragAndDropEvent::Dropped { - paths: paths - .iter() - .filter_map(|x| x.to_str().map(|x| x.to_string())) - .collect(), - x, - y, - } - .emit(window) - .ok(); - } - FileDropEvent::Cancelled => { - if let Some(handle) = file_drop_status.windows.remove(window) { - handle.abort(); - } - - DragAndDropEvent::Cancelled.emit(window).ok(); - } - _ => unreachable!(), - } - } WindowEvent::Resized(_) => { - let (_state, command) = if event - .window() - .is_fullscreen() - .expect("Can't get fullscreen state") - { - (true, "window_fullscreened") - } else { - (false, "window_not_fullscreened") - }; + let (_state, command) = + if window.is_fullscreen().expect("Can't get fullscreen state") { + (true, "window_fullscreened") + } else { + (false, "window_not_fullscreened") + }; - event - .window() + window .emit("keybind", command) .expect("Unable to emit window event"); #[cfg(target_os = "macos")] { - let nswindow = event.window().ns_window().unwrap(); + let nswindow = window.ns_window().unwrap(); unsafe { sd_desktop_macos::set_titlebar_style(&nswindow, _state) }; } } _ => {} }) - .menu(menu::get_menu()) + .menu(menu::setup_menu) + .plugin(tauri_plugin_dialog::init()) + .plugin(tauri_plugin_os::init()) + .plugin(tauri_plugin_shell::init()) + // TODO: Bring back Tauri Plugin Window State - it was buggy so we removed it. + .plugin(tauri_plugin_updater::Builder::new().build()) + .plugin(updater::plugin()) .manage(updater::State::default()) - .build(tauri::generate_context!())?; + .build(tauri::generate_context!())? + .run(|_, _| {}); - app.run(|_, _| {}); Ok(()) } - -// Get the mouse position relative to the window -fn mouse_position(window: &Window) -> (f64, f64) { - // We apply the OS scaling factor. - // Tauri/Webkit *should* be responsible for this but it would seem it is bugged on the current webkit/tauri/wry/tao version. - // Using newer Webkit did fix this automatically but I can't for the life of me work out how to get the right glibc versions in CI so we can't ship it. - let scale_factor = window.scale_factor().unwrap(); - - let window_pos = window.outer_position().unwrap(); - let cursor_pos = window.cursor_position().unwrap(); - - ( - (cursor_pos.x - window_pos.x as f64) / scale_factor, - (cursor_pos.y - window_pos.y as f64) / scale_factor, - ) -} - -// The distance between two numbers as a positive integer. -fn difference(a: f64, b: f64) -> f64 { - let x = a - b; - if x < 0.0 { - x * -1.0 - } else { - x - } -} diff --git a/apps/desktop/src-tauri/src/menu.rs b/apps/desktop/src-tauri/src/menu.rs index 3f4e35ae1..307deba89 100644 --- a/apps/desktop/src-tauri/src/menu.rs +++ b/apps/desktop/src-tauri/src/menu.rs @@ -1,191 +1,276 @@ -use tauri::{Manager, Menu, WindowMenuEvent, Wry}; +use std::str::FromStr; -#[cfg(target_os = "macos")] -use tauri::{AboutMetadata, CustomMenuItem, MenuItem, Submenu}; +use serde::Deserialize; +use specta::Type; +use strum::{AsRefStr, EnumString}; +use tauri::{ + menu::{Menu, MenuItemKind}, + AppHandle, Manager, Wry, +}; +use tracing::error; -pub fn get_menu() -> Menu { - #[cfg(target_os = "macos")] - { - custom_menu_bar() - } - #[cfg(not(target_os = "macos"))] - { - Menu::new() +#[derive(Debug, Clone, Copy, EnumString, AsRefStr, Type, Deserialize)] +pub enum MenuEvent { + NewLibrary, + NewFile, + NewDirectory, + AddLocation, + OpenOverview, + OpenSearch, + OpenSettings, + ReloadExplorer, + SetLayoutGrid, + SetLayoutList, + SetLayoutMedia, + ToggleDeveloperTools, + NewWindow, + ReloadWebview, +} + +impl ToString for MenuEvent { + fn to_string(&self) -> String { + self.as_ref().to_string() } } -// update this whenever you add something which requires a valid library to use -#[cfg(target_os = "macos")] -const LIBRARY_LOCKED_MENU_IDS: [&str; 12] = [ - "new_window", - "open_overview", - "open_search", - "open_settings", - "reload_explorer", - "layout_grid", - "layout_list", - "layout_media", - "new_file", - "new_directory", - "new_library", // disabled because the first one should at least be done via onboarding - "add_location", +/// Menu items which require a library to be open to use. +/// They will be disabled/enabled automatically. +const LIBRARY_LOCKED_MENU_IDS: &[MenuEvent] = &[ + MenuEvent::NewWindow, + MenuEvent::OpenOverview, + MenuEvent::OpenSearch, + MenuEvent::OpenSettings, + MenuEvent::ReloadExplorer, + MenuEvent::SetLayoutGrid, + MenuEvent::SetLayoutList, + MenuEvent::SetLayoutMedia, + MenuEvent::NewFile, + MenuEvent::NewDirectory, + MenuEvent::NewLibrary, + MenuEvent::AddLocation, ]; -#[cfg(target_os = "macos")] -fn custom_menu_bar() -> Menu { - let app_menu = Menu::new() - .add_native_item(MenuItem::About( - "Spacedrive".to_string(), - AboutMetadata::new() - .authors(vec!["Spacedrive Technology Inc.".to_string()]) - .license("AGPL-3.0-only") - .version(env!("CARGO_PKG_VERSION")) - .website("https://spacedrive.com/") - .website_label("Spacedrive.com"), - )) - .add_native_item(MenuItem::Separator) - .add_item(CustomMenuItem::new("new_library", "New Library").disabled()) // TODO(brxken128): add keybind handling here - .add_submenu(Submenu::new( - "Library", - Menu::new() - .add_item(CustomMenuItem::new("library_", "Library 1").disabled()) - .add_item(CustomMenuItem::new("library_", "Library 2").disabled()), // TODO: enumerate libraries and make this a library selector - )) - .add_native_item(MenuItem::Separator) - .add_native_item(MenuItem::Hide) - .add_native_item(MenuItem::HideOthers) - .add_native_item(MenuItem::ShowAll) - .add_native_item(MenuItem::Separator) - .add_native_item(MenuItem::Quit); +pub fn setup_menu(app: &AppHandle) -> tauri::Result> { + app.on_menu_event(move |app, event| { + if let Ok(event) = MenuEvent::from_str(&event.id().0) { + handle_menu_event(event, app); + } else { + println!("Unknown menu event: {}", event.id().0); + } + }); - let file_menu = Menu::new() - .add_item( - CustomMenuItem::new("new_file", "New File") - .accelerator("CmdOrCtrl+N") - .disabled(), // TODO(brxken128): add keybind handling here - ) - .add_item( - CustomMenuItem::new("new_directory", "New Directory") - .accelerator("CmdOrCtrl+D") - .disabled(), // TODO(brxken128): add keybind handling here - ) - .add_item(CustomMenuItem::new("add_location", "Add Location").disabled()); // TODO(brxken128): add keybind handling here; + #[cfg(not(target_os = "macos"))] + { + Menu::new(app) + } + #[cfg(target_os = "macos")] + { + use tauri::menu::{AboutMetadataBuilder, MenuBuilder, MenuItemBuilder, SubmenuBuilder}; - let edit_menu = Menu::new() - .add_native_item(MenuItem::Separator) - .add_native_item(MenuItem::Copy) - .add_native_item(MenuItem::Cut) - .add_native_item(MenuItem::Paste) - .add_native_item(MenuItem::Redo) - .add_native_item(MenuItem::Undo) - .add_native_item(MenuItem::SelectAll); + let app_menu = SubmenuBuilder::new(app, "Spacedrive") + .about(Some( + AboutMetadataBuilder::new() + .authors(Some(vec!["Spacedrive Technology Inc.".to_string()])) + .license(Some(env!("CARGO_PKG_VERSION"))) + .version(Some(env!("CARGO_PKG_VERSION"))) + .website(Some("https://spacedrive.com/")) + .website_label(Some("Spacedrive.com")) + .build(), + )) + .separator() + .item( + &MenuItemBuilder::with_id(MenuEvent::NewLibrary, "New Library") + .accelerator("Cmd+Shift+T") + .build(app)?, + ) + // .item( + // &SubmenuBuilder::new(app, "Libraries") + // // TODO: Implement this + // .items(&[]) + // .build()?, + // ) + .separator() + .hide() + .hide_others() + .show_all() + .separator() + .quit() + .build()?; - let view_menu = Menu::new() - .add_item(CustomMenuItem::new("open_overview", "Overview").accelerator("CmdOrCtrl+.")) - .add_item(CustomMenuItem::new("open_search", "Search").accelerator("CmdOrCtrl+F")) - .add_item(CustomMenuItem::new("open_settings", "Settings").accelerator("CmdOrCtrl+Comma")) - .add_item( - CustomMenuItem::new("reload_explorer", "Reload explorer").accelerator("CmdOrCtrl+R"), - ) - .add_submenu(Submenu::new( - "Layout", - Menu::new() - .add_item(CustomMenuItem::new("layout_grid", "Grid (Default)").disabled()) - .add_item(CustomMenuItem::new("layout_list", "List").disabled()) - .add_item(CustomMenuItem::new("layout_media", "Media").disabled()), - )); - // .add_item( - // CustomMenuItem::new("command_pallete", "Command Pallete") - // .accelerator("CmdOrCtrl+P"), - // ) + let file_menu = SubmenuBuilder::new(app, "File") + .item( + &MenuItemBuilder::with_id(MenuEvent::NewFile, "New File") + .accelerator("CmdOrCtrl+N") + .build(app)?, + ) + .item( + &MenuItemBuilder::with_id(MenuEvent::NewDirectory, "New Directory") + .accelerator("CmdOrCtrl+D") + .build(app)?, + ) + .item( + &MenuItemBuilder::with_id(MenuEvent::AddLocation, "Add Location") + // .accelerator("") // TODO + .build(app)?, + ) + .build()?; - #[cfg(debug_assertions)] - let view_menu = view_menu.add_native_item(MenuItem::Separator).add_item( - CustomMenuItem::new("toggle_devtools", "Toggle Developer Tools") - .accelerator("CmdOrCtrl+Shift+Alt+I"), - ); + let edit_menu = SubmenuBuilder::new(app, "Edit") + .copy() + .cut() + .paste() + .redo() + .undo() + .select_all() + .build()?; - let window_menu = Menu::new() - .add_native_item(MenuItem::Minimize) - .add_native_item(MenuItem::Zoom) - .add_item( - CustomMenuItem::new("new_window", "New Window") - .accelerator("CmdOrCtrl+Shift+N") - .disabled(), - ) - .add_item(CustomMenuItem::new("close_window", "Close Window").accelerator("CmdOrCtrl+W")) - .add_native_item(MenuItem::EnterFullScreen) - .add_native_item(MenuItem::Separator) - .add_item( - CustomMenuItem::new("reload_app", "Reload Webview").accelerator("CmdOrCtrl+Shift+R"), + let view_menu = SubmenuBuilder::new(app, "View") + .item( + &MenuItemBuilder::with_id(MenuEvent::OpenOverview, "Open Overview") + .accelerator("CmdOrCtrl+.") + .build(app)?, + ) + .item( + &MenuItemBuilder::with_id(MenuEvent::OpenSearch, "Search") + .accelerator("CmdOrCtrl+F") + .build(app)?, + ) + .item( + &MenuItemBuilder::with_id(MenuEvent::OpenSettings, "Settings") + .accelerator("CmdOrCtrl+Comma") + .build(app)?, + ) + .item( + &MenuItemBuilder::with_id(MenuEvent::ReloadExplorer, "Open Explorer") + .accelerator("CmdOrCtrl+R") + .build(app)?, + ) + .item( + &SubmenuBuilder::new(app, "Layout") + .item( + &MenuItemBuilder::with_id(MenuEvent::SetLayoutGrid, "Grid (Default)") + // .accelerator("") // TODO + .build(app)?, + ) + .item( + &MenuItemBuilder::with_id(MenuEvent::SetLayoutList, "List") + // .accelerator("") // TODO + .build(app)?, + ) + .item( + &MenuItemBuilder::with_id(MenuEvent::SetLayoutMedia, "Media") + // .accelerator("") // TODO + .build(app)?, + ) + .build()?, + ); + + #[cfg(debug_assertions)] + let view_menu = view_menu.separator().item( + &MenuItemBuilder::with_id(MenuEvent::ToggleDeveloperTools, "Toggle Developer Tools") + .accelerator("CmdOrCtrl+Shift+Alt+I") + .build(app)?, ); - Menu::new() - .add_submenu(Submenu::new("Spacedrive", app_menu)) - .add_submenu(Submenu::new("File", file_menu)) - .add_submenu(Submenu::new("Edit", edit_menu)) - .add_submenu(Submenu::new("View", view_menu)) - .add_submenu(Submenu::new("Window", window_menu)) + let view_menu = view_menu.build()?; + + let window_menu = SubmenuBuilder::new(app, "Window") + .minimize() + .item( + &MenuItemBuilder::with_id(MenuEvent::NewWindow, "New Window") + .accelerator("CmdOrCtrl+Shift+N") + .build(app)?, + ) + .close_window() + .fullscreen() + .item( + &MenuItemBuilder::with_id(MenuEvent::ReloadWebview, "Reload Webview") + .accelerator("CmdOrCtrl+Shift+R") + .build(app)?, + ) + .build()?; + + let menu = MenuBuilder::new(app) + .item(&app_menu) + .item(&file_menu) + .item(&edit_menu) + .item(&view_menu) + .item(&window_menu) + .build()?; + + for event in LIBRARY_LOCKED_MENU_IDS { + set_enabled(&menu, *event, false); + } + + Ok(menu) + } } -pub fn handle_menu_event(event: WindowMenuEvent) { - match event.menu_item_id() { - "quit" => { - let app = event.window().app_handle(); - app.exit(0); - } - "reload_explorer" => event.window().emit("keybind", "reload_explorer").unwrap(), - "open_settings" => event.window().emit("keybind", "open_settings").unwrap(), - "open_overview" => event.window().emit("keybind", "open_overview").unwrap(), - "close_window" => { - #[cfg(target_os = "macos")] - tauri::AppHandle::hide(&event.window().app_handle()).unwrap(); +pub fn handle_menu_event(event: MenuEvent, app: &AppHandle) { + let webview = app + .get_webview_window("main") + .expect("unable to find window"); - #[cfg(not(target_os = "macos"))] - { - let window = event.window(); - - #[cfg(debug_assertions)] - if window.is_devtools_open() { - window.close_devtools(); - } else { - window.close().unwrap(); - } - - #[cfg(not(debug_assertions))] - window.close().unwrap(); + match event { + // TODO: Use Tauri Specta with frontend instead of this + MenuEvent::NewLibrary => webview.emit("keybind", "new_library").unwrap(), + MenuEvent::NewFile => webview.emit("keybind", "new_file").unwrap(), + MenuEvent::NewDirectory => webview.emit("keybind", "new_directory").unwrap(), + MenuEvent::AddLocation => webview.emit("keybind", "add_location").unwrap(), + MenuEvent::OpenOverview => webview.emit("keybind", "open_overview").unwrap(), + MenuEvent::OpenSearch => webview.emit("keybind", "open_search".to_string()).unwrap(), + MenuEvent::OpenSettings => webview.emit("keybind", "open_settings").unwrap(), + MenuEvent::ReloadExplorer => webview.emit("keybind", "reload_explorer").unwrap(), + MenuEvent::SetLayoutGrid => webview.emit("keybind", "set_layout_grid").unwrap(), + MenuEvent::SetLayoutList => webview.emit("keybind", "set_layout_list").unwrap(), + MenuEvent::SetLayoutMedia => webview.emit("keybind", "set_layout_media").unwrap(), + MenuEvent::ToggleDeveloperTools => + { + #[cfg(feature = "devtools")] + if webview.is_devtools_open() { + webview.close_devtools(); + } else { + webview.open_devtools(); } } - "open_search" => event - .window() - .emit("keybind", "open_search".to_string()) - .unwrap(), - "reload_app" => { - event - .window() + MenuEvent::NewWindow => { + // TODO: Implement this + } + MenuEvent::ReloadWebview => { + webview .with_webview(crate::reload_webview_inner) .expect("Error while reloading webview"); } - #[cfg(debug_assertions)] - "toggle_devtools" => { - let window = event.window(); - - if window.is_devtools_open() { - window.close_devtools(); - } else { - window.open_devtools(); - } - } - _ => {} } } -/// If any are explicitly marked with `.disabled()` in the `custom_menu_bar()` function, this won't have an effect. -/// We include them in the locked menu IDs anyway for future-proofing, in-case someone forgets. -#[cfg(target_os = "macos")] -pub fn set_library_locked_menu_items_enabled(handle: tauri::window::MenuHandle, enabled: bool) { - LIBRARY_LOCKED_MENU_IDS - .iter() - .try_for_each(|id| handle.get_item(id).set_enabled(enabled)) - .expect("Unable to disable menu items (there are no libraries present, so certain options should be hidden)"); +// Enable/disable all items in `LIBRARY_LOCKED_MENU_IDS` +pub fn refresh_menu_bar(app: &AppHandle, enabled: bool) { + let menu = app + .get_window("main") + .expect("unable to find window") + .menu() + .expect("unable to get menu for current window"); + + for event in LIBRARY_LOCKED_MENU_IDS { + set_enabled(&menu, *event, enabled); + } +} + +pub fn set_enabled(menu: &Menu, event: MenuEvent, enabled: bool) { + let result = match menu.get(event.as_ref()) { + Some(MenuItemKind::MenuItem(i)) => i.set_enabled(enabled), + Some(MenuItemKind::Submenu(i)) => i.set_enabled(enabled), + Some(MenuItemKind::Predefined(_)) => return, + Some(MenuItemKind::Check(i)) => i.set_enabled(enabled), + Some(MenuItemKind::Icon(i)) => i.set_enabled(enabled), + None => { + error!("Unable to get menu item: {event:?}"); + return; + } + }; + + if let Err(e) = result { + error!("Error setting menu item state: {e:#?}"); + } } diff --git a/apps/desktop/src-tauri/src/tauri_plugins.rs b/apps/desktop/src-tauri/src/tauri_plugins.rs index 6ec861ce7..e95eba585 100644 --- a/apps/desktop/src-tauri/src/tauri_plugins.rs +++ b/apps/desktop/src-tauri/src/tauri_plugins.rs @@ -18,7 +18,7 @@ use hyper::server::{accept::Accept, conn::AddrIncoming}; use rand::{distributions::Alphanumeric, Rng}; use sd_core::{custom_uri, Node, NodeError}; use serde::Deserialize; -use tauri::{async_runtime::block_on, plugin::TauriPlugin, RunEvent, Runtime}; +use tauri::{async_runtime::block_on, plugin::TauriPlugin, AppHandle, Manager, RunEvent, Runtime}; use thiserror::Error; use tokio::{net::TcpListener, task::block_in_place}; use tracing::info; @@ -51,6 +51,7 @@ pub enum SdServerPluginError { /// We also spin up multiple servers so we can load balance image requests between them to avoid any issue with browser connection limits. pub async fn sd_server_plugin( node: Arc, + app_handle: &AppHandle, ) -> Result, SdServerPluginError> { let auth_token: String = rand::thread_rng() .sample_iter(&Alphanumeric) @@ -95,15 +96,21 @@ pub async fn sd_server_plugin( .expect("Error with HTTP server!"); // TODO: Panic handling }); + let script = format!( + r#"window.__SD_CUSTOM_SERVER_AUTH_TOKEN__ = "{auth_token}"; window.__SD_CUSTOM_URI_SERVER__ = [{}];"#, + [listen_addra, listen_addrb, listen_addrc, listen_addrd] + .iter() + .map(|addr| format!("'http://{addr}'")) + .collect::>() + .join(","), + ); + + for (_, window) in app_handle.webview_windows() { + window.eval(&script).ok(); + } + Ok(tauri::plugin::Builder::new("sd-server") - .js_init_script(format!( - r#"window.__SD_CUSTOM_SERVER_AUTH_TOKEN__ = "{auth_token}"; window.__SD_CUSTOM_URI_SERVER__ = [{}];"#, - [listen_addra, listen_addrb, listen_addrc, listen_addrd] - .iter() - .map(|addr| format!("'http://{addr}'")) - .collect::>() - .join(","), - )) + .js_init_script(script) .on_event(move |_app, e| { if let RunEvent::Exit { .. } = e { block_in_place(|| { diff --git a/apps/desktop/src-tauri/src/updater.rs b/apps/desktop/src-tauri/src/updater.rs index d57df755b..c595b158f 100644 --- a/apps/desktop/src-tauri/src/updater.rs +++ b/apps/desktop/src-tauri/src/updater.rs @@ -1,17 +1,16 @@ use tauri::{plugin::TauriPlugin, Manager, Runtime}; +use tauri_plugin_updater::{Update as TauriPluginUpdate, UpdaterExt}; use tokio::sync::Mutex; #[derive(Debug, Clone, specta::Type, serde::Serialize)] pub struct Update { pub version: String, - pub body: Option, } impl Update { - fn new(update: &tauri::updater::UpdateResponse) -> Self { + fn new(update: &TauriPluginUpdate) -> Self { Self { - version: update.latest_version().to_string(), - body: update.body().map(ToString::to_string), + version: update.version.clone(), } } } @@ -21,12 +20,12 @@ pub struct State { install_lock: Mutex<()>, } -async fn get_update( - app: tauri::AppHandle, -) -> Result, String> { - tauri::updater::builder(app) +async fn get_update(app: tauri::AppHandle) -> Result, String> { + app.updater_builder() .header("X-Spacedrive-Version", "stable") .map_err(|e| e.to_string())? + .build() + .map_err(|e| e.to_string())? .check() .await .map_err(|e| e.to_string()) @@ -45,19 +44,19 @@ pub enum UpdateEvent { #[tauri::command] #[specta::specta] pub async fn check_for_update(app: tauri::AppHandle) -> Result, String> { - app.emit_all("updater", UpdateEvent::Loading).ok(); + app.emit("updater", UpdateEvent::Loading).ok(); let update = match get_update(app.clone()).await { Ok(update) => update, Err(e) => { - app.emit_all("updater", UpdateEvent::Error(e.clone())).ok(); + app.emit("updater", UpdateEvent::Error(e.clone())).ok(); return Err(e); } }; - let update = update.is_update_available().then(|| Update::new(&update)); + let update = update.map(|update| Update::new(&update)); - app.emit_all( + app.emit( "updater", update .clone() @@ -81,11 +80,12 @@ pub async fn install_update( Err(_) => return Err("Update already installing".into()), }; - app.emit_all("updater", UpdateEvent::Installing).ok(); + app.emit("updater", UpdateEvent::Installing).ok(); get_update(app.clone()) .await? - .download_and_install() + .ok_or_else(|| "No update required".to_string())? + .download_and_install(|_, _| {}, || {}) .await .map_err(|e| e.to_string())?; diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 749bf610d..5fe861afe 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -1,88 +1,16 @@ { - "package": { - "productName": "Spacedrive" - }, + "productName": "Spacedrive", + "version": "0.2.13", + "identifier": "com.spacedrive.desktop", "build": { - "distDir": "../dist", - "devPath": "http://localhost:8001", "beforeDevCommand": "pnpm dev", - "beforeBuildCommand": "pnpm turbo run build --filter=@sd/desktop..." + "devUrl": "http://localhost:8001", + "beforeBuildCommand": "pnpm turbo run build --filter=@sd/desktop...", + "frontendDist": "../dist" }, - "tauri": { + "app": { + "withGlobalTauri": true, "macOSPrivateApi": true, - "bundle": { - "active": true, - "publisher": "Spacedrive Technology Inc.", - "category": "Productivity", - "targets": ["deb", "msi", "dmg", "updater"], - "identifier": "com.spacedrive.desktop", - "icon": [ - "icons/32x32.png", - "icons/128x128.png", - "icons/128x128@2x.png", - "icons/icon.icns", - "icons/icon.ico" - ], - "resources": {}, - "externalBin": [], - "copyright": "Spacedrive Technology Inc.", - "shortDescription": "Spacedrive", - "longDescription": "Cross-platform universal file explorer, powered by an open-source virtual distributed filesystem.", - "deb": { - "files": { - "/usr/share/spacedrive/models/yolov8s.onnx": "../../.deps/models/yolov8s.onnx" - }, - "depends": ["libc6"] - }, - "macOS": { - "minimumSystemVersion": "10.15", - "exceptionDomain": null, - "entitlements": null, - "frameworks": ["../../.deps/Spacedrive.framework"] - }, - "windows": { - "certificateThumbprint": null, - "webviewInstallMode": { "type": "embedBootstrapper", "silent": true }, - "digestAlgorithm": "sha256", - "timestampUrl": "", - "wix": { - "dialogImagePath": "icons/WindowsDialogImage.bmp", - "bannerPath": "icons/WindowsBanner.bmp" - } - } - }, - "updater": { - "active": true, - "dialog": false, - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZBMURCMkU5NEU3NDAyOEMKUldTTUFuUk82YklkK296dlkxUGkrTXhCT3ZMNFFVOWROcXNaS0RqWU1kMUdRV2tDdFdIS0Y3YUsK", - "endpoints": [ - "https://spacedrive.com/api/releases/tauri/{{version}}/{{target}}/{{arch}}" - ] - }, - "allowlist": { - "all": false, - "window": { - "all": true - }, - "path": { - "all": true - }, - "shell": { - "all": true - }, - "protocol": { - "all": true, - "assetScope": ["*"] - }, - "os": { - "all": true - }, - "dialog": { - "all": true, - "open": true, - "save": true - } - }, "windows": [ { "title": "Spacedrive", @@ -96,14 +24,65 @@ "alwaysOnTop": false, "focus": false, "visible": false, - "fileDropEnabled": true, + "dragDropEnabled": true, "decorations": true, "transparent": true, "center": true } ], "security": { - "csp": "default-src spacedrive: webkit-pdfjs-viewer: asset: https://asset.localhost blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'" + "csp": "default-src webkit-pdfjs-viewer: asset: https://asset.localhost blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'" + } + }, + "bundle": { + "active": true, + "targets": ["deb", "msi", "dmg", "updater"], + "publisher": "Spacedrive Technology Inc.", + "copyright": "Spacedrive Technology Inc.", + "category": "Productivity", + "shortDescription": "Spacedrive", + "longDescription": "Cross-platform universal file explorer, powered by an open-source virtual distributed filesystem.", + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/128x128@2x.png", + "icons/icon.icns", + "icons/icon.ico" + ], + "linux": { + "deb": { + "files": { + "/usr/share/spacedrive/models/yolov8s.onnx": "../../.deps/models/yolov8s.onnx" + }, + "depends": ["libc6", "libxdo3"] + } + }, + + "macOS": { + "minimumSystemVersion": "10.15", + "exceptionDomain": null, + "entitlements": null, + "frameworks": ["../../.deps/Spacedrive.framework"] + }, + "windows": { + "certificateThumbprint": null, + "webviewInstallMode": { "type": "embedBootstrapper", "silent": true }, + "digestAlgorithm": "sha256", + "timestampUrl": "", + "wix": { + "dialogImagePath": "icons/WindowsDialogImage.bmp", + "bannerPath": "icons/WindowsBanner.bmp" + } + } + }, + "plugins": { + "updater": { + "active": true, + "dialog": false, + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZBMURCMkU5NEU3NDAyOEMKUldTTUFuUk82YklkK296dlkxUGkrTXhCT3ZMNFFVOWROcXNaS0RqWU1kMUdRV2tDdFdIS0Y3YUsK", + "endpoints": [ + "https://spacedrive.com/api/releases/tauri/{{version}}/{{target}}/{{arch}}" + ] } } } diff --git a/apps/desktop/src/commands.ts b/apps/desktop/src/commands.ts index 360b8c8a7..e228fffea 100644 --- a/apps/desktop/src/commands.ts +++ b/apps/desktop/src/commands.ts @@ -1,52 +1,46 @@ /** tauri-specta globals **/ -import { invoke as TAURI_INVOKE } from '@tauri-apps/api'; +import { invoke as TAURI_INVOKE } from '@tauri-apps/api/core'; import * as TAURI_API_EVENT from '@tauri-apps/api/event'; -import { type WebviewWindowHandle as __WebviewWindowHandle__ } from '@tauri-apps/api/window'; +import { type WebviewWindow as __WebviewWindow__ } from '@tauri-apps/api/webviewWindow'; // This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually. export const commands = { - async appReady(): Promise { - return await TAURI_INVOKE('plugin:tauri-specta|app_ready'); + async appReady(): Promise { + await TAURI_INVOKE('app_ready'); }, - async resetSpacedrive(): Promise { - return await TAURI_INVOKE('plugin:tauri-specta|reset_spacedrive'); + async resetSpacedrive(): Promise { + await TAURI_INVOKE('reset_spacedrive'); }, - async openLogsDir(): Promise<__Result__> { + async openLogsDir(): Promise> { try { - return { status: 'ok', data: await TAURI_INVOKE('plugin:tauri-specta|open_logs_dir') }; + return { status: 'ok', data: await TAURI_INVOKE('open_logs_dir') }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; } }, - async refreshMenuBar(): Promise<__Result__> { + async refreshMenuBar(): Promise> { try { - return { - status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|refresh_menu_bar') - }; + return { status: 'ok', data: await TAURI_INVOKE('refresh_menu_bar') }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; } }, - async reloadWebview(): Promise { - return await TAURI_INVOKE('plugin:tauri-specta|reload_webview'); + async reloadWebview(): Promise { + await TAURI_INVOKE('reload_webview'); }, - async setMenuBarItemState(id: string, enabled: boolean): Promise { - return await TAURI_INVOKE('plugin:tauri-specta|set_menu_bar_item_state', { id, enabled }); + async setMenuBarItemState(event: MenuEvent, enabled: boolean): Promise { + await TAURI_INVOKE('set_menu_bar_item_state', { event, enabled }); }, - async requestFdaMacos(): Promise { - return await TAURI_INVOKE('plugin:tauri-specta|request_fda_macos'); + async requestFdaMacos(): Promise { + await TAURI_INVOKE('request_fda_macos'); }, - async openTrashInOsExplorer(): Promise<__Result__> { + async openTrashInOsExplorer(): Promise> { try { - return { - status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|open_trash_in_os_explorer') - }; + return { status: 'ok', data: await TAURI_INVOKE('open_trash_in_os_explorer') }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; @@ -55,36 +49,17 @@ export const commands = { async openFilePaths( library: string, ids: number[] - ): Promise< - __Result__< - ( - | { t: 'NoLibrary' } - | { t: 'NoFile'; c: number } - | { t: 'OpenError'; c: [number, string] } - | { t: 'AllGood'; c: number } - | { t: 'Internal'; c: string } - )[], - null - > - > { + ): Promise> { try { - return { - status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|open_file_paths', { library, ids }) - }; + return { status: 'ok', data: await TAURI_INVOKE('open_file_paths', { library, ids }) }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; } }, - async openEphemeralFiles( - paths: string[] - ): Promise<__Result__<({ t: 'Ok'; c: string } | { t: 'Err'; c: string })[], null>> { + async openEphemeralFiles(paths: string[]): Promise> { try { - return { - status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|open_ephemeral_files', { paths }) - }; + return { status: 'ok', data: await TAURI_INVOKE('open_ephemeral_files', { paths }) }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; @@ -93,14 +68,11 @@ export const commands = { async getFilePathOpenWithApps( library: string, ids: number[] - ): Promise<__Result__<{ url: string; name: string }[], null>> { + ): Promise> { try { return { status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|get_file_path_open_with_apps', { - library, - ids - }) + data: await TAURI_INVOKE('get_file_path_open_with_apps', { library, ids }) }; } catch (e) { if (e instanceof Error) throw e; @@ -109,13 +81,11 @@ export const commands = { }, async getEphemeralFilesOpenWithApps( paths: string[] - ): Promise<__Result__<{ url: string; name: string }[], null>> { + ): Promise> { try { return { status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|get_ephemeral_files_open_with_apps', { - paths - }) + data: await TAURI_INVOKE('get_ephemeral_files_open_with_apps', { paths }) }; } catch (e) { if (e instanceof Error) throw e; @@ -125,63 +95,50 @@ export const commands = { async openFilePathWith( library: string, fileIdsAndUrls: [number, string][] - ): Promise<__Result__> { + ): Promise> { try { return { status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|open_file_path_with', { - library, - fileIdsAndUrls - }) + data: await TAURI_INVOKE('open_file_path_with', { library, fileIdsAndUrls }) }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; } }, - async openEphemeralFileWith(pathsAndUrls: [string, string][]): Promise<__Result__> { + async openEphemeralFileWith(pathsAndUrls: [string, string][]): Promise> { try { return { status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|open_ephemeral_file_with', { - pathsAndUrls - }) + data: await TAURI_INVOKE('open_ephemeral_file_with', { pathsAndUrls }) }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; } }, - async revealItems(library: string, items: RevealItem[]): Promise<__Result__> { + async revealItems(library: string, items: RevealItem[]): Promise> { try { - return { - status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|reveal_items', { library, items }) - }; + return { status: 'ok', data: await TAURI_INVOKE('reveal_items', { library, items }) }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; } }, - async lockAppTheme(themeType: AppThemeType): Promise { - return await TAURI_INVOKE('plugin:tauri-specta|lock_app_theme', { themeType }); + async lockAppTheme(themeType: AppThemeType): Promise { + await TAURI_INVOKE('lock_app_theme', { themeType }); }, - async checkForUpdate(): Promise< - __Result__<{ version: string; body: string | null } | null, string> - > { + async checkForUpdate(): Promise> { try { - return { - status: 'ok', - data: await TAURI_INVOKE('plugin:tauri-specta|check_for_update') - }; + return { status: 'ok', data: await TAURI_INVOKE('check_for_update') }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; } }, - async installUpdate(): Promise<__Result__> { + async installUpdate(): Promise> { try { - return { status: 'ok', data: await TAURI_INVOKE('plugin:tauri-specta|install_update') }; + return { status: 'ok', data: await TAURI_INVOKE('install_update') }; } catch (e) { if (e instanceof Error) throw e; else return { status: 'error', error: e as any }; @@ -192,7 +149,7 @@ export const commands = { export const events = __makeEvents__<{ dragAndDropEvent: DragAndDropEvent; }>({ - dragAndDropEvent: 'plugin:tauri-specta:drag-and-drop-event' + dragAndDropEvent: 'drag-and-drop-event' }); /** user-defined types **/ @@ -202,10 +159,34 @@ export type DragAndDropEvent = | { type: 'Hovered'; paths: string[]; x: number; y: number } | { type: 'Dropped'; paths: string[]; x: number; y: number } | { type: 'Cancelled' }; +export type EphemeralFileOpenResult = { t: 'Ok'; c: string } | { t: 'Err'; c: string }; +export type MenuEvent = + | 'NewLibrary' + | 'NewFile' + | 'NewDirectory' + | 'AddLocation' + | 'OpenOverview' + | 'OpenSearch' + | 'OpenSettings' + | 'ReloadExplorer' + | 'SetLayoutGrid' + | 'SetLayoutList' + | 'SetLayoutMedia' + | 'ToggleDeveloperTools' + | 'NewWindow' + | 'ReloadWebview'; +export type OpenFilePathResult = + | { t: 'NoLibrary' } + | { t: 'NoFile'; c: number } + | { t: 'OpenError'; c: [number, string] } + | { t: 'AllGood'; c: number } + | { t: 'Internal'; c: string }; +export type OpenWithApplication = { url: string; name: string }; export type RevealItem = | { Location: { id: number } } | { FilePath: { id: number } } | { Ephemeral: { path: string } }; +export type Update = { version: string }; type __EventObj__ = { listen: (cb: TAURI_API_EVENT.EventCallback) => ReturnType>; @@ -215,13 +196,13 @@ type __EventObj__ = { : (payload: T) => ReturnType; }; -type __Result__ = { status: 'ok'; data: T } | { status: 'error'; error: E }; +export type Result = { status: 'ok'; data: T } | { status: 'error'; error: E }; function __makeEvents__>(mappings: Record) { return new Proxy( {} as unknown as { [K in keyof T]: __EventObj__ & { - (handle: __WebviewWindowHandle__): __EventObj__; + (handle: __WebviewWindow__): __EventObj__; }; }, { @@ -229,7 +210,7 @@ function __makeEvents__>(mappings: Record {}) as any, { - apply: (_, __, [window]: [__WebviewWindowHandle__]) => ({ + apply: (_, __, [window]: [__WebviewWindow__]) => ({ listen: (arg: any) => window.listen(name, arg), once: (arg: any) => window.once(name, arg), emit: (arg: any) => window.emit(name, arg) diff --git a/apps/desktop/src/platform.ts b/apps/desktop/src/platform.ts index 5338f7908..0c2d57a67 100644 --- a/apps/desktop/src/platform.ts +++ b/apps/desktop/src/platform.ts @@ -1,7 +1,8 @@ -import { dialog, invoke, os, shell } from '@tauri-apps/api'; -import { confirm } from '@tauri-apps/api/dialog'; +import { invoke } from '@tauri-apps/api/core'; import { homeDir } from '@tauri-apps/api/path'; -import { open } from '@tauri-apps/api/shell'; +import { confirm, open as dialogOpen, save as dialogSave } from '@tauri-apps/plugin-dialog'; +import { type } from '@tauri-apps/plugin-os'; +import { open as shellOpen } from '@tauri-apps/plugin-shell'; // @ts-expect-error: Doesn't have a types package. import ConsistentHash from 'consistent-hash'; import { OperatingSystem, Platform } from '@sd/interface'; @@ -16,12 +17,12 @@ const customUriServerUrl = (window as any).__SD_CUSTOM_URI_SERVER__ as string[] const queryParams = customUriAuthToken ? `?token=${encodeURIComponent(customUriAuthToken)}` : ''; async function getOs(): Promise { - switch (await os.type()) { - case 'Linux': + switch (await type()) { + case 'linux': return 'linux'; - case 'Windows_NT': + case 'windows': return 'windows'; - case 'Darwin': + case 'macos': return 'macOS'; default: return 'unknown'; @@ -64,15 +65,18 @@ export const platform = { constructServerUrl( `/remote/${encodeURIComponent(remote_identity)}/uri/${path}?token=${customUriAuthToken}` ), - openLink: shell.open, + openLink: shellOpen, getOs, openDirectoryPickerDialog: (opts) => { - const result = dialog.open({ directory: true, ...opts }); + const result = dialogOpen({ directory: true, ...opts }); if (opts?.multiple) return result as any; // Tauri don't properly type narrow on `multiple` argument return result; }, - openFilePickerDialog: () => dialog.open(), - saveFilePickerDialog: (opts) => dialog.save(opts), + openFilePickerDialog: () => + dialogOpen({ + multiple: true + }).then((result) => result?.map((r) => r.path) ?? null), + saveFilePickerDialog: (opts) => dialogSave(opts), showDevtools: () => invoke('show_devtools'), confirm: (msg, cb) => confirm(msg).then(cb), subscribeToDragAndDropEvents: (cb) => diff --git a/apps/landing/src/app/Downloads/Platform.tsx b/apps/landing/src/app/Downloads/Platform.tsx index 3f76223ca..69d7473e2 100644 --- a/apps/landing/src/app/Downloads/Platform.tsx +++ b/apps/landing/src/app/Downloads/Platform.tsx @@ -12,6 +12,7 @@ export type Platform = { version?: string; links?: Array<{ name: string; arch: string }>; disabled?: boolean; + note?: string; }; export const platforms = { @@ -37,7 +38,8 @@ export const platforms = { os: 'linux', icon: LinuxLogo, version: 'deb', - links: [{ name: 'x86_64', arch: 'x86_64' }] + links: [{ name: 'x86_64', arch: 'x86_64' }], + note: 'Supports Ubuntu 22.04+, Debian Bookworm+, Linux Mint 21+, PopOS 22.04+' }, docker: { name: 'Docker', icon: Docker }, android: { name: 'Android', icon: AndroidLogo, version: '10+', disabled: true }, diff --git a/apps/landing/src/app/Downloads/index.tsx b/apps/landing/src/app/Downloads/index.tsx index e76c64399..711024067 100644 --- a/apps/landing/src/app/Downloads/index.tsx +++ b/apps/landing/src/app/Downloads/index.tsx @@ -22,13 +22,17 @@ export function Downloads({ latestVersion }: Props) { const plausible = usePlausible(); - const formattedVersion = (() => { + const [formattedVersion, note] = (() => { const platform = selectedPlatform ?? currentPlatform; - - if (!platform?.version) return; - if (platform.name === 'Linux') return platform.version; - - return `${platform.name} ${platform.version}`; + return platform + ? [ + platform.version && + (platform.name === 'Linux' + ? platform.version + : `${platform.name} ${platform.version}`), + platform.note + ] + : []; })(); return ( @@ -95,6 +99,12 @@ export function Downloads({ latestVersion }: Props) { {formattedVersion} )} + {note && ( + <> + | + {note} + + )}

{/* Platform icons */}
diff --git a/core/crates/indexer-rules/src/lib.rs b/core/crates/indexer-rules/src/lib.rs index 4e682955f..608a859ee 100644 --- a/core/crates/indexer-rules/src/lib.rs +++ b/core/crates/indexer-rules/src/lib.rs @@ -399,11 +399,11 @@ impl IndexerRuler { } } - pub async fn serialize(&self) -> Result, rmp_serde::encode::Error> { + pub async fn serialize(&self) -> Result, encode::Error> { rmp_serde::to_vec_named(&*self.rules.read().await) } - pub fn deserialize(data: &[u8]) -> Result { + pub fn deserialize(data: &[u8]) -> Result { rmp_serde::from_slice(data).map(Self::new) } diff --git a/core/src/api/cloud.rs b/core/src/api/cloud.rs index ec9df0abe..d13dc6a06 100644 --- a/core/src/api/cloud.rs +++ b/core/src/api/cloud.rs @@ -28,7 +28,7 @@ pub(crate) fn mount() -> AlphaRouter { .procedure("setApiOrigin", { R.mutation(|node, origin: String| async move { let mut origin_env = node.env.api_url.lock().await; - *origin_env = origin.clone(); + origin_env.clone_from(&origin); node.config .write(|c| { diff --git a/core/src/api/mod.rs b/core/src/api/mod.rs index 182befa95..3ad1625e1 100644 --- a/core/src/api/mod.rs +++ b/core/src/api/mod.rs @@ -214,7 +214,7 @@ pub(crate) fn mount() -> Arc { type_map, ); type_map.insert( - ::SID, + ::sid(), def, ); }); diff --git a/core/src/old_job/worker.rs b/core/src/old_job/worker.rs index a3f7def87..1405d952b 100644 --- a/core/src/old_job/worker.rs +++ b/core/src/old_job/worker.rs @@ -321,7 +321,7 @@ impl Worker { old.task_count = report.task_count; old.completed_task_count = report.completed_task_count; old.estimated_completion = report.estimated_completion; - old.message = report.message.clone(); + old.message.clone_from(&report.message); }); *last_report_watch_update = Instant::now(); } diff --git a/core/src/util/unsafe_streamed_query.rs b/core/src/util/unsafe_streamed_query.rs index 8957097d8..1e3954512 100644 --- a/core/src/util/unsafe_streamed_query.rs +++ b/core/src/util/unsafe_streamed_query.rs @@ -3,7 +3,7 @@ use std::pin::pin; use async_stream::stream; use futures::{Stream, StreamExt}; use serde::Serialize; -use specta::{reference::Reference, DataType, Type, TypeMap}; +use specta::{reference::Reference, DataType, Generics, Type, TypeMap}; #[derive(Serialize)] #[serde(untagged)] @@ -13,14 +13,10 @@ pub enum Output { } impl Type for Output { - fn inline(type_map: &mut TypeMap, generics: &[DataType]) -> DataType { + fn inline(type_map: &mut TypeMap, generics: Generics) -> DataType { T::inline(type_map, generics) } - fn definition(type_map: &mut TypeMap) -> DataType { - T::definition(type_map) - } - fn reference(type_map: &mut TypeMap, generics: &[DataType]) -> Reference { T::reference(type_map, generics) } diff --git a/crates/crypto/Cargo.toml b/crates/crypto/Cargo.toml index 707aa21c5..5efb8be08 100644 --- a/crates/crypto/Cargo.toml +++ b/crates/crypto/Cargo.toml @@ -91,11 +91,12 @@ uuid = { version = "1.7.0", features = ["v4"] } linux-keyutils = { version = "0.2.4", features = ["std"], optional = true } secret-service = { version = "3.0.1", features = [ "crypto-rust", + "rt-tokio-crypto-rust", ], optional = true } # this needs to remain at versions < 4, as they made some changes and i can't get it # to compile for the time being -zbus = { version = "3.15.2", default_features = false, features = [ +zbus = { version = "4.0", default_features = false, features = [ "tokio", "blocking", ], optional = true } diff --git a/crates/media-metadata/src/image/flash/data.rs b/crates/media-metadata/src/image/flash/data.rs index b9a2745aa..c5adb7fa5 100644 --- a/crates/media-metadata/src/image/flash/data.rs +++ b/crates/media-metadata/src/image/flash/data.rs @@ -37,7 +37,7 @@ pub enum FlashMode { /// The data is present, but we're unable to determine what they mean #[default] Unknown, - /// FLash was on + /// `FLash` was on On, /// Flash was off Off, diff --git a/interface/app/$libraryId/search/SearchBar.tsx b/interface/app/$libraryId/search/SearchBar.tsx index b875887ac..12a0f9dc5 100644 --- a/interface/app/$libraryId/search/SearchBar.tsx +++ b/interface/app/$libraryId/search/SearchBar.tsx @@ -35,6 +35,11 @@ export default ({ redirectToSearch, defaultFilters, defaultTarget }: Props) => { ) { searchRef.current?.focus(); } + + const handler = () => searchRef.current?.focus(); + + document.addEventListener('open_search', handler); + return () => document.removeEventListener('open_search', handler); }, [os] ); diff --git a/interface/hooks/useKeybindEventHandler.ts b/interface/hooks/useKeybindEventHandler.ts index 91c4586a9..274dbdb6a 100644 --- a/interface/hooks/useKeybindEventHandler.ts +++ b/interface/hooks/useKeybindEventHandler.ts @@ -19,6 +19,18 @@ export const useKeybindEventHandler = (libraryId?: string) => { e.preventDefault(); switch (e.detail.action) { + case 'new_library': + console.log('New Library!'); // TODO: Implement + break; + case 'new_file': + console.log('New File!'); // TODO: Implement + break; + case 'new_directory': + console.log('New Directory!'); // TODO: Implement + break; + case 'add_location': + console.log('Add Location!'); // TODO: Implement + break; case 'open_settings': libraryId && navigate(`/${libraryId}/settings/client/general`); break; @@ -29,7 +41,7 @@ export const useKeybindEventHandler = (libraryId?: string) => { // libraryId && navigate(`/${libraryId}/overview`); // break; case 'open_search': - // somehow emit ctrl/cmd+f + document.dispatchEvent(new CustomEvent('open_search')); break; case 'window_fullscreened': windowState.isFullScreen = true; diff --git a/interface/util/Platform.tsx b/interface/util/Platform.tsx index f70bb5960..41cd75b43 100644 --- a/interface/util/Platform.tsx +++ b/interface/util/Platform.tsx @@ -69,7 +69,7 @@ export type Platform = { landingApiOrigin: string; }; -export type Update = { version: string; body: string | null }; +export type Update = { version: string }; export type UpdateStore = | { status: 'idle' } | { status: 'loading' } diff --git a/package.json b/package.json index 0da060fd0..4f84826c8 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,8 @@ "pnpm": { "patchedDependencies": { "@remix-run/router@1.13.1": "patches/@remix-run__router@1.13.1.patch", - "@contentlayer/cli@0.3.4": "patches/@contentlayer__cli@0.3.4.patch" + "@contentlayer/cli@0.3.4": "patches/@contentlayer__cli@0.3.4.patch", + "@oscartbeaumont-sd/rspc-tauri@0.0.0-main-dc31e5b2": "patches/@oscartbeaumont-sd__rspc-tauri@0.0.0-main-dc31e5b2.patch" }, "overrides": { "@types/node": ">18.18.x", diff --git a/packages/client/src/core.ts b/packages/client/src/core.ts index d5e43952c..dfe0df426 100644 --- a/packages/client/src/core.ts +++ b/packages/client/src/core.ts @@ -7,11 +7,11 @@ export type Procedures = { { key: "backups.getAll", input: never, result: GetAll } | { key: "buildInfo", input: never, result: BuildInfo } | { key: "cloud.getApiOrigin", input: never, result: string } | - { key: "cloud.library.get", input: LibraryArgs, result: { id: string; uuid: string; name: string; instances: CloudInstance[]; ownerId: string } | null } | + { key: "cloud.library.get", input: LibraryArgs, result: CloudLibrary | null } | { key: "cloud.library.list", input: never, result: CloudLibrary[] } | { key: "cloud.locations.list", input: never, result: CloudLocation[] } | - { key: "ephemeralFiles.getMediaData", input: string, result: ({ type: "Image" } & ImageMetadata) | ({ type: "Video" } & VideoMetadata) | ({ type: "Audio" } & AudioMetadata) | null } | - { key: "files.get", input: LibraryArgs, result: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; file_paths: ({ id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; media_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null } | null })[] } | null } | + { key: "ephemeralFiles.getMediaData", input: string, result: MediaMetadata | null } | + { key: "files.get", input: LibraryArgs, result: ObjectWithFilePaths2 | null } | { key: "files.getConvertibleImageExtensions", input: never, result: string[] } | { key: "files.getMediaData", input: LibraryArgs, result: MediaMetadata } | { key: "files.getPath", input: LibraryArgs, result: string | null } | @@ -19,7 +19,7 @@ export type Procedures = { { key: "jobs.isActive", input: LibraryArgs, result: boolean } | { key: "jobs.reports", input: LibraryArgs, result: JobGroup[] } | { key: "labels.count", input: LibraryArgs, result: number } | - { key: "labels.get", input: LibraryArgs, result: { id: number; name: string; date_created: string | null; date_modified: string | null } | null } | + { key: "labels.get", input: LibraryArgs, result: Label | null } | { key: "labels.getForObject", input: LibraryArgs, result: Label[] } | { key: "labels.getWithObjects", input: LibraryArgs, result: { [key in number]: { date_created: string; object: { id: number } }[] } } | { key: "labels.list", input: LibraryArgs, result: Label[] } | @@ -27,8 +27,8 @@ export type Procedures = { { key: "library.kindStatistics", input: LibraryArgs, result: KindStatistics } | { key: "library.list", input: never, result: LibraryConfigWrapped[] } | { key: "library.statistics", input: LibraryArgs, result: StatisticsResponse } | - { key: "locations.get", input: LibraryArgs, result: { id: number; pub_id: number[]; name: string | null; path: string | null; total_capacity: number | null; available_capacity: number | null; size_in_bytes: number[] | null; is_archived: boolean | null; generate_preview_media: boolean | null; sync_preview_media: boolean | null; hidden: boolean | null; date_created: string | null; scan_state: number; instance_id: number | null } | null } | - { key: "locations.getWithRules", input: LibraryArgs, result: { id: number; pub_id: number[]; name: string | null; path: string | null; total_capacity: number | null; available_capacity: number | null; size_in_bytes: number[] | null; is_archived: boolean | null; generate_preview_media: boolean | null; sync_preview_media: boolean | null; hidden: boolean | null; date_created: string | null; instance_id: number | null; indexer_rules: IndexerRule[] } | null } | + { key: "locations.get", input: LibraryArgs, result: Location | null } | + { key: "locations.getWithRules", input: LibraryArgs, result: LocationWithIndexerRule | null } | { key: "locations.indexer_rules.get", input: LibraryArgs, result: IndexerRule } | { key: "locations.indexer_rules.list", input: LibraryArgs, result: IndexerRule[] } | { key: "locations.indexer_rules.listForLocation", input: LibraryArgs, result: IndexerRule[] } | @@ -47,11 +47,11 @@ export type Procedures = { { key: "search.objectsCount", input: LibraryArgs<{ filters?: SearchFilterArgs[] }>, result: number } | { key: "search.paths", input: LibraryArgs, result: SearchData } | { key: "search.pathsCount", input: LibraryArgs<{ filters?: SearchFilterArgs[] }>, result: number } | - { key: "search.saved.get", input: LibraryArgs, result: { id: number; pub_id: number[]; target: string | null; search: string | null; filters: string | null; name: string | null; icon: string | null; description: string | null; date_created: string | null; date_modified: string | null } | null } | + { key: "search.saved.get", input: LibraryArgs, result: SavedSearch | null } | { key: "search.saved.list", input: LibraryArgs, result: SavedSearch[] } | { key: "sync.enabled", input: LibraryArgs, result: boolean } | { key: "sync.messages", input: LibraryArgs, result: CRDTOperation[] } | - { key: "tags.get", input: LibraryArgs, result: { id: number; pub_id: number[]; name: string | null; color: string | null; is_hidden: boolean | null; date_created: string | null; date_modified: string | null } | null } | + { key: "tags.get", input: LibraryArgs, result: Tag | null } | { key: "tags.getForObject", input: LibraryArgs, result: Tag[] } | { key: "tags.getWithObjects", input: LibraryArgs, result: { [key in number]: ({ date_created: string | null; object: { id: number } })[] } } | { key: "tags.list", input: LibraryArgs, result: Tag[] } | @@ -312,7 +312,7 @@ export type FlashMode = */ "Unknown" | /** - * FLash was on + * `FLash` was on */ "On" | /** @@ -442,6 +442,8 @@ export type LocationSettings = { explorer: ExplorerSettings } */ export type LocationUpdateArgs = { id: number; name: string | null; generate_preview_media: boolean | null; sync_preview_media: boolean | null; hidden: boolean | null; indexer_rules_ids: number[]; path: string | null } +export type LocationWithIndexerRule = { id: number; pub_id: number[]; name: string | null; path: string | null; total_capacity: number | null; available_capacity: number | null; size_in_bytes: number[] | null; is_archived: boolean | null; generate_preview_media: boolean | null; sync_preview_media: boolean | null; hidden: boolean | null; date_created: string | null; instance_id: number | null; indexer_rules: IndexerRule[] } + export type MaybeUndefined = null | T export type MediaDataOrder = { field: "epochTime"; value: SortOrder } @@ -503,6 +505,8 @@ export type ObjectValidatorArgs = { id: number; path: string } export type ObjectWithFilePaths = { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; file_paths: ({ id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; media_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null } | null })[] } +export type ObjectWithFilePaths2 = { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; file_paths: ({ id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; media_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null } | null })[] } + export type OldFileCopierJobInit = { source_location_id: number; target_location_id: number; sources_file_path_ids: number[]; target_location_relative_directory_path: string } export type OldFileCutterJobInit = { source_location_id: number; target_location_id: number; sources_file_path_ids: number[]; target_location_relative_directory_path: string } diff --git a/patches/@oscartbeaumont-sd__rspc-tauri@0.0.0-main-dc31e5b2.patch b/patches/@oscartbeaumont-sd__rspc-tauri@0.0.0-main-dc31e5b2.patch new file mode 100644 index 000000000..ce63311a2 --- /dev/null +++ b/patches/@oscartbeaumont-sd__rspc-tauri@0.0.0-main-dc31e5b2.patch @@ -0,0 +1,68 @@ +diff --git a/dist/index.js b/dist/index.js +index df70b20e9381e7bf44f9a35b11174e40ede80376..bc06927b7290891717c48999f79d0705ef6b8df7 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -17,7 +17,7 @@ class TauriTransport { + }); + // @ts-ignore + this.requestMap.set(id, resolve); +- await window.appWindow.emit("plugin:rspc:transport", { ++ await window.getCurrent().emit("plugin:rspc:transport", { + id, + method: operation, + params: { +diff --git a/dist/index.mjs b/dist/index.mjs +index a80ac6155a4a920173c442b4d7b458a46ab63624..03b3d9ee6d3691980584c1fd58c17f7c81dbab39 100644 +--- a/dist/index.mjs ++++ b/dist/index.mjs +@@ -1,6 +1,6 @@ + import { randomId, RSPCError } from '@oscartbeaumont-sd/rspc-client'; + import { listen } from '@tauri-apps/api/event'; +-import { appWindow } from '@tauri-apps/api/window'; ++import { getCurrent } from '@tauri-apps/api/window'; + + // @ts-nocheck No one asked + class TauriTransport { +@@ -15,7 +15,7 @@ class TauriTransport { + }); + // @ts-ignore + this.requestMap.set(id, resolve); +- await appWindow.emit("plugin:rspc:transport", { ++ await getCurrent().emit("plugin:rspc:transport", { + id, + method: operation, + params: { +diff --git a/dist/v2.js b/dist/v2.js +index e597db7bf00a7e62f32266814345b257b8f8d0da..fa683640a0c0c9f1796ed1af1fd0d04c2df7c68b 100644 +--- a/dist/v2.js ++++ b/dist/v2.js +@@ -44,7 +44,7 @@ var window = require('@tauri-apps/api/window'); + if (!listener) { + await listener; + } +- await window.appWindow.emit("plugin:rspc:transport", currentBatch); ++ await window.getCurrent().emit("plugin:rspc:transport", currentBatch); + })(); + }); + } +diff --git a/dist/v2.mjs b/dist/v2.mjs +index bd7ceb6927d187dd2ff7cf9a9364d7c312a75b88..844495e36aef0c1337e7393685c1a33fedb88c2c 100644 +--- a/dist/v2.mjs ++++ b/dist/v2.mjs +@@ -1,6 +1,6 @@ + import { AlphaRSPCError } from '@oscartbeaumont-sd/rspc-client/v2'; + import { listen } from '@tauri-apps/api/event'; +-import { appWindow } from '@tauri-apps/api/window'; ++import { getCurrent } from '@tauri-apps/api/window'; + + // @ts-nocheck No one asked + /** +@@ -42,7 +42,7 @@ import { appWindow } from '@tauri-apps/api/window'; + if (!listener) { + await listener; + } +- await appWindow.emit("plugin:rspc:transport", currentBatch); ++ await getCurrent().emit("plugin:rspc:transport", currentBatch); + })(); + }); + } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 38850d4c7..368d02887 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,6 +15,9 @@ patchedDependencies: '@contentlayer/cli@0.3.4': hash: r22rdxqpl6d5mdpkhdt6tw4evu path: patches/@contentlayer__cli@0.3.4.patch + '@oscartbeaumont-sd/rspc-tauri@0.0.0-main-dc31e5b2': + hash: 3ozd223mr7o4cioyf7af7qd56a + path: patches/@oscartbeaumont-sd__rspc-tauri@0.0.0-main-dc31e5b2.patch '@remix-run/router@1.13.1': hash: wdk5klbkacqsve2yzdckjvtjz4 path: patches/@remix-run__router@1.13.1.patch @@ -86,7 +89,7 @@ importers: version: 0.0.0-main-dc31e5b2 '@oscartbeaumont-sd/rspc-tauri': specifier: '=0.0.0-main-dc31e5b2' - version: 0.0.0-main-dc31e5b2(@tauri-apps/api@1.5.1) + version: 0.0.0-main-dc31e5b2(patch_hash=3ozd223mr7o4cioyf7af7qd56a)(@tauri-apps/api@2.0.0-beta.11) '@remix-run/router': specifier: '=1.13.1' version: 1.13.1(patch_hash=wdk5klbkacqsve2yzdckjvtjz4) @@ -106,8 +109,17 @@ importers: specifier: ^4.36.1 version: 4.36.1(react-dom@18.2.0(react@18.2.0))(react-native@0.73.4(@babel/core@7.24.0)(@babel/preset-env@7.24.0(@babel/core@7.24.0))(react@18.2.0))(react@18.2.0) '@tauri-apps/api': - specifier: 1.5.1 - version: 1.5.1 + specifier: next + version: 2.0.0-beta.11 + '@tauri-apps/plugin-dialog': + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 + '@tauri-apps/plugin-os': + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 + '@tauri-apps/plugin-shell': + specifier: 2.0.0-beta.2 + version: 2.0.0-beta.2 consistent-hash: specifier: ^1.2.2 version: 1.2.2 @@ -134,8 +146,8 @@ importers: specifier: ^2.16.0 version: 2.16.0 '@tauri-apps/cli': - specifier: ^1.5.11 - version: 1.5.11 + specifier: next + version: 2.0.0-beta.15 '@types/react': specifier: ^18.2.67 version: 18.2.67 @@ -5060,75 +5072,88 @@ packages: '@tanstack/virtual-core@3.2.0': resolution: {integrity: sha512-P5XgYoAw/vfW65byBbJQCw+cagdXDT/qH6wmABiLt4v4YBT2q2vqCOhihe+D1Nt325F/S/0Tkv6C5z0Lv+VBQQ==} - '@tauri-apps/api@1.5.1': - resolution: {integrity: sha512-6unsZDOdlXTmauU3NhWhn+Cx0rODV+rvNvTdvolE5Kls5ybA6cqndQENDt1+FS0tF7ozCP66jwWoH6a5h90BrA==} - engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'} + '@tauri-apps/api@2.0.0-beta.11': + resolution: {integrity: sha512-wJRY+fBUm3KpqZDHMIz5HRv+1vlnvRJ/dFxiyY3NlINTx2qXqDou5qWYcP1CuZXsd39InWVPV3FAZvno/kGCkA==} + engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} - '@tauri-apps/cli-darwin-arm64@1.5.11': - resolution: {integrity: sha512-2NLSglDb5VfvTbMtmOKWyD+oaL/e8Z/ZZGovHtUFyUSFRabdXc6cZOlcD1BhFvYkHqm+TqGaz5qtPR5UbqDs8A==} + '@tauri-apps/api@2.0.0-beta.4': + resolution: {integrity: sha512-Nxtj28NYUo5iwYkpYslxmOPkdI2WkELU2e3UH9nbJm9Ydki2CQwJVGQxx4EANtdZcMNsEsUzRqaDTvEUYH1l6w==} + engines: {node: '>= 18', npm: '>= 6.6.0', yarn: '>= 1.19.1'} + + '@tauri-apps/cli-darwin-arm64@2.0.0-beta.15': + resolution: {integrity: sha512-M4owBLoRdJb2/IK48KOQDU3j5xrjqGxa539rDXMjvaKydBk8x+aLdk3xZNsk/owHTI1GnrQZsPCMQaOgetYHaw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@tauri-apps/cli-darwin-x64@1.5.11': - resolution: {integrity: sha512-/RQllHiJRH2fJOCudtZlaUIjofkHzP3zZgxi71ZUm7Fy80smU5TDfwpwOvB0wSVh0g/ciDjMArCSTo0MRvL+ag==} + '@tauri-apps/cli-darwin-x64@2.0.0-beta.15': + resolution: {integrity: sha512-ECpatfJdT4xKyFoE7tNEtTUIRxjQ2XSXa0TQkP3g7Kn7H/jRse+7pYe69jASA7shixajatAwmD4bXNT8jYRyNA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@tauri-apps/cli-linux-arm-gnueabihf@1.5.11': - resolution: {integrity: sha512-IlBuBPKmMm+a5LLUEK6a21UGr9ZYd6zKuKLq6IGM4tVweQa8Sf2kP2Nqs74dMGIUrLmMs0vuqdURpykQg+z4NQ==} + '@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.15': + resolution: {integrity: sha512-GQz2nnPwIamzDbmmfGWvmmoLthOkOBs0RO5u72KYAa78ZRFTx7S6AovnxJv48Fq+zeGGdDKoD9+ZG2Ue+sCL4w==} engines: {node: '>= 10'} cpu: [arm] os: [linux] - '@tauri-apps/cli-linux-arm64-gnu@1.5.11': - resolution: {integrity: sha512-w+k1bNHCU/GbmXshtAhyTwqosThUDmCEFLU4Zkin1vl2fuAtQry2RN7thfcJFepblUGL/J7yh3Q/0+BCjtspKQ==} + '@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.15': + resolution: {integrity: sha512-YBIfq0GbmIsWmRy6dVuDv3oMJN7a3R8HGVPMsa1W526AdCxoZDiPOQpSQN4VihJlbebUHxS/HyYF6maCY8uGzA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@tauri-apps/cli-linux-arm64-musl@1.5.11': - resolution: {integrity: sha512-PN6/dl+OfYQ/qrAy4HRAfksJ2AyWQYn2IA/2Wwpaa7SDRz2+hzwTQkvajuvy0sQ5L2WCG7ymFYRYMbpC6Hk9Pg==} + '@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.15': + resolution: {integrity: sha512-2ZBXoShz7UfqVGmc85mhwjI6ckdtrk15V69adxt/x+VS68yK6Ddbj+yqlffpeFNL90fZrsVhFoRIDqgkxtwksQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@tauri-apps/cli-linux-x64-gnu@1.5.11': - resolution: {integrity: sha512-MTVXLi89Nj7Apcvjezw92m7ZqIDKT5SFKZtVPCg6RoLUBTzko/BQoXYIRWmdoz2pgkHDUHgO2OMJ8oKzzddXbw==} + '@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.15': + resolution: {integrity: sha512-cwJqIIdc4Kq9sBl/vYc+Y95iMe+mlTYUj7ZnSn4YAbLKFz432bGg6uBn2qHXFN5jzwXtEOVZiB1zDZ2kveVoAQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@tauri-apps/cli-linux-x64-musl@1.5.11': - resolution: {integrity: sha512-kwzAjqFpz7rvTs7WGZLy/a5nS5t15QKr3E9FG95MNF0exTl3d29YoAUAe1Mn0mOSrTJ9Z+vYYAcI/QdcsGBP+w==} + '@tauri-apps/cli-linux-x64-musl@2.0.0-beta.15': + resolution: {integrity: sha512-nNuxZ8/qs0vQbdLO2hovskZGxwGn2z4x1QFJuL4xwd6Tryy9vVcznvyZS+t/72dCLoIkY9pKZQq5nYtAHYfTEg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@tauri-apps/cli-win32-arm64-msvc@1.5.11': - resolution: {integrity: sha512-L+5NZ/rHrSUrMxjj6YpFYCXp6wHnq8c8SfDTBOX8dO8x+5283/vftb4vvuGIsLS4UwUFXFnLt3XQr44n84E67Q==} + '@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.15': + resolution: {integrity: sha512-DXiXMTE00INjBkTgq1CYduMWgUwQ0NvLw+uXfu8BUupA+aOlv9ODhsGu7bZSaxKx4/glwxNAGZum4kQ0E0AxUg==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@tauri-apps/cli-win32-ia32-msvc@1.5.11': - resolution: {integrity: sha512-oVlD9IVewrY0lZzTdb71kNXkjdgMqFq+ohb67YsJb4Rf7o8A9DTlFds1XLCe3joqLMm4M+gvBKD7YnGIdxQ9vA==} + '@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.15': + resolution: {integrity: sha512-ajEQdW2jx2raPp7eDYryJkbBrgI8PIY1dz5ro8FweRrRmbotaUlclsro1kfNMQrfDah8+qfwnRvW3MahOBE5Wg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@tauri-apps/cli-win32-x64-msvc@1.5.11': - resolution: {integrity: sha512-1CexcqUFCis5ypUIMOKllxUBrna09McbftWENgvVXMfA+SP+yPDPAVb8fIvUcdTIwR/yHJwcIucmTB4anww4vg==} + '@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.15': + resolution: {integrity: sha512-yzsSgoiY0PmFiR5LvVOFr1b7h9l3aLPPQFlDG6+kRMrxCo7x7Pbyh4D5cqiMUuZO0QacwSP38EH6w0F88Y+4OA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@tauri-apps/cli@1.5.11': - resolution: {integrity: sha512-B475D7phZrq5sZ3kDABH4g2mEoUIHtnIO+r4ZGAAfsjMbZCwXxR/jlMGTEL+VO3YzjpF7gQe38IzB4vLBbVppw==} + '@tauri-apps/cli@2.0.0-beta.15': + resolution: {integrity: sha512-3pCvc54QfsRY+i9B7w3Q5jPAGtf8p+g7N/BamWPeiW6YqDqbHi9rNVI3SzrHkRRNOJnzMW8E5a8G0HziOluZGg==} engines: {node: '>= 10'} hasBin: true + '@tauri-apps/plugin-dialog@2.0.0-beta.2': + resolution: {integrity: sha512-WugTn/8d5jYA0GL1JRIJgA1OSxG0h2V4PSZZzehgA3v7rPlIU6w9s2+dSRqj55aMj6hm3Az9YbQqC18nuaHkpw==} + + '@tauri-apps/plugin-os@2.0.0-beta.2': + resolution: {integrity: sha512-rhJ/sEYvEAeMUQt6UiFODi5dT6F/ciNZYBQrbFTwhIqwQ2fp87dmzsscMy7FQ9LOor8AW+kL1KWoadfgzA/mSA==} + + '@tauri-apps/plugin-shell@2.0.0-beta.2': + resolution: {integrity: sha512-9rWsfN7Wt+EuWmpmNnK8bCs+04fzhEYrHtWyLIAYxb9diFdcJrEoctCP9YM2v+Uf8/y8qFC7VCbZ/9VQHANymQ==} + '@testing-library/dom@9.3.4': resolution: {integrity: sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==} engines: {node: '>=14'} @@ -16174,10 +16199,10 @@ snapshots: '@tanstack/react-query': 4.36.1(react-dom@18.2.0(react@18.2.0))(react-native@0.73.4(@babel/core@7.24.0)(@babel/preset-env@7.24.0(@babel/core@7.24.0))(react@18.2.0))(react@18.2.0) react: 18.2.0 - '@oscartbeaumont-sd/rspc-tauri@0.0.0-main-dc31e5b2(@tauri-apps/api@1.5.1)': + '@oscartbeaumont-sd/rspc-tauri@0.0.0-main-dc31e5b2(patch_hash=3ozd223mr7o4cioyf7af7qd56a)(@tauri-apps/api@2.0.0-beta.11)': dependencies: '@oscartbeaumont-sd/rspc-client': 0.0.0-main-dc31e5b2 - '@tauri-apps/api': 1.5.1 + '@tauri-apps/api': 2.0.0-beta.11 '@phosphor-icons/core@2.0.8': {} @@ -18631,50 +18656,64 @@ snapshots: '@tanstack/virtual-core@3.2.0': {} - '@tauri-apps/api@1.5.1': {} + '@tauri-apps/api@2.0.0-beta.11': {} - '@tauri-apps/cli-darwin-arm64@1.5.11': + '@tauri-apps/api@2.0.0-beta.4': {} + + '@tauri-apps/cli-darwin-arm64@2.0.0-beta.15': optional: true - '@tauri-apps/cli-darwin-x64@1.5.11': + '@tauri-apps/cli-darwin-x64@2.0.0-beta.15': optional: true - '@tauri-apps/cli-linux-arm-gnueabihf@1.5.11': + '@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-beta.15': optional: true - '@tauri-apps/cli-linux-arm64-gnu@1.5.11': + '@tauri-apps/cli-linux-arm64-gnu@2.0.0-beta.15': optional: true - '@tauri-apps/cli-linux-arm64-musl@1.5.11': + '@tauri-apps/cli-linux-arm64-musl@2.0.0-beta.15': optional: true - '@tauri-apps/cli-linux-x64-gnu@1.5.11': + '@tauri-apps/cli-linux-x64-gnu@2.0.0-beta.15': optional: true - '@tauri-apps/cli-linux-x64-musl@1.5.11': + '@tauri-apps/cli-linux-x64-musl@2.0.0-beta.15': optional: true - '@tauri-apps/cli-win32-arm64-msvc@1.5.11': + '@tauri-apps/cli-win32-arm64-msvc@2.0.0-beta.15': optional: true - '@tauri-apps/cli-win32-ia32-msvc@1.5.11': + '@tauri-apps/cli-win32-ia32-msvc@2.0.0-beta.15': optional: true - '@tauri-apps/cli-win32-x64-msvc@1.5.11': + '@tauri-apps/cli-win32-x64-msvc@2.0.0-beta.15': optional: true - '@tauri-apps/cli@1.5.11': + '@tauri-apps/cli@2.0.0-beta.15': optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 1.5.11 - '@tauri-apps/cli-darwin-x64': 1.5.11 - '@tauri-apps/cli-linux-arm-gnueabihf': 1.5.11 - '@tauri-apps/cli-linux-arm64-gnu': 1.5.11 - '@tauri-apps/cli-linux-arm64-musl': 1.5.11 - '@tauri-apps/cli-linux-x64-gnu': 1.5.11 - '@tauri-apps/cli-linux-x64-musl': 1.5.11 - '@tauri-apps/cli-win32-arm64-msvc': 1.5.11 - '@tauri-apps/cli-win32-ia32-msvc': 1.5.11 - '@tauri-apps/cli-win32-x64-msvc': 1.5.11 + '@tauri-apps/cli-darwin-arm64': 2.0.0-beta.15 + '@tauri-apps/cli-darwin-x64': 2.0.0-beta.15 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-beta.15 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-beta.15 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-beta.15 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-beta.15 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-beta.15 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-beta.15 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-beta.15 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-beta.15 + + '@tauri-apps/plugin-dialog@2.0.0-beta.2': + dependencies: + '@tauri-apps/api': 2.0.0-beta.4 + + '@tauri-apps/plugin-os@2.0.0-beta.2': + dependencies: + '@tauri-apps/api': 2.0.0-beta.4 + + '@tauri-apps/plugin-shell@2.0.0-beta.2': + dependencies: + '@tauri-apps/api': 2.0.0-beta.4 '@testing-library/dom@9.3.4': dependencies: diff --git a/scripts/setup.sh b/scripts/setup.sh index 370894434..b2b9e97e4 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -135,14 +135,15 @@ case "$(uname)" in echo fi ;; - "Linux") # https://github.com/tauri-apps/tauri-docs/blob/dev/docs/guides/getting-started/prerequisites.md#setting-up-linux + "Linux") + # https://github.com/tauri-apps/tauri-docs/blob/dev/docs/guides/getting-started/prerequisites.md#setting-up-linux if has apt-get; then echo "Detected apt!" echo "Installing dependencies with apt..." # Tauri dependencies set -- build-essential curl wget file openssl libssl-dev libgtk-3-dev librsvg2-dev \ - libwebkit2gtk-4.0-dev libayatana-appindicator3-dev + libwebkit2gtk-4.1-dev libayatana-appindicator3-dev libxdo-dev # Webkit2gtk requires gstreamer plugins for video playback to work set -- "$@" gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev @@ -160,7 +161,7 @@ case "$(uname)" in echo "Installing dependencies with pacman..." # Tauri dependencies - set -- base-devel curl wget file openssl gtk3 librsvg webkit2gtk libayatana-appindicator + set -- base-devel curl wget file openssl gtk3 librsvg webkit2gtk-4.1 libayatana-appindicator xdotool # Webkit2gtk requires gstreamer plugins for video playback to work set -- "$@" gst-plugins-base gst-plugins-good gst-plugins-ugly @@ -183,15 +184,8 @@ case "$(uname)" in 'https://github.com/spacedriveapp/spacedrive/issues' fi - # For Fedora 36 and below, and all Enterprise Linux Distributions, you need to install webkit2gtk3-devel instead of webkit2gtk4.0-devel - if ! { sudo dnf install webkit2gtk4.0-devel || sudo dnf install webkit2gtk3-devel; }; then - err 'We were unable to install the webkit2gtk4.0-devel/webkit2gtk3-devel package.' \ - 'Please open an issue if you feel that this is incorrect.' \ - 'https://github.com/spacedriveapp/spacedrive/issues' - fi - # Tauri dependencies - set -- openssl openssl-dev curl wget file libappindicator-gtk3-devel librsvg2-devel + set -- openssl webkit2gtk4.1-devel openssl-dev curl wget file libappindicator-gtk3-devel librsvg2-devel libxdo-devel # Webkit2gtk requires gstreamer plugins for video playback to work set -- "$@" gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-good \ @@ -211,7 +205,7 @@ case "$(uname)" in # Tauri dependencies set -- build-base curl wget file openssl-dev gtk+3.0-dev librsvg-dev \ - webkit2gtk-dev libayatana-indicator-dev + webkit2gtk-4.1-dev libayatana-indicator-dev xdotool # Webkit2gtk requires gstreamer plugins for video playback to work set -- "$@" gst-plugins-base-dev gst-plugins-good gst-plugins-ugly diff --git a/scripts/utils/patchTauri.mjs b/scripts/utils/patchTauri.mjs index d8b1d033b..cc7b7d561 100644 --- a/scripts/utils/patchTauri.mjs +++ b/scripts/utils/patchTauri.mjs @@ -17,7 +17,7 @@ const __debug = env.NODE_ENV === 'debug' * @returns {Promise} */ export async function tauriUpdaterKey(nativeDeps) { - if (env.TAURI_PRIVATE_KEY) return null + if (env.TAURI_SIGNING_PRIVATE_KEY) return null // pnpm exec tauri signer generate -w const privateKeyPath = path.join(nativeDeps, 'tauri.key') @@ -44,8 +44,8 @@ export async function tauriUpdaterKey(nativeDeps) { if (!(publicKey && privateKey)) throw new Error('Empty keys') } - env.TAURI_PRIVATE_KEY = privateKey - env.TAURI_KEY_PASSWORD = '' + env.TAURI_SIGNING_PRIVATE_KEY = privateKey + env.TAURI_SIGNING_PRIVATE_KEY_PASSWORD = '' return publicKey } @@ -64,19 +64,22 @@ export async function patchTauri(root, nativeDeps, targets, bundles, args) { const osType = os.type() const tauriPatch = { - tauri: { - bundle: { - macOS: { minimumSystemVersion: '' }, - resources: {}, - }, + build: { + features: /** @type {string[]} */ ([]), + }, + bundle: { + macOS: { minimumSystemVersion: '' }, + resources: {}, + }, + plugins: { updater: /** @type {{ pubkey?: string }} */ ({}), }, } if (osType === 'Linux') { - tauriPatch.tauri.bundle.resources = await linuxLibs(nativeDeps) + tauriPatch.bundle.resources = await linuxLibs(nativeDeps) } else if (osType === 'Windows_NT') { - tauriPatch.tauri.bundle.resources = { + tauriPatch.bundle.resources = { ...(await windowsDLLs(nativeDeps)), [path.join(nativeDeps, 'models', 'yolov8s.onnx')]: './models/yolov8s.onnx', } @@ -89,22 +92,28 @@ export async function patchTauri(root, nativeDeps, targets, bundles, args) { .then(JSON.parse) if (bundles.length === 0) { - const defaultBundles = tauriConfig.tauri?.bundle?.targets + const defaultBundles = tauriConfig?.bundle?.targets if (Array.isArray(defaultBundles)) bundles.push(...defaultBundles) if (bundles.length === 0) bundles.push('all') } - if (args[0] === 'build') { - if (tauriConfig?.tauri?.updater?.active) { - const pubKey = await tauriUpdaterKey(nativeDeps) - if (pubKey != null) tauriPatch.tauri.updater.pubkey = pubKey + switch (args[0]) { + case 'dev': + tauriPatch.build.features.push('devtools') + break + case 'build': { + if (tauriConfig?.plugins?.updater?.active) { + const pubKey = await tauriUpdaterKey(nativeDeps) + if (pubKey != null) tauriPatch.plugins.updater.pubkey = pubKey + } + break } } if (osType === 'Darwin') { const macOSArm64MinimumVersion = '11.0' - let macOSMinimumVersion = tauriConfig?.tauri?.bundle?.macOS?.minimumSystemVersion + let macOSMinimumVersion = tauriConfig?.bundle?.macOS?.minimumSystemVersion if ( (targets.includes('aarch64-apple-darwin') || @@ -125,7 +134,7 @@ export async function patchTauri(root, nativeDeps, targets, bundles, args) { if (macOSMinimumVersion) { env.MACOSX_DEPLOYMENT_TARGET = macOSMinimumVersion - tauriPatch.tauri.bundle.macOS.minimumSystemVersion = macOSMinimumVersion + tauriPatch.bundle.macOS.minimumSystemVersion = macOSMinimumVersion } else { throw new Error('No minimum macOS version detected, please review tauri.conf.json') }