From b3fcdf3b5cf0d6b43109c4bcb3dfcbb6576abce5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 8 May 2026 02:41:45 +0900 Subject: fix(browse): mirror Composer's HomeCommand semantics Replace the hand-rolled composer.json -> composer.lock -> Packagist fallback with a BrowseRepos composite that dispatches via a uniform find_packages(name) over the root package, the local installed repository, and the Packagist remote -- matching HomeCommand's initializeRepos() + findPackages() loop. - Extend InstalledPackageEntry with homepage/support so the local repo carries the same fields HomeCommand reads off CompletePackageInterface; propagate them through locked_to_installed_entry. - Collapse three extract_url_from_* helpers into a single handle_package mirror. - Relax is_valid_url to a filter_var(FILTER_VALIDATE_URL) analog (drop the http/https scheme allowlist). - Route warnings and "No package specified" notices to stderr; match HomeCommand's exact wording. - Merge the macOS/Linux open_browser branches; add the literal "web" window-title argument on Windows. --- crates/mozart/src/commands/status.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'crates/mozart/src/commands/status.rs') diff --git a/crates/mozart/src/commands/status.rs b/crates/mozart/src/commands/status.rs index c22fd3c..60db8ac 100644 --- a/crates/mozart/src/commands/status.rs +++ b/crates/mozart/src/commands/status.rs @@ -501,6 +501,8 @@ mod tests { install_path: None, autoload: None, aliases: vec![], + homepage: None, + support: None, extra_fields: BTreeMap::new(), }; @@ -528,6 +530,8 @@ mod tests { install_path: None, autoload: None, aliases: vec![], + homepage: None, + support: None, extra_fields: BTreeMap::new(), }; @@ -548,6 +552,8 @@ mod tests { install_path: None, autoload: None, aliases: vec![], + homepage: None, + support: None, extra_fields: BTreeMap::new(), }; @@ -568,6 +574,8 @@ mod tests { install_path: None, autoload: None, aliases: vec![], + homepage: None, + support: None, extra_fields: BTreeMap::new(), }; @@ -590,6 +598,8 @@ mod tests { install_path: Some("../monolog/monolog".to_string()), autoload: None, aliases: vec![], + homepage: None, + support: None, extra_fields: BTreeMap::new(), }; -- cgit v1.3.1