diff --git a/Cargo.lock b/Cargo.lock index 2fff1932a1..b4f271d847 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,27 +14,27 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d713b3834d76b85304d4d525563c1276e2e30dc97cc67bfb4585a4a29fc2c89f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.11", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -42,9 +42,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -66,9 +66,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -87,9 +87,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -102,43 +102,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.76" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59d2a3357dde987206219e78ecfbbb6e8dad06cbb65292758d3270e6254f7355" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" dependencies = [ "backtrace", ] @@ -166,20 +166,20 @@ checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "assert_fs" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd762e110c8ed629b11b6cde59458cc1c71de78ebbcc30099fc8e0403a2a2ec" +checksum = "7efdb1fdb47602827a342857666feb372712cbc64b414172bd6b167a02927674" dependencies = [ "anstyle", "doc-comment", "globwalk", - "predicates 3.1.0", + "predicates 3.1.3", "predicates-core", "predicates-tree", "tempfile", @@ -194,13 +194,13 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "ast_node" version = "0.9.5" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "pmutil", "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -246,18 +246,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -279,15 +279,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.1.10" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48730d0b4c3d91c43d0d37168831d9fd0e065ad4a889a2ee9faf8d34c3d2804d" +checksum = "c03a50b30228d3af8865ce83376b4e99e1ffa34728220fe2860e4df0bb5278d6" dependencies = [ "aws-credential-types", "aws-runtime", @@ -304,9 +304,8 @@ dependencies = [ "bytes", "fastrand", "hex", - "http 0.2.11", - "hyper 0.14.28", - "ring 0.17.7", + "http 0.2.12", + "ring 0.17.8", "time", "tokio", "tracing", @@ -328,9 +327,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.4.3" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a10d5c055aa540164d9561a0e2e74ad30f0dcf7393c3a92f6733ddf9c5762468" +checksum = "b16d1aa50accc11a4b4d5c50f7fb81cc0cf60328259c587d0e6b0f11385bde46" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -343,7 +342,7 @@ dependencies = [ "aws-types", "bytes", "fastrand", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "once_cell", "percent-encoding", @@ -354,9 +353,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.60.0" +version = "1.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0506cc60e392e33712d47717d5ae5760a3b134bf8ee7aea7e43df3d7e2669ae0" +checksum = "bc5ddf1dc70287dc9a2f953766a1fe15e3e74aef02fd1335f2afa475c9b4f4fc" dependencies = [ "aws-credential-types", "aws-runtime", @@ -375,7 +374,7 @@ dependencies = [ "fastrand", "hex", "hmac", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "lru", "once_cell", @@ -388,9 +387,9 @@ dependencies = [ [[package]] name = "aws-sdk-sns" -version = "1.20.0" +version = "1.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52af73816ae1c9c1e68c10e6b45d919ccbfab8d878ffc216a00d707bd794c38f" +checksum = "b71d976a6c87d15fd3ceab6fcaa17e0d02a05a06d30f5e268e4160b25dbde26d" dependencies = [ "aws-credential-types", "aws-runtime", @@ -403,7 +402,7 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "http 0.2.11", + "http 0.2.12", "once_cell", "regex-lite", "tracing", @@ -411,9 +410,9 @@ dependencies = [ [[package]] name = "aws-sdk-sqs" -version = "1.19.0" +version = "1.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257532fe672a67b9a2fb7c3bdcff9ab3dc55dae6e36982b1f8e2d2d9e6b10762" +checksum = "6493ce2b27a2687b0d8a2453bf6ad2499012e9720c3367cb1206496ede475443" dependencies = [ "aws-credential-types", "aws-runtime", @@ -425,7 +424,7 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http 0.2.11", + "http 0.2.12", "once_cell", "regex-lite", "tracing", @@ -433,9 +432,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.19.0" +version = "1.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2be5ba83b077b67a6f7a1927eb6b212bf556e33bd74b5eaa5aa6e421910803a" +checksum = "1605dc0bf9f0a4b05b451441a17fcb0bda229db384f23bf5cead3adbab0664ac" dependencies = [ "aws-credential-types", "aws-runtime", @@ -447,7 +446,7 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http 0.2.11", + "http 0.2.12", "once_cell", "regex-lite", "tracing", @@ -455,9 +454,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.19.0" +version = "1.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022ca669825f841aef17b12d4354ef2b8651e4664be49f2d9ea13e4062a80c9f" +checksum = "59f3f73466ff24f6ad109095e0f3f2c830bfb4cd6c8b12f744c8e61ebf4d3ba1" dependencies = [ "aws-credential-types", "aws-runtime", @@ -469,7 +468,7 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http 0.2.11", + "http 0.2.12", "once_cell", "regex-lite", "tracing", @@ -477,9 +476,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.19.0" +version = "1.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e4a5f5cb007347c1ab34a6d56456301dfada921fc9e57d687ecb08baddd11ff" +checksum = "249b2acaa8e02fd4718705a9494e3eb633637139aa4bb09d70965b0448e865db" dependencies = [ "aws-credential-types", "aws-runtime", @@ -492,7 +491,7 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "http 0.2.11", + "http 0.2.12", "once_cell", "regex-lite", "tracing", @@ -500,9 +499,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.2.5" +version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5619742a0d8f253be760bfbb8e8e8368c69e3587e4637af5754e488a611499b1" +checksum = "7d3820e0c08d0737872ff3c7c1f21ebbb6693d832312d6152bf18ef50a5471c2" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -514,12 +513,12 @@ dependencies = [ "form_urlencoded", "hex", "hmac", - "http 0.2.11", - "http 1.0.0", + "http 0.2.12", + "http 1.2.0", "once_cell", "p256", "percent-encoding", - "ring 0.17.7", + "ring 0.17.8", "sha2", "subtle", "time", @@ -529,9 +528,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.1" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" +checksum = "427cb637d15d63d6f9aae26358e1c9a9c09d5aa490d64b09354c8217cfef0f28" dependencies = [ "futures-util", "pin-project-lite", @@ -550,7 +549,7 @@ dependencies = [ "crc32c", "crc32fast", "hex", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "md-5", "pin-project-lite", @@ -582,7 +581,7 @@ dependencies = [ "bytes", "bytes-utils", "futures-core", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "once_cell", "percent-encoding", @@ -593,9 +592,9 @@ dependencies = [ [[package]] name = "aws-smithy-json" -version = "0.60.7" +version = "0.61.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" +checksum = "ee4e69cc50921eb913c6b662f8d909131bb3e6ad6cb6090d3a39b66fc5c52095" dependencies = [ "aws-smithy-types", ] @@ -612,9 +611,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.3" +version = "1.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be28bd063fa91fd871d131fc8b68d7cd4c5fa0869bea68daca50dcb1cbd76be2" +checksum = "a05dd41a70fc74051758ee75b5c4db2c0ca070ed9229c3df50e9475cda1cb985" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -622,17 +621,17 @@ dependencies = [ "aws-smithy-types", "bytes", "fastrand", - "h2 0.3.22", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", - "http-body 1.0.0", + "http-body 1.0.1", "httparse", - "hyper 0.14.28", - "hyper-rustls", + "hyper 0.14.32", + "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", "pin-utils", - "rustls 0.21.10", + "rustls 0.21.12", "tokio", "tracing", ] @@ -646,8 +645,8 @@ dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", - "http 0.2.11", - "http 1.0.0", + "http 0.2.12", + "http 1.2.0", "pin-project-lite", "tokio", "tracing", @@ -656,18 +655,18 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.9" +version = "1.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd94a32b3a7d55d3806fe27d98d3ad393050439dd05eb53ece36ec5e3d3510" +checksum = "38ddc9bd6c28aeb303477170ddd183760a956a03e083b3902a990238a7e3792d" dependencies = [ "base64-simd", "bytes", "bytes-utils", "futures-core", - "http 0.2.11", - "http 1.0.0", + "http 0.2.12", + "http 1.2.0", "http-body 0.4.6", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", "itoa", "num-integer", @@ -714,9 +713,9 @@ dependencies = [ "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.32", "itoa", "matchit", "memchr", @@ -726,26 +725,26 @@ dependencies = [ "rustversion", "serde", "sync_wrapper 0.1.2", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", ] [[package]] name = "axum" -version = "0.7.5" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", - "axum-core 0.4.3", - "base64 0.21.5", + "axum-core 0.4.5", + "base64 0.22.1", "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.0", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.1.0", + "hyper 1.5.2", "hyper-util", "itoa", "matchit", @@ -759,10 +758,10 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sha1", - "sync_wrapper 1.0.1", + "sync_wrapper 1.0.2", "tokio", - "tokio-tungstenite", - "tower", + "tokio-tungstenite 0.24.0", + "tower 0.5.2", "tower-layer", "tower-service", "tracing", @@ -777,7 +776,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.11", + "http 0.2.12", "http-body 0.4.6", "mime", "rustversion", @@ -787,20 +786,20 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.0", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", "tracing", @@ -818,17 +817,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -851,9 +850,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" @@ -879,12 +878,11 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bb8" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df7c2093d15d6a1d33b1f972e1c5ea3177748742b97a5f392aa83a65262c6780" +checksum = "d89aabfae550a5c44b43ab941844ffcd2e993cb6900b342debf59e9ea74acdb8" dependencies = [ "async-trait", - "futures-channel", "futures-util", "parking_lot", "tokio", @@ -905,7 +903,7 @@ dependencies = [ [[package]] name = "better_scoped_tls" version = "0.1.1" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "scoped-tls", ] @@ -918,9 +916,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blake2" @@ -963,22 +961,12 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" -dependencies = [ - "lazy_static", - "memchr", - "regex-automata 0.1.10", -] - -[[package]] -name = "bstr" -version = "1.8.0" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", + "regex-automata 0.4.9", "serde", ] @@ -993,9 +981,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -1005,9 +993,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "bytes-utils" @@ -1033,12 +1021,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -1049,9 +1038,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1074,7 +1063,7 @@ dependencies = [ "clap_lex", "indexmap 1.9.3", "once_cell", - "strsim", + "strsim 0.10.0", "termcolor", "textwrap", ] @@ -1109,48 +1098,48 @@ checksum = "aaa6b4b263a5d737e9bf6b7c09b72c41a5480aec4d7219af827f6564e950b6a5" [[package]] name = "cmake" -version = "0.1.50" +version = "0.1.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" +checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e" dependencies = [ "cc", ] [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] [[package]] name = "console" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "windows-sys 0.52.0", + "once_cell", + "windows-sys 0.59.0", ] [[package]] @@ -1161,9 +1150,9 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1186,15 +1175,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -1210,9 +1199,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -1228,18 +1217,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1256,21 +1245,18 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.18" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" -dependencies = [ - "cfg-if", -] +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-bigint" @@ -1306,12 +1292,12 @@ dependencies = [ [[package]] name = "ctor" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" +checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -1325,9 +1311,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -1335,27 +1321,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.47", + "strsim 0.11.1", + "syn 2.0.95", ] [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -1365,7 +1351,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", @@ -1400,9 +1386,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -1437,6 +1423,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + [[package]] name = "doc-comment" version = "0.3.3" @@ -1475,9 +1472,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -1510,15 +1507,15 @@ dependencies = [ [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1528,7 +1525,7 @@ name = "encore-js-runtime" version = "0.1.0" dependencies = [ "anyhow", - "axum 0.7.5", + "axum 0.7.9", "bytes", "chrono", "encore-runtime-core", @@ -1543,7 +1540,7 @@ dependencies = [ "prost-types", "serde_json", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.21.0", "tokio-util", ] @@ -1560,10 +1557,10 @@ dependencies = [ "aws-sdk-sns", "aws-sdk-sqs", "aws-smithy-types", - "axum 0.7.5", + "axum 0.7.9", "backtrace", "base32", - "base64 0.21.5", + "base64 0.21.7", "bb8", "bb8-postgres", "bytes", @@ -1571,7 +1568,7 @@ dependencies = [ "colored", "duct", "email_address", - "env_logger 0.10.1", + "env_logger 0.10.2", "flate2", "form_urlencoded", "futures", @@ -1584,13 +1581,13 @@ dependencies = [ "google-cloud-storage", "hex", "hmac", - "http 1.0.0", + "http 1.2.0", "http-body-util", "httpdate", - "hyper 1.1.0", - "indexmap 2.2.6", + "hyper 1.5.2", + "indexmap 2.7.0", "insta", - "jsonwebtoken 9.2.0", + "jsonwebtoken", "log", "matchit", "md5", @@ -1610,7 +1607,7 @@ dependencies = [ "radix_fmt", "rand 0.8.5", "regex", - "reqwest 0.12.4", + "reqwest 0.12.12", "rsa", "serde", "serde_json", @@ -1620,12 +1617,12 @@ dependencies = [ "sha2", "sha3", "subtle", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-nsq", "tokio-postgres", "tokio-retry", - "tokio-tungstenite", + "tokio-tungstenite 0.21.0", "tokio-util", "tower-http", "tower-service", @@ -1642,14 +1639,14 @@ name = "encore-supervisor" version = "0.1.0" dependencies = [ "anyhow", - "axum 0.7.5", - "base64 0.21.5", + "axum 0.7.9", + "base64 0.21.7", "bytes", - "env_logger 0.11.5", + "env_logger 0.11.6", "flate2", "futures", - "http 1.0.0", - "hyper 1.1.0", + "http 1.2.0", + "hyper 1.5.2", "libc", "log", "openssl", @@ -1657,7 +1654,7 @@ dependencies = [ "prost", "prost-build", "prost-types", - "reqwest 0.12.4", + "reqwest 0.12.12", "serde", "serde_json", "tokio", @@ -1678,9 +1675,9 @@ dependencies = [ "convert_case", "cron-parser", "duct", - "env_logger 0.10.1", + "env_logger 0.10.2", "handlebars", - "indexmap 2.2.6", + "indexmap 2.7.0", "insta", "itertools 0.13.0", "junction", @@ -1692,9 +1689,10 @@ dependencies = [ "prost", "prost-build", "regex", + "semver", "serde", "serde_json", - "serde_yaml 0.9.32", + "serde_yaml 0.9.34+deprecated", "swc_common", "swc_ecma_ast", "swc_ecma_loader", @@ -1703,7 +1701,7 @@ dependencies = [ "swc_ecma_visit", "symlink", "tempdir", - "thiserror", + "thiserror 1.0.69", "tracing", "tracing-subscriber", "txtar", @@ -1713,9 +1711,9 @@ dependencies = [ [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -1733,9 +1731,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1746,9 +1744,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -1765,21 +1763,22 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.4.2" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55d05712b2d8d88102bc9868020c9e5c7a1f5527c452b9b97450a1d006140ba7" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" dependencies = [ "serde", + "typeid", ] [[package]] name = "errno" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1796,9 +1795,9 @@ checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "ff" @@ -1810,12 +1809,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "fixedbitset" version = "0.4.2" @@ -1824,9 +1817,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", "libz-ng-sys", @@ -1848,6 +1841,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1875,12 +1874,12 @@ dependencies = [ [[package]] name = "from_variant" version = "0.1.6" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "pmutil", "proc-macro2", "swc_macros_common", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -1891,9 +1890,9 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1906,9 +1905,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1916,15 +1915,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1933,38 +1932,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1990,9 +1989,9 @@ dependencies = [ [[package]] name = "geo-types" -version = "0.7.12" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567495020b114f1ce9bed679b29975aa0bfae06ac22beacd5cfde5dabe7b05d6" +checksum = "b6f47c611187777bbca61ea7aba780213f5f3441fd36294ab333e96cfa791b65" dependencies = [ "approx", "num-traits", @@ -2022,9 +2021,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -2035,9 +2034,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gjson" @@ -2047,12 +2046,12 @@ checksum = "43503cc176394dd30a6525f5f36e838339b8b5619be33ed9a7783841580a97b6" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", - "bstr 1.8.0", + "bstr", "log", "regex-automata 0.4.9", "regex-syntax 0.8.5", @@ -2064,27 +2063,27 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "ignore", "walkdir", ] [[package]] name = "google-cloud-auth" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1087f1fbd2dd3f58c17c7574ddd99cd61cbbbc2c4dc81114b8687209b196cb" +checksum = "3bf7cb7864f08a92e77c26bb230d021ea57691788fb5dd51793f96965d19e7f9" dependencies = [ "async-trait", - "base64 0.21.5", + "base64 0.21.7", "google-cloud-metadata 0.4.0", "google-cloud-token", "home", - "jsonwebtoken 8.3.0", - "reqwest 0.11.23", + "jsonwebtoken", + "reqwest 0.11.27", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -2093,20 +2092,20 @@ dependencies = [ [[package]] name = "google-cloud-auth" -version = "0.17.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357160f51a60ec3e32169ad687f4abe0ee1e90c73b449aa5d11256c4f1cf2ff6" +checksum = "e57a13fbacc5e9c41ded3ad8d0373175a6b7a6ad430d99e89d314ac121b7ab06" dependencies = [ "async-trait", - "base64 0.21.5", + "base64 0.21.7", "google-cloud-metadata 0.5.0", "google-cloud-token", "home", - "jsonwebtoken 9.2.0", - "reqwest 0.12.4", + "jsonwebtoken", + "reqwest 0.12.12", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -2120,12 +2119,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cb60314136e37de9e2a05ddb427b9c5a39c3d188de2e2f026c6af74425eef44" dependencies = [ "google-cloud-token", - "http 0.2.11", - "thiserror", + "http 0.2.12", + "thiserror 1.0.69", "tokio", "tokio-retry", "tonic", - "tower", + "tower 0.4.13", "tracing", ] @@ -2146,8 +2145,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc279bfb50487d7bcd900e8688406475fc750fe474a835b2ab9ade9eb1fc90e2" dependencies = [ - "reqwest 0.11.23", - "thiserror", + "reqwest 0.11.27", + "thiserror 1.0.69", "tokio", ] @@ -2157,8 +2156,8 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04f945a208886a13d07636f38fb978da371d0abc3e34bad338124b9f8c135a8f" dependencies = [ - "reqwest 0.12.4", - "thiserror", + "reqwest 0.12.12", + "thiserror 1.0.69", "tokio", ] @@ -2170,12 +2169,12 @@ checksum = "0f6e4fdcd8303ad0d0cdb8b5722aa3a57de9534af27d4da71fc4d3179174a896" dependencies = [ "async-channel", "async-stream", - "google-cloud-auth 0.13.0", + "google-cloud-auth 0.13.2", "google-cloud-gax", "google-cloud-googleapis", "google-cloud-token", "prost-types", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-util", "tracing", @@ -2190,10 +2189,10 @@ dependencies = [ "anyhow", "async-stream", "async-trait", - "base64 0.21.5", + "base64 0.21.7", "bytes", "futures-util", - "google-cloud-auth 0.17.1", + "google-cloud-auth 0.17.2", "google-cloud-metadata 0.5.0", "google-cloud-token", "hex", @@ -2201,13 +2200,13 @@ dependencies = [ "percent-encoding", "pkcs8 0.10.2", "regex", - "reqwest 0.12.4", + "reqwest 0.12.12", "reqwest-middleware", - "ring 0.17.7", + "ring 0.17.8", "serde", "serde_json", "sha2", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tracing", @@ -2236,17 +2235,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.22" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.11", - "indexmap 2.2.6", + "http 0.2.12", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -2255,17 +2254,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.0.0", - "indexmap 2.2.6", + "http 1.2.0", + "indexmap 2.7.0", "slab", "tokio", "tokio-util", @@ -2283,7 +2282,7 @@ dependencies = [ "pest_derive", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2294,12 +2293,19 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ - "ahash", "allocator-api2", + "equivalent", + "foldhash", ] [[package]] @@ -2329,6 +2335,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -2346,11 +2358,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2366,22 +2378,23 @@ dependencies = [ [[package]] name = "hstr" -version = "0.2.7" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17fafeca18cf0927e23ea44d7a5189c10536279dfe9094e0dfa953053fbb5377" +checksum = "63d6824358c0fd9a68bb23999ed2ef76c84f79408a26ef7ae53d5f370c94ad36" dependencies = [ + "hashbrown 0.14.5", "new_debug_unreachable", "once_cell", - "phf 0.11.2", + "phf 0.11.3", "rustc-hash", - "smallvec", + "triomphe", ] [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2390,9 +2403,9 @@ dependencies = [ [[package]] name = "http" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -2406,44 +2419,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.11", + "http 0.2.12", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.0.0", + "http 1.2.0", ] [[package]] name = "http-body-util" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.0", + "http 1.2.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "http-range-header" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a397c49fec283e3d6211adbe480be95aae5f304cfb923e9970e08956d5168a" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -2459,16 +2472,16 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2 0.3.22", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", @@ -2483,20 +2496,21 @@ dependencies = [ [[package]] name = "hyper" -version = "1.1.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.6", - "http 1.0.0", - "http-body 1.0.0", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", "pin-project-lite", + "smallvec", "tokio", "want", ] @@ -2508,22 +2522,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.11", - "hyper 0.14.28", + "http 0.2.12", + "hyper 0.14.32", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs", "tokio", "tokio-rustls 0.24.1", ] +[[package]] +name = "hyper-rustls" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +dependencies = [ + "futures-util", + "http 1.2.0", + "hyper 1.5.2", + "hyper-util", + "rustls 0.23.20", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.1", + "tower-service", +] + [[package]] name = "hyper-timeout" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.28", + "hyper 0.14.32", "pin-project-lite", "tokio", "tokio-io-timeout", @@ -2536,7 +2567,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.28", + "hyper 0.14.32", "native-tls", "tokio", "tokio-native-tls", @@ -2550,7 +2581,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.1.0", + "hyper 1.5.2", "hyper-util", "native-tls", "tokio", @@ -2560,29 +2591,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", - "http 1.0.0", - "http-body 1.0.0", - "hyper 1.1.0", + "http 1.2.0", + "http-body 1.0.1", + "hyper 1.5.2", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2601,6 +2631,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -2609,19 +2757,30 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", @@ -2646,25 +2805,25 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.15.2", "serde", ] [[package]] name = "insta" -version = "1.38.0" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" +checksum = "6513e4067e16e69ed1db5ab56048ed65db32d10ba5fc1217f5393f8f17d8b5a5" dependencies = [ "console", "globset", - "lazy_static", "linked-hash-map", + "once_cell", "serde", "similar", "walkdir", @@ -2672,40 +2831,40 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is-macro" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a85abdc13717906baccb5a1e435556ce0df215f242892f721dff62bf25288f" +checksum = "1d57a3e447e24c22647738e4607f1df1e0ec6f72e16182c4cd199f647cdfb0e4" dependencies = [ - "Inflector", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", - "rustix", - "windows-sys 0.48.0", + "hermit-abi 0.4.0", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -2723,6 +2882,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -2734,52 +2902,39 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.5", - "pem 1.1.1", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - -[[package]] -name = "jsonwebtoken" -version = "9.2.0" +version = "9.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" +checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "js-sys", - "pem 3.0.3", - "ring 0.17.7", + "pem", + "ring 0.17.8", "serde", "serde_json", "simple_asn1", @@ -2806,40 +2961,40 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" dependencies = [ - "spin 0.5.2", + "spin 0.9.8", ] [[package]] name = "libc" -version = "0.2.158" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.6", ] [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libz-ng-sys" -version = "1.1.15" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6409efc61b12687963e602df8ecf70e8ddacf95bc6576bcf16e3ac6328083c5" +checksum = "7cee1488e961a80d172564fd6fcda11d8a4ac6672c06fe008e9213fa60520c2b" dependencies = [ "cmake", "libc", @@ -2853,9 +3008,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "litparser" @@ -2883,14 +3044,14 @@ dependencies = [ "swc_common", "swc_ecma_ast", "swc_ecma_parser", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -2908,11 +3069,11 @@ dependencies = [ [[package]] name = "lru" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" dependencies = [ - "hashbrown 0.14.3", + "hashbrown 0.15.2", ] [[package]] @@ -2966,9 +3127,9 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" @@ -2997,20 +3158,19 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", @@ -3018,18 +3178,18 @@ dependencies = [ [[package]] name = "multimap" -version = "0.8.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "napi" -version = "2.14.1" +version = "2.16.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1133249c46e92da921bafc8aba4912bf84d6c475f7625183772ed2d0844dc3a7" +checksum = "214f07a80874bb96a8433b3cdfc84980d56c7b02e1a0d7ba4ba0db5cef785e2b" dependencies = [ "anyhow", - "bitflags 2.4.1", + "bitflags 2.6.0", "ctor", "napi-derive", "napi-sys", @@ -3041,29 +3201,29 @@ dependencies = [ [[package]] name = "napi-build" -version = "2.1.0" +version = "2.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4b4532cf86bfef556348ac65e561e3123879f0e7566cca6d43a6ff5326f13df" +checksum = "db836caddef23662b94e16bf1f26c40eceb09d6aee5d5b06a7ac199320b69b19" [[package]] name = "napi-derive" -version = "2.14.4" +version = "2.16.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b5af262f1d8e660742eb722abc7113a5b3c3de4144d0ef23ede2518672ceff1" +checksum = "7cbe2585d8ac223f7d34f13701434b9d5f4eb9c332cccce8dee57ea18ab8ab0c" dependencies = [ "cfg-if", "convert_case", "napi-derive-backend", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "napi-derive-backend" -version = "1.0.57" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea236321b521d6926213a2021e407b0562e28a257c037a45919e414d2cdb4f8" +checksum = "1639aaa9eeb76e91c6ae66da8ce3e89e921cd3885e99ec85f4abacae72fc91bf" dependencies = [ "convert_case", "once_cell", @@ -3071,25 +3231,24 @@ dependencies = [ "quote", "regex", "semver", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "napi-sys" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2503fa6af34dc83fb74888df8b22afe933b58d37daf7d80424b1c60c68196b8b" +checksum = "427802e8ec3a734331fec1035594a210ce1ff4dc5bc1950530920ab717964ea3" dependencies = [ "libloading", ] [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -3103,9 +3262,9 @@ dependencies = [ [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" @@ -3146,9 +3305,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits", @@ -3189,9 +3348,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -3220,18 +3379,18 @@ dependencies = [ [[package]] name = "object" -version = "0.32.2" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" @@ -3239,7 +3398,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -3256,7 +3415,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -3267,9 +3426,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.2.1+3.2.0" +version = "300.4.1+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fe476c29791a5ca0d1273c697e96085bbabbbea2ef7afd5617e78a4b40332d3" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" dependencies = [ "cc", ] @@ -3289,12 +3448,12 @@ dependencies = [ [[package]] name = "os_pipe" -version = "1.1.5" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9" +checksum = "5ffd2b0a5634335b135d5728d84c5e0fd726954b87111f7506a61c502280d982" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3328,9 +3487,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -3338,15 +3497,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -3363,26 +3522,17 @@ checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" [[package]] name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - -[[package]] -name = "pem" -version = "1.1.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "pem" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", "serde", ] @@ -3403,20 +3553,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.7" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror", + "thiserror 2.0.10", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.7" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" dependencies = [ "pest", "pest_generator", @@ -3424,22 +3574,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.7" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "pest_meta" -version = "2.7.7" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", @@ -3448,12 +3598,12 @@ dependencies = [ [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.7.0", ] [[package]] @@ -3469,12 +3619,12 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ - "phf_macros 0.11.2", - "phf_shared 0.11.2", + "phf_macros 0.11.3", + "phf_shared 0.11.3", ] [[package]] @@ -3489,11 +3639,11 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared 0.11.2", + "phf_shared 0.11.3", "rand 0.8.5", ] @@ -3513,15 +3663,15 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ - "phf_generator 0.11.2", - "phf_shared 0.11.2", + "phf_generator 0.11.3", + "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -3530,43 +3680,43 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ - "siphasher", + "siphasher 1.0.1", ] [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -3598,7 +3748,7 @@ dependencies = [ "blake2", "bytes", "hex", - "http 1.0.0", + "http 1.2.0", "httparse", "httpdate", "indexmap 1.9.3", @@ -3637,8 +3787,8 @@ dependencies = [ "daemonize", "flate2", "futures", - "h2 0.4.6", - "http 1.0.0", + "h2 0.4.7", + "http 1.2.0", "httparse", "httpdate", "libc", @@ -3684,7 +3834,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bcb3f62d852da015e76ced56e93e6d52941679a9825281c90f2897841129e59d" dependencies = [ "bytes", - "http 1.0.0", + "http 1.2.0", "httparse", "pingora-error", "pingora-http", @@ -3700,7 +3850,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70202f126056f366549afc804741e12dd9f419cfc79a0063ab15653007a0f4c6" dependencies = [ "bytes", - "http 1.0.0", + "http 1.2.0", "pingora-error", ] @@ -3724,7 +3874,7 @@ dependencies = [ "derivative", "fnv", "futures", - "http 1.0.0", + "http 1.2.0", "log", "pingora-core", "pingora-error", @@ -3742,7 +3892,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb50f65f06c4b81ccb3edcceaa54bb9439608506b0b3b8c048798169a64aad8e" dependencies = [ "arrayvec", - "hashbrown 0.14.3", + "hashbrown 0.15.2", "parking_lot", "rand 0.8.5", ] @@ -3772,8 +3922,8 @@ dependencies = [ "bytes", "clap", "futures", - "h2 0.4.6", - "http 1.0.0", + "h2 0.4.7", + "http 1.2.0", "log", "once_cell", "pingora-cache", @@ -3843,9 +3993,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "pmutil" @@ -3855,7 +4005,7 @@ checksum = "52a40bc70c2c58040d2d8b167ba9a5ff59fc9dab7ad44771cfde3dcfde7a09c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -3876,7 +4026,7 @@ name = "postgres-protocol" version = "0.6.6" source = "git+https://github.com/encoredev/rust-postgres?branch=proxy#08c0f981e1aa1d21c3f21ed50a19cdce8d21c873" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "byteorder", "bytes", "fallible-iterator", @@ -3913,9 +4063,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -3939,9 +4092,9 @@ dependencies = [ [[package]] name = "predicates" -version = "3.1.0" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "difflib", @@ -3950,15 +4103,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -3966,12 +4119,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "483f8c21f64f3ea09fe0f30f5d48c3e8eefe5dac9129f0075f76593b4c1da705" dependencies = [ "proc-macro2", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -4006,9 +4159,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -4025,14 +4178,14 @@ dependencies = [ "memchr", "parking_lot", "protobuf", - "thiserror", + "thiserror 1.0.69", ] [[package]] name = "prost" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", @@ -4040,13 +4193,13 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", - "heck 0.4.1", - "itertools 0.10.5", + "heck 0.5.0", + "itertools 0.12.1", "log", "multimap", "once_cell", @@ -4055,29 +4208,28 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.47", + "syn 2.0.95", "tempfile", - "which", ] [[package]] name = "prost-derive" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.12.1", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "prost-types" -version = "0.12.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] @@ -4101,9 +4253,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -4201,7 +4353,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.11", + "getrandom 0.2.15", ] [[package]] @@ -4224,11 +4376,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] @@ -4265,9 +4417,9 @@ dependencies = [ [[package]] name = "regex-lite" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" [[package]] name = "regex-syntax" @@ -4292,19 +4444,19 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.22", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.32", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -4314,10 +4466,12 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "system-configuration", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", "tokio", "tokio-native-tls", "tower-service", @@ -4330,9 +4484,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.4" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.1", "bytes", @@ -4340,11 +4494,12 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.4.6", - "http 1.0.0", - "http-body 1.0.0", + "h2 0.4.7", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.1.0", + "hyper 1.5.2", + "hyper-rustls 0.27.5", "hyper-tls 0.6.0", "hyper-util", "ipnet", @@ -4356,22 +4511,23 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile 2.1.2", + "rustls-pemfile 2.2.0", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", + "sync_wrapper 1.0.2", + "system-configuration 0.6.1", "tokio", "tokio-native-tls", "tokio-util", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.52.0", + "windows-registry", ] [[package]] @@ -4382,10 +4538,10 @@ checksum = "562ceb5a604d3f7c885a792d42c199fd8af239d0a51b2fa6a78aafa092452b04" dependencies = [ "anyhow", "async-trait", - "http 1.0.0", - "reqwest 0.12.4", + "http 1.2.0", + "reqwest 0.12.12", "serde", - "thiserror", + "thiserror 1.0.69", "tower-service", ] @@ -4417,16 +4573,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "getrandom 0.2.11", + "cfg-if", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4453,9 +4610,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -4473,9 +4630,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.35.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", "num-traits", @@ -4483,9 +4640,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -4495,24 +4652,24 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4530,16 +4687,29 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.7", - "rustls-webpki", + "ring 0.17.8", + "rustls-webpki 0.101.7", "sct 0.7.1", ] +[[package]] +name = "rustls" +version = "0.23.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -4558,24 +4728,23 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" @@ -4583,7 +4752,18 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring 0.17.8", + "rustls-pki-types", "untrusted 0.9.0", ] @@ -4616,15 +4796,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -4637,11 +4817,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4672,7 +4852,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.7", + "ring 0.17.8", "untrusted 0.9.0", ] @@ -4692,11 +4872,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -4705,9 +4885,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -4715,31 +4895,31 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.197" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -4753,11 +4933,13 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ + "indexmap 2.7.0", "itoa", + "memchr", "ryu", "serde", ] @@ -4774,9 +4956,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -4795,16 +4977,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.4.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.7.0", "serde", + "serde_derive", "serde_json", "serde_with_macros", "time", @@ -4812,14 +4995,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.4.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -4836,11 +5019,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.32" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.7.0", "itoa", "ryu", "serde", @@ -4854,7 +5037,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27daf6ed3fc7ffd5ea3ce9f684fe351c47e50f2fdbb6236e2bad0b440dbe408" dependencies = [ "data-encoding", - "indexmap 2.2.6", + "indexmap 2.7.0", "rust_decimal", ] @@ -4901,19 +5084,25 @@ dependencies = [ [[package]] name = "shared_child" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef" +checksum = "09fa9338aed9a1df411814a5b2252f7cd206c55ae9bf2fa763f8de84603aa60c" dependencies = [ "libc", - "winapi", + "windows-sys 0.59.0", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -4940,19 +5129,19 @@ dependencies = [ [[package]] name = "similar" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" dependencies = [ - "bstr 0.2.17", + "bstr", "unicode-segmentation", ] [[package]] name = "similar-asserts" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e041bb827d1bfca18f213411d51b665309f1afb37a04a5d1464530e13779fc0f" +checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e" dependencies = [ "console", "similar", @@ -4966,7 +5155,7 @@ checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint", "num-traits", - "thiserror", + "thiserror 1.0.69", "time", ] @@ -4976,6 +5165,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "slab" version = "0.4.9" @@ -4987,9 +5182,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smartstring" @@ -5010,12 +5205,12 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -5050,6 +5245,12 @@ dependencies = [ "der 0.7.9", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -5073,24 +5274,24 @@ dependencies = [ [[package]] name = "string_enum" version = "0.4.1" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "pmutil", "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "stringprep" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ - "finl_unicode", "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] @@ -5099,6 +5300,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.26.3" @@ -5118,26 +5325,26 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sval" -version = "2.11.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1604e9ab506f4805bc62d2868c6d20f23fa6ced4c7cfe695a1d20589ba5c63d0" +checksum = "f6dc0f9830c49db20e73273ffae9b5240f63c42e515af1da1fceefb69fceafd8" [[package]] name = "sval_buffer" -version = "2.11.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2831b6451148d344f612016d4277348f7721b78a0869a145fd34ef8b06b3fa2e" +checksum = "429922f7ad43c0ef8fd7309e14d750e38899e32eb7e8da656ea169dd28ee212f" dependencies = [ "sval", "sval_ref", @@ -5145,18 +5352,18 @@ dependencies = [ [[package]] name = "sval_dynamic" -version = "2.11.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238ac5832a23099a413ffd22e66f7e6248b9af4581b64c758ca591074be059fc" +checksum = "68f16ff5d839396c11a30019b659b0976348f3803db0626f736764c473b50ff4" dependencies = [ "sval", ] [[package]] name = "sval_fmt" -version = "2.11.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8474862431bac5ac7aee8a12597798e944df33f489c340e17e886767bda0c4e" +checksum = "c01c27a80b6151b0557f9ccbe89c11db571dc5f68113690c1e028d7e974bae94" dependencies = [ "itoa", "ryu", @@ -5165,9 +5372,9 @@ dependencies = [ [[package]] name = "sval_json" -version = "2.11.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f348030cc3d2a11eb534145600601f080cf16bf9ec0783efecd2883f14c21e" +checksum = "0deef63c70da622b2a8069d8600cf4b05396459e665862e7bdb290fd6cf3f155" dependencies = [ "itoa", "ryu", @@ -5176,9 +5383,9 @@ dependencies = [ [[package]] name = "sval_nested" -version = "2.11.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6659c3f6be1e5e99dc7c518877f48a8a39088ace2504b046db789bd78ce5969d" +checksum = "a39ce5976ae1feb814c35d290cf7cf8cd4f045782fe1548d6bc32e21f6156e9f" dependencies = [ "sval", "sval_buffer", @@ -5187,18 +5394,18 @@ dependencies = [ [[package]] name = "sval_ref" -version = "2.11.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829ad319bd82d0da77be6f3d547623686c453502f8eebdeb466cfa987972bd28" +checksum = "bb7c6ee3751795a728bc9316a092023529ffea1783499afbc5c66f5fabebb1fa" dependencies = [ "sval", ] [[package]] name = "sval_serde" -version = "2.11.0" +version = "2.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9da6c3efaedf8b8c0861ec5343e8e8c51d838f326478623328bd8728b79bca" +checksum = "2a5572d0321b68109a343634e3a5d576bf131b82180c6c442dee06349dfc652a" dependencies = [ "serde", "sval", @@ -5208,7 +5415,7 @@ dependencies = [ [[package]] name = "swc_atoms" version = "0.6.4" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "hstr", "once_cell", @@ -5219,7 +5426,7 @@ dependencies = [ [[package]] name = "swc_cached" version = "0.3.18" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "ahash", "anyhow", @@ -5232,7 +5439,7 @@ dependencies = [ [[package]] name = "swc_common" version = "0.33.8" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "ast_node", "atty", @@ -5245,7 +5452,7 @@ dependencies = [ "once_cell", "rustc-hash", "serde", - "siphasher", + "siphasher 0.3.11", "string_cache", "swc_atoms", "swc_eq_ignore_macros", @@ -5259,12 +5466,12 @@ dependencies = [ [[package]] name = "swc_ecma_ast" version = "0.110.9" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "is-macro", "num-bigint", - "phf 0.11.2", + "phf 0.11.3", "scoped-tls", "string_enum", "swc_atoms", @@ -5275,7 +5482,7 @@ dependencies = [ [[package]] name = "swc_ecma_loader" version = "0.45.9" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "anyhow", "dashmap", @@ -5293,13 +5500,13 @@ dependencies = [ [[package]] name = "swc_ecma_parser" version = "0.141.21" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "either", "new_debug_unreachable", "num-bigint", "num-traits", - "phf 0.11.2", + "phf 0.11.3", "serde", "smallvec", "smartstring", @@ -5313,10 +5520,10 @@ dependencies = [ [[package]] name = "swc_ecma_transforms_base" version = "0.134.30" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "better_scoped_tls", - "bitflags 2.4.1", + "bitflags 2.6.0", "indexmap 1.9.3", "once_cell", "phf 0.10.1", @@ -5335,7 +5542,7 @@ dependencies = [ [[package]] name = "swc_ecma_utils" version = "0.124.26" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "indexmap 1.9.3", "num_cpus", @@ -5352,7 +5559,7 @@ dependencies = [ [[package]] name = "swc_ecma_visit" version = "0.96.9" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "num-bigint", "swc_atoms", @@ -5365,29 +5572,29 @@ dependencies = [ [[package]] name = "swc_eq_ignore_macros" version = "0.1.2" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "swc_macros_common" version = "0.3.8" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "pmutil", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "swc_visit" version = "0.5.7" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "either", "swc_visit_macros", @@ -5396,14 +5603,14 @@ dependencies = [ [[package]] name = "swc_visit_macros" version = "0.5.8" -source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#dad9dabc235999da20d6e7d1b29429943b555c4f" +source = "git+https://github.com/encoredev/swc?branch=node-resolve-exports#cf8826f11ca0c4f39cc8127c7beb4be85652ca61" dependencies = [ "Inflector", "pmutil", "proc-macro2", "quote", "swc_macros_common", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -5425,9 +5632,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.47" +version = "2.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1726efe18f42ae774cc644f330953a5e7b3c3003d3edcecf18850fe9d4dd9afb" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" dependencies = [ "proc-macro2", "quote", @@ -5442,9 +5649,23 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] [[package]] name = "sysctl" @@ -5455,7 +5676,7 @@ dependencies = [ "bitflags 1.3.2", "byteorder", "libc", - "thiserror", + "thiserror 1.0.69", "walkdir", ] @@ -5467,7 +5688,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.6.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -5480,6 +5712,16 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tempdir" version = "0.3.7" @@ -5492,31 +5734,32 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "getrandom 0.2.15", + "once_cell", "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "textwrap" @@ -5526,22 +5769,42 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.10", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] @@ -5566,9 +5829,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -5587,19 +5850,29 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -5612,9 +5885,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -5640,13 +5913,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] @@ -5673,7 +5946,7 @@ dependencies = [ "futures", "futures-util", "gethostname", - "hyper 0.14.28", + "hyper 0.14.32", "lazy_static", "log", "matches", @@ -5682,7 +5955,7 @@ dependencies = [ "serde", "serde_json", "snap", - "thiserror", + "thiserror 1.0.69", "tokio", "tokio-io-timeout", "tokio-rustls 0.22.0", @@ -5703,7 +5976,7 @@ dependencies = [ "log", "parking_lot", "percent-encoding", - "phf 0.11.2", + "phf 0.11.3", "pin-project-lite", "postgres-protocol", "postgres-types", @@ -5742,15 +6015,25 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +dependencies = [ + "rustls 0.23.20", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -5779,20 +6062,32 @@ dependencies = [ "futures-util", "log", "tokio", - "tungstenite", + "tungstenite 0.21.0", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.24.0", ] [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", "futures-sink", "futures-util", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "pin-project-lite", "tokio", ] @@ -5811,9 +6106,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] @@ -5824,7 +6119,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.7.0", "serde", "serde_spanned", "toml_datetime", @@ -5840,23 +6135,23 @@ dependencies = [ "async-stream", "async-trait", "axum 0.6.20", - "base64 0.21.5", + "base64 0.21.7", "bytes", "flate2", - "h2 0.3.22", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.28", + "hyper 0.14.32", "hyper-timeout", "percent-encoding", "pin-project", "prost", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "tokio", "tokio-rustls 0.24.1", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -5883,17 +6178,33 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.2", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-http" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.0", + "http 1.2.0", + "http-body 1.0.1", "http-body-util", "http-range-header", "httpdate", @@ -5910,21 +6221,21 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -5934,20 +6245,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -5966,9 +6277,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -6011,6 +6322,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "triomphe" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -6026,16 +6347,34 @@ dependencies = [ "byteorder", "bytes", "data-encoding", - "http 1.0.0", + "http 1.2.0", "httparse", "log", "rand 0.8.5", "sha1", - "thiserror", + "thiserror 1.0.69", "url", "utf-8", ] +[[package]] +name = "tungstenite" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.2.0", + "httparse", + "log", + "rand 0.8.5", + "sha1", + "thiserror 1.0.69", + "utf-8", +] + [[package]] name = "txtar" version = "1.0.0" @@ -6044,7 +6383,7 @@ dependencies = [ "clean-path", "predicates 2.1.5", "similar-asserts", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -6053,6 +6392,12 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" +[[package]] +name = "typeid" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" + [[package]] name = "typenum" version = "1.17.0" @@ -6061,63 +6406,66 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-id" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1b6def86329695390197b82c1e244a54a131ceb66c996f2088a3876e2ae083f" +checksum = "10103c57044730945224467c09f71a4db0071c123a0648cc3e818913bde6b561" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "untrusted" @@ -6133,9 +6481,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -6154,6 +6502,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -6162,9 +6522,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" [[package]] name = "valuable" @@ -6174,9 +6534,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" dependencies = [ "value-bag-serde1", "value-bag-sval2", @@ -6184,9 +6544,9 @@ dependencies = [ [[package]] name = "value-bag-serde1" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccacf50c5cb077a9abb723c5bcb5e0754c1a433f1e1de89edc328e2760b6328b" +checksum = "4bb773bd36fd59c7ca6e336c94454d9c66386416734817927ac93d81cb3c5b0b" dependencies = [ "erased-serde", "serde", @@ -6195,9 +6555,9 @@ dependencies = [ [[package]] name = "value-bag-sval2" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1785bae486022dfb9703915d42287dcb284c1ee37bd1080eeba78cc04721285b" +checksum = "53a916a702cac43a88694c97657d449775667bcd14b70419441d05b7fea4a83a" dependencies = [ "sval", "sval_buffer", @@ -6216,9 +6576,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vsimd" @@ -6228,9 +6588,9 @@ checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -6257,48 +6617,55 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6306,28 +6673,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -6338,9 +6705,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -6358,29 +6725,18 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - -[[package]] -name = "which" -version = "4.4.2" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "whoami" -version = "1.4.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "wasm-bindgen", + "redox_syscall", + "wasite", "web-sys", ] @@ -6402,11 +6758,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -6424,6 +6780,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -6574,9 +6960,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.30" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b5c3db89721d50d0e2a673f5043fc4722f76dcc352d7b1ab8b8288bed4ed2c5" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -6601,20 +6987,22 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.52.0" +name = "write16" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "xid" -version = "1.0.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9671fb9541acc3118f04c4a6768253091d55077653efed3a4b151493abfd4e" +checksum = "3752a194518cdee5d019812fb7978c51d8f0b7cfe9ace5983df1780964bb84c0" dependencies = [ "crc32fast", "hostname", @@ -6622,7 +7010,7 @@ dependencies = [ "once_cell", "rand 0.8.5", "sysctl", - "thiserror", + "thiserror 1.0.69", "winreg 0.8.0", ] @@ -6641,55 +7029,123 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.47", + "syn 2.0.95", + "synstructure", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/cli/cmd/encore/app/create.go b/cli/cmd/encore/app/create.go index e3de91f8be..7bdc624555 100644 --- a/cli/cmd/encore/app/create.go +++ b/cli/cmd/encore/app/create.go @@ -391,17 +391,19 @@ func gogetEncore(dir string) error { } func npmInstallEncore(dir string) error { - verToInstall := version.Version + args := []string{"install"} if version.Channel == version.DevBuild { - verToInstall = "latest" + args = append(args, filepath.Join(env.EncoreRuntimesPath(), "js", "encore.dev")) + } else { + args = append(args, fmt.Sprintf("encore.dev@%s", strings.TrimPrefix(version.Version, "v"))) } // First install the 'encore.dev' package. - cmd := exec.Command("npm", "install", fmt.Sprintf("encore.dev@%s", verToInstall)) + cmd := exec.Command("npm", args...) cmd.Dir = dir out, err := cmd.CombinedOutput() if err != nil { - err = fmt.Errorf("'npm install encore.dev@%s' failed: %v: %s", verToInstall, err, out) + err = fmt.Errorf("installing encore.dev package failed: %v: %s", err, out) } // Then run 'npm install'. diff --git a/cli/daemon/debug.go b/cli/daemon/debug.go index 2e537b9b2e..840591882a 100644 --- a/cli/daemon/debug.go +++ b/cli/daemon/debug.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" + "encr.dev/internal/version" "encr.dev/pkg/builder" "encr.dev/pkg/builder/builderimpl" "encr.dev/pkg/fns" @@ -42,6 +43,9 @@ func (s *Server) DumpMeta(ctx context.Context, req *daemonpb.DumpMetaRequest) (* KeepOutput: false, Revision: vcsRevision.Revision, UncommittedChanges: vcsRevision.Uncommitted, + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } bld := builderimpl.Resolve(app.Lang(), expSet) diff --git a/cli/daemon/export/export.go b/cli/daemon/export/export.go index 9164888e1c..b16bb72806 100644 --- a/cli/daemon/export/export.go +++ b/cli/daemon/export/export.go @@ -17,6 +17,7 @@ import ( "encr.dev/cli/daemon/apps" "encr.dev/internal/env" + "encr.dev/internal/version" "encr.dev/pkg/appfile" "encr.dev/pkg/builder" "encr.dev/pkg/builder/builderimpl" @@ -52,6 +53,9 @@ func Docker(ctx context.Context, app *apps.Instance, req *daemonpb.ExportRequest KeepOutput: false, Revision: vcsRevision.Revision, UncommittedChanges: vcsRevision.Uncommitted, + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } appLang := app.Lang() bld := builderimpl.Resolve(appLang, expSet) diff --git a/cli/daemon/run/check.go b/cli/daemon/run/check.go index 1a91e66443..2d68a95c6c 100644 --- a/cli/daemon/run/check.go +++ b/cli/daemon/run/check.go @@ -7,6 +7,7 @@ import ( "github.com/cockroachdb/errors" "encr.dev/cli/daemon/apps" + "encr.dev/internal/version" "encr.dev/pkg/builder" "encr.dev/pkg/builder/builderimpl" "encr.dev/pkg/cueutil" @@ -56,6 +57,9 @@ func (mgr *Manager) Check(ctx context.Context, p CheckParams) (buildDir string, KeepOutput: p.CodegenDebug, Revision: vcsRevision.Revision, UncommittedChanges: vcsRevision.Uncommitted, + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } bld := builderimpl.Resolve(p.App.Lang(), expSet) diff --git a/cli/daemon/run/exec_script.go b/cli/daemon/run/exec_script.go index e933a6119b..ece65995f9 100644 --- a/cli/daemon/run/exec_script.go +++ b/cli/daemon/run/exec_script.go @@ -19,6 +19,7 @@ import ( encoreEnv "encr.dev/internal/env" "encr.dev/internal/lookpath" "encr.dev/internal/optracker" + "encr.dev/internal/version" "encr.dev/pkg/builder" "encr.dev/pkg/builder/builderimpl" "encr.dev/pkg/cueutil" @@ -90,6 +91,9 @@ func (mgr *Manager) ExecScript(ctx context.Context, p ExecScriptParams) (err err Revision: vcsRevision.Revision, UncommittedChanges: vcsRevision.Uncommitted, MainPkg: option.Some(p.MainPkg), + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } parse, err := bld.Parse(ctx, builder.ParseParams{ diff --git a/cli/daemon/run/run.go b/cli/daemon/run/run.go index 10c3d97f56..c81d1fe97f 100644 --- a/cli/daemon/run/run.go +++ b/cli/daemon/run/run.go @@ -34,6 +34,7 @@ import ( "encr.dev/cli/daemon/run/infra" "encr.dev/cli/daemon/secret" "encr.dev/internal/optracker" + "encr.dev/internal/version" "encr.dev/pkg/builder" "encr.dev/pkg/builder/builderimpl" "encr.dev/pkg/cueutil" @@ -349,6 +350,9 @@ func (r *Run) buildAndStart(ctx context.Context, tracker *optracker.OpTracker, i KeepOutput: false, Revision: vcsRevision.Revision, UncommittedChanges: vcsRevision.Uncommitted, + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } // A context that is canceled when the proc exits. diff --git a/cli/daemon/run/tests.go b/cli/daemon/run/tests.go index 8179806ef9..284c01dc93 100644 --- a/cli/daemon/run/tests.go +++ b/cli/daemon/run/tests.go @@ -15,6 +15,7 @@ import ( "encr.dev/cli/daemon/run/infra" "encr.dev/cli/daemon/secret" "encr.dev/internal/optracker" + "encr.dev/internal/version" "encr.dev/pkg/builder" "encr.dev/pkg/builder/builderimpl" "encr.dev/pkg/cueutil" @@ -132,6 +133,9 @@ func (mgr *Manager) testSpec(ctx context.Context, bld builder.Impl, expSet *expe KeepOutput: params.CodegenDebug, Revision: vcsRevision.Revision, UncommittedChanges: vcsRevision.Uncommitted, + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } parse, err := bld.Parse(ctx, builder.ParseParams{ diff --git a/cli/daemon/userfacing.go b/cli/daemon/userfacing.go index 036e2d04c9..35ca67d6b3 100644 --- a/cli/daemon/userfacing.go +++ b/cli/daemon/userfacing.go @@ -7,6 +7,7 @@ import ( "github.com/cockroachdb/errors" "encr.dev/cli/daemon/apps" + "encr.dev/internal/version" "encr.dev/pkg/builder" "encr.dev/pkg/builder/builderimpl" "encr.dev/pkg/fns" @@ -45,6 +46,9 @@ func (s *Server) genUserFacing(ctx context.Context, app *apps.Instance) error { KeepOutput: false, Revision: vcsRevision.Revision, UncommittedChanges: vcsRevision.Uncommitted, + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } bld := builderimpl.Resolve(app.Lang(), expSet) diff --git a/e2e-tests/app_test.go b/e2e-tests/app_test.go index af0623e809..fb10b9d092 100644 --- a/e2e-tests/app_test.go +++ b/e2e-tests/app_test.go @@ -29,6 +29,7 @@ import ( "encr.dev/cli/daemon/run/infra" "encr.dev/cli/daemon/secret" . "encr.dev/internal/optracker" + "encr.dev/internal/version" "encr.dev/pkg/builder" "encr.dev/pkg/builder/builderimpl" "encr.dev/pkg/cueutil" @@ -231,6 +232,9 @@ func testBuild(t testing.TB, appRoot string, env []string) (*builder.ParseResult KeepOutput: false, Revision: vcsRevision.Revision, UncommittedChanges: vcsRevision.Uncommitted, + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } parse, err := bld.Parse(ctx, builder.ParseParams{ diff --git a/go.mod b/go.mod index c931e6ee4b..104ec027a7 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module encr.dev go 1.23.0 -toolchain go1.23.2 +toolchain go1.23.3 require ( cloud.google.com/go/storage v1.43.0 diff --git a/pkg/builder/builder.go b/pkg/builder/builder.go index 1ff56c0bf9..f2d8c3aecb 100644 --- a/pkg/builder/builder.go +++ b/pkg/builder/builder.go @@ -15,6 +15,7 @@ import ( "encore.dev/appruntime/exported/experiments" "encr.dev/cli/daemon/apps" "encr.dev/internal/optracker" + "encr.dev/internal/version" "encr.dev/pkg/cueutil" "encr.dev/pkg/fns" "encr.dev/pkg/option" @@ -81,6 +82,9 @@ func DefaultBuildInfo() BuildInfo { KeepOutput: false, Revision: "", UncommittedChanges: false, + + // Use the local JS runtime if this is a development build. + UseLocalJSRuntime: version.Channel == version.DevBuild, } } diff --git a/pkg/dockerbuild/spec.go b/pkg/dockerbuild/spec.go index a20b21b418..081df0edd3 100644 --- a/pkg/dockerbuild/spec.go +++ b/pkg/dockerbuild/spec.go @@ -385,16 +385,28 @@ func (b *imageSpecBuilder) Describe(cfg DescribeConfig) (*ImageSpec, error) { { for _, out := range cfg.Compile.Outputs { if _, ok := out.(*builder.JSBuildOutput); ok { - // Include the encore.dev package, at the same location. - runtimeSrc := cfg.Runtimes.Join("js", "encore.dev") - b.spec.CopyData[runtimeSrc.ToImage()] = runtimeSrc - - // Add the encore-runtime.node file, and set the environment variable to point to it. - nativeRuntimeHost := cfg.NodeRuntime.GetOrElse(cfg.Runtimes.Join("js", "encore-runtime.node")) - nativeRuntimeImg := nativeRuntimeHost.ToImage().Dir().Join("encore-runtime.node") - b.spec.CopyData[nativeRuntimeImg] = nativeRuntimeHost - b.spec.Env = append(b.spec.Env, fmt.Sprintf("ENCORE_RUNTIME_LIB=%s", nativeRuntimeImg)) - b.addPrio(nativeRuntimeImg) + if nativeRuntimeHost, ok := cfg.NodeRuntime.Get(); ok { + // Add the encore-runtime.node file, and set the environment variable to point to it. + nativeRuntimeImg := ImagePath("/encore/runtimes/js/encore-runtime.node") + b.spec.CopyData[nativeRuntimeImg] = nativeRuntimeHost + b.spec.Env = append(b.spec.Env, fmt.Sprintf("ENCORE_RUNTIME_LIB=%s", nativeRuntimeImg)) + b.addPrio(nativeRuntimeImg) + + // Copy the encore.dev package. + nativePackageHost := cfg.Runtimes.Join("js", "encore.dev") + nativePackageImg := ImagePath("/encore/runtimes/js/encore.dev") + b.spec.CopyData[nativePackageImg] = nativePackageHost + } else { + // Copy the whole js runtime. + runtimeHost := cfg.Runtimes.Join("js") + runtimeImg := ImagePath("/encore/runtimes/js") + b.spec.CopyData[runtimeImg] = runtimeHost + + nativeRuntimeImg := runtimeImg.Join("encore-runtime.node") + b.spec.Env = append(b.spec.Env, fmt.Sprintf("ENCORE_RUNTIME_LIB=%s", nativeRuntimeImg)) + b.addPrio(nativeRuntimeImg) + } + break } } diff --git a/pkg/dockerbuild/spec_test.go b/pkg/dockerbuild/spec_test.go index 64a65df084..3b42a72800 100644 --- a/pkg/dockerbuild/spec_test.go +++ b/pkg/dockerbuild/spec_test.go @@ -46,17 +46,16 @@ func TestBuild_Node(t *testing.T) { c.Assert(spec, qt.CmpEquals(opts...), &ImageSpec{ Entrypoint: []string{"/artifacts/0/build/entrypoint"}, Env: []string{ - "ENCORE_RUNTIME_LIB=/host/runtimes/js/encore-runtime.node", + "ENCORE_RUNTIME_LIB=/encore/runtimes/js/encore-runtime.node", }, WorkingDir: "/", BuildInfo: BuildInfoSpec{InfoPath: defaultBuildInfoPath}, WriteFiles: map[ImagePath][]byte{defaultMetaPath: meta}, CopyData: map[ImagePath]HostPath{ - "/artifacts/0/build": "/host/artifacts", - "/artifacts/0/package.json": "/host/package.json", - "/artifacts/0/node_modules": "/host/node_modules", - "/host/runtimes/js/encore.dev": "/host/runtimes/js/encore.dev", - "/host/runtimes/js/encore-runtime.node": "/host/runtimes/js/encore-runtime.node", + "/artifacts/0/build": "/host/artifacts", + "/artifacts/0/package.json": "/host/package.json", + "/artifacts/0/node_modules": "/host/node_modules", + "/encore/runtimes/js": "/host/runtimes/js", }, BundleSource: option.Option[BundleSourceSpec]{}, Supervisor: option.None[SupervisorSpec](), @@ -67,7 +66,7 @@ func TestBuild_Node(t *testing.T) { StargzPrioritizedFiles: []ImagePath{ "/artifacts/0/package.json", "/artifacts/0/build/entrypoint", - "/host/runtimes/js/encore-runtime.node", + "/encore/runtimes/js/encore-runtime.node", }, }) } diff --git a/runtimes/core/src/api/call.rs b/runtimes/core/src/api/call.rs index 6ad29db293..e5d0227b48 100644 --- a/runtimes/core/src/api/call.rs +++ b/runtimes/core/src/api/call.rs @@ -171,7 +171,12 @@ impl ServiceRegistry { Ok((req, resp_schema)) => { let fut = http_client.execute(req); match fut.await { - Ok(resp) => resp_schema.extract(resp).await, + Ok(resp) => { + if !resp.status().is_success() { + return Err(extract_error(resp).await); + } + resp_schema.extract(resp).await + } Err(e) => Err(api::Error::internal(e)), } } @@ -526,3 +531,12 @@ where Ok(()) } } + +async fn extract_error(resp: reqwest::Response) -> api::Error { + match resp.bytes().await { + Ok(bytes) => serde_json::from_slice(&bytes).unwrap_or_else(|err| { + api::Error::invalid_argument("unable to parse error response", err) + }), + Err(err) => api::Error::invalid_argument("unable to read response body", err), + } +} diff --git a/runtimes/core/src/api/error.rs b/runtimes/core/src/api/error.rs index f1766f5e52..b55dfd9c13 100644 --- a/runtimes/core/src/api/error.rs +++ b/runtimes/core/src/api/error.rs @@ -13,7 +13,7 @@ pub struct Error { pub code: ErrCode, pub message: String, pub internal_message: Option, - pub details: Option>, + pub details: Option>>, #[serde(skip_serializing)] pub stack: Option, diff --git a/runtimes/core/src/pubsub/manager.rs b/runtimes/core/src/pubsub/manager.rs index 36cc1dee3d..2ee07df557 100644 --- a/runtimes/core/src/pubsub/manager.rs +++ b/runtimes/core/src/pubsub/manager.rs @@ -12,6 +12,7 @@ use futures::FutureExt; use crate::api::jsonschema::{self, JSONSchema}; use crate::api::{APIResult, PValues}; use crate::encore::parser::meta::v1 as meta; +use crate::encore::parser::schema::v1 as schema; use crate::encore::runtime::v1 as pb; use crate::log::LogFromRust; use crate::model::{PubSubRequestData, RequestData, ResponseData, SpanId, SpanKey, TraceId}; @@ -28,47 +29,62 @@ use super::push_registry::PushHandlerRegistry; pub struct Manager { tracer: Tracer, - topic_cfg: HashMap, pb::PubSubTopic, JSONSchema)>, - sub_cfg: HashMap< - SubName, - ( - Arc, - pb::PubSubSubscription, - meta::pub_sub_topic::Subscription, - JSONSchema, - ), - >, - - topics: Arc>>>, + topic_cfg: HashMap, + sub_cfg: HashMap, + + topics: Arc>>>, subs: Arc>>>, push_registry: PushHandlerRegistry, } #[derive(Debug)] pub struct TopicObj { + inner: Arc, +} + +#[derive(Debug)] +struct TopicInner { name: EncoreName, tracer: Tracer, - inner: Arc, + imp: Arc, + attr_fields: Arc>, } impl TopicObj { + pub fn publish( + &self, + payload: PValues, + source: Option>, + ) -> impl Future> + 'static { + self.inner.publish(payload, source) + } +} + +impl TopicInner { pub fn publish( &self, payload: PValues, source: Option>, ) -> impl Future> + 'static { let tracer = self.tracer.clone(); - let inner = self.inner.clone(); + let inner = self.imp.clone(); let name = self.name.clone(); + let attr_fields = self.attr_fields.clone(); async move { - let payload = serde_json::to_vec_pretty(&payload) + let raw_body = serde_json::to_vec_pretty(&payload) .context("unable to serialize message payload")?; let mut msg = MessageData { attrs: HashMap::new(), - raw_body: payload, + raw_body, }; + for name in attr_fields.iter() { + if let Some(val) = payload.get(name) { + msg.attrs.insert(name.clone(), val.to_string()); + } + } + if let Some(source) = source.as_deref() { msg.attrs.insert( ATTR_PARENT_TRACE_ID.to_string(), @@ -269,26 +285,33 @@ impl Manager { } pub fn topic(&self, name: EncoreName) -> Option { - let inner = self.topic_impl(name.clone())?; - Some(TopicObj { - name, - inner, - tracer: self.tracer.clone(), - }) + let inner = self.topic_impl(name)?; + Some(TopicObj { inner }) } - fn topic_impl(&self, name: EncoreName) -> Option> { + fn topic_impl(&self, name: EncoreName) -> Option> { if let Some(topic) = self.topics.read().unwrap().get(&name) { return Some(topic.clone()); } - let topic = { - if let Some((cluster, topic_cfg, _schema)) = self.topic_cfg.get(&name) { - cluster.topic(topic_cfg) + let topic = Arc::new({ + if let Some(cfg) = self.topic_cfg.get(&name) { + let imp = cfg.cluster.topic(&cfg.cfg); + TopicInner { + name: name.clone(), + imp, + tracer: self.tracer.clone(), + attr_fields: cfg.attr_fields.clone(), + } } else { - Arc::new(noop::NoopTopic) + TopicInner { + name: name.clone(), + imp: Arc::new(noop::NoopTopic), + tracer: self.tracer.clone(), + attr_fields: Arc::new(vec![]), + } } - }; + }); self.topics.write().unwrap().insert(name, topic.clone()); Some(topic) @@ -300,8 +323,8 @@ impl Manager { } let sub = { - if let Some((cluster, sub_cfg, meta_sub, schema)) = self.sub_cfg.get(&name) { - let inner = cluster.subscription(sub_cfg, meta_sub); + if let Some(cfg) = self.sub_cfg.get(&name) { + let inner = cfg.cluster.subscription(&cfg.cfg, &cfg.meta); // If we have a push handler, register it. if let Some((sub_id, push_handler)) = inner.push_handler() { @@ -311,10 +334,10 @@ impl Manager { Arc::new(SubscriptionObj { inner, tracer: self.tracer.clone(), - service: meta_sub.service_name.clone().into(), + service: cfg.meta.service_name.clone().into(), topic: name.topic.clone(), subscription: name.subscription.clone(), - schema: schema.clone(), + schema: cfg.schema.clone(), handler: OnceLock::new(), subscribe_fut: Default::default(), }) @@ -351,21 +374,30 @@ impl Manager { } } -#[allow(clippy::type_complexity)] +#[derive(Debug)] +struct TopicConfig { + cluster: Arc, + cfg: pb::PubSubTopic, + + /// Names of fields in the payload that should be copied into + /// the PubSub message attributes. + attr_fields: Arc>, +} + +#[derive(Debug)] +struct SubConfig { + cluster: Arc, + cfg: pb::PubSubSubscription, + meta: meta::pub_sub_topic::Subscription, + schema: JSONSchema, +} + fn make_cfg_maps( clusters: Vec, md: &meta::Data, ) -> anyhow::Result<( - HashMap, pb::PubSubTopic, JSONSchema)>, - HashMap< - SubName, - ( - Arc, - pb::PubSubSubscription, - meta::pub_sub_topic::Subscription, - JSONSchema, - ), - >, + HashMap, + HashMap, )> { let mut topic_map = HashMap::new(); let mut sub_map = HashMap::new(); @@ -380,11 +412,12 @@ fn make_cfg_maps( anyhow::bail!("topic {} has no message type", topic.name); }; + let attr_fields = message_attr_fields(&md.decls, schema_type, 0)?; let schema_idx = schema_builder .register_type(schema_type) .with_context(|| format!("invalid schema for topic {}", topic.name))?; - topic_map.insert(topic.name.clone(), (topic, schema_idx)); + topic_map.insert(topic.name.clone(), Arc::new(attr_fields)); for sub in &topic.subscriptions { let name = SubName { topic: topic.name.clone().into(), @@ -401,14 +434,16 @@ fn make_cfg_maps( let cluster = new_cluster(&cluster_cfg); for topic_cfg in cluster_cfg.topics { - let Some(&(_topic, idx)) = meta_topics.get(&topic_cfg.encore_name) else { + let Some(attr_fields) = meta_topics.get(&topic_cfg.encore_name) else { anyhow::bail!("topic {} not found in metadata", topic_cfg.encore_name); }; - - let schema = schemas.schema(idx); topic_map.insert( topic_cfg.encore_name.clone().into(), - (cluster.clone(), topic_cfg, schema), + TopicConfig { + cluster: cluster.clone(), + cfg: topic_cfg, + attr_fields: attr_fields.clone(), + }, ); } @@ -426,7 +461,12 @@ fn make_cfg_maps( let schema = schemas.schema(idx); sub_map.insert( name, - (cluster.clone(), sub_cfg, meta_sub.to_owned(), schema), + SubConfig { + cluster: cluster.clone(), + cfg: sub_cfg, + meta: meta_sub.to_owned(), + schema, + }, ); } } @@ -456,3 +496,54 @@ fn new_cluster(cluster: &pb::PubSubCluster) -> Arc { Arc::new(NoopCluster) } + +fn message_attr_fields( + decls: &[schema::Decl], + typ: &schema::Type, + depth: u16, +) -> anyhow::Result> { + if depth > 100 { + anyhow::bail!("pubsub message attribute computation: recursion depth exceeded"); + } + let Some(typ) = &typ.typ else { + return Ok(vec![]); + }; + + use schema::r#type::Typ; + match typ { + Typ::Named(named) => { + let Some(decl) = decls.get(named.id as usize) else { + anyhow::bail!("missing decl for named type"); + }; + let Some(decl_typ) = decl.r#type.as_ref() else { + anyhow::bail!("missing type for named decl"); + }; + message_attr_fields(decls, decl_typ, depth + 1) + } + Typ::Struct(st) => { + let names: Vec = st + .fields + .iter() + .filter_map(|f| { + f.tags.iter().find_map(|tag| { + if tag.key == "pubsub-attr" { + Some(tag.name.clone()) + } else { + None + } + }) + }) + .collect(); + Ok(names) + } + + Typ::Map(_) + | Typ::List(_) + | Typ::Builtin(_) + | Typ::Pointer(_) + | Typ::Union(_) + | Typ::Literal(_) + | Typ::TypeParameter(_) + | Typ::Config(_) => Ok(vec![]), + } +} diff --git a/runtimes/core/src/pubsub/sqs_sns/sub.rs b/runtimes/core/src/pubsub/sqs_sns/sub.rs index dca2c3601e..de556ba174 100644 --- a/runtimes/core/src/pubsub/sqs_sns/sub.rs +++ b/runtimes/core/src/pubsub/sqs_sns/sub.rs @@ -123,7 +123,7 @@ impl fetcher::Fetcher for Arc { let result = client .receive_message() .queue_url(queue_url) - .attribute_names("ApproximateReceiveCount".into()) + .message_system_attribute_names(MessageSystemAttributeName::ApproximateReceiveCount) .visibility_timeout(ack_deadline.as_secs() as i32) .wait_time_seconds(20) // maximum allowed time .max_number_of_messages(max_items as i32) diff --git a/runtimes/js/encore.dev/pubsub/attributes.ts b/runtimes/js/encore.dev/pubsub/attributes.ts deleted file mode 100644 index f88168c281..0000000000 --- a/runtimes/js/encore.dev/pubsub/attributes.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Attribute represents a field on a message that should be sent - * as an attribute in a PubSub message, rather than in the message - * body. - * - * This is useful for ordering messages, or for filtering messages - * on a subscription - otherwise you should not use this. - * - * To create attributes on a message, use the `Attribute` type: - * type Message = { - * user_id: Attribute; - * name: string; - * }; - * - * const msg: Message = { - * user_id: 123, - * name: "John Doe", - * }; - * - * The union of brandedAttribute is simply used to help the TypeScript compiler - * understand that the type is an attribute and allow the AttributesOf type - * to extract the keys of said type. - */ -export type Attribute = - | T - | brandedAttribute; - -/** - * AttributesOf is a helper type to extract all keys from an object - * who's type is an Attribute type. - * - * For example: - * type Message = { - * user_id: Attribute; - * name: string; - * age: Attribute; - * }; - * - * type MessageAttributes = AttributesOf; // "user_id" | "age" - */ -export type AttributesOf = keyof { - [Key in keyof // for (const Key in T) - T as Extract extends never // if (typeof T[Key] !== oneof(allBrandedTypes)) - ? never // drop the key - : Key]: never; // else keep the key -}; - -/** - * supportedAttributeTypes is a union of all primitive types that are supported as attributes - */ -type supportedAttributeTypes = string | number | boolean; - -/** - * brandedAttribute is a helper type to brand a type as an attribute - * which is distinct from the base type. It is a compile time only - * type and has no runtime representation. - */ -type brandedAttribute = T & { readonly __attributeBrand: unique symbol }; - -/** - * allBrandedTypes is a helper type to create a union of all branded supported attribute types - * - * The result of this is: brandedAttribute | brandedAttribute | brandedAttribute - */ -type allBrandedTypes = - Union extends supportedAttributeTypes ? brandedAttribute : never; diff --git a/runtimes/js/encore.dev/pubsub/mod.ts b/runtimes/js/encore.dev/pubsub/mod.ts index f3d2db28c9..26fef2734e 100644 --- a/runtimes/js/encore.dev/pubsub/mod.ts +++ b/runtimes/js/encore.dev/pubsub/mod.ts @@ -4,4 +4,69 @@ export type { TopicConfig, DeliveryGuarantee } from "./topic"; export { Subscription } from "./subscription"; export type { SubscriptionConfig } from "./subscription"; -export type { Attribute } from "./attributes"; +/** + * Attribute represents a field on a message that should be sent + * as an attribute in a PubSub message, rather than in the message + * body. + * + * This is useful for ordering messages, or for filtering messages + * on a subscription - otherwise you should not use this. + * + * To create attributes on a message, use the `Attribute` type: + * type Message = { + * user_id: Attribute; + * name: string; + * }; + * + * const msg: Message = { + * user_id: 123, + * name: "John Doe", + * }; + * + * The union of brandedAttribute is simply used to help the TypeScript compiler + * understand that the type is an attribute and allow the AttributesOf type + * to extract the keys of said type. + */ +export type Attribute = + | T + | brandedAttribute; + +/** + * AttributesOf is a helper type to extract all keys from an object + * who's type is an Attribute type. + * + * For example: + * type Message = { + * user_id: Attribute; + * name: string; + * age: Attribute; + * }; + * + * type MessageAttributes = AttributesOf; // "user_id" | "age" + */ +export type AttributesOf = keyof { + [Key in keyof // for (const Key in T) + T as Extract extends never // if (typeof T[Key] !== oneof(allBrandedTypes)) + ? never // drop the key + : Key]: never; // else keep the key +}; + +/** + * supportedAttributeTypes is a union of all primitive types that are supported as attributes + */ +type supportedAttributeTypes = string | number | boolean; + +/** + * brandedAttribute is a helper type to brand a type as an attribute + * which is distinct from the base type. It is a compile time only + * type and has no runtime representation. + */ +type brandedAttribute = T & { readonly __attributeBrand: unique symbol }; + +/** + * allBrandedTypes is a helper type to create a union of all branded supported attribute types + * + * The result of this is: brandedAttribute | brandedAttribute | brandedAttribute + */ +type allBrandedTypes = + Union extends supportedAttributeTypes ? brandedAttribute : never; diff --git a/runtimes/js/encore.dev/pubsub/topic.ts b/runtimes/js/encore.dev/pubsub/topic.ts index d2e5a5dac6..f2f35a8066 100644 --- a/runtimes/js/encore.dev/pubsub/topic.ts +++ b/runtimes/js/encore.dev/pubsub/topic.ts @@ -1,5 +1,5 @@ import { getCurrentRequest } from "../internal/reqtrack/mod"; -import { AttributesOf } from "./attributes"; +import type { AttributesOf } from "./mod"; import * as runtime from "../internal/runtime/mod"; /** diff --git a/runtimes/js/src/error.rs b/runtimes/js/src/error.rs index 3ee6e34b0f..a10d908b8c 100644 --- a/runtimes/js/src/error.rs +++ b/runtimes/js/src/error.rs @@ -12,7 +12,7 @@ pub fn coerce_to_api_error(env: Env, val: napi::JsUnknown) -> Result> = obj + let details: Option>> = obj .get_named_property::("details") .and_then(|val| match val.get_type()? { napi::ValueType::Object => val.coerce_to_object(), @@ -22,7 +22,7 @@ pub fn coerce_to_api_error(env: Env, val: napi::JsUnknown) -> Result for APICallError { Self { code: value.code.to_string(), message: value.message, - details: value.details, + details: value.details.map(|d| *d), } } } diff --git a/runtimes/js/src/stream/read.rs b/runtimes/js/src/stream/read.rs index 5b8bb774ea..5e95383f73 100644 --- a/runtimes/js/src/stream/read.rs +++ b/runtimes/js/src/stream/read.rs @@ -1,6 +1,6 @@ use std::future::Future; -use bytes::Bytes; +use bytes::{Bytes, BytesMut}; use futures::{Stream, StreamExt}; use napi::{noop_finalize, Env, JsFunction, JsUnknown, NapiRaw, Status}; @@ -193,9 +193,12 @@ struct PushRequest { fn execute_push(ctx: ThreadSafeCallContext) -> napi::Result<()> { let data: JsUnknown = match ctx.value.data { Some(data) => { + // We need to convert this to a BytesMut since + // JavaScript may modify the buffer. + let mut data = BytesMut::from(data); let buf = unsafe { ctx.env.create_buffer_with_borrowed_data( - data.as_ptr(), + data.as_mut_ptr(), data.len(), data, noop_finalize, diff --git a/tsparser/Cargo.toml b/tsparser/Cargo.toml index 4cd4a4ee27..d6a62e6c3d 100644 --- a/tsparser/Cargo.toml +++ b/tsparser/Cargo.toml @@ -31,7 +31,7 @@ regex = "1.9.5" once_cell = "1.18.0" handlebars = { version = "4.4.0", features = ["no_logging"] } serde = { version = "1.0.188", features = ["rc"] } -serde_json = "1.0.107" +serde_json = { version = "1.0.107", features = ["preserve_order"] } url = "2.4.1" convert_case = "0.6.0" itertools = "0.13.0" @@ -44,6 +44,7 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } junction = "1.2.0" thiserror = "1.0.64" matchit = "0.7.3" +semver = "1.0.24" [build-dependencies] prost-build = { version = "0.12.1" } diff --git a/tsparser/examples/testparse.rs b/tsparser/examples/testparse.rs index b3aa222083..6e04c7ac1b 100644 --- a/tsparser/examples/testparse.rs +++ b/tsparser/examples/testparse.rs @@ -7,18 +7,13 @@ use std::sync::{Arc, Mutex}; use swc_common::errors::{Emitter, EmitterWriter, Handler, HANDLER}; use swc_common::{Globals, SourceMap, SourceMapper, GLOBALS}; +use encore_tsparser::builder; use encore_tsparser::builder::Builder; use encore_tsparser::parser::parser::ParseContext; -use encore_tsparser::{app, builder}; fn main() { env_logger::init(); - let js_runtime_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")) - .join("..") - .join("runtimes") - .join("js"); - // Read the app root from the first arg. let app_root = PathBuf::from(std::env::args().nth(1).expect("missing app root")); @@ -36,23 +31,16 @@ fn main() { GLOBALS.set(&globals, || { HANDLER.set(&errs, || { let builder = Builder::new().expect("unable to construct builder"); - let _parse: Option<(builder::App, app::AppDesc)> = None; { let pp = builder::PrepareParams { - js_runtime_root: &js_runtime_path, - app_root: &app_root, + app_root: app_root.clone(), + encore_dev_version: builder::PackageVersion::Published("0.0.0".to_string()), }; builder.prepare(&pp).unwrap(); } - let pc = ParseContext::new( - app_root.clone(), - js_runtime_path.clone(), - cm.clone(), - errs.clone(), - ) - .unwrap(); + let pc = ParseContext::new(app_root.clone(), None, cm.clone(), errs.clone()).unwrap(); let app = builder::App { root: app_root.clone(), diff --git a/tsparser/src/bin/tsparser-encore.rs b/tsparser/src/bin/tsparser-encore.rs index 0d1909d462..68d315d923 100644 --- a/tsparser/src/bin/tsparser-encore.rs +++ b/tsparser/src/bin/tsparser-encore.rs @@ -1,4 +1,5 @@ -use std::fmt::{self}; +use std::convert::Infallible; +use std::fmt::{self, Display}; use std::io::{self, BufRead, Write}; use std::path::PathBuf; use std::rc::Rc; @@ -23,10 +24,6 @@ fn main() -> Result<()> { .init(); let cwd = std::env::current_dir()?; - let js_runtime_path = std::env::var("ENCORE_JS_RUNTIME_PATH") - .map(PathBuf::from) - .expect("ENCORE_JS_RUNTIME_PATH not set"); - let globals = Globals::new(); let cm: Rc = Default::default(); @@ -51,14 +48,21 @@ fn main() -> Result<()> { { let pp = builder::PrepareParams { - js_runtime_root: &js_runtime_path, - app_root: &prepare.app_root, + app_root: prepare.app_root.clone(), + + encore_dev_version: match prepare.local_runtime_override { + Some(buf) => builder::PackageVersion::Local(buf.join("encore.dev")), + None => builder::PackageVersion::Published( + // Remove the leading "v" from the runtime version, as JS version numbers don't use it. + prepare.runtime_version.trim_start_matches("v").to_string(), + ), + }, }; match builder.prepare(&pp) { Ok(result) => { let json = serde_json::to_string(&result)?; - write_result(Ok(json.as_bytes()))?; + write_result(>::Ok(json.as_bytes()))?; } Err(err) => { log::error!("failed to prepare: {:?}", err); @@ -67,12 +71,7 @@ fn main() -> Result<()> { } } - let pc = match ParseContext::new( - prepare.app_root, - js_runtime_path.clone(), - cm.clone(), - errs.clone(), - ) { + let pc = match ParseContext::new(prepare.app_root, None, cm.clone(), errs.clone()) { Ok(pc) => pc, Err(err) => { log::error!("failed to construct parse context: {:?}", err); @@ -113,7 +112,9 @@ fn main() -> Result<()> { match builder.parse(&pp) { Some(result) => { log::info!("parse successful"); - write_result(Ok(result.meta.encode_to_vec().as_slice()))?; + write_result(>::Ok( + result.meta.encode_to_vec().as_slice(), + ))?; parse = Some((app, result)); } None => { @@ -136,13 +137,10 @@ fn main() -> Result<()> { None => anyhow::bail!("no parse!"), Some((app, parse)) => { let cp = builder::CompileParams { - js_runtime_root: &js_runtime_path, - runtime_version: &input.runtime_version, app, pc: &pc, working_dir: &cwd, desc: parse, - use_local_runtime: input.use_local_runtime, debug: input.debug, }; @@ -151,7 +149,7 @@ fn main() -> Result<()> { Ok(compile) => { log::info!("compile successful"); let json = serde_json::to_string(&compile)?; - write_result(Ok(json.as_bytes()))?; + write_result(>::Ok(json.as_bytes()))?; } Err(err) => { log::error!("failed to compile: {:?}", err); @@ -161,28 +159,22 @@ fn main() -> Result<()> { } }, - Command::Test(input) => match &parse { + Command::Test(_input) => match &parse { None => anyhow::bail!("no parse!"), Some((app, parse)) => { let p = builder::TestParams { - js_runtime_root: &js_runtime_path, - runtime_version: &input.runtime_version, app, pc: &pc, working_dir: &cwd, parse, - use_local_runtime: input.use_local_runtime, }; match builder.test(&p) { Ok(compile) => { let json = serde_json::to_string(&compile)?; - write_result(Ok(json.as_bytes()))?; - } - Err(err) => { - log::error!("failed to run tests: {:?}", err); - write_result(Err(err))? + write_result(>::Ok(json.as_bytes()))?; } + Err(err) => write_result(Err(err))?, }; } }, @@ -191,7 +183,6 @@ fn main() -> Result<()> { None => anyhow::bail!("no parse!"), Some((app, parse)) => { let cp = builder::CodegenParams { - js_runtime_root: &js_runtime_path, app, pc: &pc, working_dir: &cwd, @@ -200,7 +191,7 @@ fn main() -> Result<()> { log::info!("starting generate user facing code"); match builder.generate_code(&cp) { - Ok(_) => write_result(Ok(&[]))?, + Ok(_) => write_result(>::Ok(&[]))?, Err(err) => { log::error!("failed to generate code: {:?}", err); write_result(Err(err))? @@ -224,17 +215,15 @@ fn write_data(is_ok: bool, data: &[u8]) -> io::Result<()> { Ok(()) } -fn write_result(res: Result<&[u8]>) -> io::Result<()> { +fn write_result(res: Result<&[u8], E>) -> io::Result<()> +where + E: Display, +{ match res { Ok(bytes) => write_data(true, bytes), Err(err) => { - // If this is a parse error, don't include a full stack trace. - let s = match err.downcast_ref::() { - Some(err) => err.0.as_str(), - None => &format!("{:?}", err), - }; - let bytes = s.as_bytes(); - write_data(false, bytes) + let s = err.to_string(); + write_data(false, s.as_bytes()) } } } @@ -300,20 +289,18 @@ struct ParseInput { #[derive(Deserialize, Debug)] struct PrepareInput { app_root: PathBuf, + runtime_version: String, + #[serde(default)] + local_runtime_override: Option, } #[derive(Deserialize, Debug)] struct CompileInput { - runtime_version: String, - use_local_runtime: bool, debug: DebugMode, } #[derive(Deserialize, Debug)] -struct TestInput { - runtime_version: String, - use_local_runtime: bool, -} +struct TestInput {} #[derive(Deserialize, Debug)] struct GenUserFacingInput {} diff --git a/tsparser/src/builder/codegen.rs b/tsparser/src/builder/codegen.rs index 6565ae62be..ded916b48c 100644 --- a/tsparser/src/builder/codegen.rs +++ b/tsparser/src/builder/codegen.rs @@ -5,7 +5,7 @@ use std::io::Write; use std::path::{Component, Path, PathBuf}; use crate::app::AppDesc; -use anyhow::{Context, Result}; +use anyhow::Context; use clean_path::Clean; use itertools::Itertools; use serde::Serialize; @@ -18,11 +18,11 @@ use crate::parser::resources::apis::api::Methods; use crate::parser::resources::Resource; use crate::parser::{FilePath, Range}; +use super::prepare::{PackageVersion, PrepareError}; use super::{App, Builder}; #[derive(Debug)] pub struct CodegenParams<'a> { - pub js_runtime_root: &'a Path, pub app: &'a App, pub pc: &'a ParseContext, pub working_dir: &'a Path, @@ -42,44 +42,29 @@ pub struct LinkResult { } impl Builder<'_> { - pub fn setup_deps(&self, app_root: &Path, encore_dev_path: Option<&Path>) -> Result<()> { - // Find the node_modules dir and the relative path back to the app root. - let pkg_mgr = resolve_package_manager(app_root).context("resolve package manager")?; - pkg_mgr - .setup_deps(encore_dev_path) - .context("setup dependencies")?; - Ok(()) + pub fn setup_deps( + &self, + app_root: &Path, + encore_dev_version: &PackageVersion, + ) -> Result<(), PrepareError> { + let pkg_mgr = resolve_package_manager(app_root)?; + pkg_mgr.setup_deps(encore_dev_version) } - pub fn generate_code(&self, params: &CodegenParams) -> Result { + pub fn generate_code(&self, params: &CodegenParams) -> Result { // Find the node_modules dir and the relative path back to the app root. let (node_modules, _rel_return_path) = self .find_node_modules_dir(¶ms.app.root) - .ok_or_else(|| anyhow::anyhow!("could not find node_modules directory"))?; - - // self.symlink_packages(params.js_runtime_root, &node_modules) - // .context("link packages")?; + .ok_or(PrepareError::NodeModulesNotFound)?; let files = self.codegen_data(params)?; - // write_gen_encore_app_package(&node_modules, &files) - // .context("write gen_encore.app package")?; - write_gen_encore_dir(¶ms.app.root, &files).context("write encore.gen directory")?; + write_gen_encore_dir(¶ms.app.root, &files)?; Ok(CodegenResult { node_modules }) } - fn codegen_data(&self, params: &CodegenParams) -> Result> { - // let mut files = vec![ - // CodegenFile { - // path: PathBuf::from("package.json"), - // contents: PACKAGE_JSON.to_string(), - // }, - // CodegenFile { - // path: PathBuf::from("tsconfig.json"), - // contents: TSCONFIG_JSON.to_string(), - // }, - // ]; + fn codegen_data(&self, params: &CodegenParams) -> Result, PrepareError> { let mut files = vec![]; let mut auth_ctx = Vec::new(); @@ -127,7 +112,8 @@ impl Builder<'_> { let bind_name = b .name .as_deref() - .context("gateway objects must be assigned to a variable")?; + .context("gateway objects must be assigned to a variable") + .map_err(PrepareError::Internal)?; gateways.push((gw, bind_name)); } Resource::PubSubSubscription(sub) => { @@ -400,7 +386,8 @@ impl Builder<'_> { let bind_name = b .name .as_deref() - .context("gateway objects must be assigned to a variable")?; + .context("gateway objects must be assigned to a variable") + .map_err(PrepareError::Internal)?; gateways.push((gw, bind_name)); } Resource::PubSubSubscription(sub) => { @@ -521,112 +508,13 @@ impl Builder<'_> { let mut duplicates = files.iter().duplicates_by(|f| f.path.clone()); if let Some(dup) = duplicates.next() { - anyhow::bail!("duplicate file path: {:?}", dup.path); - } - Ok(files) - } - - fn _symlink_packages(&self, runtime_root: &Path, node_modules_dir: &Path) -> Result<()> { - // Figure out the dirs to symlink. - let dirs_to_symlink: Vec<(Option<&str>, String)> = { - let dir_names = &["encore.dev"]; - let mut dirs_to_symlink = Vec::new(); - for &name in dir_names { - // Does it start with '@'? If so, it's a directory of packages, - // so we should symlink each package within it instead of symlinking the directory itself. - if !name.starts_with('@') { - dirs_to_symlink.push((None, name.to_string())); - continue; - } - - let dir = runtime_root.join(name); - let entries = fs::read_dir(&dir)?; - for entry in entries { - let entry = entry?; - if entry.file_type()?.is_dir() { - let dir_name = entry.file_name().into_string().map_err(|_| { - anyhow::anyhow!("invalid package name: {:?}", entry.file_name()) - })?; - dirs_to_symlink.push((Some(name), dir_name)); - } - } - } - - dirs_to_symlink - }; - - for (pkg_group, pkg_name) in dirs_to_symlink { - let pkg_name = pkg_name.as_str(); - let source_dir = match pkg_group { - Some(pkg_group) => runtime_root.join(pkg_group).join(pkg_name), - None => runtime_root.join(pkg_name), - }; - - self.symlink_package(&source_dir, node_modules_dir, pkg_group, pkg_name) - .with_context(|| format!("symlink package {:?}/{:?}", pkg_group, pkg_name))?; - } - - Ok(()) - } - - #[allow(dead_code)] - fn symlink_package( - &self, - source_dir: &Path, - node_modules_dir: &Path, - pkg_group: Option<&str>, - pkg_name: &str, - ) -> Result<()> { - // Sanity check to avoid operating on unexpected directories. - if !node_modules_dir.ends_with("node_modules") { - anyhow::bail!( - "node_modules_dir {:?} does not end with 'node_modules'", - node_modules_dir - ); - } - - // If we have a package group, ensure that directory exists. - if let Some(pkg_group) = pkg_group { - let dst = node_modules_dir.join(pkg_group); - if dst.is_symlink() { - // If it's a symlink, remove it first. - fs::remove_file(&dst).context("remove existing package group symlink")?; - } - if !dst.exists() { - fs::create_dir_all(&dst) - .with_context(|| "create package group directory".to_string())?; - } - } - - let symlink_path = match pkg_group { - Some(pkg_group) => node_modules_dir.join(pkg_group).join(pkg_name), - None => node_modules_dir.join(pkg_name), - }; - - // Stat the symlink path; if it's a symlink remove it. If it's not, drop the directory. - if let Ok(metadata) = symlink_path.symlink_metadata() { - if metadata.file_type().is_symlink() { - log::info!("removing symlink {}", symlink_path.display()); - fs::remove_file(&symlink_path).context("remove existing package symlink")?; - } else { - log::info!("removing directory {}", symlink_path.display()); - fs::remove_dir_all(&symlink_path).context("remove existing package directory")?; - } + return Err(PrepareError::Internal(anyhow::anyhow!( + "duplicate file path: {:?}", + dup.path + ))); } - // Create the symlink. - log::info!( - "creating symlink {} -> {}", - symlink_path.display(), - source_dir.display() - ); - - #[cfg(windows)] - std::os::windows::fs::symlink_dir(source_dir, symlink_path).context("create symlink")?; - #[cfg(not(windows))] - std::os::unix::fs::symlink(source_dir, symlink_path).context("create symlink")?; - - Ok(()) + Ok(files) } /// Find the node_modules_dir in parent directories of base, @@ -661,47 +549,30 @@ pub struct CodegenFile { pub contents: String, } -#[allow(dead_code)] -fn write_gen_encore_app_package(node_modules_dir: &Path, files: &[CodegenFile]) -> Result<()> { - let base_dir = node_modules_dir.join("gen_encore.app"); +fn write_gen_encore_dir(app_root: &Path, files: &[CodegenFile]) -> Result<(), PrepareError> { + let base_dir = app_root.join("encore.gen"); for f in files { if f.path.is_absolute() { - anyhow::bail!( - "path {:?} is not relative to the gen_encore.app folder", + return Err(PrepareError::Internal(anyhow::anyhow!( + "path {:?} is not relative to the encore.gen folder", f.path - ); + ))); } let file_path = base_dir.join(&f.path); // Create the parent of the file, if needed if let Some(parent) = file_path.parent() { - DirBuilder::new().recursive(true).create(parent)?; + DirBuilder::new() + .recursive(true) + .create(parent) + .map_err(PrepareError::GenerateCode)?; } - let file = fs::File::create(file_path)?; - let mut buf = std::io::BufWriter::new(file); - buf.write_all(f.contents.as_bytes())?; - buf.flush()?; - } - Ok(()) -} - -fn write_gen_encore_dir(app_root: &Path, files: &[CodegenFile]) -> Result<()> { - let base_dir = app_root.join("encore.gen"); - for f in files { - if f.path.is_absolute() { - anyhow::bail!("path {:?} is not relative to the encore.gen folder", f.path); - } - - let file_path = base_dir.join(&f.path); - // Create the parent of the file, if needed - if let Some(parent) = file_path.parent() { - DirBuilder::new().recursive(true).create(parent)?; - } - let file = fs::File::create(file_path)?; + let file = fs::File::create(file_path).map_err(PrepareError::GenerateCode)?; let mut buf = std::io::BufWriter::new(file); - buf.write_all(f.contents.as_bytes())?; - buf.flush()?; + buf.write_all(f.contents.as_bytes()) + .map_err(PrepareError::GenerateCode)?; + buf.flush().map_err(PrepareError::GenerateCode)?; } Ok(()) diff --git a/tsparser/src/builder/compile.rs b/tsparser/src/builder/compile.rs index 6a051047b4..1ecea4af05 100644 --- a/tsparser/src/builder/compile.rs +++ b/tsparser/src/builder/compile.rs @@ -15,13 +15,10 @@ use super::{App, Builder, DebugMode}; #[derive(Debug)] pub struct CompileParams<'a> { - pub js_runtime_root: &'a Path, - pub runtime_version: &'a String, pub app: &'a App, pub pc: &'a ParseContext, pub working_dir: &'a Path, pub desc: &'a AppDesc, - pub use_local_runtime: bool, pub debug: DebugMode, } @@ -36,7 +33,6 @@ pub struct JSBuildOutput { pub package_json: PathBuf, pub artifact_dir: PathBuf, pub entrypoints: Vec, - pub uses_local_runtime: bool, } #[derive(Serialize, Debug)] @@ -59,7 +55,6 @@ pub struct CmdSpec { impl Builder<'_> { pub fn compile(&self, params: &CompileParams) -> Result { self.generate_code(&CodegenParams { - js_runtime_root: params.js_runtime_root, app: params.app, pc: params.pc, working_dir: params.working_dir, @@ -147,7 +142,6 @@ impl Builder<'_> { let result = transpiler.transpile(TranspileParams { artifact_dir: build_dir.as_path(), - runtime_version: params.runtime_version, cwd: params.app.root.as_path(), debug: params.debug, inputs, @@ -159,7 +153,6 @@ impl Builder<'_> { package_json: params.app.root.join("package.json"), artifact_dir: build_dir, entrypoints: result.entrypoints, - uses_local_runtime: params.use_local_runtime, }], }) } diff --git a/tsparser/src/builder/mod.rs b/tsparser/src/builder/mod.rs index c1b1122e3e..fdfe4e87ee 100644 --- a/tsparser/src/builder/mod.rs +++ b/tsparser/src/builder/mod.rs @@ -1,14 +1,14 @@ use std::path::{Path, PathBuf}; -use anyhow::Result; use convert_case::{Case, Casing}; use handlebars::*; +use prepare::PrepareError; use serde::{Deserialize, Serialize}; pub use codegen::{CodegenParams, CodegenResult}; pub use compile::CompileParams; pub use parse::{ParseError, ParseParams}; -pub use prepare::PrepareParams; +pub use prepare::{PackageVersion, PrepareParams}; pub use test::TestParams; mod codegen; @@ -35,47 +35,58 @@ pub struct Builder<'a> { } impl Builder<'_> { - pub fn new() -> Result { + pub fn new() -> Result { let mut reg = Handlebars::new(); reg.register_helper("toJSON", Box::new(to_json)); reg.register_helper("stripExt", Box::new(strip_ext)); reg.register_helper("toPascalCase", Box::new(to_pascal_case)); reg.register_helper("encoreNameToIdent", Box::new(encore_name_to_ident)); let entrypoint_service_main = - Template::new(&mut reg, "service_main", ENTRYPOINT_SERVICE_MAIN)?; + Template::new(&mut reg, "service_main", ENTRYPOINT_SERVICE_MAIN) + .map_err(|e| PrepareError::Internal(e.into()))?; let entrypoint_gateway_main = - Template::new(&mut reg, "gateway_main", ENTRYPOINT_GATEWAY_MAIN)?; + Template::new(&mut reg, "gateway_main", ENTRYPOINT_GATEWAY_MAIN) + .map_err(|e| PrepareError::Internal(e.into()))?; let entrypoint_combined_main = - Template::new(&mut reg, "combined_main", ENTRYPOINT_COMBINED_MAIN)?; + Template::new(&mut reg, "combined_main", ENTRYPOINT_COMBINED_MAIN) + .map_err(|e| PrepareError::Internal(e.into()))?; let catalog_clients_index_js = Template::new( &mut reg, "catalog_clients_index_js", CATALOG_CLIENTS_INDEX_JS, - )?; + ) + .map_err(|e| PrepareError::Internal(e.into()))?; let catalog_clients_index_d_ts = Template::new( &mut reg, "catalog_clients_index_d_ts", CATALOG_CLIENTS_INDEX_D_TS, - )?; + ) + .map_err(|e| PrepareError::Internal(e.into()))?; let catalog_clients_service_js = Template::new( &mut reg, "catalog_clients_service_js", CATALOG_CLIENTS_SERVICE_JS, - )?; + ) + .map_err(|e| PrepareError::Internal(e.into()))?; let catalog_clients_service_testing_js = Template::new( &mut reg, "catalog_clients_service_test_js", CATALOG_CLIENTS_SERVICE_TESTING_JS, - )?; + ) + .map_err(|e| PrepareError::Internal(e.into()))?; let catalog_clients_service_d_ts = Template::new( &mut reg, "catalog_clients_service_d_ts", CATALOG_CLIENTS_SERVICE_D_TS, - )?; + ) + .map_err(|e| PrepareError::Internal(e.into()))?; let catalog_auth_index_ts = - Template::new(&mut reg, "catalog_auth_index_ts", CATALOG_AUTH_INDEX_TS)?; + Template::new(&mut reg, "catalog_auth_index_ts", CATALOG_AUTH_INDEX_TS) + .map_err(|e| PrepareError::Internal(e.into()))?; let catalog_auth_auth_ts = - Template::new(&mut reg, "catalog_auth_auth_ts", CATALOG_AUTH_AUTH_TS)?; + Template::new(&mut reg, "catalog_auth_auth_ts", CATALOG_AUTH_AUTH_TS) + .map_err(|e| PrepareError::Internal(e.into()))?; + Ok(Self { reg, entrypoint_service_main, @@ -102,17 +113,25 @@ pub struct App { impl App { /// Compute the relative path from the app root. /// It reports an error if the path is not under the app root. - fn rel_path<'b>(&self, path: &'b Path) -> Result<&'b Path> { - let suffix = path.strip_prefix(&self.root)?; + fn rel_path<'b>(&self, path: &'b Path) -> Result<&'b Path, PrepareError> { + let suffix = path.strip_prefix(&self.root).map_err(|err| { + PrepareError::Internal(anyhow::anyhow!( + "unable to compute relative path to app root from {path:?}: {err}" + )) + })?; + Ok(suffix) } /// Compute the relative path from the app root as a String. - fn rel_path_string(&self, path: &Path) -> Result { + fn rel_path_string(&self, path: &Path) -> Result { let suffix = self.rel_path(path)?; let s = suffix .to_str() - .ok_or(anyhow::anyhow!("invalid path: {:?}", path))?; + .ok_or(PrepareError::Internal(anyhow::anyhow!( + "invalid path: {:?}", + path + )))?; Ok(s.to_string()) } } @@ -122,14 +141,16 @@ struct Template<'a> { } impl<'a> Template<'a> { - fn new(reg: &mut Handlebars, name: &'a str, template_str: &str) -> Result { - reg.register_template_string(name, template_str)?; + fn new(reg: &mut Handlebars, name: &'a str, template_str: &str) -> Result { + reg.register_template_string(name, template_str) + .map_err(|e| PrepareError::Internal(e.into()))?; + Ok(Self { name }) } - fn render(&self, reg: &Handlebars, data: &impl Serialize) -> Result { + fn render(&self, reg: &Handlebars, data: &impl Serialize) -> Result { reg.render(self.name, data) - .map_err(|e| anyhow::anyhow!("{}", e)) + .map_err(|e| PrepareError::Internal(e.into())) } } diff --git a/tsparser/src/builder/package_mgmt.rs b/tsparser/src/builder/package_mgmt.rs index 70ccc98d55..4d0c5c0a67 100644 --- a/tsparser/src/builder/package_mgmt.rs +++ b/tsparser/src/builder/package_mgmt.rs @@ -1,35 +1,87 @@ use std::collections::HashMap; +use std::io; use std::path::{Path, PathBuf}; +use std::str::FromStr; -use anyhow::{Context, Result}; use duct::cmd; use serde::Deserialize; -use std::io; use crate::builder::compile::CmdSpec; -#[derive(Deserialize)] -struct PackageJson { - #[serde(default, rename = "packageManager")] - package_manager: Option, - - #[serde(default)] - dependencies: HashMap, +use super::prepare::{PackageVersion, PrepareError}; + +#[derive(Debug, Clone)] +pub enum InstalledVersion { + /// The package is not installed. + NotInstalled, + /// The package is installed but older than the required version. + Older(String), + /// The package is installed but different than the required version, + /// in a way that cannot be compared (i.e. not semver but "local development" version). + Different(String), + /// The package is equal to the required version. + Current, + /// The package is newer than the required version. + Newer(String), } -fn parse_package_json(package_json_path: &Path) -> Result { - let package_json = std::fs::read_to_string(package_json_path) - .with_context(|| format!("failed to read {}", package_json_path.display()))?; +impl PackageVersion { + /// Reports whether the package is installed and if it is, whether it's the correct version. + /// The `package_path` is needed to resolve local paths when running in development mode, + /// since `npm install /path/to/package.json` rewrites it to a path relative from the package.json directory. + pub fn is_installed(&self, ver: &str, package_path: &Path) -> InstalledVersion { + use InstalledVersion::*; + match self { + Self::Local(want) => { + if let Some(path) = ver.strip_prefix("file:") { + let got = PathBuf::from(path); + + // Check for exact match or cleaned match. + if got == *want || clean_path::clean(&got) == clean_path::clean(want) { + return Current; + } else if got.is_relative() { + // Check if the paths are equal after resolving relative to the package.json directory. + let abs = package_path.join(&got); + if abs == *want || clean_path::clean(abs) == clean_path::clean(want) { + return Current; + } + } + } + + Different(ver.to_string()) + } - serde_json::from_str(&package_json) - .with_context(|| format!("failed to parse {}", package_json_path.display())) + Self::Published(want) => { + let got = ver.trim_start_matches(['^', '=', '~']); + + // Check if the version is an exact match. + if got == want { + return Current; + } + + // Parse the version and check if it's equal or greater, semver-wise. + let installed = semver::Version::parse(got).ok(); + let want = semver::Version::parse(want).ok(); + if let (Some(installed), Some(want)) = (installed, want) { + use std::cmp::Ordering; + match installed.cmp(&want) { + Ordering::Less => Older(got.to_string()), + Ordering::Equal => Current, + Ordering::Greater => Newer(got.to_string()), + } + } else { + Different(got.to_string()) + } + } + } + } } -fn find_workspace_package_manager(mut dir: PathBuf) -> Result> { +fn find_workspace_package_manager(mut dir: PathBuf) -> Result, PrepareError> { while dir.pop() { let package_json_path = dir.join("package.json"); if package_json_path.exists() { - let package_json = parse_package_json(&package_json_path)?; + let package_json = PackageJson::parse_file(&package_json_path)?; if let Some(pm) = package_json.package_manager.as_deref() { if !pm.is_empty() { return Ok(package_json.package_manager); @@ -41,9 +93,11 @@ fn find_workspace_package_manager(mut dir: PathBuf) -> Result> { Ok(None) } -pub(super) fn resolve_package_manager(package_dir: &Path) -> Result> { +pub(super) fn resolve_package_manager( + package_dir: &Path, +) -> Result, PrepareError> { let package_json_path = package_dir.join("package.json"); - let package_json = parse_package_json(&package_json_path)?; + let package_json = PackageJson::parse_file(&package_json_path)?; let package_manager = match package_json.package_manager { Some(ref pm) if !pm.is_empty() => Some(pm.clone()), @@ -69,17 +123,16 @@ pub(super) fn resolve_package_manager(package_dir: &Path) -> Result Err(anyhow::anyhow!( - "unsupported package manager: {}", - package_manager + _ => Err(PrepareError::UnsupportedPackageManagerError( + package_manager.to_string(), )), } } pub(super) trait PackageManager { - fn setup_deps(&self, encore_dev_path: Option<&Path>) -> Result<()>; + fn setup_deps(&self, encore_dev_version: &PackageVersion) -> Result<(), PrepareError>; - fn run_tests(&self) -> Result; + fn run_tests(&self) -> CmdSpec; #[allow(dead_code)] fn mgr_name(&self) -> &'static str; @@ -91,36 +144,30 @@ struct NpmPackageManager { } impl PackageManager for NpmPackageManager { - fn setup_deps(&self, encore_dev_path: Option<&Path>) -> Result<()> { - // If we don't have a node_modules folder, install everything. - if !self.dir.join("node_modules").exists() { + fn setup_deps(&self, encore_dev_version: &PackageVersion) -> Result<(), PrepareError> { + // Install `encore.dev` if necessary + let installed = self.pkg_json.dependencies.get("encore.dev"); + let v = installed.map_or(InstalledVersion::NotInstalled, |v| { + encore_dev_version.is_installed(v, &self.dir) + }); + + // First ensure the package.json file is up to date. + let modified = update_package_json(&self.dir, v, encore_dev_version)?; + + // If we modified anything or don't have a node_modules directory, run 'npm install'. + if modified || !self.dir.join("node_modules").exists() { cmd!("npm", "install") .dir(&self.dir) .stdout_to_stderr() .run() - .context("npm install failed")?; - } - - // If we don't have an `encore.dev` dependency, install it. - if !self.pkg_json.dependencies.contains_key("encore.dev") { - cmd!("npm", "install", "encore.dev@latest") - .dir(&self.dir) - .stdout_to_stderr() - .run() - .context("npm install failed")?; - } - - // If we have a local encore.dev path, symlink it. - if let Some(encore_dev_path) = encore_dev_path { - symlink_encore_dev(&self.dir, encore_dev_path) - .context("unable to symlink local encore.dev")?; + .map_err(PrepareError::InstallNodeModules)?; } Ok(()) } - fn run_tests(&self) -> Result { - Ok(CmdSpec { + fn run_tests(&self) -> CmdSpec { + CmdSpec { command: vec![ "npm".to_string(), "run".to_string(), @@ -131,7 +178,7 @@ impl PackageManager for NpmPackageManager { ], env: vec![], prioritized_files: vec![], - }) + } } fn mgr_name(&self) -> &'static str { @@ -145,43 +192,36 @@ struct YarnPackageManager { } impl PackageManager for YarnPackageManager { - fn setup_deps(&self, encore_dev_path: Option<&Path>) -> Result<()> { - self.ensure_nodelinker() - .context("unable to update .yarnrc.yml to set nodeLinker")?; + fn setup_deps(&self, encore_dev_version: &PackageVersion) -> Result<(), PrepareError> { + self.ensure_nodelinker()?; - // If we don't have a node_modules folder, install everything. - if !self.dir.join("node_modules").exists() { - cmd!("yarn", "install") - .dir(&self.dir) - .stdout_to_stderr() - .run() - .context("yarn install failed")?; - } + // Install `encore.dev` if necessary + let installed = self.pkg_json.dependencies.get("encore.dev"); + let v = installed.map_or(InstalledVersion::NotInstalled, |v| { + encore_dev_version.is_installed(v, &self.dir) + }); + + // First ensure the package.json file is up to date. + let modified = update_package_json(&self.dir, v, encore_dev_version)?; - // If we don't have an `encore.dev` dependency, install it. - if !self.pkg_json.dependencies.contains_key("encore.dev") { - cmd!("yarn", "add", "encore.dev@latest") + // If we modified anything or don't have a node_modules directory, run 'npm install'. + if modified || !self.dir.join("node_modules").exists() { + cmd!("yarn", "install") .dir(&self.dir) .stdout_to_stderr() .run() - .context("yarn add failed")?; - } - - // If we have a local encore.dev path, symlink it. - if let Some(encore_dev_path) = encore_dev_path { - symlink_encore_dev(&self.dir, encore_dev_path) - .context("unable to symlink local encore.dev")?; + .map_err(PrepareError::InstallNodeModules)?; } Ok(()) } - fn run_tests(&self) -> Result { - Ok(CmdSpec { + fn run_tests(&self) -> CmdSpec { + CmdSpec { command: vec!["yarn".to_string(), "run".to_string(), "test".to_string()], env: vec![], prioritized_files: vec![], - }) + } } fn mgr_name(&self) -> &'static str { @@ -191,31 +231,31 @@ impl PackageManager for YarnPackageManager { impl YarnPackageManager { /// Ensures the .yarnrc.yml file exists in the app root and has the nodeLinker set to "node-modules". - fn ensure_nodelinker(&self) -> Result<()> { + fn ensure_nodelinker(&self) -> Result<(), PrepareError> { let file_path = self.dir.join(".yarnrc.yml"); if !file_path.exists() { // Create the file with our desired contents. let content = "nodeLinker: node-modules\n"; - std::fs::write(&file_path, content) - .with_context(|| format!("failed to write {}", file_path.display()))?; + std::fs::write(&file_path, content).map_err(PrepareError::SetupYarnNodeLinker)?; return Ok(()); } // Read the file as yaml. - let contents = std::fs::read_to_string(&file_path) - .with_context(|| format!("failed to read {}", file_path.display()))?; - let mut map = serde_yaml::from_str::(&contents) - .with_context(|| format!("failed to parse {}", file_path.display()))?; + let contents = + std::fs::read_to_string(&file_path).map_err(PrepareError::SetupYarnNodeLinker)?; + let mut map = serde_yaml::from_str::(&contents).map_err(|err| { + PrepareError::SetupYarnNodeLinker(io::Error::new(io::ErrorKind::InvalidData, err)) + })?; // Modify the map and write it back out. map.insert( serde_yaml::Value::String("nodeLinker".into()), serde_yaml::Value::String("node-modules".into()), ); - let contents = serde_yaml::to_string(&map) - .with_context(|| format!("failed to serialize {}", file_path.display()))?; - std::fs::write(&file_path, contents) - .with_context(|| format!("failed to write {}", file_path.display()))?; + let contents = serde_yaml::to_string(&map).map_err(|err| { + PrepareError::SetupYarnNodeLinker(io::Error::new(io::ErrorKind::InvalidData, err)) + })?; + std::fs::write(&file_path, contents).map_err(PrepareError::SetupYarnNodeLinker)?; Ok(()) } @@ -227,36 +267,30 @@ struct PnpmPackageManager { } impl PackageManager for PnpmPackageManager { - fn setup_deps(&self, encore_dev_path: Option<&Path>) -> Result<()> { - // If we don't have a node_modules folder, install everything. - if !self.dir.join("node_modules").exists() { + fn setup_deps(&self, encore_dev_version: &PackageVersion) -> Result<(), PrepareError> { + // Install `encore.dev` if necessary + let installed = self.pkg_json.dependencies.get("encore.dev"); + let v = installed.map_or(InstalledVersion::NotInstalled, |v| { + encore_dev_version.is_installed(v, &self.dir) + }); + + // First ensure the package.json file is up to date. + let modified = update_package_json(&self.dir, v, encore_dev_version)?; + + // If we modified anything or don't have a node_modules directory, run 'npm install'. + if modified || !self.dir.join("node_modules").exists() { cmd!("pnpm", "install") .dir(&self.dir) .stdout_to_stderr() .run() - .context("pnpm install failed")?; - } - - // If we don't have an `encore.dev` dependency, install it. - if !self.pkg_json.dependencies.contains_key("encore.dev") { - cmd!("pnpm", "install", "encore.dev@latest") - .dir(&self.dir) - .stdout_to_stderr() - .run() - .context("pnpm install failed")?; - } - - // If we have a local encore.dev path, symlink it. - if let Some(encore_dev_path) = encore_dev_path { - symlink_encore_dev(&self.dir, encore_dev_path) - .context("unable to symlink local encore.dev")?; + .map_err(PrepareError::InstallNodeModules)?; } Ok(()) } - fn run_tests(&self) -> Result { - Ok(CmdSpec { + fn run_tests(&self) -> CmdSpec { + CmdSpec { command: vec![ "pnpm".to_string(), "run".to_string(), @@ -267,7 +301,7 @@ impl PackageManager for PnpmPackageManager { ], env: vec![], prioritized_files: vec![], - }) + } } fn mgr_name(&self) -> &'static str { @@ -275,84 +309,92 @@ impl PackageManager for PnpmPackageManager { } } -fn symlink_encore_dev(app_root: &Path, encore_dev_path: &Path) -> Result<()> { - let node_modules = app_root.join("node_modules"); - let node_mod_dst = node_modules.join("encore.dev"); +/// Updates the package.json file in the given directory to include the specified version of encore.dev. +/// Returns whether the package.json file was modified. +fn update_package_json( + dir: &Path, + v: InstalledVersion, + encore_dev_version: &PackageVersion, +) -> Result { + let path = dir.join("package.json"); + match v { + InstalledVersion::Newer(v) => Err(PrepareError::EncoreDevTooNew(v)), + + InstalledVersion::Current => Ok(false), + + InstalledVersion::Older(_) + | InstalledVersion::Different(_) + | InstalledVersion::NotInstalled => { + let ver = match encore_dev_version { + PackageVersion::Local(buf) => format!("file:{}", buf.to_string_lossy()), + PackageVersion::Published(ver) => format!("^{ver}"), + }; + + // Update package.json. + { + let data = std::fs::read_to_string(&path).map_err(PrepareError::ReadPackageJson)?; + let mut data: serde_json::Map = + serde_json::from_str(&data).map_err(|source| { + PrepareError::InvalidPackageJson { + source, + path: path.clone(), + } + })?; + + // Update the "encore.dev" key in the "dependencies" map. + { + let Some(deps) = data + .entry("dependencies") + .or_insert_with(|| serde_json::Value::Object(serde_json::Map::new())) + .as_object_mut() + else { + return Err(PrepareError::ReadPackageJson(io::Error::new( + io::ErrorKind::InvalidData, + "dependencies field is not an object", + ))); + }; + deps.insert("encore.dev".to_string(), ver.into()); + } - // If the node_modules directory exists, symlink the encore.dev package. - if let Ok(Some(target)) = read_symlink(&node_mod_dst) { - if target == encore_dev_path { - log::info!("encore.dev symlink already points to the local runtime, skipping."); - return Ok(()); - } + // Write it back out. + let data = serde_json::to_string_pretty(&data).map_err(|source| { + PrepareError::InvalidPackageJson { + source, + path: path.clone(), + } + })?; + std::fs::write(&path, &data).map_err(PrepareError::WritePackageJson)?; + } - // It's a symlink pointing elsewhere. Remove it. - delete_symlink(&node_mod_dst) - .with_context(|| format!("remove existing encore.dev symlink at {:?}", node_mod_dst))?; - } else { - // It's not a symlink. Check if it exists as a directory. - if node_mod_dst.exists() { - // Remove the directory so we can add a symlink. - std::fs::remove_dir_all(&node_mod_dst).with_context(|| { - format!("remove existing encore.dev directory at {:?}", node_mod_dst) - })?; + Ok(true) } } - - // Create the symlink if the node_modules directory exists. - if node_modules.exists() { - create_symlink(encore_dev_path, &node_mod_dst) - .with_context(|| format!("symlink encore.dev directory at {:?}", node_mod_dst))?; - } - Ok(()) -} - -#[cfg(not(windows))] -fn create_symlink(src: &Path, dst: &Path) -> io::Result<()> { - symlink::symlink_dir(src, dst) } -#[cfg(windows)] -fn create_symlink(src: &Path, dst: &Path) -> io::Result<()> { - symlink::symlink_dir(src, dst).or_else(|_| junction::create(src, &dst)) -} +#[derive(Deserialize)] +struct PackageJson { + #[serde(default, rename = "packageManager")] + package_manager: Option, -#[cfg(not(windows))] -fn read_symlink(src: &Path) -> io::Result> { - if let Ok(meta) = src.symlink_metadata() { - if meta.is_symlink() { - return std::fs::read_link(src).map(Some); - } - } - Ok(None) + #[serde(default)] + dependencies: HashMap, } -#[cfg(windows)] -fn read_symlink(src: &Path) -> io::Result> { - if let Ok(meta) = src.symlink_metadata() { - // Is this a symlink? - if meta.is_symlink() { - return std::fs::read_link(src).map(Some); - } - } +impl FromStr for PackageJson { + type Err = serde_json::Error; - // Check if it's a junction. - if junction::exists(src)? { - return junction::get_target(src).map(Some); + fn from_str(s: &str) -> Result { + serde_json::from_str(s) } - - Ok(None) -} - -#[cfg(not(windows))] -fn delete_symlink(src: &Path) -> io::Result<()> { - symlink::remove_symlink_auto(src) } -#[cfg(windows)] -fn delete_symlink(src: &Path) -> io::Result<()> { - if let Ok(_) = symlink::remove_symlink_auto(src) { - return Ok(()); +impl PackageJson { + pub fn parse_file(path: &Path) -> Result { + let data = std::fs::read_to_string(path).map_err(PrepareError::ReadPackageJson)?; + data.parse() + .map_err(|source| PrepareError::InvalidPackageJson { + source, + path: path.to_path_buf(), + }) } - junction::delete(src) } diff --git a/tsparser/src/builder/prepare.rs b/tsparser/src/builder/prepare.rs index e6ae45a965..97de2f51b2 100644 --- a/tsparser/src/builder/prepare.rs +++ b/tsparser/src/builder/prepare.rs @@ -1,21 +1,63 @@ -use std::path::Path; +use std::{io, path::PathBuf}; -use anyhow::{Context, Result}; +use thiserror::Error; use super::Builder; #[derive(Debug, Clone)] -pub struct PrepareParams<'a> { - pub js_runtime_root: &'a Path, - pub app_root: &'a Path, +pub struct PrepareParams { + pub encore_dev_version: PackageVersion, + pub app_root: PathBuf, } -impl Builder<'_> { - pub fn prepare(&self, params: &PrepareParams) -> Result<()> { - let encore_dev_path = params.js_runtime_root.join("encore.dev"); - self.setup_deps(params.app_root, Some(encore_dev_path.as_path())) - .context("setup deps")?; +#[derive(Debug, Clone)] +pub enum PackageVersion { + Local(PathBuf), + Published(String), +} + +#[derive(Debug, Error)] +pub enum PrepareError { + #[error("package.json file not found (expected at {0})")] + PackageJsonNotFound(PathBuf), + #[error("failed to read package.json: {0}")] + ReadPackageJson(#[source] io::Error), + #[error("failed to update package.json: {0}")] + WritePackageJson(#[source] io::Error), + #[error("invalid package.json: {source}")] + InvalidPackageJson { + source: serde_json::Error, + path: PathBuf, + }, + #[error("package manager '{0}' not supported")] + UnsupportedPackageManagerError(String), + + #[error( + "installed 'encore.dev' package version ({0}) newer than 'encore' release, run 'encore version update' first" + )] + EncoreDevTooNew(String), + + #[error("installing node_modules failed: {0}, run 'npm install' manually to see the error")] + InstallNodeModules(#[source] io::Error), + + #[error("failed to install 'encore.dev' package: {0}")] + InstallEncoreDev(#[source] io::Error), - Ok(()) + #[error("failed to configure yarn nodeLinker to node-modules: {0}")] + SetupYarnNodeLinker(#[source] io::Error), + + #[error("node_modules directory not found")] + NodeModulesNotFound, + + #[error("unable to generate code")] + GenerateCode(#[source] io::Error), + + #[error("internal error: {0}")] + Internal(#[source] anyhow::Error), +} + +impl Builder<'_> { + pub fn prepare(&self, params: &PrepareParams) -> Result<(), PrepareError> { + self.setup_deps(¶ms.app_root, ¶ms.encore_dev_version) } } diff --git a/tsparser/src/builder/test.rs b/tsparser/src/builder/test.rs index 9549061290..9a4fc937a7 100644 --- a/tsparser/src/builder/test.rs +++ b/tsparser/src/builder/test.rs @@ -3,7 +3,6 @@ use std::fs; use std::path::Path; use crate::app::AppDesc; -use anyhow::{Context, Result}; use serde::{Deserialize, Serialize}; use crate::builder::codegen::CodegenParams; @@ -11,17 +10,14 @@ use crate::builder::compile::CmdSpec; use crate::builder::package_mgmt::resolve_package_manager; use crate::parser::parser::ParseContext; -use super::{App, Builder}; +use super::{prepare::PrepareError, App, Builder}; #[derive(Debug)] pub struct TestParams<'a> { - pub js_runtime_root: &'a Path, - pub runtime_version: &'a String, pub app: &'a App, pub pc: &'a ParseContext, pub working_dir: &'a Path, pub parse: &'a AppDesc, - pub use_local_runtime: bool, } #[derive(Serialize, Debug)] @@ -30,7 +26,7 @@ pub struct TestResult { } impl Builder<'_> { - pub fn test(&self, params: &TestParams) -> Result { + pub fn test(&self, params: &TestParams) -> Result { // Is there a "test" script defined in package.json? { #[derive(Deserialize)] @@ -39,10 +35,15 @@ impl Builder<'_> { scripts: HashMap, } let package_json_path = params.app.root.join("package.json"); - let package_json = fs::read_to_string(&package_json_path) - .with_context(|| format!("failed to read {}", package_json_path.display()))?; - let package_json: PackageJson = serde_json::from_str(&package_json) - .with_context(|| format!("failed to parse {}", package_json_path.display()))?; + let package_json = + fs::read_to_string(&package_json_path).map_err(PrepareError::ReadPackageJson)?; + let package_json: PackageJson = + serde_json::from_str(&package_json).map_err(|source| { + PrepareError::InvalidPackageJson { + source, + path: package_json_path.to_path_buf(), + } + })?; if !package_json.scripts.contains_key("test") { log::info!("no test script defined in package.json, skipping tests"); return Ok(TestResult { cmd: None }); @@ -50,20 +51,14 @@ impl Builder<'_> { } self.generate_code(&CodegenParams { - js_runtime_root: params.js_runtime_root, app: params.app, pc: params.pc, working_dir: params.working_dir, desc: params.parse, - }) - .context("generate code")?; - - // Find the node_modules dir and the relative path back to the app root. - let pkg_mgr = - resolve_package_manager(¶ms.app.root).context("resolve package manager")?; - - let cmd = pkg_mgr.run_tests().context("test packages")?; + })?; + let pkg_mgr = resolve_package_manager(¶ms.app.root)?; + let cmd = pkg_mgr.run_tests(); Ok(TestResult { cmd: Some(cmd) }) } } diff --git a/tsparser/src/builder/transpiler.rs b/tsparser/src/builder/transpiler.rs index 994e9c6abe..91e7f97576 100644 --- a/tsparser/src/builder/transpiler.rs +++ b/tsparser/src/builder/transpiler.rs @@ -35,10 +35,6 @@ pub struct TranspileParams<'a> { /// for generating useful error messages. pub cwd: &'a Path, - /// The Encore CLI runtime version - #[allow(dead_code)] - pub runtime_version: &'a String, - /// The services and gateways to transpile. pub inputs: Vec, @@ -108,11 +104,7 @@ impl OutputTranspiler for EsbuildCompiler<'_> { ) }; - let mut command = vec![ - "node".to_string(), - "--enable-source-maps".into(), - "--preserve-symlinks".into(), - ]; + let mut command = vec!["node".to_string(), "--enable-source-maps".into()]; match p.debug { DebugMode::Disabled => {} diff --git a/tsparser/src/legacymeta/mod.rs b/tsparser/src/legacymeta/mod.rs index 032eb83c83..761015ccc0 100644 --- a/tsparser/src/legacymeta/mod.rs +++ b/tsparser/src/legacymeta/mod.rs @@ -784,7 +784,7 @@ mod tests { let resolver = Box::new(TestResolver::new(tmp_dir.to_path_buf(), ar.clone())); let pc = ParseContext::with_resolver( tmp_dir.to_path_buf(), - JS_RUNTIME_PATH.clone(), + Some(JS_RUNTIME_PATH.clone()), resolver, cm, errs.clone(), diff --git a/tsparser/src/legacymeta/schema.rs b/tsparser/src/legacymeta/schema.rs index fcee134e37..7b9b66148b 100644 --- a/tsparser/src/legacymeta/schema.rs +++ b/tsparser/src/legacymeta/schema.rs @@ -288,42 +288,60 @@ impl BuilderCtx<'_, '_> { let (mut typ, wire) = if let Some(spec) = resolve_wire_spec(tt) { ( self.typ(&spec.underlying)?, - Some(schema::WireSpec { - location: Some(match &spec.location { - WireLocation::Header => { - tags.push(schema::Tag { - key: "header".into(), - name: spec.name_override.clone().unwrap_or(field_name.clone()), - options: if f.optional { - vec!["optional".into()] - } else { - vec![] + match &spec.location { + WireLocation::Header => { + let name = spec.name_override.clone().unwrap_or(field_name.clone()); + tags.push(schema::Tag { + key: "header".into(), + name, + options: if f.optional { + vec!["optional".into()] + } else { + vec![] + }, + }); + + Some(schema::WireSpec { + location: Some(schema::wire_spec::Location::Header( + schema::wire_spec::Header { + name: spec.name_override.clone(), }, - }); - - schema::wire_spec::Location::Header(schema::wire_spec::Header { - name: spec.name_override.clone(), - }) - } - WireLocation::Query => { - query_string_name = - spec.name_override.clone().unwrap_or(field_name.clone()); - tags.push(schema::Tag { - key: "query".into(), - name: query_string_name.clone(), - options: if f.optional { - vec!["optional".into()] - } else { - vec![] + )), + }) + } + WireLocation::Query => { + query_string_name = + spec.name_override.clone().unwrap_or(field_name.clone()); + tags.push(schema::Tag { + key: "query".into(), + name: query_string_name.clone(), + options: if f.optional { + vec!["optional".into()] + } else { + vec![] + }, + }); + + Some(schema::WireSpec { + location: Some(schema::wire_spec::Location::Query( + schema::wire_spec::Query { + name: spec.name_override.clone(), }, - }); - - schema::wire_spec::Location::Query(schema::wire_spec::Query { - name: spec.name_override.clone(), - }) - } - }), - }), + )), + }) + } + + WireLocation::PubSubAttr => { + let name = spec.name_override.clone().unwrap_or(field_name.clone()); + tags.push(schema::Tag { + key: "pubsub-attr".into(), + name, + options: vec![], + }); + + None + } + }, ) } else { (self.typ(tt)?, None) @@ -576,12 +594,12 @@ pub(super) fn loc_from_range( let pkg_name = rel_path .parent() .and_then(|p| p.file_name()) + .or_else(|| app_root.file_name()) .map(|s| s.to_string_lossy().to_string()) .ok_or(range.parse_err("missing package name"))?; let pkg_path = rel_path .parent() - .map(|s| s.to_string_lossy().to_string()) - .ok_or(range.parse_err("missing package path"))?; + .map_or(".".to_string(), |s| s.to_string_lossy().to_string()); (pkg_path, pkg_name, file_name) } Err(_) => { diff --git a/tsparser/src/parser/module_loader.rs b/tsparser/src/parser/module_loader.rs index 44b46e5105..7ed44b3a18 100644 --- a/tsparser/src/parser/module_loader.rs +++ b/tsparser/src/parser/module_loader.rs @@ -2,7 +2,7 @@ use std::cell::{OnceCell, RefCell}; use std::collections::HashMap; use std::ffi::OsStr; use std::io; -use std::path::Path; +use std::path::{Path, PathBuf}; use swc_common::comments::{Comments, NoopComments, SingleThreadedComments}; use swc_common::errors::Handler; @@ -31,6 +31,7 @@ pub struct ModuleLoader { errs: Lrc, file_set: Lrc, resolver: Box, + encore_gen_root: PathBuf, by_path: RefCell>>, // The universe module, if it's been loaded. @@ -70,22 +71,31 @@ impl Error { Error::ParseError(e) => Some(e.span()), } } + pub fn msg(&self) -> String { match self { - Error::UnableToResolve(..) | Error::InvalidFilename(_) | Error::LoadFile(_) => { - self.to_string() + Error::UnableToResolve(s, source) => { + format!("unable to resolve module {}: {:?}", s, source) } + Error::InvalidFilename(_) | Error::LoadFile(_) => self.to_string(), Error::ParseError(e) => e.clone().into_kind().msg().to_string(), } } } impl ModuleLoader { - pub fn new(errs: Lrc, file_set: Lrc, resolver: Box) -> Self { + pub fn new( + errs: Lrc, + file_set: Lrc, + resolver: Box, + app_root: PathBuf, + ) -> Self { + let encore_gen_root = app_root.join("encore.gen"); Self { errs, file_set, resolver, + encore_gen_root, by_path: RefCell::new(HashMap::new()), universe: OnceCell::new(), encore_app_clients: OnceCell::new(), @@ -138,6 +148,19 @@ impl ModuleLoader { return Ok(None); } } + + // Check for the generated clients again, using the resolved path, + // in case the "~encore/*" alias is not set up. + if let Ok(suffix) = buf.strip_prefix(&self.encore_gen_root) { + // Need to check for trailing slash since the resolved path + // will be something like "clients/index.js". + if suffix.starts_with("clients/") { + return Ok(Some(self.encore_app_clients())); + } else if suffix.starts_with("auth/") { + return Ok(Some(self.encore_auth())); + } + } + FilePath::Real(buf.clone()) } FileName::Custom(ref str) => FilePath::Custom(str.clone()), diff --git a/tsparser/src/parser/parser.rs b/tsparser/src/parser/parser.rs index 177c9df89f..cfa95a6e45 100644 --- a/tsparser/src/parser/parser.rs +++ b/tsparser/src/parser/parser.rs @@ -56,7 +56,7 @@ impl std::fmt::Debug for ParseContext { impl ParseContext { pub fn new( app_root: PathBuf, - js_runtime_path: PathBuf, + js_runtime_path: Option, cm: Lrc, errs: Lrc, ) -> Result { @@ -71,7 +71,7 @@ impl ParseContext { pub fn with_resolver( app_root: PathBuf, - js_runtime_path: PathBuf, + js_runtime_path: Option, resolver: R, cm: Lrc, errs: Lrc, @@ -96,6 +96,7 @@ impl ParseContext { errs.clone(), file_set.clone(), Box::new(resolver), + app_root.clone(), )); let type_checker = Lrc::new(TypeChecker::new(loader.clone())); diff --git a/tsparser/src/parser/resources/apis/encoding.rs b/tsparser/src/parser/resources/apis/encoding.rs index 5e3178706a..ff4821d3f5 100644 --- a/tsparser/src/parser/resources/apis/encoding.rs +++ b/tsparser/src/parser/resources/apis/encoding.rs @@ -505,6 +505,7 @@ fn extract_loc_params(fields: &FieldMap, default_loc: ParamLocation) -> ParseRes match spec.location { WireLocation::Header => ParamLocation::Header, WireLocation::Query => ParamLocation::Query, + WireLocation::PubSubAttr => ParamLocation::Body, }, spec.name_override.clone(), ), diff --git a/tsparser/src/parser/service_discovery.rs b/tsparser/src/parser/service_discovery.rs index 59110294fb..0433ed7999 100644 --- a/tsparser/src/parser/service_discovery.rs +++ b/tsparser/src/parser/service_discovery.rs @@ -197,7 +197,7 @@ mod tests { let resolver = Box::new(TestResolver::new(tmp_dir.to_path_buf(), ar.clone())); let pc = ParseContext::with_resolver( tmp_dir.to_path_buf(), - JS_RUNTIME_PATH.clone(), + Some(JS_RUNTIME_PATH.clone()), resolver, cm, errs.clone(), diff --git a/tsparser/src/parser/types/tests.rs b/tsparser/src/parser/types/tests.rs index 13c522f2f8..ffe05bc7f0 100644 --- a/tsparser/src/parser/types/tests.rs +++ b/tsparser/src/parser/types/tests.rs @@ -43,7 +43,7 @@ fn resolve_types() { let pc = ParseContext::with_resolver( tmp_dir.path().to_path_buf(), - JS_RUNTIME_PATH.clone(), + Some(JS_RUNTIME_PATH.clone()), resolver, cm, errs.clone(), diff --git a/tsparser/src/parser/types/typ.rs b/tsparser/src/parser/types/typ.rs index 068415459b..7d102ec95c 100644 --- a/tsparser/src/parser/types/typ.rs +++ b/tsparser/src/parser/types/typ.rs @@ -106,6 +106,7 @@ pub struct WireSpec { pub enum WireLocation { Query, Header, + PubSubAttr, } impl WireSpec { diff --git a/tsparser/src/parser/types/type_resolve.rs b/tsparser/src/parser/types/type_resolve.rs index bb90c07849..20ada9b940 100644 --- a/tsparser/src/parser/types/type_resolve.rs +++ b/tsparser/src/parser/types/type_resolve.rs @@ -684,6 +684,17 @@ impl Ctx<'_> { } } + // Is this a reference to the "Attribute" pub/sub wire spec override? + if obj.name.as_ref().is_some_and(|s| s == "Attribute") + && self + .state + .is_module_path(obj.module_id, "encore.dev/pubsub") + { + if let Some(wire_spec) = self.parse_wire_spec(typ.span, &obj, &type_arguments) { + return Type::Custom(Custom::WireSpec(wire_spec)); + } + } + match &obj.kind { ObjectKind::TypeName(_) => { let named = Named::new(obj, type_arguments); @@ -2093,6 +2104,7 @@ impl Ctx<'_> { let location = match &obj.name.as_deref() { Some("Header") => WireLocation::Header, Some("Query") => WireLocation::Query, + Some("Attribute") => WireLocation::PubSubAttr, _ => return None, }; diff --git a/tsparser/src/parser/types/type_string.rs b/tsparser/src/parser/types/type_string.rs index 11bed6c681..b1496569ec 100644 --- a/tsparser/src/parser/types/type_string.rs +++ b/tsparser/src/parser/types/type_string.rs @@ -163,6 +163,7 @@ where match &s.location { super::WireLocation::Query => self.buf.write_str("Query<")?, super::WireLocation::Header => self.buf.write_str("Header<")?, + super::WireLocation::PubSubAttr => self.buf.write_str("Attribute<")?, } self.render_type(&s.underlying)?; if let Some(name) = &s.name_override { diff --git a/tsparser/src/parser/usageparser/mod.rs b/tsparser/src/parser/usageparser/mod.rs index b1ad648aae..1d17823bb0 100644 --- a/tsparser/src/parser/usageparser/mod.rs +++ b/tsparser/src/parser/usageparser/mod.rs @@ -516,9 +516,14 @@ export const Bar = 5; false, Some(cm.clone()), )); - let pc = - ParseContext::with_resolver(app_root, JS_RUNTIME_PATH.clone(), resolver, cm, errs) - .unwrap(); + let pc = ParseContext::with_resolver( + app_root, + Some(JS_RUNTIME_PATH.clone()), + resolver, + cm, + errs, + ) + .unwrap(); let mods = pc.loader.load_archive(&base, &ar).unwrap(); let foo_mod = mods.get(&"/dummy/foo.ts".into()).unwrap(); @@ -613,7 +618,7 @@ export const Bar = 5; false, Some(cm.clone()), )); - let pc = ParseContext::with_resolver(app_root, JS_RUNTIME_PATH.clone(), resolver, cm, errs).unwrap(); + let pc = ParseContext::with_resolver(app_root, Some(JS_RUNTIME_PATH.clone()), resolver, cm, errs).unwrap(); let mods = pc.loader.load_archive(&base, &ar).unwrap(); let foo_mod = mods.get(&"/dummy/foo.ts".into()).unwrap(); diff --git a/tsparser/src/runtimeresolve/node.rs b/tsparser/src/runtimeresolve/node.rs index ed82cb566e..ec38b21911 100644 --- a/tsparser/src/runtimeresolve/node.rs +++ b/tsparser/src/runtimeresolve/node.rs @@ -32,7 +32,7 @@ struct PackageJson { #[derive(Debug)] pub struct EncoreRuntimeResolver { inner: R, - js_runtime_path: PathBuf, + js_runtime_path: Option, extra_export_conditions: Vec, tsconfig_resolver: Option>, } @@ -40,7 +40,11 @@ pub struct EncoreRuntimeResolver { static DEFAULT_CONDITIONS: &[&str] = &["node-addons", "node", "import", "require", "default"]; impl EncoreRuntimeResolver { - pub fn new(inner: R, js_runtime_path: PathBuf, extra_export_conditions: Vec) -> Self { + pub fn new( + inner: R, + js_runtime_path: Option, + extra_export_conditions: Vec, + ) -> Self { Self { inner, js_runtime_path, @@ -111,13 +115,17 @@ impl EncoreRuntimeResolver { } fn resolve_encore_module(&self, target: &str) -> Result, Error> { + let Some(js_runtime_path) = &self.js_runtime_path else { + return Ok(None); + }; + let target_path = Path::new(target); let mut components = target_path.components(); if let Some(Component::Normal(_)) = components.next() { // It's a normal import, not an absolute or relative path. let (pkg_name, pkg_path) = self.pkg_name_from_target(target); - let pkg_dir = self.js_runtime_path.join(pkg_name); + let pkg_dir = js_runtime_path.join(pkg_name); if pkg_dir.exists() { return self.resolve_export(&pkg_dir, pkg_path); diff --git a/tsparser/src/runtimeresolve/tsconfig.rs b/tsparser/src/runtimeresolve/tsconfig.rs index 176f690fea..fea4231d2f 100644 --- a/tsparser/src/runtimeresolve/tsconfig.rs +++ b/tsparser/src/runtimeresolve/tsconfig.rs @@ -259,6 +259,7 @@ fn strip_jsonc_comments(jsonc_input: &str, preserve_locations: bool) -> String { struct PathResolveIterator { base: PathBuf, + base_ext: Option, candidates: &'static [&'static str], idx: usize, } @@ -273,6 +274,10 @@ impl Iterator for PathResolveIterator { if candidate.is_empty() { Some(self.base.clone()) + } else if let Some(base_ext) = &self.base_ext { + // Combine the candidate extension with the base extension. + let ext = format!("{base_ext}.{candidate}"); + Some(self.base.with_extension(ext)) } else { Some(self.base.with_extension(candidate)) } @@ -283,18 +288,26 @@ impl Iterator for PathResolveIterator { } fn file_candidates(base: PathBuf) -> impl Iterator { - let candidates: &'static [&'static str] = match base.extension().and_then(|s| s.to_str()) { + let base_ext = base + .extension() + .and_then(|s| s.to_str()) + .map(|s| s.to_string()); + + let candidates: &'static [&'static str] = match base_ext.as_deref() { Some("js") => &["ts", "tsx", "d.ts", "js", "jsx"], Some("mjs") => &["mts", "d.mts", "mjs"], Some("cjs") => &["cts", "d.cts", "cjs"], - None => &[ + + // If we don't have an extension, or it's not recognized, try all extensions. + _ => &[ "ts", "tsx", "d.ts", "js", "jsx", "mts", "d.mts", "mjs", "cts", "d.cts", "cjs", "", ], - _ => &[""], }; + PathResolveIterator { base, candidates, + base_ext, idx: 0, } } diff --git a/tsparser/src/testutil/testparse.rs b/tsparser/src/testutil/testparse.rs index e636a07eac..c739840b3b 100644 --- a/tsparser/src/testutil/testparse.rs +++ b/tsparser/src/testutil/testparse.rs @@ -3,7 +3,6 @@ use swc_common::sync::Lrc; use crate::parser::module_loader::Module; use crate::parser::parser::ParseContext; -use crate::testutil::JS_RUNTIME_PATH; use assert_fs::TempDir; use swc_common::errors::Handler; use swc_common::SourceMap; @@ -19,6 +18,6 @@ pub fn test_parse(src: &str) -> Lrc { Some(cm.clone()), )); - let pc = ParseContext::new(root.to_path_buf(), JS_RUNTIME_PATH.clone(), cm, errs).unwrap(); + let pc = ParseContext::new(root.to_path_buf(), None, cm, errs).unwrap(); pc.loader.inject_file("test.ts".into(), src).unwrap() } diff --git a/tsparser/tests/parse_tests.rs b/tsparser/tests/parse_tests.rs index f8a780ae5f..33c5390642 100644 --- a/tsparser/tests/parse_tests.rs +++ b/tsparser/tests/parse_tests.rs @@ -3,6 +3,7 @@ use std::path::Path; use std::rc::Rc; use anyhow::Result; +use common::js_runtime_path; use insta::glob; use swc_common::errors::{Handler, HANDLER}; use swc_common::{Globals, SourceMap, GLOBALS}; @@ -12,8 +13,6 @@ use encore_tsparser::builder::Builder; use encore_tsparser::parser::parser::ParseContext; use encore_tsparser::{app, builder}; -use crate::common::js_runtime_path; - mod common; #[test] @@ -46,11 +45,9 @@ fn parse_txtar(app_root: &Path) -> Result { GLOBALS.set(&globals, || -> Result { HANDLER.set(&errs, || -> Result { let builder = Builder::new()?; - let js_runtime_path = js_runtime_path(); - let pc = ParseContext::new( app_root.to_path_buf(), - js_runtime_path.clone(), + Some(js_runtime_path()), cm, errs.clone(), )?; diff --git a/v2/tsbuilder/tsbuilder.go b/v2/tsbuilder/tsbuilder.go index bd3e074fce..b8aa5c2382 100644 --- a/v2/tsbuilder/tsbuilder.go +++ b/v2/tsbuilder/tsbuilder.go @@ -140,14 +140,17 @@ func (i *BuilderImpl) Parse(ctx context.Context, p builder.ParseParams) (*builde }() { - input, _ := json.Marshal(prepareInput{ - AppRoot: paths.FS(p.App.Root()), - JSRuntimeRoot: jsRuntimePath, - RuntimeVersion: version.Version, - UseLocalRuntime: p.Build.UseLocalJSRuntime, - }) + input := prepareInput{ + AppRoot: paths.FS(p.App.Root()), + JSRuntimeRoot: jsRuntimePath, + RuntimeVersion: version.Version, + } + if p.Build.UseLocalJSRuntime { + input.LocalRuntimeOverride = jsRuntimePath.ToIO() + } + inputData, _ := json.Marshal(input) _, _ = stdin.Write([]byte("prepare\n")) - if _, err := stdin.Write(input); err != nil { + if _, err := stdin.Write(inputData); err != nil { return nil, fmt.Errorf("unable to write to stdin: %s", err) } @@ -192,7 +195,6 @@ func (i *BuilderImpl) Parse(ctx context.Context, p builder.ParseParams) (*builde } type compileInput struct { - RuntimeVersion string `json:"runtime_version"` UseLocalRuntime bool `json:"use_local_runtime"` Debug builder.DebugMode `json:"debug"` } @@ -201,7 +203,6 @@ func (i *BuilderImpl) Compile(ctx context.Context, p builder.CompileParams) (*bu data := p.Parse.Data.(*data) input, _ := json.Marshal(compileInput{ - RuntimeVersion: version.Version, UseLocalRuntime: p.Build.UseLocalJSRuntime, Debug: p.Build.DebugMode, }) @@ -343,10 +344,10 @@ type genUserFacingInput struct { } type prepareInput struct { - JSRuntimeRoot paths.FS `json:"js_runtime_root"` - AppRoot paths.FS `json:"app_root"` - RuntimeVersion string `json:"runtime_version"` - UseLocalRuntime bool `json:"use_local_runtime"` + JSRuntimeRoot paths.FS `json:"js_runtime_root"` + AppRoot paths.FS `json:"app_root"` + RuntimeVersion string `json:"runtime_version"` + LocalRuntimeOverride string `json:"local_runtime_override,omitempty"` } func readResp(reader io.Reader) (isSuccess bool, data []byte, err error) {