aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/exec.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-10 01:18:44 +0900
committernsfisis <nsfisis@gmail.com>2026-05-10 01:18:44 +0900
commit4caf72463de598ea9b6454f3b7b7332dd0071318 (patch)
tree62f99c8a48e5b21d75ab70bfd374eb67215542c9 /crates/mozart/src/commands/exec.rs
parent8cc1ba8a02c0318b65658f1634de378c780392b9 (diff)
downloadphp-mozart-4caf72463de598ea9b6454f3b7b7332dd0071318.tar.gz
php-mozart-4caf72463de598ea9b6454f3b7b7332dd0071318.tar.zst
php-mozart-4caf72463de598ea9b6454f3b7b7332dd0071318.zip
refactor(package): port RootPackageLoader into RootPackageData::from_raw
Mirrors Composer\Package\Loader\RootPackageLoader::load(): converts the parsed RawPackageData into fully typed RootPackageData with Link objects, defaulted fields, and trait-based accessors. Composer::package() now returns RootPackageData instead of RawPackageData, eliminating the pre-normalised JSON workaround noted in the previous comment.
Diffstat (limited to 'crates/mozart/src/commands/exec.rs')
-rw-r--r--crates/mozart/src/commands/exec.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/mozart/src/commands/exec.rs b/crates/mozart/src/commands/exec.rs
index 2b3c836..63c29c9 100644
--- a/crates/mozart/src/commands/exec.rs
+++ b/crates/mozart/src/commands/exec.rs
@@ -1,6 +1,7 @@
use crate::composer::Composer;
use clap::Args;
use mozart_core::console_writeln;
+use mozart_core::package::Package;
use std::path::{Path, PathBuf};
#[derive(Args)]
@@ -125,7 +126,7 @@ fn get_binaries(composer: &Composer, bin_dir: &Path) -> Vec<(String, bool)> {
let local_bins: Vec<(String, bool)> = composer
.package()
- .bin
+ .binaries()
.iter()
.filter_map(|e| Some(PathBuf::from(e).file_name()?.to_string_lossy().into_owned()))
.map(|e| (e, true))