Skip to content

Commit 03b4ebd

Browse files
committed
chore: upgrade to rpgp v0.17
1 parent 895f43a commit 03b4ebd

File tree

16 files changed

+308
-166
lines changed

16 files changed

+308
-166
lines changed

Cargo.lock

Lines changed: 185 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ rand = "0.8.5"
4545
regex = "1"
4646
reqwest = { version = "0.12.7", features = ["json"] }
4747

48-
pgp = "0.15"
48+
pgp = "0.17"
4949

5050
serde = { version = "1.0.208", features = ["derive"] }
5151
serde_json = "1.0"

src/commands/gen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::utils::prompt::{prompt_password, prompt_text};
1010
use crate::utils::rpgp::{generate_key_pair, get_vault_location, user_id};
1111
use crate::utils::vecu8::ToHex;
1212
use anyhow::{bail, Context};
13-
use pgp::types::PublicKeyTrait;
14-
use pgp::ArmorOptions;
13+
use pgp::composed::ArmorOptions;
14+
use pgp::types::KeyDetails;
1515
use std::fs;
1616

1717
extern crate keyring;

src/commands/get/keys.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use super::*;
2-
use crate::utils::config::Config;
32

43
/// List all keys in the config
54
#[derive(Parser)]

src/commands/import.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ use crate::utils::prompt::prompt_text;
55
use crate::utils::rpgp::get_vault_location;
66
use crate::utils::vecu8::ToHex;
77
use clap::Subcommand;
8-
use pgp::ArmorOptions;
9-
use pgp::{types::PublicKeyTrait, Deserializable};
108
use std::fs;
119
use std::io::Cursor;
1210

11+
use pgp::{
12+
composed::{ArmorOptions, Deserializable},
13+
types::KeyDetails,
14+
};
15+
1316
/// Import ascii armored keys from a file
1417
#[derive(Parser, Debug)]
1518
pub struct Args {
@@ -46,7 +49,7 @@ pub async fn command(args: Args, _config: Config) -> Result<()> {
4649
.context("Failed to get user id from key")?
4750
.id
4851
.id()
49-
.to_string();
52+
.to_hex();
5053

5154
// TODO: fix this
5255
let primary_user_id = if only_hex(&first_user_id)

src/commands/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ pub(super) use colored::Colorize;
55
// With subcommands
66
pub mod config;
77
pub mod get;
8+
pub mod invite;
89
pub mod keyring;
910
pub mod project;
1011

1112
// No subcommands
1213
pub mod auth;
14+
pub mod completion;
1315
pub mod export;
1416
pub mod gen;
1517
pub mod import;
@@ -26,4 +28,3 @@ pub mod upload;
2628
pub mod variables;
2729
pub mod version;
2830
pub mod whoami;
29-
pub mod completion;

src/commands/project/add_users.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use crate::{
99
variable::{EncryptedVariable, ToKVPair},
1010
},
1111
};
12-
use pgp::{Deserializable, SignedPublicKey};
12+
use pgp::composed::{Deserializable, SignedPublicKey};
1313
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
1414
use reqwest::header;
1515
use serde_json::json;

src/commands/project/remove_user.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{collections::HashSet, fmt::Display};
33
use anyhow::Result;
44
use clap::Parser;
55
use envx_sdk::models::RemoveUserBody;
6-
use pgp::{Deserializable, SignedPublicKey};
6+
use pgp::composed::{Deserializable, SignedPublicKey};
77
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
88
use reqwest::header;
99
use serde_json::json;

src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ commands_enum!(
5252
config,
5353
get,
5454
keyring,
55-
project
55+
project,
56+
invite
5657
);
5758

5859
fn spawn_update_task() -> tokio::task::JoinHandle<anyhow::Result<String>> {

src/sdk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::{
1010
},
1111
};
1212
use anyhow::bail;
13-
use pgp::{Deserializable, SignedPublicKey};
13+
use pgp::composed::{Deserializable, SignedPublicKey};
1414
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
1515
use reqwest::{header, StatusCode};
1616
use serde::{Deserialize, Serialize};

0 commit comments

Comments
 (0)