The app being installed and its dependency declarations
Map of apps already installed in the MJ instance
Ordered install plan or error details
Use ResolveDependencyGraph (dependency-graph-builder.ts)
instead. That function resolves the complete transitive graph across repos
with real cross-repo cycle detection; this one only sorts a single
pre-supplied level of declarations. Nothing in the install path calls this
anymore. Slated for removal at the next major version bump.
Resolves the install order for an app and its transitive dependencies.
Uses topological sort (depth-first) to produce an ordered list where each app appears after all of its dependencies. Detects circular dependency chains and returns an error if found.