aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart-archiver/src/lib.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-08 01:54:51 +0900
committernsfisis <nsfisis@gmail.com>2026-05-08 01:54:51 +0900
commit2fee33109dbc81dadeb152f38bea3050c4a0bfa2 (patch)
tree470b484c32d12327c9636a450f02d02388e3bcd0 /crates/mozart-archiver/src/lib.rs
parent66131e9336366bf3700fdc5296eea1d516d23723 (diff)
downloadphp-mozart-2fee33109dbc81dadeb152f38bea3050c4a0bfa2.tar.gz
php-mozart-2fee33109dbc81dadeb152f38bea3050c4a0bfa2.tar.zst
php-mozart-2fee33109dbc81dadeb152f38bea3050c4a0bfa2.zip
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart-archiver/src/lib.rs')
-rw-r--r--crates/mozart-archiver/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
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,