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:
@@ -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 });
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -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)
|
||||
```
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user