diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 6d7a285..0000000 --- a/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -/target -.tbcfg -*.txt -*.log - diff --git a/.gitignore b/.gitignore index 2b1bee5..db92e80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /target -.tbcfg* +.tbcfg *.txt *.log diff --git a/Cargo.lock b/Cargo.lock index 84fb2e3..7b07015 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,7 +16,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", - "cpufeatures 0.2.17", + "cpufeatures", ] [[package]] @@ -28,39 +28,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "aligned" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" -dependencies = [ - "as-slice", -] - -[[package]] -name = "aligned-vec" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" -dependencies = [ - "equator", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "android_system_properties" version = "0.1.5" @@ -72,9 +39,9 @@ dependencies = [ [[package]] name = "anstream" -version = "1.0.0" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -87,15 +54,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.14" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "1.0.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] @@ -122,9 +89,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.102" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "arbitrary" @@ -135,61 +102,6 @@ dependencies = [ "derive_arbitrary", ] -[[package]] -name = "arcstr" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03918c3dbd7701a85c6b9887732e2921175f26c350b4563841d0958c21d57e6d" - -[[package]] -name = "arg_enum_proc_macro" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "as-slice" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" -dependencies = [ - "stable_deref_trait", -] - -[[package]] -name = "async-compression" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" -dependencies = [ - "compression-codecs", - "compression-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "async-lock" -version = "3.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" -dependencies = [ - "event-listener", - "event-listener-strategy", - "pin-project-lite", -] - [[package]] name = "async-trait" version = "0.1.89" @@ -198,7 +110,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] @@ -213,54 +125,11 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "av-scenechange" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" -dependencies = [ - "aligned", - "anyhow", - "arg_enum_proc_macro", - "arrayvec", - "log", - "num-rational", - "num-traits", - "pastey", - "rayon", - "thiserror", - "v_frame", - "y4m", -] - -[[package]] -name = "av1-grain" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" -dependencies = [ - "anyhow", - "arrayvec", - "log", - "nom", - "num-rational", - "v_frame", -] - -[[package]] -name = "avif-serialize" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375082f007bd67184fb9c0374614b29f9aaa604ec301635f72338bb65386a53d" -dependencies = [ - "arrayvec", -] - [[package]] name = "axum" -version = "0.8.9" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" +checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425" dependencies = [ "axum-core", "bytes", @@ -291,9 +160,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.5.6" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +checksum = "59446ce19cd142f8833f856eb31f3eb097812d1479ab224f54d72428ca21ea22" dependencies = [ "bytes", "futures-core", @@ -308,40 +177,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "axum-extra" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be44683b41ccb9ab2d23a5230015c9c3c55be97a25e4428366de8873103f7970" -dependencies = [ - "axum", - "axum-core", - "bytes", - "fastrand", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "multer", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-macros" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa268c23bfbbd2c4363b9cd302a4f504fb2a9dfe7e3451d66f35dd392e20aca" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "base64" version = "0.22.1" @@ -349,47 +184,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "bb8" -version = "0.9.1" +name = "bigdecimal" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "457d7ed3f888dfd2c7af56d4975cade43c622f74bdcddfed6d4352f57acc6310" +checksum = "560f42649de9fa436b73517378a147ec21f6c997a546581df4b4b31677828934" dependencies = [ - "futures-util", - "parking_lot", - "portable-atomic", - "tokio", + "autocfg", + "libm", + "num-bigint", + "num-integer", + "num-traits", ] -[[package]] -name = "bb8-redis" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1063effc7f6cf848bcbcc6e31b5962be75215835587d3109607c643d616f66" -dependencies = [ - "bb8", - "redis", -] - -[[package]] -name = "bit_field" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" - [[package]] name = "bitflags" -version = "2.11.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" - -[[package]] -name = "bitstream-io" -version = "4.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f" -dependencies = [ - "no_std_io2", -] +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "block-buffer" @@ -401,70 +212,27 @@ dependencies = [ ] [[package]] -name = "block-buffer" -version = "0.12.0" +name = "bstr" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ - "hybrid-array", + "memchr", + "regex-automata", + "serde", ] -[[package]] -name = "brotli" -version = "8.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "built" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ad8f11f288f48ca24471bbd51ac257aaeaaa07adae295591266b792902ae64" - [[package]] name = "bumpalo" -version = "3.20.2" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" - -[[package]] -name = "bytemuck" -version = "1.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "byteorder-lite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytes" -version = "1.11.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" [[package]] name = "bzip2" @@ -477,9 +245,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.61" +version = "1.2.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" +checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" dependencies = [ "find-msvc-tools", "jobserver", @@ -487,6 +255,12 @@ dependencies = [ "shlex", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfg-if" version = "1.0.4" @@ -494,21 +268,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] -name = "chacha20" -version = "0.10.0" +name = "cfg_aliases" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "rand_core 0.10.1", -] +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.44" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ "iana-time-zone", "js-sys", @@ -523,73 +292,57 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common 0.1.7", + "crypto-common", "inout", ] [[package]] -name = "cmov" -version = "0.5.3" +name = "clap" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f88a43d011fc4a6876cb7344703e297c71dda42494fee094d5f7c76bf13f746" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" +dependencies = [ + "clap_builder", +] [[package]] -name = "color_quant" -version = "1.1.0" +name = "clap_builder" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", + "terminal_size", +] + +[[package]] +name = "clap_lex" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "colorchoice" -version = "1.0.5" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] -name = "combine" -version = "4.6.7" +name = "console" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4" dependencies = [ - "bytes", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", - "tokio-util", + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "windows-sys 0.61.2", ] -[[package]] -name = "compression-codecs" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" -dependencies = [ - "brotli", - "compression-core", -] - -[[package]] -name = "compression-core" -version = "0.4.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "const-oid" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" - [[package]] name = "constant_time_eq" version = "0.3.1" @@ -606,16 +359,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-foundation" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -631,15 +374,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cpufeatures" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" -dependencies = [ - "libc", -] - [[package]] name = "crc" version = "3.4.0" @@ -651,9 +385,9 @@ dependencies = [ [[package]] name = "crc-catalog" -version = "2.5.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" @@ -689,12 +423,6 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" -[[package]] -name = "crunchy" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" - [[package]] name = "crypto-common" version = "0.1.7" @@ -705,35 +433,17 @@ dependencies = [ "typenum", ] -[[package]] -name = "crypto-common" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710" -dependencies = [ - "hybrid-array", -] - -[[package]] -name = "ctutils" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e" -dependencies = [ - "cmov", -] - [[package]] name = "deflate64" -version = "0.1.12" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2" +checksum = "26bf8fc351c5ed29b5c2f0cbbac1b209b74f60ecd62e675a998df72c49af5204" [[package]] name = "deranged" -version = "0.5.8" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", ] @@ -746,7 +456,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] @@ -755,23 +465,11 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", - "crypto-common 0.1.7", + "block-buffer", + "crypto-common", "subtle", ] -[[package]] -name = "digest" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" -dependencies = [ - "block-buffer 0.12.0", - "const-oid", - "crypto-common 0.2.1", - "ctutils", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -780,15 +478,27 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + [[package]] name = "either" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -800,9 +510,9 @@ dependencies = [ [[package]] name = "env_filter" -version = "1.0.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" dependencies = [ "log", "regex", @@ -810,9 +520,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.10" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "anstream", "anstyle", @@ -821,26 +531,6 @@ dependencies = [ "log", ] -[[package]] -name = "equator" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" -dependencies = [ - "equator-macro", -] - -[[package]] -name = "equator-macro" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "equivalent" version = "1.0.2" @@ -857,85 +547,29 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "event-listener" -version = "5.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" -dependencies = [ - "event-listener", - "pin-project-lite", -] - -[[package]] -name = "exr" -version = "1.74.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4300e043a56aa2cb633c01af81ca8f699a321879a7854d3896a0ba89056363be" -dependencies = [ - "bit_field", - "half", - "lebe", - "miniz_oxide", - "rayon-core", - "smallvec", - "zune-inflate", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - [[package]] name = "fastrand" -version = "2.4.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" - -[[package]] -name = "fax" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" - -[[package]] -name = "fdeflate" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" -dependencies = [ - "simd-adler32", -] +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "filetime" -version = "0.2.27" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ "cfg-if", "libc", "libredox", + "windows-sys 0.60.2", ] [[package]] name = "find-msvc-tools" -version = "0.1.9" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" [[package]] name = "fixedbitset" @@ -945,13 +579,58 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.9" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" dependencies = [ "crc32fast", + "libz-rs-sys", "miniz_oxide", - "zlib-rs", +] + +[[package]] +name = "fluent" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8137a6d5a2c50d6b0ebfcb9aaa91a28154e0a70605f112d30cb0cd4a78670477" +dependencies = [ + "fluent-bundle", + "unic-langid", +] + +[[package]] +name = "fluent-bundle" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01203cb8918f5711e73891b347816d932046f95f54207710bda99beaeb423bf4" +dependencies = [ + "fluent-langneg", + "fluent-syntax", + "intl-memoizer", + "intl_pluralrules", + "rustc-hash", + "self_cell", + "smallvec", + "unic-langid", +] + +[[package]] +name = "fluent-langneg" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eebbe59450baee8282d71676f3bfed5689aeab00b27545e83e5f14b1195e8b0" +dependencies = [ + "unic-langid", +] + +[[package]] +name = "fluent-syntax" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54f0d287c53ffd184d04d8677f590f4ac5379785529e5e08b1c8083acdd5c198" +dependencies = [ + "memchr", + "thiserror", ] [[package]] @@ -960,12 +639,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - [[package]] name = "foreign-types" version = "0.3.2" @@ -991,10 +664,31 @@ dependencies = [ ] [[package]] -name = "futures-channel" -version = "0.3.32" +name = "fs_extra" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1002,44 +696,65 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "futures-sink" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ + "futures-channel", "futures-core", + "futures-io", "futures-macro", "futures-sink", "futures-task", + "memchr", "pin-project-lite", + "pin-utils", "slab", ] @@ -1055,13 +770,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.17" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1072,54 +787,36 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "r-efi 5.3.0", + "r-efi", "wasip2", ] -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi 6.0.0", - "rand_core 0.10.1", - "wasip2", - "wasip3", -] - -[[package]] -name = "gif" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "git2" -version = "0.20.4" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b" +checksum = "3e2b37e2f62729cdada11f0e6b3b6fe383c69c29fc619e391223e12856af308c" dependencies = [ "bitflags", "libc", "libgit2-sys", "log", - "openssl-probe 0.1.6", + "openssl-probe", "openssl-sys", "url", ] [[package]] -name = "h2" -version = "0.4.14" +name = "glob" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "h2" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -1134,31 +831,11 @@ dependencies = [ "tracing", ] -[[package]] -name = "half" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" -dependencies = [ - "cfg-if", - "crunchy", - "zerocopy", -] - [[package]] name = "hashbrown" -version = "0.15.5" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash", -] - -[[package]] -name = "hashbrown" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -1172,16 +849,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "hmac" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" -dependencies = [ - "digest 0.11.3", + "digest", ] [[package]] @@ -1229,20 +897,11 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "hybrid-array" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" -dependencies = [ - "typenum", -] - [[package]] name = "hyper" -version = "1.9.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", @@ -1255,6 +914,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -1262,14 +922,15 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.9" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ "http", "hyper", "hyper-util", "rustls", + "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", @@ -1306,13 +967,14 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.20" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ "base64", "bytes", "futures-channel", + "futures-core", "futures-util", "http", "http-body", @@ -1331,9 +993,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.65" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1355,13 +1017,12 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", - "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -1369,9 +1030,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -1382,9 +1043,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -1396,15 +1057,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.2.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ "icu_collections", "icu_locale_core", @@ -1416,15 +1077,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.2.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "2.2.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", @@ -1435,12 +1096,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "idna" version = "1.1.0" @@ -1454,64 +1109,35 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", ] -[[package]] -name = "image" -version = "0.25.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" -dependencies = [ - "bytemuck", - "byteorder-lite", - "color_quant", - "exr", - "gif", - "image-webp", - "moxcms", - "num-traits", - "png", - "qoi", - "ravif", - "rayon", - "rgb", - "tiff", - "zune-core", - "zune-jpeg", -] - -[[package]] -name = "image-webp" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" -dependencies = [ - "byteorder-lite", - "quick-error", -] - -[[package]] -name = "imgref" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40fac9d56ed6437b198fddba683305e8e2d651aa42647f00f5ae542e7f5c94a2" - [[package]] name = "indexmap" -version = "2.14.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.17.0", - "serde", - "serde_core", + "hashbrown", +] + +[[package]] +name = "indicatif" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88" +dependencies = [ + "console", + "portable-atomic", + "unicode-width", + "unit-prefix", + "web-time", ] [[package]] @@ -1524,21 +1150,39 @@ dependencies = [ ] [[package]] -name = "interpolate_name" -version = "0.2.4" +name = "intl-memoizer" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +checksum = "310da2e345f5eb861e7a07ee182262e94975051db9e4223e909ba90f392f163f" dependencies = [ - "proc-macro2", - "quote", - "syn", + "type-map", + "unic-langid", +] + +[[package]] +name = "intl_pluralrules" +version = "7.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078ea7b7c29a2b4df841a7f6ac8775ff6074020c6776d48491ce2268e068f972" +dependencies = [ + "unic-langid", ] [[package]] name = "ipnet" -version = "2.12.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +dependencies = [ + "memchr", + "serde", +] [[package]] name = "is_terminal_polyfill" @@ -1557,15 +1201,44 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "j4rs" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dacf87fdd07b36f3124894a5bf20c8d418aaa28d4974d717672507f6d05cd31c" +dependencies = [ + "cesu8", + "dunce", + "fs_extra", + "futures", + "java-locator", + "jni-sys", + "lazy_static", + "libc", + "libloading", + "log", + "serde", + "serde_json", +] + +[[package]] +name = "java-locator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09c46c1fe465c59b1474e665e85e1256c3893dd00927b8d55f63b09044c1e64f" +dependencies = [ + "glob", +] [[package]] name = "jiff" -version = "0.2.24" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00b5dbd620d61dfdcb6007c9c1f6054ebd75319f163d886a9055cec1155073d" +checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" dependencies = [ "jiff-static", "log", @@ -1576,13 +1249,32 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.24" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e000de030ff8022ea1da3f466fbb0f3a809f5e51ed31f6dd931c35181ad8e6d7" +checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", +] + +[[package]] +name = "jni-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c30a312d782b8d56a1e0897d45c1af33f31f9b4a4d13d31207a8675e0223b818" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c199962dfd5610ced8eca382606e349f7940a4ac7d867b58a046123411cbb4" +dependencies = [ + "quote", + "syn 1.0.109", ] [[package]] @@ -1597,71 +1289,31 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.98" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ - "cfg-if", - "futures-util", "once_cell", "wasm-bindgen", ] [[package]] -name = "json-patch" -version = "4.2.0" +name = "lazy_static" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7421438de105a0827e44fadd05377727847d717c80ce29a229f85fd04c427b72" -dependencies = [ - "jsonptr", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "jsonptr" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a3cc660ba5d72bce0b3bb295bf20847ccbb40fd423f3f05b61273672e561fe" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - -[[package]] -name = "lebe" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libbz2-rs-sys" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a6a8c165077efc8f3a971534c50ea6a1a18b329ef4a66e897a7e3a1494565f" +checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.186" +version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" - -[[package]] -name = "libfuzzer-sys" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12a681b7dd8ce12bff52488013ba614b869148d54dd79836ab85aafdd53f08d" -dependencies = [ - "arbitrary", - "cc", -] +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "libgit2-sys" @@ -1678,15 +1330,30 @@ dependencies = [ ] [[package]] -name = "libredox" -version = "0.1.16" +name = "libloading" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" dependencies = [ "bitflags", "libc", - "plain", - "redox_syscall 0.7.5", + "redox_syscall", ] [[package]] @@ -1706,28 +1373,37 @@ dependencies = [ [[package]] name = "libtbr" version = "0.1.1" -source = "git+https://pakin-inspiron-15-3530.tail110d9.ts.net/pakin/libtbr.git#21984bdfba3f9f9ab0f31b44a8010d173402cd25" +source = "git+https://gitlab.forthrd.io/Pakin/libtbr.git#0dd4b8a4f189c2a53b463d4ffb787be396637f5e" dependencies = [ "chrono", "flate2", "git2", - "indexmap", + "j4rs", "log", - "quick-xml", - "rand 0.9.4", + "rand", "rayon", "serde", "serde_json", "tar", + "uu_cp", "walkdir", "zip", ] [[package]] -name = "libz-sys" -version = "1.1.28" +name = "libz-rs-sys" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc3a226e576f50782b3305c5ccf458698f92798987f551c6a02efe8276721e22" +checksum = "15413ef615ad868d4d65dce091cb233b229419c7c0c4bcaa746c0901c49ff39c" +dependencies = [ + "zlib-rs", +] + +[[package]] +name = "libz-sys" +version = "1.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" dependencies = [ "cc", "libc", @@ -1737,15 +1413,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "lock_api" @@ -1762,15 +1438,6 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -[[package]] -name = "loop9" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" -dependencies = [ - "imgref", -] - [[package]] name = "lzma-rust2" version = "0.13.0" @@ -1778,7 +1445,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c60a23ffb90d527e23192f1246b14746e2f7f071cb84476dd879071696c18a4a" dependencies = [ "crc", - "sha2 0.10.9", + "sha2", ] [[package]] @@ -1787,31 +1454,11 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" -[[package]] -name = "maybe-rayon" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" -dependencies = [ - "cfg-if", - "rayon", -] - -[[package]] -name = "md-5" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" -dependencies = [ - "cfg-if", - "digest 0.11.3", -] - [[package]] name = "memchr" -version = "2.8.0" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "mime" @@ -1831,42 +1478,15 @@ dependencies = [ [[package]] name = "mio" -version = "1.2.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "windows-sys 0.61.2", ] -[[package]] -name = "moxcms" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" -dependencies = [ - "num-traits", - "pxfm", -] - -[[package]] -name = "multer" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http", - "httparse", - "memchr", - "mime", - "spin", - "version_check", -] - [[package]] name = "multimap" version = "0.10.1" @@ -1875,14 +1495,14 @@ checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" [[package]] name = "native-tls" -version = "0.2.18" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", "openssl", - "openssl-probe 0.2.1", + "openssl-probe", "openssl-sys", "schannel", "security-framework", @@ -1891,35 +1511,17 @@ dependencies = [ ] [[package]] -name = "new_debug_unreachable" -version = "1.0.6" +name = "nix" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - -[[package]] -name = "no_std_io2" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003" +checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "memchr", + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", ] -[[package]] -name = "nom" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" -dependencies = [ - "memchr", -] - -[[package]] -name = "noop_proc_macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" - [[package]] name = "num-bigint" version = "0.4.6" @@ -1932,20 +1534,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" - -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" @@ -1956,17 +1547,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -1977,28 +1557,16 @@ dependencies = [ ] [[package]] -name = "objc2-core-foundation" -version = "0.3.2" +name = "number_prefix" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" -dependencies = [ - "bitflags", -] - -[[package]] -name = "objc2-system-configuration" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7216bd11cbda54ccabcab84d523dc93b858ec75ecfb3a7d89513fa22464da396" -dependencies = [ - "objc2-core-foundation", -] +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "once_cell" -version = "1.21.4" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" @@ -2008,14 +1576,15 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "openssl" -version = "0.10.79" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0b434746ee2832f4f0baf10137e1cabb18cbe6912c69e2e33263c45250f542" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ "bitflags", "cfg-if", "foreign-types", "libc", + "once_cell", "openssl-macros", "openssl-sys", ] @@ -2028,7 +1597,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] @@ -2037,17 +1606,11 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" -[[package]] -name = "openssl-probe" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" - [[package]] name = "openssl-sys" -version = "0.9.115" +version = "0.9.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158fe5b292746440aa6e7a7e690e55aeb72d41505e2804c23c6973ad0e9c9781" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", @@ -2056,10 +1619,13 @@ dependencies = [ ] [[package]] -name = "parking" -version = "2.2.1" +name = "os_display" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" +checksum = "ad5fd71b79026fb918650dde6d125000a233764f1c2f1659a1c71118e33ea08f" +dependencies = [ + "unicode-width", +] [[package]] name = "parking_lot" @@ -2079,31 +1645,19 @@ checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.18", + "redox_syscall", "smallvec", "windows-link", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pastey" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" - [[package]] name = "pbkdf2" version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ - "digest 0.10.7", - "hmac 0.12.1", + "digest", + "hmac", ] [[package]] @@ -2114,134 +1668,72 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.8.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset", - "hashbrown 0.15.5", "indexmap", ] -[[package]] -name = "phf" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" -dependencies = [ - "phf_shared", - "serde", -] - -[[package]] -name = "phf_shared" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" -version = "1.1.12" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf0d9e68100b3a7989b4901972f265cd542e560a3a8a724e1e20322f4d06ce9" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.12" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a990e22f43e84855daf260dded30524ef4a9021cc7541c26540500a50b624389" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "pin-project-lite" -version = "0.2.17" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.33" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" - -[[package]] -name = "plain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" - -[[package]] -name = "png" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" -dependencies = [ - "bitflags", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "portable-atomic" -version = "1.13.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "portable-atomic-util" -version = "0.2.7" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" dependencies = [ "portable-atomic", ] -[[package]] -name = "postgres-protocol" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56201207dac53e2f38e848e31b4b91616a6bb6e0c7205b77718994a7f49e70fc" -dependencies = [ - "base64", - "byteorder", - "bytes", - "fallible-iterator", - "hmac 0.13.0", - "md-5", - "memchr", - "rand 0.10.1", - "sha2 0.11.0", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dc729a129e682e8d24170cd30ae1aa01b336b096cbb56df6d534ffec133d186" -dependencies = [ - "bytes", - "fallible-iterator", - "postgres-protocol", -] - [[package]] name = "potential_utf" -version = "0.1.5" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] @@ -2254,9 +1746,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppmd-rust" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efca4c95a19a79d1c98f791f10aebd5c1363b473244630bb7dbde1dc98455a24" +checksum = "d558c559f0450f16f2a27a1f017ef38468c1090c9ce63c8e51366232d53717b4" [[package]] name = "ppv-lite86" @@ -2274,42 +1766,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn", + "syn 2.0.111", ] [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] -[[package]] -name = "profiling" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" -dependencies = [ - "profiling-procmacros", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" -dependencies = [ - "quote", - "syn", -] - [[package]] name = "prost" -version = "0.14.3" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" +checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" dependencies = [ "bytes", "prost-derive", @@ -2317,14 +1790,15 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.14.3" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" +checksum = "ac6c3320f9abac597dcbc668774ef006702672474aad53c6d596b62e487b40b1" dependencies = [ "heck", "itertools", "log", "multimap", + "once_cell", "petgraph", "prettyplease", "prost", @@ -2332,37 +1806,37 @@ dependencies = [ "pulldown-cmark", "pulldown-cmark-to-cmark", "regex", - "syn", + "syn 2.0.111", "tempfile", ] [[package]] name = "prost-derive" -version = "0.14.3" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" +checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "prost-types" -version = "0.14.3" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" +checksum = "b9b4db3d6da204ed77bb26ba83b6122a73aeb2e87e25fbf7ad2e84c4ccbf8f72" dependencies = [ "prost", ] [[package]] name = "pulldown-cmark" -version = "0.13.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a14896dfa883796f1cb410461aef38810ea05f2b2c33c5aded3649095fdad" +checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" dependencies = [ "bitflags", "memchr", @@ -2371,48 +1845,18 @@ dependencies = [ [[package]] name = "pulldown-cmark-to-cmark" -version = "22.0.0" +version = "21.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50793def1b900256624a709439404384204a5dc3a6ec580281bfaac35e882e90" +checksum = "8246feae3db61428fd0bb94285c690b460e4517d83152377543ca802357785f1" dependencies = [ "pulldown-cmark", ] -[[package]] -name = "pxfm" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c5ccf5294c6ccd63a74f1565028353830a9c2f5eb0c682c355c471726a6e3f" - -[[package]] -name = "qoi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - -[[package]] -name = "quick-xml" -version = "0.39.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721da970c312655cde9b4ffe0547f20a8494866a4af5ff51f18b7c633d0c870b" -dependencies = [ - "memchr", -] - [[package]] name = "quote" -version = "1.0.45" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -2423,31 +1867,14 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - [[package]] name = "rand" -version = "0.9.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha", - "rand_core 0.9.5", -] - -[[package]] -name = "rand" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" -dependencies = [ - "chacha20", - "getrandom 0.4.2", - "rand_core 0.10.1", + "rand_core", ] [[package]] @@ -2457,79 +1884,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.5", + "rand_core", ] [[package]] name = "rand_core" -version = "0.9.5" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ "getrandom 0.3.4", ] -[[package]] -name = "rand_core" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" - -[[package]] -name = "rav1e" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" -dependencies = [ - "aligned-vec", - "arbitrary", - "arg_enum_proc_macro", - "arrayvec", - "av-scenechange", - "av1-grain", - "bitstream-io", - "built", - "cfg-if", - "interpolate_name", - "itertools", - "libc", - "libfuzzer-sys", - "log", - "maybe-rayon", - "new_debug_unreachable", - "noop_proc_macro", - "num-derive", - "num-traits", - "paste", - "profiling", - "rand 0.9.4", - "rand_chacha", - "simd_helpers", - "thiserror", - "v_frame", - "wasm-bindgen", -] - -[[package]] -name = "ravif" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" -dependencies = [ - "avif-serialize", - "imgref", - "loop9", - "quick-error", - "rav1e", - "rayon", - "rgb", -] - [[package]] name = "rayon" -version = "1.12.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" dependencies = [ "either", "rayon-core", @@ -2545,31 +1916,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redis" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d32a1ac9123f0d84fda64bfc02a271d9868483162dd2d9099b5c362ece064c" -dependencies = [ - "arcstr", - "async-lock", - "bytes", - "cfg-if", - "combine", - "futures-util", - "itoa", - "num-bigint", - "percent-encoding", - "pin-project-lite", - "ryu", - "sha1_smol", - "socket2", - "tokio", - "tokio-util", - "url", - "xxhash-rust", -] - [[package]] name = "redox_syscall" version = "0.5.18" @@ -2579,20 +1925,11 @@ dependencies = [ "bitflags", ] -[[package]] -name = "redox_syscall" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4666a1a60d8412eab19d94f6d13dcc9cea0a5ef4fdf6a5db306537413c661b1b" -dependencies = [ - "bitflags", -] - [[package]] name = "regex" -version = "1.12.3" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -2602,9 +1939,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.14" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -2613,15 +1950,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "reqwest" -version = "0.12.28" +version = "0.12.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +checksum = "b6eff9328d40131d43bd911d42d79eb6a47312002a4daefc9e37f17e74a7701a" dependencies = [ "base64", "bytes", @@ -2657,12 +1994,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "rgb" -version = "0.8.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" - [[package]] name = "ring" version = "0.17.14" @@ -2671,17 +2002,23 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.17", + "getrandom 0.2.16", "libc", "untrusted", "windows-sys 0.52.0", ] [[package]] -name = "rustix" -version = "1.1.4" +name = "rustc-hash" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustix" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ "bitflags", "errno", @@ -2692,9 +2029,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.40" +version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" +checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" dependencies = [ "once_cell", "rustls-pki-types", @@ -2705,18 +2042,18 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.14.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" +checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c" dependencies = [ "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.103.13" +version = "0.103.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" dependencies = [ "ring", "rustls-pki-types", @@ -2731,9 +2068,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.23" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -2746,9 +2083,9 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.29" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ "windows-sys 0.61.2", ] @@ -2761,12 +2098,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "3.7.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags", - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -2774,19 +2111,19 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.17.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", ] [[package]] -name = "semver" -version = "1.0.28" +name = "self_cell" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +checksum = "16c2f82143577edb4921b71ede051dac62ca3c16084e918bf7b40c96ae10eb33" [[package]] name = "serde" @@ -2815,21 +2152,21 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ "indexmap", "itoa", "memchr", + "ryu", "serde", "serde_core", - "zmij", ] [[package]] @@ -2862,16 +2199,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", - "digest 0.10.7", + "cpufeatures", + "digest", ] -[[package]] -name = "sha1_smol" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" - [[package]] name = "sha2" version = "0.10.9" @@ -2879,19 +2210,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" -dependencies = [ - "cfg-if", - "cpufeatures 0.3.0", - "digest 0.11.3", + "cpufeatures", + "digest", ] [[package]] @@ -2902,40 +2222,24 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.8" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" dependencies = [ - "errno", "libc", ] [[package]] name = "simd-adler32" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" - -[[package]] -name = "simd_helpers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" -dependencies = [ - "quote", -] - -[[package]] -name = "siphasher" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "slab" -version = "0.4.12" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" @@ -2945,20 +2249,14 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -2966,15 +2264,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] -name = "stringprep" -version = "0.1.5" +name = "strsim" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" @@ -2984,9 +2277,20 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.117" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.111" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -3010,17 +2314,17 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "system-configuration" -version = "0.7.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags", - "core-foundation 0.9.4", + "core-foundation", "system-configuration-sys", ] @@ -3036,9 +2340,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.45" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22692a6476a21fa75fdfc11d452fda482af402c008cdbaf3476414e122040973" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ "filetime", "libc", @@ -3049,132 +2353,100 @@ dependencies = [ name = "tbm-git-repo-service" version = "0.1.0" dependencies = [ - "async-compression", "axum", - "axum-extra", - "axum-macros", - "bb8", - "bb8-redis", - "brotli", - "bytes", "env_logger", - "futures-util", "git2", - "image", - "json-patch", "libgit2-sys", "libtbr", "log", "prost", - "redis", "reqwest", "serde", "serde_json", "tokio", - "tokio-postgres", - "tokio-util", "tonic", "tonic-prost", "tonic-prost-build", - "uuid", ] [[package]] name = "tempfile" -version = "3.27.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.4.2", + "getrandom 0.3.4", "once_cell", "rustix", "windows-sys 0.61.2", ] [[package]] -name = "thiserror" -version = "2.0.18" +name = "terminal_size" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" +dependencies = [ + "rustix", + "windows-sys 0.60.2", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.18" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "tiff" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" -dependencies = [ - "fax", - "flate2", - "half", - "quick-error", - "weezl", - "zune-jpeg", + "syn 2.0.111", ] [[package]] name = "time" -version = "0.3.47" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", "num-conv", "powerfmt", - "serde_core", + "serde", "time-core", ] [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "tinystr" -version = "0.8.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", + "serde_core", "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "tokio" -version = "1.52.2" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "110a78583f19d5cdb2c5ccf321d1290344e71313c6c37d43520d386027d18386" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ "bytes", "libc", @@ -3189,13 +2461,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] @@ -3208,32 +2480,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-postgres" -version = "0.7.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd8df5ef180f6364759a6f00f7aadda4fbbac86cdee37480826a6ff9f3574ce" -dependencies = [ - "async-trait", - "byteorder", - "bytes", - "fallible-iterator", - "futures-channel", - "futures-util", - "log", - "parking_lot", - "percent-encoding", - "phf", - "pin-project-lite", - "postgres-protocol", - "postgres-types", - "rand 0.10.1", - "socket2", - "tokio", - "tokio-util", - "whoami", -] - [[package]] name = "tokio-rustls" version = "0.26.4" @@ -3246,9 +2492,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.18" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -3257,9 +2503,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.18" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" dependencies = [ "bytes", "futures-core", @@ -3270,9 +2516,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.14.6" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" +checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" dependencies = [ "async-trait", "axum", @@ -3299,21 +2545,21 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.14.6" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" +checksum = "4c40aaccc9f9eccf2cd82ebc111adc13030d23e887244bc9cfa5d1d636049de3" dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "tonic-prost" -version = "0.14.6" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" +checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" dependencies = [ "bytes", "prost", @@ -3322,25 +2568,25 @@ dependencies = [ [[package]] name = "tonic-prost-build" -version = "0.14.6" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" +checksum = "b4a16cba4043dc3ff43fcb3f96b4c5c154c64cbd18ca8dce2ab2c6a451d058a2" dependencies = [ "prettyplease", "proc-macro2", "prost-build", "prost-types", "quote", - "syn", + "syn 2.0.111", "tempfile", "tonic-build", ] [[package]] name = "tower" -version = "0.5.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", @@ -3357,20 +2603,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.10" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68d6fdd9f81c2819c9a8b0e0cd91660e7746a8e6ea2ba7c6b2b057985f6bcb51" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ "bitflags", "bytes", "futures-util", "http", "http-body", + "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", - "url", ] [[package]] @@ -3387,9 +2633,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.44" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" dependencies = [ "log", "pin-project-lite", @@ -3405,14 +2651,14 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "tracing-core" -version = "0.1.36" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" dependencies = [ "once_cell", ] @@ -3424,49 +2670,61 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "typenum" -version = "1.20.0" +name = "type-map" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" - -[[package]] -name = "unicase" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" - -[[package]] -name = "unicode-bidi" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unicode-normalization" -version = "0.1.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" dependencies = [ - "tinyvec", + "rustc-hash", ] [[package]] -name = "unicode-properties" -version = "0.1.4" +name = "typenum" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] -name = "unicode-xid" -version = "0.2.6" +name = "unic-langid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "a28ba52c9b05311f4f6e62d5d9d46f094bd6e84cb8df7b3ef952748d752a7d05" +dependencies = [ + "unic-langid-impl", +] + +[[package]] +name = "unic-langid-impl" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce1bf08044d4b7a94028c93786f8566047edc11110595914de93362559bc658" +dependencies = [ + "tinystr", +] + +[[package]] +name = "unicase" +version = "2.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unit-prefix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" [[package]] name = "untrusted" @@ -3476,9 +2734,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.8" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", @@ -3499,27 +2757,69 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "uuid" -version = "1.23.1" +name = "uu_cp" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +checksum = "7900736932032ced4815471b4dff36aade3964d79c2682ab4b5d6a7b2b9ce42c" dependencies = [ - "getrandom 0.4.2", - "js-sys", - "wasm-bindgen", + "clap", + "filetime", + "fluent", + "indicatif", + "libc", + "linux-raw-sys", + "thiserror", + "uucore", + "walkdir", + "xattr", ] [[package]] -name = "v_frame" -version = "0.3.9" +name = "uucore" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +checksum = "7203e48e80ac344450cba5323d8b4a71967ec1e81ae4022775ada90d2b0e08ac" dependencies = [ - "aligned-vec", + "bigdecimal", + "bstr", + "clap", + "dunce", + "fluent", + "fluent-bundle", + "fluent-syntax", + "glob", + "libc", + "nix", "num-traits", - "wasm-bindgen", + "number_prefix", + "os_display", + "thiserror", + "unic-langid", + "uucore_procs", + "walkdir", + "wild", + "winapi-util", + "windows-sys 0.61.2", + "xattr", ] +[[package]] +name = "uucore_procs" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "449e64ce116ed0cc8c5897bd8706d36aed1ec027b647494df4eae6996d8d59de" +dependencies = [ + "proc-macro2", + "quote", + "uuhelp_parser", +] + +[[package]] +name = "uuhelp_parser" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e4945611996e885dc4eeae23f3d6f20cfb6e8f4bad4985c2222bbcf9a9745" + [[package]] name = "vcpkg" version = "0.2.15" @@ -3557,47 +2857,20 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasi" -version = "0.14.7+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" -dependencies = [ - "wasip2", -] - [[package]] name = "wasip2" -version = "1.0.3+wasi-0.2.9" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "wit-bindgen 0.57.1", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen 0.51.0", -] - -[[package]] -name = "wasite" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fe902b4a6b8028a753d5424909b764ccf79b7a209eac9bf97e59cda9f71a42" -dependencies = [ - "wasi 0.14.7+wasi-0.2.4", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.121" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ "cfg-if", "once_cell", @@ -3608,19 +2881,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.71" +version = "0.4.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" dependencies = [ + "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", + "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.121" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3628,87 +2904,53 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.121" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn", + "syn 2.0.111", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.121" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - [[package]] name = "web-sys" -version = "0.3.98" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "weezl" -version = "0.1.12" +name = "web-time" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] -name = "whoami" -version = "2.1.2" +name = "wild" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "998767ef88740d1f5b0682a9c53c24431453923962269c2db68ee43788c5a40d" +checksum = "a3131afc8c575281e1e80f36ed6a092aa502c08b18ed7524e86fbbb12bb410e1" dependencies = [ - "libc", - "libredox", - "objc2-system-configuration", - "wasite", - "web-sys", + "glob", ] [[package]] @@ -3741,7 +2983,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] @@ -3752,7 +2994,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] @@ -3796,7 +3038,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", ] [[package]] @@ -3814,14 +3065,31 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -3830,42 +3098,84 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -3873,104 +3183,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "wit-bindgen" -version = "0.51.0" +name = "windows_x86_64_msvc" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "wit-bindgen" -version = "0.57.1" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.6.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "xattr" @@ -3982,23 +3210,11 @@ dependencies = [ "rustix", ] -[[package]] -name = "xxhash-rust" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" - -[[package]] -name = "y4m" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" - [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -4007,54 +3223,54 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.48" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" +checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.48" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" +checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "zerofrom" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.7" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", "synstructure", ] @@ -4069,20 +3285,20 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.4.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] name = "zerotrie" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", @@ -4091,10 +3307,11 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.6" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ + "serde", "yoke", "zerofrom", "zerovec-derive", @@ -4102,13 +3319,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.111", ] [[package]] @@ -4125,7 +3342,7 @@ dependencies = [ "deflate64", "flate2", "getrandom 0.3.4", - "hmac 0.12.1", + "hmac", "indexmap", "lzma-rust2", "memchr", @@ -4140,15 +3357,9 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.6.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513" - -[[package]] -name = "zmij" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +checksum = "51f936044d677be1a1168fae1d03b583a285a5dd9d8cbf7b24c23aa1fc775235" [[package]] name = "zopfli" @@ -4189,27 +3400,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[package]] -name = "zune-core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" - -[[package]] -name = "zune-inflate" -version = "0.2.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "zune-jpeg" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" -dependencies = [ - "zune-core", -] diff --git a/Cargo.toml b/Cargo.toml index 0121b2c..a553349 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,33 +4,19 @@ version = "0.1.0" edition = "2024" [dependencies] -async-compression = { version = "0.4.39", features = ["tokio", "brotli"] } axum = "0.8.7" -axum-macros = "0.5.0" -axum-extra = { version = "0.12.6", features = ["multipart"] } -bb8 = "0.9.1" -bb8-redis = "0.26.0" -brotli = "8.0.2" -bytes = "1.11.1" env_logger = "0.11.8" -futures-util = "0.3.31" git2 = { version = "0.20.3", features = ["https", "ssh"] } -image = "0.25.9" -json-patch = "4.1.0" libgit2-sys = { version = "0.18.3", features = ["ssh"] } -libtbr = { git = "https://pakin-inspiron-15-3530.tail110d9.ts.net/pakin/libtbr.git", version = "0.1.1" } +libtbr = { git = "https://gitlab.forthrd.io/Pakin/libtbr.git", version = "0.1.1" } log = "0.4.29" prost = "0.14.1" -redis = { version = "1.0.2", features = ["tokio-comp"] } reqwest = { version = "0.12.25", features = ["json"] } serde = { version = "1.0.228", features = ["derive"] } serde_json = { version = "1.0.145", features = ["preserve_order"] } tokio = { version = "1.48.0", features = ["full"] } -tokio-util = { version = "0.7.18", features = ["io"] } tonic = { version = "0.14.2", features = ["transport"] } tonic-prost = "0.14.2" -uuid = { version = "1.20.0", features = ["v4"] } -tokio-postgres = "0.7.17" [build-dependencies] tonic-prost-build = "0.14.2" diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 442836b..0000000 --- a/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM rustlang/rust:nightly-slim AS builder - -WORKDIR /app - -# Install build dependencies -RUN apt update && apt install -y \ - musl-tools \ - musl-dev \ - build-essential \ - libssl-dev \ - curl \ - pkg-config \ - ca-certificates \ - protobuf-compiler \ - zlib1g - -# Copy dependency files first for better caching -COPY Cargo.toml Cargo.lock ./ -COPY ./src ./src -COPY build.rs ./ -COPY tbm-proto ./tbm-proto - -# Download config -RUN curl -X GET https://pakin-inspiron-15-3530.tail110d9.ts.net/pakin/tbm-git-repo-service/releases/download/config/.tbcfg -o .tbcfg - -# Build the application -ENV RUSTFLAGS="-C target-feature=+crt-static" -RUN cargo build --release - -# Builder -FROM gcr.io/distroless/cc - -# Copy the binary -COPY --from=builder /app/target/release/tbm-git-repo-service / -COPY --from=builder /app/.tbcfg / - -# Create data directory - -EXPOSE 36583 - -# Environment defaults - -CMD ["./tbm-git-repo-service"] \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 26d9dc8..0000000 --- a/README.md +++ /dev/null @@ -1,183 +0,0 @@ -# tbm-git-service - -Git repo as a service with operational endpoints - ---- - -## Endpoints - -### Checkout file - -Get file content or list of file in directory from HEAD - -``` -GET .../checkout?path= -``` - -Examples - -Get list of files in directory - -```bash -curl -X GET http://localhost:36593/checkout\?path\=inter -aus,common,dev,gbr,gbr_premium,hkg,ltu,mys,rou,sgp,tha,tha_premium,uae_dubai,usa,whatthecup -``` - -Get file - -```bash -curl -X GET http://localhost:36593/checkout\?path\=inter/mys/xml/page_catalog_group_other.lxml - - - "Enable" - 1080 - 1920 -; "0xeae6e1" - SoundVolume - - ; On open - -``` - -Error - -```bash -curl -X GET http://localhost:36593/checkout\?path\=inter2 -File not found -``` - ---- - -### Fetch - -Fetching & update index of current repo - -``` -GET .../fetch -``` - -Expected result - -``` -{"result": "fetch success"} -``` - -Error - -``` -{"error": "..."} -``` - ---- - -### Commit - -Commit changes of file i.e. editing, adding, etc. - -``` -POST .../commit -``` - -Body must be multipart - -- Single file - -``` -path: string -file: text/binary is acceptable -signature_username: string -signature_email: stirng -message: string -``` - -- Multiple file - -``` -signature_username: string -signature_email: stirng -message: string -fileX1: text/binary is acceptable -pathX1: string -fileX2: text/binary is acceptable -pathX2: string -... -``` - -Expected result - -``` -{"result": "commit hash id"} -``` - -Error - -``` -{"error": "..."} -``` - -Example - -```curl -curl --request POST \ - --url http://localhost:36583/commit \ - --header 'content-type: multipart/form-data' \ - --form path=mys/version.dev \ - --form 'signature_username=git api' \ - --form signature_email=supra.m2.dev@forth.co.th \ - --form 'message=test commit' \ - --form file=@./mys.version.test -``` - -NOTE: file & path in multiple file must have the same name after - ---- - -### Push - -Push local commits to remote - -``` -GET .../push -``` - -Expected result - -``` -{"result": "push completed"} -``` - -Error - -``` -{"error": "..."} -``` - ---- - -### Pull - -Pull commits from remote. This operation always does git reset hard first before pull for reason of no conflicts. - -``` -GET .../pull -``` - -Expected result - -``` -{"result": "pull completed"} -``` - -Error - -``` -{"error": "..."} -``` - -NOTE: Commit did lost but could be checkout later - ---- - -### Recovery - -WIP... diff --git a/src/app.rs b/src/app.rs index 77c26c0..60c80e0 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,1268 +1,189 @@ -use std::{ - collections::HashMap, - io::Cursor, - path::{Path, PathBuf}, - sync::Arc, - time::Duration, -}; +use std::collections::HashMap; -use async_compression::tokio::bufread::BrotliEncoder; -use axum::{ - Json, Router, - body::Body, - extract::{DefaultBodyLimit, Query, State}, - response::{IntoResponse, Response}, - routing::{get, post}, -}; -use axum_extra::extract::multipart::Multipart; -use axum_macros::debug_handler; -use bb8::{Pool, PooledConnection}; -use bb8_redis::RedisConnectionManager; -use brotli::CompressorWriter; -use git2::{ - Cred, FetchOptions, Object, ObjectType, Oid, PushOptions, RemoteCallbacks, Repository, - ResetType, build::CheckoutBuilder, -}; +use axum::{extract::{Query, State}, response::IntoResponse, routing::get, Json, Router}; +use git2::{Repository, RemoteCallbacks, FetchOptions, Cred}; +use log::{error, warn}; +use libtbr::recipe_functions::common; +use serde::Deserialize; +use serde_json::{json, Value}; -use image::load_from_memory; -use log::{error, info, warn}; -use redis::{AsyncTypedCommands, Connection, TypedCommands, aio::MultiplexedConnection}; -use reqwest::header; -use serde::{Deserialize, Serialize}; -use serde_json::{Value, json}; -use tokio::{ - io::{AsyncReadExt, BufReader}, - sync::{ - Mutex, MutexGuard, - mpsc::{Receiver, Sender, channel}, - }, - task::JoinSet, -}; - -use tokio_postgres::NoTls; -use uuid::Uuid; - -use crate::{ - gcm, - tx::{ - self, - helpers::{doc_snap_key, doc_tx_stream_key, doc_ver_key, now_unix}, - patcher::apply_ops, - types::PatchOp, - }, -}; - -type RedisPool = Pool; - -#[derive(Debug, Clone)] -pub struct CacheJob { - pub rel_path: String, - pub file_data: Option>, -} +use crate::{gcm, reg}; #[derive(Clone)] pub struct AppState { - // cached_country_names: Vec<&'static str>, - configures: gcm::Configure, - repo: Arc>, - // commit external db - postgres: Arc>, - redis: RedisPool, - // save already fetched path, further calls should fetch from redis instead. - fetched: Vec, + cached_country_names: Vec<&'static str>, + configures: gcm::Configure } impl AppState { - // pub fn check_country_existed(&self, req: &str) -> bool { - // self.cached_country_names.contains(&req) - // } + pub fn check_country_existed(&self, req: &str) -> bool { + self.cached_country_names.contains(&req) + } - pub fn get_config(&self, config_name: &str) -> Option<&String> { - self.configures.get(config_name) - } - - pub fn get_all_configures(self) -> gcm::Configure { - self.configures.clone() - } + pub fn get_config(&self, config_name: &str) -> Option<&String> { + self.configures.get(config_name) + } } -const SUPPORTED_IMAGES: [&str; 6] = ["jpg", "jpeg", "png", "gif", "bmp", "webp"]; - -fn is_supported_image_file_type(name: String) -> bool { - let ext = name.split(".").last().unwrap_or(""); - - SUPPORTED_IMAGES.contains(&ext) -} - -fn detect_content_type(path: &str) -> String { - let ext = path.split(".").last().unwrap_or(""); - if ext.eq(".json") { - "application/json".to_string() - } else if SUPPORTED_IMAGES.contains(&ext) { - format!("image/{ext}").to_string() - } else { - "application/octet-stream".to_string() - } -} - -#[derive(Deserialize, Debug)] +#[derive(Deserialize)] struct CheckoutParams { - path: String, + path: String } -async fn checkout_handler( - State(state): State, - Query(param): Query, -) -> impl IntoResponse { - let fpath = format!( - "{}:{}", - state - .get_config("GIT_REPO_BRANCH_NAME") - .map(|x| x.to_string()) - .unwrap_or("master".to_string()), - param.path +async fn checkout_handler(State(state): State, Query(param): Query) -> impl IntoResponse { + let mut response: HashMap = HashMap::new(); + + let repo_path = state.get_config("GIT_REPO_LOCAL_DEST"); + if repo_path.is_none() { + response.insert("error".to_string(), json!("config repo dest not found".to_string())); + return ( + axum::http::StatusCode::INTERNAL_SERVER_ERROR, + Json(json!(response)) ); - - // println!( - // "req: {param:?}, has_cached: {}, saved: {:?}", - // state - // .fetched - // .contains(¶m.path.clone().as_str().to_string()), - // state.fetched.clone() - // ); - - // quick response from redis - - let repo = state.repo.clone(); - - // let obj = match repo.revparse_single(&fpath) { - // Ok(obj) => obj, - // Err(e) => { - // let error_log = format!("unexpected revparse single: {err}", err = e.message()); - // error!("{error_log}"); - // response.insert("error".to_string(), json!(error_log.clone())); - // return ( - // axum::http::StatusCode::INTERNAL_SERVER_ERROR, - // Json(json!(response)), - // ) - // .into_response(); - // } - // }; - // - - // let obj_bytes = match get_git_object(repo, &fpath).await { - // Ok(ob) => ob, - // Err(e) => { - // return ( - // axum::http::StatusCode::INTERNAL_SERVER_ERROR, - // Json(json!(format!("{e}"))), - // ) - // .into_response(); - // } - // }; - - let fpath_clone = fpath.clone(); - let result = tokio::task::spawn_blocking(move || { - let repo = repo.try_lock()?; - - get_git_object(repo, &fpath_clone) - }) - .await; - - match result { - Ok(Ok(o)) => { - let state_clone = state.clone(); - let key_clone = fpath.clone(); - let data_clone = o.clone(); - - let content_type = detect_content_type(&fpath); - Response::builder() - .header(header::CONTENT_TYPE, content_type) - .body(Body::from(o)) - .unwrap() + } + match param.path.as_str() { + legit_path if param.path.contains("/") || state.check_country_existed(param.path.as_str()) => { + let rpath = repo_path.unwrap().clone(); + let repo = match Repository::open_bare(rpath) { + Ok(repo) => repo, + Err(_) => { + let error_log = "unable to open repo as bare"; + error!("{error_log}"); + response.insert("error".to_string(), json!(error_log)); + return ( + axum::http::StatusCode::INTERNAL_SERVER_ERROR, + Json(json!(response)) + ); } - _ => (axum::http::StatusCode::NOT_FOUND, "File not found").into_response(), + }; + + let fpath = format!("master:{}", legit_path); + let obj = match repo.revparse_single(&fpath){ + Ok(obj) => obj, + Err(e) => { + let error_log = format!("unexpected revparse single: {err}", err = e.message()); + error!("{error_log}"); + response.insert("error".to_string(), json!(error_log.clone())); + return ( + axum::http::StatusCode::INTERNAL_SERVER_ERROR, + Json(json!(response)) + ); + } + }; + + if let Some(blob) = obj.as_blob() { + let content = unsafe { + str::from_utf8_unchecked(blob.content()) + }; + response.insert("result".to_string(), json!(content.to_string())); + } else if let Some(tree) = obj.as_tree() { + let dir_list = tree.iter().map(|x| x.name().unwrap_or("").to_string()).collect::>(); + response.insert("result".to_string(), json!(dir_list)); + } else { + let error_log = "not obj nor tree"; + error!("{error_log}"); + response.insert("error".to_string(), json!(error_log)); + } } + _ => { + let error_log = "requested path is unexpected"; + error!("{error_log}"); + response.insert("error".to_string(), json!(error_log)); + } + } - // if let Some(blob) = obj.as_blob() { - // // image - // if is_supported_image_file_type(fpath.clone()) { - // let fc = fpath.clone(); - // let ext = fc.split(".").last().unwrap_or(""); - // let content: &[u8] = blob.content(); - // let img = match load_from_memory(content) { - // Ok(img) => img, - // Err(err) => { - // //.map_err(|err| format!("Failed tp load image from memory: {err}")) - // return ( - // axum::http::StatusCode::INTERNAL_SERVER_ERROR, - // Json(json!(format!("Failed tp load image from memory: {err}"))), - // ) - // .into_response(); - // } - // }; - - // let mut image_buffer = Vec::new(); - // img.write_to( - // &mut Cursor::new(&mut image_buffer), - // image::ImageFormat::from_extension(ext).unwrap_or(image::ImageFormat::Png), - // ) - // .unwrap(); - - // return Response::builder() - // .header(header::CONTENT_TYPE, format!("image/{ext}")) - // .body(Body::from(image_buffer)) - // .unwrap(); - // } - - // let content = unsafe { str::from_utf8_unchecked(blob.content()) }; - - // return (axum::http::StatusCode::OK, Json(json!(content))).into_response(); - - // // if let Ok(mut conn) = state.redis.get().await { - // // let _ = conn.set(legit_path.to_string(), content.to_string()).await; - // // state.fetched.push(legit_path.to_string()); - // // } - // } else if let Some(tree) = obj.as_tree() { - // let dir_list = tree - // .iter() - // .map(|x| x.name().unwrap_or("").to_string()) - // .collect::>(); - // response.insert("result".to_string(), json!(dir_list)); - - // return (axum::http::StatusCode::OK, Json(json!(dir_list))).into_response(); - - // // if let Ok(mut conn) = state.redis.get().await { - // // let _ = conn.set(legit_path.to_string(), dir_list.join(",")).await; - // // state.fetched.push(legit_path.to_string()); - // // } - // } else { - // let error_log = "not obj nor tree"; - // error!("{error_log}"); - // response.insert("error".to_string(), json!(error_log)); - // return (axum::http::StatusCode::BAD_REQUEST, Json(json!(response))).into_response(); - // } - - // println!("checkout response: {response:?}"); - - // (axum::http::StatusCode::OK, Json(json!(response))) + ( + axum::http::StatusCode::BAD_REQUEST, + Json(json!(response)) + ) } async fn fetch_handler(State(state): State) -> impl IntoResponse { - let mut response: HashMap = HashMap::new(); - if let Some(repo_path) = state.clone().get_config("GIT_REPO_LOCAL_DEST") { - let repo = state.repo.lock().await; + let mut response: HashMap = HashMap::new(); + if let Some(repo_path) = state.get_config("GIT_REPO_LOCAL_DEST") { + let rpath = repo_path.clone(); - let mut remote = match repo.find_remote("origin") { - Ok(remote) => remote, - Err(e) => { - let error_log = format!("unable to find remote, {}", e.message()); - error!("{error_log}"); - return ( - axum::http::StatusCode::INTERNAL_SERVER_ERROR, - Json(json!(response)), - ); - } - }; - - if state.get_config("GIT_REPO_USERNAME").is_none() - || state.get_config("GIT_REPO_PASSWORD").is_none() - { - warn!("username or password not provided may cause fetching fail"); - } - - let mut callbacks = RemoteCallbacks::new(); - callbacks.credentials(|_, _, _| { - Cred::userpass_plaintext( - state - .get_config("GIT_REPO_USERNAME") - .unwrap_or(&"".to_string()), - state - .get_config("GIT_REPO_PASSWORD") - .unwrap_or(&"".to_string()), - ) - }); - - let mut fetch_options = FetchOptions::new(); - fetch_options.remote_callbacks(callbacks); - - match remote.fetch(&["origin"], Some(&mut fetch_options), None) { - Ok(_) => {} - Err(e) => { - error!("error while fetching {}", e.message()); - return ( - axum::http::StatusCode::INTERNAL_SERVER_ERROR, - Json(json!({"error": format!("error while fetching {}", e.message())})), - ); - } - } - } else { - let error_log = "cannot find local repo"; + let repo = match Repository::open_bare(rpath) { + Ok(repo) => repo, + Err(_) => { + let error_log = "unable to open bare repo"; error!("{error_log}"); response.insert("error".to_string(), json!(error_log)); return ( - axum::http::StatusCode::INTERNAL_SERVER_ERROR, - Json(json!(response)), + axum::http::StatusCode::INTERNAL_SERVER_ERROR, + Json(json!(response)) ); - } - - // tokio::spawn(async move { - // let _ = broadcast_need_update_new_data_after_fetch(state.clone()).await; - // }); - - ( - axum::http::StatusCode::OK, - Json(json!({"result": "fetch success"})), - ) -} - -// refetch data after request `/fetch` -// async fn broadcast_need_update_new_data_after_fetch( -// state: AppState, -// ) -> Result<(), Box> { -// // clear out saved state, user must request again -// // state.fetched.clear(); // ----> background fetch into redis -// // -// // -// let state_cl = state.clone(); -// let mut rcli = state_cl.redis.try_lock()?; -// for s in state.fetched { -// let _ = rcli.publish("recipe_repo_news", s); -// } - -// Ok(()) -// } - -// { path: "/path/to/file", signature: { -// username: "", email: "" -// }, patch_key: "edit_id_from_redis"} -#[derive(Deserialize)] -struct CommitBody { - // Actual file path - path: String, - // Signature of user - signature: Signature, - // Key to grep content changes from redis - patch_key: String, - // user message - message: Option, - #[serde(flatten)] - extra: HashMap, -} - -#[derive(Deserialize, Debug)] -struct Signature { - username: String, - email: String, -} - -async fn commit_handler( - State(state): State, - // request body as multipart/form-data - mut payload: Multipart, -) -> impl IntoResponse { - // operate on repo - let op_repo = state - .get_config("GIT_REPO_LOCAL_DEST") - .cloned() - .unwrap_or_default() - .replace("./", ""); - - // Extract multipart fields - let mut path: Option = None; - let mut signature_username: Option = None; - let mut signature_email: Option = None; - let mut message: Option = None; - let mut file_bytes: Option> = None; - - let mut ref_message: Option = None; - - let mut file_mappings: HashMap> = HashMap::new(); - let mut filex_map: HashMap> = HashMap::new(); - let mut pathx_map: HashMap = HashMap::new(); - - // Process each field in the multipart payload - while let Ok(Some(field)) = payload.next_field().await { - let name = field.name().unwrap_or("").to_string(); - - match name.as_str() { - "path" => { - path = Some(match field.text().await { - Ok(t) => t, - Err(e) => { - return ( - axum::http::StatusCode::BAD_REQUEST, - Json(json!({"error": format!("Failed to read path field: {}", e)})), - ); - } - }); - } - "signature_username" => { - signature_username = Some(match field.text().await { - Ok(t) => t, - Err(e) => { - return ( - axum::http::StatusCode::BAD_REQUEST, - Json( - json!({"error": format!("Failed to read signature_username field: {}", e)}), - ), - ); - } - }); - } - "signature_email" => { - signature_email = Some(match field.text().await { - Ok(t) => t, - Err(e) => { - return ( - axum::http::StatusCode::BAD_REQUEST, - Json( - json!({"error": format!("Failed to read signature_email field: {}", e)}), - ), - ); - } - }); - } - "message" => { - message = Some(match field.text().await { - Ok(t) => t, - Err(e) => { - return ( - axum::http::StatusCode::BAD_REQUEST, - Json(json!({"error": format!("Failed to read message field: {}", e)})), - ); - } - }); - } - "file" => { - let _file_bytes = field.bytes().await; - file_bytes = Some(match _file_bytes { - Ok(b) => b.to_vec(), - Err(e) => { - return ( - axum::http::StatusCode::BAD_REQUEST, - Json(json!({"error": format!("Failed to read file field: {}", e)})), - ); - } - }); - } - "ref" => { - ref_message = Some(match field.text().await { - Ok(r) => r, - Err(e) => { - return ( - axum::http::StatusCode::BAD_REQUEST, - Json(json!({"error": format!("Failed to read ref field: {}", e)})), - ); - } - }) - } - - filex if name.starts_with("file") => match field.bytes().await { - Ok(fx) => { - filex_map.insert(filex.to_string(), fx.to_vec()); - } - Err(e) => { - warn!("fail to read field multi file: {}", e); - } - }, - pathx if name.starts_with("path") => match field.text().await { - Ok(px) => { - pathx_map.insert(pathx.to_string(), px); - } - Err(e) => { - warn!("fail to read field multi path: {}", e); - } - }, - _ => { - - // Ignore unknown fields - } - } - } - - // start do multi file if has any - - if pathx_map.len() == filex_map.len() { - info!("mapping multi files"); - - for (_, (path_key, path_val)) in pathx_map.iter().enumerate() { - let expected_file_key = format!("file{}", path_key.replace("path", "")); - - if filex_map.contains_key(&expected_file_key) - && let Some(file_bytes) = filex_map.get(&expected_file_key) - { - info!("[multi-files] {}: {}", path_val, file_bytes.len()); - file_mappings.insert(path_val.to_owned(), file_bytes.to_owned()); - } - } - } - - info!("committing ..."); - - let signature_username = match signature_username { - Some(su) => su, - None => { - return ( - axum::http::StatusCode::BAD_REQUEST, - Json(json!({"error": "Missing required field: signature_username"})), - ); - } + } }; - let signature_email = match signature_email { - Some(se) => se, - None => { - return ( - axum::http::StatusCode::BAD_REQUEST, - Json(json!({"error": "Missing required field: signature_email"})), - ); - } - }; - - // Create signature - let signature = Signature { - username: signature_username.clone(), - email: signature_email.clone(), - }; - - info!("sig: {signature:?}"); - - // Get branch name from config - let branch = state - .clone() - .get_config("GIT_REPO_BRANCH_NAME") - .map(|x| x.to_string()) - .unwrap_or("master".to_string()); - - let commit_oid = if let Some(file_bytes) = file_bytes - && let Some(path) = path - { - match commit_file_content( - state.clone().repo, - &path, - &file_bytes, - signature, - &message.unwrap_or("update: from api".to_string()), - branch, - ) - .await - { - Ok(oid) => oid, - Err(e) => { - return ( - axum::http::StatusCode::INTERNAL_SERVER_ERROR, - Json(json!({"error": e.to_string()})), - ); - } - } - } else if !file_mappings.is_empty() { - match commit_multiple_file_contents( - state.clone().repo, - file_mappings, - signature, - &message.unwrap_or("update: from api".to_string()), - branch, - ) - .await - { - Ok(oid) => oid, - Err(e) => { - return ( - axum::http::StatusCode::INTERNAL_SERVER_ERROR, - Json(json!({"error": e.to_string()})), - ); - } - } - } else { - Oid::zero() - }; - - if commit_oid.is_zero() { - info!("invalid commit process, return 0"); - } else { - info!("commit success! [{commit_oid}]"); - } - - // TODO: save to db - - let mut plock = state.postgres.lock().await; - let tx = match plock.transaction().await { - Ok(x) => x, - Err(_) => { - return ( - axum::http::StatusCode::CREATED, - Json( - json!({"result": format!("{commit_oid}"), "reason": "CannotConnect_CommitMayBeLost"}), - ), - ); - } - }; - - let insert_commit = tx.execute("INSERT INTO recovery_commit (commit_hash, commit_user, email, repo, ref) VALUES ($1, $2, $3, $4, $5)", &[ - &commit_oid.to_string(), - &signature_username.clone(), - &signature_email.clone(), - &op_repo, - &ref_message.unwrap_or_default(), - ]).await; - if insert_commit.is_ok() { - match tx.commit().await { - Ok(_) => { - info!("successfully inserted into postgres"); - } - Err(e) => { - error!("commit postgres failed: {e}"); - } - } - } else { - error!("failed to commit to postgres & rolling back ..."); - if let Err(rollback_error) = tx.rollback().await { - error!("failed to rollback, {rollback_error}"); - } - } - - ( - axum::http::StatusCode::OK, - Json(json!({"result": format!("{commit_oid}")})), - ) -} - -async fn fetch_content_from_redis(redis: RedisPool, key: &str) -> Result { - match redis.get().await { - Ok(mut s) => { - if let Ok(res) = s.get(key).await - && let Some(res) = res - { - Ok(res) - } else { - Err(format!("result error from key: {key}")) - } - } - Err(e) => Err(format!("redis get failed: {e}")), - } -} - -async fn fetch_content_from_redis_byte( - mut conn: MultiplexedConnection, - key: &str, -) -> Result, String> { - let res = redis::cmd("GET").arg(key).query_async(&mut conn).await; - - match res { - Ok(res) => Ok(res), - Err(e) => { - return Err(format!("{e}")); - } - } -} - -fn get_git_object( - repo: MutexGuard<'_, Repository>, - path: &str, -) -> Result, Box> { - let obj = repo.revparse_single(&path)?; - if let Some(blob) = obj.as_blob() { - Ok(blob.content().to_vec()) - } else if let Some(tree) = obj.as_tree() { - let dir_list = tree - .iter() - .map(|x| x.name().unwrap_or("").to_string()) - .collect::>(); - Ok(dir_list.join(",").as_bytes().to_vec()) - } else { - Err("Unknown or not supported".into()) - } -} - -fn read_patch_from_str(patch_changes: &str) -> Option { - // - - let pv = patch_changes.replace("patch ", ""); - - let change_map: Value = match serde_json::from_str(&pv) { - Ok(s) => s, - Err(_) => return None, - }; - Some(change_map) -} - -fn get_product_code(v: &Value) -> Option<&str> { - v.get("productCode")?.as_str() -} - -fn diff_apply(target: &mut Value, patch: &Value) -> Result<(), String> { - match (target, patch) { - (Value::Object(target_map), Value::Object(patch_map)) => { - for (k, v_patch) in patch_map { - let v_target = target_map - .get_mut(k) - .ok_or_else(|| format!("Unknown key in patch: {k}"))?; - - diff_apply(v_target, v_patch)?; - } - - Ok(()) - } - (Value::Array(target_arr), Value::Array(patch_arr)) => { - for patch_elem in patch_arr { - // NOTE: support only `Recipe01` - let patch_id = get_product_code(patch_elem) - .ok_or("Patch array element missing product code")?; - let target_elem = target_arr - .iter_mut() - .find(|e| get_product_code(e) == Some(patch_id)) - .ok_or_else(|| format!("Unknown id in patch array: {patch_id}"))?; - - diff_apply(target_elem, patch_elem)?; - } - - Ok(()) - } - (target_slot, patch_value) => { - *target_slot = patch_value.clone(); - Ok(()) - } - } -} - -async fn apply_patch_to_file(redis: RedisPool, path: &str, patch_changes: &mut String) -> String { - use libtbr::*; - // expect the path to already has in redis - let full_file = match fetch_content_from_redis(redis, path).await { - Ok(f) => f, - Err(_) => String::new(), - }; - - if full_file.is_empty() { - return full_file; - } - - // read into struct - // - let full_recipe: models::recipe::Recipe = match serde_json::from_str(&full_file) { - Ok(f) => f, - Err(_) => return String::new(), - }; - - // read patch - let patch_map = read_patch_from_str(patch_changes); - let mut current_full_map = match serde_json::to_value(full_recipe.clone()) { - Ok(m) => m, - Err(_) => return String::new(), - }; - - if let Some(pm) = patch_map { - match diff_apply(&mut current_full_map, &pm) { - Ok(_) => {} - Err(x) => { - error!("error while applied patch: {x}"); - } - } - } - - match serde_json::to_string_pretty(¤t_full_map.clone()) { - Ok(ss) => ss, - Err(_) => String::new(), - } -} - -async fn commit_file_content( - repo: Arc>, - path: &str, - content: &[u8], - author: Signature, - message: &str, - branch: String, -) -> Result> { - let repo_guard = repo.lock().await; - - let workdir = repo_guard.workdir().ok_or_else(|| { - git2::Error::from_str("Repository must have a working directory for this strategy") - })?; - - let full_path = if Path::new(path).is_absolute() { - Path::new(path).to_path_buf() - } else { - workdir.join(path) - }; - if let Some(parent) = full_path.parent() { - std::fs::create_dir_all(parent)?; - } - - std::fs::write(&full_path, content)?; - - let target_ref = format!("refs/heads/{branch}"); - - let relative_git_path = if full_path.is_absolute() { - full_path.strip_prefix(workdir).map_err(|_| { - git2::Error::from_str( - "The provided path is outside of the repository working directory", - ) - })? - } else { - Path::new(path) - }; - let mut index = repo_guard.index()?; - - let parent_commit = match repo_guard.find_reference(&target_ref) { - Ok(reference) => { - let commit = reference.peel_to_commit()?; - index.read_tree(&commit.tree()?)?; - Some(commit) - } - Err(_) => None, - }; - - index.add_path(relative_git_path)?; - index.write()?; - - let tree_oid = index.write_tree()?; - let tree = repo_guard.find_tree(tree_oid)?; - - let sig = git2::Signature::now(&author.username, &author.email)?; - - let parents = match &parent_commit { - Some(c) => vec![c], - None => vec![], - }; - - let oid = repo_guard.commit( - //"refs/heads/master" - None, &sig, &sig, message, &tree, &parents, - )?; - - repo_guard.reference(&target_ref, oid, true, "api commit log update")?; - - if let Ok(mut head) = repo_guard.head() { - if head.name() == Some(&target_ref) { - repo_guard.set_head(&target_ref)?; - } - } - - info!("commit oid: {oid}"); - - Ok(oid) -} - -async fn commit_multiple_file_contents( - repo: Arc>, - file_mapping: HashMap>, - author: Signature, - message: &str, - branch: String, -) -> Result> { - let repo_guard = repo.lock().await; - - let workdir = repo_guard.workdir().ok_or_else(|| { - git2::Error::from_str("Repository must have a working directory for this strategy") - })?; - - // Pre-calculate and normalize paths into a standard vector so we don't have - // path-resolution discrepancies between loops. - // Keeps: (Absolute Path on Disk, Relative Path for Git Index, Content Buffer) - let mut processing_queue: Vec<(PathBuf, PathBuf, &[u8])> = Vec::new(); - - for (raw_path, content) in &file_mapping { - let path_obj = Path::new(raw_path); - - // 1. Compute a clean, guaranteed absolute path for writing to disk - let full_path = if path_obj.is_absolute() { - path_obj.to_path_buf() - } else { - // This handles files starting with "./", "../", or raw filenames safely - workdir.join(path_obj) - }; - - // Canonicalize or cleanly normalize the path syntax relative to the workdir - // to strip out relative quirks like "." or ".." components - let clean_full_path = match full_path.canonicalize() { - Ok(p) => p, - Err(_) => full_path, // Fallback if file doesn't exist yet on disk - }; - - // 2. Compute a strict relative path matching how Git sees the workspace - let relative_git_path = clean_full_path - .strip_prefix(workdir) - .map_err(|_| { - git2::Error::from_str( - "A provided path lives outside the repository working directory", - ) - })? - .to_path_buf(); - - processing_queue.push((clean_full_path, relative_git_path, content)); - } - - // Loop 1: Safely write all processed files to disk first - for (full_path, _, content) in &processing_queue { - if let Some(parent) = full_path.parent() { - std::fs::create_dir_all(parent)?; - } - std::fs::write(full_path, content)?; - } - - let mut index = repo_guard.index()?; - let target_ref = format!("refs/heads/{branch}"); - - // Loop 2: Hydrate index from previous branch commit tree - let parent_commit = match repo_guard.find_reference(&target_ref) { - Ok(reference) => { - let commit = reference.peel_to_commit()?; - index.read_tree(&commit.tree()?)?; - Some(commit) - } - Err(_) => None, - }; - - // Loop 3: Stage all files using the matching pre-calculated relative path - for (_, relative_git_path, _) in &processing_queue { - index.add_path(relative_git_path)?; - } - - // Flush changes to .git/index - index.write()?; - - // Create tree layout from updated index state - let tree_oid = index.write_tree()?; - let tree = repo_guard.find_tree(tree_oid)?; - - let sig = git2::Signature::now(&author.username, &author.email)?; - - let parents = match &parent_commit { - Some(c) => vec![c], - None => vec![], - }; - - // Commit changes to the object database - let oid = repo_guard.commit(None, &sig, &sig, message, &tree, &parents)?; - - // Advance branch reference explicitly - repo_guard.reference(&target_ref, oid, true, "api multi-file commit update")?; - - // Sync active workspace reference state if checking out the branch locally - if let Ok(head) = repo_guard.head() { - if head.name() == Some(&target_ref) { - repo_guard.set_head(&target_ref)?; - } - } - - info!("Multi-file transaction successfully committed. OID: {oid}"); - - Ok(oid) -} - -async fn push_handler(State(state): State) -> impl IntoResponse { - let config = state.clone().get_all_configures(); - let repo = state.repo.clone(); - - let branch = &config - .get("GIT_REPO_BRANCH_NAME") - .map(|x| x.to_string()) - .unwrap_or("master".to_string()); - - if let Err(e) = push(config, repo, "origin", branch).await { + let mut remote = match repo.find_remote("origin") { + Ok(remote) => remote, + Err(e) => { + let error_log = format!("unable to find remote, {}", e.message()); + error!("{error_log}"); return ( - axum::http::StatusCode::INTERNAL_SERVER_ERROR, - Json(json!({"error": e.to_string()})), + axum::http::StatusCode::INTERNAL_SERVER_ERROR, + Json(json!(response)) ); + } + }; + + if state.get_config("GIT_REPO_USERNAME").is_none() || state.get_config("GIT_REPO_PASSWORD").is_none() { + warn!("username or password not provided may cause fetching fail"); } - ( - axum::http::StatusCode::OK, - Json(json!({"result": "push completed"})), - ) -} - -async fn push( - config: gcm::Configure, - repo: Arc>, - remote_name: &str, - branch: &str, -) -> Result<(), Box> { - // 1. Acquire lock (awaiting if another task is committing/pulling) - let repo_guard = repo.lock().await; - - // 2. Find the remote - let mut remote = repo_guard.find_remote(remote_name)?; - - // 3. Setup Credentials let mut callbacks = RemoteCallbacks::new(); - callbacks.credentials(|_url, _user, _allowed| { - Cred::userpass_plaintext( - config.get("GIT_REPO_USERNAME").unwrap_or(&"".to_string()), - config.get("GIT_REPO_PASSWORD").unwrap_or(&"".to_string()), - ) - }); - - let mut push_opts = git2::PushOptions::new(); - push_opts.remote_callbacks(callbacks); - - // 4. Define the Refspec - // format: local_ref:remote_ref - let refspec = format!("refs/heads/{}:refs/heads/{}", branch, branch); - - // 5. Execute Push - info!("Pushing {branch} to {remote_name}..."); - remote.push(&[&refspec], Some(&mut push_opts))?; - - info!("Push successful."); - Ok(()) -} - -async fn pull_handler(State(state): State) -> impl IntoResponse { - let config = state.clone().get_all_configures(); - let repo = state.repo.clone(); - - let branch = &config - .get("GIT_REPO_BRANCH_NAME") - .map(|x| x.to_string()) - .unwrap_or("master".to_string()); - - if let Err(e) = pull(config, repo, "origin", branch).await { - return ( - axum::http::StatusCode::INTERNAL_SERVER_ERROR, - Json(json!({"error": e.to_string()})), - ); - } - - ( - axum::http::StatusCode::OK, - Json(json!({"result": "pull completed"})), - ) -} - -#[derive(Debug, Serialize, Deserialize)] -struct ReplayPayload { - commit_hashes: Vec, -} - -async fn replay_handler( - State(state): State, - Json(payload): Json, -) -> impl IntoResponse { - let repo = state.repo.clone(); - - let commit_hashes: Vec<&str> = payload.commit_hashes.iter().map(|x| x.as_str()).collect(); - - if let Err(e) = replay(repo, &commit_hashes.as_slice()).await { - return ( - axum::http::StatusCode::INTERNAL_SERVER_ERROR, - Json(json!({"error": e.to_string()})), - ); - } - - ( - axum::http::StatusCode::OK, - Json(json!({"result": "replay completed"})), - ) -} - -async fn replay( - repo: Arc>, - commit_hashes: &[&str], -) -> Result<(), Box> { - let repo_guard = repo.lock().await; - - let initial_head = repo_guard.head()?.peel_to_commit()?; - info!( - "Starting transaction replay. Initial HEAD: {}", - initial_head.id() - ); - - for (index, hash) in commit_hashes.iter().enumerate() { - let oid = Oid::from_str(hash)?; - let commit_to_apply = repo_guard.find_commit(oid)?; - - info!( - "#[{}/{}] Doing {} - \"{}\"", - index + 1, - commit_hashes.len(), - &hash[0..7], - commit_to_apply.summary().unwrap_or("[No summary]") - ); - - let mut cherrypick_opts = git2::CherrypickOptions::new(); - repo_guard.cherrypick(&commit_to_apply, Some(&mut cherrypick_opts))?; - - let mut repo_index = repo_guard.index()?; - - if repo_index.has_conflicts() { - error!("[CONFLICTED] at commit {}, aborting ...", &hash[0..7]); - let current_head_commit = repo_guard.head()?.peel_to_commit()?; - repo_guard.reset(current_head_commit.as_object(), ResetType::Hard, None)?; - return Err(format!("index_{}/conflicted", index).into()); - } - - let tree_id = repo_index.write_tree()?; - let tree = repo_guard.find_tree(tree_id)?; - - let original_author = commit_to_apply.author(); - - let author = git2::Signature::now( - original_author.name().unwrap_or("Transaction Processor"), - original_author - .email() - .unwrap_or("processor@local.internal"), - )?; - - let current_head = repo_guard.head()?.peel_to_commit()?; - let _new_commit_oid = repo_guard.commit( - Some("HEAD"), - &author, - &author, - &format!( - "Replay transaction: {}", - commit_to_apply.summary().unwrap_or("") - ), - &tree, - &[¤t_head], - )?; - - repo_guard.cleanup_state()?; - info!("applied success!"); - } - - info!("all transaction applied successfully!"); - - Ok(()) -} - -// Pull is fetch + merge -async fn pull( - config: gcm::Configure, - repo: Arc>, - remote_name: &str, - branch: &str, -) -> Result<(), Box> { - let repo_guard = repo.lock().await; - - // 1. Fetch from remote - let mut remote = repo_guard.find_remote(remote_name)?; - let mut callbacks = RemoteCallbacks::new(); - callbacks.credentials(|_url, _user, _allowed| { - Cred::userpass_plaintext( - config.get("GIT_REPO_USERNAME").unwrap_or(&"".to_string()), - config.get("GIT_REPO_PASSWORD").unwrap_or(&"".to_string()), - ) + callbacks.credentials(|_, _, _| { + Cred::userpass_plaintext( + state.get_config("GIT_REPO_USERNAME").unwrap_or(&"".to_string()), + state.get_config("GIT_REPO_PASSWORD").unwrap_or(&"".to_string()) + ) }); let mut fetch_options = FetchOptions::new(); fetch_options.remote_callbacks(callbacks); - fetch_options.download_tags(git2::AutotagOption::All); - info!("Fetching {branch} from {remote_name}..."); - remote.fetch(&[branch], Some(&mut fetch_options), None)?; + match remote.fetch(&["origin"], Some(&mut fetch_options), None) { + Ok(_) => {} + Err(e) => { + error!("error while fetching {}", e.message()); + return ( + axum::http::StatusCode::INTERNAL_SERVER_ERROR, + Json(json!({"error": format!("error while fetching {}", e.message())})) + ); + } + } + } else { + let error_log = "cannot find local repo"; + error!("{error_log}"); + response.insert("error".to_string(), json!(error_log)); + return ( + axum::http::StatusCode::INTERNAL_SERVER_ERROR, + Json(json!(response)) + ); + } - // 2. Get FETCH_HEAD (the tip of what we just fetched) - let fetch_head = repo_guard.find_reference("FETCH_HEAD")?; - let fetch_commit = repo_guard.reference_to_annotated_commit(&fetch_head)?; - let target_object = repo_guard.find_object(fetch_commit.id(), Some(ObjectType::Commit))?; - - // 3. Force Hard Reset - // This moves the branch pointer AND updates the working directory files, - // effectively wiping away your 50-commit reset or any local uncommitted changes. - let mut checkout_opts = CheckoutBuilder::new(); - checkout_opts.force(); - - repo_guard.reset(&target_object, ResetType::Hard, Some(&mut checkout_opts))?; - - // 4. Ensure local branch reference is updated to this OID - let refname = format!("refs/heads/{}", branch); - repo_guard.reference(&refname, fetch_commit.id(), true, "Force Sync Pull")?; - repo_guard.set_head(&refname)?; - - info!("Repository synced to remote tip: {}", fetch_commit.id()); - Ok(()) -} - -/// Return git state & server state -async fn health_handler(State(_): State) -> impl IntoResponse { - ( - axum::http::StatusCode::OK, - Json(json!({ - "status": "ok", - "git": "", - "server": "" - })), - ) + ( + axum::http::StatusCode::OK, + Json(json!({"result": "fetch success"})) + ) } pub async fn run(config: gcm::Configure) -> gcm::StandardResult { - // REDIS POOL - let manager = RedisConnectionManager::new(format!( - "redis://{}:{}", - config.get("REDIS_URI").unwrap_or(&"".to_string()), - config.get("REDIS_PORT").unwrap_or(&"".to_string()) - )) - .expect("failed to create redis conn manager"); - let redis_pool = Pool::builder() - .max_size(8) - .build(manager) - .await - .expect("failed to build redis pool"); + let state = AppState { + cached_country_names: common::valid_country_name(), + configures: config.clone() + }; - // let connect_str = "host=localhost user=postgres password=my_password dbname=my_database"; - let connect_str = config - .get("POSTGRES_CONN") - .expect("failed to connect postgres"); - info!("connect config: {connect_str}"); - let (mut client, connection) = tokio_postgres::connect(connect_str, NoTls).await?; - tokio::spawn(async move { - if let Err(e) = connection.await { - error!("connection postgres error: {e}"); - } - }); - info!("Creating 'commit' table ..."); - client - .execute( - "CREATE TABLE IF NOT EXISTS recovery_commit ( - id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, - commit_hash TEXT NOT NULL, - commit_user TEXT NOT NULL, - email TEXT NOT NULL, - repo TEXT NOT NULL, - ref TEXT NOT NULL, - commit_at TIMESTAMPTZ DEFAULT NOW(), - expire_at TIMESTAMPTZ DEFAULT NOW() + interval '1 hour' - )", - &[], - ) - .await?; + let app = Router::new() + .route("/checkout", get(checkout_handler)) + .route("/fetch", get(fetch_handler)) + .route("/healthz", get(reg::health)) + .with_state(state); - let state = AppState { - // cached_country_names: common::valid_country_name(), - configures: config.clone(), - repo: Arc::new(Mutex::new(Repository::open( - config.get("GIT_REPO_LOCAL_DEST").unwrap_or(&"".to_string()), - )?)), - postgres: Arc::new(Mutex::new(client)), - redis: redis_pool.clone(), - fetched: Vec::new(), - }; + let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", config.clone().get("PUBLIC_PORT").unwrap_or(&"36583".to_string()))).await?; - let app = Router::new() - .route("/checkout", get(checkout_handler)) - .route("/fetch", get(fetch_handler)) - .route("/commit", post(commit_handler)) - .route("/push", get(push_handler)) - .route("/pull", get(pull_handler)) - .route("/health", get(health_handler)) - .route("/replay", post(replay_handler)) - .layer(DefaultBodyLimit::max(100 * 1024 * 1024)) - // .route("/healthz", get(reg::health)) - .with_state(state); + axum::serve(listener, app).await?; - let listener = tokio::net::TcpListener::bind(format!( - "0.0.0.0:{}", - config - .clone() - .get("PUBLIC_PORT") - .unwrap_or(&"36583".to_string()) - )) - .await?; - - axum::serve(listener, app).await?; - - Ok(()) -} + Ok(()) +} \ No newline at end of file diff --git a/src/git.rs b/src/git.rs index 779141d..c0ab2da 100644 --- a/src/git.rs +++ b/src/git.rs @@ -1,21 +1,16 @@ -use std::{ - cell::RefCell, - collections::HashMap, - io::{self, Write}, - path::{Path, PathBuf}, -}; +use std::{cell::RefCell, collections::HashMap, io::{self, Write}, path::{Path, PathBuf}}; -use git2::{Cred, FetchOptions, Progress, RemoteCallbacks, build::RepoBuilder}; -use log::info; +use git2::{build::RepoBuilder, Cred, FetchOptions, Progress, RemoteCallbacks}; +use log::{info}; use crate::gcm; struct GitState { - progress: Option>, - total: usize, - current: usize, - path: Option, - newline: bool, + progress: Option>, + total: usize, + current: usize, + path: Option, + newline: bool } fn print(state: &mut GitState) { @@ -34,11 +29,10 @@ fn print(state: &mut GitState) { state.newline = true; } - info!( - "Resolving deltas {}/{}", - stats.indexed_deltas(), - stats.total_deltas() - ); + info!("Resolving deltas {}/{}", + stats.indexed_deltas(), + stats.total_deltas()); + } else { info!( "net {:3}% ({:4} kb, {:5}/{:5}) / idx {:3}% ({:5}/{:5}) \ @@ -64,38 +58,40 @@ fn print(state: &mut GitState) { } pub fn setup_git_repo(config: HashMap) -> gcm::StandardResult { - let state = RefCell::new(GitState { - progress: None, - total: 0, - current: 0, - path: None, - newline: true, - }); + let state = RefCell::new(GitState { + progress: None, + total: 0, + current: 0, + path: None, + newline: true + }); - let mut cb = RemoteCallbacks::new(); - cb.transfer_progress(|stats| { - let mut state = state.borrow_mut(); - state.progress = Some(stats.to_owned()); - print(&mut state); - true - }); + let mut cb = RemoteCallbacks::new(); + cb.transfer_progress(|stats| { + let mut state = state.borrow_mut(); + state.progress = Some(stats.to_owned()); + print(&mut state); + true + }); - cb.credentials(|_, _, _| { - Cred::userpass_plaintext( - config.get("GIT_REPO_USERNAME").unwrap_or(&"".to_string()), - config.get("GIT_REPO_PASSWORD").unwrap_or(&"".to_string()), - ) - }); + cb.credentials(|_,_,_| { + Cred::userpass_plaintext( + config.get("GIT_REPO_USERNAME").unwrap_or(&"".to_string()), + config.get("GIT_REPO_PASSWORD").unwrap_or(&"".to_string()) + ) + }); - let mut fo = FetchOptions::new(); - fo.remote_callbacks(cb); + let mut fo = FetchOptions::new(); + fo.remote_callbacks(cb); + fo.depth(1); - let _ = RepoBuilder::new().bare(false).fetch_options(fo).clone( - config.get("GIT_REPO_REMOTE").unwrap_or(&"".to_string()), - Path::new(config.get("GIT_REPO_LOCAL_DEST").unwrap()).into(), + RepoBuilder::new() + .bare(true) + .fetch_options(fo) + .clone( + config.get("GIT_REPO_REMOTE").unwrap_or(&"".to_string()), + Path::new(config.get("GIT_REPO_LOCAL_DEST").unwrap()).into() )?; - println!("clone completed !"); - - Ok(()) -} + Ok(()) +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index c17d195..2d59208 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,67 +1,56 @@ -use std::fs::File; +use std::{fs::File}; use env_logger::Builder; use libtbr::recipe_functions::common; use log::info; -use crate::{ - git::setup_git_repo, - // reg::{heartbeat_loop, registry::registry_client::RegistryClient}, -}; +use crate::{git::setup_git_repo, reg::{heartbeat_loop, registry::registry_client::RegistryClient}}; mod app; mod gcm; mod git; -mod tx; -// mod reg; +mod reg; fn setup_log(config: gcm::Configure) -> gcm::StandardResult { - // NOTE: disable logging file, use send to log service instead - // let logfile = File::create(config.get("LOG_NAME").unwrap_or(&"run.log".to_string()))?; + let logfile = File::create(config.get("LOG_NAME").unwrap_or(&"run.log".to_string()))?; - Builder::from_env(env_logger::Env::default().default_filter_or("debug")) - // .target(env_logger::Target::Pipe(Box::new(logfile))) - .init(); + Builder::from_env(env_logger::Env::default().default_filter_or("debug")) + .target(env_logger::Target::Pipe(Box::new(logfile))).init(); - Ok(()) + + Ok(()) } +async fn setup_registry(config: gcm::Configure) -> gcm::StandardResult { + let cfg_clone = config.clone(); + let register_server_address = cfg_clone.get("REGISTRY_SERVER").expect("not found registry server"); + let name = cfg_clone.get("SERVICE_NAME").expect("missing service name"); + let url = cfg_clone.get("SERVICE_URL").expect("missing service url"); + + let mut client = RegistryClient::connect(register_server_address.clone()).await?; + reg::register_service(&mut client, name, url).await; + + tokio::spawn(heartbeat_loop(name.to_string(), url.to_string())); + + Ok(()) +} + + + #[tokio::main] async fn main() -> gcm::StandardResult { let config: gcm::Configure = common::get_config(); setup_log(config.clone())?; match std::fs::read_dir(config.get("GIT_REPO_LOCAL_DEST").expect("not exist")) { - Ok(_) => { - info!( - "GIT_REPO `{dest}` existed, checking if has git", - dest = config.get("GIT_REPO_LOCAL_DEST").unwrap() - ); - - match std::fs::read_dir(format!( - "{}/.git", - config.get("GIT_REPO_LOCAL_DEST").expect("not exist") - )) { - Ok(_) => { - info!("GIT REPO already set up!") - } - Err(_) => { - setup_git_repo(config.clone())?; - } - } - } - Err(_) => { - setup_git_repo(config.clone())?; - } + Ok(_) => { + info!("GIT_REPO `{dest}` already setup", dest = config.get("GIT_REPO_LOCAL_DEST").unwrap()) + }, + Err(_) => { + setup_git_repo(config.clone())?; + } } - - info!( - "APP VERSION: {}", - config - .get("CONFIG_VERSION") - .expect("config version not defined") - ); - info!("RUNNING: {:?}", config.get("PUBLIC_PORT")); + setup_registry(config.clone()).await?; app::run(config.clone()).await?; Ok(()) diff --git a/src/reg.rs b/src/reg.rs index 099ead8..acac43b 100644 --- a/src/reg.rs +++ b/src/reg.rs @@ -1,6 +1,5 @@ use std::time::Duration; -use log::{error, info}; use tokio::time::sleep; use tonic::transport::Channel; @@ -18,11 +17,7 @@ pub async fn register_service(client: &mut RegistryClient, name: &str, token: std::env::var("REGISTRY_TOKEN").unwrap_or_default(), }); - let resp = client.register(req).await; - match resp { - Ok(r) => info!("{:?}", r), - Err(e) => error!("error register: {:?}", e) - } + let _ = client.register(req).await; } pub async fn heartbeat_loop(name: String, url: String) { diff --git a/src/tx/handler.rs b/src/tx/handler.rs deleted file mode 100644 index f6c5968..0000000 --- a/src/tx/handler.rs +++ /dev/null @@ -1,323 +0,0 @@ -use axum::{ - Json, Router, - extract::{Path, Query, State}, - response::IntoResponse, - routing::{get, post}, -}; -use redis::{AsyncTypedCommands, TypedCommands, aio::MultiplexedConnection}; -use reqwest::StatusCode; -use serde::Deserialize; -use serde_json::{Value, json}; -use uuid::Uuid; - -use crate::tx::{ - helpers::*, - patcher::apply_ops, - types::{PatchOp, Reservation, ReserveReq, ReserveRes, TxCommitReq, TxCommitRes}, -}; - -async fn reserve_tx( - State(state): State, - Path(doc_id): Path, - Json(req): Json, -) -> impl IntoResponse { - let rsv_id = Uuid::new_v4().to_string(); - let ttl_secs: i64 = 30; // ttl reserve 30s - let expires_at = now_unix() + ttl_secs; - - let mut rcli = state.redis_cli.clone(); - - // check version - let ver_key = doc_ver_key(&doc_id); - let base_version: u64 = match rcli.get(ver_key) { - Ok(res) => { - if let Some(r) = res { - r.parse().ok().unwrap() - } else { - 0 - } - } - Err(_) => 0, - }; - - let rsv = Reservation { - reservation_id: rsv_id.clone(), - doc_id: doc_id.clone(), - author: req.author, - base_version, - expires_at, - }; - - let key = rsv_key(&doc_id, &rsv_id); - let payload = serde_json::to_string(&rsv).unwrap(); - - let _: () = rcli.set_ex(key, payload, ttl_secs as u64).unwrap(); - - ( - StatusCode::OK, - Json(ReserveRes { - reservation_id: rsv_id, - base_version, - expires_at, - }), - ) -} - -async fn commit_tx( - State(state): State, - Path(doc_id): Path, - Json(req): Json, -) -> impl IntoResponse { - if req.tx_id.is_empty() || req.reservation_id.is_empty() { - return ( - StatusCode::BAD_REQUEST, - "missing tx_id or reservation_id ".into_response(), - ); - } - - let mut con = match state.redis_cli.get_multiplexed_async_connection().await { - Ok(conn) => conn, - Err(e) => { - return ( - StatusCode::INTERNAL_SERVER_ERROR, - format!("{}", e.to_string()).into_response(), - ); - } - }; - - // lock commit - let lock_key = commit_lock_key(&doc_id); - if let Err(_) = wait_lock(&mut con, &lock_key, 1200, 20).await { - return (StatusCode::CONFLICT, "doc busy, retry".into_response()); - } - - let txid_k = txid_key(&doc_id, &req.tx_id); - if let Ok(Some(v)) = con.get(&txid_k).await { - if let Ok(committed_version) = v.parse::() { - let res = TxCommitRes { - doc_id, - tx_id: req.tx_id, - committed_version, - }; - return (StatusCode::OK, Json(res).into_response()); - } - } - - let rsv_k = rsv_key(&doc_id, &req.reservation_id); - let rsv_raw: Option = con.get(&rsv_k).await.unwrap_or(None); - let rsv_raw = match rsv_raw { - Some(x) => x, - None => { - return ( - StatusCode::CONFLICT, - "reservation missing/expired".into_response(), - ); - } - }; - - let rsv: Reservation = match serde_json::from_str(&rsv_raw) { - Ok(x) => x, - Err(_) => return (StatusCode::CONFLICT, "bad reservation".into_response()), - }; - - if rsv.doc_id != doc_id || rsv.author != req.author || rsv.base_version != req.base_version { - return (StatusCode::CONFLICT, "reservation mismatch".into_response()); - } - - if now_unix() > rsv.expires_at { - return (StatusCode::CONFLICT, "reservation expired".into_response()); - } - - let curr_ver: u64 = con - .get(doc_ver_key(&doc_id)) - .await - .ok() - .flatten() - .and_then(|s| s.parse().ok()) - .unwrap_or(0); - - if req.base_version != curr_ver { - let body = json!({ - "error": "version_conflict", - "server_version": curr_ver, - }); - return (StatusCode::CONFLICT, Json(body).into_response()); - } - - let next_ver = curr_ver + 1; - - let stream_key = doc_tx_stream_key(&doc_id); - - let tx_event = json!({ - "doc_id": doc_id, - "tx_id": req.tx_id, - "version": next_ver, - "base_version": req.base_version, - "author": req.author, - "ts": now_unix(), - "ops": req.ops - }); - - let tx_event_str = tx_event.to_string(); - let _: String = redis::cmd("XADD") - .arg(&stream_key) - .arg("*") - .arg("data") - .arg(&tx_event_str) - .query_async(&mut con) - .await - .unwrap(); - - let _: () = con - .set(doc_ver_key(&doc_id), next_ver.to_string()) - .await - .unwrap(); - let _: () = con.set(&txid_k, next_ver.to_string()).await.unwrap(); - let _: usize = con.del(&rsv_k).await.unwrap(); - - let snapshot_every: u64 = 50; - if next_ver % snapshot_every == 0 { - if let Ok(state) = build_state_at(&mut con, &doc_id, next_ver).await { - let _: () = con - .set(doc_snap_key(&doc_id), state.to_string()) - .await - .unwrap(); - let _: () = con - .set(doc_snapver_key(&doc_id), next_ver.to_string()) - .await - .unwrap(); - } - } - - ( - StatusCode::OK, - Json(TxCommitRes { - doc_id, - tx_id: req.tx_id, - committed_version: next_ver, - }) - .into_response(), - ) -} - -async fn build_state_at( - con: &mut MultiplexedConnection, - doc_id: &str, - target_version: u64, -) -> Result { - let snap_ver: u64 = con - .get(doc_snap_key(&doc_id)) - .await - .ok() - .flatten() - .and_then(|s| s.parse().ok()) - .unwrap_or(0); - - let snap_json: Value = if snap_ver > 0 { - let raw: Option = con.get(doc_snap_key(&doc_id)).await.unwrap_or(None); - raw.and_then(|s| serde_json::from_str(&s).ok()) - .unwrap_or_else(|| json!({})) - } else { - json!({}) - }; - - let stream_key = doc_tx_stream_key(doc_id); - - let start_id = "0-0"; - let entries: Vec<(String, Vec<(String, String)>)> = redis::cmd("XRANGE") - .arg(&stream_key) - .arg(start_id) - .arg("+") - .query_async(con) - .await - .map_err(|e| e.to_string())?; - - let mut ops_list: Vec = Vec::new(); - for (_id, fields) in entries { - let mut data_opts = None; - for (k, v) in fields { - if k == "data" { - data_opts = Some(v); - break; - } - } - let data = match data_opts { - Some(x) => x, - None => continue, - }; - - let ev: Value = serde_json::from_str(&data).map_err(|e| e.to_string())?; - let ver = ev.get("version").and_then(|v| v.as_u64()).unwrap_or(0); - if ver == 0 || ver > target_version { - continue; - } - - if ver <= snap_ver { - continue; - } - - let ops: Vec = - serde_json::from_value(ev["ops"].clone()).map_err(|e| e.to_string())?; - ops_list.extend(ops); - } - - apply_ops(snap_json, &ops_list) -} - -#[derive(Deserialize)] -struct StateQuery { - at_version: Option, -} - -async fn get_state( - State(state): State, - Path(doc_id): Path, - Query(q): Query, -) -> impl IntoResponse { - let rcli = state.redis_cli.clone(); - let mut con = match rcli.get_multiplexed_async_connection().await { - Ok(sc) => sc, - Err(_) => { - return ( - StatusCode::INTERNAL_SERVER_ERROR, - "cannot get connection".into_response(), - ); - } - }; - - let cur_ver: u64 = con - .get(doc_ver_key(&doc_id)) - .await - .ok() - .flatten() - .and_then(|s| s.parse().ok()) - .unwrap_or(0); - - let target = q.at_version.unwrap_or(cur_ver).min(cur_ver); - - match build_state_at(&mut con, &doc_id, target).await { - Ok(state) => ( - StatusCode::OK, - Json(json!({ - "doc_id": doc_id, - "version": target, - "state": state - })) - .into_response(), - ), - Err(e) => ( - StatusCode::INTERNAL_SERVER_ERROR, - Json(json!({ - "error": e - })) - .into_response(), - ), - } -} - -// pub async fn create_tx_patcher_route() -> Router { -// Router::new() -// .route("/{id}/tx-reserve", post(reserve_tx)) -// .route("/{id}/tx-commit", post(commit_tx)) -// .route("/{id}/state", get(get_state)) -// } diff --git a/src/tx/helpers.rs b/src/tx/helpers.rs deleted file mode 100644 index 233a93c..0000000 --- a/src/tx/helpers.rs +++ /dev/null @@ -1,296 +0,0 @@ -use std::{ - clone, - collections::HashMap, - sync::{Arc, Mutex}, - time::{Duration, SystemTime, UNIX_EPOCH}, -}; - -use git2::Repository; -use json_patch::{Patch, diff}; -use log::info; -use redis::{RedisResult, aio::MultiplexedConnection}; -use serde::Deserialize; -use tokio::{sync::mpsc::Sender, time::sleep}; -use uuid::Uuid; - -use crate::app::CacheJob; - -pub fn now_unix() -> i64 { - SystemTime::now() - .duration_since(UNIX_EPOCH) - .unwrap() - .as_secs() as i64 -} - -pub fn doc_ver_key(doc: &str) -> String { - format!("doc:{doc}:ver") -} -pub fn doc_tx_stream_key(doc: &str) -> String { - format!("doc:{doc}:tx") -} -pub fn doc_snap_key(doc: &str) -> String { - format!("doc:{doc}:snap") -} -pub fn doc_snapver_key(doc: &str) -> String { - format!("doc:{doc}:snapver") -} -pub fn rsv_key(doc: &str, rsv: &str) -> String { - format!("doc:{doc}:rsv:{rsv}") -} -pub fn txid_key(doc: &str, tx_id: &str) -> String { - format!("doc:{doc}:txid:{tx_id}") -} -pub fn commit_lock_key(doc: &str) -> String { - format!("doc:{doc}:lock") -} - -pub async fn acquire_lock( - con: &mut MultiplexedConnection, - key: &str, - ttl_ms: u64, -) -> RedisResult { - let token = Uuid::new_v4().to_string(); - let ok: Option = redis::cmd("SET") - .arg(key) - .arg(token) - .arg("NX") - .arg("PX") - .arg(ttl_ms) - .query_async(con) - .await?; - Ok(ok.is_some()) -} - -pub async fn wait_lock( - con: &mut MultiplexedConnection, - key: &str, - ttl_ms: u64, - attempts: u32, -) -> RedisResult<()> { - for _ in 0..attempts { - if acquire_lock(con, key, ttl_ms).await? { - return Ok(()); - } - - sleep(Duration::from_millis(30)).await; - } - Err(redis::RedisError::from((redis::ErrorKind::Io, "lock busy"))) -} - -pub fn build_tx_from_diff(base: serde_json::Value, alt: serde_json::Value) -> Patch { - diff(&base, &alt) -} - -fn get_file_from_repo( - repo: Arc>, - path: &str, -) -> Result> { - if let Ok(repo_m) = repo.try_lock() { - let obj = repo_m.revparse_single(path)?; - if let Some(blob) = obj.as_blob() { - let content = unsafe { str::from_utf8_unchecked(blob.content()) }; - return Ok(content.to_string()); - } else if let Some(tree) = obj.as_tree() { - let dir_list = tree - .iter() - .map(|x| x.name().unwrap_or("").to_string()) - .collect::>(); - - return Ok(dir_list.join(",")); - } - } - Err("FileNotFound".into()) -} - -pub async fn setup_prebuild_tx_cache( - tx: Sender, - git_repo: &str, -) -> Result<(), Box> { - // import tx files - let repo = match Repository::open(git_repo) { - Ok(repo) => repo, - Err(_) => return Err("cannot open repo".into()), - }; - - let repo_m = Arc::new(Mutex::new(repo)); - - let root_path = String::from("master:"); - let all_folders = match get_file_from_repo(repo_m.clone(), root_path.as_str()) { - Ok(af) => af, - Err(e) => return Err(e), - }; - - let folders = all_folders - .split(",") - .map(|x| x.to_string()) - .collect::>(); - - for folder in folders { - let current_path = format!("master:{folder}"); - - println!("trying {folder}..."); - - // test get version - // - // NOTE: version may miss if there is file with `versionXXXX` - // - // - if let Ok(current_files) = get_file_from_repo(repo_m.clone(), current_path.as_str()) - && current_files.contains(",version") - { - let expected_version_path = format!("{current_path}/version"); - println!("\tmay have version --> {expected_version_path}, \ncurrent: {current_files}"); - - // get version content - - let version_str = - if let Ok(v) = get_file_from_repo(repo_m.clone(), expected_version_path.as_str()) { - v - } else { - "".to_string() - }; - // let version = version_str.parse::().unwrap_or(0); - if version_str.is_empty() { - // unexpected - return Err("cannot get version".into()); - } - - if tx - .send(CacheJob { - rel_path: expected_version_path.clone(), - file_data: Some(serde_json::to_vec(&version_str)?), - }) - .await - .is_ok() - { - info!("cache ok {current_path}/version"); - } - - println!("try get {folder}:{version_str}"); - - let files = current_files - .split(",") - .map(|x| x.to_string()) - .collect::>(); - - let base_file: String = match files.iter().find(|x| { - x.ends_with(".json") && x.starts_with(&format!("coffeethai02_{version_str}")) - }) { - Some(f) => f.to_string(), - None => "".to_string(), - }; - - println!("{folder}: {base_file}"); - - if base_file.is_empty() { - println!("base file empty skip"); - continue; - } - - let base_recipe_str = if let Ok(r) = - get_file_from_repo(repo_m.clone(), &format!("{current_path}/{base_file}")) - { - r.to_string() - } else { - "".to_string() - }; - - if base_recipe_str.is_empty() { - println!("empty recipe skip!"); - continue; - } - - let base_recipe: serde_json::Value = match serde_json::from_str(&base_recipe_str) { - Ok(r) => r, - Err(e) => return Err(e.into()), - }; - - let mut current_recipes = HashMap::new(); - - current_recipes.insert("base".to_string(), base_recipe); - - for cfile in files { - if cfile.ne(&base_file) - && cfile.ends_with(".json") - && cfile.starts_with("coffeethai02") - { - // - // fetch file content - // read into value - // do diff - - let current_fetch_path = format!("{current_path}/{cfile}"); - let current_file_str = - if let Ok(cr) = get_file_from_repo(repo_m.clone(), ¤t_fetch_path) { - cr.to_string() - } else { - "".to_string() - }; - - if !current_file_str.is_empty() { - // into value - let alt_recipe: serde_json::Value = - match serde_json::from_str(¤t_file_str) { - Ok(crr) => crr, - Err(e) => { - println!("get error while alt {current_fetch_path}: {e}"); - continue; - } - }; - - current_recipes.insert(cfile, alt_recipe); - } - } - } - - // process diffing - // - - let base_recipe_ref = current_recipes.get("base").unwrap(); - - for (key, value) in current_recipes.iter() { - if key != "base" { - let patch_diff = diff(&base_recipe_ref, value); - let tx_name = format!( - "stx_{}", - key.replace("coffeethai02_", "").replace(".json", "") - ); - - let base_path_out = format!("./recipe_tx/{folder}"); - if !std::path::Path::new(&base_path_out).exists() { - std::fs::create_dir_all(&base_path_out)?; - } - - let file_out = format!("{base_path_out}/{tx_name}.json"); - - std::fs::write(file_out, serde_json::to_string_pretty(&patch_diff)?)?; - } - } - - // let _ = tx - // .send(serde_json::json!({ - // "topic": "generate_stx", - // "target": folder, - // "base_version": version_str, - // "full_base_filename": base_file, - // "value": base_recipe_clone - // })) - // .await; - - let json_bytes = serde_json::to_vec(base_recipe_ref)?; - - if tx - .send(CacheJob { - rel_path: format!("{current_path}/{base_file}"), - file_data: Some(json_bytes), - }) - .await - .is_ok() - { - info!("cache ok {current_path}/{base_file}"); - } - } - } - - Ok(()) -} diff --git a/src/tx/mod.rs b/src/tx/mod.rs deleted file mode 100644 index b4579dd..0000000 --- a/src/tx/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -// pub mod handler; -pub mod helpers; -pub mod patcher; -pub mod types; diff --git a/src/tx/patcher.rs b/src/tx/patcher.rs deleted file mode 100644 index d96121b..0000000 --- a/src/tx/patcher.rs +++ /dev/null @@ -1,119 +0,0 @@ -use serde_json::Value; - -use crate::tx::types::PatchOp; - -pub fn json_pointer_parent<'a>( - root: &'a mut Value, - path: &str, -) -> Result<(&'a mut Value, String), String> { - if !path.starts_with('/') && path != "" { - return Err("path must be JSON pointer starting with '/'".into()); - } - - let part: Vec = path - .split('/') - .skip(1) - .map(|x| x.replace("~1", "/").replace("~0", "~")) - .collect(); - if path.is_empty() { - return Ok((root, "".into())); - } - - let last = part.last().unwrap().clone(); - - let mut cur = root; - - for key in &part[..part.len() - 1] { - match cur { - Value::Object(map) => { - cur = map - .get_mut(key) - .ok_or_else(|| format!("missing object key {key}"))?; - } - Value::Array(arr) => { - let idx: usize = key.parse().map_err(|_| format!("bad array idx {key}"))?; - cur = arr - .get_mut(idx) - .ok_or_else(|| format!("array index out of bounds {idx}"))?; - } - _ => return Err("cannot traverse non-container".into()), - } - } - - Ok((cur, last)) -} - -pub fn apply_ops(mut state: Value, ops: &[PatchOp]) -> Result { - for op in ops { - match op { - PatchOp::Replace { path, value } => { - if path == "" || path == "/" { - state = value.clone(); - continue; - } - let (parent, last) = json_pointer_parent(&mut state, path)?; - match parent { - Value::Object(map) => { - if !map.contains_key(&last) { - return Err(format!("replace target missing key {last}")); - } - map.insert(last, value.clone()); - } - Value::Array(arr) => { - let idx: usize = last - .parse() - .map_err(|_| format!("bad array index {last}"))?; - if idx >= arr.len() { - return Err(format!("replace index out of bounds {idx}")); - } - arr[idx] = value.clone(); - } - _ => return Err("replace parent not container".into()), - } - } - PatchOp::Add { path, value } => { - let (parent, last) = json_pointer_parent(&mut state, path)?; - match parent { - Value::Object(map) => { - map.insert(last, value.clone()); - } - Value::Array(arr) => { - if last == "-" { - arr.push(value.clone()); - } else { - let idx: usize = last - .parse() - .map_err(|_| format!("bad array index {last}"))?; - if idx > arr.len() { - return Err(format!("add index out of bounds {idx}")); - } - arr.insert(idx, value.clone()); - } - } - _ => return Err("add parent not container".into()), - } - } - PatchOp::Remove { path } => { - let (parent, last) = json_pointer_parent(&mut state, path)?; - match parent { - Value::Object(map) => { - map.remove(&last) - .ok_or_else(|| format!("remove missing key {last}"))?; - } - Value::Array(arr) => { - let idx: usize = last - .parse() - .map_err(|_| format!("bad array index {last}"))?; - if idx > arr.len() { - return Err(format!("remove index out of bounds {idx}")); - } - arr.remove(idx); - } - _ => return Err("remove parent not container".into()), - } - } - } - } - - Ok(state) -} diff --git a/src/tx/types.rs b/src/tx/types.rs deleted file mode 100644 index 661ad90..0000000 --- a/src/tx/types.rs +++ /dev/null @@ -1,51 +0,0 @@ -use serde::{Deserialize, Serialize}; -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] -pub struct ReserveReq { - pub author: String, - hint_paths: Option>, -} - -#[derive(Debug, Serialize, Deserialize)] -pub struct ReserveRes { - pub reservation_id: String, - pub base_version: u64, - pub expires_at: i64, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -pub struct TxCommitReq { - pub reservation_id: String, - pub tx_id: String, - pub base_version: u64, - pub author: String, - pub ops: Vec, -} - -#[derive(Debug, Serialize, Deserialize)] -pub struct TxCommitRes { - pub doc_id: String, - pub tx_id: String, - pub committed_version: u64, -} - -#[derive(Debug, Serialize, Deserialize, Clone)] -#[serde(tag = "op")] -pub enum PatchOp { - #[serde(rename = "replace")] - Replace { path: String, value: Value }, - #[serde(rename = "add")] - Add { path: String, value: Value }, - #[serde(rename = "remove")] - Remove { path: String }, -} - -#[derive(Debug, Serialize, Deserialize)] -pub struct Reservation { - pub reservation_id: String, - pub doc_id: String, - pub author: String, - pub base_version: u64, - pub expires_at: i64, -}