backend-plugin-api: remove factory function helper types

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-01-12 14:42:18 +01:00
parent d1e86013ef
commit 635287ead1
25 changed files with 76 additions and 202 deletions
+17 -52
View File
@@ -13,7 +13,6 @@ import { ErrorRequestHandler } from 'express';
import { Express as Express_2 } from 'express';
import { ExtensionPoint } from '@backstage/backend-plugin-api';
import { Handler } from 'express';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { HelmetOptions } from 'helmet';
import * as http from 'http';
import { HttpRouterService } from '@backstage/backend-plugin-api';
@@ -47,13 +46,10 @@ export interface Backend {
}
// @public (undocumented)
export const cacheFactory: FactoryFunction<
ServiceFactory<PluginCacheManager>,
[]
>;
export const cacheFactory: () => ServiceFactory<PluginCacheManager>;
// @public (undocumented)
export const configFactory: FactoryFunction<ServiceFactory<ConfigService>, []>;
export const configFactory: () => ServiceFactory<ConfigService>;
// @public
export function createHttpServer(
@@ -76,10 +72,7 @@ export interface CreateSpecializedBackendOptions {
}
// @public (undocumented)
export const databaseFactory: FactoryFunction<
ServiceFactory<PluginDatabaseManager>,
[]
>;
export const databaseFactory: () => ServiceFactory<PluginDatabaseManager>;
// @public
export class DefaultRootHttpRouter implements RootHttpRouterService {
@@ -97,10 +90,7 @@ export interface DefaultRootHttpRouterOptions {
}
// @public (undocumented)
export const discoveryFactory: FactoryFunction<
ServiceFactory<PluginEndpointDiscovery>,
[]
>;
export const discoveryFactory: () => ServiceFactory<PluginEndpointDiscovery>;
// @public
export interface ExtendedHttpServer extends http.Server {
@@ -113,10 +103,9 @@ export interface ExtendedHttpServer extends http.Server {
}
// @public (undocumented)
export const httpRouterFactory: FactoryFunction<
ServiceFactory<HttpRouterService>,
[options?: HttpRouterFactoryOptions | undefined]
>;
export const httpRouterFactory: (
options?: HttpRouterFactoryOptions | undefined,
) => ServiceFactory<HttpRouterService>;
// @public (undocumented)
export interface HttpRouterFactoryOptions {
@@ -147,10 +136,7 @@ export type HttpServerOptions = {
};
// @public (undocumented)
export const identityFactory: FactoryFunction<
ServiceFactory<IdentityService>,
[]
>;
export const identityFactory: () => ServiceFactory<IdentityService>;
// @public
export type IdentityFactoryOptions = {
@@ -159,13 +145,10 @@ export type IdentityFactoryOptions = {
};
// @public
export const lifecycleFactory: FactoryFunction<
ServiceFactory<LifecycleService>,
[]
>;
export const lifecycleFactory: () => ServiceFactory<LifecycleService>;
// @public (undocumented)
export const loggerFactory: FactoryFunction<ServiceFactory<LoggerService>, []>;
export const loggerFactory: () => ServiceFactory<LoggerService>;
// @public
export class MiddlewareFactory {
@@ -193,10 +176,7 @@ export interface MiddlewareFactoryOptions {
}
// @public (undocumented)
export const permissionsFactory: FactoryFunction<
ServiceFactory<PermissionsService>,
[]
>;
export const permissionsFactory: () => ServiceFactory<PermissionsService>;
// @public
export function readCorsOptions(config?: Config): CorsOptions;
@@ -224,10 +204,7 @@ export interface RootHttpRouterConfigureOptions {
}
// @public (undocumented)
export const rootHttpRouterFactory: FactoryFunction<
ServiceFactory<RootHttpRouterService>,
[]
>;
export const rootHttpRouterFactory: () => ServiceFactory<RootHttpRouterService>;
// @public (undocumented)
export type RootHttpRouterFactoryOptions = {
@@ -236,22 +213,13 @@ export type RootHttpRouterFactoryOptions = {
};
// @public
export const rootLifecycleFactory: FactoryFunction<
ServiceFactory<RootLifecycleService>,
[]
>;
export const rootLifecycleFactory: () => ServiceFactory<RootLifecycleService>;
// @public (undocumented)
export const rootLoggerFactory: FactoryFunction<
ServiceFactory<RootLoggerService>,
[]
>;
export const rootLoggerFactory: () => ServiceFactory<RootLoggerService>;
// @public (undocumented)
export const schedulerFactory: FactoryFunction<
ServiceFactory<SchedulerService>,
[]
>;
export const schedulerFactory: () => ServiceFactory<SchedulerService>;
// @public (undocumented)
export type ServiceOrExtensionPoint<T = unknown> =
@@ -259,11 +227,8 @@ export type ServiceOrExtensionPoint<T = unknown> =
| ServiceRef<T>;
// @public (undocumented)
export const tokenManagerFactory: FactoryFunction<
ServiceFactory<TokenManagerService>,
[]
>;
export const tokenManagerFactory: () => ServiceFactory<TokenManagerService>;
// @public (undocumented)
export const urlReaderFactory: FactoryFunction<ServiceFactory<UrlReader>, []>;
export const urlReaderFactory: () => ServiceFactory<UrlReader>;
```
+10 -9
View File
@@ -113,13 +113,13 @@ export namespace coreServices {
// @public
export function createBackendModule<TOptions extends [options?: object] = []>(
config: FactoryFunctionConfig<BackendModuleConfig, TOptions>,
): FactoryFunction<BackendFeature, TOptions>;
config: BackendModuleConfig | ((...params: TOptions) => BackendModuleConfig),
): (...params: TOptions) => BackendFeature;
// @public (undocumented)
export function createBackendPlugin<TOptions extends [options?: object] = []>(
config: FactoryFunctionConfig<BackendPluginConfig, TOptions>,
): FactoryFunction<BackendFeature, TOptions>;
config: BackendPluginConfig | ((...params: TOptions) => BackendPluginConfig),
): (...params: TOptions) => BackendFeature;
// @public (undocumented)
export function createExtensionPoint<T>(
@@ -136,11 +136,12 @@ export function createServiceFactory<
},
TOpts extends [options?: object] = [],
>(
config: FactoryFunctionConfig<
ServiceFactoryConfig<TService, TScope, TImpl, TDeps>,
TOpts
>,
): FactoryFunction<ServiceFactory<TService>, TOpts>;
config:
| ServiceFactoryConfig<TService, TScope, TImpl, TDeps>
| ((
...options: TOpts
) => ServiceFactoryConfig<TService, TScope, TImpl, TDeps>),
): (...params: TOpts) => ServiceFactory<TService>;
// @public
export function createServiceRef<TService>(
@@ -14,8 +14,6 @@
* limitations under the License.
*/
import { FactoryFunctionConfig, FactoryFunction } from '../../types';
/**
* TODO
*
@@ -162,11 +160,12 @@ export function createServiceFactory<
TDeps extends { [name in string]: ServiceRef<unknown> },
TOpts extends [options?: object] = [],
>(
config: FactoryFunctionConfig<
ServiceFactoryConfig<TService, TScope, TImpl, TDeps>,
TOpts
>,
): FactoryFunction<ServiceFactory<TService>, TOpts> {
config:
| ServiceFactoryConfig<TService, TScope, TImpl, TDeps>
| ((
...options: TOpts
) => ServiceFactoryConfig<TService, TScope, TImpl, TDeps>),
): (...params: TOpts) => ServiceFactory<TService> {
if (typeof config === 'function') {
return (...opts: TOpts) => {
const c = config(...opts);
-31
View File
@@ -1,31 +0,0 @@
/*
* Copyright 2023 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @ignore
*/
export type FactoryFunctionConfig<TConfig, TParams extends unknown[]> =
| TConfig
| ((...params: TParams) => TConfig);
/**
* Helper type that makes the options argument optional if options are not required.
*
* @ignore
*/
export type FactoryFunction<TResult, TParams extends unknown[]> = (
...params: TParams
) => TResult;
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import { FactoryFunction, FactoryFunctionConfig } from '../types';
import {
BackendRegistrationPoints,
BackendFeature,
@@ -50,10 +49,10 @@ export interface BackendPluginConfig {
/** @public */
export function createBackendPlugin<TOptions extends [options?: object] = []>(
config: FactoryFunctionConfig<BackendPluginConfig, TOptions>,
): FactoryFunction<BackendFeature, TOptions> {
config: BackendPluginConfig | ((...params: TOptions) => BackendPluginConfig),
): (...params: TOptions) => BackendFeature {
if (typeof config === 'function') {
return config as FactoryFunction<BackendFeature, TOptions>;
return config;
}
return () => config;
@@ -83,8 +82,8 @@ export interface BackendModuleConfig {
* The `pluginId` should exactly match the `id` of the plugin that the module extends.
*/
export function createBackendModule<TOptions extends [options?: object] = []>(
config: FactoryFunctionConfig<BackendModuleConfig, TOptions>,
): FactoryFunction<BackendFeature, TOptions> {
config: BackendModuleConfig | ((...params: TOptions) => BackendModuleConfig),
): (...params: TOptions) => BackendFeature {
if (typeof config === 'function') {
return (...options: TOptions) => {
const c = config(...options);
@@ -22,10 +22,12 @@ import { ConfigReader } from '@backstage/config';
import { JsonObject } from '@backstage/types';
/** @public */
export const mockConfigFactory = createServiceFactory({
service: coreServices.config,
deps: {},
async factory(_, options?: { data?: JsonObject }) {
return new ConfigReader(options?.data, 'mock-config');
},
});
export const mockConfigFactory = createServiceFactory(
(options?: { data?: JsonObject }) => ({
service: coreServices.config,
deps: {},
async factory() {
return new ConfigReader(options?.data, 'mock-config');
},
}),
);
+1 -5
View File
@@ -6,15 +6,11 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import express from 'express';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { Logger } from 'winston';
import { PluginDatabaseManager } from '@backstage/backend-common';
// @alpha
export const appPlugin: FactoryFunction<
BackendFeature,
[options: AppPluginOptions]
>;
export const appPlugin: (options: AppPluginOptions) => BackendFeature;
// @alpha (undocumented)
export type AppPluginOptions = {
@@ -11,7 +11,6 @@ import { Config } from '@backstage/config';
import { Credentials } from 'aws-sdk';
import { EntityProvider } from '@backstage/plugin-catalog-backend';
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { LocationSpec } from '@backstage/plugin-catalog-backend';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
@@ -91,8 +90,5 @@ export class AwsS3EntityProvider implements EntityProvider {
}
// @alpha
export const awsS3EntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[]
>;
export const awsS3EntityProviderCatalogModule: () => BackendFeature;
```
@@ -9,7 +9,6 @@ import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
import { Config } from '@backstage/config';
import { EntityProvider } from '@backstage/plugin-catalog-backend';
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { LocationSpec } from '@backstage/plugin-catalog-backend';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
@@ -59,8 +58,5 @@ export class AzureDevOpsEntityProvider implements EntityProvider {
}
// @alpha
export const azureDevOpsEntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[]
>;
export const azureDevOpsEntityProviderCatalogModule: () => BackendFeature;
```
@@ -11,7 +11,6 @@ import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { EventParams } from '@backstage/plugin-events-node';
import { Events } from '@backstage/plugin-bitbucket-cloud-common';
import { EventSubscriber } from '@backstage/plugin-events-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
import { TaskRunner } from '@backstage/backend-tasks';
@@ -49,8 +48,5 @@ export class BitbucketCloudEntityProvider
}
// @alpha (undocumented)
export const bitbucketCloudEntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[]
>;
export const bitbucketCloudEntityProviderCatalogModule: () => BackendFeature;
```
@@ -9,7 +9,6 @@ import { Config } from '@backstage/config';
import { Entity } from '@backstage/catalog-model';
import { EntityProvider } from '@backstage/plugin-catalog-backend';
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { LocationSpec } from '@backstage/plugin-catalog-backend';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
@@ -70,10 +69,7 @@ export class BitbucketServerEntityProvider implements EntityProvider {
}
// @alpha (undocumented)
export const bitbucketServerEntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[]
>;
export const bitbucketServerEntityProviderCatalogModule: () => BackendFeature;
// @public (undocumented)
export type BitbucketServerListOptions = {
@@ -7,7 +7,6 @@ import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { EntityProvider } from '@backstage/plugin-catalog-backend';
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
import { TaskRunner } from '@backstage/backend-tasks';
@@ -32,10 +31,7 @@ export class GerritEntityProvider implements EntityProvider {
}
// @alpha (undocumented)
export const gerritEntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[]
>;
export const gerritEntityProviderCatalogModule: () => BackendFeature;
// (No @packageDocumentation comment for this package)
```
@@ -13,7 +13,6 @@ import { EntityProvider } from '@backstage/plugin-catalog-backend';
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { EventParams } from '@backstage/plugin-events-node';
import { EventSubscriber } from '@backstage/plugin-events-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { GithubCredentialsProvider } from '@backstage/integration';
import { GithubIntegrationConfig } from '@backstage/integration';
import { graphql } from '@octokit/graphql';
@@ -102,10 +101,7 @@ export class GithubEntityProvider implements EntityProvider, EventSubscriber {
}
// @alpha
export const githubEntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[]
>;
export const githubEntityProviderCatalogModule: () => BackendFeature;
// @public (undocumented)
export class GithubLocationAnalyzer implements ScmLocationAnalyzer {
@@ -9,7 +9,6 @@ import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
import { Config } from '@backstage/config';
import { EntityProvider } from '@backstage/plugin-catalog-backend';
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { LocationSpec } from '@backstage/plugin-catalog-backend';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
@@ -35,10 +34,7 @@ export class GitlabDiscoveryEntityProvider implements EntityProvider {
}
// @alpha
export const gitlabDiscoveryEntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[]
>;
export const gitlabDiscoveryEntityProviderCatalogModule: () => BackendFeature;
// @public
export class GitLabDiscoveryProcessor implements CatalogProcessor {
@@ -10,7 +10,6 @@ import { CatalogBuilder } from '@backstage/plugin-catalog-backend';
import type { Config } from '@backstage/config';
import type { DeferredEntity } from '@backstage/plugin-catalog-backend';
import type { DurationObjectUnits } from 'luxon';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import type { Logger } from 'winston';
import type { PermissionEvaluator } from '@backstage/plugin-permission-common';
import type { PluginDatabaseManager } from '@backstage/backend-common';
@@ -69,17 +68,12 @@ export interface IncrementalEntityProviderOptions {
}
// @alpha
export const incrementalIngestionEntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[
options: {
providers: {
provider: IncrementalEntityProvider<unknown, unknown>;
options: IncrementalEntityProviderOptions;
}[];
},
]
>;
export const incrementalIngestionEntityProviderCatalogModule: (options: {
providers: {
provider: IncrementalEntityProvider<unknown, unknown>;
options: IncrementalEntityProviderOptions;
}[];
}) => BackendFeature;
// @public (undocumented)
export type PluginEnvironment = {
@@ -9,7 +9,6 @@ import { CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
import { Config } from '@backstage/config';
import { EntityProvider } from '@backstage/plugin-catalog-backend';
import { EntityProviderConnection } from '@backstage/plugin-catalog-backend';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { GroupEntity } from '@backstage/catalog-model';
import { LocationSpec } from '@backstage/plugin-catalog-backend';
import { Logger } from 'winston';
@@ -136,10 +135,7 @@ export class MicrosoftGraphOrgEntityProvider implements EntityProvider {
}
// @alpha
export const microsoftGraphOrgEntityProviderCatalogModule: FactoryFunction<
BackendFeature,
[]
>;
export const microsoftGraphOrgEntityProviderCatalogModule: () => BackendFeature;
// @alpha
export interface MicrosoftGraphOrgEntityProviderCatalogModuleOptions {
+1 -2
View File
@@ -34,7 +34,6 @@ import { EntityProvider } from '@backstage/plugin-catalog-node';
import { EntityProviderConnection } from '@backstage/plugin-catalog-node';
import { EntityProviderMutation } from '@backstage/plugin-catalog-node';
import { EntityRelationSpec } from '@backstage/plugin-catalog-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { GetEntitiesRequest } from '@backstage/catalog-client';
import { JsonValue } from '@backstage/types';
import { LocationEntityV1alpha1 } from '@backstage/catalog-model';
@@ -238,7 +237,7 @@ export type CatalogPermissionRule<
> = PermissionRule<Entity, EntitiesSearchFilter, 'catalog-entity', TParams>;
// @alpha
export const catalogPlugin: FactoryFunction<BackendFeature, []>;
export const catalogPlugin: () => BackendFeature;
// @public
export interface CatalogProcessingEngine {
@@ -7,7 +7,6 @@ import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { EventBroker } from '@backstage/plugin-events-node';
import { EventPublisher } from '@backstage/plugin-events-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
@@ -24,8 +23,5 @@ export class AwsSqsConsumingEventPublisher implements EventPublisher {
}
// @alpha
export const awsSqsConsumingEventPublisherEventsModule: FactoryFunction<
BackendFeature,
[]
>;
export const awsSqsConsumingEventPublisherEventsModule: () => BackendFeature;
```
@@ -5,7 +5,6 @@
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { EventParams } from '@backstage/plugin-events-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { SubTopicEventRouter } from '@backstage/plugin-events-node';
// @public
@@ -16,8 +15,5 @@ export class AzureDevOpsEventRouter extends SubTopicEventRouter {
}
// @alpha
export const azureDevOpsEventRouterEventsModule: FactoryFunction<
BackendFeature,
[]
>;
export const azureDevOpsEventRouterEventsModule: () => BackendFeature;
```
@@ -5,7 +5,6 @@
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { EventParams } from '@backstage/plugin-events-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { SubTopicEventRouter } from '@backstage/plugin-events-node';
// @public
@@ -16,8 +15,5 @@ export class BitbucketCloudEventRouter extends SubTopicEventRouter {
}
// @alpha
export const bitbucketCloudEventRouterEventsModule: FactoryFunction<
BackendFeature,
[]
>;
export const bitbucketCloudEventRouterEventsModule: () => BackendFeature;
```
@@ -5,7 +5,6 @@
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { EventParams } from '@backstage/plugin-events-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { SubTopicEventRouter } from '@backstage/plugin-events-node';
// @public
@@ -16,5 +15,5 @@ export class GerritEventRouter extends SubTopicEventRouter {
}
// @alpha
export const gerritEventRouterEventsModule: FactoryFunction<BackendFeature, []>;
export const gerritEventRouterEventsModule: () => BackendFeature;
```
@@ -6,7 +6,6 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { EventParams } from '@backstage/plugin-events-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { RequestValidator } from '@backstage/plugin-events-node';
import { SubTopicEventRouter } from '@backstage/plugin-events-node';
@@ -23,8 +22,8 @@ export class GithubEventRouter extends SubTopicEventRouter {
}
// @alpha
export const githubEventRouterEventsModule: FactoryFunction<BackendFeature, []>;
export const githubEventRouterEventsModule: () => BackendFeature;
// @alpha
export const githubWebhookEventsModule: FactoryFunction<BackendFeature, []>;
export const githubWebhookEventsModule: () => BackendFeature;
```
@@ -6,7 +6,6 @@
import { BackendFeature } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { EventParams } from '@backstage/plugin-events-node';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { RequestValidator } from '@backstage/plugin-events-node';
import { SubTopicEventRouter } from '@backstage/plugin-events-node';
@@ -21,8 +20,8 @@ export class GitlabEventRouter extends SubTopicEventRouter {
}
// @alpha
export const gitlabEventRouterEventsModule: FactoryFunction<BackendFeature, []>;
export const gitlabEventRouterEventsModule: () => BackendFeature;
// @alpha
export const gitlabWebhookEventsModule: FactoryFunction<BackendFeature, []>;
export const gitlabWebhookEventsModule: () => BackendFeature;
```
+1 -2
View File
@@ -9,7 +9,6 @@ import { EventBroker } from '@backstage/plugin-events-node';
import { EventPublisher } from '@backstage/plugin-events-node';
import { EventSubscriber } from '@backstage/plugin-events-node';
import express from 'express';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { HttpPostIngressOptions } from '@backstage/plugin-events-node';
import { Logger } from 'winston';
@@ -30,7 +29,7 @@ export class EventsBackend {
}
// @alpha
export const eventsPlugin: FactoryFunction<BackendFeature, []>;
export const eventsPlugin: () => BackendFeature;
// @public
export class HttpPostIngressEventPublisher implements EventPublisher {
+4 -6
View File
@@ -13,7 +13,6 @@ import { Config } from '@backstage/config';
import { createPullRequest } from 'octokit-plugin-create-pull-request';
import { Entity } from '@backstage/catalog-model';
import express from 'express';
import { FactoryFunction } from '@backstage/backend-plugin-api/src/types';
import { GithubCredentialsProvider } from '@backstage/integration';
import { IdentityApi } from '@backstage/plugin-auth-node';
import { JsonObject } from '@backstage/types';
@@ -626,7 +625,7 @@ export type RunCommandOptions = {
};
// @alpha
export const scaffolderCatalogModule: FactoryFunction<BackendFeature, []>;
export const scaffolderCatalogModule: () => BackendFeature;
// @public (undocumented)
export class ScaffolderEntitiesProcessor implements CatalogProcessor {
@@ -643,10 +642,9 @@ export class ScaffolderEntitiesProcessor implements CatalogProcessor {
}
// @alpha
export const scaffolderPlugin: FactoryFunction<
BackendFeature,
[options: ScaffolderPluginOptions]
>;
export const scaffolderPlugin: (
options: ScaffolderPluginOptions,
) => BackendFeature;
// @alpha
export type ScaffolderPluginOptions = {