Skip to content

Commit

Permalink
Add check for missing components.
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardocavazza committed Dec 14, 2023
1 parent da7e7fa commit ad1927f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-flowers-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chialab/plasma': patch
---

Add check for missing components.
4 changes: 4 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ program

const yes = options.yes || !process.stdout.isTTY;
const data = Array.from(candidates(json, manifest));
if (data.length === 0) {
throw new Error('No components found');
}

let selected: string[];
if (yes) {
selected = data.map(({ declaration }) => declaration.name);
Expand Down

0 comments on commit ad1927f

Please sign in to comment.