Move known plugin package constants from cli-common to cli-internal
The known plugin package ID mappings don't need to be part of the public API surface. Move them to @internal/cli and update consumers. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Made-with: Cursor
This commit is contained in:
@@ -31,3 +31,7 @@ export {
|
||||
resetSecretStore,
|
||||
type SecretStore,
|
||||
} from './secretStore';
|
||||
export {
|
||||
knownBackendPluginPackageNameByPluginId,
|
||||
knownFrontendPluginPackageNameByPluginId,
|
||||
} from './knownPluginPackages';
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
const knownBackendPluginIds = [
|
||||
'app',
|
||||
'auth',
|
||||
'catalog',
|
||||
'events',
|
||||
'kubernetes',
|
||||
'notifications',
|
||||
'permission',
|
||||
'proxy',
|
||||
'scaffolder',
|
||||
'search',
|
||||
'signals',
|
||||
'techdocs',
|
||||
];
|
||||
|
||||
// Only includes plugin IDs that have a corresponding frontend package; some plugins are backend-only and not listed here.
|
||||
const knownFrontendPluginIds = [
|
||||
'app',
|
||||
'auth',
|
||||
'catalog',
|
||||
'kubernetes',
|
||||
'notifications',
|
||||
'scaffolder',
|
||||
'search',
|
||||
'signals',
|
||||
'techdocs',
|
||||
];
|
||||
|
||||
/**
|
||||
* Maps known plugin IDs to their corresponding backend package names.
|
||||
*/
|
||||
export const knownBackendPluginPackageNameByPluginId: Record<string, string> =
|
||||
Object.fromEntries(
|
||||
knownBackendPluginIds.map(pluginId => [
|
||||
pluginId,
|
||||
`@backstage/plugin-${pluginId}-backend`,
|
||||
]),
|
||||
);
|
||||
|
||||
/**
|
||||
* Maps known plugin IDs to their corresponding frontend package names.
|
||||
*/
|
||||
export const knownFrontendPluginPackageNameByPluginId: Record<string, string> =
|
||||
Object.fromEntries(
|
||||
knownFrontendPluginIds.map(pluginId => [
|
||||
pluginId,
|
||||
`@backstage/plugin-${pluginId}`,
|
||||
]),
|
||||
);
|
||||
Reference in New Issue
Block a user