plugins/*-backend: flip around alpha exports to stable

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-10-13 13:11:11 +02:00
parent b071eec7d7
commit 7cfc0c1902
53 changed files with 430 additions and 363 deletions
+4 -32
View File
@@ -14,36 +14,8 @@
* limitations under the License.
*/
import { loggerToWinstonLogger } from '@backstage/backend-common';
import {
createBackendPlugin,
coreServices,
} from '@backstage/backend-plugin-api';
import { createRouterInternal } from './service/router';
import { proxyPlugin } from './plugin';
/**
* The proxy backend plugin.
*
* @alpha
*/
export default createBackendPlugin({
pluginId: 'proxy',
register(env) {
env.registerInit({
deps: {
config: coreServices.rootConfig,
discovery: coreServices.discovery,
logger: coreServices.logger,
httpRouter: coreServices.httpRouter,
},
async init({ config, discovery, logger, httpRouter }) {
await createRouterInternal({
config,
discovery,
logger: loggerToWinstonLogger(logger),
httpRouterService: httpRouter,
});
},
});
},
});
/** @alpha */
const _feature = proxyPlugin;
export default _feature;
+1 -6
View File
@@ -14,16 +14,11 @@
* limitations under the License.
*/
import { default as feature } from './alpha';
/**
* A Backstage backend plugin that helps you set up proxy endpoints in the backend
*
* @packageDocumentation
*/
export { proxyPlugin as default } from './plugin';
export * from './service';
/** @public */
const _feature = feature;
export default _feature;
+49
View File
@@ -0,0 +1,49 @@
/*
* Copyright 2023 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.
*/
import { loggerToWinstonLogger } from '@backstage/backend-common';
import {
createBackendPlugin,
coreServices,
} from '@backstage/backend-plugin-api';
import { createRouterInternal } from './service/router';
/**
* The proxy backend plugin.
*
* @public
*/
export const proxyPlugin = createBackendPlugin({
pluginId: 'proxy',
register(env) {
env.registerInit({
deps: {
config: coreServices.rootConfig,
discovery: coreServices.discovery,
logger: coreServices.logger,
httpRouter: coreServices.httpRouter,
},
async init({ config, discovery, logger, httpRouter }) {
await createRouterInternal({
config,
discovery,
logger: loggerToWinstonLogger(logger),
httpRouterService: httpRouter,
});
},
});
},
});