Lighthouse Backend: fix api-report, rename options and create function, remove jest from package.json

Signed-off-by: Dominik Pfaffenbauer <dominik@pfaffenbauer.at>
This commit is contained in:
Dominik Pfaffenbauer
2023-01-25 15:45:18 +01:00
parent 12ac927b75
commit 6a5aebfe04
7 changed files with 14 additions and 22 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
---
'@backstage/plugin-lighthouse': minor
'@backstage/plugin-lighthouse': patch
---
Require @backstage/plugin-lighthouse-common package where API implementation moved to
View File
+1 -1
View File
@@ -26,7 +26,7 @@ export default async function createPlugin(env: PluginEnvironment) {
discoveryApi: env.discovery,
});
await create({ logger, scheduler, config, catalogClient });
await createScheduler({ logger, scheduler, config, catalogClient });
}
```
+6 -8
View File
@@ -8,15 +8,8 @@ import { Config } from '@backstage/config';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
// Warning: (ae-missing-release-tag) "create" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export function create(options: Options): Promise<void>;
// Warning: (ae-missing-release-tag) "Options" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Options {
export interface CreateLighthouseSchedulerOptions {
// (undocumented)
catalogClient: CatalogClient;
// (undocumented)
@@ -27,5 +20,10 @@ export interface Options {
scheduler?: PluginTaskScheduler;
}
// @public (undocumented)
export function createScheduler(
options: CreateLighthouseSchedulerOptions,
): Promise<void>;
// (No @packageDocumentation comment for this package)
```
-5
View File
@@ -49,10 +49,5 @@
},
"devDependencies": {
"@backstage/cli": "workspace:^"
},
"jest": {
"roots": [
".."
]
}
}
@@ -25,14 +25,18 @@ import { LighthouseRestApi } from '@backstage/plugin-lighthouse-common';
import { stringifyEntityRef } from '@backstage/catalog-model';
import { LighthouseAuditScheduleImpl } from '../config';
export interface Options {
/** @public **/
export interface CreateLighthouseSchedulerOptions {
logger: Logger;
config: Config;
scheduler?: PluginTaskScheduler;
catalogClient: CatalogClient;
}
export async function create(options: Options) {
/** @public **/
export async function createScheduler(
options: CreateLighthouseSchedulerOptions,
) {
const { logger, scheduler, catalogClient, config } = options;
const lighthouseApi = LighthouseRestApi.fromConfig(config);
-5
View File
@@ -42,10 +42,5 @@
},
"devDependencies": {
"@backstage/cli": "workspace:^"
},
"jest": {
"roots": [
".."
]
}
}