diff --git a/.changeset/twelve-flowers-call.md b/.changeset/twelve-flowers-call.md new file mode 100644 index 0000000..859b6cc --- /dev/null +++ b/.changeset/twelve-flowers-call.md @@ -0,0 +1,5 @@ +--- +'@chialab/plasma': patch +--- + +Add check for missing components. diff --git a/src/cli.ts b/src/cli.ts index 3aa0591..cc18155 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -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);