From d184dbfc89e8b1f2fd84bec5bc52a04a0a4d020a Mon Sep 17 00:00:00 2001 From: Mari Date: Tue, 13 Feb 2024 17:17:27 +0100 Subject: [PATCH 1/5] remove pagination from integrations endpoint --- src/integrations.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/integrations.rs b/src/integrations.rs index 1bbf1dc..2907f9f 100644 --- a/src/integrations.rs +++ b/src/integrations.rs @@ -29,14 +29,6 @@ pub async fn handle_command(args: Arguments) -> Result<()> { #[derive(Parser)] struct ListArgs { - /// Page to display - #[clap(long)] - page: Option, - - /// Amount of integrations to display per page - #[clap(long)] - limit: Option, - /// Output of the webhooks #[clap(long, short, default_value = "table", value_enum)] output: IntegrationOutput, @@ -62,7 +54,7 @@ enum IntegrationOutput { async fn handle_integrations_list(args: ListArgs) -> Result<()> { let client = api_client_configuration(args.token, args.config, args.base_url).await?; - let integrations = integrations_get(&client, args.page, args.limit).await?; + let integrations = integrations_get(&client).await?; match args.output { IntegrationOutput::Table => { From 114cb87869156ff29e36dc5e811c19379826d3b6 Mon Sep 17 00:00:00 2001 From: Mari Date: Tue, 13 Feb 2024 17:19:11 +0100 Subject: [PATCH 2/5] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a15ade..faa3d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format of this file is based on [Keep a Changelog](https://keepachangelog.co ## [Unreleased] ### Added + - Add `integrations list` command (#267) - Add `front-matter-collection get` command (#271) - Add `front-matter-collection set` command (#271) @@ -14,6 +15,7 @@ The format of this file is based on [Keep a Changelog](https://keepachangelog.co - Add `notebook front-matter append` command (#271) - Add `notebook front-matter edit` command (#271) - Add `notebook front-matter delete` command (#271) +- Removed pagination from the `integrations list` command (#171) ### Deprecated From f33a3992ff36070db1bbc025f4321ca1760ecabb Mon Sep 17 00:00:00 2001 From: Mari Date: Wed, 21 Feb 2024 14:19:21 +0100 Subject: [PATCH 3/5] patch --- Cargo.lock | 37 +++++++++++++++---------------------- Cargo.toml | 2 +- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3985838..089dd67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,9 +194,8 @@ checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64uuid" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e3d2060139fc5977f18e2514ddd54aa594ee087f2fc8486a73f897423fd41b" +version = "1.1.0" +source = "git+ssh://git@github.com/fiberplane/fiberplane.git?branch=main#362db2ac82fa9c1c65315fe2d8124959fb87c60b" dependencies = [ "base64 0.13.1", "serde", @@ -936,9 +935,8 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fiberplane" -version = "1.0.0-beta.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0588955baa390005027bcf838c62bc5019b09dcbb00e338c84fab8ba1a0c9834" +version = "1.0.0-beta.10" +source = "git+ssh://git@github.com/fiberplane/fiberplane.git?branch=main#362db2ac82fa9c1c65315fe2d8124959fb87c60b" dependencies = [ "base64uuid", "fiberplane-api-client", @@ -950,9 +948,8 @@ dependencies = [ [[package]] name = "fiberplane-api-client" -version = "1.0.0-beta.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c2a4843aae941d7fdc9a0ef9498243877aa1753767e9fde5d4847e8a109bf0" +version = "1.0.0-beta.10" +source = "git+ssh://git@github.com/fiberplane/fiberplane.git?branch=main#362db2ac82fa9c1c65315fe2d8124959fb87c60b" dependencies = [ "anyhow", "base64uuid", @@ -966,9 +963,8 @@ dependencies = [ [[package]] name = "fiberplane-markdown" -version = "1.0.0-beta.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b59a2fb863026d71a3736b8c41abe9ff8f508a955050787edc85ac9992911c67" +version = "1.0.0-beta.10" +source = "git+ssh://git@github.com/fiberplane/fiberplane.git?branch=main#362db2ac82fa9c1c65315fe2d8124959fb87c60b" dependencies = [ "fiberplane-models", "pulldown-cmark", @@ -979,9 +975,8 @@ dependencies = [ [[package]] name = "fiberplane-models" -version = "1.0.0-beta.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "370d1dea212a27462f6d13cce0d7aae87d52f7981ab4c53d4bab9ea50c5829ab" +version = "1.0.0-beta.10" +source = "git+ssh://git@github.com/fiberplane/fiberplane.git?branch=main#362db2ac82fa9c1c65315fe2d8124959fb87c60b" dependencies = [ "base64 0.13.1", "base64uuid", @@ -1004,9 +999,8 @@ dependencies = [ [[package]] name = "fiberplane-provider-runtime" -version = "2.0.0-beta.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170b253723b90fc5d04874d2b29df6b6cf83fbed13b0e4fa336295c57f83e0d3" +version = "2.0.0-beta.10" +source = "git+ssh://git@github.com/fiberplane/fiberplane.git?branch=main#362db2ac82fa9c1c65315fe2d8124959fb87c60b" dependencies = [ "bytes", "fiberplane-models", @@ -1025,9 +1019,8 @@ dependencies = [ [[package]] name = "fiberplane-templates" -version = "1.0.0-beta.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14100e4f2ef6f8ffc2a134e5d6c9407eef0d8c9f3c18fe9826aa32cd6d46f562" +version = "1.0.0-beta.10" +source = "git+ssh://git@github.com/fiberplane/fiberplane.git?branch=main#362db2ac82fa9c1c65315fe2d8124959fb87c60b" dependencies = [ "base64uuid", "fiberplane-models", @@ -1093,7 +1086,7 @@ dependencies = [ [[package]] name = "fp" -version = "2.18.0" +version = "2.19.0" dependencies = [ "abort-on-drop", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 912f8b0..b379384 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -86,6 +86,6 @@ vergen = { version = "8.0.0", features = [ ] } [patch.crates-io] -#fiberplane = { git = "ssh://git@github.com/fiberplane/fiberplane.git", branch = "main" } +fiberplane = { git = "ssh://git@github.com/fiberplane/fiberplane.git", branch = "main" } #fp-bindgen-support = { git = "ssh://git@github.com/fiberplane/fp-bindgen.git", branch = "release-3.0.0" } #fp-bindgen-macros = { git = "ssh://git@github.com/fiberplane/fp-bindgen.git", branch = "release-3.0.0" } From bdef6a3c35e904baebe14fdc56f4b8aa2719ee37 Mon Sep 17 00:00:00 2001 From: Mari Date: Wed, 21 Feb 2024 14:26:51 +0100 Subject: [PATCH 4/5] update timetamps that are now optional as well --- src/integrations.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/integrations.rs b/src/integrations.rs index 2907f9f..589e014 100644 --- a/src/integrations.rs +++ b/src/integrations.rs @@ -85,8 +85,14 @@ impl From for IntegrationRow { Self { id: integration.id.to_string(), status: integration.status.to_string(), - created_at: integration.created_at.format(&Rfc3339).unwrap_or_default(), - updated_at: integration.updated_at.format(&Rfc3339).unwrap_or_default(), + created_at: integration.created_at.map_or_else( + || "n/a".to_string(), + |time| time.format(&Rfc3339).unwrap_or_default(), + ), + updated_at: integration.updated_at.map_or_else( + || "n/a".to_string(), + |time| time.format(&Rfc3339).unwrap_or_default(), + ), } } } From ba320fc92240ad85c087d373f823d5004c6226dd Mon Sep 17 00:00:00 2001 From: Mari Date: Wed, 21 Feb 2024 14:35:38 +0100 Subject: [PATCH 5/5] allow clippy --- src/experiments.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/experiments.rs b/src/experiments.rs index e53e9bb..e35706a 100644 --- a/src/experiments.rs +++ b/src/experiments.rs @@ -39,6 +39,7 @@ pub struct Arguments { } #[derive(Parser)] +#[allow(clippy::manual_non_exhaustive)] enum SubCommand { /// Append a message to the given notebook Message(MessageArgs),