Deprecated `createRouter` and its router options in favour of the new backend system. (#2048)
Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
parent
a2e396485e
commit
9265e67583
|
|
@ -5,8 +5,6 @@
|
|||
```ts
|
||||
import { BackendFeature } from '@backstage/backend-plugin-api';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "feedbackPlugin" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
const feedbackPlugin: BackendFeature;
|
||||
export default feedbackPlugin;
|
||||
|
|
|
|||
|
|
@ -11,17 +11,26 @@ import { LoggerService } from '@backstage/backend-plugin-api';
|
|||
import { NotificationService } from '@backstage/plugin-notifications-node';
|
||||
import { PluginEndpointDiscovery } from '@backstage/backend-common';
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "RouterOptions" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "createRouter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
// @public @deprecated (undocumented)
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "feedbackPlugin" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
const feedbackPlugin: BackendFeature;
|
||||
export default feedbackPlugin;
|
||||
|
||||
// @public @deprecated (undocumented)
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
auth: AuthService;
|
||||
// (undocumented)
|
||||
config: Config;
|
||||
// (undocumented)
|
||||
discovery: PluginEndpointDiscovery;
|
||||
// (undocumented)
|
||||
logger: LoggerService;
|
||||
// (undocumented)
|
||||
notifications?: NotificationService;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { createRouter } from './service/router';
|
||||
export { createRouter, type RouterOptions } from './service/router';
|
||||
export { feedbackPlugin as default } from './plugin';
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ import {
|
|||
import { notificationService } from '@backstage/plugin-notifications-node';
|
||||
import { createRouter } from './service/router';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const feedbackPlugin = createBackendPlugin({
|
||||
pluginId: 'feedback',
|
||||
register(env) {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ import { NodeMailer } from './emails';
|
|||
|
||||
import { NotificationService } from '@backstage/plugin-notifications-node';
|
||||
|
||||
/**
|
||||
* @deprecated Please migrate to the new backend system as this will be removed in the future.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface RouterOptions {
|
||||
logger: LoggerService;
|
||||
config: Config;
|
||||
|
|
@ -41,6 +46,11 @@ export interface RouterOptions {
|
|||
notifications?: NotificationService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Please migrate to the new backend system as this will be removed in the future.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue