I am starting to play with the @salesforce/command extensions for SFDX cli and thinking of writing a script that could handle install all unlocked dependencies recursively. As per this question it seems this is not possible currently.
My thought was that we could utilise the resolve function from SFDXProjectConfig to access the dependencies list of the package directory then automatically call sfdx install command. This is working though we only get resolution for this level of the package dependencies list and if there are dependencies deeper - say this PackageC depends on PackageB but PackageB depends on PackageA - then we cannot programmatically access this tree.
I thought perhaps a call to
sfdx force:package:version:report --verbose might give some dependency information that could be used to build this tree but no such luck.
Would anyone have another way (API) of programatically calling a package version created on a devhub and getting the list of dependencies for a given package?