cli: interactive `rad publish`
Since rad publish is an irreversible action, add a confirmation flow
to make sure the user is asked if they are sure before running.
The confirmation prompt looks like:
?
! rad:z4ZMHfa9vubWdx7bkRBaRxgZwFBtW is about to be made public which makes it available to the Radicle network.
! Are you sure you want to make rad:z4ZMHfa9vubWdx7bkRBaRxgZwFBtW public? (Y/n)
9 files changed
+129
-45
423cf604
→
788d54c5
modified crates/radicle-cli/src/commands/clean.rs
@@ -17,7 +17,7 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/commands/id.rs
@@ -53,7 +53,10 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -78,10 +81,10 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -258,10 +261,10 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/commands/init.rs
@@ -500,11 +500,14 @@ pub fn setup_signing(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -536,7 +539,10 @@ pub fn setup_signing(
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/commands/publish.rs
@@ -6,6 +6,7 @@ use radicle::cob;
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -44,29 +45,57 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
@@ -76,7 +105,7 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/commands/publish/args.rs
@@ -1,4 +1,9 @@
| + | |
| + | |
| + | |
| + | |
|
|
| + | |
|
|
|
|
|
@@ -14,7 +19,7 @@ single delegate. The delegate must be the currently authenticated
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -22,6 +27,21 @@ pub struct Args {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/terminal/format.rs
@@ -7,6 +7,7 @@ pub use radicle_term::{style, Paint};
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -105,6 +106,12 @@ pub fn policy(p: &Policy) -> Paint<String> {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-term/src/io.rs
@@ -11,7 +11,7 @@ use inquire::{ui::Color, ui::RenderConfig, Confirm, CustomType, Password};
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -238,12 +238,11 @@ pub fn ask<D: fmt::Display>(prompt: D, default: bool) -> bool {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-term/src/lib.rs
@@ -35,6 +35,17 @@ pub enum Interactive {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -48,9 +59,9 @@ impl Interactive {
|
|
|
|
|
|
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
modified crates/radicle/src/node/config.rs
@@ -78,6 +78,15 @@ pub enum Network {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|