Add DumpStagesCommand to dump package stages and their locations

This commit is contained in:
crazywhalecc
2026-02-26 16:09:18 +08:00
parent bb257cffd6
commit e9279940d7
4 changed files with 189 additions and 0 deletions

View File

@@ -240,6 +240,26 @@ class PackageLoader
}
}
/**
* Get all registered before-stage callbacks (raw).
*
* @return array<string, array<string, list<array{0: callable, 1: ?string}>>>
*/
public static function getAllBeforeStages(): array
{
return self::$before_stages;
}
/**
* Get all registered after-stage callbacks (raw).
*
* @return array<string, array<string, list<array{0: callable, 1: ?string}>>>
*/
public static function getAllAfterStages(): array
{
return self::$after_stages;
}
public static function getBeforeStageCallbacks(string $package_name, string $stage): iterable
{
// match condition