@@ -58,6 +58,7 @@ export class DocsSynchronizer {
|
||||
}: {
|
||||
publisher: PublisherBase;
|
||||
logger: winston.Logger;
|
||||
buildLogger: winston.Logger;
|
||||
config: Config;
|
||||
scmIntegrations: ScmIntegrationRegistry;
|
||||
cache: TechDocsCache | undefined;
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
import express, { Response } from 'express';
|
||||
import Router from 'express-promise-router';
|
||||
import { Knex } from 'knex';
|
||||
import { Logger } from 'winston';
|
||||
import { createLogger, Logger } from 'winston';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { DocsSynchronizer, DocsSynchronizerSyncOpts } from './DocsSynchronizer';
|
||||
import { createCacheMiddleware, TechDocsCache } from '../cache';
|
||||
@@ -56,7 +56,7 @@ export type OutOfTheBoxDeploymentOptions = {
|
||||
config: Config;
|
||||
cache: PluginCacheManager;
|
||||
docsBuildStrategy?: DocsBuildStrategy;
|
||||
buildLogger: Logger;
|
||||
buildLogger?: Logger;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -72,6 +72,7 @@ export type RecommendedDeploymentOptions = {
|
||||
config: Config;
|
||||
cache: PluginCacheManager;
|
||||
docsBuildStrategy?: DocsBuildStrategy;
|
||||
buildLogger?: Logger;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -108,6 +109,11 @@ export async function createRouter(
|
||||
const catalogClient = new CatalogClient({ discoveryApi: discovery });
|
||||
const docsBuildStrategy =
|
||||
options.docsBuildStrategy ?? DefaultDocsBuildStrategy.fromConfig(config);
|
||||
const buildLogger =
|
||||
options.buildLogger ??
|
||||
createLogger({
|
||||
silent: true,
|
||||
});
|
||||
|
||||
// Entities are cached to optimize the /static/docs request path, which can be called many times
|
||||
// when loading a single techdocs page.
|
||||
|
||||
Reference in New Issue
Block a user