From 934d1459dd9fdd423446c395635749467f19c902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 17 Sep 2024 15:46:51 +0200 Subject: [PATCH] clean up the todo-list-backend report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- plugins/example-todo-list-backend/api-report.md | 14 -------------- plugins/example-todo-list-backend/src/index.ts | 1 - .../src/service/router.test.ts | 3 +-- .../src/service/router.ts | 3 --- .../example-todo-list-backend/src/service/todos.ts | 5 ++--- 5 files changed, 3 insertions(+), 23 deletions(-) diff --git a/plugins/example-todo-list-backend/api-report.md b/plugins/example-todo-list-backend/api-report.md index 8fa39f0cec..1a61e07cd0 100644 --- a/plugins/example-todo-list-backend/api-report.md +++ b/plugins/example-todo-list-backend/api-report.md @@ -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; // @public const exampleTodoListPlugin: BackendFeature; export default exampleTodoListPlugin; -// @public -export interface RouterOptions { - // (undocumented) - httpAuth: HttpAuthService; - // (undocumented) - logger: LoggerService; -} - // (No @packageDocumentation comment for this package) ``` diff --git a/plugins/example-todo-list-backend/src/index.ts b/plugins/example-todo-list-backend/src/index.ts index 156e44f70e..61c57be182 100644 --- a/plugins/example-todo-list-backend/src/index.ts +++ b/plugins/example-todo-list-backend/src/index.ts @@ -14,5 +14,4 @@ * limitations under the License. */ -export * from './service/router'; export { exampleTodoListPlugin as default } from './plugin'; diff --git a/plugins/example-todo-list-backend/src/service/router.test.ts b/plugins/example-todo-list-backend/src/service/router.test.ts index 50bacac203..46cc287bce 100644 --- a/plugins/example-todo-list-backend/src/service/router.test.ts +++ b/plugins/example-todo-list-backend/src/service/router.test.ts @@ -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; diff --git a/plugins/example-todo-list-backend/src/service/router.ts b/plugins/example-todo-list-backend/src/service/router.ts index 5f2d9fd37c..abadbbb4d9 100644 --- a/plugins/example-todo-list-backend/src/service/router.ts +++ b/plugins/example-todo-list-backend/src/service/router.ts @@ -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 * diff --git a/plugins/example-todo-list-backend/src/service/todos.ts b/plugins/example-todo-list-backend/src/service/todos.ts index b87ab7557e..75de25b845 100644 --- a/plugins/example-todo-list-backend/src/service/todos.ts +++ b/plugins/example-todo-list-backend/src/service/todos.ts @@ -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;