diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d39850b6f..4ad4614ea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,13 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm Description! And a link to a [reference](http://url) --> + # [x.x.x] (unreleased) - 2021-mm-dd + + - **❗ BREAKING ❗** + - **use ControlFlow in checkpoints** ([PR #602](https://github.com/apollographql/router/pull/602)) + `checkpoint` and `async_checkpoint` now `use std::ops::ControlFlow instead` of the `Step` enum. ControlFlow has two variants, `Continue` and `Break`. + ## ❗ BREAKING ❗ - **Header propagation plugin** ([PR #599](https://github.com/apollographql/router/pull/599)) diff --git a/Cargo.lock b/Cargo.lock index f608b0a8fb..1b7f3e77b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,7 +23,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.5", "once_cell", "version_check", ] @@ -63,9 +63,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.55" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd" +checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" [[package]] name = "apollo-encoder" @@ -98,16 +98,16 @@ dependencies = [ [[package]] name = "apollo-parser" version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b735c4f88c6c86bab0e4b122e2c9eb306c54cb1d1d4c8b8d2460d1df572e5b9a" +source = "git+https://github.com/apollographql/apollo-rs.git?rev=21bd947e8af49b68229cc44d62f6481ed4fe5cbe#21bd947e8af49b68229cc44d62f6481ed4fe5cbe" dependencies = [ "rowan", ] [[package]] name = "apollo-parser" -version = "0.2.3" -source = "git+https://github.com/apollographql/apollo-rs.git?rev=21bd947e8af49b68229cc44d62f6481ed4fe5cbe#21bd947e8af49b68229cc44d62f6481ed4fe5cbe" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "027e04c63b91ac33053684910a90018a0e96d45d52c4489cf4c12b4cb240802d" dependencies = [ "rowan", ] @@ -193,7 +193,7 @@ dependencies = [ name = "apollo-router-core" version = "0.1.0-alpha.8" dependencies = [ - "apollo-parser 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "apollo-parser 0.2.4", "async-trait", "atty", "bytes", @@ -247,7 +247,7 @@ version = "0.1.0" source = "git+https://github.com/apollographql/apollo-rs.git?rev=21bd947e8af49b68229cc44d62f6481ed4fe5cbe#21bd947e8af49b68229cc44d62f6481ed4fe5cbe" dependencies = [ "apollo-encoder 0.2.2", - "apollo-parser 0.2.3 (git+https://github.com/apollographql/apollo-rs.git?rev=21bd947e8af49b68229cc44d62f6481ed4fe5cbe)", + "apollo-parser 0.2.3", "arbitrary", "once_cell", ] @@ -257,7 +257,7 @@ name = "apollo-spaceport" version = "0.1.0-alpha.8" dependencies = [ "bytes", - "clap 3.1.3", + "clap 3.1.6", "flate2", "prost", "prost-types", @@ -333,7 +333,7 @@ name = "async-allow-client-id" version = "0.1.0" dependencies = [ "anyhow", - "apollo-parser 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "apollo-parser 0.2.4", "apollo-router", "apollo-router-core", "futures", @@ -352,9 +352,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.3.8" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443ccbb270374a2b1055fc72da40e1f237809cd6bb0e97e66d264cd138473a6" +checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" dependencies = [ "brotli", "flate2", @@ -385,9 +385,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" +checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" dependencies = [ "event-listener", ] @@ -437,9 +437,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backoff" @@ -447,16 +447,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.5", "instant", "rand", ] [[package]] name = "backtrace" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" +checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" dependencies = [ "addr2line", "cc", @@ -492,18 +492,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d36a02058e76b040de25a4464ba1c80935655595b661505c8b39b664828b95" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ "generic-array", ] @@ -591,9 +582,9 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba2ae6de944143141f6155a473a6b02f66c7c3f9f47316f802f80204ebfe6e12" +checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", @@ -613,9 +604,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" dependencies = [ "jobserver", ] @@ -663,9 +654,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.3" +version = "3.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f8c0e2a6b902acc18214e24a6935cdaf8a8e34231913d4404dcaee659f65a1" +checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123" dependencies = [ "atty", "bitflags", @@ -675,14 +666,14 @@ dependencies = [ "os_str_bytes", "strsim 0.10.0", "termcolor", - "textwrap 0.14.2", + "textwrap 0.15.0", ] [[package]] name = "clap_derive" -version = "3.1.0" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd1122e63869df2cb309f449da1ad54a7c6dfeb7c7e6ccd8e0825d9eb93bb72" +checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -736,7 +727,7 @@ name = "compose-your-graphql-router" version = "0.1.0" dependencies = [ "anyhow", - "apollo-parser 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "apollo-parser 0.2.4", "apollo-router", "apollo-router-core", "futures", @@ -783,7 +774,7 @@ name = "context-data" version = "0.1.0" dependencies = [ "anyhow", - "apollo-parser 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "apollo-parser 0.2.4", "apollo-router", "apollo-router-core", "futures", @@ -806,9 +797,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -837,9 +828,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2209c310e29876f7f0b2721e7e26b84aff178aa3da5d091f9bfbf47669e60e3" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if 1.0.0", ] @@ -889,7 +880,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", ] [[package]] @@ -899,8 +890,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", - "crossbeam-epoch 0.9.6", - "crossbeam-utils 0.8.6", + "crossbeam-epoch 0.9.7", + "crossbeam-utils 0.8.7", ] [[package]] @@ -920,12 +911,12 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762" +checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", "lazy_static", "memoffset 0.6.5", "scopeguard", @@ -944,9 +935,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" +checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" dependencies = [ "cfg-if 1.0.0", "lazy_static", @@ -1067,22 +1058,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "block-buffer 0.10.0", + "block-buffer", "crypto-common", ] @@ -1265,7 +1247,7 @@ checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.10", + "redox_syscall 0.2.11", "winapi 0.3.9", ] @@ -1307,7 +1289,7 @@ name = "forbid-anonymous-operations" version = "0.1.0" dependencies = [ "anyhow", - "apollo-parser 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "apollo-parser 0.2.4", "apollo-router", "apollo-router-core", "futures", @@ -1526,9 +1508,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" +checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" dependencies = [ "cfg-if 1.0.0", "libc", @@ -1659,9 +1641,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9de88456263e249e241fcd211d3954e2c9b0ef7ccfc235a444eb367cae3689" +checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e" dependencies = [ "bytes", "fnv", @@ -1707,9 +1689,9 @@ dependencies = [ [[package]] name = "headers" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c4eb0471fcb85846d8b0690695ef354f9afb11cb03cac2e1d7c9253351afb0" +checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" dependencies = [ "base64", "bitflags", @@ -1895,7 +1877,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" dependencies = [ - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", "globset", "lazy_static", "log", @@ -1964,9 +1946,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c0c443f6dceb3a1cb7607c87501aa91e4b9c976044f725c2a74ca2152c91a4" +checksum = "30a7e1911532a662f6b08b68f884080850f2fd9544963c3ab23a5af42bda1eac" dependencies = [ "console", "once_cell", @@ -1987,9 +1969,9 @@ dependencies = [ [[package]] name = "integer-encoding" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90c11140ffea82edce8dcd74137ce9324ec24b3cf0175fc9d7e29164da9915b8" +checksum = "0e85a1509a128c855368e135cffcde7eac17d8e1083f41e2b98c58bc1a5074be" [[package]] name = "iovec" @@ -2002,9 +1984,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" [[package]] name = "is_ci" @@ -2105,9 +2087,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859" dependencies = [ "cc", "libc", @@ -2251,9 +2233,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ "mime", "unicase", @@ -2377,7 +2359,7 @@ dependencies = [ "async-lock", "crossbeam-channel", "crossbeam-epoch 0.8.2", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", "futures-util", "num_cpus", "once_cell", @@ -2464,9 +2446,9 @@ dependencies = [ [[package]] name = "ntapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" dependencies = [ "winapi 0.3.9", ] @@ -2527,12 +2509,6 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "openssl" version = "0.10.38" @@ -2725,7 +2701,7 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.10", + "redox_syscall 0.2.11", "smallvec", "winapi 0.3.9", ] @@ -2738,7 +2714,7 @@ checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.10", + "redox_syscall 0.2.11", "smallvec", "windows-sys", ] @@ -3005,7 +2981,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20afe714292d5e879d8b12740aa223c6a88f118af41870e8b6196e39a02238a8" dependencies = [ - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", "libc", "mach", "once_cell", @@ -3026,14 +3002,13 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", - "rand_hc", ] [[package]] @@ -3052,16 +3027,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.4", -] - -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core", + "getrandom 0.2.5", ] [[package]] @@ -3093,7 +3059,7 @@ checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", "lazy_static", "num_cpus", ] @@ -3106,9 +3072,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" dependencies = [ "bitflags", ] @@ -3130,8 +3096,8 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.2.4", - "redox_syscall 0.2.10", + "getrandom 0.2.5", + "redox_syscall 0.2.11", ] [[package]] @@ -3273,7 +3239,7 @@ dependencies = [ name = "router-fuzz" version = "0.0.0" dependencies = [ - "apollo-parser 0.2.3 (git+https://github.com/apollographql/apollo-rs.git?rev=21bd947e8af49b68229cc44d62f6481ed4fe5cbe)", + "apollo-parser 0.2.3", "apollo-smith", "env_logger", "libfuzzer-sys", @@ -3332,7 +3298,7 @@ dependencies = [ "base64", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.8.6", + "crossbeam-utils 0.8.7", ] [[package]] @@ -3452,9 +3418,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09d3c15d814eda1d6a836f2f2b56a6abc1446c8a34351cb3180d3db92ffe4ce" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ "bitflags", "core-foundation", @@ -3465,9 +3431,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90dd10c41c6bfc633da6e0c659bd25d31e0791e5974ac42970267d59eba87f7" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -3475,9 +3441,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "568a8e6258aa33c13358f81fd834adb854c6f7c9468520910a9b1e8fac068012" +checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" dependencies = [ "serde", ] @@ -3564,9 +3530,9 @@ checksum = "8363f19aa1f3b2fc0bc9648fdde59c1074327a6f756fdd502fb1cfeb8179323c" [[package]] name = "serde_test" -version = "1.0.135" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f822485db18894f1c1d904cae2e9769c178b3129a90d85c518ce47546c68daf" +checksum = "21675ba6f9d97711cc00eee79d8dd7d0a31e571c350fb4d8a7c78f70c0e7b0e9" dependencies = [ "serde", ] @@ -3608,15 +3574,13 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.9.8" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ - "block-buffer 0.9.0", "cfg-if 1.0.0", "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "digest", ] [[package]] @@ -3627,7 +3591,7 @@ checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.3", + "digest", ] [[package]] @@ -3871,7 +3835,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.10", + "redox_syscall 0.2.11", "remove_dir_all", "winapi 0.3.9", ] @@ -3889,9 +3853,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] @@ -3981,6 +3945,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "textwrap" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" + [[package]] name = "thiserror" version = "1.0.30" @@ -4269,9 +4239,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb284cac1883d54083a0edbdc9cabf931dfed87455f8c7266c01ece6394a43a" +checksum = "90c125fdea84614a4368fd35786b51d0682ab8d42705e061e92f0b955dea40fb" dependencies = [ "bitflags", "bytes", @@ -4327,9 +4297,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716" +checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" dependencies = [ "proc-macro2", "quote", @@ -4338,9 +4308,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23" +checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" dependencies = [ "lazy_static", "valuable", @@ -4510,9 +4480,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "unicode-width" @@ -4566,7 +4536,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.4", + "getrandom 0.2.5", "serde", ] diff --git a/apollo-router-core/src/layers/apq.rs b/apollo-router-core/src/layers/apq.rs index 1c200b1aef..4dc8914024 100644 --- a/apollo-router-core/src/layers/apq.rs +++ b/apollo-router-core/src/layers/apq.rs @@ -1,7 +1,6 @@ -use crate::{ - checkpoint::{CheckpointService, Step}, - plugin_utils, RouterRequest, RouterResponse, -}; +use std::ops::ControlFlow; + +use crate::{checkpoint::CheckpointService, plugin_utils, RouterRequest, RouterResponse}; use moka::sync::Cache; use serde::Deserialize; use serde_json_bytes::json; @@ -69,13 +68,13 @@ where "apq: graphql request doesn't match provided sha256Hash" ); } - Ok(Step::Continue(req)) + Ok(ControlFlow::Continue(req)) } (Some(apq_hash), _) => { if let Some(cached_query) = cache.get(&apq_hash) { tracing::trace!("apq: cache hit"); req.context.request.body_mut().query = Some(cached_query); - Ok(Step::Continue(req)) + Ok(ControlFlow::Continue(req)) } else { tracing::trace!("apq: cache miss"); let res = plugin_utils::RouterResponse::builder() @@ -97,10 +96,10 @@ where .build() .into(); - Ok(Step::Return(res)) + Ok(ControlFlow::Break(res)) } } - _ => Ok(Step::Continue(req)), + _ => Ok(ControlFlow::Continue(req)), } }, service, diff --git a/apollo-router-core/src/layers/ensure_query_presence.rs b/apollo-router-core/src/layers/ensure_query_presence.rs index 30dd293240..e24bd80b17 100644 --- a/apollo-router-core/src/layers/ensure_query_presence.rs +++ b/apollo-router-core/src/layers/ensure_query_presence.rs @@ -1,6 +1,7 @@ -use crate::checkpoint::{CheckpointService, Step}; +use crate::checkpoint::CheckpointService; use crate::{plugin_utils, RouterRequest, RouterResponse}; use http::StatusCode; +use std::ops::ControlFlow; use tower::{BoxError, Layer, Service}; #[derive(Default)] @@ -30,9 +31,9 @@ where .context(req.context.into()) .build() .with_status(StatusCode::BAD_REQUEST); - Ok(Step::Return(res)) + Ok(ControlFlow::Break(res)) } else { - Ok(Step::Continue(req)) + Ok(ControlFlow::Continue(req)) } }, service, diff --git a/apollo-router-core/src/layers/forbid_http_get_mutations.rs b/apollo-router-core/src/layers/forbid_http_get_mutations.rs index e6f691f14e..61c27a426b 100644 --- a/apollo-router-core/src/layers/forbid_http_get_mutations.rs +++ b/apollo-router-core/src/layers/forbid_http_get_mutations.rs @@ -1,8 +1,6 @@ -use crate::{ - checkpoint::{CheckpointService, Step}, - plugin_utils, ExecutionRequest, ExecutionResponse, -}; +use crate::{checkpoint::CheckpointService, plugin_utils, ExecutionRequest, ExecutionResponse}; use http::{Method, StatusCode}; +use std::ops::ControlFlow; use tower::{BoxError, Layer, Service}; #[derive(Default)] @@ -34,9 +32,9 @@ where .context(req.context) .build() .into(); - Ok(Step::Return(res)) + Ok(ControlFlow::Break(res)) } else { - Ok(Step::Continue(req)) + Ok(ControlFlow::Continue(req)) } }, service, diff --git a/apollo-router-core/src/services/checkpoint/async_checkpoint.rs b/apollo-router-core/src/services/checkpoint/async_checkpoint.rs index e1cc4675ce..eba56ebdde 100644 --- a/apollo-router-core/src/services/checkpoint/async_checkpoint.rs +++ b/apollo-router-core/src/services/checkpoint/async_checkpoint.rs @@ -1,6 +1,5 @@ -use super::Step; use futures::future::BoxFuture; -use std::sync::Arc; +use std::{ops::ControlFlow, sync::Arc}; use tower::{BoxError, Layer, Service, ServiceExt}; #[allow(clippy::type_complexity)] @@ -16,7 +15,7 @@ where Request, ) -> BoxFuture< 'static, - Result>::Response>, BoxError>, + Result>::Response, Request>, BoxError>, > + Send + Sync + 'static, @@ -31,13 +30,13 @@ where S::Future: Send, S::Response: Send + 'static, { - /// Create an `AsyncCheckpointLayer` from a function that takes a Service Request and returns a `Step` + /// Create an `AsyncCheckpointLayer` from a function that takes a Service Request and returns a `ControlFlow` pub fn new( checkpoint_fn: impl Fn( Request, ) -> BoxFuture< 'static, - Result>::Response>, BoxError>, + Result>::Response, Request>, BoxError>, > + Send + Sync + 'static, @@ -80,7 +79,7 @@ where Request, ) -> BoxFuture< 'static, - Result>::Response>, BoxError>, + Result>::Response, Request>, BoxError>, > + Send + Sync + 'static, @@ -95,13 +94,13 @@ where >::Response: Send + 'static, >::Future: Send + 'static, { - /// Create an `AsyncCheckpointLayer` from a function that takes a Service Request and returns a `Step` + /// Create an `AsyncCheckpointLayer` from a function that takes a Service Request and returns a `ControlFlow` pub fn new( checkpoint_fn: impl Fn( Request, ) -> BoxFuture< 'static, - Result>::Response>, BoxError>, + Result>::Response, Request>, BoxError>, > + Send + Sync + 'static, @@ -139,8 +138,8 @@ where let inner = self.inner.clone(); Box::pin(async move { match (checkpoint_fn)(req).await { - Ok(Step::Return(response)) => Ok(response), - Ok(Step::Continue(request)) => inner.oneshot(request).await, + Ok(ControlFlow::Break(response)) => Ok(response), + Ok(ControlFlow::Continue(request)) => inner.oneshot(request).await, Err(error) => Err(error), } }) @@ -176,7 +175,7 @@ mod async_checkpoint_tests { let service_stack = ServiceBuilder::new() .async_checkpoint(|req: crate::ExecutionRequest| { - Box::pin(async { Ok(Step::Continue(req)) }) + Box::pin(async { Ok(ControlFlow::Continue(req)) }) }) .service(service); @@ -212,7 +211,7 @@ mod async_checkpoint_tests { let service = router_service.build(); let service_stack = - AsyncCheckpointLayer::new(|req| Box::pin(async { Ok(Step::Continue(req)) })) + AsyncCheckpointLayer::new(|req| Box::pin(async { Ok(ControlFlow::Continue(req)) })) .layer(service); let request = ExecutionRequest::builder().build().into(); @@ -238,7 +237,7 @@ mod async_checkpoint_tests { let service_stack = AsyncCheckpointLayer::new(|_req| { Box::pin(async { - Ok(Step::Return( + Ok(ControlFlow::Break( ExecutionResponse::builder() .label("returned_before_mock_service".to_string()) .build() diff --git a/apollo-router-core/src/services/checkpoint/mod.rs b/apollo-router-core/src/services/checkpoint/mod.rs index 79c6496483..19d0d95659 100644 --- a/apollo-router-core/src/services/checkpoint/mod.rs +++ b/apollo-router-core/src/services/checkpoint/mod.rs @@ -3,18 +3,3 @@ pub mod sync_checkpoint; pub use async_checkpoint::{AsyncCheckpointLayer, AsyncCheckpointService}; pub use sync_checkpoint::{CheckpointLayer, CheckpointService}; - -/// An enum representing the next step -/// A service should follow -pub enum Step -where - Request: Send + 'static, - Response: Send + 'static, -{ - /// `CheckpointService` should - /// Continue and call the next service - /// `CheckpointService` should not call the next service. - Continue(Request), - /// Return the provided Response instead - Return(Response), -} diff --git a/apollo-router-core/src/services/checkpoint/sync_checkpoint.rs b/apollo-router-core/src/services/checkpoint/sync_checkpoint.rs index 351c5a7c99..066de7e330 100644 --- a/apollo-router-core/src/services/checkpoint/sync_checkpoint.rs +++ b/apollo-router-core/src/services/checkpoint/sync_checkpoint.rs @@ -1,6 +1,5 @@ -use super::Step; use futures::future::BoxFuture; -use std::sync::Arc; +use std::{ops::ControlFlow, sync::Arc}; use tower::{BoxError, Layer, Service}; #[allow(clippy::type_complexity)] @@ -16,7 +15,7 @@ where dyn Fn( Request, ) -> Result< - Step>::Response>, + ControlFlow<>::Response, Request>, >::Error, > + Send + Sync @@ -33,12 +32,12 @@ where S::Response: Send + 'static, >::Error: Into + Send + 'static, { - /// Create a `CheckpointLayer` from a function that takes a Service Request and returns a `Step` + /// Create a `CheckpointLayer` from a function that takes a Service Request and returns a `ControlFlow` pub fn new( checkpoint_fn: impl Fn( Request, ) -> Result< - Step>::Response>, + ControlFlow<>::Response, Request>, >::Error, > + Send + Sync @@ -83,7 +82,7 @@ where dyn Fn( Request, ) -> Result< - Step>::Response>, + ControlFlow<>::Response, Request>, >::Error, > + Send + Sync @@ -100,12 +99,12 @@ where >::Response: Send + 'static, >::Future: Send + 'static, { - /// Create a `CheckpointLayer` from a function that takes a Service Request and returns a `Step` + /// Create a `CheckpointLayer` from a function that takes a Service Request and returns a `ControlFlow` pub fn new( checkpoint_fn: impl Fn( Request, ) -> Result< - Step>::Response>, + ControlFlow<>::Response, Request>, >::Error, > + Send + Sync @@ -143,8 +142,8 @@ where fn call(&mut self, req: Request) -> Self::Future { match (self.checkpoint_fn)(req) { - Ok(Step::Return(response)) => Box::pin(async move { Ok(response) }), - Ok(Step::Continue(request)) => Box::pin(self.inner.call(request)), + Ok(ControlFlow::Break(response)) => Box::pin(async move { Ok(response) }), + Ok(ControlFlow::Continue(request)) => Box::pin(self.inner.call(request)), Err(error) => Box::pin(async move { Err(error) }), } } @@ -178,7 +177,7 @@ mod checkpoint_tests { let service = execution_service.build(); let service_stack = ServiceBuilder::new() - .checkpoint(|req: crate::ExecutionRequest| Ok(Step::Continue(req))) + .checkpoint(|req: crate::ExecutionRequest| Ok(ControlFlow::Continue(req))) .service(service); let request = ExecutionRequest::builder().build().into(); @@ -212,7 +211,8 @@ mod checkpoint_tests { let service = router_service.build(); - let service_stack = CheckpointLayer::new(|req| Ok(Step::Continue(req))).layer(service); + let service_stack = + CheckpointLayer::new(|req| Ok(ControlFlow::Continue(req))).layer(service); let request = ExecutionRequest::builder().build().into(); @@ -236,7 +236,7 @@ mod checkpoint_tests { let service = router_service.build(); let service_stack = CheckpointLayer::new(|_req| { - Ok(Step::Return( + Ok(ControlFlow::Break( ExecutionResponse::builder() .label("returned_before_mock_service".to_string()) .build() diff --git a/apollo-router-core/src/services/mod.rs b/apollo-router-core/src/services/mod.rs index 1a01841352..57140b364d 100644 --- a/apollo-router-core/src/services/mod.rs +++ b/apollo-router-core/src/services/mod.rs @@ -1,4 +1,4 @@ -pub use self::checkpoint::{AsyncCheckpointLayer, CheckpointLayer, Step}; +pub use self::checkpoint::{AsyncCheckpointLayer, CheckpointLayer}; pub use self::execution_service::*; pub use self::router_service::*; use crate::fetch::OperationKind; @@ -9,6 +9,7 @@ use moka::sync::Cache; use serde::{Deserialize, Serialize}; use static_assertions::assert_impl_all; use std::convert::Infallible; +use std::ops::ControlFlow; use std::str::FromStr; use std::sync::Arc; use tokio::sync::RwLock; @@ -199,7 +200,7 @@ pub trait ServiceBuilderExt: Sized { checkpoint_fn: impl Fn( Request, ) -> Result< - Step>::Response>, + ControlFlow<>::Response, Request>, >::Error, > + Send + Sync @@ -221,7 +222,7 @@ pub trait ServiceBuilderExt: Sized { Request, ) -> BoxFuture< 'static, - Result>::Response>, BoxError>, + Result>::Response, Request>, BoxError>, > + Send + Sync + 'static, diff --git a/examples/async-allow-client-id/src/allow_client_id_from_file.rs b/examples/async-allow-client-id/src/allow_client_id_from_file.rs index 47d6e0e082..2a512fbc84 100644 --- a/examples/async-allow-client-id/src/allow_client_id_from_file.rs +++ b/examples/async-allow-client-id/src/allow_client_id_from_file.rs @@ -1,11 +1,10 @@ use apollo_router_core::{ - checkpoint::Step, plugin_utils, register_plugin, Plugin, RouterRequest, RouterResponse, - ServiceBuilderExt, + plugin_utils, register_plugin, Plugin, RouterRequest, RouterResponse, ServiceBuilderExt, }; use http::StatusCode; use schemars::JsonSchema; use serde::Deserialize; -use std::path::PathBuf; +use std::{ops::ControlFlow, path::PathBuf}; use tower::{util::BoxService, BoxError, ServiceBuilder, ServiceExt}; // This structure is the one we'll deserialize the yml configuration into @@ -55,8 +54,8 @@ impl Plugin for AllowClientIdFromFile { // `ServiceBuilder` provides us with an `async_checkpoint` method. // - // This method allows us to return Step::Continue(request) if we want to let the request through, - // or Step::Return(response) with a crafted response if we don't want the request to go through. + // This method allows us to return ControlFlow::Continue(request) if we want to let the request through, + // or ControlFlow::Return(response) with a crafted response if we don't want the request to go through. ServiceBuilder::new() .async_checkpoint(move |req: RouterRequest| { // The http_request is stored in a `RouterRequest` context. @@ -70,7 +69,7 @@ impl Plugin for AllowClientIdFromFile { }]) .build() .with_status(StatusCode::UNAUTHORIZED); - return Box::pin(async { Ok(Step::Return(res)) }); + return Box::pin(async { Ok(ControlFlow::Break(res)) }); } // It is best practice to perform checks before we unwrap, @@ -95,7 +94,7 @@ impl Plugin for AllowClientIdFromFile { }]) .build() .with_status(StatusCode::BAD_REQUEST); - return Box::pin(async { Ok(Step::Return(res)) }); + return Box::pin(async { Ok(ControlFlow::Break(res)) }); } }; @@ -118,7 +117,7 @@ impl Plugin for AllowClientIdFromFile { .unwrap(); if allowed_clients.contains(&client_id_string) { - Ok(Step::Continue(req)) + Ok(ControlFlow::Continue(req)) } else { // Prepare an HTTP 403 response with a GraphQL error message let res = plugin_utils::RouterResponse::builder() @@ -128,13 +127,13 @@ impl Plugin for AllowClientIdFromFile { }]) .build() .with_status(StatusCode::FORBIDDEN); - Ok(Step::Return(res)) + Ok(ControlFlow::Break(res)) } }) }) // Given the async nature of our checkpoint, we need to make sure // the underlying service will be available whenever the checkpoint - // returns Step::Continue. + // returns ControlFlow::Continue. // This is achieved by adding a buffer in front of the service, // and (automatically) giving one `slot` to our async_checkpoint // diff --git a/examples/async-allow-client-id/src/main.rs b/examples/async-allow-client-id/src/main.rs index 4ee87061c5..fd60d34bd2 100644 --- a/examples/async-allow-client-id/src/main.rs +++ b/examples/async-allow-client-id/src/main.rs @@ -46,9 +46,9 @@ async fn main() -> Result<()> { let schema = SchemaKind::File { path: current_directory .parent() - .ok_or(anyhow!("no parent"))? + .ok_or_else(|| anyhow!("no parent"))? .parent() - .ok_or(anyhow!("no parent"))? + .ok_or_else(|| anyhow!("no parent"))? .join("examples/supergraph.graphql"), watch: false, delay: None, diff --git a/examples/deno-plugin/snapshots/query_runtime.snap b/examples/deno-plugin/snapshots/query_runtime.snap new file mode 100644 index 0000000000..c6525a32b6 Binary files /dev/null and b/examples/deno-plugin/snapshots/query_runtime.snap differ diff --git a/examples/forbid-anonymous-operations/src/forbid_anonymous_operations.rs b/examples/forbid-anonymous-operations/src/forbid_anonymous_operations.rs index 6c466ce236..efe762df6b 100644 --- a/examples/forbid-anonymous-operations/src/forbid_anonymous_operations.rs +++ b/examples/forbid-anonymous-operations/src/forbid_anonymous_operations.rs @@ -1,6 +1,7 @@ +use std::ops::ControlFlow; + use apollo_router_core::{ - checkpoint::Step, plugin_utils, register_plugin, Plugin, RouterRequest, RouterResponse, - ServiceBuilderExt, + plugin_utils, register_plugin, Plugin, RouterRequest, RouterResponse, ServiceBuilderExt, }; use http::StatusCode; use tower::{util::BoxService, BoxError, ServiceBuilder, ServiceExt}; @@ -30,8 +31,8 @@ impl Plugin for ForbidAnonymousOperations { ) -> BoxService { // `ServiceBuilder` provides us with a `checkpoint` method. // - // This method allows us to return Step::Continue(request) if we want to let the request through, - // or Step::Return(response) with a crafted response if we don't want the request to go through. + // This method allows us to return ControlFlow::Continue(request) if we want to let the request through, + // or ControlFlow::Return(response) with a crafted response if we don't want the request to go through. ServiceBuilder::new() .checkpoint(|req: RouterRequest| { // The http_request is stored in a `RouterRequest` context. @@ -57,11 +58,11 @@ impl Plugin for ForbidAnonymousOperations { }]) .build() .with_status(StatusCode::BAD_REQUEST); - Ok(Step::Return(res)) + Ok(ControlFlow::Break(res)) } else { // we're good to go! tracing::info!("Operation is allowed!"); - Ok(Step::Continue(req)) + Ok(ControlFlow::Continue(req)) } }) .service(service) diff --git a/licenses.html b/licenses.html index 55380463c4..06d6e0b34f 100644 --- a/licenses.html +++ b/licenses.html @@ -44,8 +44,8 @@

Third Party Licenses

Overview of licenses:

    -
  • MIT License (70)
  • -
  • Apache License 2.0 (42)
  • +
  • MIT License (68)
  • +
  • Apache License 2.0 (43)
  • BSD 3-Clause "New" or "Revised" License (7)
  • ISC License (5)
  • BSD 2-Clause "Simplified" License (2)
  • @@ -5394,13 +5394,10 @@

    Used by:

    Apache License 2.0

    Used by:

    @@ -5605,6 +5602,190 @@

    Used by:

    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + + +
  • +

    Apache License 2.0

    +

    Used by:

    + +
                                  Apache License
    +                        Version 2.0, January 2004
    +                     https://www.apache.org/licenses/
    +
    +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    +
    +1. Definitions.
    +
    +   "License" shall mean the terms and conditions for use, reproduction,
    +   and distribution as defined by Sections 1 through 9 of this document.
    +
    +   "Licensor" shall mean the copyright owner or entity authorized by
    +   the copyright owner that is granting the License.
    +
    +   "Legal Entity" shall mean the union of the acting entity and all
    +   other entities that control, are controlled by, or are under common
    +   control with that entity. For the purposes of this definition,
    +   "control" means (i) the power, direct or indirect, to cause the
    +   direction or management of such entity, whether by contract or
    +   otherwise, or (ii) ownership of fifty percent (50%) or more of the
    +   outstanding shares, or (iii) beneficial ownership of such entity.
    +
    +   "You" (or "Your") shall mean an individual or Legal Entity
    +   exercising permissions granted by this License.
    +
    +   "Source" form shall mean the preferred form for making modifications,
    +   including but not limited to software source code, documentation
    +   source, and configuration files.
    +
    +   "Object" form shall mean any form resulting from mechanical
    +   transformation or translation of a Source form, including but
    +   not limited to compiled object code, generated documentation,
    +   and conversions to other media types.
    +
    +   "Work" shall mean the work of authorship, whether in Source or
    +   Object form, made available under the License, as indicated by a
    +   copyright notice that is included in or attached to the work
    +   (an example is provided in the Appendix below).
    +
    +   "Derivative Works" shall mean any work, whether in Source or Object
    +   form, that is based on (or derived from) the Work and for which the
    +   editorial revisions, annotations, elaborations, or other modifications
    +   represent, as a whole, an original work of authorship. For the purposes
    +   of this License, Derivative Works shall not include works that remain
    +   separable from, or merely link (or bind by name) to the interfaces of,
    +   the Work and Derivative Works thereof.
    +
    +   "Contribution" shall mean any work of authorship, including
    +   the original version of the Work and any modifications or additions
    +   to that Work or Derivative Works thereof, that is intentionally
    +   submitted to Licensor for inclusion in the Work by the copyright owner
    +   or by an individual or Legal Entity authorized to submit on behalf of
    +   the copyright owner. For the purposes of this definition, "submitted"
    +   means any form of electronic, verbal, or written communication sent
    +   to the Licensor or its representatives, including but not limited to
    +   communication on electronic mailing lists, source code control systems,
    +   and issue tracking systems that are managed by, or on behalf of, the
    +   Licensor for the purpose of discussing and improving the Work, but
    +   excluding communication that is conspicuously marked or otherwise
    +   designated in writing by the copyright owner as "Not a Contribution."
    +
    +   "Contributor" shall mean Licensor and any individual or Legal Entity
    +   on behalf of whom a Contribution has been received by Licensor and
    +   subsequently incorporated within the Work.
    +
    +2. Grant of Copyright License. Subject to the terms and conditions of
    +   this License, each Contributor hereby grants to You a perpetual,
    +   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +   copyright license to reproduce, prepare Derivative Works of,
    +   publicly display, publicly perform, sublicense, and distribute the
    +   Work and such Derivative Works in Source or Object form.
    +
    +3. Grant of Patent License. Subject to the terms and conditions of
    +   this License, each Contributor hereby grants to You a perpetual,
    +   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
    +   (except as stated in this section) patent license to make, have made,
    +   use, offer to sell, sell, import, and otherwise transfer the Work,
    +   where such license applies only to those patent claims licensable
    +   by such Contributor that are necessarily infringed by their
    +   Contribution(s) alone or by combination of their Contribution(s)
    +   with the Work to which such Contribution(s) was submitted. If You
    +   institute patent litigation against any entity (including a
    +   cross-claim or counterclaim in a lawsuit) alleging that the Work
    +   or a Contribution incorporated within the Work constitutes direct
    +   or contributory patent infringement, then any patent licenses
    +   granted to You under this License for that Work shall terminate
    +   as of the date such litigation is filed.
    +
    +4. Redistribution. You may reproduce and distribute copies of the
    +   Work or Derivative Works thereof in any medium, with or without
    +   modifications, and in Source or Object form, provided that You
    +   meet the following conditions:
    +
    +   (a) You must give any other recipients of the Work or
    +       Derivative Works a copy of this License; and
    +
    +   (b) You must cause any modified files to carry prominent notices
    +       stating that You changed the files; and
    +
    +   (c) You must retain, in the Source form of any Derivative Works
    +       that You distribute, all copyright, patent, trademark, and
    +       attribution notices from the Source form of the Work,
    +       excluding those notices that do not pertain to any part of
    +       the Derivative Works; and
    +
    +   (d) If the Work includes a "NOTICE" text file as part of its
    +       distribution, then any Derivative Works that You distribute must
    +       include a readable copy of the attribution notices contained
    +       within such NOTICE file, excluding those notices that do not
    +       pertain to any part of the Derivative Works, in at least one
    +       of the following places: within a NOTICE text file distributed
    +       as part of the Derivative Works; within the Source form or
    +       documentation, if provided along with the Derivative Works; or,
    +       within a display generated by the Derivative Works, if and
    +       wherever such third-party notices normally appear. The contents
    +       of the NOTICE file are for informational purposes only and
    +       do not modify the License. You may add Your own attribution
    +       notices within Derivative Works that You distribute, alongside
    +       or as an addendum to the NOTICE text from the Work, provided
    +       that such additional attribution notices cannot be construed
    +       as modifying the License.
    +
    +   You may add Your own copyright statement to Your modifications and
    +   may provide additional or different license terms and conditions
    +   for use, reproduction, or distribution of Your modifications, or
    +   for any such Derivative Works as a whole, provided Your use,
    +   reproduction, and distribution of the Work otherwise complies with
    +   the conditions stated in this License.
    +
    +5. Submission of Contributions. Unless You explicitly state otherwise,
    +   any Contribution intentionally submitted for inclusion in the Work
    +   by You to the Licensor shall be under the terms and conditions of
    +   this License, without any additional terms or conditions.
    +   Notwithstanding the above, nothing herein shall supersede or modify
    +   the terms of any separate license agreement you may have executed
    +   with Licensor regarding such Contributions.
    +
    +6. Trademarks. This License does not grant permission to use the trade
    +   names, trademarks, service marks, or product names of the Licensor,
    +   except as required for reasonable and customary use in describing the
    +   origin of the Work and reproducing the content of the NOTICE file.
    +
    +7. Disclaimer of Warranty. Unless required by applicable law or
    +   agreed to in writing, Licensor provides the Work (and each
    +   Contributor provides its Contributions) on an "AS IS" BASIS,
    +   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    +   implied, including, without limitation, any warranties or conditions
    +   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
    +   PARTICULAR PURPOSE. You are solely responsible for determining the
    +   appropriateness of using or redistributing the Work and assume any
    +   risks associated with Your exercise of permissions under this License.
    +
    +8. Limitation of Liability. In no event and under no legal theory,
    +   whether in tort (including negligence), contract, or otherwise,
    +   unless required by applicable law (such as deliberate and grossly
    +   negligent acts) or agreed to in writing, shall any Contributor be
    +   liable to You for damages, including any direct, indirect, special,
    +   incidental, or consequential damages of any character arising as a
    +   result of this License or out of the use or inability to use the
    +   Work (including but not limited to damages for loss of goodwill,
    +   work stoppage, computer failure or malfunction, or any and all
    +   other commercial damages or losses), even if such Contributor
    +   has been advised of the possibility of such damages.
    +
    +9. Accepting Warranty or Additional Liability. While redistributing
    +   the Work or Derivative Works thereof, You may choose to offer,
    +   and charge a fee for, acceptance of support, warranty, indemnity,
    +   or other liability obligations and/or rights consistent with this
    +   License. However, in accepting such obligations, You may act only
    +   on Your own behalf and on Your sole responsibility, not on behalf
    +   of any other Contributor, and only if You agree to indemnify,
    +   defend, and hold each Contributor harmless for any liability
    +   incurred by, or claims asserted against, such Contributor by reason
    +   of your accepting any such warranty or additional liability.
    +
    +END OF TERMS AND CONDITIONS
     
  • @@ -5613,10 +5794,8 @@

    Used by:

                                  Apache License
                             Version 2.0, January 2004
    @@ -7513,6 +7692,7 @@ 

    Used by:

    -
  • -
  • -

    MIT License

    -

    Used by:

    - -
    -Copyright (c) 2010 The Rust Project Developers
    -
    -Permission is hereby granted, free of charge, to any
    -person obtaining a copy of this software and associated
    -documentation files (the "Software"), to deal in the
    -Software without restriction, including without
    -limitation the rights to use, copy, modify, merge,
    -publish, distribute, sublicense, and/or sell copies of
    -the Software, and to permit persons to whom the Software
    -is furnished to do so, subject to the following
    -conditions:
    -
    -The above copyright notice and this permission notice
    -shall be included in all copies or substantial portions
    -of the Software.
    -
    -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
    -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
    -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
    -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
    -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
    -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
    -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    -DEALINGS IN THE SOFTWARE.
     
  • @@ -9565,6 +9711,7 @@

    Used by:

    MIT License
     
    @@ -10022,35 +10169,6 @@ 

    Used by:

    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    -
  • -
  • -

    MIT License

    -

    Used by:

    - -
    The MIT License (MIT)
    -
    -Copyright (c) 2014 Mathijs van de Nes
    -
    -Permission is hereby granted, free of charge, to any person obtaining a copy
    -of this software and associated documentation files (the "Software"), to deal
    -in the Software without restriction, including without limitation the rights
    -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    -copies of the Software, and to permit persons to whom the Software is
    -furnished to do so, subject to the following conditions:
    -
    -The above copyright notice and this permission notice shall be included in all
    -copies or substantial portions of the Software.
    -
    -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    -SOFTWARE.
    -
  • MIT License