diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-05 19:38:29 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-05 19:38:29 +0900 |
| commit | 884d9ab32bbca7a8ec5c7ee7d42cbde0e7e6babf (patch) | |
| tree | e04e25f506f0174572b4634601ab9b317220d9e5 /crates/mozart/src/commands/archive.rs | |
| parent | 49b0884701a84731652fc934d428932ff6029bd4 (diff) | |
| download | php-mozart-884d9ab32bbca7a8ec5c7ee7d42cbde0e7e6babf.tar.gz php-mozart-884d9ab32bbca7a8ec5c7ee7d42cbde0e7e6babf.tar.zst php-mozart-884d9ab32bbca7a8ec5c7ee7d42cbde0e7e6babf.zip | |
refactor(core): replace ComposerConfig with typed Config struct
Config uses serde with kebab-case field mapping; known properties are
strongly-typed fields and unknown keys flow into an extra BTreeMap.
resolve_references is moved to the new config module.
Diffstat (limited to 'crates/mozart/src/commands/archive.rs')
| -rw-r--r-- | crates/mozart/src/commands/archive.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/crates/mozart/src/commands/archive.rs b/crates/mozart/src/commands/archive.rs index a075ade..4386e16 100644 --- a/crates/mozart/src/commands/archive.rs +++ b/crates/mozart/src/commands/archive.rs @@ -104,15 +104,10 @@ pub async fn execute( let (config_archive_format, config_archive_dir) = match composer.as_ref() { Some(c) => { let cfg = c.config(); - let fmt = cfg - .get("archive-format") - .and_then(|v| v.as_str()) - .map(|s| s.to_string()); - let dir = cfg - .get("archive-dir") - .and_then(|v| v.as_str()) - .map(|s| s.to_string()); - (fmt, dir) + ( + Some(cfg.archive_format.clone()), + Some(cfg.archive_dir.clone()), + ) } None => (None, None), }; |
