Fixes after rebase to master

Signed-off-by: David Festal <dfestal@redhat.com>
This commit is contained in:
David Festal
2023-08-28 21:56:57 +02:00
parent 66849e0677
commit 3bd7516c8e
2 changed files with 13 additions and 14 deletions
+4 -12
View File
@@ -17,19 +17,11 @@ The backend plugin manager is a service that scans a configured root directory (
In the `backend-next` application, it can be enabled by adding the `backend-plugin-manager` as a dependency in the `package.json` and the following lines in the `src/index.ts` file:
```ts
-
-const backend = createBackend();
+import {
+ dynamicPluginsServiceFactory,
+ dynamicPluginsFeatureDiscoveryServiceFactory,
+} from '@backstage/backend-plugin-manager';
const backend = createBackend();
+
+ backend.add(dynamicPluginsFeatureDiscoveryServiceFactory()) // overridden version of the FeatureDiscoveryService which provides features loaded by dynamic plugins
+ backend.add(dynamicPluginsServiceFactory())
+
+const backend = createBackend({
+ services: [
+ dynamicPluginsServiceFactory(),
+ dynamicPluginsFeatureDiscoveryServiceFactory(), // overridden version of the FeatureDiscoveryService which provides features loaded by dynamic plugins
+ ],
+});
```
### About the expected dynamic plugin structure
@@ -486,7 +486,7 @@ describe('backend-plugin-manager', () => {
};
const backend = createSpecializedBackend({
services: [
defaultServiceFactories: [
rootLifecycleServiceFactory(),
createServiceFactory({
service: coreServices.rootConfig,
@@ -494,7 +494,14 @@ describe('backend-plugin-manager', () => {
async factory({}) {
return await ConfigSources.toConfig({
async *readConfigData() {
yield { configs: [] };
yield {
configs: [
{
context: 'test',
data: {},
},
],
};
},
});
},