Add CLI module deduplication and improve conflict reporting
Individual CLI modules now silently take precedence over array-sourced modules (e.g. from cli-defaults) when their commands overlap. Conflict errors between non-array modules include both package names for easier debugging. Commands reference their parent module instead of storing a raw package name string. createCliModule now validates that packageJson has a name. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
## API Report File for "@backstage/cli-defaults"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { CliModule } from '@backstage/cli-node';
|
||||
|
||||
// @public
|
||||
const _default: CliModule[];
|
||||
export default _default;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -25,6 +25,11 @@ import newModule from '@backstage/cli-module-new';
|
||||
import testJest from '@backstage/cli-module-test-jest';
|
||||
import translations from '@backstage/cli-module-translations';
|
||||
|
||||
/**
|
||||
* The default set of CLI modules for the Backstage CLI.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export default [
|
||||
auth,
|
||||
build,
|
||||
|
||||
Reference in New Issue
Block a user