Skip to content

refactor(iroh-cli)!: Use blobs and tags cli from iroh-blobs crate #2942

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

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ iroh-router = { path = "./iroh-router" }

iroh-gossip = { git = "https://github.com/n0-computer/iroh-gossip", branch = "main" }
iroh-docs = { git = "https://github.com/n0-computer/iroh-docs", branch = "main" }
iroh-blobs = { git = "https://github.com/n0-computer/iroh-blobs", branch = "main" }
iroh-blobs = { git = "https://github.com/n0-computer/iroh-blobs", branch = "cli" }
1 change: 1 addition & 0 deletions iroh-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ iroh = { version = "0.28.1", path = "../iroh", features = ["metrics"] }
iroh-gossip = "0.28.1"
iroh-docs = { version = "0.28.0", features = ["rpc"]}
iroh-metrics = { version = "0.28.0" }
iroh-blobs = { version = "0.28.1", features = ["cli"] }
parking_lot = "0.12.1"
pkarr = { version = "2.2.0", default-features = false }
portable-atomic = "1"
Expand Down
15 changes: 7 additions & 8 deletions iroh-cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,20 @@ use std::{
use anyhow::{ensure, Context, Result};
use clap::Parser;
use iroh::client::Iroh;
use iroh_blobs::cli::{BlobAddOptions, BlobSource};

use self::{
blobs::{BlobAddOptions, BlobSource},
rpc::RpcCommands,
start::RunType,
};
use self::{rpc::RpcCommands, start::RunType};
use crate::config::{ConsoleEnv, NodeConfig};

pub(crate) mod authors;
pub(crate) mod blobs;
pub(crate) mod console;
pub(crate) mod docs;
pub(crate) mod doctor;
pub(crate) mod gossip;
pub(crate) mod net;
pub(crate) mod rpc;
pub(crate) mod start;
pub(crate) mod tags;
pub use iroh_blobs::{cli as blobs, cli::tags};

/// iroh is a tool for building distributed apps.
///
Expand Down Expand Up @@ -191,7 +187,10 @@ impl Cli {
|client| async move {
match add_command {
None => Ok(()),
Some(command) => command.run(&client).await,
Some(command) => {
let node_addr = client.net().node_addr().await?;
command.run(&client.blobs(), node_addr).await
}
}
},
)
Expand Down
Loading
Loading