flowey_cli/cli/debug/
list_nodes.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4/// (debug) list all registered flowey nodes
5#[derive(clap::Args)]
6pub struct ListNodes;
7
8impl ListNodes {
9    pub fn run(self) -> anyhow::Result<()> {
10        // FUTURE: it might be worth improving this output to leverage the DAG?
11        let mut v = flowey_core::node::list_all_registered_nodes()
12            .map(|h| h.modpath())
13            .collect::<Vec<_>>();
14        v.sort();
15        for node in v {
16            println!("{node}")
17        }
18
19        Ok(())
20    }
21}