@@ -86,15 +86,15 @@
|
||||
"rootHealth": [
|
||||
"src/entrypoints/rootHealth/index.ts"
|
||||
],
|
||||
"rootSystemMetadata": [
|
||||
"src/entrypoints/rootSystemMetadata/index.ts"
|
||||
],
|
||||
"rootHttpRouter": [
|
||||
"src/entrypoints/rootHttpRouter/index.ts"
|
||||
],
|
||||
"rootLifecycle": [
|
||||
"src/entrypoints/rootLifecycle/index.ts"
|
||||
],
|
||||
"rootSystemMetadata": [
|
||||
"src/entrypoints/rootSystemMetadata/index.ts"
|
||||
],
|
||||
"rootLogger": [
|
||||
"src/entrypoints/rootLogger/index.ts"
|
||||
],
|
||||
|
||||
@@ -25,7 +25,7 @@ export const actionsServiceFactory: ServiceFactory<
|
||||
// @alpha @deprecated (undocumented)
|
||||
export const instanceMetadataServiceFactory: ServiceFactory<
|
||||
InstanceMetadataService,
|
||||
'plugin',
|
||||
'root',
|
||||
'singleton'
|
||||
>;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { Config } from '@backstage/config';
|
||||
import { DiscoveryService } from '@backstage/backend-plugin-api';
|
||||
import { LoggerService } from '@backstage/backend-plugin-api';
|
||||
import { RootConfigService } from '@backstage/backend-plugin-api';
|
||||
@@ -26,6 +27,21 @@ export class HostDiscovery implements DiscoveryService {
|
||||
getBaseUrl(pluginId: string): Promise<string>;
|
||||
// (undocumented)
|
||||
getExternalBaseUrl(pluginId: string): Promise<string>;
|
||||
// (undocumented)
|
||||
getInstanceAddress(config: Config): {
|
||||
internal: string;
|
||||
external: string;
|
||||
};
|
||||
// (undocumented)
|
||||
listResolutions(): Promise<
|
||||
Map<
|
||||
string,
|
||||
{
|
||||
internal?: string;
|
||||
external?: string;
|
||||
}[]
|
||||
>
|
||||
>;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
## API Report File for "@backstage/backend-defaults"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { LoggerService } from '@backstage/backend-plugin-api';
|
||||
import { RootConfigService } from '@backstage/backend-plugin-api';
|
||||
import { RootInstanceMetadataService } from '@backstage/backend-plugin-api';
|
||||
import { RootSystemMetadataService } from '@backstage/backend-plugin-api';
|
||||
import { RootSystemMetadataServicePluginInfo } from '@backstage/backend-plugin-api';
|
||||
import { ServiceFactory } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
export class DefaultRootSystemMetadataService
|
||||
implements RootSystemMetadataService
|
||||
{
|
||||
constructor(options: {
|
||||
logger: LoggerService;
|
||||
config: RootConfigService;
|
||||
instanceMetadata: RootInstanceMetadataService;
|
||||
});
|
||||
// (undocumented)
|
||||
static create(pluginEnv: {
|
||||
logger: LoggerService;
|
||||
config: RootConfigService;
|
||||
instanceMetadata: RootInstanceMetadataService;
|
||||
}): DefaultRootSystemMetadataService;
|
||||
// (undocumented)
|
||||
getInstalledPlugins(): Promise<RootSystemMetadataServicePluginInfo[]>;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export const rootSystemMetadataServiceFactory: ServiceFactory<
|
||||
RootSystemMetadataService,
|
||||
'root',
|
||||
'singleton'
|
||||
>;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -1,47 +0,0 @@
|
||||
## API Report File for "@backstage/backend-defaults"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { ActionsRegistryService } from '@backstage/backend-plugin-api/alpha';
|
||||
import { ActionsService } from '@backstage/backend-plugin-api/alpha';
|
||||
import { ServiceFactory } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @public (undocumented)
|
||||
export const actionsRegistryServiceFactory: ServiceFactory<
|
||||
ActionsRegistryService,
|
||||
'plugin',
|
||||
'singleton'
|
||||
>;
|
||||
|
||||
// @public (undocumented)
|
||||
export const actionsServiceFactory: ServiceFactory<
|
||||
ActionsService,
|
||||
import { BackstageInstance } from '@backstage/backend-plugin-api';
|
||||
import { LoggerService } from '@backstage/backend-plugin-api';
|
||||
import { Observable } from '@backstage/types';
|
||||
import { RootConfigService } from '@backstage/backend-plugin-api';
|
||||
import { ServiceFactory } from '@backstage/backend-plugin-api';
|
||||
import { SystemMetadataService } from '@backstage/backend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
export class DefaultSystemMetadataService implements SystemMetadataService {
|
||||
constructor(options: { logger: LoggerService; config: RootConfigService });
|
||||
// (undocumented)
|
||||
static create(pluginEnv: {
|
||||
logger: LoggerService;
|
||||
config: RootConfigService;
|
||||
}): DefaultSystemMetadataService;
|
||||
// (undocumented)
|
||||
instances(): Observable<BackstageInstance[]>;
|
||||
}
|
||||
|
||||
// @alpha
|
||||
export const systemMetadataServiceFactory: ServiceFactory<
|
||||
SystemMetadataService,
|
||||
'root',
|
||||
'singleton'
|
||||
>;
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -14,7 +14,6 @@ import { isChildPath } from '@backstage/cli-common';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { JsonValue } from '@backstage/types';
|
||||
import { Knex } from 'knex';
|
||||
import { Observable } from '@backstage/types';
|
||||
import { Permission } from '@backstage/plugin-permission-common';
|
||||
import { PermissionAttributes } from '@backstage/plugin-permission-common';
|
||||
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
|
||||
@@ -138,14 +137,6 @@ export type BackstageCredentials<TPrincipal = unknown> = {
|
||||
principal: TPrincipal;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export interface BackstageInstance {
|
||||
// (undocumented)
|
||||
externalUrl: string;
|
||||
// (undocumented)
|
||||
internalUrl: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type BackstageNonePrincipal = {
|
||||
type: 'none';
|
||||
@@ -246,13 +237,11 @@ export namespace coreServices {
|
||||
'root',
|
||||
'singleton'
|
||||
>;
|
||||
const // @alpha
|
||||
systemMetadataServiceRef: ServiceRef<
|
||||
SystemMetadataService,
|
||||
'root',
|
||||
'singleton'
|
||||
>;
|
||||
const systemMetadata: ServiceRef<SystemMetadataService, 'root', 'singleton'>;
|
||||
const rootSystemMetadata: ServiceRef<
|
||||
RootSystemMetadataService,
|
||||
'root',
|
||||
'singleton'
|
||||
>;
|
||||
}
|
||||
|
||||
// @public
|
||||
@@ -644,6 +633,28 @@ export interface RootServiceFactoryOptions<
|
||||
service: ServiceRef<TService, 'root', TInstances>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RootSystemMetadataService {
|
||||
// (undocumented)
|
||||
getInstalledPlugins: () => Promise<
|
||||
ReadonlyArray<RootSystemMetadataServicePluginInfo>
|
||||
>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RootSystemMetadataServicePluginInfo {
|
||||
// (undocumented)
|
||||
readonly hosts: (
|
||||
| string
|
||||
| {
|
||||
external: string;
|
||||
internal: string;
|
||||
}
|
||||
)[];
|
||||
// (undocumented)
|
||||
readonly pluginId: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface SchedulerService {
|
||||
createScheduledTaskRunner(
|
||||
@@ -760,12 +771,6 @@ export interface ServiceRefOptions<
|
||||
scope?: TScope;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface SystemMetadataService {
|
||||
// (undocumented)
|
||||
instances(): Observable<BackstageInstance[]>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface UrlReaderService {
|
||||
readTree(
|
||||
|
||||
@@ -9,7 +9,6 @@ import { AuthService } from '@backstage/backend-plugin-api';
|
||||
import { Backend } from '@backstage/backend-app-api';
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
import { BackstageCredentials } from '@backstage/backend-plugin-api';
|
||||
import { BackstageInstance } from '@backstage/backend-plugin-api';
|
||||
import { BackstageNonePrincipal } from '@backstage/backend-plugin-api';
|
||||
import { BackstagePrincipalAccessRestrictions } from '@backstage/backend-plugin-api';
|
||||
import { BackstageServicePrincipal } from '@backstage/backend-plugin-api';
|
||||
@@ -39,10 +38,10 @@ import { RootHttpRouterService } from '@backstage/backend-plugin-api';
|
||||
import { RootInstanceMetadataService } from '@backstage/backend-plugin-api';
|
||||
import { RootLifecycleService } from '@backstage/backend-plugin-api';
|
||||
import { RootLoggerService } from '@backstage/backend-plugin-api';
|
||||
import { RootSystemMetadataService } from '@backstage/backend-plugin-api';
|
||||
import { SchedulerService } from '@backstage/backend-plugin-api';
|
||||
import { ServiceFactory } from '@backstage/backend-plugin-api';
|
||||
import { ServiceRef } from '@backstage/backend-plugin-api';
|
||||
import { SystemMetadataService } from '@backstage/backend-plugin-api';
|
||||
import { UrlReaderService } from '@backstage/backend-plugin-api';
|
||||
import { UserInfoService } from '@backstage/backend-plugin-api';
|
||||
|
||||
@@ -354,7 +353,7 @@ export namespace mockServices {
|
||||
factory: () => ServiceFactory<
|
||||
RootInstanceMetadataService,
|
||||
'root',
|
||||
'singleton'
|
||||
'singleton' | 'multiton'
|
||||
>;
|
||||
}
|
||||
// (undocumented)
|
||||
@@ -384,6 +383,19 @@ export namespace mockServices {
|
||||
) => ServiceMock<RootLoggerService>;
|
||||
}
|
||||
// (undocumented)
|
||||
export function rootSystemMetadata(): RootSystemMetadataService;
|
||||
// (undocumented)
|
||||
export namespace rootSystemMetadata {
|
||||
const factory: () => ServiceFactory<
|
||||
RootSystemMetadataService,
|
||||
'root',
|
||||
'singleton' | 'multiton'
|
||||
>;
|
||||
const mock: (
|
||||
partialImpl?: Partial<RootSystemMetadataService> | undefined,
|
||||
) => ServiceMock<RootSystemMetadataService>;
|
||||
}
|
||||
// (undocumented)
|
||||
export function scheduler(): SchedulerService;
|
||||
// (undocumented)
|
||||
export namespace scheduler {
|
||||
@@ -398,22 +410,6 @@ export namespace mockServices {
|
||||
partialImpl?: Partial<SchedulerService> | undefined,
|
||||
) => ServiceMock<SchedulerService>;
|
||||
}
|
||||
export function systemMetadata(options: {
|
||||
instances: BackstageInstance[];
|
||||
}): SystemMetadataService;
|
||||
// (undocumented)
|
||||
export namespace systemMetadata {
|
||||
const factory: (options: {
|
||||
instances: BackstageInstance[];
|
||||
}) => ServiceFactory<
|
||||
SystemMetadataService,
|
||||
'root',
|
||||
'singleton' | 'multiton'
|
||||
>;
|
||||
const mock: (
|
||||
partialImpl?: Partial<SystemMetadataService> | undefined,
|
||||
) => ServiceMock<SystemMetadataService>;
|
||||
}
|
||||
// (undocumented)
|
||||
export namespace urlReader {
|
||||
const // (undocumented)
|
||||
|
||||
@@ -44,6 +44,7 @@ import {
|
||||
coreServices,
|
||||
createServiceFactory,
|
||||
RootLoggerService,
|
||||
RootSystemMetadataService,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { EventsService, eventsServiceRef } from '@backstage/plugin-events-node';
|
||||
@@ -573,6 +574,12 @@ export namespace mockServices {
|
||||
rootInstanceMetadata,
|
||||
);
|
||||
}
|
||||
|
||||
export function rootSystemMetadata(): RootSystemMetadataService {
|
||||
return {
|
||||
getInstalledPlugins: () => Promise.resolve([]),
|
||||
};
|
||||
}
|
||||
export namespace rootSystemMetadata {
|
||||
/**
|
||||
* Creates a functional mock factory for the
|
||||
@@ -589,7 +596,6 @@ export namespace mockServices {
|
||||
*/
|
||||
export const mock = simpleMock(coreServices.rootSystemMetadata, () => ({
|
||||
getInstalledPlugins: jest.fn(),
|
||||
getHosts: jest.fn(),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user