remove service compat too

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-08-15 16:46:19 +02:00
parent d425fc4dfd
commit 9080f57970
57 changed files with 381 additions and 946 deletions
+3 -4
View File
@@ -4,14 +4,13 @@
```ts
import { AuthService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export const authServiceFactory: ServiceFactoryCompat<
export const authServiceFactory: ServiceFactory<
AuthService,
'plugin',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -7,7 +7,7 @@ import { CacheService } from '@backstage/backend-plugin-api';
import { CacheServiceOptions } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { LoggerService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export class CacheManager {
@@ -25,11 +25,10 @@ export type CacheManagerOptions = {
};
// @public
export const cacheServiceFactory: ServiceFactoryCompat<
export const cacheServiceFactory: ServiceFactory<
CacheService,
'plugin',
'singleton',
undefined
'singleton'
>;
// @public (undocumented)
@@ -8,7 +8,7 @@ import { DatabaseService } from '@backstage/backend-plugin-api';
import { LifecycleService } from '@backstage/backend-plugin-api';
import { LoggerService } from '@backstage/backend-plugin-api';
import { PluginMetadataService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export class DatabaseManager implements LegacyRootDatabaseService {
@@ -32,11 +32,10 @@ export type DatabaseManagerOptions = {
};
// @public
export const databaseServiceFactory: ServiceFactoryCompat<
export const databaseServiceFactory: ServiceFactory<
DatabaseService,
'plugin',
'singleton',
undefined
'singleton'
>;
// @public @deprecated
@@ -5,14 +5,13 @@
```ts
import { Config } from '@backstage/config';
import { DiscoveryService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export const discoveryServiceFactory: ServiceFactoryCompat<
export const discoveryServiceFactory: ServiceFactory<
DiscoveryService,
'plugin',
'singleton',
undefined
'singleton'
>;
// @public
@@ -4,14 +4,13 @@
```ts
import { HttpAuthService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export const httpAuthServiceFactory: ServiceFactoryCompat<
export const httpAuthServiceFactory: ServiceFactory<
HttpAuthService,
'plugin',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -7,7 +7,7 @@ import { HttpRouterService } from '@backstage/backend-plugin-api';
import { HumanDuration } from '@backstage/types';
import { LifecycleService } from '@backstage/backend-plugin-api';
import { RequestHandler } from 'express';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export function createLifecycleMiddleware(
@@ -15,11 +15,10 @@ export function createLifecycleMiddleware(
): RequestHandler;
// @public
export const httpRouterServiceFactory: ServiceFactoryCompat<
export const httpRouterServiceFactory: ServiceFactory<
HttpRouterService,
'plugin',
'singleton',
undefined
'singleton'
>;
// @public
@@ -4,14 +4,13 @@
```ts
import { LifecycleService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export const lifecycleServiceFactory: ServiceFactoryCompat<
export const lifecycleServiceFactory: ServiceFactory<
LifecycleService,
'plugin',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -4,14 +4,13 @@
```ts
import { LoggerService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export const loggerServiceFactory: ServiceFactoryCompat<
export const loggerServiceFactory: ServiceFactory<
LoggerService,
'plugin',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -4,14 +4,13 @@
```ts
import { PermissionsService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export const permissionsServiceFactory: ServiceFactoryCompat<
export const permissionsServiceFactory: ServiceFactory<
PermissionsService,
'plugin',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -4,14 +4,13 @@
```ts
import { RootHealthService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public (undocumented)
export const rootHealthServiceFactory: ServiceFactoryCompat<
export const rootHealthServiceFactory: ServiceFactory<
RootHealthService,
'root',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -4,14 +4,13 @@
```ts
import { RootLifecycleService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export const rootLifecycleServiceFactory: ServiceFactoryCompat<
export const rootLifecycleServiceFactory: ServiceFactory<
RootLifecycleService,
'root',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -7,15 +7,14 @@ import { Format } from 'logform';
import { JsonObject } from '@backstage/types';
import { LoggerService } from '@backstage/backend-plugin-api';
import { RootLoggerService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
import { transport } from 'winston';
// @public
export const rootLoggerServiceFactory: ServiceFactoryCompat<
export const rootLoggerServiceFactory: ServiceFactory<
RootLoggerService,
'root',
'singleton',
undefined
'singleton'
>;
// @public
@@ -6,7 +6,7 @@
import { DatabaseService } from '@backstage/backend-plugin-api';
import { LoggerService } from '@backstage/backend-plugin-api';
import { SchedulerService } from '@backstage/backend-plugin-api';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
// @public
export class DefaultSchedulerService {
@@ -18,11 +18,10 @@ export class DefaultSchedulerService {
}
// @public
export const schedulerServiceFactory: ServiceFactoryCompat<
export const schedulerServiceFactory: ServiceFactory<
SchedulerService,
'plugin',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -21,7 +21,7 @@ import { GitLabIntegration } from '@backstage/integration';
import { HarnessIntegration } from '@backstage/integration';
import { LoggerService } from '@backstage/backend-plugin-api';
import { Readable } from 'stream';
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
import { ServiceRef } from '@backstage/backend-plugin-api';
import { UrlReaderService } from '@backstage/backend-plugin-api';
import { UrlReaderServiceReadTreeOptions } from '@backstage/backend-plugin-api';
@@ -434,11 +434,10 @@ export class UrlReaders {
}
// @public
export const urlReaderServiceFactory: ServiceFactoryCompat<
export const urlReaderServiceFactory: ServiceFactory<
UrlReaderService,
'plugin',
'singleton',
undefined
'singleton'
>;
// @public
@@ -3,15 +3,14 @@
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { ServiceFactoryCompat } from '@backstage/backend-plugin-api';
import { ServiceFactory } from '@backstage/backend-plugin-api';
import { UserInfoService } from '@backstage/backend-plugin-api';
// @public
export const userInfoServiceFactory: ServiceFactoryCompat<
export const userInfoServiceFactory: ServiceFactory<
UserInfoService,
'plugin',
'singleton',
undefined
'singleton'
>;
// (No @packageDocumentation comment for this package)
@@ -36,7 +36,7 @@ const server = setupServer();
// TODO: Ship discovery mock service in the service factory tester
const mockDeps = [
discoveryServiceFactory(),
discoveryServiceFactory,
tokenManagerServiceFactory,
mockServices.rootConfig.factory({
data: {
@@ -110,7 +110,7 @@ describe('httpRouterFactory', () => {
});
const defaultServices = [
httpRouterServiceFactory(),
httpRouterServiceFactory,
mockServices.httpAuth.factory({
defaultCredentials: mockCredentials.none(),
}),
@@ -60,7 +60,7 @@ export const rootConfigServiceFactoryWithOptions = (
console.log(`Loading config from ${source}`);
return await ConfigSources.toConfig(source);
},
})();
});
/**
* @public
@@ -123,7 +123,7 @@ const rootHttpRouterServiceFactoryWithOptions = (
return router;
},
})();
});
/** @public */
export const rootHttpRouterServiceFactory = Object.assign(
@@ -20,7 +20,7 @@ import { schedulerServiceFactory } from './schedulerServiceFactory';
describe('schedulerFactory', () => {
it('creates sidecar database features', async () => {
const tester = ServiceFactoryTester.from(schedulerServiceFactory());
const tester = ServiceFactoryTester.from(schedulerServiceFactory);
const scheduler = await tester.getSubject();
await scheduler.scheduleTask({