From ced226de9bc098fe9aeb4ac8ea5e60fbc3248231 Mon Sep 17 00:00:00 2001 From: vicanso Date: Sat, 27 Jan 2024 11:32:49 +0800 Subject: [PATCH 1/3] refactor: adjust import api setting --- src-tauri/Cargo.lock | 749 ++++++++++-------- src-tauri/Cargo.toml | 14 +- src/commands/api_collection.ts | 2 +- src/commands/api_setting.ts | 28 +- src/commands/fake.ts | 4 +- src/commands/fn.ts | 4 +- src/commands/http_request.ts | 20 +- src/commands/import_api.ts | 6 +- src/commands/variable.ts | 2 +- src/components/APIResponse/index.tsx | 10 +- src/components/APISettingParams/index.tsx | 2 +- .../APISettingParams/req_params.tsx | 10 +- src/components/APISettingTree/header.tsx | 4 +- .../APISettingTree/item_dropdown.tsx | 14 +- src/components/APISettingTree/items.tsx | 10 +- src/components/ExDialog.tsx | 4 - src/components/ExKeyValue.tsx | 2 +- src/helpers/editor.ts | 2 +- src/i18n/index.ts | 2 +- src/router/index.ts | 4 +- src/stores/api_collection.ts | 14 +- src/stores/api_folder.ts | 6 +- src/stores/api_setting.ts | 2 +- src/stores/environment.ts | 2 +- src/stores/global_req_header.ts | 2 +- src/stores/setting.ts | 2 +- src/stores/variable.ts | 4 +- src/views/AppHeader.tsx | 8 +- src/views/Collection.tsx | 2 +- src/views/Dashboard.tsx | 4 +- 30 files changed, 506 insertions(+), 433 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 5aed108..ddc3b8e 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -29,19 +29,19 @@ version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -100,9 +100,28 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" + +[[package]] +name = "arboard" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "aafb29b107435aa276664c1db8954ac27a6e105cdad3c88287a199eb0e313c08" +dependencies = [ + "clipboard-win", + "core-graphics", + "image", + "log", + "objc", + "objc-foundation", + "objc_id", + "parking_lot", + "thiserror", + "winapi", + "x11rb", +] [[package]] name = "arrayvec" @@ -129,18 +148,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -182,7 +201,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" dependencies = [ - "nix", + "nix 0.27.1", "rand 0.8.5", ] @@ -215,9 +234,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -244,9 +263,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -280,9 +299,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9897ef0f1bd2362169de6d7e436ea2237dc1085d7d1e4db75f4be34d86f309d1" +checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" dependencies = [ "borsh-derive", "cfg_aliases", @@ -290,15 +309,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478b41ff04256c5c8330f3dfdaaae2a5cc976a8e75088bafa4625b0d0208de8c" +checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" dependencies = [ "once_cell", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "syn_derive", ] @@ -325,9 +344,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "serde", @@ -363,9 +382,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" [[package]] name = "byteorder" @@ -450,9 +469,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.5" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" +checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" dependencies = [ "smallvec", "target-lexicon", @@ -472,9 +491,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "41daef31d7a747c5c847246f36de49ced6f7403b4cdabc807a97b5cc184cda7a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -482,7 +501,18 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", +] + +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", ] [[package]] @@ -533,9 +563,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "convert_case" @@ -632,9 +662,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -665,56 +695,46 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crypto-common" @@ -750,24 +770,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "ctor" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" +checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "cyberapi" version = "0.1.18" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "brotli-decompressor", "chrono", "cookie 0.18.0", @@ -814,7 +834,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -825,7 +845,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -847,9 +867,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -956,11 +976,12 @@ dependencies = [ [[package]] name = "embed-resource" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54cc3e827ee1c3812239a9a41dede7b4d7d5d5464faa32d71bd7cba28ce2cb2" +checksum = "3bde55e389bea6a966bd467ad1ad7da0ae14546a5bc794d16d1e55e7fca44881" dependencies = [ "cc", + "memchr", "rustc_version", "toml 0.8.8", "vswhom", @@ -998,6 +1019,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + [[package]] name = "etcetera" version = "0.8.0" @@ -1023,9 +1054,9 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" dependencies = [ "simd-adler32", ] @@ -1036,7 +1067,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset", + "memoffset 0.9.0", "rustc_version", ] @@ -1127,9 +1158,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1141,9 +1172,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1151,15 +1182,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -1179,38 +1210,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -1342,6 +1373,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -1355,9 +1396,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", @@ -1460,7 +1501,7 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.3", + "regex-automata 0.4.4", "regex-syntax 0.8.2", ] @@ -1545,7 +1586,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", ] [[package]] @@ -1554,7 +1595,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "allocator-api2", ] @@ -1587,9 +1628,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -1599,9 +1640,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -1617,25 +1658,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "html5ever" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" -dependencies = [ - "log", - "mac", - "markup5ever 0.10.1", - "proc-macro2", - "quote", - "syn 1.0.109", + "windows-sys 0.52.0", ] [[package]] @@ -1646,7 +1673,7 @@ checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" dependencies = [ "log", "mac", - "markup5ever 0.11.0", + "markup5ever", "proc-macro2", "quote", "syn 1.0.109", @@ -1694,9 +1721,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -1708,7 +1735,7 @@ dependencies = [ "httpdate", "itoa 1.0.10", "pin-project-lite", - "socket2 0.4.10", + "socket2", "tokio", "tower-service", "tracing", @@ -1745,9 +1772,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1804,15 +1831,15 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.4", "same-file", "walkdir", "winapi-util", @@ -1820,15 +1847,16 @@ dependencies = [ [[package]] name = "image" -version = "0.24.7" +version = "0.24.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" dependencies = [ "bytemuck", "byteorder", "color_quant", - "num-rational", "num-traits", + "png", + "tiff", ] [[package]] @@ -1864,13 +1892,13 @@ dependencies = [ [[package]] name = "inherent" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce243b1bfa62ffc028f1cc3b6034ec63d649f3031bc8a4fbbb004e1ac17d1f68" +checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -1946,11 +1974,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jpeg-decoder" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" + [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -1967,18 +2001,6 @@ dependencies = [ "treediff", ] -[[package]] -name = "kuchiki" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" -dependencies = [ - "cssparser", - "html5ever 0.25.2", - "matches", - "selectors", -] - [[package]] name = "kuchikiki" version = "0.8.2" @@ -1986,7 +2008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" dependencies = [ "cssparser", - "html5ever 0.26.0", + "html5ever", "indexmap 1.9.3", "matches", "selectors", @@ -2003,9 +2025,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.150" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libflate" @@ -2043,7 +2065,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", "redox_syscall", ] @@ -2070,9 +2092,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -2120,20 +2142,6 @@ dependencies = [ "libc", ] -[[package]] -name = "markup5ever" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" -dependencies = [ - "log", - "phf 0.8.0", - "phf_codegen 0.8.0", - "string_cache", - "string_cache_codegen", - "tendril", -] - [[package]] name = "markup5ever" version = "0.11.0" @@ -2175,9 +2183,18 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "memoffset" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] [[package]] name = "memoffset" @@ -2249,13 +2266,25 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "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", + "bitflags 2.4.2", "cfg-if", "libc", ] @@ -2335,17 +2364,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.17" @@ -2428,9 +2446,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -2488,7 +2506,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -2670,7 +2688,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -2735,9 +2753,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "plist" @@ -2745,7 +2763,7 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "indexmap 2.1.0", "line-wrap", "quick-xml", @@ -2755,9 +2773,9 @@ dependencies = [ [[package]] name = "png" -version = "0.17.10" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" +checksum = "1f6c3c3e617595665b8ea2ff95a86066be38fb121ff920a9c0eb282abcd1da5a" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -2796,11 +2814,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.20.7", + "toml_edit 0.21.0", ] [[package]] @@ -2835,9 +2853,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -2889,9 +2907,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2962,7 +2980,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", ] [[package]] @@ -3004,20 +3022,20 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.4", "regex-syntax 0.8.2", ] @@ -3032,9 +3050,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ "aho-corasick", "memchr", @@ -3093,7 +3111,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", - "getrandom 0.2.11", + "getrandom 0.2.12", "libc", "spin 0.9.8", "untrusted", @@ -3102,12 +3120,13 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.42" +version = "0.7.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" +checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" dependencies = [ "bitvec", "bytecheck", + "bytes", "hashbrown 0.12.3", "ptr_meta", "rend", @@ -3119,9 +3138,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.42" +version = "0.7.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" +checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" dependencies = [ "proc-macro2", "quote", @@ -3187,11 +3206,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.27" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfeae074e687625746172d639330f1de242a178bf3189b51e35a7a21573513ac" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", "linux-raw-sys", @@ -3228,7 +3247,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] @@ -3249,9 +3268,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "safemem" @@ -3270,11 +3289,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3309,14 +3328,14 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "sea-orm" -version = "0.12.9" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5181eedee8ad0d002d2a288600140fe9937581c4668426a4ff1295c14c736cf" +checksum = "0cbf88748872fa54192476d6d49d0775e208566a72656e267e45f6980b926c8d" dependencies = [ "async-stream", "async-trait", @@ -3342,23 +3361,23 @@ dependencies = [ [[package]] name = "sea-orm-macros" -version = "0.12.6" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816183a751bf9c22087679b20b6142da0b5c6d8981835ebb7b99bf1bf924640a" +checksum = "e0dbc880d47aa53c6a572e39c99402c7fad59b50766e51e0b0fc1306510b0555" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "sea-bae", - "syn 2.0.39", + "syn 2.0.48", "unicode-ident", ] [[package]] name = "sea-query" -version = "0.30.4" +version = "0.30.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41558fa9bb5f4d73952dac0b9d9c2ce23966493fc9ee0008037b01d709838a68" +checksum = "4166a1e072292d46dc91f31617c2a1cdaf55a8be4b5c9f4bf2ba248e3ac4999b" dependencies = [ "bigdecimal", "chrono", @@ -3438,38 +3457,38 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa 1.0.10", "ryu", @@ -3478,31 +3497,31 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "serde_spanned" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] [[package]] name = "serde_with" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +checksum = "f5c9fdb6b00a489875b22efd4b78fe2b363b72265cc5f6eb2e2b9ee270e6140c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", @@ -3515,14 +3534,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +checksum = "dbff351eb4b33600a2e138dfa0b10b65a238ea8ff8fb2387c422c5022a3e8298" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -3627,19 +3646,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" - -[[package]] -name = "socket2" -version = "0.4.10" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "socket2" @@ -3734,7 +3743,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "atoi", "bigdecimal", "byteorder", @@ -3823,9 +3832,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" dependencies = [ "atoi", - "base64 0.21.5", + "base64 0.21.7", "bigdecimal", - "bitflags 2.4.1", + "bitflags 2.4.2", "byteorder", "bytes", "chrono", @@ -3870,9 +3879,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" dependencies = [ "atoi", - "base64 0.21.5", + "base64 0.21.7", "bigdecimal", - "bitflags 2.4.1", + "bitflags 2.4.2", "byteorder", "chrono", "crc", @@ -3955,6 +3964,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + [[package]] name = "string_cache" version = "0.8.7" @@ -4014,7 +4029,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4036,9 +4051,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -4054,7 +4069,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4089,7 +4104,7 @@ version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" dependencies = [ - "cfg-expr 0.15.5", + "cfg-expr 0.15.6", "heck 0.4.1", "pkg-config", "toml 0.8.8", @@ -4098,9 +4113,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.16.5" +version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f5aefd6be4cd3ad3f047442242fd9f57cbfb3e565379f66b5e14749364fa4f" +checksum = "d22205b267a679ca1c590b9f178488d50981fc3e48a1b91641ae31593db875ce" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -4173,15 +4188,15 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.12" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tauri" -version = "1.5.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d563b672acde8d0cc4c1b1f5b855976923f67e8d6fe1eba51df0211e197be2" +checksum = "fd27c04b9543776a972c86ccf70660b517ecabbeced9fb58d8b961a13ad129af" dependencies = [ "anyhow", "cocoa", @@ -4227,9 +4242,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defbfc551bd38ab997e5f8e458f87396d2559d05ce32095076ad6c30f7fc5f9c" +checksum = "e9914a4715e0b75d9f387a285c7e26b5bbfeb1249ad9f842675a82481565c532" dependencies = [ "anyhow", "cargo_toml", @@ -4246,11 +4261,11 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3475e55acec0b4a50fb96435f19631fb58cbcd31923e1a213de5c382536bbb" +checksum = "a1554c5857f65dbc377cefb6b97c8ac77b1cb2a90d30d3448114d5d6b48a77fc" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "brotli", "ico", "json-patch", @@ -4271,9 +4286,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acea6445eececebd72ed7720cfcca46eee3b5bad8eb408be8f7ef2e3f7411500" +checksum = "277abf361a3a6993ec16bcbb179de0d6518009b851090a01adfea12ac89fa875" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -4285,9 +4300,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07f8e9e53e00e9f41212c115749e87d5cd2a9eebccafca77a19722eeecd56d43" +checksum = "cf2d0652aa2891ff3e9caa2401405257ea29ab8372cce01f186a5825f1bd0e76" dependencies = [ "gtk", "http", @@ -4306,10 +4321,11 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "803a01101bc611ba03e13329951a1bde44287a54234189b9024b78619c1bc206" +checksum = "6cae61fbc731f690a4899681c9052dde6d05b159b44563ace8186fc1bfb7d158" dependencies = [ + "arboard", "cocoa", "gtk", "percent-encoding", @@ -4326,16 +4342,16 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a52165bb340e6f6a75f1f5eeeab1bb49f861c12abe3a176067d53642b5454986" +checksum = "ece74810b1d3d44f29f732a7ae09a63183d63949bbdd59c61f8ed2a1b70150db" dependencies = [ "brotli", "ctor", "dunce", "glob", "heck 0.4.1", - "html5ever 0.26.0", + "html5ever", "infer", "json-patch", "kuchikiki", @@ -4366,15 +4382,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", "fastrand", "redox_syscall", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4396,22 +4412,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4424,11 +4440,22 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tiff" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + [[package]] name = "time" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ "deranged", "itoa 1.0.10", @@ -4446,9 +4473,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ "time-core", ] @@ -4470,9 +4497,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.0" +version = "1.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" dependencies = [ "backtrace", "bytes", @@ -4481,7 +4508,7 @@ dependencies = [ "num_cpus", "parking_lot", "pin-project-lite", - "socket2 0.5.5", + "socket2", "windows-sys 0.48.0", ] @@ -4571,17 +4598,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap 2.1.0", - "toml_datetime", - "winnow", -] - [[package]] name = "toml_edit" version = "0.21.0" @@ -4621,7 +4637,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4686,9 +4702,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -4749,11 +4765,11 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "uuid" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.12", "serde", ] @@ -4840,9 +4856,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4850,24 +4866,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -4877,9 +4893,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4887,28 +4903,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -5005,6 +5021,12 @@ dependencies = [ "windows-metadata", ] +[[package]] +name = "weezl" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" + [[package]] name = "whoami" version = "1.4.1" @@ -5036,6 +5058,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -5090,11 +5121,11 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] @@ -5388,9 +5419,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.26" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67b5f0a4e7a27a64c651977932b9dc5667ca7fc31ac44b03ed37a0cf42fdfff" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] @@ -5407,9 +5438,9 @@ dependencies = [ [[package]] name = "wry" -version = "0.24.6" +version = "0.24.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a70547e8f9d85da0f5af609143f7bde3ac7457a6e1073104d9b73d6c5ac744" +checksum = "6ad85d0e067359e409fcb88903c3eac817c392e5d638258abfb3da5ad8ba6fc4" dependencies = [ "base64 0.13.1", "block", @@ -5421,9 +5452,9 @@ dependencies = [ "gio", "glib", "gtk", - "html5ever 0.25.2", + "html5ever", "http", - "kuchiki", + "kuchikiki", "libc", "log", "objc", @@ -5473,33 +5504,57 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" +dependencies = [ + "gethostname", + "nix 0.26.4", + "winapi", + "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" +dependencies = [ + "nix 0.26.4", +] + [[package]] name = "xattr" -version = "1.1.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc6ab6ec1907d1a901cdbcd2bd4cb9e7d64ce5c9739cbb97d3c391acd8c7fae" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", + "linux-raw-sys", + "rustix", ] [[package]] name = "zerocopy" -version = "0.7.30" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.30" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index cc9ed20..228c5b5 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -19,19 +19,19 @@ brotli-decompressor = "2.5.1" chrono = "0.4.31" cookie = "0.18.0" cookie_store = "0.20.0" -hyper = { version = "0.14.27", features = ["client", "http1"] } +hyper = { version = "0.14.28", features = ["client", "http1"] } hyper-rustls = "0.24.1" hyper-timeout = "0.4.1" libflate = "2.0.0" once_cell = "1.18.0" -sea-orm = { version = "0.12.9", features = ["sqlx-sqlite", "runtime-tokio-rustls", "with-json"] } -serde = { version = "1.0.192", features = ["derive"] } -serde_json = "1.0.108" +sea-orm = { version = "0.12.10", features = ["sqlx-sqlite", "runtime-tokio-rustls", "with-json"] } +serde = { version = "1.0.195", features = ["derive"] } +serde_json = "1.0.111" strum = "0.25.0" strum_macros = "0.25.1" -tauri = { version = "1.5.3", features = ["app-hide", "clipboard-all", "dialog-all", "fs-exists", "fs-read-dir", "fs-read-file", "fs-write-file", "os-all", "path-all", "process-all", "window-all"] } -time = "0.3.30" -tokio = { version = "1.35.0", features = ["parking_lot"] } +tauri = { version = "1.5.4", features = ["app-hide", "clipboard-all", "dialog-all", "fs-exists", "fs-read-dir", "fs-read-file", "fs-write-file", "os-all", "path-all", "process-all", "window-all"] } +time = "0.3.31" +tokio = { version = "1.35.1", features = ["parking_lot"] } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } url = "2.4.0" diff --git a/src/commands/api_collection.ts b/src/commands/api_collection.ts index fd79604..217eb8c 100644 --- a/src/commands/api_collection.ts +++ b/src/commands/api_collection.ts @@ -38,7 +38,7 @@ export function newDefaultAPICollection(): APICollection { } export async function createAPICollection( - collection: APICollection + collection: APICollection, ): Promise { if (isWebMode()) { await fakeAdd(store, collection); diff --git a/src/commands/api_setting.ts b/src/commands/api_setting.ts index 163da41..d874da4 100644 --- a/src/commands/api_setting.ts +++ b/src/commands/api_setting.ts @@ -47,13 +47,33 @@ export async function createAPISetting(setting: APISetting): Promise { await fakeAdd(store, setting); return; } - await run(cmdAddAPISetting, { - setting, - }); + if (!setting.id) { + setting.id = ulid(); + } + try { + await run(cmdAddAPISetting, { + setting, + }); + } catch (err) { + let catchError = false; + if (err instanceof Error) { + const message = err.message; + if (message.includes("seaOrm") && message.includes("UNIQUE constraint failed")) { + catchError = true; + setting.id = ulid(); + await run(cmdAddAPISetting, { + setting, + }); + } + } + if (!catchError) { + throw err; + } + } } export async function listAPISetting( - collection: string + collection: string, ): Promise { if (isWebMode()) { const settings = await fakeList(store); diff --git a/src/commands/fake.ts b/src/commands/fake.ts index b2c3c78..4e619fc 100644 --- a/src/commands/fake.ts +++ b/src/commands/fake.ts @@ -49,7 +49,7 @@ export async function fakeUpdate(storeName: string, data: T) { export async function fakeDeleteAPICollection( storeName: string, - id: string + id: string, ) { // 暂时简单删除collection const result = await fakeList(storeName); @@ -67,7 +67,7 @@ export async function fakeDeleteAPICollection( export async function fakeDeleteItems( storeName: string, - ids: string[] + ids: string[], ) { const result = await fakeList(storeName); const arr = [] as unknown[]; diff --git a/src/commands/fn.ts b/src/commands/fn.ts index a313747..9ab3883 100644 --- a/src/commands/fn.ts +++ b/src/commands/fn.ts @@ -188,11 +188,11 @@ export async function doFnHandler(handler: FnHandler): Promise { const name = toString(p); const arr = await listVariable( collection, - VariableCategory.Customize + VariableCategory.Customize, ); const found = arr.find( (item) => - item.enabled === VariableStatus.Enabled && item.name === name + item.enabled === VariableStatus.Enabled && item.name === name, ); if (found) { p = found.value; diff --git a/src/commands/http_request.ts b/src/commands/http_request.ts index c91ca82..e101fd3 100644 --- a/src/commands/http_request.ts +++ b/src/commands/http_request.ts @@ -68,7 +68,7 @@ function convertKVListToURLValues(kvList: KVParam[]) { export async function convertRequestToCURL( collection: string, req: HTTPRequest, - cookies: Cookie[] + cookies: Cookie[], ) { await convertKVParams(collection, req.query); await convertKVParams(collection, req.headers); @@ -128,7 +128,7 @@ export async function convertRequestToCURL( } const method = req.method || "GET"; return `curl -v -X${method.toUpperCase()}${body}${headerList.join( - " " + " ", )} '${uri}'`; } @@ -212,9 +212,13 @@ async function convertMultipartForm(body: string): Promise { if (item.value.startsWith(fileProtocol)) { const file = item.value.substring(fileProtocol.length); const fileData = await readBinaryFile(file); - form.append(item.key, new Blob([fileData], { - type: mime.getType(file) || "", - }), file); + form.append( + item.key, + new Blob([fileData], { + type: mime.getType(file) || "", + }), + file, + ); continue; } @@ -270,7 +274,7 @@ export async function doHTTPRequest(options: { // 非此类请求,将body设置为空 if ( ![HTTPMethod.POST, HTTPMethod.PATCH, HTTPMethod.PUT].includes( - method as HTTPMethod + method as HTTPMethod, ) ) { body = ""; @@ -287,8 +291,8 @@ export async function doHTTPRequest(options: { } result.push( `${window.encodeURIComponent(item.key)}=${window.encodeURIComponent( - item.value - )}` + item.value, + )}`, ); }); body = result.join("&"); diff --git a/src/commands/import_api.ts b/src/commands/import_api.ts index 0c19872..5bcdc7c 100644 --- a/src/commands/import_api.ts +++ b/src/commands/import_api.ts @@ -142,7 +142,7 @@ function convertSwaggerSetting(params: { basePathENV.name = name.replace(/ /g, ""); basePathENV.value = `${get(json, "schemes.0")}://${get(json, "host")}${get( json, - "basePath" + "basePath", )}`; environments.push(basePathENV); const folderDict = new Map(); @@ -179,7 +179,7 @@ function convertSwaggerSetting(params: { } else { bodyData[key] = v || ""; } - } + }, ); body = JSON.stringify(bodyData, null, 4); } @@ -444,7 +444,7 @@ export async function importAPI(params: { } }); arr = arr.filter((item) => - ["request", "request_group"].includes(item._type) + ["request", "request_group"].includes(item._type), ); arr.sort((item1, item2) => { diff --git a/src/commands/variable.ts b/src/commands/variable.ts index f152bb8..3bcf0b5 100644 --- a/src/commands/variable.ts +++ b/src/commands/variable.ts @@ -68,7 +68,7 @@ export async function createVariable(value: Variable) { export async function listVariable( collection: string, - category: string + category: string, ): Promise { if (isWebMode()) { return await fakeList(store); diff --git a/src/components/APIResponse/index.tsx b/src/components/APIResponse/index.tsx index 89d28ee..77d20b4 100644 --- a/src/components/APIResponse/index.tsx +++ b/src/components/APIResponse/index.tsx @@ -237,7 +237,7 @@ export default defineComponent({ const value = await convertRequestToCURL( collection, req, - cookieStore.cookies + cookieStore.cookies, ); if (value.length > showCurlLimitSize) { await writeTextToClipboard(value); @@ -253,7 +253,7 @@ export default defineComponent({ (resp) => { fillValues(resp); editorIns?.setScrollTop(0); - } + }, ); const codeEditor = ref(); @@ -420,7 +420,7 @@ export default defineComponent({ label: i18nCollection("contentTransfer"), key: "contentTransfer", value: formatLatency(stats.contentTransfer), - } + }, ); } @@ -439,7 +439,7 @@ export default defineComponent({ cookieDescriptionItems.push( {arr.slice(1).join("=")} - + , ); return; } @@ -450,7 +450,7 @@ export default defineComponent({ span={3} > {value} - + , ); }); }); diff --git a/src/components/APISettingParams/index.tsx b/src/components/APISettingParams/index.tsx index 98b08c7..1607152 100644 --- a/src/components/APISettingParams/index.tsx +++ b/src/components/APISettingParams/index.tsx @@ -126,7 +126,7 @@ export default defineComponent({ params: { body: string; contentType: string; - } + }, ) => { // 因为是延时执行,如果已经切换,则不更新 // 避免更新了其它接口的数据 diff --git a/src/components/APISettingParams/req_params.tsx b/src/components/APISettingParams/req_params.tsx index 42b338a..b202699 100644 --- a/src/components/APISettingParams/req_params.tsx +++ b/src/components/APISettingParams/req_params.tsx @@ -98,13 +98,13 @@ const tabClass = css` function shouldHaveBody(method: string) { return [HTTPMethod.POST, HTTPMethod.PUT, HTTPMethod.PATCH].includes( - method as HTTPMethod + method as HTTPMethod, ); } function shouldShowEditor(contentType: string) { return [ContentType.JSON, ContentType.XML, ContentType.Plain].includes( - contentType as ContentType + contentType as ContentType, ); } @@ -130,7 +130,7 @@ function createBodyBadge(params: { contentType: string; body: string }) { const { contentType, body } = params; if ( ![ContentType.Multipart, ContentType.Form].includes( - contentType as ContentType + contentType as ContentType, ) ) { return; @@ -304,7 +304,7 @@ export default defineComponent({ } else { activeTab.value = TabItem.Query; } - } + }, ); const handleUpdateActiveTab = async (activeTab: string) => { try { @@ -383,7 +383,7 @@ export default defineComponent({ case TabItem.Body: { const label = contentTypeOptions.find( - (opt) => opt.key === contentType + (opt) => opt.key === contentType, ); if (activeTab !== TabItem.Body) { const badge = createBodyBadge({ diff --git a/src/components/APISettingTree/header.tsx b/src/components/APISettingTree/header.tsx index 6f6195d..7853c26 100644 --- a/src/components/APISettingTree/header.tsx +++ b/src/components/APISettingTree/header.tsx @@ -88,7 +88,7 @@ export default defineComponent({ const collection = route.query.collection as string; const addHTTPSetting = inject( addHTTPSettingKey, - addHTTPSettingDefaultValue + addHTTPSettingDefaultValue, ); const addFolder = inject(addFolderKey, addFolderDefaultValue); @@ -161,7 +161,7 @@ export default defineComponent({ const options: DropdownMixedOption[] = [ { label: `${i18nCollection( - "newHTTPRequest" + "newHTTPRequest", )} | ${hotKeyCreateHTTPSetting()}`, key: SettingType.HTTP, icon: () => ( diff --git a/src/components/APISettingTree/item_dropdown.tsx b/src/components/APISettingTree/item_dropdown.tsx index 6b010c4..fe55233 100644 --- a/src/components/APISettingTree/item_dropdown.tsx +++ b/src/components/APISettingTree/item_dropdown.tsx @@ -69,7 +69,7 @@ export default defineComponent({ const addHTTPSetting = inject( addHTTPSettingKey, - addHTTPSettingDefaultValue + addHTTPSettingDefaultValue, ); const addFolder = inject(addFolderKey, addFolderDefaultValue); @@ -133,7 +133,7 @@ export default defineComponent({ { const content = i18nCollection("deleteSettingContent").replace( "%s", - name + name, ); const d = dialog.warning({ title: i18nCollection("deleteSetting"), @@ -205,7 +205,7 @@ export default defineComponent({ return convertRequestToCURL( collection, req, - cookieStore.cookies + cookieStore.cookies, ); }) .then(writeTextToClipboard) @@ -286,7 +286,7 @@ export default defineComponent({ ), - } + }, ); options.push( { @@ -306,7 +306,7 @@ export default defineComponent({ ), - } + }, ); } else { options.push( @@ -337,7 +337,7 @@ export default defineComponent({ ), - } + }, ); } options.push( @@ -353,7 +353,7 @@ export default defineComponent({ ), - } + }, ); return ( { // TODO 如果是最后一个元素的处理 // isOver move 与 target 是否重叠 @@ -415,7 +415,7 @@ export default defineComponent({ } await collectionStore.updateTopTreeItems( collection, - uniq(topTreeItemIDList) + uniq(topTreeItemIDList), ); } } catch (err) { @@ -504,10 +504,10 @@ export default defineComponent({ isDragging = false; const moveItemIndex = Number.parseInt( - nodeGetDataValue(moveTarget, "index") + nodeGetDataValue(moveTarget, "index"), ); const targetItemIndex = Number.parseInt( - nodeGetDataValue(listItems[currentInsertIndex], "index") + nodeGetDataValue(listItems[currentInsertIndex], "index"), ); nodeRemove(moveTarget); @@ -740,7 +740,7 @@ export default defineComponent({ /> )} {item.id !== renameItem.id && {item.name}} - + , ); treeItemIndex++; // 未展开的则不需要展示子元素 diff --git a/src/components/ExDialog.tsx b/src/components/ExDialog.tsx index f6afed3..67823a3 100644 --- a/src/components/ExDialog.tsx +++ b/src/components/ExDialog.tsx @@ -161,10 +161,6 @@ const ImportEditor = defineComponent({ }); } - // 如果只有一个,则选中导入的配置 - if (topIDList.length === 1) { - apiSettingStore.select(topIDList[0]); - } // 重新加载数据,触发页面刷新 await apiFolderStore.fetch(props.collection); await apiSettingStore.fetch(props.collection); diff --git a/src/components/ExKeyValue.tsx b/src/components/ExKeyValue.tsx index fd40178..579863a 100644 --- a/src/components/ExKeyValue.tsx +++ b/src/components/ExKeyValue.tsx @@ -92,7 +92,7 @@ export default defineComponent({ id: ulid(), isNew: false, }, - item + item, ); }); const kvList = ref(arr as KVItem[]); diff --git a/src/helpers/editor.ts b/src/helpers/editor.ts index d926143..f3a3a89 100644 --- a/src/helpers/editor.ts +++ b/src/helpers/editor.ts @@ -23,7 +23,7 @@ export function createEditor(params: { // 替换内容 export function replaceContent( editor: editor.IStandaloneCodeEditor | null, - content: string + content: string, ) { if (!editor) { return; diff --git a/src/i18n/index.ts b/src/i18n/index.ts index ae82e65..2e00dc2 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -44,7 +44,7 @@ export function changeI18nLocale(locale: string) { export function i18nGet( key: string, - named: Record = {} + named: Record = {}, ): string { return i18n.global.t(key, named); } diff --git a/src/router/index.ts b/src/router/index.ts index 013393e..80c772e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -19,7 +19,7 @@ export function goTo( params?: { replace?: boolean; query?: LocationQueryRaw; - } + }, ): void { router.push({ name, @@ -39,7 +39,7 @@ let finishEvent = noop; export function setLoadingEvent( start: loadingEvent, - finish: loadingEvent + finish: loadingEvent, ): void { startEvent = start; finishEvent = finish; diff --git a/src/stores/api_collection.ts b/src/stores/api_collection.ts index 9d097e5..93b1fe7 100644 --- a/src/stores/api_collection.ts +++ b/src/stores/api_collection.ts @@ -24,7 +24,7 @@ interface TabActiveData { async function toggleFolderExpanded( collection: string, folder: string, - expanded: boolean + expanded: boolean, ) { let items = await getExpandedSettingStore().getItem(collection); if (!items) { @@ -63,9 +63,8 @@ export const useAPICollectionStore = defineStore("apiCollections", { this.expandedFolders = items; }, async fetchExpandedFolders(collection: string) { - const items = await getExpandedSettingStore().getItem( - collection - ); + const items = + await getExpandedSettingStore().getItem(collection); if (items) { this.expandedFolders = items; } @@ -77,9 +76,8 @@ export const useAPICollectionStore = defineStore("apiCollections", { } }, async fetchActiveTabs() { - const data = await getTabActiveStore().getItem( - tabActiveKey - ); + const data = + await getTabActiveStore().getItem(tabActiveKey); this.activeTabs = data || {}; }, getActiveTab(id: string) { @@ -98,7 +96,7 @@ export const useAPICollectionStore = defineStore("apiCollections", { } await getTabActiveStore().setItem( tabActiveKey, - Object.assign({}, this.activeTabs) + Object.assign({}, this.activeTabs), ); }, async updateTopTreeItems(collection: string, idList: string[]) { diff --git a/src/stores/api_folder.ts b/src/stores/api_folder.ts index 74577d2..0b48592 100644 --- a/src/stores/api_folder.ts +++ b/src/stores/api_folder.ts @@ -86,7 +86,7 @@ export const useAPIFolderStore = defineStore("apiFolders", { const addChild = ( children: string, child: string, - beforeItem: string + beforeItem: string, ) => { const arr = compact(children.split(",")); const index = arr.indexOf(beforeItem); @@ -113,7 +113,7 @@ export const useAPIFolderStore = defineStore("apiFolders", { currentFolder.children = addChild( currentFolder.children, child, - params.before || "" + params.before || "", ); updateData.set(currentFolder.id, currentFolder); } @@ -160,7 +160,7 @@ export const useAPIFolderStore = defineStore("apiFolders", { const folderIds = result.folders || []; const settingIds = result.settings || []; this.apiFolders = this.apiFolders.filter( - (item) => !folderIds.includes(item.id) + (item) => !folderIds.includes(item.id), ); settingStore.apiSettings = settingStore.apiSettings.filter((item) => { return !settingIds.includes(item.id); diff --git a/src/stores/api_setting.ts b/src/stores/api_setting.ts index 6d57bc9..b35271d 100644 --- a/src/stores/api_setting.ts +++ b/src/stores/api_setting.ts @@ -127,7 +127,7 @@ export const useAPISettingStore = defineStore("apiSettings", { // 先获取所有api setting,再获取选中id this.apiSettings = await listAPISetting(collection); this.selectedID = (await getAPISettingStore().getItem( - selectedIDKey + selectedIDKey, )) as string; this.setWindowTitle(this.selectedID); } finally { diff --git a/src/stores/environment.ts b/src/stores/environment.ts index 20b42be..34778ac 100644 --- a/src/stores/environment.ts +++ b/src/stores/environment.ts @@ -4,5 +4,5 @@ export const ENVRegexp = /\{\{([\S\s]+)\}\}/; export const useEnvironmentStore = newVariableStore( "environments", - VariableCategory.Environment + VariableCategory.Environment, ); diff --git a/src/stores/global_req_header.ts b/src/stores/global_req_header.ts index 764b51b..eb76db3 100644 --- a/src/stores/global_req_header.ts +++ b/src/stores/global_req_header.ts @@ -3,5 +3,5 @@ import { newVariableStore } from "./variable"; export const useGlobalReqHeaderStore = newVariableStore( "globalReqHeaders", - VariableCategory.GlobalReqHeaders + VariableCategory.GlobalReqHeaders, ); diff --git a/src/stores/setting.ts b/src/stores/setting.ts index 5cc6959..99f37de 100644 --- a/src/stores/setting.ts +++ b/src/stores/setting.ts @@ -132,7 +132,7 @@ export const useSettingStore = defineStore("common", { write: 0, read: 0, }, - setting.timeout + setting.timeout, ); } catch (err) { // 获取失败则忽略 diff --git a/src/stores/variable.ts b/src/stores/variable.ts index 6321455..f891022 100644 --- a/src/stores/variable.ts +++ b/src/stores/variable.ts @@ -13,7 +13,7 @@ import { export const useCustomizeStore = newVariableStore( "customizeVariables", - VariableCategory.Customize + VariableCategory.Customize, ); export function newVariableStore(name: string, category: string) { @@ -61,7 +61,7 @@ export function newVariableStore(name: string, category: string) { }, listEnable(): Variable[] { return this.variables.filter( - (item) => item.enabled === VariableStatus.Enabled + (item) => item.enabled === VariableStatus.Enabled, ); }, async update(value: Variable) { diff --git a/src/views/AppHeader.tsx b/src/views/AppHeader.tsx index 01fcdd9..8d61381 100644 --- a/src/views/AppHeader.tsx +++ b/src/views/AppHeader.tsx @@ -124,7 +124,7 @@ export default defineComponent({ () => route.name, (value) => { currentRoute.value = value; - } + }, ); const { breadcrumbs } = storeToRefs(headerStore); @@ -144,7 +144,7 @@ export default defineComponent({ } }); } - } + }, ); onBeforeUnmount(() => { stop(); @@ -387,7 +387,7 @@ export default defineComponent({ ), - } + }, ); } break; @@ -422,7 +422,7 @@ export default defineComponent({ type: "divider", key: FnKey.none, icon: () => , - } + }, ); } break; diff --git a/src/views/Collection.tsx b/src/views/Collection.tsx index 6234a06..8b1bef4 100644 --- a/src/views/Collection.tsx +++ b/src/views/Collection.tsx @@ -83,7 +83,7 @@ export default defineComponent({ { leading: false, trailing: true, - } + }, ); onBeforeMount(async () => { diff --git a/src/views/Dashboard.tsx b/src/views/Dashboard.tsx index d631f93..9b5f278 100644 --- a/src/views/Dashboard.tsx +++ b/src/views/Dashboard.tsx @@ -96,7 +96,7 @@ const getFormItems = (): ExFormItem[] => { function filterAndSort( apiCollections: APICollection[], keyword: string, - sortOrder: string + sortOrder: string, ): APICollection[] { const collections = apiCollections.filter((item) => { if (!keyword) { @@ -157,7 +157,7 @@ export default defineComponent({ const keyword = ref(""); const sortOrder = ref( - settingStore.collectionSortType || SortType.LastModified + settingStore.collectionSortType || SortType.LastModified, ); const createCollection = () => { From 8a3d906e9cde6337d56c73f665e93c13a411fec7 Mon Sep 17 00:00:00 2001 From: vicanso Date: Thu, 1 Feb 2024 20:03:38 +0800 Subject: [PATCH 2/3] fix: fix export settings --- src/components/APISettingTree/item_dropdown.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/APISettingTree/item_dropdown.tsx b/src/components/APISettingTree/item_dropdown.tsx index fe55233..2efb373 100644 --- a/src/components/APISettingTree/item_dropdown.tsx +++ b/src/components/APISettingTree/item_dropdown.tsx @@ -91,12 +91,16 @@ export default defineComponent({ const apiSettings: APISetting[] = []; const folders: APIFolder[] = []; const name = apiFolderStore.findByID(id).name; + const folderIdList:string[] = []; const appendChildren = (folderId: string) => { + if (folderIdList.includes(folderId)) { + return; + } + folderIdList.push(folderId); const folder = apiFolderStore.findByID(folderId); if (!folder) { return; } - folders.push(folder); folder.children.split(",").forEach((child) => { const apiSetting = apiSettingStore.findByID(child); if (apiSetting) { From 0f62ce56906ae2fac282c0382e69d639afb7f95a Mon Sep 17 00:00:00 2001 From: vicanso Date: Tue, 20 Feb 2024 20:10:14 +0800 Subject: [PATCH 3/3] chore: version 0.1.19 --- CHANGELOG.md | 10 ++++++++++ Makefile | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53a9727..f2de4ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. +## [0.1.19] - 2024-02-19 + +### Bug Fixes + +- Fix export settings + +### Refactor + +- Adjust import api setting + ## [0.1.18] - 2023-12-09 ### Bug Fixes diff --git a/Makefile b/Makefile index 67fac90..eba7524 100644 --- a/Makefile +++ b/Makefile @@ -21,4 +21,4 @@ orm: -u "sqlite:///~/Library/Application Support/com.bigtree.cyberapi/my_db.db" \ -o src/entities version: - git cliff --unreleased --tag 0.1.18 --prepend CHANGELOG.md \ No newline at end of file + git cliff --unreleased --tag 0.1.19 --prepend CHANGELOG.md \ No newline at end of file diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index ddc3b8e..ac8b881 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -785,7 +785,7 @@ dependencies = [ [[package]] name = "cyberapi" -version = "0.1.18" +version = "0.1.19" dependencies = [ "base64 0.21.7", "brotli-decompressor", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 228c5b5..055e1b4 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cyberapi" -version = "0.1.18" +version = "0.1.19" description = "API tool based on tauri, it is smaller and faster." authors = ["tree.xie@outlook.com"] license = "Apache License 2.0"