Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update deps #267

Merged
merged 3 commits into from
Apr 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
450 changes: 272 additions & 178 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ members = ["crates/*", "tests"]
[workspace.package]
version = "0.1.0"
edition = "2021"
authors = [
"Berend Sliedrecht <[email protected]>",
"Moritz Schlichting <[email protected]>",
"Jean-Louis Leysens <[email protected]>",
]
authors = ["Animo Solutions <[email protected]>"]
description = "Siera is a toolkit that allows you to interact with a Hyperledger Aries Cloud agent."
homepage = "https://siera.animo.id"
documentation = "https://docs.siera.animo.id"
Expand Down
2 changes: 1 addition & 1 deletion crates/agent/src/modules/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub struct ProofRequestResponse {
/// The first string is the name of the key/value pair
/// The second string is the operator that is used `>=`, `<=`, `=`, `>` or `>`
/// The third string is the the value that should be evaluated with
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Predicate(pub String, pub String, pub String);

impl FromStr for Predicate {
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ siera-afj-rest = { path = "../afj-rest", version = "0.*" }
siera-cloudagent-python = { path = "../cloudagent-python", version = "0.*" }
siera-logger = { path = "../logger", version = "0.*" }
base64 = "0.13.0"
clap = { version = "3.1.0", features = ["derive"] }
clap = { version = "4.2.5", features = ["derive"] }
colored = "2.0.0"
qr2term = "0.2.2"
serde = { version = "1.0.130", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ pub struct Cli {
pub environment: String,

/// Whether more verbose output should be printed
#[clap(long, short='v', help = HelpStrings::Verbose, parse(from_occurrences), conflicts_with = "quiet")]
pub verbose: usize,
#[clap(long, short='v', help = HelpStrings::Verbose, action = clap::ArgAction::Count, conflicts_with = "quiet")]
pub verbose: u8,

/// The main cli subcommands
#[clap(subcommand)]
Expand Down
7 changes: 7 additions & 0 deletions crates/cli/src/help_strings.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(clippy::missing_docs_in_private_items)]
use clap::builder::{IntoResettable, Resettable, StyledStr};
use std::convert::From;

/// Help documentation for CLI commands.
Expand Down Expand Up @@ -153,6 +154,12 @@ impl From<HelpStrings> for Option<&str> {
}
}

impl IntoResettable<StyledStr> for HelpStrings {
fn into_resettable(self) -> clap::builder::Resettable<StyledStr> {
Resettable::Value(StyledStr::from(self.as_str()))
}
}

#[allow(clippy::too_many_lines)]
impl HelpStrings {
const fn as_str(&self) -> &'static str {
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/modules/automation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub enum AutomationSubcommands {
name: String,

/// Attributes of the schema the credential definition will be based on
#[clap(long, short='a', multiple_occurrences(true), help = HelpStrings::AutomationCreateCredentialDefinitionAttributes)]
#[clap(long, short='a', help = HelpStrings::AutomationCreateCredentialDefinitionAttributes)]
attributes: Vec<String>,

/// Version of the schema the credential definition will be based on
Expand Down
11 changes: 6 additions & 5 deletions crates/cli/src/modules/wallet.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::error::Result;
use crate::help_strings::HelpStrings;
use crate::utils::loader::{Loader, LoaderVariant};
use clap::builder::PossibleValuesParser;
use clap::{Args, Subcommand};
use siera_agent::modules::wallet::{
CreateLocalDidOptions, Did, DidList, KeyType, SetDidEndpointOptions, WalletModule,
Expand All @@ -27,15 +28,15 @@ pub enum WalletSubcommands {
did: Option<String>,

/// The key type of the wallet e.g. ed25519, bls12381g2
#[clap(short, long, help=HelpStrings::WalletListKeyType, required = false, possible_values=&["ed25519", "bls12381g2"])]
#[clap(short, long, help=HelpStrings::WalletListKeyType, required = false, value_parser=PossibleValuesParser::new(["ed25519", "bls12381g2"]))]
key_type: Option<String>,

/// The did method to query for
#[clap(short, long, help=HelpStrings::WalletListMethod, required = false, possible_values=&["did", "sov"])]
#[clap(short, long, help=HelpStrings::WalletListMethod, required = false, value_parser=PossibleValuesParser::new(["did", "sov"]))]
method: Option<String>,

/// Available values : public, posted, wallet_only
#[clap(short, long, help=HelpStrings::WalletListPosture, required = false, possible_values=&["posted", "public", "wallet_only"])]
#[clap(short, long, help=HelpStrings::WalletListPosture, required = false, value_parser=PossibleValuesParser::new(["posted", "public", "wallet_only"])) ]
posture: Option<String>,

/// The verification key of interest
Expand All @@ -47,11 +48,11 @@ pub enum WalletSubcommands {
#[clap(about = HelpStrings::WalletCreate)]
CreateLocalDid {
/// The method to be used did or sov
#[clap(long, short, help=HelpStrings::WalletCreateMethod, required = true, default_value="did", possible_values=&["did", "sov"])]
#[clap(long, short, help=HelpStrings::WalletCreateMethod, required = true, default_value="did", value_parser=PossibleValuesParser::new(["did", "sov"]))]
method: String,

/// The key type e.g. ed25519 or bls12381g2
#[clap(long, short, help=HelpStrings::WalletListKeyType, required = true, default_value="ed25519", possible_values=&["ed25519", "bls12381g2"])]
#[clap(long, short, help=HelpStrings::WalletListKeyType, required = true, default_value="ed25519",value_parser=PossibleValuesParser::new(["ed25519", "bls12381g2"]))]
key_type: String,
},

Expand Down