@@ -7,7 +7,8 @@
|
||||
"pluginPackages": [
|
||||
"@backstage/plugin-devtools",
|
||||
"@backstage/plugin-devtools-backend",
|
||||
"@backstage/plugin-devtools-common"
|
||||
"@backstage/plugin-devtools-common",
|
||||
"@backstage/plugin-devtools-react"
|
||||
]
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
import { AnyApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { AnyRouteRefParams } from '@backstage/frontend-plugin-api';
|
||||
import { ApiFactory } from '@backstage/frontend-plugin-api';
|
||||
import { ConfigurableExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { DevToolsRouteData } from '@backstage/plugin-devtools-react';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { IconComponent } from '@backstage/core-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
@@ -58,8 +61,6 @@ const _default: OverridableFrontendPlugin<
|
||||
};
|
||||
}>;
|
||||
'page:devtools': ExtensionDefinition<{
|
||||
kind: 'page';
|
||||
name: undefined;
|
||||
config: {
|
||||
path: string | undefined;
|
||||
};
|
||||
@@ -76,7 +77,17 @@ const _default: OverridableFrontendPlugin<
|
||||
optional: true;
|
||||
}
|
||||
>;
|
||||
inputs: {};
|
||||
inputs: {
|
||||
routes: ExtensionInput<
|
||||
ConfigurableExtensionDataRef<DevToolsRouteData, 'devtools.route', {}>,
|
||||
{
|
||||
singleton: false;
|
||||
optional: true;
|
||||
}
|
||||
>;
|
||||
};
|
||||
kind: 'page';
|
||||
name: undefined;
|
||||
params: {
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
```ts
|
||||
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { DevToolsRouteData } from '@backstage/plugin-devtools-react';
|
||||
import { ElementType } from 'react';
|
||||
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
||||
import { ReactNode } from 'react';
|
||||
@@ -27,7 +28,15 @@ export type DevToolsLayoutProps = {
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export const DevToolsPage: () => JSX_2.Element;
|
||||
export const DevToolsPage: ({
|
||||
extensionRoutes,
|
||||
}: DevToolsPageProps) => JSX_2.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface DevToolsPageProps {
|
||||
// (undocumented)
|
||||
extensionRoutes?: DevToolsRouteData[];
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const devToolsPlugin: BackstagePlugin<
|
||||
|
||||
@@ -23,16 +23,10 @@ import { ConfigContent } from '../Content/ConfigContent';
|
||||
import { DevToolsLayout } from '../DevToolsLayout';
|
||||
import { InfoContent } from '../Content/InfoContent';
|
||||
import { RequirePermission } from '@backstage/plugin-permission-react';
|
||||
import { DevToolsRouteData } from '@backstage/plugin-devtools-react';
|
||||
|
||||
export interface DefaultDevToolsPageProps {
|
||||
extensionRoutes?: DevToolsRouteData[];
|
||||
}
|
||||
import { DevToolsPageProps } from '../DevToolsPage';
|
||||
|
||||
/** @public */
|
||||
export const DefaultDevToolsPage = ({
|
||||
extensionRoutes,
|
||||
}: DefaultDevToolsPageProps) => (
|
||||
export const DefaultDevToolsPage = ({ extensionRoutes }: DevToolsPageProps) => (
|
||||
<DevToolsLayout>
|
||||
<DevToolsLayout.Route path="info" title="Info">
|
||||
<RequirePermission permission={devToolsInfoReadPermission}>
|
||||
|
||||
@@ -18,6 +18,9 @@ import { useOutlet } from 'react-router-dom';
|
||||
import { DefaultDevToolsPage } from '../DefaultDevToolsPage';
|
||||
import { DevToolsRouteData } from '@backstage/plugin-devtools-react';
|
||||
|
||||
/**
|
||||
@public
|
||||
*/
|
||||
export interface DevToolsPageProps {
|
||||
extensionRoutes?: DevToolsRouteData[];
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { DevToolsPage } from './DevToolsPage';
|
||||
export { DevToolsPage, type DevToolsPageProps } from './DevToolsPage';
|
||||
|
||||
@@ -16,3 +16,4 @@
|
||||
|
||||
export * from './Content';
|
||||
export * from './DevToolsLayout';
|
||||
export { type DevToolsPageProps } from './DevToolsPage';
|
||||
|
||||
Reference in New Issue
Block a user