Skip to content

Commit

Permalink
fix: do not implicitly add host if the first name is not an host
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 3, 2023
1 parent 1b8790c commit edd4b23
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/payload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,16 @@ export class Payload implements Analyser {
if (service.tech?.includes('.')) {
const [host] = service.tech.split('.');
const tech = listIndexed[host as AllowedKeys];

const pl = new Payload({
name: tech.name,
folderPath: service.path[0],
tech: tech.tech,
reason: `implicit: ${service.tech}`,
});
const child = this.addChild(pl);
service.inComponent = child;
if (tech.type === 'hosting') {
const pl = new Payload({
name: tech.name,
folderPath: service.path[0],
tech: tech.tech,
reason: `implicit: ${service.tech}`,
});
const child = this.addChild(pl);
service.inComponent = child;
}
}

if (exist) {
Expand Down

0 comments on commit edd4b23

Please sign in to comment.