From 68579934c93f6ed2edbc97474560d6a8a00e8f70 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 1 Oct 2024 15:35:13 +0300 Subject: [PATCH] fix(cli): expose hidden structs (#1856) closes #1843 --- .changes/cli-hidden-structs.md | 5 +++++ plugins/cli/src/error.rs | 2 ++ plugins/cli/src/lib.rs | 5 +++-- plugins/sql/permissions/autogenerated/reference.md | 2 +- plugins/sql/permissions/schemas/schema.json | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .changes/cli-hidden-structs.md diff --git a/.changes/cli-hidden-structs.md b/.changes/cli-hidden-structs.md new file mode 100644 index 000000000..61619a05c --- /dev/null +++ b/.changes/cli-hidden-structs.md @@ -0,0 +1,5 @@ +--- +"cli": patch +--- + +Expose `Matches`, `SubcommandMatches` and `ArgData` structs. \ No newline at end of file diff --git a/plugins/cli/src/error.rs b/plugins/cli/src/error.rs index b4bd28722..2b5e16029 100644 --- a/plugins/cli/src/error.rs +++ b/plugins/cli/src/error.rs @@ -18,3 +18,5 @@ impl Serialize for Error { serializer.serialize_str(self.to_string().as_ref()) } } + +pub type Result = std::result::Result; diff --git a/plugins/cli/src/lib.rs b/plugins/cli/src/lib.rs index 0e65409ef..38f64f835 100644 --- a/plugins/cli/src/lib.rs +++ b/plugins/cli/src/lib.rs @@ -23,8 +23,9 @@ mod error; mod parser; use config::{Arg, Config}; -pub use error::Error; -type Result = std::result::Result; + +pub use error::{Error, Result}; +pub use parser::{ArgData, Matches, SubcommandMatches}; pub struct Cli(PluginApi); diff --git a/plugins/sql/permissions/autogenerated/reference.md b/plugins/sql/permissions/autogenerated/reference.md index 5b887c94e..2a70f7b39 100644 --- a/plugins/sql/permissions/autogenerated/reference.md +++ b/plugins/sql/permissions/autogenerated/reference.md @@ -1,6 +1,6 @@ ## Default Permission -# Tauri SQL Default Permissions +### Default Permissions This permission set configures what kind of database operations are available from the sql plugin. diff --git a/plugins/sql/permissions/schemas/schema.json b/plugins/sql/permissions/schemas/schema.json index e14f5cea8..e3add5374 100644 --- a/plugins/sql/permissions/schemas/schema.json +++ b/plugins/sql/permissions/schemas/schema.json @@ -335,7 +335,7 @@ "const": "deny-select" }, { - "description": "# Tauri SQL Default Permissions\n\nThis permission set configures what kind of\ndatabase operations are available from the sql plugin.\n\n### Granted Permissions\n\nAll reading related operations are enabled.\nAlso allows to load or close a connection.\n\n", + "description": "### Default Permissions\n\nThis permission set configures what kind of\ndatabase operations are available from the sql plugin.\n\n### Granted Permissions\n\nAll reading related operations are enabled.\nAlso allows to load or close a connection.\n\n", "type": "string", "const": "default" }