Skip to content

Commit

Permalink
fix: draw line to root deps when all explicit deps are root deps
Browse files Browse the repository at this point in the history
  • Loading branch information
onebytegone committed Jan 30, 2024
1 parent f2d7189 commit 57d1598
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion service-web-core/src/addons/MermaidServiceDeploymentGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export default class MermaidServiceDeploymentGraph {
const rootSubGraph: string[] = [];

const addService = (isSkipped: boolean, svc: Service, dependents: readonly Service[]): void => {
if (isEmpty(svc.config.dependsOn) && !svc.config.isRootDependency) {
const onlyDependsOnRootDeps = isEmpty(svc.config.dependsOn) || svc.config.dependsOn?.every((dep) => {
return this._web.getServiceByName(dep)?.config.isRootDependency;
});

if (onlyDependsOnRootDeps && !svc.config.isRootDependency) {
this._addLine(`${this._getLabel(svc)}${isSkipped ? ':::skipped' : ''} --> rootDeps`);
}

Expand Down

0 comments on commit 57d1598

Please sign in to comment.