summaryrefslogtreecommitdiffstats
path: root/src/configs/bun.rs
blob: db50a50c3d3ceefdaa54d802281477df15a32613 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use serde::{Deserialize, Serialize};

#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(
    feature = "config-schema",
    derive(schemars::JsonSchema),
    schemars(deny_unknown_fields)
)]
#[serde(default)]
pub struct BunConfig<'a> {
    pub format: &'a str,
    pub version_format: &'a str,
    pub symbol: &'a str,
    pub style: &'a str,
    pub disabled: bool,
    pub detect_extensions: Vec<&'a str>,
    pub detect_files: Vec<&'a str>,
    pub detect_folders: Vec<&'a str>,
}

impl<'a> Default for BunConfig<'a> {
    fn default() -> Self {
        BunConfig {
            format: "via [$symbol($version )]($style)",
            version_format: "v${raw}",
            symbol: "🥟 ",
            style: "bold red",
            disabled: false,
            detect_extensions: vec![],
            detect_files: vec!["bun.lockb", "bunfig.toml"],
            detect_folders: vec![],
        }
    }
}