diff --git a/package.json b/package.json index e0701fb..259434c 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@vicons/ionicons5": "^0.13.0", "axios": "^1.18.1", "naive-ui": "^2.44.1", + "pinia": "^4.0.2", "vue": "^3.5.13", "vue-router": "^5.2.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3a7d34e..ca3e2f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,16 +19,19 @@ importers: version: 0.13.0 axios: specifier: ^1.18.1 - version: 1.18.1 + version: 1.18.1(debug@4.4.3) naive-ui: specifier: ^2.44.1 version: 2.44.1(vue@3.5.40(typescript@5.6.3)) + pinia: + specifier: ^4.0.2 + version: 4.0.2(@vue/devtools-api@8.1.5)(typescript@5.6.3)(vue@3.5.40(typescript@5.6.3)) vue: specifier: ^3.5.13 version: 3.5.40(typescript@5.6.3) vue-router: specifier: ^5.2.0 - version: 5.2.0(@vue/compiler-sfc@3.5.40)(esbuild@0.25.12)(rollup@4.62.2)(vite@6.4.3(@types/node@26.1.1)(yaml@2.9.0))(vue@3.5.40(typescript@5.6.3)) + version: 5.2.0(@vue/compiler-sfc@3.5.40)(esbuild@0.25.12)(pinia@4.0.2(@vue/devtools-api@8.1.5)(typescript@5.6.3)(vue@3.5.40(typescript@5.6.3)))(rollup@4.62.2)(vite@6.4.3(@types/node@26.1.1)(yaml@2.9.0))(vue@3.5.40(typescript@5.6.3)) devDependencies: '@tauri-apps/cli': specifier: ^2 @@ -885,6 +888,16 @@ packages: resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} engines: {node: '>=12'} + pinia@4.0.2: + resolution: {integrity: sha512-yKVVA7bSj5oRZFp/Ab9wLlmyb5gPUYEiIm4ryiWTe/xe7PtkRdMVOp1X1ggvq0c6Uj7Q0Du1HnV2mtAwM0Ks1g==} + peerDependencies: + '@vue/devtools-api': ^8.1.5 + typescript: '>=5.6.0' + vue: ^3.5.11 + peerDependenciesMeta: + typescript: + optional: true + pkg-types@1.3.1: resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} @@ -1534,9 +1547,9 @@ snapshots: asynckit@0.4.0: {} - axios@1.18.1: + axios@1.18.1(debug@4.4.3): dependencies: - follow-redirects: 1.16.0 + follow-redirects: 1.16.0(debug@4.4.3) form-data: 4.0.6 https-proxy-agent: 5.0.1 proxy-from-env: 2.1.0 @@ -1660,7 +1673,9 @@ snapshots: optionalDependencies: picomatch: 4.0.5 - follow-redirects@1.16.0: {} + follow-redirects@1.16.0(debug@4.4.3): + optionalDependencies: + debug: 4.4.3 form-data@4.0.6: dependencies: @@ -1803,6 +1818,14 @@ snapshots: picomatch@4.0.5: {} + pinia@4.0.2(@vue/devtools-api@8.1.5)(typescript@5.6.3)(vue@3.5.40(typescript@5.6.3)): + dependencies: + '@vue/devtools-api': 8.1.5 + nostics: 1.2.0 + vue: 3.5.40(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + pkg-types@1.3.1: dependencies: confbox: 0.1.8 @@ -1977,7 +2000,7 @@ snapshots: vscode-uri@3.1.0: {} - vue-router@5.2.0(@vue/compiler-sfc@3.5.40)(esbuild@0.25.12)(rollup@4.62.2)(vite@6.4.3(@types/node@26.1.1)(yaml@2.9.0))(vue@3.5.40(typescript@5.6.3)): + vue-router@5.2.0(@vue/compiler-sfc@3.5.40)(esbuild@0.25.12)(pinia@4.0.2(@vue/devtools-api@8.1.5)(typescript@5.6.3)(vue@3.5.40(typescript@5.6.3)))(rollup@4.62.2)(vite@6.4.3(@types/node@26.1.1)(yaml@2.9.0))(vue@3.5.40(typescript@5.6.3)): dependencies: '@babel/generator': 8.0.0 '@vue-macros/common': 3.1.4(vue@3.5.40(typescript@5.6.3)) @@ -2000,6 +2023,7 @@ snapshots: yaml: 2.9.0 optionalDependencies: '@vue/compiler-sfc': 3.5.40 + pinia: 4.0.2(@vue/devtools-api@8.1.5)(typescript@5.6.3)(vue@3.5.40(typescript@5.6.3)) vite: 6.4.3(@types/node@26.1.1)(yaml@2.9.0) transitivePeerDependencies: - '@farmfe/core' diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index f62571b..06c604f 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -6,6 +6,10 @@ version = 4 name = "DevBox" version = "0.1.0" dependencies = [ + "aws-config", + "aws-credential-types", + "aws-sdk-s3", + "aws-types", "chrono", "serde", "serde_json", @@ -67,6 +71,15 @@ version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" +[[package]] +name = "arc-swap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" +dependencies = [ + "rustversion", +] + [[package]] name = "async-broadcast" version = "0.7.2" @@ -242,6 +255,496 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "aws-config" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b180a3c8b55960db3426d8964b8745e652466a1a49fe1a2eda828046d30b5e4" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-sdk-sso", + "aws-sdk-ssooidc", + "aws-sdk-sts", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "hex", + "http 1.4.2", + "sha1 0.10.7", + "time", + "tokio", + "tracing", + "url", + "zeroize", +] + +[[package]] +name = "aws-credential-types" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e93964ffdaf57857f544be3666a5f57570bb699e934700f11b49708f61bb556e" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + +[[package]] +name = "aws-lc-rs" +version = "1.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", + "pkg-config", +] + +[[package]] +name = "aws-runtime" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9007227e10b5fed2f3e0a2beff489211e2b5604c400b7a9d5d81ca9d64c24bb" +dependencies = [ + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "bytes-utils", + "fastrand", + "http 0.2.12", + "http 1.4.2", + "http-body 0.4.6", + "http-body 1.1.0", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid", +] + +[[package]] +name = "aws-sdk-s3" +version = "1.140.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9660cf991e512fbe6094f1041ff3d3282bc5aeeeb6184e8de437ec2de024a10" +dependencies = [ + "arc-swap", + "aws-credential-types", + "aws-runtime", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-checksums", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-observability", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "bytes", + "fastrand", + "hex", + "hmac 0.13.0", + "http 0.2.12", + "http 1.4.2", + "http-body 1.1.0", + "lru", + "percent-encoding", + "regex-lite", + "sha2 0.11.0", + "tracing", + "url", +] + +[[package]] +name = "aws-sdk-sso" +version = "1.105.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ffd0fbe7873cb548a7aa60f9573c268fff94155397fd4f14dc9f1ecaaab8516" +dependencies = [ + "arc-swap", + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-observability", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.4.2", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-ssooidc" +version = "1.107.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175763eb222a46377df7aa257a3bca980ab3e96703fefc8f4d0b8da6ad2e254c" +dependencies = [ + "arc-swap", + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-observability", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "aws-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.4.2", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sdk-sts" +version = "1.110.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b14781dfbff48984017d57167b6ea0b6471c6920ec52b44a2677c7feb3c13" +dependencies = [ + "arc-swap", + "aws-credential-types", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-observability", + "aws-smithy-query", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "fastrand", + "http 0.2.12", + "http 1.4.2", + "regex-lite", + "tracing", +] + +[[package]] +name = "aws-sigv4" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "723c2234ad7511ceef63eab016b7ba6ff7c55590fefb96fa8467af014a07309f" +dependencies = [ + "aws-credential-types", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "crypto-bigint", + "form_urlencoded", + "hex", + "hmac 0.13.0", + "http 0.2.12", + "http 1.4.2", + "p256", + "percent-encoding", + "sha2 0.11.0", + "subtle", + "time", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-async" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f02e407fb3b54891734224b9ffac8a71fdd35f542500fa1af95754a6b2beb316" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "aws-smithy-checksums" +version = "0.65.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67ecd999972b58e67cab052f5129906c08c25883bd0788ceefc55ef97d61307" +dependencies = [ + "aws-smithy-http", + "aws-smithy-types", + "bytes", + "crc-fast", + "hex", + "http 1.4.2", + "http-body 1.1.0", + "http-body-util", + "md-5", + "pin-project-lite", + "sha1 0.11.0", + "sha2 0.11.0", + "tracing", +] + +[[package]] +name = "aws-smithy-eventstream" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9381123ab62d20c13082b151f30f962a3b112b727345394536dfa39a482944" +dependencies = [ + "aws-smithy-types", + "bytes", + "crc32fast", +] + +[[package]] +name = "aws-smithy-http" +version = "0.64.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37843d9add67c3aff5856f409c6dc315d3cdff60f9c0cb5b670dab1e9920306d" +dependencies = [ + "aws-smithy-eventstream", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "futures-util", + "http 1.4.2", + "http-body 1.1.0", + "http-body-util", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-http-client" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "635d23afda0a6ab48d666c4d447c4873e8d1e83518a2be2093122397e50b838e" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "h2 0.3.27", + "h2 0.4.15", + "http 0.2.12", + "http 1.4.2", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper 1.11.0", + "hyper-rustls 0.24.2", + "hyper-rustls 0.27.9", + "hyper-util", + "pin-project-lite", + "rustls 0.21.12", + "rustls 0.23.42", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.4", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.63.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dc65a121adb4b33729919fcfa14fa36fb33c1555a8f06bb0e2188dbfdc1d9ef" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-observability" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e86338c869539a581bf161247762a6e87f92c5c075060057b5ed6d06632ed0c" +dependencies = [ + "aws-smithy-runtime-api", +] + +[[package]] +name = "aws-smithy-query" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512346c7212ab7436df2d77a16d976a468ae44a418835511d2a69269810aaf62" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "aws-smithy-xml", + "urlencoding", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07505b34e8f4b3591a4fa69e9792b52289b95488dbbc68c3c0075b7bedb245e1" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-http-client", + "aws-smithy-observability", + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.4.2", + "http-body 0.4.6", + "http-body 1.1.0", + "http-body-util", + "pin-project-lite", + "pin-utils", + "tokio", + "tracing", +] + +[[package]] +name = "aws-smithy-runtime-api" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b98f2e1fd67ec06618f9c291e5e495a468e60519e44c9c1979cd0521f3affdb" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api-macros", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.4.2", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-runtime-api-macros" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "221eaa237ddf1ca79b60d1372aad77e47f9c0ea5b3ce5099da8c61d027dc77b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "aws-smithy-schema" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d56e0a4e53127a632224e43633b0fe045fa9e1e3cfc68b9830f1115e103f910" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "http 1.4.2", +] + +[[package]] +name = "aws-smithy-types" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6dc683efb34b9e755675b37fedbe0103141e5b6df7bdc9eb6967756a8c167d8" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.4.2", + "http-body 0.4.6", + "http-body 1.1.0", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", + "tokio", + "tokio-util", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce84f71c72fee2cbbadde6e7d082f5fb466e3a84733855295fa7aafd1b31b7d8" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eec1cd5469f328c782dc3e33d4153cf118a54e33cbb3356d60d16f89883e1f94" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-schema", + "aws-smithy-types", + "rustc_version", + "tracing", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.21.7" @@ -254,6 +757,22 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + [[package]] name = "bit-set" version = "0.8.0" @@ -381,6 +900,16 @@ dependencies = [ "serde", ] +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + [[package]] name = "cairo-rs" version = "0.18.5" @@ -455,6 +984,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" dependencies = [ "find-msvc-tools", + "jobserver", + "libc", "shlex", ] @@ -499,7 +1030,7 @@ checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" dependencies = [ "cfg-if", "cpufeatures 0.3.0", - "rand_core", + "rand_core 0.10.1", ] [[package]] @@ -516,6 +1047,15 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + [[package]] name = "cmov" version = "0.5.4" @@ -541,6 +1081,18 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + [[package]] name = "cookie" version = "0.18.1" @@ -624,6 +1176,16 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" +[[package]] +name = "crc-fast" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e75b2483e97a5a7da73ac68a05b629f9c53cff58d8ed1c77866079e18b00dba5" +dependencies = [ + "digest 0.10.7", + "spin 0.10.1", +] + [[package]] name = "crc32fast" version = "1.5.0" @@ -657,6 +1219,18 @@ version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -769,6 +1343,17 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid 0.9.6", + "pem-rfc7468", + "zeroize", +] + [[package]] name = "deranged" version = "0.5.8" @@ -806,7 +1391,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid 0.9.6", "crypto-common 0.1.6", + "subtle", ] [[package]] @@ -816,6 +1403,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" dependencies = [ "block-buffer 0.12.1", + "const-oid 0.10.2", "crypto-common 0.2.2", "ctutils", ] @@ -959,6 +1547,20 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest 0.10.7", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + [[package]] name = "either" version = "1.17.0" @@ -968,6 +1570,26 @@ dependencies = [ "serde", ] +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pem-rfc7468", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "embed-resource" version = "3.0.11" @@ -1088,6 +1710,16 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "field-offset" version = "0.3.6" @@ -1122,7 +1754,7 @@ checksum = "5e139bc46ca777eb5efaf62df0ab8cc5fd400866427e56c68b22e414e53bd3be" dependencies = [ "futures-core", "futures-sink", - "spin", + "spin 0.9.9", ] [[package]] @@ -1188,6 +1820,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "futures-channel" version = "0.3.33" @@ -1391,6 +2029,7 @@ checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -1425,7 +2064,7 @@ dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", - "rand_core", + "rand_core 0.10.1", ] [[package]] @@ -1524,6 +2163,17 @@ dependencies = [ "system-deps", ] +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "gtk" version = "0.18.2" @@ -1576,6 +2226,44 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap 2.14.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.4.2", + "indexmap 2.14.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -1638,7 +2326,16 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4aaa26c720c68b866f2c96ef5c1264b3e6f473fe5d4ce61cd44bbe913e553018" dependencies = [ - "hmac", + "hmac 0.13.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", ] [[package]] @@ -1660,6 +2357,17 @@ dependencies = [ "markup5ever", ] +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http" version = "1.4.2" @@ -1670,6 +2378,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" version = "1.1.0" @@ -1677,7 +2396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", - "http", + "http 1.4.2", ] [[package]] @@ -1688,8 +2407,8 @@ checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" dependencies = [ "bytes", "futures-core", - "http", - "http-body", + "http 1.4.2", + "http-body 1.1.0", "pin-project-lite", ] @@ -1699,6 +2418,12 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + [[package]] name = "hybrid-array" version = "0.4.13" @@ -1708,6 +2433,30 @@ dependencies = [ "typenum", ] +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + [[package]] name = "hyper" version = "1.11.0" @@ -1718,8 +2467,9 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "http", - "http-body", + "h2 0.4.15", + "http 1.4.2", + "http-body 1.1.0", "httparse", "itoa", "pin-project-lite", @@ -1728,6 +2478,37 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.32", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http 1.4.2", + "hyper 1.11.0", + "hyper-util", + "rustls 0.23.42", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.26.4", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.20" @@ -1738,14 +2519,14 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "http", - "http-body", - "hyper", + "http 1.4.2", + "http-body 1.1.0", + "hyper 1.11.0", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.5", "tokio", "tower-service", "tracing", @@ -2024,6 +2805,16 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + [[package]] name = "js-sys" version = "0.3.103" @@ -2163,6 +2954,15 @@ version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" +[[package]] +name = "lru" +version = "0.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39" +dependencies = [ + "hashbrown 0.16.1", +] + [[package]] name = "markup5ever" version = "0.38.0" @@ -2309,6 +3109,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -2632,6 +3441,24 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "outref" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.9", +] + [[package]] name = "pango" version = "0.18.3" @@ -2686,6 +3513,15 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -2751,6 +3587,12 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "piper" version = "0.2.5" @@ -2762,6 +3604,16 @@ dependencies = [ "futures-io", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.33" @@ -2842,6 +3694,15 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -2942,7 +3803,16 @@ checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" dependencies = [ "chacha20", "getrandom 0.4.3", - "rand_core", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", ] [[package]] @@ -3020,6 +3890,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" + [[package]] name = "regex-syntax" version = "0.8.11" @@ -3036,10 +3912,10 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", - "http-body", + "http 1.4.2", + "http-body 1.1.0", "http-body-util", - "hyper", + "hyper 1.11.0", "hyper-util", "js-sys", "log", @@ -3060,6 +3936,30 @@ dependencies = [ "web-sys", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "rustc-hash" version = "2.1.3" @@ -3088,12 +3988,87 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.7", + "sct", +] + +[[package]] +name = "rustls" +version = "0.23.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138" +dependencies = [ + "aws-lc-rs", + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.103.13", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + [[package]] name = "same-file" version = "1.0.6" @@ -3169,6 +4144,30 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "security-framework" version = "3.7.0" @@ -3379,6 +4378,17 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + [[package]] name = "sha1" version = "0.11.0" @@ -3428,6 +4438,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + [[package]] name = "simd-adler32" version = "0.3.10" @@ -3455,6 +4475,16 @@ dependencies = [ "serde", ] +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "socket2" version = "0.6.5" @@ -3522,6 +4552,22 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spin" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "023a211cb3138dbc438680b32560ad89f699977624c9f8dbb95a47d5b4c07dd3" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "sqlx" version = "0.9.0" @@ -3630,7 +4676,7 @@ dependencies = [ "log", "percent-encoding", "serde", - "sha1", + "sha1 0.11.0", "sha2 0.11.0", "sqlx-core", "thiserror 2.0.19", @@ -3656,7 +4702,7 @@ dependencies = [ "futures-util", "hex", "hkdf", - "hmac", + "hmac 0.13.0", "itoa", "log", "md-5", @@ -3745,6 +4791,12 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "swift-rs" version = "1.0.7" @@ -3909,7 +4961,7 @@ dependencies = [ "glob", "gtk", "heck 0.5.0", - "http", + "http 1.4.2", "jni", "libc", "log", @@ -4053,7 +5105,7 @@ dependencies = [ "cookie", "dpi", "gtk", - "http", + "http 1.4.2", "jni", "objc2", "objc2-ui-kit", @@ -4076,7 +5128,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f" dependencies = [ "gtk", - "http", + "http 1.4.2", "jni", "log", "objc2", @@ -4108,7 +5160,7 @@ dependencies = [ "dom_query", "dunce", "glob", - "http", + "http 1.4.2", "infer", "json-patch", "log", @@ -4271,10 +5323,31 @@ dependencies = [ "libc", "mio", "pin-project-lite", - "socket2", + "signal-hook-registry", + "socket2 0.6.5", "windows-sys 0.61.2", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls 0.23.42", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.19" @@ -4295,6 +5368,7 @@ dependencies = [ "bytes", "futures-core", "futures-sink", + "libc", "pin-project-lite", "tokio", ] @@ -4443,8 +5517,8 @@ dependencies = [ "bitflags 2.13.1", "bytes", "futures-util", - "http", - "http-body", + "http 1.4.2", + "http-body 1.1.0", "pin-project-lite", "tower", "tower-layer", @@ -4621,6 +5695,12 @@ version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.5.8" @@ -4634,6 +5714,12 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "urlpattern" version = "0.3.0" @@ -4682,6 +5768,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + [[package]] name = "vswhom" version = "0.1.0" @@ -5148,6 +6240,15 @@ dependencies = [ "windows-targets 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.59.0" @@ -5376,7 +6477,7 @@ dependencies = [ "dunce", "gdkx11", "gtk", - "http", + "http 1.4.2", "javascriptcore-rs", "jni", "libc", @@ -5425,6 +6526,12 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "xmlparser" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" + [[package]] name = "yoke" version = "0.8.3" @@ -5530,6 +6637,12 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zeroize" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" + [[package]] name = "zerotrie" version = "0.2.4" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4bef6b6..57850a1 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -30,3 +30,7 @@ sqlx = { version = "0.9.0", features = [ "tls-native-tls", "chrono", ] } +aws-sdk-s3 = "1.140.0" +aws-config = {version = "1.10.1", features = ["behavior-version-latest"] } +aws-credential-types = "1.3.0" +aws-types = "1.5.0" diff --git a/src-tauri/src/commands/user.rs b/src-tauri/src/commands/user.rs index db36a80..002c02c 100644 --- a/src-tauri/src/commands/user.rs +++ b/src-tauri/src/commands/user.rs @@ -1,33 +1,54 @@ use serde::{Deserialize, Serialize}; -use sqlx::MySqlPool; +use sqlx::{MySqlPool, QueryBuilder}; use tauri::State; -use crate::models::ApiResponse; +use crate::models::{ApiResponse, PageResult}; #[derive(Debug, Serialize, sqlx::FromRow)] struct SysUser { - id: i32, + id: i64, nick_name: String, avatar: String, user_name: String, password: String, email: String, phone: String, - age: i32, - sex: i32, - creater: i32, + age: i64, + sex: i64, + creater: i64, create_time: chrono::NaiveDateTime, } #[derive(Debug, Serialize, Deserialize)] pub struct UserInfo { - id: i32, + id: i64, nick_name: String, avatar: String, user_name: String, email: String, phone: String, - age: i32, - sex: i32, + age: i64, + sex: i64, + create_time: chrono::NaiveDateTime, +} + +#[derive(Debug, Deserialize)] +pub struct UserPageReq { + pub page: i64, + pub page_size: i64, + pub nick_name: Option, + pub user_name: Option, +} + +#[derive(Debug, Deserialize)] +pub struct UserSaveReq { + pub id: i64, + pub nick_name: String, + pub password: String, + pub user_name: String, + pub email: String, + pub phone: String, + pub age: i64, + pub sex: i64, } impl From for UserInfo { @@ -41,6 +62,7 @@ impl From for UserInfo { phone: user.phone, age: user.age, sex: user.sex, + create_time: user.create_time, } } } @@ -68,3 +90,146 @@ pub async fn login( let user_info: UserInfo = UserInfo::from(user); Ok(ApiResponse::success(user_info)) } + +#[tauri::command] +pub async fn get_user_page( + pool: State<'_, MySqlPool>, + params: UserPageReq, +) -> Result>, String> { + let page = params.page.max(1); + let page_size = params.page_size.min(10).max(1); + let offset = (page - 1) * page_size; + + let mut count_builder = QueryBuilder::new("SELECT COUNT(*) FROM sys_user"); + let has_nick_name = params + .nick_name + .as_ref() + .map_or(false, |nick_name| !nick_name.is_empty()); + let has_user_name = params + .user_name + .as_ref() + .map_or(false, |user_name| !user_name.is_empty()); + + if has_nick_name || has_user_name { + count_builder.push(" WHERE 1=1"); + if has_nick_name { + count_builder.push(" AND nick_name LIKE "); + count_builder.push_bind(format!("%{}%", params.nick_name.as_deref().unwrap())); + } + if has_user_name { + count_builder.push(" AND user_name LIKE "); + count_builder.push_bind(format!("%{}%", params.user_name.as_deref().unwrap())); + } + } + let total: i64 = count_builder + .build_query_scalar() + .fetch_one(&*pool) + .await + .map_err(|e| e.to_string())?; + + // ===== 查分页数据 ===== + let mut data_builder = QueryBuilder::new("SELECT * FROM sys_user"); + + if has_user_name || has_nick_name { + data_builder.push(" WHERE 1=1"); + if has_user_name { + data_builder.push(" AND user_name LIKE "); + data_builder.push_bind(format!("%{}%", params.user_name.as_deref().unwrap())); + } + if has_nick_name { + data_builder.push(" AND nick_name LIKE "); + data_builder.push_bind(format!("%{}%", params.nick_name.as_deref().unwrap())); + } + } + + data_builder + .push(" LIMIT ") + .push_bind(page_size) + .push(" OFFSET ") + .push_bind(offset); + + let users = data_builder + .build_query_as::() + .fetch_all(&*pool) + .await + .map_err(|e| e.to_string())?; + + let list: Vec = users.into_iter().map(|user| UserInfo::from(user)).collect(); + + Ok(ApiResponse::success(PageResult { + total, + list, + page, + page_size, + })) +} + +#[tauri::command] +pub async fn register( + pool: State<'_, MySqlPool>, + params: UserSaveReq, +) -> Result, String> { + // 用户名是否存在 + let exist: i64 = sqlx::query_scalar("SELECT COUNT(id) FROM sys_user WHERE user_name = ?") + .bind(¶ms.user_name) + .fetch_one(&*pool) + .await + .map_err(|e| e.to_string())?; + + if exist > 0 { + return Ok(ApiResponse::error(1003, "用户名已存在!")); + } + // 插入新用户 + let result = sqlx::query("INSERT INTO sys_user ( nick_name, user_name, password, email, phone, age, sex ) VALUES (?,?,?,?,?,?,?)") + .bind(¶ms.nick_name) + .bind(¶ms.user_name) + .bind(¶ms.password) + .bind(¶ms.email) + .bind(¶ms.phone) + .bind(¶ms.age) + .bind(¶ms.sex) + .execute(&*pool) + .await + .map_err(|e| e.to_string())?; + let id = result.last_insert_id() as i64; + Ok(ApiResponse::success(id)) +} + +#[tauri::command] +pub async fn del_user(pool: State<'_, MySqlPool>, id: i64) -> Result, String> { + sqlx::query("DELETE FROM sys_user WHERE id = ?") + .bind(id) + .execute(&*pool) + .await + .map_err(|e| e.to_string())?; + Ok(ApiResponse::<()>::success_empty()) +} + +#[tauri::command] +pub async fn update_user( + pool: State<'_, MySqlPool>, + params: UserSaveReq, +) -> Result, String> { + let exist: i64 = + sqlx::query_scalar("SELECT COUNT(id) FROM sys_user WHERE user_name=? AND id != ?") + .bind(¶ms.user_name) + .bind(¶ms.id) + .fetch_one(&*pool) + .await + .map_err(|e| e.to_string())?; + if exist > 0 { + return Ok(ApiResponse::error(1003, "用户名已存在!")); + } + sqlx::query("UPDATE sys_user SET nick_name = ?, user_name = ?, email = ?, phone = ?, age = ?, sex = ? WHERE id = ?") + .bind(¶ms.nick_name) + .bind(¶ms.user_name) + .bind(¶ms.email) + .bind(¶ms.phone) + .bind(params.age) + .bind(params.sex) + .bind(params.id) + .execute(&*pool) + .await + .map_err(|e| e.to_string())?; + Ok(ApiResponse::<()>::success_empty()) +} diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 09a46df..ea74c87 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1,25 +1,36 @@ // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ pub mod commands; -pub mod services; pub mod models; +pub mod services; use services::db::create_db_pool; +use services::s3::{S3Client, S3Config}; use tauri::Manager; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_opener::init()) - // 初始化数据库连接池 .setup(|app| { + // 初始化数据库连接池 let pool = tauri::async_runtime::block_on(async { create_db_pool().await.expect("连接Mysql数据库出错!") }); app.manage(pool); + + // 初始化S3客户端 + let s3_cfg = S3Config::from().expect("读取S3配置失败!"); + let s3_client = tauri::async_runtime::block_on(S3Client::new(&s3_cfg)); + + app.manage(s3_client); Ok(()) }) .invoke_handler(tauri::generate_handler![ - commands::user::login + commands::user::login, + commands::user::get_user_page, + commands::user::register, + commands::user::del_user, + commands::user::update_user ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); diff --git a/src-tauri/src/models.rs b/src-tauri/src/models.rs index 0b30a61..046a1a7 100644 --- a/src-tauri/src/models.rs +++ b/src-tauri/src/models.rs @@ -1,4 +1,12 @@ -use serde::{Serialize, Deserialize}; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Serialize, Deserialize)] +pub struct PageResult { + pub total: i64, + pub list: Vec, + pub page: i64, + pub page_size: i64, +} #[derive(Debug, Serialize, Deserialize)] pub struct ApiResponse { @@ -8,7 +16,7 @@ pub struct ApiResponse { data: Option, } -impl ApiResponse { +impl ApiResponse { // 成功响应 pub fn success(data: T) -> Self { Self { @@ -20,7 +28,12 @@ impl ApiResponse { } // 成功响应,数据为空 pub fn success_empty() -> ApiResponse<()> { - ApiResponse { success: true, code: 200, message: "操作成功".to_string(), data: None } + ApiResponse { + success: true, + code: 200, + message: "操作成功".to_string(), + data: None, + } } // 错误响应 pub fn error(code: i32, message: &str) -> Self { diff --git a/src-tauri/src/services/mod.rs b/src-tauri/src/services/mod.rs index 8c5eabd..17de533 100644 --- a/src-tauri/src/services/mod.rs +++ b/src-tauri/src/services/mod.rs @@ -1 +1,2 @@ -pub mod db; \ No newline at end of file +pub mod db; +pub mod s3; \ No newline at end of file diff --git a/src-tauri/src/services/s3.rs b/src-tauri/src/services/s3.rs new file mode 100644 index 0000000..2dfe27b --- /dev/null +++ b/src-tauri/src/services/s3.rs @@ -0,0 +1,113 @@ +use aws_credential_types::Credentials as AwsCreds; +use aws_sdk_s3::{ + config::{BehaviorVersion, Credentials, Region}, + Client, +}; + +pub struct S3Config { + pub region: String, + pub access_key: String, + pub secret_key: String, + pub bucket_name: String, + pub endpoint: String, +} + +impl S3Config { + pub fn from() -> Result> { + let region = String::from("US_EAST_1"); + let access_key = String::from("admin"); + let secret_key = String::from("123456"); + let bucket_name = String::from("DevBox"); + let endpoint = String::from("http://127.0.0.1:9000"); + Ok(Self { + region, + access_key, + secret_key, + bucket_name, + endpoint, + }) + } +} + +pub struct S3Client { + pub client: Client, + pub bucket: String, +} + +impl S3Client { + pub async fn new(cfg: &S3Config) -> Self { + let creds = AwsCreds::new(&cfg.access_key, &cfg.secret_key, None, None, "static"); + let config = aws_sdk_s3::Config::builder() + .behavior_version(BehaviorVersion::latest()) + .region(Region::new(cfg.region.clone())) + .endpoint_url(&cfg.endpoint) + .credentials_provider(creds) + .force_path_style(true) + .build(); + + Self { + client: Client::from_conf(config), + bucket: cfg.bucket_name.clone(), + } + } + + pub async fn upload(&self, key: &str, data: Vec) -> Result<(), String> { + self.client + .put_object() + .bucket(&self.bucket) + .key(key) + .body(data.into()) + .send() + .await + .map_err(|e| e.to_string())?; + Ok(()) + } + + pub async fn download(&self, key: &str) -> Result, String> { + let res = self + .client + .get_object() + .bucket(&self.bucket) + .key(key) + .send() + .await + .map_err(|e| e.to_string())?; + let data = res + .body + .collect() + .await + .map_err(|e| e.to_string())? + .into_bytes() + .to_vec(); + Ok(data) + } + + pub async fn list(&self, prefix: &str) -> Result, String> { + let res = self + .client + .list_objects_v2() + .bucket(&self.bucket) + .prefix(prefix) + .send() + .await + .map_err(|e| e.to_string())?; + + let keys = res + .contents() + .iter() + .filter_map(|obj| obj.key().map(|s| s.to_string())) + .collect(); + Ok(keys) + } + + pub async fn delete(&self, key: &str) -> Result<(), String> { + self.client + .delete_object() + .bucket(&self.bucket) + .key(key) + .send() + .await + .map_err(|e| e.to_string())?; + Ok(()) + } +} diff --git a/src/App.vue b/src/App.vue index d92504b..bdc3025 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,14 @@ diff --git a/src/layout/components/LayoutFooter.vue b/src/layout/components/LayoutFooter.vue new file mode 100644 index 0000000..6a9a59b --- /dev/null +++ b/src/layout/components/LayoutFooter.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/layout/components/LayoutHeader.vue b/src/layout/components/LayoutHeader.vue new file mode 100644 index 0000000..71cd353 --- /dev/null +++ b/src/layout/components/LayoutHeader.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/layout/components/LayoutSider.vue b/src/layout/components/LayoutSider.vue new file mode 100644 index 0000000..69f737f --- /dev/null +++ b/src/layout/components/LayoutSider.vue @@ -0,0 +1,241 @@ + + + + + diff --git a/src/layout/components/LayoutTabs.vue b/src/layout/components/LayoutTabs.vue new file mode 100644 index 0000000..3482f0f --- /dev/null +++ b/src/layout/components/LayoutTabs.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/src/main.ts b/src/main.ts index 61cd302..f316db4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,9 +1,11 @@ -import { createApp } from "vue"; -import App from "./App.vue"; -import naive from "naive-ui"; -import router from "@/router"; +import { createApp } from "vue" +import App from "./App.vue" +import naive from "naive-ui" +import router from "@/router" +import pinia from "@/stores" -const app = createApp(App); -app.use(naive); -app.use(router); -app.mount("#app"); +const app = createApp(App) +app.use(naive) +app.use(router) +app.use(pinia) +app.mount("#app") diff --git a/src/router/index.ts b/src/router/index.ts index b78b1cd..a59d1a8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,25 +1,40 @@ -import { createRouter, createWebHistory } from "vue-router"; +import { createRouter, createWebHistory } from "vue-router" const routes = [ - { - path: "/", - redirect: "/login" - }, - { - path: "/login", - name: "Login", - component: () => import("@/views/home/Login.vue") - }, - { + { + path: "/", + redirect: "/login", + }, + { + path: "/login", + name: "Login", + component: () => import("@/views/home/Login.vue"), + }, + { + path: "/home", + name: "Home", + component: () => import("@/layout/Index.vue"), + redirect: "/dashboard", + children: [ + { path: "/dashboard", name: "Dashboard", - component: () => import("@/views/dashboard/Dashboard.vue") - } + meta: { title: "工作台", icon: "GridOutline", tabFixed: true }, + component: () => import("@/views/dashboard/Dashboard.vue"), + }, + { + path: "/system/users", + name: "SysUser", + meta: { title: "用户管理", icon: "PeopleOutline", tabFixed: true }, + component: () => import("@/views/system/SysUser.vue"), + }, + ], + }, ] const router = createRouter({ - history: createWebHistory(), - routes + history: createWebHistory(), + routes, }) -export default router; +export default router diff --git a/src/stores/index.ts b/src/stores/index.ts new file mode 100644 index 0000000..3a78403 --- /dev/null +++ b/src/stores/index.ts @@ -0,0 +1,4 @@ +import { createPinia } from "pinia" + +const pinia = createPinia() +export default pinia diff --git a/src/stores/layout.ts b/src/stores/layout.ts new file mode 100644 index 0000000..9d85a7b --- /dev/null +++ b/src/stores/layout.ts @@ -0,0 +1,66 @@ +import { defineStore } from 'pinia' +import { ref, computed } from 'vue' +import type { Component } from 'vue' + +export interface TabItem { + key: string + label: string + icon: Component + fixed: boolean +} + +export const useLayoutStore = defineStore('layout', () => { + // ─── 侧边栏 ─── + const siderCollapsed = ref(false) + + function toggleSider() { + siderCollapsed.value = !siderCollapsed.value + } + + // ─── Tab 标签 ─── + const tabs = ref([]) + const activeTabKey = ref('') + + const keepAliveNames = computed(() => tabs.value.map(t => t.key)) + + function addTab(path: string, label: string, icon: Component, fixed = false) { + const exists = tabs.value.find(t => t.key === path) + if (!exists) { + tabs.value.push({ key: path, label, icon, fixed }) + } + activeTabKey.value = path + } + + function removeTab(key: string): string | null { + const idx = tabs.value.findIndex(t => t.key === key) + if (idx === -1) return null + tabs.value.splice(idx, 1) + if (activeTabKey.value === key) { + const next = tabs.value[Math.min(idx, tabs.value.length - 1)] + return next ? next.key : '/dashboard' + } + return null + } + + function closeOtherTabs() { + const current = tabs.value.find(t => t.key === activeTabKey.value) + tabs.value = current ? [current] : [] + } + + function closeAllTabs() { + tabs.value = [] + activeTabKey.value = '' + } + + return { + siderCollapsed, + toggleSider, + tabs, + activeTabKey, + keepAliveNames, + addTab, + removeTab, + closeOtherTabs, + closeAllTabs, + } +}) diff --git a/src/types/index.ts b/src/types/index.ts index 9f9aafc..877eb20 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,8 +1,15 @@ interface ApiResponse { - success: boolean; - code: number; - message: string; - data: T; + success: boolean + code: number + message: string + data: T } -export type { ApiResponse }; +interface PageResult { + total: number + list: T[] + page: number + page_size: number +} + +export type { ApiResponse, PageResult } diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index d259194..ad6be0e 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -1,237 +1,106 @@ diff --git a/src/views/system/SysUser.vue b/src/views/system/SysUser.vue new file mode 100644 index 0000000..c164ad2 --- /dev/null +++ b/src/views/system/SysUser.vue @@ -0,0 +1,400 @@ + + + + +