From 3d128352f93c4416d087069947920e9fa864df7d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 6 May 2026 18:05:27 +0900 Subject: feat(core): port Factory::createComposer and AutoloadGenerator::dump Add the Composer state-container types (LocalRepository, RepositoryManager, InstallationManager, AutoloadGenerator, AutoloadDumpOptions, PlatformRequirementFilter, Locker) plus the factory wiring that builds them from composer.json and vendor/composer/installed.json. AutoloadGenerator::dump lives in mozart-autoload as an extension trait so the orchestrating algorithm sits next to the classmap scanner while the state container stays in mozart-core. Rework dump-autoload to drive both, mirroring $composer->getAutoloadGenerator()->dump(...). --- crates/mozart/src/commands/archive.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/mozart/src/commands/archive.rs') diff --git a/crates/mozart/src/commands/archive.rs b/crates/mozart/src/commands/archive.rs index 044178f..b02e44e 100644 --- a/crates/mozart/src/commands/archive.rs +++ b/crates/mozart/src/commands/archive.rs @@ -1,4 +1,5 @@ use clap::Args; +use mozart_core::composer::Composer; use mozart_core::console_writeln; use std::path::PathBuf; @@ -99,7 +100,7 @@ pub async fn execute( // `archive` command falls back to `Factory::createConfig()` when no // composer.json is present, so we mirror that by treating a missing // file as "use defaults" (Composer::try_load returns None). - let composer = mozart_core::composer::Composer::try_load(&working_dir)?; + let composer = Composer::try_load(&working_dir)?; let composer_json_path = working_dir.join("composer.json"); let (config_archive_format, config_archive_dir) = match composer.as_ref() { Some(c) => { -- cgit v1.3.1