diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 180a099..b5652cd 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -28,7 +28,7 @@ tempfile = "3.2.0" itertools = "0.12.1" walkdir = "2" anyhow = "1.0.65" -echo-library = "0.0.4" +echo-library = { path = "../echo-library" } composer-primitives = "0.0.3" sys-info = "0.9.1" diff --git a/echo-library/src/common/parse_module.rs b/echo-library/src/common/parse_module.rs index 3e258b8..4da473c 100644 --- a/echo-library/src/common/parse_module.rs +++ b/echo-library/src/common/parse_module.rs @@ -521,7 +521,7 @@ sp-runtime = { version = \"6.0.0\", default-features = false, git = \"https://gi pub fn generate_cargo_toml_dependencies(workflow: &Workflow) -> String { let mut dependency_map = HashMap::new(); - let hello_world_dependency = "hello_world_macro = {git= \"https://github.com/HugoByte/aurras.git\", branch = \"next\", package = \"hello_world_macro\"}" + let hello_world_dependency = "hello_world_macro = \"0.0.1\"" .to_string(); dependency_map.insert("hello_world", hello_world_dependency); diff --git a/echo-library/src/common/starlark_modules.rs b/echo-library/src/common/starlark_modules.rs index 2916c96..f268e8c 100644 --- a/echo-library/src/common/starlark_modules.rs +++ b/echo-library/src/common/starlark_modules.rs @@ -30,10 +30,12 @@ pub fn starlark_workflow_module(builder: &mut GlobalsBuilder) { ) -> anyhow::Result { if kind == "openwhisk" || kind == "polkadot" { if attributes.is_none() { - return Err(anyhow!("Attributes are mandatory for kind: openwhisk or polkadot")); + return Err(anyhow!( + "Attributes are mandatory for kind: openwhisk or polkadot" + )); } } - + let mut input_arguments: Vec = serde_json::from_str(&input_arguments.to_json()?) .map_err(|err| anyhow!("Failed to parse input arguments: {}", err))?; @@ -174,8 +176,13 @@ pub fn starlark_workflow_module(builder: &mut GlobalsBuilder) { return Err(anyhow!("Value must be either true or false")); } } - - _ => return Err(anyhow!("Unsupported input type for default value")), + RustType::HashMap(_, _) => {} + RustType::List(_) => {} + RustType::Tuple(_, _) => {} + RustType::Struct(_) => {} + _ => { + return Err(anyhow!("Unsupported input type for default value")); + } } Some(value_str)