├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── src └── main.rs └── test.json /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .DS_Store -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "adler2" 7 | version = "2.0.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 10 | 11 | [[package]] 12 | name = "aho-corasick" 13 | version = "1.1.3" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 16 | dependencies = [ 17 | "memchr", 18 | ] 19 | 20 | [[package]] 21 | name = "alloc-no-stdlib" 22 | version = "2.0.4" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" 25 | 26 | [[package]] 27 | name = "alloc-stdlib" 28 | version = "0.2.2" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" 31 | dependencies = [ 32 | "alloc-no-stdlib", 33 | ] 34 | 35 | [[package]] 36 | name = "allocator-api2" 37 | version = "0.2.21" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" 40 | 41 | [[package]] 42 | name = "android-tzdata" 43 | version = "0.1.1" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 46 | 47 | [[package]] 48 | name = "android_system_properties" 49 | version = "0.1.5" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 52 | dependencies = [ 53 | "libc", 54 | ] 55 | 56 | [[package]] 57 | name = "arrayvec" 58 | version = "0.7.6" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 61 | 62 | [[package]] 63 | name = "autocfg" 64 | version = "1.4.0" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 67 | 68 | [[package]] 69 | name = "bindgen" 70 | version = "0.70.1" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" 73 | dependencies = [ 74 | "bitflags", 75 | "cexpr", 76 | "clang-sys", 77 | "itertools", 78 | "proc-macro2", 79 | "quote", 80 | "regex", 81 | "rustc-hash", 82 | "shlex", 83 | "syn", 84 | ] 85 | 86 | [[package]] 87 | name = "bit-set" 88 | version = "0.8.0" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" 91 | dependencies = [ 92 | "bit-vec", 93 | ] 94 | 95 | [[package]] 96 | name = "bit-vec" 97 | version = "0.8.0" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" 100 | 101 | [[package]] 102 | name = "bitflags" 103 | version = "2.6.0" 104 | source = "registry+https://github.com/rust-lang/crates.io-index" 105 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 106 | 107 | [[package]] 108 | name = "brotli" 109 | version = "7.0.0" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" 112 | dependencies = [ 113 | "alloc-no-stdlib", 114 | "alloc-stdlib", 115 | "brotli-decompressor", 116 | ] 117 | 118 | [[package]] 119 | name = "brotli-decompressor" 120 | version = "4.0.1" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" 123 | dependencies = [ 124 | "alloc-no-stdlib", 125 | "alloc-stdlib", 126 | ] 127 | 128 | [[package]] 129 | name = "bumpalo" 130 | version = "3.16.0" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 133 | 134 | [[package]] 135 | name = "byteorder" 136 | version = "1.5.0" 137 | source = "registry+https://github.com/rust-lang/crates.io-index" 138 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 139 | 140 | [[package]] 141 | name = "bytes" 142 | version = "1.9.0" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" 145 | 146 | [[package]] 147 | name = "bytesize" 148 | version = "1.3.3" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659" 151 | 152 | [[package]] 153 | name = "cc" 154 | version = "1.2.5" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" 157 | dependencies = [ 158 | "shlex", 159 | ] 160 | 161 | [[package]] 162 | name = "cexpr" 163 | version = "0.6.0" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 166 | dependencies = [ 167 | "nom", 168 | ] 169 | 170 | [[package]] 171 | name = "cfg-if" 172 | version = "1.0.0" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 175 | 176 | [[package]] 177 | name = "cfg_aliases" 178 | version = "0.2.1" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 181 | 182 | [[package]] 183 | name = "chrono" 184 | version = "0.4.39" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" 187 | dependencies = [ 188 | "android-tzdata", 189 | "iana-time-zone", 190 | "num-traits", 191 | "pure-rust-locales", 192 | "serde", 193 | "windows-targets 0.52.6", 194 | ] 195 | 196 | [[package]] 197 | name = "chrono-humanize" 198 | version = "0.2.3" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" 201 | dependencies = [ 202 | "chrono", 203 | ] 204 | 205 | [[package]] 206 | name = "clang-sys" 207 | version = "1.8.1" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 210 | dependencies = [ 211 | "glob", 212 | "libc", 213 | "libloading", 214 | ] 215 | 216 | [[package]] 217 | name = "const_format" 218 | version = "0.2.34" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" 221 | dependencies = [ 222 | "const_format_proc_macros", 223 | ] 224 | 225 | [[package]] 226 | name = "const_format_proc_macros" 227 | version = "0.2.34" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" 230 | dependencies = [ 231 | "proc-macro2", 232 | "quote", 233 | "unicode-xid", 234 | ] 235 | 236 | [[package]] 237 | name = "core-foundation-sys" 238 | version = "0.8.7" 239 | source = "registry+https://github.com/rust-lang/crates.io-index" 240 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 241 | 242 | [[package]] 243 | name = "crc32fast" 244 | version = "1.4.2" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 247 | dependencies = [ 248 | "cfg-if", 249 | ] 250 | 251 | [[package]] 252 | name = "crossbeam-deque" 253 | version = "0.8.6" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" 256 | dependencies = [ 257 | "crossbeam-epoch", 258 | "crossbeam-utils", 259 | ] 260 | 261 | [[package]] 262 | name = "crossbeam-epoch" 263 | version = "0.9.18" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 266 | dependencies = [ 267 | "crossbeam-utils", 268 | ] 269 | 270 | [[package]] 271 | name = "crossbeam-utils" 272 | version = "0.8.21" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 275 | 276 | [[package]] 277 | name = "crossterm" 278 | version = "0.28.1" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" 281 | dependencies = [ 282 | "bitflags", 283 | "crossterm_winapi", 284 | "mio", 285 | "parking_lot", 286 | "rustix", 287 | "signal-hook", 288 | "signal-hook-mio", 289 | "winapi", 290 | ] 291 | 292 | [[package]] 293 | name = "crossterm_winapi" 294 | version = "0.9.1" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" 297 | dependencies = [ 298 | "winapi", 299 | ] 300 | 301 | [[package]] 302 | name = "deranged" 303 | version = "0.3.11" 304 | source = "registry+https://github.com/rust-lang/crates.io-index" 305 | checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 306 | dependencies = [ 307 | "powerfmt", 308 | ] 309 | 310 | [[package]] 311 | name = "dirs" 312 | version = "5.0.1" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" 315 | dependencies = [ 316 | "dirs-sys", 317 | ] 318 | 319 | [[package]] 320 | name = "dirs-sys" 321 | version = "0.4.1" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" 324 | dependencies = [ 325 | "libc", 326 | "option-ext", 327 | "redox_users", 328 | "windows-sys 0.48.0", 329 | ] 330 | 331 | [[package]] 332 | name = "doctest-file" 333 | version = "1.0.0" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "aac81fa3e28d21450aa4d2ac065992ba96a1d7303efbce51a95f4fd175b67562" 336 | 337 | [[package]] 338 | name = "either" 339 | version = "1.13.0" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 342 | 343 | [[package]] 344 | name = "equivalent" 345 | version = "1.0.1" 346 | source = "registry+https://github.com/rust-lang/crates.io-index" 347 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 348 | 349 | [[package]] 350 | name = "erased-serde" 351 | version = "0.4.5" 352 | source = "registry+https://github.com/rust-lang/crates.io-index" 353 | checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" 354 | dependencies = [ 355 | "serde", 356 | "typeid", 357 | ] 358 | 359 | [[package]] 360 | name = "errno" 361 | version = "0.3.10" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" 364 | dependencies = [ 365 | "libc", 366 | "windows-sys 0.59.0", 367 | ] 368 | 369 | [[package]] 370 | name = "fancy-regex" 371 | version = "0.14.0" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298" 374 | dependencies = [ 375 | "bit-set", 376 | "regex-automata", 377 | "regex-syntax", 378 | ] 379 | 380 | [[package]] 381 | name = "flate2" 382 | version = "1.0.35" 383 | source = "registry+https://github.com/rust-lang/crates.io-index" 384 | checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" 385 | dependencies = [ 386 | "crc32fast", 387 | "miniz_oxide", 388 | ] 389 | 390 | [[package]] 391 | name = "foldhash" 392 | version = "0.1.4" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" 395 | 396 | [[package]] 397 | name = "getrandom" 398 | version = "0.2.15" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 401 | dependencies = [ 402 | "cfg-if", 403 | "libc", 404 | "wasi", 405 | ] 406 | 407 | [[package]] 408 | name = "glob" 409 | version = "0.3.1" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 412 | 413 | [[package]] 414 | name = "hashbrown" 415 | version = "0.15.2" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 418 | dependencies = [ 419 | "allocator-api2", 420 | "equivalent", 421 | "foldhash", 422 | ] 423 | 424 | [[package]] 425 | name = "heck" 426 | version = "0.5.0" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 429 | 430 | [[package]] 431 | name = "hex" 432 | version = "0.4.3" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 435 | 436 | [[package]] 437 | name = "iana-time-zone" 438 | version = "0.1.61" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" 441 | dependencies = [ 442 | "android_system_properties", 443 | "core-foundation-sys", 444 | "iana-time-zone-haiku", 445 | "js-sys", 446 | "wasm-bindgen", 447 | "windows-core 0.52.0", 448 | ] 449 | 450 | [[package]] 451 | name = "iana-time-zone-haiku" 452 | version = "0.1.2" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 455 | dependencies = [ 456 | "cc", 457 | ] 458 | 459 | [[package]] 460 | name = "indexmap" 461 | version = "2.9.0" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 464 | dependencies = [ 465 | "equivalent", 466 | "hashbrown", 467 | ] 468 | 469 | [[package]] 470 | name = "interprocess" 471 | version = "2.2.2" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "894148491d817cb36b6f778017b8ac46b17408d522dd90f539d677ea938362eb" 474 | dependencies = [ 475 | "doctest-file", 476 | "libc", 477 | "recvmsg", 478 | "widestring", 479 | "windows-sys 0.52.0", 480 | ] 481 | 482 | [[package]] 483 | name = "inventory" 484 | version = "0.3.19" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "54b12ebb6799019b044deaf431eadfe23245b259bba5a2c0796acec3943a3cdb" 487 | dependencies = [ 488 | "rustversion", 489 | ] 490 | 491 | [[package]] 492 | name = "is_ci" 493 | version = "1.2.0" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" 496 | 497 | [[package]] 498 | name = "is_debug" 499 | version = "1.1.0" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "1fe266d2e243c931d8190177f20bf7f24eed45e96f39e87dc49a27b32d12d407" 502 | 503 | [[package]] 504 | name = "itertools" 505 | version = "0.13.0" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 508 | dependencies = [ 509 | "either", 510 | ] 511 | 512 | [[package]] 513 | name = "itoa" 514 | version = "1.0.14" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" 517 | 518 | [[package]] 519 | name = "js-sys" 520 | version = "0.3.76" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" 523 | dependencies = [ 524 | "once_cell", 525 | "wasm-bindgen", 526 | ] 527 | 528 | [[package]] 529 | name = "libc" 530 | version = "0.2.169" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" 533 | 534 | [[package]] 535 | name = "libloading" 536 | version = "0.8.6" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" 539 | dependencies = [ 540 | "cfg-if", 541 | "windows-targets 0.52.6", 542 | ] 543 | 544 | [[package]] 545 | name = "libproc" 546 | version = "0.14.10" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "e78a09b56be5adbcad5aa1197371688dc6bb249a26da3bca2011ee2fb987ebfb" 549 | dependencies = [ 550 | "bindgen", 551 | "errno", 552 | "libc", 553 | ] 554 | 555 | [[package]] 556 | name = "libredox" 557 | version = "0.1.3" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 560 | dependencies = [ 561 | "bitflags", 562 | "libc", 563 | ] 564 | 565 | [[package]] 566 | name = "linux-raw-sys" 567 | version = "0.4.14" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 570 | 571 | [[package]] 572 | name = "lock_api" 573 | version = "0.4.12" 574 | source = "registry+https://github.com/rust-lang/crates.io-index" 575 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 576 | dependencies = [ 577 | "autocfg", 578 | "scopeguard", 579 | ] 580 | 581 | [[package]] 582 | name = "log" 583 | version = "0.4.22" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 586 | 587 | [[package]] 588 | name = "lru" 589 | version = "0.12.5" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" 592 | dependencies = [ 593 | "hashbrown", 594 | ] 595 | 596 | [[package]] 597 | name = "lscolors" 598 | version = "0.17.0" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "53304fff6ab1e597661eee37e42ea8c47a146fca280af902bb76bff8a896e523" 601 | dependencies = [ 602 | "nu-ansi-term", 603 | ] 604 | 605 | [[package]] 606 | name = "mach2" 607 | version = "0.4.2" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" 610 | dependencies = [ 611 | "libc", 612 | ] 613 | 614 | [[package]] 615 | name = "memchr" 616 | version = "2.7.4" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 619 | 620 | [[package]] 621 | name = "miette" 622 | version = "7.5.0" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "1a955165f87b37fd1862df2a59547ac542c77ef6d17c666f619d1ad22dd89484" 625 | dependencies = [ 626 | "cfg-if", 627 | "miette-derive", 628 | "owo-colors", 629 | "supports-color", 630 | "supports-hyperlinks", 631 | "supports-unicode", 632 | "terminal_size", 633 | "textwrap", 634 | "thiserror 1.0.69", 635 | "unicode-width", 636 | ] 637 | 638 | [[package]] 639 | name = "miette-derive" 640 | version = "7.5.0" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "bf45bf44ab49be92fd1227a3be6fc6f617f1a337c06af54981048574d8783147" 643 | dependencies = [ 644 | "proc-macro2", 645 | "quote", 646 | "syn", 647 | ] 648 | 649 | [[package]] 650 | name = "minimal-lexical" 651 | version = "0.2.1" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 654 | 655 | [[package]] 656 | name = "miniz_oxide" 657 | version = "0.8.2" 658 | source = "registry+https://github.com/rust-lang/crates.io-index" 659 | checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" 660 | dependencies = [ 661 | "adler2", 662 | ] 663 | 664 | [[package]] 665 | name = "mio" 666 | version = "1.0.3" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" 669 | dependencies = [ 670 | "libc", 671 | "log", 672 | "wasi", 673 | "windows-sys 0.52.0", 674 | ] 675 | 676 | [[package]] 677 | name = "nix" 678 | version = "0.29.0" 679 | source = "registry+https://github.com/rust-lang/crates.io-index" 680 | checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" 681 | dependencies = [ 682 | "bitflags", 683 | "cfg-if", 684 | "cfg_aliases", 685 | "libc", 686 | ] 687 | 688 | [[package]] 689 | name = "nom" 690 | version = "7.1.3" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 693 | dependencies = [ 694 | "memchr", 695 | "minimal-lexical", 696 | ] 697 | 698 | [[package]] 699 | name = "ntapi" 700 | version = "0.4.1" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" 703 | dependencies = [ 704 | "winapi", 705 | ] 706 | 707 | [[package]] 708 | name = "nu-ansi-term" 709 | version = "0.50.1" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" 712 | dependencies = [ 713 | "windows-sys 0.52.0", 714 | ] 715 | 716 | [[package]] 717 | name = "nu-cmd-lang" 718 | version = "0.104.0" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "e66adfeda88f8e27bcb25d068d9e6e8b3a94c2bf988a9c30e8e3b2045867aefe" 721 | dependencies = [ 722 | "itertools", 723 | "nu-engine", 724 | "nu-parser", 725 | "nu-protocol", 726 | "nu-utils", 727 | "shadow-rs", 728 | ] 729 | 730 | [[package]] 731 | name = "nu-derive-value" 732 | version = "0.104.0" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "5fd0d8e358b6440d01fe4e617f180aea826bade72efb54f5dc1c22e0e8038b6f" 735 | dependencies = [ 736 | "heck", 737 | "proc-macro-error2", 738 | "proc-macro2", 739 | "quote", 740 | "syn", 741 | ] 742 | 743 | [[package]] 744 | name = "nu-engine" 745 | version = "0.104.0" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "0c2b01483e3d09460375f0c0da7a83b6dc26fb319ca09c55d0665087b2d587c7" 748 | dependencies = [ 749 | "log", 750 | "nu-glob", 751 | "nu-path", 752 | "nu-protocol", 753 | "nu-utils", 754 | ] 755 | 756 | [[package]] 757 | name = "nu-glob" 758 | version = "0.104.0" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "202ce25889336061efea24e69d4e0de7147c15fd9892cdd70533500d47db8364" 761 | 762 | [[package]] 763 | name = "nu-parser" 764 | version = "0.104.0" 765 | source = "registry+https://github.com/rust-lang/crates.io-index" 766 | checksum = "cb0591ef4d4989c1930863d9d17d8fd2d70b03ec2d9caeca067e9626e05c49d9" 767 | dependencies = [ 768 | "bytesize", 769 | "chrono", 770 | "itertools", 771 | "log", 772 | "nu-engine", 773 | "nu-path", 774 | "nu-plugin-engine", 775 | "nu-protocol", 776 | "nu-utils", 777 | "serde_json", 778 | ] 779 | 780 | [[package]] 781 | name = "nu-path" 782 | version = "0.104.0" 783 | source = "registry+https://github.com/rust-lang/crates.io-index" 784 | checksum = "41c68c7c06898a5c4c9f10038da63759661cb8ac8f301ce7d159173a595c8258" 785 | dependencies = [ 786 | "dirs", 787 | "omnipath", 788 | "pwd", 789 | "ref-cast", 790 | ] 791 | 792 | [[package]] 793 | name = "nu-plugin" 794 | version = "0.104.0" 795 | source = "registry+https://github.com/rust-lang/crates.io-index" 796 | checksum = "e00d2ccb35a1206c51740bea63b0deb72dc4c34ca6ceae6feac95f84d68370d2" 797 | dependencies = [ 798 | "log", 799 | "nix", 800 | "nu-engine", 801 | "nu-plugin-core", 802 | "nu-plugin-protocol", 803 | "nu-protocol", 804 | "nu-utils", 805 | "thiserror 2.0.12", 806 | ] 807 | 808 | [[package]] 809 | name = "nu-plugin-core" 810 | version = "0.104.0" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | checksum = "30e416e6de2b62925ffc1924740a0e5340316a1630af3d2490d513bcb1f94e94" 813 | dependencies = [ 814 | "interprocess", 815 | "log", 816 | "nu-plugin-protocol", 817 | "nu-protocol", 818 | "rmp-serde", 819 | "serde", 820 | "serde_json", 821 | "windows 0.56.0", 822 | ] 823 | 824 | [[package]] 825 | name = "nu-plugin-engine" 826 | version = "0.104.0" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | checksum = "14fb214ba23829ebfe61b9a5e0688cd5620922438d7d76a6f6b3e1151d07e82a" 829 | dependencies = [ 830 | "log", 831 | "nu-engine", 832 | "nu-plugin-core", 833 | "nu-plugin-protocol", 834 | "nu-protocol", 835 | "nu-system", 836 | "nu-utils", 837 | "serde", 838 | "windows 0.56.0", 839 | ] 840 | 841 | [[package]] 842 | name = "nu-plugin-protocol" 843 | version = "0.104.0" 844 | source = "registry+https://github.com/rust-lang/crates.io-index" 845 | checksum = "be7edbdee451bb29150b5e8184660d79d0c0801a6748b9f712b758cb78110305" 846 | dependencies = [ 847 | "nu-protocol", 848 | "nu-utils", 849 | "rmp-serde", 850 | "semver", 851 | "serde", 852 | "typetag", 853 | ] 854 | 855 | [[package]] 856 | name = "nu-plugin-test-support" 857 | version = "0.104.0" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "b8acb62c21fd980e467162bc17a4e93a8435e28249256b52e58718278149978d" 860 | dependencies = [ 861 | "nu-ansi-term", 862 | "nu-cmd-lang", 863 | "nu-engine", 864 | "nu-parser", 865 | "nu-plugin", 866 | "nu-plugin-core", 867 | "nu-plugin-engine", 868 | "nu-plugin-protocol", 869 | "nu-protocol", 870 | "similar", 871 | ] 872 | 873 | [[package]] 874 | name = "nu-protocol" 875 | version = "0.104.0" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "ab657b1947f1fad3c5052cb210fa311744736a4800a966ae21c4bc63de7c60ab" 878 | dependencies = [ 879 | "brotli", 880 | "bytes", 881 | "chrono", 882 | "chrono-humanize", 883 | "dirs", 884 | "dirs-sys", 885 | "fancy-regex", 886 | "heck", 887 | "indexmap", 888 | "log", 889 | "lru", 890 | "memchr", 891 | "miette", 892 | "nix", 893 | "nu-derive-value", 894 | "nu-glob", 895 | "nu-path", 896 | "nu-system", 897 | "nu-utils", 898 | "num-format", 899 | "os_pipe", 900 | "rmp-serde", 901 | "serde", 902 | "serde_json", 903 | "strum", 904 | "strum_macros", 905 | "thiserror 2.0.12", 906 | "typetag", 907 | "web-time", 908 | "windows-sys 0.48.0", 909 | ] 910 | 911 | [[package]] 912 | name = "nu-system" 913 | version = "0.104.0" 914 | source = "registry+https://github.com/rust-lang/crates.io-index" 915 | checksum = "f47094aaab4f1e3a86c3960400d82a50fcabde907f964ae095963ec95669577a" 916 | dependencies = [ 917 | "chrono", 918 | "itertools", 919 | "libc", 920 | "libproc", 921 | "log", 922 | "mach2", 923 | "nix", 924 | "ntapi", 925 | "procfs", 926 | "sysinfo", 927 | "web-time", 928 | "windows 0.56.0", 929 | ] 930 | 931 | [[package]] 932 | name = "nu-utils" 933 | version = "0.104.0" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "327999b774d78b301a6b68c33d312a1a8047c59fb8971b6552ebf823251f1481" 936 | dependencies = [ 937 | "crossterm", 938 | "crossterm_winapi", 939 | "fancy-regex", 940 | "log", 941 | "lscolors", 942 | "nix", 943 | "num-format", 944 | "serde", 945 | "serde_json", 946 | "strip-ansi-escapes", 947 | "sys-locale", 948 | "unicase", 949 | ] 950 | 951 | [[package]] 952 | name = "nu_plugin_json_path" 953 | version = "0.14.0" 954 | dependencies = [ 955 | "nu-path", 956 | "nu-plugin", 957 | "nu-plugin-test-support", 958 | "nu-protocol", 959 | "serde_json", 960 | "serde_json_path", 961 | ] 962 | 963 | [[package]] 964 | name = "num-conv" 965 | version = "0.1.0" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 968 | 969 | [[package]] 970 | name = "num-format" 971 | version = "0.4.4" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" 974 | dependencies = [ 975 | "arrayvec", 976 | "itoa", 977 | ] 978 | 979 | [[package]] 980 | name = "num-traits" 981 | version = "0.2.19" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 984 | dependencies = [ 985 | "autocfg", 986 | ] 987 | 988 | [[package]] 989 | name = "num_threads" 990 | version = "0.1.7" 991 | source = "registry+https://github.com/rust-lang/crates.io-index" 992 | checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" 993 | dependencies = [ 994 | "libc", 995 | ] 996 | 997 | [[package]] 998 | name = "omnipath" 999 | version = "0.1.6" 1000 | source = "registry+https://github.com/rust-lang/crates.io-index" 1001 | checksum = "80adb31078122c880307e9cdfd4e3361e6545c319f9b9dcafcb03acd3b51a575" 1002 | 1003 | [[package]] 1004 | name = "once_cell" 1005 | version = "1.20.2" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 1008 | 1009 | [[package]] 1010 | name = "option-ext" 1011 | version = "0.2.0" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" 1014 | 1015 | [[package]] 1016 | name = "os_pipe" 1017 | version = "1.2.1" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" 1020 | dependencies = [ 1021 | "libc", 1022 | "windows-sys 0.59.0", 1023 | ] 1024 | 1025 | [[package]] 1026 | name = "owo-colors" 1027 | version = "4.1.0" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" 1030 | 1031 | [[package]] 1032 | name = "parking_lot" 1033 | version = "0.12.3" 1034 | source = "registry+https://github.com/rust-lang/crates.io-index" 1035 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1036 | dependencies = [ 1037 | "lock_api", 1038 | "parking_lot_core", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "parking_lot_core" 1043 | version = "0.9.10" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1046 | dependencies = [ 1047 | "cfg-if", 1048 | "libc", 1049 | "redox_syscall", 1050 | "smallvec", 1051 | "windows-targets 0.52.6", 1052 | ] 1053 | 1054 | [[package]] 1055 | name = "paste" 1056 | version = "1.0.15" 1057 | source = "registry+https://github.com/rust-lang/crates.io-index" 1058 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1059 | 1060 | [[package]] 1061 | name = "powerfmt" 1062 | version = "0.2.0" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1065 | 1066 | [[package]] 1067 | name = "proc-macro-error-attr2" 1068 | version = "2.0.0" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" 1071 | dependencies = [ 1072 | "proc-macro2", 1073 | "quote", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "proc-macro-error2" 1078 | version = "2.0.1" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" 1081 | dependencies = [ 1082 | "proc-macro-error-attr2", 1083 | "proc-macro2", 1084 | "quote", 1085 | "syn", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "proc-macro2" 1090 | version = "1.0.92" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" 1093 | dependencies = [ 1094 | "unicode-ident", 1095 | ] 1096 | 1097 | [[package]] 1098 | name = "procfs" 1099 | version = "0.17.0" 1100 | source = "registry+https://github.com/rust-lang/crates.io-index" 1101 | checksum = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" 1102 | dependencies = [ 1103 | "bitflags", 1104 | "chrono", 1105 | "flate2", 1106 | "hex", 1107 | "procfs-core", 1108 | "rustix", 1109 | ] 1110 | 1111 | [[package]] 1112 | name = "procfs-core" 1113 | version = "0.17.0" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" 1116 | dependencies = [ 1117 | "bitflags", 1118 | "chrono", 1119 | "hex", 1120 | ] 1121 | 1122 | [[package]] 1123 | name = "pure-rust-locales" 1124 | version = "0.8.1" 1125 | source = "registry+https://github.com/rust-lang/crates.io-index" 1126 | checksum = "1190fd18ae6ce9e137184f207593877e70f39b015040156b1e05081cdfe3733a" 1127 | 1128 | [[package]] 1129 | name = "pwd" 1130 | version = "1.4.0" 1131 | source = "registry+https://github.com/rust-lang/crates.io-index" 1132 | checksum = "72c71c0c79b9701efe4e1e4b563b2016dd4ee789eb99badcb09d61ac4b92e4a2" 1133 | dependencies = [ 1134 | "libc", 1135 | "thiserror 1.0.69", 1136 | ] 1137 | 1138 | [[package]] 1139 | name = "quote" 1140 | version = "1.0.37" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 1143 | dependencies = [ 1144 | "proc-macro2", 1145 | ] 1146 | 1147 | [[package]] 1148 | name = "rayon" 1149 | version = "1.10.0" 1150 | source = "registry+https://github.com/rust-lang/crates.io-index" 1151 | checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 1152 | dependencies = [ 1153 | "either", 1154 | "rayon-core", 1155 | ] 1156 | 1157 | [[package]] 1158 | name = "rayon-core" 1159 | version = "1.12.1" 1160 | source = "registry+https://github.com/rust-lang/crates.io-index" 1161 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 1162 | dependencies = [ 1163 | "crossbeam-deque", 1164 | "crossbeam-utils", 1165 | ] 1166 | 1167 | [[package]] 1168 | name = "recvmsg" 1169 | version = "1.0.0" 1170 | source = "registry+https://github.com/rust-lang/crates.io-index" 1171 | checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" 1172 | 1173 | [[package]] 1174 | name = "redox_syscall" 1175 | version = "0.5.8" 1176 | source = "registry+https://github.com/rust-lang/crates.io-index" 1177 | checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" 1178 | dependencies = [ 1179 | "bitflags", 1180 | ] 1181 | 1182 | [[package]] 1183 | name = "redox_users" 1184 | version = "0.4.6" 1185 | source = "registry+https://github.com/rust-lang/crates.io-index" 1186 | checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" 1187 | dependencies = [ 1188 | "getrandom", 1189 | "libredox", 1190 | "thiserror 1.0.69", 1191 | ] 1192 | 1193 | [[package]] 1194 | name = "ref-cast" 1195 | version = "1.0.23" 1196 | source = "registry+https://github.com/rust-lang/crates.io-index" 1197 | checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" 1198 | dependencies = [ 1199 | "ref-cast-impl", 1200 | ] 1201 | 1202 | [[package]] 1203 | name = "ref-cast-impl" 1204 | version = "1.0.23" 1205 | source = "registry+https://github.com/rust-lang/crates.io-index" 1206 | checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" 1207 | dependencies = [ 1208 | "proc-macro2", 1209 | "quote", 1210 | "syn", 1211 | ] 1212 | 1213 | [[package]] 1214 | name = "regex" 1215 | version = "1.11.1" 1216 | source = "registry+https://github.com/rust-lang/crates.io-index" 1217 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 1218 | dependencies = [ 1219 | "aho-corasick", 1220 | "memchr", 1221 | "regex-automata", 1222 | "regex-syntax", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "regex-automata" 1227 | version = "0.4.9" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 1230 | dependencies = [ 1231 | "aho-corasick", 1232 | "memchr", 1233 | "regex-syntax", 1234 | ] 1235 | 1236 | [[package]] 1237 | name = "regex-syntax" 1238 | version = "0.8.5" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 1241 | 1242 | [[package]] 1243 | name = "rmp" 1244 | version = "0.8.14" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" 1247 | dependencies = [ 1248 | "byteorder", 1249 | "num-traits", 1250 | "paste", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "rmp-serde" 1255 | version = "1.3.0" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" 1258 | dependencies = [ 1259 | "byteorder", 1260 | "rmp", 1261 | "serde", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "rustc-hash" 1266 | version = "1.1.0" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1269 | 1270 | [[package]] 1271 | name = "rustix" 1272 | version = "0.38.42" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" 1275 | dependencies = [ 1276 | "bitflags", 1277 | "errno", 1278 | "libc", 1279 | "linux-raw-sys", 1280 | "windows-sys 0.59.0", 1281 | ] 1282 | 1283 | [[package]] 1284 | name = "rustversion" 1285 | version = "1.0.18" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" 1288 | 1289 | [[package]] 1290 | name = "ryu" 1291 | version = "1.0.18" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 1294 | 1295 | [[package]] 1296 | name = "scopeguard" 1297 | version = "1.2.0" 1298 | source = "registry+https://github.com/rust-lang/crates.io-index" 1299 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1300 | 1301 | [[package]] 1302 | name = "semver" 1303 | version = "1.0.24" 1304 | source = "registry+https://github.com/rust-lang/crates.io-index" 1305 | checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" 1306 | 1307 | [[package]] 1308 | name = "serde" 1309 | version = "1.0.217" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" 1312 | dependencies = [ 1313 | "serde_derive", 1314 | ] 1315 | 1316 | [[package]] 1317 | name = "serde_derive" 1318 | version = "1.0.217" 1319 | source = "registry+https://github.com/rust-lang/crates.io-index" 1320 | checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" 1321 | dependencies = [ 1322 | "proc-macro2", 1323 | "quote", 1324 | "syn", 1325 | ] 1326 | 1327 | [[package]] 1328 | name = "serde_json" 1329 | version = "1.0.140" 1330 | source = "registry+https://github.com/rust-lang/crates.io-index" 1331 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 1332 | dependencies = [ 1333 | "itoa", 1334 | "memchr", 1335 | "ryu", 1336 | "serde", 1337 | ] 1338 | 1339 | [[package]] 1340 | name = "serde_json_path" 1341 | version = "0.7.2" 1342 | source = "registry+https://github.com/rust-lang/crates.io-index" 1343 | checksum = "b992cea3194eea663ba99a042d61cea4bd1872da37021af56f6a37e0359b9d33" 1344 | dependencies = [ 1345 | "inventory", 1346 | "nom", 1347 | "regex", 1348 | "serde", 1349 | "serde_json", 1350 | "serde_json_path_core", 1351 | "serde_json_path_macros", 1352 | "thiserror 2.0.12", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "serde_json_path_core" 1357 | version = "0.2.2" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "dde67d8dfe7d4967b5a95e247d4148368ddd1e753e500adb34b3ffe40c6bc1bc" 1360 | dependencies = [ 1361 | "inventory", 1362 | "serde", 1363 | "serde_json", 1364 | "thiserror 2.0.12", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "serde_json_path_macros" 1369 | version = "0.1.6" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "517acfa7f77ddaf5c43d5f119c44a683774e130b4247b7d3210f8924506cfac8" 1372 | dependencies = [ 1373 | "inventory", 1374 | "serde_json_path_core", 1375 | "serde_json_path_macros_internal", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "serde_json_path_macros_internal" 1380 | version = "0.1.2" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "aafbefbe175fa9bf03ca83ef89beecff7d2a95aaacd5732325b90ac8c3bd7b90" 1383 | dependencies = [ 1384 | "proc-macro2", 1385 | "quote", 1386 | "syn", 1387 | ] 1388 | 1389 | [[package]] 1390 | name = "shadow-rs" 1391 | version = "1.1.1" 1392 | source = "registry+https://github.com/rust-lang/crates.io-index" 1393 | checksum = "6d5625ed609cf66d7e505e7d487aca815626dc4ebb6c0dd07637ca61a44651a6" 1394 | dependencies = [ 1395 | "const_format", 1396 | "is_debug", 1397 | "time", 1398 | "tzdb", 1399 | ] 1400 | 1401 | [[package]] 1402 | name = "shlex" 1403 | version = "1.3.0" 1404 | source = "registry+https://github.com/rust-lang/crates.io-index" 1405 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1406 | 1407 | [[package]] 1408 | name = "signal-hook" 1409 | version = "0.3.17" 1410 | source = "registry+https://github.com/rust-lang/crates.io-index" 1411 | checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" 1412 | dependencies = [ 1413 | "libc", 1414 | "signal-hook-registry", 1415 | ] 1416 | 1417 | [[package]] 1418 | name = "signal-hook-mio" 1419 | version = "0.2.4" 1420 | source = "registry+https://github.com/rust-lang/crates.io-index" 1421 | checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" 1422 | dependencies = [ 1423 | "libc", 1424 | "mio", 1425 | "signal-hook", 1426 | ] 1427 | 1428 | [[package]] 1429 | name = "signal-hook-registry" 1430 | version = "1.4.2" 1431 | source = "registry+https://github.com/rust-lang/crates.io-index" 1432 | checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 1433 | dependencies = [ 1434 | "libc", 1435 | ] 1436 | 1437 | [[package]] 1438 | name = "similar" 1439 | version = "2.7.0" 1440 | source = "registry+https://github.com/rust-lang/crates.io-index" 1441 | checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" 1442 | 1443 | [[package]] 1444 | name = "smallvec" 1445 | version = "1.13.2" 1446 | source = "registry+https://github.com/rust-lang/crates.io-index" 1447 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1448 | 1449 | [[package]] 1450 | name = "strip-ansi-escapes" 1451 | version = "0.2.0" 1452 | source = "registry+https://github.com/rust-lang/crates.io-index" 1453 | checksum = "55ff8ef943b384c414f54aefa961dd2bd853add74ec75e7ac74cf91dba62bcfa" 1454 | dependencies = [ 1455 | "vte", 1456 | ] 1457 | 1458 | [[package]] 1459 | name = "strum" 1460 | version = "0.26.3" 1461 | source = "registry+https://github.com/rust-lang/crates.io-index" 1462 | checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" 1463 | 1464 | [[package]] 1465 | name = "strum_macros" 1466 | version = "0.26.4" 1467 | source = "registry+https://github.com/rust-lang/crates.io-index" 1468 | checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" 1469 | dependencies = [ 1470 | "heck", 1471 | "proc-macro2", 1472 | "quote", 1473 | "rustversion", 1474 | "syn", 1475 | ] 1476 | 1477 | [[package]] 1478 | name = "supports-color" 1479 | version = "3.0.2" 1480 | source = "registry+https://github.com/rust-lang/crates.io-index" 1481 | checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6" 1482 | dependencies = [ 1483 | "is_ci", 1484 | ] 1485 | 1486 | [[package]] 1487 | name = "supports-hyperlinks" 1488 | version = "3.1.0" 1489 | source = "registry+https://github.com/rust-lang/crates.io-index" 1490 | checksum = "804f44ed3c63152de6a9f90acbea1a110441de43006ea51bcce8f436196a288b" 1491 | 1492 | [[package]] 1493 | name = "supports-unicode" 1494 | version = "3.0.0" 1495 | source = "registry+https://github.com/rust-lang/crates.io-index" 1496 | checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" 1497 | 1498 | [[package]] 1499 | name = "syn" 1500 | version = "2.0.91" 1501 | source = "registry+https://github.com/rust-lang/crates.io-index" 1502 | checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" 1503 | dependencies = [ 1504 | "proc-macro2", 1505 | "quote", 1506 | "unicode-ident", 1507 | ] 1508 | 1509 | [[package]] 1510 | name = "sys-locale" 1511 | version = "0.3.2" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" 1514 | dependencies = [ 1515 | "libc", 1516 | ] 1517 | 1518 | [[package]] 1519 | name = "sysinfo" 1520 | version = "0.33.1" 1521 | source = "registry+https://github.com/rust-lang/crates.io-index" 1522 | checksum = "4fc858248ea01b66f19d8e8a6d55f41deaf91e9d495246fd01368d99935c6c01" 1523 | dependencies = [ 1524 | "core-foundation-sys", 1525 | "libc", 1526 | "memchr", 1527 | "ntapi", 1528 | "rayon", 1529 | "windows 0.57.0", 1530 | ] 1531 | 1532 | [[package]] 1533 | name = "terminal_size" 1534 | version = "0.4.1" 1535 | source = "registry+https://github.com/rust-lang/crates.io-index" 1536 | checksum = "5352447f921fda68cf61b4101566c0bdb5104eff6804d0678e5227580ab6a4e9" 1537 | dependencies = [ 1538 | "rustix", 1539 | "windows-sys 0.59.0", 1540 | ] 1541 | 1542 | [[package]] 1543 | name = "textwrap" 1544 | version = "0.16.1" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" 1547 | dependencies = [ 1548 | "unicode-linebreak", 1549 | "unicode-width", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "thiserror" 1554 | version = "1.0.69" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 1557 | dependencies = [ 1558 | "thiserror-impl 1.0.69", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "thiserror" 1563 | version = "2.0.12" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" 1566 | dependencies = [ 1567 | "thiserror-impl 2.0.12", 1568 | ] 1569 | 1570 | [[package]] 1571 | name = "thiserror-impl" 1572 | version = "1.0.69" 1573 | source = "registry+https://github.com/rust-lang/crates.io-index" 1574 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 1575 | dependencies = [ 1576 | "proc-macro2", 1577 | "quote", 1578 | "syn", 1579 | ] 1580 | 1581 | [[package]] 1582 | name = "thiserror-impl" 1583 | version = "2.0.12" 1584 | source = "registry+https://github.com/rust-lang/crates.io-index" 1585 | checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" 1586 | dependencies = [ 1587 | "proc-macro2", 1588 | "quote", 1589 | "syn", 1590 | ] 1591 | 1592 | [[package]] 1593 | name = "time" 1594 | version = "0.3.37" 1595 | source = "registry+https://github.com/rust-lang/crates.io-index" 1596 | checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" 1597 | dependencies = [ 1598 | "deranged", 1599 | "itoa", 1600 | "libc", 1601 | "num-conv", 1602 | "num_threads", 1603 | "powerfmt", 1604 | "serde", 1605 | "time-core", 1606 | "time-macros", 1607 | ] 1608 | 1609 | [[package]] 1610 | name = "time-core" 1611 | version = "0.1.2" 1612 | source = "registry+https://github.com/rust-lang/crates.io-index" 1613 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 1614 | 1615 | [[package]] 1616 | name = "time-macros" 1617 | version = "0.2.19" 1618 | source = "registry+https://github.com/rust-lang/crates.io-index" 1619 | checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" 1620 | dependencies = [ 1621 | "num-conv", 1622 | "time-core", 1623 | ] 1624 | 1625 | [[package]] 1626 | name = "typeid" 1627 | version = "1.0.2" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" 1630 | 1631 | [[package]] 1632 | name = "typetag" 1633 | version = "0.2.19" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "044fc3365ddd307c297fe0fe7b2e70588cdab4d0f62dc52055ca0d11b174cf0e" 1636 | dependencies = [ 1637 | "erased-serde", 1638 | "inventory", 1639 | "once_cell", 1640 | "serde", 1641 | "typetag-impl", 1642 | ] 1643 | 1644 | [[package]] 1645 | name = "typetag-impl" 1646 | version = "0.2.19" 1647 | source = "registry+https://github.com/rust-lang/crates.io-index" 1648 | checksum = "d9d30226ac9cbd2d1ff775f74e8febdab985dab14fb14aa2582c29a92d5555dc" 1649 | dependencies = [ 1650 | "proc-macro2", 1651 | "quote", 1652 | "syn", 1653 | ] 1654 | 1655 | [[package]] 1656 | name = "tz-rs" 1657 | version = "0.7.0" 1658 | source = "registry+https://github.com/rust-lang/crates.io-index" 1659 | checksum = "e1450bf2b99397e72070e7935c89facaa80092ac812502200375f1f7d33c71a1" 1660 | 1661 | [[package]] 1662 | name = "tzdb" 1663 | version = "0.7.2" 1664 | source = "registry+https://github.com/rust-lang/crates.io-index" 1665 | checksum = "0be2ea5956f295449f47c0b825c5e109022ff1a6a53bb4f77682a87c2341fbf5" 1666 | dependencies = [ 1667 | "iana-time-zone", 1668 | "tz-rs", 1669 | "tzdb_data", 1670 | ] 1671 | 1672 | [[package]] 1673 | name = "tzdb_data" 1674 | version = "0.2.2" 1675 | source = "registry+https://github.com/rust-lang/crates.io-index" 1676 | checksum = "9c4c81d75033770e40fbd3643ce7472a1a9fd301f90b7139038228daf8af03ec" 1677 | dependencies = [ 1678 | "tz-rs", 1679 | ] 1680 | 1681 | [[package]] 1682 | name = "unicase" 1683 | version = "2.8.1" 1684 | source = "registry+https://github.com/rust-lang/crates.io-index" 1685 | checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" 1686 | 1687 | [[package]] 1688 | name = "unicode-ident" 1689 | version = "1.0.14" 1690 | source = "registry+https://github.com/rust-lang/crates.io-index" 1691 | checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" 1692 | 1693 | [[package]] 1694 | name = "unicode-linebreak" 1695 | version = "0.1.5" 1696 | source = "registry+https://github.com/rust-lang/crates.io-index" 1697 | checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" 1698 | 1699 | [[package]] 1700 | name = "unicode-width" 1701 | version = "0.1.14" 1702 | source = "registry+https://github.com/rust-lang/crates.io-index" 1703 | checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 1704 | 1705 | [[package]] 1706 | name = "unicode-xid" 1707 | version = "0.2.6" 1708 | source = "registry+https://github.com/rust-lang/crates.io-index" 1709 | checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 1710 | 1711 | [[package]] 1712 | name = "utf8parse" 1713 | version = "0.2.2" 1714 | source = "registry+https://github.com/rust-lang/crates.io-index" 1715 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 1716 | 1717 | [[package]] 1718 | name = "vte" 1719 | version = "0.11.1" 1720 | source = "registry+https://github.com/rust-lang/crates.io-index" 1721 | checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" 1722 | dependencies = [ 1723 | "utf8parse", 1724 | "vte_generate_state_changes", 1725 | ] 1726 | 1727 | [[package]] 1728 | name = "vte_generate_state_changes" 1729 | version = "0.1.2" 1730 | source = "registry+https://github.com/rust-lang/crates.io-index" 1731 | checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" 1732 | dependencies = [ 1733 | "proc-macro2", 1734 | "quote", 1735 | ] 1736 | 1737 | [[package]] 1738 | name = "wasi" 1739 | version = "0.11.0+wasi-snapshot-preview1" 1740 | source = "registry+https://github.com/rust-lang/crates.io-index" 1741 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1742 | 1743 | [[package]] 1744 | name = "wasm-bindgen" 1745 | version = "0.2.99" 1746 | source = "registry+https://github.com/rust-lang/crates.io-index" 1747 | checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" 1748 | dependencies = [ 1749 | "cfg-if", 1750 | "once_cell", 1751 | "wasm-bindgen-macro", 1752 | ] 1753 | 1754 | [[package]] 1755 | name = "wasm-bindgen-backend" 1756 | version = "0.2.99" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" 1759 | dependencies = [ 1760 | "bumpalo", 1761 | "log", 1762 | "proc-macro2", 1763 | "quote", 1764 | "syn", 1765 | "wasm-bindgen-shared", 1766 | ] 1767 | 1768 | [[package]] 1769 | name = "wasm-bindgen-macro" 1770 | version = "0.2.99" 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" 1772 | checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" 1773 | dependencies = [ 1774 | "quote", 1775 | "wasm-bindgen-macro-support", 1776 | ] 1777 | 1778 | [[package]] 1779 | name = "wasm-bindgen-macro-support" 1780 | version = "0.2.99" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" 1783 | dependencies = [ 1784 | "proc-macro2", 1785 | "quote", 1786 | "syn", 1787 | "wasm-bindgen-backend", 1788 | "wasm-bindgen-shared", 1789 | ] 1790 | 1791 | [[package]] 1792 | name = "wasm-bindgen-shared" 1793 | version = "0.2.99" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" 1796 | 1797 | [[package]] 1798 | name = "web-time" 1799 | version = "1.1.0" 1800 | source = "registry+https://github.com/rust-lang/crates.io-index" 1801 | checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 1802 | dependencies = [ 1803 | "js-sys", 1804 | "wasm-bindgen", 1805 | ] 1806 | 1807 | [[package]] 1808 | name = "widestring" 1809 | version = "1.1.0" 1810 | source = "registry+https://github.com/rust-lang/crates.io-index" 1811 | checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" 1812 | 1813 | [[package]] 1814 | name = "winapi" 1815 | version = "0.3.9" 1816 | source = "registry+https://github.com/rust-lang/crates.io-index" 1817 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1818 | dependencies = [ 1819 | "winapi-i686-pc-windows-gnu", 1820 | "winapi-x86_64-pc-windows-gnu", 1821 | ] 1822 | 1823 | [[package]] 1824 | name = "winapi-i686-pc-windows-gnu" 1825 | version = "0.4.0" 1826 | source = "registry+https://github.com/rust-lang/crates.io-index" 1827 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1828 | 1829 | [[package]] 1830 | name = "winapi-x86_64-pc-windows-gnu" 1831 | version = "0.4.0" 1832 | source = "registry+https://github.com/rust-lang/crates.io-index" 1833 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1834 | 1835 | [[package]] 1836 | name = "windows" 1837 | version = "0.56.0" 1838 | source = "registry+https://github.com/rust-lang/crates.io-index" 1839 | checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" 1840 | dependencies = [ 1841 | "windows-core 0.56.0", 1842 | "windows-targets 0.52.6", 1843 | ] 1844 | 1845 | [[package]] 1846 | name = "windows" 1847 | version = "0.57.0" 1848 | source = "registry+https://github.com/rust-lang/crates.io-index" 1849 | checksum = "12342cb4d8e3b046f3d80effd474a7a02447231330ef77d71daa6fbc40681143" 1850 | dependencies = [ 1851 | "windows-core 0.57.0", 1852 | "windows-targets 0.52.6", 1853 | ] 1854 | 1855 | [[package]] 1856 | name = "windows-core" 1857 | version = "0.52.0" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 1860 | dependencies = [ 1861 | "windows-targets 0.52.6", 1862 | ] 1863 | 1864 | [[package]] 1865 | name = "windows-core" 1866 | version = "0.56.0" 1867 | source = "registry+https://github.com/rust-lang/crates.io-index" 1868 | checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" 1869 | dependencies = [ 1870 | "windows-implement 0.56.0", 1871 | "windows-interface 0.56.0", 1872 | "windows-result", 1873 | "windows-targets 0.52.6", 1874 | ] 1875 | 1876 | [[package]] 1877 | name = "windows-core" 1878 | version = "0.57.0" 1879 | source = "registry+https://github.com/rust-lang/crates.io-index" 1880 | checksum = "d2ed2439a290666cd67ecce2b0ffaad89c2a56b976b736e6ece670297897832d" 1881 | dependencies = [ 1882 | "windows-implement 0.57.0", 1883 | "windows-interface 0.57.0", 1884 | "windows-result", 1885 | "windows-targets 0.52.6", 1886 | ] 1887 | 1888 | [[package]] 1889 | name = "windows-implement" 1890 | version = "0.56.0" 1891 | source = "registry+https://github.com/rust-lang/crates.io-index" 1892 | checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" 1893 | dependencies = [ 1894 | "proc-macro2", 1895 | "quote", 1896 | "syn", 1897 | ] 1898 | 1899 | [[package]] 1900 | name = "windows-implement" 1901 | version = "0.57.0" 1902 | source = "registry+https://github.com/rust-lang/crates.io-index" 1903 | checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" 1904 | dependencies = [ 1905 | "proc-macro2", 1906 | "quote", 1907 | "syn", 1908 | ] 1909 | 1910 | [[package]] 1911 | name = "windows-interface" 1912 | version = "0.56.0" 1913 | source = "registry+https://github.com/rust-lang/crates.io-index" 1914 | checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" 1915 | dependencies = [ 1916 | "proc-macro2", 1917 | "quote", 1918 | "syn", 1919 | ] 1920 | 1921 | [[package]] 1922 | name = "windows-interface" 1923 | version = "0.57.0" 1924 | source = "registry+https://github.com/rust-lang/crates.io-index" 1925 | checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" 1926 | dependencies = [ 1927 | "proc-macro2", 1928 | "quote", 1929 | "syn", 1930 | ] 1931 | 1932 | [[package]] 1933 | name = "windows-result" 1934 | version = "0.1.2" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" 1937 | dependencies = [ 1938 | "windows-targets 0.52.6", 1939 | ] 1940 | 1941 | [[package]] 1942 | name = "windows-sys" 1943 | version = "0.48.0" 1944 | source = "registry+https://github.com/rust-lang/crates.io-index" 1945 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1946 | dependencies = [ 1947 | "windows-targets 0.48.5", 1948 | ] 1949 | 1950 | [[package]] 1951 | name = "windows-sys" 1952 | version = "0.52.0" 1953 | source = "registry+https://github.com/rust-lang/crates.io-index" 1954 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1955 | dependencies = [ 1956 | "windows-targets 0.52.6", 1957 | ] 1958 | 1959 | [[package]] 1960 | name = "windows-sys" 1961 | version = "0.59.0" 1962 | source = "registry+https://github.com/rust-lang/crates.io-index" 1963 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 1964 | dependencies = [ 1965 | "windows-targets 0.52.6", 1966 | ] 1967 | 1968 | [[package]] 1969 | name = "windows-targets" 1970 | version = "0.48.5" 1971 | source = "registry+https://github.com/rust-lang/crates.io-index" 1972 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 1973 | dependencies = [ 1974 | "windows_aarch64_gnullvm 0.48.5", 1975 | "windows_aarch64_msvc 0.48.5", 1976 | "windows_i686_gnu 0.48.5", 1977 | "windows_i686_msvc 0.48.5", 1978 | "windows_x86_64_gnu 0.48.5", 1979 | "windows_x86_64_gnullvm 0.48.5", 1980 | "windows_x86_64_msvc 0.48.5", 1981 | ] 1982 | 1983 | [[package]] 1984 | name = "windows-targets" 1985 | version = "0.52.6" 1986 | source = "registry+https://github.com/rust-lang/crates.io-index" 1987 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1988 | dependencies = [ 1989 | "windows_aarch64_gnullvm 0.52.6", 1990 | "windows_aarch64_msvc 0.52.6", 1991 | "windows_i686_gnu 0.52.6", 1992 | "windows_i686_gnullvm", 1993 | "windows_i686_msvc 0.52.6", 1994 | "windows_x86_64_gnu 0.52.6", 1995 | "windows_x86_64_gnullvm 0.52.6", 1996 | "windows_x86_64_msvc 0.52.6", 1997 | ] 1998 | 1999 | [[package]] 2000 | name = "windows_aarch64_gnullvm" 2001 | version = "0.48.5" 2002 | source = "registry+https://github.com/rust-lang/crates.io-index" 2003 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2004 | 2005 | [[package]] 2006 | name = "windows_aarch64_gnullvm" 2007 | version = "0.52.6" 2008 | source = "registry+https://github.com/rust-lang/crates.io-index" 2009 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2010 | 2011 | [[package]] 2012 | name = "windows_aarch64_msvc" 2013 | version = "0.48.5" 2014 | source = "registry+https://github.com/rust-lang/crates.io-index" 2015 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2016 | 2017 | [[package]] 2018 | name = "windows_aarch64_msvc" 2019 | version = "0.52.6" 2020 | source = "registry+https://github.com/rust-lang/crates.io-index" 2021 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2022 | 2023 | [[package]] 2024 | name = "windows_i686_gnu" 2025 | version = "0.48.5" 2026 | source = "registry+https://github.com/rust-lang/crates.io-index" 2027 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2028 | 2029 | [[package]] 2030 | name = "windows_i686_gnu" 2031 | version = "0.52.6" 2032 | source = "registry+https://github.com/rust-lang/crates.io-index" 2033 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2034 | 2035 | [[package]] 2036 | name = "windows_i686_gnullvm" 2037 | version = "0.52.6" 2038 | source = "registry+https://github.com/rust-lang/crates.io-index" 2039 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2040 | 2041 | [[package]] 2042 | name = "windows_i686_msvc" 2043 | version = "0.48.5" 2044 | source = "registry+https://github.com/rust-lang/crates.io-index" 2045 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2046 | 2047 | [[package]] 2048 | name = "windows_i686_msvc" 2049 | version = "0.52.6" 2050 | source = "registry+https://github.com/rust-lang/crates.io-index" 2051 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2052 | 2053 | [[package]] 2054 | name = "windows_x86_64_gnu" 2055 | version = "0.48.5" 2056 | source = "registry+https://github.com/rust-lang/crates.io-index" 2057 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2058 | 2059 | [[package]] 2060 | name = "windows_x86_64_gnu" 2061 | version = "0.52.6" 2062 | source = "registry+https://github.com/rust-lang/crates.io-index" 2063 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2064 | 2065 | [[package]] 2066 | name = "windows_x86_64_gnullvm" 2067 | version = "0.48.5" 2068 | source = "registry+https://github.com/rust-lang/crates.io-index" 2069 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2070 | 2071 | [[package]] 2072 | name = "windows_x86_64_gnullvm" 2073 | version = "0.52.6" 2074 | source = "registry+https://github.com/rust-lang/crates.io-index" 2075 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2076 | 2077 | [[package]] 2078 | name = "windows_x86_64_msvc" 2079 | version = "0.48.5" 2080 | source = "registry+https://github.com/rust-lang/crates.io-index" 2081 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2082 | 2083 | [[package]] 2084 | name = "windows_x86_64_msvc" 2085 | version = "0.52.6" 2086 | source = "registry+https://github.com/rust-lang/crates.io-index" 2087 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2088 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nu_plugin_json_path" 3 | version = "0.14.0" 4 | authors = ["Darren Schroeder"] 5 | edition = "2021" 6 | repository = "https://github.com/fdncred/nu_plugin_json_path" 7 | description = "a nushell plugin created to parse json files using jsonpath" 8 | license = "MIT" 9 | 10 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 11 | 12 | [dependencies] 13 | # nushell dependencies 14 | nu-plugin = "0.104.0" 15 | nu-protocol = "0.104.0" 16 | nu-path = "0.104.0" 17 | 18 | # for local development, you can use a path dependency 19 | # nu-plugin = { path = "../nushell/crates/nu-plugin", version = "0.98.0" } 20 | # nu-protocol = { path = "../nushell/crates/nu-protocol", version = "0.98.0" } 21 | # nu-path = { path = "../nushell/crates/nu-path", version = "0.98.0" } 22 | 23 | serde_json = "1.0.140" 24 | serde_json_path = "0.7.2" 25 | 26 | [dev-dependencies] 27 | nu-plugin-test-support = "0.104.0" 28 | # nu-plugin-test-support = { path = "../nushell/crates/nu-plugin-test-support" } 29 | 30 | [profile.release] 31 | opt-level = "s" # Optimize for size 32 | strip = "debuginfo" 33 | lto = "thin" 34 | 35 | [profile.dev] 36 | opt-level = 0 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 - 2022 The Nushell Project Developers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nu_plugin_json_path 2 | 3 | This [nushell](https://github.com/nushell/nushell) plugin is an attempt to enable the use of `JSONPath`. You can read more about JSONPath in the specification [here](https://www.ietf.org/archive/id/draft-ietf-jsonpath-base-10.html). 4 | 5 | ## Example Input 6 | 7 | This json file is taken from the JSONPath link above. 8 | 9 | ```json 10 | { 11 | "store": { 12 | "book": [ 13 | { "category": "reference", 14 | "author": "Nigel Rees", 15 | "title": "Sayings of the Century", 16 | "price": 8.95 17 | }, 18 | { "category": "fiction", 19 | "author": "Evelyn Waugh", 20 | "title": "Sword of Honour", 21 | "price": 12.99 22 | }, 23 | { "category": "fiction", 24 | "author": "Herman Melville", 25 | "title": "Moby Dick", 26 | "isbn": "0-553-21311-3", 27 | "price": 8.99 28 | }, 29 | { "category": "fiction", 30 | "author": "J. R. R. Tolkien", 31 | "title": "The Lord of the Rings", 32 | "isbn": "0-395-19395-8", 33 | "price": 22.99 34 | } 35 | ], 36 | "bicycle": { 37 | "color": "red", 38 | "price": 399 39 | } 40 | } 41 | } 42 | ``` 43 | ## Syntax and Description 44 | 45 | This table shows some example JSONPath syntax and the intended results for testing below. 46 | 47 | |#|JSONPath |Intended result| 48 | |-|-|-| 49 | |1|`$.store.book[*].author` |the authors of all books in the store| 50 | |2|`$..author` |all authors| 51 | |3|`$.store.*` |all things in store, which are some books and a red bicycle| 52 | |4|`$.store..price` |the prices of everything in the store| 53 | |5|`$..book[2]` |the third book| 54 | |6|`$..book[-1]` |the last book in order| 55 | |7|`$..book[0,1]`|the first two books| 56 | |8|`$..book[:2]` |the first two books| 57 | |9|`$..book[?(@.isbn)]` |all books with an ISBN number| 58 | |10|`$..book[?(@.price<10)]` |all books cheaper than 10| 59 | |11|`$..*` |all member values and array elements |contained in the input value 60 | 61 | ## Plugin Examples 62 | 63 | I saved the above json in a file named test.json, which is also in the repository. 64 | 65 | ### Example 1 66 | 67 | ```sh 68 | open test.json | json path '$.store.book[*].author' 69 | ``` 70 | ``` 71 | ╭───┬──────────────────╮ 72 | │ 0 │ Nigel Rees │ 73 | │ 1 │ Evelyn Waugh │ 74 | │ 2 │ Herman Melville │ 75 | │ 3 │ J. R. R. Tolkien │ 76 | ╰───┴──────────────────╯ 77 | ``` 78 | 79 | ### Example 2 80 | 81 | ```sh 82 | open test.json | json path '$..author' 83 | ``` 84 | ``` 85 | ╭───┬──────────────────╮ 86 | │ 0 │ Nigel Rees │ 87 | │ 1 │ Evelyn Waugh │ 88 | │ 2 │ Herman Melville │ 89 | │ 3 │ J. R. R. Tolkien │ 90 | ╰───┴──────────────────╯ 91 | ``` 92 | 93 | ### Example 3 94 | 95 | ```sh 96 | open test.json | json path '$.store.*' 97 | ``` 98 | ``` 99 | ╭───┬───────────────────╮ 100 | │ 0 │ {record 2 fields} │ 101 | │ 1 │ [table 4 rows] │ 102 | ╰───┴───────────────────╯ 103 | ``` 104 | ```sh 105 | open test.json | json path '$.store.*' | get 0 106 | ``` 107 | ``` 108 | ╭───────┬─────╮ 109 | │ color │ red │ 110 | │ price │ 399 │ 111 | ╰───────┴─────╯ 112 | ``` 113 | ```sh 114 | open test.json | json path '$.store.*' | get 1 115 | ``` 116 | ``` 117 | ╭───┬──────────────────┬───────────┬───────┬────────────────────────┬───────────────╮ 118 | │ # │ author │ category │ price │ title │ isbn │ 119 | ├───┼──────────────────┼───────────┼───────┼────────────────────────┼───────────────┤ 120 | │ 0 │ Nigel Rees │ reference │ 8.95 │ Sayings of the Century │ ❎ │ 121 | │ 1 │ Evelyn Waugh │ fiction │ 12.99 │ Sword of Honour │ ❎ │ 122 | │ 2 │ Herman Melville │ fiction │ 8.99 │ Moby Dick │ 0-553-21311-3 │ 123 | │ 3 │ J. R. R. Tolkien │ fiction │ 22.99 │ The Lord of the Rings │ 0-395-19395-8 │ 124 | ╰───┴──────────────────┴───────────┴───────┴────────────────────────┴───────────────╯ 125 | ``` 126 | ### Example 4 127 | 128 | ```sh 129 | open test.json | json path '$.store..price' 130 | ``` 131 | ``` 132 | ╭───┬───────╮ 133 | │ 0 │ 399 │ 134 | │ 1 │ 8.95 │ 135 | │ 2 │ 12.99 │ 136 | │ 3 │ 8.99 │ 137 | │ 4 │ 22.99 │ 138 | ╰───┴───────╯ 139 | ``` 140 | 141 | ### Example 5 142 | 143 | ```sh 144 | open test.json | json path '$..book[2]' 145 | ``` 146 | ``` 147 | ╭───┬─────────────────┬──────────┬───────────────┬───────┬───────────╮ 148 | │ # │ author │ category │ isbn │ price │ title │ 149 | ├───┼─────────────────┼──────────┼───────────────┼───────┼───────────┤ 150 | │ 0 │ Herman Melville │ fiction │ 0-553-21311-3 │ 8.99 │ Moby Dick │ 151 | ╰───┴─────────────────┴──────────┴───────────────┴───────┴───────────╯ 152 | ``` 153 | 154 | ### Example 6 155 | 156 | ```sh 157 | open test.json | json path '$..book[-1]' 158 | ``` 159 | ``` 160 | ╭───┬──────────────────┬──────────┬───────────────┬───────┬───────────────────────╮ 161 | │ # │ author │ category │ isbn │ price │ title │ 162 | ├───┼──────────────────┼──────────┼───────────────┼───────┼───────────────────────┤ 163 | │ 0 │ J. R. R. Tolkien │ fiction │ 0-395-19395-8 │ 22.99 │ The Lord of the Rings │ 164 | ╰───┴──────────────────┴──────────┴───────────────┴───────┴───────────────────────╯ 165 | ``` 166 | 167 | ### Example 7 168 | 169 | ```sh 170 | open test.json | json path '$..book[0,1]' 171 | ``` 172 | ``` 173 | ╭───┬──────────────┬───────────┬───────┬────────────────────────╮ 174 | │ # │ author │ category │ price │ title │ 175 | ├───┼──────────────┼───────────┼───────┼────────────────────────┤ 176 | │ 0 │ Nigel Rees │ reference │ 8.95 │ Sayings of the Century │ 177 | │ 1 │ Evelyn Waugh │ fiction │ 12.99 │ Sword of Honour │ 178 | ╰───┴──────────────┴───────────┴───────┴────────────────────────╯ 179 | ``` 180 | 181 | ### Example 8 182 | 183 | ```sh 184 | open test.json | json path '$..book[:2]' 185 | ``` 186 | ``` 187 | ╭───┬──────────────┬───────────┬───────┬────────────────────────╮ 188 | │ # │ author │ category │ price │ title │ 189 | ├───┼──────────────┼───────────┼───────┼────────────────────────┤ 190 | │ 0 │ Nigel Rees │ reference │ 8.95 │ Sayings of the Century │ 191 | │ 1 │ Evelyn Waugh │ fiction │ 12.99 │ Sword of Honour │ 192 | ╰───┴──────────────┴───────────┴───────┴────────────────────────╯ 193 | ``` 194 | 195 | ### Example 9 196 | 197 | ```sh 198 | open test.json | json path '$..book[?(@.isbn)]' 199 | ``` 200 | ``` 201 | ╭───┬──────────────────┬──────────┬───────────────┬───────┬───────────────────────╮ 202 | │ # │ author │ category │ isbn │ price │ title │ 203 | ├───┼──────────────────┼──────────┼───────────────┼───────┼───────────────────────┤ 204 | │ 0 │ Herman Melville │ fiction │ 0-553-21311-3 │ 8.99 │ Moby Dick │ 205 | │ 1 │ J. R. R. Tolkien │ fiction │ 0-395-19395-8 │ 22.99 │ The Lord of the Rings │ 206 | ╰───┴──────────────────┴──────────┴───────────────┴───────┴───────────────────────╯ 207 | ``` 208 | ### Example 10 209 | 210 | ```sh 211 | open test.json | json path '$..book[?(@.price<10)]' 212 | ``` 213 | ``` 214 | ╭───┬─────────────────┬───────────┬───────┬────────────────────────┬───────────────╮ 215 | │ # │ author │ category │ price │ title │ isbn │ 216 | ├───┼─────────────────┼───────────┼───────┼────────────────────────┼───────────────┤ 217 | │ 0 │ Nigel Rees │ reference │ 8.95 │ Sayings of the Century │ ❎ │ 218 | │ 1 │ Herman Melville │ fiction │ 8.99 │ Moby Dick │ 0-553-21311-3 │ 219 | ╰───┴─────────────────┴───────────┴───────┴────────────────────────┴───────────────╯ 220 | ``` 221 | 222 | ### Example 11 223 | 224 | ```sh 225 | open test.json | json path '$..*' 226 | ``` 227 | ``` 228 | ╭────┬────────────────────────╮ 229 | │ 0 │ {record 2 fields} │ 230 | │ 1 │ {record 2 fields} │ 231 | │ 2 │ [table 4 rows] │ 232 | │ 3 │ red │ 233 | │ 4 │ 399 │ 234 | │ 5 │ {record 4 fields} │ 235 | │ 6 │ {record 4 fields} │ 236 | │ 7 │ {record 5 fields} │ 237 | │ 8 │ {record 5 fields} │ 238 | │ 9 │ Nigel Rees │ 239 | │ 10 │ reference │ 240 | │ 11 │ 8.95 │ 241 | │ 12 │ Sayings of the Century │ 242 | │ 13 │ Evelyn Waugh │ 243 | │ 14 │ fiction │ 244 | │ 15 │ 12.99 │ 245 | │ 16 │ Sword of Honour │ 246 | │ 17 │ Herman Melville │ 247 | │ 18 │ fiction │ 248 | │ 19 │ 0-553-21311-3 │ 249 | │ 20 │ 8.99 │ 250 | │ 21 │ Moby Dick │ 251 | │ 22 │ J. R. R. Tolkien │ 252 | │ 23 │ fiction │ 253 | │ 24 │ 0-395-19395-8 │ 254 | │ 25 │ 22.99 │ 255 | │ 26 │ The Lord of the Rings │ 256 | ╰────┴────────────────────────╯ 257 | ``` 258 | # Building, Installing, and Registering 259 | 260 | Since this plugin isn't published on crates.io, you will have to have the nushell repository cloned in order to build it. 261 | 262 | This is a nushell script provided in [the first issue](https://github.com/fdncred/nu_plugin_json_path/issues/1). In that issue @amtoine explains, "as my repos are located in `$env.GIT_REPOS_HOME///`, i had to run the following". 263 | 264 | ```sh 265 | [nu-plugin nu-protocol] | each {|crate| 266 | let local = ($env.GIT_REPOS_HOME | path join "github.com" "nushell" "nushell" "crates" $crate) 267 | cargo add $crate --path $local 268 | } 269 | ``` 270 | 271 | Once the cargo.toml is updated, all you have to do is `cargo install --path .` and then, from within nushell do a `register /path/to/nu_plugin_json_path`. 272 | 273 | Good luck! -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use nu_plugin::{ 2 | serve_plugin, EngineInterface, EvaluatedCall, MsgPackSerializer, Plugin, PluginCommand, 3 | SimplePluginCommand, 4 | }; 5 | use nu_protocol::{ 6 | ast::PathMember, Category, Example, LabeledError, Record, ShellError, Signature, Span, Spanned, 7 | SyntaxShape, Value, 8 | }; 9 | use serde_json::Value as SerdeJsonValue; 10 | use serde_json_path::JsonPath; 11 | 12 | struct JsonPathPlugin; 13 | 14 | impl Plugin for JsonPathPlugin { 15 | fn version(&self) -> String { 16 | env!("CARGO_PKG_VERSION").into() 17 | } 18 | 19 | fn commands(&self) -> Vec>> { 20 | vec![Box::new(NuJsonPath)] 21 | } 22 | } 23 | 24 | // json path examples 25 | // https://www.ietf.org/archive/id/draft-ietf-jsonpath-base-10.html#section-1.5 26 | // json path docs 27 | // https://docs.rs/serde_json_path/0.3.1/serde_json_path/ 28 | // json path repo 29 | // https://github.com/hiltontj/serde_json_path 30 | // serde json path grammar 31 | // https://github.com/hiltontj/serde_json_path/blob/main/grammar.abnf 32 | 33 | struct NuJsonPath; 34 | 35 | impl SimplePluginCommand for NuJsonPath { 36 | type Plugin = JsonPathPlugin; 37 | 38 | fn name(&self) -> &str { 39 | "json path" 40 | } 41 | 42 | fn description(&self) -> &str { 43 | "View json path results" 44 | } 45 | fn signature(&self) -> Signature { 46 | Signature::build(PluginCommand::name(self)) 47 | .required("query", SyntaxShape::String, "json path query") 48 | .category(Category::Experimental) 49 | } 50 | 51 | fn examples(&self) -> Vec { 52 | vec![Example { 53 | description: "List the authors of all books in the store".into(), 54 | example: "open -r test.json | json path '$.store.book[*].author'".into(), 55 | result: None, 56 | }] 57 | } 58 | 59 | fn run( 60 | &self, 61 | _config: &JsonPathPlugin, 62 | _engine: &EngineInterface, 63 | call: &EvaluatedCall, 64 | input: &Value, 65 | ) -> Result { 66 | let json_query: Option> = call.opt(0)?; 67 | let span = call.head; 68 | let input_span = &input.span(); 69 | 70 | let json_path_results = match input { 71 | Value::String { val, .. } => perform_json_path_query(val, &json_query, input_span)?, 72 | Value::Record { val: _vals, .. } => { 73 | let json_value = value_to_json_value(input)?; 74 | let raw = serde_json::to_string(&json_value).unwrap(); 75 | perform_json_path_query(&raw, &json_query, input_span)? 76 | } 77 | v => { 78 | return Err(LabeledError::new(format!( 79 | "requires some input, got {}", 80 | v.get_type() 81 | )) 82 | .with_label("Expected some input from pipeline", call.head)); 83 | } 84 | }; 85 | 86 | let ret_list = Value::list(json_path_results, span); 87 | 88 | Ok(ret_list) 89 | } 90 | } 91 | 92 | fn perform_json_path_query( 93 | input: &str, 94 | json_query: &Option>, 95 | span: &nu_protocol::Span, 96 | ) -> Result, LabeledError> { 97 | let serde_json: SerdeJsonValue = serde_json::from_str(input) 98 | .map_err(|e| LabeledError::new(e.to_string()).with_label("Error parsing json", *span))?; 99 | 100 | let query = match &json_query.as_ref() { 101 | Some(p) => &p.item, 102 | None => { 103 | return Err(LabeledError::new("No json path query provided") 104 | .with_label("Error parsing json query string", *span)); 105 | } 106 | }; 107 | 108 | let path = JsonPath::parse(query).map_err(|e| { 109 | LabeledError::new(e.to_string()).with_label("Error parsing json query", *span) 110 | })?; 111 | 112 | Ok(path 113 | .query(&serde_json) 114 | .all() 115 | .into_iter() 116 | .map(|v| convert_sjson_to_value(v, *span)) 117 | .collect()) 118 | } 119 | 120 | pub fn convert_sjson_to_value(value: &SerdeJsonValue, span: Span) -> Value { 121 | match value { 122 | SerdeJsonValue::Array(array) => { 123 | let v: Vec = array 124 | .iter() 125 | .map(|x| convert_sjson_to_value(x, span)) 126 | .collect(); 127 | 128 | Value::list(v, span) 129 | } 130 | SerdeJsonValue::Bool(b) => Value::bool(*b, span), 131 | SerdeJsonValue::Number(f) => { 132 | if f.is_f64() { 133 | Value::float(f.as_f64().unwrap(), span) 134 | } else { 135 | Value::int(f.as_i64().unwrap(), span) 136 | } 137 | } 138 | SerdeJsonValue::Null => Value::nothing(span), 139 | SerdeJsonValue::Object(k) => { 140 | let mut rec = Record::new(); 141 | for (k, v) in k { 142 | rec.push(k.clone(), convert_sjson_to_value(v, span)); 143 | } 144 | Value::record(rec, span) 145 | } 146 | SerdeJsonValue::String(s) => Value::string(s.clone(), span), 147 | } 148 | } 149 | 150 | pub fn value_to_json_value(v: &Value) -> Result { 151 | let val_span = v.span(); 152 | Ok(match v { 153 | Value::Bool { val, .. } => SerdeJsonValue::Bool(*val), 154 | Value::Filesize { val, .. } => SerdeJsonValue::Number((*val).get().into()), 155 | Value::Duration { val, .. } => SerdeJsonValue::Number((*val).into()), 156 | Value::Date { val, .. } => SerdeJsonValue::String(val.to_string()), 157 | Value::Float { val, .. } => { 158 | SerdeJsonValue::Number(match serde_json::Number::from_f64(*val).ok_or(0.0) { 159 | Ok(n) => n, 160 | Err(e) => { 161 | return Err(LabeledError::new(format!("Error converting {e}")) 162 | .with_label(format!("Error converting value: {val} to f64"), val_span)); 163 | } 164 | }) 165 | } 166 | Value::Int { val, .. } => SerdeJsonValue::Number((*val).into()), 167 | Value::Nothing { .. } => SerdeJsonValue::Null, 168 | Value::String { val, .. } => SerdeJsonValue::String(val.to_string()), 169 | Value::CellPath { val, .. } => SerdeJsonValue::Array( 170 | val.members 171 | .iter() 172 | .map(|x| match &x { 173 | PathMember::String { val, .. } => Ok(SerdeJsonValue::String(val.clone())), 174 | PathMember::Int { val, .. } => Ok(SerdeJsonValue::Number((*val as u64).into())), 175 | }) 176 | .collect::, ShellError>>()?, 177 | ), 178 | 179 | Value::List { vals, .. } => SerdeJsonValue::Array(json_list(vals)?), 180 | Value::Error { error, .. } => { 181 | return Err(LabeledError::new("Error found") 182 | .with_label(format!("Error found: {error}"), v.span())); 183 | } 184 | Value::Closure { .. } | Value::Range { .. } => SerdeJsonValue::Null, 185 | // | Value::MatchPattern { .. } => SerdeJsonValue::Null, 186 | Value::Binary { val, .. } => SerdeJsonValue::Array( 187 | val.iter() 188 | .map(|x| SerdeJsonValue::Number((*x as u64).into())) 189 | .collect(), 190 | ), 191 | Value::Record { val, .. } => { 192 | let mut m = serde_json::Map::new(); 193 | val.iter().for_each(|(k, v)| { 194 | m.insert(k.clone(), value_to_json_value(v).unwrap()); 195 | }); 196 | SerdeJsonValue::Object(m) 197 | } 198 | Value::Custom { val, .. } => { 199 | let collected = val.to_base_value(val_span)?; 200 | value_to_json_value(&collected)? 201 | } 202 | Value::Glob { 203 | val: _val, 204 | no_expand: _no_expand, 205 | .. 206 | } => todo!(), 207 | }) 208 | } 209 | 210 | fn json_list(input: &[Value]) -> Result, ShellError> { 211 | let mut out = vec![]; 212 | 213 | for value in input { 214 | out.push(value_to_json_value(value)?); 215 | } 216 | 217 | Ok(out) 218 | } 219 | 220 | fn main() { 221 | serve_plugin(&JsonPathPlugin, MsgPackSerializer); 222 | } 223 | 224 | #[cfg(test)] 225 | mod test { 226 | use serde_json::{json, Value as SerdeJsonValue}; 227 | use serde_json_path::JsonPath; 228 | 229 | fn spec_example_json() -> SerdeJsonValue { 230 | json!({ 231 | "store": { 232 | "book": [ 233 | { 234 | "category": "reference", 235 | "author": "Nigel Rees", 236 | "title": "Sayings of the Century", 237 | "price": 8.95 238 | }, 239 | { 240 | "category": "fiction", 241 | "author": "Evelyn Waugh", 242 | "title": "Sword of Honour", 243 | "price": 12.99 244 | }, 245 | { 246 | "category": "fiction", 247 | "author": "Herman Melville", 248 | "title": "Moby Dick", 249 | "isbn": "0-553-21311-3", 250 | "price": 8.99 251 | }, 252 | { 253 | "category": "fiction", 254 | "author": "J. R. R. Tolkien", 255 | "title": "The Lord of the Rings", 256 | "isbn": "0-395-19395-8", 257 | "price": 22.99 258 | } 259 | ], 260 | "bicycle": { 261 | "color": "red", 262 | "price": 399 263 | } 264 | } 265 | }) 266 | } 267 | 268 | #[test] 269 | fn spec_example_1() { 270 | let value = spec_example_json(); 271 | let path = JsonPath::parse("$.store.book[*].author").unwrap(); 272 | let nodes = path.query(&value).all(); 273 | assert_eq!( 274 | nodes, 275 | vec![ 276 | "Nigel Rees", 277 | "Evelyn Waugh", 278 | "Herman Melville", 279 | "J. R. R. Tolkien" 280 | ] 281 | ); 282 | } 283 | 284 | #[test] 285 | fn spec_example_2() { 286 | let value = spec_example_json(); 287 | let path = JsonPath::parse("$..author").unwrap(); 288 | let nodes = path.query(&value).all(); 289 | assert_eq!( 290 | nodes, 291 | vec![ 292 | "Nigel Rees", 293 | "Evelyn Waugh", 294 | "Herman Melville", 295 | "J. R. R. Tolkien" 296 | ] 297 | ); 298 | } 299 | 300 | #[test] 301 | fn spec_example_3() { 302 | let value = spec_example_json(); 303 | let path = JsonPath::parse("$.store.*").unwrap(); 304 | let nodes = path.query(&value).all(); 305 | assert_eq!(nodes.len(), 2); 306 | assert!(nodes 307 | .iter() 308 | .any(|&node| node == value.pointer("/store/book").unwrap())); 309 | } 310 | 311 | #[test] 312 | fn spec_example_4() { 313 | let value = spec_example_json(); 314 | let path = JsonPath::parse("$.store..price").unwrap(); 315 | let nodes = path.query(&value).all(); 316 | assert_eq!(nodes, vec![399., 8.95, 12.99, 8.99, 22.99]); 317 | } 318 | 319 | #[test] 320 | fn spec_example_5() { 321 | let value = spec_example_json(); 322 | let path = JsonPath::parse("$..book[2]").unwrap(); 323 | let node = path.query(&value).at_most_one().unwrap(); 324 | assert!(node.is_some()); 325 | assert_eq!(node, value.pointer("/store/book/2")); 326 | } 327 | 328 | #[test] 329 | fn spec_example_6() { 330 | let value = spec_example_json(); 331 | let path = JsonPath::parse("$..book[-1]").unwrap(); 332 | let node = path.query(&value).at_most_one().unwrap(); 333 | assert!(node.is_some()); 334 | assert_eq!(node, value.pointer("/store/book/3")); 335 | } 336 | 337 | #[test] 338 | fn spec_example_7() { 339 | let value = spec_example_json(); 340 | { 341 | let path = JsonPath::parse("$..book[0,1]").unwrap(); 342 | let nodes = path.query(&value).all(); 343 | assert_eq!(nodes.len(), 2); 344 | } 345 | { 346 | let path = JsonPath::parse("$..book[:2]").unwrap(); 347 | let nodes = path.query(&value).all(); 348 | assert_eq!(nodes.len(), 2); 349 | } 350 | } 351 | 352 | #[test] 353 | fn spec_example_8() { 354 | let value = spec_example_json(); 355 | let path = JsonPath::parse("$..book[?(@.isbn)]").unwrap(); 356 | let nodes = path.query(&value); 357 | assert_eq!(nodes.len(), 2); 358 | } 359 | 360 | #[test] 361 | fn spec_example_9() { 362 | let value = spec_example_json(); 363 | let path = JsonPath::parse("$..book[?(@.price<10)]").unwrap(); 364 | let nodes = path.query(&value); 365 | assert_eq!(nodes.len(), 2); 366 | } 367 | 368 | #[test] 369 | fn spec_example_10() { 370 | let value = spec_example_json(); 371 | let path = JsonPath::parse("$..*").unwrap(); 372 | let nodes = path.query(&value); 373 | assert_eq!(nodes.len(), 27); 374 | } 375 | } 376 | -------------------------------------------------------------------------------- /test.json: -------------------------------------------------------------------------------- 1 | { 2 | "store": { 3 | "book": [ 4 | { 5 | "category": "reference", 6 | "author": "Nigel Rees", 7 | "title": "Sayings of the Century", 8 | "price": 8.95 9 | }, 10 | { 11 | "category": "fiction", 12 | "author": "Evelyn Waugh", 13 | "title": "Sword of Honour", 14 | "price": 12.99 15 | }, 16 | { 17 | "category": "fiction", 18 | "author": "Herman Melville", 19 | "title": "Moby Dick", 20 | "isbn": "0-553-21311-3", 21 | "price": 8.99 22 | }, 23 | { 24 | "category": "fiction", 25 | "author": "J. R. R. Tolkien", 26 | "title": "The Lord of the Rings", 27 | "isbn": "0-395-19395-8", 28 | "price": 22.99 29 | } 30 | ], 31 | "bicycle": { 32 | "color": "red", 33 | "price": 399 34 | } 35 | } 36 | } 37 | --------------------------------------------------------------------------------