Compare commits

...

2 Commits

Author SHA1 Message Date
mfahampshire f6e50c41df add autodoc to workspace 2024-11-06 13:20:55 +01:00
mfahampshire 4d8d784f39 clippy 2024-11-06 13:18:55 +01:00
3 changed files with 32 additions and 9 deletions
Generated
+22 -1
View File
@@ -430,6 +430,14 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "autodoc"
version = "0.1.0"
dependencies = [
"env_logger 0.11.5",
"log",
]
[[package]]
name = "axum"
version = "0.6.20"
@@ -2354,6 +2362,19 @@ dependencies = [
"termcolor",
]
[[package]]
name = "env_logger"
version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
dependencies = [
"anstream",
"anstyle",
"env_filter",
"humantime 2.1.0",
"log",
]
[[package]]
name = "envy"
version = "0.4.2"
@@ -7468,7 +7489,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d"
dependencies = [
"env_logger",
"env_logger 0.7.1",
"log",
]
+1 -1
View File
@@ -98,7 +98,7 @@ members = [
"common/wasm/utils",
"common/wireguard",
"common/wireguard-types",
# "documentation/autodoc",
"documentation/autodoc",
"explorer-api",
"explorer-api/explorer-api-requests",
"explorer-api/explorer-client",
+9 -7
View File
@@ -126,9 +126,10 @@ fn main() -> io::Result<()> {
let mut file = File::create(format!("{}/{}-commands.md", WRITE_PATH, last_word.unwrap()))?;
writeln!(
file,
"# {} Binary Commands (Autogenerated)",
format!("`{}`", last_word.unwrap())
"# `{}` Binary Commands (Autogenerated)",
last_word.unwrap()
)?;
writeln!(
file,
"\nThese docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script."
@@ -151,9 +152,10 @@ fn main() -> io::Result<()> {
let mut file = File::create(format!("{}/{}-commands.md", WRITE_PATH, last_word.unwrap()))?;
writeln!(
file,
"# {} Binary Commands (Autogenerated)",
format!("`{}`", last_word.unwrap())
"# `{}` Binary Commands (Autogenerated)",
last_word.unwrap()
)?;
writeln!(
file,
"\nThese docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script."
@@ -190,9 +192,9 @@ fn execute_command_own_file(main_command: &str, subcommand: &str) -> io::Result<
// this check is basically checking for the rare commands (rn just one) that start a process with no params
// perhaps if this list grows we could just add a timeout and shunt the running and writing
// into a thread with a timeout or something but for right now its fine / thats overkill
if get_last_word_from_filepath(main_command).unwrap() == "nym-node" && subcommand == "run"
|| get_last_word_from_filepath(main_command).unwrap() == "nym-api" && subcommand == "run"
|| get_last_word_from_filepath(main_command).unwrap() == "nymvisor" && subcommand == "run"
let last_word = get_last_word_from_filepath(main_command).unwrap();
if (last_word == "nym-node" || last_word == "nym-api" || last_word == "nymvisor")
&& subcommand == "run"
{
info!("SKIPPING {} {}", main_command, subcommand);
} else {