From 9784e0c61e326ca79f65dddccc4e6dbe7a593563 Mon Sep 17 00:00:00 2001 From: Poordeveloper Date: Thu, 4 May 2023 23:22:13 +0800 Subject: [PATCH] update per https://github.com/tauri-apps/awesome-tauri/pull/158#issuecomment-1534754685 --- Cargo.lock | 224 ++------------------------------------ asset/index.html | 0 src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 9 +- 4 files changed, 15 insertions(+), 220 deletions(-) delete mode 100644 asset/index.html diff --git a/Cargo.lock b/Cargo.lock index ac79833..69daf37 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1540,7 +1540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb1a9325847aa46f1e96ffea37611b9d51fc4827e67f79e7de502a297560a67b" dependencies = [ "anyhow", - "heck 0.4.1", + "heck", "proc-macro-crate", "proc-macro-error", "proc-macro2", @@ -1714,15 +1714,6 @@ dependencies = [ "http", ] -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.1" @@ -2121,19 +2112,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" -[[package]] -name = "mac-notification-sys" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e72d50edb17756489e79d52eb146927bec8eba9dd48faadf9ef08bca3791ad5" -dependencies = [ - "cc", - "dirs-next", - "objc-foundation", - "objc_id", - "time", -] - [[package]] name = "mach" version = "0.3.2" @@ -2336,19 +2314,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" -[[package]] -name = "notify-rust" -version = "4.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfa211d18e360f08e36c364308f394b5eb23a6629150690e109a916dc6f610e" -dependencies = [ - "log", - "mac-notification-sys", - "serde", - "tauri-winrt-notification", - "zbus", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -2430,17 +2395,6 @@ dependencies = [ "objc_exception", ] -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - [[package]] name = "objc_exception" version = "0.1.2" @@ -2465,16 +2419,6 @@ version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" -[[package]] -name = "open" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" -dependencies = [ - "pathdiff", - "windows-sys 0.42.0", -] - [[package]] name = "openssl-probe" version = "0.1.5" @@ -2507,27 +2451,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "os_info" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" -dependencies = [ - "log", - "serde", - "winapi", -] - -[[package]] -name = "os_pipe" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "overload" version = "0.1.1" @@ -2614,12 +2537,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - [[package]] name = "percent-encoding" version = "2.2.0" @@ -2771,7 +2688,7 @@ dependencies = [ "base64 0.21.0", "indexmap", "line-wrap", - "quick-xml 0.28.2", + "quick-xml", "serde", "time", ] @@ -2882,15 +2799,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "quick-xml" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" -dependencies = [ - "memchr", -] - [[package]] name = "quick-xml" version = "0.28.2" @@ -3126,31 +3034,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "rfd" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cb2988ec50c9bcdb0c012b89643a6094a35a785a37897211ee62e1639342f7b" -dependencies = [ - "async-io", - "block", - "dispatch", - "futures-util", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "log", - "objc", - "objc-foundation", - "objc_id", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows 0.44.0", -] - [[package]] name = "ring" version = "0.16.20" @@ -3544,16 +3427,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "shared_child" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -3703,27 +3576,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "strum" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "swift-rs" version = "1.0.5" @@ -3770,7 +3622,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0fe581ad25d11420b873cf9aedaca0419c2b411487b134d4d21065f3d092055" dependencies = [ "cfg-expr", - "heck 0.4.1", + "heck", "pkg-config", "toml 0.7.3", "version-compare", @@ -3868,30 +3720,23 @@ dependencies = [ "glib", "glob", "gtk", - "heck 0.4.1", + "heck", "http", "ignore", "jni", "libc", "log", - "notify-rust", "objc", "once_cell", - "open", - "os_info", - "os_pipe", "percent-encoding", "rand 0.8.5", "raw-window-handle", - "regex", "reqwest", - "rfd", "semver", "serde", "serde_json", "serde_repr", "serialize-to-javascript", - "shared_child", "state", "swift-rs", "tar", @@ -3919,7 +3764,7 @@ dependencies = [ "anyhow", "cargo_toml", "filetime", - "heck 0.4.1", + "heck", "json-patch", "semver", "serde", @@ -3944,7 +3789,6 @@ dependencies = [ "png", "proc-macro2", "quote", - "regex", "semver", "serde", "serde_json", @@ -3963,7 +3807,7 @@ version = "2.0.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3b596485d89003d2d7869469b2830e9a846de9ac2eecd69bc7c24890234aefc" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "syn 1.0.109", @@ -4023,7 +3867,7 @@ dependencies = [ "brotli", "ctor", "glob", - "heck 0.4.1", + "heck", "html5ever", "infer", "json-patch", @@ -4052,17 +3896,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "tauri-winrt-notification" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58de036c4d2e20717024de2a3c4bf56c301f07b21bc8ef9b57189fce06f1f3b" -dependencies = [ - "quick-xml 0.23.1", - "strum", - "windows 0.39.0", -] - [[package]] name = "tempfile" version = "3.5.0" @@ -4830,19 +4663,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" -dependencies = [ - "windows_aarch64_msvc 0.39.0", - "windows_i686_gnu 0.39.0", - "windows_i686_msvc 0.39.0", - "windows_x86_64_gnu 0.39.0", - "windows_x86_64_msvc 0.39.0", -] - [[package]] name = "windows" version = "0.44.0" @@ -4982,12 +4802,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -5000,12 +4814,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_i686_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -5018,12 +4826,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -5036,12 +4838,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_x86_64_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -5066,12 +4862,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" diff --git a/asset/index.html b/asset/index.html deleted file mode 100644 index e69de29..0000000 diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 8d35bdc..eb14458 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["staticlib", "cdylib", "rlib"] tauri-build = { version = "2.0.0-alpha.4", features = [] } [dependencies] -tauri = { version = "2.0.0-alpha.8", features = ["api-all"] } +tauri = { version = "2.0.0-alpha.8", features = ["clipboard-all", "http-request"] } csv = "1.1.6" thiserror = "1.0.38" walkdir = "2.3.2" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index a12b757..80885e4 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -11,7 +11,12 @@ }, "tauri": { "allowlist": { - "all": true + "clipboard": { + "all": true + }, + "http": { + "request": true + } }, "bundle": { "active": true, @@ -47,7 +52,7 @@ } }, "security": { - "csp": null + "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'" }, "updater": { "active": false