Merge pull request #26742 from backstage/freben/important-stuff

clean up the todo-list-backend report
This commit is contained in:
Fredrik Adelöw
2024-09-18 11:59:14 +02:00
committed by GitHub
5 changed files with 3 additions and 23 deletions
@@ -4,24 +4,10 @@
```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import express from 'express';
import { HttpAuthService } from '@backstage/backend-plugin-api';
import { LoggerService } from '@backstage/backend-plugin-api';
// @public
export function createRouter(options: RouterOptions): Promise<express.Router>;
// @public
const exampleTodoListPlugin: BackendFeature;
export default exampleTodoListPlugin;
// @public
export interface RouterOptions {
// (undocumented)
httpAuth: HttpAuthService;
// (undocumented)
logger: LoggerService;
}
// (No @packageDocumentation comment for this package)
```
@@ -14,5 +14,4 @@
* limitations under the License.
*/
export * from './service/router';
export { exampleTodoListPlugin as default } from './plugin';
@@ -14,11 +14,10 @@
* limitations under the License.
*/
import { mockServices } from '@backstage/backend-test-utils';
import express from 'express';
import request from 'supertest';
import { createRouter } from './router';
import { mockServices } from '@backstage/backend-test-utils';
describe('createRouter', () => {
let app: express.Express;
@@ -23,8 +23,6 @@ import { HttpAuthService, LoggerService } from '@backstage/backend-plugin-api';
/**
* Dependencies of the todo-list router
*
* @public
*/
export interface RouterOptions {
logger: LoggerService;
@@ -35,7 +33,6 @@ export interface RouterOptions {
* Creates an express.Router with some endpoints
* for creating, editing and deleting todo items.
*
* @public
* @param options - the dependencies of the router
* @returns an express.Router
*
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { v4 as uuid } from 'uuid';
import { NotFoundError } from '@backstage/errors';
@@ -29,9 +30,7 @@ export type TodoFilter = {
};
export type TodoFilters =
| {
anyOf: TodoFilters[];
}
| { anyOf: TodoFilters[] }
| { allOf: TodoFilters[] }
| { not: TodoFilters }
| TodoFilter;