core-compat-api: use namespace pattern for APIs converted with convertLegacyPlugin

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-08-16 14:35:28 +02:00
parent 769514e992
commit 3f734557ac
2 changed files with 2 additions and 2 deletions
@@ -84,7 +84,7 @@ describe('convertLegacyPlugin', () => {
});
expect(internalConverted.featureFlags).toEqual([{ name: 'test-flag' }]);
expect(internalConverted.extensions.map(e => e.id)).toEqual([
'api:test/plugin.test.client',
'api:plugin.test.client',
'page:test',
]);
});
@@ -29,7 +29,7 @@ export function convertLegacyPlugin(
options: { extensions: ExtensionDefinition<any, any>[] },
): NewBackstagePlugin {
const apiExtensions = Array.from(legacyPlugin.getApis()).map(factory =>
ApiBlueprint.make({ name: factory.api.id, params: { factory } }),
ApiBlueprint.make({ namespace: factory.api.id, params: { factory } }),
);
return createFrontendPlugin({
id: legacyPlugin.getId(),