upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2023-10-01 00:00:00 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2023-10-01 00:00:00 +0100
commitb9a88672b8734448615354e3f46748d2fdc2f647 (patch)
treefd9b55c4ea8a132ab31abec3b6b8a4833c9bd8ff
parent5dce8a09f0f980b878bd02b7e96fc001155492ec (diff)
feat(prs-create) send commit to relay
- add client - use client to send event - add async functionality - enabler for relay interaction whilst getting cli input
-rw-r--r--Cargo.lock215
-rw-r--r--Cargo.toml6
-rw-r--r--src/client.rs65
-rw-r--r--src/main.rs6
-rw-r--r--src/sub_commands/prs/create.rs20
-rw-r--r--src/sub_commands/prs/mod.rs4
-rw-r--r--test_utils/Cargo.toml2
7 files changed, 305 insertions, 13 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 219c02f..15bc112 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -268,6 +268,29 @@ dependencies = [
268] 268]
269 269
270[[package]] 270[[package]]
271name = "async-utility"
272version = "0.1.1"
273source = "registry+https://github.com/rust-lang/crates.io-index"
274checksum = "3716c0d3970fe92d79a8f4cda2caf91113574505dff5b18e455e549d4b078e98"
275dependencies = [
276 "futures-util",
277 "gloo-timers",
278 "tokio",
279 "wasm-bindgen-futures",
280]
281
282[[package]]
283name = "async_io_stream"
284version = "0.3.3"
285source = "registry+https://github.com/rust-lang/crates.io-index"
286checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c"
287dependencies = [
288 "futures",
289 "pharos",
290 "rustc_version",
291]
292
293[[package]]
271name = "atomic-waker" 294name = "atomic-waker"
272version = "1.1.2" 295version = "1.1.2"
273source = "registry+https://github.com/rust-lang/crates.io-index" 296source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -334,6 +357,7 @@ dependencies = [
334 "bitcoin_hashes 0.12.0", 357 "bitcoin_hashes 0.12.0",
335 "hex_lit", 358 "hex_lit",
336 "secp256k1", 359 "secp256k1",
360 "serde",
337] 361]
338 362
339[[package]] 363[[package]]
@@ -651,6 +675,12 @@ dependencies = [
651] 675]
652 676
653[[package]] 677[[package]]
678name = "data-encoding"
679version = "2.4.0"
680source = "registry+https://github.com/rust-lang/crates.io-index"
681checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308"
682
683[[package]]
654name = "derivative" 684name = "derivative"
655version = "2.2.0" 685version = "2.2.0"
656source = "registry+https://github.com/rust-lang/crates.io-index" 686source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1002,6 +1032,18 @@ dependencies = [
1002] 1032]
1003 1033
1004[[package]] 1034[[package]]
1035name = "gloo-timers"
1036version = "0.2.6"
1037source = "registry+https://github.com/rust-lang/crates.io-index"
1038checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c"
1039dependencies = [
1040 "futures-channel",
1041 "futures-core",
1042 "js-sys",
1043 "wasm-bindgen",
1044]
1045
1046[[package]]
1005name = "h2" 1047name = "h2"
1006version = "0.3.21" 1048version = "0.3.21"
1007source = "registry+https://github.com/rust-lang/crates.io-index" 1049source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1444,15 +1486,18 @@ version = "0.0.1"
1444dependencies = [ 1486dependencies = [
1445 "anyhow", 1487 "anyhow",
1446 "assert_cmd", 1488 "assert_cmd",
1489 "async-trait",
1447 "chacha20poly1305", 1490 "chacha20poly1305",
1448 "clap", 1491 "clap",
1449 "dialoguer", 1492 "dialoguer",
1450 "directories", 1493 "directories",
1451 "duplicate", 1494 "duplicate",
1495 "futures",
1452 "git2", 1496 "git2",
1453 "keyring", 1497 "keyring",
1454 "mockall", 1498 "mockall",
1455 "nostr", 1499 "nostr",
1500 "nostr-sdk",
1456 "once_cell", 1501 "once_cell",
1457 "passwords", 1502 "passwords",
1458 "rexpect 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 1503 "rexpect 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1461,6 +1506,7 @@ dependencies = [
1461 "serde_json", 1506 "serde_json",
1462 "serial_test", 1507 "serial_test",
1463 "test_utils", 1508 "test_utils",
1509 "tokio",
1464 "zeroize", 1510 "zeroize",
1465] 1511]
1466 1512
@@ -1499,25 +1545,56 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
1499 1545
1500[[package]] 1546[[package]]
1501name = "nostr" 1547name = "nostr"
1502version = "0.23.0" 1548version = "0.24.0"
1503source = "registry+https://github.com/rust-lang/crates.io-index" 1549source = "registry+https://github.com/rust-lang/crates.io-index"
1504checksum = "525a8f75106f4eeb1fedaacadc61547548fe4715c3edde7d03eed2900b467952" 1550checksum = "df0af088a37ea0026bf96dcd66db8bf21ed7ff528b7cbe34b7f32f6af3ae14a0"
1505dependencies = [ 1551dependencies = [
1506 "aes 0.8.3", 1552 "aes 0.8.3",
1507 "base64", 1553 "base64",
1508 "bech32",
1509 "bip39", 1554 "bip39",
1510 "bitcoin", 1555 "bitcoin",
1511 "bitcoin_hashes 0.12.0",
1512 "cbc", 1556 "cbc",
1557 "chacha20",
1513 "getrandom", 1558 "getrandom",
1514 "instant", 1559 "instant",
1560 "once_cell",
1515 "reqwest", 1561 "reqwest",
1516 "secp256k1",
1517 "serde", 1562 "serde",
1518 "serde_json", 1563 "serde_json",
1519 "tracing", 1564 "tracing",
1520 "url", 1565 "url-fork",
1566]
1567
1568[[package]]
1569name = "nostr-sdk"
1570version = "0.24.0"
1571source = "registry+https://github.com/rust-lang/crates.io-index"
1572checksum = "5facab78c73baf3853f8c807006e23567dd3825392ef13a3a07122f4ce18b56d"
1573dependencies = [
1574 "async-utility",
1575 "nostr",
1576 "nostr-sdk-net",
1577 "once_cell",
1578 "thiserror",
1579 "tokio",
1580 "tracing",
1581]
1582
1583[[package]]
1584name = "nostr-sdk-net"
1585version = "0.24.0"
1586source = "registry+https://github.com/rust-lang/crates.io-index"
1587checksum = "fa4058b0267a1537c25b4674db9ed7a18152fc4c33df246dd4a88701007084ee"
1588dependencies = [
1589 "futures-util",
1590 "thiserror",
1591 "tokio",
1592 "tokio-rustls",
1593 "tokio-socks",
1594 "tokio-tungstenite",
1595 "url-fork",
1596 "webpki-roots",
1597 "ws_stream_wasm",
1521] 1598]
1522 1599
1523[[package]] 1600[[package]]
@@ -1597,6 +1674,16 @@ dependencies = [
1597] 1674]
1598 1675
1599[[package]] 1676[[package]]
1677name = "num_cpus"
1678version = "1.16.0"
1679source = "registry+https://github.com/rust-lang/crates.io-index"
1680checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
1681dependencies = [
1682 "hermit-abi",
1683 "libc",
1684]
1685
1686[[package]]
1600name = "object" 1687name = "object"
1601version = "0.32.1" 1688version = "0.32.1"
1602source = "registry+https://github.com/rust-lang/crates.io-index" 1689source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1717,6 +1804,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1717checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 1804checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
1718 1805
1719[[package]] 1806[[package]]
1807name = "pharos"
1808version = "0.5.3"
1809source = "registry+https://github.com/rust-lang/crates.io-index"
1810checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414"
1811dependencies = [
1812 "futures",
1813 "rustc_version",
1814]
1815
1816[[package]]
1720name = "pin-project-lite" 1817name = "pin-project-lite"
1721version = "0.2.13" 1818version = "0.2.13"
1722source = "registry+https://github.com/rust-lang/crates.io-index" 1819source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2085,6 +2182,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2085checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 2182checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
2086 2183
2087[[package]] 2184[[package]]
2185name = "rustc_version"
2186version = "0.4.0"
2187source = "registry+https://github.com/rust-lang/crates.io-index"
2188checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
2189dependencies = [
2190 "semver",
2191]
2192
2193[[package]]
2088name = "rustix" 2194name = "rustix"
2089version = "0.37.24" 2195version = "0.37.24"
2090source = "registry+https://github.com/rust-lang/crates.io-index" 2196source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2249,6 +2355,18 @@ dependencies = [
2249] 2355]
2250 2356
2251[[package]] 2357[[package]]
2358name = "semver"
2359version = "1.0.20"
2360source = "registry+https://github.com/rust-lang/crates.io-index"
2361checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090"
2362
2363[[package]]
2364name = "send_wrapper"
2365version = "0.6.0"
2366source = "registry+https://github.com/rust-lang/crates.io-index"
2367checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"
2368
2369[[package]]
2252name = "serde" 2370name = "serde"
2253version = "1.0.188" 2371version = "1.0.188"
2254source = "registry+https://github.com/rust-lang/crates.io-index" 2372source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2555,12 +2673,25 @@ dependencies = [
2555 "bytes", 2673 "bytes",
2556 "libc", 2674 "libc",
2557 "mio", 2675 "mio",
2676 "num_cpus",
2558 "pin-project-lite", 2677 "pin-project-lite",
2559 "socket2 0.5.4", 2678 "socket2 0.5.4",
2679 "tokio-macros",
2560 "windows-sys 0.48.0", 2680 "windows-sys 0.48.0",
2561] 2681]
2562 2682
2563[[package]] 2683[[package]]
2684name = "tokio-macros"
2685version = "2.1.0"
2686source = "registry+https://github.com/rust-lang/crates.io-index"
2687checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
2688dependencies = [
2689 "proc-macro2",
2690 "quote",
2691 "syn 2.0.38",
2692]
2693
2694[[package]]
2564name = "tokio-rustls" 2695name = "tokio-rustls"
2565version = "0.24.1" 2696version = "0.24.1"
2566source = "registry+https://github.com/rust-lang/crates.io-index" 2697source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2583,6 +2714,21 @@ dependencies = [
2583] 2714]
2584 2715
2585[[package]] 2716[[package]]
2717name = "tokio-tungstenite"
2718version = "0.20.1"
2719source = "registry+https://github.com/rust-lang/crates.io-index"
2720checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c"
2721dependencies = [
2722 "futures-util",
2723 "log",
2724 "rustls",
2725 "tokio",
2726 "tokio-rustls",
2727 "tungstenite",
2728 "webpki-roots",
2729]
2730
2731[[package]]
2586name = "tokio-util" 2732name = "tokio-util"
2587version = "0.7.9" 2733version = "0.7.9"
2588source = "registry+https://github.com/rust-lang/crates.io-index" 2734source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2658,6 +2804,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2658checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 2804checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed"
2659 2805
2660[[package]] 2806[[package]]
2807name = "tungstenite"
2808version = "0.20.1"
2809source = "registry+https://github.com/rust-lang/crates.io-index"
2810checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9"
2811dependencies = [
2812 "byteorder",
2813 "bytes",
2814 "data-encoding",
2815 "http",
2816 "httparse",
2817 "log",
2818 "rand",
2819 "rustls",
2820 "sha1",
2821 "thiserror",
2822 "url",
2823 "utf-8",
2824]
2825
2826[[package]]
2661name = "typenum" 2827name = "typenum"
2662version = "1.17.0" 2828version = "1.17.0"
2663source = "registry+https://github.com/rust-lang/crates.io-index" 2829source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2725,10 +2891,28 @@ dependencies = [
2725 "form_urlencoded", 2891 "form_urlencoded",
2726 "idna", 2892 "idna",
2727 "percent-encoding", 2893 "percent-encoding",
2894]
2895
2896[[package]]
2897name = "url-fork"
2898version = "3.0.0"
2899source = "registry+https://github.com/rust-lang/crates.io-index"
2900checksum = "956afc9d7e101f0b718a6776489cd7998d0b17fc79f4cdb6ee6761fb72d1c2ce"
2901dependencies = [
2902 "form_urlencoded",
2903 "percent-encoding",
2728 "serde", 2904 "serde",
2905 "unicode-bidi",
2906 "unicode-normalization",
2729] 2907]
2730 2908
2731[[package]] 2909[[package]]
2910name = "utf-8"
2911version = "0.7.6"
2912source = "registry+https://github.com/rust-lang/crates.io-index"
2913checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
2914
2915[[package]]
2732name = "utf8parse" 2916name = "utf8parse"
2733version = "0.2.1" 2917version = "0.2.1"
2734source = "registry+https://github.com/rust-lang/crates.io-index" 2918source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3052,6 +3236,25 @@ dependencies = [
3052] 3236]
3053 3237
3054[[package]] 3238[[package]]
3239name = "ws_stream_wasm"
3240version = "0.7.4"
3241source = "registry+https://github.com/rust-lang/crates.io-index"
3242checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5"
3243dependencies = [
3244 "async_io_stream",
3245 "futures",
3246 "js-sys",
3247 "log",
3248 "pharos",
3249 "rustc_version",
3250 "send_wrapper",
3251 "thiserror",
3252 "wasm-bindgen",
3253 "wasm-bindgen-futures",
3254 "web-sys",
3255]
3256
3257[[package]]
3055name = "xdg-home" 3258name = "xdg-home"
3056version = "1.0.0" 3259version = "1.0.0"
3057source = "registry+https://github.com/rust-lang/crates.io-index" 3260source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 1b2c458..f7577a4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,17 +13,21 @@ categories = ["command-line-utilities","git"]
13 13
14[dependencies] 14[dependencies]
15anyhow = "1.0.75" 15anyhow = "1.0.75"
16async-trait = "0.1.73"
16chacha20poly1305 = "0.10.1" 17chacha20poly1305 = "0.10.1"
17clap = { version = "4.3.19", features = ["derive"] } 18clap = { version = "4.3.19", features = ["derive"] }
18dialoguer = "0.10.4" 19dialoguer = "0.10.4"
19directories = "5.0.1" 20directories = "5.0.1"
21futures = "0.3.28"
20git2 = "0.18.1" 22git2 = "0.18.1"
21keyring = "2.0.5" 23keyring = "2.0.5"
22nostr = "0.23.0" 24nostr = "0.24.0"
25nostr-sdk = "0.24.0"
23passwords = "3.1.13" 26passwords = "3.1.13"
24scrypt = "0.11.0" 27scrypt = "0.11.0"
25serde = { version = "1.0.181", features = ["derive"] } 28serde = { version = "1.0.181", features = ["derive"] }
26serde_json = "1.0.105" 29serde_json = "1.0.105"
30tokio = "1.33.0"
27zeroize = "1.6.0" 31zeroize = "1.6.0"
28 32
29[dev-dependencies] 33[dev-dependencies]
diff --git a/src/client.rs b/src/client.rs
new file mode 100644
index 0000000..a6f7dda
--- /dev/null
+++ b/src/client.rs
@@ -0,0 +1,65 @@
1// have you considered
2
3// TO USE ASYNC
4
5// in traits (required for mocking unit tests)
6// https://rust-lang.github.io/async-book/07_workarounds/05_async_in_traits.html
7// https://github.com/dtolnay/async-trait
8// see https://blog.rust-lang.org/inside-rust/2022/11/17/async-fn-in-trait-nightly.html
9// I think we can use the async-trait crate and switch to the native feature
10// which is currently in nightly. alternatively we can use nightly as it looks
11// certain that the implementation is going to make it to stable but we don't
12// want to inadvertlty use other features of nightly that might be removed.
13use anyhow::Result;
14use async_trait::async_trait;
15#[cfg(test)]
16use mockall::*;
17use nostr::Event;
18
19pub struct Client {
20 client: nostr_sdk::Client,
21}
22
23#[async_trait]
24#[cfg_attr(test, automock)]
25pub trait Connect {
26 fn default() -> Self;
27 fn new(opts: Params) -> Self;
28 async fn connect(&self) -> Result<()>;
29 async fn send_event_to(&self, url: &str, event: nostr::event::Event) -> Result<nostr::EventId>;
30}
31
32#[async_trait]
33impl Connect for Client {
34 fn default() -> Self {
35 Client {
36 client: nostr_sdk::Client::new(&nostr::Keys::generate()),
37 }
38 }
39 fn new(opts: Params) -> Self {
40 Client {
41 client: nostr_sdk::Client::new(&opts.keys.unwrap_or(nostr::Keys::generate())),
42 }
43 }
44 async fn connect(&self) -> Result<()> {
45 self.client.add_relay("ws://localhost:8080", None).await?;
46 self.client.connect().await;
47 // self.client.s
48 Ok(())
49 }
50 async fn send_event_to(&self, url: &str, event: Event) -> Result<nostr::EventId> {
51 Ok(self.client.send_event_to(url, event).await?)
52 }
53}
54
55#[derive(Default)]
56pub struct Params {
57 pub keys: Option<nostr::Keys>,
58}
59
60impl Params {
61 pub fn with_keys(mut self, keys: nostr::Keys) -> Self {
62 self.keys = Some(keys);
63 self
64 }
65}
diff --git a/src/main.rs b/src/main.rs
index 5094c11..9c37aa7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -5,6 +5,7 @@ use anyhow::Result;
5use clap::{Parser, Subcommand}; 5use clap::{Parser, Subcommand};
6 6
7mod cli_interactor; 7mod cli_interactor;
8mod client;
8mod config; 9mod config;
9mod git; 10mod git;
10mod key_handling; 11mod key_handling;
@@ -33,10 +34,11 @@ enum Commands {
33 Prs(sub_commands::prs::SubCommandArgs), 34 Prs(sub_commands::prs::SubCommandArgs),
34} 35}
35 36
36fn main() -> Result<()> { 37#[tokio::main]
38async fn main() -> Result<()> {
37 let cli = Cli::parse(); 39 let cli = Cli::parse();
38 match &cli.command { 40 match &cli.command {
39 Commands::Login(args) => sub_commands::login::launch(&cli, args), 41 Commands::Login(args) => sub_commands::login::launch(&cli, args),
40 Commands::Prs(args) => sub_commands::prs::launch(&cli, args), 42 Commands::Prs(args) => futures::executor::block_on(sub_commands::prs::launch(&cli, args)),
41 } 43 }
42} 44}
diff --git a/src/sub_commands/prs/create.rs b/src/sub_commands/prs/create.rs
index dd32c65..89ea652 100644
--- a/src/sub_commands/prs/create.rs
+++ b/src/sub_commands/prs/create.rs
@@ -3,6 +3,7 @@ use nostr::{prelude::sha1::Hash as Sha1Hash, EventBuilder, Marker, Tag, TagKind}
3 3
4use crate::{ 4use crate::{
5 cli_interactor::{Interactor, InteractorPrompt, PromptConfirmParms, PromptInputParms}, 5 cli_interactor::{Interactor, InteractorPrompt, PromptConfirmParms, PromptInputParms},
6 client::{Client, Connect, Params as ClientParams},
6 git::{Repo, RepoActions}, 7 git::{Repo, RepoActions},
7 login, Cli, 8 login, Cli,
8}; 9};
@@ -23,7 +24,7 @@ pub struct SubCommandArgs {
23 to_branch: Option<String>, 24 to_branch: Option<String>,
24} 25}
25 26
26pub fn launch( 27pub async fn launch(
27 cli_args: &Cli, 28 cli_args: &Cli,
28 _pr_args: &super::SubCommandArgs, 29 _pr_args: &super::SubCommandArgs,
29 args: &SubCommandArgs, 30 args: &SubCommandArgs,
@@ -81,6 +82,7 @@ pub fn launch(
81 let root_commit = git_repo 82 let root_commit = git_repo
82 .get_root_commit(to_branch.as_str()) 83 .get_root_commit(to_branch.as_str())
83 .context("failed to get root commit of the repository")?; 84 .context("failed to get root commit of the repository")?;
85
84 // create PR event 86 // create PR event
85 87
86 let keys = login::launch(&cli_args.nsec, &cli_args.password)?; 88 let keys = login::launch(&cli_args.nsec, &cli_args.password)?;
@@ -138,7 +140,23 @@ pub fn launch(
138 ); 140 );
139 } 141 }
140 142
143 let client = Client::new(ClientParams::default().with_keys(keys));
144
145 println!("connecting...");
146 client.connect().await?;
147 println!("connected...");
148
141 // TODO check if there is already a similarly named PR 149 // TODO check if there is already a similarly named PR
150 let _ = client
151 .send_event_to("ws://localhost:8080", pr_event)
152 .await?;
153 // TODO post each PR
154 // TODO report
155 println!("posted successfully to 4/5 of your relays and 0/4 of maintainers relays");
156 // should we have a relays in Repository event?
157 // yes
158 //
159
142 // TODO connect to relays and post 160 // TODO connect to relays and post
143 161
144 Ok(()) 162 Ok(())
diff --git a/src/sub_commands/prs/mod.rs b/src/sub_commands/prs/mod.rs
index c316e73..982e866 100644
--- a/src/sub_commands/prs/mod.rs
+++ b/src/sub_commands/prs/mod.rs
@@ -15,8 +15,8 @@ pub enum Commands {
15 Create(create::SubCommandArgs), 15 Create(create::SubCommandArgs),
16} 16}
17 17
18pub fn launch(cli_args: &Cli, pr_args: &SubCommandArgs) -> Result<()> { 18pub async fn launch(cli_args: &Cli, pr_args: &SubCommandArgs) -> Result<()> {
19 match &pr_args.prs_command { 19 match &pr_args.prs_command {
20 Commands::Create(args) => create::launch(cli_args, pr_args, args), 20 Commands::Create(args) => create::launch(cli_args, pr_args, args).await,
21 } 21 }
22} 22}
diff --git a/test_utils/Cargo.toml b/test_utils/Cargo.toml
index 3d936b5..1773d93 100644
--- a/test_utils/Cargo.toml
+++ b/test_utils/Cargo.toml
@@ -9,7 +9,7 @@ assert_cmd = "2.0.12"
9dialoguer = "0.10.4" 9dialoguer = "0.10.4"
10directories = "5.0.1" 10directories = "5.0.1"
11git2 = "0.18.1" 11git2 = "0.18.1"
12nostr = "0.23.0" 12nostr = "0.24.0"
13once_cell = "1.18.0" 13once_cell = "1.18.0"
14rand = "0.8" 14rand = "0.8"
15rexpect = { git = "https://github.com/phaer/rexpect.git", branch= "skip-ansi-escape-codes" } 15rexpect = { git = "https://github.com/phaer/rexpect.git", branch= "skip-ansi-escape-codes" }