added the frontend-extension-bundle role
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Camila Belo <camilaibs@gmail.com> Co-authored-by: blam <ben@blam.sh> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -200,6 +200,7 @@ function createConfigForRole(dir, role, extraConfig = {}) {
|
||||
case 'web-library':
|
||||
case 'frontend':
|
||||
case 'frontend-plugin':
|
||||
case 'frontend-extension-bundle':
|
||||
case 'frontend-plugin-module':
|
||||
case 'frontend-dynamic-container':
|
||||
return createConfig(dir, {
|
||||
|
||||
@@ -54,6 +54,7 @@ function getRoleConfig(role) {
|
||||
case 'web-library':
|
||||
case 'common-library':
|
||||
case 'frontend-plugin':
|
||||
case 'frontend-extension-bundle':
|
||||
case 'frontend-plugin-module':
|
||||
return { testEnvironment: require.resolve('jest-environment-jsdom') };
|
||||
case 'cli':
|
||||
|
||||
@@ -246,6 +246,8 @@ function guessPluginId(role: PackageRole, pkgName: string): string | undefined {
|
||||
case 'frontend':
|
||||
case 'frontend-plugin':
|
||||
return pkgName.match(/plugin-(.*)/)?.[1];
|
||||
case 'frontend-extension-bundle':
|
||||
return undefined;
|
||||
case 'frontend-plugin-module':
|
||||
return pkgName.match(/plugin-(.*)-module-/)?.[1];
|
||||
case 'backend-plugin':
|
||||
@@ -364,6 +366,7 @@ export function fixPluginPackages(
|
||||
role === 'common-library' ||
|
||||
role === 'web-library' ||
|
||||
role === 'node-library' ||
|
||||
role === 'frontend-extension-bundle' ||
|
||||
role === 'frontend-plugin-module' // TODO(Rugvip): Remove this once frontend modules are required to have a plugin ID
|
||||
) {
|
||||
return;
|
||||
|
||||
@@ -46,6 +46,7 @@ export async function command(opts: OptionValues): Promise<void> {
|
||||
});
|
||||
case 'web-library':
|
||||
case 'frontend-plugin':
|
||||
case 'frontend-extension-bundle':
|
||||
case 'frontend-plugin-module':
|
||||
return startFrontend({ entry: 'dev/index', ...options });
|
||||
case 'frontend-dynamic-container' as PackageRole: // experimental
|
||||
|
||||
@@ -84,9 +84,11 @@ async function detectPackages(
|
||||
{ paths: [targetPath] },
|
||||
));
|
||||
if (
|
||||
['frontend-plugin', 'frontend-plugin-module'].includes(
|
||||
depPackageJson.backstage?.role ?? '',
|
||||
)
|
||||
[
|
||||
'frontend-plugin',
|
||||
'frontend-extension-bundle',
|
||||
'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;
|
||||
|
||||
Reference in New Issue
Block a user