From 2fee33109dbc81dadeb152f38bea3050c4a0bfa2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 8 May 2026 01:54:51 +0900 Subject: refactor(archiver): extract ArchiveManager from archive command Move source acquisition (root or remote dist download/extract), composer.json archive metadata reading, filename generation, self- exclusion, filter aggregation, and archive creation from the archive command into a new ArchiveManager in mozart-archiver, mirroring Composer's ArchiveCommand <-> ArchiveManager split. The command becomes a thin wrapper that selects the package and delegates archiving. Adds a one-way mozart-archiver -> mozart-registry dep since ArchiveManager::archive() handles dist downloading internally (the analog of Composer's injected DownloadManager). Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/mozart-archiver/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/mozart-archiver/src/lib.rs') diff --git a/crates/mozart-archiver/src/lib.rs b/crates/mozart-archiver/src/lib.rs index 575f024..30c678a 100644 --- a/crates/mozart-archiver/src/lib.rs +++ b/crates/mozart-archiver/src/lib.rs @@ -5,6 +5,9 @@ use std::fs; use std::io::Write as IoWrite; use std::path::{Path, PathBuf}; +pub mod manager; +pub use manager::{ArchiveManager, ArchivePackage}; + /// A compiled exclude pattern derived from a gitignore-style rule. pub struct ExcludePattern { regex: Regex, -- cgit v1.3.1