From 262317110429b40dca90320c17f302f4eeb7bf3b Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Mon, 8 Jul 2024 16:15:35 +0200 Subject: [PATCH 01/35] Added series metadata --- .../src/xml/onix3_project_muse.rs | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/thoth-export-server/src/xml/onix3_project_muse.rs b/thoth-export-server/src/xml/onix3_project_muse.rs index fabbac12..7cd7ec76 100644 --- a/thoth-export-server/src/xml/onix3_project_muse.rs +++ b/thoth-export-server/src/xml/onix3_project_muse.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use std::io::Write; use thoth_client::{ ContributionType, LanguageRelation, PublicationType, SubjectType, Work, WorkContributions, - WorkLanguages, WorkPublications, WorkStatus, WorkType, + WorkIssues, WorkLanguages, WorkPublications, WorkStatus, WorkType, }; use xml::writer::{EventWriter, XmlEvent}; @@ -158,6 +158,9 @@ impl XmlElementBlock for Work { }) })?; } + for issue in &self.issues { + XmlElementBlock::::xml_element(issue, w).ok(); + } write_element_block("TitleDetail", w, |w| { // 01 Distinctive title (book) write_element_block("TitleType", w, |w| { @@ -500,6 +503,42 @@ impl XmlElement for LanguageRelation { } } +impl XmlElementBlock for WorkIssues { + fn xml_element(&self, w: &mut EventWriter) -> ThothResult<()> { + write_element_block("Collection", w, |w| { + // 10 Publisher collection (e.g. series) + write_element_block("CollectionType", w, |w| { + w.write(XmlEvent::Characters("10")).map_err(|e| e.into()) + })?; + write_element_block("TitleDetail", w, |w| { + // 01 Cover title (serial) + write_element_block("TitleType", w, |w| { + w.write(XmlEvent::Characters("01")).map_err(|e| e.into()) + })?; + write_element_block("TitleElement", w, |w| { + // 02 Collection level + write_element_block("TitleElementLevel", w, |w| { + w.write(XmlEvent::Characters("02")).map_err(|e| e.into()) + })?; + write_element_block("SequenceNumber", w, |w| { + w.write(XmlEvent::Characters(&self.issue_ordinal.to_string())) + .map_err(|e| e.into()) + })?; + // TODO: find out if this should be included or not. + // write_element_block("PartNumber", w, |w| { + // w.write(XmlEvent::Characters(&self.issue_ordinal.to_string())) + // .map_err(|e| e.into()) + // })?; + write_element_block("TitleText", w, |w| { + w.write(XmlEvent::Characters(&self.series.series_name)) + .map_err(|e| e.into()) + }) + }) + }) + }) + } +} + impl XmlElement for ContributionType { const ELEMENT: &'static str = "ContributorRole"; @@ -966,7 +1005,7 @@ mod tests { assert!(output.contains(r#" Publisher's website: download the title"#)); assert!(output .contains(r#" https://www.book.com/pdf_fulltext"#)); - + // TODO: Fix test for Series data // Test that OAPEN-only blocks are not output in Project MUSE format assert!(!output.contains(r#" 20"#)); assert!(!output.contains(r#" keyword1"#)); From 37de4c3d9750a8052f9c80d80c89176b48a28228 Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Tue, 9 Jul 2024 16:32:10 +0200 Subject: [PATCH 02/35] Remove non-BIC and BISAC subject codes, add Audience block, add Funding block, add CopyrightStatement block, add new blocks to testing --- .../src/xml/onix3_project_muse.rs | 90 +++++++++++++------ 1 file changed, 62 insertions(+), 28 deletions(-) diff --git a/thoth-export-server/src/xml/onix3_project_muse.rs b/thoth-export-server/src/xml/onix3_project_muse.rs index 7cd7ec76..93cd3570 100644 --- a/thoth-export-server/src/xml/onix3_project_muse.rs +++ b/thoth-export-server/src/xml/onix3_project_muse.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use std::io::Write; use thoth_client::{ ContributionType, LanguageRelation, PublicationType, SubjectType, Work, WorkContributions, - WorkIssues, WorkLanguages, WorkPublications, WorkStatus, WorkType, + WorkFundings, WorkIssues, WorkLanguages, WorkPublications, WorkStatus, WorkType, }; use xml::writer::{EventWriter, XmlEvent}; @@ -207,8 +207,10 @@ impl XmlElementBlock for Work { })?; } for subject in &self.subjects { - // Project MUSE can't process records containing keywords - if subject.subject_type != SubjectType::KEYWORD { + // According to spec, Project MUSE only accepts BIC and BISAC subject codes + if subject.subject_type == SubjectType::BIC + || subject.subject_type == SubjectType::BISAC + { write_element_block("Subject", w, |w| { XmlElement::::xml_element( &subject.subject_type, @@ -221,6 +223,16 @@ impl XmlElementBlock for Work { })?; } } + write_element_block("Audience", w, |w| { + // 01 ONIX audience codes + write_element_block("AudienceCodeType", w, |w| { + w.write(XmlEvent::Characters("01")).map_err(|e| e.into()) + })?; + // 06 Professional and scholarly + write_element_block("AudienceCodeValue", w, |w| { + w.write(XmlEvent::Characters("06")).map_err(|e| e.into()) + }) + })?; Ok(()) })?; write_element_block("CollateralDetail", w, |w| { @@ -292,6 +304,9 @@ impl XmlElementBlock for Work { .map_err(|e| e.into()) }) })?; + for funding in &self.fundings { + XmlElementBlock::::xml_element(funding, w).ok(); + } if let Some(place) = &self.place { write_element_block("CityOfPublication", w, |w| { w.write(XmlEvent::Characters(place)).map_err(|e| e.into()) @@ -317,6 +332,12 @@ impl XmlElementBlock for Work { }, ) })?; + write_element_block("CopyrightStatement", w, |w| { + write_element_block("CopyrightYear", w, |w| { + w.write(XmlEvent::Characters(&date.format("%Y").to_string())) + .map_err(|e| e.into()) + }) + })?; } if let Some(date) = &self.withdrawn_date { write_element_block("PublishingDate", w, |w| { @@ -375,7 +396,7 @@ impl XmlElementBlock for Work { supplies.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -503,6 +524,22 @@ impl XmlElement for LanguageRelation { } } +impl XmlElementBlock for WorkFundings { + fn xml_element(&self, w: &mut EventWriter) -> ThothResult<()> { + write_element_block("Publisher", w, |w| { + // 16 Funding body + write_element_block("PublishingRole", w, |w| { + w.write(XmlEvent::Characters("16")).map_err(|e| e.into()) + })?; + write_element_block("PublisherName", w, |w| { + w.write(XmlEvent::Characters(&self.institution.institution_name)) + .map_err(|e| e.into()) + })?; + Ok(()) + }) + } +} + impl XmlElementBlock for WorkIssues { fn xml_element(&self, w: &mut EventWriter) -> ThothResult<()> { write_element_block("Collection", w, |w| { @@ -524,11 +561,6 @@ impl XmlElementBlock for WorkIssues { w.write(XmlEvent::Characters(&self.issue_ordinal.to_string())) .map_err(|e| e.into()) })?; - // TODO: find out if this should be included or not. - // write_element_block("PartNumber", w, |w| { - // w.write(XmlEvent::Characters(&self.issue_ordinal.to_string())) - // .map_err(|e| e.into()) - // })?; write_element_block("TitleText", w, |w| { w.write(XmlEvent::Characters(&self.series.series_name)) .map_err(|e| e.into()) @@ -953,12 +985,11 @@ mod tests { assert!(output.contains(r#" AAB"#)); assert!(output.contains(r#" 10"#)); assert!(output.contains(r#" AAA000000"#)); - assert!(output.contains(r#" 04"#)); - assert!(output.contains(r#" JA85"#)); - assert!(output.contains(r#" 93"#)); - assert!(output.contains(r#" JWA"#)); - assert!(output.contains(r#" B2"#)); - assert!(output.contains(r#" custom1"#)); + assert!(output.contains(r#" 16"#)); + assert!(output.contains(r#" Name of institution"#)); + assert!(output.contains(r#" "#)); + assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 06"#)); assert!(output.contains(r#" "#)); assert!(output.contains(r#" "#)); assert!(output.contains(r#" 03"#)); @@ -981,6 +1012,8 @@ mod tests { assert!(output.contains(r#" "#)); assert!(output.contains(r#" 01"#)); assert!(output.contains(r#" 19991231"#)); + assert!(output.contains(r#" "#)); + assert!(output.contains(r#" 1999"#)); assert!(output.contains(r#" "#)); assert!(output.contains(r#" 06"#)); assert!(output.contains(r#" "#)); @@ -992,7 +1025,7 @@ mod tests { assert!(output.contains(r#" 09"#)); assert!(output.contains(r#" OA Editions"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1005,15 +1038,21 @@ mod tests { assert!(output.contains(r#" Publisher's website: download the title"#)); assert!(output .contains(r#" https://www.book.com/pdf_fulltext"#)); - // TODO: Fix test for Series data + assert!(output.contains(r#" "#)); + assert!(output.contains(r#" 10"#)); + assert!(output.contains(r#" 02"#)); + assert!(output.contains(r#" 1"#)); + assert!(output.contains(r#" Name of series"#)); + // Test that OAPEN-only blocks are not output in Project MUSE format assert!(!output.contains(r#" 20"#)); assert!(!output.contains(r#" keyword1"#)); - assert!(!output.contains(r#" "#)); - assert!(!output.contains(r#" 01"#)); - assert!(!output.contains(r#" 06"#)); - assert!(!output.contains(r#" 16"#)); - assert!(!output.contains(r#" Name of institution"#)); + assert!(!output.contains(r#" 04"#)); + assert!(!output.contains(r#" JA85"#)); + assert!(!output.contains(r#" 93"#)); + assert!(!output.contains(r#" JWA"#)); + assert!(!output.contains(r#" B2"#)); + assert!(!output.contains(r#" custom1"#)); assert!(!output.contains(r#" "#)); assert!(!output.contains(r#" "#)); assert!(!output.contains(r#" 01"#)); @@ -1023,11 +1062,6 @@ mod tests { assert!(!output.contains(r#" Name of project"#)); assert!(!output.contains(r#" grantnumber"#)); assert!(!output.contains(r#" Number of grant"#)); - assert!(!output.contains(r#" "#)); - assert!(!output.contains(r#" 10"#)); - assert!(!output.contains(r#" 02"#)); - assert!(!output.contains(r#" 1"#)); - assert!(!output.contains(r#" Name of series"#)); // Add withdrawn_date test_work.withdrawn_date = chrono::NaiveDate::from_ymd_opt(2020, 12, 31); @@ -1090,7 +1124,7 @@ mod tests { assert!(!output.contains(r#" 01"#)); assert!(!output.contains(r#" 19991231"#)); // No landing page supplied: only one SupplyDetail block, linking to PDF download - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); From a9bfb1fba52e80d25a618d0e9912dc35c9262bff Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Tue, 9 Jul 2024 16:47:56 +0200 Subject: [PATCH 03/35] Updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91e9dec7..1a3d5045 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed + - [609](https://github.com/thoth-pub/thoth/pull/609) - Update Project MUSE ONIX 3.0 export to reflect new specifications provided by Project MUSE. ## [[0.12.6]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.6) - 2024-06-17 ### Fixed From 7ef77c50cd81eb0650ca2ddefb2dad8ba4d1de16 Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Wed, 10 Jul 2024 15:54:15 +0200 Subject: [PATCH 04/35] Fixed changelog, added logic for EditionStatement, only exclude keywords from subject export --- CHANGELOG.md | 2 +- .../src/xml/onix3_project_muse.rs | 29 ++++++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a3d5045..fa8a6726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed - - [609](https://github.com/thoth-pub/thoth/pull/609) - Update Project MUSE ONIX 3.0 export to reflect new specifications provided by Project MUSE. + - [538](https://github.com/thoth-pub/thoth/issues/538) - Update Project MUSE ONIX 3.0 export to reflect new specifications provided by Project MUSE. ## [[0.12.6]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.6) - 2024-06-17 ### Fixed diff --git a/thoth-export-server/src/xml/onix3_project_muse.rs b/thoth-export-server/src/xml/onix3_project_muse.rs index 93cd3570..432e5093 100644 --- a/thoth-export-server/src/xml/onix3_project_muse.rs +++ b/thoth-export-server/src/xml/onix3_project_muse.rs @@ -187,6 +187,29 @@ impl XmlElementBlock for Work { for contribution in &self.contributions { XmlElementBlock::::xml_element(contribution, w).ok(); } + if let Some(edition) = &self.edition { + if let Some(edition_statement) = match edition { + // Spell out commonest ordinals + 1 => Some("First edition.".to_string()), + 2 => Some("Second edition.".to_string()), + 3 => Some("Third edition.".to_string()), + _ => { + let suffix = match edition % 10 { + 1 if edition % 100 != 11 => "st", + 2 if edition % 100 != 12 => "nd", + 3 if edition % 100 != 13 => "rd", + _ => "th", + }; + Some(format!("{}{} edition.", edition, suffix)) + } + } { + write_element_block("EditionStatement", w, |w| { + w.write(XmlEvent::Characters(&edition_statement)) + .map_err(|e| e.into()) + })?; + } + } + for language in &self.languages { XmlElementBlock::::xml_element(language, w).ok(); } @@ -207,10 +230,8 @@ impl XmlElementBlock for Work { })?; } for subject in &self.subjects { - // According to spec, Project MUSE only accepts BIC and BISAC subject codes - if subject.subject_type == SubjectType::BIC - || subject.subject_type == SubjectType::BISAC - { + // Project MUSE can't process records containing keywords + if subject.subject_type != SubjectType::KEYWORD { write_element_block("Subject", w, |w| { XmlElement::::xml_element( &subject.subject_type, From 593e2400e61b3a41c98a18742bc0d43d18fcb2e7 Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Wed, 10 Jul 2024 16:06:15 +0200 Subject: [PATCH 05/35] Added EditionStatement to testing, fixed subject testing --- thoth-export-server/src/xml/onix3_project_muse.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/thoth-export-server/src/xml/onix3_project_muse.rs b/thoth-export-server/src/xml/onix3_project_muse.rs index 432e5093..669f7128 100644 --- a/thoth-export-server/src/xml/onix3_project_muse.rs +++ b/thoth-export-server/src/xml/onix3_project_muse.rs @@ -997,6 +997,7 @@ mod tests { assert!(output.contains(r#" 01"#)); assert!(output.contains(r#" Book Title"#)); assert!(output.contains(r#" Book Subtitle"#)); + assert!(output.contains(r#" First edition."#)); assert!(output.contains(r#" "#)); assert!(output.contains(r#" 00"#)); assert!(output.contains(r#" 334"#)); @@ -1006,6 +1007,12 @@ mod tests { assert!(output.contains(r#" AAB"#)); assert!(output.contains(r#" 10"#)); assert!(output.contains(r#" AAA000000"#)); + assert!(output.contains(r#" 04"#)); + assert!(output.contains(r#" JA85"#)); + assert!(output.contains(r#" 93"#)); + assert!(output.contains(r#" JWA"#)); + assert!(output.contains(r#" B2"#)); + assert!(output.contains(r#" custom1"#)); assert!(output.contains(r#" 16"#)); assert!(output.contains(r#" Name of institution"#)); assert!(output.contains(r#" "#)); @@ -1068,12 +1075,6 @@ mod tests { // Test that OAPEN-only blocks are not output in Project MUSE format assert!(!output.contains(r#" 20"#)); assert!(!output.contains(r#" keyword1"#)); - assert!(!output.contains(r#" 04"#)); - assert!(!output.contains(r#" JA85"#)); - assert!(!output.contains(r#" 93"#)); - assert!(!output.contains(r#" JWA"#)); - assert!(!output.contains(r#" B2"#)); - assert!(!output.contains(r#" custom1"#)); assert!(!output.contains(r#" "#)); assert!(!output.contains(r#" "#)); assert!(!output.contains(r#" 01"#)); From 4659556218abb12ebf5f9097b8885e8773e69c76 Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Fri, 12 Jul 2024 09:34:57 +0200 Subject: [PATCH 06/35] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa8a6726..6e81e2c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - [538](https://github.com/thoth-pub/thoth/issues/538) - Update Project MUSE ONIX 3.0 export to reflect new specifications provided by Project MUSE. +### Fixed + - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). + ## [[0.12.6]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.6) - 2024-06-17 ### Fixed - [#513](https://github.com/thoth-pub/thoth/issues/513) - Expand DOI regex to include `+`, `[`, and `]` From c74f6035a2267f05169c7f95589c3421f578c200 Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Fri, 12 Jul 2024 09:57:22 +0200 Subject: [PATCH 07/35] =?UTF-8?q?Update=20=20code=20for=20Wor?= =?UTF-8?q?k=20Landing=20Page=20in=20all=20ONIX=20exports=20(except=20Goog?= =?UTF-8?q?le=20Books=20and=20Thoth)=20from=2001=20(Publisher=E2=80=99s=20?= =?UTF-8?q?corporate=20website)=20to=2002=20(Publisher=E2=80=99s=20website?= =?UTF-8?q?=20for=20a=20specified=20work).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thoth-export-server/src/xml/onix21_ebsco_host.rs | 6 +++--- thoth-export-server/src/xml/onix21_proquest_ebrary.rs | 6 +++--- thoth-export-server/src/xml/onix3_jstor.rs | 6 +++--- thoth-export-server/src/xml/onix3_oapen.rs | 6 +++--- thoth-export-server/src/xml/onix3_overdrive.rs | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/thoth-export-server/src/xml/onix21_ebsco_host.rs b/thoth-export-server/src/xml/onix21_ebsco_host.rs index c718adb3..cf8b9ae7 100644 --- a/thoth-export-server/src/xml/onix21_ebsco_host.rs +++ b/thoth-export-server/src/xml/onix21_ebsco_host.rs @@ -201,7 +201,7 @@ impl XmlElementBlock for Work { websites.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -1028,7 +1028,7 @@ mod tests { assert!(output .contains(r#" urn:uuid:00000000-0000-0000-aaaa-000000000001"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1129,7 +1129,7 @@ mod tests { // No subtitle supplied (within Thoth UI this would automatically update full_title) assert!(!output.contains(r#" Book Subtitle"#)); // No landing page supplied - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); diff --git a/thoth-export-server/src/xml/onix21_proquest_ebrary.rs b/thoth-export-server/src/xml/onix21_proquest_ebrary.rs index edaa7266..dadc05fc 100644 --- a/thoth-export-server/src/xml/onix21_proquest_ebrary.rs +++ b/thoth-export-server/src/xml/onix21_proquest_ebrary.rs @@ -203,7 +203,7 @@ impl XmlElementBlock for Work { websites.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -1020,7 +1020,7 @@ mod tests { assert!(output .contains(r#" urn:uuid:00000000-0000-0000-aaaa-000000000001"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1118,7 +1118,7 @@ mod tests { // No subtitle supplied (within Thoth UI this would automatically update full_title) assert!(!output.contains(r#" Book Subtitle"#)); // No landing page supplied - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); diff --git a/thoth-export-server/src/xml/onix3_jstor.rs b/thoth-export-server/src/xml/onix3_jstor.rs index 60233de5..ec518211 100644 --- a/thoth-export-server/src/xml/onix3_jstor.rs +++ b/thoth-export-server/src/xml/onix3_jstor.rs @@ -366,7 +366,7 @@ impl XmlElementBlock for Work { supplies.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -958,7 +958,7 @@ mod tests { assert!(output.contains(r#" 09"#)); assert!(output.contains(r#" OA Editions"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1040,7 +1040,7 @@ mod tests { assert!(!output.contains(r#" 01"#)); assert!(!output.contains(r#" 19991231"#)); // No landing page supplied: only one SupplyDetail block, linking to PDF download - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); diff --git a/thoth-export-server/src/xml/onix3_oapen.rs b/thoth-export-server/src/xml/onix3_oapen.rs index 688f5b86..0a6cc4ac 100644 --- a/thoth-export-server/src/xml/onix3_oapen.rs +++ b/thoth-export-server/src/xml/onix3_oapen.rs @@ -362,7 +362,7 @@ impl XmlElementBlock for Work { supplies.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -1132,7 +1132,7 @@ mod tests { assert!(output.contains(r#" 09"#)); assert!(output.contains(r#" OA Editions"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1195,7 +1195,7 @@ mod tests { assert!(!output.contains(r#" 19"#)); assert!(!output.contains(r#" 1999"#)); // No landing page supplied: only one SupplyDetail block, linking to PDF download - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); diff --git a/thoth-export-server/src/xml/onix3_overdrive.rs b/thoth-export-server/src/xml/onix3_overdrive.rs index 0f90f439..57dfc764 100644 --- a/thoth-export-server/src/xml/onix3_overdrive.rs +++ b/thoth-export-server/src/xml/onix3_overdrive.rs @@ -437,7 +437,7 @@ impl XmlElementBlock for Work { supplies.insert( landing_page.to_string(), ( - "01".to_string(), + "02".to_string(), "Publisher's website: web shop".to_string(), ), ); @@ -1314,7 +1314,7 @@ mod tests { assert!(output.contains(r#" 09"#)); assert!(output.contains(r#" OA Editions"#)); assert!(output.contains(r#" "#)); - assert!(output.contains(r#" 01"#)); + assert!(output.contains(r#" 02"#)); assert!(output.contains( r#" Publisher's website: web shop"# )); @@ -1386,7 +1386,7 @@ mod tests { // No place supplied assert!(!output.contains(r#" León, Spain"#)); // No landing page supplied: only one SupplyDetail block, linking to ebook download - assert!(!output.contains(r#" 01"#)); + assert!(!output.contains(r#" 02"#)); assert!(!output.contains( r#" Publisher's website: web shop"# )); From f8edf9c4320271abf75b29c6bf81409d17b3d628 Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:14:58 +0100 Subject: [PATCH 08/35] Fix new Clippy lints under rustc 1.80.0: upgrade time, remove unused constant (also upgrade openssl/actix-web) --- Cargo.lock | 92 ++++++++++++++++++++++------------ thoth-api-server/Cargo.toml | 2 +- thoth-api/Cargo.toml | 2 +- thoth-app-server/Cargo.toml | 2 +- thoth-app/src/models/mod.rs | 1 - thoth-errors/Cargo.toml | 2 +- thoth-export-server/Cargo.toml | 2 +- 7 files changed, 64 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2297d98f..750688a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -36,16 +36,16 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d223b13fd481fc0d1f83bb12659ae774d9e3601814c68a0bc539731698cca743" +checksum = "3ae682f693a9cd7b058f2b0b5d9a6d7728a8555779bedbbc35dd88528611d020" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", "ahash", - "base64 0.21.0", + "base64 0.22.1", "bitflags 2.4.0", "brotli", "bytes", @@ -101,16 +101,17 @@ dependencies = [ [[package]] name = "actix-router" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb60846b52c118f2f04a56cc90880a274271c489b2498623d58176f8ca21fa80" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", - "firestorm", + "cfg-if 1.0.0", "http", - "log", "regex", + "regex-lite", "serde", + "tracing", ] [[package]] @@ -180,9 +181,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.5.1" +version = "4.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a6556ddebb638c2358714d853257ed226ece6023ef9364f23f0c70737ea984" +checksum = "1988c02af8d2b718c05bc4aeb6a66395b7cdf32858c2c71131e5637a8c05a9ff" dependencies = [ "actix-codec", "actix-http", @@ -209,6 +210,7 @@ dependencies = [ "once_cell", "pin-project-lite", "regex", + "regex-lite", "serde", "serde_json", "serde_urlencoded", @@ -220,9 +222,9 @@ dependencies = [ [[package]] name = "actix-web-codegen" -version = "4.2.2" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" +checksum = "f591380e2e68490b5dfaf1dd1aa0ebe78d84ba7067078512b4ea6e4492d622b8" dependencies = [ "actix-router", "proc-macro2", @@ -478,6 +480,12 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "bincode" version = "1.3.3" @@ -526,9 +534,9 @@ checksum = "cfa8873f51c92e232f9bac4065cddef41b714152812bfc5f7672ba16d6ef8cd9" [[package]] name = "brotli" -version = "3.3.3" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f838e47a451d5a8fa552371f80024dd6ace9b7acdf25c4c3d0f9bc6816fb1c39" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -537,9 +545,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.2" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -902,9 +910,12 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.8" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] [[package]] name = "derive_more" @@ -1097,12 +1108,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" -[[package]] -name = "firestorm" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3d6188b8804df28032815ea256b6955c9625c24da7525f387a7af02fbb8f01" - [[package]] name = "flate2" version = "1.0.25" @@ -2042,6 +2047,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.42" @@ -2094,9 +2105,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.4.0", "cfg-if 1.0.0", @@ -2126,9 +2137,9 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-sys" -version = "0.9.101" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -2352,6 +2363,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.16" @@ -2523,6 +2540,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" + [[package]] name = "regex-syntax" version = "0.8.2" @@ -3249,12 +3272,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.28" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -3262,16 +3287,17 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.14" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 723e8897..c661ad19 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -11,7 +11,7 @@ readme = "README.md" [dependencies] thoth-api = { version = "=0.12.6", path = "../thoth-api", features = ["backend"] } thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } -actix-web = "4.5.1" +actix-web = "4.8" actix-cors = "0.7.0" actix-identity = "0.7.1" actix-session = { version = "0.9.0", features = ["cookie-session"] } diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index 0d3950ac..66e51a10 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -17,7 +17,7 @@ backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "acti [dependencies] thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } -actix-web = { version = "4.5.1", optional = true } +actix-web = { version = "4.8", optional = true } argon2rs = "0.2.5" isbn2 = "0.4.0" chrono = { version = "0.4.31", features = ["serde"] } diff --git a/thoth-app-server/Cargo.toml b/thoth-app-server/Cargo.toml index 7f811767..03afcd20 100644 --- a/thoth-app-server/Cargo.toml +++ b/thoth-app-server/Cargo.toml @@ -10,7 +10,7 @@ readme = "README.md" build = "build.rs" [dependencies] -actix-web = "4.5.1" +actix-web = "4.8" actix-cors = "0.7.0" env_logger = "0.11.2" diff --git a/thoth-app/src/models/mod.rs b/thoth-app/src/models/mod.rs index f1dfebbc..73a30113 100644 --- a/thoth-app/src/models/mod.rs +++ b/thoth-app/src/models/mod.rs @@ -118,7 +118,6 @@ pub trait Dropdown { } pub trait ListString { - const BULLET_SEPARATOR: &'static str = " • "; const COMMA_SEPARATOR: &'static str = ", "; fn separated_list_item_comma(&self) -> Html { diff --git a/thoth-errors/Cargo.toml b/thoth-errors/Cargo.toml index ec38e51f..9d0e134a 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -17,7 +17,7 @@ uuid = { package = "uuid", version = "0.8.2", features = ["serde", "v4"] } yewtil = { version = "0.4.0", features = ["fetch"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -actix-web = "4.5.1" +actix-web = "4.8" dialoguer = { version = "0.11.0", features = ["password"] } diesel = "2.1.3" csv = "1.3.0" diff --git a/thoth-export-server/Cargo.toml b/thoth-export-server/Cargo.toml index d5af23e6..d29139e4 100644 --- a/thoth-export-server/Cargo.toml +++ b/thoth-export-server/Cargo.toml @@ -13,7 +13,7 @@ build = "build.rs" thoth-api = { version = "=0.12.6", path = "../thoth-api" } thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } thoth-client = { version = "=0.12.6", path = "../thoth-client" } -actix-web = "4.5.1" +actix-web = "4.8" actix-cors = "0.7.0" cc_license = "0.1.0" chrono = { version = "0.4.31", features = ["serde"] } From 92eeb3090d68b8e5cd27ca698a9a9e50723a5667 Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:21:36 +0100 Subject: [PATCH 09/35] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e81e2c6..48008741 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed - [538](https://github.com/thoth-pub/thoth/issues/538) - Update Project MUSE ONIX 3.0 export to reflect new specifications provided by Project MUSE. + - [616](https://github.com/thoth-pub/thoth/pull/616) - Removed unused constant to comply with [`rustc 1.80.0`](https://github.com/rust-lang/rust/releases/tag/1.80.0) + - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `time` to v0.3.36 + - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `actix-web` to v4.8 + - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `openssl` to v0.10.66 ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). From 654dad449954dfe0cd23ecacae9a2f382454b415 Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:28:29 +0100 Subject: [PATCH 10/35] Add new audiobook publication types WAV and MP3 (including migrations) --- CHANGELOG.md | 1 + thoth-api/migrations/v0.12.7/down.sql | 33 ++++++++++++++++++++++ thoth-api/migrations/v0.12.7/up.sql | 2 ++ thoth-api/src/model/publication/mod.rs | 17 +++++++++++ thoth-client/src/queries.rs | 2 ++ thoth-export-server/src/xml/onix3_thoth.rs | 17 +++++++++++ 6 files changed, 72 insertions(+) create mode 100644 thoth-api/migrations/v0.12.7/down.sql create mode 100644 thoth-api/migrations/v0.12.7/up.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 48008741..a7327947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `time` to v0.3.36 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `actix-web` to v4.8 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `openssl` to v0.10.66 + - [617](https://github.com/thoth-pub/thoth/issues/617) - Update publication types to include audiobook formats (MP3 and WAV) ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). diff --git a/thoth-api/migrations/v0.12.7/down.sql b/thoth-api/migrations/v0.12.7/down.sql new file mode 100644 index 00000000..49c63186 --- /dev/null +++ b/thoth-api/migrations/v0.12.7/down.sql @@ -0,0 +1,33 @@ +-- We cannot drop individual enum values - we must drop the type and recreate it + +-- Drop constraints, otherwise it won't be able to cast to text +ALTER TABLE publication + DROP CONSTRAINT IF EXISTS publication_publication_type_work_id_uniq, + DROP CONSTRAINT IF EXISTS publication_non_physical_no_dimensions; + +-- Delete publications with about-to-be-dropped types +DELETE FROM publication WHERE publication_type IN ('MP3', 'WAV'); +ALTER TABLE publication ALTER COLUMN publication_type TYPE text; +DROP TYPE publication_type; +CREATE TYPE publication_type AS ENUM ( + 'Paperback', + 'Hardback', + 'PDF', + 'HTML', + 'XML', + 'Epub', + 'Mobi', + 'AZW3', + 'DOCX', + 'FictionBook' +); +ALTER TABLE publication ALTER COLUMN publication_type TYPE publication_type USING publication_type::publication_type; + +ALTER TABLE publication + ADD CONSTRAINT publication_publication_type_work_id_uniq UNIQUE (publication_type, work_id), + ADD CONSTRAINT publication_non_physical_no_dimensions CHECK + ((width_mm IS NULL AND width_in IS NULL + AND height_mm IS NULL AND height_in IS NULL + AND depth_mm IS NULL AND depth_in IS NULL + AND weight_g IS NULL AND weight_oz IS NULL) + OR publication_type = 'Paperback' OR publication_type = 'Hardback'); diff --git a/thoth-api/migrations/v0.12.7/up.sql b/thoth-api/migrations/v0.12.7/up.sql new file mode 100644 index 00000000..47dc3682 --- /dev/null +++ b/thoth-api/migrations/v0.12.7/up.sql @@ -0,0 +1,2 @@ +ALTER TYPE publication_type ADD VALUE IF NOT EXISTS 'MP3'; +ALTER TYPE publication_type ADD VALUE IF NOT EXISTS 'WAV'; diff --git a/thoth-api/src/model/publication/mod.rs b/thoth-api/src/model/publication/mod.rs index f987e683..75c2b5c4 100644 --- a/thoth-api/src/model/publication/mod.rs +++ b/thoth-api/src/model/publication/mod.rs @@ -49,6 +49,12 @@ pub enum PublicationType { Docx, #[cfg_attr(feature = "backend", db_rename = "FictionBook")] FictionBook, + #[cfg_attr(feature = "backend", db_rename = "MP3")] + #[strum(serialize = "MP3")] + Mp3, + #[cfg_attr(feature = "backend", db_rename = "WAV")] + #[strum(serialize = "WAV")] + Wav, } #[cfg_attr( @@ -636,6 +642,8 @@ fn test_publicationtype_display() { assert_eq!(format!("{}", PublicationType::Azw3), "AZW3"); assert_eq!(format!("{}", PublicationType::Docx), "DOCX"); assert_eq!(format!("{}", PublicationType::FictionBook), "FictionBook"); + assert_eq!(format!("{}", PublicationType::Mp3), "MP3"); + assert_eq!(format!("{}", PublicationType::Wav), "WAV"); } #[test] @@ -700,6 +708,15 @@ fn test_publicationtype_fromstr() { PublicationType::FictionBook ); + assert_eq!( + PublicationType::from_str("MP3").unwrap(), + PublicationType::Mp3 + ); + assert_eq!( + PublicationType::from_str("WAV").unwrap(), + PublicationType::Wav + ); + assert!(PublicationType::from_str("PNG").is_err()); assert!(PublicationType::from_str("Latex").is_err()); assert!(PublicationType::from_str("azw3").is_err()); diff --git a/thoth-client/src/queries.rs b/thoth-client/src/queries.rs index b99c25b6..f5dbe196 100644 --- a/thoth-client/src/queries.rs +++ b/thoth-client/src/queries.rs @@ -121,6 +121,8 @@ impl From for PublicationType { work_query::PublicationType::AZW3 => PublicationType::Azw3, work_query::PublicationType::DOCX => PublicationType::Docx, work_query::PublicationType::FICTION_BOOK => PublicationType::FictionBook, + work_query::PublicationType::MP3 => PublicationType::Mp3, + work_query::PublicationType::WAV => PublicationType::Wav, work_query::PublicationType::Other(_) => unreachable!(), } } diff --git a/thoth-export-server/src/xml/onix3_thoth.rs b/thoth-export-server/src/xml/onix3_thoth.rs index 3061de7b..992cc5f8 100644 --- a/thoth-export-server/src/xml/onix3_thoth.rs +++ b/thoth-export-server/src/xml/onix3_thoth.rs @@ -990,6 +990,9 @@ fn get_product_form_codes(publication_type: &PublicationType) -> (&str, Option<& PublicationType::DOCX => ("EB", Some("E104")), // E100 "not yet allocated" - no codelist entry for .fb2, .fb3, .fbz PublicationType::FICTION_BOOK => ("EB", Some("E100")), + // AN Downloadable and online audio file + PublicationType::MP3 => ("AN", Some("A103")), + PublicationType::WAV => ("AN", Some("A104")), PublicationType::Other(_) => unreachable!(), } } @@ -2950,6 +2953,20 @@ mod tests { r#" EB E100"# + )); + test_work.publications[0].publication_type = PublicationType::MP3; + let output = generate_test_output(true, &test_work); + assert!(output.contains( + r#" + AN + A103"# + )); + test_work.publications[0].publication_type = PublicationType::WAV; + let output = generate_test_output(true, &test_work); + assert!(output.contains( + r#" + AN + A104"# )); test_work.publications[0].publication_type = PublicationType::PAPERBACK; From f2801fe3ca8d7b70d9e8b781e039871177c32a2f Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:04:30 +0100 Subject: [PATCH 11/35] Missed some instances --- thoth-api/src/model/publication/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/thoth-api/src/model/publication/mod.rs b/thoth-api/src/model/publication/mod.rs index 75c2b5c4..8865353f 100644 --- a/thoth-api/src/model/publication/mod.rs +++ b/thoth-api/src/model/publication/mod.rs @@ -471,8 +471,10 @@ fn test_publicationproperties_type() { PublicationType::FictionBook, PublicationType::Html, PublicationType::Mobi, + PublicationType::Mp3, PublicationType::Pdf, PublicationType::Xml, + PublicationType::Wav, ] { publication.publication_type = pub_type; assert!(!publication.publication_type.is_physical()); From c1558750160f2e2965a4d71387db044cc4061aff Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:44:38 +0100 Subject: [PATCH 12/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48008741..19dabadb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `time` to v0.3.36 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `actix-web` to v4.8 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `openssl` to v0.10.66 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade juniper to v0.16.1 ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). From 296a1be7884dfce5b03dd55c2c7cb956feba69b9 Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:52:00 +0100 Subject: [PATCH 13/35] Upgrade Juniper to v0.16.1 and fix compiler errors --- CHANGELOG.md | 1 + Cargo.lock | 215 +--- thoth-api-server/Cargo.toml | 2 +- thoth-api-server/src/lib.rs | 2 +- thoth-api/Cargo.toml | 4 +- thoth-api/src/graphql/model.rs | 1821 +++++++++++++++------------- thoth-api/src/model/mod.rs | 15 +- thoth-api/src/model/series/crud.rs | 2 +- thoth-api/src/model/work/crud.rs | 2 +- thoth-app/Cargo.toml | 2 +- thoth-client/Cargo.toml | 6 +- thoth-client/build.rs | 2 +- thoth-client/src/queries.rs | 4 + thoth-errors/Cargo.toml | 4 +- thoth-export-server/Cargo.toml | 4 +- 15 files changed, 1054 insertions(+), 1032 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19dabadb..8628e4fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `actix-web` to v4.8 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `openssl` to v0.10.66 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade juniper to v0.16.1 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade uuid to v1.10.0 ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). diff --git a/Cargo.lock b/Cargo.lock index 750688a9..e3495fa2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -64,7 +64,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand 0.8.5", + "rand", "sha1", "smallvec", "tokio", @@ -289,7 +289,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if 1.0.0", - "getrandom 0.2.10", + "getrandom", "once_cell", "version_check", ] @@ -447,6 +447,18 @@ dependencies = [ "syn 1.0.107", ] +[[package]] +name = "auto_enums" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1899bfcfd9340ceea3533ea157360ba8fa864354eccbceab58e1006ecab35393" +dependencies = [ + "derive_utils", + "proc-macro2", + "quote", + "syn 2.0.31", +] + [[package]] name = "autocfg" version = "1.0.0" @@ -553,23 +565,6 @@ dependencies = [ "alloc-stdlib", ] -[[package]] -name = "bson" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0aa578035b938855a710ba58d43cfb4d435f3619f99236fb35922a574d6cb1" -dependencies = [ - "base64 0.13.0", - "chrono", - "hex", - "lazy_static", - "linked-hash-map", - "rand 0.7.3", - "serde", - "serde_json", - "uuid", -] - [[package]] name = "bumpalo" version = "3.12.0" @@ -597,15 +592,6 @@ dependencies = [ "bytes", ] -[[package]] -name = "c2-chacha" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" -dependencies = [ - "ppv-lite86", -] - [[package]] name = "cargo-husky" version = "1.5.0" @@ -650,9 +636,9 @@ checksum = "8100e46ff92eb85bf6dc2930c73f2a4f7176393c84a9446b3d501e1b354e7b34" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -660,7 +646,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.0", + "windows-targets 0.52.3", ] [[package]] @@ -783,7 +769,7 @@ dependencies = [ "hkdf", "hmac", "percent-encoding", - "rand 0.8.5", + "rand", "sha2", "subtle", "time", @@ -931,13 +917,13 @@ dependencies = [ [[package]] name = "derive_utils" -version = "0.11.2" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532b4c15dccee12c7044f1fcad956e98410860b22231e44a3b827464797ca7bf" +checksum = "61bb5a1014ce6dfc2a378578509abe775a5aa06bff584a547555d9efdb81b926" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.31", ] [[package]] @@ -1180,17 +1166,6 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" -[[package]] -name = "futures-enum" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3422d14de7903a52e9dbc10ae05a7e14445ec61890100e098754e120b2bd7b1e" -dependencies = [ - "derive_utils", - "quote", - "syn 1.0.107", -] - [[package]] name = "futures-executor" version = "0.3.29" @@ -1259,17 +1234,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.10" @@ -1279,7 +1243,7 @@ dependencies = [ "cfg-if 1.0.0", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -1488,16 +1452,6 @@ dependencies = [ "serde", ] -[[package]] -name = "graphql-parser" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1abd4ce5247dfc04a03ccde70f87a048458c9356c7e41d21ad8c407b3dde6f2" -dependencies = [ - "combine", - "thiserror", -] - [[package]] name = "graphql-parser" version = "0.4.0" @@ -1510,9 +1464,9 @@ dependencies = [ [[package]] name = "graphql_client" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cdf7b487d864c2939b23902291a5041bc4a84418268f25fda1c8d4e15ad8fa" +checksum = "a50cfdc7f34b7f01909d55c2dcb71d4c13cbcbb4a1605d6c8bd760d654c1144b" dependencies = [ "graphql_query_derive", "serde", @@ -1521,12 +1475,12 @@ dependencies = [ [[package]] name = "graphql_client_codegen" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40f793251171991c4eb75bd84bc640afa8b68ff6907bc89d3b712a22f700506" +checksum = "5e27ed0c2cf0c0cc52c6bcf3b45c907f433015e580879d14005386251842fb0a" dependencies = [ "graphql-introspection-query", - "graphql-parser 0.4.0", + "graphql-parser", "heck", "lazy_static", "proc-macro2", @@ -1538,9 +1492,9 @@ dependencies = [ [[package]] name = "graphql_query_derive" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bda454f3d313f909298f626115092d348bc231025699f557b27e248475f48c" +checksum = "83febfa838f898cfa73dfaa7a8eb69ff3409021ac06ee94cfb3d622f6eeb1a97" dependencies = [ "graphql_client_codegen", "proc-macro2", @@ -1593,12 +1547,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - [[package]] name = "hkdf" version = "0.12.3" @@ -1737,7 +1685,6 @@ checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde", ] [[package]] @@ -1748,6 +1695,7 @@ checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown 0.14.3", + "serde", ] [[package]] @@ -1820,36 +1768,35 @@ dependencies = [ [[package]] name = "juniper" -version = "0.15.12" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875dca5a0c08b1521e1bb0ed940e9955a9f38971008aaa2a9f64a2ac6b59e1b5" +checksum = "943306315b1a7a03d27af9dfb0c288d9f4da8830c17df4bceb7d50a47da0982c" dependencies = [ "async-trait", - "bson", + "auto_enums", "chrono", "fnv", "futures", - "futures-enum", - "graphql-parser 0.3.0", - "indexmap 1.9.2", + "graphql-parser", + "indexmap 2.2.3", "juniper_codegen", "serde", "smartstring", "static_assertions", - "url", "uuid", + "void", ] [[package]] name = "juniper_codegen" -version = "0.15.9" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee97671061ad50301ba077d054d295e01d31a1868fbd07902db651f987e71db" +checksum = "760dbe46660494d469023d661e8d268f413b2cb68c999975dcc237407096a693" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.31", + "url", ] [[package]] @@ -1879,12 +1826,6 @@ dependencies = [ "cc", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.13" @@ -2008,7 +1949,7 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -2308,7 +2249,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" dependencies = [ "phf_shared", - "rand 0.8.5", + "rand", ] [[package]] @@ -2437,19 +2378,6 @@ dependencies = [ "scheduled-thread-pool", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.1", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -2457,18 +2385,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" -dependencies = [ - "c2-chacha", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -2478,16 +2396,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -2496,16 +2405,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.10", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -2616,7 +2516,7 @@ dependencies = [ "async-trait", "chrono", "futures", - "getrandom 0.2.10", + "getrandom", "http", "hyper", "parking_lot 0.11.2", @@ -2637,7 +2537,7 @@ checksum = "17dd00bff1d737c40dbcd47d4375281bf4c17933f9eef0a185fc7bacca23ecbd" dependencies = [ "anyhow", "chrono", - "rand 0.8.5", + "rand", ] [[package]] @@ -2648,7 +2548,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if 1.0.0", - "getrandom 0.2.10", + "getrandom", "libc", "spin", "untrusted", @@ -2811,7 +2711,6 @@ version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" dependencies = [ - "indexmap 1.9.2", "itoa", "ryu", "serde", @@ -3142,7 +3041,7 @@ dependencies = [ "juniper", "lazy_static", "phf", - "rand 0.8.5", + "rand", "regex", "serde", "serde_derive", @@ -3175,7 +3074,7 @@ dependencies = [ "anyhow", "chrono", "dotenv", - "getrandom 0.2.10", + "getrandom", "gloo-storage 0.3.0", "gloo-timers 0.3.0", "log", @@ -3516,11 +3415,11 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "0.8.2" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ - "getrandom 0.2.10", + "getrandom", "serde", ] @@ -3552,12 +3451,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index c661ad19..32b015cd 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -16,6 +16,6 @@ actix-cors = "0.7.0" actix-identity = "0.7.1" actix-session = { version = "0.9.0", features = ["cookie-session"] } env_logger = "0.11.2" -juniper = "0.15.12" +juniper = "0.16.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/thoth-api-server/src/lib.rs b/thoth-api-server/src/lib.rs index 04d16ed7..a6c2d174 100644 --- a/thoth-api-server/src/lib.rs +++ b/thoth-api-server/src/lib.rs @@ -86,7 +86,7 @@ async fn graphql_index(config: Data) -> HttpResponse { #[get("/schema.graphql")] async fn graphql_schema(st: Data>) -> HttpResponse { - HttpResponse::Ok().body(st.as_schema_language()) + HttpResponse::Ok().body(st.as_sdl()) } #[post("/graphql")] diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index 66e51a10..8c3b0853 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -28,7 +28,7 @@ diesel_migrations = { version = "2.1.0", features = ["postgres"], optional = tru dotenv = "0.15.0" futures = { version = "0.3.29", optional = true } jsonwebtoken = { version = "9.2.0", optional = true } -juniper = "0.15.12" +juniper = { version = "0.16.1", features = ["chrono", "schema-language", "uuid"] } lazy_static = "1.4.0" phf = { version = "0.11", features = ["macros"] } rand = "0.8.5" @@ -37,7 +37,7 @@ serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0" serde_json = "1.0" strum = { version = "0.26.1", features = ["derive"] } -uuid = { version = "0.8.2", features = ["serde", "v4"] } +uuid = { version = "1.10.0", features = ["serde", "v4"] } [dev-dependencies] cargo-husky = { version = "1.5.0", default-features = false, features = ["prepush-hook", "run-cargo-check", "run-cargo-test", "run-cargo-clippy", "run-cargo-fmt"] } diff --git a/thoth-api/src/graphql/model.rs b/thoth-api/src/graphql/model.rs index e17fcf44..96619e51 100644 --- a/thoth-api/src/graphql/model.rs +++ b/thoth-api/src/graphql/model.rs @@ -114,52 +114,52 @@ pub struct QueryRoot; #[juniper::graphql_object(Context = Context)] impl QueryRoot { #[graphql( - description="Query the full list of works", - arguments( - limit( + description="Query the full list of works" + )] + fn works( + context: &Context, + #[graphql( default = 100, description = "The number of items to return" - ), - offset( + )] + limit: i32, + #[graphql( default = 0, description = "The number of items to skip" - ), - filter( + )] + offset: i32, + #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" - ), - order( + )] + filter: String, + #[graphql( default = WorkOrderBy::default(), - description = "The order in which to sort the results", - ), - publishers( + description = "The order in which to sort the results" + )] + order: WorkOrderBy, + #[graphql( default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - work_types( + description = "If set, only shows results connected to publishers with these IDs" + )] + publishers: Vec, + #[graphql( default = vec![], description = "Specific types to filter by", - ), - work_status(description = "(deprecated) A specific status to filter by"), - work_statuses( - default = vec![], - description = "Specific statuses to filter by" - ), - updated_at_with_relations( - description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" - ), - ) - )] - fn works( - context: &Context, - limit: i32, - offset: i32, - filter: String, - order: WorkOrderBy, - publishers: Vec, + )] work_types: Vec, + #[graphql( + description = "(deprecated) A specific status to filter by" + )] work_status: Option, + #[graphql( + default = vec![], + description = "Specific statuses to filter by" + )] work_statuses: Vec, + #[graphql( + description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" + )] updated_at_with_relations: Option, ) -> FieldResult> { let mut statuses = work_statuses; @@ -194,36 +194,36 @@ impl QueryRoot { #[graphql( description = "Get the total number of works", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - work_types( - default = vec![], - description = "Specific types to filter by", - ), - work_status(description = "(deprecated) A specific status to filter by"), - work_statuses( - default = vec![], - description = "Specific statuses to filter by" - ), - updated_at_with_relations( - description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" - ), - ) )] fn work_count( context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page", + )] filter: String, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs", + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] work_types: Vec, + #[graphql( + description = "(deprecated) A specific status to filter by" + )] work_status: Option, + #[graphql( + default = vec![], + description = "Specific statuses to filter by" + )] work_statuses: Vec, + #[graphql( + description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" + )] updated_at_with_relations: Option, ) -> FieldResult { let mut statuses = work_statuses; @@ -243,46 +243,46 @@ impl QueryRoot { #[graphql( description="Query the full list of books (a subset of the full list of works)", - arguments( - limit( - default = 100, - description = "The number of items to return" - ), - offset( - default = 0, - description = "The number of items to skip" - ), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" - ), - order( - default = WorkOrderBy::default(), - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - work_status(description = "(deprecated) A specific status to filter by"), - work_statuses( - default = vec![], - description = "Specific statuses to filter by" - ), - updated_at_with_relations( - description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" - ), - ) )] fn books( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" + )] filter: String, + #[graphql( + default = WorkOrderBy::default(), + description = "The order in which to sort the results" + )] order: WorkOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + description = "(deprecated) A specific status to filter by" + )] work_status: Option, + #[graphql( + default = vec![], + description = "Specific statuses to filter by" + )] work_statuses: Vec, + #[graphql( + description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" + )] updated_at_with_relations: Option, ) -> FieldResult> { let mut statuses = work_statuses; @@ -327,31 +327,31 @@ impl QueryRoot { #[graphql( description = "Get the total number of books (a subset of the total number of works)", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - work_status(description = "(deprecated) A specific status to filter by"), - work_statuses( - default = vec![], - description = "Specific statuses to filter by" - ), - updated_at_with_relations( - description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" - ), - ) )] fn book_count( context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" + )] filter: String, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + description = "(deprecated) A specific status to filter by" + )] work_status: Option, + #[graphql( + default = vec![], + description = "Specific statuses to filter by" + )] work_statuses: Vec, + #[graphql( + description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" + )] updated_at_with_relations: Option, ) -> FieldResult { let mut statuses = work_statuses; @@ -376,46 +376,46 @@ impl QueryRoot { #[graphql( description="Query the full list of chapters (a subset of the full list of works)", - arguments( - limit( - default = 100, - description = "The number of items to return" - ), - offset( - default = 0, - description = "The number of items to skip" - ), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" - ), - order( - default = WorkOrderBy::default(), - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - work_status(description = "(deprecated) A specific status to filter by"), - work_statuses( - default = vec![], - description = "Specific statuses to filter by" - ), - updated_at_with_relations( - description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" - ), - ) )] fn chapters( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" + )] filter: String, + #[graphql( + default = WorkOrderBy::default(), + description = "The order in which to sort the results" + )] order: WorkOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + description = "(deprecated) A specific status to filter by" + )] work_status: Option, + #[graphql( + default = vec![], + description = "Specific statuses to filter by" + )] work_statuses: Vec, + #[graphql( + description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" + )] updated_at_with_relations: Option, ) -> FieldResult> { let mut statuses = work_statuses; @@ -445,31 +445,31 @@ impl QueryRoot { #[graphql( description = "Get the total number of chapters (a subset of the total number of works)", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - work_status(description = "(deprecated) A specific status to filter by"), - work_statuses( - default = vec![], - description = "Specific statuses to filter by" - ), - updated_at_with_relations( - description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" - ), - ) )] fn chapter_count( context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" + )] filter: String, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + description = "(deprecated) A specific status to filter by" + )] work_status: Option, + #[graphql( + default = vec![], + description = "Specific statuses to filter by" + )] work_statuses: Vec, + #[graphql( + description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" + )] updated_at_with_relations: Option, ) -> FieldResult { let mut statuses = work_statuses; @@ -489,34 +489,38 @@ impl QueryRoot { #[graphql( description = "Query the full list of publications", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" - ), - order( - default = PublicationOrderBy::default(), - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - publication_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] fn publications( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" + )] filter: String, + #[graphql( + default = PublicationOrderBy::default(), + description = "The order in which to sort the results" + )] order: PublicationOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] publication_types: Vec, ) -> FieldResult> { Publication::all( @@ -542,25 +546,23 @@ impl QueryRoot { #[graphql( description = "Get the total number of publications", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - publication_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] fn publication_count( context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" + )] filter: String, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] publication_types: Vec, ) -> FieldResult { Publication::count( @@ -575,37 +577,34 @@ impl QueryRoot { } #[graphql( - description="Query the full list of publishers", - arguments( - limit( + description="Query the full list of publishers", + )] + fn publishers( + context: &Context, + #[graphql( default = 100, description = "The number of items to return" - ), - offset( + )] + limit: i32, + #[graphql( default = 0, description = "The number of items to skip" - ), - filter( + )] + offset: i32, + #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on publisher_name and publisher_shortname" - - ), - order( - default = PublisherOrderBy::default(), - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - ) - )] - fn publishers( - context: &Context, - limit: i32, - offset: i32, + )] filter: String, + #[graphql( + default = PublisherOrderBy::default(), + description = "The order in which to sort the results" + )] order: PublisherOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, ) -> FieldResult> { Publisher::all( @@ -631,20 +630,18 @@ impl QueryRoot { #[graphql( description = "Get the total number of publishers", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on publisher_name and publisher_shortname", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - ) )] fn publisher_count( context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on publisher_name and publisher_shortname" + )] filter: String, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, ) -> FieldResult { Publisher::count(&context.db, Some(filter), publishers, vec![], vec![], None) @@ -653,29 +650,33 @@ impl QueryRoot { #[graphql( description = "Query the full list of imprints", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" - ), - order( - default = ImprintOrderBy::default(), - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - ) )] fn imprints( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" + )] filter: String, + #[graphql( + default = ImprintOrderBy::default(), + description = "The order in which to sort the results" + )] order: ImprintOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, ) -> FieldResult> { Imprint::all( @@ -701,42 +702,48 @@ impl QueryRoot { #[graphql( description = "Get the total number of imprints", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - ) )] - fn imprint_count(context: &Context, filter: String, publishers: Vec) -> FieldResult { + fn imprint_count( + context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" + )] + filter: String, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] + publishers: Vec + ) -> FieldResult { Imprint::count(&context.db, Some(filter), publishers, vec![], vec![], None) .map_err(|e| e.into()) } #[graphql( description = "Query the full list of contributors", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid" - ), - order( - default = ContributorOrderBy::default(), - description = "The order in which to sort the results", - ), - ) )] fn contributors( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid" + )] filter: String, + #[graphql( + default = ContributorOrderBy::default(), + description = "The order in which to sort the results" + )] order: ContributorOrderBy, ) -> FieldResult> { Contributor::all( @@ -762,48 +769,53 @@ impl QueryRoot { #[graphql( description = "Get the total number of contributors", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid", - ), - ) )] - fn contributor_count(context: &Context, filter: String) -> FieldResult { + fn contributor_count( + context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid" + )] + filter: String + ) -> FieldResult { Contributor::count(&context.db, Some(filter), vec![], vec![], vec![], None) .map_err(|e| e.into()) } #[graphql( description = "Query the full list of contributions", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - ContributionOrderBy { - field: ContributionField::ContributionType, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - contribution_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] fn contributions( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + ContributionOrderBy { + field: ContributionField::ContributionType, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: ContributionOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] contribution_types: Vec, ) -> FieldResult> { Contribution::all( @@ -827,16 +839,13 @@ impl QueryRoot { Contribution::from_id(&context.db, &contribution_id).map_err(|e| e.into()) } - #[graphql(description = "Get the total number of contributions", - arguments( - contribution_types( - default = vec![], - description = "Specific types to filter by", - ), - ) - )] + #[graphql(description = "Get the total number of contributions")] fn contribution_count( context: &Context, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] contribution_types: Vec, ) -> FieldResult { Contribution::count(&context.db, None, vec![], contribution_types, vec![], None) @@ -845,34 +854,38 @@ impl QueryRoot { #[graphql( description = "Query the full list of series", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on series_name, issn_print, issn_digital, series_url and series_description" - ), - order( - default = SeriesOrderBy::default(), - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - series_types( - default = vec![], - description = "Specific types to filter by", - ), - ), )] fn serieses( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on series_name, issn_print, issn_digital, series_url and series_description" + )] filter: String, + #[graphql( + default = SeriesOrderBy::default(), + description = "The order in which to sort the results" + )] order: SeriesOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] series_types: Vec, ) -> FieldResult> { Series::all( @@ -898,25 +911,23 @@ impl QueryRoot { #[graphql( description = "Get the total number of series", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on series_name, issn_print, issn_digital, series_url and series_description", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - series_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] fn series_count( context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on series_name, issn_print, issn_digital, series_url and series_description" + )] filter: String, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] series_types: Vec, ) -> FieldResult { Series::count( @@ -932,29 +943,33 @@ impl QueryRoot { #[graphql( description = "Query the full list of issues", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - IssueOrderBy { - field: IssueField::IssueOrdinal, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - ) )] fn issues( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + IssueOrderBy { + field: IssueField::IssueOrdinal, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: IssueOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, ) -> FieldResult> { Issue::all( @@ -985,41 +1000,47 @@ impl QueryRoot { #[graphql( description = "Query the full list of languages", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - LanguageOrderBy { - field: LanguageField::LanguageCode, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - language_codes( - default = vec![], - description = "Specific languages to filter by", - ), - language_relation(description = "(deprecated) A specific relation to filter by"), - language_relations( - default = vec![], - description = "Specific relations to filter by", - ), - ) )] fn languages( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + LanguageOrderBy { + field: LanguageField::LanguageCode, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: LanguageOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific languages to filter by" + )] language_codes: Vec, + #[graphql( + description = "(deprecated) A specific relation to filter by" + )] language_relation: Option, + #[graphql( + default = vec![], + description = "Specific relations to filter by" + )] language_relations: Vec, ) -> FieldResult> { let mut relations = language_relations; @@ -1049,22 +1070,22 @@ impl QueryRoot { #[graphql( description = "Get the total number of languages associated to works", - arguments( - language_codes( - default = vec![], - description = "Specific languages to filter by", - ), - language_relation(description = "(deprecated) A specific relation to filter by"), - language_relations( - default = vec![], - description = "Specific relations to filter by", - ), - ) )] fn language_count( context: &Context, + #[graphql( + default = vec![], + description = "Specific languages to filter by" + )] language_codes: Vec, + #[graphql( + description = "(deprecated) A specific relation to filter by" + )] language_relation: Option, + #[graphql( + default = vec![], + description = "Specific relations to filter by" + )] language_relations: Vec, ) -> FieldResult { let mut relations = language_relations; @@ -1077,34 +1098,38 @@ impl QueryRoot { #[graphql( description = "Query the full list of locations", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - LocationOrderBy { - field: LocationField::LocationPlatform, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - location_platform( - default = vec![], - description = "Specific platforms to filter by" - ), - ) )] fn locations( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + LocationOrderBy { + field: LocationField::LocationPlatform, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: LocationOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific platforms to filter by" + )] location_platforms: Vec, ) -> FieldResult> { Location::all( @@ -1131,6 +1156,10 @@ impl QueryRoot { #[graphql(description = "Get the total number of locations associated to works")] fn location_count( context: &Context, + #[graphql( + default = vec![], + description = "Specific platforms to filter by" + )] location_platforms: Vec, ) -> FieldResult { Location::count(&context.db, None, vec![], location_platforms, vec![], None) @@ -1139,34 +1168,38 @@ impl QueryRoot { #[graphql( description = "Query the full list of prices", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - PriceOrderBy { - field: PriceField::CurrencyCode, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - currency_codes( - default = vec![], - description = "Specific currencies to filter by", - ), - ) )] fn prices( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + PriceOrderBy { + field: PriceField::CurrencyCode, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: PriceOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific currencies to filter by" + )] currency_codes: Vec, ) -> FieldResult> { Price::all( @@ -1192,52 +1225,57 @@ impl QueryRoot { #[graphql( description = "Get the total number of prices associated to works", - arguments( - currency_codes( - default = vec![], - description = "Specific currencies to filter by", - ), - ) )] - fn price_count(context: &Context, currency_codes: Vec) -> FieldResult { + fn price_count( + context: &Context, + #[graphql( + default = vec![], + description = "Specific currencies to filter by" + )] + currency_codes: Vec + ) -> FieldResult { Price::count(&context.db, None, vec![], currency_codes, vec![], None).map_err(|e| e.into()) } #[graphql( description = "Query the full list of subjects", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code", - ), - order( - default = { - SubjectOrderBy { - field: SubjectField::SubjectType, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - subject_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] fn subjects( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code" + )] filter: String, + #[graphql( + default = { + SubjectOrderBy { + field: SubjectField::SubjectType, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: SubjectOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] subject_types: Vec, ) -> FieldResult> { Subject::all( @@ -1263,20 +1301,18 @@ impl QueryRoot { #[graphql( description = "Get the total number of subjects associated to works", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code", - ), - subject_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] fn subject_count( context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code" + )] filter: String, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] subject_types: Vec, ) -> FieldResult { Subject::count( @@ -1292,24 +1328,28 @@ impl QueryRoot { #[graphql( description = "Query the full list of institutions", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on institution_name, ror and institution_doi", - ), - order( - default = InstitutionOrderBy::default(), - description = "The order in which to sort the results", - ), - ) )] fn institutions( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on institution_name, ror and institution_doi" + )] filter: String, + #[graphql( + default = InstitutionOrderBy::default(), + description = "The order in which to sort the results" + )] order: InstitutionOrderBy, ) -> FieldResult> { Institution::all( @@ -1335,43 +1375,48 @@ impl QueryRoot { #[graphql( description = "Get the total number of institutions", - arguments( - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on institution_name, ror and institution_doi", - ), - ) )] - fn institution_count(context: &Context, filter: String) -> FieldResult { + fn institution_count( + context: &Context, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on institution_name, ror and institution_doi" + )] + filter: String + ) -> FieldResult { Institution::count(&context.db, Some(filter), vec![], vec![], vec![], None) .map_err(|e| e.into()) } #[graphql( description = "Query the full list of fundings", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - FundingOrderBy { - field: FundingField::Program, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - ) )] fn fundings( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + FundingOrderBy { + field: FundingField::Program, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: FundingOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, ) -> FieldResult> { Funding::all( @@ -1402,29 +1447,33 @@ impl QueryRoot { #[graphql( description = "Query the full list of affiliations", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - AffiliationOrderBy { - field: AffiliationField::AffiliationOrdinal, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - ) )] fn affiliations( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + AffiliationOrderBy { + field: AffiliationField::AffiliationOrdinal, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: AffiliationOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, ) -> FieldResult> { Affiliation::all( @@ -1455,29 +1504,33 @@ impl QueryRoot { #[graphql( description = "Query the full list of references", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - ReferenceOrderBy { - field: ReferenceField::ReferenceOrdinal, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publishers( - default = vec![], - description = "If set, only shows results connected to publishers with these IDs", - ), - ) )] fn references( context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + ReferenceOrderBy { + field: ReferenceField::ReferenceOrdinal, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: ReferenceOrderBy, + #[graphql( + default = vec![], + description = "If set, only shows results connected to publishers with these IDs" + )] publishers: Vec, ) -> FieldResult> { Reference::all( @@ -1751,7 +1804,7 @@ impl MutationRoot { let imprint = Imprint::from_id(&context.db, &data.imprint_id).unwrap(); context .account_access - .can_edit(imprint.publisher_id(&context.db)?)?; + .can_edit(imprint.publisher_id())?; if data.publisher_id != imprint.publisher_id { context.account_access.can_edit(data.publisher_id)?; @@ -2079,7 +2132,7 @@ impl MutationRoot { let imprint = Imprint::from_id(&context.db, &imprint_id).unwrap(); context .account_access - .can_edit(imprint.publisher_id(&context.db)?)?; + .can_edit(imprint.publisher_id())?; imprint.delete(&context.db).map_err(|e| e.into()) } @@ -2421,30 +2474,34 @@ impl Work { #[graphql( description = "Get contributions linked to this work", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - ContributionOrderBy { - field: ContributionField::ContributionType, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - contribution_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] pub fn contributions( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + ContributionOrderBy { + field: ContributionField::ContributionType, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: ContributionOrderBy, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] contribution_types: Vec, ) -> FieldResult> { Contribution::all( @@ -2465,37 +2522,43 @@ impl Work { #[graphql( description = "Get languages linked to this work", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - LanguageOrderBy { - field: LanguageField::LanguageCode, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - language_codes( - default = vec![], - description = "Specific languages to filter by", - ), - language_relation(description = "(deprecated) A specific relation to filter by"), - language_relations( - default = vec![], - description = "Specific relations to filter by", - ), - ) )] pub fn languages( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + LanguageOrderBy { + field: LanguageField::LanguageCode, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: LanguageOrderBy, + #[graphql( + default = vec![], + description = "Specific languages to filter by" + )] language_codes: Vec, + #[graphql( + description = "(deprecated) A specific relation to filter by" + )] language_relation: Option, + #[graphql( + default = vec![], + description = "Specific relations to filter by" + )] language_relations: Vec, ) -> FieldResult> { let mut relations = language_relations; @@ -2520,35 +2583,39 @@ impl Work { #[graphql( description = "Get publications linked to this work", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" - ), - order( - default = { - PublicationOrderBy { - field: PublicationField::PublicationType, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - publication_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] pub fn publications( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" + )] filter: String, + #[graphql( + default = { + PublicationOrderBy { + field: PublicationField::PublicationType, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: PublicationOrderBy, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] publication_types: Vec, ) -> FieldResult> { Publication::all( @@ -2569,35 +2636,39 @@ impl Work { #[graphql( description = "Get subjects linked to this work", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code", - ), - order( - default = { - SubjectOrderBy { - field: SubjectField::SubjectType, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - subject_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] pub fn subjects( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code" + )] filter: String, + #[graphql( + default = { + SubjectOrderBy { + field: SubjectField::SubjectType, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: SubjectOrderBy, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] subject_types: Vec, ) -> FieldResult> { Subject::all( @@ -2618,25 +2689,29 @@ impl Work { #[graphql( description = "Get fundings linked to this work", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - FundingOrderBy { - field: FundingField::Program, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - ) )] pub fn fundings( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + FundingOrderBy { + field: FundingField::Program, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: FundingOrderBy, ) -> FieldResult> { Funding::all( @@ -2657,25 +2732,29 @@ impl Work { #[graphql( description = "Get issues linked to this work", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - IssueOrderBy { - field: IssueField::IssueOrdinal, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - ) )] pub fn issues( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + IssueOrderBy { + field: IssueField::IssueOrdinal, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: IssueOrderBy, ) -> FieldResult> { Issue::all( @@ -2695,25 +2774,29 @@ impl Work { } #[graphql( description = "Get other works related to this work", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = WorkRelationOrderBy::default(), - description = "The order in which to sort the results", - ), - relation_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] pub fn relations( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = WorkRelationOrderBy::default(), + description = "The order in which to sort the results" + )] order: WorkRelationOrderBy, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] relation_types: Vec, ) -> FieldResult> { WorkRelation::all( @@ -2733,25 +2816,29 @@ impl Work { } #[graphql( description = "Get references cited by this work", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on doi, unstructured_citation, issn, isbn, journal_title, article_title, series_title, volume_title, author, standard_designator, standards_body_name, and standards_body_acronym", - ), - order( - default = ReferenceOrderBy::default(), - description = "The order in which to sort the results", - ), - ) )] pub fn references( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on doi, unstructured_citation, issn, isbn, journal_title, article_title, series_title, volume_title, author, standard_designator, standards_body_name, and standards_body_acronym" + )] filter: String, + #[graphql( + default = ReferenceOrderBy::default(), + description = "The order in which to sort the results" + )] order: ReferenceOrderBy, ) -> FieldResult> { Reference::all( @@ -2799,14 +2886,15 @@ impl Publication { #[graphql( description = "Width of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)", - arguments( - units( - default = LengthUnit::default(), - description = "Unit of measurement in which to represent the width (mm, cm or in)", - ), - ) )] - pub fn width(&self, units: LengthUnit) -> Option { + pub fn width( + &self, + #[graphql( + default = LengthUnit::default(), + description = "Unit of measurement in which to represent the width (mm, cm or in)", + )] + units: LengthUnit + ) -> Option { match units { LengthUnit::Mm => self.width_mm, LengthUnit::Cm => self @@ -2818,14 +2906,15 @@ impl Publication { #[graphql( description = "Height of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)", - arguments( - units( - default = LengthUnit::default(), - description = "Unit of measurement in which to represent the height (mm, cm or in)", - ), - ) )] - pub fn height(&self, units: LengthUnit) -> Option { + pub fn height( + &self, + #[graphql( + default = LengthUnit::default(), + description = "Unit of measurement in which to represent the height (mm, cm or in)", + )] + units: LengthUnit + ) -> Option { match units { LengthUnit::Mm => self.height_mm, LengthUnit::Cm => self @@ -2837,14 +2926,15 @@ impl Publication { #[graphql( description = "Depth of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)", - arguments( - units( - default = LengthUnit::default(), - description = "Unit of measurement in which to represent the depth (mm, cm or in)", - ), - ) )] - pub fn depth(&self, units: LengthUnit) -> Option { + pub fn depth( + &self, + #[graphql( + default = LengthUnit::default(), + description = "Unit of measurement in which to represent the depth (mm, cm or in)", + )] + units: LengthUnit + ) -> Option { match units { LengthUnit::Mm => self.depth_mm, LengthUnit::Cm => self @@ -2856,14 +2946,15 @@ impl Publication { #[graphql( description = "Weight of the physical Publication (in g or oz) (only applicable to non-Chapter Paperbacks and Hardbacks)", - arguments( - units( - default = WeightUnit::default(), - description = "Unit of measurement in which to represent the weight (grams or ounces)", - ), - ) )] - pub fn weight(&self, units: WeightUnit) -> Option { + pub fn weight( + &self, + #[graphql( + default = WeightUnit::default(), + description = "Unit of measurement in which to represent the weight (grams or ounces)", + )] + units: WeightUnit + ) -> Option { match units { WeightUnit::G => self.weight_g, WeightUnit::Oz => self.weight_oz, @@ -2872,30 +2963,34 @@ impl Publication { #[graphql( description = "Get prices linked to this publication", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - PriceOrderBy { - field: PriceField::CurrencyCode, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - currency_codes( - default = vec![], - description = "Specific currencies to filter by", - ), - ) )] pub fn prices( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + PriceOrderBy { + field: PriceField::CurrencyCode, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: PriceOrderBy, + #[graphql( + default = vec![], + description = "Specific currencies to filter by" + )] currency_codes: Vec, ) -> FieldResult> { Price::all( @@ -2916,30 +3011,34 @@ impl Publication { #[graphql( description = "Get locations linked to this publication", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - LocationOrderBy { - field: LocationField::LocationPlatform, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - location_platforms( - default = vec![], - description = "Specific platforms to filter by", - ), - ) )] pub fn locations( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + LocationOrderBy { + field: LocationField::LocationPlatform, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: LocationOrderBy, + #[graphql( + default = vec![], + description = "Specific platforms to filter by" + )] location_platforms: Vec, ) -> FieldResult> { Location::all( @@ -2991,30 +3090,34 @@ impl Publisher { #[graphql( description = "Get imprints linked to this publisher", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - filter( - default = "".to_string(), - description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" - ), - order( - default = { - ImprintOrderBy { - field: ImprintField::ImprintName, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - ) )] pub fn imprints( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = "".to_string(), + description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" + )] filter: String, + #[graphql( + default = { + ImprintOrderBy { + field: ImprintField::ImprintName, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: ImprintOrderBy, ) -> FieldResult> { Imprint::all( @@ -3074,52 +3177,48 @@ impl Imprint { } #[graphql( - description="Get works linked to this imprint", - arguments( - limit( + description="Get works linked to this imprint", + )] + pub fn works( + &self, + context: &Context, + #[graphql( default = 100, description = "The number of items to return" - ), - offset( + )] + limit: i32, + #[graphql( default = 0, description = "The number of items to skip" - ), - filter( + )] + offset: i32, + #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" - ), - order( - default = { - WorkOrderBy { - field: WorkField::FullTitle, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - work_types( - default = vec![], - description = "Specific types to filter by", - ), - work_status(description = "(deprecated) A specific status to filter by"), - work_statuses( - default = vec![], - description = "Specific statuses to filter by" - ), - updated_at_with_relations( - description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" - ), - ) - )] - pub fn works( - context: &Context, - limit: i32, - offset: i32, + )] filter: String, + #[graphql( + default = WorkOrderBy::default(), + description = "The order in which to sort the results" + )] order: WorkOrderBy, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] work_types: Vec, + #[graphql( + description = "(deprecated) A specific status to filter by" + )] work_status: Option, + #[graphql( + default = vec![], + description = "Specific statuses to filter by" + )] work_statuses: Vec, + #[graphql( + description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" + )] updated_at_with_relations: Option, ) -> FieldResult> { let mut statuses = work_statuses; @@ -3179,30 +3278,34 @@ impl Contributor { #[graphql( description = "Get contributions linked to this contributor", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - ContributionOrderBy { - field: ContributionField::ContributionType, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - contribution_types( - default = vec![], - description = "Specific types to filter by", - ), - ) )] pub fn contributions( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + ContributionOrderBy { + field: ContributionField::ContributionType, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: ContributionOrderBy, + #[graphql( + default = vec![], + description = "Specific types to filter by", + )] contribution_types: Vec, ) -> FieldResult> { Contribution::all( @@ -3282,25 +3385,29 @@ impl Contribution { #[graphql( description = "Get affiliations linked to this contribution", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - AffiliationOrderBy { - field: AffiliationField::AffiliationOrdinal, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - ) )] pub fn affiliations( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + AffiliationOrderBy { + field: AffiliationField::AffiliationOrdinal, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: AffiliationOrderBy, ) -> FieldResult> { Affiliation::all( @@ -3374,25 +3481,29 @@ impl Series { #[graphql( description = "Get issues linked to this series", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - IssueOrderBy { - field: IssueField::IssueOrdinal, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - ) )] pub fn issues( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + IssueOrderBy { + field: IssueField::IssueOrdinal, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: IssueOrderBy, ) -> FieldResult> { Issue::all( @@ -3625,25 +3736,29 @@ impl Institution { #[graphql( description = "Get fundings linked to this institution", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - FundingOrderBy { - field: FundingField::Program, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - ) )] pub fn fundings( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + FundingOrderBy { + field: FundingField::Program, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: FundingOrderBy, ) -> FieldResult> { Funding::all( @@ -3664,25 +3779,29 @@ impl Institution { #[graphql( description = "Get affiliations linked to this institution", - arguments( - limit(default = 100, description = "The number of items to return"), - offset(default = 0, description = "The number of items to skip"), - order( - default = { - AffiliationOrderBy { - field: AffiliationField::AffiliationOrdinal, - direction: Direction::Asc, - } - }, - description = "The order in which to sort the results", - ), - ) )] pub fn affiliations( &self, context: &Context, + #[graphql( + default = 100, + description = "The number of items to return" + )] limit: i32, + #[graphql( + default = 0, + description = "The number of items to skip" + )] offset: i32, + #[graphql( + default = { + AffiliationOrderBy { + field: AffiliationField::AffiliationOrdinal, + direction: Direction::Asc, + } + }, + description = "The order in which to sort the results" + )] order: AffiliationOrderBy, ) -> FieldResult> { Affiliation::all( diff --git a/thoth-api/src/model/mod.rs b/thoth-api/src/model/mod.rs index 0e09fd9c..9821c61f 100644 --- a/thoth-api/src/model/mod.rs +++ b/thoth-api/src/model/mod.rs @@ -44,8 +44,9 @@ pub enum WeightUnit { #[cfg_attr( feature = "backend", - derive(DieselNewType, juniper::GraphQLScalarValue), + derive(DieselNewType, juniper::GraphQLScalar), graphql( + transparent, description = r#"Digital Object Identifier. Expressed as `^https:\/\/doi\.org\/10\.\d{4,9}\/[-._;()\/:a-zA-Z0-9<>+\[\]]+$`"# ) )] @@ -54,8 +55,9 @@ pub struct Doi(String); #[cfg_attr( feature = "backend", - derive(DieselNewType, juniper::GraphQLScalarValue), + derive(DieselNewType, juniper::GraphQLScalar), graphql( + transparent, description = "13-digit International Standard Book Number, with its parts separated by hyphens" ) )] @@ -64,8 +66,9 @@ pub struct Isbn(String); #[cfg_attr( feature = "backend", - derive(DieselNewType, juniper::GraphQLScalarValue), + derive(DieselNewType, juniper::GraphQLScalar), graphql( + transparent, description = r#"ORCID (Open Researcher and Contributor ID) identifier. Expressed as `^https:\/\/orcid\.org\/\d{4}-\d{4}-\d{4}-\d{3}[\dX]$`"# ) )] @@ -74,8 +77,9 @@ pub struct Orcid(String); #[cfg_attr( feature = "backend", - derive(DieselNewType, juniper::GraphQLScalarValue), + derive(DieselNewType, juniper::GraphQLScalar), graphql( + transparent, description = r#"ROR (Research Organization Registry) identifier. Expressed as `^https:\/\/ror\.org\/0[a-hjkmnp-z0-9]{6}\d{2}$`"# ) )] @@ -84,8 +88,9 @@ pub struct Ror(String); #[cfg_attr( feature = "backend", - derive(DieselNewType, juniper::GraphQLScalarValue), + derive(DieselNewType, juniper::GraphQLScalar), graphql( + transparent, description = "RFC 3339 combined date and time in UTC time zone (e.g. \"1999-12-31T23:59:00Z\")" ) )] diff --git a/thoth-api/src/model/series/crud.rs b/thoth-api/src/model/series/crud.rs index d4fbf2a4..152d03f8 100644 --- a/thoth-api/src/model/series/crud.rs +++ b/thoth-api/src/model/series/crud.rs @@ -153,7 +153,7 @@ impl Crud for Series { } fn publisher_id(&self, db: &crate::db::PgPool) -> ThothResult { - crate::model::imprint::Imprint::from_id(db, &self.imprint_id)?.publisher_id(db) + Ok(crate::model::imprint::Imprint::from_id(db, &self.imprint_id)?.publisher_id) } crud_methods!(series::table, series::dsl::series); diff --git a/thoth-api/src/model/work/crud.rs b/thoth-api/src/model/work/crud.rs index 343f424f..fec77bbb 100644 --- a/thoth-api/src/model/work/crud.rs +++ b/thoth-api/src/model/work/crud.rs @@ -379,7 +379,7 @@ impl Crud for Work { } fn publisher_id(&self, db: &crate::db::PgPool) -> ThothResult { - crate::model::imprint::Imprint::from_id(db, &self.imprint_id)?.publisher_id(db) + Ok(crate::model::imprint::Imprint::from_id(db, &self.imprint_id)?.publisher_id) } crud_methods!(work::table, work::dsl::work); diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index dda6c9da..cdb4b9d2 100644 --- a/thoth-app/Cargo.toml +++ b/thoth-app/Cargo.toml @@ -32,7 +32,7 @@ semver = "1.0.22" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" url = "2.1.1" -uuid = { version = "0.8.2", features = ["serde", "v4"] } +uuid = { version = "1.10.0", features = ["serde", "v4"] } # `getrandom` is a dependency of `uuid`, we need to explicitly import and include the `js` feature to enable wasm # https://docs.rs/getrandom/latest/getrandom/#webassembly-support getrandom = { version = "0.2", features = ["js"] } diff --git a/thoth-client/Cargo.toml b/thoth-client/Cargo.toml index 284a9b7f..028354b1 100644 --- a/thoth-client/Cargo.toml +++ b/thoth-client/Cargo.toml @@ -12,14 +12,14 @@ build = "build.rs" [dependencies] thoth-api = {version = "=0.12.6", path = "../thoth-api" } thoth-errors = {version = "=0.12.6", path = "../thoth-errors" } -graphql_client = "0.13.0" -chrono = { version = "0.4.31", features = ["serde"] } +graphql_client = "0.14.0" +chrono = { version = "0.4.38", features = ["serde"] } reqwest = { version = "0.11", features = ["json"] } reqwest-middleware = "0.2.3" reqwest-retry = "0.3.0" serde = "1.0" serde_json = "1.0" -uuid = { version = "0.8.2", features = ["serde"] } +uuid = { version = "1.10.0", features = ["serde"] } [build-dependencies] thoth-api = { version = "=0.12.6", path = "../thoth-api", features = ["backend"] } diff --git a/thoth-client/build.rs b/thoth-client/build.rs index 7e315f8a..bb9fd8ec 100644 --- a/thoth-client/build.rs +++ b/thoth-client/build.rs @@ -4,7 +4,7 @@ use thoth_api::graphql::model::create_schema; // Generate the GraphQL schema and store it in assets/schema.graphql fn main() { - let schema = create_schema().as_schema_language(); + let schema = create_schema().as_sdl(); let out_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap(); let schema_path = Path::new(&out_dir).join("assets").join("schema.graphql"); diff --git a/thoth-client/src/queries.rs b/thoth-client/src/queries.rs index b99c25b6..f860d2af 100644 --- a/thoth-client/src/queries.rs +++ b/thoth-client/src/queries.rs @@ -11,6 +11,10 @@ use thoth_api::model::Orcid; use thoth_api::model::Ror; use uuid::Uuid; +// Juniper v0.16 onwards converts Rust `NaiveDate` to GraphQL scalar `Date`, +// so we need to convert it back explicitly here (was previously automatic) +pub type Date = NaiveDate; + #[derive(GraphQLQuery)] #[graphql( schema_path = "assets/schema.graphql", diff --git a/thoth-errors/Cargo.toml b/thoth-errors/Cargo.toml index 9d0e134a..eab5ab54 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -13,7 +13,7 @@ thiserror = "1.0" reqwest = { version = "0.11", features = ["json"] } serde = "1.0" serde_json = "1.0" -uuid = { package = "uuid", version = "0.8.2", features = ["serde", "v4"] } +uuid = { package = "uuid", version = "1.10.0", features = ["serde", "v4"] } yewtil = { version = "0.4.0", features = ["fetch"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] @@ -21,7 +21,7 @@ actix-web = "4.8" dialoguer = { version = "0.11.0", features = ["password"] } diesel = "2.1.3" csv = "1.3.0" -juniper = "0.15.12" +juniper = "0.16.1" marc = { version = "3.1.1", features = ["xml"] } phf = { version = "0.11", features = ["macros"] } reqwest-middleware = "0.2.4" diff --git a/thoth-export-server/Cargo.toml b/thoth-export-server/Cargo.toml index d29139e4..a8f56dd3 100644 --- a/thoth-export-server/Cargo.toml +++ b/thoth-export-server/Cargo.toml @@ -23,10 +23,10 @@ futures = "0.3.29" lazy_static = "1.4.0" log = "0.4.20" marc = { version = "3.1.1", features = ["xml"] } -paperclip = { version = "0.8.2", features = ["actix-base", "actix4", "uuid0", "v2"] } +paperclip = { version = "0.8.2", features = ["actix-base", "actix4", "uuid1", "v2"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -uuid = { version = "0.8.2", features = ["serde"] } +uuid = { version = "1.10.0", features = ["serde"] } xml-rs = "0.8.19" [dev-dependencies] From 4380ceeddc564b1425072b786e22ed54080f0392 Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:02:50 +0100 Subject: [PATCH 14/35] Fix Clippy complaints (too many arguments) --- thoth-api/src/graphql/model.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/thoth-api/src/graphql/model.rs b/thoth-api/src/graphql/model.rs index 96619e51..47810888 100644 --- a/thoth-api/src/graphql/model.rs +++ b/thoth-api/src/graphql/model.rs @@ -113,9 +113,10 @@ pub struct QueryRoot; #[juniper::graphql_object(Context = Context)] impl QueryRoot { + #[allow(clippy::too_many_arguments)] #[graphql( - description="Query the full list of works" - )] + description="Query the full list of works" + )] fn works( context: &Context, #[graphql( @@ -241,6 +242,7 @@ impl QueryRoot { .map_err(|e| e.into()) } + #[allow(clippy::too_many_arguments)] #[graphql( description="Query the full list of books (a subset of the full list of works)", )] @@ -374,6 +376,7 @@ impl QueryRoot { .map_err(|e| e.into()) } + #[allow(clippy::too_many_arguments)] #[graphql( description="Query the full list of chapters (a subset of the full list of works)", )] @@ -998,6 +1001,7 @@ impl QueryRoot { Issue::count(&context.db, None, vec![], vec![], vec![], None).map_err(|e| e.into()) } + #[allow(clippy::too_many_arguments)] #[graphql( description = "Query the full list of languages", )] @@ -2520,6 +2524,7 @@ impl Work { .map_err(|e| e.into()) } + #[allow(clippy::too_many_arguments)] #[graphql( description = "Get languages linked to this work", )] @@ -3176,6 +3181,7 @@ impl Imprint { Publisher::from_id(&context.db, &self.publisher_id).map_err(|e| e.into()) } + #[allow(clippy::too_many_arguments)] #[graphql( description="Get works linked to this imprint", )] From 59ac7962b0a6cf164ac3deb713da4feb784ff865 Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Thu, 15 Aug 2024 15:43:54 +0100 Subject: [PATCH 15/35] Behaviour change: all arguments now display as mandatory in schema unless they are Option (even if they have defaults) --- thoth-api/src/graphql/model.rs | 748 ++++++++++++++++----------------- 1 file changed, 374 insertions(+), 374 deletions(-) diff --git a/thoth-api/src/graphql/model.rs b/thoth-api/src/graphql/model.rs index 47810888..b12aa4b0 100644 --- a/thoth-api/src/graphql/model.rs +++ b/thoth-api/src/graphql/model.rs @@ -123,32 +123,32 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" )] - filter: String, + filter: Option, #[graphql( default = WorkOrderBy::default(), description = "The order in which to sort the results" )] - order: WorkOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific types to filter by", )] - work_types: Vec, + work_types: Option>, #[graphql( description = "(deprecated) A specific status to filter by" )] @@ -157,26 +157,26 @@ impl QueryRoot { default = vec![], description = "Specific statuses to filter by" )] - work_statuses: Vec, + work_statuses: Option>, #[graphql( description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" )] updated_at_with_relations: Option, ) -> FieldResult> { - let mut statuses = work_statuses; + let mut statuses = work_statuses.unwrap(); if let Some(status) = work_status { statuses.push(status); } Work::all( &context.db, - limit, - offset, - Some(filter), - order, - publishers, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), + publishers.unwrap(), None, None, - work_types, + work_types.unwrap(), statuses, updated_at_with_relations, ) @@ -202,17 +202,17 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page", )] - filter: String, + filter: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs", )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific types to filter by", )] - work_types: Vec, + work_types: Option>, #[graphql( description = "(deprecated) A specific status to filter by" )] @@ -221,21 +221,21 @@ impl QueryRoot { default = vec![], description = "Specific statuses to filter by" )] - work_statuses: Vec, + work_statuses: Option>, #[graphql( description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" )] updated_at_with_relations: Option, ) -> FieldResult { - let mut statuses = work_statuses; + let mut statuses = work_statuses.unwrap(); if let Some(status) = work_status { statuses.push(status); } Work::count( &context.db, - Some(filter), - publishers, - work_types, + filter, + publishers.unwrap(), + work_types.unwrap(), statuses, updated_at_with_relations, ) @@ -252,27 +252,27 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" )] - filter: String, + filter: Option, #[graphql( default = WorkOrderBy::default(), description = "The order in which to sort the results" )] - order: WorkOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( description = "(deprecated) A specific status to filter by" )] @@ -281,23 +281,23 @@ impl QueryRoot { default = vec![], description = "Specific statuses to filter by" )] - work_statuses: Vec, + work_statuses: Option>, #[graphql( description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" )] updated_at_with_relations: Option, ) -> FieldResult> { - let mut statuses = work_statuses; + let mut statuses = work_statuses.unwrap(); if let Some(status) = work_status { statuses.push(status); } Work::all( &context.db, - limit, - offset, - Some(filter), - order, - publishers, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), + publishers.unwrap(), None, None, vec![ @@ -336,12 +336,12 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" )] - filter: String, + filter: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( description = "(deprecated) A specific status to filter by" )] @@ -350,20 +350,20 @@ impl QueryRoot { default = vec![], description = "Specific statuses to filter by" )] - work_statuses: Vec, + work_statuses: Option>, #[graphql( description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" )] updated_at_with_relations: Option, ) -> FieldResult { - let mut statuses = work_statuses; + let mut statuses = work_statuses.unwrap(); if let Some(status) = work_status { statuses.push(status); } Work::count( &context.db, - Some(filter), - publishers, + filter, + publishers.unwrap(), vec![ WorkType::Monograph, WorkType::EditedBook, @@ -386,27 +386,27 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" )] - filter: String, + filter: Option, #[graphql( default = WorkOrderBy::default(), description = "The order in which to sort the results" )] - order: WorkOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( description = "(deprecated) A specific status to filter by" )] @@ -415,23 +415,23 @@ impl QueryRoot { default = vec![], description = "Specific statuses to filter by" )] - work_statuses: Vec, + work_statuses: Option>, #[graphql( description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" )] updated_at_with_relations: Option, ) -> FieldResult> { - let mut statuses = work_statuses; + let mut statuses = work_statuses.unwrap(); if let Some(status) = work_status { statuses.push(status); } Work::all( &context.db, - limit, - offset, - Some(filter), - order, - publishers, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), + publishers.unwrap(), None, None, vec![WorkType::BookChapter], @@ -455,12 +455,12 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" )] - filter: String, + filter: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( description = "(deprecated) A specific status to filter by" )] @@ -469,20 +469,20 @@ impl QueryRoot { default = vec![], description = "Specific statuses to filter by" )] - work_statuses: Vec, + work_statuses: Option>, #[graphql( description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" )] updated_at_with_relations: Option, ) -> FieldResult { - let mut statuses = work_statuses; + let mut statuses = work_statuses.unwrap(); if let Some(status) = work_status { statuses.push(status); } Work::count( &context.db, - Some(filter), - publishers, + filter, + publishers.unwrap(), vec![WorkType::BookChapter], statuses, updated_at_with_relations, @@ -499,43 +499,43 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" )] - filter: String, + filter: Option, #[graphql( default = PublicationOrderBy::default(), description = "The order in which to sort the results" )] - order: PublicationOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific types to filter by", )] - publication_types: Vec, + publication_types: Option>, ) -> FieldResult> { Publication::all( &context.db, - limit, - offset, - Some(filter), - order, - publishers, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), + publishers.unwrap(), None, None, - publication_types, + publication_types.unwrap(), vec![], None, ) @@ -556,23 +556,23 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" )] - filter: String, + filter: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific types to filter by", )] - publication_types: Vec, + publication_types: Option>, ) -> FieldResult { Publication::count( &context.db, - Some(filter), - publishers, - publication_types, + filter, + publishers.unwrap(), + publication_types.unwrap(), vec![], None, ) @@ -588,35 +588,35 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on publisher_name and publisher_shortname" )] - filter: String, + filter: Option, #[graphql( default = PublisherOrderBy::default(), description = "The order in which to sort the results" )] - order: PublisherOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, ) -> FieldResult> { Publisher::all( &context.db, - limit, - offset, - Some(filter), - order, - publishers, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), + publishers.unwrap(), None, None, vec![], @@ -640,14 +640,14 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on publisher_name and publisher_shortname" )] - filter: String, + filter: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, ) -> FieldResult { - Publisher::count(&context.db, Some(filter), publishers, vec![], vec![], None) + Publisher::count(&context.db, filter, publishers.unwrap(), vec![], vec![], None) .map_err(|e| e.into()) } @@ -660,35 +660,35 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" )] - filter: String, + filter: Option, #[graphql( default = ImprintOrderBy::default(), description = "The order in which to sort the results" )] - order: ImprintOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, ) -> FieldResult> { Imprint::all( &context.db, - limit, - offset, - Some(filter), - order, - publishers, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), + publishers.unwrap(), None, None, vec![], @@ -712,14 +712,14 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" )] - filter: String, + filter: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec + publishers: Option>, ) -> FieldResult { - Imprint::count(&context.db, Some(filter), publishers, vec![], vec![], None) + Imprint::count(&context.db, filter, publishers.unwrap(), vec![], vec![], None) .map_err(|e| e.into()) } @@ -732,29 +732,29 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid" )] - filter: String, + filter: Option, #[graphql( default = ContributorOrderBy::default(), description = "The order in which to sort the results" )] - order: ContributorOrderBy, + order: Option, ) -> FieldResult> { Contributor::all( &context.db, - limit, - offset, - Some(filter), - order, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), vec![], None, None, @@ -779,9 +779,9 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid" )] - filter: String + filter: Option, ) -> FieldResult { - Contributor::count(&context.db, Some(filter), vec![], vec![], vec![], None) + Contributor::count(&context.db, filter, vec![], vec![], vec![], None) .map_err(|e| e.into()) } @@ -794,12 +794,12 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { ContributionOrderBy { @@ -809,28 +809,28 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: ContributionOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific types to filter by", )] - contribution_types: Vec, + contribution_types: Option>, ) -> FieldResult> { Contribution::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, - publishers, + order.unwrap(), + publishers.unwrap(), None, None, - contribution_types, + contribution_types.unwrap(), vec![], None, ) @@ -849,9 +849,9 @@ impl QueryRoot { default = vec![], description = "Specific types to filter by", )] - contribution_types: Vec, + contribution_types: Option>, ) -> FieldResult { - Contribution::count(&context.db, None, vec![], contribution_types, vec![], None) + Contribution::count(&context.db, None, vec![], contribution_types.unwrap(), vec![], None) .map_err(|e| e.into()) } @@ -864,43 +864,43 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on series_name, issn_print, issn_digital, series_url and series_description" )] - filter: String, + filter: Option, #[graphql( default = SeriesOrderBy::default(), description = "The order in which to sort the results" )] - order: SeriesOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific types to filter by", )] - series_types: Vec, + series_types: Option>, ) -> FieldResult> { Series::all( &context.db, - limit, - offset, - Some(filter), - order, - publishers, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), + publishers.unwrap(), None, None, - series_types, + series_types.unwrap(), vec![], None, ) @@ -921,23 +921,23 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on series_name, issn_print, issn_digital, series_url and series_description" )] - filter: String, + filter: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific types to filter by", )] - series_types: Vec, + series_types: Option>, ) -> FieldResult { Series::count( &context.db, - Some(filter), - publishers, - series_types, + filter, + publishers.unwrap(), + series_types.unwrap(), vec![], None, ) @@ -953,12 +953,12 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { IssueOrderBy { @@ -968,20 +968,20 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: IssueOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, ) -> FieldResult> { Issue::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, - publishers, + order.unwrap(), + publishers.unwrap(), None, None, vec![], @@ -1011,12 +1011,12 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { LanguageOrderBy { @@ -1026,17 +1026,17 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: LanguageOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific languages to filter by" )] - language_codes: Vec, + language_codes: Option>, #[graphql( description = "(deprecated) A specific relation to filter by" )] @@ -1045,22 +1045,22 @@ impl QueryRoot { default = vec![], description = "Specific relations to filter by" )] - language_relations: Vec, + language_relations: Option>, ) -> FieldResult> { - let mut relations = language_relations; + let mut relations = language_relations.unwrap(); if let Some(relation) = language_relation { relations.push(relation); } Language::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, - publishers, + order.unwrap(), + publishers.unwrap(), None, None, - language_codes, + language_codes.unwrap(), relations, None, ) @@ -1081,7 +1081,7 @@ impl QueryRoot { default = vec![], description = "Specific languages to filter by" )] - language_codes: Vec, + language_codes: Option>, #[graphql( description = "(deprecated) A specific relation to filter by" )] @@ -1090,13 +1090,13 @@ impl QueryRoot { default = vec![], description = "Specific relations to filter by" )] - language_relations: Vec, + language_relations: Option>, ) -> FieldResult { - let mut relations = language_relations; + let mut relations = language_relations.unwrap(); if let Some(relation) = language_relation { relations.push(relation); } - Language::count(&context.db, None, vec![], language_codes, relations, None) + Language::count(&context.db, None, vec![], language_codes.unwrap(), relations, None) .map_err(|e| e.into()) } @@ -1109,12 +1109,12 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { LocationOrderBy { @@ -1124,28 +1124,28 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: LocationOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific platforms to filter by" )] - location_platforms: Vec, + location_platforms: Option>, ) -> FieldResult> { Location::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, - publishers, + order.unwrap(), + publishers.unwrap(), None, None, - location_platforms, + location_platforms.unwrap(), vec![], None, ) @@ -1164,9 +1164,9 @@ impl QueryRoot { default = vec![], description = "Specific platforms to filter by" )] - location_platforms: Vec, + location_platforms: Option>, ) -> FieldResult { - Location::count(&context.db, None, vec![], location_platforms, vec![], None) + Location::count(&context.db, None, vec![], location_platforms.unwrap(), vec![], None) .map_err(|e| e.into()) } @@ -1179,12 +1179,12 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { PriceOrderBy { @@ -1194,28 +1194,28 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: PriceOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific currencies to filter by" )] - currency_codes: Vec, + currency_codes: Option>, ) -> FieldResult> { Price::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, - publishers, + order.unwrap(), + publishers.unwrap(), None, None, - currency_codes, + currency_codes.unwrap(), vec![], None, ) @@ -1236,9 +1236,9 @@ impl QueryRoot { default = vec![], description = "Specific currencies to filter by" )] - currency_codes: Vec + currency_codes: Option>, ) -> FieldResult { - Price::count(&context.db, None, vec![], currency_codes, vec![], None).map_err(|e| e.into()) + Price::count(&context.db, None, vec![], currency_codes.unwrap(), vec![], None).map_err(|e| e.into()) } #[graphql( @@ -1250,17 +1250,17 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code" )] - filter: String, + filter: Option, #[graphql( default = { SubjectOrderBy { @@ -1270,28 +1270,28 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: SubjectOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, #[graphql( default = vec![], description = "Specific types to filter by", )] - subject_types: Vec, + subject_types: Option>, ) -> FieldResult> { Subject::all( &context.db, - limit, - offset, - Some(filter), - order, - publishers, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), + publishers.unwrap(), None, None, - subject_types, + subject_types.unwrap(), vec![], None, ) @@ -1312,18 +1312,18 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code" )] - filter: String, + filter: Option, #[graphql( default = vec![], description = "Specific types to filter by", )] - subject_types: Vec, + subject_types: Option>, ) -> FieldResult { Subject::count( &context.db, - Some(filter), + filter, vec![], - subject_types, + subject_types.unwrap(), vec![], None, ) @@ -1339,29 +1339,29 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on institution_name, ror and institution_doi" )] - filter: String, + filter: Option, #[graphql( default = InstitutionOrderBy::default(), description = "The order in which to sort the results" )] - order: InstitutionOrderBy, + order: Option, ) -> FieldResult> { Institution::all( &context.db, - limit, - offset, - Some(filter), - order, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), vec![], None, None, @@ -1386,9 +1386,9 @@ impl QueryRoot { default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on institution_name, ror and institution_doi" )] - filter: String + filter: Option, ) -> FieldResult { - Institution::count(&context.db, Some(filter), vec![], vec![], vec![], None) + Institution::count(&context.db, filter, vec![], vec![], vec![], None) .map_err(|e| e.into()) } @@ -1401,12 +1401,12 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { FundingOrderBy { @@ -1416,20 +1416,20 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: FundingOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, ) -> FieldResult> { Funding::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, - publishers, + order.unwrap(), + publishers.unwrap(), None, None, vec![], @@ -1458,12 +1458,12 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { AffiliationOrderBy { @@ -1473,20 +1473,20 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: AffiliationOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, ) -> FieldResult> { Affiliation::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, - publishers, + order.unwrap(), + publishers.unwrap(), None, None, vec![], @@ -1515,12 +1515,12 @@ impl QueryRoot { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { ReferenceOrderBy { @@ -1530,20 +1530,20 @@ impl QueryRoot { }, description = "The order in which to sort the results" )] - order: ReferenceOrderBy, + order: Option, #[graphql( default = vec![], description = "If set, only shows results connected to publishers with these IDs" )] - publishers: Vec, + publishers: Option>, ) -> FieldResult> { Reference::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, - publishers, + order.unwrap(), + publishers.unwrap(), None, None, vec![], @@ -2486,12 +2486,12 @@ impl Work { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { ContributionOrderBy { @@ -2501,23 +2501,23 @@ impl Work { }, description = "The order in which to sort the results" )] - order: ContributionOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific types to filter by", )] - contribution_types: Vec, + contribution_types: Option>, ) -> FieldResult> { Contribution::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], Some(self.work_id), None, - contribution_types, + contribution_types.unwrap(), vec![], None, ) @@ -2535,12 +2535,12 @@ impl Work { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { LanguageOrderBy { @@ -2550,12 +2550,12 @@ impl Work { }, description = "The order in which to sort the results" )] - order: LanguageOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific languages to filter by" )] - language_codes: Vec, + language_codes: Option>, #[graphql( description = "(deprecated) A specific relation to filter by" )] @@ -2564,22 +2564,22 @@ impl Work { default = vec![], description = "Specific relations to filter by" )] - language_relations: Vec, + language_relations: Option>, ) -> FieldResult> { - let mut relations = language_relations; + let mut relations = language_relations.unwrap(); if let Some(relation) = language_relation { relations.push(relation); } Language::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], Some(self.work_id), None, - language_codes, + language_codes.unwrap(), relations, None, ) @@ -2596,17 +2596,17 @@ impl Work { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" )] - filter: String, + filter: Option, #[graphql( default = { PublicationOrderBy { @@ -2616,23 +2616,23 @@ impl Work { }, description = "The order in which to sort the results" )] - order: PublicationOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific types to filter by", )] - publication_types: Vec, + publication_types: Option>, ) -> FieldResult> { Publication::all( &context.db, - limit, - offset, - Some(filter), - order, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), vec![], Some(self.work_id), None, - publication_types, + publication_types.unwrap(), vec![], None, ) @@ -2649,17 +2649,17 @@ impl Work { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code" )] - filter: String, + filter: Option, #[graphql( default = { SubjectOrderBy { @@ -2669,23 +2669,23 @@ impl Work { }, description = "The order in which to sort the results" )] - order: SubjectOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific types to filter by", )] - subject_types: Vec, + subject_types: Option>, ) -> FieldResult> { Subject::all( &context.db, - limit, - offset, - Some(filter), - order, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), vec![], Some(self.work_id), None, - subject_types, + subject_types.unwrap(), vec![], None, ) @@ -2702,12 +2702,12 @@ impl Work { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { FundingOrderBy { @@ -2717,14 +2717,14 @@ impl Work { }, description = "The order in which to sort the results" )] - order: FundingOrderBy, + order: Option, ) -> FieldResult> { Funding::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], Some(self.work_id), None, @@ -2745,12 +2745,12 @@ impl Work { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { IssueOrderBy { @@ -2760,14 +2760,14 @@ impl Work { }, description = "The order in which to sort the results" )] - order: IssueOrderBy, + order: Option, ) -> FieldResult> { Issue::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], Some(self.work_id), None, @@ -2787,33 +2787,33 @@ impl Work { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = WorkRelationOrderBy::default(), description = "The order in which to sort the results" )] - order: WorkRelationOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific types to filter by", )] - relation_types: Vec, + relation_types: Option>, ) -> FieldResult> { WorkRelation::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], Some(self.work_id), None, - relation_types, + relation_types.unwrap(), vec![], None, ) @@ -2829,29 +2829,29 @@ impl Work { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on doi, unstructured_citation, issn, isbn, journal_title, article_title, series_title, volume_title, author, standard_designator, standards_body_name, and standards_body_acronym" )] - filter: String, + filter: Option, #[graphql( default = ReferenceOrderBy::default(), description = "The order in which to sort the results" )] - order: ReferenceOrderBy, + order: Option, ) -> FieldResult> { Reference::all( &context.db, - limit, - offset, - Some(filter), - order, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), vec![], Some(self.work_id), None, @@ -2976,12 +2976,12 @@ impl Publication { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { PriceOrderBy { @@ -2991,23 +2991,23 @@ impl Publication { }, description = "The order in which to sort the results" )] - order: PriceOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific currencies to filter by" )] - currency_codes: Vec, + currency_codes: Option>, ) -> FieldResult> { Price::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], Some(self.publication_id), None, - currency_codes, + currency_codes.unwrap(), vec![], None, ) @@ -3024,12 +3024,12 @@ impl Publication { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { LocationOrderBy { @@ -3039,23 +3039,23 @@ impl Publication { }, description = "The order in which to sort the results" )] - order: LocationOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific platforms to filter by" )] - location_platforms: Vec, + location_platforms: Option>, ) -> FieldResult> { Location::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], Some(self.publication_id), None, - location_platforms, + location_platforms.unwrap(), vec![], None, ) @@ -3103,17 +3103,17 @@ impl Publisher { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" )] - filter: String, + filter: Option, #[graphql( default = { ImprintOrderBy { @@ -3123,14 +3123,14 @@ impl Publisher { }, description = "The order in which to sort the results" )] - order: ImprintOrderBy, + order: Option, ) -> FieldResult> { Imprint::all( &context.db, - limit, - offset, - Some(filter), - order, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), vec![], Some(self.publisher_id), None, @@ -3192,27 +3192,27 @@ impl Imprint { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" )] - filter: String, + filter: Option, #[graphql( default = WorkOrderBy::default(), description = "The order in which to sort the results" )] - order: WorkOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific types to filter by", )] - work_types: Vec, + work_types: Option>, #[graphql( description = "(deprecated) A specific status to filter by" )] @@ -3221,26 +3221,26 @@ impl Imprint { default = vec![], description = "Specific statuses to filter by" )] - work_statuses: Vec, + work_statuses: Option>, #[graphql( description = "Only show results updated either before (less than) or after (greater than) the specified timestamp" )] updated_at_with_relations: Option, ) -> FieldResult> { - let mut statuses = work_statuses; + let mut statuses = work_statuses.unwrap(); if let Some(status) = work_status { statuses.push(status); } Work::all( &context.db, - limit, - offset, - Some(filter), - order, + limit.unwrap(), + offset.unwrap(), + filter, + order.unwrap(), vec![], Some(self.imprint_id), None, - work_types, + work_types.unwrap(), statuses, updated_at_with_relations, ) @@ -3292,12 +3292,12 @@ impl Contributor { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { ContributionOrderBy { @@ -3307,23 +3307,23 @@ impl Contributor { }, description = "The order in which to sort the results" )] - order: ContributionOrderBy, + order: Option, #[graphql( default = vec![], description = "Specific types to filter by", )] - contribution_types: Vec, + contribution_types: Option>, ) -> FieldResult> { Contribution::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], None, Some(self.contributor_id), - contribution_types, + contribution_types.unwrap(), vec![], None, ) @@ -3399,12 +3399,12 @@ impl Contribution { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { AffiliationOrderBy { @@ -3414,14 +3414,14 @@ impl Contribution { }, description = "The order in which to sort the results" )] - order: AffiliationOrderBy, + order: Option, ) -> FieldResult> { Affiliation::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], None, Some(self.contribution_id), @@ -3495,12 +3495,12 @@ impl Series { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { IssueOrderBy { @@ -3510,14 +3510,14 @@ impl Series { }, description = "The order in which to sort the results" )] - order: IssueOrderBy, + order: Option, ) -> FieldResult> { Issue::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], None, Some(self.series_id), @@ -3750,12 +3750,12 @@ impl Institution { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { FundingOrderBy { @@ -3765,14 +3765,14 @@ impl Institution { }, description = "The order in which to sort the results" )] - order: FundingOrderBy, + order: Option, ) -> FieldResult> { Funding::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], None, Some(self.institution_id), @@ -3793,12 +3793,12 @@ impl Institution { default = 100, description = "The number of items to return" )] - limit: i32, + limit: Option, #[graphql( default = 0, description = "The number of items to skip" )] - offset: i32, + offset: Option, #[graphql( default = { AffiliationOrderBy { @@ -3808,14 +3808,14 @@ impl Institution { }, description = "The order in which to sort the results" )] - order: AffiliationOrderBy, + order: Option, ) -> FieldResult> { Affiliation::all( &context.db, - limit, - offset, + limit.unwrap(), + offset.unwrap(), None, - order, + order.unwrap(), vec![], Some(self.institution_id), None, From 3190e5ccf58e70c69f18f2c4e3cf80515bf90c6a Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:37:32 +0100 Subject: [PATCH 16/35] App may pass explicit null, which overrides API defaults and can't be unwrapped --- thoth-api/src/graphql/model.rs | 534 +++++++++++-------------- thoth-api/src/model/affiliation/mod.rs | 9 + thoth-api/src/model/location/mod.rs | 9 + 3 files changed, 257 insertions(+), 295 deletions(-) diff --git a/thoth-api/src/graphql/model.rs b/thoth-api/src/graphql/model.rs index b12aa4b0..02c29ff3 100644 --- a/thoth-api/src/graphql/model.rs +++ b/thoth-api/src/graphql/model.rs @@ -65,6 +65,15 @@ pub struct ContributionOrderBy { pub direction: Direction, } +impl Default for ContributionOrderBy { + fn default() -> ContributionOrderBy { + ContributionOrderBy { + field: ContributionField::ContributionType, + direction: Default::default(), + } + } +} + #[derive(juniper::GraphQLInputObject)] #[graphql(description = "Field and order to use when sorting issues list")] pub struct IssueOrderBy { @@ -72,6 +81,15 @@ pub struct IssueOrderBy { pub direction: Direction, } +impl Default for IssueOrderBy { + fn default() -> IssueOrderBy { + IssueOrderBy { + field: IssueField::IssueOrdinal, + direction: Default::default(), + } + } +} + #[derive(juniper::GraphQLInputObject)] #[graphql(description = "Field and order to use when sorting languages list")] pub struct LanguageOrderBy { @@ -79,6 +97,15 @@ pub struct LanguageOrderBy { pub direction: Direction, } +impl Default for LanguageOrderBy { + fn default() -> LanguageOrderBy { + LanguageOrderBy { + field: LanguageField::LanguageCode, + direction: Default::default(), + } + } +} + #[derive(juniper::GraphQLInputObject)] #[graphql(description = "Field and order to use when sorting prices list")] pub struct PriceOrderBy { @@ -86,6 +113,15 @@ pub struct PriceOrderBy { pub direction: Direction, } +impl Default for PriceOrderBy { + fn default() -> PriceOrderBy { + PriceOrderBy { + field: PriceField::CurrencyCode, + direction: Default::default(), + } + } +} + #[derive(juniper::GraphQLInputObject)] #[graphql(description = "Field and order to use when sorting subjects list")] pub struct SubjectOrderBy { @@ -93,6 +129,15 @@ pub struct SubjectOrderBy { pub direction: Direction, } +impl Default for SubjectOrderBy { + fn default() -> SubjectOrderBy { + SubjectOrderBy { + field: SubjectField::SubjectType, + direction: Default::default(), + } + } +} + #[derive(juniper::GraphQLInputObject)] #[graphql(description = "Field and order to use when sorting fundings list")] pub struct FundingOrderBy { @@ -100,6 +145,15 @@ pub struct FundingOrderBy { pub direction: Direction, } +impl Default for FundingOrderBy { + fn default() -> FundingOrderBy { + FundingOrderBy { + field: FundingField::Program, + direction: Default::default(), + } + } +} + #[derive(juniper::GraphQLInputObject)] #[graphql( description = "Timestamp and choice out of greater than/less than to use when filtering by a time field (e.g. updated_at)" @@ -163,20 +217,20 @@ impl QueryRoot { )] updated_at_with_relations: Option, ) -> FieldResult> { - let mut statuses = work_statuses.unwrap(); + let mut statuses = work_statuses.unwrap_or_default(); if let Some(status) = work_status { statuses.push(status); } Work::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, - work_types.unwrap(), + work_types.unwrap_or_default(), statuses, updated_at_with_relations, ) @@ -227,15 +281,15 @@ impl QueryRoot { )] updated_at_with_relations: Option, ) -> FieldResult { - let mut statuses = work_statuses.unwrap(); + let mut statuses = work_statuses.unwrap_or_default(); if let Some(status) = work_status { statuses.push(status); } Work::count( &context.db, filter, - publishers.unwrap(), - work_types.unwrap(), + publishers.unwrap_or_default(), + work_types.unwrap_or_default(), statuses, updated_at_with_relations, ) @@ -287,17 +341,17 @@ impl QueryRoot { )] updated_at_with_relations: Option, ) -> FieldResult> { - let mut statuses = work_statuses.unwrap(); + let mut statuses = work_statuses.unwrap_or_default(); if let Some(status) = work_status { statuses.push(status); } Work::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, vec![ @@ -356,14 +410,14 @@ impl QueryRoot { )] updated_at_with_relations: Option, ) -> FieldResult { - let mut statuses = work_statuses.unwrap(); + let mut statuses = work_statuses.unwrap_or_default(); if let Some(status) = work_status { statuses.push(status); } Work::count( &context.db, filter, - publishers.unwrap(), + publishers.unwrap_or_default(), vec![ WorkType::Monograph, WorkType::EditedBook, @@ -421,17 +475,17 @@ impl QueryRoot { )] updated_at_with_relations: Option, ) -> FieldResult> { - let mut statuses = work_statuses.unwrap(); + let mut statuses = work_statuses.unwrap_or_default(); if let Some(status) = work_status { statuses.push(status); } Work::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, vec![WorkType::BookChapter], @@ -475,14 +529,14 @@ impl QueryRoot { )] updated_at_with_relations: Option, ) -> FieldResult { - let mut statuses = work_statuses.unwrap(); + let mut statuses = work_statuses.unwrap_or_default(); if let Some(status) = work_status { statuses.push(status); } Work::count( &context.db, filter, - publishers.unwrap(), + publishers.unwrap_or_default(), vec![WorkType::BookChapter], statuses, updated_at_with_relations, @@ -528,14 +582,14 @@ impl QueryRoot { ) -> FieldResult> { Publication::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, - publication_types.unwrap(), + publication_types.unwrap_or_default(), vec![], None, ) @@ -571,8 +625,8 @@ impl QueryRoot { Publication::count( &context.db, filter, - publishers.unwrap(), - publication_types.unwrap(), + publishers.unwrap_or_default(), + publication_types.unwrap_or_default(), vec![], None, ) @@ -612,11 +666,11 @@ impl QueryRoot { ) -> FieldResult> { Publisher::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, vec![], @@ -647,7 +701,7 @@ impl QueryRoot { )] publishers: Option>, ) -> FieldResult { - Publisher::count(&context.db, filter, publishers.unwrap(), vec![], vec![], None) + Publisher::count(&context.db, filter, publishers.unwrap_or_default(), vec![], vec![], None) .map_err(|e| e.into()) } @@ -684,11 +738,11 @@ impl QueryRoot { ) -> FieldResult> { Imprint::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, vec![], @@ -719,7 +773,7 @@ impl QueryRoot { )] publishers: Option>, ) -> FieldResult { - Imprint::count(&context.db, filter, publishers.unwrap(), vec![], vec![], None) + Imprint::count(&context.db, filter, publishers.unwrap_or_default(), vec![], vec![], None) .map_err(|e| e.into()) } @@ -751,10 +805,10 @@ impl QueryRoot { ) -> FieldResult> { Contributor::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), + order.unwrap_or_default(), vec![], None, None, @@ -801,12 +855,7 @@ impl QueryRoot { )] offset: Option, #[graphql( - default = { - ContributionOrderBy { - field: ContributionField::ContributionType, - direction: Direction::Asc, - } - }, + default = ContributionOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -823,14 +872,14 @@ impl QueryRoot { ) -> FieldResult> { Contribution::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, - contribution_types.unwrap(), + contribution_types.unwrap_or_default(), vec![], None, ) @@ -851,7 +900,7 @@ impl QueryRoot { )] contribution_types: Option>, ) -> FieldResult { - Contribution::count(&context.db, None, vec![], contribution_types.unwrap(), vec![], None) + Contribution::count(&context.db, None, vec![], contribution_types.unwrap_or_default(), vec![], None) .map_err(|e| e.into()) } @@ -893,14 +942,14 @@ impl QueryRoot { ) -> FieldResult> { Series::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, - series_types.unwrap(), + series_types.unwrap_or_default(), vec![], None, ) @@ -936,8 +985,8 @@ impl QueryRoot { Series::count( &context.db, filter, - publishers.unwrap(), - series_types.unwrap(), + publishers.unwrap_or_default(), + series_types.unwrap_or_default(), vec![], None, ) @@ -960,12 +1009,7 @@ impl QueryRoot { )] offset: Option, #[graphql( - default = { - IssueOrderBy { - field: IssueField::IssueOrdinal, - direction: Direction::Asc, - } - }, + default = IssueOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -977,11 +1021,11 @@ impl QueryRoot { ) -> FieldResult> { Issue::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, vec![], @@ -1018,12 +1062,7 @@ impl QueryRoot { )] offset: Option, #[graphql( - default = { - LanguageOrderBy { - field: LanguageField::LanguageCode, - direction: Direction::Asc, - } - }, + default = LanguageOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -1047,20 +1086,20 @@ impl QueryRoot { )] language_relations: Option>, ) -> FieldResult> { - let mut relations = language_relations.unwrap(); + let mut relations = language_relations.unwrap_or_default(); if let Some(relation) = language_relation { relations.push(relation); } Language::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, - language_codes.unwrap(), + language_codes.unwrap_or_default(), relations, None, ) @@ -1092,11 +1131,11 @@ impl QueryRoot { )] language_relations: Option>, ) -> FieldResult { - let mut relations = language_relations.unwrap(); + let mut relations = language_relations.unwrap_or_default(); if let Some(relation) = language_relation { relations.push(relation); } - Language::count(&context.db, None, vec![], language_codes.unwrap(), relations, None) + Language::count(&context.db, None, vec![], language_codes.unwrap_or_default(), relations, None) .map_err(|e| e.into()) } @@ -1116,12 +1155,7 @@ impl QueryRoot { )] offset: Option, #[graphql( - default = { - LocationOrderBy { - field: LocationField::LocationPlatform, - direction: Direction::Asc, - } - }, + default = LocationOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -1138,14 +1172,14 @@ impl QueryRoot { ) -> FieldResult> { Location::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, - location_platforms.unwrap(), + location_platforms.unwrap_or_default(), vec![], None, ) @@ -1166,7 +1200,7 @@ impl QueryRoot { )] location_platforms: Option>, ) -> FieldResult { - Location::count(&context.db, None, vec![], location_platforms.unwrap(), vec![], None) + Location::count(&context.db, None, vec![], location_platforms.unwrap_or_default(), vec![], None) .map_err(|e| e.into()) } @@ -1186,12 +1220,7 @@ impl QueryRoot { )] offset: Option, #[graphql( - default = { - PriceOrderBy { - field: PriceField::CurrencyCode, - direction: Direction::Asc, - } - }, + default = PriceOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -1208,14 +1237,14 @@ impl QueryRoot { ) -> FieldResult> { Price::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, - currency_codes.unwrap(), + currency_codes.unwrap_or_default(), vec![], None, ) @@ -1238,7 +1267,7 @@ impl QueryRoot { )] currency_codes: Option>, ) -> FieldResult { - Price::count(&context.db, None, vec![], currency_codes.unwrap(), vec![], None).map_err(|e| e.into()) + Price::count(&context.db, None, vec![], currency_codes.unwrap_or_default(), vec![], None).map_err(|e| e.into()) } #[graphql( @@ -1262,12 +1291,7 @@ impl QueryRoot { )] filter: Option, #[graphql( - default = { - SubjectOrderBy { - field: SubjectField::SubjectType, - direction: Direction::Asc, - } - }, + default = SubjectOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -1284,14 +1308,14 @@ impl QueryRoot { ) -> FieldResult> { Subject::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, - subject_types.unwrap(), + subject_types.unwrap_or_default(), vec![], None, ) @@ -1323,7 +1347,7 @@ impl QueryRoot { &context.db, filter, vec![], - subject_types.unwrap(), + subject_types.unwrap_or_default(), vec![], None, ) @@ -1358,10 +1382,10 @@ impl QueryRoot { ) -> FieldResult> { Institution::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), + order.unwrap_or_default(), vec![], None, None, @@ -1408,12 +1432,7 @@ impl QueryRoot { )] offset: Option, #[graphql( - default = { - FundingOrderBy { - field: FundingField::Program, - direction: Direction::Asc, - } - }, + default = FundingOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -1425,11 +1444,11 @@ impl QueryRoot { ) -> FieldResult> { Funding::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, vec![], @@ -1465,12 +1484,7 @@ impl QueryRoot { )] offset: Option, #[graphql( - default = { - AffiliationOrderBy { - field: AffiliationField::AffiliationOrdinal, - direction: Direction::Asc, - } - }, + default = AffiliationOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -1482,11 +1496,11 @@ impl QueryRoot { ) -> FieldResult> { Affiliation::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, vec![], @@ -1522,12 +1536,7 @@ impl QueryRoot { )] offset: Option, #[graphql( - default = { - ReferenceOrderBy { - field: ReferenceField::ReferenceOrdinal, - direction: Direction::Asc, - } - }, + default = ReferenceOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -1539,11 +1548,11 @@ impl QueryRoot { ) -> FieldResult> { Reference::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), - publishers.unwrap(), + order.unwrap_or_default(), + publishers.unwrap_or_default(), None, None, vec![], @@ -2493,12 +2502,7 @@ impl Work { )] offset: Option, #[graphql( - default = { - ContributionOrderBy { - field: ContributionField::ContributionType, - direction: Direction::Asc, - } - }, + default = ContributionOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -2510,14 +2514,14 @@ impl Work { ) -> FieldResult> { Contribution::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.work_id), None, - contribution_types.unwrap(), + contribution_types.unwrap_or_default(), vec![], None, ) @@ -2542,12 +2546,7 @@ impl Work { )] offset: Option, #[graphql( - default = { - LanguageOrderBy { - field: LanguageField::LanguageCode, - direction: Direction::Asc, - } - }, + default = LanguageOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -2566,20 +2565,20 @@ impl Work { )] language_relations: Option>, ) -> FieldResult> { - let mut relations = language_relations.unwrap(); + let mut relations = language_relations.unwrap_or_default(); if let Some(relation) = language_relation { relations.push(relation); } Language::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.work_id), None, - language_codes.unwrap(), + language_codes.unwrap_or_default(), relations, None, ) @@ -2608,12 +2607,7 @@ impl Work { )] filter: Option, #[graphql( - default = { - PublicationOrderBy { - field: PublicationField::PublicationType, - direction: Direction::Asc, - } - }, + default = PublicationOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -2625,14 +2619,14 @@ impl Work { ) -> FieldResult> { Publication::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.work_id), None, - publication_types.unwrap(), + publication_types.unwrap_or_default(), vec![], None, ) @@ -2661,12 +2655,7 @@ impl Work { )] filter: Option, #[graphql( - default = { - SubjectOrderBy { - field: SubjectField::SubjectType, - direction: Direction::Asc, - } - }, + default = SubjectOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -2678,14 +2667,14 @@ impl Work { ) -> FieldResult> { Subject::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.work_id), None, - subject_types.unwrap(), + subject_types.unwrap_or_default(), vec![], None, ) @@ -2709,22 +2698,17 @@ impl Work { )] offset: Option, #[graphql( - default = { - FundingOrderBy { - field: FundingField::Program, - direction: Direction::Asc, - } - }, + default = FundingOrderBy::default(), description = "The order in which to sort the results" )] order: Option, ) -> FieldResult> { Funding::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.work_id), None, @@ -2752,22 +2736,17 @@ impl Work { )] offset: Option, #[graphql( - default = { - IssueOrderBy { - field: IssueField::IssueOrdinal, - direction: Direction::Asc, - } - }, + default = IssueOrderBy::default(), description = "The order in which to sort the results" )] order: Option, ) -> FieldResult> { Issue::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.work_id), None, @@ -2806,14 +2785,14 @@ impl Work { ) -> FieldResult> { WorkRelation::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.work_id), None, - relation_types.unwrap(), + relation_types.unwrap_or_default(), vec![], None, ) @@ -2848,10 +2827,10 @@ impl Work { ) -> FieldResult> { Reference::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.work_id), None, @@ -2983,12 +2962,7 @@ impl Publication { )] offset: Option, #[graphql( - default = { - PriceOrderBy { - field: PriceField::CurrencyCode, - direction: Direction::Asc, - } - }, + default = PriceOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -3000,14 +2974,14 @@ impl Publication { ) -> FieldResult> { Price::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.publication_id), None, - currency_codes.unwrap(), + currency_codes.unwrap_or_default(), vec![], None, ) @@ -3031,12 +3005,7 @@ impl Publication { )] offset: Option, #[graphql( - default = { - LocationOrderBy { - field: LocationField::LocationPlatform, - direction: Direction::Asc, - } - }, + default = LocationOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -3048,14 +3017,14 @@ impl Publication { ) -> FieldResult> { Location::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.publication_id), None, - location_platforms.unwrap(), + location_platforms.unwrap_or_default(), vec![], None, ) @@ -3127,10 +3096,10 @@ impl Publisher { ) -> FieldResult> { Imprint::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.publisher_id), None, @@ -3227,20 +3196,20 @@ impl Imprint { )] updated_at_with_relations: Option, ) -> FieldResult> { - let mut statuses = work_statuses.unwrap(); + let mut statuses = work_statuses.unwrap_or_default(); if let Some(status) = work_status { statuses.push(status); } Work::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), filter, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.imprint_id), None, - work_types.unwrap(), + work_types.unwrap_or_default(), statuses, updated_at_with_relations, ) @@ -3299,12 +3268,7 @@ impl Contributor { )] offset: Option, #[graphql( - default = { - ContributionOrderBy { - field: ContributionField::ContributionType, - direction: Direction::Asc, - } - }, + default = ContributionOrderBy::default(), description = "The order in which to sort the results" )] order: Option, @@ -3316,14 +3280,14 @@ impl Contributor { ) -> FieldResult> { Contribution::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], None, Some(self.contributor_id), - contribution_types.unwrap(), + contribution_types.unwrap_or_default(), vec![], None, ) @@ -3406,22 +3370,17 @@ impl Contribution { )] offset: Option, #[graphql( - default = { - AffiliationOrderBy { - field: AffiliationField::AffiliationOrdinal, - direction: Direction::Asc, - } - }, + default = AffiliationOrderBy::default(), description = "The order in which to sort the results" )] order: Option, ) -> FieldResult> { Affiliation::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], None, Some(self.contribution_id), @@ -3502,22 +3461,17 @@ impl Series { )] offset: Option, #[graphql( - default = { - IssueOrderBy { - field: IssueField::IssueOrdinal, - direction: Direction::Asc, - } - }, + default = IssueOrderBy::default(), description = "The order in which to sort the results" )] order: Option, ) -> FieldResult> { Issue::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], None, Some(self.series_id), @@ -3757,22 +3711,17 @@ impl Institution { )] offset: Option, #[graphql( - default = { - FundingOrderBy { - field: FundingField::Program, - direction: Direction::Asc, - } - }, + default = FundingOrderBy::default(), description = "The order in which to sort the results" )] order: Option, ) -> FieldResult> { Funding::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], None, Some(self.institution_id), @@ -3800,22 +3749,17 @@ impl Institution { )] offset: Option, #[graphql( - default = { - AffiliationOrderBy { - field: AffiliationField::AffiliationOrdinal, - direction: Direction::Asc, - } - }, + default = AffiliationOrderBy::default(), description = "The order in which to sort the results" )] order: Option, ) -> FieldResult> { Affiliation::all( &context.db, - limit.unwrap(), - offset.unwrap(), + limit.unwrap_or_default(), + offset.unwrap_or_default(), None, - order.unwrap(), + order.unwrap_or_default(), vec![], Some(self.institution_id), None, diff --git a/thoth-api/src/model/affiliation/mod.rs b/thoth-api/src/model/affiliation/mod.rs index de59bdbb..4712d133 100644 --- a/thoth-api/src/model/affiliation/mod.rs +++ b/thoth-api/src/model/affiliation/mod.rs @@ -123,5 +123,14 @@ impl Default for AffiliationWithInstitution { } } +impl Default for AffiliationOrderBy { + fn default() -> AffiliationOrderBy { + AffiliationOrderBy { + field: AffiliationField::AffiliationOrdinal, + direction: Default::default(), + } + } +} + #[cfg(feature = "backend")] pub mod crud; diff --git a/thoth-api/src/model/location/mod.rs b/thoth-api/src/model/location/mod.rs index 2ed0c375..ab352b6c 100644 --- a/thoth-api/src/model/location/mod.rs +++ b/thoth-api/src/model/location/mod.rs @@ -158,6 +158,15 @@ pub struct LocationOrderBy { pub direction: Direction, } +impl Default for LocationOrderBy { + fn default() -> LocationOrderBy { + LocationOrderBy { + field: LocationField::LocationPlatform, + direction: Default::default(), + } + } +} + #[test] fn test_locationplatform_default() { let locationplatform: LocationPlatform = Default::default(); From 1676259fb434108ee5f7fde6dc1cab23e58cf1fe Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:31:26 +0100 Subject: [PATCH 17/35] App now needs to pass Dates rather than NaiveDates, due to behaviour change --- thoth-app/src/models/reference/create_reference_mutation.rs | 4 ++-- thoth-app/src/models/reference/update_reference_mutation.rs | 4 ++-- thoth-app/src/models/work/create_work_mutation.rs | 4 ++-- thoth-app/src/models/work/update_work_mutation.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/thoth-app/src/models/reference/create_reference_mutation.rs b/thoth-app/src/models/reference/create_reference_mutation.rs index d99e6a10..74c64911 100644 --- a/thoth-app/src/models/reference/create_reference_mutation.rs +++ b/thoth-app/src/models/reference/create_reference_mutation.rs @@ -27,8 +27,8 @@ const CREATE_REFERENCE_MUTATION: &str = " $standardsBodyName: String, $standardsBodyAcronym: String, $url: String, - $publicationDate: NaiveDate, - $retrievalDate: NaiveDate, + $publicationDate: Date, + $retrievalDate: Date, ) { createReference( data: { diff --git a/thoth-app/src/models/reference/update_reference_mutation.rs b/thoth-app/src/models/reference/update_reference_mutation.rs index 3ab52d74..186fa9d3 100644 --- a/thoth-app/src/models/reference/update_reference_mutation.rs +++ b/thoth-app/src/models/reference/update_reference_mutation.rs @@ -28,8 +28,8 @@ const UPDATE_REFERENCE_MUTATION: &str = " $standardsBodyName: String, $standardsBodyAcronym: String, $url: String, - $publicationDate: NaiveDate, - $retrievalDate: NaiveDate, + $publicationDate: Date, + $retrievalDate: Date, ) { updateReference( data: { diff --git a/thoth-app/src/models/work/create_work_mutation.rs b/thoth-app/src/models/work/create_work_mutation.rs index fa446176..8cf2c816 100644 --- a/thoth-app/src/models/work/create_work_mutation.rs +++ b/thoth-app/src/models/work/create_work_mutation.rs @@ -17,8 +17,8 @@ const CREATE_WORK_MUTATION: &str = " $edition: Int, $imprintId: Uuid!, $doi: Doi, - $publicationDate: NaiveDate, - $withdrawnDate: NaiveDate, + $publicationDate: Date, + $withdrawnDate: Date, $place: String, $pageCount: Int, $pageBreakdown: String, diff --git a/thoth-app/src/models/work/update_work_mutation.rs b/thoth-app/src/models/work/update_work_mutation.rs index a11f48de..cbae7109 100644 --- a/thoth-app/src/models/work/update_work_mutation.rs +++ b/thoth-app/src/models/work/update_work_mutation.rs @@ -18,8 +18,8 @@ const UPDATE_WORK_MUTATION: &str = " $edition: Int, $imprintId: Uuid!, $doi: Doi, - $publicationDate: NaiveDate, - $withdrawnDate: NaiveDate, + $publicationDate: Date, + $withdrawnDate: Date, $place: String, $pageCount: Int, $pageBreakdown: String, From 8bd31f0b0efa98f1aec3edb88562d9927f2254be Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:16:05 +0100 Subject: [PATCH 18/35] App passing null as limit now results in no values being returned; must explicitly specify (match API default) --- thoth-app/src/component/contributions_form.rs | 12 ++++++++++-- thoth-app/src/component/imprint.rs | 1 + thoth-app/src/component/institution_select.rs | 10 +++++++++- thoth-app/src/component/issues_form.rs | 1 + thoth-app/src/component/new_imprint.rs | 1 + thoth-app/src/component/new_series.rs | 1 + thoth-app/src/component/new_work.rs | 1 + thoth-app/src/component/related_works_form.rs | 2 ++ thoth-app/src/component/series.rs | 1 + 9 files changed, 27 insertions(+), 3 deletions(-) diff --git a/thoth-app/src/component/contributions_form.rs b/thoth-app/src/component/contributions_form.rs index 1a81f4d4..ac44b9da 100644 --- a/thoth-app/src/component/contributions_form.rs +++ b/thoth-app/src/component/contributions_form.rs @@ -124,7 +124,15 @@ impl Component for ContributionsFormComponent { let show_modal_form = false; let in_edit_mode = false; let show_results = false; - let fetch_contributors = Default::default(); + let body = ContributorsRequestBody { + variables: Variables { + limit: Some(100), + ..Default::default() + }, + ..Default::default() + }; + let request = ContributorsRequest { body }; + let fetch_contributors = Fetch::new(request); let fetch_contribution_types = Default::default(); let create_contribution = Default::default(); let delete_contribution = Default::default(); @@ -162,7 +170,7 @@ impl Component for ContributionsFormComponent { if show_form { let body = ContributorsRequestBody { variables: Variables { - limit: Some(9999), + limit: Some(100), ..Default::default() }, ..Default::default() diff --git a/thoth-app/src/component/imprint.rs b/thoth-app/src/component/imprint.rs index 7ee39665..ec00d3ef 100644 --- a/thoth-app/src/component/imprint.rs +++ b/thoth-app/src/component/imprint.rs @@ -140,6 +140,7 @@ impl Component for ImprintComponent { Msg::GetPublishers => { let body = PublishersRequestBody { variables: PublishersVariables { + limit: Some(100), publishers: ctx.props().current_user.resource_access.restricted_to(), ..Default::default() }, diff --git a/thoth-app/src/component/institution_select.rs b/thoth-app/src/component/institution_select.rs index d0d0a628..3239ece3 100644 --- a/thoth-app/src/component/institution_select.rs +++ b/thoth-app/src/component/institution_select.rs @@ -45,7 +45,15 @@ impl Component for InstitutionSelectComponent { fn create(ctx: &Context) -> Self { let institutions: Vec = Default::default(); - let fetch_institutions = Default::default(); + let body = InstitutionsRequestBody { + variables: Variables { + limit: Some(100), + ..Default::default() + }, + ..Default::default() + }; + let request = InstitutionsRequest { body }; + let fetch_institutions = Fetch::new(request); let search_callback = ctx.link().callback(|_| Msg::SearchInstitution); let search_query: String = Default::default(); let debounce_timeout: Option = None; diff --git a/thoth-app/src/component/issues_form.rs b/thoth-app/src/component/issues_form.rs index 2b4b9309..ae9d5a59 100644 --- a/thoth-app/src/component/issues_form.rs +++ b/thoth-app/src/component/issues_form.rs @@ -98,6 +98,7 @@ impl Component for IssuesFormComponent { let show_results = false; let body = SeriesesRequestBody { variables: Variables { + limit: Some(100), publishers: ctx.props().current_user.resource_access.restricted_to(), ..Default::default() }, diff --git a/thoth-app/src/component/new_imprint.rs b/thoth-app/src/component/new_imprint.rs index 8ba2371d..88db3481 100644 --- a/thoth-app/src/component/new_imprint.rs +++ b/thoth-app/src/component/new_imprint.rs @@ -118,6 +118,7 @@ impl Component for NewImprintComponent { Msg::GetPublishers => { let body = PublishersRequestBody { variables: PublishersVariables { + limit: Some(100), publishers: ctx.props().current_user.resource_access.restricted_to(), ..Default::default() }, diff --git a/thoth-app/src/component/new_series.rs b/thoth-app/src/component/new_series.rs index a6cc1601..5ab0732c 100644 --- a/thoth-app/src/component/new_series.rs +++ b/thoth-app/src/component/new_series.rs @@ -124,6 +124,7 @@ impl Component for NewSeriesComponent { Msg::GetImprints => { let body = ImprintsRequestBody { variables: ImprintsVariables { + limit: Some(100), publishers: ctx.props().current_user.resource_access.restricted_to(), ..Default::default() }, diff --git a/thoth-app/src/component/new_work.rs b/thoth-app/src/component/new_work.rs index ebe7aa48..c02aa913 100644 --- a/thoth-app/src/component/new_work.rs +++ b/thoth-app/src/component/new_work.rs @@ -187,6 +187,7 @@ impl Component for NewWorkComponent { Msg::GetImprints => { let body = ImprintsRequestBody { variables: ImprintsVariables { + limit: Some(100), publishers: ctx.props().current_user.resource_access.restricted_to(), ..Default::default() }, diff --git a/thoth-app/src/component/related_works_form.rs b/thoth-app/src/component/related_works_form.rs index 644612b0..bde4ba1b 100644 --- a/thoth-app/src/component/related_works_form.rs +++ b/thoth-app/src/component/related_works_form.rs @@ -125,6 +125,7 @@ impl Component for RelatedWorksFormComponent { let show_results = false; let body = SlimWorksRequestBody { variables: Variables { + limit: Some(100), publishers: ctx.props().current_user.resource_access.restricted_to(), ..Default::default() }, @@ -446,6 +447,7 @@ impl Component for RelatedWorksFormComponent { // This will override any search box filtering, but should only occur rarely. let body = SlimWorksRequestBody { variables: Variables { + limit: Some(100), publishers: ctx.props().current_user.resource_access.restricted_to(), ..Default::default() }, diff --git a/thoth-app/src/component/series.rs b/thoth-app/src/component/series.rs index 83e33a49..f183cfc7 100644 --- a/thoth-app/src/component/series.rs +++ b/thoth-app/src/component/series.rs @@ -150,6 +150,7 @@ impl Component for SeriesComponent { Msg::GetImprints => { let body = ImprintsRequestBody { variables: ImprintsVariables { + limit: Some(100), publishers: ctx.props().current_user.resource_access.restricted_to(), ..Default::default() }, From 1bbab64d5125378df1a233c447d30d461f301ae3 Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:19:04 +0100 Subject: [PATCH 19/35] Fix existing bug where no institutions were being loaded on InstitutionSelect Create --- thoth-app/src/component/institution_select.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/thoth-app/src/component/institution_select.rs b/thoth-app/src/component/institution_select.rs index 3239ece3..75be2e27 100644 --- a/thoth-app/src/component/institution_select.rs +++ b/thoth-app/src/component/institution_select.rs @@ -59,6 +59,8 @@ impl Component for InstitutionSelectComponent { let debounce_timeout: Option = None; let show_results = false; + ctx.link().send_message(Msg::GetInstitutions); + InstitutionSelectComponent { institutions, fetch_institutions, From 33ee33ccde28c9123920509dac6f8b5519961be3 Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:38:33 +0100 Subject: [PATCH 20/35] Apply linting --- thoth-api/src/graphql/model.rs | 748 +++++++++------------------------ 1 file changed, 204 insertions(+), 544 deletions(-) diff --git a/thoth-api/src/graphql/model.rs b/thoth-api/src/graphql/model.rs index 02c29ff3..3935150d 100644 --- a/thoth-api/src/graphql/model.rs +++ b/thoth-api/src/graphql/model.rs @@ -168,21 +168,11 @@ pub struct QueryRoot; #[juniper::graphql_object(Context = Context)] impl QueryRoot { #[allow(clippy::too_many_arguments)] - #[graphql( - description="Query the full list of works" - )] + #[graphql(description = "Query the full list of works")] fn works( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" @@ -203,10 +193,9 @@ impl QueryRoot { description = "Specific types to filter by", )] work_types: Option>, - #[graphql( - description = "(deprecated) A specific status to filter by" - )] - work_status: Option, + #[graphql(description = "(deprecated) A specific status to filter by")] work_status: Option< + WorkStatus, + >, #[graphql( default = vec![], description = "Specific statuses to filter by" @@ -247,9 +236,7 @@ impl QueryRoot { Work::from_doi(&context.db, doi, vec![]).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of works", - )] + #[graphql(description = "Get the total number of works")] fn work_count( context: &Context, #[graphql( @@ -267,10 +254,9 @@ impl QueryRoot { description = "Specific types to filter by", )] work_types: Option>, - #[graphql( - description = "(deprecated) A specific status to filter by" - )] - work_status: Option, + #[graphql(description = "(deprecated) A specific status to filter by")] work_status: Option< + WorkStatus, + >, #[graphql( default = vec![], description = "Specific statuses to filter by" @@ -297,21 +283,11 @@ impl QueryRoot { } #[allow(clippy::too_many_arguments)] - #[graphql( - description="Query the full list of books (a subset of the full list of works)", - )] + #[graphql(description = "Query the full list of books (a subset of the full list of works)")] fn books( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" @@ -327,10 +303,9 @@ impl QueryRoot { description = "If set, only shows results connected to publishers with these IDs" )] publishers: Option>, - #[graphql( - description = "(deprecated) A specific status to filter by" - )] - work_status: Option, + #[graphql(description = "(deprecated) A specific status to filter by")] work_status: Option< + WorkStatus, + >, #[graphql( default = vec![], description = "Specific statuses to filter by" @@ -382,7 +357,7 @@ impl QueryRoot { } #[graphql( - description = "Get the total number of books (a subset of the total number of works)", + description = "Get the total number of books (a subset of the total number of works)" )] fn book_count( context: &Context, @@ -396,10 +371,9 @@ impl QueryRoot { description = "If set, only shows results connected to publishers with these IDs" )] publishers: Option>, - #[graphql( - description = "(deprecated) A specific status to filter by" - )] - work_status: Option, + #[graphql(description = "(deprecated) A specific status to filter by")] work_status: Option< + WorkStatus, + >, #[graphql( default = vec![], description = "Specific statuses to filter by" @@ -431,21 +405,11 @@ impl QueryRoot { } #[allow(clippy::too_many_arguments)] - #[graphql( - description="Query the full list of chapters (a subset of the full list of works)", - )] + #[graphql(description = "Query the full list of chapters (a subset of the full list of works)")] fn chapters( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" @@ -461,10 +425,9 @@ impl QueryRoot { description = "If set, only shows results connected to publishers with these IDs" )] publishers: Option>, - #[graphql( - description = "(deprecated) A specific status to filter by" - )] - work_status: Option, + #[graphql(description = "(deprecated) A specific status to filter by")] work_status: Option< + WorkStatus, + >, #[graphql( default = vec![], description = "Specific statuses to filter by" @@ -501,7 +464,7 @@ impl QueryRoot { } #[graphql( - description = "Get the total number of chapters (a subset of the total number of works)", + description = "Get the total number of chapters (a subset of the total number of works)" )] fn chapter_count( context: &Context, @@ -515,10 +478,9 @@ impl QueryRoot { description = "If set, only shows results connected to publishers with these IDs" )] publishers: Option>, - #[graphql( - description = "(deprecated) A specific status to filter by" - )] - work_status: Option, + #[graphql(description = "(deprecated) A specific status to filter by")] work_status: Option< + WorkStatus, + >, #[graphql( default = vec![], description = "Specific statuses to filter by" @@ -544,21 +506,11 @@ impl QueryRoot { .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of publications", - )] + #[graphql(description = "Query the full list of publications")] fn publications( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" @@ -601,9 +553,7 @@ impl QueryRoot { Publication::from_id(&context.db, &publication_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of publications", - )] + #[graphql(description = "Get the total number of publications")] fn publication_count( context: &Context, #[graphql( @@ -633,21 +583,11 @@ impl QueryRoot { .map_err(|e| e.into()) } - #[graphql( - description="Query the full list of publishers", - )] + #[graphql(description = "Query the full list of publishers")] fn publishers( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on publisher_name and publisher_shortname" @@ -685,9 +625,7 @@ impl QueryRoot { Publisher::from_id(&context.db, &publisher_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of publishers", - )] + #[graphql(description = "Get the total number of publishers")] fn publisher_count( context: &Context, #[graphql( @@ -701,25 +639,22 @@ impl QueryRoot { )] publishers: Option>, ) -> FieldResult { - Publisher::count(&context.db, filter, publishers.unwrap_or_default(), vec![], vec![], None) - .map_err(|e| e.into()) + Publisher::count( + &context.db, + filter, + publishers.unwrap_or_default(), + vec![], + vec![], + None, + ) + .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of imprints", - )] + #[graphql(description = "Query the full list of imprints")] fn imprints( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" @@ -757,9 +692,7 @@ impl QueryRoot { Imprint::from_id(&context.db, &imprint_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of imprints", - )] + #[graphql(description = "Get the total number of imprints")] fn imprint_count( context: &Context, #[graphql( @@ -773,25 +706,22 @@ impl QueryRoot { )] publishers: Option>, ) -> FieldResult { - Imprint::count(&context.db, filter, publishers.unwrap_or_default(), vec![], vec![], None) - .map_err(|e| e.into()) + Imprint::count( + &context.db, + filter, + publishers.unwrap_or_default(), + vec![], + vec![], + None, + ) + .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of contributors", - )] + #[graphql(description = "Query the full list of contributors")] fn contributors( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_name, last_name and orcid" @@ -824,9 +754,7 @@ impl QueryRoot { Contributor::from_id(&context.db, &contributor_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of contributors", - )] + #[graphql(description = "Get the total number of contributors")] fn contributor_count( context: &Context, #[graphql( @@ -835,25 +763,14 @@ impl QueryRoot { )] filter: Option, ) -> FieldResult { - Contributor::count(&context.db, filter, vec![], vec![], vec![], None) - .map_err(|e| e.into()) + Contributor::count(&context.db, filter, vec![], vec![], vec![], None).map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of contributions", - )] + #[graphql(description = "Query the full list of contributions")] fn contributions( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = ContributionOrderBy::default(), description = "The order in which to sort the results" @@ -900,25 +817,22 @@ impl QueryRoot { )] contribution_types: Option>, ) -> FieldResult { - Contribution::count(&context.db, None, vec![], contribution_types.unwrap_or_default(), vec![], None) - .map_err(|e| e.into()) + Contribution::count( + &context.db, + None, + vec![], + contribution_types.unwrap_or_default(), + vec![], + None, + ) + .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of series", - )] + #[graphql(description = "Query the full list of series")] fn serieses( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on series_name, issn_print, issn_digital, series_url and series_description" @@ -961,9 +875,7 @@ impl QueryRoot { Series::from_id(&context.db, &series_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of series", - )] + #[graphql(description = "Get the total number of series")] fn series_count( context: &Context, #[graphql( @@ -993,21 +905,11 @@ impl QueryRoot { .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of issues", - )] + #[graphql(description = "Query the full list of issues")] fn issues( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = IssueOrderBy::default(), description = "The order in which to sort the results" @@ -1046,21 +948,11 @@ impl QueryRoot { } #[allow(clippy::too_many_arguments)] - #[graphql( - description = "Query the full list of languages", - )] + #[graphql(description = "Query the full list of languages")] fn languages( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = LanguageOrderBy::default(), description = "The order in which to sort the results" @@ -1111,9 +1003,7 @@ impl QueryRoot { Language::from_id(&context.db, &language_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of languages associated to works", - )] + #[graphql(description = "Get the total number of languages associated to works")] fn language_count( context: &Context, #[graphql( @@ -1135,25 +1025,22 @@ impl QueryRoot { if let Some(relation) = language_relation { relations.push(relation); } - Language::count(&context.db, None, vec![], language_codes.unwrap_or_default(), relations, None) - .map_err(|e| e.into()) + Language::count( + &context.db, + None, + vec![], + language_codes.unwrap_or_default(), + relations, + None, + ) + .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of locations", - )] + #[graphql(description = "Query the full list of locations")] fn locations( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = LocationOrderBy::default(), description = "The order in which to sort the results" @@ -1200,25 +1087,22 @@ impl QueryRoot { )] location_platforms: Option>, ) -> FieldResult { - Location::count(&context.db, None, vec![], location_platforms.unwrap_or_default(), vec![], None) - .map_err(|e| e.into()) + Location::count( + &context.db, + None, + vec![], + location_platforms.unwrap_or_default(), + vec![], + None, + ) + .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of prices", - )] + #[graphql(description = "Query the full list of prices")] fn prices( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = PriceOrderBy::default(), description = "The order in which to sort the results" @@ -1256,9 +1140,7 @@ impl QueryRoot { Price::from_id(&context.db, &price_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of prices associated to works", - )] + #[graphql(description = "Get the total number of prices associated to works")] fn price_count( context: &Context, #[graphql( @@ -1267,24 +1149,22 @@ impl QueryRoot { )] currency_codes: Option>, ) -> FieldResult { - Price::count(&context.db, None, vec![], currency_codes.unwrap_or_default(), vec![], None).map_err(|e| e.into()) + Price::count( + &context.db, + None, + vec![], + currency_codes.unwrap_or_default(), + vec![], + None, + ) + .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of subjects", - )] + #[graphql(description = "Query the full list of subjects")] fn subjects( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code" @@ -1327,9 +1207,7 @@ impl QueryRoot { Subject::from_id(&context.db, &subject_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of subjects associated to works", - )] + #[graphql(description = "Get the total number of subjects associated to works")] fn subject_count( context: &Context, #[graphql( @@ -1354,21 +1232,11 @@ impl QueryRoot { .map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of institutions", - )] + #[graphql(description = "Query the full list of institutions")] fn institutions( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on institution_name, ror and institution_doi" @@ -1401,9 +1269,7 @@ impl QueryRoot { Institution::from_id(&context.db, &institution_id).map_err(|e| e.into()) } - #[graphql( - description = "Get the total number of institutions", - )] + #[graphql(description = "Get the total number of institutions")] fn institution_count( context: &Context, #[graphql( @@ -1412,25 +1278,14 @@ impl QueryRoot { )] filter: Option, ) -> FieldResult { - Institution::count(&context.db, filter, vec![], vec![], vec![], None) - .map_err(|e| e.into()) + Institution::count(&context.db, filter, vec![], vec![], vec![], None).map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of fundings", - )] + #[graphql(description = "Query the full list of fundings")] fn fundings( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = FundingOrderBy::default(), description = "The order in which to sort the results" @@ -1468,21 +1323,11 @@ impl QueryRoot { Funding::count(&context.db, None, vec![], vec![], vec![], None).map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of affiliations", - )] + #[graphql(description = "Query the full list of affiliations")] fn affiliations( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = AffiliationOrderBy::default(), description = "The order in which to sort the results" @@ -1520,21 +1365,11 @@ impl QueryRoot { Affiliation::count(&context.db, None, vec![], vec![], vec![], None).map_err(|e| e.into()) } - #[graphql( - description = "Query the full list of references", - )] + #[graphql(description = "Query the full list of references")] fn references( context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = ReferenceOrderBy::default(), description = "The order in which to sort the results" @@ -1815,9 +1650,7 @@ impl MutationRoot { fn update_imprint(context: &Context, data: PatchImprint) -> FieldResult { context.token.jwt.as_ref().ok_or(ThothError::Unauthorised)?; let imprint = Imprint::from_id(&context.db, &data.imprint_id).unwrap(); - context - .account_access - .can_edit(imprint.publisher_id())?; + context.account_access.can_edit(imprint.publisher_id())?; if data.publisher_id != imprint.publisher_id { context.account_access.can_edit(data.publisher_id)?; @@ -2143,9 +1976,7 @@ impl MutationRoot { fn delete_imprint(context: &Context, imprint_id: Uuid) -> FieldResult { context.token.jwt.as_ref().ok_or(ThothError::Unauthorised)?; let imprint = Imprint::from_id(&context.db, &imprint_id).unwrap(); - context - .account_access - .can_edit(imprint.publisher_id())?; + context.account_access.can_edit(imprint.publisher_id())?; imprint.delete(&context.db).map_err(|e| e.into()) } @@ -2485,22 +2316,12 @@ impl Work { Imprint::from_id(&context.db, &self.imprint_id).map_err(|e| e.into()) } - #[graphql( - description = "Get contributions linked to this work", - )] + #[graphql(description = "Get contributions linked to this work")] pub fn contributions( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = ContributionOrderBy::default(), description = "The order in which to sort the results" @@ -2529,22 +2350,12 @@ impl Work { } #[allow(clippy::too_many_arguments)] - #[graphql( - description = "Get languages linked to this work", - )] + #[graphql(description = "Get languages linked to this work")] pub fn languages( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = LanguageOrderBy::default(), description = "The order in which to sort the results" @@ -2585,22 +2396,12 @@ impl Work { .map_err(|e| e.into()) } - #[graphql( - description = "Get publications linked to this work", - )] + #[graphql(description = "Get publications linked to this work")] pub fn publications( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on isbn" @@ -2633,22 +2434,12 @@ impl Work { .map_err(|e| e.into()) } - #[graphql( - description = "Get subjects linked to this work", - )] + #[graphql(description = "Get subjects linked to this work")] pub fn subjects( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on subject_code" @@ -2681,22 +2472,12 @@ impl Work { .map_err(|e| e.into()) } - #[graphql( - description = "Get fundings linked to this work", - )] + #[graphql(description = "Get fundings linked to this work")] pub fn fundings( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = FundingOrderBy::default(), description = "The order in which to sort the results" @@ -2719,22 +2500,12 @@ impl Work { .map_err(|e| e.into()) } - #[graphql( - description = "Get issues linked to this work", - )] + #[graphql(description = "Get issues linked to this work")] pub fn issues( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = IssueOrderBy::default(), description = "The order in which to sort the results" @@ -2756,22 +2527,12 @@ impl Work { ) .map_err(|e| e.into()) } - #[graphql( - description = "Get other works related to this work", - )] + #[graphql(description = "Get other works related to this work")] pub fn relations( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = WorkRelationOrderBy::default(), description = "The order in which to sort the results" @@ -2798,22 +2559,12 @@ impl Work { ) .map_err(|e| e.into()) } - #[graphql( - description = "Get references cited by this work", - )] + #[graphql(description = "Get references cited by this work")] pub fn references( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on doi, unstructured_citation, issn, isbn, journal_title, article_title, series_title, volume_title, author, standard_designator, standards_body_name, and standards_body_acronym" @@ -2869,7 +2620,7 @@ impl Publication { } #[graphql( - description = "Width of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)", + description = "Width of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)" )] pub fn width( &self, @@ -2877,7 +2628,7 @@ impl Publication { default = LengthUnit::default(), description = "Unit of measurement in which to represent the width (mm, cm or in)", )] - units: LengthUnit + units: LengthUnit, ) -> Option { match units { LengthUnit::Mm => self.width_mm, @@ -2889,7 +2640,7 @@ impl Publication { } #[graphql( - description = "Height of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)", + description = "Height of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)" )] pub fn height( &self, @@ -2897,7 +2648,7 @@ impl Publication { default = LengthUnit::default(), description = "Unit of measurement in which to represent the height (mm, cm or in)", )] - units: LengthUnit + units: LengthUnit, ) -> Option { match units { LengthUnit::Mm => self.height_mm, @@ -2909,7 +2660,7 @@ impl Publication { } #[graphql( - description = "Depth of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)", + description = "Depth of the physical Publication (in mm, cm or in) (only applicable to non-Chapter Paperbacks and Hardbacks)" )] pub fn depth( &self, @@ -2917,7 +2668,7 @@ impl Publication { default = LengthUnit::default(), description = "Unit of measurement in which to represent the depth (mm, cm or in)", )] - units: LengthUnit + units: LengthUnit, ) -> Option { match units { LengthUnit::Mm => self.depth_mm, @@ -2929,7 +2680,7 @@ impl Publication { } #[graphql( - description = "Weight of the physical Publication (in g or oz) (only applicable to non-Chapter Paperbacks and Hardbacks)", + description = "Weight of the physical Publication (in g or oz) (only applicable to non-Chapter Paperbacks and Hardbacks)" )] pub fn weight( &self, @@ -2937,7 +2688,7 @@ impl Publication { default = WeightUnit::default(), description = "Unit of measurement in which to represent the weight (grams or ounces)", )] - units: WeightUnit + units: WeightUnit, ) -> Option { match units { WeightUnit::G => self.weight_g, @@ -2945,22 +2696,12 @@ impl Publication { } } - #[graphql( - description = "Get prices linked to this publication", - )] + #[graphql(description = "Get prices linked to this publication")] pub fn prices( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = PriceOrderBy::default(), description = "The order in which to sort the results" @@ -2988,22 +2729,12 @@ impl Publication { .map_err(|e| e.into()) } - #[graphql( - description = "Get locations linked to this publication", - )] + #[graphql(description = "Get locations linked to this publication")] pub fn locations( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = LocationOrderBy::default(), description = "The order in which to sort the results" @@ -3062,22 +2793,12 @@ impl Publisher { self.updated_at.clone() } - #[graphql( - description = "Get imprints linked to this publisher", - )] + #[graphql(description = "Get imprints linked to this publisher")] pub fn imprints( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on imprint_name and imprint_url" @@ -3151,22 +2872,12 @@ impl Imprint { } #[allow(clippy::too_many_arguments)] - #[graphql( - description="Get works linked to this imprint", - )] + #[graphql(description = "Get works linked to this imprint")] pub fn works( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = "".to_string(), description = "A query string to search. This argument is a test, do not rely on it. At present it simply searches for case insensitive literals on full_title, doi, reference, short_abstract, long_abstract, and landing_page" @@ -3182,10 +2893,9 @@ impl Imprint { description = "Specific types to filter by", )] work_types: Option>, - #[graphql( - description = "(deprecated) A specific status to filter by" - )] - work_status: Option, + #[graphql(description = "(deprecated) A specific status to filter by")] work_status: Option< + WorkStatus, + >, #[graphql( default = vec![], description = "Specific statuses to filter by" @@ -3251,22 +2961,12 @@ impl Contributor { self.updated_at.clone() } - #[graphql( - description = "Get contributions linked to this contributor", - )] + #[graphql(description = "Get contributions linked to this contributor")] pub fn contributions( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = ContributionOrderBy::default(), description = "The order in which to sort the results" @@ -3353,22 +3053,12 @@ impl Contribution { Contributor::from_id(&context.db, &self.contributor_id).map_err(|e| e.into()) } - #[graphql( - description = "Get affiliations linked to this contribution", - )] + #[graphql(description = "Get affiliations linked to this contribution")] pub fn affiliations( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = AffiliationOrderBy::default(), description = "The order in which to sort the results" @@ -3444,22 +3134,12 @@ impl Series { Imprint::from_id(&context.db, &self.imprint_id).map_err(|e| e.into()) } - #[graphql( - description = "Get issues linked to this series", - )] + #[graphql(description = "Get issues linked to this series")] pub fn issues( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = IssueOrderBy::default(), description = "The order in which to sort the results" @@ -3694,22 +3374,12 @@ impl Institution { self.updated_at.clone() } - #[graphql( - description = "Get fundings linked to this institution", - )] + #[graphql(description = "Get fundings linked to this institution")] pub fn fundings( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = FundingOrderBy::default(), description = "The order in which to sort the results" @@ -3732,22 +3402,12 @@ impl Institution { .map_err(|e| e.into()) } - #[graphql( - description = "Get affiliations linked to this institution", - )] + #[graphql(description = "Get affiliations linked to this institution")] pub fn affiliations( &self, context: &Context, - #[graphql( - default = 100, - description = "The number of items to return" - )] - limit: Option, - #[graphql( - default = 0, - description = "The number of items to skip" - )] - offset: Option, + #[graphql(default = 100, description = "The number of items to return")] limit: Option, + #[graphql(default = 0, description = "The number of items to skip")] offset: Option, #[graphql( default = AffiliationOrderBy::default(), description = "The order in which to sort the results" From e4f7529f3df59dd044e8ef4a7264b7466a36802d Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:36:22 +0100 Subject: [PATCH 21/35] Update changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8628e4fc..81de80c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `time` to v0.3.36 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `actix-web` to v4.8 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `openssl` to v0.10.66 - - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade juniper to v0.16.1 - - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade uuid to v1.10.0 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `juniper` to v0.16.1 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `uuid` to v1.10.0 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `graphql_client` to v0.14.0 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `chrono` to v0.4.38 ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). From 969d70baa40835cd6a29e63318a6a6f6b3b2713f Mon Sep 17 00:00:00 2001 From: rhigman <73792779+rhigman@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:25:45 +0100 Subject: [PATCH 22/35] Correct fix to compiler error (was picking up wrong method from two with same name in different traits) --- thoth-api/src/model/series/crud.rs | 3 ++- thoth-api/src/model/work/crud.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/thoth-api/src/model/series/crud.rs b/thoth-api/src/model/series/crud.rs index 152d03f8..f9a6bfec 100644 --- a/thoth-api/src/model/series/crud.rs +++ b/thoth-api/src/model/series/crud.rs @@ -153,7 +153,8 @@ impl Crud for Series { } fn publisher_id(&self, db: &crate::db::PgPool) -> ThothResult { - Ok(crate::model::imprint::Imprint::from_id(db, &self.imprint_id)?.publisher_id) + let imprint = crate::model::imprint::Imprint::from_id(db, &self.imprint_id)?; + ::publisher_id(&imprint, db) } crud_methods!(series::table, series::dsl::series); diff --git a/thoth-api/src/model/work/crud.rs b/thoth-api/src/model/work/crud.rs index fec77bbb..466ac023 100644 --- a/thoth-api/src/model/work/crud.rs +++ b/thoth-api/src/model/work/crud.rs @@ -379,7 +379,8 @@ impl Crud for Work { } fn publisher_id(&self, db: &crate::db::PgPool) -> ThothResult { - Ok(crate::model::imprint::Imprint::from_id(db, &self.imprint_id)?.publisher_id) + let imprint = crate::model::imprint::Imprint::from_id(db, &self.imprint_id)?; + ::publisher_id(&imprint, db) } crud_methods!(work::table, work::dsl::work); From 44910a39459e7d09dd29136c27826ed24441dcaa Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Thu, 22 Aug 2024 14:27:20 +0100 Subject: [PATCH 23/35] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81de80c8..4be8b1e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `uuid` to v1.10.0 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `graphql_client` to v0.14.0 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `chrono` to v0.4.38 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `trunk` to v0.20.3 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `wasm-bindgen` to v0.2.93 + - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade rust to `1.80.1` in production and development `Dockerfile` ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). From d260c5bd974280804946120dfa3b7da0775ec61d Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Thu, 22 Aug 2024 14:28:36 +0100 Subject: [PATCH 24/35] Upgrade dependencies --- Cargo.lock | 21 +++++++++++---------- Dockerfile | 2 +- Dockerfile.dev | 4 ++-- Makefile | 6 +++--- thoth-app-server/build.rs | 2 +- thoth-app/Cargo.toml | 2 +- thoth-app/Trunk.toml | 2 +- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e3495fa2..b9f2645a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3459,11 +3459,12 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if 1.0.0", + "once_cell", "serde", "serde_json", "wasm-bindgen-macro", @@ -3471,9 +3472,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -3498,9 +3499,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3508,9 +3509,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -3521,9 +3522,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasm-logger" diff --git a/Dockerfile b/Dockerfile index 7392d60a..16bf4592 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG MUSL_IMAGE=clux/muslrust:1.79.0-stable +ARG MUSL_IMAGE=clux/muslrust:1.80.1-stable FROM ${MUSL_IMAGE} as build diff --git a/Dockerfile.dev b/Dockerfile.dev index 0eb9aa8d..a9035611 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,8 +1,8 @@ -ARG RUST_VERSION=1.79.0 +ARG RUST_VERSION=1.80.1 FROM rust:${RUST_VERSION} -ENV TRUNK_VERSION=0.20.0 +ENV TRUNK_VERSION=0.20.3 ARG THOTH_GRAPHQL_API=http://localhost:8000 ARG THOTH_EXPORT_API=http://localhost:8181 diff --git a/Makefile b/Makefile index 22e24d6f..a5158315 100644 --- a/Makefile +++ b/Makefile @@ -36,13 +36,13 @@ watch-app: docker-dev: docker-dev-build docker-dev-run docker-dev-build: - docker-compose -f docker-compose.dev.yml build + docker compose -f docker-compose.dev.yml build docker-dev-run: - docker-compose -f docker-compose.dev.yml up + docker compose -f docker-compose.dev.yml up docker-dev-db: - docker-compose -f docker-compose.dev.yml up db + docker compose -f docker-compose.dev.yml up db build: cargo build -vv diff --git a/thoth-app-server/build.rs b/thoth-app-server/build.rs index fb021bf9..5ec8a4b8 100644 --- a/thoth-app-server/build.rs +++ b/thoth-app-server/build.rs @@ -2,7 +2,7 @@ use dotenv::dotenv; use std::env; use std::process::{exit, Command}; -const TRUNK_VERSION: &str = "0.20.0"; +const TRUNK_VERSION: &str = "0.20.3"; fn is_wasm_target_installed() -> bool { let output = Command::new("rustup") diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index cdb4b9d2..8dd524ad 100644 --- a/thoth-app/Cargo.toml +++ b/thoth-app/Cargo.toml @@ -24,7 +24,7 @@ yew = "0.19.3" yew-agent = "0.1.0" yew-router = "0.16.0" yewtil = { version = "0.4.0", features = ["fetch"] } -wasm-bindgen = "0.2.91" +wasm-bindgen = "0.2.93" wasm-logger = "0.2.0" web-sys = { version = "0.3.57", features = ["HtmlInputElement", "HtmlSelectElement", "HtmlTextAreaElement"] } reqwest = { version = "0.11", features = ["json"] } diff --git a/thoth-app/Trunk.toml b/thoth-app/Trunk.toml index e9b1a5a8..8dedcbf2 100644 --- a/thoth-app/Trunk.toml +++ b/thoth-app/Trunk.toml @@ -14,5 +14,5 @@ dist = "pkg" [tools] # Default wasm-bindgen version to download. -wasm_bindgen = "0.2.92" +wasm_bindgen = "0.2.93" From 6e9f348708ae68fcf61ec22cc4eb7d2f1aea8eaa Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 13:21:49 +0100 Subject: [PATCH 25/35] Upgrade diesel --- Cargo.lock | 134 ++++++++++++++++++++++++++++++---------- thoth-api/Cargo.toml | 6 +- thoth-errors/Cargo.toml | 2 +- 3 files changed, 105 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b9f2645a..26fbd7b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -676,7 +676,7 @@ dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.10.0", ] [[package]] @@ -894,6 +894,41 @@ dependencies = [ "syn 1.0.107", ] +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.31", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.31", +] + [[package]] name = "deranged" version = "0.3.11" @@ -941,9 +976,9 @@ dependencies = [ [[package]] name = "diesel" -version = "2.1.3" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2268a214a6f118fce1838edba3d1561cf0e78d8de785475957a580a7f8c69d33" +checksum = "65e13bab2796f412722112327f3e575601a3e9cdcbe426f0d30dbf43f3f5dc71" dependencies = [ "bitflags 2.4.0", "byteorder", @@ -962,7 +997,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81c5131a2895ef64741dad1d483f358c2a229a3a2d1b256778cdc5e146db64d4" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 2.0.31", @@ -970,9 +1005,9 @@ dependencies = [ [[package]] name = "diesel-derive-newtype" -version = "2.1.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7267437d5b12df60ae29bd97f8d120f1c3a6272d6f213551afa56bbb2ecfbb7" +checksum = "d5adf688c584fe33726ce0e2898f608a2a92578ac94a4a92fcecf73214fe0716" dependencies = [ "proc-macro2", "quote", @@ -981,11 +1016,12 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.1.1" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e054665eaf6d97d1e7125512bb2d35d07c73ac86cc6920174cb42d1ab697a554" +checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4" dependencies = [ "diesel_table_macro_syntax", + "dsl_auto_type", "proc-macro2", "quote", "syn 2.0.31", @@ -993,9 +1029,9 @@ dependencies = [ [[package]] name = "diesel_migrations" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6036b3f0120c5961381b570ee20a02432d7e2d27ea60de9578799cf9156914ac" +checksum = "8a73ce704bad4231f001bff3314d91dce4aba0770cee8b233991859abc15c1f6" dependencies = [ "diesel", "migrations_internals", @@ -1004,9 +1040,9 @@ dependencies = [ [[package]] name = "diesel_table_macro_syntax" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5557efc453706fed5e4fa85006fe9817c224c3f480a34c7e5959fd700921c5" +checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ "syn 2.0.31", ] @@ -1028,6 +1064,20 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "dsl_auto_type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" +dependencies = [ + "darling", + "either", + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.31", +] + [[package]] name = "either" version = "1.8.1" @@ -1106,9 +1156,9 @@ dependencies = [ [[package]] name = "fnv" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foreign-types" @@ -1481,7 +1531,7 @@ checksum = "5e27ed0c2cf0c0cc52c6bcf3b45c907f433015e580879d14005386251842fb0a" dependencies = [ "graphql-introspection-query", "graphql-parser", - "heck", + "heck 0.4.1", "lazy_static", "proc-macro2", "quote", @@ -1538,6 +1588,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.6" @@ -1666,6 +1722,12 @@ dependencies = [ "cxx-build", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.2.0" @@ -1888,9 +1950,9 @@ checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "migrations_internals" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f23f71580015254b020e856feac3df5878c2c7a8812297edd6c0a485ac9dada" +checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" dependencies = [ "serde", "toml", @@ -1898,9 +1960,9 @@ dependencies = [ [[package]] name = "migrations_macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce3325ac70e67bbab5bd837a31cae01f1a6db64e0e744a33cb03a543469ef08" +checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd" dependencies = [ "migrations_internals", "proc-macro2", @@ -2150,7 +2212,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6e25ce2c5362c8d48dc89e0f9ca076d507f7c1eabd04f0d593cdf5addff90c" dependencies = [ - "heck", + "heck 0.4.1", "http", "lazy_static", "mime", @@ -2718,9 +2780,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -2867,6 +2929,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.24.1" @@ -2888,7 +2956,7 @@ version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -2901,7 +2969,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -3243,9 +3311,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -3255,20 +3323,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 1.9.2", + "indexmap 2.2.3", "serde", "serde_spanned", "toml_datetime", @@ -3827,9 +3895,9 @@ checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" [[package]] name = "winnow" -version = "0.4.7" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index 8c3b0853..acd27b69 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -21,10 +21,10 @@ actix-web = { version = "4.8", optional = true } argon2rs = "0.2.5" isbn2 = "0.4.0" chrono = { version = "0.4.31", features = ["serde"] } -diesel = { version = "2.1.3", features = ["postgres", "uuid", "chrono", "r2d2", "64-column-tables", "serde_json"], optional = true } +diesel = { version = "2.2.3", features = ["postgres", "uuid", "chrono", "r2d2", "64-column-tables", "serde_json"], optional = true } diesel-derive-enum = { version = "2.1.0", features = ["postgres"], optional = true } -diesel-derive-newtype = "2.1.0" -diesel_migrations = { version = "2.1.0", features = ["postgres"], optional = true } +diesel-derive-newtype = "2.1.2" +diesel_migrations = { version = "2.2.0", features = ["postgres"], optional = true } dotenv = "0.15.0" futures = { version = "0.3.29", optional = true } jsonwebtoken = { version = "9.2.0", optional = true } diff --git a/thoth-errors/Cargo.toml b/thoth-errors/Cargo.toml index eab5ab54..b8aeb334 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -19,7 +19,7 @@ yewtil = { version = "0.4.0", features = ["fetch"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] actix-web = "4.8" dialoguer = { version = "0.11.0", features = ["password"] } -diesel = "2.1.3" +diesel = "2.2.3" csv = "1.3.0" juniper = "0.16.1" marc = { version = "3.1.1", features = ["xml"] } From 0ead1f9b441699cc2bfa7a0cbc1b1acbd7e114b3 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 13:23:42 +0100 Subject: [PATCH 26/35] Update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4be8b1e2..44edc1c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). +### Security + - Upgrade `diesel` to v2.2.3 + - Upgrade `diesel-derive-newtype` to v2.1.2 + - Upgrade `diesel_migrations` to v2.2.0 + ## [[0.12.6]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.6) - 2024-06-17 ### Fixed - [#513](https://github.com/thoth-pub/thoth/issues/513) - Expand DOI regex to include `+`, `[`, and `]` From 499c4a57808a07ca4a4188d7dc36a6c373020922 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 13:25:42 +0100 Subject: [PATCH 27/35] Upgrade clap --- Cargo.lock | 26 ++++++++++---------------- Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26fbd7b2..778eebe4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -349,9 +349,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" @@ -660,30 +660,30 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.7" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.10.0", + "strsim", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "codegen" @@ -914,7 +914,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.11.1", + "strsim", "syn 2.0.31", ] @@ -2923,12 +2923,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strsim" version = "0.11.1" diff --git a/Cargo.toml b/Cargo.toml index 6fde9918..a015f86b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ thoth-api-server = { version = "=0.12.6", path = "thoth-api-server" } thoth-app-server = { version = "=0.12.6", path = "thoth-app-server" } thoth-errors = { version = "=0.12.6", path = "thoth-errors" } thoth-export-server = { version = "=0.12.6", path = "thoth-export-server" } -clap = { version = "4.4.7", features = ["cargo", "env"] } +clap = { version = "4.5.16", features = ["cargo", "env"] } dialoguer = { version = "0.11.0", features = ["password"] } dotenv = "0.15.0" From d36f7d07734051be0f3371ac1a22d715fe2344e6 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 13:26:30 +0100 Subject: [PATCH 28/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44edc1c3..0aab4064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `trunk` to v0.20.3 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `wasm-bindgen` to v0.2.93 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade rust to `1.80.1` in production and development `Dockerfile` + - Upgrade `clap` to v4.5.16 ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). From e02353dc67248d58ab1638b4905945968130aec6 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 13:29:33 +0100 Subject: [PATCH 29/35] Update changelog --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aab4064..5966023c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,15 +18,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `trunk` to v0.20.3 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `wasm-bindgen` to v0.2.93 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade rust to `1.80.1` in production and development `Dockerfile` - - Upgrade `clap` to v4.5.16 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `clap` to v4.5.16 ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). ### Security - - Upgrade `diesel` to v2.2.3 - - Upgrade `diesel-derive-newtype` to v2.1.2 - - Upgrade `diesel_migrations` to v2.2.0 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `diesel` to v2.2.3 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `diesel-derive-newtype` to v2.1.2 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `diesel_migrations` to v2.2.0 ## [[0.12.6]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.6) - 2024-06-17 ### Fixed From f417a84cd4dd8bae11c4cbd63af666a2c29f861c Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 13:55:40 +0100 Subject: [PATCH 30/35] Upgrade dependencies --- Cargo.lock | 1489 +++++++++++++++----------------- thoth-api-server/Cargo.toml | 4 +- thoth-api/Cargo.toml | 10 +- thoth-app-server/Cargo.toml | 4 +- thoth-app/Cargo.toml | 6 +- thoth-errors/Cargo.toml | 2 +- thoth-export-server/Cargo.toml | 10 +- 7 files changed, 720 insertions(+), 805 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 778eebe4..ac32095d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,19 @@ version = 3 [[package]] name = "actix-codec" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" +checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 1.2.1", + "bitflags 2.6.0", "bytes", "futures-core", "futures-sink", - "log", "memchr", "pin-project-lite", "tokio", "tokio-util", + "tracing", ] [[package]] @@ -36,9 +36,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.8.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae682f693a9cd7b058f2b0b5d9a6d7728a8555779bedbbc35dd88528611d020" +checksum = "d48f96fc3003717aeb9856ca3d02a8c7de502667ad76eeacd830b48d2e91fac4" dependencies = [ "actix-codec", "actix-rt", @@ -46,7 +46,7 @@ dependencies = [ "actix-utils", "ahash", "base64 0.22.1", - "bitflags 2.4.0", + "bitflags 2.6.0", "brotli", "bytes", "bytestring", @@ -91,12 +91,12 @@ dependencies = [ [[package]] name = "actix-macros" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 1.0.107", + "syn 2.0.76", ] [[package]] @@ -106,7 +106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", - "cfg-if 1.0.0", + "cfg-if", "http", "regex", "regex-lite", @@ -116,9 +116,9 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.6.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf3f2183be1241ed4dd22611850b85d38de0b08a09f1f7bcccbd0809084b359" +checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" dependencies = [ "futures-core", "tokio", @@ -126,20 +126,19 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.0.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e7472ac180abb0a8e592b653744345983a7a14f44691c8394a799d0df4dbbf" +checksum = "7ca2549781d8dd6d75c40cf6b6051260a2cc2f3c62343d761a969a0640646894" dependencies = [ "actix-rt", "actix-service", "actix-utils", "futures-core", "futures-util", - "log", "mio", - "num_cpus", - "socket2 0.4.4", + "socket2", "tokio", + "tracing", ] [[package]] @@ -171,9 +170,9 @@ dependencies = [ [[package]] name = "actix-utils" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e491cbaac2e7fc788dfff99ff48ef317e23b3cf63dbaf7aaab6418f40f92aa94" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" dependencies = [ "local-waker", "pin-project-lite", @@ -181,9 +180,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.8.0" +version = "4.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1988c02af8d2b718c05bc4aeb6a66395b7cdf32858c2c71131e5637a8c05a9ff" +checksum = "9180d76e5cc7ccbc4d60a506f2c727730b154010262df5b910eb17dbe4b8cb38" dependencies = [ "actix-codec", "actix-http", @@ -197,12 +196,13 @@ dependencies = [ "ahash", "bytes", "bytestring", - "cfg-if 1.0.0", + "cfg-if", "cookie", "derive_more", "encoding_rs", "futures-core", "futures-util", + "impl-more", "itoa", "language-tags", "log", @@ -215,7 +215,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.5.3", + "socket2", "time", "url", ] @@ -229,14 +229,14 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -247,32 +247,38 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" -version = "0.4.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ + "crypto-common", "generic-array", ] [[package]] name = "aes" -version = "0.7.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher", "cpufeatures", - "opaque-debug", ] [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", @@ -284,36 +290,37 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] name = "aho-corasick" -version = "1.0.5" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "alloc-no-stdlib" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ef4730490ad1c4eae5c4325b2a95f521d023e5c885853ff7aca0a6a1631db3" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697ed7edc0f1711de49ce108c541623a0af97c6c60b2f6e2b65229847ac843c2" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" dependencies = [ "alloc-no-stdlib", ] @@ -335,15 +342,16 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.12" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b09b5178381e0874812a9b157f7fe84982617e48f71f4e3235482775e5b540" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] @@ -355,37 +363,37 @@ checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "anymap" @@ -399,12 +407,6 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c" -[[package]] -name = "arc-swap" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" - [[package]] name = "argon2rs" version = "0.2.5" @@ -438,59 +440,59 @@ checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.76", ] [[package]] name = "auto_enums" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1899bfcfd9340ceea3533ea157360ba8fa864354eccbceab58e1006ecab35393" +checksum = "459b77b7e855f875fd15f101064825cd79eb83185a961d66e6298560126facfb" dependencies = [ "derive_utils", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] name = "autocfg" -version = "1.0.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", - "miniz_oxide 0.7.1", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] [[package]] name = "base64" -version = "0.13.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" @@ -509,15 +511,15 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blake2-rfc" @@ -531,9 +533,9 @@ dependencies = [ [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] @@ -567,27 +569,27 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.1.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bytestring" -version = "1.0.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90706ba19e97b90786e19dc0d5e2abd80008d99d4c0c5d1ad0b5e72cec7c494d" +checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" dependencies = [ "bytes", ] @@ -600,11 +602,13 @@ checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad" [[package]] name = "cc" -version = "1.0.87" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3286b845d0fccbdd15af433f61c5970e711987036cb468f437ff6badd70f4e24" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ + "jobserver", "libc", + "shlex", ] [[package]] @@ -616,12 +620,6 @@ dependencies = [ "regex", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -646,16 +644,17 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.3", + "windows-targets 0.52.6", ] [[package]] name = "cipher" -version = "0.3.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "generic-array", + "crypto-common", + "inout", ] [[package]] @@ -691,24 +690,14 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34c59e8a9b988977ec3bd61ab380cf1167048817ecd3d6999fac03657f85a609" dependencies = [ - "indexmap 1.9.2", -] - -[[package]] -name = "codespan-reporting" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", + "indexmap 1.9.3", ] [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "combine" @@ -725,24 +714,24 @@ dependencies = [ [[package]] name = "console" -version = "0.15.5" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.42.0", + "windows-sys 0.52.0", ] [[package]] name = "console_error_panic_hook" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d976903543e0c48546a91908f21588a680a8c8f984df9a5d69feccb2b2a211" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", "wasm-bindgen", ] @@ -760,12 +749,12 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cookie" -version = "0.16.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "aes-gcm", - "base64 0.13.0", + "base64 0.20.0", "hkdf", "hmac", "percent-encoding", @@ -778,9 +767,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -788,35 +777,36 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[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 1.0.0", + "cfg-if", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", + "rand_core", "typenum", ] @@ -843,57 +833,13 @@ dependencies = [ [[package]] name = "ctr" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ "cipher", ] -[[package]] -name = "cxx" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e599641dff337570f6aa9c304ecca92341d30bf72e1c50287869ed6a36615a6" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e2434bc22249c056e12d2e87db46380730da0f2648471edea3e8e11834a892" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 1.0.107", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3894ad0c6d517cb5a4ce8ec20b37cd0ea31b480fe582a104c5db67ae21270853" - -[[package]] -name = "cxxbridge-macro" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34fa7e395dc1c001083c7eed28c8f0f0b5a225610f3b6284675f444af6fab86b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.107", -] - [[package]] name = "darling" version = "0.20.10" @@ -915,7 +861,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] @@ -926,7 +872,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] @@ -940,25 +886,26 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.14" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc7b9cef1e351660e5443924e4f43ab25fbbed3e9a5f052df3677deb4d6b320" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 1.0.107", + "rustc_version", + "syn 2.0.76", ] [[package]] name = "derive_utils" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61bb5a1014ce6dfc2a378578509abe775a5aa06bff584a547555d9efdb81b926" +checksum = "65f152f4b8559c4da5d574bafc7af85454d706b4c5fe8b530d508cacbb6807ea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] @@ -980,7 +927,7 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65e13bab2796f412722112327f3e575601a3e9cdcbe426f0d30dbf43f3f5dc71" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "byteorder", "chrono", "diesel_derives", @@ -1000,7 +947,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] @@ -1011,7 +958,7 @@ checksum = "d5adf688c584fe33726ce0e2898f608a2a92578ac94a4a92fcecf73214fe0716" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] @@ -1024,7 +971,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] @@ -1044,14 +991,14 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.31", + "syn 2.0.76", ] [[package]] name = "digest" -version = "0.10.3" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -1075,14 +1022,14 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] name = "either" -version = "1.8.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1092,18 +1039,18 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.22" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", "regex", @@ -1111,9 +1058,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c012a26a7f605efc424dd53697843a72be7dc86ad2d01f7814337794a12231d" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ "anstream", "anstyle", @@ -1130,9 +1077,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1140,18 +1087,18 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide 0.6.2", + "miniz_oxide 0.8.0", ] [[package]] @@ -1177,19 +1124,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "matches", "percent-encoding", ] [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1202,9 +1148,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1212,15 +1158,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -1229,38 +1175,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -1276,9 +1222,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1286,11 +1232,11 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi", @@ -1299,9 +1245,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.4.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -1309,9 +1255,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "gloo" @@ -1322,7 +1268,7 @@ dependencies = [ "gloo-console-timer", "gloo-events", "gloo-file 0.1.0", - "gloo-timers 0.2.4", + "gloo-timers 0.2.6", ] [[package]] @@ -1334,19 +1280,20 @@ dependencies = [ "gloo-console", "gloo-dialogs", "gloo-events", - "gloo-file 0.2.1", + "gloo-file 0.2.3", "gloo-render", - "gloo-storage 0.2.1", - "gloo-timers 0.2.4", - "gloo-utils 0.1.3", + "gloo-storage 0.2.2", + "gloo-timers 0.2.6", + "gloo-utils 0.1.7", ] [[package]] name = "gloo-console" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3907f786f65bbb4f419e918b0c5674175ef1c231ecda93b2dbd65fd1e8882637" +checksum = "82b7ce3c05debe147233596904981848862b068862e9ec3e34be446077190d3f" dependencies = [ + "gloo-utils 0.1.7", "js-sys", "serde", "wasm-bindgen", @@ -1374,9 +1321,9 @@ dependencies = [ [[package]] name = "gloo-events" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088514ec8ef284891c762c88a66b639b3a730134714692ee31829765c5bc814f" +checksum = "68b107f8abed8105e4182de63845afcc7b69c098b7852a813ea7462a320992fc" dependencies = [ "wasm-bindgen", "web-sys", @@ -1396,9 +1343,9 @@ dependencies = [ [[package]] name = "gloo-file" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa5d6084efa4a2b182ef3a8649cb6506cb4843f22cf907c6e0a799944248ae90" +checksum = "a8d5564e570a38b43d78bdc063374a0c3098c4f0d64005b12f9bbe87e869b6d7" dependencies = [ "futures-channel", "gloo-events", @@ -1419,11 +1366,11 @@ dependencies = [ [[package]] name = "gloo-storage" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1caa4ba51c99de680dee3ad99c32ca45e9f13311be72079154d222c3f9a6b6f5" +checksum = "5d6ab60bf5dbfd6f0ed1f7843da31b41010515c745735c970e821945ca91e480" dependencies = [ - "gloo-utils 0.1.3", + "gloo-utils 0.1.7", "js-sys", "serde", "serde_json", @@ -1449,9 +1396,9 @@ dependencies = [ [[package]] name = "gloo-timers" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ "futures-channel", "futures-core", @@ -1471,11 +1418,13 @@ dependencies = [ [[package]] name = "gloo-utils" -version = "0.1.3" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0bbef55e98d946adbd89f3c65a497cf9adb995a73b99573f30180e8813ab21" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" dependencies = [ "js-sys", + "serde", + "serde_json", "wasm-bindgen", "web-sys", ] @@ -1537,7 +1486,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1548,7 +1497,7 @@ checksum = "83febfa838f898cfa73dfaa7a8eb69ff3409021ac06ee94cfb3d622f6eeb1a97" dependencies = [ "graphql_client_codegen", "proc-macro2", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1563,7 +1512,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.3", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -1578,9 +1527,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" @@ -1596,18 +1545,15 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.1.6" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" -dependencies = [ - "libc", -] +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -1623,9 +1569,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -1634,9 +1580,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -1645,15 +1591,15 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1663,9 +1609,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.22" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfba89e19b959ca163c7752ba59d737c1ceea53a5d31a149c805446fc958064" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -1678,7 +1624,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.4", + "socket2", "tokio", "tower-service", "tracing", @@ -1700,26 +1646,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows-core", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -1730,20 +1675,25 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] +[[package]] +name = "impl-more" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206ca75c9c03ba3d4ace2460e57b189f39f43de612c2f85836e65c929701bb2d" + [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -1751,22 +1701,31 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", "serde", ] +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + [[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 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -1774,9 +1733,15 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.5.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "isbn2" @@ -1791,35 +1756,44 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] [[package]] name = "js-sys" -version = "0.3.57" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[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.0", + "base64 0.21.7", "js-sys", "pem", "ring", @@ -1840,7 +1814,7 @@ dependencies = [ "fnv", "futures", "graphql-parser", - "indexmap 2.2.3", + "indexmap 2.4.0", "juniper_codegen", "serde", "smartstring", @@ -1857,7 +1831,7 @@ checksum = "760dbe46660494d469023d661e8d268f413b2cb68c999975dcc237407096a693" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", "url", ] @@ -1869,63 +1843,54 @@ checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[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" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "local-channel" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6246c68cf195087205a0512559c97e15eaf95198bf0e206d662092cdcb03fe9f" +checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" dependencies = [ "futures-core", "futures-sink", - "futures-util", "local-waker", ] [[package]] name = "local-waker" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902eb695eb0591864543cbfbf6d742510642a605a61fc5e97fe6ceb5a30ac4fb" +checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" -version = "0.4.6" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "marc" @@ -1936,17 +1901,11 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - [[package]] name = "memchr" -version = "2.6.3" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "migrations_internals" @@ -1971,15 +1930,15 @@ dependencies = [ [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -1987,41 +1946,41 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "log", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[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", @@ -2041,11 +2000,10 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -2058,53 +2016,42 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-integer" -version = "0.1.42" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.11" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.32.0" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" @@ -2112,8 +2059,8 @@ version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.4.0", - "cfg-if 1.0.0", + "bitflags 2.6.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -2123,20 +2070,20 @@ dependencies = [ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.76", ] [[package]] name = "openssl-probe" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" @@ -2220,8 +2167,8 @@ dependencies = [ "proc-macro2", "quote", "strum 0.24.1", - "strum_macros 0.24.0", - "syn 1.0.107", + "strum_macros 0.24.3", + "syn 1.0.109", ] [[package]] @@ -2237,12 +2184,12 @@ 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 0.9.1", + "parking_lot_core 0.9.10", ] [[package]] @@ -2251,54 +2198,54 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] [[package]] name = "parking_lot_core" -version = "0.9.1" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.3", "smallvec", - "windows-sys 0.32.0", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.6" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[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.0", + "base64 0.22.1", "serde", ] [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", "phf_shared", @@ -2306,9 +2253,9 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ "phf_shared", "rand", @@ -2316,31 +2263,31 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ "phf_generator", "phf_shared", "proc-macro2", "quote", - "syn 1.0.107", + "syn 2.0.76", ] [[package]] name = "phf_shared" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2350,17 +2297,17 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.17" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polyval" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "opaque-debug", "universal-hash", @@ -2374,15 +2321,18 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "pq-sys" -version = "0.4.6" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" +checksum = "a24ff9e4cf6945c988f0db7005d87747bf72864965c3529d259ad155ac41d584" dependencies = [ "vcpkg", ] @@ -2396,7 +2346,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", "version_check", ] @@ -2413,18 +2363,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2436,7 +2386,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "scheduled-thread-pool", ] @@ -2463,9 +2413,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] @@ -2476,14 +2426,23 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +dependencies = [ + "bitflags 2.6.0", ] [[package]] name = "regex" -version = "1.10.2" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -2493,9 +2452,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -2510,17 +2469,17 @@ checksum = "53a49587ad06b26609c52e423de037e7f57f20d53535d66e08c695f347df952a" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.11.22" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.21.0", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -2539,9 +2498,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -2555,9 +2516,9 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a3e86aa6053e59030e7ce2d2a3b258dd08fc2d337d52f73f6cb480f5858690" +checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" dependencies = [ "anyhow", "async-trait", @@ -2609,7 +2570,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", "getrandom", "libc", "spin", @@ -2634,43 +2595,60 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.16" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.2" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" -version = "0.1.17" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "lazy_static", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -2679,14 +2657,14 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot 0.12.1", + "parking_lot 0.12.3", ] [[package]] name = "scoped-tls-hkt" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e9d7eaddb227e8fbaaa71136ae0e1e913ca159b86c7da82f3e8f0044ad3a63" +checksum = "3ddc765d3410d9f6c6ca071bf0b67f6b01e3ec4595dc3892f02677e75819dddc" [[package]] name = "scoped_threadpool" @@ -2696,23 +2674,17 @@ checksum = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" [[package]] name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.3.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.2.1", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2721,9 +2693,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2731,15 +2703,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -2758,22 +2730,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2801,11 +2774,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.25" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -2814,22 +2787,22 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -2840,13 +2813,18 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[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.2.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ - "arc-swap", "libc", ] @@ -2864,21 +2842,24 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.2" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] [[package]] name = "smallvec" -version = "1.8.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smartstring" @@ -2893,22 +2874,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2937,50 +2908,50 @@ checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" [[package]] name = "strum" -version = "0.26.1" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ - "strum_macros 0.26.1", + "strum_macros 0.26.4", ] [[package]] name = "strum_macros" -version = "0.24.0" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "strum_macros" -version = "0.26.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -2989,22 +2960,28 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.31" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "system-configuration" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags 1.2.1", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] @@ -3030,43 +3007,35 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] @@ -3108,7 +3077,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "strum 0.26.1", + "strum 0.26.3", "thoth-errors", "uuid", ] @@ -3262,28 +3231,43 @@ dependencies = [ "time-core", ] +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" -version = "1.32.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", "mio", - "parking_lot 0.12.1", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.3", - "windows-sys 0.48.0", + "socket2", + "windows-sys 0.52.0", ] [[package]] name = "tokio-native-tls" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", "tokio", @@ -3291,16 +3275,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -3330,7 +3313,7 @@ version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.3", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", @@ -3339,9 +3322,9 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3363,7 +3346,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", ] [[package]] @@ -3377,62 +3360,59 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.15.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] [[package]] name = "unicode-bidi" -version = "0.3.4" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.12" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ - "smallvec", + "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.7" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "universal-hash" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "generic-array", + "crypto-common", "subtle", ] @@ -3447,9 +3427,9 @@ dependencies = [ [[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" @@ -3459,21 +3439,20 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.2.2" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -3487,15 +3466,15 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" +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 = "void" @@ -3505,11 +3484,10 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -3525,7 +3503,7 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "serde", "serde_json", @@ -3543,17 +3521,17 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.24" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fba7978c679d53ce2d0ac80c8c175840feb849a161664365d1287b41f2e67f1" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -3577,7 +3555,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.31", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3616,9 +3594,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.57" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -3640,15 +3618,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3656,31 +3625,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-sys" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" -dependencies = [ - "windows_aarch64_msvc 0.32.0", - "windows_i686_gnu 0.32.0", - "windows_i686_msvc 0.32.0", - "windows_x86_64_gnu 0.32.0", - "windows_x86_64_msvc 0.32.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows-targets 0.52.6", ] [[package]] @@ -3689,7 +3639,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -3698,194 +3648,138 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.6", ] [[package]] -name = "windows-targets" -version = "0.48.0" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows-targets 0.52.6", ] [[package]] name = "windows-targets" -version = "0.52.3" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.52.3", - "windows_aarch64_msvc 0.52.3", - "windows_i686_gnu 0.52.3", - "windows_i686_msvc 0.52.3", - "windows_x86_64_gnu 0.52.3", - "windows_x86_64_gnullvm 0.52.3", - "windows_x86_64_msvc 0.52.3", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.1" +name = "windows-targets" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" - -[[package]] -name = "windows_i686_gnu" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" - -[[package]] -name = "windows_i686_msvc" -version = "0.32.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_msvc" -version = "0.42.1" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.3" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -3902,21 +3796,21 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] [[package]] name = "xml-rs" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" +checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" [[package]] name = "xmlparser" -version = "0.13.3" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "114ba2b24d2167ef6d67d7d04c8cc86522b87f490025f39f0303b7db5bf5e3d8" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" [[package]] name = "yew" @@ -3927,12 +3821,12 @@ dependencies = [ "anyhow", "anymap", "bincode", - "cfg-if 1.0.0", + "cfg-if", "cfg-match", "console_error_panic_hook", "gloo 0.2.1", "http", - "indexmap 1.9.2", + "indexmap 1.9.3", "js-sys", "log", "ryu", @@ -3954,8 +3848,8 @@ checksum = "2a1ccb53e57d3f7d847338cf5758befa811cabe207df07f543c06f502f9998cd" dependencies = [ "console_error_panic_hook", "gloo 0.4.2", - "gloo-utils 0.1.3", - "indexmap 1.9.2", + "gloo-utils 0.1.7", + "indexmap 1.9.3", "js-sys", "scoped-tls-hkt", "slab", @@ -3974,7 +3868,7 @@ dependencies = [ "anymap2", "bincode", "gloo-console", - "gloo-utils 0.1.3", + "gloo-utils 0.1.7", "js-sys", "serde", "slab", @@ -3994,7 +3888,7 @@ dependencies = [ "lazy_static", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4008,7 +3902,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4018,7 +3912,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "155804f6f3aa309f596d5c3fa14486a94e7756f1edd7634569949e401d5099f2" dependencies = [ "gloo 0.4.2", - "gloo-utils 0.1.3", + "gloo-utils 0.1.7", "js-sys", "route-recognizer", "serde", @@ -4039,7 +3933,7 @@ checksum = "39049d193b52eaad4ffc80916bf08806d142c90b5edcebd527644de438a7e19a" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -4057,35 +3951,56 @@ dependencies = [ "yew 0.18.0", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + [[package]] name = "zeroize" -version = "1.5.7" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zstd" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 32b015cd..045adcf0 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -11,11 +11,11 @@ readme = "README.md" [dependencies] thoth-api = { version = "=0.12.6", path = "../thoth-api", features = ["backend"] } thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } -actix-web = "4.8" +actix-web = "4.9" actix-cors = "0.7.0" actix-identity = "0.7.1" actix-session = { version = "0.9.0", features = ["cookie-session"] } -env_logger = "0.11.2" +env_logger = "0.11.5" juniper = "0.16.1" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index acd27b69..4a4a7e92 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -26,17 +26,17 @@ diesel-derive-enum = { version = "2.1.0", features = ["postgres"], optional = tr diesel-derive-newtype = "2.1.2" diesel_migrations = { version = "2.2.0", features = ["postgres"], optional = true } dotenv = "0.15.0" -futures = { version = "0.3.29", optional = true } -jsonwebtoken = { version = "9.2.0", optional = true } +futures = { version = "0.3.30", optional = true } +jsonwebtoken = { version = "9.3.0", optional = true } juniper = { version = "0.16.1", features = ["chrono", "schema-language", "uuid"] } -lazy_static = "1.4.0" +lazy_static = "1.5.0" phf = { version = "0.11", features = ["macros"] } rand = "0.8.5" -regex = "1.10.2" +regex = "1.10.6" serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0" serde_json = "1.0" -strum = { version = "0.26.1", features = ["derive"] } +strum = { version = "0.26.3", features = ["derive"] } uuid = { version = "1.10.0", features = ["serde", "v4"] } [dev-dependencies] diff --git a/thoth-app-server/Cargo.toml b/thoth-app-server/Cargo.toml index 03afcd20..f6c1c0b7 100644 --- a/thoth-app-server/Cargo.toml +++ b/thoth-app-server/Cargo.toml @@ -10,9 +10,9 @@ readme = "README.md" build = "build.rs" [dependencies] -actix-web = "4.8" +actix-web = "4.9" actix-cors = "0.7.0" -env_logger = "0.11.2" +env_logger = "0.11.5" [build-dependencies] dotenv = "0.15.0" diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index 8dd524ad..605a6305 100644 --- a/thoth-app/Cargo.toml +++ b/thoth-app/Cargo.toml @@ -14,12 +14,12 @@ travis-ci = { repository = "openbookpublishers/thoth" } maintenance = { status = "actively-developed" } [dependencies] -anyhow = "1.0.32" +anyhow = "1.0.86" chrono = { version = "0.4.31", features = ["serde"] } gloo-storage = "0.3.0" gloo-timers = "0.3.0" log = "0.4.20" -thiserror = "1.0.20" +thiserror = "1.0.63" yew = "0.19.3" yew-agent = "0.1.0" yew-router = "0.16.0" @@ -28,7 +28,7 @@ wasm-bindgen = "0.2.93" wasm-logger = "0.2.0" web-sys = { version = "0.3.57", features = ["HtmlInputElement", "HtmlSelectElement", "HtmlTextAreaElement"] } reqwest = { version = "0.11", features = ["json"] } -semver = "1.0.22" +semver = "1.0.23" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" url = "2.1.1" diff --git a/thoth-errors/Cargo.toml b/thoth-errors/Cargo.toml index b8aeb334..dfd62875 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -17,7 +17,7 @@ uuid = { package = "uuid", version = "1.10.0", features = ["serde", "v4"] } yewtil = { version = "0.4.0", features = ["fetch"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -actix-web = "4.8" +actix-web = "4.9" dialoguer = { version = "0.11.0", features = ["password"] } diesel = "2.2.3" csv = "1.3.0" diff --git a/thoth-export-server/Cargo.toml b/thoth-export-server/Cargo.toml index a8f56dd3..76d7b9e4 100644 --- a/thoth-export-server/Cargo.toml +++ b/thoth-export-server/Cargo.toml @@ -13,14 +13,14 @@ build = "build.rs" thoth-api = { version = "=0.12.6", path = "../thoth-api" } thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } thoth-client = { version = "=0.12.6", path = "../thoth-client" } -actix-web = "4.8" +actix-web = "4.9" actix-cors = "0.7.0" cc_license = "0.1.0" chrono = { version = "0.4.31", features = ["serde"] } csv = "1.3.0" -env_logger = "0.11.2" -futures = "0.3.29" -lazy_static = "1.4.0" +env_logger = "0.11.5" +futures = "0.3.30" +lazy_static = "1.5.0" log = "0.4.20" marc = { version = "3.1.1", features = ["xml"] } paperclip = { version = "0.8.2", features = ["actix-base", "actix4", "uuid1", "v2"] } @@ -30,7 +30,7 @@ uuid = { version = "1.10.0", features = ["serde"] } xml-rs = "0.8.19" [dev-dependencies] -regex = "1.10.2" +regex = "1.10.6" [build-dependencies] dotenv = "0.15.0" From 57cbd31083f4462391d3060418279163c2962d9d Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 14:01:30 +0100 Subject: [PATCH 31/35] Update changelog --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5966023c..e5aa3d09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [538](https://github.com/thoth-pub/thoth/issues/538) - Update Project MUSE ONIX 3.0 export to reflect new specifications provided by Project MUSE. - [616](https://github.com/thoth-pub/thoth/pull/616) - Removed unused constant to comply with [`rustc 1.80.0`](https://github.com/rust-lang/rust/releases/tag/1.80.0) - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `time` to v0.3.36 - - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `actix-web` to v4.8 + - [616](https://github.com/thoth-pub/thoth/pull/616), [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `actix-web` to v4.9 - [616](https://github.com/thoth-pub/thoth/pull/616) - Upgrade `openssl` to v0.10.66 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `juniper` to v0.16.1 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `uuid` to v1.10.0 @@ -19,6 +19,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade `wasm-bindgen` to v0.2.93 - [586](https://github.com/thoth-pub/thoth/issues/586) - Upgrade rust to `1.80.1` in production and development `Dockerfile` - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `clap` to v4.5.16 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `env_logger` to v0.11.5 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `futures` to v0.3.30 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `jsonwebtoken` to v9.3.0 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `lazy_static` to v1.5.0 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `regex` to v1.10.6 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `strum` to v0.26.3 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `anyhow` to v1.0.86 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `thiserror` to v1.0.63 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `semver` to v1.0.23 ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). From 4b2543d35a666ca22627b8285a1766f97a9e79ff Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 14:04:34 +0100 Subject: [PATCH 32/35] Replace deprecated macro --- thoth-api/src/model/work/crud.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thoth-api/src/model/work/crud.rs b/thoth-api/src/model/work/crud.rs index 466ac023..adec7b28 100644 --- a/thoth-api/src/model/work/crud.rs +++ b/thoth-api/src/model/work/crud.rs @@ -25,7 +25,7 @@ impl Work { use diesel::sql_types::Text; let mut connection = db.get().unwrap(); // Allow case-insensitive searching (DOIs in database may have mixed casing) - sql_function!(fn lower(x: Nullable) -> Nullable); + define_sql_function!(fn lower(x: Nullable) -> Nullable); let mut query = dsl::work .filter(lower(dsl::doi).eq(doi.to_lowercase_string())) .into_boxed(); From e94b8c618cc883204c38c19685ddec67260f9d3f Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Tue, 27 Aug 2024 14:05:17 +0100 Subject: [PATCH 33/35] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5aa3d09..37c3c6c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `anyhow` to v1.0.86 - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `thiserror` to v1.0.63 - [621](https://github.com/thoth-pub/thoth/pull/621) - Upgrade `semver` to v1.0.23 + - [621](https://github.com/thoth-pub/thoth/pull/621) - Replace deprecated diesel macro `sql_function` with `define_sql_function` ### Fixed - [610](https://github.com/thoth-pub/thoth/issues/610) - Update code for Work Landing Page in all ONIX exports from "01" (Publisher’s corporate website) to "02" (Publisher’s website for a specified work). From 365106865748917bf8593a281ce20b72a76f45d1 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Wed, 28 Aug 2024 11:54:44 +0100 Subject: [PATCH 34/35] Bump v0.12.7 --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 12 ++++++------ thoth-api-server/Cargo.toml | 6 +++--- thoth-api/Cargo.toml | 4 ++-- thoth-app-server/Cargo.toml | 2 +- thoth-app/Cargo.toml | 6 +++--- thoth-client/Cargo.toml | 8 ++++---- thoth-errors/Cargo.toml | 2 +- thoth-export-server/Cargo.toml | 8 ++++---- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ac32095d..043eaf91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3040,7 +3040,7 @@ dependencies = [ [[package]] name = "thoth" -version = "0.12.6" +version = "0.12.7" dependencies = [ "cargo-husky", "clap", @@ -3055,7 +3055,7 @@ dependencies = [ [[package]] name = "thoth-api" -version = "0.12.6" +version = "0.12.7" dependencies = [ "actix-web", "argon2rs", @@ -3084,7 +3084,7 @@ dependencies = [ [[package]] name = "thoth-api-server" -version = "0.12.6" +version = "0.12.7" dependencies = [ "actix-cors", "actix-identity", @@ -3100,7 +3100,7 @@ dependencies = [ [[package]] name = "thoth-app" -version = "0.12.6" +version = "0.12.7" dependencies = [ "anyhow", "chrono", @@ -3129,7 +3129,7 @@ dependencies = [ [[package]] name = "thoth-app-server" -version = "0.12.6" +version = "0.12.7" dependencies = [ "actix-cors", "actix-web", @@ -3139,7 +3139,7 @@ dependencies = [ [[package]] name = "thoth-client" -version = "0.12.6" +version = "0.12.7" dependencies = [ "chrono", "graphql_client", @@ -3155,7 +3155,7 @@ dependencies = [ [[package]] name = "thoth-errors" -version = "0.12.6" +version = "0.12.7" dependencies = [ "actix-web", "csv", @@ -3176,7 +3176,7 @@ dependencies = [ [[package]] name = "thoth-export-server" -version = "0.12.6" +version = "0.12.7" dependencies = [ "actix-cors", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index a015f86b..5130d104 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth" -version = "0.12.6" +version = "0.12.7" authors = ["Javier Arias ", "Ross Higman "] edition = "2021" license = "Apache-2.0" @@ -16,11 +16,11 @@ maintenance = { status = "actively-developed" } members = ["thoth-api", "thoth-api-server", "thoth-app", "thoth-app-server", "thoth-client", "thoth-errors", "thoth-export-server"] [dependencies] -thoth-api = { version = "=0.12.6", path = "thoth-api", features = ["backend"] } -thoth-api-server = { version = "=0.12.6", path = "thoth-api-server" } -thoth-app-server = { version = "=0.12.6", path = "thoth-app-server" } -thoth-errors = { version = "=0.12.6", path = "thoth-errors" } -thoth-export-server = { version = "=0.12.6", path = "thoth-export-server" } +thoth-api = { version = "=0.12.7", path = "thoth-api", features = ["backend"] } +thoth-api-server = { version = "=0.12.7", path = "thoth-api-server" } +thoth-app-server = { version = "=0.12.7", path = "thoth-app-server" } +thoth-errors = { version = "=0.12.7", path = "thoth-errors" } +thoth-export-server = { version = "=0.12.7", path = "thoth-export-server" } clap = { version = "4.5.16", features = ["cargo", "env"] } dialoguer = { version = "0.11.0", features = ["password"] } dotenv = "0.15.0" diff --git a/thoth-api-server/Cargo.toml b/thoth-api-server/Cargo.toml index 045adcf0..533846fd 100644 --- a/thoth-api-server/Cargo.toml +++ b/thoth-api-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-api-server" -version = "0.12.6" +version = "0.12.7" authors = ["Javier Arias ", "Ross Higman "] edition = "2021" license = "Apache-2.0" @@ -9,8 +9,8 @@ repository = "https://github.com/thoth-pub/thoth" readme = "README.md" [dependencies] -thoth-api = { version = "=0.12.6", path = "../thoth-api", features = ["backend"] } -thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } +thoth-api = { version = "=0.12.7", path = "../thoth-api", features = ["backend"] } +thoth-errors = { version = "=0.12.7", path = "../thoth-errors" } actix-web = "4.9" actix-cors = "0.7.0" actix-identity = "0.7.1" diff --git a/thoth-api/Cargo.toml b/thoth-api/Cargo.toml index 4a4a7e92..2dccc3a9 100644 --- a/thoth-api/Cargo.toml +++ b/thoth-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-api" -version = "0.12.6" +version = "0.12.7" authors = ["Javier Arias ", "Ross Higman "] edition = "2021" license = "Apache-2.0" @@ -16,7 +16,7 @@ maintenance = { status = "actively-developed" } backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "actix-web", "jsonwebtoken"] [dependencies] -thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } +thoth-errors = { version = "=0.12.7", path = "../thoth-errors" } actix-web = { version = "4.8", optional = true } argon2rs = "0.2.5" isbn2 = "0.4.0" diff --git a/thoth-app-server/Cargo.toml b/thoth-app-server/Cargo.toml index f6c1c0b7..22aebc25 100644 --- a/thoth-app-server/Cargo.toml +++ b/thoth-app-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-app-server" -version = "0.12.6" +version = "0.12.7" authors = ["Javier Arias ", "Ross Higman "] edition = "2021" license = "Apache-2.0" diff --git a/thoth-app/Cargo.toml b/thoth-app/Cargo.toml index 605a6305..70b2ffa6 100644 --- a/thoth-app/Cargo.toml +++ b/thoth-app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-app" -version = "0.12.6" +version = "0.12.7" authors = ["Javier Arias ", "Ross Higman "] edition = "2021" license = "Apache-2.0" @@ -36,8 +36,8 @@ uuid = { version = "1.10.0", features = ["serde", "v4"] } # `getrandom` is a dependency of `uuid`, we need to explicitly import and include the `js` feature to enable wasm # https://docs.rs/getrandom/latest/getrandom/#webassembly-support getrandom = { version = "0.2", features = ["js"] } -thoth-api = { version = "=0.12.6", path = "../thoth-api" } -thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } +thoth-api = { version = "=0.12.7", path = "../thoth-api" } +thoth-errors = { version = "=0.12.7", path = "../thoth-errors" } [build-dependencies] dotenv = "0.15.0" diff --git a/thoth-client/Cargo.toml b/thoth-client/Cargo.toml index 028354b1..268c13ab 100644 --- a/thoth-client/Cargo.toml +++ b/thoth-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-client" -version = "0.12.6" +version = "0.12.7" authors = ["Javier Arias ", "Ross Higman "] edition = "2021" license = "Apache-2.0" @@ -10,8 +10,8 @@ readme = "README.md" build = "build.rs" [dependencies] -thoth-api = {version = "=0.12.6", path = "../thoth-api" } -thoth-errors = {version = "=0.12.6", path = "../thoth-errors" } +thoth-api = {version = "=0.12.7", path = "../thoth-api" } +thoth-errors = {version = "=0.12.7", path = "../thoth-errors" } graphql_client = "0.14.0" chrono = { version = "0.4.38", features = ["serde"] } reqwest = { version = "0.11", features = ["json"] } @@ -22,4 +22,4 @@ serde_json = "1.0" uuid = { version = "1.10.0", features = ["serde"] } [build-dependencies] -thoth-api = { version = "=0.12.6", path = "../thoth-api", features = ["backend"] } +thoth-api = { version = "=0.12.7", path = "../thoth-api", features = ["backend"] } diff --git a/thoth-errors/Cargo.toml b/thoth-errors/Cargo.toml index dfd62875..a36c2c66 100644 --- a/thoth-errors/Cargo.toml +++ b/thoth-errors/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-errors" -version = "0.12.6" +version = "0.12.7" authors = ["Javier Arias ", "Ross Higman "] edition = "2021" license = "Apache-2.0" diff --git a/thoth-export-server/Cargo.toml b/thoth-export-server/Cargo.toml index 76d7b9e4..f10427e2 100644 --- a/thoth-export-server/Cargo.toml +++ b/thoth-export-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thoth-export-server" -version = "0.12.6" +version = "0.12.7" authors = ["Javier Arias ", "Ross Higman "] edition = "2021" license = "Apache-2.0" @@ -10,9 +10,9 @@ readme = "README.md" build = "build.rs" [dependencies] -thoth-api = { version = "=0.12.6", path = "../thoth-api" } -thoth-errors = { version = "=0.12.6", path = "../thoth-errors" } -thoth-client = { version = "=0.12.6", path = "../thoth-client" } +thoth-api = { version = "=0.12.7", path = "../thoth-api" } +thoth-errors = { version = "=0.12.7", path = "../thoth-errors" } +thoth-client = { version = "=0.12.7", path = "../thoth-client" } actix-web = "4.9" actix-cors = "0.7.0" cc_license = "0.1.0" From 0f3708e7979df208aac4fef56ef8d7a508068874 Mon Sep 17 00:00:00 2001 From: Javier Arias Date: Wed, 28 Aug 2024 11:55:15 +0100 Subject: [PATCH 35/35] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a20f4e3a..b3494b12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [[0.12.7]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.7) - 2024-08-28 ### Changed - [538](https://github.com/thoth-pub/thoth/issues/538) - Update Project MUSE ONIX 3.0 export to reflect new specifications provided by Project MUSE. - [616](https://github.com/thoth-pub/thoth/pull/616) - Removed unused constant to comply with [`rustc 1.80.0`](https://github.com/rust-lang/rust/releases/tag/1.80.0)