Add cli-plugin package role
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli-node': patch
|
||||
---
|
||||
|
||||
Added a new `cli-plugin` package role for packages that provide CLI plugin extensions.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Added support for the new `cli-plugin` package role in the build system, ESLint configuration, Jest configuration, and maintenance commands.
|
||||
@@ -187,6 +187,7 @@ export type PackageRole =
|
||||
| 'frontend'
|
||||
| 'backend'
|
||||
| 'cli'
|
||||
| 'cli-plugin'
|
||||
| 'web-library'
|
||||
| 'node-library'
|
||||
| 'common-library'
|
||||
|
||||
@@ -33,6 +33,11 @@ const packageRoleInfos: PackageRoleInfo[] = [
|
||||
platform: 'node',
|
||||
output: ['cjs'],
|
||||
},
|
||||
{
|
||||
role: 'cli-plugin',
|
||||
platform: 'node',
|
||||
output: ['types', 'cjs'],
|
||||
},
|
||||
{
|
||||
role: 'web-library',
|
||||
platform: 'web',
|
||||
|
||||
@@ -23,6 +23,7 @@ export type PackageRole =
|
||||
| 'frontend'
|
||||
| 'backend'
|
||||
| 'cli'
|
||||
| 'cli-plugin'
|
||||
| 'web-library'
|
||||
| 'node-library'
|
||||
| 'common-library'
|
||||
|
||||
@@ -269,6 +269,7 @@ function createConfigForRole(dir, role, extraConfig = {}) {
|
||||
});
|
||||
|
||||
case 'cli':
|
||||
case 'cli-plugin':
|
||||
case 'node-library':
|
||||
case 'backend':
|
||||
case 'backend-plugin':
|
||||
|
||||
@@ -38,6 +38,7 @@ const FRONTEND_ROLES = [
|
||||
const NODE_ROLES = [
|
||||
'backend',
|
||||
'cli',
|
||||
'cli-plugin',
|
||||
'node-library',
|
||||
'backend-plugin',
|
||||
'backend-plugin-module',
|
||||
|
||||
@@ -33,6 +33,7 @@ describe('typeDistProject', () => {
|
||||
frontend: false,
|
||||
backend: false,
|
||||
cli: false,
|
||||
'cli-plugin': false,
|
||||
'common-library': false,
|
||||
};
|
||||
|
||||
|
||||
@@ -294,7 +294,12 @@ export function fixPluginId(pkg: FixablePackage) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (role === 'backend' || role === 'frontend' || role === 'cli') {
|
||||
if (
|
||||
role === 'backend' ||
|
||||
role === 'frontend' ||
|
||||
role === 'cli' ||
|
||||
role === 'cli-plugin'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -376,7 +381,12 @@ export function fixPluginPackages(
|
||||
return;
|
||||
}
|
||||
|
||||
if (role === 'backend' || role === 'frontend' || role === 'cli') {
|
||||
if (
|
||||
role === 'backend' ||
|
||||
role === 'frontend' ||
|
||||
role === 'cli' ||
|
||||
role === 'cli-plugin'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import type { CommandContext } from '../../../wiring/types';
|
||||
|
||||
const configArgPattern = /--config[=\s][^\s$]+/;
|
||||
|
||||
const noStartRoles: PackageRole[] = ['cli', 'common-library'];
|
||||
const noStartRoles: PackageRole[] = ['cli', 'cli-plugin', 'common-library'];
|
||||
|
||||
export default async ({ args, info }: CommandContext) => {
|
||||
cli({ help: info, booleanFlagNegation: true }, undefined, args);
|
||||
|
||||
Reference in New Issue
Block a user