Merge pull request #18267 from adamdmharvey/adamdmharvey/remove-hostdiscovery-deps
chore: Remove deprecated imports
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
---
|
||||
'@backstage/backend-test-utils': patch
|
||||
'@backstage/backend-app-api': patch
|
||||
'@techdocs/cli': patch
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Remove reference to deprecated import
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { SingleHostDiscovery } from '@backstage/backend-common';
|
||||
import { HostDiscovery } from '@backstage/backend-common';
|
||||
import {
|
||||
coreServices,
|
||||
createServiceFactory,
|
||||
@@ -27,6 +27,6 @@ export const discoveryServiceFactory = createServiceFactory({
|
||||
config: coreServices.config,
|
||||
},
|
||||
async factory({ config }) {
|
||||
return SingleHostDiscovery.fromConfig(config);
|
||||
return HostDiscovery.fromConfig(config);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
ExtendedHttpServer,
|
||||
DefaultRootHttpRouter,
|
||||
} from '@backstage/backend-app-api';
|
||||
import { SingleHostDiscovery } from '@backstage/backend-common';
|
||||
import { HostDiscovery } from '@backstage/backend-common';
|
||||
import {
|
||||
ServiceFactory,
|
||||
ServiceRef,
|
||||
@@ -148,7 +148,7 @@ export async function startTestBackend<
|
||||
throw new Error('Test server not started yet');
|
||||
}
|
||||
const port = server.port();
|
||||
const discovery = SingleHostDiscovery.fromConfig(
|
||||
const discovery = HostDiscovery.fromConfig(
|
||||
new ConfigReader({
|
||||
backend: { baseUrl: `http://localhost:${port}`, listen: { port } },
|
||||
}),
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
notFoundHandler,
|
||||
CacheManager,
|
||||
DatabaseManager,
|
||||
SingleHostDiscovery,
|
||||
HostDiscovery,
|
||||
UrlReaders,
|
||||
ServerTokenManager,
|
||||
} from '@backstage/backend-common';
|
||||
@@ -35,7 +35,7 @@ import { DefaultIdentityClient } from '@backstage/plugin-auth-node';
|
||||
function makeCreateEnv(config: Config) {
|
||||
const root = getRootLogger();
|
||||
const reader = UrlReaders.default({ logger: root, config });
|
||||
const discovery = SingleHostDiscovery.fromConfig(config);
|
||||
const discovery = HostDiscovery.fromConfig(config);
|
||||
const cacheManager = CacheManager.fromConfig(config);
|
||||
const databaseManager = DatabaseManager.fromConfig(config, { logger: root });
|
||||
const tokenManager = ServerTokenManager.noop();
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { SingleHostDiscovery } from '@backstage/backend-common';
|
||||
import { HostDiscovery } from '@backstage/backend-common';
|
||||
import { Publisher } from '@backstage/plugin-techdocs-node';
|
||||
import { OptionValues } from 'commander';
|
||||
import { createLogger } from '../../lib/utility';
|
||||
@@ -24,7 +24,7 @@ export default async function migrate(opts: OptionValues) {
|
||||
const logger = createLogger({ verbose: opts.verbose });
|
||||
|
||||
const config = PublisherConfig.getValidConfig(opts);
|
||||
const discovery = SingleHostDiscovery.fromConfig(config);
|
||||
const discovery = HostDiscovery.fromConfig(config);
|
||||
const publisher = await Publisher.fromConfig(config, { logger, discovery });
|
||||
|
||||
if (!publisher.migrateDocsCase) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { resolve } from 'path';
|
||||
import { OptionValues } from 'commander';
|
||||
import { createLogger } from '../../lib/utility';
|
||||
import { SingleHostDiscovery } from '@backstage/backend-common';
|
||||
import { HostDiscovery } from '@backstage/backend-common';
|
||||
import { Publisher } from '@backstage/plugin-techdocs-node';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { PublisherConfig } from '../../lib/PublisherConfig';
|
||||
@@ -26,7 +26,7 @@ export default async function publish(opts: OptionValues): Promise<any> {
|
||||
const logger = createLogger({ verbose: opts.verbose });
|
||||
|
||||
const config = PublisherConfig.getValidConfig(opts);
|
||||
const discovery = SingleHostDiscovery.fromConfig(config);
|
||||
const discovery = HostDiscovery.fromConfig(config);
|
||||
const publisher = await Publisher.fromConfig(config, { logger, discovery });
|
||||
|
||||
// Check that the publisher's underlying storage is ready and available.
|
||||
|
||||
Reference in New Issue
Block a user