From cd3c5b132ea0251e25f3aa7447e99a15e4c4509b Mon Sep 17 00:00:00 2001 From: Joe Porpeglia Date: Thu, 13 Jan 2022 14:25:03 -0500 Subject: [PATCH] Update package exports to align with ADR004 Signed-off-by: Joe Porpeglia --- plugins/techdocs-backend/src/index.ts | 13 +++++++++++-- plugins/techdocs-backend/src/search/index.ts | 5 ----- plugins/techdocs-backend/src/service/index.ts | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 plugins/techdocs-backend/src/service/index.ts diff --git a/plugins/techdocs-backend/src/index.ts b/plugins/techdocs-backend/src/index.ts index 69a30bf2b0..334369cb5f 100644 --- a/plugins/techdocs-backend/src/index.ts +++ b/plugins/techdocs-backend/src/index.ts @@ -20,6 +20,15 @@ * @packageDocumentation */ -export { createRouter } from './service/router'; -export * from './search'; +export { createRouter } from './service'; +export type { RouterOptions } from './service'; + +export { DefaultTechDocsCollator } from './search'; +export type { TechDocsCollatorOptions } from './search'; + +/** + * @deprecated Use directly from @backstage/techdocs-common + */ +export type { TechDocsDocument } from '@backstage/techdocs-common'; + export * from '@backstage/techdocs-common'; diff --git a/plugins/techdocs-backend/src/search/index.ts b/plugins/techdocs-backend/src/search/index.ts index 53e0934789..fbbd23b964 100644 --- a/plugins/techdocs-backend/src/search/index.ts +++ b/plugins/techdocs-backend/src/search/index.ts @@ -16,8 +16,3 @@ export { DefaultTechDocsCollator } from './DefaultTechDocsCollator'; export type { TechDocsCollatorOptions } from './DefaultTechDocsCollator'; - -/** - * @deprecated Use directly from @backstage/techdocs-common - */ -export type { TechDocsDocument } from '@backstage/techdocs-common'; diff --git a/plugins/techdocs-backend/src/service/index.ts b/plugins/techdocs-backend/src/service/index.ts new file mode 100644 index 0000000000..8727bd620b --- /dev/null +++ b/plugins/techdocs-backend/src/service/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2022 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. + */ + +export { createRouter } from './router'; +export type { RouterOptions } from './router';