From 50cacc1c4457a9b3b862e5a126225ba91c791f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Mon, 20 Nov 2023 11:52:28 +0100 Subject: [PATCH] feat: upgrade Deno to v1.38.2 / 2023.11.17 (#417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miroslav Bajtoš --- Cargo.lock | 806 +++++++++++++++++++-------------- Cargo.toml | 3 +- ext/libp2p/lib.rs | 14 +- runtime/Cargo.toml | 14 +- runtime/ext.rs | 26 +- runtime/js/98_global_scope.js | 2 + runtime/js/99_main.js | 9 +- runtime/reporter.rs | 12 + runtime/vendored/cli_tools.rs | 20 +- runtime/vendored/colors.rs | 18 +- runtime/vendored/fmt_errors.rs | 42 +- 11 files changed, 587 insertions(+), 379 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d9e9609c..6c6eb1dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,7 +23,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -32,7 +32,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.7", + "generic-array", "rand_core 0.6.4", ] @@ -43,7 +43,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -455,17 +455,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -499,6 +488,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.1" @@ -507,9 +502,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.1" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64-simd" @@ -563,7 +558,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -572,7 +567,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -597,7 +592,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -671,9 +666,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "ccm" @@ -694,25 +692,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chacha20" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" dependencies = [ "cfg-if", - "cipher 0.3.0", + "cipher 0.4.4", "cpufeatures", - "zeroize", ] [[package]] name = "chacha20poly1305" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" dependencies = [ - "aead 0.4.3", + "aead 0.5.2", "chacha20", - "cipher 0.3.0", + "cipher 0.4.4", "poly1305", "zeroize", ] @@ -735,7 +732,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -744,7 +741,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -755,6 +752,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -797,15 +795,6 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - [[package]] name = "colorchoice" version = "1.0.0" @@ -922,7 +911,19 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.7", + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", "rand_core 0.6.4", "subtle", "zeroize", @@ -934,7 +935,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.7", + "generic-array", "rand_core 0.6.4", "typenum", ] @@ -945,7 +946,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.7", + "generic-array", "subtle", ] @@ -967,19 +968,6 @@ dependencies = [ "cipher 0.4.4", ] -[[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -995,18 +983,31 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.1" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", "fiat-crypto", - "packed_simd_2", "platforms", + "rustc_version 0.4.0", "subtle", "zeroize", ] +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.28", +] + [[package]] name = "darling" version = "0.14.4" @@ -1075,52 +1076,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41b319d1b62ffbd002e057f36bebd1f42b9f97927c9577461d855f3513c4289f" [[package]] -name = "deno-proc-macro-rules" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c65c2ffdafc1564565200967edc4851c7b55422d3913466688907efd05ea26f" -dependencies = [ - "deno-proc-macro-rules-macros", - "proc-macro2", - "syn 2.0.28", -] - -[[package]] -name = "deno-proc-macro-rules-macros" -version = "0.3.2" +name = "debugid" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3047b312b7451e3190865713a4dd6e1f821aed614ada219766ebc3024a690435" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.28", + "serde", + "uuid", ] [[package]] name = "deno_console" -version = "0.118.0" +version = "0.124.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1c32084b9ff8667d7d2176262739ce473e0341c7625325b48a2fbab0c903dc" +checksum = "be3e75cda1e4dc563ca7dd6a5c24c06043bef5f58351291f525aac0b7c9d6cf1" dependencies = [ "deno_core", ] [[package]] name = "deno_core" -version = "0.204.0" +version = "0.230.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ddf51deb9a3bb60a4ab74784414b3f2f89de83a77d6d90a64c6447f7765d68" +checksum = "8f040a1d56091d209851d011d4882cb2367fceeb64ec630106ca89fad258430a" dependencies = [ "anyhow", "bytes", "deno_ops", "deno_unsync", "futures", - "indexmap 1.9.3", "libc", "log", - "once_cell", "parking_lot 0.12.1", "pin-project", "serde", @@ -1135,45 +1121,44 @@ dependencies = [ [[package]] name = "deno_crypto" -version = "0.132.0" +version = "0.138.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39deb9b4cadcb1a7a98138ac34fadf5389bd2fee4b4e8e8c3f6333c09efea89e" +checksum = "9933d35b22a8aa16639a2ccf47aa61aab2e716227cf867f5f6e72c6e184252ec" dependencies = [ "aes 0.8.3", "aes-gcm 0.10.2", "aes-kw", - "base64 0.13.1", + "base64 0.21.5", "cbc", "const-oid", "ctr 0.9.2", - "curve25519-dalek 2.1.3", + "curve25519-dalek 4.1.1", "deno_core", "deno_web", - "elliptic-curve", + "elliptic-curve 0.13.7", "num-traits", "once_cell", - "p256", - "p384", + "p256 0.13.2", + "p384 0.13.0", "rand 0.8.5", - "ring", + "ring 0.17.5", "rsa", - "sec1", "serde", "serde_bytes", "sha1", - "sha2 0.10.6", - "signature", - "spki", + "sha2 0.10.8", + "signature 2.2.0", + "spki 0.7.2", "tokio", "uuid", - "x25519-dalek 2.0.0-pre.1", + "x25519-dalek 2.0.0", ] [[package]] name = "deno_fetch" -version = "0.142.0" +version = "0.148.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "067336cb3a415cce643007c8ace7872a19a517d6e1eccbf9e8cfff8d886fb31a" +checksum = "03da8572d0769db998ac4d9b99f039083756b7ecbee458dca709278292d3a740" dependencies = [ "bytes", "data-url", @@ -1188,36 +1173,43 @@ dependencies = [ ] [[package]] -name = "deno_ops" -version = "0.82.0" +name = "deno_native_certs" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b660872f9a9737d3424470483dd6730d2129481af5055449a2a37ab5bc2145e" +checksum = "f4785d0bdc13819b665b71e4fb7e119d859568471e4c245ec5610857e70c9345" dependencies = [ - "deno-proc-macro-rules", - "lazy-regex", + "dlopen2", + "dlopen2_derive", "once_cell", - "pmutil", - "proc-macro-crate", + "rustls-native-certs", + "rustls-pemfile", +] + +[[package]] +name = "deno_ops" +version = "0.106.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "215363aeee70b8ae4dca3557c7b85f48f2c231e798b23913c1d3901785ace01e" +dependencies = [ + "proc-macro-rules", "proc-macro2", "quote", - "regex", "strum", "strum_macros", - "syn 1.0.109", "syn 2.0.28", "thiserror", ] [[package]] name = "deno_tls" -version = "0.105.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8d622d1a59b48192258274bf58a5a6f44d4a0497fc8c4396c1a37759385417" +checksum = "3d5f09c7ec139e96601cfead355dfdafb06d5dd17433482c9a496cd053406fb4" dependencies = [ "deno_core", + "deno_native_certs", "once_cell", - "rustls 0.21.7", - "rustls-native-certs", + "rustls 0.21.9", "rustls-pemfile", "rustls-webpki", "serde", @@ -1226,18 +1218,18 @@ dependencies = [ [[package]] name = "deno_unsync" -version = "0.1.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac0984205f25e71ddd1be603d76e70255953c12ff864707359ab195d26dfc7b3" +checksum = "f8a8f3722afd50e566ecfc783cc8a3a046bc4dd5eb45007431dfb2776aeb8993" dependencies = [ "tokio", ] [[package]] name = "deno_url" -version = "0.118.0" +version = "0.124.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9915e0eecac8ed1177b99eca8a220abfdcd8f4e7c5b0d99443b6b81eb90472b" +checksum = "67d748c3250f82ed4f0032591849c417d9c2c6318a9eaef0b915920113190dc0" dependencies = [ "deno_core", "serde", @@ -1246,9 +1238,9 @@ dependencies = [ [[package]] name = "deno_web" -version = "0.149.0" +version = "0.155.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c183739430b71fd42f6edee0303f13f01b31e9cf80844157b7ca37b91e369275" +checksum = "562bb45f520abba8bb5a754ae2a1dda04b0042918eed544b5741e352af937f6c" dependencies = [ "async-trait", "base64-simd", @@ -1265,9 +1257,9 @@ dependencies = [ [[package]] name = "deno_webidl" -version = "0.118.0" +version = "0.124.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b84c418b9748f166a004eba3a67b2a8f8c1b9661bbe509c7c31cc21d7c72f6" +checksum = "8853c2cb5d4d1c6bd323dd9bfe7c461e47becfe13fa8b4b698c89f0ac785e886" dependencies = [ "deno_core", ] @@ -1279,7 +1271,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", - "pem-rfc7468", + "pem-rfc7468 0.6.0", + "zeroize", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "pem-rfc7468 0.7.0", "zeroize", ] @@ -1367,22 +1370,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -1408,6 +1402,29 @@ dependencies = [ "syn 2.0.28", ] +[[package]] +name = "dlopen2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bc2c7ed06fd72a8513ded8d0d2f6fd2655a85d6885c48cae8625d80faf28c03" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.28", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -1432,10 +1449,24 @@ version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.7", + "rfc6979 0.4.0", + "signature 2.2.0", + "spki 0.7.2", ] [[package]] @@ -1444,7 +1475,7 @@ version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ - "signature", + "signature 1.6.4", ] [[package]] @@ -1473,18 +1504,39 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "base16ct", - "crypto-bigint", - "der", + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.7", + "ff 0.12.1", + "generic-array", + "group 0.12.1", + "hkdf", + "pem-rfc7468 0.6.0", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1 0.3.0", + "subtle", + "zeroize", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9775b22bc152ad86a0cf23f0f348b884b26add12bf741e7ffc4d4ab2ab4d205" +dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.5", "digest 0.10.7", - "ff", - "generic-array 0.14.7", - "group", + "ff 0.13.0", + "generic-array", + "group 0.13.0", "hkdf", - "pem-rfc7468", - "pkcs8", + "pem-rfc7468 0.7.0", + "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1", + "sec1 0.7.3", "subtle", "zeroize", ] @@ -1581,11 +1633,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "flate2" @@ -1594,7 +1656,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", - "libz-ng-sys", "miniz_oxide 0.7.1", ] @@ -1745,15 +1806,6 @@ dependencies = [ "slab", ] -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -1762,6 +1814,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -1777,9 +1830,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", @@ -1842,7 +1895,18 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ - "ff", + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", "rand_core 0.6.4", "subtle", ] @@ -1893,15 +1957,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.2.6" @@ -2040,7 +2095,7 @@ checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" dependencies = [ "http", "hyper", - "rustls 0.21.7", + "rustls 0.21.9", "tokio", "tokio-rustls", ] @@ -2174,7 +2229,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ "block-padding 0.3.3", - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -2280,36 +2335,13 @@ dependencies = [ "log", ] -[[package]] -name = "lazy-regex" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff63c423c68ea6814b7da9e88ce585f793c87ddd9e78f646970891769c8235d4" -dependencies = [ - "lazy-regex-proc_macros", - "once_cell", - "regex", -] - -[[package]] -name = "lazy-regex-proc_macros" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8edfc11b8f56ce85e207e62ea21557cfa09bb24a8f6b04ae181b086ff8611c22" -dependencies = [ - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", -] - [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "spin", + "spin 0.5.2", ] [[package]] @@ -2318,12 +2350,6 @@ version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" -[[package]] -name = "libm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" - [[package]] name = "libm" version = "0.2.7" @@ -2339,7 +2365,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.9", + "getrandom 0.2.11", "instant", "libp2p-allow-block-list", "libp2p-connection-limits", @@ -2438,7 +2464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70b34b6da8165c0bde35c82db8efda39b824776537e73973549e76cadb3a77c5" dependencies = [ "asynchronous-codec", - "base64 0.21.1", + "base64 0.21.5", "byteorder", "bytes", "either", @@ -2456,7 +2482,7 @@ dependencies = [ "rand 0.8.5", "regex", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "smallvec", "thiserror", "unsigned-varint", @@ -2500,9 +2526,9 @@ dependencies = [ "multihash", "quick-protobuf", "rand 0.8.5", - "ring", + "ring 0.16.20", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "zeroize", ] @@ -2528,7 +2554,7 @@ dependencies = [ "quick-protobuf", "rand 0.8.5", "serde", - "sha2 0.10.6", + "sha2 0.10.8", "smallvec", "thiserror", "uint", @@ -2603,7 +2629,7 @@ dependencies = [ "once_cell", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.8", "snow", "static_assertions", "thiserror", @@ -2725,7 +2751,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "rcgen 0.10.0", - "ring", + "ring 0.16.20", "rustls 0.20.8", "thiserror", "webpki 0.22.0", @@ -2777,16 +2803,6 @@ dependencies = [ "yamux", ] -[[package]] -name = "libz-ng-sys" -version = "1.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dd9f43e75536a46ee0f92b758f6b63846e594e86638c61a9251338a65baea63" -dependencies = [ - "cmake", - "libc", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2957,7 +2973,7 @@ dependencies = [ "multihash-derive", "serde", "serde-big-array", - "sha2 0.10.6", + "sha2 0.10.8", "unsigned-varint", ] @@ -3103,7 +3119,7 @@ checksum = "2399c9463abc5f909349d8aa9ba080e0b88b3ce2885389b60b993f39b1a56905" dependencies = [ "byteorder", "lazy_static", - "libm 0.2.7", + "libm", "num-integer", "num-iter", "num-traits", @@ -3140,7 +3156,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", - "libm 0.2.7", + "libm", ] [[package]] @@ -3210,9 +3226,21 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.10.6", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", +] + +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa 0.16.9", + "elliptic-curve 0.13.7", + "primeorder", + "sha2 0.10.8", ] [[package]] @@ -3221,19 +3249,21 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ - "ecdsa", - "elliptic-curve", - "sha2 0.10.6", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", ] [[package]] -name = "packed_simd_2" -version = "0.3.8" +name = "p384" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" +checksum = "70786f51bcc69f6a4c0360e063a4cac5419ef7c5cd5b3c99ad70f3be5ba79209" dependencies = [ - "cfg-if", - "libm 0.1.4", + "ecdsa 0.16.9", + "elliptic-curve 0.13.7", + "primeorder", + "sha2 0.10.8", ] [[package]] @@ -3314,6 +3344,15 @@ dependencies = [ "base64ct", ] +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.2.0" @@ -3354,14 +3393,13 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs1" -version = "0.4.1" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff33bdbdfc54cc98a2eca766ebdec3e1b8fb7387523d5c9c9a2891da856f719" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" dependencies = [ - "der", - "pkcs8", - "spki", - "zeroize", + "der 0.7.8", + "pkcs8 0.10.2", + "spki 0.7.2", ] [[package]] @@ -3370,26 +3408,25 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ - "der", - "spki", + "der 0.6.1", + "spki 0.6.0", ] [[package]] -name = "platforms" -version = "3.0.2" +name = "pkcs8" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.8", + "spki 0.7.2", +] [[package]] -name = "pmutil" -version = "0.6.1" +name = "platforms" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.28", -] +checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] name = "polling" @@ -3409,13 +3446,13 @@ dependencies = [ [[package]] name = "poly1305" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" dependencies = [ "cpufeatures", "opaque-debug", - "universal-hash 0.4.1", + "universal-hash 0.5.1", ] [[package]] @@ -3486,6 +3523,15 @@ dependencies = [ "yansi", ] +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve 0.13.7", +] + [[package]] name = "proc-macro-crate" version = "1.1.3" @@ -3520,11 +3566,34 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-rules" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c277e4e643ef00c1233393c673f655e3672cf7eb3ba08a00bdd0ea59139b5f" +dependencies = [ + "proc-macro-rules-macros", + "proc-macro2", + "syn 2.0.28", +] + +[[package]] +name = "proc-macro-rules-macros" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "207fffb0fe655d1d47f6af98cc2793405e85929bdbc420d685554ff07be27ac7" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.28", +] + [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -3588,7 +3657,7 @@ checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", "rustls 0.20.8", "slab", @@ -3600,9 +3669,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -3666,7 +3735,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", ] [[package]] @@ -3685,7 +3754,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", - "ring", + "ring 0.16.20", "time", "x509-parser 0.13.2", "yasna", @@ -3698,7 +3767,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", + "ring 0.16.20", "time", "yasna", ] @@ -3763,7 +3832,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "async-compression", - "base64 0.21.1", + "base64 0.21.5", "bytes", "encoding_rs", "futures-core", @@ -3780,7 +3849,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.7", + "rustls 0.21.9", "rustls-pemfile", "serde", "serde_json", @@ -3815,11 +3884,21 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ - "crypto-bigint", + "crypto-bigint 0.4.9", "hmac 0.12.1", "zeroize", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + [[package]] name = "ring" version = "0.16.20" @@ -3829,29 +3908,42 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +dependencies = [ + "cc", + "getrandom 0.2.11", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rsa" -version = "0.7.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "094052d5470cbcef561cb848a7209968c9f12dfa6d668f4bca048ac5de51099c" +checksum = "86ef35bf3e7fe15a53c4ab08a998e42271eab13eb0db224126bc7bc4c4bad96d" dependencies = [ - "byteorder", + "const-oid", "digest 0.10.7", "num-bigint-dig", "num-integer", - "num-iter", "num-traits", "pkcs1", - "pkcs8", + "pkcs8 0.10.2", "rand_core 0.6.4", - "signature", - "smallvec", + "signature 2.2.0", + "spki 0.7.2", "subtle", "zeroize", ] @@ -3970,7 +4062,7 @@ checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.1", "log", - "ring", + "ring 0.16.20", "sct 0.6.1", "webpki 0.21.4", ] @@ -3982,19 +4074,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct 0.7.0", "webpki 0.22.0", ] [[package]] name = "rustls" -version = "0.21.7" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring", + "ring 0.17.5", "rustls-webpki", "sct 0.7.0", ] @@ -4017,17 +4109,17 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.21.1", + "base64 0.21.5", ] [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "untrusted", + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -4083,8 +4175,8 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -4093,8 +4185,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -4115,10 +4207,24 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ - "base16ct", - "der", - "generic-array 0.14.7", - "pkcs8", + "base16ct 0.1.1", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.8", + "generic-array", + "pkcs8 0.10.2", "subtle", "zeroize", ] @@ -4242,15 +4348,14 @@ dependencies = [ [[package]] name = "serde_v8" -version = "0.115.0" +version = "0.139.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f6cc041512391aabdae4dd11d51e370824ea35bfe896fb2585b6792e28c9bf" +checksum = "340328b061f990810dc28a444078da33da191003a031555dcd30c69314f03840" dependencies = [ "bytes", "derive_more", "num-bigint", "serde", - "serde_bytes", "smallvec", "thiserror", "v8", @@ -4271,9 +4376,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -4295,9 +4400,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -4323,6 +4428,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + [[package]] name = "slab" version = "0.4.8" @@ -4340,18 +4455,18 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "snow" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" +checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" dependencies = [ - "aes-gcm 0.9.4", + "aes-gcm 0.10.2", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.1", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", - "ring", + "ring 0.17.5", "rustc_version 0.4.0", - "sha2 0.10.6", + "sha2 0.10.8", "subtle", ] @@ -4377,11 +4492,12 @@ dependencies = [ [[package]] name = "sourcemap" -version = "6.2.3" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed16231c92d0a6f0388f56e0ab2be24ecff1173f8e22f0ea5e074d0525631cb" +checksum = "10da010a590ed2fa9ca8467b00ce7e9c5a8017742c0c09c45450efc172208c4b" dependencies = [ "data-encoding", + "debugid", "if_chain", "rustc_version 0.2.3", "serde", @@ -4396,6 +4512,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.6.0" @@ -4403,7 +4525,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", - "der", + "der 0.6.1", +] + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der 0.7.8", ] [[package]] @@ -4451,7 +4583,7 @@ dependencies = [ "lazy_static", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "subtle", "thiserror", "tokio", @@ -4675,7 +4807,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" dependencies = [ - "rustls 0.21.7", + "rustls 0.21.9", "tokio", ] @@ -4817,7 +4949,7 @@ dependencies = [ "log", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "stun", "thiserror", "tokio", @@ -4928,7 +5060,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.7", + "generic-array", "subtle", ] @@ -4958,6 +5090,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.3.1" @@ -4995,15 +5133,15 @@ version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.11", "serde", ] [[package]] name = "v8" -version = "0.74.3" +version = "0.81.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eedac634b8dd39b889c5b62349cbc55913780226239166435c5cf66771792ea" +checksum = "b75f5f378b9b54aff3b10da8170d26af4cfd217f644cf671badcd13af5db4beb" dependencies = [ "bitflags 1.3.2", "fslock", @@ -5216,8 +5354,8 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -5226,8 +5364,8 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] @@ -5252,14 +5390,14 @@ dependencies = [ "rand 0.8.5", "rcgen 0.9.3", "regex", - "ring", + "ring 0.16.20", "rtcp", "rtp", "rustls 0.19.1", "sdp", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", "stun", "thiserror", "time", @@ -5307,29 +5445,29 @@ dependencies = [ "ccm", "curve25519-dalek 3.2.0", "der-parser 8.2.0", - "elliptic-curve", + "elliptic-curve 0.12.3", "hkdf", "hmac 0.12.1", "log", "oid-registry 0.6.1", - "p256", - "p384", + "p256 0.11.1", + "p384 0.11.2", "rand 0.8.5", "rand_core 0.6.4", "rcgen 0.9.3", - "ring", + "ring 0.16.20", "rustls 0.19.1", - "sec1", + "sec1 0.3.0", "serde", "sha1", - "sha2 0.10.6", - "signature", + "sha2 0.10.8", + "signature 1.6.4", "subtle", "thiserror", "tokio", "webpki 0.21.4", "webrtc-util", - "x25519-dalek 2.0.0-pre.1", + "x25519-dalek 2.0.0", "x509-parser 0.13.2", ] @@ -5724,12 +5862,13 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0-pre.1" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", + "serde", "zeroize", ] @@ -5746,7 +5885,7 @@ dependencies = [ "lazy_static", "nom", "oid-registry 0.4.0", - "ring", + "ring 0.16.20", "rusticata-macros", "thiserror", "time", @@ -5856,7 +5995,6 @@ name = "zinnia_runtime" version = "0.14.0" dependencies = [ "assert_fs", - "atty", "chrono", "console_static_text", "deno_console", diff --git a/Cargo.toml b/Cargo.toml index b67387da..7644c909 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,8 @@ repository = "https://github.com/filecoin-station/zinnia" [workspace.dependencies] assert_cmd = "2.0.12" assert_fs = "1.0.13" -deno_core = "0.204.0" +console_static_text = "=0.8.1" +deno_core = "0.230.0" log = "0.4.20" pretty_assertions = "1.4.0" env_logger = "0.10.1" diff --git a/ext/libp2p/lib.rs b/ext/libp2p/lib.rs index ec9780ba..38a120f2 100644 --- a/ext/libp2p/lib.rs +++ b/ext/libp2p/lib.rs @@ -3,7 +3,7 @@ use std::rc::Rc; use deno_core::anyhow::{anyhow, Context, Result}; use deno_core::error::AnyError; -use deno_core::{op, JsBuffer, OpState}; +use deno_core::{op2, JsBuffer, OpState}; use libp2p::identity::PeerId; use libp2p::multiaddr::Protocol; use libp2p::Multiaddr; @@ -45,7 +45,8 @@ deno_core::extension!( }, ); -#[op] +#[op2] +#[string] pub fn op_p2p_get_peer_id(state: &mut OpState) -> Result { let rid = state.borrow::().0; let node = state.resource_table.get::(rid)?; @@ -53,12 +54,13 @@ pub fn op_p2p_get_peer_id(state: &mut OpState) -> Result { Ok(id.to_string()) } -#[op] +#[op2(async)] +#[buffer] pub async fn op_p2p_request_protocol( state: Rc>, - remote_address: String, - protocol_name: String, - request_payload: JsBuffer, + #[string] remote_address: String, + #[string] protocol_name: String, + #[buffer] request_payload: JsBuffer, ) -> Result> { let mut peer_addr: Multiaddr = remote_address .parse() diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 3b72222b..7ae71232 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -12,15 +12,15 @@ name = "zinnia_runtime" path = "lib.rs" [dependencies] -atty = "0.2.14" +console_static_text.workspace = true chrono = { version= "0.4.31", default-features = false, features = [ "clock", "std" ] } -deno_console = "0.118.0" +deno_console = "0.124.0" deno_core.workspace = true -deno_crypto = "0.132.0" -deno_fetch = "0.142.0" -deno_url = "0.118.0" -deno_web = "0.149.0" -deno_webidl = "0.118.0" +deno_crypto = "0.138.0" +deno_fetch = "0.148.0" +deno_url = "0.124.0" +deno_web = "0.155.0" +deno_webidl = "0.124.0" lassie = "0.7.0" # lassie = { git = "https://github.com/filecoin-station/rusty-lassie.git" } log.workspace = true diff --git a/runtime/ext.rs b/runtime/ext.rs index 146e69e1..ce7db107 100644 --- a/runtime/ext.rs +++ b/runtime/ext.rs @@ -4,11 +4,11 @@ use std::rc::Rc; use deno_core::anyhow::Result; use deno_core::error::JsError; use deno_core::url::Url; -use deno_core::{op, OpState}; +use deno_core::{op2, OpState}; use deno_fetch::FetchPermissions; use deno_web::TimersPermission; -use crate::{LogLevel, Reporter}; +use crate::Reporter; /// Hard-coded permissions pub struct ZinniaPermissions; @@ -24,7 +24,6 @@ impl TimersPermission for ZinniaPermissions { // > adding jitter to them. false } - fn check_unstable(&self, _state: &deno_core::OpState, _api_name: &'static str) {} } impl FetchPermissions for ZinniaPermissions { @@ -68,31 +67,32 @@ deno_core::extension!( type StoredReporter = Rc; -#[op] +#[op2(fast)] fn op_job_completed(state: &mut OpState) { let reporter = state.borrow::(); reporter.job_completed(); } -#[op] -fn op_info_activity(state: &mut OpState, msg: &str) { +#[op2(fast)] +fn op_info_activity(state: &mut OpState, #[string] msg: &str) { let reporter = state.borrow::(); reporter.info_activity(msg); } -#[op] -fn op_error_activity(state: &mut OpState, msg: &str) { +#[op2(fast)] +fn op_error_activity(state: &mut OpState, #[string] msg: &str) { let reporter = state.borrow::(); reporter.error_activity(msg); } -#[op] -fn op_zinnia_log(state: &mut OpState, msg: &str, level: LogLevel) { +#[op2(fast)] +fn op_zinnia_log(state: &mut OpState, #[string] msg: &str, #[smi] level: i32) { let reporter = state.borrow::(); - reporter.log(level, msg); + reporter.log(level.into(), msg); } -#[op] -fn op_format_test_error(error: JsError) -> String { +#[op2] +#[string] +fn op_format_test_error(#[serde] error: JsError) -> String { crate::vendored::cli_tools::format_test_error(&error) } diff --git a/runtime/js/98_global_scope.js b/runtime/js/98_global_scope.js index 2fd432db..1fd93c71 100644 --- a/runtime/js/98_global_scope.js +++ b/runtime/js/98_global_scope.js @@ -23,6 +23,7 @@ import * as fileReader from "ext:deno_web/10_filereader.js"; import * as formData from "ext:deno_fetch/21_formdata.js"; import * as request from "ext:deno_fetch/23_request.js"; import * as response from "ext:deno_fetch/23_response.js"; +import * as eventSource from "ext:deno_fetch/27_eventsource.js"; import * as fetch from "ext:zinnia_runtime/fetch.js"; import * as messagePort from "ext:deno_web/13_message_port.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; @@ -103,6 +104,7 @@ const windowOrWorkerGlobalScope = { Crypto: util.nonEnumerable(crypto.Crypto), SubtleCrypto: util.nonEnumerable(crypto.SubtleCrypto), fetch: util.writable(fetch.fetch), + EventSource: util.writable(eventSource.EventSource), performance: util.writable(performance.performance), reportError: util.writable(event.reportError), setInterval: util.writable(timers.setInterval), diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 6fef69ce..d83467bf 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -28,7 +28,7 @@ import { getNoColor, inspectArgs, quoteString, - setNoColor, + setNoColorFn, wrapConsole, } from "ext:deno_console/01_console.js"; import * as performance from "ext:deno_web/15_performance.js"; @@ -64,10 +64,9 @@ function runtimeStart(runtimeOptions) { // ); // build.setBuildInfo(runtimeOptions.target); // util.setLogDebug(runtimeOptions.debugFlag, source); - setNoColor(runtimeOptions.noColor || !runtimeOptions.isTty); - - // deno-lint-ignore prefer-primordials - Error.prepareStackTrace = core.prepareStackTrace; + // FIXME: rework to lazy load, see + // https://github.com/denoland/deno/commit/1ef617e8f3d48098e69e222b6eb6fe981aeca1c3 + setNoColorFn(() => runtimeOptions.noColor || !runtimeOptions.isTty); setLassieConfig(runtimeOptions.lassieUrl, runtimeOptions.lassieAuth); setVersions(runtimeOptions.zinniaVersion, runtimeOptions.v8Version); diff --git a/runtime/reporter.rs b/runtime/reporter.rs index 377bce6f..f1c1a871 100644 --- a/runtime/reporter.rs +++ b/runtime/reporter.rs @@ -35,6 +35,18 @@ impl From for log::Level { } } +impl From for LogLevel { + fn from(value: i32) -> Self { + match value { + 0 => LogLevel::Debug, + 1 => LogLevel::Info, + 2 => LogLevel::Warn, + 3 => LogLevel::Error, + _ => panic!("Invalid LogLevel value {}", value), + } + } +} + // Report events, activities and messages from the running module pub trait Reporter { /// Print a debug log message. This is typically triggered by Console APIs like `console.log`. diff --git a/runtime/vendored/cli_tools.rs b/runtime/vendored/cli_tools.rs index c4b53c9b..520ade07 100644 --- a/runtime/vendored/cli_tools.rs +++ b/runtime/vendored/cli_tools.rs @@ -1,9 +1,25 @@ -// https://github.com/denoland/deno/blob/v1.33.3/cli/tools/test.rs +// https://github.com/denoland/deno/blob/v1.38.2/cli/tools/test.rs // // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. use crate::fmt_errors::format_js_error; -use deno_core::error::JsError; +use deno_core::{error::JsError, url::Url}; + +#[allow(dead_code)] +pub fn to_relative_path_or_remote_url(cwd: &Url, path_or_url: &str) -> String { + let Ok(url) = Url::parse(path_or_url) else { + return "".to_string(); + }; + if url.scheme() == "file" { + if let Some(mut r) = cwd.make_relative(&url) { + if !r.starts_with("../") { + r = format!("./{r}"); + } + return r; + } + } + path_or_url.to_string() +} fn abbreviate_test_error(js_error: &JsError) -> JsError { let mut js_error = js_error.clone(); diff --git a/runtime/vendored/colors.rs b/runtime/vendored/colors.rs index a73f921e..e6f22208 100644 --- a/runtime/vendored/colors.rs +++ b/runtime/vendored/colors.rs @@ -1,10 +1,10 @@ -// https://github.com/denoland/deno/blob/v1.31.2/runtime/colors.rs +// https://github.com/denoland/deno/blob/v1.38.2/runtime/colors.rs // // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. -use atty; use once_cell::sync::Lazy; use std::fmt; +use std::io::IsTerminal; use std::io::Write; use termcolor::Ansi; use termcolor::Color::Ansi256; @@ -12,6 +12,7 @@ use termcolor::Color::Black; use termcolor::Color::Blue; use termcolor::Color::Cyan; use termcolor::Color::Green; +use termcolor::Color::Magenta; use termcolor::Color::Red; use termcolor::Color::White; use termcolor::Color::Yellow; @@ -25,7 +26,7 @@ use termcolor::ColorChoice; static NO_COLOR: Lazy = Lazy::new(|| std::env::var_os("NO_COLOR").is_some()); -static IS_TTY: Lazy = Lazy::new(|| atty::is(atty::Stream::Stdout)); +static IS_TTY: Lazy = Lazy::new(|| std::io::stdout().is_terminal()); pub fn is_tty() -> bool { *IS_TTY @@ -105,6 +106,17 @@ pub fn cyan>(s: S) -> impl fmt::Display { style_spec.set_fg(Some(Cyan)); style(s, style_spec) } +pub fn cyan_bold>(s: S) -> impl fmt::Display { + let mut style_spec = ColorSpec::new(); + style_spec.set_fg(Some(Cyan)).set_bold(true); + style(s, style_spec) +} + +pub fn magenta>(s: S) -> impl fmt::Display { + let mut style_spec = ColorSpec::new(); + style_spec.set_fg(Some(Magenta)); + style(s, style_spec) +} pub fn red>(s: S) -> impl fmt::Display { let mut style_spec = ColorSpec::new(); diff --git a/runtime/vendored/fmt_errors.rs b/runtime/vendored/fmt_errors.rs index 1417d8a9..26fbbc54 100644 --- a/runtime/vendored/fmt_errors.rs +++ b/runtime/vendored/fmt_errors.rs @@ -1,4 +1,4 @@ -// https://github.com/denoland/deno/blob/v1.31.2/runtime/fmt_errors.rs +// https://github.com/denoland/deno/blob/v1.38.2/runtime/fmt_errors.rs // // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. //! This mod provides DenoError to unify errors across Deno. @@ -14,7 +14,7 @@ use std::fmt::Write as _; /// Compares all properties of JsError, except for JsError::cause. /// This function is used to detect that 2 JsError objects in a JsError::cause /// chain are identical, ie. there is a recursive cause. -/// 02_console.js, which also detects recursive causes, can use JS object +/// 01_console.js, which also detects recursive causes, can use JS object /// comparisons to compare errors. We don't have access to JS object identity in /// format_js_error(). fn errors_are_equal_without_cause(a: &JsError, b: &JsError) -> bool { @@ -47,7 +47,8 @@ pub fn format_location(frame: &JsStackFrame) -> String { let _internal = frame .file_name .as_ref() - .map_or(false, |f| f.starts_with("ext:")); + .map(|f| f.starts_with("ext:")) + .unwrap_or(false); if frame.is_native { return cyan("native").to_string(); } @@ -74,7 +75,8 @@ fn format_frame(frame: &JsStackFrame) -> String { let _internal = frame .file_name .as_ref() - .map_or(false, |f| f.starts_with("ext:")); + .map(|f| f.starts_with("ext:")) + .unwrap_or(false); let is_method_call = !(frame.is_top_level.unwrap_or_default() || frame.is_constructor); let mut result = String::new(); if frame.is_async { @@ -252,7 +254,10 @@ fn format_js_error_inner( if let Some(aggregated) = &js_error.aggregated { let aggregated_message = format_aggregated_error( aggregated, - circular.as_ref().map_or(0, |circular| circular.index), + circular + .as_ref() + .map(|circular| circular.index) + .unwrap_or(0), ); s.push_str(&aggregated_message); } @@ -274,9 +279,10 @@ fn format_js_error_inner( write!(s, "\n at {}", format_frame(frame)).unwrap(); } if let Some(cause) = &js_error.cause { - let is_caused_by_circular = circular.as_ref().map_or(false, |circular| { - errors_are_equal_without_cause(circular.reference.from, js_error) - }); + let is_caused_by_circular = circular + .as_ref() + .map(|circular| errors_are_equal_without_cause(circular.reference.from, js_error)) + .unwrap_or(false); let error_string = if is_caused_by_circular { cyan(format!("[Circular *{}]", circular.unwrap().index)).to_string() @@ -303,3 +309,23 @@ pub fn format_js_error(js_error: &JsError) -> String { format_js_error_inner(js_error, circular, true) } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_format_none_source_line() { + let actual = format_maybe_source_line(None, None, false, 0); + assert_eq!(actual, ""); + } + + #[test] + fn test_format_some_source_line() { + let actual = format_maybe_source_line(Some("console.log('foo');"), Some(9), true, 0); + assert_eq!( + console_static_text::ansi::strip_ansi_codes(&actual), + "\nconsole.log(\'foo\');\n ^" + ); + } +}