Fixes after rebase to master
Signed-off-by: David Festal <dfestal@redhat.com>
This commit is contained in:
@@ -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: {},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user