Merge pull request #31053 from backstage/sennyeya/instance-metadata-update
feat: promote instance metadata
This commit is contained in:
@@ -232,6 +232,11 @@ export namespace coreServices {
|
||||
const rootLogger: ServiceRef<RootLoggerService, 'root', 'singleton'>;
|
||||
const scheduler: ServiceRef<SchedulerService, 'plugin', 'singleton'>;
|
||||
const urlReader: ServiceRef<UrlReaderService, 'plugin', 'singleton'>;
|
||||
const rootInstanceMetadata: ServiceRef<
|
||||
RootInstanceMetadataService,
|
||||
'plugin',
|
||||
'singleton'
|
||||
>;
|
||||
}
|
||||
|
||||
// @public
|
||||
@@ -578,6 +583,24 @@ export interface RootHttpRouterService {
|
||||
use(path: string, handler: Handler): void;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RootInstanceMetadataService {
|
||||
// (undocumented)
|
||||
getInstalledPlugins: () => Promise<
|
||||
ReadonlyArray<RootInstanceMetadataServicePluginInfo>
|
||||
>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RootInstanceMetadataServicePluginInfo {
|
||||
// (undocumented)
|
||||
readonly modules: ReadonlyArray<{
|
||||
moduleId: string;
|
||||
}>;
|
||||
// (undocumented)
|
||||
readonly pluginId: string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export interface RootLifecycleService extends LifecycleService {
|
||||
// (undocumented)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
* Copyright 2025 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** @public */
|
||||
export interface RootInstanceMetadataServicePluginInfo {
|
||||
readonly pluginId: string;
|
||||
readonly modules: ReadonlyArray<{
|
||||
moduleId: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export interface RootInstanceMetadataService {
|
||||
getInstalledPlugins: () => Promise<
|
||||
ReadonlyArray<RootInstanceMetadataServicePluginInfo>
|
||||
>;
|
||||
}
|
||||
@@ -277,4 +277,15 @@ export namespace coreServices {
|
||||
export const urlReader = createServiceRef<
|
||||
import('./UrlReaderService').UrlReaderService
|
||||
>({ id: 'core.urlReader' });
|
||||
|
||||
/**
|
||||
* Information about the current Backstage instance.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const rootInstanceMetadata = createServiceRef<
|
||||
import('./RootInstanceMetadataService').RootInstanceMetadataService
|
||||
>({
|
||||
id: 'core.rootInstanceMetadata',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -85,4 +85,8 @@ export type {
|
||||
UrlReaderServiceSearchResponseFile,
|
||||
} from './UrlReaderService';
|
||||
export type { BackstageUserInfo, UserInfoService } from './UserInfoService';
|
||||
export type {
|
||||
RootInstanceMetadataService,
|
||||
RootInstanceMetadataServicePluginInfo,
|
||||
} from './RootInstanceMetadataService';
|
||||
export { coreServices } from './coreServices';
|
||||
|
||||
Reference in New Issue
Block a user