Skip to content

Commit

Permalink
Update dependencies (#238)
Browse files Browse the repository at this point in the history
Update workspace dependencies.

Drive-by:
- Adjusts the scorecard lambda function for the updated libraries.

Signed-off-by: Rémy Greinhofer <[email protected]>
  • Loading branch information
rgreinho authored Sep 3, 2024
1 parent 3e10b81 commit 40e0db9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
52 changes: 26 additions & 26 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,57 +14,57 @@ resolver = "2"
[workspace.dependencies]
async-std = "1"
aws_lambda_events = "0.15.0"
aws-config = "1.0.0"
aws-sdk-ecs = "1.1.0"
aws-sdk-s3 = "1.1.0"
aws-sdk-sqs = "1.1.0"
aws-config = "1.5.5"
aws-sdk-ecs = "1.42.0"
aws-sdk-s3 = "1.47.0"
aws-sdk-sqs = "1.40.0"
aws-smithy-types-convert = "0.60.8"
axum = "0.7"
chrono = "0.4.19"
clap = "4.0.10"
clap = "4.5.16"
color-eyre = "0.6.2"
csv = "1.1"
dotenv = "0.15.0"
fontdb = "0.20.0"
dotenv = "0.14.1"
fontdb = "0.21.0"
heck = "0.5.0"
http = "1.0.0"
image = "0.25.0"
lambda_http = "0.12.0"
image = "0.25.2"
lambda_http = "0.13.0"
lambda_runtime = "0.12.0"
libflate = "2.0.0"
lopdf = "0.33.0"
minijinja = "2.0.1"
lopdf = "0.34.0"
minijinja = "2.2.0"
nats = "0.25.0"
once_cell = "1.12.0"
pyo3 = "0.22.0"
regex = "1.6.0"
reqwest = "0.12.2"
pyo3 = "0.22.2"
regex = "1.10.6"
reqwest = "0.12.7"
rstest = "0.22.0"
rust_decimal = "1.34.2"
rust_decimal_macros = "1.34.2"
sea-orm = "0.12.1"
sea-orm-migration = "0.12.1"
serde = "1.0.197"
serde_json = "1.0.114"
rust_decimal = "1.36.0"
rust_decimal_macros = "1.36.0"
sea-orm = "1.0.1"
sea-orm-migration = "1.0.1"
serde = "1.0.209"
serde_json = "1.0.127"
serde_plain = "1.0.2"
serde_with = "3.6.1"
serde_with = "3.9.0"
simple-error = "0.3.0"
slug = "0.1.5"
slug = "0.1.6"
svg2pdf = "0.11.0"
thiserror = "1.0"
time = "0.3.34"
tokio = "1"
tower = "0.4.12"
tokio = "1.40.0"
tower = "0.5.0"
tower-cookies = "0.10.0"
tower-http = "0.5.0"
tracing = "0.1.34"
tracing-subscriber = "0.3.18"
trauma = "2.1.0"
url = "2.4.1"
usvg = "0.42.0"
usvg = "0.43.0"
uuid = "1.7.0"
walkdir = "2.4.0"
zip = "2.1.3"
zip = "2.2.0"


[profile.flamegraph]
Expand Down
10 changes: 5 additions & 5 deletions lambdas/src/scorecard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn function_handler(event: LambdaEvent<SqsEvent>) -> Result<(), Error> {
let key = format!("{}/{}-{}-{}.pdf", year, country, region, city);

// Prepare the font database.
let mut fontdb = usvg::fontdb::Database::new();
let mut fontdb = svg2pdf::usvg::fontdb::Database::new();
fontdb.load_system_fonts();

// Load custom fonts.
Expand Down Expand Up @@ -75,19 +75,19 @@ async fn function_handler(event: LambdaEvent<SqsEvent>) -> Result<(), Error> {
Ok(())
}

fn pdf_convert(svg: &str, fontdb: &usvg::fontdb::Database) -> Result<Vec<u8>, String> {
fn pdf_convert(svg: &str, fontdb: &svg2pdf::usvg::fontdb::Database) -> Result<Vec<u8>, String> {
// Set rendering options.
let options = usvg::Options {
let options = svg2pdf::usvg::Options {
fontdb: Arc::new(fontdb.clone()),
..usvg::Options::default()
..svg2pdf::usvg::Options::default()
};

// Set conversion options.
let conversion_options = ConversionOptions::default();
let page_options = PageOptions::default();

// Load the svg nodes.
let tree = usvg::Tree::from_str(svg, &options).map_err(|err| err.to_string())?;
let tree = svg2pdf::usvg::Tree::from_str(svg, &options).map_err(|err| err.to_string())?;

// Convert to PDF.
Ok(svg2pdf::to_pdf(&tree, conversion_options, page_options))
Expand Down

0 comments on commit 40e0db9

Please sign in to comment.