Merge pull request #240419 from lilyinstarlight/feature/prefetch-npm-deps-isahc

prefetch-npm-deps: use isahc instead of ureq

authored by

Lily Foster and committed by
GitHub
bee82b47 a471203d

+720 -308
+627 -256
pkgs/build-support/node/fetch-npm-deps/Cargo.lock
··· 3 version = 3 4 5 [[package]] 6 - name = "adler" 7 version = "1.0.2" 8 source = "registry+https://github.com/rust-lang/crates.io-index" 9 - checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 10 11 [[package]] 12 name = "anyhow" 13 - version = "1.0.65" 14 source = "registry+https://github.com/rust-lang/crates.io-index" 15 - checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" 16 17 [[package]] 18 name = "autocfg" ··· 21 checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 22 23 [[package]] 24 name = "base64" 25 - version = "0.13.0" 26 source = "registry+https://github.com/rust-lang/crates.io-index" 27 - checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 28 29 [[package]] 30 name = "bitflags" ··· 33 checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 34 35 [[package]] 36 name = "block-buffer" 37 - version = "0.10.2" 38 source = "registry+https://github.com/rust-lang/crates.io-index" 39 - checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" 40 dependencies = [ 41 "generic-array", 42 ] 43 44 [[package]] 45 - name = "bumpalo" 46 - version = "3.11.0" 47 source = "registry+https://github.com/rust-lang/crates.io-index" 48 - checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" 49 50 [[package]] 51 name = "cc" 52 - version = "1.0.73" 53 source = "registry+https://github.com/rust-lang/crates.io-index" 54 - checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 55 56 [[package]] 57 name = "cfg-if" ··· 60 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 61 62 [[package]] 63 - name = "chunked_transfer" 64 - version = "1.4.0" 65 source = "registry+https://github.com/rust-lang/crates.io-index" 66 - checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" 67 68 [[package]] 69 name = "cpufeatures" 70 - version = "0.2.4" 71 source = "registry+https://github.com/rust-lang/crates.io-index" 72 - checksum = "dc948ebb96241bb40ab73effeb80d9f93afaad49359d159a5e61be51619fe813" 73 dependencies = [ 74 "libc", 75 ] 76 77 [[package]] 78 - name = "crc32fast" 79 - version = "1.3.2" 80 - source = "registry+https://github.com/rust-lang/crates.io-index" 81 - checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 82 - dependencies = [ 83 - "cfg-if", 84 - ] 85 - 86 - [[package]] 87 name = "crossbeam-channel" 88 - version = "0.5.6" 89 source = "registry+https://github.com/rust-lang/crates.io-index" 90 - checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" 91 dependencies = [ 92 "cfg-if", 93 "crossbeam-utils", ··· 95 96 [[package]] 97 name = "crossbeam-deque" 98 - version = "0.8.2" 99 source = "registry+https://github.com/rust-lang/crates.io-index" 100 - checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" 101 dependencies = [ 102 "cfg-if", 103 "crossbeam-epoch", ··· 106 107 [[package]] 108 name = "crossbeam-epoch" 109 - version = "0.9.10" 110 source = "registry+https://github.com/rust-lang/crates.io-index" 111 - checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" 112 dependencies = [ 113 "autocfg", 114 "cfg-if", 115 "crossbeam-utils", 116 "memoffset", 117 - "once_cell", 118 "scopeguard", 119 ] 120 121 [[package]] 122 name = "crossbeam-utils" 123 - version = "0.8.11" 124 source = "registry+https://github.com/rust-lang/crates.io-index" 125 - checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" 126 dependencies = [ 127 "cfg-if", 128 - "once_cell", 129 ] 130 131 [[package]] ··· 139 ] 140 141 [[package]] 142 name = "digest" 143 - version = "0.10.5" 144 source = "registry+https://github.com/rust-lang/crates.io-index" 145 - checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" 146 dependencies = [ 147 "block-buffer", 148 "crypto-common", ··· 150 151 [[package]] 152 name = "either" 153 - version = "1.8.0" 154 source = "registry+https://github.com/rust-lang/crates.io-index" 155 - checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 156 157 [[package]] 158 - name = "fastrand" 159 - version = "1.8.0" 160 source = "registry+https://github.com/rust-lang/crates.io-index" 161 - checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 162 dependencies = [ 163 - "instant", 164 ] 165 166 [[package]] 167 - name = "flate2" 168 - version = "1.0.24" 169 source = "registry+https://github.com/rust-lang/crates.io-index" 170 - checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" 171 dependencies = [ 172 - "crc32fast", 173 - "miniz_oxide", 174 ] 175 176 [[package]] 177 name = "form_urlencoded" 178 - version = "1.1.0" 179 source = "registry+https://github.com/rust-lang/crates.io-index" 180 - checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 181 dependencies = [ 182 "percent-encoding", 183 ] 184 185 [[package]] 186 name = "generic-array" 187 - version = "0.14.6" 188 source = "registry+https://github.com/rust-lang/crates.io-index" 189 - checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" 190 dependencies = [ 191 "typenum", 192 "version_check", 193 ] 194 195 [[package]] 196 - name = "hermit-abi" 197 - version = "0.1.19" 198 source = "registry+https://github.com/rust-lang/crates.io-index" 199 - checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 200 dependencies = [ 201 "libc", 202 ] 203 204 [[package]] 205 name = "idna" 206 - version = "0.3.0" 207 source = "registry+https://github.com/rust-lang/crates.io-index" 208 - checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 209 dependencies = [ 210 "unicode-bidi", 211 "unicode-normalization", ··· 221 ] 222 223 [[package]] 224 - name = "itoa" 225 - version = "1.0.3" 226 source = "registry+https://github.com/rust-lang/crates.io-index" 227 - checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" 228 229 [[package]] 230 - name = "js-sys" 231 - version = "0.3.59" 232 source = "registry+https://github.com/rust-lang/crates.io-index" 233 - checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" 234 dependencies = [ 235 - "wasm-bindgen", 236 ] 237 238 [[package]] 239 name = "libc" 240 - version = "0.2.132" 241 source = "registry+https://github.com/rust-lang/crates.io-index" 242 - checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" 243 244 [[package]] 245 - name = "log" 246 - version = "0.4.17" 247 source = "registry+https://github.com/rust-lang/crates.io-index" 248 - checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 249 dependencies = [ 250 - "cfg-if", 251 ] 252 253 [[package]] 254 name = "memoffset" 255 - version = "0.6.5" 256 source = "registry+https://github.com/rust-lang/crates.io-index" 257 - checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 258 dependencies = [ 259 "autocfg", 260 ] 261 262 [[package]] 263 - name = "miniz_oxide" 264 - version = "0.5.3" 265 source = "registry+https://github.com/rust-lang/crates.io-index" 266 - checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" 267 dependencies = [ 268 - "adler", 269 ] 270 271 [[package]] 272 - name = "num_cpus" 273 - version = "1.13.1" 274 source = "registry+https://github.com/rust-lang/crates.io-index" 275 - checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 276 dependencies = [ 277 - "hermit-abi", 278 "libc", 279 ] 280 281 [[package]] 282 - name = "once_cell" 283 - version = "1.13.1" 284 source = "registry+https://github.com/rust-lang/crates.io-index" 285 - checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" 286 287 [[package]] 288 name = "percent-encoding" 289 - version = "2.2.0" 290 source = "registry+https://github.com/rust-lang/crates.io-index" 291 - checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 292 293 [[package]] 294 name = "prefetch-npm-deps" 295 version = "0.1.0" 296 dependencies = [ 297 "anyhow", 298 "base64", 299 "digest", 300 "rayon", 301 "serde", 302 "serde_json", 303 "sha1", 304 "sha2", 305 "tempfile", 306 - "ureq", 307 "url", 308 "walkdir", 309 ] 310 311 [[package]] 312 name = "proc-macro2" 313 - version = "1.0.43" 314 source = "registry+https://github.com/rust-lang/crates.io-index" 315 - checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" 316 dependencies = [ 317 "unicode-ident", 318 ] 319 320 [[package]] 321 name = "quote" 322 - version = "1.0.21" 323 source = "registry+https://github.com/rust-lang/crates.io-index" 324 - checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 325 dependencies = [ 326 "proc-macro2", 327 ] 328 329 [[package]] 330 name = "rayon" 331 - version = "1.5.3" 332 source = "registry+https://github.com/rust-lang/crates.io-index" 333 - checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" 334 dependencies = [ 335 - "autocfg", 336 - "crossbeam-deque", 337 "either", 338 "rayon-core", 339 ] 340 341 [[package]] 342 name = "rayon-core" 343 - version = "1.9.3" 344 source = "registry+https://github.com/rust-lang/crates.io-index" 345 - checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" 346 dependencies = [ 347 "crossbeam-channel", 348 "crossbeam-deque", ··· 352 353 [[package]] 354 name = "redox_syscall" 355 - version = "0.2.16" 356 source = "registry+https://github.com/rust-lang/crates.io-index" 357 - checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 358 dependencies = [ 359 - "bitflags", 360 ] 361 362 [[package]] 363 - name = "remove_dir_all" 364 - version = "0.5.3" 365 source = "registry+https://github.com/rust-lang/crates.io-index" 366 - checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 367 dependencies = [ 368 - "winapi", 369 ] 370 371 [[package]] 372 - name = "ring" 373 - version = "0.16.20" 374 source = "registry+https://github.com/rust-lang/crates.io-index" 375 - checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 376 dependencies = [ 377 - "cc", 378 "libc", 379 - "once_cell", 380 - "spin", 381 - "untrusted", 382 - "web-sys", 383 - "winapi", 384 ] 385 386 [[package]] 387 - name = "rustls" 388 - version = "0.20.6" 389 source = "registry+https://github.com/rust-lang/crates.io-index" 390 - checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" 391 dependencies = [ 392 - "log", 393 - "ring", 394 - "sct", 395 - "webpki", 396 ] 397 398 [[package]] 399 name = "ryu" 400 - version = "1.0.11" 401 source = "registry+https://github.com/rust-lang/crates.io-index" 402 - checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 403 404 [[package]] 405 name = "same-file" ··· 411 ] 412 413 [[package]] 414 name = "scopeguard" 415 version = "1.1.0" 416 source = "registry+https://github.com/rust-lang/crates.io-index" 417 checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 418 419 [[package]] 420 - name = "sct" 421 - version = "0.7.0" 422 - source = "registry+https://github.com/rust-lang/crates.io-index" 423 - checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 424 - dependencies = [ 425 - "ring", 426 - "untrusted", 427 - ] 428 - 429 - [[package]] 430 name = "serde" 431 - version = "1.0.145" 432 source = "registry+https://github.com/rust-lang/crates.io-index" 433 - checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" 434 dependencies = [ 435 "serde_derive", 436 ] 437 438 [[package]] 439 name = "serde_derive" 440 - version = "1.0.145" 441 source = "registry+https://github.com/rust-lang/crates.io-index" 442 - checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" 443 dependencies = [ 444 "proc-macro2", 445 "quote", ··· 448 449 [[package]] 450 name = "serde_json" 451 - version = "1.0.85" 452 source = "registry+https://github.com/rust-lang/crates.io-index" 453 - checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" 454 dependencies = [ 455 "itoa", 456 "ryu", ··· 470 471 [[package]] 472 name = "sha2" 473 - version = "0.10.6" 474 source = "registry+https://github.com/rust-lang/crates.io-index" 475 - checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" 476 dependencies = [ 477 "cfg-if", 478 "cpufeatures", ··· 480 ] 481 482 [[package]] 483 - name = "spin" 484 - version = "0.5.2" 485 source = "registry+https://github.com/rust-lang/crates.io-index" 486 - checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 487 488 [[package]] 489 name = "syn" 490 - version = "1.0.99" 491 source = "registry+https://github.com/rust-lang/crates.io-index" 492 - checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" 493 dependencies = [ 494 "proc-macro2", 495 "quote", ··· 498 499 [[package]] 500 name = "tempfile" 501 - version = "3.3.0" 502 source = "registry+https://github.com/rust-lang/crates.io-index" 503 - checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 504 dependencies = [ 505 "cfg-if", 506 "fastrand", 507 - "libc", 508 "redox_syscall", 509 - "remove_dir_all", 510 - "winapi", 511 ] 512 513 [[package]] ··· 521 522 [[package]] 523 name = "tinyvec_macros" 524 - version = "0.1.0" 525 source = "registry+https://github.com/rust-lang/crates.io-index" 526 - checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 527 528 [[package]] 529 - name = "typenum" 530 - version = "1.15.0" 531 source = "registry+https://github.com/rust-lang/crates.io-index" 532 - checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" 533 534 [[package]] 535 - name = "unicode-bidi" 536 - version = "0.3.8" 537 source = "registry+https://github.com/rust-lang/crates.io-index" 538 - checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" 539 540 [[package]] 541 - name = "unicode-ident" 542 - version = "1.0.3" 543 source = "registry+https://github.com/rust-lang/crates.io-index" 544 - checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" 545 546 [[package]] 547 - name = "unicode-normalization" 548 - version = "0.1.21" 549 source = "registry+https://github.com/rust-lang/crates.io-index" 550 - checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" 551 dependencies = [ 552 - "tinyvec", 553 ] 554 555 [[package]] 556 - name = "untrusted" 557 - version = "0.7.1" 558 source = "registry+https://github.com/rust-lang/crates.io-index" 559 - checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 560 561 [[package]] 562 - name = "ureq" 563 - version = "2.5.0" 564 source = "registry+https://github.com/rust-lang/crates.io-index" 565 - checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f" 566 dependencies = [ 567 - "base64", 568 - "chunked_transfer", 569 - "flate2", 570 - "log", 571 - "once_cell", 572 - "rustls", 573 - "url", 574 - "webpki", 575 - "webpki-roots", 576 ] 577 578 [[package]] 579 name = "url" 580 - version = "2.3.1" 581 source = "registry+https://github.com/rust-lang/crates.io-index" 582 - checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 583 dependencies = [ 584 "form_urlencoded", 585 "idna", ··· 588 ] 589 590 [[package]] 591 name = "version_check" 592 version = "0.9.4" 593 source = "registry+https://github.com/rust-lang/crates.io-index" 594 checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 595 596 [[package]] 597 name = "walkdir" 598 - version = "2.3.2" 599 source = "registry+https://github.com/rust-lang/crates.io-index" 600 - checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 601 dependencies = [ 602 "same-file", 603 - "winapi", 604 "winapi-util", 605 ] 606 607 [[package]] 608 - name = "wasm-bindgen" 609 - version = "0.2.82" 610 source = "registry+https://github.com/rust-lang/crates.io-index" 611 - checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" 612 - dependencies = [ 613 - "cfg-if", 614 - "wasm-bindgen-macro", 615 - ] 616 617 [[package]] 618 - name = "wasm-bindgen-backend" 619 - version = "0.2.82" 620 source = "registry+https://github.com/rust-lang/crates.io-index" 621 - checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" 622 dependencies = [ 623 - "bumpalo", 624 - "log", 625 - "once_cell", 626 - "proc-macro2", 627 - "quote", 628 - "syn", 629 - "wasm-bindgen-shared", 630 ] 631 632 [[package]] 633 - name = "wasm-bindgen-macro" 634 - version = "0.2.82" 635 source = "registry+https://github.com/rust-lang/crates.io-index" 636 - checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" 637 - dependencies = [ 638 - "quote", 639 - "wasm-bindgen-macro-support", 640 - ] 641 642 [[package]] 643 - name = "wasm-bindgen-macro-support" 644 - version = "0.2.82" 645 source = "registry+https://github.com/rust-lang/crates.io-index" 646 - checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" 647 dependencies = [ 648 - "proc-macro2", 649 - "quote", 650 - "syn", 651 - "wasm-bindgen-backend", 652 - "wasm-bindgen-shared", 653 ] 654 655 [[package]] 656 - name = "wasm-bindgen-shared" 657 - version = "0.2.82" 658 source = "registry+https://github.com/rust-lang/crates.io-index" 659 - checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" 660 661 [[package]] 662 - name = "web-sys" 663 - version = "0.3.59" 664 source = "registry+https://github.com/rust-lang/crates.io-index" 665 - checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" 666 dependencies = [ 667 - "js-sys", 668 - "wasm-bindgen", 669 ] 670 671 [[package]] 672 - name = "webpki" 673 - version = "0.22.0" 674 source = "registry+https://github.com/rust-lang/crates.io-index" 675 - checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 676 dependencies = [ 677 - "ring", 678 - "untrusted", 679 ] 680 681 [[package]] 682 - name = "webpki-roots" 683 - version = "0.22.4" 684 source = "registry+https://github.com/rust-lang/crates.io-index" 685 - checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" 686 - dependencies = [ 687 - "webpki", 688 - ] 689 690 [[package]] 691 - name = "winapi" 692 - version = "0.3.9" 693 source = "registry+https://github.com/rust-lang/crates.io-index" 694 - checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 695 - dependencies = [ 696 - "winapi-i686-pc-windows-gnu", 697 - "winapi-x86_64-pc-windows-gnu", 698 - ] 699 700 [[package]] 701 - name = "winapi-i686-pc-windows-gnu" 702 - version = "0.4.0" 703 source = "registry+https://github.com/rust-lang/crates.io-index" 704 - checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 705 706 [[package]] 707 - name = "winapi-util" 708 - version = "0.1.5" 709 source = "registry+https://github.com/rust-lang/crates.io-index" 710 - checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 711 - dependencies = [ 712 - "winapi", 713 - ] 714 715 [[package]] 716 - name = "winapi-x86_64-pc-windows-gnu" 717 - version = "0.4.0" 718 source = "registry+https://github.com/rust-lang/crates.io-index" 719 - checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
··· 3 version = 3 4 5 [[package]] 6 + name = "aho-corasick" 7 version = "1.0.2" 8 source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" 10 + dependencies = [ 11 + "memchr", 12 + ] 13 14 [[package]] 15 name = "anyhow" 16 + version = "1.0.71" 17 source = "registry+https://github.com/rust-lang/crates.io-index" 18 + checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" 19 + 20 + [[package]] 21 + name = "async-channel" 22 + version = "1.8.0" 23 + source = "registry+https://github.com/rust-lang/crates.io-index" 24 + checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" 25 + dependencies = [ 26 + "concurrent-queue", 27 + "event-listener", 28 + "futures-core", 29 + ] 30 31 [[package]] 32 name = "autocfg" ··· 35 checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 36 37 [[package]] 38 + name = "backoff" 39 + version = "0.4.0" 40 + source = "registry+https://github.com/rust-lang/crates.io-index" 41 + checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" 42 + dependencies = [ 43 + "getrandom", 44 + "instant", 45 + "rand", 46 + ] 47 + 48 + [[package]] 49 name = "base64" 50 + version = "0.21.2" 51 source = "registry+https://github.com/rust-lang/crates.io-index" 52 + checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" 53 54 [[package]] 55 name = "bitflags" ··· 58 checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 59 60 [[package]] 61 + name = "bitflags" 62 + version = "2.3.3" 63 + source = "registry+https://github.com/rust-lang/crates.io-index" 64 + checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" 65 + 66 + [[package]] 67 name = "block-buffer" 68 + version = "0.10.4" 69 source = "registry+https://github.com/rust-lang/crates.io-index" 70 + checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 71 dependencies = [ 72 "generic-array", 73 ] 74 75 [[package]] 76 + name = "bytes" 77 + version = "1.4.0" 78 + source = "registry+https://github.com/rust-lang/crates.io-index" 79 + checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 80 + 81 + [[package]] 82 + name = "castaway" 83 + version = "0.1.2" 84 source = "registry+https://github.com/rust-lang/crates.io-index" 85 + checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" 86 87 [[package]] 88 name = "cc" 89 + version = "1.0.79" 90 source = "registry+https://github.com/rust-lang/crates.io-index" 91 + checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 92 93 [[package]] 94 name = "cfg-if" ··· 97 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 98 99 [[package]] 100 + name = "concurrent-queue" 101 + version = "2.2.0" 102 source = "registry+https://github.com/rust-lang/crates.io-index" 103 + checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" 104 + dependencies = [ 105 + "crossbeam-utils", 106 + ] 107 108 [[package]] 109 name = "cpufeatures" 110 + version = "0.2.8" 111 source = "registry+https://github.com/rust-lang/crates.io-index" 112 + checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" 113 dependencies = [ 114 "libc", 115 ] 116 117 [[package]] 118 name = "crossbeam-channel" 119 + version = "0.5.8" 120 source = "registry+https://github.com/rust-lang/crates.io-index" 121 + checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" 122 dependencies = [ 123 "cfg-if", 124 "crossbeam-utils", ··· 126 127 [[package]] 128 name = "crossbeam-deque" 129 + version = "0.8.3" 130 source = "registry+https://github.com/rust-lang/crates.io-index" 131 + checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" 132 dependencies = [ 133 "cfg-if", 134 "crossbeam-epoch", ··· 137 138 [[package]] 139 name = "crossbeam-epoch" 140 + version = "0.9.15" 141 source = "registry+https://github.com/rust-lang/crates.io-index" 142 + checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" 143 dependencies = [ 144 "autocfg", 145 "cfg-if", 146 "crossbeam-utils", 147 "memoffset", 148 "scopeguard", 149 ] 150 151 [[package]] 152 name = "crossbeam-utils" 153 + version = "0.8.16" 154 source = "registry+https://github.com/rust-lang/crates.io-index" 155 + checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 156 dependencies = [ 157 "cfg-if", 158 ] 159 160 [[package]] ··· 168 ] 169 170 [[package]] 171 + name = "curl" 172 + version = "0.4.44" 173 + source = "registry+https://github.com/rust-lang/crates.io-index" 174 + checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" 175 + dependencies = [ 176 + "curl-sys", 177 + "libc", 178 + "openssl-probe", 179 + "openssl-sys", 180 + "schannel", 181 + "socket2", 182 + "winapi", 183 + ] 184 + 185 + [[package]] 186 + name = "curl-sys" 187 + version = "0.4.63+curl-8.1.2" 188 + source = "registry+https://github.com/rust-lang/crates.io-index" 189 + checksum = "aeb0fef7046022a1e2ad67a004978f0e3cacb9e3123dc62ce768f92197b771dc" 190 + dependencies = [ 191 + "cc", 192 + "libc", 193 + "libz-sys", 194 + "openssl-sys", 195 + "pkg-config", 196 + "vcpkg", 197 + "winapi", 198 + ] 199 + 200 + [[package]] 201 name = "digest" 202 + version = "0.10.7" 203 source = "registry+https://github.com/rust-lang/crates.io-index" 204 + checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 205 dependencies = [ 206 "block-buffer", 207 "crypto-common", ··· 209 210 [[package]] 211 name = "either" 212 + version = "1.8.1" 213 source = "registry+https://github.com/rust-lang/crates.io-index" 214 + checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 215 216 [[package]] 217 + name = "env_logger" 218 + version = "0.10.0" 219 source = "registry+https://github.com/rust-lang/crates.io-index" 220 + checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" 221 dependencies = [ 222 + "humantime", 223 + "is-terminal", 224 + "log", 225 + "regex", 226 + "termcolor", 227 ] 228 229 [[package]] 230 + name = "errno" 231 + version = "0.3.1" 232 source = "registry+https://github.com/rust-lang/crates.io-index" 233 + checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" 234 dependencies = [ 235 + "errno-dragonfly", 236 + "libc", 237 + "windows-sys", 238 ] 239 240 [[package]] 241 + name = "errno-dragonfly" 242 + version = "0.1.2" 243 + source = "registry+https://github.com/rust-lang/crates.io-index" 244 + checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 245 + dependencies = [ 246 + "cc", 247 + "libc", 248 + ] 249 + 250 + [[package]] 251 + name = "event-listener" 252 + version = "2.5.3" 253 + source = "registry+https://github.com/rust-lang/crates.io-index" 254 + checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" 255 + 256 + [[package]] 257 + name = "fastrand" 258 + version = "1.9.0" 259 + source = "registry+https://github.com/rust-lang/crates.io-index" 260 + checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 261 + dependencies = [ 262 + "instant", 263 + ] 264 + 265 + [[package]] 266 + name = "fnv" 267 + version = "1.0.7" 268 + source = "registry+https://github.com/rust-lang/crates.io-index" 269 + checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 270 + 271 + [[package]] 272 name = "form_urlencoded" 273 + version = "1.2.0" 274 source = "registry+https://github.com/rust-lang/crates.io-index" 275 + checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 276 dependencies = [ 277 "percent-encoding", 278 ] 279 280 [[package]] 281 + name = "futures-core" 282 + version = "0.3.28" 283 + source = "registry+https://github.com/rust-lang/crates.io-index" 284 + checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 285 + 286 + [[package]] 287 + name = "futures-io" 288 + version = "0.3.28" 289 + source = "registry+https://github.com/rust-lang/crates.io-index" 290 + checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" 291 + 292 + [[package]] 293 + name = "futures-lite" 294 + version = "1.13.0" 295 + source = "registry+https://github.com/rust-lang/crates.io-index" 296 + checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" 297 + dependencies = [ 298 + "fastrand", 299 + "futures-core", 300 + "futures-io", 301 + "memchr", 302 + "parking", 303 + "pin-project-lite", 304 + "waker-fn", 305 + ] 306 + 307 + [[package]] 308 name = "generic-array" 309 + version = "0.14.7" 310 source = "registry+https://github.com/rust-lang/crates.io-index" 311 + checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 312 dependencies = [ 313 "typenum", 314 "version_check", 315 ] 316 317 [[package]] 318 + name = "getrandom" 319 + version = "0.2.10" 320 source = "registry+https://github.com/rust-lang/crates.io-index" 321 + checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" 322 dependencies = [ 323 + "cfg-if", 324 "libc", 325 + "wasi", 326 ] 327 328 [[package]] 329 + name = "hermit-abi" 330 + version = "0.3.2" 331 + source = "registry+https://github.com/rust-lang/crates.io-index" 332 + checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" 333 + 334 + [[package]] 335 + name = "http" 336 + version = "0.2.9" 337 + source = "registry+https://github.com/rust-lang/crates.io-index" 338 + checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 339 + dependencies = [ 340 + "bytes", 341 + "fnv", 342 + "itoa", 343 + ] 344 + 345 + [[package]] 346 + name = "humantime" 347 + version = "2.1.0" 348 + source = "registry+https://github.com/rust-lang/crates.io-index" 349 + checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 350 + 351 + [[package]] 352 name = "idna" 353 + version = "0.4.0" 354 source = "registry+https://github.com/rust-lang/crates.io-index" 355 + checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" 356 dependencies = [ 357 "unicode-bidi", 358 "unicode-normalization", ··· 368 ] 369 370 [[package]] 371 + name = "io-lifetimes" 372 + version = "1.0.11" 373 + source = "registry+https://github.com/rust-lang/crates.io-index" 374 + checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" 375 + dependencies = [ 376 + "hermit-abi", 377 + "libc", 378 + "windows-sys", 379 + ] 380 + 381 + [[package]] 382 + name = "is-terminal" 383 + version = "0.4.8" 384 source = "registry+https://github.com/rust-lang/crates.io-index" 385 + checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" 386 + dependencies = [ 387 + "hermit-abi", 388 + "rustix 0.38.2", 389 + "windows-sys", 390 + ] 391 392 [[package]] 393 + name = "isahc" 394 + version = "1.7.2" 395 source = "registry+https://github.com/rust-lang/crates.io-index" 396 + checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" 397 dependencies = [ 398 + "async-channel", 399 + "castaway", 400 + "crossbeam-utils", 401 + "curl", 402 + "curl-sys", 403 + "event-listener", 404 + "futures-lite", 405 + "http", 406 + "log", 407 + "once_cell", 408 + "polling", 409 + "slab", 410 + "sluice", 411 + "tracing", 412 + "tracing-futures", 413 + "url", 414 + "waker-fn", 415 ] 416 417 [[package]] 418 + name = "itoa" 419 + version = "1.0.8" 420 + source = "registry+https://github.com/rust-lang/crates.io-index" 421 + checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" 422 + 423 + [[package]] 424 name = "libc" 425 + version = "0.2.147" 426 source = "registry+https://github.com/rust-lang/crates.io-index" 427 + checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 428 429 [[package]] 430 + name = "libz-sys" 431 + version = "1.1.9" 432 source = "registry+https://github.com/rust-lang/crates.io-index" 433 + checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" 434 dependencies = [ 435 + "cc", 436 + "libc", 437 + "pkg-config", 438 + "vcpkg", 439 ] 440 441 [[package]] 442 + name = "linux-raw-sys" 443 + version = "0.3.8" 444 + source = "registry+https://github.com/rust-lang/crates.io-index" 445 + checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" 446 + 447 + [[package]] 448 + name = "linux-raw-sys" 449 + version = "0.4.3" 450 + source = "registry+https://github.com/rust-lang/crates.io-index" 451 + checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" 452 + 453 + [[package]] 454 + name = "log" 455 + version = "0.4.19" 456 + source = "registry+https://github.com/rust-lang/crates.io-index" 457 + checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" 458 + 459 + [[package]] 460 + name = "memchr" 461 + version = "2.5.0" 462 + source = "registry+https://github.com/rust-lang/crates.io-index" 463 + checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 464 + 465 + [[package]] 466 name = "memoffset" 467 + version = "0.9.0" 468 source = "registry+https://github.com/rust-lang/crates.io-index" 469 + checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 470 dependencies = [ 471 "autocfg", 472 ] 473 474 [[package]] 475 + name = "num_cpus" 476 + version = "1.16.0" 477 source = "registry+https://github.com/rust-lang/crates.io-index" 478 + checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 479 dependencies = [ 480 + "hermit-abi", 481 + "libc", 482 ] 483 484 [[package]] 485 + name = "once_cell" 486 + version = "1.18.0" 487 + source = "registry+https://github.com/rust-lang/crates.io-index" 488 + checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 489 + 490 + [[package]] 491 + name = "openssl-probe" 492 + version = "0.1.5" 493 + source = "registry+https://github.com/rust-lang/crates.io-index" 494 + checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 495 + 496 + [[package]] 497 + name = "openssl-sys" 498 + version = "0.9.90" 499 source = "registry+https://github.com/rust-lang/crates.io-index" 500 + checksum = "374533b0e45f3a7ced10fcaeccca020e66656bc03dac384f852e4e5a7a8104a6" 501 dependencies = [ 502 + "cc", 503 "libc", 504 + "pkg-config", 505 + "vcpkg", 506 ] 507 508 [[package]] 509 + name = "parking" 510 + version = "2.1.0" 511 source = "registry+https://github.com/rust-lang/crates.io-index" 512 + checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" 513 514 [[package]] 515 name = "percent-encoding" 516 + version = "2.3.0" 517 + source = "registry+https://github.com/rust-lang/crates.io-index" 518 + checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 519 + 520 + [[package]] 521 + name = "pin-project" 522 + version = "1.1.2" 523 + source = "registry+https://github.com/rust-lang/crates.io-index" 524 + checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" 525 + dependencies = [ 526 + "pin-project-internal", 527 + ] 528 + 529 + [[package]] 530 + name = "pin-project-internal" 531 + version = "1.1.2" 532 + source = "registry+https://github.com/rust-lang/crates.io-index" 533 + checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" 534 + dependencies = [ 535 + "proc-macro2", 536 + "quote", 537 + "syn", 538 + ] 539 + 540 + [[package]] 541 + name = "pin-project-lite" 542 + version = "0.2.10" 543 + source = "registry+https://github.com/rust-lang/crates.io-index" 544 + checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" 545 + 546 + [[package]] 547 + name = "pkg-config" 548 + version = "0.3.27" 549 + source = "registry+https://github.com/rust-lang/crates.io-index" 550 + checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 551 + 552 + [[package]] 553 + name = "polling" 554 + version = "2.8.0" 555 + source = "registry+https://github.com/rust-lang/crates.io-index" 556 + checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" 557 + dependencies = [ 558 + "autocfg", 559 + "bitflags 1.3.2", 560 + "cfg-if", 561 + "concurrent-queue", 562 + "libc", 563 + "log", 564 + "pin-project-lite", 565 + "windows-sys", 566 + ] 567 + 568 + [[package]] 569 + name = "ppv-lite86" 570 + version = "0.2.17" 571 source = "registry+https://github.com/rust-lang/crates.io-index" 572 + checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 573 574 [[package]] 575 name = "prefetch-npm-deps" 576 version = "0.1.0" 577 dependencies = [ 578 "anyhow", 579 + "backoff", 580 "base64", 581 "digest", 582 + "env_logger", 583 + "isahc", 584 "rayon", 585 "serde", 586 "serde_json", 587 "sha1", 588 "sha2", 589 "tempfile", 590 "url", 591 "walkdir", 592 ] 593 594 [[package]] 595 name = "proc-macro2" 596 + version = "1.0.63" 597 source = "registry+https://github.com/rust-lang/crates.io-index" 598 + checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" 599 dependencies = [ 600 "unicode-ident", 601 ] 602 603 [[package]] 604 name = "quote" 605 + version = "1.0.29" 606 source = "registry+https://github.com/rust-lang/crates.io-index" 607 + checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" 608 dependencies = [ 609 "proc-macro2", 610 ] 611 612 [[package]] 613 + name = "rand" 614 + version = "0.8.5" 615 + source = "registry+https://github.com/rust-lang/crates.io-index" 616 + checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 617 + dependencies = [ 618 + "libc", 619 + "rand_chacha", 620 + "rand_core", 621 + ] 622 + 623 + [[package]] 624 + name = "rand_chacha" 625 + version = "0.3.1" 626 + source = "registry+https://github.com/rust-lang/crates.io-index" 627 + checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 628 + dependencies = [ 629 + "ppv-lite86", 630 + "rand_core", 631 + ] 632 + 633 + [[package]] 634 + name = "rand_core" 635 + version = "0.6.4" 636 + source = "registry+https://github.com/rust-lang/crates.io-index" 637 + checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 638 + dependencies = [ 639 + "getrandom", 640 + ] 641 + 642 + [[package]] 643 name = "rayon" 644 + version = "1.7.0" 645 source = "registry+https://github.com/rust-lang/crates.io-index" 646 + checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" 647 dependencies = [ 648 "either", 649 "rayon-core", 650 ] 651 652 [[package]] 653 name = "rayon-core" 654 + version = "1.11.0" 655 source = "registry+https://github.com/rust-lang/crates.io-index" 656 + checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" 657 dependencies = [ 658 "crossbeam-channel", 659 "crossbeam-deque", ··· 663 664 [[package]] 665 name = "redox_syscall" 666 + version = "0.3.5" 667 source = "registry+https://github.com/rust-lang/crates.io-index" 668 + checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 669 dependencies = [ 670 + "bitflags 1.3.2", 671 ] 672 673 [[package]] 674 + name = "regex" 675 + version = "1.8.4" 676 source = "registry+https://github.com/rust-lang/crates.io-index" 677 + checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" 678 dependencies = [ 679 + "aho-corasick", 680 + "memchr", 681 + "regex-syntax", 682 ] 683 684 [[package]] 685 + name = "regex-syntax" 686 + version = "0.7.2" 687 + source = "registry+https://github.com/rust-lang/crates.io-index" 688 + checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" 689 + 690 + [[package]] 691 + name = "rustix" 692 + version = "0.37.22" 693 source = "registry+https://github.com/rust-lang/crates.io-index" 694 + checksum = "8818fa822adcc98b18fedbb3632a6a33213c070556b5aa7c4c8cc21cff565c4c" 695 dependencies = [ 696 + "bitflags 1.3.2", 697 + "errno", 698 + "io-lifetimes", 699 "libc", 700 + "linux-raw-sys 0.3.8", 701 + "windows-sys", 702 ] 703 704 [[package]] 705 + name = "rustix" 706 + version = "0.38.2" 707 source = "registry+https://github.com/rust-lang/crates.io-index" 708 + checksum = "aabcb0461ebd01d6b79945797c27f8529082226cb630a9865a71870ff63532a4" 709 dependencies = [ 710 + "bitflags 2.3.3", 711 + "errno", 712 + "libc", 713 + "linux-raw-sys 0.4.3", 714 + "windows-sys", 715 ] 716 717 [[package]] 718 name = "ryu" 719 + version = "1.0.14" 720 source = "registry+https://github.com/rust-lang/crates.io-index" 721 + checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" 722 723 [[package]] 724 name = "same-file" ··· 730 ] 731 732 [[package]] 733 + name = "schannel" 734 + version = "0.1.22" 735 + source = "registry+https://github.com/rust-lang/crates.io-index" 736 + checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" 737 + dependencies = [ 738 + "windows-sys", 739 + ] 740 + 741 + [[package]] 742 name = "scopeguard" 743 version = "1.1.0" 744 source = "registry+https://github.com/rust-lang/crates.io-index" 745 checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 746 747 [[package]] 748 name = "serde" 749 + version = "1.0.166" 750 source = "registry+https://github.com/rust-lang/crates.io-index" 751 + checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" 752 dependencies = [ 753 "serde_derive", 754 ] 755 756 [[package]] 757 name = "serde_derive" 758 + version = "1.0.166" 759 source = "registry+https://github.com/rust-lang/crates.io-index" 760 + checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" 761 dependencies = [ 762 "proc-macro2", 763 "quote", ··· 766 767 [[package]] 768 name = "serde_json" 769 + version = "1.0.99" 770 source = "registry+https://github.com/rust-lang/crates.io-index" 771 + checksum = "46266871c240a00b8f503b877622fe33430b3c7d963bdc0f2adc511e54a1eae3" 772 dependencies = [ 773 "itoa", 774 "ryu", ··· 788 789 [[package]] 790 name = "sha2" 791 + version = "0.10.7" 792 source = "registry+https://github.com/rust-lang/crates.io-index" 793 + checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" 794 dependencies = [ 795 "cfg-if", 796 "cpufeatures", ··· 798 ] 799 800 [[package]] 801 + name = "slab" 802 + version = "0.4.8" 803 source = "registry+https://github.com/rust-lang/crates.io-index" 804 + checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 805 + dependencies = [ 806 + "autocfg", 807 + ] 808 + 809 + [[package]] 810 + name = "sluice" 811 + version = "0.5.5" 812 + source = "registry+https://github.com/rust-lang/crates.io-index" 813 + checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" 814 + dependencies = [ 815 + "async-channel", 816 + "futures-core", 817 + "futures-io", 818 + ] 819 + 820 + [[package]] 821 + name = "socket2" 822 + version = "0.4.9" 823 + source = "registry+https://github.com/rust-lang/crates.io-index" 824 + checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 825 + dependencies = [ 826 + "libc", 827 + "winapi", 828 + ] 829 830 [[package]] 831 name = "syn" 832 + version = "2.0.23" 833 source = "registry+https://github.com/rust-lang/crates.io-index" 834 + checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" 835 dependencies = [ 836 "proc-macro2", 837 "quote", ··· 840 841 [[package]] 842 name = "tempfile" 843 + version = "3.6.0" 844 source = "registry+https://github.com/rust-lang/crates.io-index" 845 + checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" 846 dependencies = [ 847 + "autocfg", 848 "cfg-if", 849 "fastrand", 850 "redox_syscall", 851 + "rustix 0.37.22", 852 + "windows-sys", 853 + ] 854 + 855 + [[package]] 856 + name = "termcolor" 857 + version = "1.2.0" 858 + source = "registry+https://github.com/rust-lang/crates.io-index" 859 + checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 860 + dependencies = [ 861 + "winapi-util", 862 ] 863 864 [[package]] ··· 872 873 [[package]] 874 name = "tinyvec_macros" 875 + version = "0.1.1" 876 source = "registry+https://github.com/rust-lang/crates.io-index" 877 + checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 878 879 [[package]] 880 + name = "tracing" 881 + version = "0.1.37" 882 source = "registry+https://github.com/rust-lang/crates.io-index" 883 + checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 884 + dependencies = [ 885 + "cfg-if", 886 + "log", 887 + "pin-project-lite", 888 + "tracing-attributes", 889 + "tracing-core", 890 + ] 891 892 [[package]] 893 + name = "tracing-attributes" 894 + version = "0.1.26" 895 source = "registry+https://github.com/rust-lang/crates.io-index" 896 + checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" 897 + dependencies = [ 898 + "proc-macro2", 899 + "quote", 900 + "syn", 901 + ] 902 903 [[package]] 904 + name = "tracing-core" 905 + version = "0.1.31" 906 source = "registry+https://github.com/rust-lang/crates.io-index" 907 + checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 908 + dependencies = [ 909 + "once_cell", 910 + ] 911 912 [[package]] 913 + name = "tracing-futures" 914 + version = "0.2.5" 915 source = "registry+https://github.com/rust-lang/crates.io-index" 916 + checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" 917 dependencies = [ 918 + "pin-project", 919 + "tracing", 920 ] 921 922 [[package]] 923 + name = "typenum" 924 + version = "1.16.0" 925 + source = "registry+https://github.com/rust-lang/crates.io-index" 926 + checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 927 + 928 + [[package]] 929 + name = "unicode-bidi" 930 + version = "0.3.13" 931 source = "registry+https://github.com/rust-lang/crates.io-index" 932 + checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 933 934 [[package]] 935 + name = "unicode-ident" 936 + version = "1.0.10" 937 source = "registry+https://github.com/rust-lang/crates.io-index" 938 + checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" 939 + 940 + [[package]] 941 + name = "unicode-normalization" 942 + version = "0.1.22" 943 + source = "registry+https://github.com/rust-lang/crates.io-index" 944 + checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 945 dependencies = [ 946 + "tinyvec", 947 ] 948 949 [[package]] 950 name = "url" 951 + version = "2.4.0" 952 source = "registry+https://github.com/rust-lang/crates.io-index" 953 + checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" 954 dependencies = [ 955 "form_urlencoded", 956 "idna", ··· 959 ] 960 961 [[package]] 962 + name = "vcpkg" 963 + version = "0.2.15" 964 + source = "registry+https://github.com/rust-lang/crates.io-index" 965 + checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 966 + 967 + [[package]] 968 name = "version_check" 969 version = "0.9.4" 970 source = "registry+https://github.com/rust-lang/crates.io-index" 971 checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 972 973 [[package]] 974 + name = "waker-fn" 975 + version = "1.1.0" 976 + source = "registry+https://github.com/rust-lang/crates.io-index" 977 + checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 978 + 979 + [[package]] 980 name = "walkdir" 981 + version = "2.3.3" 982 source = "registry+https://github.com/rust-lang/crates.io-index" 983 + checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" 984 dependencies = [ 985 "same-file", 986 "winapi-util", 987 ] 988 989 [[package]] 990 + name = "wasi" 991 + version = "0.11.0+wasi-snapshot-preview1" 992 source = "registry+https://github.com/rust-lang/crates.io-index" 993 + checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 994 995 [[package]] 996 + name = "winapi" 997 + version = "0.3.9" 998 source = "registry+https://github.com/rust-lang/crates.io-index" 999 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1000 dependencies = [ 1001 + "winapi-i686-pc-windows-gnu", 1002 + "winapi-x86_64-pc-windows-gnu", 1003 ] 1004 1005 [[package]] 1006 + name = "winapi-i686-pc-windows-gnu" 1007 + version = "0.4.0" 1008 source = "registry+https://github.com/rust-lang/crates.io-index" 1009 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1010 1011 [[package]] 1012 + name = "winapi-util" 1013 + version = "0.1.5" 1014 source = "registry+https://github.com/rust-lang/crates.io-index" 1015 + checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1016 dependencies = [ 1017 + "winapi", 1018 ] 1019 1020 [[package]] 1021 + name = "winapi-x86_64-pc-windows-gnu" 1022 + version = "0.4.0" 1023 source = "registry+https://github.com/rust-lang/crates.io-index" 1024 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1025 1026 [[package]] 1027 + name = "windows-sys" 1028 + version = "0.48.0" 1029 source = "registry+https://github.com/rust-lang/crates.io-index" 1030 + checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1031 dependencies = [ 1032 + "windows-targets", 1033 ] 1034 1035 [[package]] 1036 + name = "windows-targets" 1037 + version = "0.48.1" 1038 source = "registry+https://github.com/rust-lang/crates.io-index" 1039 + checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" 1040 dependencies = [ 1041 + "windows_aarch64_gnullvm", 1042 + "windows_aarch64_msvc", 1043 + "windows_i686_gnu", 1044 + "windows_i686_msvc", 1045 + "windows_x86_64_gnu", 1046 + "windows_x86_64_gnullvm", 1047 + "windows_x86_64_msvc", 1048 ] 1049 1050 [[package]] 1051 + name = "windows_aarch64_gnullvm" 1052 + version = "0.48.0" 1053 source = "registry+https://github.com/rust-lang/crates.io-index" 1054 + checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 1055 1056 [[package]] 1057 + name = "windows_aarch64_msvc" 1058 + version = "0.48.0" 1059 + source = "registry+https://github.com/rust-lang/crates.io-index" 1060 + checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 1061 + 1062 + [[package]] 1063 + name = "windows_i686_gnu" 1064 + version = "0.48.0" 1065 + source = "registry+https://github.com/rust-lang/crates.io-index" 1066 + checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 1067 + 1068 + [[package]] 1069 + name = "windows_i686_msvc" 1070 + version = "0.48.0" 1071 source = "registry+https://github.com/rust-lang/crates.io-index" 1072 + checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 1073 1074 [[package]] 1075 + name = "windows_x86_64_gnu" 1076 + version = "0.48.0" 1077 source = "registry+https://github.com/rust-lang/crates.io-index" 1078 + checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 1079 1080 [[package]] 1081 + name = "windows_x86_64_gnullvm" 1082 + version = "0.48.0" 1083 source = "registry+https://github.com/rust-lang/crates.io-index" 1084 + checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 1085 1086 [[package]] 1087 + name = "windows_x86_64_msvc" 1088 + version = "0.48.0" 1089 source = "registry+https://github.com/rust-lang/crates.io-index" 1090 + checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
+13 -11
pkgs/build-support/node/fetch-npm-deps/Cargo.toml
··· 6 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 8 [dependencies] 9 - anyhow = "1.0.65" 10 - base64 = "0.13.0" 11 - digest = "0.10.5" 12 - rayon = "1.5.3" 13 - serde = { version = "1.0.145", features = ["derive"] } 14 - serde_json = "1.0.85" 15 sha1 = "0.10.5" 16 - sha2 = "0.10.6" 17 - tempfile = "3.3.0" 18 - ureq = { version = "2.5.0" } 19 - url = { version = "2.3.1", features = ["serde"] } 20 - walkdir = "2.3.2"
··· 6 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 8 [dependencies] 9 + anyhow = "1.0.71" 10 + backoff = "0.4.0" 11 + base64 = "0.21.2" 12 + digest = "0.10.7" 13 + env_logger = "0.10.0" 14 + isahc = { version = "1.7.2", default_features = false } 15 + rayon = "1.7.0" 16 + serde = { version = "1.0.164", features = ["derive"] } 17 + serde_json = "1.0.99" 18 sha1 = "0.10.5" 19 + sha2 = "0.10.7" 20 + tempfile = "3.6.0" 21 + url = { version = "2.4.0", features = ["serde"] } 22 + walkdir = "2.3.3"
+9 -3
pkgs/build-support/node/fetch-npm-deps/default.nix
··· 1 - { lib, stdenvNoCC, rustPlatform, makeWrapper, Security, gnutar, gzip, nix, testers, fetchurl, prefetch-npm-deps, fetchNpmDeps }: 2 3 { 4 prefetch-npm-deps = rustPlatform.buildRustPackage { ··· 16 17 cargoLock.lockFile = ./Cargo.lock; 18 19 - nativeBuildInputs = [ makeWrapper ]; 20 - buildInputs = lib.optional stdenvNoCC.isDarwin Security; 21 22 postInstall = '' 23 wrapProgram "$out/bin/prefetch-npm-deps" --prefix PATH : ${lib.makeBinPath [ gnutar gzip nix ]} ··· 164 ''; 165 166 dontInstall = true; 167 168 outputHashMode = "recursive"; 169 } // hash_ // forceGitDeps_);
··· 1 + { lib, stdenvNoCC, rustPlatform, makeWrapper, pkg-config, curl, gnutar, gzip, nix, testers, fetchurl, cacert, prefetch-npm-deps, fetchNpmDeps }: 2 3 { 4 prefetch-npm-deps = rustPlatform.buildRustPackage { ··· 16 17 cargoLock.lockFile = ./Cargo.lock; 18 19 + nativeBuildInputs = [ makeWrapper pkg-config ]; 20 + buildInputs = [ curl ]; 21 22 postInstall = '' 23 wrapProgram "$out/bin/prefetch-npm-deps" --prefix PATH : ${lib.makeBinPath [ gnutar gzip nix ]} ··· 164 ''; 165 166 dontInstall = true; 167 + 168 + impureEnvVars = lib.fetchers.proxyImpureEnvVars; 169 + 170 + SSL_CERT_FILE = if (hash_.outputHash == "" || hash_.outputHash == lib.fakeSha256 || hash_.outputHash == lib.fakeSha512 || hash_.outputHash == lib.fakeHash) 171 + then "${cacert}/etc/ssl/certs/ca-bundle.crt" 172 + else "/no-cert-file.crt"; 173 174 outputHashMode = "recursive"; 175 } // hash_ // forceGitDeps_);
+3 -2
pkgs/build-support/node/fetch-npm-deps/src/cacache.rs
··· 1 use digest::{Digest, Update}; 2 use serde::{Deserialize, Serialize}; 3 use sha1::Sha1; ··· 52 let (algo, hash, integrity) = if let Some(integrity) = integrity { 53 let (algo, hash) = integrity.split_once('-').unwrap(); 54 55 - (algo.to_string(), base64::decode(hash)?, integrity) 56 } else { 57 let hash = Sha512::new().chain(data).finalize(); 58 59 ( 60 String::from("sha512"), 61 hash.to_vec(), 62 - format!("sha512-{}", base64::encode(hash)), 63 ) 64 }; 65
··· 1 + use base64::prelude::{Engine, BASE64_STANDARD}; 2 use digest::{Digest, Update}; 3 use serde::{Deserialize, Serialize}; 4 use sha1::Sha1; ··· 53 let (algo, hash, integrity) = if let Some(integrity) = integrity { 54 let (algo, hash) = integrity.split_once('-').unwrap(); 55 56 + (algo.to_string(), BASE64_STANDARD.decode(hash)?, integrity) 57 } else { 58 let hash = Sha512::new().chain(data).finalize(); 59 60 ( 61 String::from("sha512"), 62 hash.to_vec(), 63 + format!("sha512-{}", BASE64_STANDARD.encode(hash)), 64 ) 65 }; 66
+15
pkgs/build-support/node/fetch-npm-deps/src/main.rs
··· 16 17 mod cacache; 18 mod parse; 19 20 fn cache_map_path() -> Option<PathBuf> { 21 env::var_os("CACHE_MAP_PATH").map(PathBuf::from) ··· 172 } 173 174 fn main() -> anyhow::Result<()> { 175 let args = env::args().collect::<Vec<_>>(); 176 177 if args.len() < 2 { ··· 180 println!("Prefetches npm dependencies for usage by fetchNpmDeps."); 181 182 process::exit(1); 183 } 184 185 if args[1] == "--fixup-lockfile" {
··· 16 17 mod cacache; 18 mod parse; 19 + mod util; 20 21 fn cache_map_path() -> Option<PathBuf> { 22 env::var_os("CACHE_MAP_PATH").map(PathBuf::from) ··· 173 } 174 175 fn main() -> anyhow::Result<()> { 176 + env_logger::init(); 177 + 178 let args = env::args().collect::<Vec<_>>(); 179 180 if args.len() < 2 { ··· 183 println!("Prefetches npm dependencies for usage by fetchNpmDeps."); 184 185 process::exit(1); 186 + } 187 + 188 + if let Ok(jobs) = env::var("NIX_BUILD_CORES") { 189 + if !jobs.is_empty() { 190 + rayon::ThreadPoolBuilder::new() 191 + .num_threads( 192 + jobs.parse() 193 + .expect("NIX_BUILD_CORES must be a whole number"), 194 + ) 195 + .build_global() 196 + .unwrap(); 197 + } 198 } 199 200 if args[1] == "--fixup-lockfile" {
+6 -33
pkgs/build-support/node/fetch-npm-deps/src/parse/mod.rs
··· 3 use rayon::prelude::*; 4 use serde_json::{Map, Value}; 5 use std::{ 6 - fs, io, 7 process::{Command, Stdio}, 8 - thread, 9 - time::Duration, 10 }; 11 use tempfile::{tempdir, TempDir}; 12 - use ureq::{Error, ErrorKind, Response}; 13 use url::Url; 14 15 pub mod lock; 16 ··· 106 107 let specifics = match get_hosted_git_url(&resolved)? { 108 Some(hosted) => { 109 - let mut body = get_response(hosted.as_str())?.into_reader(); 110 111 let workdir = tempdir()?; 112 ··· 157 Specifics::Registry { .. } => { 158 let mut body = Vec::new(); 159 160 - get_response(self.url.as_str())? 161 - .into_reader() 162 - .read_to_end(&mut body)?; 163 164 Ok(body) 165 } ··· 189 Specifics::Git { .. } => None, 190 } 191 } 192 - } 193 - 194 - #[allow(clippy::result_large_err)] 195 - fn get_response(url: &str) -> Result<Response, Error> { 196 - for _ in 0..4 { 197 - match ureq::get(url).call() { 198 - Err(Error::Status(503 | 429, r)) => { 199 - let retry: Option<u64> = r.header("retry-after").and_then(|h| h.parse().ok()); 200 - let retry = retry.unwrap_or(5); 201 - eprintln!("{} for {}, retry in {}", r.status(), r.get_url(), retry); 202 - thread::sleep(Duration::from_secs(retry)); 203 - } 204 - Err(Error::Transport(t)) => match t.kind() { 205 - ErrorKind::ConnectionFailed | ErrorKind::Dns | ErrorKind::Io => { 206 - let retry = 5; 207 - eprintln!("{} for {}, retry in {}", t.kind(), url, retry); 208 - thread::sleep(Duration::from_secs(retry)); 209 - } 210 - _ => return Err(Error::Transport(t)), 211 - }, 212 - result => return result, 213 - }; 214 - } 215 - // Ran out of retries; try one last time and return whatever result we get. 216 - ureq::get(url).call() 217 } 218 219 #[allow(clippy::case_sensitive_file_extension_comparisons)]
··· 3 use rayon::prelude::*; 4 use serde_json::{Map, Value}; 5 use std::{ 6 + fs, 7 + io::{self, Read}, 8 process::{Command, Stdio}, 9 }; 10 use tempfile::{tempdir, TempDir}; 11 use url::Url; 12 + 13 + use crate::util; 14 15 pub mod lock; 16 ··· 106 107 let specifics = match get_hosted_git_url(&resolved)? { 108 Some(hosted) => { 109 + let mut body = util::get_url_with_retry(&hosted)?; 110 111 let workdir = tempdir()?; 112 ··· 157 Specifics::Registry { .. } => { 158 let mut body = Vec::new(); 159 160 + util::get_url_with_retry(&self.url)?.read_to_end(&mut body)?; 161 162 Ok(body) 163 } ··· 187 Specifics::Git { .. } => None, 188 } 189 } 190 } 191 192 #[allow(clippy::case_sensitive_file_extension_comparisons)]
+45
pkgs/build-support/node/fetch-npm-deps/src/util.rs
···
··· 1 + use backoff::{retry, ExponentialBackoff}; 2 + use isahc::{ 3 + config::{CaCertificate, Configurable, RedirectPolicy, SslOption}, 4 + Body, Request, RequestExt, 5 + }; 6 + use std::{env, path::Path}; 7 + use url::Url; 8 + 9 + pub fn get_url(url: &Url) -> Result<Body, isahc::Error> { 10 + let mut request = Request::get(url.as_str()).redirect_policy(RedirectPolicy::Limit(10)); 11 + 12 + // Respect SSL_CERT_FILE if environment variable exists 13 + if let Ok(ssl_cert_file) = env::var("SSL_CERT_FILE") { 14 + if Path::new(&ssl_cert_file).exists() { 15 + // When file exists, use it. NIX_SSL_CERT_FILE will still override. 16 + request = request.ssl_ca_certificate(CaCertificate::file(ssl_cert_file)); 17 + } else if env::var("outputHash").is_ok() { 18 + // When file does not exist, assume we are downloading in a FOD and 19 + // therefore do not need to check certificates, since the output is 20 + // already hashed. 21 + request = request.ssl_options(SslOption::DANGER_ACCEPT_INVALID_CERTS); 22 + } 23 + } 24 + 25 + Ok(request.body(())?.send()?.into_body()) 26 + } 27 + 28 + pub fn get_url_with_retry(url: &Url) -> Result<Body, isahc::Error> { 29 + retry(ExponentialBackoff::default(), || { 30 + get_url(url).map_err(|err| { 31 + if err.is_network() || err.is_timeout() { 32 + backoff::Error::transient(err) 33 + } else { 34 + backoff::Error::permanent(err) 35 + } 36 + }) 37 + }) 38 + .map_err(|backoff_err| match backoff_err { 39 + backoff::Error::Permanent(err) 40 + | backoff::Error::Transient { 41 + err, 42 + retry_after: _, 43 + } => err, 44 + }) 45 + }
+2 -3
pkgs/top-level/all-packages.nix
··· 9798 9799 npmHooks = callPackage ../build-support/node/build-npm-package/hooks { }; 9800 9801 - inherit (callPackage ../build-support/node/fetch-npm-deps { 9802 - inherit (darwin.apple_sdk.frameworks) Security; 9803 - }) fetchNpmDeps prefetch-npm-deps; 9804 9805 nodePackages_latest = dontRecurseIntoAttrs nodejs_latest.pkgs; 9806
··· 9798 9799 npmHooks = callPackage ../build-support/node/build-npm-package/hooks { }; 9800 9801 + inherit (callPackage ../build-support/node/fetch-npm-deps { }) 9802 + fetchNpmDeps prefetch-npm-deps; 9803 9804 nodePackages_latest = dontRecurseIntoAttrs nodejs_latest.pkgs; 9805