forked from github-starred/komodo
dev-23 use indexmap
This commit is contained in:
33
Cargo.lock
generated
33
Cargo.lock
generated
@@ -904,7 +904,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cache"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"tokio",
|
||||
@@ -1060,7 +1060,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "command"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"komodo_client",
|
||||
"run_command",
|
||||
@@ -1069,9 +1069,10 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "config"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"colored",
|
||||
"indexmap 2.10.0",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.12",
|
||||
@@ -1284,7 +1285,7 @@ checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476"
|
||||
|
||||
[[package]]
|
||||
name = "database"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-compression",
|
||||
@@ -1582,7 +1583,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "environment"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"formatting",
|
||||
@@ -1592,7 +1593,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "environment_file"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
@@ -1682,7 +1683,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "formatting"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"serror",
|
||||
]
|
||||
@@ -1844,7 +1845,7 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
|
||||
|
||||
[[package]]
|
||||
name = "git"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cache",
|
||||
@@ -2450,7 +2451,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "interpolate"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"komodo_client",
|
||||
@@ -2581,7 +2582,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "komodo_cli"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@@ -2603,7 +2604,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "komodo_client"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async_timing_util",
|
||||
@@ -2636,7 +2637,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "komodo_core"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
@@ -2705,7 +2706,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "komodo_periphery"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
@@ -2825,7 +2826,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "logger"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"komodo_client",
|
||||
@@ -3567,7 +3568,7 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
||||
|
||||
[[package]]
|
||||
name = "periphery_client"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"komodo_client",
|
||||
@@ -4098,7 +4099,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "response"
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
|
||||
@@ -8,7 +8,7 @@ members = [
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
version = "1.18.5-dev-22"
|
||||
version = "1.18.5-dev-23"
|
||||
edition = "2024"
|
||||
authors = ["mbecker20 <becker.maxh@gmail.com>"]
|
||||
license = "GPL-3.0-or-later"
|
||||
|
||||
@@ -26,7 +26,7 @@ RUN cd frontend && yarn link komodo_client && yarn && yarn build
|
||||
# Final Image
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
COPY ./bin/core/starship.toml /config/starship.toml
|
||||
COPY ./bin/core/starship.toml /starship.toml
|
||||
COPY ./bin/core/debian-deps.sh .
|
||||
RUN sh ./debian-deps.sh && rm ./debian-deps.sh
|
||||
|
||||
@@ -49,8 +49,8 @@ RUN mkdir /action-cache && \
|
||||
# Hint at the port
|
||||
EXPOSE 9120
|
||||
|
||||
ENV KOMODO_CLI_CONFIG_PATHS="/config"
|
||||
ENV KOMODO_CLI_CONFIG_KEYWORDS="config.toml,*komodo.cli*.toml"
|
||||
# This ensures any `komodo.cli.toml` takes precedence over the Core `/config/config.toml`
|
||||
ENV KOMODO_CLI_CONFIG_PATHS="/config/config.toml,/config"
|
||||
|
||||
CMD [ "core" ]
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@ rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Starship prompt
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --yes --bin-dir /usr/local/bin
|
||||
echo 'export STARSHIP_CONFIG=/config/starship.toml' >> /root/.bashrc
|
||||
echo 'export STARSHIP_CONFIG=/starship.toml' >> /root/.bashrc
|
||||
echo 'eval "$(starship init bash)"' >> /root/.bashrc
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ FROM ${FRONTEND_IMAGE} AS frontend
|
||||
# Final Image
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
COPY ./bin/core/starship.toml /config/starship.toml
|
||||
COPY ./bin/core/starship.toml /starship.toml
|
||||
COPY ./bin/core/debian-deps.sh .
|
||||
RUN sh ./debian-deps.sh && rm ./debian-deps.sh
|
||||
|
||||
@@ -47,8 +47,8 @@ RUN mkdir /action-cache && \
|
||||
# Hint at the port
|
||||
EXPOSE 9120
|
||||
|
||||
ENV KOMODO_CLI_CONFIG_PATHS="/config"
|
||||
ENV KOMODO_CLI_CONFIG_KEYWORDS="config.toml,*komodo.cli*.toml"
|
||||
# This ensures any `komodo.cli.toml` takes precedence over the Core `/config/config.toml`
|
||||
ENV KOMODO_CLI_CONFIG_PATHS="/config/config.toml,/config"
|
||||
|
||||
CMD [ "core" ]
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ RUN cd frontend && yarn link komodo_client && yarn && yarn build
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
COPY ./bin/core/starship.toml /config/starship.toml
|
||||
COPY ./bin/core/starship.toml /starship.toml
|
||||
COPY ./bin/core/debian-deps.sh .
|
||||
RUN sh ./debian-deps.sh && rm ./debian-deps.sh
|
||||
|
||||
@@ -36,8 +36,8 @@ RUN mkdir /action-cache && \
|
||||
# Hint at the port
|
||||
EXPOSE 9120
|
||||
|
||||
ENV KOMODO_CLI_CONFIG_PATHS="/config"
|
||||
ENV KOMODO_CLI_CONFIG_KEYWORDS="config.toml,*komodo.cli*.toml"
|
||||
# This ensures any `komodo.cli.toml` takes precedence over the Core `/config/config.toml`
|
||||
ENV KOMODO_CLI_CONFIG_PATHS="/config/config.toml,/config"
|
||||
|
||||
CMD [ "core" ]
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ RUN cargo build -p komodo_periphery --release
|
||||
# Final Image
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
COPY ./bin/periphery/starship.toml /config/starship.toml
|
||||
COPY ./bin/periphery/starship.toml /starship.toml
|
||||
COPY ./bin/periphery/debian-deps.sh .
|
||||
RUN sh ./debian-deps.sh && rm ./debian-deps.sh
|
||||
|
||||
|
||||
@@ -23,6 +23,6 @@ rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Starship prompt
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --yes --bin-dir /usr/local/bin
|
||||
echo 'export STARSHIP_CONFIG=/config/starship.toml' >> /root/.bashrc
|
||||
echo 'export STARSHIP_CONFIG=/starship.toml' >> /root/.bashrc
|
||||
echo 'eval "$(starship init bash)"' >> /root/.bashrc
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ FROM ${AARCH64_BINARIES} AS aarch64
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
COPY ./bin/periphery/starship.toml /config/starship.toml
|
||||
COPY ./bin/periphery/starship.toml /starship.toml
|
||||
COPY ./bin/periphery/debian-deps.sh .
|
||||
RUN sh ./debian-deps.sh && rm ./debian-deps.sh
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ FROM ${BINARIES_IMAGE} AS binaries
|
||||
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
COPY ./bin/periphery/starship.toml /config/starship.toml
|
||||
COPY ./bin/periphery/starship.toml /starship.toml
|
||||
COPY ./bin/periphery/debian-deps.sh .
|
||||
RUN sh ./debian-deps.sh && rm ./debian-deps.sh
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ homepage.workspace = true
|
||||
[dependencies]
|
||||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
indexmap.workspace = true
|
||||
wildcard.workspace = true
|
||||
colored.workspace = true
|
||||
serde.workspace = true
|
||||
|
||||
@@ -6,6 +6,7 @@ use std::{
|
||||
};
|
||||
|
||||
use colored::Colorize;
|
||||
use indexmap::IndexSet;
|
||||
use serde::de::DeserializeOwned;
|
||||
|
||||
mod error;
|
||||
@@ -36,7 +37,7 @@ pub fn parse_config_paths<T: DeserializeOwned>(
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut all_files = Vec::new();
|
||||
let mut all_files = IndexSet::new();
|
||||
for &path in paths {
|
||||
let Ok(metadata) = std::fs::metadata(path) else {
|
||||
continue;
|
||||
@@ -64,7 +65,7 @@ pub fn parse_config_paths<T: DeserializeOwned>(
|
||||
files.sort();
|
||||
all_files.extend(files);
|
||||
} else if metadata.is_file() {
|
||||
all_files.push(path.to_path_buf());
|
||||
all_files.insert(path.to_path_buf());
|
||||
}
|
||||
}
|
||||
println!(
|
||||
@@ -72,7 +73,11 @@ pub fn parse_config_paths<T: DeserializeOwned>(
|
||||
"INFO".green(),
|
||||
"Found Files".dimmed()
|
||||
);
|
||||
parse_config_files(&all_files, merge_nested, extend_array)
|
||||
parse_config_files(
|
||||
&all_files.into_iter().collect::<Vec<_>>(),
|
||||
merge_nested,
|
||||
extend_array,
|
||||
)
|
||||
}
|
||||
|
||||
fn ignore_dir(path: &Path, ignores: &HashSet<PathBuf>) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user