diff --git a/Cargo.lock b/Cargo.lock index c9dd78bd..e45f5168 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "addr2line" version = "0.19.0" @@ -17,12 +27,86 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + +[[package]] +name = "alphanumeric-sort" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81149050d254e2b758c80dcf55949e5c45482e0c9cb3670b1c4b48eb51791f8e" + +[[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 = "anes" version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" +[[package]] +name = "ansi-str" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84252a7e1a0df81706ce70bbad85ed1e4916448a4093ccd52dd98c6a44a477cd" +dependencies = [ + "ansitok", +] + +[[package]] +name = "ansi-str" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b1ed1c166829a0ccb5d79caa0f75cb4abd4adb2ce2c096755b7ad5ffdb0990" +dependencies = [ + "ansitok", +] + +[[package]] +name = "ansitok" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "220044e6a1bb31ddee4e3db724d29767f352de47445a6cd75e1a173142136c83" +dependencies = [ + "nom", + "vte", +] + [[package]] name = "anstream" version = "0.3.0" @@ -72,6 +156,18 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" + [[package]] name = "atty" version = "0.2.14" @@ -80,7 +176,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -97,13 +193,25 @@ checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ "addr2line", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", - "miniz_oxide", + "miniz_oxide 0.6.2", "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.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" + [[package]] name = "basic-toml" version = "0.1.1" @@ -113,18 +221,130 @@ dependencies = [ "serde", ] +[[package]] +name = "bindgen" +version = "0.59.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "brownstone" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5839ee4f953e811bfdcf223f509cb2c6a3e1447959b0bff459405575bc17f22" +dependencies = [ + "arrayvec 0.7.2", +] + +[[package]] +name = "bstr" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +dependencies = [ + "lazy_static", + "memchr", + "regex-automata", +] + [[package]] name = "bumpalo" version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" +[[package]] +name = "byte-unit" +version = "4.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da78b32057b8fdfc352504708feeba7216dcd65a2c9ab02978cbd288d1279b6c" +dependencies = [ + "serde", + "utf8-width", +] + +[[package]] +name = "bytecount" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" + +[[package]] +name = "byteorder" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" + +[[package]] +name = "bytesize" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38fcc2979eff34a4b84e1cf9a1e3da42a7d44b3b690a40cdcb23e3d556cfb2e5" + +[[package]] +name = "calamine" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6381d1037ee9b8a6c8eb97936add0331a1aabd148d5b6f35f1cda6e5dec44f40" +dependencies = [ + "byteorder", + "codepage", + "encoding_rs", + "log", + "quick-xml 0.25.0", + "serde", + "zip", +] + +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + [[package]] name = "cast" version = "0.3.0" @@ -133,9 +353,24 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" @@ -143,6 +378,54 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-integer", + "num-traits", + "pure-rust-locales", + "serde", + "time 0.1.45", + "wasm-bindgen", + "winapi 0.3.9", +] + +[[package]] +name = "chrono-humanize" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32dce1ea1988dbdf9f9815ff11425828523bd2a134ec0805d2ac8af26ee6096e" +dependencies = [ + "chrono", +] + +[[package]] +name = "chrono-tz" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9cc2b23599e6d7479755f3594285efb3f74a1bdca7a7374948bc831e23a552" +dependencies = [ + "chrono", + "chrono-tz-build", + "phf", +] + +[[package]] +name = "chrono-tz-build" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9998fb9f7e9b2111641485bf8beb32f92945f97f92a3d061f744cfef335f751" +dependencies = [ + "parse-zoneinfo", + "phf", + "phf_codegen", +] + [[package]] name = "ciborium" version = "0.2.0" @@ -170,6 +453,17 @@ dependencies = [ "half", ] +[[package]] +name = "clang-sys" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "clap" version = "3.2.22" @@ -225,7 +519,7 @@ dependencies = [ "snapbox", "static_assertions", "strsim", - "terminal_size", + "terminal_size 0.2.3", "trybuild", "trycmd", "unic-emoji-char", @@ -256,6 +550,21 @@ dependencies = [ "snapbox", ] +[[package]] +name = "clap_complete_nushell" +version = "0.1.11" +dependencies = [ + "clap 4.3.0", + "clap_complete", + "nu-cli", + "nu-command", + "nu-parser", + "nu-protocol", + "nu-test-support", + "reedline", + "snapbox", +] + [[package]] name = "clap_derive" version = "4.3.0" @@ -263,7 +572,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.16", ] [[package]] @@ -288,6 +597,15 @@ dependencies = [ "snapbox", ] +[[package]] +name = "codepage" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b0e9222c0cdf2c6ac27d73f664f9520266fa911c3106329d359f8861cb8bde9" +dependencies = [ + "encoding_rs", +] + [[package]] name = "color-print" version = "0.3.4" @@ -315,6 +633,73 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + +[[package]] +name = "const_format" +version = "0.2.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7309d9b4d3d2c0641e018d449232f2e28f1b22933c137f157d3dbc14228b8c0e" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f47bf7270cf70d370f8f98c1abb6d2d4cf60a6845d30e05bfb90c6568650" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" + +[[package]] +name = "cpufeatures" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if 1.0.0", +] + [[package]] name = "criterion" version = "0.4.0" @@ -357,7 +742,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", ] @@ -367,7 +752,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", ] @@ -379,7 +764,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" dependencies = [ "autocfg", - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", "memoffset", "scopeguard", @@ -391,7 +776,133 @@ version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "crossterm" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab9f7409c70a38a56216480fba371ee460207dd8926ccf5b4160591759559170" +dependencies = [ + "bitflags", + "crossterm_winapi", + "libc", + "mio 0.8.6", + "parking_lot", + "serde", + "signal-hook", + "signal-hook-mio", + "winapi 0.3.9", +] + +[[package]] +name = "crossterm" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +dependencies = [ + "bitflags", + "crossterm_winapi", + "libc", + "mio 0.8.6", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi 0.3.9", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +dependencies = [ + "winapi 0.3.9", +] + +[[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 = "csv" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b015497079b9a9d69c02ad25de6c0a6edef051ea6360a327d0bd05802ef64ad" +dependencies = [ + "csv-core", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "csv-core" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +dependencies = [ + "memchr", +] + +[[package]] +name = "dialoguer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +dependencies = [ + "console", + "shell-words", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + +[[package]] +name = "dtparse" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd3b6a23c50eb90a80bdb748042620328617e76276b99dc5c97906e47f807c3" +dependencies = [ + "chrono", + "lazy_static", + "num-traits", + "rust_decimal", ] [[package]] @@ -400,6 +911,30 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + +[[package]] +name = "encoding_rs" +version = "0.8.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "erased-serde" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" +dependencies = [ + "serde", +] + [[package]] name = "errno" version = "0.2.8" @@ -408,7 +943,18 @@ checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "winapi 0.3.9", +] + +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", ] [[package]] @@ -433,6 +979,203 @@ dependencies = [ "serde_json", ] +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fancy-regex" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" +dependencies = [ + "bit-set", + "regex", +] + +[[package]] +name = "fastrand" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +dependencies = [ + "instant", +] + +[[package]] +name = "fd-lock" +version = "3.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ae6b3d9530211fb3b12a95374b8b0823be812f53d09e18c5675c0146b09642" +dependencies = [ + "cfg-if 1.0.0", + "rustix 0.37.7", + "windows-sys 0.48.0", +] + +[[package]] +name = "filesize" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12d741e2415d4e2e5bd1c1d00409d1a8865a57892c2d689b504365655d237d43" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "filetime" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", +] + +[[package]] +name = "flate2" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +dependencies = [ + "crc32fast", + "miniz_oxide 0.7.1", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "fsevent" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" +dependencies = [ + "bitflags", + "fsevent-sys", +] + +[[package]] +name = "fsevent-sys" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" +dependencies = [ + "libc", +] + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + +[[package]] +name = "fuzzy-matcher" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" +dependencies = [ + "thread_local", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getset" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ghost" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77ac7b51b8e6313251737fcef4b1c01a2ea102bde68415b62c0ee9268fec357" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + [[package]] name = "gimli" version = "0.27.2" @@ -451,11 +1194,42 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" +[[package]] +name = "hamcrest2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f837c62de05dc9cc71ff6486cd85de8856a330395ae338a04bfcefe5e91075" +dependencies = [ + "num", + "regex", +] + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.6", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] + +[[package]] +name = "hashlink" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0761a1b9491c4f2e3d66aa0f62d0fba0af9a0e2852e4d48ea506632a4b56e6aa" +dependencies = [ + "hashbrown 0.13.2", +] [[package]] name = "heck" @@ -478,6 +1252,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "htmlescape" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9025058dae765dee5070ec375f591e2ba14638c63feff74f13805a72e523163" + [[package]] name = "humantime" version = "2.1.0" @@ -494,6 +1280,45 @@ dependencies = [ "serde", ] +[[package]] +name = "iana-time-zone" +version = "0.1.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows 0.48.0", +] + +[[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 = "indent_write" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cfe9645a18782869361d9c8732246be7b410ad4e919d3609ebabdac00ba12c3" + [[package]] name = "indexmap" version = "1.9.1" @@ -501,7 +1326,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indicatif" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" +dependencies = [ + "console", + "number_prefix", + "portable-atomic 0.3.20", + "unicode-width", +] + +[[package]] +name = "inotify" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f" +dependencies = [ + "bitflags", + "inotify-sys", + "libc", +] + +[[package]] +name = "inotify-sys" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +dependencies = [ + "libc", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "inventory" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0539b5de9241582ce6bd6b0ba7399313560151e58c9aaf8b74b711b1bdce644" +dependencies = [ + "ghost", ] [[package]] @@ -514,6 +1390,34 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", +] + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-root" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04a4202a60e86f1c9702706bb42270dadd333f2db7810157563c86f17af3c873" +dependencies = [ + "users 0.10.0", + "winapi 0.3.9", +] + [[package]] name = "is-terminal" version = "0.4.4" @@ -522,17 +1426,39 @@ checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix", + "rustix 0.36.4", "windows-sys 0.45.0", ] +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "is_ci" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" + +[[package]] +name = "is_debug" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06d198e9919d9822d5f7083ba8530e04de87841eaf21ead9af8f2304efd57c89" + [[package]] name = "is_executable" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -550,6 +1476,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +[[package]] +name = "joinery" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72167d68f5fce3b8655487b8038691a3c9984ee769590f93f2a631f4ad64e4f5" + [[package]] name = "js-sys" version = "0.3.60" @@ -559,6 +1491,26 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "json_to_table" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0be33515faeb3773f550c80fd7a889148164e58f7e3cf36467718c8ce71ee55" +dependencies = [ + "serde_json", + "tabled", +] + +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -566,10 +1518,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "libc" -version = "0.2.137" +name = "lazycell" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.144" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if 1.0.0", + "winapi 0.3.9", +] + +[[package]] +name = "libproc" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b799ad155d75ce914c467ee5627b62247c20d4aedbd446f821484cebf3cded7" +dependencies = [ + "bindgen", + "errno 0.2.8", + "libc", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29f835d03d717946d28b1d1ed632eb6f0e24a299388ee623d0c23118d3e8a7fa" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" +dependencies = [ + "serde", +] [[package]] name = "linux-raw-sys" @@ -577,13 +1576,65 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "lock_api" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +dependencies = [ + "autocfg", + "scopeguard", +] + [[package]] name = "log" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "lru" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03f1160296536f10c833a82dca22267d5486734230d47bf00bf435885814ba1e" +dependencies = [ + "hashbrown 0.13.2", +] + +[[package]] +name = "lscolors" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "074bff749d092e2e818fe954952102f88e21f67fc69f4d350621aab15a1810f1" +dependencies = [ + "crossterm 0.24.0", +] + +[[package]] +name = "mach2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d0d1830bcd151a6fc4aea1369af235b36c1528fe976b8ff678683c9995eade8" +dependencies = [ + "libc", +] + +[[package]] +name = "md-5" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" +dependencies = [ + "digest", ] [[package]] @@ -601,6 +1652,52 @@ dependencies = [ "autocfg", ] +[[package]] +name = "miette" +version = "5.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a236ff270093b0b67451bc50a509bd1bad302cb1d3c7d37d5efe931238581fa9" +dependencies = [ + "is-terminal", + "miette-derive", + "once_cell", + "owo-colors", + "supports-color", + "supports-hyperlinks", + "supports-unicode", + "terminal_size 0.1.17", + "textwrap", + "thiserror", + "unicode-width", +] + +[[package]] +name = "miette-derive" +version = "5.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4901771e1d44ddb37964565c654a3223ba41a594d02b8da471cc4464912b5cfa" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +dependencies = [ + "mime", + "unicase", +] + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -616,6 +1713,111 @@ dependencies = [ "adler", ] +[[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.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + +[[package]] +name = "mio" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.45.0", +] + +[[package]] +name = "mio-extras" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" +dependencies = [ + "lazycell", + "log", + "mio 0.6.23", + "slab", +] + +[[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "net2" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + +[[package]] +name = "nix" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "libc", + "static_assertions", +] + [[package]] name = "nom" version = "7.1.3" @@ -626,12 +1828,487 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nom-supreme" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bd3ae6c901f1959588759ff51c95d24b491ecb9ff91aa9c2ef4acc5b1dcab27" +dependencies = [ + "brownstone", + "indent_write", + "joinery", + "memchr", + "nom", +] + [[package]] name = "normalize-line-endings" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[package]] +name = "notify" +version = "4.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257" +dependencies = [ + "bitflags", + "filetime", + "fsevent", + "fsevent-sys", + "inotify", + "libc", + "mio 0.6.23", + "mio-extras", + "walkdir", + "winapi 0.3.9", +] + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi 0.3.9", +] + +[[package]] +name = "nu-ansi-term" +version = "0.47.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df031e117bca634c262e9bd3173776844b6c17a90b3741c9163663b4385af76" +dependencies = [ + "windows-sys 0.45.0", +] + +[[package]] +name = "nu-cli" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cffe8719471bd96d0bb5344fd4dd017f7c1b4d641e9fc6ecfffef9d71f60c9" +dependencies = [ + "atty", + "chrono", + "crossterm 0.24.0", + "fancy-regex", + "fuzzy-matcher", + "is_executable", + "log", + "miette", + "nu-ansi-term", + "nu-color-config", + "nu-command", + "nu-engine", + "nu-parser", + "nu-path", + "nu-protocol", + "nu-utils", + "once_cell", + "percent-encoding", + "reedline", + "sysinfo", + "thiserror", +] + +[[package]] +name = "nu-cmd-lang" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6eec691eb8821f99234806c5ab881863a8ce47b8e89fc46c23bc8893fce75d" +dependencies = [ + "fancy-regex", + "itertools", + "log", + "nu-ansi-term", + "nu-color-config", + "nu-engine", + "nu-parser", + "nu-protocol", + "nu-utils", + "shadow-rs", + "unicode-segmentation", +] + +[[package]] +name = "nu-color-config" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eef0e449ddafc4d7b18867f3df7408cfc631cc1781a4281ee4fbd260cfb0b3ec" +dependencies = [ + "nu-ansi-term", + "nu-engine", + "nu-json", + "nu-protocol", + "nu-utils", + "serde", + "tabled", +] + +[[package]] +name = "nu-command" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f32978a010714c09f17b5771f6a3e09f20b95542e9d534b33a7a9175949c2d94" +dependencies = [ + "Inflector", + "alphanumeric-sort", + "atty", + "base64 0.21.1", + "byteorder", + "bytesize", + "calamine", + "chrono", + "chrono-humanize", + "chrono-tz", + "crossterm 0.24.0", + "csv", + "dialoguer", + "digest", + "dtparse", + "encoding_rs", + "fancy-regex", + "filesize", + "filetime", + "fs_extra", + "htmlescape", + "indexmap", + "indicatif", + "is-root", + "itertools", + "libc", + "log", + "lscolors", + "md-5", + "miette", + "mime", + "mime_guess", + "native-tls", + "notify", + "nu-ansi-term", + "nu-cmd-lang", + "nu-color-config", + "nu-engine", + "nu-explore", + "nu-glob", + "nu-json", + "nu-parser", + "nu-path", + "nu-pretty-hex", + "nu-protocol", + "nu-system", + "nu-table", + "nu-term-grid", + "nu-utils", + "num-format", + "num-traits", + "once_cell", + "open", + "pathdiff", + "percent-encoding", + "powierza-coefficient", + "print-positions", + "quick-xml 0.28.2", + "rand", + "rayon", + "reedline", + "regex", + "roxmltree", + "rust-embed", + "same-file", + "serde", + "serde_urlencoded", + "serde_yaml", + "sha2", + "sysinfo", + "tabled", + "terminal_size 0.2.3", + "thiserror", + "titlecase", + "toml", + "umask", + "unicode-segmentation", + "unicode-width", + "ureq", + "url", + "users 0.11.0", + "uuid", + "wax", + "windows 0.46.0", + "winreg", +] + +[[package]] +name = "nu-engine" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7af56e52a8441aa115a841fd6eaf9817c967a7abb0a22719d10ef1da6eba7ca" +dependencies = [ + "chrono", + "nu-glob", + "nu-path", + "nu-protocol", + "nu-utils", + "serde", + "sysinfo", +] + +[[package]] +name = "nu-explore" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "081b4c8d6e85da523b9335dcc102df07d358d6432f8605161fdcf1bac096febe" +dependencies = [ + "ansi-str 0.7.2", + "crossterm 0.24.0", + "lscolors", + "nu-ansi-term", + "nu-color-config", + "nu-engine", + "nu-json", + "nu-parser", + "nu-protocol", + "nu-table", + "nu-utils", + "strip-ansi-escapes", + "terminal_size 0.2.3", + "tui", +] + +[[package]] +name = "nu-glob" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fb9c6da8c268b2930707b08eb7c05edc65b0bc26e4ce84b5cdb72c339871fd2" + +[[package]] +name = "nu-json" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef79b70f46902c1f60696193d66abe75578fe36bcdaa0603061fb202409703da" +dependencies = [ + "linked-hash-map", + "num-traits", + "serde", +] + +[[package]] +name = "nu-parser" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0a5661fdaaeb2ddce2d77e95c629745c07ff4b52fc7e9ad6313de5558c5519c" +dependencies = [ + "bytesize", + "chrono", + "itertools", + "log", + "miette", + "nu-engine", + "nu-path", + "nu-protocol", + "serde_json", + "thiserror", +] + +[[package]] +name = "nu-path" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe10a7394c41c76617751569715ec1832c228a38033b5813c3b598170bbbb566" +dependencies = [ + "dirs-next", + "omnipath", + "pwd", +] + +[[package]] +name = "nu-pretty-hex" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4d585442339ad020f3c98c35fe5ba3e0fb0adc9c0392e20b96ec57bc08e9add" +dependencies = [ + "nu-ansi-term", +] + +[[package]] +name = "nu-protocol" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6eb37d8e0fa28c68085a5433b17e829f9c57e9913b3a48fca89e36114eb2ee5" +dependencies = [ + "byte-unit", + "chrono", + "chrono-humanize", + "fancy-regex", + "indexmap", + "lru", + "miette", + "nu-utils", + "num-format", + "serde", + "serde_json", + "strum", + "strum_macros", + "sys-locale", + "thiserror", + "typetag", +] + +[[package]] +name = "nu-system" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c80dcf784009e4bfac921c4a85d1fe73d097cef2ea89e6463aaac3834765b53" +dependencies = [ + "atty", + "chrono", + "errno 0.3.1", + "libc", + "libproc", + "log", + "mach2", + "nix", + "ntapi", + "once_cell", + "procfs", + "winapi 0.3.9", +] + +[[package]] +name = "nu-table" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc81741f8c8162457187cd8fa6810bb5fb0ccae95739ffb2ca81469c4ea495d6" +dependencies = [ + "json_to_table", + "nu-ansi-term", + "nu-color-config", + "nu-engine", + "nu-protocol", + "nu-utils", + "serde_json", + "tabled", +] + +[[package]] +name = "nu-term-grid" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f32956ba4002381ff7c4f26e59b01c252f0fcad4644bf963452027670e7b9a" +dependencies = [ + "nu-utils", + "unicode-width", +] + +[[package]] +name = "nu-test-support" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9dd2843f1c7af775be57e9398aa850aeafcb8e6dac2b4e7dc92c51fdfcf808" +dependencies = [ + "getset", + "hamcrest2", + "nu-glob", + "nu-path", + "nu-utils", + "num-format", + "tempfile", + "which", +] + +[[package]] +name = "nu-utils" +version = "0.78.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5709820706108dad4593ca67073e77f82817d5c6b0555be77556146079709a3a" +dependencies = [ + "crossterm_winapi", + "log", + "lscolors", + "num-format", + "strip-ansi-escapes", + "sys-locale", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec 0.7.2", + "itoa", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.15" @@ -651,6 +2328,21 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" version = "0.30.3" @@ -661,10 +2353,16 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.16.0" +name = "omnipath" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" +checksum = "80adb31078122c880307e9cdfd4e3361e6545c319f9b9dcafcb03acd3b51a575" + +[[package]] +name = "once_cell" +version = "1.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" [[package]] name = "oorandom" @@ -673,13 +2371,67 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] -name = "os_pipe" -version = "1.1.1" +name = "open" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dceb7e43f59c35ee1548045b2c72945a5a3bb6ce6d6f07cdc13dc8f6bc4930a" +checksum = "d16814a067484415fda653868c9be0ac5f2abd2ef5d951082a5f2fe1b3662944" +dependencies = [ + "is-wsl", + "pathdiff", +] + +[[package]] +name = "openssl" +version = "0.10.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "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.16", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "os_pipe" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -688,12 +2440,119 @@ version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "papergrid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1526bb6aa9f10ec339fb10360f22c57edf81d5678d0278e93bc12a47ffbe4b01" +dependencies = [ + "ansi-str 0.5.0", + "ansitok", + "bytecount", + "fnv", + "unicode-width", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "windows-sys 0.45.0", +] + +[[package]] +name = "parse-zoneinfo" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" +dependencies = [ + "regex", +] + [[package]] name = "pathdiff" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "phf" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56ac890c5e3ca598bbdeaa99964edb5b0258a583a9eb6ef4e89fc85d9224770" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_shared" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + [[package]] name = "plotters" version = "0.3.4" @@ -723,14 +2582,133 @@ dependencies = [ ] [[package]] -name = "proc-macro2" -version = "1.0.53" +name = "pori" +version = "0.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba466839c78239c09faf015484e5cc04860f88242cff4d03eb038f04b4699b73" +checksum = "a4a63d338dec139f56dacc692ca63ad35a6be6a797442479b55acd611d79e906" +dependencies = [ + "nom", +] + +[[package]] +name = "portable-atomic" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e" +dependencies = [ + "portable-atomic 1.3.2", +] + +[[package]] +name = "portable-atomic" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc59d1bcc64fc5d021d67521f818db868368028108d37f0e98d74e33f68297b5" + +[[package]] +name = "powierza-coefficient" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04123079750026568dff0e68efe1ca676f6686023f3bf7686b87dab661c0375b" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "print-positions" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df593470e3ef502e48cb0cfc9a3a61e5f61e967b78e1ed35a67ac615cfbd208" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "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.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" dependencies = [ "unicode-ident", ] +[[package]] +name = "procfs" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "943ca7f9f29bab5844ecd8fdb3992c5969b6622bb9609b9502fef9b4310e3f1f" +dependencies = [ + "bitflags", + "byteorder", + "chrono", + "flate2", + "hex", + "lazy_static", + "rustix 0.36.4", +] + +[[package]] +name = "pure-rust-locales" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45c49fc4f91f35bae654f85ebb3a44d60ac64f11b3166ffa609def390c732d8" + +[[package]] +name = "pwd" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c71c0c79b9701efe4e1e4b563b2016dd4ee789eb99badcb09d61ac4b92e4a2" +dependencies = [ + "libc", + "thiserror", +] + +[[package]] +name = "quick-xml" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58e21a144a0ffb5fad7b464babcdab934a325ad69b7c0373bcfef5cbd9799ca9" +dependencies = [ + "encoding_rs", + "memchr", +] + +[[package]] +name = "quick-xml" +version = "0.28.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +dependencies = [ + "memchr", +] + [[package]] name = "quote" version = "1.0.26" @@ -741,22 +2719,50 @@ dependencies = [ ] [[package]] -name = "rayon" -version = "1.5.3" +name = "rand" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -765,19 +2771,78 @@ dependencies = [ ] [[package]] -name = "regex" -version = "1.6.0" +name = "redox_syscall" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +dependencies = [ + "getrandom", + "redox_syscall 0.2.16", + "thiserror", +] + +[[package]] +name = "reedline" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9be1b4ddfacccf35ea8b4a8d3f7ec9e494ea22969c4156d4b2a393c1b9cef" +dependencies = [ + "chrono", + "crossterm 0.24.0", + "fd-lock", + "itertools", + "nu-ansi-term", + "rusqlite", + "serde", + "serde_json", + "strip-ansi-escapes", + "strum", + "strum_macros", + "thiserror", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "regex" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" +dependencies = [ + "aho-corasick", + "memchr", "regex-syntax", ] [[package]] -name = "regex-syntax" -version = "0.6.27" +name = "regex-automata" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + +[[package]] +name = "regex-syntax" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "roff" @@ -785,12 +2850,85 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" +[[package]] +name = "roxmltree" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f595a457b6b8c6cda66a48503e92ee8d19342f905948f29c383200ec9eb1d8" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "rusqlite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" +dependencies = [ + "bitflags", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rust-embed" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b68543d5527e158213414a92832d2aab11a84d2571a5eb021ebe22c43aab066" +dependencies = [ + "rust-embed-impl", + "rust-embed-utils", + "walkdir", +] + +[[package]] +name = "rust-embed-impl" +version = "6.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" +dependencies = [ + "proc-macro2", + "quote", + "rust-embed-utils", + "syn 1.0.109", + "walkdir", +] + +[[package]] +name = "rust-embed-utils" +version = "7.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" +dependencies = [ + "sha2", + "walkdir", +] + +[[package]] +name = "rust_decimal" +version = "1.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26bd36b60561ee1fb5ec2817f198b6fd09fa571c897a5e86d1487cfc2b096dfc" +dependencies = [ + "arrayvec 0.7.2", + "num-traits", +] + [[package]] name = "rustc-demangle" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustix" version = "0.36.4" @@ -798,13 +2936,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb93e85278e08bb5788653183213d3a60fc242b10cb9be96586f5a73dcb67c23" dependencies = [ "bitflags", - "errno", + "errno 0.2.8", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.3", "windows-sys 0.42.0", ] +[[package]] +name = "rustix" +version = "0.37.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" +dependencies = [ + "bitflags", + "errno 0.3.1", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.45.0", +] + [[package]] name = "rustversion" version = "1.0.12" @@ -826,12 +2978,44 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "schannel" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +dependencies = [ + "windows-sys 0.42.0", +] + [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "security-framework" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "serde" version = "1.0.158" @@ -849,7 +3033,7 @@ checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.8", + "syn 2.0.16", ] [[package]] @@ -865,25 +3049,135 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_yaml" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + +[[package]] +name = "shadow-rs" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427f07ab5f873000cf55324882e12a88c0a7ea7025df4fc1e7e35e688877a583" +dependencies = [ + "const_format", + "is_debug", + "time 0.3.20", +] + +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + [[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.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +dependencies = [ + "libc", + "mio 0.8.6", + "signal-hook", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + [[package]] name = "similar" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62ac7f900db32bf3fd12e0117dd3dc4da74bc52ebaac97f39668446d89694803" +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + +[[package]] +name = "slab" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" + +[[package]] +name = "smawk" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" + [[package]] name = "snapbox" version = "0.4.11" @@ -917,12 +3211,68 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strip-ansi-escapes" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "011cbb39cf7c1f62871aea3cc46e5817b0937b49e9447370c93cacbe93a766d8" +dependencies = [ + "vte", +] + [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "supports-color" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4950e7174bffabe99455511c39707310e7e9b440364a2fcb1cc21521be57b354" +dependencies = [ + "is-terminal", + "is_ci", +] + +[[package]] +name = "supports-hyperlinks" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d" +dependencies = [ + "is-terminal", +] + +[[package]] +name = "supports-unicode" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b6c2cb240ab5dd21ed4906895ee23fe5a48acdbd15a3ce388e7b62a9b66baf7" +dependencies = [ + "is-terminal", +] + [[package]] name = "syn" version = "1.0.109" @@ -936,15 +3286,81 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.8" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc02725fd69ab9f26eab07fad303e2497fad6fb9eba4f96c4d1687bdf704ad9" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sys-locale" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" +dependencies = [ + "js-sys", + "libc", + "wasm-bindgen", + "web-sys", + "windows-sys 0.45.0", +] + +[[package]] +name = "sysinfo" +version = "0.28.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c2f3ca6693feb29a89724516f016488e9aafc7f37264f898593ee4b942f31b" +dependencies = [ + "cfg-if 1.0.0", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "rayon", + "winapi 0.3.9", +] + +[[package]] +name = "tabled" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c3ee73732ffceaea7b8f6b719ce3bb17f253fa27461ffeaf568ebd0cdb4b85" +dependencies = [ + "ansi-str 0.5.0", + "papergrid", + "tabled_derive", + "unicode-width", +] + +[[package]] +name = "tabled_derive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beca1b4eaceb4f2755df858b88d9b9315b7ccfd1ffd0d7a48a52602301f01a57" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "tempfile" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +dependencies = [ + "cfg-if 1.0.0", + "fastrand", + "redox_syscall 0.3.5", + "rustix 0.37.7", + "windows-sys 0.45.0", +] + [[package]] name = "termcolor" version = "1.1.3" @@ -954,13 +3370,23 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "terminal_size" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907" dependencies = [ - "rustix", + "rustix 0.36.4", "windows-sys 0.42.0", ] @@ -969,6 +3395,81 @@ name = "textwrap" version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] + +[[package]] +name = "thiserror" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", +] + +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi 0.3.9", +] + +[[package]] +name = "time" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +dependencies = [ + "itoa", + "libc", + "num_threads", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +dependencies = [ + "time-core", +] [[package]] name = "tinytemplate" @@ -981,19 +3482,57 @@ dependencies = [ ] [[package]] -name = "toml_datetime" -version = "0.6.1" +name = "tinyvec" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "titlecase" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38397a8cdb017cfeb48bf6c154d6de975ac69ffeed35980fde199d2ee0842042" +dependencies = [ + "joinery", + "lazy_static", + "regex", +] + +[[package]] +name = "toml" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.4" +version = "0.19.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825" +checksum = "92d964908cec0d030b812013af25a0e57fddfadb1e066ecc6681d86253129d4f" dependencies = [ "indexmap", "serde", @@ -1033,6 +3572,58 @@ dependencies = [ "toml_edit", ] +[[package]] +name = "tui" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" +dependencies = [ + "bitflags", + "cassowary", + "crossterm 0.25.0", + "unicode-segmentation", + "unicode-width", +] + +[[package]] +name = "typenum" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" + +[[package]] +name = "typetag" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6898cc6f6a32698cc3e14d5632a14d2b23ed9f7b11e6b8e05ce685990acc22" +dependencies = [ + "erased-serde", + "inventory", + "once_cell", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3e1c30cedd24fc597f7d37a721efdbdc2b1acae012c1ef1218f4c7c2c0f3e7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "umask" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec9a46c2549e35c054e0ffe281a3a6ec0007793db4df106604d37ed3f4d73d1c" +dependencies = [ + "thiserror", +] + [[package]] name = "unic-char-property" version = "0.9.0" @@ -1083,6 +3674,12 @@ dependencies = [ "version_check", ] +[[package]] +name = "unicode-bidi" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" + [[package]] name = "unicode-ident" version = "1.0.8" @@ -1090,10 +3687,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] -name = "unicode-width" -version = "0.1.9" +name = "unicode-linebreak" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" +dependencies = [ + "hashbrown 0.12.3", + "regex", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unicode-xid" @@ -1101,18 +3723,114 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +[[package]] +name = "unsafe-libyaml" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" + +[[package]] +name = "ureq" +version = "2.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" +dependencies = [ + "base64 0.13.1", + "encoding_rs", + "flate2", + "log", + "native-tls", + "once_cell", + "serde", + "serde_json", + "url", +] + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "users" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4227e95324a443c9fcb06e03d4d85e91aabe9a5a02aa818688b6918b6af486" +dependencies = [ + "libc", + "log", +] + +[[package]] +name = "users" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032" +dependencies = [ + "libc", + "log", +] + +[[package]] +name = "utf8-width" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" + [[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "uuid" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +dependencies = [ + "getrandom", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vte" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cbce692ab4ca2f1f3047fcf732430249c0e971bfdd2b234cf2c47ad93af5983" +dependencies = [ + "arrayvec 0.5.2", + "utf8parse", + "vte_generate_state_changes", +] + +[[package]] +name = "vte_generate_state_changes" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d257817081c7dffcdbab24b9e62d2def62e2ff7d00b1c20062551e6cccc145ff" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "wait-timeout" version = "0.2.0" @@ -1129,17 +3847,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", - "winapi", + "winapi 0.3.9", "winapi-util", ] +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + [[package]] name = "wasm-bindgen" version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] @@ -1187,6 +3917,24 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +[[package]] +name = "wax" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c7a3bac6110ac062b7b422a442b7ee23e07209e2784a036654cab1e71bbafc" +dependencies = [ + "bstr", + "const_format", + "itertools", + "nom", + "nom-supreme", + "pori", + "regex", + "smallvec", + "thiserror", + "walkdir", +] + [[package]] name = "web-sys" version = "0.3.60" @@ -1197,6 +3945,23 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "which" +version = "4.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +dependencies = [ + "either", + "libc", + "once_cell", +] + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -1207,6 +3972,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -1219,7 +3990,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1228,19 +3999,37 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1249,7 +4038,7 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets 0.42.1", + "windows-targets 0.42.2", ] [[package]] @@ -1263,17 +4052,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1293,9 +4082,9 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" @@ -1305,9 +4094,9 @@ checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -1317,9 +4106,9 @@ checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -1329,9 +4118,9 @@ checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -1341,9 +4130,9 @@ checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -1353,9 +4142,9 @@ checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" @@ -1365,9 +4154,9 @@ checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -1377,9 +4166,47 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.3.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf09497b8f8b5ac5d3bb4d05c0a99be20f26fd3d5f2db7b0716e946d5103658" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" dependencies = [ "memchr", ] + +[[package]] +name = "winreg" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a1a57ff50e9b408431e8f97d5456f2807f8eb2a2cd79b06068fc87f8ecf189" +dependencies = [ + "cfg-if 1.0.0", + "winapi 0.3.9", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + +[[package]] +name = "xmlparser" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d25c75bf9ea12c4040a97f829154768bbbce366287e2dc044af160cd79a13fd" + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "byteorder", + "crc32fast", + "crossbeam-utils", + "flate2", +] diff --git a/Cargo.toml b/Cargo.toml index 0fe1d854..3817c3d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ members = [ "clap_lex", "clap_complete", "clap_complete_fig", + "clap_complete_nushell", "clap_mangen", ] diff --git a/clap_complete_nushell/CHANGELOG.md b/clap_complete_nushell/CHANGELOG.md new file mode 100644 index 00000000..c1d40985 --- /dev/null +++ b/clap_complete_nushell/CHANGELOG.md @@ -0,0 +1,11 @@ +# Change Log +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + + +## [Unreleased] - ReleaseDate + + +[Unreleased]: https://github.com/clap-rs/clap/compare/bd163098e122bb65e053a61b773931c8f36d2e7d...HEAD diff --git a/clap_complete_nushell/Cargo.toml b/clap_complete_nushell/Cargo.toml new file mode 100644 index 00000000..fb934b43 --- /dev/null +++ b/clap_complete_nushell/Cargo.toml @@ -0,0 +1,45 @@ +[package] +name = "clap_complete_nushell" +version = "0.1.11" +description = "A generator library used with clap for Nushell completion scripts" +repository = "https://github.com/clap-rs/clap/tree/master/clap_complete_nushell" +categories = ["command-line-interface"] +keywords = [ + "clap", + "cli", + "completion", + "nushell" +] +license.workspace = true +edition.workspace = true +rust-version.workspace = true +include.workspace = true + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[package.metadata.release] +pre-release-replacements = [ + {file="CHANGELOG.md", search="Unreleased", replace="{{version}}", min=1}, + {file="CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", exactly=1}, + {file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}", min=1}, + {file="CHANGELOG.md", search="", replace="\n## [Unreleased] - ReleaseDate\n", exactly=1}, + {file="CHANGELOG.md", search="", replace="\n[Unreleased]: https://github.com/clap-rs/clap/compare/{{tag_name}}...HEAD", exactly=1}, +] + +[lib] +bench = false + +[dependencies] +clap = { path = "../", version = "4.0.0", default-features = false, features = ["std"] } +clap_complete = { path = "../clap_complete", version = "4.0.0" } + +[dev-dependencies] +snapbox = { version = "0.4.10", features = ["diff"] } +clap = { path = "../", version = "4.0.0", default-features = false, features = ["std", "help"] } +nu-cli = "0.78.0" +nu-command = "0.78.0" +nu-parser = "0.78.0" +nu-protocol = "0.78.0" +nu-test-support = "0.78.0" +reedline = "0.18.0" diff --git a/clap_complete_nushell/LICENSE-APACHE b/clap_complete_nushell/LICENSE-APACHE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/clap_complete_nushell/LICENSE-APACHE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clap_complete_nushell/LICENSE-MIT b/clap_complete_nushell/LICENSE-MIT new file mode 100644 index 00000000..a82d5276 --- /dev/null +++ b/clap_complete_nushell/LICENSE-MIT @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 nibon7 and Clap Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/clap_complete_nushell/README.md b/clap_complete_nushell/README.md new file mode 100644 index 00000000..cdf88fe5 --- /dev/null +++ b/clap_complete_nushell/README.md @@ -0,0 +1,114 @@ +# clap_complete_nushell + +Generates [Nushell](https://github.com/nushell/nushell) completions for [`clap`](https://github.com/clap-rs/clap) based CLIs + +[![Crates.io](https://img.shields.io/crates/v/clap_complete_nushell)](https://crates.io/crates/clap_complete_nushell) +[![Crates.io](https://img.shields.io/crates/d/clap_complete_nushell)](https://crates.io/crates/clap_complete_nushell) +[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE-APACHE) +[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE-MIT) +[![docs.rs](https://img.shields.io/docsrs/clap_complete_nushell)](https://docs.rs/clap_complete_nushell) + +- [Questions & Discussions](https://github.com/clap-rs/clap/discussions) +- [CONTRIBUTING](../CONTRIBUTING.md) + +## Examples + +### myapp.rs + +```rust +use clap::{builder::PossibleValue, Arg, ArgAction, Command, ValueHint}; +use clap_complete::generate; +use clap_complete_nushell::Nushell; +use std::io; + +fn main() { + let mut cmd = Command::new("myapp") + .version("3.0") + .propagate_version(true) + .about("Tests completions") + .arg( + Arg::new("file") + .value_hint(ValueHint::FilePath) + .help("some input file"), + ) + .arg( + Arg::new("config") + .action(ArgAction::Count) + .help("some config file") + .short('c') + .visible_short_alias('C') + .long("config") + .visible_alias("conf"), + ) + .arg(Arg::new("choice").value_parser(["first", "second"])) + .subcommand( + Command::new("test").about("tests things").arg( + Arg::new("case") + .long("case") + .action(ArgAction::Set) + .help("the case to test"), + ), + ) + .subcommand( + Command::new("some_cmd") + .about("top level subcommand") + .subcommand( + Command::new("sub_cmd").about("sub-subcommand").arg( + Arg::new("config") + .long("config") + .action(ArgAction::Set) + .value_parser([PossibleValue::new("Lest quotes aren't escaped.")]) + .help("the other case to test"), + ), + ), + ); + + generate(Nushell, &mut cmd, "myapp", &mut io::stdout()); +} + +``` + +### myapp.nu + +```nu +module completions { + + def "nu-complete myapp choice" [] { + [ "first" "second" ] + } + + # Tests completions + export extern myapp [ + file?: string # some input file + --config(-c) # some config file + --conf # some config file + -C # some config file + choice?: string@"nu-complete myapp choice" + --version(-V) # Print version + ] + + # tests things + export extern "myapp test" [ + --case: string # the case to test + --version(-V) # Print version + ] + + # top level subcommand + export extern "myapp some_cmd" [ + --version(-V) # Print version + ] + + def "nu-complete myapp some_cmd sub_cmd config" [] { + [ "\"Lest quotes aren't escaped.\"" ] + } + + # sub-subcommand + export extern "myapp some_cmd sub_cmd" [ + --config: string@"nu-complete myapp some_cmd sub_cmd config" # the other case to test + --version(-V) # Print version + ] + +} + +use completions * +``` diff --git a/clap_complete_nushell/examples/nushell_completion.rs b/clap_complete_nushell/examples/nushell_completion.rs new file mode 100644 index 00000000..e63f9314 --- /dev/null +++ b/clap_complete_nushell/examples/nushell_completion.rs @@ -0,0 +1,12 @@ +use clap::Command; +use clap_complete::generate; +use clap_complete_nushell::Nushell; +use std::io; + +fn main() { + let mut cmd = Command::new("myapp") + .subcommand(Command::new("test").subcommand(Command::new("config"))) + .subcommand(Command::new("hello")); + + generate(Nushell, &mut cmd, "myapp", &mut io::stdout()); +} diff --git a/clap_complete_nushell/examples/sub_subcommands.rs b/clap_complete_nushell/examples/sub_subcommands.rs new file mode 100644 index 00000000..e09b7a46 --- /dev/null +++ b/clap_complete_nushell/examples/sub_subcommands.rs @@ -0,0 +1,49 @@ +use clap::{builder::PossibleValue, Arg, ArgAction, Command, ValueHint}; +use clap_complete::generate; +use clap_complete_nushell::Nushell; +use std::io; + +fn main() { + let mut cmd = Command::new("myapp") + .version("3.0") + .propagate_version(true) + .about("Tests completions") + .arg( + Arg::new("file") + .value_hint(ValueHint::FilePath) + .help("some input file"), + ) + .arg( + Arg::new("config") + .action(ArgAction::Count) + .help("some config file") + .short('c') + .visible_short_alias('C') + .long("config") + .visible_alias("conf"), + ) + .arg(Arg::new("choice").value_parser(["first", "second"])) + .subcommand( + Command::new("test").about("tests things").arg( + Arg::new("case") + .long("case") + .action(ArgAction::Set) + .help("the case to test"), + ), + ) + .subcommand( + Command::new("some_cmd") + .about("top level subcommand") + .subcommand( + Command::new("sub_cmd").about("sub-subcommand").arg( + Arg::new("config") + .long("config") + .action(ArgAction::Set) + .value_parser([PossibleValue::new("Lest quotes aren't escaped.")]) + .help("the other case to test"), + ), + ), + ); + + generate(Nushell, &mut cmd, "myapp", &mut io::stdout()); +} diff --git a/clap_complete_nushell/src/lib.rs b/clap_complete_nushell/src/lib.rs new file mode 100644 index 00000000..3ec12887 --- /dev/null +++ b/clap_complete_nushell/src/lib.rs @@ -0,0 +1,203 @@ +//! Generates [Nushell](https://github.com/nushell/nushell) completions for [`clap`](https://github.com/clap-rs/clap) based CLIs +//! +//! ## Example +//! +//! ``` +//! use clap::Command; +//! use clap_complete::generate; +//! use clap_complete_nushell::Nushell; +//! use std::io; +//! +//! let mut cmd = Command::new("myapp") +//! .subcommand(Command::new("test").subcommand(Command::new("config"))) +//! .subcommand(Command::new("hello")); +//! +//! generate(Nushell, &mut cmd, "myapp", &mut io::stdout()); +//! ``` + +#![doc(html_logo_url = "https://raw.githubusercontent.com/clap-rs/clap/master/assets/clap.png")] +#![warn(missing_docs, trivial_casts, unused_allocation, trivial_numeric_casts)] +#![forbid(unsafe_code)] + +use clap::{builder::PossibleValue, Arg, ArgAction, Command}; +use clap_complete::Generator; + +/// Generate Nushell complete file +pub struct Nushell; + +impl Generator for Nushell { + fn file_name(&self, name: &str) -> String { + format!("{name}.nu") + } + + fn generate(&self, cmd: &Command, buf: &mut dyn std::io::Write) { + let mut completions = String::new(); + + completions.push_str("module completions {\n\n"); + + generate_completion(&mut completions, cmd, false); + + for sub in cmd.get_subcommands() { + generate_completion(&mut completions, sub, true); + } + + completions.push_str("}\n\n"); + completions.push_str("use completions *\n"); + + buf.write_all(completions.as_bytes()) + .expect("Failed to write to generated file") + } +} + +fn append_value_completion_and_help( + arg: &Arg, + name: &str, + possible_values: &Vec, + s: &mut String, +) { + let takes_values = arg + .get_num_args() + .map(|r| r.takes_values()) + .unwrap_or(false); + + if takes_values { + s.push_str(": string"); + + if !possible_values.is_empty() { + s.push_str(format!(r#"@"nu-complete {} {}""#, name, arg.get_id()).as_str()) + } + } + + if let Some(help) = arg.get_help() { + let indent: usize = 30; + let width = match s.lines().last() { + Some(line) => indent.saturating_sub(line.len()), + None => 0, + }; + + s.push_str(format!("{:>width$}# {}", ' ', help).as_str()); + } + + s.push('\n'); +} + +fn append_value_completion_defs(arg: &Arg, name: &str, s: &mut String) { + let possible_values = arg.get_possible_values(); + if possible_values.is_empty() { + return; + } + + s.push_str(format!(r#" def "nu-complete {} {}" [] {{"#, name, arg.get_id()).as_str()); + s.push_str("\n ["); + + for value in possible_values { + let vname = value.get_name(); + if vname.contains(|c: char| c.is_whitespace()) { + s.push_str(format!(r#" "\"{vname}\"""#).as_str()); + } else { + s.push_str(format!(r#" "{vname}""#).as_str()); + } + } + + s.push_str(" ]\n }\n\n"); +} + +fn append_argument(arg: &Arg, name: &str, s: &mut String) { + let possible_values = arg.get_possible_values(); + + if arg.is_positional() { + // rest arguments + if matches!(arg.get_action(), ArgAction::Append) { + s.push_str(format!(" ...{}", arg.get_id()).as_str()); + } else { + s.push_str(format!(" {}", arg.get_id()).as_str()); + + if !arg.is_required_set() { + s.push('?'); + } + } + + append_value_completion_and_help(arg, name, &possible_values, s); + + return; + } + + let shorts = arg.get_short_and_visible_aliases(); + let longs = arg.get_long_and_visible_aliases(); + + match shorts { + Some(shorts) => match longs { + Some(longs) => { + // short options and long options + s.push_str( + format!( + " --{}(-{})", + longs.first().expect("At least one long option expected"), + shorts.first().expect("At lease one short option expected") + ) + .as_str(), + ); + append_value_completion_and_help(arg, name, &possible_values, s); + + // long alias + for long in longs.iter().skip(1) { + s.push_str(format!(" --{long}").as_str()); + append_value_completion_and_help(arg, name, &possible_values, s); + } + + // short alias + for short in shorts.iter().skip(1) { + s.push_str(format!(" -{short}").as_str()); + append_value_completion_and_help(arg, name, &possible_values, s); + } + } + None => { + // short options only + for short in shorts { + s.push_str(format!(" -{short}").as_str()); + append_value_completion_and_help(arg, name, &possible_values, s); + } + } + }, + None => match longs { + Some(longs) => { + // long options only + for long in longs { + s.push_str(format!(" --{long}").as_str()); + append_value_completion_and_help(arg, name, &possible_values, s); + } + } + None => unreachable!("No short or long options found"), + }, + } +} + +fn generate_completion(completions: &mut String, cmd: &Command, is_subcommand: bool) { + let name = cmd.get_bin_name().expect("Failed to get bin name"); + + for arg in cmd.get_arguments() { + append_value_completion_defs(arg, name, completions); + } + + if let Some(about) = cmd.get_about() { + completions.push_str(format!(" # {about}\n").as_str()); + } + + if is_subcommand { + completions.push_str(format!(" export extern \"{name}\" [\n").as_str()); + } else { + completions.push_str(format!(" export extern {name} [\n").as_str()); + } + + for arg in cmd.get_arguments() { + append_argument(arg, name, completions); + } + + completions.push_str(" ]\n\n"); + + if is_subcommand { + for sub in cmd.get_subcommands() { + generate_completion(completions, sub, true); + } + } +} diff --git a/clap_complete_nushell/tests/common.rs b/clap_complete_nushell/tests/common.rs new file mode 100644 index 00000000..e96323e6 --- /dev/null +++ b/clap_complete_nushell/tests/common.rs @@ -0,0 +1,257 @@ +use clap::{builder::PossibleValue, Arg, ArgAction, Command, ValueHint}; + +pub fn basic_command(name: &'static str) -> Command { + Command::new(name) + .arg( + Arg::new("config") + .short('c') + .global(true) + .action(ArgAction::SetTrue), + ) + .arg( + Arg::new("v") + .short('v') + .conflicts_with("config") + .action(ArgAction::SetTrue), + ) + .subcommand( + Command::new("test") + .about("Subcommand") + .arg(Arg::new("debug").short('d').action(ArgAction::Count)), + ) +} + +pub fn feature_sample_command(name: &'static str) -> Command { + Command::new(name) + .version("3.0") + .propagate_version(true) + .about("Tests completions") + .arg( + Arg::new("file") + .value_hint(ValueHint::FilePath) + .help("some input file"), + ) + .arg( + Arg::new("config") + .action(ArgAction::Count) + .help("some config file") + .short('c') + .visible_short_alias('C') + .long("config") + .visible_alias("conf"), + ) + .arg(Arg::new("choice").value_parser(["first", "second"])) + .subcommand( + Command::new("test").about("tests things").arg( + Arg::new("case") + .long("case") + .action(ArgAction::Set) + .help("the case to test"), + ), + ) +} + +pub fn special_commands_command(name: &'static str) -> Command { + feature_sample_command(name) + .subcommand( + Command::new("some_cmd") + .about("tests other things") + .arg( + Arg::new("config") + .long("config") + .hide(true) + .action(ArgAction::Set) + .require_equals(true) + .help("the other case to test"), + ) + .arg(Arg::new("path").num_args(1..)), + ) + .subcommand(Command::new("some-cmd-with-hyphens").alias("hyphen")) + .subcommand(Command::new("some-hidden-cmd").hide(true)) +} + +pub fn quoting_command(name: &'static str) -> Command { + Command::new(name) + .version("3.0") + .arg( + Arg::new("single-quotes") + .long("single-quotes") + .action(ArgAction::SetTrue) + .help("Can be 'always', 'auto', or 'never'"), + ) + .arg( + Arg::new("double-quotes") + .long("double-quotes") + .action(ArgAction::SetTrue) + .help("Can be \"always\", \"auto\", or \"never\""), + ) + .arg( + Arg::new("backticks") + .long("backticks") + .action(ArgAction::SetTrue) + .help("For more information see `echo test`"), + ) + .arg( + Arg::new("backslash") + .long("backslash") + .action(ArgAction::SetTrue) + .help("Avoid '\\n'"), + ) + .arg( + Arg::new("brackets") + .long("brackets") + .action(ArgAction::SetTrue) + .help("List packages [filter]"), + ) + .arg( + Arg::new("expansions") + .long("expansions") + .action(ArgAction::SetTrue) + .help("Execute the shell command with $SHELL"), + ) + .subcommands([ + Command::new("cmd-single-quotes").about("Can be 'always', 'auto', or 'never'"), + Command::new("cmd-double-quotes").about("Can be \"always\", \"auto\", or \"never\""), + Command::new("cmd-backticks").about("For more information see `echo test`"), + Command::new("cmd-backslash").about("Avoid '\\n'"), + Command::new("cmd-brackets").about("List packages [filter]"), + Command::new("cmd-expansions").about("Execute the shell command with $SHELL"), + ]) +} + +pub fn aliases_command(name: &'static str) -> Command { + Command::new(name) + .version("3.0") + .about("testing nushell completions") + .arg( + Arg::new("flag") + .short('f') + .visible_short_alias('F') + .long("flag") + .action(ArgAction::SetTrue) + .visible_alias("flg") + .help("cmd flag"), + ) + .arg( + Arg::new("option") + .short('o') + .visible_short_alias('O') + .long("option") + .visible_alias("opt") + .help("cmd option") + .action(ArgAction::Set), + ) + .arg(Arg::new("positional")) +} + +pub fn sub_subcommands_command(name: &'static str) -> Command { + feature_sample_command(name).subcommand( + Command::new("some_cmd") + .about("top level subcommand") + .visible_alias("some_cmd_alias") + .subcommand( + Command::new("sub_cmd").about("sub-subcommand").arg( + Arg::new("config") + .long("config") + .action(ArgAction::Set) + .value_parser([ + PossibleValue::new("Lest quotes, aren't escaped.") + .help("help,with,comma"), + PossibleValue::new("Second to trigger display of options"), + ]) + .help("the other case to test"), + ), + ), + ) +} + +pub fn value_hint_command(name: &'static str) -> Command { + Command::new(name) + .arg( + Arg::new("choice") + .long("choice") + .action(ArgAction::Set) + .value_parser(["bash", "fish", "zsh"]), + ) + .arg( + Arg::new("unknown") + .long("unknown") + .value_hint(ValueHint::Unknown), + ) + .arg(Arg::new("other").long("other").value_hint(ValueHint::Other)) + .arg( + Arg::new("path") + .long("path") + .short('p') + .value_hint(ValueHint::AnyPath), + ) + .arg( + Arg::new("file") + .long("file") + .short('f') + .value_hint(ValueHint::FilePath), + ) + .arg( + Arg::new("dir") + .long("dir") + .short('d') + .value_hint(ValueHint::DirPath), + ) + .arg( + Arg::new("exe") + .long("exe") + .short('e') + .value_hint(ValueHint::ExecutablePath), + ) + .arg( + Arg::new("cmd_name") + .long("cmd-name") + .value_hint(ValueHint::CommandName), + ) + .arg( + Arg::new("cmd") + .long("cmd") + .short('c') + .value_hint(ValueHint::CommandString), + ) + .arg( + Arg::new("command_with_args") + .action(ArgAction::Set) + .num_args(1..) + .trailing_var_arg(true) + .value_hint(ValueHint::CommandWithArguments), + ) + .arg( + Arg::new("user") + .short('u') + .long("user") + .value_hint(ValueHint::Username), + ) + .arg( + Arg::new("host") + .short('H') + .long("host") + .value_hint(ValueHint::Hostname), + ) + .arg(Arg::new("url").long("url").value_hint(ValueHint::Url)) + .arg( + Arg::new("email") + .long("email") + .value_hint(ValueHint::EmailAddress), + ) +} + +pub fn assert_matches_path( + expected_path: impl AsRef, + gen: impl clap_complete::Generator, + mut cmd: Command, + name: &'static str, +) { + let mut buf = vec![]; + clap_complete::generate(gen, &mut cmd, name, &mut buf); + + snapbox::Assert::new() + .action_env("SNAPSHOTS") + .normalize_paths(false) + .matches_path(expected_path, buf); +} diff --git a/clap_complete_nushell/tests/completion.rs b/clap_complete_nushell/tests/completion.rs new file mode 100644 index 00000000..d377180d --- /dev/null +++ b/clap_complete_nushell/tests/completion.rs @@ -0,0 +1,326 @@ +use std::fs::File; +use std::io::Read; +use std::path::Path; +use std::path::PathBuf; +use std::sync::Arc; + +use nu_cli::NuCompleter; +use nu_command::create_default_context; +use nu_parser::parse; +use nu_protocol::{ + engine::{EngineState, Stack, StateWorkingSet}, + Value, +}; + +use reedline::{Completer as _, Suggestion}; + +// creates a new engine with the current path into the completions fixtures folder +fn new_engine() -> (PathBuf, EngineState, Stack) { + // Target folder inside assets + let mut dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests"); + dir.push("snapshots"); + + let mut dir_str = dir + .clone() + .into_os_string() + .into_string() + .unwrap_or_default(); + dir_str.push(std::path::MAIN_SEPARATOR); + + // Create a new engine with default context + let mut engine_state = create_default_context(); + + // New stack + let mut stack = Stack::new(); + + // Add pwd as env var + stack.add_env_var( + "PWD".to_string(), + Value::String { + val: dir_str.clone(), + span: nu_protocol::Span::new(0, dir_str.len()), + }, + ); + + #[cfg(windows)] + stack.add_env_var( + "Path".to_string(), + Value::String { + val: "c:\\some\\path;c:\\some\\other\\path".to_string(), + span: nu_protocol::Span::new(0, dir_str.len()), + }, + ); + + #[cfg(not(windows))] + stack.add_env_var( + "PATH".to_string(), + Value::String { + val: "/some/path:/some/other/path".to_string(), + span: nu_protocol::Span::new(0, dir_str.len()), + }, + ); + + // Merge environment into the permanent state + let merge_result = engine_state.merge_env(&mut stack, &dir); + assert!(merge_result.is_ok(), "{}", merge_result.unwrap_err()); + + (dir, engine_state, stack) +} + +fn external_completion(file_name: &str) -> NuCompleter { + // Create a new engine + let (dir, mut engine_state, mut stack) = new_engine(); + + let path = dir.join(file_name); + let mut buf = Vec::new(); + let mut file = + File::open(&path).unwrap_or_else(|_| panic!("Failed to open {}", path.display())); + file.read_to_end(&mut buf) + .unwrap_or_else(|_| panic!("Failed to open {}", path.display())); + + let (_, delta) = { + let mut working_set = StateWorkingSet::new(&engine_state); + let (block, err) = parse(&mut working_set, None, &buf, false, &[]); + assert!(err.is_none(), "{:?}", err.unwrap()); + + (block, working_set.render()) + }; + + assert!(engine_state.merge_delta(delta).is_ok()); + + // Merge environment into the permanent state + assert!(engine_state.merge_env(&mut stack, &dir).is_ok()); + + let latest_block_id = engine_state.num_blocks() - 1; + + // Change config adding the external completer + let mut config = engine_state.get_config().clone(); + config.external_completer = Some(latest_block_id); + engine_state.set_config(&config); + + // Instantiate a new completer + NuCompleter::new(Arc::new(engine_state), stack) +} + +// match a list of suggestions with the expected values +#[track_caller] +fn assert_suggestions(expected: &[&str], suggestions: Vec) { + let expected = expected + .iter() + .map(|s| (*s).to_owned()) + .collect::>(); + let suggestions = suggestions + .into_iter() + .map(|s| s.value) + .collect::>(); + assert_eq!(expected, suggestions); +} + +#[test] +fn completion_basic() { + let mut completer = external_completion("basic.nu"); + + let input = "my-app -"; + let suggestions = completer.complete(input, input.len()); + let expected = &["--help", "-c", "-h", "-v"]; + assert_suggestions(expected, suggestions); + + let input = "my-app test -"; + let suggestions = completer.complete(input, input.len()); + let expected = &["--help", "-c", "-d", "-h"]; + assert_suggestions(expected, suggestions); +} + +#[test] +fn completion_feature_sample() { + let mut completer = external_completion("feature_sample.nu"); + + let input = "my-app test --"; + let suggestions = completer.complete(input, input.len()); + let expected = &["--case", "--help", "--version"]; + assert_suggestions(expected, suggestions); + + let input = "my-app choice "; + let suggestions = completer.complete(input, input.len()); + let expected = &["first", "second"]; + assert_suggestions(expected, suggestions); + + let input = "my-app -"; + let suggestions = completer.complete(input, input.len()); + let expected = &[ + "--conf", + "--config", + "--help", + "--version", + "-C", + "-V", + "-c", + "-h", + ]; + assert_suggestions(expected, suggestions); + + let input = "my-app --"; + let suggestions = completer.complete(input, input.len()); + let expected = &["--conf", "--config", "--help", "--version"]; + assert_suggestions(expected, suggestions); +} + +#[test] +fn completion_special_commands() { + let mut completer = external_completion("special_commands.nu"); + + let input = "my-app some"; + let suggestions = completer.complete(input, input.len()); + let expected = &[ + "my-app some_cmd", + "my-app some-hidden-cmd", + "my-app some-cmd-with-hyphens", + ]; + assert_suggestions(expected, suggestions); + + let input = "my-app choice "; + let suggestions = completer.complete(input, input.len()); + let expected = &["first", "second"]; + assert_suggestions(expected, suggestions); + + let input = "my-app -"; + let suggestions = completer.complete(input, input.len()); + let expected = &[ + "--conf", + "--config", + "--help", + "--version", + "-C", + "-V", + "-c", + "-h", + ]; + assert_suggestions(expected, suggestions); + + let input = "my-app --"; + let suggestions = completer.complete(input, input.len()); + let expected = &["--conf", "--config", "--help", "--version"]; + assert_suggestions(expected, suggestions); +} + +#[test] +fn completion_quoting() { + let mut completer = external_completion("quoting.nu"); + + let input = "my-app cmd-s"; + let suggestions = completer.complete(input, input.len()); + let expected = &["my-app cmd-single-quotes"]; + assert_suggestions(expected, suggestions); + + let input = "my-app --"; + let suggestions = completer.complete(input, input.len()); + let expected = &[ + "--backslash", + "--backticks", + "--brackets", + "--double-quotes", + "--expansions", + "--help", + "--single-quotes", + "--version", + ]; + assert_suggestions(expected, suggestions); +} + +#[test] +fn completion_aliases() { + let mut completer = external_completion("aliases.nu"); + + let input = "my-app -"; + let suggestions = completer.complete(input, input.len()); + let expected = &[ + "--flag", + "--flg", + "--help", + "--opt", + "--option", + "--version", + "-F", + "-O", + "-V", + "-f", + "-h", + "-o", + ]; + assert_suggestions(expected, suggestions); +} + +#[test] +fn completion_sub_subcommands() { + let mut completer = external_completion("sub_subcommands.nu"); + + let input = "my-app"; + let mut suggestions = completer.complete(input, input.len()); + suggestions.sort_by_key(|s| s.value.clone()); + let expected = &[ + "my-app", + "my-app help", + "my-app help help", + "my-app help some_cmd", + "my-app help some_cmd sub_cmd", + "my-app help test", + "my-app some_cmd", + "my-app some_cmd help", + "my-app some_cmd help help", + "my-app some_cmd help sub_cmd", + "my-app some_cmd sub_cmd", + "my-app test", + ]; + assert_suggestions(expected, suggestions); + + let input = "my-app some_cmd sub_cmd -"; + let suggestions = completer.complete(input, input.len()); + let expected = &["--config", "--help", "--version", "-V", "-h"]; + assert_suggestions(expected, suggestions); + + let input = "my-app some_cmd sub_cmd --config "; + let suggestions = completer.complete(input, input.len()); + let expected = &[ + "\"Lest quotes, aren't escaped.\"", + "\"Second to trigger display of options\"", + ]; + assert_suggestions(expected, suggestions); +} + +#[test] +fn completion_value_hint() { + let mut completer = external_completion("value_hint.nu"); + + let input = "my-app -"; + let suggestions = completer.complete(input, input.len()); + let expected = &[ + "--choice", + "--cmd", + "--cmd-name", + "--dir", + "--email", + "--exe", + "--file", + "--help", + "--host", + "--other", + "--path", + "--unknown", + "--url", + "--user", + "-H", + "-c", + "-d", + "-e", + "-f", + "-h", + "-p", + "-u", + ]; + assert_suggestions(expected, suggestions); + + let input = "my-app --choice "; + let suggestions = completer.complete(input, input.len()); + let expected = &["bash", "fish", "zsh"]; + assert_suggestions(expected, suggestions); +} diff --git a/clap_complete_nushell/tests/nushell.rs b/clap_complete_nushell/tests/nushell.rs new file mode 100644 index 00000000..1987fd70 --- /dev/null +++ b/clap_complete_nushell/tests/nushell.rs @@ -0,0 +1,85 @@ +mod common; + +#[test] +fn basic() { + let name = "my-app"; + let cmd = common::basic_command(name); + common::assert_matches_path( + "tests/snapshots/basic.nu", + clap_complete_nushell::Nushell, + cmd, + name, + ); +} + +#[test] +fn feature_sample() { + let name = "my-app"; + let cmd = common::feature_sample_command(name); + common::assert_matches_path( + "tests/snapshots/feature_sample.nu", + clap_complete_nushell::Nushell, + cmd, + name, + ); +} + +#[test] +fn special_commands() { + let name = "my-app"; + let cmd = common::special_commands_command(name); + common::assert_matches_path( + "tests/snapshots/special_commands.nu", + clap_complete_nushell::Nushell, + cmd, + name, + ); +} + +#[test] +fn quoting() { + let name = "my-app"; + let cmd = common::quoting_command(name); + common::assert_matches_path( + "tests/snapshots/quoting.nu", + clap_complete_nushell::Nushell, + cmd, + name, + ); +} + +#[test] +fn aliases() { + let name = "my-app"; + let cmd = common::aliases_command(name); + common::assert_matches_path( + "tests/snapshots/aliases.nu", + clap_complete_nushell::Nushell, + cmd, + name, + ); +} + +#[test] +fn sub_subcommands() { + let name = "my-app"; + let cmd = common::sub_subcommands_command(name); + common::assert_matches_path( + "tests/snapshots/sub_subcommands.nu", + clap_complete_nushell::Nushell, + cmd, + name, + ); +} + +#[test] +fn value_hint() { + let name = "my-app"; + let cmd = common::value_hint_command(name); + common::assert_matches_path( + "tests/snapshots/value_hint.nu", + clap_complete_nushell::Nushell, + cmd, + name, + ); +} diff --git a/clap_complete_nushell/tests/snapshots/aliases.nu b/clap_complete_nushell/tests/snapshots/aliases.nu new file mode 100644 index 00000000..2c84770d --- /dev/null +++ b/clap_complete_nushell/tests/snapshots/aliases.nu @@ -0,0 +1,18 @@ +module completions { + + # testing nushell completions + export extern my-app [ + --flag(-f) # cmd flag + --flg # cmd flag + -F # cmd flag + --option(-o): string # cmd option + --opt: string # cmd option + -O: string # cmd option + positional?: string + --help(-h) # Print help + --version(-V) # Print version + ] + +} + +use completions * diff --git a/clap_complete_nushell/tests/snapshots/basic.nu b/clap_complete_nushell/tests/snapshots/basic.nu new file mode 100644 index 00000000..b905e5aa --- /dev/null +++ b/clap_complete_nushell/tests/snapshots/basic.nu @@ -0,0 +1,30 @@ +module completions { + + export extern my-app [ + -c + -v + --help(-h) # Print help + ] + + # Subcommand + export extern "my-app test" [ + -d + -c + --help(-h) # Print help + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help" [ + ] + + # Subcommand + export extern "my-app help test" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help help" [ + ] + +} + +use completions * diff --git a/clap_complete_nushell/tests/snapshots/feature_sample.nu b/clap_complete_nushell/tests/snapshots/feature_sample.nu new file mode 100644 index 00000000..1676a10d --- /dev/null +++ b/clap_complete_nushell/tests/snapshots/feature_sample.nu @@ -0,0 +1,39 @@ +module completions { + + def "nu-complete my-app choice" [] { + [ "first" "second" ] + } + + # Tests completions + export extern my-app [ + file?: string # some input file + --config(-c) # some config file + --conf # some config file + -C # some config file + choice?: string@"nu-complete my-app choice" + --help(-h) # Print help + --version(-V) # Print version + ] + + # tests things + export extern "my-app test" [ + --case: string # the case to test + --help(-h) # Print help + --version(-V) # Print version + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help" [ + ] + + # tests things + export extern "my-app help test" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help help" [ + ] + +} + +use completions * diff --git a/clap_complete_nushell/tests/snapshots/quoting.nu b/clap_complete_nushell/tests/snapshots/quoting.nu new file mode 100644 index 00000000..3c5e6ccc --- /dev/null +++ b/clap_complete_nushell/tests/snapshots/quoting.nu @@ -0,0 +1,78 @@ +module completions { + + export extern my-app [ + --single-quotes # Can be 'always', 'auto', or 'never' + --double-quotes # Can be "always", "auto", or "never" + --backticks # For more information see `echo test` + --backslash # Avoid '\n' + --brackets # List packages [filter] + --expansions # Execute the shell command with $SHELL + --help(-h) # Print help + --version(-V) # Print version + ] + + # Can be 'always', 'auto', or 'never' + export extern "my-app cmd-single-quotes" [ + --help(-h) # Print help + ] + + # Can be "always", "auto", or "never" + export extern "my-app cmd-double-quotes" [ + --help(-h) # Print help + ] + + # For more information see `echo test` + export extern "my-app cmd-backticks" [ + --help(-h) # Print help + ] + + # Avoid '\n' + export extern "my-app cmd-backslash" [ + --help(-h) # Print help + ] + + # List packages [filter] + export extern "my-app cmd-brackets" [ + --help(-h) # Print help + ] + + # Execute the shell command with $SHELL + export extern "my-app cmd-expansions" [ + --help(-h) # Print help + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help" [ + ] + + # Can be 'always', 'auto', or 'never' + export extern "my-app help cmd-single-quotes" [ + ] + + # Can be "always", "auto", or "never" + export extern "my-app help cmd-double-quotes" [ + ] + + # For more information see `echo test` + export extern "my-app help cmd-backticks" [ + ] + + # Avoid '\n' + export extern "my-app help cmd-backslash" [ + ] + + # List packages [filter] + export extern "my-app help cmd-brackets" [ + ] + + # Execute the shell command with $SHELL + export extern "my-app help cmd-expansions" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help help" [ + ] + +} + +use completions * diff --git a/clap_complete_nushell/tests/snapshots/special_commands.nu b/clap_complete_nushell/tests/snapshots/special_commands.nu new file mode 100644 index 00000000..3111f51c --- /dev/null +++ b/clap_complete_nushell/tests/snapshots/special_commands.nu @@ -0,0 +1,67 @@ +module completions { + + def "nu-complete my-app choice" [] { + [ "first" "second" ] + } + + # Tests completions + export extern my-app [ + file?: string # some input file + --config(-c) # some config file + --conf # some config file + -C # some config file + choice?: string@"nu-complete my-app choice" + --help(-h) # Print help + --version(-V) # Print version + ] + + # tests things + export extern "my-app test" [ + --case: string # the case to test + --help(-h) # Print help + --version(-V) # Print version + ] + + # tests other things + export extern "my-app some_cmd" [ + --config: string # the other case to test + ...path: string + --help(-h) # Print help + --version(-V) # Print version + ] + + export extern "my-app some-cmd-with-hyphens" [ + --help(-h) # Print help + --version(-V) # Print version + ] + + export extern "my-app some-hidden-cmd" [ + --help(-h) # Print help + --version(-V) # Print version + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help" [ + ] + + # tests things + export extern "my-app help test" [ + ] + + # tests other things + export extern "my-app help some_cmd" [ + ] + + export extern "my-app help some-cmd-with-hyphens" [ + ] + + export extern "my-app help some-hidden-cmd" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help help" [ + ] + +} + +use completions * diff --git a/clap_complete_nushell/tests/snapshots/sub_subcommands.nu b/clap_complete_nushell/tests/snapshots/sub_subcommands.nu new file mode 100644 index 00000000..607a9296 --- /dev/null +++ b/clap_complete_nushell/tests/snapshots/sub_subcommands.nu @@ -0,0 +1,76 @@ +module completions { + + def "nu-complete my-app choice" [] { + [ "first" "second" ] + } + + # Tests completions + export extern my-app [ + file?: string # some input file + --config(-c) # some config file + --conf # some config file + -C # some config file + choice?: string@"nu-complete my-app choice" + --help(-h) # Print help + --version(-V) # Print version + ] + + # tests things + export extern "my-app test" [ + --case: string # the case to test + --help(-h) # Print help + --version(-V) # Print version + ] + + # top level subcommand + export extern "my-app some_cmd" [ + --help(-h) # Print help + --version(-V) # Print version + ] + + def "nu-complete my-app some_cmd sub_cmd config" [] { + [ "\"Lest quotes, aren't escaped.\"" "\"Second to trigger display of options\"" ] + } + + # sub-subcommand + export extern "my-app some_cmd sub_cmd" [ + --config: string@"nu-complete my-app some_cmd sub_cmd config" # the other case to test + --help(-h) # Print help (see more with '--help') + --version(-V) # Print version + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app some_cmd help" [ + ] + + # sub-subcommand + export extern "my-app some_cmd help sub_cmd" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app some_cmd help help" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help" [ + ] + + # tests things + export extern "my-app help test" [ + ] + + # top level subcommand + export extern "my-app help some_cmd" [ + ] + + # sub-subcommand + export extern "my-app help some_cmd sub_cmd" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "my-app help help" [ + ] + +} + +use completions * diff --git a/clap_complete_nushell/tests/snapshots/value_hint.nu b/clap_complete_nushell/tests/snapshots/value_hint.nu new file mode 100644 index 00000000..82a91ae8 --- /dev/null +++ b/clap_complete_nushell/tests/snapshots/value_hint.nu @@ -0,0 +1,27 @@ +module completions { + + def "nu-complete my-app choice" [] { + [ "bash" "fish" "zsh" ] + } + + export extern my-app [ + --choice: string@"nu-complete my-app choice" + --unknown: string + --other: string + --path(-p): string + --file(-f): string + --dir(-d): string + --exe(-e): string + --cmd-name: string + --cmd(-c): string + command_with_args?: string + --user(-u): string + --host(-H): string + --url: string + --email: string + --help(-h) # Print help + ] + +} + +use completions *