Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feedback - Deprecated legacy backend #2048

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
21 changes: 15 additions & 6 deletions workspaces/feedback/plugins/feedback-backend/report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Original file line number Diff line number Diff line change
Expand Up @@ -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';
3 changes: 3 additions & 0 deletions workspaces/feedback/plugins/feedback-backend/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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> {
Expand Down
Loading