Make entity metadata exports private in TechDocs
Co-authored-by: Anders Näsman <realandersn@users.noreply.github.com> Co-authored-by: Eric Peterson <iamEAP@users.noreply.github.com> Signed-off-by: Otto Sichert <git@ottosichert.de>
This commit is contained in:
@@ -20,6 +20,11 @@
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
import {
|
||||
TechDocsEntityMetadata,
|
||||
TechDocsMetadata,
|
||||
} from '@backstage/plugin-techdocs-react';
|
||||
|
||||
export * from './types';
|
||||
export * from './api';
|
||||
export * from './client';
|
||||
@@ -36,3 +41,22 @@ export {
|
||||
techdocsPlugin,
|
||||
} from './plugin';
|
||||
export * from './Router';
|
||||
|
||||
/**
|
||||
* @deprecated Import from `@backstage/plugin-techdocs-react` instead
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
type DeprecatedTechDocsMetadata = TechDocsMetadata;
|
||||
|
||||
/**
|
||||
* @deprecated Import from `@backstage/plugin-techdocs-react` instead
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
type DeprecatedTechDocsEntityMetadata = TechDocsEntityMetadata;
|
||||
|
||||
export type {
|
||||
DeprecatedTechDocsEntityMetadata as TechDocsEntityMetadata,
|
||||
DeprecatedTechDocsMetadata as TechDocsMetadata,
|
||||
};
|
||||
|
||||
@@ -113,9 +113,9 @@ export const TechDocsReaderPageProvider = memo(
|
||||
);
|
||||
|
||||
/**
|
||||
* Hook for use within TechDocs addons to retrieve Entity Metadata for the
|
||||
* current TechDocs site.
|
||||
* @public
|
||||
* Hook for sub-components to retrieve Entity Metadata for the current TechDocs
|
||||
* site.
|
||||
* @internal
|
||||
*/
|
||||
export const useEntityMetadata = () => {
|
||||
const { entityMetadata } = useTechDocsReaderPage();
|
||||
@@ -123,9 +123,9 @@ export const useEntityMetadata = () => {
|
||||
};
|
||||
|
||||
/**
|
||||
* Hook for use within TechDocs addons to retrieve TechDocs Metadata for the
|
||||
* current TechDocs site.
|
||||
* @public
|
||||
* Hook for sub-components to retrieve TechDocs Metadata for the current
|
||||
* TechDocs site.
|
||||
* @internal
|
||||
*/
|
||||
export const useTechDocsMetadata = () => {
|
||||
const { metadata } = useTechDocsReaderPage();
|
||||
|
||||
@@ -19,4 +19,8 @@ export type {
|
||||
TechDocsReaderPageProps,
|
||||
TechDocsReaderLayoutProps,
|
||||
} from './TechDocsReaderPage';
|
||||
export * from './context';
|
||||
export { TechDocsReaderPageProvider } from './context';
|
||||
export type {
|
||||
TechDocsReaderPageProviderProps,
|
||||
TechDocsReaderPageProviderRenderFunction,
|
||||
} from './context';
|
||||
|
||||
@@ -21,8 +21,6 @@ export type {
|
||||
TechDocsReaderPageProviderRenderFunction,
|
||||
} from './TechDocsReaderPage';
|
||||
export {
|
||||
useEntityMetadata,
|
||||
useTechDocsMetadata,
|
||||
TechDocsReaderLayout,
|
||||
TechDocsReaderPageProvider,
|
||||
} from './TechDocsReaderPage';
|
||||
|
||||
Reference in New Issue
Block a user