Merge pull request #17622 from adamdmharvey/adamdmharvey/remove-deprecations
chore(techdocs): Swap from deprecated API imports to use shared library ones
This commit is contained in:
@@ -20,11 +20,14 @@ import { ReactNode } from 'react';
|
||||
import { ResultHighlight } from '@backstage/plugin-search-common';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { SearchResultListItemExtensionProps } from '@backstage/plugin-search-react';
|
||||
import { SyncResult as SyncResult_2 } from '@backstage/plugin-techdocs-react';
|
||||
import { TableColumn } from '@backstage/core-components';
|
||||
import { TableOptions } from '@backstage/core-components';
|
||||
import { TableProps } from '@backstage/core-components';
|
||||
import { TechDocsApi as TechDocsApi_2 } from '@backstage/plugin-techdocs-react';
|
||||
import { TechDocsEntityMetadata as TechDocsEntityMetadata_2 } from '@backstage/plugin-techdocs-react';
|
||||
import { TechDocsMetadata as TechDocsMetadata_2 } from '@backstage/plugin-techdocs-react';
|
||||
import { TechDocsStorageApi as TechDocsStorageApi_2 } from '@backstage/plugin-techdocs-react';
|
||||
import { ToolbarProps } from '@material-ui/core';
|
||||
import { UserListFilterKind } from '@backstage/plugin-catalog-react';
|
||||
|
||||
@@ -237,7 +240,7 @@ export interface TechDocsApi {
|
||||
export const techdocsApiRef: ApiRef<TechDocsApi>;
|
||||
|
||||
// @public
|
||||
export class TechDocsClient implements TechDocsApi {
|
||||
export class TechDocsClient implements TechDocsApi_2 {
|
||||
constructor(options: {
|
||||
configApi: Config;
|
||||
discoveryApi: DiscoveryApi;
|
||||
@@ -442,7 +445,7 @@ export interface TechDocsStorageApi {
|
||||
export const techdocsStorageApiRef: ApiRef<TechDocsStorageApi>;
|
||||
|
||||
// @public
|
||||
export class TechDocsStorageClient implements TechDocsStorageApi {
|
||||
export class TechDocsStorageClient implements TechDocsStorageApi_2 {
|
||||
constructor(options: {
|
||||
configApi: Config;
|
||||
discoveryApi: DiscoveryApi;
|
||||
@@ -471,6 +474,6 @@ export class TechDocsStorageClient implements TechDocsStorageApi {
|
||||
syncEntityDocs(
|
||||
entityId: CompoundEntityRef,
|
||||
logHandler?: (line: string) => void,
|
||||
): Promise<SyncResult>;
|
||||
): Promise<SyncResult_2>;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -23,11 +23,13 @@ import {
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { NotFoundError, ResponseError } from '@backstage/errors';
|
||||
import {
|
||||
SyncResult,
|
||||
TechDocsApi,
|
||||
TechDocsEntityMetadata,
|
||||
TechDocsMetadata,
|
||||
TechDocsStorageApi,
|
||||
} from '@backstage/plugin-techdocs-react';
|
||||
import { EventSourcePolyfill } from 'event-source-polyfill';
|
||||
import { SyncResult, TechDocsApi, TechDocsStorageApi } from './api';
|
||||
|
||||
/**
|
||||
* API to talk to `techdocs-backend`.
|
||||
@@ -189,7 +191,7 @@ export class TechDocsStorageClient implements TechDocsStorageApi {
|
||||
* @param entityId - Object containing entity data like name, namespace, etc.
|
||||
* @param logHandler - Callback to receive log messages from the build process
|
||||
* @returns Whether documents are currently synchronized to newest version
|
||||
* @throws Throws error on error from sync endpoint in Techdocs Backend
|
||||
* @throws Throws error on error from sync endpoint in TechDocs Backend
|
||||
*/
|
||||
async syncEntityDocs(
|
||||
entityId: CompoundEntityRef,
|
||||
|
||||
@@ -29,7 +29,7 @@ export type TechDocsPageWrapperProps = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Component wrapping a techdocs page with Page and Header components
|
||||
* Component wrapping a TechDocs page with Page and Header components
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The TechDocs reader is a component that fetches a remote page, runs transformers on it and renders it into a shadow dom.
|
||||
|
||||
Currently there's no easy way to customize which transformers to run or add new ones. If that is needed you would have to fork the techdocs plugin and make your changes in that fork.
|
||||
Currently there's no easy way to customize which transformers to run or add new ones. If that is needed you would have to fork the TechDocs plugin and make your changes in that fork.
|
||||
|
||||
Transformers are functions that optionally takes in parameters from the Reader.tsx component and returns a function which gets passed the DOM of the fetched page. A very simple transformer can look like this.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user