diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml new file mode 100644 index 0000000..e4c95c7 --- /dev/null +++ b/.github/workflows/rust-ci.yml @@ -0,0 +1,78 @@ +name: Rust CI +on: + push: + branches: [master] + pull_request: +env: + CARGO_TERM_COLOR: always +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: cargo check + run: cargo check + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: cargo clippy --all-features --all-targets -- -D warnings + run: cargo clippy --all-features --all-targets -- -D warnings + doc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: cargo doc + run: cargo doc --no-deps --all-features + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: cargo fmt --check + run: cargo fmt --check + fmt-nightly: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt + - name: cargo +nightly fmt --check + run: cargo +nightly fmt --check + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: cargo test + run: cargo test --locked + doc-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: cargo test --doc + run: cargo test --locked --doc + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: llvm-tools-preview + - name: cargo install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: cargo generate-lockfile + if: hashFiles('Cargo.lock') == '' + run: cargo generate-lockfile + - name: cargo llvm-cov + run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info + - name: Upload to codecov.io + uses: codecov/codecov-action@v3 + with: + files: lcov.info + fail_ci_if_error: true \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a0f1301..ce424c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ ### v0.3.1 (upcoming) -- improvements +- added + - Add CI pipeline +- removed - Remove unnecessary cargo feature "different-binary-name" + - Remove nightly ### v0.3.0 (2022-07-09) diff --git a/Cargo.lock b/Cargo.lock index 21ec6d8..d39fdc2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,75 +2,168 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ + "cfg-if", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ "winapi", ] [[package]] name = "anyhow" -version = "1.0.47" +version = "1.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" + +[[package]] +name = "argminmax" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d9ff5d688f1c13395289f67db01d4826b46dd694e7580accdc3e8430f2d98e" +checksum = "202108b46429b765ef483f8a24d5c46f48c14acfdacc086dd4ab6dddf6bcdbd2" +dependencies = [ + "num-traits", +] + +[[package]] +name = "array-init-cursor" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" [[package]] name = "arrayvec" -version = "0.5.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "arrow-format" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07884ea216994cdc32a2d5f8274a8bee979cfe90274b83f86f440866ee3132c7" +dependencies = [ + "planus", + "serde", +] [[package]] name = "arrow2" -version = "0.10.1" +version = "0.17.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e387b20dd573a96f36b173d9027483898f944d696521afd74e2caa3c813d86e" +checksum = "59c468daea140b747d781a1da9f7db5f0a8e6636d4af20cc539e43d05b0604fa" dependencies = [ + "ahash 0.8.6", + "arrow-format", "bytemuck", "chrono", - "csv-core", + "dyn-clone", "either", + "ethnum", + "foreign_vec", + "futures", + "getrandom", "hash_hasher", "lexical-core", + "lz4", "multiversion", "num-traits", + "regex", + "regex-syntax 0.6.29", + "rustc_version", "simdutf8", - "streaming-iterator", "strength_reduce", + "zstd", ] [[package]] name = "async-trait" -version = "0.1.51" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.41", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", ] [[package]] @@ -79,7 +172,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -90,11 +183,32 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" -version = "0.13.0" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "bitflags" @@ -102,6 +216,24 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -112,60 +244,107 @@ dependencies = [ ] [[package]] -name = "bstr" -version = "0.2.17" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", + "generic-array", +] + +[[package]] +name = "borsh" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +dependencies = [ + "borsh-derive", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.41", + "syn_derive", ] [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "bytecheck" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "bytemuck" -version = "1.10.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53dfa917ec274df8ed3c572698f381a24eef2efba9492d797301b72b6db408a" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562e382481975bc61d11275ac5e62a19abd00b0547d99516a415336f183dcd0e" +checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.41", ] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.72" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "jobserver", + "libc", +] [[package]] name = "cfb" @@ -183,29 +362,36 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ - "libc", - "num-integer", + "android-tzdata", + "iana-time-zone", + "js-sys", "num-traits", "serde", - "time", - "winapi", + "wasm-bindgen", + "windows-targets 0.48.5", ] [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim", "textwrap", "unicode-width", @@ -214,9 +400,9 @@ dependencies = [ [[package]] name = "comfy-table" -version = "5.0.1" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b103d85ca6e209388771bfb7aa6b68a7aeec4afbf6f0a0264bfbf50360e5212e" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ "crossterm", "strum", @@ -226,9 +412,9 @@ dependencies = [ [[package]] name = "connectorx" -version = "0.2.5" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cd8545b599f17b7556d4844ca15b4c441c3fa025274094eee8dea4f5eb9265" +checksum = "99bfe1c3e54c968707fd4116532d421a2f07c49de0ddba25c4ab26a69016c00b" dependencies = [ "anyhow", "arrow2", @@ -241,6 +427,7 @@ dependencies = [ "native-tls", "num-traits", "openssl", + "owning_ref", "polars", "postgres", "postgres-native-tls", @@ -249,8 +436,9 @@ dependencies = [ "r2d2_postgres", "rayon", "rust_decimal", + "rust_decimal_macros", "serde_json", - "sqlparser", + "sqlparser 0.11.0", "thiserror", "url", "uuid 0.8.2", @@ -258,9 +446,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -268,43 +456,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if", - "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -313,52 +491,57 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ + "autocfg", "cfg-if", "crossbeam-utils", - "lazy_static", "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if", - "lazy_static", ] [[package]] name = "crossterm" -version = "0.23.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2102ea4f781910f8a5b98dd061f4c2023f479ce7bb1236330099ceb5a93cf17" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "bitflags", + "bitflags 2.4.1", "crossterm_winapi", "libc", - "mio", - "parking_lot 0.12.1", - "signal-hook", - "signal-hook-mio", + "parking_lot", "winapi", ] [[package]] name = "crossterm_winapi" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ "winapi", ] +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "crypto-mac" version = "0.11.1" @@ -371,11 +554,10 @@ dependencies = [ [[package]] name = "csv" -version = "1.1.6" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ - "bstr", "csv-core", "itoa", "ryu", @@ -384,9 +566,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" dependencies = [ "memchr", ] @@ -410,12 +592,14 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "4.0.0" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "dirs-sys", + "block-buffer 0.10.4", + "crypto-common", + "subtle", ] [[package]] @@ -428,17 +612,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dirs-sys-next" version = "0.1.2" @@ -451,32 +624,66 @@ dependencies = [ ] [[package]] -name = "dtoa" -version = "0.4.8" +name = "dyn-clone" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "either" -version = "1.6.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "email-encoding" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34dd14c63662e0206599796cd5e1ad0268ab2b9d19b868d6050d688eba2bbf98" +checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" dependencies = [ - "base64", + "base64 0.21.5", "memchr", ] [[package]] name = "email_address" -version = "0.2.1" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" + +[[package]] +name = "enum_dispatch" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "ethnum" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8684b7c9cb4857dfa1e5b9629ef584ba618c9b93bae60f58cb23f4f271d0468e" +checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" [[package]] name = "fallible-iterator" @@ -484,15 +691,27 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fast-float" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" + [[package]] name = "fastrand" -version = "1.6.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779d043b6a0b90cc4c0ed7ee380a6504394cee7efd7db050e3774eee387324b2" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + [[package]] name = "fehler" version = "1.0.0" @@ -510,9 +729,15 @@ checksum = "ccb5acb1045ebbfa222e2c50679e392a71dd77030b78fb0189f2d9c5974400f9" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + [[package]] name = "fnv" version = "1.0.7" @@ -534,21 +759,32 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" + [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "matches", "percent-encoding", ] +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" dependencies = [ "futures-channel", "futures-core", @@ -561,9 +797,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" dependencies = [ "futures-core", "futures-sink", @@ -571,15 +807,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" dependencies = [ "futures-core", "futures-task", @@ -588,42 +824,39 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ - "autocfg", - "proc-macro-hack", "proc-macro2", "quote", - "syn", + "syn 2.0.41", ] [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" dependencies = [ - "autocfg", "futures-channel", "futures-core", "futures-io", @@ -633,16 +866,14 @@ dependencies = [ "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -650,26 +881,34 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", + "js-sys", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi", + "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.9" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd" +checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" dependencies = [ "bytes", "fnv", @@ -677,7 +916,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 2.1.0", "slab", "tokio", "tokio-util", @@ -692,28 +931,29 @@ checksum = "74721d007512d0cb3338cd20f0654ac913920061a4c4d0d8708edb3f2a698c0c" [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.7", +] [[package]] name = "hashbrown" -version = "0.12.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash", + "ahash 0.8.6", + "allocator-api2", "rayon", ] [[package]] name = "heck" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -725,7 +965,13 @@ dependencies = [ ] [[package]] -name = "hex" +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" @@ -737,14 +983,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ "crypto-mac", - "digest", + "digest 0.9.0", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.5" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" dependencies = [ "bytes", "fnv", @@ -753,9 +1017,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -764,21 +1028,21 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.15" +version = "0.14.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436ec0091e4f20e655156a30a0df3770fe2900aa301e548e08446ec794b6953c" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" dependencies = [ "bytes", "futures-channel", @@ -791,7 +1055,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.5", "tokio", "tower-service", "tracing", @@ -812,28 +1076,70 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", - "webpki 0.21.4", + "webpki", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "idna" -version = "0.2.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "indexmap" -version = "1.7.0" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown 0.11.2", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", ] [[package]] @@ -856,24 +1162,33 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.8" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "jobserver" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +dependencies = [ + "libc", +] [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -886,42 +1201,43 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lettre" -version = "0.10.0" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5677c78c7c7ede1dd68e8a7078012bc625449fb304e7b509b917eaaedfe6e849" +checksum = "76bd09637ae3ec7bd605b8e135e757980b3968430ff2b1a4a94fb7769e50166d" dependencies = [ - "base64", + "base64 0.21.5", "email-encoding", "email_address", - "fastrand", + "fastrand 1.9.0", "futures-util", "httpdate", - "idna", + "idna 0.3.0", "mime", "nom", "once_cell", "quoted_printable", - "rustls 0.20.2", + "rustls 0.21.10", "rustls-pemfile", - "socket2", - "uuid 1.1.2", + "socket2 0.4.10", + "tokio", + "uuid 1.6.1", "webpki-roots", ] [[package]] name = "lexical" -version = "6.0.1" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34e981f88d060a67815388470172638f1af16b3a12e581cb75142f190161bf9" +checksum = "c7aefb36fd43fef7003334742cbf77b243fcd36418a1d1bdd480d613a67968f6" dependencies = [ "lexical-core", ] [[package]] name = "lexical-core" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3926d8f156019890be4abe5fd3785e0cff1001e06f59c597641fd513a5a284" +checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -932,9 +1248,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d066d004fa762d9da995ed21aa8845bb9f6e4265f540d716fb4b315197bf0e" +checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -943,9 +1259,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "0.8.0" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c92badda8cc0fc4f3d3cc1c30aaefafb830510c8781ce4e8669881f3ed53ac" +checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" dependencies = [ "lexical-util", "static_assertions", @@ -953,18 +1269,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "0.8.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff669ccaae16ee33af90dc51125755efed17f1309626ba5c12052512b11e291" +checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5186948c7b297abaaa51560f2581dae625e5ce7dfc2d8fdc56345adb6dc576" +checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" dependencies = [ "lexical-util", "lexical-write-integer", @@ -973,9 +1289,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "0.8.0" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece956492e0e40fd95ef8658a34d53a3b8c2015762fdcaaff2167b28de1f56ef" +checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" dependencies = [ "lexical-util", "static_assertions", @@ -983,21 +1299,44 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.126" +version = "0.2.151" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.1", + "libc", + "redox_syscall", +] [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "linux-raw-sys" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -1005,18 +1344,29 @@ dependencies = [ [[package]] name = "log" -version = "0.4.14" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "lz4" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" dependencies = [ - "cfg-if", + "libc", + "lz4-sys", ] [[package]] -name = "matches" -version = "0.1.9" +name = "lz4-sys" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" +checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +dependencies = [ + "cc", + "libc", +] [[package]] name = "md-5" @@ -1024,40 +1374,50 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" dependencies = [ - "block-buffer", - "digest", + "block-buffer 0.9.0", + "digest 0.9.0", "opaque-debug", ] +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" -version = "2.4.1" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" -version = "0.5.4" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5172b50c23043ff43dd53e51392f36519d9b35a8f3a410d30ece5d1aedd58ae" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.4" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal-lexical" @@ -1065,43 +1425,53 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" -version = "0.8.3" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "wasi", + "windows-sys 0.48.0", ] [[package]] name = "multiversion" -version = "0.6.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "025c962a3dd3cc5e0e520aa9c612201d127dcdf28616974961a649dca64f5373" +checksum = "b2c7b9d7fe61760ce5ea19532ead98541f6b4c495d87247aff9826445cf6872a" dependencies = [ "multiversion-macros", + "target-features", ] [[package]] name = "multiversion-macros" -version = "0.6.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a3e2bde382ebf960c1f3e79689fa5941625fe9bf694a1cb64af3e85faff3af" +checksum = "26a83d8500ed06d68877e9de1dde76c1dbb83885dcdbda4ef44ccbc3fbda2ac8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", + "target-features", ] [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -1117,106 +1487,66 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.0" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", - "version_check", -] - -[[package]] -name = "num" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" -dependencies = [ - "num-traits", ] [[package]] -name = "num-integer" -version = "0.1.44" +name = "now" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "6d89e9874397a1f0a52fc1f197a8effd9735223cb2390e9dcc83ac6cd02923d0" dependencies = [ - "autocfg", - "num-traits", + "chrono", ] [[package]] -name = "num-iter" -version = "0.1.42" +name = "ntapi" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "winapi", ] [[package]] -name = "num-rational" -version = "0.4.0" +name = "num-traits" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", - "num-bigint", - "num-integer", - "num-traits", + "libm", ] [[package]] -name = "num-traits" -version = "0.2.14" +name = "num_cpus" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "autocfg", + "hermit-abi 0.3.3", + "libc", ] [[package]] -name = "num_cpus" -version = "1.13.0" +name = "object" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ - "hermit-abi", - "libc", + "memchr", ] [[package]] name = "once_cell" -version = "1.8.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -1226,31 +1556,42 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.38" +version = "0.10.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" dependencies = [ - "bitflags", + "bitflags 2.4.1", "cfg-if", "foreign-types", "libc", "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + [[package]] name = "openssl-probe" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.71" +version = "0.9.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df13d165e607909b363a4757a6f133f8a818a74e9d3a98d09c6128e15fa4c73" +checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" dependencies = [ - "autocfg", "cc", "libc", "pkg-config", @@ -1258,14 +1599,12 @@ dependencies = [ ] [[package]] -name = "parking_lot" -version = "0.11.2" +name = "owning_ref" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.5", + "stable_deref_trait", ] [[package]] @@ -1275,56 +1614,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.3", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-targets 0.48.5", ] [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fc3db1018c4b59d7d582a739436478b6035138b6aecbce989fc91c3e98409f" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_shared", ] [[package]] name = "phf_shared" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] @@ -1334,7 +1659,7 @@ name = "pigeon-rs" version = "0.3.0" dependencies = [ "anyhow", - "base64", + "base64 0.13.1", "bytes", "chrono", "clap", @@ -1357,9 +1682,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -1369,127 +1694,277 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.22" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + +[[package]] +name = "planus" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" +checksum = "fc1691dd09e82f428ce8d6310bd6d5da2557c82ff17694d2a32cad7242aea89f" +dependencies = [ + "array-init-cursor", +] [[package]] name = "polars" -version = "0.20.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "656db3b86c338a8a717476eb29436a380ebdf74915a71cff6ecce78d52173e53" +checksum = "b1362d4a136c0ebacb40d88a37ba361738b222fd8a2ee9340a3d8642f698c52b" dependencies = [ + "getrandom", "polars-core", "polars-io", "polars-lazy", + "polars-ops", + "polars-sql", "polars-time", + "version_check", ] [[package]] name = "polars-arrow" -version = "0.20.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcedf44a7b15b60c69e811c9d343ac459788e961dc4136f002ed1b68a1fada07" +checksum = "f967c901fa5da4ca7f64e813d1268488ba97e9b3004cefc579ff851c197a1138" dependencies = [ "arrow2", - "hashbrown 0.12.1", - "num", + "hashbrown 0.14.3", + "multiversion", + "num-traits", + "polars-error", "thiserror", + "version_check", ] [[package]] name = "polars-core" -version = "0.20.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfed0e21ac4d4c85df45b5864a68cfc5b2a97e9fba8a981be7b09c6f02a7eaa" +checksum = "b24f92fc5b167f668ff85ab9607dfa72e2c09664cacef59297ee8601dee60126" dependencies = [ - "ahash", - "anyhow", + "ahash 0.8.6", "arrow2", + "bitflags 2.4.1", "chrono", "comfy-table", - "hashbrown 0.12.1", - "indexmap", - "lazy_static", - "num", - "num_cpus", + "either", + "hashbrown 0.14.3", + "indexmap 2.1.0", + "num-traits", + "once_cell", "polars-arrow", + "polars-error", + "polars-row", + "polars-utils", + "rand", + "rand_distr", "rayon", "regex", + "smartstring", + "thiserror", + "version_check", + "xxhash-rust", +] + +[[package]] +name = "polars-error" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d09c3a7337e53b38c37b57999038440fa39c6801b9ba48afaecd8e16f7ac0a" +dependencies = [ + "arrow2", + "regex", "thiserror", ] [[package]] name = "polars-io" -version = "0.20.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8770fb4233ab88affac80c410be090dc7a2c044a9e4e7b942132e94ceeb732b" +checksum = "92cab0df9f2a35702fa5aec99edfaabf9ae8e9cdd0acf69e143ad2d132f34f9c" dependencies = [ - "ahash", - "anyhow", + "ahash 0.8.6", "arrow2", - "csv-core", - "dirs", - "lazy_static", + "async-trait", + "bytes", + "chrono", + "fast-float", + "futures", + "home", "lexical", + "lexical-core", "memchr", "memmap2", - "num", - "num_cpus", + "num-traits", + "once_cell", "polars-arrow", "polars-core", + "polars-error", + "polars-time", + "polars-utils", "rayon", "regex", "simdutf8", + "tokio", ] [[package]] name = "polars-lazy" -version = "0.20.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca1fed3b88ae1bb9b7f1d7b2958f1655d9c1aed33495d6ba30ff84a0c1e9e9" +checksum = "2c33762ec2a55e01c9f8776b34db86257c70a0a3b3929bd4eb91a52aacf61456" dependencies = [ - "ahash", + "ahash 0.8.6", + "bitflags 2.4.1", "glob", - "parking_lot 0.12.1", + "once_cell", "polars-arrow", "polars-core", "polars-io", + "polars-ops", + "polars-pipe", + "polars-plan", "polars-time", "polars-utils", "rayon", + "smartstring", + "version_check", ] [[package]] -name = "polars-time" -version = "0.20.0" +name = "polars-ops" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe48c759ca778a8b6fb30f70e9a81b56f0987a82dc71e61c5b2d3c236b6b8d6" +checksum = "e825575c96302d2daedfc205a0062180033c92c55bcd6aafc4e109d4d8849ed0" dependencies = [ - "chrono", + "argminmax", + "arrow2", + "either", + "indexmap 2.1.0", + "memchr", "polars-arrow", "polars-core", + "polars-utils", + "smartstring", + "version_check", ] [[package]] -name = "polars-utils" -version = "0.20.0" +name = "polars-pipe" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71011e8ed52f123ce23d110b496c8704d0a59c5fd4115cd938e7ff19d4bcb7ca" +checksum = "1f2bc9a12da9ed043fb0cb51dbcb87b365e4845b7ab6399d7a81e838460c6974" dependencies = [ - "parking_lot 0.12.1", + "enum_dispatch", + "hashbrown 0.14.3", + "num-traits", + "polars-arrow", + "polars-core", + "polars-io", + "polars-ops", + "polars-plan", + "polars-row", + "polars-utils", "rayon", + "smartstring", + "version_check", ] [[package]] -name = "postgres" -version = "0.19.2" +name = "polars-plan" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb76d6535496f633fa799bb872ffb4790e9cbdedda9d35564ca0252f930c0dd5" +checksum = "fb67b014f0295e8e9dbb84404a91d666d477b3bc248a2ed51bc442833b16da35" +dependencies = [ + "ahash 0.8.6", + "arrow2", + "once_cell", + "polars-arrow", + "polars-core", + "polars-io", + "polars-ops", + "polars-time", + "polars-utils", + "rayon", + "regex", + "smartstring", + "strum_macros", + "version_check", +] + +[[package]] +name = "polars-row" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f54c1956027bf6301948fb4f2837cf6d6b638d8dd1edf3aaeaa19906a986be" +dependencies = [ + "arrow2", + "polars-error", + "polars-utils", +] + +[[package]] +name = "polars-sql" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfcb15cf8eebd25ea1724109d0153817cd484c6326290585f0736b4e7fcf2f4" +dependencies = [ + "polars-arrow", + "polars-core", + "polars-lazy", + "polars-plan", + "serde", + "serde_json", + "sqlparser 0.36.1", +] + +[[package]] +name = "polars-time" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53f42d2632f5971c9575041d33cbcfb1f996900c40bbf58bc6eb0a0c5efbecea" +dependencies = [ + "arrow2", + "atoi", + "chrono", + "now", + "once_cell", + "polars-arrow", + "polars-core", + "polars-ops", + "polars-utils", + "regex", + "smartstring", +] + +[[package]] +name = "polars-utils" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c326708a370d71dc6e11a8f4bbc10a8479e1c314dc048ba73543b815cd0bf339" +dependencies = [ + "ahash 0.8.6", + "hashbrown 0.14.3", + "num-traits", + "once_cell", + "polars-error", + "rayon", + "smartstring", + "sysinfo", + "version_check", +] + +[[package]] +name = "postgres" +version = "0.19.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7915b33ed60abc46040cbcaa25ffa1c7ec240668e0477c4f3070786f5916d451" dependencies = [ "bytes", "fallible-iterator", - "futures", + "futures-util", "log", "tokio", "tokio-postgres", @@ -1523,27 +1998,27 @@ dependencies = [ [[package]] name = "postgres-protocol" -version = "0.6.2" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b145e6a4ed52cb316a27787fc20fe8a25221cb476479f61e4e0327c15b98d91a" +checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" dependencies = [ - "base64", + "base64 0.21.5", "byteorder", "bytes", "fallible-iterator", - "hmac", - "md-5", + "hmac 0.12.1", + "md-5 0.10.6", "memchr", "rand", - "sha2", + "sha2 0.10.8", "stringprep", ] [[package]] name = "postgres-types" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04619f94ba0cc80999f4fc7073607cb825bc739a883cb6d20900fc5e009d6b0d" +checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" dependencies = [ "bytes", "chrono", @@ -1556,54 +2031,95 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] -name = "proc-macro-hack" -version = "0.5.19" +name = "proc-macro-crate" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit", +] [[package]] -name = "proc-macro-nested" -version = "0.1.7" +name = "proc-macro-error" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "ptr_meta" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" dependencies = [ - "unicode-xid", + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] name = "quote" -version = "1.0.10" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] [[package]] name = "quoted_printable" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fee2dce59f7a43418e3382c766554c614e06a552d53a8f07ef499ea4b332c0f" +checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" [[package]] name = "r2d2" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" +checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot 0.11.2", + "parking_lot", "scheduled-thread-pool", ] @@ -1617,16 +2133,21 @@ dependencies = [ "r2d2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", - "rand_hc", ] [[package]] @@ -1641,96 +2162,105 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] [[package]] -name = "rand_hc" -version = "0.3.1" +name = "rand_distr" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ - "rand_core", + "num-traits", + "rand", ] [[package]] name = "rayon" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", - "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ "getrandom", - "redox_syscall", + "libredox", + "thiserror", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-automata", + "regex-syntax 0.8.2", ] [[package]] name = "regex-automata" -version = "0.1.10" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "rend" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" dependencies = [ - "winapi", + "bytecheck", ] [[package]] @@ -1742,12 +2272,55 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + +[[package]] +name = "rkyv" +version = "0.7.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid 1.6.1", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "rusoto_core" version = "0.47.0" @@ -1755,7 +2328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b4f000e8934c1b4f70adde180056812e7ea6b1a247952db8ee98c94cd3116cc" dependencies = [ "async-trait", - "base64", + "base64 0.13.1", "bytes", "crc32fast", "futures", @@ -1811,40 +2384,59 @@ version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6264e93384b90a747758bcc82079711eacf2e755c3a8b5091687b5349d870bcc" dependencies = [ - "base64", + "base64 0.13.1", "bytes", "chrono", - "digest", + "digest 0.9.0", "futures", "hex", - "hmac", + "hmac 0.11.0", "http", "hyper", "log", - "md-5", + "md-5 0.9.1", "percent-encoding", "pin-project-lite", "rusoto_credential", "rustc_version", "serde", - "sha2", + "sha2 0.9.9", "tokio", ] [[package]] name = "rust_decimal" -version = "1.17.0" +version = "1.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353775f96a1f400edcca737f843cb201af3645912e741e64456a257c770173e8" +checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" dependencies = [ "arrayvec", - "byteorder", + "borsh", "bytes", "num-traits", "postgres", + "rand", + "rkyv", "serde", + "serde_json", ] +[[package]] +name = "rust_decimal_macros" +version = "1.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e43721f4ef7060ebc2c3ede757733209564ca8207f47674181bcd425dd76945" +dependencies = [ + "quote", + "rust_decimal", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + [[package]] name = "rustc_version" version = "0.4.0" @@ -1854,29 +2446,42 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "base64", + "base64 0.13.1", "log", - "ring", + "ring 0.16.20", "sct 0.6.1", - "webpki 0.21.4", + "webpki", ] [[package]] name = "rustls" -version = "0.20.2" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37e5e2290f3e040b594b1a9e04377c2c671f1a1cfd9bfdef82106ac1c113f84" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring", - "sct 0.7.0", - "webpki 0.22.0", + "ring 0.17.7", + "rustls-webpki 0.101.7", + "sct 0.7.1", ] [[package]] @@ -1893,49 +2498,68 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64", + "base64 0.21.5", +] + +[[package]] +name = "rustls-webpki" +version = "0.100.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" +dependencies = [ + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0a5f7c728f5d284929a1cccb5bc19884422bfe6ef4d6c409da2c41838983fcf" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "scheduled-thread-pool" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" +checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot 0.11.2", + "parking_lot", ] [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -1943,27 +2567,33 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + [[package]] name = "security-framework" -version = "2.4.2" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1972,9 +2602,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.4.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -1982,35 +2612,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.4" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.130" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.41", ] [[package]] name = "serde_json" -version = "1.0.71" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063bf466a64011ac24040a49009724ee60a57da1b437617ceb32e53ad61bfb19" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -2019,9 +2649,9 @@ dependencies = [ [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", "itoa", @@ -2031,105 +2661,125 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.21" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ - "dtoa", - "indexmap", + "indexmap 1.9.3", + "ryu", "serde", "yaml-rust", ] [[package]] name = "sha2" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "block-buffer", + "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest", + "digest 0.9.0", "opaque-debug", ] [[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - -[[package]] -name = "signal-hook" -version = "0.3.14" +name = "sha2" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "libc", - "signal-hook-registry", + "cfg-if", + "cpufeatures", + "digest 0.10.7", ] [[package]] -name = "signal-hook-mio" -version = "0.2.3" +name = "shlex" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" -dependencies = [ - "libc", - "mio", - "signal-hook", -] +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook-registry" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" dependencies = [ "libc", ] [[package]] name = "simdutf8" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970da16e7c682fa90a261cf0724dee241c9f7831635ecc4e988ae8f3b505559" +checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "siphasher" -version = "0.3.7" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.5" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" -version = "1.7.0" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "smartstring" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" +dependencies = [ + "autocfg", + "static_assertions", + "version_check", +] [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", ] +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "sqlparser" version = "0.11.0" @@ -2140,29 +2790,39 @@ dependencies = [ ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "sqlparser" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "2eaa1e88e78d2c2460d78b7dc3f0c08dbb606ab4222f9aff36f420d36e307d87" +dependencies = [ + "log", +] [[package]] -name = "streaming-iterator" -version = "0.1.5" +name = "stable_deref_trait" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303235c177994a476226b80d076bd333b7b560fb05bd242a10609d11b07f81f5" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strength_reduce" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ff2f71c82567c565ba4b3009a9350a96a7269eaa4001ebedae926230bc2254" +checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] @@ -2175,21 +2835,21 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strum" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum_macros" -version = "0.23.1" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb0dc7ee9c15cea6199cde9a127fa16a4c5819af85395457ad72d68edc85a38" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn", + "syn 2.0.41", ] [[package]] @@ -2200,29 +2860,77 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.81" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] -name = "tempfile" -version = "3.2.0" +name = "syn" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.41", +] + +[[package]] +name = "sysinfo" +version = "0.29.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666" dependencies = [ "cfg-if", + "core-foundation-sys", "libc", - "rand", - "redox_syscall", - "remove_dir_all", + "ntapi", + "once_cell", "winapi", ] +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "target-features" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb5fa503293557c5158bd215fdc225695e567a77e453f5d4452a50a193969bd" + +[[package]] +name = "tempfile" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +dependencies = [ + "cfg-if", + "fastrand 2.0.1", + "redox_syscall", + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -2234,85 +2942,73 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" dependencies = [ "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "syn 2.0.41", ] [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.18.2" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" dependencies = [ + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.5", "tokio-macros", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.7.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.41", ] [[package]] name = "tokio-native-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", @@ -2320,9 +3016,9 @@ dependencies = [ [[package]] name = "tokio-openssl" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08f9ffb7809f1b20c1b398d92acf4cc719874b3b2b2d9ea2f09b4a80350878a" +checksum = "6ffab79df67727f6acf57f1ff743091873c24c579b1e2ce4d8f53e47ded4d63d" dependencies = [ "futures-util", "openssl", @@ -2332,25 +3028,28 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.5" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6c8b33df661b548dcd8f9bf87debb8c56c05657ed291122e1188698c2ece95" +checksum = "d340244b32d920260ae7448cb72b6e238bddc3d4f7603394e7dd46ed8e48f5b8" dependencies = [ "async-trait", "byteorder", "bytes", "fallible-iterator", - "futures", + "futures-channel", + "futures-util", "log", - "parking_lot 0.11.2", + "parking_lot", "percent-encoding", "phf", "pin-project-lite", "postgres-protocol", "postgres-types", - "socket2", + "rand", + "socket2 0.5.5", "tokio", "tokio-util", + "whoami", ] [[package]] @@ -2361,109 +3060,124 @@ checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ "rustls 0.19.1", "tokio", - "webpki 0.21.4", + "webpki", ] [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", ] [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.14.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" - [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "untrusted" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "untrusted" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.2.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna", - "matches", + "idna 0.5.0", "percent-encoding", ] @@ -2478,9 +3192,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.1.2" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd6469f4314d5f1ffec476e05f17cc9a78bc7a27a6a857842170bdf8d6f98d2f" +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" dependencies = [ "getrandom", ] @@ -2499,26 +3213,19 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2527,9 +3234,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2537,24 +3244,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.41", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2562,28 +3269,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -2595,27 +3302,27 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] -name = "webpki" -version = "0.22.0" +name = "webpki-roots" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "ring", - "untrusted", + "rustls-webpki 0.100.3", ] [[package]] -name = "webpki-roots" -version = "0.22.1" +name = "whoami" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c475786c6f47219345717a043a37ec04cb4bc185e28853adcc4fa0a947eba630" +checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" dependencies = [ - "webpki 0.22.0", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -2640,54 +3347,176 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] [[package]] name = "xml-rs" -version = "0.8.4" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" +checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" + +[[package]] +name = "xxhash-rust" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9828b178da53440fa9c766a3d2f73f7cf5d0ac1fe3980c1e5018d899fd19e07b" [[package]] name = "yaml-rust" @@ -2698,8 +3527,57 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "zerocopy" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.41", +] + [[package]] name = "zeroize" -version = "1.4.3" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" + +[[package]] +name = "zstd" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.9+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index a0e6eb4..245feeb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "pigeon-rs" version = "0.3.0" authors = ["quambene "] description = "Command line tool for cheap and efficient email automation" -edition = "2018" +edition = "2021" homepage = "https://github.com/quambene/pigeon-rs" repository = "https://github.com/quambene/pigeon-rs" documentation = "https://github.com/quambene/pigeon-rs" @@ -23,9 +23,9 @@ serde_yaml = "0.8.17" tokio = "1.12.0" csv = "1.1.6" clap = "2.33.3" -chrono = "0.4.19" -polars = { version = "0.20.0", features = ["dtype-u8"] } -connectorx = { version = "0.2.5", features = ["src_postgres", "dst_arrow2"] } +chrono = "0.4" +polars = { version = "0.32", features = ["dtype-u8"] } +connectorx = { version = "0.3.2", features = ["src_postgres", "dst_arrow2"] } postgres = "0.19.2" url = "2.2.2" uuid = { version = "0.8.2", features = ["v4"] } diff --git a/README.md b/README.md index c71caf4..627c266 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,6 @@ emmy@noether.com ... ok elie@cartan.com ... ok ``` -- [Requirements](#requirements) - [Install Pigeon](#install-pigeon) - [Install Pigeon from crates.io](#install-pigeon-from-cratesio) - [Install Pigeon from github.com](#install-pigeon-from-githubcom) @@ -56,21 +55,11 @@ elie@cartan.com ... ok - [Data sources](#data-sources) - [Comparison with Mailchimp, Sendgrid, and ConvertKit](#comparison-with-mailchimp-sendgrid-and-convertkit) -## Requirements - -You need to have Rust installed on your system and nightly toolchain activated. - ## Install Pigeon ### Install Pigeon from [crates.io](https://crates.io/crates/pigeon-rs) ``` bash -# Install nightly toolchain -rustup toolchain install nightly - -# Switch to nightly toolchain -rustup override set nightly - # Build and install pigeon binary to ~/.cargo/bin cargo install pigeon-rs ``` @@ -84,9 +73,6 @@ _Note:_ Run `cargo install pigeon-rs` again to update to the latest version. Uni git clone git@github.com:quambene/pigeon-rs.git cd pigeon-rs -# Activate rust nightly toolchain for current directory -echo "nightly" > rust-toolchain - # Build and install pigeon binary to ~/.cargo/bin cargo install --path . ``` diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..4d2d28e --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.74" +profile = "default" \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..121dcba --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,4 @@ +unstable_features = true +imports_granularity = "Crate" +group_imports = "One" +format_code_in_doc_comments = true \ No newline at end of file diff --git a/src/cmd/query.rs b/src/cmd/query.rs index feff26e..12d90dc 100644 --- a/src/cmd/query.rs +++ b/src/cmd/query.rs @@ -72,7 +72,7 @@ pub fn query(matches: &ArgMatches) -> Result<(), anyhow::Error> { // If argument 'FILE_TYPE' is not present the default value 'csv' will be used match matches.value_of(arg::FILE_TYPE) { Some(file_type) => match file_type { - x if x == "csv" => write_csv(matches, df_query_result)?, + "csv" => write_csv(matches, df_query_result)?, x if x == "jpg" => write_image(matches, df_query_result, x)?, x if x == "png" => write_image(matches, df_query_result, x)?, _ => { @@ -115,7 +115,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::QUERY).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = query(&subcommand_matches); + let res = query(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -138,7 +138,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::QUERY).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = query(&subcommand_matches); + let res = query(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -163,7 +163,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::QUERY).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = query(&subcommand_matches); + let res = query(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) diff --git a/src/cmd/read.rs b/src/cmd/read.rs index 54327a7..7da9f11 100644 --- a/src/cmd/read.rs +++ b/src/cmd/read.rs @@ -55,7 +55,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::READ).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = read(&subcommand_matches); + let res = read(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) diff --git a/src/cmd/send.rs b/src/cmd/send.rs index 98f9bef..bc22c36 100644 --- a/src/cmd/send.rs +++ b/src/cmd/send.rs @@ -105,7 +105,7 @@ pub fn send(matches: &ArgMatches) -> Result<(), anyhow::Error> { println!("Dry run: {}", format_green("activated")); } - let client = Client::new(matches)?; + let client = Client::init(matches)?; let eml_formatter = EmlFormatter::new(matches)?; println!("Sending email to 1 recipient ..."); @@ -142,6 +142,7 @@ mod tests { use std::env; #[test] + #[ignore] fn test_send_subject_content_smtp_dry() { let args = vec![ cmd::BIN, @@ -163,7 +164,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -195,13 +196,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_message_file_smtp_dry() { let args = vec![ cmd::BIN, @@ -221,7 +223,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -250,7 +252,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -281,13 +283,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_message_file_empty_smtp_dry() { let args = vec![ cmd::BIN, @@ -307,13 +310,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_message_file_none_html_smtp_dry() { let args = vec![ cmd::BIN, @@ -333,13 +337,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_message_file_content_none_smtp_dry() { let args = vec![ cmd::BIN, @@ -359,13 +364,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_err()) } #[test] + #[ignore] fn test_archive_smtp_dry() { let args = vec![ cmd::BIN, @@ -385,13 +391,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_archive_dir_smtp_dry() { let args = vec![ cmd::BIN, @@ -413,13 +420,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_attachment_pdf_smtp_dry() { let args = vec![ cmd::BIN, @@ -441,13 +449,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_attachment_png_smtp_dry() { let args = vec![ cmd::BIN, @@ -469,13 +478,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_attachment_odt_smtp_dry() { let args = vec![ cmd::BIN, @@ -497,7 +507,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -529,7 +539,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -563,13 +573,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_aws_api_dry() { let args = vec![ cmd::BIN, @@ -593,7 +604,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -627,13 +638,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_text_file_smtp_dry() { let args = vec![ cmd::BIN, @@ -655,13 +667,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_html_file_smtp_dry() { let args = vec![ cmd::BIN, @@ -683,13 +696,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_text_file_html_file_smtp_dry() { let args = vec![ cmd::BIN, @@ -713,7 +727,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) @@ -747,7 +761,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send(&subcommand_matches); + let res = send(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) diff --git a/src/cmd/send_bulk.rs b/src/cmd/send_bulk.rs index 07038f0..b893f07 100644 --- a/src/cmd/send_bulk.rs +++ b/src/cmd/send_bulk.rs @@ -112,7 +112,7 @@ pub fn send_bulk(matches: &ArgMatches) -> Result<(), anyhow::Error> { println!("matches: {:#?}", matches); } - let sender = Sender::new(matches)?; + let sender = Sender::init(matches)?; let df_receiver = Receiver::dataframe(matches)?; let default_message = Message::build(matches)?; let bulk_email = BulkEmail::build(matches, sender, &df_receiver, &default_message)?; @@ -146,6 +146,7 @@ mod tests { use crate::{app, cmd}; #[test] + #[ignore] fn test_send_bulk_subject_content_dry() { let args = vec![ cmd::BIN, @@ -167,13 +168,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_bulk_text_file_html_file_dry() { let args = vec![ cmd::BIN, @@ -197,13 +199,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_bulk_message_file_dry() { let args = vec![ cmd::BIN, @@ -223,13 +226,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_bulk_receiver_column_dry() { let args = vec![ cmd::BIN, @@ -251,13 +255,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_bulk_personalize_dry() { let args = vec![ cmd::BIN, @@ -280,13 +285,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_archive_dry() { let args = vec![ cmd::BIN, @@ -307,13 +313,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_archive_dir_dry() { let args = vec![ cmd::BIN, @@ -336,13 +343,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_attachment_pdf_dry() { let args = vec![ cmd::BIN, @@ -365,13 +373,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_attachment_png_dry() { let args = vec![ cmd::BIN, @@ -394,13 +403,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_attachment_odt_dry() { let args = vec![ cmd::BIN, @@ -423,13 +433,14 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) } #[test] + #[ignore] fn test_send_bulk_aws_dry() { let args = vec![ cmd::BIN, @@ -451,7 +462,7 @@ mod tests { let subcommand_matches = matches.subcommand_matches(cmd::SEND_BULK).unwrap(); println!("subcommand matches: {:#?}", subcommand_matches); - let res = send_bulk(&subcommand_matches); + let res = send_bulk(subcommand_matches); println!("res: {:#?}", res); assert!(res.is_ok()) diff --git a/src/data_loader/tabular_data.rs b/src/data_loader/tabular_data.rs index 2a881d5..557fbc7 100644 --- a/src/data_loader/tabular_data.rs +++ b/src/data_loader/tabular_data.rs @@ -1,17 +1,15 @@ -use std::path::PathBuf; - +use crate::{ + arg, + data_sources::{query_postgres, read_csv}, + email_builder::Receiver, +}; use anyhow::{anyhow, Context}; use clap::ArgMatches; use polars::{ chunked_array::ChunkedArray, prelude::{DataFrame, TakeRandom, Utf8Type}, }; - -use crate::{ - arg, - data_sources::{query_postgres, read_csv}, - email_builder::Receiver, -}; +use std::path::PathBuf; pub struct TabularData; diff --git a/src/data_sources/csv.rs b/src/data_sources/csv.rs index 834a3e6..5e36497 100644 --- a/src/data_sources/csv.rs +++ b/src/data_sources/csv.rs @@ -1,3 +1,4 @@ +use crate::arg; use anyhow::{anyhow, Context}; use clap::ArgMatches; use polars::prelude::{CsvReader, CsvWriter, DataFrame, SerReader, SerWriter}; @@ -7,8 +8,6 @@ use std::{ time::SystemTime, }; -use crate::arg; - pub fn read_csv(csv_file: &Path) -> Result { println!("Reading csv file '{}' ...", csv_file.display()); let reader = CsvReader::from_path(csv_file)?.has_header(true); @@ -25,7 +24,7 @@ pub fn write_csv(matches: &ArgMatches, mut df: DataFrame) -> Result<(), anyhow:: Some(save_dir) => PathBuf::from(save_dir), None => return Err(anyhow!("Missing value for argument '{}'", arg::SAVE_DIR)), }; - let target_file = "query_".to_string() + ¤t_time + ".csv"; + let target_file = format!("query_{}.csv", ¤t_time); match target_dir.exists() { true => (), @@ -42,7 +41,7 @@ pub fn write_csv(matches: &ArgMatches, mut df: DataFrame) -> Result<(), anyhow:: let timestamp_format = "%F_H:%M:%S"; CsvWriter::new(csv_file) - .with_timestamp_format(Some(timestamp_format.to_string())) + .with_datetime_format(Some(timestamp_format.to_string())) .finish(&mut df)?; Ok(()) diff --git a/src/data_sources/image.rs b/src/data_sources/image.rs index 4929c91..aff8f75 100644 --- a/src/data_sources/image.rs +++ b/src/data_sources/image.rs @@ -59,7 +59,7 @@ pub fn write_image( _ => Some( df.column(name_col) .context("Can't find column for image name")? - .get(i) + .get(i)? .to_string(), ), }; diff --git a/src/data_sources/mod.rs b/src/data_sources/mod.rs index 5bf3bfe..40d86ff 100644 --- a/src/data_sources/mod.rs +++ b/src/data_sources/mod.rs @@ -3,7 +3,9 @@ mod image; mod postgres; mod ssh_tunnel; -pub use self::csv::{read_csv, write_csv}; -pub use self::image::write_image; -pub use self::postgres::{query_postgres, ConnVars}; +pub use self::{ + csv::{read_csv, write_csv}, + image::write_image, + postgres::{query_postgres, ConnVars}, +}; pub use ssh_tunnel::SshTunnel; diff --git a/src/data_sources/postgres.rs b/src/data_sources/postgres.rs index a9aeca3..4527eae 100644 --- a/src/data_sources/postgres.rs +++ b/src/data_sources/postgres.rs @@ -1,3 +1,4 @@ +use crate::{arg, data_sources::SshTunnel}; use anyhow::{Context, Result}; use clap::ArgMatches; use connectorx::{ @@ -11,8 +12,6 @@ use postgres::NoTls; use std::{env, fmt}; use url::Url; -use crate::{arg, data_sources::SshTunnel}; - pub struct Password(pub String); impl fmt::Debug for Password { @@ -63,16 +62,10 @@ impl ConnVars { } pub fn connection_url(&self) -> String { - String::from("postgresql://") - + &self.db_user - + ":" - + &self.db_password.0 - + "@" - + &self.db_host - + ":" - + &self.db_port - + "/" - + &self.db_name + format!( + "postgresql://{}:{}@{}:{}/{}", + &self.db_user, &self.db_password.0, &self.db_host, &self.db_port, &self.db_name + ) } } @@ -101,12 +94,12 @@ pub fn query_postgres(matches: &ArgMatches, query: &str) -> Result tunnel.kill()?, None => (), } - Ok(df?) + Ok(df) } diff --git a/src/data_sources/ssh_tunnel.rs b/src/data_sources/ssh_tunnel.rs index d20e4be..4af20f2 100644 --- a/src/data_sources/ssh_tunnel.rs +++ b/src/data_sources/ssh_tunnel.rs @@ -27,13 +27,13 @@ impl SshTunnel { None => return Err(anyhow!("Missing value for argument '{}'", arg::SSH_TUNNEL)), }; let local_url = &(LOCALHOST.to_string() + ":" + local_port) as &str; - let db_url = conn_vars.db_host.to_string() + ":" + &conn_vars.db_port; + let db_url = format!("{}:{}", conn_vars.db_host, &conn_vars.db_port); - let port_fwd = local_url.to_string() + ":" + &db_url; - let ssh_connection = server_user.to_string() + "@" + &server_host; + let port_fwd = format!("{}:{}", local_url, &db_url); + let ssh_connection = format!("{}@{}", server_user, &server_host); let process = Command::new("ssh") - .args(&["-N", "-T", "-L", &port_fwd, &ssh_connection]) + .args(["-N", "-T", "-L", &port_fwd, &ssh_connection]) .spawn()?; let connection_url = SshTunnel::connection_url(conn_vars, local_url); @@ -78,13 +78,9 @@ impl SshTunnel { } fn connection_url(conn_vars: &ConnVars, tunnel_url: &str) -> String { - String::from("postgresql://") - + &conn_vars.db_user - + ":" - + &conn_vars.db_password.0 - + "@" - + tunnel_url - + "/" - + &conn_vars.db_name + format!( + "postgresql://{}:{}@{}/{}", + &conn_vars.db_user, &conn_vars.db_password.0, tunnel_url, &conn_vars.db_name + ) } } diff --git a/src/email_builder/bulk_email.rs b/src/email_builder/bulk_email.rs index 401b9a4..cba37a9 100644 --- a/src/email_builder/bulk_email.rs +++ b/src/email_builder/bulk_email.rs @@ -90,7 +90,7 @@ impl<'a> BulkEmail<'a> { } pub fn process(&self, matches: &ArgMatches) -> Result<(), anyhow::Error> { - let client = Client::new(matches)?; + let client = Client::init(matches)?; let eml_formatter = EmlFormatter::new(matches)?; println!("Sending email to {} receivers ...", self.emails.len()); diff --git a/src/email_builder/email.rs b/src/email_builder/email.rs index be32e3c..9da661f 100644 --- a/src/email_builder/email.rs +++ b/src/email_builder/email.rs @@ -16,8 +16,8 @@ pub struct Email<'a> { impl<'a> Email<'a> { pub fn build(matches: &'a ArgMatches) -> Result { - let sender = Sender::new(matches)?; - let receiver = Receiver::new(matches)?; + let sender = Sender::init(matches)?; + let receiver = Receiver::init(matches)?; let message = Message::build(matches)?; let mime_format = MimeFormat::new(matches, sender, receiver, &message)?; let email = Email::new(sender, receiver, &message, &mime_format)?; diff --git a/src/email_builder/message/message.rs b/src/email_builder/message/message.rs deleted file mode 100644 index 1319f57..0000000 --- a/src/email_builder/message/message.rs +++ /dev/null @@ -1,122 +0,0 @@ -use super::{MessageTemplate, Reader}; -use crate::{arg, data_loader::TabularData}; -use anyhow::{anyhow, Result}; -use clap::ArgMatches; -use polars::prelude::DataFrame; - -#[derive(Debug, Clone)] -pub struct Message { - pub subject: String, - pub text: Option, - pub html: Option, -} - -impl Message { - pub fn build(matches: &ArgMatches) -> Result { - let message = if matches.is_present(arg::SUBJECT) && matches.is_present(arg::CONTENT) { - Message::from_cmd(matches)? - } else if matches.is_present(arg::MESSAGE_FILE) { - Message::from_template(matches)? - } else if matches.is_present(arg::SUBJECT) - && (matches.is_present(arg::TEXT_FILE) || matches.is_present(arg::HTML_FILE)) - { - Message::from_file(matches)? - } else { - return Err(anyhow!( - "Missing arguments. Please provide {} and {} or {}", - arg::SUBJECT, - arg::CONTENT, - arg::MESSAGE_FILE, - )); - }; - - Ok(message) - } - - pub fn from_file(matches: &ArgMatches) -> Result { - let subject = Message::subject(matches)?.to_string(); - let text = Reader::read_txt(matches)?; - let html = Reader::read_html(matches)?; - let message = Message::new(subject, text, html); - Ok(message) - } - - pub fn from_template(matches: &ArgMatches) -> Result { - let message_template = MessageTemplate::read(matches)?; - let message = Message::new( - message_template.subject, - message_template.text, - message_template.html, - ); - Ok(message) - } - - pub fn from_cmd(matches: &ArgMatches) -> Result { - match ( - matches.value_of(arg::SUBJECT), - matches.value_of(arg::CONTENT), - ) { - (Some(subject), Some(content)) => { - let message = Message::new(subject, Some(content), None); - Ok(message) - } - (Some(_), None) => Err(anyhow!("Missing value for argument '{}'", arg::CONTENT)), - (None, Some(_)) => Err(anyhow!("Missing value for argument '{}'", arg::SUBJECT)), - (None, None) => Err(anyhow!( - "Missing values for '{}' and '{}'", - arg::SUBJECT, - arg::CONTENT - )), - } - } - - pub fn personalize( - &mut self, - index: usize, - df_receiver: &DataFrame, - columns: &[&str], - ) -> Result<(), anyhow::Error> { - for &col_name in columns.iter() { - let col_value = TabularData::row(index, col_name, df_receiver)?; - self.replace(col_name, col_value); - } - - Ok(()) - } - - fn replace(&mut self, col_name: &str, col_value: &str) { - self.subject = self - .subject - .replace(&format!("{{{}}}", col_name), col_value); - self.text = self - .text - .as_ref() - .map(|text| text.replace(&format!("{{{}}}", col_name), col_value)); - self.html = self - .html - .as_ref() - .map(|html| html.replace(&format!("{{{}}}", col_name), col_value)); - } - - fn subject<'a>(matches: &'a ArgMatches) -> Result<&'a str, anyhow::Error> { - if matches.is_present(arg::SUBJECT) { - match matches.value_of(arg::SUBJECT) { - Some(subject) => Ok(subject), - None => Err(anyhow!("Missing value for argument '{}'", arg::SUBJECT)), - } - } else { - Err(anyhow!("Missing argument '{}'", arg::SUBJECT)) - } - } - - fn new(subject: S, text: Option, html: Option) -> Self - where - S: Into, - { - Self { - subject: subject.into(), - text: text.map(|text| text.into()), - html: html.map(|text| text.into()), - } - } -} diff --git a/src/email_builder/message/mod.rs b/src/email_builder/message/mod.rs index 37ebe64..e243adb 100644 --- a/src/email_builder/message/mod.rs +++ b/src/email_builder/message/mod.rs @@ -1,7 +1,125 @@ -mod message; mod message_template; mod reader; -pub use message::Message; -pub use message_template::MessageTemplate; -pub use reader::Reader; +pub use self::{message_template::MessageTemplate, reader::Reader}; +use crate::{arg, data_loader::TabularData}; +use anyhow::{anyhow, Result}; +use clap::ArgMatches; +use polars::prelude::DataFrame; + +#[derive(Debug, Clone)] +pub struct Message { + pub subject: String, + pub text: Option, + pub html: Option, +} + +impl Message { + pub fn build(matches: &ArgMatches) -> Result { + let message = if matches.is_present(arg::SUBJECT) && matches.is_present(arg::CONTENT) { + Message::from_cmd(matches)? + } else if matches.is_present(arg::MESSAGE_FILE) { + Message::from_template(matches)? + } else if matches.is_present(arg::SUBJECT) + && (matches.is_present(arg::TEXT_FILE) || matches.is_present(arg::HTML_FILE)) + { + Message::from_file(matches)? + } else { + return Err(anyhow!( + "Missing arguments. Please provide {} and {} or {}", + arg::SUBJECT, + arg::CONTENT, + arg::MESSAGE_FILE, + )); + }; + + Ok(message) + } + + pub fn from_file(matches: &ArgMatches) -> Result { + let subject = Message::subject(matches)?.to_string(); + let text = Reader::read_txt(matches)?; + let html = Reader::read_html(matches)?; + let message = Message::new(subject, text, html); + Ok(message) + } + + pub fn from_template(matches: &ArgMatches) -> Result { + let message_template = MessageTemplate::read(matches)?; + let message = Message::new( + message_template.subject, + message_template.text, + message_template.html, + ); + Ok(message) + } + + pub fn from_cmd(matches: &ArgMatches) -> Result { + match ( + matches.value_of(arg::SUBJECT), + matches.value_of(arg::CONTENT), + ) { + (Some(subject), Some(content)) => { + let message = Message::new(subject, Some(content), None); + Ok(message) + } + (Some(_), None) => Err(anyhow!("Missing value for argument '{}'", arg::CONTENT)), + (None, Some(_)) => Err(anyhow!("Missing value for argument '{}'", arg::SUBJECT)), + (None, None) => Err(anyhow!( + "Missing values for '{}' and '{}'", + arg::SUBJECT, + arg::CONTENT + )), + } + } + + pub fn personalize( + &mut self, + index: usize, + df_receiver: &DataFrame, + columns: &[&str], + ) -> Result<(), anyhow::Error> { + for &col_name in columns.iter() { + let col_value = TabularData::row(index, col_name, df_receiver)?; + self.replace(col_name, col_value); + } + + Ok(()) + } + + fn replace(&mut self, col_name: &str, col_value: &str) { + self.subject = self + .subject + .replace(&format!("{{{}}}", col_name), col_value); + self.text = self + .text + .as_ref() + .map(|text| text.replace(&format!("{{{}}}", col_name), col_value)); + self.html = self + .html + .as_ref() + .map(|html| html.replace(&format!("{{{}}}", col_name), col_value)); + } + + fn subject<'a>(matches: &'a ArgMatches) -> Result<&'a str, anyhow::Error> { + if matches.is_present(arg::SUBJECT) { + match matches.value_of(arg::SUBJECT) { + Some(subject) => Ok(subject), + None => Err(anyhow!("Missing value for argument '{}'", arg::SUBJECT)), + } + } else { + Err(anyhow!("Missing argument '{}'", arg::SUBJECT)) + } + } + + fn new(subject: S, text: Option, html: Option) -> Self + where + S: Into, + { + Self { + subject: subject.into(), + text: text.map(|text| text.into()), + html: html.map(|text| text.into()), + } + } +} diff --git a/src/email_builder/message/reader.rs b/src/email_builder/message/reader.rs index fbf53be..96915c0 100644 --- a/src/email_builder/message/reader.rs +++ b/src/email_builder/message/reader.rs @@ -1,8 +1,7 @@ -use std::{fs, path::Path}; - use crate::arg; use anyhow::anyhow; use clap::ArgMatches; +use std::{fs, path::Path}; #[derive(Debug)] pub struct Reader; diff --git a/src/email_builder/mod.rs b/src/email_builder/mod.rs index 4a250df..5d6945c 100644 --- a/src/email_builder/mod.rs +++ b/src/email_builder/mod.rs @@ -7,7 +7,7 @@ mod sender; pub use bulk_email::BulkEmail; pub use email::Email; -pub use message::{Message, MessageTemplate, Reader}; +pub use message::{Message, MessageTemplate}; pub use mime::MimeFormat; pub use receiver::Receiver; pub use sender::Sender; diff --git a/src/email_builder/receiver.rs b/src/email_builder/receiver.rs index 58234c6..46085ce 100644 --- a/src/email_builder/receiver.rs +++ b/src/email_builder/receiver.rs @@ -6,7 +6,7 @@ use polars::prelude::DataFrame; pub struct Receiver; impl Receiver { - pub fn new<'a>(matches: &'a ArgMatches) -> Result<&'a str, anyhow::Error> { + pub fn init<'a>(matches: &'a ArgMatches) -> Result<&'a str, anyhow::Error> { if matches.is_present(arg::RECEIVER) { match matches.value_of(arg::RECEIVER) { Some(receiver) => Ok(receiver), diff --git a/src/email_builder/sender.rs b/src/email_builder/sender.rs index 8f4ae67..b92a7dc 100644 --- a/src/email_builder/sender.rs +++ b/src/email_builder/sender.rs @@ -1,12 +1,11 @@ +use crate::arg; use anyhow::anyhow; use clap::ArgMatches; -use crate::arg; - pub struct Sender; impl Sender { - pub fn new<'a>(matches: &'a ArgMatches) -> Result<&'a str, anyhow::Error> { + pub fn init<'a>(matches: &'a ArgMatches) -> Result<&'a str, anyhow::Error> { if matches.is_present(arg::SENDER) { match matches.value_of(arg::SENDER) { Some(sender) => Ok(sender), diff --git a/src/email_transmission/client.rs b/src/email_transmission/client.rs index 96efa97..72a22a8 100644 --- a/src/email_transmission/client.rs +++ b/src/email_transmission/client.rs @@ -18,7 +18,7 @@ pub trait SendEmail<'a> { pub struct Client; impl Client { - pub fn new<'a>(matches: &ArgMatches) -> Result>, anyhow::Error> { + pub fn init<'a>(matches: &ArgMatches) -> Result>, anyhow::Error> { if matches.is_present(arg::CONNECTION) { match matches.value_of(arg::CONNECTION) { Some(connection) => match connection.to_lowercase().as_str() { diff --git a/src/email_transmission/status.rs b/src/email_transmission/status.rs index 33db63a..2c0cdd8 100644 --- a/src/email_transmission/status.rs +++ b/src/email_transmission/status.rs @@ -1,6 +1,5 @@ -use std::fmt; - use crate::helper::{format_green, format_red}; +use std::fmt; #[derive(Debug, Clone)] pub enum Status { diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..2c46d3a --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,57 @@ +pub mod arg; +pub mod cmd; +mod data_loader; +mod data_sources; +mod email_builder; +mod email_formatter; +mod email_provider; +mod email_transmission; +mod helper; + +use clap::{crate_name, crate_version, App, SubCommand}; + +pub fn app() -> App<'static, 'static> { + App::new(crate_name!()) + .version(crate_version!()) + .arg( + clap::Arg::with_name(arg::VERBOSE) + .long(arg::VERBOSE) + .takes_value(false) + .help("Shows what is going on"), + ) + .subcommand( + SubCommand::with_name(cmd::INIT) + .about("Create template files in current directory") + .args(&cmd::init_args()), + ) + .subcommand( + SubCommand::with_name(cmd::CONNECT) + .about("Check connection to SMTP server or email provider") + .args(&cmd::connect_args()), + ) + .subcommand( + SubCommand::with_name(cmd::QUERY) + .about("Query database and display results in terminal (select statements only)") + .args(&cmd::query_args()), + ) + .subcommand( + SubCommand::with_name(cmd::SIMPLE_QUERY) + .about("Simple query using the simple query protocol") + .args(&cmd::simple_query_args()), + ) + .subcommand( + SubCommand::with_name(cmd::READ) + .about("Read csv file and display results in terminal") + .args(&cmd::read_args()), + ) + .subcommand( + SubCommand::with_name(cmd::SEND) + .about("Send email to single recipient") + .args(&cmd::send_args()), + ) + .subcommand( + SubCommand::with_name(cmd::SEND_BULK) + .about("Send email to multiple recipients") + .args(&cmd::send_bulk_args()), + ) +} diff --git a/src/main.rs b/src/main.rs index f3362db..f5683cb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,18 +1,5 @@ -#![feature(generic_associated_types)] - -mod arg; -mod cmd; -mod data_loader; -mod data_sources; -mod email_builder; -mod email_formatter; -mod email_provider; -mod email_transmission; -mod helper; - use anyhow::anyhow; -use clap::{crate_name, crate_version, App, SubCommand}; -use std::env; +use pigeon_rs::{app, arg, cmd}; fn main() -> Result<(), anyhow::Error> { let app = app(); @@ -33,49 +20,3 @@ fn main() -> Result<(), anyhow::Error> { (_, _) => Err(anyhow!("Subcommand not found")), } } - -pub fn app() -> App<'static, 'static> { - App::new(crate_name!()) - .version(crate_version!()) - .arg( - clap::Arg::with_name(arg::VERBOSE) - .long(arg::VERBOSE) - .takes_value(false) - .help("Shows what is going on"), - ) - .subcommand( - SubCommand::with_name(cmd::INIT) - .about("Create template files in current directory") - .args(&cmd::init_args()), - ) - .subcommand( - SubCommand::with_name(cmd::CONNECT) - .about("Check connection to SMTP server or email provider") - .args(&cmd::connect_args()), - ) - .subcommand( - SubCommand::with_name(cmd::QUERY) - .about("Query database and display results in terminal (select statements only)") - .args(&cmd::query_args()), - ) - .subcommand( - SubCommand::with_name(cmd::SIMPLE_QUERY) - .about("Simple query using the simple query protocol") - .args(&cmd::simple_query_args()), - ) - .subcommand( - SubCommand::with_name(cmd::READ) - .about("Read csv file and display results in terminal") - .args(&cmd::read_args()), - ) - .subcommand( - SubCommand::with_name(cmd::SEND) - .about("Send email to single recipient") - .args(&cmd::send_args()), - ) - .subcommand( - SubCommand::with_name(cmd::SEND_BULK) - .about("Send email to multiple recipients") - .args(&cmd::send_bulk_args()), - ) -}