Skip to content

Commit 80d3ac3

Browse files
committed
expose params
1 parent 5a0cdd8 commit 80d3ac3

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"allow": [
44
"Bash(cargo publish:*)",
55
"Bash(cargo build:*)",
6-
"Bash(grep:*)"
6+
"Bash(grep:*)",
7+
"Bash(cargo check:*)"
78
]
89
}
910
}

src/domain/plugin.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{path::PathBuf, sync::Mutex};
22

33
use serde::{Deserialize, Serialize};
44
use strum_macros::EnumString;
5-
use rs_plugin_common_interfaces::{CredentialType, PluginInformation, PluginType};
5+
use rs_plugin_common_interfaces::{CredentialType, CustomParam, PluginInformation, PluginType};
66
use extism::Plugin as ExtismPlugin;
77
use super::{credential::Credential, ElementAction};
88

@@ -41,6 +41,8 @@ pub struct Plugin {
4141
pub version: u16,
4242
#[serde(skip_serializing_if = "Option::is_none")]
4343
pub credential_type: Option<CredentialType>,
44+
#[serde(default, skip_serializing_if = "Vec::is_empty")]
45+
pub params: Vec<CustomParam>,
4446
}
4547

4648
impl From<&PluginWasm> for Plugin {
@@ -59,7 +61,8 @@ impl From<&PluginWasm> for Plugin {
5961
publisher: Some(value.infos.publisher.clone()),
6062
version: value.infos.version,
6163
description: value.infos.description.clone(),
62-
credential_type: value.infos.credential_kind.clone()
64+
credential_type: value.infos.credential_kind.clone(),
65+
params: value.infos.settings.clone(),
6366
}
6467
}
6568
}

0 commit comments

Comments
 (0)