DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/Commands/GetAll.rs
1//! Wire method: `commands:getAll`.
2//! Returns all registered command IDs from Mountain's CommandRegistry.
3
4use std::sync::Arc;
5
6use serde_json::{Value, json};
7
8use crate::RunTime::ApplicationRunTime::ApplicationRunTime;
9
10pub async fn Fn(RunTime:Arc<ApplicationRunTime>) -> Result<Value, String> {
11 use CommonLibrary::Command::CommandExecutor::CommandExecutor;
12
13 let Commands = RunTime
14 .Environment
15 .GetAllCommands()
16 .await
17 .map_err(|Error| format!("commands:getAll failed: {}", Error))?;
18
19 Ok(json!(Commands))
20}