forked from extern/nushell
Bump a lot of deps (#1560)
This commit is contained in:
parent
c9f424977e
commit
04702530a3
243
Cargo.lock
generated
243
Cargo.lock
generated
@ -265,6 +265,21 @@ dependencies = [
|
|||||||
"serde 1.0.106",
|
"serde 1.0.106",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bit-set"
|
||||||
|
version = "0.5.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80"
|
||||||
|
dependencies = [
|
||||||
|
"bit-vec",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bit-vec"
|
||||||
|
version = "0.5.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "1.2.1"
|
version = "1.2.1"
|
||||||
@ -331,12 +346,6 @@ version = "3.0.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6894a79550807490d9f19a138a6da0f8830e70c83e83402dd23f16fd6c479056"
|
checksum = "6894a79550807490d9f19a138a6da0f8830e70c83e83402dd23f16fd6c479056"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bytecount"
|
|
||||||
version = "0.3.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f861d9ce359f56dbcb6e0c2a1cb84e52ad732cadb57b806adeb3c7668caccbd8"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
version = "1.3.2"
|
version = "1.3.2"
|
||||||
@ -603,9 +612,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossterm"
|
name = "crossterm"
|
||||||
version = "0.16.0"
|
version = "0.17.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b8a3223215bc00c666d6be730e88aef245ad4a4f837e87a16c347e8acf701643"
|
checksum = "2aa8fc03593d557fb7897c88b0bae3cbae1e52c1ab7fbaa9033ef1af3a354eef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"crossterm_winapi",
|
"crossterm_winapi",
|
||||||
@ -751,12 +760,6 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "difference"
|
|
||||||
version = "2.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "directories"
|
name = "directories"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
@ -846,7 +849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
|
checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"humantime",
|
"humantime 1.3.0",
|
||||||
"log",
|
"log",
|
||||||
"regex",
|
"regex",
|
||||||
"termcolor",
|
"termcolor",
|
||||||
@ -896,10 +899,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
|
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "filesize"
|
name = "fancy-regex"
|
||||||
version = "0.1.0"
|
version = "0.3.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3a941e39ae509cebcd46c6734c20553a9a209b92cea5fc54618fe778fea61701"
|
checksum = "b0e2de1b89ad299d536b7cefc5d177f5c005957fa2266ce58eca4d189e74bff5"
|
||||||
|
dependencies = [
|
||||||
|
"bit-set",
|
||||||
|
"regex",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "filesize"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "12d741e2415d4e2e5bd1c1d00409d1a8865a57892c2d689b504365655d237d43"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"winapi 0.3.8",
|
"winapi 0.3.8",
|
||||||
]
|
]
|
||||||
@ -1209,9 +1222,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "git2"
|
name = "git2"
|
||||||
version = "0.13.0"
|
version = "0.13.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b7da16ceafe24cedd9ba02c4463a2b506b6493baf4317c79c5acb553134a3c15"
|
checksum = "ef222034f2069cfc5af01ce423574d3d9a3925bd4052912a14e5bcfd7ca9e47a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"libc",
|
"libc",
|
||||||
@ -1467,6 +1480,12 @@ dependencies = [
|
|||||||
"quick-error",
|
"quick-error",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "humantime"
|
||||||
|
version = "2.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b9b6c53306532d3c8e8087b44e6580e10db51a023cf9b433cea2ac38066b92da"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ical"
|
name = "ical"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
@ -1604,15 +1623,6 @@ dependencies = [
|
|||||||
"either",
|
"either",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "itertools"
|
|
||||||
version = "0.8.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484"
|
|
||||||
dependencies = [
|
|
||||||
"either",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itertools"
|
name = "itertools"
|
||||||
version = "0.9.0"
|
version = "0.9.0"
|
||||||
@ -1728,9 +1738,9 @@ checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libgit2-sys"
|
name = "libgit2-sys"
|
||||||
version = "0.12.0+0.99.0"
|
version = "0.12.2+1.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "05dff41ac39e7b653f5f1550886cf00ba52f8e7f57210b633cdeedb3de5b236c"
|
checksum = "a12c878ccc1a49ff71e264233a66d2114cdcc7fdc44c0ebe2b54075240831238"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
@ -1750,9 +1760,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libsqlite3-sys"
|
name = "libsqlite3-sys"
|
||||||
version = "0.17.1"
|
version = "0.17.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "266eb8c361198e8d1f682bc974e5d9e2ae90049fb1943890904d11dad7d4a77d"
|
checksum = "38c4446f020dfbfab9f8a1ab605c15e6c03a8924c08522dcb67314acc8d2b523"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
@ -2021,19 +2031,6 @@ dependencies = [
|
|||||||
"winapi 0.3.8",
|
"winapi 0.3.8",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nix"
|
|
||||||
version = "0.14.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6c722bee1037d430d0f8e687bbdbf222f27cc6e4e68d5caf630857bb2b6dbdce"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags",
|
|
||||||
"cc",
|
|
||||||
"cfg-if",
|
|
||||||
"libc",
|
|
||||||
"void",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
version = "0.15.0"
|
version = "0.15.0"
|
||||||
@ -2093,38 +2090,6 @@ dependencies = [
|
|||||||
"version_check 0.9.1",
|
"version_check 0.9.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nom-tracable"
|
|
||||||
version = "0.4.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4e9af1ee3bf4c9b842a720c53c0e7abb1b56a207e0b9bdbe7ff684b4cf630da1"
|
|
||||||
dependencies = [
|
|
||||||
"nom 5.1.1",
|
|
||||||
"nom-tracable-macros",
|
|
||||||
"nom_locate",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nom-tracable-macros"
|
|
||||||
version = "0.4.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8c16e5f9f228073fd36e4c9e65b12d763d9a1bda73b8400f3aa67d7971c8dffb"
|
|
||||||
dependencies = [
|
|
||||||
"quote",
|
|
||||||
"syn",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nom_locate"
|
|
||||||
version = "1.0.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f932834fd8e391fc7710e2ba17e8f9f8645d846b55aa63207e17e110a1e1ce35"
|
|
||||||
dependencies = [
|
|
||||||
"bytecount",
|
|
||||||
"memchr",
|
|
||||||
"nom 5.1.1",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ntapi"
|
name = "ntapi"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
@ -2164,8 +2129,6 @@ dependencies = [
|
|||||||
"nu_plugin_sys",
|
"nu_plugin_sys",
|
||||||
"nu_plugin_textview",
|
"nu_plugin_textview",
|
||||||
"nu_plugin_tree",
|
"nu_plugin_tree",
|
||||||
"onig_sys",
|
|
||||||
"pretty_assertions",
|
|
||||||
"pretty_env_logger",
|
"pretty_env_logger",
|
||||||
"semver",
|
"semver",
|
||||||
"serde 1.0.106",
|
"serde 1.0.106",
|
||||||
@ -2223,9 +2186,6 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"meval",
|
"meval",
|
||||||
"natural 0.5.0",
|
"natural 0.5.0",
|
||||||
"nom 5.1.1",
|
|
||||||
"nom-tracable",
|
|
||||||
"nom_locate",
|
|
||||||
"nu-build",
|
"nu-build",
|
||||||
"nu-errors",
|
"nu-errors",
|
||||||
"nu-parser",
|
"nu-parser",
|
||||||
@ -2239,7 +2199,6 @@ dependencies = [
|
|||||||
"parking_lot",
|
"parking_lot",
|
||||||
"pin-utils",
|
"pin-utils",
|
||||||
"pretty-hex",
|
"pretty-hex",
|
||||||
"pretty_assertions",
|
|
||||||
"pretty_env_logger",
|
"pretty_env_logger",
|
||||||
"prettytable-rs",
|
"prettytable-rs",
|
||||||
"ptree",
|
"ptree",
|
||||||
@ -2280,8 +2239,6 @@ dependencies = [
|
|||||||
"derive-new",
|
"derive-new",
|
||||||
"getset 0.0.9",
|
"getset 0.0.9",
|
||||||
"language-reporting",
|
"language-reporting",
|
||||||
"nom 5.1.1",
|
|
||||||
"nom_locate",
|
|
||||||
"nu-build",
|
"nu-build",
|
||||||
"nu-source",
|
"nu-source",
|
||||||
"num-bigint",
|
"num-bigint",
|
||||||
@ -2339,9 +2296,6 @@ dependencies = [
|
|||||||
"indexmap",
|
"indexmap",
|
||||||
"language-reporting",
|
"language-reporting",
|
||||||
"natural 0.3.0",
|
"natural 0.3.0",
|
||||||
"nom 5.1.1",
|
|
||||||
"nom-tracable",
|
|
||||||
"nom_locate",
|
|
||||||
"nu-build",
|
"nu-build",
|
||||||
"nu-errors",
|
"nu-errors",
|
||||||
"nu-source",
|
"nu-source",
|
||||||
@ -2363,8 +2317,6 @@ dependencies = [
|
|||||||
"derive-new",
|
"derive-new",
|
||||||
"getset 0.0.9",
|
"getset 0.0.9",
|
||||||
"language-reporting",
|
"language-reporting",
|
||||||
"nom-tracable",
|
|
||||||
"nom_locate",
|
|
||||||
"nu-build",
|
"nu-build",
|
||||||
"pretty",
|
"pretty",
|
||||||
"serde 1.0.106",
|
"serde 1.0.106",
|
||||||
@ -2377,7 +2329,7 @@ version = "0.12.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"app_dirs",
|
"app_dirs",
|
||||||
"dunce",
|
"dunce",
|
||||||
"getset 0.0.9",
|
"getset 0.1.0",
|
||||||
"glob",
|
"glob",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"nu-build",
|
"nu-build",
|
||||||
@ -2392,7 +2344,7 @@ name = "nu-value-ext"
|
|||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"itertools 0.8.2",
|
"itertools 0.9.0",
|
||||||
"nu-build",
|
"nu-build",
|
||||||
"nu-errors",
|
"nu-errors",
|
||||||
"nu-parser",
|
"nu-parser",
|
||||||
@ -2473,7 +2425,7 @@ dependencies = [
|
|||||||
name = "nu_plugin_post"
|
name = "nu_plugin_post"
|
||||||
version = "0.12.0"
|
version = "0.12.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.11.0",
|
"base64 0.12.0",
|
||||||
"futures 0.3.3",
|
"futures 0.3.3",
|
||||||
"nu-build",
|
"nu-build",
|
||||||
"nu-errors",
|
"nu-errors",
|
||||||
@ -2541,7 +2493,6 @@ dependencies = [
|
|||||||
"nu-plugin",
|
"nu-plugin",
|
||||||
"nu-protocol",
|
"nu-protocol",
|
||||||
"nu-source",
|
"nu-source",
|
||||||
"onig_sys",
|
|
||||||
"syntect",
|
"syntect",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
@ -2676,28 +2627,6 @@ version = "1.3.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b"
|
checksum = "b1c601810575c99596d4afc46f78a678c80105117c379eb3650cf99b8a21ce5b"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "onig"
|
|
||||||
version = "4.3.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8518fcb2b1b8c2f45f0ad499df4fda6087fc3475ca69a185c173b8315d2fb383"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags",
|
|
||||||
"lazy_static 1.4.0",
|
|
||||||
"libc",
|
|
||||||
"onig_sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "onig_sys"
|
|
||||||
version = "69.1.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "388410bf5fa341f10e58e6db3975f4bea1ac30247dd79d37a9e5ced3cb4cc3b0"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"pkg-config",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "open"
|
name = "open"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
@ -2766,15 +2695,6 @@ dependencies = [
|
|||||||
"winapi 0.3.8",
|
"winapi 0.3.8",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "output_vt100"
|
|
||||||
version = "0.1.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9"
|
|
||||||
dependencies = [
|
|
||||||
"winapi 0.3.8",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
@ -2867,13 +2787,13 @@ checksum = "feb3b2b1033b8a60b4da6ee470325f887758c95d5320f52f9ce0df055a55940e"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "plist"
|
name = "plist"
|
||||||
version = "0.4.2"
|
version = "0.5.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5f2a9f075f6394100e7c105ed1af73fb1859d6fd14e49d4290d578120beb167f"
|
checksum = "50ce7c785e06e3a9e6f546c1a30d3d59111a31a21bc294fb1496241a572c9a00"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.10.1",
|
"base64 0.10.1",
|
||||||
"byteorder",
|
"humantime 2.0.0",
|
||||||
"humantime",
|
"indexmap",
|
||||||
"line-wrap",
|
"line-wrap",
|
||||||
"serde 1.0.106",
|
"serde 1.0.106",
|
||||||
"xml-rs",
|
"xml-rs",
|
||||||
@ -2918,18 +2838,6 @@ version = "0.1.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "be91bcc43e73799dc46a6c194a55e7aae1d86cc867c860fd4a436019af21bd8c"
|
checksum = "be91bcc43e73799dc46a6c194a55e7aae1d86cc867c860fd4a436019af21bd8c"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pretty_assertions"
|
|
||||||
version = "0.6.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427"
|
|
||||||
dependencies = [
|
|
||||||
"ansi_term 0.11.0",
|
|
||||||
"ctor",
|
|
||||||
"difference",
|
|
||||||
"output_vt100",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pretty_env_logger"
|
name = "pretty_env_logger"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
@ -3167,9 +3075,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.3.5"
|
version = "1.3.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8900ebc1363efa7ea1c399ccc32daed870b4002651e0bed86e72d501ebbe0048"
|
checksum = "7f6946991529684867e47d86474e3a6d0c0ab9b82d5821e314b1ede31fa3a4b3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
@ -3220,18 +3128,18 @@ checksum = "194d8e591e405d1eecf28819740abed6d719d1a2db87fc0bcdedee9a26d55560"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "roxmltree"
|
name = "roxmltree"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bf14352fdd8ef3b8525cc22af0ba5cd568163ac8332162cc972584ff4770a082"
|
checksum = "4129743af505f674602b97d02c8ebe526752de8811e21ecb2fb166fcf4afe157"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"xmlparser",
|
"xmlparser",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rusqlite"
|
name = "rusqlite"
|
||||||
version = "0.21.0"
|
version = "0.22.0-beta.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "64a656821bb6317a84b257737b7934f79c0dbb7eb694710475908280ebad3e64"
|
checksum = "d5c02d0acf7e60bbf900bfc46c287a336473aedf6b7658039441b474289643de"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"fallible-iterator",
|
"fallible-iterator",
|
||||||
@ -3287,19 +3195,19 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustyline"
|
name = "rustyline"
|
||||||
version = "6.0.0"
|
version = "6.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "de64be8eecbe428b6924f1d8430369a01719fbb182c26fa431ddbb0a95f5315d"
|
checksum = "6155a1169c281a8b75ee943a83eef0e2bb63aff057688c2111be319e51fc9f63"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"dirs 2.0.2",
|
"dirs 2.0.2",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"memchr",
|
"memchr",
|
||||||
"nix 0.14.1",
|
"nix 0.17.0",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
"unicode-width",
|
"unicode-width",
|
||||||
"utf8parse",
|
"utf8parse 0.2.0",
|
||||||
"winapi 0.3.8",
|
"winapi 0.3.8",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -3461,9 +3369,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.48"
|
version = "1.0.51"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"
|
checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"itoa",
|
"itoa",
|
||||||
@ -3587,9 +3495,9 @@ checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "starship"
|
name = "starship"
|
||||||
version = "0.38.0"
|
version = "0.39.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "43eedcc781b87f19ee276f6ce6057c7dcb3987b161bbb195cb1aaff0bceb26fc"
|
checksum = "596bca871e5a61006c78fb59ca7a03ee822ab7d91f65af8e3d8492ece9ae7df1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.12.1",
|
"ansi_term 0.12.1",
|
||||||
"attohttpc",
|
"attohttpc",
|
||||||
@ -3711,17 +3619,17 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syntect"
|
name = "syntect"
|
||||||
version = "3.2.0"
|
version = "4.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e80b8831c5a543192ffc3727f01cf0e57579c6ac15558e3048bfb5708892167b"
|
checksum = "274f5e6be6e730e919e4e371dba490cd35cf7401fad41dac4a39a8d88884c731"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bincode",
|
"bincode",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
|
"fancy-regex",
|
||||||
"flate2",
|
"flate2",
|
||||||
"fnv",
|
"fnv",
|
||||||
"lazy_static 1.4.0",
|
"lazy_static 1.4.0",
|
||||||
"lazycell",
|
"lazycell",
|
||||||
"onig",
|
|
||||||
"plist",
|
"plist",
|
||||||
"regex-syntax",
|
"regex-syntax",
|
||||||
"serde 1.0.106",
|
"serde 1.0.106",
|
||||||
@ -3733,9 +3641,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sysinfo"
|
name = "sysinfo"
|
||||||
version = "0.11.7"
|
version = "0.12.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e15d793f059727ad34a9245503c13b38262bb32e9906d8122ca64d6ca54b0858"
|
checksum = "7ccb41798287e8e299a701b5560d886d6ca2c3e7115e9ea2cb68c123aec339b7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"doc-comment",
|
"doc-comment",
|
||||||
@ -4034,11 +3942,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "users"
|
name = "users"
|
||||||
version = "0.9.1"
|
version = "0.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c72f4267aea0c3ec6d07eaabea6ead7c5ddacfafc5e22bcf8d186706851fb4cf"
|
checksum = "aa4227e95324a443c9fcb06e03d4d85e91aabe9a5a02aa818688b6918b6af486"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
|
"log",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4047,6 +3956,12 @@ version = "0.1.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d"
|
checksum = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "utf8parse"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vcpkg"
|
name = "vcpkg"
|
||||||
version = "0.2.8"
|
version = "0.2.8"
|
||||||
@ -4083,7 +3998,7 @@ version = "0.3.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4f42f536e22f7fcbb407639765c8fd78707a33109301f834a594758bedd6e8cf"
|
checksum = "4f42f536e22f7fcbb407639765c8fd78707a33109301f834a594758bedd6e8cf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"utf8parse",
|
"utf8parse 0.1.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
10
Cargo.toml
10
Cargo.toml
@ -37,10 +37,9 @@ nu_plugin_sys = { version = "0.12.0", path = "./crates/nu_plugin_sys", optional=
|
|||||||
nu_plugin_textview = { version = "0.12.0", path = "./crates/nu_plugin_textview", optional=true }
|
nu_plugin_textview = { version = "0.12.0", path = "./crates/nu_plugin_textview", optional=true }
|
||||||
nu_plugin_tree = { version = "0.12.0", path = "./crates/nu_plugin_tree", optional=true }
|
nu_plugin_tree = { version = "0.12.0", path = "./crates/nu_plugin_tree", optional=true }
|
||||||
|
|
||||||
crossterm = { version = "0.16.0", optional = true }
|
crossterm = { version = "0.17.1", optional = true }
|
||||||
onig_sys = { version = "=69.1.0", optional = true }
|
|
||||||
semver = { version = "0.9.0", optional = true }
|
semver = { version = "0.9.0", optional = true }
|
||||||
syntect = { version = "3.2.0", optional = true }
|
syntect = { version = "4.1", default-features = false, features = ["default-fancy"], optional = true}
|
||||||
url = { version = "2.1.1", optional = true }
|
url = { version = "2.1.1", optional = true }
|
||||||
|
|
||||||
clap = "2.33.0"
|
clap = "2.33.0"
|
||||||
@ -51,12 +50,11 @@ log = "0.4.8"
|
|||||||
pretty_env_logger = "0.4.0"
|
pretty_env_logger = "0.4.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pretty_assertions = "0.6.1"
|
|
||||||
nu-test-support = { version = "0.12.0", path = "./crates/nu-test-support" }
|
nu-test-support = { version = "0.12.0", path = "./crates/nu-test-support" }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
toml = "0.5.6"
|
toml = "0.5.6"
|
||||||
serde = { version = "1.0.105", features = ["derive"] }
|
serde = { version = "1.0.106", features = ["derive"] }
|
||||||
nu-build = { version = "0.12.0", path = "./crates/nu-build" }
|
nu-build = { version = "0.12.0", path = "./crates/nu-build" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
@ -67,7 +65,7 @@ default = ["sys", "ps", "textview", "inc", "str"]
|
|||||||
stable = ["default", "starship-prompt", "binaryview", "match", "tree", "average", "post", "fetch", "clipboard-cli"]
|
stable = ["default", "starship-prompt", "binaryview", "match", "tree", "average", "post", "fetch", "clipboard-cli"]
|
||||||
|
|
||||||
# Default
|
# Default
|
||||||
textview = ["crossterm", "syntect", "onig_sys", "url", "nu_plugin_textview"]
|
textview = ["crossterm", "syntect", "url", "nu_plugin_textview"]
|
||||||
sys = ["nu_plugin_sys"]
|
sys = ["nu_plugin_sys"]
|
||||||
ps = ["nu_plugin_ps"]
|
ps = ["nu_plugin_ps"]
|
||||||
inc = ["semver", "nu_plugin_inc"]
|
inc = ["semver", "nu_plugin_inc"]
|
||||||
|
@ -10,7 +10,7 @@ license = "MIT"
|
|||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.103", features = ["derive"] }
|
serde = { version = "1.0.106", features = ["derive"] }
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
serde_json = "1.0.44"
|
serde_json = "1.0.51"
|
||||||
toml = "0.5.5"
|
toml = "0.5.6"
|
||||||
|
@ -35,12 +35,12 @@ ctrlc = "3.1.4"
|
|||||||
derive-new = "0.5.8"
|
derive-new = "0.5.8"
|
||||||
dirs = "2.0.2"
|
dirs = "2.0.2"
|
||||||
dunce = "1.0.0"
|
dunce = "1.0.0"
|
||||||
filesize = "0.1.0"
|
filesize = "0.2.0"
|
||||||
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
||||||
futures-util = "0.3.4"
|
futures-util = "0.3.4"
|
||||||
futures_codec = "0.4"
|
futures_codec = "0.4"
|
||||||
getset = "0.1.0"
|
getset = "0.1.0"
|
||||||
git2 = { version = "0.13.0", default_features = false }
|
git2 = { version = "0.13.1", default_features = false }
|
||||||
glob = "0.3.0"
|
glob = "0.3.0"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
htmlescape = "0.3.1"
|
htmlescape = "0.3.1"
|
||||||
@ -52,9 +52,6 @@ language-reporting = "0.4.0"
|
|||||||
log = "0.4.8"
|
log = "0.4.8"
|
||||||
meval = "0.2"
|
meval = "0.2"
|
||||||
natural = "0.5.0"
|
natural = "0.5.0"
|
||||||
nom = "5.0.1"
|
|
||||||
nom-tracable = "0.4.1"
|
|
||||||
nom_locate = "1.0.0"
|
|
||||||
num-bigint = { version = "0.2.6", features = ["serde"] }
|
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||||
num-traits = "0.2.11"
|
num-traits = "0.2.11"
|
||||||
parking_lot = "0.10.0"
|
parking_lot = "0.10.0"
|
||||||
@ -66,13 +63,13 @@ ptree = {version = "0.2" }
|
|||||||
query_interface = "0.3.5"
|
query_interface = "0.3.5"
|
||||||
rand = "0.7"
|
rand = "0.7"
|
||||||
regex = "1"
|
regex = "1"
|
||||||
roxmltree = "0.10.0"
|
roxmltree = "0.10.1"
|
||||||
rustyline = "6.0.0"
|
rustyline = "6.1.0"
|
||||||
serde = { version = "1.0.105", features = ["derive"] }
|
serde = { version = "1.0.106", features = ["derive"] }
|
||||||
serde-hjson = "0.9.1"
|
serde-hjson = "0.9.1"
|
||||||
serde_bytes = "0.11.3"
|
serde_bytes = "0.11.3"
|
||||||
serde_ini = "0.2.0"
|
serde_ini = "0.2.0"
|
||||||
serde_json = "1.0.48"
|
serde_json = "1.0.51"
|
||||||
serde_urlencoded = "0.6.1"
|
serde_urlencoded = "0.6.1"
|
||||||
serde_yaml = "0.8"
|
serde_yaml = "0.8"
|
||||||
shellexpand = "2.0.0"
|
shellexpand = "2.0.0"
|
||||||
@ -88,18 +85,15 @@ umask = "0.1"
|
|||||||
unicode-xid = "0.2.0"
|
unicode-xid = "0.2.0"
|
||||||
|
|
||||||
clipboard = { version = "0.5", optional = true }
|
clipboard = { version = "0.5", optional = true }
|
||||||
starship = { version = "0.38.0", optional = true }
|
starship = { version = "0.39.0", optional = true }
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
users = "0.9"
|
users = "0.10.0"
|
||||||
|
|
||||||
[dependencies.rusqlite]
|
[dependencies.rusqlite]
|
||||||
version = "0.21.0"
|
version = "0.22.0-beta.0"
|
||||||
features = ["bundled", "blob"]
|
features = ["bundled", "blob"]
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
pretty_assertions = "0.6.1"
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
nu-build = { version = "0.12.0", path = "../nu-build" }
|
nu-build = { version = "0.12.0", path = "../nu-build" }
|
||||||
|
|
||||||
|
@ -9,11 +9,6 @@ use nu_source::Tagged;
|
|||||||
use nu_value_ext::{as_column_path, get_data_by_column_path};
|
use nu_value_ext::{as_column_path, get_data_by_column_path};
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
|
|
||||||
use nom::{
|
|
||||||
bytes::complete::{tag, take_while},
|
|
||||||
IResult,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub struct Format;
|
pub struct Format;
|
||||||
|
|
||||||
impl PerItemCommand for Format {
|
impl PerItemCommand for Format {
|
||||||
@ -45,14 +40,8 @@ impl PerItemCommand for Format {
|
|||||||
let pattern_tag = pattern.tag.clone();
|
let pattern_tag = pattern.tag.clone();
|
||||||
let pattern = pattern.as_string()?;
|
let pattern = pattern.as_string()?;
|
||||||
|
|
||||||
let format_pattern = format(&pattern).map_err(|_| {
|
let format_pattern = format(&pattern);
|
||||||
ShellError::labeled_error(
|
let commands = format_pattern;
|
||||||
"Could not create format pattern",
|
|
||||||
"could not create format pattern",
|
|
||||||
&pattern_tag,
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
let commands = format_pattern.1;
|
|
||||||
|
|
||||||
let output = match value {
|
let output = match value {
|
||||||
value
|
value
|
||||||
@ -66,7 +55,7 @@ impl PerItemCommand for Format {
|
|||||||
for command in &commands {
|
for command in &commands {
|
||||||
match command {
|
match command {
|
||||||
FormatCommand::Text(s) => {
|
FormatCommand::Text(s) => {
|
||||||
output.push_str(s);
|
output.push_str(&s);
|
||||||
}
|
}
|
||||||
FormatCommand::Column(c) => {
|
FormatCommand::Column(c) => {
|
||||||
let key = to_column_path(&c, &pattern_tag)?;
|
let key = to_column_path(&c, &pattern_tag)?;
|
||||||
@ -104,32 +93,43 @@ enum FormatCommand {
|
|||||||
Column(String),
|
Column(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
fn format(input: &str) -> IResult<&str, Vec<FormatCommand>> {
|
fn format(input: &str) -> Vec<FormatCommand> {
|
||||||
let mut output = vec![];
|
let mut output = vec![];
|
||||||
|
|
||||||
let mut loop_input = input;
|
let mut loop_input = input.chars();
|
||||||
loop {
|
loop {
|
||||||
let (input, before) = take_while(|c| c != '{')(loop_input)?;
|
let mut before = String::new();
|
||||||
|
|
||||||
|
while let Some(c) = loop_input.next() {
|
||||||
|
if c == '{' {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
before.push(c);
|
||||||
|
}
|
||||||
|
|
||||||
if !before.is_empty() {
|
if !before.is_empty() {
|
||||||
output.push(FormatCommand::Text(before.to_string()));
|
output.push(FormatCommand::Text(before.to_string()));
|
||||||
}
|
}
|
||||||
if input != "" {
|
|
||||||
// Look for column as we're now at one
|
// Look for column as we're now at one
|
||||||
let (input, _) = tag("{")(input)?;
|
let mut column = String::new();
|
||||||
let (input, column) = take_while(|c| c != '}')(input)?;
|
|
||||||
let (input, _) = tag("}")(input)?;
|
|
||||||
|
|
||||||
output.push(FormatCommand::Column(column.to_string()));
|
while let Some(c) = loop_input.next() {
|
||||||
loop_input = input;
|
if c == '}' {
|
||||||
} else {
|
break;
|
||||||
loop_input = input;
|
|
||||||
}
|
}
|
||||||
if loop_input == "" {
|
column.push(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
if !column.is_empty() {
|
||||||
|
output.push(FormatCommand::Column(column.to_string()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if before.is_empty() && column.is_empty() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok((loop_input, output))
|
output
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_column_path(
|
fn to_column_path(
|
||||||
|
@ -6,10 +6,6 @@ use nu_protocol::{
|
|||||||
CallInfo, ReturnSuccess, Signature, SyntaxShape, TaggedDictBuilder, UntaggedValue, Value,
|
CallInfo, ReturnSuccess, Signature, SyntaxShape, TaggedDictBuilder, UntaggedValue, Value,
|
||||||
};
|
};
|
||||||
|
|
||||||
use nom::{
|
|
||||||
bytes::complete::{tag, take_while},
|
|
||||||
IResult,
|
|
||||||
};
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
@ -18,32 +14,44 @@ enum ParseCommand {
|
|||||||
Column(String),
|
Column(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse(input: &str) -> IResult<&str, Vec<ParseCommand>> {
|
fn parse(input: &str) -> Vec<ParseCommand> {
|
||||||
let mut output = vec![];
|
let mut output = vec![];
|
||||||
|
|
||||||
let mut loop_input = input;
|
//let mut loop_input = input;
|
||||||
|
let mut loop_input = input.chars();
|
||||||
loop {
|
loop {
|
||||||
let (input, before) = take_while(|c| c != '{')(loop_input)?;
|
let mut before = String::new();
|
||||||
|
|
||||||
|
while let Some(c) = loop_input.next() {
|
||||||
|
if c == '{' {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
before.push(c);
|
||||||
|
}
|
||||||
|
|
||||||
if !before.is_empty() {
|
if !before.is_empty() {
|
||||||
output.push(ParseCommand::Text(before.to_string()));
|
output.push(ParseCommand::Text(before.to_string()));
|
||||||
}
|
}
|
||||||
if input != "" {
|
|
||||||
// Look for column as we're now at one
|
// Look for column as we're now at one
|
||||||
let (input, _) = tag("{")(input)?;
|
let mut column = String::new();
|
||||||
let (input, column) = take_while(|c| c != '}')(input)?;
|
|
||||||
let (input, _) = tag("}")(input)?;
|
|
||||||
|
|
||||||
output.push(ParseCommand::Column(column.to_string()));
|
while let Some(c) = loop_input.next() {
|
||||||
loop_input = input;
|
if c == '}' {
|
||||||
} else {
|
break;
|
||||||
loop_input = input;
|
|
||||||
}
|
}
|
||||||
if loop_input == "" {
|
column.push(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
if !column.is_empty() {
|
||||||
|
output.push(ParseCommand::Column(column.to_string()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if before.is_empty() && column.is_empty() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok((loop_input, output))
|
output
|
||||||
}
|
}
|
||||||
|
|
||||||
fn column_names(commands: &[ParseCommand]) -> Vec<String> {
|
fn column_names(commands: &[ParseCommand]) -> Vec<String> {
|
||||||
@ -103,16 +111,10 @@ impl PerItemCommand for Parse {
|
|||||||
//let value_tag = value.tag();
|
//let value_tag = value.tag();
|
||||||
let pattern = call_info.args.expect_nth(0)?.as_string()?;
|
let pattern = call_info.args.expect_nth(0)?.as_string()?;
|
||||||
|
|
||||||
let parse_pattern = parse(&pattern).map_err(|_| {
|
let parse_pattern = parse(&pattern);
|
||||||
ShellError::labeled_error(
|
let parse_regex = build_regex(&parse_pattern);
|
||||||
"Could not create parse pattern",
|
|
||||||
"could not create parse pattern",
|
|
||||||
&value.tag,
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
let parse_regex = build_regex(&parse_pattern.1);
|
|
||||||
|
|
||||||
let column_names = column_names(&parse_pattern.1);
|
let column_names = column_names(&parse_pattern);
|
||||||
let regex = Regex::new(&parse_regex).map_err(|_| {
|
let regex = Regex::new(&parse_regex).map_err(|_| {
|
||||||
ShellError::labeled_error("Could not parse regex", "could not parse regex", &value.tag)
|
ShellError::labeled_error("Could not parse regex", "could not parse regex", &value.tag)
|
||||||
})?;
|
})?;
|
||||||
|
@ -171,7 +171,6 @@ mod tests {
|
|||||||
use nu_protocol::{TaggedDictBuilder, UntaggedValue, Value};
|
use nu_protocol::{TaggedDictBuilder, UntaggedValue, Value};
|
||||||
use nu_source::Tag;
|
use nu_source::Tag;
|
||||||
use nu_test_support::fs;
|
use nu_test_support::fs;
|
||||||
use pretty_assertions::assert_eq;
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
fn fixtures() -> PathBuf {
|
fn fixtures() -> PathBuf {
|
||||||
|
@ -16,17 +16,15 @@ ansi_term = "0.12.1"
|
|||||||
bigdecimal = { version = "0.1.0", features = ["serde"] }
|
bigdecimal = { version = "0.1.0", features = ["serde"] }
|
||||||
derive-new = "0.5.8"
|
derive-new = "0.5.8"
|
||||||
language-reporting = "0.4.0"
|
language-reporting = "0.4.0"
|
||||||
num-bigint = { version = "0.2.3", features = ["serde"] }
|
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||||
num-traits = "0.2.10"
|
num-traits = "0.2.11"
|
||||||
serde = { version = "1.0.103", features = ["derive"] }
|
serde = { version = "1.0.106", features = ["derive"] }
|
||||||
nom = "5.0.1"
|
|
||||||
nom_locate = "1.0.0"
|
|
||||||
getset = "0.0.9"
|
getset = "0.0.9"
|
||||||
|
|
||||||
# implement conversions
|
# implement conversions
|
||||||
serde_yaml = "0.8"
|
serde_yaml = "0.8"
|
||||||
toml = "0.5.5"
|
toml = "0.5.6"
|
||||||
serde_json = "1.0.44"
|
serde_json = "1.0.51"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
nu-build = { version = "0.12.0", path = "../nu-build" }
|
nu-build = { version = "0.12.0", path = "../nu-build" }
|
||||||
|
@ -3,9 +3,7 @@ use bigdecimal::BigDecimal;
|
|||||||
use derive_new::new;
|
use derive_new::new;
|
||||||
use getset::Getters;
|
use getset::Getters;
|
||||||
use language_reporting::{Diagnostic, Label, Severity};
|
use language_reporting::{Diagnostic, Label, Severity};
|
||||||
use nu_source::{
|
use nu_source::{b, DebugDocBuilder, HasFallibleSpan, PrettyDebug, Span, Spanned, SpannedItem};
|
||||||
b, DebugDocBuilder, HasFallibleSpan, PrettyDebug, Span, Spanned, SpannedItem, TracableContext,
|
|
||||||
};
|
|
||||||
use num_bigint::BigInt;
|
use num_bigint::BigInt;
|
||||||
use num_traits::ToPrimitive;
|
use num_traits::ToPrimitive;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
@ -413,33 +411,6 @@ impl ShellError {
|
|||||||
.start()
|
.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_error(
|
|
||||||
error: nom::Err<(
|
|
||||||
nom_locate::LocatedSpanEx<&str, TracableContext>,
|
|
||||||
nom::error::ErrorKind,
|
|
||||||
)>,
|
|
||||||
) -> ShellError {
|
|
||||||
use language_reporting::*;
|
|
||||||
|
|
||||||
match error {
|
|
||||||
nom::Err::Incomplete(_) => {
|
|
||||||
// TODO: Get span of EOF
|
|
||||||
let diagnostic = Diagnostic::new(
|
|
||||||
Severity::Error,
|
|
||||||
"Parse Error: Unexpected end of line".to_string(),
|
|
||||||
);
|
|
||||||
|
|
||||||
ShellError::diagnostic(diagnostic)
|
|
||||||
}
|
|
||||||
nom::Err::Failure(span) | nom::Err::Error(span) => {
|
|
||||||
let diagnostic = Diagnostic::new(Severity::Error, "Parse Error".to_string())
|
|
||||||
.with_label(Label::new_primary(Span::from(span.0)));
|
|
||||||
|
|
||||||
ShellError::diagnostic(diagnostic)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn diagnostic(diagnostic: Diagnostic<Span>) -> ShellError {
|
pub fn diagnostic(diagnostic: Diagnostic<Span>) -> ShellError {
|
||||||
ProximateShellError::Diagnostic(ShellDiagnostic { diagnostic }).start()
|
ProximateShellError::Diagnostic(ShellDiagnostic { diagnostic }).start()
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,10 @@ nu-source = { path = "../nu-source", version = "0.12.0" }
|
|||||||
nu-errors = { path = "../nu-errors", version = "0.12.0" }
|
nu-errors = { path = "../nu-errors", version = "0.12.0" }
|
||||||
nu-value-ext = { path = "../nu-value-ext", version = "0.12.0" }
|
nu-value-ext = { path = "../nu-value-ext", version = "0.12.0" }
|
||||||
|
|
||||||
indexmap = { version = "1.3.0", features = ["serde-1"] }
|
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||||
serde = { version = "1.0.103", features = ["derive"] }
|
serde = { version = "1.0.106", features = ["derive"] }
|
||||||
num-bigint = { version = "0.2.3", features = ["serde"] }
|
num-bigint = { version = "0.2.6", features = ["serde"] }
|
||||||
serde_json = "1.0.44"
|
serde_json = "1.0.51"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
nu-build = { version = "0.12.0", path = "../nu-build" }
|
nu-build = { version = "0.12.0", path = "../nu-build" }
|
||||||
|
@ -24,9 +24,6 @@ getset = "0.0.9"
|
|||||||
derive-new = "0.5.8"
|
derive-new = "0.5.8"
|
||||||
ansi_term = "0.12.1"
|
ansi_term = "0.12.1"
|
||||||
language-reporting = "0.4.0"
|
language-reporting = "0.4.0"
|
||||||
nom = "5.0.1"
|
|
||||||
nom_locate = "1.0.0"
|
|
||||||
nom-tracable = "0.4.1"
|
|
||||||
typetag = "0.1.4"
|
typetag = "0.1.4"
|
||||||
query_interface = "0.3.5"
|
query_interface = "0.3.5"
|
||||||
byte-unit = "3.0.3"
|
byte-unit = "3.0.3"
|
||||||
|
@ -13,8 +13,6 @@ doctest = false
|
|||||||
serde = { version = "1.0.103", features = ["derive"] }
|
serde = { version = "1.0.103", features = ["derive"] }
|
||||||
derive-new = "0.5.8"
|
derive-new = "0.5.8"
|
||||||
getset = "0.0.9"
|
getset = "0.0.9"
|
||||||
nom_locate = "1.0.0"
|
|
||||||
nom-tracable = "0.4.1"
|
|
||||||
language-reporting = "0.4.0"
|
language-reporting = "0.4.0"
|
||||||
termcolor = "1.0.5"
|
termcolor = "1.0.5"
|
||||||
pretty = "0.5.2"
|
pretty = "0.5.2"
|
||||||
|
@ -2,7 +2,6 @@ mod meta;
|
|||||||
mod pretty;
|
mod pretty;
|
||||||
mod term_colored;
|
mod term_colored;
|
||||||
mod text;
|
mod text;
|
||||||
mod tracable;
|
|
||||||
|
|
||||||
pub use self::meta::{
|
pub use self::meta::{
|
||||||
span_for_spanned_list, tag_for_tagged_list, AnchorLocation, HasFallibleSpan, HasSpan, HasTag,
|
span_for_spanned_list, tag_for_tagged_list, AnchorLocation, HasFallibleSpan, HasSpan, HasTag,
|
||||||
@ -14,4 +13,3 @@ pub use self::pretty::{
|
|||||||
};
|
};
|
||||||
pub use self::term_colored::TermColored;
|
pub use self::term_colored::TermColored;
|
||||||
pub use self::text::Text;
|
pub use self::text::Text;
|
||||||
pub use self::tracable::{nom_input, NomSpan, TracableContext};
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use crate::pretty::{b, DebugDocBuilder, PrettyDebugWithSource};
|
use crate::pretty::{b, DebugDocBuilder, PrettyDebugWithSource};
|
||||||
use crate::text::Text;
|
use crate::text::Text;
|
||||||
use crate::tracable::TracableContext;
|
|
||||||
|
|
||||||
use derive_new::new;
|
use derive_new::new;
|
||||||
use getset::Getters;
|
use getset::Getters;
|
||||||
@ -227,28 +226,6 @@ impl From<&Tag> for Tag {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> From<nom_locate::LocatedSpanEx<&str, T>> for Span {
|
|
||||||
fn from(input: nom_locate::LocatedSpanEx<&str, T>) -> Span {
|
|
||||||
Span::new(input.offset, input.offset + input.fragment.len())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<T>
|
|
||||||
From<(
|
|
||||||
nom_locate::LocatedSpanEx<T, u64>,
|
|
||||||
nom_locate::LocatedSpanEx<T, u64>,
|
|
||||||
)> for Span
|
|
||||||
{
|
|
||||||
fn from(
|
|
||||||
input: (
|
|
||||||
nom_locate::LocatedSpanEx<T, u64>,
|
|
||||||
nom_locate::LocatedSpanEx<T, u64>,
|
|
||||||
),
|
|
||||||
) -> Span {
|
|
||||||
Span::new(input.0.offset, input.1.offset)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<(usize, usize)> for Span {
|
impl From<(usize, usize)> for Span {
|
||||||
fn from(input: (usize, usize)) -> Span {
|
fn from(input: (usize, usize)) -> Span {
|
||||||
Span::new(input.0, input.1)
|
Span::new(input.0, input.1)
|
||||||
@ -298,15 +275,6 @@ impl From<&Span> for Tag {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<(usize, usize, TracableContext)> for Tag {
|
|
||||||
fn from((start, end, _context): (usize, usize, TracableContext)) -> Self {
|
|
||||||
Tag {
|
|
||||||
anchor: None,
|
|
||||||
span: Span::new(start, end),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<(usize, usize, AnchorLocation)> for Tag {
|
impl From<(usize, usize, AnchorLocation)> for Tag {
|
||||||
fn from((start, end, anchor): (usize, usize, AnchorLocation)) -> Self {
|
fn from((start, end, anchor): (usize, usize, AnchorLocation)) -> Self {
|
||||||
Tag {
|
Tag {
|
||||||
@ -325,15 +293,6 @@ impl From<(usize, usize, Option<AnchorLocation>)> for Tag {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<nom_locate::LocatedSpanEx<&str, TracableContext>> for Tag {
|
|
||||||
fn from(input: nom_locate::LocatedSpanEx<&str, TracableContext>) -> Tag {
|
|
||||||
Tag {
|
|
||||||
anchor: None,
|
|
||||||
span: Span::new(input.offset, input.offset + input.fragment.len()),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<Tag> for Span {
|
impl From<Tag> for Span {
|
||||||
fn from(tag: Tag) -> Self {
|
fn from(tag: Tag) -> Self {
|
||||||
tag.span
|
tag.span
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
use derive_new::new;
|
|
||||||
use nom_locate::LocatedSpanEx;
|
|
||||||
use nom_tracable::{HasTracableInfo, TracableInfo};
|
|
||||||
|
|
||||||
pub type NomSpan<'a> = LocatedSpanEx<&'a str, TracableContext>;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, new)]
|
|
||||||
pub struct TracableContext {
|
|
||||||
pub(crate) info: TracableInfo,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl HasTracableInfo for TracableContext {
|
|
||||||
fn get_tracable_info(&self) -> TracableInfo {
|
|
||||||
self.info
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_tracable_info(self, info: TracableInfo) -> Self {
|
|
||||||
TracableContext { info }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl std::ops::Deref for TracableContext {
|
|
||||||
type Target = TracableInfo;
|
|
||||||
|
|
||||||
fn deref(&self) -> &TracableInfo {
|
|
||||||
&self.info
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn nom_input(s: &str) -> NomSpan<'_> {
|
|
||||||
LocatedSpanEx::new_extra(s, TracableContext::new(TracableInfo::new()))
|
|
||||||
}
|
|
@ -16,10 +16,10 @@ nu-protocol = { path = "../nu-protocol", version = "0.12.0" }
|
|||||||
|
|
||||||
app_dirs = "1.2.1"
|
app_dirs = "1.2.1"
|
||||||
dunce = "1.0.0"
|
dunce = "1.0.0"
|
||||||
getset = "0.0.9"
|
getset = "0.1.0"
|
||||||
glob = "0.3.0"
|
glob = "0.3.0"
|
||||||
tempfile = "3.1.0"
|
tempfile = "3.1.0"
|
||||||
indexmap = { version = "1.3.0", features = ["serde-1"] }
|
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
nu-build = { version = "0.12.0", path = "../nu-build" }
|
nu-build = { version = "0.12.0", path = "../nu-build" }
|
||||||
|
@ -15,9 +15,9 @@ nu-errors = { path = "../nu-errors", version = "0.12.0" }
|
|||||||
nu-parser = { path = "../nu-parser", version = "0.12.0" }
|
nu-parser = { path = "../nu-parser", version = "0.12.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.12.0" }
|
nu-protocol = { path = "../nu-protocol", version = "0.12.0" }
|
||||||
|
|
||||||
num-traits = "0.2.10"
|
num-traits = "0.2.11"
|
||||||
itertools = "0.8.2"
|
itertools = "0.9.0"
|
||||||
indexmap = { version = "1.3.0", features = ["serde-1"] }
|
indexmap = { version = "1.3.2", features = ["serde-1"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
nu-build = { version = "0.12.0", path = "../nu-build" }
|
nu-build = { version = "0.12.0", path = "../nu-build" }
|
||||||
|
@ -11,7 +11,7 @@ doctest = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ansi_term = "0.12.1"
|
ansi_term = "0.12.1"
|
||||||
crossterm = { version = "0.16.0" }
|
crossterm = { version = "0.17.1" }
|
||||||
nu-plugin = { path = "../nu-plugin", version = "0.12.0" }
|
nu-plugin = { path = "../nu-plugin", version = "0.12.0" }
|
||||||
nu-protocol = { path = "../nu-protocol", version = "0.12.0" }
|
nu-protocol = { path = "../nu-protocol", version = "0.12.0" }
|
||||||
nu-source = { path = "../nu-source", version = "0.12.0" }
|
nu-source = { path = "../nu-source", version = "0.12.0" }
|
||||||
|
@ -17,8 +17,8 @@ nu-errors = { path = "../nu-errors", version = "0.12.0" }
|
|||||||
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
futures = { version = "0.3", features = ["compat", "io-compat"] }
|
||||||
surf = "1.0.3"
|
surf = "1.0.3"
|
||||||
url = "2.1.1"
|
url = "2.1.1"
|
||||||
serde_json = "1.0.46"
|
serde_json = "1.0.51"
|
||||||
base64 = "0.11"
|
base64 = "0.12.0"
|
||||||
num-traits = "0.2.11"
|
num-traits = "0.2.11"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
@ -15,9 +15,8 @@ nu-protocol = { path = "../nu-protocol", version = "0.12.0" }
|
|||||||
nu-source = { path = "../nu-source", version = "0.12.0" }
|
nu-source = { path = "../nu-source", version = "0.12.0" }
|
||||||
nu-errors = { path = "../nu-errors", version = "0.12.0" }
|
nu-errors = { path = "../nu-errors", version = "0.12.0" }
|
||||||
|
|
||||||
crossterm = "0.16.0"
|
crossterm = "0.17.1"
|
||||||
syntect = "3.2.0"
|
syntect = { version = "4.1", default-features = false, features = ["default-fancy"]}
|
||||||
onig_sys = "~69.1.0"
|
|
||||||
ansi_term = "0.12.1"
|
ansi_term = "0.12.1"
|
||||||
url = "2.1.1"
|
url = "2.1.1"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user