Revert "added the frontend-extensions package role"

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-08-13 14:41:20 +02:00
parent 115d684716
commit e910e572e0
31 changed files with 86 additions and 357 deletions
-1
View File
@@ -200,7 +200,6 @@ function createConfigForRole(dir, role, extraConfig = {}) {
case 'web-library':
case 'frontend':
case 'frontend-plugin':
case 'frontend-extensions':
case 'frontend-plugin-module':
case 'frontend-dynamic-container':
return createConfig(dir, {
-1
View File
@@ -54,7 +54,6 @@ function getRoleConfig(role) {
case 'web-library':
case 'common-library':
case 'frontend-plugin':
case 'frontend-extensions':
case 'frontend-plugin-module':
return { testEnvironment: require.resolve('jest-environment-jsdom') };
case 'cli':
-3
View File
@@ -246,8 +246,6 @@ function guessPluginId(role: PackageRole, pkgName: string): string | undefined {
case 'frontend':
case 'frontend-plugin':
return pkgName.match(/plugin-(.*)/)?.[1];
case 'frontend-extensions':
return undefined;
case 'frontend-plugin-module':
return pkgName.match(/plugin-(.*)-module-/)?.[1];
case 'backend-plugin':
@@ -366,7 +364,6 @@ export function fixPluginPackages(
role === 'common-library' ||
role === 'web-library' ||
role === 'node-library' ||
role === 'frontend-extensions' ||
role === 'frontend-plugin-module' // TODO(Rugvip): Remove this once frontend modules are required to have a plugin ID
) {
return;
@@ -46,7 +46,6 @@ export async function command(opts: OptionValues): Promise<void> {
});
case 'web-library':
case 'frontend-plugin':
case 'frontend-extensions':
case 'frontend-plugin-module':
return startFrontend({ entry: 'dev/index', ...options });
case 'frontend-dynamic-container' as PackageRole: // experimental
@@ -84,11 +84,9 @@ async function detectPackages(
{ paths: [targetPath] },
));
if (
[
'frontend-plugin',
'frontend-extensions',
'frontend-plugin-module',
].includes(depPackageJson.backstage?.role ?? '')
['frontend-plugin', 'frontend-plugin-module'].includes(
depPackageJson.backstage?.role ?? '',
)
) {
// Include alpha entry point if available. If there's no default export it will be ignored
const exp = depPackageJson.exports;