diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 4ee85a4e..405bfdfb 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -71,7 +71,7 @@ dependencies = [ "clipboard-win 5.3.0", "core-graphics 0.23.1", "image", - "log 0.4.21", + "log", "objc", "objc-foundation", "objc_id", @@ -82,6 +82,12 @@ dependencies = [ "x11rb", ] +[[package]] +name = "ascii" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" + [[package]] name = "async-broadcast" version = "0.5.1" @@ -142,7 +148,7 @@ dependencies = [ "cfg-if 1.0.0", "concurrent-queue", "futures-lite 1.13.0", - "log 0.4.21", + "log", "parking", "polling 2.8.0", "rustix 0.37.27", @@ -315,16 +321,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -dependencies = [ - "byteorder", - "safemem", -] - [[package]] name = "base64" version = "0.13.1" @@ -429,20 +425,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bugsnag" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20015af8027d22db67e2c84f8b9f2c31b1efa0ec554d8b210c77acb7065d69bf" -dependencies = [ - "backtrace", - "hyper 0.10.16", - "serde", - "serde_derive", - "serde_json", - "sys-info", -] - [[package]] name = "bumpalo" version = "3.15.4" @@ -651,6 +633,22 @@ dependencies = [ "objc", ] +[[package]] +name = "cocoa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics 0.23.1", + "foreign-types 0.5.0", + "libc", + "objc", +] + [[package]] name = "cocoa-foundation" version = "0.1.2" @@ -1088,6 +1086,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + [[package]] name = "embed-resource" version = "2.4.2" @@ -1354,7 +1358,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "percent-encoding 2.3.1", + "percent-encoding", ] [[package]] @@ -1570,7 +1574,7 @@ checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" dependencies = [ "cc", "libc", - "log 0.4.21", + "log", "rustversion", "windows 0.48.0", ] @@ -1582,7 +1586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -1712,7 +1716,7 @@ checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "log 0.4.21", + "log", "regex-automata 0.4.6", "regex-syntax 0.8.2", ] @@ -1871,7 +1875,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" dependencies = [ - "log 0.4.21", + "log", "mac", "markup5ever", "proc-macro2", @@ -1919,25 +1923,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hyper" -version = "0.10.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" -dependencies = [ - "base64 0.9.3", - "httparse", - "language-tags", - "log 0.3.9", - "mime 0.2.6", - "num_cpus", - "time 0.1.45", - "traitobject", - "typeable", - "unicase", - "url 1.7.2", -] - [[package]] name = "hyper" version = "0.14.28" @@ -1969,7 +1954,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.28", + "hyper", "native-tls", "tokio", "tokio-native-tls", @@ -2014,17 +1999,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.5.0" @@ -2043,7 +2017,7 @@ checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" dependencies = [ "crossbeam-deque", "globset", - "log 0.4.21", + "log", "memchr", "regex-automata 0.4.6", "same-file", @@ -2135,6 +2109,15 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.8" @@ -2179,7 +2162,7 @@ dependencies = [ "cesu8", "combine", "jni-sys", - "log 0.4.21", + "log", "thiserror", "walkdir", ] @@ -2193,7 +2176,7 @@ dependencies = [ "cesu8", "combine", "jni-sys", - "log 0.4.21", + "log", "thiserror", "walkdir", ] @@ -2254,12 +2237,6 @@ dependencies = [ "selectors", ] -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.5.0" @@ -2321,15 +2298,6 @@ dependencies = [ "scopeguard", ] -[[package]] -name = "log" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -dependencies = [ - "log 0.4.21", -] - [[package]] name = "log" version = "0.4.21" @@ -2367,7 +2335,7 @@ dependencies = [ "dirs-next", "objc-foundation", "objc_id", - "time 0.3.34", + "time", ] [[package]] @@ -2385,7 +2353,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" dependencies = [ - "log 0.4.21", + "log", "phf 0.10.1", "phf_codegen 0.10.0", "string_cache", @@ -2432,15 +2400,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "mime" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" -dependencies = [ - "log 0.3.9", -] - [[package]] name = "mime" version = "0.3.17" @@ -2480,6 +2439,29 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "native-dialog" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84e7038885d2aeab236bd60da9e159a5967b47cde3292da3b15ff1bec27c039f" +dependencies = [ + "ascii", + "block", + "cocoa 0.25.0", + "core-foundation", + "dirs-next", + "objc", + "objc-foundation", + "objc_id", + "once_cell", + "raw-window-handle", + "thiserror", + "versions", + "wfd", + "which", + "winapi 0.3.9", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -2488,7 +2470,7 @@ checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", - "log 0.4.21", + "log", "openssl", "openssl-probe", "openssl-sys", @@ -2525,7 +2507,7 @@ checksum = "0d0c4a7b83860226e6b4183edac21851f05d5a51756e97a1144b7f5a6b63e65f" dependencies = [ "lazy_static", "libc", - "log 0.4.21", + "log", "ndk", "ndk-context", "ndk-macro", @@ -2606,7 +2588,7 @@ version = "4.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "827c5edfa80235ded4ab3fe8e9dc619b4f866ef16fe9b1c6b8a7f8692c0f2226" dependencies = [ - "log 0.4.21", + "log", "mac-notification-sys", "serde", "tauri-winrt-notification", @@ -2849,7 +2831,7 @@ version = "3.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" dependencies = [ - "log 0.4.21", + "log", "serde", "windows-sys 0.52.0", ] @@ -2936,12 +2918,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.3.1" @@ -3096,15 +3072,15 @@ dependencies = [ name = "phoenix-code-ide" version = "3.9.0" dependencies = [ - "bugsnag", "clipboard-files", "dialog", "fix-path-env", "gtk", "lazy_static", + "native-dialog", "objc", "once_cell", - "percent-encoding 2.3.1", + "percent-encoding", "regex", "serde", "serde_json", @@ -3160,7 +3136,7 @@ dependencies = [ "line-wrap", "quick-xml 0.31.0", "serde", - "time 0.3.34", + "time", ] [[package]] @@ -3187,7 +3163,7 @@ dependencies = [ "cfg-if 1.0.0", "concurrent-queue", "libc", - "log 0.4.21", + "log", "pin-project-lite", "windows-sys 0.48.0", ] @@ -3245,7 +3221,7 @@ dependencies = [ "proc-macro2", "quote", "syn 1.0.109", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -3256,7 +3232,7 @@ checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", - "version_check 0.9.4", + "version_check", ] [[package]] @@ -3466,15 +3442,15 @@ dependencies = [ "h2", "http", "http-body", - "hyper 0.14.28", + "hyper", "hyper-tls", "ipnet", "js-sys", - "log 0.4.21", - "mime 0.3.17", + "log", + "mime", "native-tls", "once_cell", - "percent-encoding 2.3.1", + "percent-encoding", "pin-project-lite", "rustls-pemfile", "serde", @@ -3486,7 +3462,7 @@ dependencies = [ "tokio-native-tls", "tokio-util", "tower-service", - "url 2.5.0", + "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", @@ -3507,7 +3483,7 @@ dependencies = [ "gtk-sys", "js-sys", "lazy_static", - "log 0.4.21", + "log", "objc", "objc-foundation", "objc_id", @@ -3592,12 +3568,6 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - [[package]] name = "same-file" version = "1.0.6" @@ -3661,7 +3631,7 @@ dependencies = [ "cssparser", "derive_more", "fxhash", - "log 0.4.21", + "log", "matches", "phf 0.8.0", "phf_codegen 0.8.0", @@ -3759,7 +3729,7 @@ dependencies = [ "serde_derive", "serde_json", "serde_with_macros", - "time 0.3.34", + "time", ] [[package]] @@ -4027,16 +3997,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" -[[package]] -name = "sys-info" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58283a48c9212afcade2069f8bbf7ded6a7bdbf4888d2defba72244c8e5f423c" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "sys-locale" version = "0.2.4" @@ -4106,7 +4066,7 @@ dependencies = [ "bitflags 1.3.2", "cairo-rs", "cc", - "cocoa", + "cocoa 0.24.1", "core-foundation", "core-graphics 0.22.3", "crossbeam-channel", @@ -4125,7 +4085,7 @@ dependencies = [ "jni 0.20.0", "lazy_static", "libc", - "log 0.4.21", + "log", "ndk", "ndk-context", "ndk-sys", @@ -4182,7 +4142,7 @@ dependencies = [ "base64 0.21.7", "bytes", "clap", - "cocoa", + "cocoa 0.24.1", "dirs-next", "dunce", "embed_plist", @@ -4205,7 +4165,7 @@ dependencies = [ "open", "os_info", "os_pipe", - "percent-encoding 2.3.1", + "percent-encoding", "rand 0.8.5", "raw-window-handle", "regex", @@ -4226,9 +4186,9 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", - "time 0.3.34", + "time", "tokio", - "url 2.5.0", + "url", "uuid", "webkit2gtk", "webview2-com", @@ -4276,7 +4236,7 @@ dependencies = [ "sha2", "tauri-utils", "thiserror", - "time 0.3.34", + "time", "uuid", "walkdir", ] @@ -4303,7 +4263,7 @@ checksum = "4536f5f6602e8fdfaa7b3b185076c2a0704f8eb7015f4e58461eb483ec3ed1f8" dependencies = [ "dirs 5.0.1", "interprocess", - "log 0.4.21", + "log", "objc2 0.4.1", "once_cell", "tauri-utils", @@ -4316,7 +4276,7 @@ name = "tauri-plugin-fs-extra" version = "0.0.0" source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#184f4edbbcfed8f8c057a15e02318e0ddcaab132" dependencies = [ - "log 0.4.21", + "log", "serde", "serde_json", "tauri", @@ -4328,7 +4288,7 @@ name = "tauri-plugin-single-instance" version = "0.0.0" source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#184f4edbbcfed8f8c057a15e02318e0ddcaab132" dependencies = [ - "log 0.4.21", + "log", "serde", "serde_json", "tauri", @@ -4344,7 +4304,7 @@ source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#184f4edb dependencies = [ "bincode", "bitflags 2.5.0", - "log 0.4.21", + "log", "serde", "serde_json", "tauri", @@ -4366,7 +4326,7 @@ dependencies = [ "serde_json", "tauri-utils", "thiserror", - "url 2.5.0", + "url", "uuid", "webview2-com", "windows 0.39.0", @@ -4379,9 +4339,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1989b3b4d611f5428b3414a4abae6fa6df30c7eb8ed33250ca90a5f7e5bb3655" dependencies = [ "arboard", - "cocoa", + "cocoa 0.24.1", "gtk", - "percent-encoding 2.3.1", + "percent-encoding", "rand 0.8.5", "raw-window-handle", "tauri-runtime", @@ -4408,7 +4368,7 @@ dependencies = [ "infer", "json-patch", "kuchikiki", - "log 0.4.21", + "log", "memchr", "phf 0.11.2", "proc-macro2", @@ -4418,7 +4378,7 @@ dependencies = [ "serde_json", "serde_with", "thiserror", - "url 2.5.0", + "url", "walkdir", "windows-version", ] @@ -4528,17 +4488,6 @@ dependencies = [ "weezl", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", -] - [[package]] name = "time" version = "0.3.34" @@ -4743,7 +4692,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" dependencies = [ - "log 0.4.21", + "log", "once_cell", "tracing-core", ] @@ -4766,12 +4715,6 @@ dependencies = [ "tracing-log", ] -[[package]] -name = "traitobject" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" - [[package]] name = "trash" version = "5.0.0" @@ -4780,7 +4723,7 @@ checksum = "8d8fbfb70b1fad5c0b788f9b2e1bf4d04e5ac6efa828f1ed9ee462c50ff9cf05" dependencies = [ "chrono", "libc", - "log 0.4.21", + "log", "objc2 0.5.2", "objc2-foundation", "once_cell", @@ -4818,12 +4761,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "typeable" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" - [[package]] name = "typenum" version = "1.17.0" @@ -4841,15 +4778,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "unicase" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" -dependencies = [ - "version_check 0.1.5", -] - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -4877,17 +4805,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.5.0" @@ -4895,8 +4812,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.5.0", - "percent-encoding 2.3.1", + "idna", + "percent-encoding", "serde", ] @@ -4953,15 +4870,19 @@ checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "version_check" -version = "0.1.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "version_check" -version = "0.9.4" +name = "versions" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "c73a36bc44e3039f51fbee93e39f41225f6b17b380eb70cc2aab942df06b34dd" +dependencies = [ + "itertools", + "nom", +] [[package]] name = "vswhom" @@ -5034,12 +4955,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -5063,7 +4978,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", - "log 0.4.21", + "log", "once_cell", "proc-macro2", "quote", @@ -5194,7 +5109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" dependencies = [ "dlib", - "log 0.4.21", + "log", "pkg-config", ] @@ -5216,7 +5131,7 @@ checksum = "fc6a3cffdb686fbb24d9fb8f03a213803277ed2300f11026a3afe1f108dc021b" dependencies = [ "jni 0.19.0", "ndk-glue", - "url 2.5.0", + "url", "web-sys", "widestring", "winapi 0.3.9", @@ -5313,6 +5228,28 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" +[[package]] +name = "wfd" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e713040b67aae5bf1a0ae3e1ebba8cc29ab2b90da9aa1bff6e09031a8a41d7a8" +dependencies = [ + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.32", +] + [[package]] name = "widestring" version = "0.5.1" @@ -5837,7 +5774,7 @@ checksum = "12b41773911497b18ca8553c3daaf8ec9fe9819caf93d451d3055f69de028adb" dependencies = [ "derive-new", "libc", - "log 0.4.21", + "log", "nix 0.28.0", "os_pipe", "tempfile", @@ -5857,7 +5794,7 @@ checksum = "00711278ed357350d44c749c286786ecac644e044e4da410d466212152383b45" dependencies = [ "base64 0.13.1", "block", - "cocoa", + "cocoa 0.24.1", "core-graphics 0.22.3", "crossbeam-channel", "dunce", @@ -5869,7 +5806,7 @@ dependencies = [ "http", "kuchikiki", "libc", - "log 0.4.21", + "log", "objc", "objc_id", "once_cell", @@ -5879,7 +5816,7 @@ dependencies = [ "soup2", "tao", "thiserror", - "url 2.5.0", + "url", "webkit2gtk", "webkit2gtk-sys", "webview2-com", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 956a9ce3..c5333213 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -20,8 +20,6 @@ percent-encoding = "2.3.1" regex = "1.10.4" clipboard-files = "0.1.1" trash = "5" -dialog = "0.3.0" -bugsnag = "=0.2.1" webbrowser = "0.7" serde = { version = "1.0.200", features = ["derive"] } tauri = { version = "1.6.2", features = [ "updater", "cli", "api-all", "devtools", "linux-protocol-headers"] } @@ -31,14 +29,19 @@ tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-works tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs" } +[target.'cfg(target_os = "windows")'.dependencies] +native-dialog = "0.7.0" + [target.'cfg(target_os = "linux")'.dependencies] gtk = "0.15" webkit2gtk = "0.18" # if tauri build fails, make sure to match this version to what we have in tauri +dialog = "0.3.0" [target.'cfg(target_os = "macos")'.dependencies] objc = "0.2.7" tauri-plugin-deep-link = "0.1.2" lazy_static = "1.4" +dialog = "0.3.0" [features] # by default Tauri runs in production mode diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 57d3d01e..736d718b 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -4,7 +4,6 @@ windows_subsystem = "windows" )] use std::env; use std::panic; -use bugsnag; use tauri::{Manager}; use std::path::PathBuf; @@ -27,8 +26,13 @@ extern crate webkit2gtk; extern crate objc; use clipboard_files; + +#[cfg(any(target_os = "macos", target_os = "linux"))] use dialog::DialogBox; +#[cfg(target_os = "windows")] +use native_dialog::{MessageDialog, MessageType}; + use regex::Regex; extern crate percent_encoding; use tauri::http::ResponseBuilder; @@ -274,32 +278,33 @@ fn main() { let panic_message = panic_info.payload().downcast_ref::<&str>().unwrap_or(&"No specific error message available"); eprintln!("Application panicked: {:?}", panic_message); - let mut api = bugsnag::Bugsnag::new("4dc115247125339aa551f3b11a5bee6b", env!("CARGO_MANIFEST_DIR")); - let args: Vec = env::args().collect(); - let executable_name = if !args.is_empty() { - // Get the executable name from the full path - let path = &args[0]; - path.split(std::path::MAIN_SEPARATOR) - .last() - .unwrap_or("unknown_executable") - .to_string() - } else { - "unknown_executable".to_string() - }; - api.set_app_info(Some(env!("CARGO_PKG_VERSION")), - Some(&executable_name), - Some("rust")); - // Construct the error message with the panic message included let error_message = format!( - "The app crashed unexpectedly with error: \n\n'{}'. \n\nWould you like to send an anonymised error report to help us fix the problem?", + "The app crashed unexpectedly with error: \n\n'{}'\n\nOpening support page. Would you like to send an anonymised error report to help us fix the problem?", panic_message ); - let choice = dialog::Question::new(&error_message) - .title("Oops! Phoenix Code Crashed :(") - .show() - .expect("Could not display dialog box"); + let mut should_log_to_bugsnag = false; + #[cfg(any(target_os = "macos", target_os = "linux"))] + { + let choice = dialog::Question::new(&error_message) + .title("Oops! Phoenix Code Crashed :(") + .show() + .expect("Could not display dialog box"); + if choice == dialog::Choice::Yes { + should_log_to_bugsnag = true; + } + } + + #[cfg(target_os = "windows")] + { + should_log_to_bugsnag = MessageDialog::new() + .set_type(MessageType::Error) + .set_title("Oops! Phoenix Code Crashed :(") + .set_text(&error_message) + .show_confirm() + .unwrap(); + } // take user to support page. maybe we will have some notifications pinned there if its a large scale outage let support_url = "https://github.com/orgs/phcode-dev/discussions"; @@ -308,9 +313,9 @@ fn main() { } else { println!("Failed to open support_url {}.", support_url); } - - if choice == dialog::Choice::Yes { - let _ = bugsnag::panic::handle(&api, panic_info, None); + if should_log_to_bugsnag { + // let _ = bugsnag::panic::handle(&api, panic_info, None); + println!("Log to bugsnag impl pending!"); } }));