2022-03-26 09:42:19 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
2021-10-05 23:27:25 +00:00
|
|
|
|
2022-03-26 09:42:19 +00:00
|
|
|
#[derive(Clone, Deserialize, Serialize)]
|
2022-09-09 12:59:38 +00:00
|
|
|
#[cfg_attr(
|
|
|
|
feature = "config-schema",
|
|
|
|
derive(schemars::JsonSchema),
|
|
|
|
schemars(deny_unknown_fields)
|
|
|
|
)]
|
2022-03-26 09:42:19 +00:00
|
|
|
#[serde(default)]
|
2021-10-05 23:27:25 +00:00
|
|
|
pub struct PulumiConfig<'a> {
|
|
|
|
pub format: &'a str,
|
|
|
|
pub version_format: &'a str,
|
|
|
|
pub symbol: &'a str,
|
|
|
|
pub style: &'a str,
|
|
|
|
pub disabled: bool,
|
2022-07-10 09:14:43 +00:00
|
|
|
pub search_upwards: bool,
|
2021-10-05 23:27:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Default for PulumiConfig<'a> {
|
|
|
|
fn default() -> Self {
|
|
|
|
PulumiConfig {
|
2022-01-25 16:40:44 +00:00
|
|
|
format: "via [$symbol($username@)$stack]($style) ",
|
2021-10-05 23:27:25 +00:00
|
|
|
version_format: "v${raw}",
|
|
|
|
symbol: " ",
|
|
|
|
style: "bold 5",
|
|
|
|
disabled: false,
|
2022-07-10 09:14:43 +00:00
|
|
|
search_upwards: true,
|
2021-10-05 23:27:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|