nushell/crates/nu-command/Cargo.toml

167 lines
4.7 KiB
TOML
Raw Normal View History

[package]
authors = ["The Nushell Project Developers"]
description = "Nushell's built-in commands"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command"
edition = "2021"
license = "MIT"
name = "nu-command"
version = "0.75.1"
build = "build.rs"
2021-09-02 03:29:43 +02:00
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
nu-color-config = { path = "../nu-color-config", version = "0.75.1" }
nu-engine = { path = "../nu-engine", version = "0.75.1" }
nu-glob = { path = "../nu-glob", version = "0.75.1" }
nu-json = { path = "../nu-json", version = "0.75.1" }
nu-parser = { path = "../nu-parser", version = "0.75.1" }
nu-path = { path = "../nu-path", version = "0.75.1" }
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.75.1" }
nu-protocol = { path = "../nu-protocol", version = "0.75.1" }
nu-system = { path = "../nu-system", version = "0.75.1" }
nu-table = { path = "../nu-table", version = "0.75.1" }
nu-term-grid = { path = "../nu-term-grid", version = "0.75.1" }
nu-utils = { path = "../nu-utils", version = "0.75.1" }
nu-explore = { path = "../nu-explore", version = "0.75.1" }
nu-ansi-term = "0.46.0"
2022-10-10 13:25:57 +02:00
num-format = { version = "0.4.3" }
2021-09-10 03:06:44 +02:00
# Potential dependencies for extras
alphanumeric-sort = "1.4.4"
atty = "0.2.14"
base64 = "0.21.0"
byteorder = "1.4.3"
bytesize = "1.1.0"
calamine = "0.19.1"
chrono = { version = "0.4.23", features = ["unstable-locales", "std"], default-features = false }
2021-10-31 07:54:51 +01:00
chrono-humanize = "0.2.1"
chrono-tz = "0.8.1"
crossterm = "0.24.0"
csv = "1.1.6"
dialoguer = { default-features = false, version = "0.10.3" }
digest = { default-features = false, version = "0.10.0" }
dtparse = "1.2.0"
eml-parser = "0.1.0"
encoding_rs = "0.8.30"
fancy-regex = "0.11.0"
filesize = "0.2.0"
filetime = "0.2.15"
fs_extra = "1.3.0"
htmlescape = "0.3.1"
Bump ical from 0.7.0 to 0.8.0 (#7975) Bumps [ical](https://github.com/Peltoche/ical-rs) from 0.7.0 to 0.8.0. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/Peltoche/ical-rs/commits">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ical&package-manager=cargo&previous-version=0.7.0&new-version=0.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 19:37:51 +01:00
ical = "0.8.0"
indexmap = { version = "1.7", features = ["serde-1"] }
Progress bar Implementation (#7661) # Description _(Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience.)_ I implemented the status bar we talk about yesterday. The idea was inspired by the progress bar of `wget`. I decided to go for the second suggestion by `@Reilly` > 2. add an Option<usize> or whatever to RawStream (and ListStream?) for situations where you do know the length ahead of time For now only works with the command `save` but after the approve of this PR we can see how we can implement it on commands like `cp` and `mv` When using `fetch` nushell will check if there is any `content-length` attribute in the request header. If so, then `fetch` will send it through the new `Option` variable in the `RawStream` to the `save`. If we know the total size we show the progress bar ![nu_pb01](https://user-images.githubusercontent.com/38369407/210298647-07ee55ea-e751-41b1-a84d-f72ec1f6e9e5.jpg) but if we don't then we just show the stats like: data already saved, bytes per second, and time lapse. ![nu_pb02](https://user-images.githubusercontent.com/38369407/210298698-1ef65f51-40cc-4481-83de-309cbd1049cb.jpg) ![nu_pb03](https://user-images.githubusercontent.com/38369407/210298701-eef2ef13-9206-4a98-8202-e4fe5531d79d.jpg) Please let me know If I need to make any changes and I will be happy to do it. # User-Facing Changes A new flag (`--progress` `-p`) was added to the `save` command Examples: ```nu fetch https://github.com/torvalds/linux/archive/refs/heads/master.zip | save --progress -f main.zip fetch https://releases.ubuntu.com/22.04.1/ubuntu-22.04.1-desktop-amd64.iso | save --progress -f main.zip open main.zip --raw | save --progress main.copy ``` # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass - I am getting some errors and its weird because the errors are showing up in files i haven't touch. Is this normal? # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. Co-authored-by: Reilly Wood <reilly.wood@icloud.com>
2023-01-11 02:57:48 +01:00
indicatif = "0.17.2"
Inflector = "0.11"
is-root = "0.1.2"
itertools = "0.10.0"
log = "0.4.14"
lscolors = { version = "0.12.0", features = ["crossterm"], default-features = false }
md5 = { package = "md-5", version = "0.10.0" }
mime = "0.3.16"
add `--mime-type(-m)` to `ls` in the `type` column (#7616) # Description This PR adds the `mime-type` to the `type` column if you add the `--mime-type(-m)` flag to `ls`. <img width="853" alt="Screenshot 2022-12-27 at 11 43 20 AM" src="https://user-images.githubusercontent.com/343840/209705499-27fe40fe-0356-4d9d-97f2-4b2dc52e0963.png"> <img width="781" alt="Screenshot 2022-12-27 at 11 45 53 AM" src="https://user-images.githubusercontent.com/343840/209705509-4d677389-fd68-401e-a7af-3fc6052743b6.png"> # User-Facing Changes If you specify the `-m` flag, you get the "guessed at" mime type. The guess is based on the file name and uses this crate https://docs.rs/mime_guess/latest/mime_guess/ for the guessing. Part of issue #7612 and and #7524 There's some debate on if the `mime-type` should be added to the `type` column or if there should be a separate `mime` column. I tend to lean on the side of `type` since it's technically a type and it's only in that column if you ask it to be there. Also, I'd prefer to reuse a column rather than having a list of sprawling columns. Also, as @KodiCraft suggested, there is precedence as with `ls -d` where the summed size is in the size column. I could go either way and if someone wants to create a `mime` column, we'd probably accept it. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
2022-12-27 19:46:23 +01:00
mime_guess = "2.0.4"
2022-04-28 16:26:34 +02:00
notify = "4.0.17"
num = { version = "0.4.0", optional = true }
num-traits = "0.2.14"
once_cell = "1.17"
open = "3.2.0"
pathdiff = "0.2.1"
powierza-coefficient = "1.0.2"
quick-xml = "0.27"
rand = "0.8"
Bump rayon from 1.5.3 to 1.6.1 (#7836) Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.5.3 to 1.6.1. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rayon-rs/rayon/blob/master/RELEASES.md">rayon's changelog</a>.</em></p> <blockquote> <h1>Release rayon 1.6.1 (2022-12-09)</h1> <ul> <li>Simplified <code>par_bridge</code> to only pull one item at a time from the iterator, without batching. Threads that are waiting for iterator items will now block appropriately rather than spinning CPU. (Thanks <a href="https://github.com/njaard"><code>@​njaard</code></a>!)</li> <li>Added protection against recursion in <code>par_bridge</code>, so iterators that also invoke rayon will not cause mutex recursion deadlocks.</li> </ul> <h1>Release rayon-core 1.10.1 (2022-11-18)</h1> <ul> <li>Fixed a race condition with threads going to sleep while a broadcast starts.</li> </ul> <h1>Release rayon 1.6.0 / rayon-core 1.10.0 (2022-11-18)</h1> <ul> <li>The minimum supported <code>rustc</code> is now 1.56.</li> <li>The new <code>IndexedParallelIterator::fold_chunks</code> and <code>fold_chunks_with</code> methods work like <code>ParallelIterator::fold</code> and <code>fold_with</code> with fixed-size chunks of items. This may be useful for predictable batching performance, without the allocation overhead of <code>IndexedParallelIterator::chunks</code>.</li> <li>New &quot;broadcast&quot; methods run a given function on all threads in the pool. These run at a sort of reduced priority after each thread has exhausted their local work queue, but before they attempt work-stealing from other threads. <ul> <li>The global <code>broadcast</code> function and <code>ThreadPool::broadcast</code> method will block until completion, returning a <code>Vec</code> of all return values.</li> <li>The global <code>spawn_broadcast</code> function and methods on <code>ThreadPool</code>, <code>Scope</code>, and <code>ScopeFifo</code> will run detached, without blocking the current thread.</li> </ul> </li> <li>Panicking methods now use <code>#[track_caller]</code> to report the caller's location.</li> <li>Fixed a truncated length in <code>vec::Drain</code> when given an empty range.</li> </ul> <h2>Contributors</h2> <p>Thanks to all of the contributors for this release!</p> <ul> <li><a href="https://github.com/cuviper"><code>@​cuviper</code></a></li> <li><a href="https://github.com/idanmuze"><code>@​idanmuze</code></a></li> <li><a href="https://github.com/JoeyBF"><code>@​JoeyBF</code></a></li> <li><a href="https://github.com/JustForFun88"><code>@​JustForFun88</code></a></li> <li><a href="https://github.com/kianmeng"><code>@​kianmeng</code></a></li> <li><a href="https://github.com/kornelski"><code>@​kornelski</code></a></li> <li><a href="https://github.com/ritchie46"><code>@​ritchie46</code></a></li> <li><a href="https://github.com/ryanrussell"><code>@​ryanrussell</code></a></li> <li><a href="https://github.com/steffahn"><code>@​steffahn</code></a></li> <li><a href="https://github.com/TheIronBorn"><code>@​TheIronBorn</code></a></li> <li><a href="https://github.com/willcrozi"><code>@​willcrozi</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/rayon-rs/rayon/commit/401678ee554f90ab11abe70eb23737e26b489ddd"><code>401678e</code></a> Merge <a href="https://github-redirect.dependabot.com/rayon-rs/rayon/issues/709">#709</a></li> <li><a href="https://github.com/rayon-rs/rayon/commit/33e98434134f53fe18d222ea6824bb614942d290"><code>33e9843</code></a> Release rayon 1.2.1 / rayon-core 1.6.1</li> <li><a href="https://github.com/rayon-rs/rayon/commit/dd874ac5d45bb2b8bbb4e621a904bb40e36e1822"><code>dd874ac</code></a> Bump crate versions and dependencies</li> <li><a href="https://github.com/rayon-rs/rayon/commit/0c6338d2676485803db9406e964053232765a281"><code>0c6338d</code></a> Reduce Option complexity in demo cpu_time</li> <li><a href="https://github.com/rayon-rs/rayon/commit/be99e500bf08d8d83a835e7c755a629d31e97510"><code>be99e50</code></a> cargo fmt</li> <li><a href="https://github.com/rayon-rs/rayon/commit/9b4d9798def1ca954b8958fcd22b6a4088af3180"><code>9b4d979</code></a> Avoid mem::uninitialized in the demo cpu_time</li> <li><a href="https://github.com/rayon-rs/rayon/commit/5a466434abcf19107792937dbcc0b57a0b84c8ad"><code>5a46643</code></a> Avoid mem::uninitialized in par_sort_unstable</li> <li><a href="https://github.com/rayon-rs/rayon/commit/73b1061a2318e9cdb12cccfbbaafa5db3895f366"><code>73b1061</code></a> Merge <a href="https://github-redirect.dependabot.com/rayon-rs/rayon/issues/705">#705</a></li> <li><a href="https://github.com/rayon-rs/rayon/commit/54c0b0dc0c7d847eacf18bc3db8f363dafe688bc"><code>54c0b0d</code></a> Make sure that compat-Cargo.lock is fresh</li> <li><a href="https://github.com/rayon-rs/rayon/commit/4fd13b033424be5eac826571e017b1a008d0bd06"><code>4fd13b0</code></a> Regenerate compat-Cargo.lock</li> <li>Additional commits viewable in <a href="https://github.com/rayon-rs/rayon/compare/v1.5.3...rayon-core-v1.6.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rayon&package-manager=cargo&previous-version=1.5.3&new-version=1.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-23 05:52:37 +01:00
rayon = "1.6.1"
2023-01-23 02:44:10 +01:00
regex = "1.7.1"
reqwest = { version = "0.11", features = ["blocking", "json"] }
roxmltree = "0.17.0"
rust-embed = "6.3.0"
same-file = "1.0.6"
serde = { version = "1.0.123", features = ["derive"] }
rust-ini = "0.18.0"
serde_urlencoded = "0.7.0"
serde_yaml = "0.9.4"
sha2 = "0.10.0"
# Disable default features b/c the default features build Git (very slow to compile)
shadow-rs = { version = "0.20.0", default-features = false }
sysinfo = "0.27.7"
terminal_size = "0.2.1"
thiserror = "1.0.31"
titlecase = "2.0.0"
A `fill` command to replace `str lpad` and `str rpad` (#7846) # Description The point of this command is to allow you to be able to format ints, floats, filesizes, and strings with an alignment, padding, and a fill character, as strings. It's meant to take the place of `str lpad` and `str rpad`. ``` > help fill Fill and Align Search terms: display, render, format, pad, align Usage: > fill {flags} Flags: -h, --help - Display the help message for this command -w, --width <Int> - The width of the output. Defaults to 1 -a, --alignment <String> - The alignment of the output. Defaults to Left (Left(l), Right(r), Center(c/m), MiddleRight(cr/mr)) -c, --character <String> - The character to fill with. Defaults to ' ' (space) Signatures: <number> | fill -> <string> <string> | fill -> <string> Examples: Fill a string on the left side to a width of 15 with the character '─' > 'nushell' | fill -a l -c '─' -w 15 Fill a string on the right side to a width of 15 with the character '─' > 'nushell' | fill -a r -c '─' -w 15 Fill a string on both sides to a width of 15 with the character '─' > 'nushell' | fill -a m -c '─' -w 15 Fill a number on the left side to a width of 5 with the character '0' > 1 | fill --alignment right --character 0 --width 5 Fill a filesize on the left side to a width of 5 with the character '0' > 1kib | fill --alignment middle --character 0 --width 10 ``` ![image](https://user-images.githubusercontent.com/343840/214133752-6fc93fa7-4003-4eb4-96ed-cd967312e244.png) # User-Facing Changes Deprecated `str lpad` and `str rpad`. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
2023-02-09 21:56:52 +01:00
unicode-segmentation = "1.10.0"
toml = "0.7.1"
url = "2.2.1"
percent-encoding = "2.2.0"
2023-01-12 13:48:49 +01:00
uuid = { version = "1.2.2", features = ["v4"] }
2023-02-06 11:43:28 +01:00
which = { version = "4.4.0", optional = true }
reedline = { version = "0.15.0", features = ["bashisms", "sqlite"] }
wax = { version = "0.5.0" }
2022-07-26 04:09:32 +02:00
rusqlite = { version = "0.28.0", features = ["bundled"], optional = true }
sqlparser = { version = "0.30.0", features = ["serde"], optional = true }
A `fill` command to replace `str lpad` and `str rpad` (#7846) # Description The point of this command is to allow you to be able to format ints, floats, filesizes, and strings with an alignment, padding, and a fill character, as strings. It's meant to take the place of `str lpad` and `str rpad`. ``` > help fill Fill and Align Search terms: display, render, format, pad, align Usage: > fill {flags} Flags: -h, --help - Display the help message for this command -w, --width <Int> - The width of the output. Defaults to 1 -a, --alignment <String> - The alignment of the output. Defaults to Left (Left(l), Right(r), Center(c/m), MiddleRight(cr/mr)) -c, --character <String> - The character to fill with. Defaults to ' ' (space) Signatures: <number> | fill -> <string> <string> | fill -> <string> Examples: Fill a string on the left side to a width of 15 with the character '─' > 'nushell' | fill -a l -c '─' -w 15 Fill a string on the right side to a width of 15 with the character '─' > 'nushell' | fill -a r -c '─' -w 15 Fill a string on both sides to a width of 15 with the character '─' > 'nushell' | fill -a m -c '─' -w 15 Fill a number on the left side to a width of 5 with the character '0' > 1 | fill --alignment right --character 0 --width 5 Fill a filesize on the left side to a width of 5 with the character '0' > 1kib | fill --alignment middle --character 0 --width 10 ``` ![image](https://user-images.githubusercontent.com/343840/214133752-6fc93fa7-4003-4eb4-96ed-cd967312e244.png) # User-Facing Changes Deprecated `str lpad` and `str rpad`. # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
2023-02-09 21:56:52 +01:00
unicode-width = "0.1.10"
[target.'cfg(windows)'.dependencies]
winreg = "0.10.1"
[target.'cfg(unix)'.dependencies]
umask = "2.0.0"
2021-02-05 21:54:54 +01:00
users = "0.11.0"
libc = "0.2"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies.trash]
version = "3.0.1"
optional = true
[dependencies.polars]
version = "0.26.1"
optional = true
features = [
"arg_where",
"checked_arithmetic",
"concat_str",
"cross_join",
"csv-file",
"cum_agg",
"default",
"dtype-datetime",
"dtype-struct",
"dtype-categorical",
"dynamic_groupby",
"ipc",
"is_in",
"json",
"lazy",
"object",
"parquet",
"random",
"rolling_window",
"rows",
"serde",
"serde-lazy",
"strings",
"strings",
"to_dummies",
]
[target.'cfg(windows)'.dependencies.windows]
version = "0.44.0"
features = ["Win32_Foundation", "Win32_Storage_FileSystem", "Win32_System_SystemServices"]
[features]
trash-support = ["trash"]
2022-03-30 20:37:31 +02:00
which-support = ["which"]
2021-11-02 21:56:00 +01:00
plugin = ["nu-parser/plugin"]
dataframe = ["polars", "num", "sqlparser"]
sqlite = ["rusqlite"] # TODO: given that rusqlite is included in reedline, should we just always include it?
[build-dependencies]
shadow-rs = { version = "0.20.0", default-features = false }
[dev-dependencies]
nu-test-support = { path = "../nu-test-support", version = "0.75.1" }
hamcrest2 = "0.3.0"
dirs-next = "2.0.0"
proptest = "1.0.0"
quickcheck = "1.0.3"
quickcheck_macros = "1.0.0"
rstest = { version = "0.15.0", default-features = false }