diff --git a/packages/backend-app-api/api-report.md b/packages/backend-app-api/api-report.md index 199b0863de..03d1ecc2be 100644 --- a/packages/backend-app-api/api-report.md +++ b/packages/backend-app-api/api-report.md @@ -12,13 +12,16 @@ import { CorsOptions } from 'cors'; import { ErrorRequestHandler } from 'express'; import { Express as Express_2 } from 'express'; import { ExtensionPoint } from '@backstage/backend-plugin-api'; +import { Format } from 'logform'; import { Handler } from 'express'; import { HelmetOptions } from 'helmet'; import * as http from 'http'; import { HttpRouterService } from '@backstage/backend-plugin-api'; import { IdentityService } from '@backstage/backend-plugin-api'; import { LifecycleService } from '@backstage/backend-plugin-api'; +import { LoadConfigOptionsRemote } from '@backstage/config-loader'; import { LoggerService } from '@backstage/backend-plugin-api'; +import { LogMeta } from '@backstage/backend-plugin-api'; import { PermissionsService } from '@backstage/backend-plugin-api'; import { PluginCacheManager } from '@backstage/backend-common'; import { PluginDatabaseManager } from '@backstage/backend-common'; @@ -33,6 +36,7 @@ import { ServiceFactory } from '@backstage/backend-plugin-api'; import { ServiceFactoryOrFunction } from '@backstage/backend-plugin-api'; import { ServiceRef } from '@backstage/backend-plugin-api'; import { TokenManagerService } from '@backstage/backend-plugin-api'; +import { transport } from 'winston'; import { UrlReader } from '@backstage/backend-common'; // @public (undocumented) @@ -51,6 +55,18 @@ export const cacheFactory: () => ServiceFactory; // @public (undocumented) export const configFactory: () => ServiceFactory; +// @public (undocumented) +export interface ConfigFactoryOptions { + argv?: string[]; + remote?: LoadConfigOptionsRemote; +} + +// @public (undocumented) +export function createConfigSecretEnumerator(options: { + logger: LoggerService; + dir?: string; +}): Promise<(config: Config) => Iterable>; + // @public export function createHttpServer( listener: RequestListener, @@ -147,6 +163,15 @@ export type IdentityFactoryOptions = { // @public export const lifecycleFactory: () => ServiceFactory; +// @public +export function loadBackendConfig(options: { + logger: LoggerService; + remote?: LoadConfigOptionsRemote; + argv: string[]; +}): Promise<{ + config: Config; +}>; + // @public (undocumented) export const loggerFactory: () => ServiceFactory; @@ -231,4 +256,38 @@ export const tokenManagerFactory: () => ServiceFactory; // @public (undocumented) export const urlReaderFactory: () => ServiceFactory; + +// @public +export class WinstonLogger implements RootLoggerService { + // (undocumented) + addRedactions(redactions: string[]): void; + // (undocumented) + child(meta: LogMeta): LoggerService; + static colorFormat(): Format; + static create(options: WinstonLoggerOptions): WinstonLogger; + // (undocumented) + debug(message: string, meta?: LogMeta): void; + // (undocumented) + error(message: string, meta?: LogMeta): void; + // (undocumented) + info(message: string, meta?: LogMeta): void; + static redacter(): { + format: Format; + add: (redactions: Iterable) => void; + }; + // (undocumented) + warn(message: string, meta?: LogMeta): void; +} + +// @public (undocumented) +export interface WinstonLoggerOptions { + // (undocumented) + format: Format; + // (undocumented) + level: string; + // (undocumented) + meta?: LogMeta; + // (undocumented) + transports: transport[]; +} ``` diff --git a/packages/backend-plugin-api/api-report.md b/packages/backend-plugin-api/api-report.md index 33190277c9..408908ca71 100644 --- a/packages/backend-plugin-api/api-report.md +++ b/packages/backend-plugin-api/api-report.md @@ -282,7 +282,10 @@ export interface RootHttpRouterService { export interface RootLifecycleService extends LifecycleService {} // @public (undocumented) -export interface RootLoggerService extends LoggerService {} +export interface RootLoggerService extends LoggerService { + // (undocumented) + addRedactions(redactions: Iterable): void; +} // @public (undocumented) export interface SchedulerService extends PluginTaskScheduler {}